Commit Graph

51 Commits

Author SHA1 Message Date
Maarten van Diemen
8a5d2ea4a1 Merge branch 'main' into feature/pass-toolsets 2025-11-30 22:08:41 +01:00
Sean Goedecke
18d468666d fix: keep response-file temp file for downstream steps
The temporary file created for response-file was being cleaned up
before downstream steps could access it. Now using keep: true to
ensure the file persists until the job completes.

Also added script/ to eslint ignores for the mock server.
2025-11-27 21:06:42 +00:00
Maarten van Diemen
95443f8d18 Merge with main 2025-11-24 13:06:01 +01:00
David Sanders
39308142df chore: apply code review comment
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-23 16:19:12 -08:00
David Sanders
48f0edec4d feat: support modelParameters in prompt.yaml files 2025-11-23 16:07:11 -08:00
Maarten van Diemen
932a853db4 Initial implementation for passing toolsets 2025-11-02 23:20:24 +01:00
David Sanders
af1c1c29a3 fix: do template substition after parsing prompt YAML 2025-10-20 21:32:06 -07:00
Sean Goedecke
dfaa426c29 Parse inference response format defensively 2025-08-22 22:34:18 +00:00
Jessica Rudder
a2fd223fcf Properly clean up tmp files 2025-08-12 14:31:05 -07:00
Jessica Rudder
3ba8e1b39d Replace manual tmp file creation with tmp library which uses security best practices 2025-08-12 13:49:47 -07:00
Sean Goedecke
9133f81330 package 2025-08-06 00:54:19 +00:00
Sean Goedecke
e44da102bf fixup format parsing 2025-08-05 22:21:28 +00:00
Sean Goedecke
866ae2b5d7 Ensure MCP loops output the right response format
In a tool loop, you can't set response_format because the model needs to
be able to think in plain English. But you still need the final response
to be in the desired format, so we add response_format only on the last
iteration.
2025-08-05 22:06:49 +00:00
Sean Goedecke
4685e0dcd4 Force exit once inference finishes in case we are holding any connections open 2025-08-05 21:42:07 +00:00
Sean Goedecke
009d5e6e28 Update error 2025-08-05 02:52:11 +00:00
Sean Goedecke
18367df745 Merge branch 'main' into sgoedecke/use-openai-sdk 2025-08-05 02:49:44 +00:00
Sean Goedecke
de436346ec Fixup error messages 2025-08-05 02:11:43 +00:00
Sean Goedecke
4b5bb5c538 Use OpenAI SDK to avoid setting apiVersion manually 2025-08-05 02:09:17 +00:00
Sean Goedecke
ea4e7d8bb9 package 2025-08-05 01:52:46 +00:00
Sean Goedecke
aaf9c5af33 Update src/prompt.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-05 11:51:50 +10:00
Sean Goedecke
15868b88f4 Allow templating variables from files 2025-08-05 01:32:32 +00:00
Sean Goedecke
fa321d4c78 Update src/main.ts
Co-authored-by: Marais Rossouw <me@marais.co>
2025-08-05 08:59:43 +10:00
Sean Goedecke
a620b9fa98 Force exit on error 2025-08-04 22:40:30 +00:00
Sean Goedecke
a6d2a86ab3 Log specific error even if it is not an Error 2025-08-04 22:28:10 +00:00
Sean Goedecke
419f171f16 Separate out MCP token 2025-08-04 03:06:53 +00:00
Marais Rossouw
7e2aa19f3b chore: use github's shared prettier-config 2025-07-24 19:11:15 +10:00
Sean Goedecke
72102e50bf Update src/prompt.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-21 14:55:49 +10:00
Sean Goedecke
8f64ac1284 Fixup types and tests 2025-07-21 04:31:06 +00:00
Sean Goedecke
1780121e3b Support .prompt.yml files 2025-07-21 00:11:26 +00:00
Sean Goedecke
a3fe147234 Merge branch 'main' into sgoedecke/mcp 2025-07-16 02:56:55 +00:00
Sean Goedecke
4fd6464105 Add read-only MCP support 2025-07-16 02:19:49 +00:00
Sean Goedecke
86c0691fbf Add tests 2025-07-16 00:12:41 +00:00
Sean Goedecke
886d4717d7 Make it work 2025-07-15 23:31:48 +00:00
Sean Goedecke
0b82ac474e Sketch out MCP 2025-07-15 23:23:39 +00:00
Naoki Ainoya
dee5a5edef fix lint 2025-07-02 09:47:42 +09:00
Naoki Ainoya
37fe8eb685 fix: improve error handling for AI service responses
- Add defensive check for response.body existence to prevent undefined property access
- Include x-ms-error-code header in error messages for better debugging
- Provide clearer error messages for different failure scenarios
- Fix 'Cannot read properties of undefined (reading 'error')' runtime error

