{"_id":"@antigma/ante-sdk","_rev":"7-b31ba266992edf29e3a7d1df1e419a2d","name":"@antigma/ante-sdk","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"@antigma/ante-sdk","version":"0.1.0","keywords":["ante","antigma","agent","sdk","typescript"],"license":"MIT","_id":"@antigma/ante-sdk@0.1.0","maintainers":[{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},{"name":"monk_antigma","email":"mohanz@antigma.ai"},{"name":"mohanz","email":"m68zhang@gmail.com"},{"name":"hangxiee","email":"hang@antigma.ai"}],"homepage":"https://github.com/AntigmaLabs/ante-obsidian#readme","bugs":{"url":"https://github.com/AntigmaLabs/ante-obsidian/issues"},"dist":{"shasum":"3ece558141a7958df7c8b06673a73bf8fcba2000","tarball":"https://registry.npmjs.org/@antigma/ante-sdk/-/ante-sdk-0.1.0.tgz","fileCount":50,"integrity":"sha512-/SsMxr/sxfgvtc2GqaOH/fg7k3DQF7aAbJrYqEsSBYAG9G3Oy2sJIP24qC2bZAzWttLnsjsVgid1vVBcfgLAug==","signatures":[{"sig":"MEYCIQCQNTnQKK6HJoka8QmHIg5emsZl08GFVXlxp+TqcE4CLgIhAKS0f9GUR/FjQH0za2j+P80meQREOHMZ+J624WpmllM5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":146617},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"ff228b359a53add017f28c20fadcf3ea50519bcc","private":false,"scripts":{"test":"node --import tsx --test \"tests/**/*.test.ts\"","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.typecheck.json"},"_npmUser":{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},"repository":{"url":"git+ssh://git@github.com/AntigmaLabs/ante-obsidian.git","type":"git","directory":"packages/ante-sdk"},"_npmVersion":"11.12.0","description":"TypeScript SDK for launching Ante, managing sessions, and streaming protocol messages.","directories":{},"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.9.3","@types/node":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ante-sdk_0.1.0_1783408839132_0.4279575417706438","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@antigma/ante-sdk","version":"0.2.0","keywords":["ante","antigma","agent","sdk","typescript"],"license":"MIT","_id":"@antigma/ante-sdk@0.2.0","maintainers":[{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},{"name":"monk_antigma","email":"mohanz@antigma.ai"},{"name":"mohanz","email":"m68zhang@gmail.com"},{"name":"hangxiee","email":"hang@antigma.ai"}],"homepage":"https://github.com/AntigmaLabs/ante-sdk#readme","bugs":{"url":"https://github.com/AntigmaLabs/ante-sdk/issues"},"dist":{"shasum":"f19a53cf18542beef588783d6cc528d497a0ce47","tarball":"https://registry.npmjs.org/@antigma/ante-sdk/-/ante-sdk-0.2.0.tgz","fileCount":51,"integrity":"sha512-zxBn/YIDCwtjPbR3eTbNRpT313biTPL1KjL7KVvbJMKDNZVkL0Gb/BPSsmPz3kGH7rukBGt/bxvKsNvCi+ykRw==","signatures":[{"sig":"MEUCIQCtyrc4Rl7bek7NHWWzJuAmEuCWBHmrzDRVi5PkMZRIUAIgXR6dXekjwMVu8xOYZUfsqnqoWzTrjlcZTP+LdBWdJHY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":171441},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"00925abc4dc664a3614899344c83599005d01533","private":false,"scripts":{"test":"node --import tsx --test \"tests/**/*.test.ts\"","build":"tsc -p tsconfig.json","check":"npm run typecheck && npm test && npm run build","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.typecheck.json"},"_npmUser":{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},"repository":{"url":"git+ssh://git@github.com/AntigmaLabs/ante-sdk.git","type":"git"},"_npmVersion":"11.12.0","description":"TypeScript SDK for launching Ante, managing sessions, and streaming protocol messages.","directories":{},"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.9.3","@types/node":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ante-sdk_0.2.0_1783836578924_0.5455819832214874","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@antigma/ante-sdk","version":"0.2.1","keywords":["ante","antigma","agent","sdk","typescript"],"license":"MIT","_id":"@antigma/ante-sdk@0.2.1","maintainers":[{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},{"name":"monk_antigma","email":"mohanz@antigma.ai"},{"name":"mohanz","email":"m68zhang@gmail.com"},{"name":"hangxiee","email":"hang@antigma.ai"}],"homepage":"https://github.com/AntigmaLabs/ante-sdk#readme","bugs":{"url":"https://github.com/AntigmaLabs/ante-sdk/issues"},"dist":{"shasum":"e48fa98eb12b7c1a55ab06836d033e33d380f040","tarball":"https://registry.npmjs.org/@antigma/ante-sdk/-/ante-sdk-0.2.1.tgz","fileCount":51,"integrity":"sha512-TXwoja+skiS94+Cqng1IvJCarmw7AhwT661s/7LbN1jL+834wlAsL86HvMq8R3jeawsK7i81EAyLII9JcQKB3A==","signatures":[{"sig":"MEQCIGtT2v1qCqDh4d+enL3ImKc1ochjVqr+snosW0stZniAAiAJjMAw7VTCtGL9zaCcmTEpLKj0Rb0PUA/GFufrnD96+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":173210},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"7cebc9332a513660f581cd6382b355c44226d7b6","private":false,"scripts":{"test":"node --import tsx --test \"tests/**/*.test.ts\"","build":"tsc -p tsconfig.json","check":"npm run typecheck && npm test && npm run build","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.typecheck.json"},"_npmUser":{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},"repository":{"url":"git+ssh://git@github.com/AntigmaLabs/ante-sdk.git","type":"git"},"_npmVersion":"11.12.0","description":"TypeScript SDK for launching Ante, managing sessions, and streaming protocol messages.","directories":{},"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.9.3","@types/node":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ante-sdk_0.2.1_1783851619808_0.05538531226888388","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@antigma/ante-sdk","version":"0.2.2","keywords":["ante","antigma","agent","sdk","typescript"],"license":"MIT","_id":"@antigma/ante-sdk@0.2.2","maintainers":[{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},{"name":"monk_antigma","email":"mohanz@antigma.ai"},{"name":"mohanz","email":"m68zhang@gmail.com"},{"name":"hangxiee","email":"hang@antigma.ai"}],"homepage":"https://github.com/AntigmaLabs/ante-sdk#readme","bugs":{"url":"https://github.com/AntigmaLabs/ante-sdk/issues"},"dist":{"shasum":"4d288b10e8ad0256a2a794a827f65ed6f0cf24fd","tarball":"https://registry.npmjs.org/@antigma/ante-sdk/-/ante-sdk-0.2.2.tgz","fileCount":51,"integrity":"sha512-sBwX3P1FKyK1+upQSm4KcfcwSbz7PYPyrz/7VvDy19dH2aqK/DGXxiihQrNFV7bHO5nPtLqTpqF0u0yYhZERcQ==","signatures":[{"sig":"MEQCIDAOR2cagsKjt+SaXQ93tiXmEIj9Op453l7sxg1NSXMyAiAWobxR755fg/x+ddeL3t4bhOUnlB/WgT2feOWz7Zb18g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":180576},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"265cefcd66df06936fbbb24b2ce9ab078e06aed8","private":false,"scripts":{"test":"node --import tsx --test \"tests/**/*.test.ts\"","build":"tsc -p tsconfig.json","check":"npm run typecheck && npm test && npm run build","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.typecheck.json"},"_npmUser":{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},"repository":{"url":"git+ssh://git@github.com/AntigmaLabs/ante-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"TypeScript SDK for launching Ante, managing sessions, and streaming protocol messages.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.9.3","@types/node":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ante-sdk_0.2.2_1785810407311_0.46716721511910575","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@antigma/ante-sdk","version":"0.2.3","keywords":["ante","antigma","agent","sdk","typescript"],"license":"MIT","_id":"@antigma/ante-sdk@0.2.3","maintainers":[{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},{"name":"monk_antigma","email":"mohanz@antigma.ai"},{"name":"mohanz","email":"m68zhang@gmail.com"},{"name":"hangxiee","email":"hang@antigma.ai"}],"homepage":"https://github.com/AntigmaLabs/ante-sdk#readme","bugs":{"url":"https://github.com/AntigmaLabs/ante-sdk/issues"},"dist":{"shasum":"3f9faeedd5d9ca31530a8d934a7b8d528509476b","tarball":"https://registry.npmjs.org/@antigma/ante-sdk/-/ante-sdk-0.2.3.tgz","fileCount":51,"integrity":"sha512-lyLWMLDWM6vv6GmULZ1v9aqvsx1WxVbkV8w/aQnmEXEDD0y/cX4ncttdfZA1P34WqqqMEpoRTjgxp4BaewJWmA==","signatures":[{"sig":"MEYCIQC89PKb8cmiI8NP2/Re5rlizvEzNfRGJeDRwqRPqi9BWAIhAKqpuJ5L4rjTR8bWCqctuxLIHWOdPu2+EKkUtF4PvNyU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181476},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"265cefcd66df06936fbbb24b2ce9ab078e06aed8","private":false,"scripts":{"test":"node --import tsx --test \"tests/**/*.test.ts\"","build":"tsc -p tsconfig.json","check":"npm run typecheck && npm test && npm run build","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.typecheck.json"},"_npmUser":{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},"repository":{"url":"git+ssh://git@github.com/AntigmaLabs/ante-sdk.git","type":"git"},"_npmVersion":"11.12.1","description":"TypeScript SDK for launching Ante, managing sessions, and streaming protocol messages.","directories":{},"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.9.3","@types/node":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ante-sdk_0.2.3_1787491865303_0.6336622204218214","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@antigma/ante-sdk","version":"0.4.0","keywords":["ante","antigma","agent","sdk","typescript"],"license":"MIT","_id":"@antigma/ante-sdk@0.4.0","maintainers":[{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},{"name":"monk_antigma","email":"mohanz@antigma.ai"},{"name":"mohanz","email":"m68zhang@gmail.com"},{"name":"hangxiee","email":"hang@antigma.ai"}],"homepage":"https://github.com/AntigmaLabs/ante-sdk#readme","bugs":{"url":"https://github.com/AntigmaLabs/ante-sdk/issues"},"dist":{"shasum":"64a82aaf6bc725081cd15c98122df717015b1ca8","tarball":"https://registry.npmjs.org/@antigma/ante-sdk/-/ante-sdk-0.4.0.tgz","fileCount":51,"integrity":"sha512-LbM6fVi142B1V42cOVpuiJ4zb+xH/DtwwwHRmBTlfHTOImUzBFK0KSRDrO2GmWNHeGQEudTJrix5AZvlDzMIiQ==","signatures":[{"sig":"MEQCIEt9MxPCVNkPN87zT693jEBI9ZkO46Jtsg4VMyt/9xSQAiAoL2dxM9L+C0P4pdmjRW5Fx7fYydoXSY9titSyVU5lLA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDQtpSHLmYvWT86Orm9XqML1DrJ0AflT+e1UFivxI8qQAIgRuFJXII/nYFS+5FUnF6FLipILmFKfjtwIbgvMJ2wzp4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":226027},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"ec885072d21c678ea3f51ab45bba68011e66baf7","private":false,"scripts":{"test":"node --import tsx --test \"tests/**/*.test.ts\"","build":"tsc -p tsconfig.json","check":"npm run typecheck && npm test && npm run build","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.typecheck.json","check:protocol":"node scripts/check-protocol-drift.mjs"},"_npmUser":{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},"repository":{"url":"git+ssh://git@github.com/AntigmaLabs/ante-sdk.git","type":"git"},"_npmVersion":"11.12.0","description":"TypeScript SDK for launching Ante, managing sessions, and streaming protocol messages.","directories":{},"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.9.3","@types/node":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ante-sdk_0.4.0_1789851517592_0.980324580925193","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"_id":"@antigma/ante-sdk@0.4.1","bugs":{"url":"https://github.com/AntigmaLabs/ante-sdk/issues"},"dist":{"shasum":"6796fb9044930470b08d035804dd0f1296af9a9f","tarball":"https://registry.npmjs.org/@antigma/ante-sdk/-/ante-sdk-0.4.1.tgz","fileCount":55,"integrity":"sha512-jGuf2akMzwyI6XiC84P3DK0vMF15b+fP8JR6CsBTPatnFKS0JddK6j20Zbpxzlyzz6A9V+RCDWM04A1b7v4Lrg==","signatures":[{"sig":"MEUCICVTZKrEfkVTtoVFANKleOlKNzTHRZEiAOY7I356GlzlAiEAzR7G1f7VPDOC8Sni7c85MmSYRnCCefYdeQnJSQIzHOY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBt80PVNKWNGQ4FJb2vWTwOheCDfbPbO7oAPznBqW+yBAiBtXZLZJ/kfHIK+k/a3aazFe6tBRMmnFsPknZZsmziIMg=="}],"unpackedSize":243806},"main":"./dist/index.js","name":"@antigma/ante-sdk","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"cd0dc417b120ce15a059412688f7bad4a233a6eb","license":"MIT","private":false,"scripts":{"test":"node --import tsx --test \"tests/**/*.test.ts\"","build":"tsc -p tsconfig.json","check":"npm run typecheck && npm test && npm run build","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.typecheck.json","check:protocol":"node scripts/check-protocol-drift.mjs"},"version":"0.4.1","_npmUser":{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},"homepage":"https://github.com/AntigmaLabs/ante-sdk#readme","keywords":["ante","antigma","agent","sdk","typescript"],"repository":{"url":"git+ssh://git@github.com/AntigmaLabs/ante-sdk.git","type":"git"},"_npmVersion":"11.12.0","description":"TypeScript SDK for launching Ante, managing sessions, and streaming protocol messages.","directories":{},"maintainers":[{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},{"name":"monk_antigma","email":"mohanz@antigma.ai"},{"name":"mohanz","email":"m68zhang@gmail.com"},{"name":"hangxiee","email":"hang@antigma.ai"}],"_nodeVersion":"24.4.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.9.3","@types/node":"^24.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ante-sdk_0.4.1_1790598923807_0.7505677966398747"}}},"time":{"created":"2026-07-07T07:20:39.020Z","modified":"2026-09-28T12:35:24.116Z","0.1.0":"2026-07-07T07:20:39.255Z","0.2.0":"2026-07-12T06:09:39.078Z","0.2.1":"2026-07-12T10:20:19.978Z","0.2.2":"2026-08-04T02:26:47.473Z","0.2.3":"2026-08-23T13:31:05.451Z","0.4.0":"2026-09-19T20:58:37.678Z","0.4.1":"2026-09-28T12:35:23.976Z"},"bugs":{"url":"https://github.com/AntigmaLabs/ante-sdk/issues"},"license":"MIT","homepage":"https://github.com/AntigmaLabs/ante-sdk#readme","keywords":["ante","antigma","agent","sdk","typescript"],"repository":{"url":"git+ssh://git@github.com/AntigmaLabs/ante-sdk.git","type":"git"},"description":"TypeScript SDK for launching Ante, managing sessions, and streaming protocol messages.","maintainers":[{"name":"leo-foo","email":"fuli.foo.jp@gmail.com"},{"name":"monk_antigma","email":"mohanz@antigma.ai"},{"name":"mohanz","email":"m68zhang@gmail.com"},{"name":"hangxiee","email":"hang@antigma.ai"}],"readme":"# @antigma/ante-sdk\n\nTypeScript SDK for launching Ante, managing sessions, and streaming protocol messages from Node.js applications.\n\nThe SDK is intentionally small: it owns the Ante process or websocket transport, serializes protocol operations, parses event envelopes, and exposes a Claude Code SDK-style `query()` API plus a lower-level session client for UI integrations.\n\n## Installation\n\n```bash\nnpm install @antigma/ante-sdk\n```\n\n## Requirements\n\n- Node.js 20 or newer.\n- An `ante` executable available on `PATH`, or an explicit `pathToAnteExecutable` option.\n- An Ante runtime that supports `ante serve --stdio` or websocket transport **and speaks the current [Protocol Reference](https://docs.antigma.ai/reference/protocol-reference)** — since `0.2.0` the SDK sends `permission_mode`, not the removed `policy` field. Older `ante` builds that only understand `policy` are not supported.\n\n## Quick Start\n\n```ts\nimport { query } from \"@antigma/ante-sdk\";\n\nconst stream = query({\n  prompt: \"Summarize this repository.\",\n  options: {\n    cwd: process.cwd(),\n    pathToAnteExecutable: \"ante\",\n    provider: \"openai-subscription\",\n    model: \"gpt-5.4\",\n    permissionMode: \"default\"\n  }\n});\n\nfor await (const message of stream) {\n  if (message.type === \"stream_event\" && message.event.type === \"text_delta\") {\n    process.stdout.write(message.event.text);\n  }\n\n  if (message.type === \"result\" && message.subtype === \"error\") {\n    console.error(message.error);\n  }\n}\n```\n\n## Low-Level Client\n\nUse `createAnteClient()` when the host application needs explicit session lifecycle control, approvals, cancellation, diagnostics, or resume support.\n\n```ts\nimport { createAnteClient } from \"@antigma/ante-sdk\";\n\nconst client = createAnteClient({\n  cwd: process.cwd(),\n  pathToAnteExecutable: \"ante\",\n  provider: \"openai-subscription\",\n  model: \"gpt-5.4\",\n  permissionMode: \"default\"\n});\n\nclient.setMessageHandler((message) => {\n  if (message.type === \"approval\") {\n    client.respondToApproval(message.approval, \"Accept\");\n    return;\n  }\n\n  console.log(message);\n});\n\nclient.setDoneHandler((result) => {\n  console.log(\"turn finished\", result);\n});\n\nawait client.connect();\nconst sessionId = await client.startSession();\nclient.sendUserInput(`Continue in session ${sessionId}.`);\n```\n\nWhile that turn is active, send live guidance without starting a new turn:\n\n```ts\nclient.sendSteer(\"also update the tests\");\n```\n\n## Transports\n\nBy default, the SDK starts Ante with stdio:\n\n```ts\ncreateAnteClient({\n  pathToAnteExecutable: \"ante\",\n  anteArgs: [\"serve\", \"--stdio\"]\n});\n```\n\nFor websocket-backed hosts, set `transport` and websocket options:\n\n```ts\ncreateAnteClient({\n  transport: \"websocket\",\n  pathToAnteExecutable: \"ante\",\n  websocket: {\n    host: \"127.0.0.1\",\n    port: 0\n  }\n});\n```\n\n## Message Shape\n\nThe SDK emits typed `SDKMessage` objects. Common messages include:\n\n- `system/init` when a session starts or resumes.\n- `stream_event/text_delta` for assistant text.\n- `stream_event/thinking_delta` for thinking updates.\n- `turn/start` when Ante starts a user turn.\n- `tool/start` and `tool/end` for tool execution.\n- `approval` when the host must approve or deny a tool call.\n- `result/success`, `result/error`, or `result/cancelled` when a turn completes.\n- `usage` for model usage metadata.\n- `question` for a structured `TurnPause/Question`, answered with `respondToQuestion()`.\n- `shell_output`, `tool_update`, `info_block`, `context`, and `ambient` for their corresponding daemon events.\n- `session_end` with the daemon's reason and final usage accounting.\n- `system/diagnostic` for stderr/stdout diagnostics.\n- `extensions` for skills, sub-agents, and MCP servers (with their discovered tools) as the daemon refreshes them — fired once right after session start and again once MCP warm-up completes in the background.\n\n## Model Effort and Live Updates\n\n```ts\nconst client = createAnteClient({\n  cwd: process.cwd(),\n  provider: \"anthropic\",\n  model: \"claude-sonnet-4-6\",\n  permissionMode: \"bypassPermissions\", // maps to Ante's native \"yolo\"\n  effort: \"high\",                      // min | low | medium | high | xhigh | max\n  // Lean sessions (selection actions, one-shots):\n  shortPrompt: true,                   // compact system prompt + smaller tool descriptions\n  noSkills: true,                      // skip skill discovery for this session\n  enableAutoMemory: false,\n  // Forward a brand-new daemon SessionOverrides field before the SDK types it:\n  // sessionExtras: { some_new_flag: true },\n});\n\nawait client.connect();\nawait client.startSession();\n\n// Switch model/effort/permission mode without restarting the session.\nclient.updateSession({ model: \"gpt-5.4\", effort: \"medium\", permissionMode: \"acceptEdits\" });\n```\n\nFor protocol-level host integrations, `AnteClient` exposes `sendShellInput`, `sendSlashCommand`, `registerLocalProvider`, `restoreLocalProvider`, `requestContextReport`, goal controls, ambient requests, and `compact`; `Query` provides corresponding convenience methods while its event iterator remains single-turn. `allowedTools` replaces the default toolset (including `[]` for no tools), whereas `includeTools` adds to defaults. Session options also include skill include/exclude lists, `saveSession`, `unattended`, and `title`.\n\n`Options.permissionMode` keeps its existing six-value vocabulary (`default` / `acceptEdits` / `bypassPermissions` / `plan` / `dontAsk` / `auto`) for backward compatibility with existing callers, but only three of those have a native Ante equivalent: `bypassPermissions` → `yolo`, `acceptEdits`/`auto` → `auto`, everything else → `strict` (always ask).\n\n## Public API\n\n```ts\nimport {\n  query,\n  createAnteClient,\n  AnteProtocolClient,\n  AnteStdioTransport,\n  AnteWebSocketTransport,\n  buildApprovalResponseOperation,\n  describeAutoApprovedTools\n} from \"@antigma/ante-sdk\";\n\nimport type {\n  AnteClient,\n  ApprovalDecision,\n  ApprovalRequest,\n  Options,\n  SDKMessage,\n  ToolCall\n} from \"@antigma/ante-sdk\";\n```\n\nThe package is ESM-only and publishes compiled JavaScript plus declaration files from `dist/`.\n\n## Development\n\n```bash\nnpm install\nnpm run check\n```\n\nUseful individual commands:\n\n```bash\nnpm run typecheck\nnpm test\nnpm run build\nnpm pack --dry-run\n```\n\n## Versioning\n\nPatch releases keep the public import path stable and may add new message variants or parser support. Breaking API changes should wait for a minor or major version depending on the size of the change. `0.2.0` changed the wire-level `permission_mode` field (see `CHANGELOG.md`) — the TypeScript-facing API is unchanged, but it requires an `ante` build that speaks the current Protocol Reference.\n\n## Release\n\n1. Update `CHANGELOG.md`.\n2. Run `npm run check`.\n3. Run `npm pack --dry-run` and inspect the file list.\n4. Publish with `npm publish --access public`.\n\n## License\n\nMIT\n\n## Desktop and host adapters\n\n`AnteProtocolClient` accepts a transport factory for host-controlled process\nexecution. `setNativeEventHandler(handler, { suppressReplay: true })` delivers\nvalidated native envelopes with original event kinds and correlation fields;\nthe suppression option excludes restored history until a new live operation\nproduces events. The client owns start/resume and pending question state.\nUse `getPendingQuestion(turnId, toolUseId)` and `respondToQuestion` for structured\nquestions; replies after resume, turn end, interruption, or close are rejected.\n`respondToToolApprovals` accepts independent decisions for each tool in a batch.\n\nAnswers preserve the original question order and exact option labels. `note`\ncan accompany a selection or carry a free-text answer. `Dismissed` skips a prompt;\n`{ Discuss: { message } }` requests discussion. Neither action means interrupting\nthe task. Clients must continue reading events while a question is pending.\n","readmeFilename":"README.md"}