@bastani/atomic 0.9.23 → 0.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +12 -0
- package/dist/builtin/mcp/README.md +1 -0
- package/dist/builtin/mcp/index.bundle.mjs +244 -58
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +22 -0
- package/dist/builtin/workflows/builtin/{chunk-d3xhj946.js → chunk-cpw5gtzg.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-kgn5wz1c.js → chunk-e1254zvd.js} +139 -15
- package/dist/builtin/workflows/builtin/{chunk-hj8mh07f.js → chunk-qy6g0baf.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +1 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_sonnet_5_5.md +131 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +187 -25
- package/dist/builtin/workflows/src/index.js +147 -17
- package/dist/core/agent-session-events.js +1 -1
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-state.js +5 -2
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/extensions/api-types.d.ts +12 -0
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +42 -0
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-bindings.d.ts.map +1 -1
- package/dist/core/extensions/loader-bindings.js +13 -7
- package/dist/core/extensions/loader-bindings.js.map +1 -1
- package/dist/core/extensions/loader-resources.d.ts +3 -0
- package/dist/core/extensions/loader-resources.d.ts.map +1 -1
- package/dist/core/extensions/loader-resources.js.map +1 -1
- package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
- package/dist/core/extensions/loader-runtime.js +2 -0
- package/dist/core/extensions/loader-runtime.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +2 -0
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/mcp-server-registry.d.ts +22 -0
- package/dist/core/extensions/mcp-server-registry.d.ts.map +1 -0
- package/dist/core/extensions/mcp-server-registry.js +51 -0
- package/dist/core/extensions/mcp-server-registry.js.map +1 -0
- package/dist/core/extensions/runtime-types.d.ts +3 -0
- package/dist/core/extensions/runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/keybindings.d.ts +1 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +1 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +39 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +2 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/model-resolver-defaults.js +2 -2
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/package-manager-manifest.d.ts +3 -0
- package/dist/core/package-manager-manifest.d.ts.map +1 -1
- package/dist/core/package-manager-manifest.js +14 -0
- package/dist/core/package-manager-manifest.js.map +1 -1
- package/dist/core/package-manager-mcp-servers.d.ts +4 -0
- package/dist/core/package-manager-mcp-servers.d.ts.map +1 -0
- package/dist/core/package-manager-mcp-servers.js +53 -0
- package/dist/core/package-manager-mcp-servers.js.map +1 -0
- package/dist/core/package-manager-resource-accumulator.d.ts.map +1 -1
- package/dist/core/package-manager-resource-accumulator.js +2 -0
- package/dist/core/package-manager-resource-accumulator.js.map +1 -1
- package/dist/core/package-manager-resource-collector.d.ts.map +1 -1
- package/dist/core/package-manager-resource-collector.js +2 -0
- package/dist/core/package-manager-resource-collector.js.map +1 -1
- package/dist/core/package-manager-resource-patterns.d.ts +4 -0
- package/dist/core/package-manager-resource-patterns.d.ts.map +1 -1
- package/dist/core/package-manager-resource-patterns.js +36 -12
- package/dist/core/package-manager-resource-patterns.js.map +1 -1
- package/dist/core/package-manager-types.d.ts +14 -0
- package/dist/core/package-manager-types.d.ts.map +1 -1
- package/dist/core/package-manager-types.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resource-loader-core.d.ts +4 -0
- package/dist/core/resource-loader-core.d.ts.map +1 -1
- package/dist/core/resource-loader-core.js +7 -0
- package/dist/core/resource-loader-core.js.map +1 -1
- package/dist/core/resource-loader-helpers.d.ts.map +1 -1
- package/dist/core/resource-loader-helpers.js +1 -0
- package/dist/core/resource-loader-helpers.js.map +1 -1
- package/dist/core/resource-loader-internals.d.ts +2 -0
- package/dist/core/resource-loader-internals.d.ts.map +1 -1
- package/dist/core/resource-loader-internals.js.map +1 -1
- package/dist/core/resource-loader-package-resources.d.ts +3 -0
- package/dist/core/resource-loader-package-resources.d.ts.map +1 -1
- package/dist/core/resource-loader-package-resources.js +25 -2
- package/dist/core/resource-loader-package-resources.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +4 -1
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +2 -0
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +6 -1
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/settings-types.d.ts +1 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +37 -10
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/chat-input-actions.d.ts +12 -0
- package/dist/modes/interactive/chat-input-actions.d.ts.map +1 -1
- package/dist/modes/interactive/chat-input-actions.js +44 -18
- package/dist/modes/interactive/chat-input-actions.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-editor.d.ts +11 -0
- package/dist/modes/interactive/components/chat-session-host-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-editor.js +7 -1
- package/dist/modes/interactive/components/chat-session-host-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.js +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +3 -1
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js +1 -6
- package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts +2 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts +7 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +37 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/docs/extensions/api-reference.md +19 -0
- package/docs/extensions.md +4 -0
- package/docs/keybindings.md +2 -2
- package/docs/llama-cpp.md +13 -0
- package/docs/mcp-servers.md +18 -0
- package/docs/models/evals.md +16 -4
- package/docs/packages/authoring.md +27 -0
- package/docs/packages/reference.md +3 -2
- package/docs/packages.md +3 -2
- package/docs/skills.md +3 -1
- package/examples/extensions/gondolin/package-lock.json +3 -3
- package/npm-shr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omUUID } from \"crypto\";\nimport { unlinkSync, writeFileSync } from \"fs\";\nimport { platform, tmpdir } from \"os\";\nimport { join } from \"path\";\nimport { createChildProcessEnvironment } from \"./child-process.ts\";\nimport { isWaylandSession } from \"./clipboard-image.ts\";\nimport { clipboard } from \"./clipboard-native.ts\";\nimport { isWSL } from \"./wsl.ts\";\n\ntype NativeClipboardExecOptions = {\n\tinput: string;\n\ttimeout: number;\n\tstdio: [\"pipe\", \"ignore\", \"ignore\"];\n\tenv: NodeJS.ProcessEnv;\n};\n\nfunction copyToX11Clipboard(options: NativeClipboardExecOptions): void {\n\ttry {\n\t\texecSync(\"xclip -selection clipboard\", options);\n\t} catch {\n\t\texecSync(\"xsel --clipboard --input\", options);\n\t}\n}\n\nconst MAX_OSC52_ENCODED_LENGTH = 100_000;\n\nfunction isRemoteSession(env: NodeJS.ProcessEnv): boolean {\n\treturn Boolean(env.SSH_CONNECTION || env.SSH_CLIENT || env.MOSH_CONNECTION);\n}\n\nfunction emitOsc52(text: string): boolean {\n\tconst encoded = Buffer.from(text).toString(\"base64\");\n\tif (encoded.length > MAX_OSC52_ENCODED_LENGTH) {\n\t\treturn false;\n\t}\n\tprocess.stdout.write(`\\x1b]52;c;${encoded}\\x07`);\n\treturn true;\n}\n\n/**\n * WSL without WSLg has no Linux display, so the Windows clipboard is written through\n * interop. PowerShell reads the text from a file because `clip.exe` and PowerShell stdin\n * decode piped bytes with the console code page, which mangles non-ASCII UTF-8.\n */\nfunction copyViaWindowsClipboard(text: string): boolean {\n\tconst tmpFile = join(tmpdir(), `pi-wsl-clip-${randomUUID()}.txt`);\n\tconst env = createChildProcessEnvironment();\n\ttry {\n\t\twriteFileSync(tmpFile, text, { encoding: \"utf8\", mode: 0o600 });\n\t\tconst winPath = execFileSync(\"wslpath\", [\"-w\", tmpFile], {\n\t\t\ttimeout: 1000,\n\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t\tenv,\n\t\t})\n\t\t\t.toString(\"utf8\")\n\t\t\t.trim();\n\t\tif (!winPath) return false;\n\t\tconst script = `Set-Clipboard -Value ([System.IO.File]::ReadAllText('${winPath.replaceAll(\"'\", \"''\")}', [System.Text.Encoding]::UTF8))`;\n\t\texecFileSync(\"powershell.exe\", [\"-NoProfile\", \"-Command\", script], {\n\t\t\ttimeout: 5000,\n\t\t\tstdio: [\"ignore\", \"ignore\", \"ignore\"],\n\t\t\tenv,\n\t\t});\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t} finally {\n\t\ttry {\n\t\t\tunlinkSync(tmpFile);\n\t\t} catch {\n\t\t\t// The file may not have been created.\n\t\t}\n\t}\n}\n\nexport async function readClipboardText(\n\tsource: { getText(): Promise<string> } | null = clipboard,\n): Promise<string | null> {\n\ttry {\n\t\tif (!source) return null;\n\t\treturn await source.getText();\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nexport async function copyToClipboard(text: string): Promise<void> {\n\tlet copied = false;\n\n\tconst p = platform();\n\tconst env = process.env;\n\t// Prefer direct clipboard writes. Emitting OSC 52 first can make terminals\n\t// write the same native clipboard concurrently with the addon, and very large\n\t// OSC 52 payloads can desynchronize terminal rendering.\n\t//\n\t// On Linux, skip the native addon. The underlying `clipboard-rs` crate is\n\t// X11-only and does not retain selection ownership after `set_text`\n\t// resolves, so on Wayland-only compositors (Hyprland, Niri, ...) and even\n\t// some X11 sessions the call resolves successfully without populating the\n\t// clipboard. The platform tools below (wl-copy, xclip, xsel) properly\n\t// daemonize and keep ownership.\n\ttry {\n\t\tif (clipboard && p !== \"linux\") {\n\t\t\tawait clipboard.setText(text);\n\t\t\tcopied = true;\n\t\t}\n\t} catch {\n\t\t// Fall through to platform-specific clipboard tools.\n\t}\n\n\tconst remote = isRemoteSession(env);\n\tif (copied && !remote) {\n\t\treturn;\n\t}\n\n\tconst options: NativeClipboardExecOptions = {\n\t\tinput: text,\n\t\ttimeout: 5000,\n\t\tstdio: [\"pipe\", \"ignore\", \"ignore\"],\n\t\tenv: createChildProcessEnvironment(),\n\t};\n\n\tif (!copied) {\n\t\ttry {\n\t\t\tif (p === \"darwin\") {\n\t\t\t\texecSync(\"pbcopy\", options);\n\t\t\t\tcopied = true;\n\t\t\t} else if (p === \"win32\") {\n\t\t\t\texecSync(\"clip\", options);\n\t\t\t\tcopied = true;\n\t\t\t} else {\n\t\t\t\t// Linux. Try Termux, Wayland, or X11 clipboard tools.\n\t\t\t\tif (env.TERMUX_VERSION) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\texecSync(\"termux-clipboard-set\", options);\n\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Fall back to Wayland or X11 tools.\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!copied) {\n\t\t\t\t\tconst hasWaylandDisplay = Boolean(env.WAYLAND_DISPLAY);\n\t\t\t\t\tconst hasX11Display = Boolean(env.DISPLAY);\n\t\t\t\t\tconst isWayland = isWaylandSession();\n\t\t\t\t\tif (isWayland && hasWaylandDisplay) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Verify wl-copy exists (spawn errors are async and won't be caught)\n\t\t\t\t\t\t\texecSync(\"which wl-copy\", { stdio: \"ignore\", env: createChildProcessEnvironment() });\n\t\t\t\t\t\t\t// wl-copy with execSync hangs due to fork behavior; use spawn instead.\n\t\t\t\t\t\t\t// Await its terminal event so failures can fall through to X11 or OSC 52.\n\t\t\t\t\t\t\tconst exitCode = await new Promise<number>((resolve) => {\n\t\t\t\t\t\t\t\tconst proc = spawn(\"wl-copy\", [], {\n\t\t\t\t\t\t\t\t\tstdio: [\"pipe\", \"ignore\", \"ignore\"],\n\t\t\t\t\t\t\t\t\tenv: createChildProcessEnvironment(),\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tlet settled = false;\n\t\t\t\t\t\t\t\tconst finish = (code: number) => {\n\t\t\t\t\t\t\t\t\tif (settled) return;\n\t\t\t\t\t\t\t\t\tsettled = true;\n\t\t\t\t\t\t\t\t\tresolve(code);\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tproc.once(\"error\", () => finish(1));\n\t\t\t\t\t\t\t\tproc.once(\"close\", (code) => finish(code ?? 1));\n\t\t\t\t\t\t\t\tproc.stdin.on(\"error\", () => {});\n\t\t\t\t\t\t\t\tproc.stdin.end(text);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (exitCode === 0) copied = true;\n\t\t\t\t\t\t\telse if (hasX11Display) {\n\t\t\t\t\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\tif (hasX11Display) {\n\t\t\t\t\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (hasX11Display) {\n\t\t\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// Fall through to OSC 52 fallback.\n\t\t}\n\t}\n\n\tlet osc52Emitted = false;\n\t// A remote session skips the Windows clipboard: the copied text belongs on the connected\n\t// client, which the OSC 52 fallback below reaches, not on the remote host.\n\tif (!copied && !remote && p === \"linux\" && isWSL(env)) {\n\t\t// Windows Terminal supports OSC 52; prefer it over the slower PowerShell round trip.\n\t\tif (env.WT_SESSION) osc52Emitted = emitOsc52(text);\n\t\tcopied = osc52Emitted || copyViaWindowsClipboard(text);\n\t}\n\t// OSC 52 cannot be verified, so a desktop session with a display reports the failure\n\t// instead. Without a display the terminal is the only clipboard route (containers,\n\t// WSL without WSLg). A remote session emits it even after a successful local write:\n\t// that write reached the remote host's display clipboard, while the user is at the\n\t// client, which only the terminal can reach. The Windows interop fallback above is\n\t// different because it is a last resort that a remote session gains nothing from.\n\tconst headless = p === \"linux\" && !env.DISPLAY && !env.WAYLAND_DISPLAY && !env.TERMUX_VERSION;\n\tlet oversized = false;\n\tif (!osc52Emitted && (remote || (!copied && headless))) {\n\t\tif (emitOsc52(text)) copied = true;\n\t\telse oversized = true;\n\t}\n\tif (copied) return;\n\tif (oversized) throw new Error(\"Clipboard unavailable: text exceeds the OSC 52 size limit\");\n\tif (p === \"linux\") {\n\t\tif (env.TERMUX_VERSION) {\n\t\t\tthrow new Error(\"Clipboard unavailable: install the Termux:API app and `termux-api` package\");\n\t\t}\n\t\tif (env.WAYLAND_DISPLAY) {\n\t\t\tthrow new Error(\"Clipboard unavailable: install `wl-clipboard` (`wl-copy`) or check Wayland access\");\n\t\t}\n\t\tif (env.DISPLAY) {\n\t\t\tthrow new Error(\"Clipboard unavailable: install `xclip` or `xsel`, or check X11 access\");\n\t\t}\n\t}\n\tthrow new Error(\"Clipboard unavailable\");\n}\n"]}
|
|
1
|
+
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAwB,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AASjC,SAAS,kBAAkB,CAAC,OAAmC;IAC9D,IAAI,CAAC;QACJ,QAAQ,CAAC,4BAA4B,EAAE,OAAO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SAAS,CAAC,IAAI,CAAC;YAAE,MAAM,GAAG,IAAI,CAAC;;YAC9B,SAAS,GAAG,IAAI,CAAC;IACvB,CAAC;IACD,IAAI,MAAM;QAAE,OAAO;IACnB,IAAI,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC5F,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC;QACnB,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,4EAA4E,CAAC,CAAC;QAC/F,CAAC;QACD,IAAI,GAAG,CAAC,eAAe,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,mFAAmF,CAAC,CAAC;QACtG,CAAC;QACD,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;QAC1F,CAAC;IACF,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import { execFile, execFileSync, execSync, spawn } from \"child_process\";\nimport { randomUUID } from \"crypto\";\nimport { unlinkSync, writeFileSync } from \"fs\";\nimport { platform, tmpdir } from \"os\";\nimport { join } from \"path\";\nimport { createChildProcessEnvironment } from \"./child-process.ts\";\nimport { isWaylandSession } from \"./clipboard-image.ts\";\nimport { type ClipboardModule, clipboard } from \"./clipboard-native.ts\";\nimport { isWSL } from \"./wsl.ts\";\n\ntype NativeClipboardExecOptions = {\n\tinput: string;\n\ttimeout: number;\n\tstdio: [\"pipe\", \"ignore\", \"ignore\"];\n\tenv: NodeJS.ProcessEnv;\n};\n\nfunction copyToX11Clipboard(options: NativeClipboardExecOptions): void {\n\ttry {\n\t\texecSync(\"xclip -selection clipboard\", options);\n\t} catch {\n\t\texecSync(\"xsel --clipboard --input\", options);\n\t}\n}\n\nconst MAX_OSC52_ENCODED_LENGTH = 100_000;\n\nfunction isRemoteSession(env: NodeJS.ProcessEnv): boolean {\n\treturn Boolean(env.SSH_CONNECTION || env.SSH_CLIENT || env.MOSH_CONNECTION);\n}\n\nfunction emitOsc52(text: string): boolean {\n\tconst encoded = Buffer.from(text).toString(\"base64\");\n\tif (encoded.length > MAX_OSC52_ENCODED_LENGTH) {\n\t\treturn false;\n\t}\n\tprocess.stdout.write(`\\x1b]52;c;${encoded}\\x07`);\n\treturn true;\n}\n\n/**\n * WSL without WSLg has no Linux display, so the Windows clipboard is written through\n * interop. PowerShell reads the text from a file because `clip.exe` and PowerShell stdin\n * decode piped bytes with the console code page, which mangles non-ASCII UTF-8.\n */\nfunction copyViaWindowsClipboard(text: string): boolean {\n\tconst tmpFile = join(tmpdir(), `pi-wsl-clip-${randomUUID()}.txt`);\n\tconst env = createChildProcessEnvironment();\n\ttry {\n\t\twriteFileSync(tmpFile, text, { encoding: \"utf8\", mode: 0o600 });\n\t\tconst winPath = execFileSync(\"wslpath\", [\"-w\", tmpFile], {\n\t\t\ttimeout: 1000,\n\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t\tenv,\n\t\t})\n\t\t\t.toString(\"utf8\")\n\t\t\t.trim();\n\t\tif (!winPath) return false;\n\t\tconst script = `Set-Clipboard -Value ([System.IO.File]::ReadAllText('${winPath.replaceAll(\"'\", \"''\")}', [System.Text.Encoding]::UTF8))`;\n\t\texecFileSync(\"powershell.exe\", [\"-NoProfile\", \"-Command\", script], {\n\t\t\ttimeout: 5000,\n\t\t\tstdio: [\"ignore\", \"ignore\", \"ignore\"],\n\t\t\tenv,\n\t\t});\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t} finally {\n\t\ttry {\n\t\t\tunlinkSync(tmpFile);\n\t\t} catch {\n\t\t\t// The file may not have been created.\n\t\t}\n\t}\n}\n\nexport async function readClipboardText(\n\tsource: { getText(): Promise<string> } | null = clipboard,\n): Promise<string | null> {\n\ttry {\n\t\tif (!source) return null;\n\t\treturn await source.getText();\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/** Pasteboard type that Finder and other macOS apps publish for copied files. */\nconst FILE_URL_PASTEBOARD_TYPE = \"public.file-url\";\n\n/** Prints the POSIX paths of the file URLs on the general pasteboard as a JSON array. */\nconst READ_FILE_URLS_SCRIPT = `ObjC.import(\"AppKit\");\nconst urls = $.NSPasteboard.generalPasteboard.readObjectsForClassesOptions(\n\t$.NSArray.arrayWithObject($.NSURL),\n\t$.NSDictionary.dictionaryWithObjectForKey($.NSNumber.numberWithBool(true), $.NSPasteboardURLReadingFileURLsOnlyKey)\n);\nconst paths = [];\nfor (let i = 0; i < urls.count; i++) paths.push(ObjC.unwrap(urls.objectAtIndex(i).path));\nJSON.stringify(paths);`;\n\n/**\n * Read file paths, such as Finder file copies, from the macOS clipboard. The native clipboard\n * module reports whether file URLs are present; AppKit is read through JavaScript for Automation\n * only then, because the module cannot read file URLs itself.\n */\nexport async function readClipboardFilePaths(\n\tsource: Pick<ClipboardModule, \"availableFormats\"> | null = clipboard,\n\tcurrentPlatform: NodeJS.Platform = process.platform,\n): Promise<string[] | null> {\n\tif (currentPlatform !== \"darwin\" || !source?.availableFormats?.().includes(FILE_URL_PASTEBOARD_TYPE)) return null;\n\tconst stdout = await new Promise<string>((resolve, reject) => {\n\t\texecFile(\n\t\t\t\"osascript\",\n\t\t\t[\"-l\", \"JavaScript\", \"-e\", READ_FILE_URLS_SCRIPT],\n\t\t\t{ timeout: 5000, env: createChildProcessEnvironment() },\n\t\t\t(error, output, stderr) => {\n\t\t\t\tif (error) {\n\t\t\t\t\t// The default error message repeats the whole script; report what osascript printed instead.\n\t\t\t\t\tconst detail = stderr.trim();\n\t\t\t\t\treject(new Error(`osascript could not read the copied files${detail ? `: ${detail}` : \"\"}`));\n\t\t\t\t} else resolve(output);\n\t\t\t},\n\t\t);\n\t});\n\tconst paths = JSON.parse(stdout) as string[] | null;\n\tif (!Array.isArray(paths) || paths.some((path) => typeof path !== \"string\")) {\n\t\tthrow new Error(\"Unexpected clipboard file path output\");\n\t}\n\treturn paths.length > 0 ? paths : null;\n}\n\nexport async function copyToClipboard(text: string): Promise<void> {\n\tlet copied = false;\n\n\tconst p = platform();\n\tconst env = process.env;\n\t// Prefer direct clipboard writes. Emitting OSC 52 first can make terminals\n\t// write the same native clipboard concurrently with the addon, and very large\n\t// OSC 52 payloads can desynchronize terminal rendering.\n\t//\n\t// On Linux, skip the native addon. The underlying `clipboard-rs` crate is\n\t// X11-only and does not retain selection ownership after `set_text`\n\t// resolves, so on Wayland-only compositors (Hyprland, Niri, ...) and even\n\t// some X11 sessions the call resolves successfully without populating the\n\t// clipboard. The platform tools below (wl-copy, xclip, xsel) properly\n\t// daemonize and keep ownership.\n\ttry {\n\t\tif (clipboard && p !== \"linux\") {\n\t\t\tawait clipboard.setText(text);\n\t\t\tcopied = true;\n\t\t}\n\t} catch {\n\t\t// Fall through to platform-specific clipboard tools.\n\t}\n\n\tconst remote = isRemoteSession(env);\n\tif (copied && !remote) {\n\t\treturn;\n\t}\n\n\tconst options: NativeClipboardExecOptions = {\n\t\tinput: text,\n\t\ttimeout: 5000,\n\t\tstdio: [\"pipe\", \"ignore\", \"ignore\"],\n\t\tenv: createChildProcessEnvironment(),\n\t};\n\n\tif (!copied) {\n\t\ttry {\n\t\t\tif (p === \"darwin\") {\n\t\t\t\texecSync(\"pbcopy\", options);\n\t\t\t\tcopied = true;\n\t\t\t} else if (p === \"win32\") {\n\t\t\t\texecSync(\"clip\", options);\n\t\t\t\tcopied = true;\n\t\t\t} else {\n\t\t\t\t// Linux. Try Termux, Wayland, or X11 clipboard tools.\n\t\t\t\tif (env.TERMUX_VERSION) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\texecSync(\"termux-clipboard-set\", options);\n\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Fall back to Wayland or X11 tools.\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!copied) {\n\t\t\t\t\tconst hasWaylandDisplay = Boolean(env.WAYLAND_DISPLAY);\n\t\t\t\t\tconst hasX11Display = Boolean(env.DISPLAY);\n\t\t\t\t\tconst isWayland = isWaylandSession();\n\t\t\t\t\tif (isWayland && hasWaylandDisplay) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Verify wl-copy exists (spawn errors are async and won't be caught)\n\t\t\t\t\t\t\texecSync(\"which wl-copy\", { stdio: \"ignore\", env: createChildProcessEnvironment() });\n\t\t\t\t\t\t\t// wl-copy with execSync hangs due to fork behavior; use spawn instead.\n\t\t\t\t\t\t\t// Await its terminal event so failures can fall through to X11 or OSC 52.\n\t\t\t\t\t\t\tconst exitCode = await new Promise<number>((resolve) => {\n\t\t\t\t\t\t\t\tconst proc = spawn(\"wl-copy\", [], {\n\t\t\t\t\t\t\t\t\tstdio: [\"pipe\", \"ignore\", \"ignore\"],\n\t\t\t\t\t\t\t\t\tenv: createChildProcessEnvironment(),\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tlet settled = false;\n\t\t\t\t\t\t\t\tconst finish = (code: number) => {\n\t\t\t\t\t\t\t\t\tif (settled) return;\n\t\t\t\t\t\t\t\t\tsettled = true;\n\t\t\t\t\t\t\t\t\tresolve(code);\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tproc.once(\"error\", () => finish(1));\n\t\t\t\t\t\t\t\tproc.once(\"close\", (code) => finish(code ?? 1));\n\t\t\t\t\t\t\t\tproc.stdin.on(\"error\", () => {});\n\t\t\t\t\t\t\t\tproc.stdin.end(text);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (exitCode === 0) copied = true;\n\t\t\t\t\t\t\telse if (hasX11Display) {\n\t\t\t\t\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\tif (hasX11Display) {\n\t\t\t\t\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (hasX11Display) {\n\t\t\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// Fall through to OSC 52 fallback.\n\t\t}\n\t}\n\n\tlet osc52Emitted = false;\n\t// A remote session skips the Windows clipboard: the copied text belongs on the connected\n\t// client, which the OSC 52 fallback below reaches, not on the remote host.\n\tif (!copied && !remote && p === \"linux\" && isWSL(env)) {\n\t\t// Windows Terminal supports OSC 52; prefer it over the slower PowerShell round trip.\n\t\tif (env.WT_SESSION) osc52Emitted = emitOsc52(text);\n\t\tcopied = osc52Emitted || copyViaWindowsClipboard(text);\n\t}\n\t// OSC 52 cannot be verified, so a desktop session with a display reports the failure\n\t// instead. Without a display the terminal is the only clipboard route (containers,\n\t// WSL without WSLg). A remote session emits it even after a successful local write:\n\t// that write reached the remote host's display clipboard, while the user is at the\n\t// client, which only the terminal can reach. The Windows interop fallback above is\n\t// different because it is a last resort that a remote session gains nothing from.\n\tconst headless = p === \"linux\" && !env.DISPLAY && !env.WAYLAND_DISPLAY && !env.TERMUX_VERSION;\n\tlet oversized = false;\n\tif (!osc52Emitted && (remote || (!copied && headless))) {\n\t\tif (emitOsc52(text)) copied = true;\n\t\telse oversized = true;\n\t}\n\tif (copied) return;\n\tif (oversized) throw new Error(\"Clipboard unavailable: text exceeds the OSC 52 size limit\");\n\tif (p === \"linux\") {\n\t\tif (env.TERMUX_VERSION) {\n\t\t\tthrow new Error(\"Clipboard unavailable: install the Termux:API app and `termux-api` package\");\n\t\t}\n\t\tif (env.WAYLAND_DISPLAY) {\n\t\t\tthrow new Error(\"Clipboard unavailable: install `wl-clipboard` (`wl-copy`) or check Wayland access\");\n\t\t}\n\t\tif (env.DISPLAY) {\n\t\t\tthrow new Error(\"Clipboard unavailable: install `xclip` or `xsel`, or check X11 access\");\n\t\t}\n\t}\n\tthrow new Error(\"Clipboard unavailable\");\n}\n"]}
|
|
@@ -1000,6 +1000,25 @@ pi.registerCommand("my-setup-teardown", {
|
|
|
1000
1000
|
});
|
|
1001
1001
|
```
|
|
1002
1002
|
|
|
1003
|
+
### pi.registerMcpServer(name, config)
|
|
1004
|
+
|
|
1005
|
+
Contribute an MCP server whose configuration is only known at runtime, such as the URL of a local service the extension starts. `config` uses the same schema as an entry in [`mcp.json`](/mcp-servers#configure-a-server), including `url`, `command`/`args`/`env`/`cwd`, `auth: "bearer"` with `bearerTokenEnv`, `lifecycle`, `timeoutMs`, and `${VAR}` interpolation.
|
|
1006
|
+
|
|
1007
|
+
```typescript
|
|
1008
|
+
export default function (pi: ExtensionAPI) {
|
|
1009
|
+
pi.on("session_start", async () => {
|
|
1010
|
+
const port = await startLocalService();
|
|
1011
|
+
pi.registerMcpServer("local-service", { url: `http://127.0.0.1:${port}/mcp`, lifecycle: "eager" });
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
Call it from the extension factory or from `session_start`. Load order does not matter: registrations made after the MCP adapter has started are picked up without a reload. Registering the same name again replaces the earlier registration.
|
|
1017
|
+
|
|
1018
|
+
Registered servers are the lowest-precedence MCP layer. They replace a same-named server from a package manifest, but any user or project MCP config file replaces them, and `{ "disabled": true }` there turns them off. `/mcp` shows the registering extension next to the server name.
|
|
1019
|
+
|
|
1020
|
+
`pi.getMcpServerContributions()` returns the package-manifest and registered servers for the session, each with its `name`, `config`, `origin` (`"package"` or `"extension"`), and `sourceInfo`.
|
|
1021
|
+
|
|
1003
1022
|
## Error Handling
|
|
1004
1023
|
|
|
1005
1024
|
- Extension errors are logged, agent continues
|
package/docs/extensions.md
CHANGED
|
@@ -598,6 +598,10 @@ Moved to [Extension API reference](/extensions/api-reference#pi-registerprovider
|
|
|
598
598
|
|
|
599
599
|
Moved to [Extension API reference](/extensions/api-reference#pi-unregisterprovider-name).
|
|
600
600
|
|
|
601
|
+
### pi.registerMcpServer(name, config)
|
|
602
|
+
|
|
603
|
+
Contribute an MCP server computed at runtime from the factory or `session_start`. See [Extension API reference](/extensions/api-reference#pi-registermcpserver-name-config).
|
|
604
|
+
|
|
601
605
|
## State Management
|
|
602
606
|
|
|
603
607
|
Moved to [Writing extensions](/extensions/authoring#state-management).
|
package/docs/keybindings.md
CHANGED
|
@@ -155,9 +155,9 @@ On Windows, pressing the secondary mouse button in fullscreen pastes text from t
|
|
|
155
155
|
| `app.exit` | `ctrl+d` | Exit (when editor empty) |
|
|
156
156
|
| `app.suspend` | `ctrl+z` (`alt+z` on Windows) | Suspend to background; on Windows, open a PowerShell subshell |
|
|
157
157
|
| `app.editor.external` | `ctrl+g` | Open in external editor (`$VISUAL` or `$EDITOR`) |
|
|
158
|
-
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste
|
|
158
|
+
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste files on macOS, images, or text from clipboard |
|
|
159
159
|
|
|
160
|
-
When `app.clipboard.pasteImage` finds text rather than an image, Atomic inserts that clipboard text into the editor instead of reporting an image-paste failure.
|
|
160
|
+
On macOS, files copied in Finder paste as their paths, one per line, instead of the file icon. In bash mode (input starting with `!`), the paths are shell-quoted and separated by spaces. When `app.clipboard.pasteImage` finds text rather than files or an image, Atomic inserts that clipboard text into the editor instead of reporting an image-paste failure.
|
|
161
161
|
|
|
162
162
|
On macOS, native `Cmd+V` also pastes a clipboard image when the copy was image-only. Terminals may deliver that as an empty bracketed-paste event or (with Kitty keyboard protocol, e.g. Ghostty) as `super+v`. Text under `Cmd+V` still goes through normal terminal paste when the terminal sends a paste event. `Cmd+V` is not a configurable Atomic keybinding.
|
|
163
163
|
|
package/docs/llama-cpp.md
CHANGED
|
@@ -68,6 +68,19 @@ If the router disconnects, choose **Retry** to reconnect and refresh state witho
|
|
|
68
68
|
|
|
69
69
|
Each llama model uses the router-reported loaded context (`meta.n_ctx`, then training context, otherwise Atomic's fallback) for both `contextWindow` and `maxTokens`; Atomic no longer applies a separate 16K output cap. The server remains authoritative and may impose a smaller practical generation limit.
|
|
70
70
|
|
|
71
|
+
## Classification
|
|
72
|
+
|
|
73
|
+
Every model listed for chat is also listed as a classifier model with the same ID and the `llama-cpp-classify` API. Classifier models answer typed `choice`, `bool`, and `score` questions about JSON state, like TypeSafe's Jev models, so a local model can make `model: "auto"` routing decisions. Classifier models never appear in `/model`.
|
|
74
|
+
|
|
75
|
+
The model does not generate an answer. Each question becomes one chat prompt: the state, every question of the request, the state again, and then the question with its answers under single-token labels. Labels are letters for a choice (up to 62 options), `Yes`/`No` for a bool, and digits for a score (up to 10 levels). Atomic reads the probabilities of the labels as the next token and normalizes them. A choice returns every option's probability and a confidence of `(n * peak - 1) / (n - 1)`; a score returns the expected level.
|
|
76
|
+
|
|
77
|
+
- An explicit [`routerModel`](/settings#routermodel) resolves a classifier before a chat model, so `routerModel: "llama.cpp/<id>"` routes with the classifier, not the chat model. A routing shortlist with more than 62 models fails on the classifier, and routing switches to the current chat model. The **Router model** picker lists each llama.cpp model twice, once as a classifier and once as a chat model; both rows save the same ID.
|
|
78
|
+
- The `structured_output` tool and `generateStructuredOutput()` resolve the chat model first when a chat and a classifier model share an ID, so naming `llama.cpp/<id>` there keeps using the chat model.
|
|
79
|
+
- Raw label probabilities are usually overconfident. The `temperature` option of SDK `classify()` calls divides the label logits before normalizing; values above 1 soften the distribution. It changes no answer.
|
|
80
|
+
- Questions run one after another. Everything before the final question is the same for all questions of a request, so the server's prompt cache evaluates it once. The state appears twice, so it needs twice its size in context.
|
|
81
|
+
- Small models may follow instructions written inside the state. The prompt tells the model to judge the state as data, but that is not a guarantee.
|
|
82
|
+
- Hybrid models such as Qwen3.5 cannot rewind a partially cached prompt without context checkpoints. If each question reprocesses the whole state, start the router with `--ctx-checkpoints 32 --checkpoint-min-step 0`.
|
|
83
|
+
|
|
71
84
|
## Troubleshooting
|
|
72
85
|
|
|
73
86
|
```bash
|
package/docs/mcp-servers.md
CHANGED
|
@@ -55,6 +55,24 @@ The Atomic agent directory can be relocated with `ATOMIC_CODING_AGENT_DIR`. Use
|
|
|
55
55
|
|
|
56
56
|
Servers connect lazily by default. Adding a server does not require an immediate connection at startup.
|
|
57
57
|
|
|
58
|
+
## Servers from packages and extensions
|
|
59
|
+
|
|
60
|
+
Installed [packages](/packages/authoring#mcp-servers) and extensions can contribute MCP servers. Contributed servers sit below all four configuration files: a server with the same name in any of them replaces the contributed entry completely. To turn a contributed server off, give its name an entry with only `disabled`:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"acme-search": { "disabled": true }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`"disabled": true` removes any server from the effective configuration, contributed or not.
|
|
71
|
+
|
|
72
|
+
`/mcp` shows where each contributed server came from next to its name: `(package npm:@acme/tools)` for a package manifest, `(extension from package npm:@acme/tools)` for a package's extension, or `(extension /path/to/extension.ts)` for a local extension. Connection errors name the same source. Turning on direct tools for a contributed server in `/mcp` copies its definition into `~/.atomic/agent/mcp.json`, where it then overrides the contributed version.
|
|
73
|
+
|
|
74
|
+
To choose which servers one package contributes, add `mcpServers` patterns to its [package filter](/packages/reference#package-filtering). Project packages contribute servers only after the project is trusted. Workflow stages see the same contributed servers as the session that starts them.
|
|
75
|
+
|
|
58
76
|
## Find and call tools
|
|
59
77
|
|
|
60
78
|
The `mcp` gateway discovers tools without adding every server's full tool definitions to the session:
|
package/docs/models/evals.md
CHANGED
|
@@ -46,15 +46,17 @@ Key:
|
|
|
46
46
|
|
|
47
47
|
## Artificial Analysis Intelligence Index v4.3.2
|
|
48
48
|
|
|
49
|
-
Table:
|
|
49
|
+
Table: the 673 models on the Artificial Analysis leaderboard as of 2026-09-25, including models with no published scores, plus 5 Claude Sonnet 5.5 rows accessed 2026-09-28.
|
|
50
50
|
|
|
51
51
|
| slug | Model | Release date | idx | Brief | Gn | Auto | TB4 | Sci | HLE | PDF | Crit | OA | ONH | LCR | Omni | GPQA | TB21 | TBh | IF | MMMU | tau2 | tauB | Analyst | ITB | Apex | AIME | LCB | Harvey | MLCR | Open | Ent |
|
|
52
52
|
| --- | --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
53
53
|
| claude-opus-5-5 | Claude Opus 5.5 (Adaptive Reasoning, Max Effort, Default Fallback) | 2026-09-22 | 57.6 | 66.1 | 67.3 | 69.5 | 59.6 | 66.9 | 61.4 | 26.2 | 31.7 | 66.2 | 41.4 | 84.7 | 46.4 | ∅ | ∅ | ∅ | ∅ | 87.7 | ∅ | ∅ | ∅ | 38.2 | ∅ | ∅ | ∅ | 91.2 | 66.7 | ∅ | ∅ |
|
|
54
54
|
| claude-opus-5-5-xhigh | Claude Opus 5.5 (Adaptive Reasoning, Xhigh Effort, Default Fallback) | 2026-09-22 | 56 | 64 | 66 | 65 | 59.6 | 65 | 57.5 | 26.6 | 31.7 | 65.4 | 34.3 | 84.7 | 42.7 | ∅ | ∅ | ∅ | ∅ | 86.6 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 91.2 | ∅ | ∅ | ∅ |
|
|
55
|
+
| claude-sonnet-5-5 | Claude Sonnet 5.5 (Adaptive Reasoning, Max Effort, Default Fallback) | 2026-09-28 | 56 | 65.5 | 67.2 | 71.3 | 63.6 | 61 | 55 | 25.8 | 31.4 | 54 | 53 | 82.7 | 32.3 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 93.1 | 75 | ∅ | ∅ |
|
|
55
56
|
| claude-opus-5-5-high | Claude Opus 5.5 (Adaptive Reasoning, High Effort, Default Fallback) | 2026-09-22 | 53.6 | 60.2 | 59.6 | 63.2 | 56.6 | 60.4 | 55.6 | 28.8 | 30.9 | 64.6 | 32.4 | 82.7 | 40.6 | ∅ | ∅ | ∅ | ∅ | 85.8 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 90.9 | ∅ | ∅ | ∅ |
|
|
56
57
|
| claude-fable-5-1 | Claude Fable 5.1 (Adaptive Reasoning, Max Effort, Default Fallback) | 2026-09-01 | 53.4 | 58.9 | 61.7 | 59.4 | 52 | 63.1 | 59.1 | 26.2 | 29.7 | 67.2 | 27.4 | 85.3 | 43.5 | 93.7 | 91.4 | ∅ | ∅ | ∅ | ∅ | 47.2 | 57.5 | 49.5 | ∅ | ∅ | ∅ | 93 | 71.1 | ∅ | ∅ |
|
|
57
58
|
| claude-fable-5-1-xhigh | Claude Fable 5.1 (Adaptive Reasoning, Xhigh Effort, Default Fallback) | 2026-09-01 | 53.2 | 58.4 | 61 | 57.8 | 55.1 | 60.9 | 58.7 | 26.2 | 31.1 | 66.2 | 29.5 | 83 | 42.4 | 93.4 | 91 | ∅ | ∅ | ∅ | ∅ | 45.8 | ∅ | ∅ | ∅ | ∅ | ∅ | 93.3 | ∅ | ∅ | ∅ |
|
|
59
|
+
| claude-sonnet-5-5-xhigh | Claude Sonnet 5.5 (Adaptive Reasoning, Xhigh Effort, Default Fallback) | 2026-09-28 | 51.9 | 62.3 | 61.2 | 64.7 | 57.1 | 57.3 | 50 | 24.6 | 31.1 | 53 | 37.1 | 79.7 | 23.5 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 92.4 | ∅ | ∅ | ∅ |
|
|
58
60
|
| claude-opus-5-5-medium | Claude Opus 5.5 (Adaptive Reasoning, Medium Effort, Default Fallback) | 2026-09-22 | 51.2 | 57.1 | 53.8 | 61.2 | 52.5 | 59.3 | 54.7 | 25.6 | 27.7 | 64.6 | 31.6 | 84.3 | 40.3 | ∅ | ∅ | ∅ | ∅ | 85.7 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 90.3 | ∅ | ∅ | ∅ |
|
|
59
61
|
| claude-fable-5-1-high | Claude Fable 5.1 (Adaptive Reasoning, High Effort, Default Fallback) | 2026-09-01 | 51.2 | 54.6 | 55.9 | 55.3 | 52 | 58.7 | 55.9 | ∅ | 30.3 | 64.9 | 31.2 | 83.7 | 40.8 | 90.6 | 89.9 | ∅ | ∅ | ∅ | ∅ | 43.1 | ∅ | ∅ | ∅ | ∅ | ∅ | 93 | ∅ | ∅ | ∅ |
|
|
60
62
|
| claude-opus-5 | Claude Opus 5 (Adaptive Reasoning, Max Effort) | 2026-07-24 | 50.8 | 58.7 | 60.4 | 56.6 | 49 | 56.4 | 54.9 | 21.6 | 29.1 | 60.9 | 39.2 | 79.3 | 37.1 | 93.2 | 89.1 | ∅ | ∅ | 84.7 | ∅ | 42.1 | 53.8 | ∅ | ∅ | ∅ | ∅ | 93.5 | 55.6 | ∅ | 47.5 |
|
|
@@ -63,12 +65,15 @@ Table: all 673 models on the Artificial Analysis leaderboard, including models w
|
|
|
63
65
|
| claude-fable-5-1-medium | Claude Fable 5.1 (Adaptive Reasoning, Medium Effort, Default Fallback) | 2026-09-01 | 48.9 | 52.1 | 51.8 | 54.7 | 44.9 | 56.4 | 53.8 | ∅ | 29.1 | 63.1 | 30.9 | 84.7 | 37.6 | 88.6 | 88 | ∅ | ∅ | ∅ | ∅ | 41 | ∅ | ∅ | ∅ | ∅ | ∅ | 92.6 | ∅ | ∅ | ∅ |
|
|
64
66
|
| claude-opus-5-high | Claude Opus 5 (Adaptive Reasoning, High Effort) | 2026-07-24 | 48.1 | 53.7 | 54.1 | 53.6 | 46 | 55.4 | 52.8 | ∅ | 28.3 | 58.9 | 38.8 | 79 | 33.7 | 93.7 | 87.6 | ∅ | ∅ | 82.4 | ∅ | 44.7 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
|
|
65
67
|
| claude-fable-5-1-low | Claude Fable 5.1 (Adaptive Reasoning, Low Effort, Default Fallback) | 2026-09-01 | 46.8 | 49.5 | 47.5 | 52.2 | 40.4 | 56.7 | 48.9 | ∅ | 27.7 | 60.2 | 34.4 | 82.3 | 34.1 | 88.1 | 85 | ∅ | ∅ | ∅ | ∅ | 39 | ∅ | ∅ | ∅ | ∅ | ∅ | 92.3 | ∅ | ∅ | ∅ |
|
|
68
|
+
| claude-sonnet-5-5-high | Claude Sonnet 5.5 (Adaptive Reasoning, High Effort, Default Fallback) | 2026-09-28 | 46.7 | 56.7 | 50.9 | 59.1 | 43.9 | 53.7 | 45.8 | ∅ | 24.6 | 52 | 35.4 | 78 | 21 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 92.1 | ∅ | ∅ | ∅ |
|
|
66
69
|
| claude-opus-5-medium | Claude Opus 5 (Adaptive Reasoning, Medium Effort) | 2026-07-24 | 44.8 | 47 | 48.8 | 54.3 | 34.3 | 51.5 | 51.3 | ∅ | 26.9 | 57.1 | 39.3 | 82 | 31 | 91.9 | 86.1 | ∅ | ∅ | 81.6 | ∅ | 38.6 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
|
|
67
70
|
| claude-opus-5-5-low | Claude Opus 5.5 (Adaptive Reasoning, Low Effort, Default Fallback) | 2026-09-22 | 42.3 | 39.2 | 36.2 | 52.9 | 31.3 | 58.6 | 48.3 | ∅ | 17.7 | 63.5 | 32.4 | 80.7 | 38.9 | ∅ | ∅ | ∅ | ∅ | 84.7 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 89.1 | ∅ | ∅ | ∅ |
|
|
68
71
|
| claude-opus-4-8 | Claude Opus 4.8 (Adaptive Reasoning, Max Effort) | 2026-05-28 | 41.8 | 41 | 46.9 | 45.6 | 21.7 | 54.4 | 48.7 | ∅ | 20.9 | 48.8 | 60.7 | 77.7 | 28.8 | 92 | 84.6 | 58.3 | 62.2 | ∅ | 94.4 | 34.2 | ∅ | ∅ | ∅ | ∅ | ∅ | 91.1 | ∅ | ∅ | ∅ |
|
|
72
|
+
| claude-sonnet-5-5-medium | Claude Sonnet 5.5 (Adaptive Reasoning, Medium Effort, Default Fallback) | 2026-09-28 | 40.7 | 48 | 39.6 | 52.9 | 29.8 | 52.9 | 39.8 | ∅ | 16.9 | 47.2 | 48.8 | 76.3 | 20.1 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 91.8 | ∅ | ∅ | ∅ |
|
|
69
73
|
| claude-opus-4-7 | Claude Opus 4.7 (Adaptive Reasoning, Max Effort) | 2026-04-16 | 40.7 | 37.7 | 41.9 | ∅ | ∅ | ∅ | 42.3 | ∅ | 12 | 48.9 | 57.7 | 78.7 | 27.3 | 91.4 | 83.1 | 51.5 | 58.6 | 78.8 | 88.6 | 34.6 | ∅ | 46.7 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
|
|
70
74
|
| claude-opus-5-low | Claude Opus 5 (Adaptive Reasoning, Low Effort) | 2026-07-24 | 39.4 | 35.5 | 39.7 | 51.8 | 26.3 | 49.2 | 43.4 | ∅ | 23.1 | 56 | 37.8 | 81.3 | 28.6 | 88.9 | 76.4 | ∅ | ∅ | 79.8 | ∅ | 30.3 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
|
|
71
75
|
| claude-sonnet-5 | Claude Sonnet 5 (Adaptive Reasoning, Max Effort) | 2026-06-30 | 38.2 | 43 | 47.5 | 36.5 | 14.1 | 54.3 | 41.3 | ∅ | 16.9 | 40.1 | 60.6 | 82 | 16.5 | 91.1 | 80.5 | ∅ | ∅ | 77.3 | ∅ | 37.3 | ∅ | ∅ | ∅ | ∅ | ∅ | 90.1 | ∅ | ∅ | ∅ |
|
|
76
|
+
| claude-sonnet-5-5-low | Claude Sonnet 5.5 (Adaptive Reasoning, Low Effort, Default Fallback) | 2026-09-28 | 35.8 | 38.2 | 33.4 | 50.1 | 20.7 | 49.1 | 36.2 | ∅ | 11.4 | 46.3 | 49.8 | 76 | 19.4 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | 89 | ∅ | ∅ | ∅ |
|
|
72
77
|
| claude-sonnet-5-xhigh | Claude Sonnet 5 (Adaptive Reasoning, Xhigh Effort) | 2026-06-30 | 34.4 | 38.7 | 42.2 | 34.5 | 7.1 | 54.1 | 39 | ∅ | 15.4 | 39 | 41.4 | 76.7 | 3.2 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
|
|
73
78
|
| claude-opus-4-6-adaptive | Claude Opus 4.6 (Adaptive Reasoning, Max Effort) | 2026-02-05 | 31.9 | ∅ | ∅ | ∅ | ∅ | ∅ | 39.9 | ∅ | 12.6 | 47 | 37.2 | 78 | 13.7 | 89.6 | ∅ | 46.2 | 53.1 | 75.4 | 92.1 | ∅ | ∅ | ∅ | 33 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
|
|
74
79
|
| claude-sonnet-5-high | Claude Sonnet 5 (Adaptive Reasoning, High Effort) | 2026-06-30 | 31.7 | 33.8 | 37.3 | 32.1 | 5.1 | 54.3 | 35.7 | ∅ | 15.1 | 37.4 | 34.3 | 76.7 | -3.7 | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ | ∅ |
|
|
@@ -764,7 +769,7 @@ Key:
|
|
|
764
769
|
|
|
765
770
|
## FrontierCode 1.1
|
|
766
771
|
|
|
767
|
-
Source: [FrontierCode leaderboard](https://cognition.com/frontiercode) by Cognition, current revision, accessed 2026-09-
|
|
772
|
+
Source: [FrontierCode leaderboard](https://cognition.com/frontiercode) by Cognition, current revision, accessed 2026-09-28. Each row is the model's best-scoring reasoning effort, which is the same on both sets.
|
|
768
773
|
|
|
769
774
|
Key:
|
|
770
775
|
|
|
@@ -779,6 +784,7 @@ Key:
|
|
|
779
784
|
| claude-fable-5 | Fable 5 | xhigh | 53.5 | 58.9 | 64.9 | 70.9 | 0.3 | $13.09 |
|
|
780
785
|
| claude-opus-5 | Opus 5 | medium | 53.4 | 58.9 | 63.6 | 69.6 | 0.6 | $4.31 |
|
|
781
786
|
| gpt-6-astra | GPT-6 Astra | max | 53.3 | 58.8 | 64.5 | 70.6 | ∅ | $4.59 |
|
|
787
|
+
| claude-sonnet-5-5 | Sonnet 5.5 | xhigh | 52.1 | 57.2 | 64.4 | 69.9 | 0.0 | $1.59 |
|
|
782
788
|
| claude-fable-5-1 | Fable 5.1 | medium | 50.9 | 55.5 | 63.6 | 68.8 | 0.0 | $3.28 |
|
|
783
789
|
| swe-2 | SWE-2 | max | 50.0 | 55.5 | 62.5 | 68.4 | ∅ | $1.18 |
|
|
784
790
|
| gpt-6-sol | GPT-6 Sol | max | 49.3 | 54.3 | 60.7 | 66.3 | 0.0 | $2.07 |
|
|
@@ -818,9 +824,9 @@ Key:
|
|
|
818
824
|
|
|
819
825
|
## Published benchmark results
|
|
820
826
|
|
|
821
|
-
Scores published by model vendors and benchmark owners for recent frontier models, accessed 2026-09-25. Values are percent. Each row names its source; the same benchmark can appear once per source because vendors run different harnesses, grading and effort levels. Internal vendor evaluations are excluded.
|
|
827
|
+
Scores published by model vendors and benchmark owners for recent frontier models, accessed 2026-09-25; Claude Sonnet 5.5 rows accessed 2026-09-28. Values are percent. Each row names its source; the same benchmark can appear once per source because vendors run different harnesses, grading and effort levels. Internal vendor evaluations are excluded.
|
|
822
828
|
|
|
823
|
-
Sources: OpenAI = [GPT-6 Astra announcement](https://openai.com/index/gpt-6-astra/); Anthropic = [Claude Fable 5.1 announcement](https://www.anthropic.com/claude-fable-and-mythos-5-1); Google = [Gemini 3.8 Flash model card](https://deepmind.google/models/model-cards/gemini-3-8-flash/); ARC Prize = [arcprize.org results](https://arcprize.org/results/google-gemini-3-8-flash); TB-Science leaderboard = [terminal-bench-science.ai](https://www.terminal-bench-science.ai/); Zapier = [AutomationBench leaderboard](https://zapier.com/benchmarks).
|
|
829
|
+
Sources: OpenAI = [GPT-6 Astra announcement](https://openai.com/index/gpt-6-astra/); Anthropic = [Claude Fable 5.1 announcement](https://www.anthropic.com/claude-fable-and-mythos-5-1), [Claude Sonnet 5.5 announcement](https://www.anthropic.com/claude-sonnet-5-5) and [system card](https://www.anthropic.com/claude-sonnet-5-5-system-card); Google = [Gemini 3.8 Flash model card](https://deepmind.google/models/model-cards/gemini-3-8-flash/); ARC Prize = [arcprize.org results](https://arcprize.org/results/google-gemini-3-8-flash); TB-Science leaderboard = [terminal-bench-science.ai](https://www.terminal-bench-science.ai/); Zapier = [AutomationBench leaderboard](https://zapier.com/benchmarks).
|
|
824
830
|
|
|
825
831
|
Key:
|
|
826
832
|
|
|
@@ -916,6 +922,12 @@ Key:
|
|
|
916
922
|
| claude-opus-5 | Claude Opus 5 | ARC1 | 97.5 | semi-private, best effort | OpenAI |
|
|
917
923
|
| claude-opus-5 | Claude Opus 5 | ARC2 | 90.4 | semi-private, best effort | OpenAI |
|
|
918
924
|
| claude-opus-5 | Claude Opus 5 | ARC3 | 30.2 | OpenAI responses harness | OpenAI |
|
|
925
|
+
| claude-sonnet-5-5 | Claude Sonnet 5.5 | OSW2 | 80.1 | v2.1 task files (2026-09-10), partial, Anthropic grading | Anthropic |
|
|
926
|
+
| claude-sonnet-5-5 | Claude Sonnet 5.5 | OSW2s | 43.5 | v2.1 task files (2026-09-10), strict, Anthropic grading | Anthropic |
|
|
927
|
+
| claude-sonnet-5-5 | Claude Sonnet 5.5 | ABench | 44.7 | v1.0.6, max effort, default fallbacks, run by Zapier | Anthropic |
|
|
928
|
+
| claude-sonnet-5-5 | Claude Sonnet 5.5 | CAD | 74.7 | voxel IoU, Vision2Code 1,000-file subset, no tools | Anthropic |
|
|
929
|
+
| claude-sonnet-5-5 | Claude Sonnet 5.5 | HLEt | 64.5 | with tools | Anthropic |
|
|
930
|
+
| claude-sonnet-5-5 | Claude Sonnet 5.5 | TBSci | 59.9 | v0.1, Anthropic setup | Anthropic |
|
|
919
931
|
| gemini-3-8-flash | Gemini 3.8 Flash | OSW2 | 59.0 | offline set v2026.08.08, partial, batch tool enabled | Google |
|
|
920
932
|
| gemini-3-8-flash | Gemini 3.8 Flash | HLEv | 54.9 | HLE-Verified, tools not stated | Google |
|
|
921
933
|
| gemini-3-8-flash | Gemini 3.8 Flash | TBSci | 12.4 | v0.1, 3 trials per task, vendor harness | TB-Science leaderboard |
|
|
@@ -25,6 +25,33 @@ Add an app manifest to `package.json` or use conventional directories. The manif
|
|
|
25
25
|
|
|
26
26
|
Paths are relative to the package root. Arrays support glob patterns and `!exclusions`.
|
|
27
27
|
|
|
28
|
+
### MCP Servers
|
|
29
|
+
|
|
30
|
+
A package can contribute [MCP servers](/mcp-servers) with `mcpServers`. Point it at a JSON file in the standard `{ "mcpServers": { ... } }` shape, relative to the package root, or declare the servers inline:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"atomic": {
|
|
35
|
+
"mcpServers": "./mcp.json"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"atomic": {
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"acme-search": { "url": "https://mcp.acme.dev", "auth": "bearer", "bearerTokenEnv": "ACME_TOKEN" },
|
|
45
|
+
"acme-local": { "command": "node", "args": ["./dist/server.js"], "cwd": "." }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Entries use the same schema as `mcp.json`, including `${VAR}` interpolation, `lifecycle`, and `timeoutMs`. A relative `cwd` is resolved against the package root, so `"cwd": "."` lets a stdio server run files shipped in the package. MCP servers are only read from the manifest, never from a convention directory.
|
|
52
|
+
|
|
53
|
+
Contributed servers have the lowest precedence: users can replace or disable one by name in their own MCP configuration, and filter them with `mcpServers` patterns in settings. Project packages contribute servers only in trusted projects. For a server whose configuration is computed at runtime, call [`pi.registerMcpServer()`](/extensions/api-reference#pi-registermcpserver-name-config) from an extension.
|
|
54
|
+
|
|
28
55
|
### Gallery Metadata
|
|
29
56
|
|
|
30
57
|
The package gallery currently recognizes legacy `pi-package` metadata, while new Atomic packages should also include `atomic-package`. Add `video` or `image` fields to show a preview:
|
|
@@ -19,13 +19,14 @@ Filter what a package loads using the object form in settings:
|
|
|
19
19
|
"skills": [],
|
|
20
20
|
"prompts": ["prompts/review.md"],
|
|
21
21
|
"themes": ["+themes/legacy.json"],
|
|
22
|
-
"workflows": ["workflows/*.ts"]
|
|
22
|
+
"workflows": ["workflows/*.ts"],
|
|
23
|
+
"mcpServers": ["acme-*", "!acme-legacy"]
|
|
23
24
|
}
|
|
24
25
|
]
|
|
25
26
|
}
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
`+path` and `-path` are exact paths relative to the package root.
|
|
29
|
+
`+path` and `-path` are exact paths relative to the package root. `mcpServers` patterns match server names from the package manifest instead of paths, and `+name`/`-name` match a name exactly.
|
|
29
30
|
|
|
30
31
|
- Omit a key to load all of that type.
|
|
31
32
|
- Use `[]` to load none of that type.
|
package/docs/packages.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Atomic packages"
|
|
3
|
-
description: "Install, manage, and share Atomic packages that bundle extensions, skills, prompt templates, themes, and
|
|
3
|
+
description: "Install, manage, and share Atomic packages that bundle extensions, skills, prompt templates, themes, workflows, and MCP servers."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
> Atomic can help you create packages. Ask it to bundle your extensions, skills, prompt templates, or themes.
|
|
7
7
|
|
|
8
8
|
# Atomic Packages
|
|
9
9
|
|
|
10
|
-
Atomic packages bundle extensions, skills, prompt templates, themes,
|
|
10
|
+
Atomic packages bundle extensions, skills, prompt templates, themes, workflow definitions, and MCP servers so you can share them through npm or git. Declare resources in `package.json` under the `atomic` key, or use conventional directories.
|
|
11
11
|
|
|
12
12
|
## Where to go next
|
|
13
13
|
|
|
@@ -27,6 +27,7 @@ Read this page to install and manage packages, then continue:
|
|
|
27
27
|
- [Local Paths](#local-paths)
|
|
28
28
|
- [Creating an Atomic Package](/packages/authoring#creating-an-atomic-package)
|
|
29
29
|
- [Gallery Metadata](/packages/authoring#gallery-metadata)
|
|
30
|
+
- [MCP Servers](/packages/authoring#mcp-servers)
|
|
30
31
|
- [Package Structure](/packages/authoring#package-structure)
|
|
31
32
|
- [Convention Directories](/packages/authoring#convention-directories)
|
|
32
33
|
- [Dependencies](/packages/authoring#dependencies)
|
package/docs/skills.md
CHANGED
|
@@ -82,7 +82,7 @@ This is progressive disclosure: only descriptions are always in context, full in
|
|
|
82
82
|
|
|
83
83
|
### Built-in prompt engineering guidance
|
|
84
84
|
|
|
85
|
-
The bundled `/skill:prompt-engineer` creates, optimizes, evaluates, and troubleshoots prompts for GPT and Claude models. Its small routing file points to separate, source-attributed guides for GPT-6 Astra, GPT-5.6, GPT-5.5, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, and Claude Sonnet 5. Read the target model's page, or both relevant pages for a migration, without loading every guide. Shared references cover prompt structure, tools, evaluation, and instruction audits; model defaults, effort, verification, and API compatibility stay in their own pages.
|
|
85
|
+
The bundled `/skill:prompt-engineer` creates, optimizes, evaluates, and troubleshoots prompts for GPT and Claude models. Its small routing file points to separate, source-attributed guides for GPT-6 Astra, GPT-5.6, GPT-5.5, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Sonnet 5.5, and Claude Sonnet 5. Read the target model's page, or both relevant pages for a migration, without loading every guide. Shared references cover prompt structure, tools, evaluation, and instruction audits; model defaults, effort, verification, and API compatibility stay in their own pages.
|
|
86
86
|
|
|
87
87
|
Each model guide pairs an observed behavior with a prompt adjustment, example wording, and caveats. Choose the patterns that address your task instead of copying the whole guide; compatibility notes explain when a prompt also needs provider or application support.
|
|
88
88
|
|
|
@@ -90,6 +90,8 @@ Astra guidance distills [OpenAI's model guide](https://developers.openai.com/api
|
|
|
90
90
|
|
|
91
91
|
Opus 5.5 guidance covers its always-on thinking and medium-effort API default, progress updates returned in thinking blocks, bounded continuations for unattended work, and pasted-content boundaries. Use it when migrating Opus 5 prompts or troubleshooting silent or prematurely stopped tool loops; verify provider and host support before applying API-specific controls.
|
|
92
92
|
|
|
93
|
+
Sonnet 5.5 guidance covers recalibrated effort levels, coding runs that check in early or add unrequested files, progress notes that clients hide by default, searching instead of answering from memory, real checks before reporting code done, and where to place mid-turn user messages so they are not mistaken for prompt injection. Anthropic says Sonnet 5 prompts should perform well without changes, so use the guide when a migrated prompt shows one of these behaviors.
|
|
94
|
+
|
|
93
95
|
The skill no longer recommends response prefilling, which returns an error on Claude 4.6 and later, or visible chain-of-thought as a primary technique. Use explicit output instructions, schemas, tools, or post-processing instead of prefilling. Request conclusions, citations, commands, and observed results rather than reconstructed private reasoning; such requests can trigger Claude Fable 5's `reasoning_extraction` safeguard and force a model fallback.
|
|
94
96
|
|
|
95
97
|
### Built-in visual explanation guidance
|
|
@@ -173,9 +173,9 @@
|
|
|
173
173
|
"license": "Unlicense"
|
|
174
174
|
},
|
|
175
175
|
"node_modules/undici": {
|
|
176
|
-
"version": "6.
|
|
177
|
-
"resolved": "https://registry.npmjs.org/undici/-/undici-6.
|
|
178
|
-
"integrity": "sha512-
|
|
176
|
+
"version": "6.29.0",
|
|
177
|
+
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.0.tgz",
|
|
178
|
+
"integrity": "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==",
|
|
179
179
|
"license": "MIT",
|
|
180
180
|
"engines": {
|
|
181
181
|
"node": ">=18.17"
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bastani/atomic",
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.24",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@bastani/atomic-natives": "0.9.
|
|
13
|
-
"@bastani/pi-ai": "0.9.
|
|
12
|
+
"@bastani/atomic-natives": "0.9.24",
|
|
13
|
+
"@bastani/pi-ai": "0.9.24",
|
|
14
14
|
"@dbos-inc/dbos-sdk": "4.25.14",
|
|
15
15
|
"@earendil-works/pi-agent-core": "0.87.1",
|
|
16
16
|
"@earendil-works/pi-client": "0.87.1",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"minimatch": "10.2.6",
|
|
38
38
|
"open": "^11.0.1",
|
|
39
39
|
"p-limit": "^7.3.2",
|
|
40
|
-
"pg": "8.
|
|
40
|
+
"pg": "8.23.0",
|
|
41
41
|
"proper-lockfile": "4.1.2",
|
|
42
42
|
"semver": "7.8.5",
|
|
43
43
|
"turndown": "^7.2.0",
|
|
@@ -429,18 +429,18 @@
|
|
|
429
429
|
}
|
|
430
430
|
},
|
|
431
431
|
"node_modules/@bastani/atomic-natives": {
|
|
432
|
-
"version": "0.9.
|
|
433
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.
|
|
432
|
+
"version": "0.9.24",
|
|
433
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.24.tgz",
|
|
434
434
|
"license": "MIT",
|
|
435
435
|
"optionalDependencies": {
|
|
436
|
-
"@bastani/atomic-natives-darwin-arm64": "0.9.
|
|
437
|
-
"@bastani/atomic-natives-darwin-x64": "0.9.
|
|
438
|
-
"@bastani/atomic-natives-linux-arm64-gnu": "0.9.
|
|
439
|
-
"@bastani/atomic-natives-linux-arm64-musl": "0.9.
|
|
440
|
-
"@bastani/atomic-natives-linux-x64-gnu": "0.9.
|
|
441
|
-
"@bastani/atomic-natives-linux-x64-musl": "0.9.
|
|
442
|
-
"@bastani/atomic-natives-win32-arm64-msvc": "0.9.
|
|
443
|
-
"@bastani/atomic-natives-win32-x64-msvc": "0.9.
|
|
436
|
+
"@bastani/atomic-natives-darwin-arm64": "0.9.24",
|
|
437
|
+
"@bastani/atomic-natives-darwin-x64": "0.9.24",
|
|
438
|
+
"@bastani/atomic-natives-linux-arm64-gnu": "0.9.24",
|
|
439
|
+
"@bastani/atomic-natives-linux-arm64-musl": "0.9.24",
|
|
440
|
+
"@bastani/atomic-natives-linux-x64-gnu": "0.9.24",
|
|
441
|
+
"@bastani/atomic-natives-linux-x64-musl": "0.9.24",
|
|
442
|
+
"@bastani/atomic-natives-win32-arm64-msvc": "0.9.24",
|
|
443
|
+
"@bastani/atomic-natives-win32-x64-msvc": "0.9.24"
|
|
444
444
|
},
|
|
445
445
|
"engines": {
|
|
446
446
|
"bun": ">=1.4.2",
|
|
@@ -448,8 +448,8 @@
|
|
|
448
448
|
}
|
|
449
449
|
},
|
|
450
450
|
"node_modules/@bastani/atomic-natives-darwin-arm64": {
|
|
451
|
-
"version": "0.9.
|
|
452
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.
|
|
451
|
+
"version": "0.9.24",
|
|
452
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.24.tgz",
|
|
453
453
|
"license": "MIT",
|
|
454
454
|
"os": [
|
|
455
455
|
"darwin"
|
|
@@ -460,8 +460,8 @@
|
|
|
460
460
|
"optional": true
|
|
461
461
|
},
|
|
462
462
|
"node_modules/@bastani/atomic-natives-darwin-x64": {
|
|
463
|
-
"version": "0.9.
|
|
464
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.
|
|
463
|
+
"version": "0.9.24",
|
|
464
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.24.tgz",
|
|
465
465
|
"license": "MIT",
|
|
466
466
|
"os": [
|
|
467
467
|
"darwin"
|
|
@@ -472,8 +472,8 @@
|
|
|
472
472
|
"optional": true
|
|
473
473
|
},
|
|
474
474
|
"node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
|
|
475
|
-
"version": "0.9.
|
|
476
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.
|
|
475
|
+
"version": "0.9.24",
|
|
476
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.24.tgz",
|
|
477
477
|
"license": "MIT",
|
|
478
478
|
"os": [
|
|
479
479
|
"linux"
|
|
@@ -487,8 +487,8 @@
|
|
|
487
487
|
"optional": true
|
|
488
488
|
},
|
|
489
489
|
"node_modules/@bastani/atomic-natives-linux-arm64-musl": {
|
|
490
|
-
"version": "0.9.
|
|
491
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.
|
|
490
|
+
"version": "0.9.24",
|
|
491
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.24.tgz",
|
|
492
492
|
"license": "MIT",
|
|
493
493
|
"os": [
|
|
494
494
|
"linux"
|
|
@@ -502,8 +502,8 @@
|
|
|
502
502
|
"optional": true
|
|
503
503
|
},
|
|
504
504
|
"node_modules/@bastani/atomic-natives-linux-x64-gnu": {
|
|
505
|
-
"version": "0.9.
|
|
506
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.
|
|
505
|
+
"version": "0.9.24",
|
|
506
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.24.tgz",
|
|
507
507
|
"license": "MIT",
|
|
508
508
|
"os": [
|
|
509
509
|
"linux"
|
|
@@ -517,8 +517,8 @@
|
|
|
517
517
|
"optional": true
|
|
518
518
|
},
|
|
519
519
|
"node_modules/@bastani/atomic-natives-linux-x64-musl": {
|
|
520
|
-
"version": "0.9.
|
|
521
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.
|
|
520
|
+
"version": "0.9.24",
|
|
521
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.24.tgz",
|
|
522
522
|
"license": "MIT",
|
|
523
523
|
"os": [
|
|
524
524
|
"linux"
|
|
@@ -532,8 +532,8 @@
|
|
|
532
532
|
"optional": true
|
|
533
533
|
},
|
|
534
534
|
"node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
|
|
535
|
-
"version": "0.9.
|
|
536
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.
|
|
535
|
+
"version": "0.9.24",
|
|
536
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.24.tgz",
|
|
537
537
|
"license": "MIT",
|
|
538
538
|
"os": [
|
|
539
539
|
"win32"
|
|
@@ -544,8 +544,8 @@
|
|
|
544
544
|
"optional": true
|
|
545
545
|
},
|
|
546
546
|
"node_modules/@bastani/atomic-natives-win32-x64-msvc": {
|
|
547
|
-
"version": "0.9.
|
|
548
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.
|
|
547
|
+
"version": "0.9.24",
|
|
548
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.24.tgz",
|
|
549
549
|
"license": "MIT",
|
|
550
550
|
"os": [
|
|
551
551
|
"win32"
|
|
@@ -556,8 +556,8 @@
|
|
|
556
556
|
"optional": true
|
|
557
557
|
},
|
|
558
558
|
"node_modules/@bastani/pi-ai": {
|
|
559
|
-
"version": "0.9.
|
|
560
|
-
"resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.
|
|
559
|
+
"version": "0.9.24",
|
|
560
|
+
"resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.24.tgz",
|
|
561
561
|
"license": "MIT",
|
|
562
562
|
"dependencies": {
|
|
563
563
|
"@anthropic-ai/sdk": "0.124.0",
|
|
@@ -3188,9 +3188,9 @@
|
|
|
3188
3188
|
"license": "ISC"
|
|
3189
3189
|
},
|
|
3190
3190
|
"node_modules/ip-address": {
|
|
3191
|
-
"version": "10.
|
|
3192
|
-
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.
|
|
3193
|
-
"integrity": "sha512-
|
|
3191
|
+
"version": "10.7.2",
|
|
3192
|
+
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.2.tgz",
|
|
3193
|
+
"integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==",
|
|
3194
3194
|
"license": "MIT",
|
|
3195
3195
|
"engines": {
|
|
3196
3196
|
"node": ">= 12"
|
|
@@ -3360,9 +3360,9 @@
|
|
|
3360
3360
|
"license": "BSD-2-Clause"
|
|
3361
3361
|
},
|
|
3362
3362
|
"node_modules/jszip": {
|
|
3363
|
-
"version": "3.10.
|
|
3364
|
-
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.
|
|
3365
|
-
"integrity": "sha512-
|
|
3363
|
+
"version": "3.10.2",
|
|
3364
|
+
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.2.tgz",
|
|
3365
|
+
"integrity": "sha512-3l+rb15IOWtUhU0H5MFqES/T6Kh7abYwjosBey/vD6hDt8zoEffkSC5Ws5SGtgVw3gBx2NEbhTeSW1+kWkpyTQ==",
|
|
3366
3366
|
"license": "(MIT OR GPL-3.0-or-later)",
|
|
3367
3367
|
"dependencies": {
|
|
3368
3368
|
"lie": "~3.3.0",
|
|
@@ -4052,14 +4052,14 @@
|
|
|
4052
4052
|
}
|
|
4053
4053
|
},
|
|
4054
4054
|
"node_modules/pg": {
|
|
4055
|
-
"version": "8.
|
|
4056
|
-
"resolved": "https://registry.npmjs.org/pg/-/pg-8.
|
|
4057
|
-
"integrity": "sha512-
|
|
4055
|
+
"version": "8.23.0",
|
|
4056
|
+
"resolved": "https://registry.npmjs.org/pg/-/pg-8.23.0.tgz",
|
|
4057
|
+
"integrity": "sha512-Ip2EQCngowJLGOfCwkFhPXU7/ljlhn6Rxlmy4XYfL2Y+vyRM59+8uR2xqRWKdYmbXmxCFOAmKxBuSUCdF34qLg==",
|
|
4058
4058
|
"license": "MIT",
|
|
4059
4059
|
"dependencies": {
|
|
4060
4060
|
"pg-connection-string": "^2.14.0",
|
|
4061
4061
|
"pg-pool": "^3.14.0",
|
|
4062
|
-
"pg-protocol": "^1.
|
|
4062
|
+
"pg-protocol": "^1.16.0",
|
|
4063
4063
|
"pg-types": "2.2.0",
|
|
4064
4064
|
"pgpass": "1.0.5"
|
|
4065
4065
|
},
|
|
@@ -4110,9 +4110,9 @@
|
|
|
4110
4110
|
}
|
|
4111
4111
|
},
|
|
4112
4112
|
"node_modules/pg-protocol": {
|
|
4113
|
-
"version": "1.
|
|
4114
|
-
"resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.
|
|
4115
|
-
"integrity": "sha512-
|
|
4113
|
+
"version": "1.16.0",
|
|
4114
|
+
"resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.16.0.tgz",
|
|
4115
|
+
"integrity": "sha512-sILXutLVjCLjcDuOmvhX5e2Z4cS5qG/6Bu3VkpFwdf/633ElGLpEh9bgmuI5I4sqKqkifQiGyiCcx1HdtrK7tg==",
|
|
4116
4116
|
"license": "MIT"
|
|
4117
4117
|
},
|
|
4118
4118
|
"node_modules/pg-types": {
|