This improves the debugging experience when AI service requests fail due to
network issues, authentication errors, or unexpected response formats.
2025-07-02 09:18:50 +09:00
Matthew Leibowitz
eb37c9a493 Formatting 2025-05-26 03:46:39 +02:00
Matthew Leibowitz
3e924fe06b Refactor the prompt reading logic 2025-05-25 19:08:36 +02:00
Matthew Leibowitz
91ba53d8b4 feat: Add system-prompt-file input for file-based system prompts
This enhancement adds the ability to load a system prompt from a file, similar to
the existing prompt-file functionality, providing more flexibility when working with
complex system prompts.

Key changes:
- Added new `system-prompt-file` input to action.yml with proper description
- Updated main.ts implementation to handle file-based system prompts with:
  - File existence checking and appropriate error handling
  - Proper precedence (system-prompt-file takes priority over system-prompt)
  - Consistent error messages with existing prompt-file implementation

Test coverage added:
- Basic usage: Test verifies system-prompt-file loads content correctly
- Error handling: Test ensures proper errors when system-prompt-file doesn't exist
- Precedence: Test confirms system-prompt-file overrides system-prompt when both exist
- Integration: Test validates both prompt-file and system-prompt-file work together
- Max tokens: Test verifies custom token limits are properly passed to the model
- Testing infrastructure: Improved mock implementations that detect unexpected calls

Documentation:
- Updated README.md with system-prompt-file in inputs table
- Added dedicated usage example for system-prompt-file
- Fixed formatting in inputs table

CI/CD:
- Updated workflow to test system-prompt-file functionality with actual file content

This feature maintains backward compatibility while adding a useful option
for workflows that need to use more complex system prompts stored in files.
2025-05-24 03:50:15 +02:00
Aiqiao Yan
1c557cdc25 react to feedback 2025-04-17 20:23:07 +00:00
Aiqiao Yan
f1591cfa68 add test 2025-04-17 20:13:47 +00:00
Aiqiao Yan
43f6a3831f read prompt from file and print output to file 2025-04-17 17:41:35 +00:00
Sean Goedecke
e670dd5178 Set user agent 2025-04-10 02:53:54 +00:00
Sean Goedecke
84fee7a0e6 Use user-provided endpoint 2025-04-08 20:22:47 +00:00
Sean Goedecke
4738a2d212 use org-owned endpoint 2025-04-08 04:55:27 +00:00
Sean Goedecke
efbbaa2667 Use correct Azure inference endpoint 2025-04-07 23:52:33 +00:00
Sean Goedecke
32ebbe708a Make token configurable 2025-04-07 04:53:19 +00:00
Sean Goedecke
d86d983567 update README 2025-04-07 00:09:42 +00:00
Sean Goedecke
6932781e1f fixup tests and npm run all 2025-04-06 23:21:29 +00:00
Sean Goedecke
183a647877 Setup initial inference flow and install packages 2025-04-03 21:55:32 +00:00