Skip to content
Open

Dev #1578

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
647 commits
Select commit Hold shift + click to select a range
a39863a
Add support for organization inference in GitHub Models configuration…
pelikhan Jul 8, 2025
15caa2f
Release 2.2.10
pelikhan Jul 8, 2025
bfddc7e
[skip ci] updated version numbers
pelikhan Jul 8, 2025
fa6a6c9
Add --no-run-trace option and disable trace configuration for perform…
pelikhan Jul 8, 2025
0329883
Release 2.2.11
pelikhan Jul 8, 2025
6897293
[skip ci] updated version numbers
pelikhan Jul 8, 2025
92570ac
Remark GitHub alerts (#1718)
pelikhan Jul 8, 2025
4ddc31e
Enhance GitHub alert handling by adding GitHubAlertMarker interface a…
pelikhan Jul 8, 2025
ee525f1
Remove GitHub short links support from MdAstOptions and related imports
pelikhan Jul 8, 2025
d811ca4
mdast support for details sections (#1721)
pelikhan Jul 8, 2025
22a0728
Release 2.2.12
pelikhan Jul 8, 2025
0c45bdc
[skip ci] updated version numbers
pelikhan Jul 8, 2025
b9a28f1
mcp sampling (#1722)
pelikhan Jul 9, 2025
11384c5
Enhance MCP server documentation with sampling support and formatting…
pelikhan Jul 9, 2025
5129fde
samples options
pelikhan Jul 9, 2025
602b91f
offline mode
pelikhan Jul 10, 2025
f833836
Update .gitignore to include .pnpm-store and change GitHub Copilot in…
pelikhan Jul 11, 2025
6ea570a
move prompt to github folder
pelikhan Jul 11, 2025
f758d16
Add dev-proxy-tools actions to ollama workflow and log output
pelikhan Jul 11, 2025
2ca59a7
Update workflow paths to use 'samples' directory instead of 'packages…
pelikhan Jul 11, 2025
3dfab2c
Refactor ollama workflow for improved readability and structure; add …
pelikhan Jul 11, 2025
12d8674
Fix path to devproxyrc.json in ollama workflow
pelikhan Jul 11, 2025
a1c07a1
Add comprehensive .github/copilot-instructions.md for AI coding agent…
Copilot Jul 11, 2025
9eeb747
Add missing record-stop action to ollama workflow
pelikhan Jul 11, 2025
95b217a
Merge branch 'dev' of https://github.com/microsoft/genaiscript into dev
pelikhan Jul 11, 2025
6ed24a7
Add devproxy configuration and pricing schema files
pelikhan Jul 12, 2025
440ef76
✨ chore: Revise and streamline copilot instructions
pelikhan Jul 12, 2025
4f5d1f0
assign to bot (#1728)
pelikhan Jul 12, 2025
64bd5a9
✨ Add disableTrace for scripts and improve typing (#1731)
pelikhan Jul 12, 2025
56d957e
use new inference provider apis (#1732)
pelikhan Jul 12, 2025
62ad1f2
chore: update dependencies in pnpm-workspace.yaml and package.json files
pelikhan Jul 12, 2025
9c5066a
Remote run scripts (#1733)
pelikhan Jul 12, 2025
7008460
Implement code changes to enhance functionality and improve performance
pelikhan Jul 12, 2025
2acb216
Release 2.2.13
pelikhan Jul 12, 2025
7fd2a23
chore: update package versions to 2.2.13 across all modules
pelikhan Jul 12, 2025
bd6844f
fix: update command examples to remove 'npx' and improve formatting i…
pelikhan Jul 12, 2025
30de8bf
Release 2.2.14
pelikhan Jul 12, 2025
ddd6dbb
[skip ci] updated version numbers
pelikhan Jul 12, 2025
c0c6ef1
refactor: remove linting scripts from package.json
pelikhan Jul 12, 2025
8f7d366
fix remote run: don't change cwd (#1734)
pelikhan Jul 12, 2025
6512576
Release 2.2.15
pelikhan Jul 12, 2025
a9acda7
[skip ci] updated version numbers
pelikhan Jul 12, 2025
66041a8
refactor: streamline message rendering logic based on preview option
pelikhan Jul 12, 2025
37ca534
mdast chunk (#1736)
pelikhan Jul 12, 2025
e805616
Release 2.2.16
pelikhan Jul 12, 2025
fde6f65
[skip ci] updated version numbers
pelikhan Jul 12, 2025
e79d0fb
remove extra files in npm packages
pelikhan Jul 13, 2025
e127800
Improve GitHub authentication error handling with actionable guidance…
Copilot Jul 14, 2025
9ee368c
Refactor type imports and enhance type safety in chat.ts
pelikhan Jul 14, 2025
d87ed1b
Update README.md for clarity on the `$` function usage and improve fo…
pelikhan Jul 14, 2025
4db16ed
Playwright plugin (#1744)
pelikhan Jul 15, 2025
623f229
Refactor dev-proxy-tools actions in ollama.yml for improved setup and…
pelikhan Jul 15, 2025
c39313f
Remove dev-proxy-tools record-stop action and log output from ollama.yml
pelikhan Jul 15, 2025
2ced239
Enhance test setup by adding TestHost installation in encoders and te…
pelikhan Jul 16, 2025
69e451a
ignore node 23
pelikhan Jul 16, 2025
1500593
Update settings and enhance env parsing logic; add new import and ref…
pelikhan Jul 16, 2025
11e60c7
Release 2.3.0
pelikhan Jul 16, 2025
1c2ea48
[skip ci] updated version numbers
pelikhan Jul 16, 2025
a2667ed
Plugin-pyodide (#1745)
pelikhan Jul 16, 2025
2fbd745
claude 4
pelikhan Jul 16, 2025
a64d07a
don't clean on build
pelikhan Jul 16, 2025
c9d6e17
fix: update documentation links and model environment variables in wo…
pelikhan Jul 17, 2025
99ab780
fix: update translation workflow to use action for continuous transla…
pelikhan Jul 17, 2025
315475a
support line number offset
pelikhan Jul 17, 2025
6272ab4
feat: add map and reduce functions with documentation and sample usage
pelikhan Jul 17, 2025
3f8d284
refactor: rename renderChatMessages to disableChatPreview for clarity
pelikhan Jul 17, 2025
15b6166
Release 2.3.1
pelikhan Jul 17, 2025
b989a26
[skip ci] updated version numbers
pelikhan Jul 17, 2025
d6a3ef7
refactor: add return type to installWindow and resolve file content i…
pelikhan Jul 17, 2025
fe6d218
Release 2.3.2
pelikhan Jul 17, 2025
1d07370
[skip ci] updated version numbers
pelikhan Jul 17, 2025
3d6e644
Global host (#1748)
pelikhan Jul 17, 2025
1dec3c8
Release 2.3.3
pelikhan Jul 17, 2025
decd6cc
[skip ci] updated version numbers
pelikhan Jul 17, 2025
2c1a566
host bug
pelikhan Jul 17, 2025
b5a6b67
Release 2.3.4
pelikhan Jul 17, 2025
0310e39
[skip ci] updated version numbers
pelikhan Jul 17, 2025
56a0b52
refactor: simplify prepack script by removing clean step
pelikhan Jul 17, 2025
0b0f064
refactor: update release script to include clean and build steps
pelikhan Jul 17, 2025
dda9cb5
clen
pelikhan Jul 17, 2025
b630f94
chore: remove link to Mr. Maeda's Cozy AI Kitchen from README
pelikhan Jul 17, 2025
66b8fec
Release 2.3.5
pelikhan Jul 17, 2025
272c65e
[skip ci] updated version numbers
pelikhan Jul 17, 2025
11ef28c
fix html file paths
pelikhan Jul 17, 2025
d080cc3
Release 2.3.6
pelikhan Jul 17, 2025
f517470
[skip ci] updated version numbers
pelikhan Jul 17, 2025
7144e63
refactor: update fetch retry constants and improve retry logic
pelikhan Jul 18, 2025
9a444ec
image to mermaid sample
pelikhan Jul 18, 2025
e0b8f93
use vision model
pelikhan Jul 18, 2025
43fded0
fixing compile tests (#1750)
pelikhan Jul 21, 2025
5d35490
Integrate #1751 in dev branch
pelikhan Jul 21, 2025
6a16e20
fix: handle undefined return values in parseRetryAfter function
pelikhan Jul 21, 2025
8facca9
Release 2.3.7
pelikhan Jul 21, 2025
d69a373
[skip ci] updated version numbers
pelikhan Jul 21, 2025
243c2ca
fix: enhance model cost estimation for GitHub provider and update tests
pelikhan Jul 21, 2025
8510dd8
Release 2.3.8
pelikhan Jul 21, 2025
afa3dbd
[skip ci] updated version numbers
pelikhan Jul 21, 2025
a3ab90c
Api version model version (#1758)
pelikhan Jul 21, 2025
c10b3a8
more tests
pelikhan Jul 21, 2025
9b4b3ca
fix: update regex to correctly match GitHub alert syntax with optiona…
pelikhan Jul 21, 2025
a50f36e
Release 2.3.9
pelikhan Jul 21, 2025
6aab223
[skip ci] updated version numbers
pelikhan Jul 21, 2025
213e8ae
Add support for streaming HTTP servers in MCP client support (#1764)
Copilot Jul 23, 2025
c41b24e
Add HTTP transport support to MCP server (#1762)
Copilot Jul 23, 2025
74ac413
support for markdown files (#1761)
pelikhan Jul 23, 2025
fc3cfb2
Remove debug logging from markdownScriptParse function
pelikhan Jul 23, 2025
79571b1
chore: update @inquirer/prompts to version 7.7.1 in pnpm-workspace.yaml
pelikhan Jul 23, 2025
2fa1174
fix mcp server session handling
pelikhan Jul 23, 2025
b933d92
Add comprehensive git worktree support to GitHubClient interface (#1773)
Copilot Jul 23, 2025
867a12d
Add syntax highlighting support for GenAIScript markdown files (.gena…
Copilot Jul 23, 2025
f0c18d2
Update GenAIScript type definition file
pelikhan Jul 23, 2025
4923581
Add initial linter configuration for GenAIScript
pelikhan Jul 23, 2025
aa691d9
fix worktree tests
pelikhan Jul 23, 2025
7ed3dd8
Remove WebSocket transport support from MCP client implementation (#1…
Copilot Jul 23, 2025
ce7ea4f
Fix: Enable "Run GenAIScript..." command for .genai.md files in VSCod…
Copilot Jul 23, 2025
f73d0ab
Add git fetch command for test-ignore branch in build workflow
pelikhan Jul 24, 2025
e2194a2
Add GitHub-ready usage report generation to GenerationStats (#1785)
Copilot Jul 24, 2025
046ba58
Fix critical linting errors and TypeScript compilation issues (#1788)
Copilot Jul 24, 2025
1df5887
Add GitHub Actions documentation for whisper-asr container setup (#1791)
Copilot Jul 24, 2025
1cc4916
Migrate from mdtranslator script to GitHub action for continuous tran…
Copilot Jul 24, 2025
c5c7148
Add image input support to generateImage function for editing and var…
sinedied Jul 24, 2025
44e9d8b
Implement OpenAI Responses API support with configurable API type (#1…
Copilot Jul 24, 2025
39621c6
Refactor OpenAI integration and add support for chat completion
pelikhan Jul 24, 2025
530dcec
Update FETCH_RETRY_ON_DEFAULT to include HTTP status code 502
pelikhan Jul 24, 2025
662e35a
Add system prompt scripts for expert programming personas (Go, Rust, …
Copilot Jul 25, 2025
9cca5d8
Add test-robot.png to .gitignore to prevent tracking of test artifacts
pelikhan Jul 25, 2025
67056b2
Fix: Do not include usage report in AI disclaimer when token usage is…
Copilot Jul 25, 2025
3820ef0
Fix: skip tests in CI environment
pelikhan Jul 25, 2025
f3143a8
Fix: skip test execution in CI environment
pelikhan Jul 25, 2025
5e3f045
Release 2.3.10
pelikhan Jul 25, 2025
cd6ae8a
[skip ci] updated version numbers
pelikhan Jul 25, 2025
86c69b5
Add system prompts for Ruby and PHP programming with automatic activa…
Copilot Jul 29, 2025
91b94f5
Add LLM-optimized content generator sample with intelligent hash trac…
Copilot Jul 29, 2025
c82f6f1
Implement Chain of Debate GenAIScript sample for multi-agent debate s…
Copilot Jul 29, 2025
e83144e
Refactor pickChatModel function for improved readability and type ann…
pelikhan Jul 29, 2025
c2b015e
Implement OpenAI Responses API provider (#1795)
Copilot Jul 30, 2025
386f878
Fix Azure OpenAI image generation and editing API issues (#1808)
Copilot Jul 31, 2025
bad5f4b
Reduce minimum required VSCode version from 1.101.0 to 1.100.0 (#1810)
Copilot Aug 1, 2025
48daa80
Enhance environment variable handling and model provider configurations
pelikhan Aug 1, 2025
9207b11
Improve gitignore handling by adding case insensitivity and enhancing…
pelikhan Aug 1, 2025
298f4de
Release 2.3.11
pelikhan Aug 1, 2025
36bc1dd
[skip ci] updated version numbers
pelikhan Aug 1, 2025
e1c2388
Refactor image handling in OpenAI image generation and update sample …
pelikhan Aug 2, 2025
1b80964
Refactor markdown report generation in GenerationStats for improved r…
pelikhan Aug 2, 2025
e4259f2
Release 2.3.12
pelikhan Aug 2, 2025
5b32cde
[skip ci] updated version numbers
pelikhan Aug 2, 2025
9607f96
Update image generation documentation with edit mode capabilities (#1…
Copilot Aug 2, 2025
b99ab82
Fix image rendering in terminals without color support using Unicode …
Copilot Aug 2, 2025
dfb8765
add computed llmstxt entries (#1819)
pelikhan Aug 2, 2025
e0c7b92
Improve documentation links in actionConfigure function
pelikhan Aug 2, 2025
3cc364b
Fix formatting of GitHub token permission description in llmsdata.ts
pelikhan Aug 2, 2025
0ff18d9
Simplify retry options propagation and fix OpenAI fetch configuration…
Copilot Aug 2, 2025
09ae642
Add resolveResource method to ResourceHost interface with documentati…
Copilot Aug 2, 2025
a12e8a0
Web-base64 (#1822)
pelikhan Aug 4, 2025
91cd714
Release 2.3.13
pelikhan Aug 4, 2025
809c8cb
[skip ci] updated version numbers
pelikhan Aug 4, 2025
f43f9b9
export `generateId`
pelikhan Aug 4, 2025
4304e24
Add arrayify to exported utility functions in extras.ts
pelikhan Aug 4, 2025
400188d
Enhance documentation for CLI commands and system prompts; add llmstx…
pelikhan Aug 4, 2025
b959fcc
Implement code changes to enhance functionality and improve performance
pelikhan Aug 4, 2025
863ded5
Add content compression for LLM optimization in genaisrc
pelikhan Aug 4, 2025
15c6802
Enhance documentation for GenAIScript, improving clarity on core conc…
pelikhan Aug 4, 2025
0392366
🩹 fix: MCP server URL configuration support for remote servers (#1831)
Copilot Aug 5, 2025
3a62536
refactor: streamline CLI command documentation and enhance MCP server…
pelikhan Aug 5, 2025
f3e8447
Fix NODE_OPTIONS configuration and missing import in VSCode extension…
Copilot Aug 5, 2025
969f331
Add workspace boundary validation and fs_write_file system tool for s…
Copilot Aug 6, 2025
fdec9c2
docs: update instructions to emphasize build process and add self-imp…
pelikhan Aug 6, 2025
e3902c3
Fix host.exec to preserve original subprocess exit codes (#1834)
Copilot Aug 6, 2025
7be0a32
docs: enhance repository structure and add documentation for samples …
pelikhan Aug 6, 2025
4cc586e
style: format code for consistency and readability in fs_write_file a…
pelikhan Aug 6, 2025
8985363
refactor: improve code formatting and enhance exit code checks in hos…
pelikhan Aug 6, 2025
408c900
docs: add instruction to avoid committing files from the .genaiscript…
pelikhan Aug 6, 2025
d7d9ccb
docs: add instruction to avoid committing files from the .genaiscript…
pelikhan Aug 6, 2025
3ac87a3
Add --filter-model option to test command for filtering by script mod…
Copilot Aug 6, 2025
d9a6ef8
feat: add echo script tests and remove unused model references
pelikhan Aug 6, 2025
414ea3e
feat: add --filter-model option to test command for filtering scripts…
pelikhan Aug 6, 2025
4cd1ed3
Release 2.3.14
pelikhan Aug 6, 2025
34bdb01
[skip ci] updated version numbers
pelikhan Aug 6, 2025
0da5025
Update ignore-gitignore test to use node_modules file instead of .git…
Copilot Aug 6, 2025
0c8a032
Add 'responses' OpenAI API type and remove OPENAI_RESPONSES environme…
Copilot Aug 6, 2025
e444fc5
Add streamlined GenAIScript cheat sheet focusing on core functionalit…
Copilot Aug 6, 2025
7a21031
Improve test console output with enhanced progress indication, compre…
Copilot Aug 6, 2025
423c8d4
Add GitHub issue URL helper to create pre-filled issue forms (#1849)
Copilot Aug 7, 2025
c81ac72
Fix: Return USER_CANCELLED_ERROR_CODE when script status is cancelled…
Copilot Aug 11, 2025
9655275
Fix CSV parser data loss by changing skipRecordsWithError default to …
Copilot Aug 11, 2025
2dd4a98
Add support for @include directive in markdown scripts (#1860)
Copilot Aug 12, 2025
04a6463
mcpServers cli value (#1861)
Copilot Aug 12, 2025
024028a
Fix code block syntax highlighting in files.md and remove unused hero…
pelikhan Aug 12, 2025
2ee36dd
Remove unused huge.genai.mts script to clean up sample files
pelikhan Aug 12, 2025
6a2aa4b
upgrade deps
pelikhan Aug 12, 2025
de9ee19
Add failed tests list to test command summary (#1869)
Copilot Aug 12, 2025
0f8a0e2
Implement per-test timeout functionality with 1-minute default (#1868)
Copilot Aug 12, 2025
37c297d
Add --mcps flag to CLI run command for overriding MCP configuration (…
Copilot Aug 12, 2025
6389523
Add note to instructions about not committing files from .genaiscript…
pelikhan Aug 12, 2025
20dd5e3
Consolidate test runner output to single-line format (#1870)
Copilot Aug 12, 2025
4b09257
Release 2.3.15
pelikhan Aug 12, 2025
ae78e39
[skip ci] updated version numbers
pelikhan Aug 12, 2025
a9108f7
Add simple weather MCP server example with single Paris weather demo …
Copilot Aug 12, 2025
25d39a6
Add type annotations and assertions in prompt commands and test contr…
pelikhan Aug 19, 2025
79e81c3
Fix FFmpeg compatibility issues for async video operations - replace …
Copilot Aug 19, 2025
4b46d0f
Optimize memory usage by conditionally instantiating trace when runTr…
Copilot Aug 19, 2025
92a37da
Add missing resolveResource method to ResourceHost interface and upda…
Copilot Aug 19, 2025
fdd7a73
Add timeout configurations to "test echo" step: 30s per test, 5min to…
Copilot Aug 19, 2025
af6b5f7
Add --issue flag to run command for GitHub issue creation (#1883)
Copilot Aug 19, 2025
182cfdf
Add `line` option to `def()` for dynamic range extraction with token …
Copilot Aug 19, 2025
9c1b6b8
Add parentIssue support to GitHubClient.createIssue for sub-issue fun…
Copilot Aug 19, 2025
8acdcf7
Add system.resources system script for URL content resolution and upd…
Copilot Aug 19, 2025
233d006
Fix quiet mode to suppress runPrompt console output (#1857)
Copilot Aug 19, 2025
6b0bc7f
Add activation field to PromptSystemArgs for keyword-based system pro…
Copilot Aug 19, 2025
c985516
Add Windows container support with osType option to fix Docker path i…
Copilot Aug 19, 2025
7fc9a10
Update activation fields in system prompts to include singular and pl…
pelikhan Aug 19, 2025
e5cd7ef
Release 2.4.0
pelikhan Aug 19, 2025
d5422ff
[skip ci] updated version numbers
pelikhan Aug 19, 2025
b93a6d8
Enhance debugging and error handling in pickChatModel function
pelikhan Aug 19, 2025
366aaa1
Merge branch 'dev' of https://github.com/microsoft/genaiscript into dev
pelikhan Aug 19, 2025
821bab4
Refine logging documentation for clarity on enabling debug messages
pelikhan Aug 19, 2025
13741c3
Add logging for Azure OpenAI configuration and enhance error handling…
pelikhan Aug 19, 2025
ef84523
Add showQuickPickWithTimeout utility for improved UI responsiveness
pelikhan Aug 20, 2025
fcfef5b
Fix markdown script frontmatter parameters not working with variable …
Copilot Aug 20, 2025
87f7abf
Change default allowed domains to wildcard (*) for convenience while …
Copilot Aug 21, 2025
0a232e9
Better control on how github model chat model ids are resolved (#1904)
pelikhan Aug 22, 2025
8f135fb
Fix frontmatter parameter interpolation in markdown scripts (#1905)
Copilot Aug 22, 2025
815bfa0
Fix Windows path handling in VSCode extension context menu (issue #15…
Copilot Aug 22, 2025
078ade9
Release 2.4.1
pelikhan Aug 22, 2025
b7e2d39
[skip ci] updated version numbers
pelikhan Aug 22, 2025
e3df513
Fix optional chaining for trace property in startServer function
pelikhan Aug 22, 2025
047ec6c
Add retry logic for language chat model resolution in VSCode extension
pelikhan Aug 22, 2025
66e5c7e
Fix CodeQL security vulnerabilities in shell execution and file handl…
Copilot Aug 23, 2025
c3ea379
Fix env.files not populated when selecting folders in VS Code extensi…
Copilot Sep 3, 2025
09d5cf7
Fix generateImage edit mode content type error by using global.fetch …
Copilot Sep 3, 2025
353495a
Add comprehensive AWS Bedrock environment variable support for Anthro…
Copilot Sep 5, 2025
51e5d74
Update parseTokenFromEnv to use environment variable for LITELLM API key
pelikhan Sep 12, 2025
0881121
Add support for Claude MCP configuration files in CLI run command (#1…
Copilot Sep 13, 2025
59061be
https://github.com/microsoft/genaiscript/pull/1886#issuecomment-32943…
lemmy Sep 16, 2025
5867bd6
chore: update dependencies for esbuild and modelcontextprotocol
pelikhan Sep 16, 2025
268c4c5
Release 2.5.0
pelikhan Sep 16, 2025
0e5c444
[skip ci] updated version numbers
pelikhan Sep 16, 2025
0be10f2
Add support for setting default script metadata via GENAISCRIPT_DEFAU…
Copilot Sep 16, 2025
3c0d828
fix: format devcontainer.json for improved readability
pelikhan Sep 16, 2025
94fce23
Merge branch 'dev' of https://github.com/microsoft/genaiscript into dev
pelikhan Sep 16, 2025
ea4060b
feat: add gh-aw installation and compilation scripts to package.json …
pelikhan Sep 16, 2025
be68fa5
fix: correct curl command in gh-aw:install script
pelikhan Sep 16, 2025
5526ea9
fix: improve debug messages in file writing functions and update work…
pelikhan Sep 20, 2025
2acbc2c
fix: update debug messages in writeText and appendText functions for …
pelikhan Sep 20, 2025
bd6a2e9
Fix potential null dereference in server.ts when trace is disabled (#…
Copilot Sep 23, 2025
2ff1e73
default node 24 image
pelikhan Sep 24, 2025
8658fbe
Add --issue flag to create a GitHub issue with generation output
pelikhan Sep 26, 2025
0a2536f
Merge branch 'dev' of https://github.com/microsoft/genaiscript into dev
pelikhan Sep 26, 2025
9241a57
Release 2.5.1
pelikhan Sep 26, 2025
04e1884
[skip ci] updated version numbers
pelikhan Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
72 changes: 42 additions & 30 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,46 @@
{
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",
"postCreateCommand": "yarn install --frozen-lockfile --prefer-offline && yarn install:playwright",
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot-chat",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"bierner.markdown-mermaid",
"yoavbls.pretty-ts-errors",
"astro-build.astro-vscode",
"unifiedjs.vscode-mdx",
"streetsidesoftware.code-spell-checker",
"file-icons.file-icons",
"GitHub.vscode-pull-request-github",
"usernamehw.errorlens",
"goessner.mdmath",
"vsls-contrib.gistfs",
"ms-azuretools.vscode-containers"
]
}
"image": "mcr.microsoft.com/devcontainers/javascript-node:24",
"postCreateCommand": "pnpm install --frozen-lockfile --prefer-offline && pnpm install:playwright",
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot-chat",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"bierner.markdown-mermaid",
"yoavbls.pretty-ts-errors",
"astro-build.astro-vscode",
"unifiedjs.vscode-mdx",
"streetsidesoftware.code-spell-checker",
"file-icons.file-icons",
"GitHub.vscode-pull-request-github",
"usernamehw.errorlens",
"goessner.mdmath",
"vsls-contrib.gistfs",
"ms-azuretools.vscode-containers",
"ms-vscode.vscode-js-profile-flame",
"streetsidesoftware.code-spell-checker-french"
]
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/azure-cli:1": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": {},
"ghcr.io/devcontainers/features/rust:1": {}
"codespaces": {
"repositories": {
"githubnext/gh-aw": {
"permissions": {
"releases": "read",
"contents": "read"
}
}
}
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/azure-cli:1": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": {},
"ghcr.io/devcontainers/features/rust:1": {}
}
}
56 changes: 56 additions & 0 deletions .devproxy/devproxyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/rc.schema.json",
"plugins": [
{
"name": "LatencyPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
"configSection": "apiLatencyPlugin",
"urlsToWatch": [
"http://api.ecs.eu/*"
]
},
{
"name": "OpenAITelemetryPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
"configSection": "openAITelemetryPlugin"
},
{
"name": "CrudApiPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
"configSection": "feedbackApi",
"urlsToWatch": [
"http://api.ecs.eu/feedback"
]
},
{
"name": "MarkdownReporter",
"enabled": true,
"pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll"
}
],
"urlsToWatch": [
"https://models.github.ai/inference/chat/completions*",
"http://localhost:11434"
],
"feedbackApi": {
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/crudapiplugin.schema.json",
"apiFile": "feedback-api.json"
},
"apiLatencyPlugin": {
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/latencyplugin.schema.json",
"minMs": 200,
"maxMs": 500
},
"openAITelemetryPlugin": {
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/openaitelemetryplugin.schema.json",
"currency": "USD",
"includeCosts": true,
"pricesFile": "prices.json"
},
"logLevel": "trace",
"newVersionNotification": "stable",
"showSkipMessages": true
}
13 changes: 13 additions & 0 deletions .devproxy/prices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/openaitelemetryplugin.pricesfile.schema.json",
"prices": {
"llama-3.2-7b": {
"input": 2.5,
"output": 10
},
"gpt-4.1-2025-04-14": {
"input": 2.5,
"output": 10
}
}
}
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_size = 2
indent_style = space
end_of_line = lf
insert_final_newline = true
charset = utf-8
17 changes: 0 additions & 17 deletions .genaiscript/instructions/genaiscript.instructions.md

This file was deleted.

108 changes: 108 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
Source: .ruler/instructions.md
---
# GenAIScript

- Always use the `dev` branch for development or upstream.
- Use `vitest` to generate tests. Place tests in the `tests` directory.

```files
src/code.ts
test/code.test.ts
```

- Generate TypeScript (esm, async/await) code when possible, not JavaScript.
- Filenames should be lowercase, with no spaces or special characters.

## Repository structure

The repository is organized as a monorepo with the following main packages in the `packages/` directory:

### Core Packages

- **`core/`** - `@genaiscript/core` - The core GenAIScript library containing the main functionality, LLM integrations, and APIs
- **`runtime/`** - `@genaiscript/runtime` - Runtime environment for executing GenAIScript scripts with Docker support
- **`api/`** - `@genaiscript/api` - Public API interfaces and types for GenAIScript
- **`cli/`** - `genaiscript` - Command-line interface for GenAIScript (main CLI package)
- **`.genaiscript`** - build artifacts - never commit files from `.genaiscript` folders!

### Extensions & Plugins

- **`vscode/`** - `genaiscript-vscode` - Visual Studio Code extension for GenAIScript
- **`web/`** - Web-based components and interfaces
- **`plugin-ast-grep/`** - `@genaiscript/plugin-ast-grep` - AST grep plugin for code analysis
- **`plugin-mdast/`** - `@genaiscript/plugin-mdast` - Markdown AST plugin
- **`plugin-mermaid/`** - `@genaiscript/plugin-mermaid` - Mermaid diagram plugin
- **`plugin-playwright/`** - `@genaiscript/plugin-playwright` - Playwright automation plugin
- **`plugin-pyodide/`** - `@genaiscript/plugin-pyodide` - Python execution plugin using Pyodide
- **`plugin-z3/`** - `@genaiscript/plugin-z3` - Z3 theorem prover plugin

### TypeScript Configuration

- **`tsconfig.base.json`** - Base TypeScript configuration
- **`tsconfig.lib.json`** - Library-specific TypeScript configuration
- **`tsconfig.nonlib.json`** - Non-library TypeScript configuration
- **`tsconfig.test.base.json`** - Test-specific TypeScript configuration

## Documentation (`/docs`)

The documentation is built using [Astro](https://astro.build/) with the [Starlight](https://starlight.astro.build/) theme. It includes:

- **Source**: `docs/src/content/docs/` - Markdown documentation files
- **Blog**: `docs/src/content/docs/blog/` - Built-in blog functionality with `starlight-blog` plugin
- **Translations**: Ignore translations, they are autogenerated and updated.
- **Building**: `pnpm build:docs` - Build the documentation site

## Samples (`/samples`)

The repository contains several sample projects demonstrating GenAIScript usage:

### Sample Collection

- **`samples/sample/genaisrc/`** - Comprehensive collection of GenAIScript examples
- 200+ sample scripts covering all major features
- Examples for tools, agents, data processing, file operations, and more
- Test scripts for validating functionality
- Organized in subdirectories by topic (blog/, node/, style/, etc.)
- **`samples/modulesample/`** - Module usage examples
- **`samples/runtime-sample/`** - Runtime API examples

> Never add files from the `.genaiscript` directory. This folder contains runtime generated temporary files and should not be committed to the repository.

## Building and testing

- Use `pnpm build` to build the project
- Use `pnpm build:cli` to build the cli only
- Use `pnpm -r test` to run all tests
- Use `pnpm test:core` for fast unit tests. It uses `vitest` to run tests.
- Use `pnpm build:docs` to build the documentation

NEVER try to run `genaiscript` using `npx`. Always using
the local cli

```sh
node packages/cli/dist/src/index.js run
```

> IMPORTANT: Always run `pnpm build` at the end of the your work to ensure that the build still works.

## Debug logging

If you need to add debug logging, use `genaiscriptDebug("category")` to instantiate a new debug logger in a file
where `category` is a descriptive name for the module or feature.

```ts
import { genaiscriptDebug } from "@genaiscript";
const debug = genaiscriptDebug("category");
```

To enable debug logging, add `DEBUG=genaiscript:category` to the environment variables when running the script.

```bash
DEBUG=genaiscript:category pnpm test:core
```

## Self improvement

Before finishing and assigning the pull request back to the user, self-reflect on your current session and generate 5 possible improvements to the `copilot-instructions.md` file. These should be based on your experience and the tasks you completed.
Pick the most relevant ones and post a pull request review comment with a code update suggestion to the `.ruler/instructions.md` file. Keep it short, don't overdo it, and focus on the most impactful changes.
11 changes: 3 additions & 8 deletions .github/genaisrc/issue-bot.genai.mts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@ script({
responseType: "markdown",
systemSafety: true,
group: "actions",
parameters: {
issue: {
type: "integer",
description: "The issue number to answer.",
required: false,
},
},
})

const { title, body, number } = await github.getIssue(env.vars.issue)
const info = await github.info()
console.log(info)
const { title, body, number } = await github.getIssue()
const comments = await github.listIssueComments(number, { count: 100 })

def("TITLE", title)
Expand Down
20 changes: 20 additions & 0 deletions .github/instructions/genaiscript.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
applyTo: "**/*.genai.*"
description: "Instructions for working with GenAIScript files"
---

## GenAIScript Code Generation Instructions

GenAIScript is a custom runtime for node.js. It provides a set of unique APIs and support the TypeScript syntax, ESM, await/async.

- GenAIScript documentation: https://microsoft.github.io/genaiscript/llms-full.txt
- GenAIScript ambient type definitions: https://microsoft.github.io/genaiscript/genaiscript.d.ts

## Guidance for Code Generation

- you always generate TypeScript code using ESM modules for Node.JS.
- you prefer using APIs from GenAIScript `genaiscript.d.ts` rather than node.js. Do NOT use node.js imports.
- you keep the code simple, avoid exception handlers or error checking.
- you add `TODOs` where you are unsure so that the user can review them
- you use the global types in genaiscript.d.ts are already loaded in the global context, no need to import them.
- save generated code in the `./genaisrc` folder with `.genai.mts` extension
13 changes: 7 additions & 6 deletions .github/workflows/anthropic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- ".github/workflows/anthropic.yml"
- "packages/core/**/*"
- "packages/cli/**/*"
- "packages/samples/**/*"
- "samples/**/*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-anthropic
cancel-in-progress: true
Expand All @@ -24,20 +24,21 @@ jobs:
with:
submodules: "recursive"
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: yarn
- run: yarn install --frozen-lockfile
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: compile
run: yarn compile:action
run: pnpm build:cli
- name: poem
continue-on-error: true
run: yarn run:script poem -p anthropic --out-trace $GITHUB_STEP_SUMMARY
run: pnpm run:script poem -p anthropic --out-trace $GITHUB_STEP_SUMMARY
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: reasoning
continue-on-error: true
run: yarn run:script tools -p anthropic -m reasoning --out-trace $GITHUB_STEP_SUMMARY
run: pnpm run:script tools -p anthropic -m reasoning --out-trace $GITHUB_STEP_SUMMARY
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
11 changes: 6 additions & 5 deletions .github/workflows/azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- ".github/workflows/azure.yml"
- "packages/core/**/*"
- "packages/cli/**/*"
- "packages/samples/**/*"
- "samples/**/*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-azure
cancel-in-progress: true
Expand All @@ -24,15 +24,16 @@ jobs:
with:
submodules: "recursive"
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: yarn
- run: yarn install --frozen-lockfile
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: compile
run: yarn compile:action
run: pnpm build:cli
- name: poem
run: yarn run:script poem --model azure:gpt-4.1 -tlp 5 --out-trace $GITHUB_STEP_SUMMARY
run: pnpm run:script poem --model azure:gpt-4.1 -tlp 5 --out-trace $GITHUB_STEP_SUMMARY
env:
AZURE_OPENAI_API_ENDPOINT: ${{ secrets.AZURE_OPENAI_API_ENDPOINT }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
Loading
Loading