noumen 0.4.0 → 0.6.0

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.
Files changed (73) hide show
  1. package/README.md +63 -8
  2. package/dist/a2a/index.d.ts +6 -4
  3. package/dist/acp/index.d.ts +7 -5
  4. package/dist/{agent-1nFVUP9E.d.ts → agent-DWE4_P5X.d.ts} +169 -485
  5. package/dist/{cache-DsRqxx6v.d.ts → cache-BlBwXXPS.d.ts} +1 -1
  6. package/dist/{chunk-4HW6LN6D.js → chunk-6MMYCGJQ.js} +366 -1227
  7. package/dist/chunk-6MMYCGJQ.js.map +1 -0
  8. package/dist/{chunk-5JN4SPI7.js → chunk-7IQCQI2G.js} +1 -1
  9. package/dist/{chunk-L3L3FG5T.js → chunk-CCM2AXZG.js} +1 -1
  10. package/dist/{chunk-L3L3FG5T.js.map → chunk-CCM2AXZG.js.map} +1 -1
  11. package/dist/{chunk-CS6WNDCF.js → chunk-I3JTUFPK.js} +2 -2
  12. package/dist/chunk-I3JTUFPK.js.map +1 -0
  13. package/dist/chunk-I5SBSOS6.js +40 -0
  14. package/dist/chunk-I5SBSOS6.js.map +1 -0
  15. package/dist/{chunk-HL6JCRZJ.js → chunk-XZN4QZLK.js} +4 -4
  16. package/dist/{chunk-EKOGVTBT.js → chunk-ZXSDKBYB.js} +4 -2
  17. package/dist/chunk-ZXSDKBYB.js.map +1 -0
  18. package/dist/cli/index.js +11 -11
  19. package/dist/client/index.d.ts +1 -1
  20. package/dist/computer-BPdxSo6X.d.ts +88 -0
  21. package/dist/docker.d.ts +129 -0
  22. package/dist/docker.js +401 -0
  23. package/dist/docker.js.map +1 -0
  24. package/dist/e2b.d.ts +157 -0
  25. package/dist/e2b.js +202 -0
  26. package/dist/e2b.js.map +1 -0
  27. package/dist/freestyle.d.ts +174 -0
  28. package/dist/freestyle.js +240 -0
  29. package/dist/freestyle.js.map +1 -0
  30. package/dist/index.d.ts +19 -204
  31. package/dist/index.js +38 -48
  32. package/dist/lsp/index.d.ts +4 -3
  33. package/dist/mcp/index.d.ts +5 -4
  34. package/dist/mcp/index.js +2 -2
  35. package/dist/{provider-factory-KCLIF34X.js → provider-factory-TUHU3DIG.js} +2 -2
  36. package/dist/providers/anthropic.d.ts +3 -3
  37. package/dist/providers/anthropic.js +4 -3
  38. package/dist/providers/anthropic.js.map +1 -1
  39. package/dist/providers/bedrock.d.ts +3 -3
  40. package/dist/providers/bedrock.js +2 -2
  41. package/dist/providers/bedrock.js.map +1 -1
  42. package/dist/providers/gemini.d.ts +2 -2
  43. package/dist/providers/gemini.js +1 -1
  44. package/dist/providers/gemini.js.map +1 -1
  45. package/dist/providers/ollama.d.ts +1 -1
  46. package/dist/providers/ollama.js +2 -2
  47. package/dist/providers/openai.d.ts +2 -2
  48. package/dist/providers/openai.js +2 -2
  49. package/dist/providers/openrouter.d.ts +1 -1
  50. package/dist/providers/openrouter.js +2 -2
  51. package/dist/providers/vertex.d.ts +3 -3
  52. package/dist/providers/vertex.js +4 -3
  53. package/dist/providers/vertex.js.map +1 -1
  54. package/dist/{resolve-4JA2BBDA.js → resolve-6KUZNEYW.js} +2 -2
  55. package/dist/sandbox-9qeMTNrD.d.ts +126 -0
  56. package/dist/server/index.d.ts +6 -4
  57. package/dist/{server-CHMxuWKq.d.ts → server-BzNGKTP6.d.ts} +1 -1
  58. package/dist/sprites.d.ts +136 -0
  59. package/dist/sprites.js +334 -0
  60. package/dist/sprites.js.map +1 -0
  61. package/dist/ssh.d.ts +187 -0
  62. package/dist/ssh.js +392 -0
  63. package/dist/ssh.js.map +1 -0
  64. package/dist/{types-RPKUTu1k.d.ts → types-DhXwOQwD.d.ts} +3 -89
  65. package/dist/{types-LrU4LRmX.d.ts → types-kiGBF35b.d.ts} +40 -2
  66. package/package.json +25 -1
  67. package/dist/chunk-4HW6LN6D.js.map +0 -1
  68. package/dist/chunk-CS6WNDCF.js.map +0 -1
  69. package/dist/chunk-EKOGVTBT.js.map +0 -1
  70. /package/dist/{chunk-5JN4SPI7.js.map → chunk-7IQCQI2G.js.map} +0 -0
  71. /package/dist/{chunk-HL6JCRZJ.js.map → chunk-XZN4QZLK.js.map} +0 -0
  72. /package/dist/{provider-factory-KCLIF34X.js.map → provider-factory-TUHU3DIG.js.map} +0 -0
  73. /package/dist/{resolve-4JA2BBDA.js.map → resolve-6KUZNEYW.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/virtual/freestyle-fs.ts","../src/virtual/freestyle-computer.ts","../src/virtual/freestyle-sandbox.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport type { VirtualFs, FileEntry, FileStat, ReadOptions } from \"./fs.js\";\nimport type { FreestyleVmInstance } from \"./freestyle-computer.js\";\n\nexport interface FreestyleFsOptions {\n /** A Freestyle VM instance. */\n vm: FreestyleVmInstance;\n /** Working directory for relative path resolution. */\n workingDir?: string;\n}\n\n/**\n * VirtualFs backed by a Freestyle VM.\n *\n * Uses `vm.fs.*` for operations with native SDK support (readTextFile,\n * writeTextFile, readDir) and falls back to `vm.exec()` for the rest\n * (stat, exists, mkdir, deleteFile, appendFile, readFileBytes).\n *\n * Requires `freestyle-sandboxes` as an optional peer dependency.\n * The user is responsible for VM lifecycle when using explicit mode.\n */\nexport class FreestyleFs implements VirtualFs {\n private vm: FreestyleVmInstance;\n private workingDir: string | undefined;\n\n constructor(opts: FreestyleFsOptions) {\n this.vm = opts.vm;\n this.workingDir = opts.workingDir;\n }\n\n private resolvePath(p: string): string {\n if (p.includes(\"\\0\")) {\n throw new Error(\"Path contains null bytes\");\n }\n if (!this.workingDir) return p;\n const normalizedBase = this.workingDir.endsWith(\"/\") ? this.workingDir : this.workingDir + \"/\";\n if (p.startsWith(\"/\")) {\n const normalized = path.normalize(p);\n if (normalized !== this.workingDir && !normalized.startsWith(normalizedBase)) {\n throw new Error(`Absolute path \"${p}\" is outside working directory \"${this.workingDir}\"`);\n }\n return normalized;\n }\n const resolved = path.resolve(this.workingDir, p);\n if (resolved !== this.workingDir && !resolved.startsWith(normalizedBase)) {\n throw new Error(`Path \"${p}\" escapes working directory \"${this.workingDir}\"`);\n }\n return resolved;\n }\n\n async readFile(filePath: string, _opts?: ReadOptions): Promise<string> {\n return this.vm.fs.readTextFile(this.resolvePath(filePath));\n }\n\n async readFileBytes(filePath: string, maxBytes?: number): Promise<Buffer> {\n const resolved = this.resolvePath(filePath);\n const cmd = maxBytes !== undefined\n ? `head -c ${maxBytes} ${shellEscape(resolved)} | base64`\n : `base64 ${shellEscape(resolved)}`;\n const { statusCode, stdout, stderr } = await this.vm.exec(cmd);\n if (statusCode !== 0) {\n throw new Error(`FreestyleFs readFileBytes failed: ${stderr?.trim() || `exit code ${statusCode}`}`);\n }\n return Buffer.from((stdout ?? \"\").trim(), \"base64\");\n }\n\n async writeFile(filePath: string, content: string): Promise<void> {\n await this.vm.fs.writeTextFile(this.resolvePath(filePath), content);\n }\n\n async appendFile(filePath: string, content: string): Promise<void> {\n const resolved = this.resolvePath(filePath);\n const encoded = Buffer.from(content, \"utf-8\").toString(\"base64\");\n const { statusCode, stderr } = await this.vm.exec(\n `echo ${shellEscape(encoded)} | base64 -d >> ${shellEscape(resolved)}`,\n );\n if (statusCode !== 0) {\n throw new Error(`FreestyleFs appendFile failed: ${stderr?.trim() || `exit code ${statusCode}`}`);\n }\n }\n\n async deleteFile(\n filePath: string,\n opts?: { recursive?: boolean },\n ): Promise<void> {\n const resolved = this.resolvePath(filePath);\n const flag = opts?.recursive ? \"-rf\" : \"-f\";\n await this.vm.exec(`rm ${flag} ${shellEscape(resolved)}`);\n }\n\n async mkdir(filePath: string, opts?: { recursive?: boolean }): Promise<void> {\n const resolved = this.resolvePath(filePath);\n const flag = opts?.recursive ? \"-p \" : \"\";\n await this.vm.exec(`mkdir ${flag}${shellEscape(resolved)}`);\n }\n\n async readdir(\n dirPath: string,\n _opts?: { recursive?: boolean },\n ): Promise<FileEntry[]> {\n const resolved = this.resolvePath(dirPath);\n const items = await this.vm.fs.readDir(resolved);\n return items.map((entry) => ({\n name: entry.name,\n path: resolved === \"/\" ? `/${entry.name}` : `${resolved}/${entry.name}`,\n isDirectory: entry.kind === \"dir\" || entry.kind === \"directory\",\n isFile: entry.kind === \"file\",\n }));\n }\n\n async exists(filePath: string): Promise<boolean> {\n const resolved = this.resolvePath(filePath);\n const { statusCode } = await this.vm.exec(`test -e ${shellEscape(resolved)}`);\n return statusCode === 0;\n }\n\n async stat(filePath: string): Promise<FileStat> {\n const resolved = this.resolvePath(filePath);\n const { statusCode, stdout, stderr } = await this.vm.exec(\n `stat -c '%s\\t%F\\t%W\\t%Y' ${shellEscape(resolved)}`,\n );\n if (statusCode !== 0) {\n throw new Error(`FreestyleFs stat failed: ${stderr?.trim() || `exit code ${statusCode}`}`);\n }\n\n const parts = (stdout ?? \"\").trim().split(\"\\t\");\n const size = parseInt(parts[0], 10);\n const fileType = parts[1];\n const createdEpoch = parseInt(parts[2], 10);\n const modifiedEpoch = parseInt(parts[3], 10);\n\n return {\n size,\n isDirectory: fileType === \"directory\",\n isFile: fileType.startsWith(\"regular\"),\n createdAt: createdEpoch > 0 ? new Date(createdEpoch * 1000) : undefined,\n modifiedAt: modifiedEpoch > 0 ? new Date(modifiedEpoch * 1000) : undefined,\n };\n }\n}\n\nfunction shellEscape(s: string): string {\n return `'${s.replace(/'/g, \"'\\\\''\")}'`;\n}\n","import type { VirtualComputer, ExecOptions, CommandResult } from \"./computer.js\";\n\n/**\n * Minimal subset of the Freestyle VM interface used by FreestyleComputer and\n * FreestyleFs. Avoids a hard import of `freestyle-sandboxes` at the module\n * level — the real SDK is only loaded dynamically during `FreestyleSandbox`\n * auto-creation.\n */\nexport interface FreestyleVmInstance {\n exec(\n command: string,\n opts?: { cwd?: string; timeout?: number },\n ): Promise<{\n stdout: string | null;\n stderr: string | null;\n statusCode: number | null;\n }>;\n fs: {\n readTextFile(path: string): Promise<string>;\n writeTextFile(path: string, content: string): Promise<void>;\n readDir(path: string): Promise<Array<{ name: string; kind: string }>>;\n };\n suspend(): Promise<unknown>;\n start(): Promise<unknown>;\n}\n\nexport interface FreestyleComputerOptions {\n /** A Freestyle VM instance. */\n vm: FreestyleVmInstance;\n /** Default working directory for commands. */\n defaultCwd?: string;\n /** Default timeout in ms for commands (default: 30000). */\n defaultTimeout?: number;\n}\n\n/**\n * VirtualComputer backed by command execution in a Freestyle VM.\n *\n * Requires `freestyle-sandboxes` as an optional peer dependency.\n * The user is responsible for VM lifecycle when using explicit mode.\n */\nexport class FreestyleComputer implements VirtualComputer {\n private vm: FreestyleVmInstance;\n private defaultCwd: string | undefined;\n private defaultTimeout: number;\n\n constructor(opts: FreestyleComputerOptions) {\n this.vm = opts.vm;\n this.defaultCwd = opts.defaultCwd;\n this.defaultTimeout = opts.defaultTimeout ?? 30_000;\n }\n\n async executeCommand(\n command: string,\n opts?: ExecOptions,\n ): Promise<CommandResult> {\n const result = await this.vm.exec(command, {\n cwd: opts?.cwd ?? this.defaultCwd,\n timeout: opts?.timeout ?? this.defaultTimeout,\n });\n\n return {\n exitCode: result.statusCode ?? 1,\n stdout: result.stdout ?? \"\",\n stderr: result.stderr ?? \"\",\n };\n }\n}\n","import type { Sandbox } from \"./sandbox.js\";\nimport { FreestyleFs } from \"./freestyle-fs.js\";\nimport { FreestyleComputer, type FreestyleVmInstance } from \"./freestyle-computer.js\";\nimport { createFsProxy, createComputerProxy } from \"./proxy.js\";\n\nexport interface FreestyleSandboxOptions {\n /**\n * A pre-existing Freestyle VM instance. When provided the sandbox\n * attaches to this VM directly — no auto-creation occurs and\n * `dispose()` will **not** suspend or delete it.\n *\n * When omitted, a new VM is created on the first `init()` call via\n * a dynamic import of the `freestyle-sandboxes` package.\n */\n vm?: FreestyleVmInstance;\n /**\n * Freestyle API key. Falls back to the `FREESTYLE_API_KEY` environment\n * variable when omitted. Only used during auto-creation.\n */\n apiKey?: string;\n /** Snapshot ID to create the VM from. Only used during auto-creation. */\n snapshotId?: string;\n /**\n * A `VmSpec` instance or configuration object passed through to\n * `freestyle.vms.create()`. Only used during auto-creation.\n */\n spec?: unknown;\n /**\n * Idle timeout in seconds for the auto-created VM (default: 600).\n * The VM auto-suspends after this many seconds of network inactivity.\n */\n idleTimeoutSeconds?: number;\n /** Working directory inside the VM. */\n cwd?: string;\n /** Default timeout (ms) for shell commands. */\n defaultTimeout?: number;\n /** Files to provision at creation time. */\n additionalFiles?: Record<string, { content: string; encoding?: string }>;\n /** Git repos to clone at creation time. */\n gitRepos?: Array<{ repo: string; path: string; rev?: string }>;\n /**\n * What to do with auto-created VMs on `dispose()`:\n * - `\"suspend\"` (default) — suspends the VM, preserving full memory\n * state for near-instant resume on reconnect.\n * - `\"delete\"` — permanently deletes the VM and frees all resources.\n */\n disposeStrategy?: \"suspend\" | \"delete\";\n}\n\n/**\n * Create a `Sandbox` backed by a Freestyle VM.\n * Requires `freestyle-sandboxes` as an optional peer dependency.\n *\n * **Auto-creation:** When `vm` is omitted a new Freestyle VM is\n * provisioned lazily on the first `init()` call. The VM ID is available\n * through `sandboxId()` for session persistence. Pass the stored ID back\n * through `init(storedId)` to reconnect (this also wakes suspended VMs).\n *\n * By default, auto-created VMs are **suspended** on `dispose()` rather\n * than deleted. This preserves full memory state and allows near-instant\n * resume. Set `disposeStrategy: \"delete\"` for full cleanup.\n *\n * **Explicit instance:** When `vm` is provided, `init()` binds it\n * immediately. `dispose()` is a no-op — the caller owns the VM's\n * lifecycle.\n *\n * @example\n * ```ts\n * // Auto-create — VM provisioned on first init()\n * const sandbox = FreestyleSandbox({ cwd: \"/workspace\" });\n *\n * // Auto-create from a snapshot\n * const sandbox = FreestyleSandbox({\n * snapshotId: \"abc123\",\n * cwd: \"/workspace\",\n * });\n *\n * // Explicit — attach to pre-existing VM\n * const sandbox = FreestyleSandbox({ vm: existingVm });\n * ```\n */\nexport function FreestyleSandbox(opts: FreestyleSandboxOptions): Sandbox {\n if (opts.vm) {\n const v = opts.vm;\n return {\n fs: new FreestyleFs({ vm: v, workingDir: opts.cwd }),\n computer: new FreestyleComputer({\n vm: v,\n defaultCwd: opts.cwd,\n defaultTimeout: opts.defaultTimeout,\n }),\n sandboxId: () => (v as any).vmId as string | undefined,\n };\n }\n\n const fsProxy = createFsProxy();\n const computerProxy = createComputerProxy();\n let resolvedId: string | undefined;\n let vmRef: FreestyleVmInstance | null = null;\n let autoCreated = false;\n let initPromise: Promise<void> | null = null;\n\n async function doInit(reconnectId?: string): Promise<void> {\n const mod = await import(\"freestyle-sandboxes\");\n const freestyle = (mod as any).freestyle ?? (mod as any).default?.freestyle;\n if (!freestyle?.vms) {\n throw new Error(\"Could not resolve freestyle client from 'freestyle-sandboxes' package\");\n }\n\n let vm: FreestyleVmInstance;\n if (reconnectId) {\n try {\n const result = await freestyle.vms.get({ vmId: reconnectId });\n vm = result.vm;\n resolvedId = reconnectId;\n } catch {\n const result = await freestyle.vms.create({\n ...(opts.spec ? { spec: opts.spec } : {}),\n snapshotId: opts.snapshotId,\n workdir: opts.cwd,\n idleTimeoutSeconds: opts.idleTimeoutSeconds ?? 600,\n additionalFiles: opts.additionalFiles,\n gitRepos: opts.gitRepos,\n });\n vm = result.vm;\n resolvedId = result.vmId ?? result.id;\n autoCreated = true;\n }\n } else {\n const result = await freestyle.vms.create({\n ...(opts.spec ? { spec: opts.spec } : {}),\n snapshotId: opts.snapshotId,\n workdir: opts.cwd,\n idleTimeoutSeconds: opts.idleTimeoutSeconds ?? 600,\n additionalFiles: opts.additionalFiles,\n gitRepos: opts.gitRepos,\n });\n vm = result.vm;\n resolvedId = result.vmId ?? result.id;\n autoCreated = true;\n }\n\n vmRef = vm;\n fsProxy.setTarget(new FreestyleFs({ vm, workingDir: opts.cwd }));\n computerProxy.setTarget(new FreestyleComputer({\n vm,\n defaultCwd: opts.cwd,\n defaultTimeout: opts.defaultTimeout,\n }));\n }\n\n return {\n fs: fsProxy,\n computer: computerProxy,\n sandboxId: () => resolvedId,\n\n init(sandboxId?: string): Promise<void> {\n if (!initPromise) {\n initPromise = doInit(sandboxId).catch((err) => {\n initPromise = null;\n throw err;\n });\n }\n return initPromise;\n },\n\n async dispose(): Promise<void> {\n if (initPromise) {\n await initPromise.catch(() => {});\n }\n if (!autoCreated || !vmRef || !resolvedId) return;\n try {\n const strategy = opts.disposeStrategy ?? \"suspend\";\n if (strategy === \"suspend\") {\n await vmRef.suspend();\n } else {\n const mod = await import(\"freestyle-sandboxes\");\n const freestyle = (mod as any).freestyle ?? (mod as any).default?.freestyle;\n if (freestyle?.vms) {\n await freestyle.vms.delete({ vmId: resolvedId });\n }\n }\n } catch {\n // Best-effort cleanup — network errors during dispose are non-fatal\n }\n },\n };\n}\n"],"mappings":";;;;;;;AAAA,YAAY,UAAU;AAqBf,IAAM,cAAN,MAAuC;AAAA,EACpC;AAAA,EACA;AAAA,EAER,YAAY,MAA0B;AACpC,SAAK,KAAK,KAAK;AACf,SAAK,aAAa,KAAK;AAAA,EACzB;AAAA,EAEQ,YAAY,GAAmB;AACrC,QAAI,EAAE,SAAS,IAAI,GAAG;AACpB,YAAM,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AACA,QAAI,CAAC,KAAK,WAAY,QAAO;AAC7B,UAAM,iBAAiB,KAAK,WAAW,SAAS,GAAG,IAAI,KAAK,aAAa,KAAK,aAAa;AAC3F,QAAI,EAAE,WAAW,GAAG,GAAG;AACrB,YAAM,aAAkB,eAAU,CAAC;AACnC,UAAI,eAAe,KAAK,cAAc,CAAC,WAAW,WAAW,cAAc,GAAG;AAC5E,cAAM,IAAI,MAAM,kBAAkB,CAAC,mCAAmC,KAAK,UAAU,GAAG;AAAA,MAC1F;AACA,aAAO;AAAA,IACT;AACA,UAAM,WAAgB,aAAQ,KAAK,YAAY,CAAC;AAChD,QAAI,aAAa,KAAK,cAAc,CAAC,SAAS,WAAW,cAAc,GAAG;AACxE,YAAM,IAAI,MAAM,SAAS,CAAC,gCAAgC,KAAK,UAAU,GAAG;AAAA,IAC9E;AACA,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,SAAS,UAAkB,OAAsC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AAA,MAC5C;AAAA,MACA,YAAY,KAAK;AAAA,MACjB,gBAAgB,KAAK;AAAA,IACvB,CAAC,CAAC;AAAA,EACJ;AAEA,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,WAAW,MAAM;AAAA,IAEjB,KAAK,WAAmC;AACtC,UAAI,CAAC,aAAa;AAChB,sBAAc,OAAO,SAAS,EAAE,MAAM,CAAC,QAAQ;AAC7C,wBAAc;AACd,gBAAM;AAAA,QACR,CAAC;AAAA,MACH;AACA,aAAO;AAAA,IACT;AAAA,IAEA,MAAM,UAAyB;AAC7B,UAAI,aAAa;AACf,cAAM,YAAY,MAAM,MAAM;AAAA,QAAC,CAAC;AAAA,MAClC;AACA,UAAI,CAAC,eAAe,CAAC,SAAS,CAAC,WAAY;AAC3C,UAAI;AACF,cAAM,WAAW,KAAK,mBAAmB;AACzC,YAAI,aAAa,WAAW;AAC1B,gBAAM,MAAM,QAAQ;AAAA,QACtB,OAAO;AACL,gBAAM,MAAM,MAAM,OAAO,qBAAqB;AAC9C,gBAAM,YAAa,IAAY,aAAc,IAAY,SAAS;AAClE,cAAI,WAAW,KAAK;AAClB,kBAAM,UAAU,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAAA,UACjD;AAAA,QACF;AAAA,MACF,QAAQ;AAAA,MAER;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
- import { S as Sandbox, A as Agent, D as DockerContainer, E as E2BSandboxInstance, F as FreestyleVmInstance, a as SkillDefinition, T as ThreadConfig, b as SessionStorage, C as ContextFile, P as ProjectContextConfig, c as ContextScope, R as RetryConfig, d as RetryContext, e as RetryEngineOptions, f as Span, g as SpanAttributeValue, h as SpanStatusCode, i as Tracer, j as SpanOptions, k as StoredCostState } from './agent-1nFVUP9E.js';
2
- export { l as AgentOptions, m as AutoCompactConfig, n as AutoCompactTrackingState, B as BudgetState, o as CLEARED_PLACEHOLDER, p as COMPACTABLE_TOOLS, q as ContentReplacementState, r as CostTracker, s as DEFAULT_MODELS, t as DEFAULT_RETRY_CONFIG, u as DiagnoseCheckResult, v as DiagnoseResult, w as DockerComputer, x as DockerComputerOptions, y as DockerSandbox, z as DockerSandboxOptions, G as E2BComputer, H as E2BComputerOptions, I as E2BSandbox, J as E2BSandboxOptions, K as FreestyleComputer, L as FreestyleComputerOptions, M as FreestyleSandbox, N as FreestyleSandboxOptions, O as LocalSandbox, Q as LocalSandboxOptions, U as MicrocompactConfig, V as MicrocompactResult, W as ProviderName, X as ReactiveCompactConfig, Y as ReactiveCompactResult, Z as ResolveProviderOptions, _ as RetryEvent, $ as RunCallbacks, a0 as RunResult, a1 as SUPPORTED_PROVIDERS, a2 as SandboxConfig, a3 as SandboxedLocalComputer, a4 as SandboxedLocalComputerOptions, a5 as SnipConfig, a6 as SnipResult, a7 as SpritesSandbox, a8 as SpritesSandboxOptions, a9 as Thread, aa as ThreadOptions, ab as ToolResultBudgetConfig, ac as ToolResultBudgetResult, ad as ToolResultReplacementRecord, ae as ToolResultSpillResult, af as ToolResultStorageConfig, ag as TracingConfig, ah as UnsandboxedLocal, ai as UnsandboxedLocalOptions, aj as WebSearchConfig, ak as WebSearchResult, al as applyPersistedReplacements, am as applySnipRemovals, an as canAutoCompact, ao as createAutoCompactConfig, ap as createAutoCompactTracking, aq as createBudgetState, ar as createContentReplacementState, as as createWebSearchTool, at as detectProvider, au as enforceToolResultBudget, av as enforceToolResultStorageBudget, aw as microcompactMessages, ax as persistToolResult, ay as projectSnippedView, az as reconstructContentReplacementState, aA as recordAutoCompactFailure, aB as recordAutoCompactSuccess, aC as resolveProvider, aD as shouldAutoCompact, aE as snipMessagesByUuids, aF as tryReactiveCompact, aG as webSearchToolPlaceholder } from './agent-1nFVUP9E.js';
3
- import { A as AIProvider, T as ToolDefinition, o as ToolCallContent, S as StreamEvent, e as ContentPart, b as ChatMessage, k as ChatCompletionUsage, M as ModelPricing, h as UsageRecord, a as ChatStreamChunk, p as MemoryProvider, q as MemoryEntry, l as ThinkingConfig, r as AssistantMessage, s as ToolResultMessage, d as FileCheckpointSnapshot, t as ToolResultOverflowEntry, f as ContentReplacementRecord, J as JsonSchemaOutputFormat } from './types-LrU4LRmX.js';
4
- export { C as ChatParams, u as ChatStreamChoice, v as ChatStreamDelta, w as ChatStreamError, c as CheckpointConfig, x as CompactBoundaryEntry, y as ContentReplacementEntry, i as CostSummary, z as CustomTitleEntry, D as DiffStats, E as Entry, B as FileCheckpointBackup, G as FileCheckpointEntry, F as FileCheckpointState, I as ImageContent, H as ImageUrlContent, K as JsonObjectOutputFormat, m as MemoryConfig, L as MemoryType, N as MessageEntry, P as MetadataEntry, j as ModelUsageSummary, O as OutputFormat, R as RunOptions, Q as SerializedMessage, g as SessionInfo, V as SnipBoundaryEntry, W as SummaryEntry, X as SystemMessage, Y as TextContent, Z as ToolDefParameterProperty, n as ToolResult, _ as UserMessage, $ as createCheckpointState } from './types-LrU4LRmX.js';
5
- import { H as HookDefinition, V as VirtualFs, R as ReadOptions, F as FileEntry, i as FileStat, j as VirtualComputer, E as ExecOptions, C as CommandResult, T as Tool, h as ToolContext, g as ToolResult, o as HookEvent, p as HookInput, P as PostToolUseFailureHookInput, q as PostToolUseFailureHookOutput, r as PostToolUseHookInput, s as PostToolUseHookOutput, t as PreToolUseHookInput, u as PreToolUseHookOutput } from './types-RPKUTu1k.js';
6
- export { m as FileCheckpointManager, v as FileState, w as FileStateCache, n as FileStateCacheConfig, x as FileWriteHookInput, y as HookOutput, J as JsonSchemaType, b as LspDiagnostic, c as LspLocation, d as LspOperation, L as LspServerConfig, a as LspServerState, f as LspSymbol, M as MemoryUpdateHookInput, z as ModelSwitchHookInput, N as NotificationHookInput, A as PermissionDeniedHookInput, B as PermissionRequestHookInput, G as RetryAttemptHookInput, I as SafeParseResult, K as SessionEndHookInput, O as SessionStartHookInput, S as SubagentConfig, k as SubagentRun, Q as SubagentStartHookInput, U as SubagentStopHookInput, W as Task, X as TaskCreateInput, Y as TaskStatus, l as TaskStore, Z as TaskUpdateInput, _ as ToolParameters, $ as ZodLikeSchema, a0 as formatZodValidationError, a1 as registerZodToJsonSchema, a2 as zodToJsonSchema } from './types-RPKUTu1k.js';
1
+ import { a as AutoTitleConfig, A as Agent, S as SkillDefinition, T as ThreadConfig, b as SessionStorage, C as ContextFile, P as ProjectContextConfig, c as ContextScope, R as RetryConfig, d as RetryContext, e as RetryEngineOptions, f as Span, g as SpanAttributeValue, h as SpanStatusCode, i as Tracer, j as SpanOptions, k as StoredCostState } from './agent-DWE4_P5X.js';
2
+ export { l as AgentOptions, m as AutoCompactConfig, n as AutoCompactTrackingState, B as BudgetState, o as CLEARED_PLACEHOLDER, p as COMPACTABLE_TOOLS, q as ContentReplacementState, r as CostTracker, D as DEFAULT_AUTO_TITLE_MAX_INPUT_CHARS, s as DEFAULT_AUTO_TITLE_SYSTEM_PROMPT, t as DEFAULT_MODELS, u as DEFAULT_RETRY_CONFIG, v as DiagnoseCheckResult, w as DiagnoseResult, G as GenerateAutoTitleOptions, M as MicrocompactConfig, x as MicrocompactResult, y as ProviderName, z as ReactiveCompactConfig, E as ReactiveCompactResult, F as ResolveProviderOptions, H as RetryEvent, I as RunCallbacks, J as RunResult, K as SUPPORTED_PROVIDERS, L as SnipConfig, N as SnipResult, O as Thread, Q as ThreadOptions, U as ToolResultBudgetConfig, V as ToolResultBudgetResult, W as ToolResultReplacementRecord, X as ToolResultSpillResult, Y as ToolResultStorageConfig, Z as TracingConfig, _ as WebSearchConfig, $ as WebSearchResult, a0 as applyPersistedReplacements, a1 as applySnipRemovals, a2 as canAutoCompact, a3 as createAutoCompactConfig, a4 as createAutoCompactTracking, a5 as createBudgetState, a6 as createContentReplacementState, a7 as createWebSearchTool, a8 as detectProvider, a9 as enforceToolResultBudget, aa as enforceToolResultStorageBudget, ab as extractTitleFromResponse, ac as extractTitleSeedText, ad as generateAutoTitle, ae as microcompactMessages, af as normalizeTitle, ag as persistToolResult, ah as projectSnippedView, ai as reconstructContentReplacementState, aj as recordAutoCompactFailure, ak as recordAutoCompactSuccess, al as resolveProvider, am as shouldAutoCompact, an as snipMessagesByUuids, ao as tryReactiveCompact, ap as webSearchToolPlaceholder } from './agent-DWE4_P5X.js';
3
+ import { A as AIProvider, T as ToolDefinition, o as ToolCallContent, S as StreamEvent, e as ContentPart, b as ChatMessage, k as ChatCompletionUsage, M as ModelPricing, h as UsageRecord, a as ChatStreamChunk, p as MemoryProvider, q as MemoryEntry, l as ThinkingConfig, r as AssistantMessage, s as ToolResultMessage, d as FileCheckpointSnapshot, t as ToolResultOverflowEntry, f as ContentReplacementRecord, J as JsonSchemaOutputFormat } from './types-kiGBF35b.js';
4
+ export { u as AiTitleEntry, C as ChatParams, v as ChatStreamChoice, w as ChatStreamDelta, x as ChatStreamError, c as CheckpointConfig, y as CompactBoundaryEntry, z as ContentReplacementEntry, i as CostSummary, B as CustomTitleEntry, D as DiffStats, E as Entry, G as FileCheckpointBackup, H as FileCheckpointEntry, F as FileCheckpointState, I as ImageContent, K as ImageUrlContent, L as JsonObjectOutputFormat, m as MemoryConfig, N as MemoryType, P as MessageEntry, Q as MetadataEntry, j as ModelUsageSummary, O as OutputFormat, R as RunOptions, V as SerializedMessage, g as SessionInfo, W as SnipBoundaryEntry, X as SummaryEntry, Y as SystemMessage, Z as TextContent, _ as ToolDefParameterProperty, n as ToolResult, $ as UserMessage, a0 as createCheckpointState } from './types-kiGBF35b.js';
5
+ import { S as Sandbox } from './sandbox-9qeMTNrD.js';
6
+ export { L as LocalSandbox, a as LocalSandboxOptions, b as SandboxConfig, c as SandboxedLocalComputer, d as SandboxedLocalComputerOptions, U as UnsandboxedLocal, e as UnsandboxedLocalOptions } from './sandbox-9qeMTNrD.js';
7
+ import { H as HookDefinition, T as Tool, h as ToolContext, g as ToolResult, l as HookEvent, m as HookInput, P as PostToolUseFailureHookInput, n as PostToolUseFailureHookOutput, o as PostToolUseHookInput, p as PostToolUseHookOutput, q as PreToolUseHookInput, r as PreToolUseHookOutput } from './types-DhXwOQwD.js';
8
+ export { F as FileCheckpointManager, s as FileState, t as FileStateCache, k as FileStateCacheConfig, u as FileWriteHookInput, v as HookOutput, J as JsonSchemaType, b as LspDiagnostic, c as LspLocation, d as LspOperation, L as LspServerConfig, a as LspServerState, f as LspSymbol, M as MemoryUpdateHookInput, w as ModelSwitchHookInput, N as NotificationHookInput, x as PermissionDeniedHookInput, y as PermissionRequestHookInput, R as RetryAttemptHookInput, z as SafeParseResult, A as SessionEndHookInput, B as SessionStartHookInput, S as SubagentConfig, i as SubagentRun, C as SubagentStartHookInput, E as SubagentStopHookInput, G as Task, I as TaskCreateInput, K as TaskStatus, j as TaskStore, O as TaskUpdateInput, Q as ToolParameters, Z as ZodLikeSchema, U as formatZodValidationError, V as registerZodToJsonSchema, W as zodToJsonSchema } from './types-DhXwOQwD.js';
7
9
  import { M as McpServerConfig } from './types-2kTLUCnD.js';
8
10
  export { b as McpConfig, c as McpConnection, d as McpHttpServerConfig, e as McpOAuthConfig, f as McpSseServerConfig, g as McpStdioServerConfig, h as McpToolInfo, i as McpWebSocketServerConfig, a as OAuthProviderOptions, O as OAuthTokenData, T as TokenStorage } from './types-2kTLUCnD.js';
9
11
  export { OpenAIProviderOptions } from './providers/openai.js';
@@ -13,10 +15,11 @@ export { OpenRouterProviderOptions } from './providers/openrouter.js';
13
15
  export { BedrockAnthropicProviderOptions } from './providers/bedrock.js';
14
16
  export { VertexAnthropicProviderOptions } from './providers/vertex.js';
15
17
  export { OllamaProviderOptions } from './providers/ollama.js';
18
+ import { a as VirtualFs, R as ReadOptions, F as FileEntry, b as FileStat, V as VirtualComputer, E as ExecOptions, C as CommandResult } from './computer-BPdxSo6X.js';
16
19
  import { c as PermissionHandler, e as PermissionContext, f as PermissionBehavior, g as PermissionRule, A as AutoModeConfig, h as PermissionDecision, i as PermissionUpdate } from './types-CD0rUKKT.js';
17
20
  export { D as DenialTrackingConfig, j as PermissionAllowResult, k as PermissionAskResult, d as PermissionConfig, l as PermissionDenyResult, a as PermissionMode, m as PermissionPassthroughResult, n as PermissionRequest, P as PermissionResponse, b as PermissionResult, o as PermissionRuleSource, R as RULE_SOURCE_PRECEDENCE } from './types-CD0rUKKT.js';
18
- export { a as McpClientManagerOptions, b as McpServerOptions, c as buildMcpToolName, g as getMcpPrefix, n as normalizeNameForMCP, p as parseMcpToolName } from './server-CHMxuWKq.js';
19
- export { C as CacheControlConfig, a as CacheScope, g as getMessageCacheBreakpointIndex, s as sortToolDefinitionsForCache } from './cache-DsRqxx6v.js';
21
+ export { a as McpClientManagerOptions, b as McpServerOptions, c as buildMcpToolName, g as getMcpPrefix, n as normalizeNameForMCP, p as parseMcpToolName } from './server-BzNGKTP6.js';
22
+ export { C as CacheControlConfig, a as CacheScope, g as getMessageCacheBreakpointIndex, s as sortToolDefinitionsForCache } from './cache-BlBwXXPS.js';
20
23
  export { JsonRpcErrorObject, JsonRpcMessage, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse } from './jsonrpc/index.js';
21
24
  export { b as AcpCapabilities, c as AcpInitializeParams, d as AcpInitializeResult, A as AcpTransport } from './types-QwfylltH.js';
22
25
  export { e as A2AArtifact, M as A2AMessage, P as A2APart, b as A2ATask, g as A2ATaskStatus, a as AgentCard, A as AgentSkill } from './types-NIyVwQ4h.js';
@@ -39,6 +42,13 @@ interface PresetOptions {
39
42
  mcpServers?: Record<string, McpServerConfig>;
40
43
  /** Custom system prompt prepended to the built-in prompt. */
41
44
  systemPrompt?: string;
45
+ /**
46
+ * Opt-in AI-generated session titles. `true` uses the agent's main
47
+ * provider / model; pass a config object to override the model or
48
+ * provider (typically a cheaper one like Haiku) used for title
49
+ * generation only.
50
+ */
51
+ autoTitle?: AutoTitleConfig | boolean;
42
52
  }
43
53
  /**
44
54
  * Full-featured coding agent with subagents, tasks, plan mode, auto-compact,
@@ -108,201 +118,6 @@ declare class LocalComputer implements VirtualComputer {
108
118
  executeCommand(command: string, opts?: ExecOptions): Promise<CommandResult>;
109
119
  }
110
120
 
111
- interface SpritesFsOptions {
112
- /** sprites.dev API token */
113
- token: string;
114
- /** Name of the sprite container */
115
- spriteName: string;
116
- /** Base URL for sprites API (default: https://api.sprites.dev) */
117
- baseURL?: string;
118
- /** Working directory inside the sprite (default: /home/sprite) */
119
- workingDir?: string;
120
- }
121
- /**
122
- * Sandboxed VirtualFs backed by a remote sprites.dev container. All file
123
- * operations are executed over the sprites.dev HTTP API — the agent has no
124
- * access to the host filesystem. This is the recommended VirtualFs for
125
- * production deployments and untrusted agents. See `LocalFs` for an
126
- * unsandboxed local alternative.
127
- */
128
- declare class SpritesFs implements VirtualFs {
129
- private token;
130
- private spriteName;
131
- private baseURL;
132
- private workingDir;
133
- constructor(opts: SpritesFsOptions);
134
- private fsUrl;
135
- private resolvePath;
136
- private headers;
137
- readFile(filePath: string, _opts?: ReadOptions): Promise<string>;
138
- readFileBytes(filePath: string, maxBytes?: number): Promise<Buffer>;
139
- writeFile(filePath: string, content: string): Promise<void>;
140
- /**
141
- * @warning Not atomic. Concurrent appends may lose data due to
142
- * read-then-write TOCTOU. The Sprites API does not expose an append primitive.
143
- */
144
- appendFile(filePath: string, content: string): Promise<void>;
145
- deleteFile(filePath: string, opts?: {
146
- recursive?: boolean;
147
- }): Promise<void>;
148
- mkdir(dirPath: string, opts?: {
149
- recursive?: boolean;
150
- }): Promise<void>;
151
- readdir(dirPath: string, _opts?: {
152
- recursive?: boolean;
153
- }): Promise<FileEntry[]>;
154
- exists(filePath: string): Promise<boolean>;
155
- stat(filePath: string): Promise<FileStat>;
156
- }
157
-
158
- interface SpritesComputerOptions {
159
- /** sprites.dev API token */
160
- token: string;
161
- /** Name of the sprite container */
162
- spriteName: string;
163
- /** Base URL for sprites API (default: https://api.sprites.dev) */
164
- baseURL?: string;
165
- /** Working directory inside the sprite (default: /home/sprite) */
166
- workingDir?: string;
167
- }
168
- /**
169
- * Sandboxed VirtualComputer that executes commands inside a remote
170
- * sprites.dev container. All shell execution is fully isolated — the agent
171
- * has no access to the host machine's processes, filesystem, or network.
172
- *
173
- * This is the recommended VirtualComputer for production deployments and
174
- * untrusted agents. See `LocalComputer` for an unsandboxed local alternative.
175
- *
176
- * Uses the non-interactive exec REST endpoint (POST command, receive
177
- * stdout/stderr/exit_code). The WebSocket exec endpoint can be used for
178
- * streaming/TTY use cases, but REST is sufficient for tool calls.
179
- */
180
- declare class SpritesComputer implements VirtualComputer {
181
- private token;
182
- private spriteName;
183
- private baseURL;
184
- private workingDir;
185
- constructor(opts: SpritesComputerOptions);
186
- private headers;
187
- executeCommand(command: string, opts?: ExecOptions): Promise<CommandResult>;
188
- private shellEscape;
189
- }
190
-
191
- interface DockerFsOptions {
192
- /** A dockerode Container instance for the target container. */
193
- container: DockerContainer;
194
- /** Working directory for relative path resolution (default: /). */
195
- workingDir?: string;
196
- }
197
- /**
198
- * VirtualFs backed by file operations inside a Docker container.
199
- *
200
- * Uses `container.exec()` to run filesystem commands (cat, tee, rm, mkdir,
201
- * stat, etc.) inside the container. File writes use exec + tee to avoid
202
- * tar archive overhead for text content.
203
- *
204
- * Requires `dockerode` as an optional peer dependency.
205
- * The user is responsible for container lifecycle.
206
- */
207
- declare class DockerFs implements VirtualFs {
208
- private container;
209
- private workingDir;
210
- constructor(opts: DockerFsOptions);
211
- private resolvePath;
212
- private exec;
213
- readFile(path: string, _opts?: ReadOptions): Promise<string>;
214
- readFileBytes(path: string, maxBytes?: number): Promise<Buffer>;
215
- writeFile(path: string, content: string): Promise<void>;
216
- appendFile(path: string, content: string): Promise<void>;
217
- deleteFile(path: string, opts?: {
218
- recursive?: boolean;
219
- }): Promise<void>;
220
- mkdir(path: string, opts?: {
221
- recursive?: boolean;
222
- }): Promise<void>;
223
- readdir(path: string, _opts?: {
224
- recursive?: boolean;
225
- }): Promise<FileEntry[]>;
226
- exists(path: string): Promise<boolean>;
227
- stat(path: string): Promise<FileStat>;
228
- }
229
-
230
- interface E2BFsOptions {
231
- /** An E2B Sandbox instance created via `Sandbox.create()`. */
232
- sandbox: E2BSandboxInstance;
233
- /** Working directory for relative path resolution. */
234
- workingDir?: string;
235
- }
236
- /**
237
- * VirtualFs backed by the E2B cloud sandbox filesystem.
238
- *
239
- * Requires `e2b` as an optional peer dependency.
240
- * The user is responsible for sandbox lifecycle (create, close).
241
- */
242
- declare class E2BFs implements VirtualFs {
243
- private sandbox;
244
- private workingDir;
245
- constructor(opts: E2BFsOptions);
246
- private resolvePath;
247
- readFile(path: string, _opts?: ReadOptions): Promise<string>;
248
- readFileBytes(path: string, maxBytes?: number): Promise<Buffer>;
249
- writeFile(path: string, content: string): Promise<void>;
250
- /**
251
- * @warning Not atomic. Concurrent appends may lose data due to
252
- * read-then-write TOCTOU. The E2B SDK does not expose an append primitive.
253
- */
254
- appendFile(path: string, content: string): Promise<void>;
255
- deleteFile(path: string, _opts?: {
256
- recursive?: boolean;
257
- }): Promise<void>;
258
- mkdir(path: string, _opts?: {
259
- recursive?: boolean;
260
- }): Promise<void>;
261
- readdir(path: string, _opts?: {
262
- recursive?: boolean;
263
- }): Promise<FileEntry[]>;
264
- exists(path: string): Promise<boolean>;
265
- stat(path: string): Promise<FileStat>;
266
- }
267
-
268
- interface FreestyleFsOptions {
269
- /** A Freestyle VM instance. */
270
- vm: FreestyleVmInstance;
271
- /** Working directory for relative path resolution. */
272
- workingDir?: string;
273
- }
274
- /**
275
- * VirtualFs backed by a Freestyle VM.
276
- *
277
- * Uses `vm.fs.*` for operations with native SDK support (readTextFile,
278
- * writeTextFile, readDir) and falls back to `vm.exec()` for the rest
279
- * (stat, exists, mkdir, deleteFile, appendFile, readFileBytes).
280
- *
281
- * Requires `freestyle-sandboxes` as an optional peer dependency.
282
- * The user is responsible for VM lifecycle when using explicit mode.
283
- */
284
- declare class FreestyleFs implements VirtualFs {
285
- private vm;
286
- private workingDir;
287
- constructor(opts: FreestyleFsOptions);
288
- private resolvePath;
289
- readFile(filePath: string, _opts?: ReadOptions): Promise<string>;
290
- readFileBytes(filePath: string, maxBytes?: number): Promise<Buffer>;
291
- writeFile(filePath: string, content: string): Promise<void>;
292
- appendFile(filePath: string, content: string): Promise<void>;
293
- deleteFile(filePath: string, opts?: {
294
- recursive?: boolean;
295
- }): Promise<void>;
296
- mkdir(filePath: string, opts?: {
297
- recursive?: boolean;
298
- }): Promise<void>;
299
- readdir(dirPath: string, _opts?: {
300
- recursive?: boolean;
301
- }): Promise<FileEntry[]>;
302
- exists(filePath: string): Promise<boolean>;
303
- stat(filePath: string): Promise<FileStat>;
304
- }
305
-
306
121
  /**
307
122
  * Resolve a tool flag that can be a static boolean or a function of the input.
308
123
  * Returns `defaultValue` when the flag is `undefined`.
@@ -1585,4 +1400,4 @@ declare const IMAGE_EXTENSIONS: Set<string>;
1585
1400
  */
1586
1401
  declare function createImageMetadataText(dims: ImageDimensions): string;
1587
1402
 
1588
- export { AIProvider, API_IMAGE_MAX_BASE64_SIZE, Agent, AssistantMessage, AutoModeConfig, type CacheSafeParams, CannotRetryError, ChatCompletionUsage, ChatMessage, ChatStreamChunk, type ClassifiedError, type ClassifierResult, type CommandClassification, CommandResult, type CompactOptions, type CompressedImageResult, ContentPart, ContentReplacementRecord, ContextFile, ContextScope, DEFAULT_PRICING, type DenialLimits, type DenialState, DenialTracker, DockerContainer, DockerFs, type DockerFsOptions, E2BFs, type E2BFsOptions, E2BSandboxInstance, ExecOptions, type ExtractMemoriesResult, FileCheckpointSnapshot, FileEntry, FileMemoryProvider, FileStat, FreestyleFs, type FreestyleFsOptions, FreestyleVmInstance, type FrontmatterData, type GitOperationEvent, type GitOperationType, HookDefinition, HookEvent, HookInput, IMAGE_EXTENSIONS, IMAGE_MAX_HEIGHT, IMAGE_MAX_WIDTH, type ImageDimensions, InProcessBackend, type IndexTruncation, InvariantViolation, JsonSchemaOutputFormat, LocalComputer, type LocalComputerOptions, LocalFs, type LocalFsOptions, Mailbox, McpServerConfig, MemoryEntry, MemoryProvider, ModelPricing, NoopSpan, NoopTracer, OTelTracer, type ParsedFrontmatter, PermissionBehavior, PermissionContext, PermissionDecision, PermissionHandler, PermissionRule, PermissionUpdate, PostToolUseFailureHookInput, PostToolUseFailureHookOutput, PostToolUseHookInput, PostToolUseHookOutput, PreToolUseHookInput, PreToolUseHookOutput, type PresetOptions, ProjectContextConfig, ReadOptions, type ResizedImage, type ResolvePermissionOptions, type ResumePayload, RetryConfig, RetryContext, RetryEngineOptions, STRUCTURED_OUTPUT_TOOL_NAME, Sandbox, type SanitizeResult, type ShellSafetyConfig, SkillDefinition, Span, SpanAttributeValue, SpanOptions, SpanStatusCode, SpritesComputer, type SpritesComputerOptions, SpritesFs, type SpritesFsOptions, StoredCostState, StreamEvent, type StreamingExecResult, StreamingToolExecutor, type StreamingToolExecutorFn, type SwarmBackend, type SwarmConfig, type SwarmEvents, SwarmManager, type SwarmMember, type SwarmMemberConfig, type SwarmMemberStatus, type SwarmMessage, type SwarmStatus, TOOL_SEARCH_NAME, ThinkingConfig, ThreadConfig, Tool, ToolCallContent, type ToolCallExecResult, type ToolCallExecutor, ToolResult as ToolCallResult, ToolContext, ToolDefinition, ToolRegistry, ToolResultMessage, ToolResultOverflowEntry, type ToolWithDeferral, Tracer, type TurnInterruption, UsageRecord, type UserInputHandler, VirtualComputer, VirtualFs, type WorktreeInfo, activateContextForPaths, activateSkillsForPaths, agentTool, all, applyPermissionUpdate, applyPermissionUpdates, askUserTool, assertValidMessageSequence, bashTool, buildExtractionPrompt, buildMemorySystemPromptSection, buildProjectContextSection, buildSystemPrompt, calculateCost, classifyCommand, classifyError, classifyPermission, codingAgent, commandWritesGitInternals, compactConversation, compressImageBufferWithTokenLimit, contentMatchesRule, contentToString, countOccurrences, createCacheSafeParams, createImageMetadataText, createSkillTool, createStructuredOutputTool, createToolSearchTool, createWorktree, detectGitOperations, detectTurnInterruption, editFileTool, enterPlanModeTool, enterWorktreeTool, estimateCompactionSavings, estimateMessagesTokens, estimateTokens, exitPlanModeTool, exitWorktreeTool, extractCommandName, extractMemories, filterActiveContextFiles, filterOrphanedThinkingMessages, filterUnresolvedToolUses, filterWhitespaceOnlyAssistantMessages, findActualString, findGitRoot, findModelPricing, formatDeferredToolLine, generateMissingToolResults, getActiveSkills, getAutoCompactThreshold, getContextWindowForModel, getEffectiveContextWindow, getLastCacheSafeParams, getMatchingRules, getRetryDelay, getWorktreeChanges, globTool, grepTool, groupMessagesByTurn, hasGitIndexLockError, hasImageContent, isDeferredTool, isGitInternalPath, isPathInWorkingDirectories, isRetryable, listWorktrees, loadProjectContext, loadSkills, looksLikeBareRepo, matchSimpleGlob, maybeResizeAndDownsampleImageBlock, maybeResizeAndDownsampleImageBuffer, normalizeContent, normalizeMessagesForAPI, normalizeQuotes, notebookEditTool, parseAllowedTools, parseFrontmatter, parsePaths, partitionToolCalls, planningAgent, preserveQuoteStyle, readFileTool, registerContextWindows, removeWorktree, resolvePermission, resolveToolFlag, restoreSession, reviewAgent, runNotificationHooks, runPostToolUseFailureHooks, runPostToolUseHooks, runPreToolUseHooks, runToolsBatched, sanitizeForResume, sanitizeWorktreeSlug, saveCacheSafeParams, searchToolsWithKeywords, stripImageContent, stripTrailingWhitespace, taskCreateTool, taskGetTool, taskListTool, taskUpdateTool, tokenCountWithEstimation, toolMatchesRule, truncateHeadForPTLRetry, truncateIndex, webFetchTool, withRetry, writeFileTool };
1403
+ export { AIProvider, API_IMAGE_MAX_BASE64_SIZE, Agent, AssistantMessage, AutoModeConfig, AutoTitleConfig, type CacheSafeParams, CannotRetryError, ChatCompletionUsage, ChatMessage, ChatStreamChunk, type ClassifiedError, type ClassifierResult, type CommandClassification, CommandResult, type CompactOptions, type CompressedImageResult, ContentPart, ContentReplacementRecord, ContextFile, ContextScope, DEFAULT_PRICING, type DenialLimits, type DenialState, DenialTracker, ExecOptions, type ExtractMemoriesResult, FileCheckpointSnapshot, FileEntry, FileMemoryProvider, FileStat, type FrontmatterData, type GitOperationEvent, type GitOperationType, HookDefinition, HookEvent, HookInput, IMAGE_EXTENSIONS, IMAGE_MAX_HEIGHT, IMAGE_MAX_WIDTH, type ImageDimensions, InProcessBackend, type IndexTruncation, InvariantViolation, JsonSchemaOutputFormat, LocalComputer, type LocalComputerOptions, LocalFs, type LocalFsOptions, Mailbox, McpServerConfig, MemoryEntry, MemoryProvider, ModelPricing, NoopSpan, NoopTracer, OTelTracer, type ParsedFrontmatter, PermissionBehavior, PermissionContext, PermissionDecision, PermissionHandler, PermissionRule, PermissionUpdate, PostToolUseFailureHookInput, PostToolUseFailureHookOutput, PostToolUseHookInput, PostToolUseHookOutput, PreToolUseHookInput, PreToolUseHookOutput, type PresetOptions, ProjectContextConfig, ReadOptions, type ResizedImage, type ResolvePermissionOptions, type ResumePayload, RetryConfig, RetryContext, RetryEngineOptions, STRUCTURED_OUTPUT_TOOL_NAME, Sandbox, type SanitizeResult, SessionStorage, type ShellSafetyConfig, SkillDefinition, Span, SpanAttributeValue, SpanOptions, SpanStatusCode, StoredCostState, StreamEvent, type StreamingExecResult, StreamingToolExecutor, type StreamingToolExecutorFn, type SwarmBackend, type SwarmConfig, type SwarmEvents, SwarmManager, type SwarmMember, type SwarmMemberConfig, type SwarmMemberStatus, type SwarmMessage, type SwarmStatus, TOOL_SEARCH_NAME, ThinkingConfig, ThreadConfig, Tool, ToolCallContent, type ToolCallExecResult, type ToolCallExecutor, ToolResult as ToolCallResult, ToolContext, ToolDefinition, ToolRegistry, ToolResultMessage, ToolResultOverflowEntry, type ToolWithDeferral, Tracer, type TurnInterruption, UsageRecord, type UserInputHandler, VirtualComputer, VirtualFs, type WorktreeInfo, activateContextForPaths, activateSkillsForPaths, agentTool, all, applyPermissionUpdate, applyPermissionUpdates, askUserTool, assertValidMessageSequence, bashTool, buildExtractionPrompt, buildMemorySystemPromptSection, buildProjectContextSection, buildSystemPrompt, calculateCost, classifyCommand, classifyError, classifyPermission, codingAgent, commandWritesGitInternals, compactConversation, compressImageBufferWithTokenLimit, contentMatchesRule, contentToString, countOccurrences, createCacheSafeParams, createImageMetadataText, createSkillTool, createStructuredOutputTool, createToolSearchTool, createWorktree, detectGitOperations, detectTurnInterruption, editFileTool, enterPlanModeTool, enterWorktreeTool, estimateCompactionSavings, estimateMessagesTokens, estimateTokens, exitPlanModeTool, exitWorktreeTool, extractCommandName, extractMemories, filterActiveContextFiles, filterOrphanedThinkingMessages, filterUnresolvedToolUses, filterWhitespaceOnlyAssistantMessages, findActualString, findGitRoot, findModelPricing, formatDeferredToolLine, generateMissingToolResults, getActiveSkills, getAutoCompactThreshold, getContextWindowForModel, getEffectiveContextWindow, getLastCacheSafeParams, getMatchingRules, getRetryDelay, getWorktreeChanges, globTool, grepTool, groupMessagesByTurn, hasGitIndexLockError, hasImageContent, isDeferredTool, isGitInternalPath, isPathInWorkingDirectories, isRetryable, listWorktrees, loadProjectContext, loadSkills, looksLikeBareRepo, matchSimpleGlob, maybeResizeAndDownsampleImageBlock, maybeResizeAndDownsampleImageBuffer, normalizeContent, normalizeMessagesForAPI, normalizeQuotes, notebookEditTool, parseAllowedTools, parseFrontmatter, parsePaths, partitionToolCalls, planningAgent, preserveQuoteStyle, readFileTool, registerContextWindows, removeWorktree, resolvePermission, resolveToolFlag, restoreSession, reviewAgent, runNotificationHooks, runPostToolUseFailureHooks, runPostToolUseHooks, runPreToolUseHooks, runToolsBatched, sanitizeForResume, sanitizeWorktreeSlug, saveCacheSafeParams, searchToolsWithKeywords, stripImageContent, stripTrailingWhitespace, taskCreateTool, taskGetTool, taskListTool, taskUpdateTool, tokenCountWithEstimation, toolMatchesRule, truncateHeadForPTLRetry, truncateIndex, webFetchTool, withRetry, writeFileTool };
package/dist/index.js CHANGED
@@ -4,21 +4,14 @@ import {
4
4
  COMPACTABLE_TOOLS,
5
5
  CannotRetryError,
6
6
  CostTracker,
7
+ DEFAULT_AUTO_TITLE_MAX_INPUT_CHARS,
8
+ DEFAULT_AUTO_TITLE_SYSTEM_PROMPT,
7
9
  DEFAULT_PRICING,
8
10
  DEFAULT_RETRY_CONFIG,
9
11
  DenialTracker,
10
- DockerComputer,
11
- DockerFs,
12
- DockerSandbox,
13
- E2BComputer,
14
- E2BFs,
15
- E2BSandbox,
16
12
  FileCheckpointManager,
17
13
  FileMemoryProvider,
18
14
  FileStateCache,
19
- FreestyleComputer,
20
- FreestyleFs,
21
- FreestyleSandbox,
22
15
  InProcessBackend,
23
16
  InvariantViolation,
24
17
  LocalComputer,
@@ -30,10 +23,8 @@ import {
30
23
  OTelTracer,
31
24
  STRUCTURED_OUTPUT_TOOL_NAME,
32
25
  SandboxedLocalComputer,
26
+ SessionStorage,
33
27
  SpanStatusCode,
34
- SpritesComputer,
35
- SpritesFs,
36
- SpritesSandbox,
37
28
  StreamingToolExecutor,
38
29
  SwarmManager,
39
30
  TaskStore,
@@ -77,12 +68,15 @@ import {
77
68
  exitPlanModeTool,
78
69
  exitWorktreeTool,
79
70
  extractMemories,
71
+ extractTitleFromResponse,
72
+ extractTitleSeedText,
80
73
  filterActiveContextFiles,
81
74
  filterOrphanedThinkingMessages,
82
75
  filterUnresolvedToolUses,
83
76
  filterWhitespaceOnlyAssistantMessages,
84
77
  findGitRoot,
85
78
  findModelPricing,
79
+ generateAutoTitle,
86
80
  generateMissingToolResults,
87
81
  getActiveSkills,
88
82
  getLastCacheSafeParams,
@@ -95,6 +89,7 @@ import {
95
89
  loadSkills,
96
90
  microcompactMessages,
97
91
  normalizeMessagesForAPI,
92
+ normalizeTitle,
98
93
  parseAllowedTools,
99
94
  parseFrontmatter,
100
95
  parsePaths,
@@ -126,30 +121,18 @@ import {
126
121
  tryReactiveCompact,
127
122
  webSearchToolPlaceholder,
128
123
  withRetry
129
- } from "./chunk-4HW6LN6D.js";
130
- import {
131
- applySnipRemovals,
132
- projectSnippedView,
133
- snipMessagesByUuids
134
- } from "./chunk-42PHHZUA.js";
124
+ } from "./chunk-6MMYCGJQ.js";
135
125
  import {
136
126
  DEFAULT_MODELS,
137
127
  SUPPORTED_PROVIDERS,
138
128
  detectProvider,
139
129
  resolveProvider
140
- } from "./chunk-5JN4SPI7.js";
141
- import {
142
- getAutoCompactThreshold,
143
- getContextWindowForModel,
144
- getEffectiveContextWindow,
145
- getMessageCacheBreakpointIndex,
146
- registerContextWindows,
147
- sortToolDefinitionsForCache
148
- } from "./chunk-HEQQQGK5.js";
130
+ } from "./chunk-7IQCQI2G.js";
149
131
  import {
150
- ChatStreamError
151
- } from "./chunk-L3L3FG5T.js";
152
- import "./chunk-3HEYCV26.js";
132
+ applySnipRemovals,
133
+ projectSnippedView,
134
+ snipMessagesByUuids
135
+ } from "./chunk-42PHHZUA.js";
153
136
  import {
154
137
  RULE_SOURCE_PRECEDENCE,
155
138
  TOOL_SEARCH_NAME,
@@ -187,12 +170,7 @@ import {
187
170
  toolMatchesRule,
188
171
  webFetchTool,
189
172
  writeFileTool
190
- } from "./chunk-HL6JCRZJ.js";
191
- import {
192
- formatZodValidationError,
193
- registerZodToJsonSchema,
194
- zodToJsonSchema
195
- } from "./chunk-3SK5GCI6.js";
173
+ } from "./chunk-XZN4QZLK.js";
196
174
  import {
197
175
  API_IMAGE_MAX_BASE64_SIZE,
198
176
  IMAGE_EXTENSIONS,
@@ -209,6 +187,23 @@ import {
209
187
  normalizeNameForMCP,
210
188
  parseMcpToolName
211
189
  } from "./chunk-4SQA2UCV.js";
190
+ import {
191
+ formatZodValidationError,
192
+ registerZodToJsonSchema,
193
+ zodToJsonSchema
194
+ } from "./chunk-3SK5GCI6.js";
195
+ import {
196
+ getAutoCompactThreshold,
197
+ getContextWindowForModel,
198
+ getEffectiveContextWindow,
199
+ getMessageCacheBreakpointIndex,
200
+ registerContextWindows,
201
+ sortToolDefinitionsForCache
202
+ } from "./chunk-HEQQQGK5.js";
203
+ import {
204
+ ChatStreamError
205
+ } from "./chunk-CCM2AXZG.js";
206
+ import "./chunk-3HEYCV26.js";
212
207
  import {
213
208
  contentToString,
214
209
  hasImageContent,
@@ -224,22 +219,15 @@ export {
224
219
  CannotRetryError,
225
220
  ChatStreamError,
226
221
  CostTracker,
222
+ DEFAULT_AUTO_TITLE_MAX_INPUT_CHARS,
223
+ DEFAULT_AUTO_TITLE_SYSTEM_PROMPT,
227
224
  DEFAULT_MODELS,
228
225
  DEFAULT_PRICING,
229
226
  DEFAULT_RETRY_CONFIG,
230
227
  DenialTracker,
231
- DockerComputer,
232
- DockerFs,
233
- DockerSandbox,
234
- E2BComputer,
235
- E2BFs,
236
- E2BSandbox,
237
228
  FileCheckpointManager,
238
229
  FileMemoryProvider,
239
230
  FileStateCache,
240
- FreestyleComputer,
241
- FreestyleFs,
242
- FreestyleSandbox,
243
231
  IMAGE_EXTENSIONS,
244
232
  IMAGE_MAX_HEIGHT,
245
233
  IMAGE_MAX_WIDTH,
@@ -256,10 +244,8 @@ export {
256
244
  STRUCTURED_OUTPUT_TOOL_NAME,
257
245
  SUPPORTED_PROVIDERS,
258
246
  SandboxedLocalComputer,
247
+ SessionStorage,
259
248
  SpanStatusCode,
260
- SpritesComputer,
261
- SpritesFs,
262
- SpritesSandbox,
263
249
  StreamingToolExecutor,
264
250
  SwarmManager,
265
251
  TOOL_SEARCH_NAME,
@@ -322,6 +308,8 @@ export {
322
308
  exitWorktreeTool,
323
309
  extractCommandName,
324
310
  extractMemories,
311
+ extractTitleFromResponse,
312
+ extractTitleSeedText,
325
313
  filterActiveContextFiles,
326
314
  filterOrphanedThinkingMessages,
327
315
  filterUnresolvedToolUses,
@@ -331,6 +319,7 @@ export {
331
319
  findModelPricing,
332
320
  formatDeferredToolLine,
333
321
  formatZodValidationError,
322
+ generateAutoTitle,
334
323
  generateMissingToolResults,
335
324
  getActiveSkills,
336
325
  getAutoCompactThreshold,
@@ -363,6 +352,7 @@ export {
363
352
  normalizeMessagesForAPI,
364
353
  normalizeNameForMCP,
365
354
  normalizeQuotes,
355
+ normalizeTitle,
366
356
  notebookEditTool,
367
357
  parseAllowedTools,
368
358
  parseFrontmatter,
@@ -1,6 +1,7 @@
1
- import { L as LspServerConfig, a as LspServerState, b as LspDiagnostic, T as Tool } from '../types-RPKUTu1k.js';
2
- export { D as DiagnosticRegistry, c as LspLocation, d as LspOperation, e as LspServerManager, f as LspSymbol } from '../types-RPKUTu1k.js';
3
- import '../types-LrU4LRmX.js';
1
+ import { L as LspServerConfig, a as LspServerState, b as LspDiagnostic, T as Tool } from '../types-DhXwOQwD.js';
2
+ export { D as DiagnosticRegistry, c as LspLocation, d as LspOperation, e as LspServerManager, f as LspSymbol } from '../types-DhXwOQwD.js';
3
+ import '../types-kiGBF35b.js';
4
+ import '../computer-BPdxSo6X.js';
4
5
  import '../types-CD0rUKKT.js';
5
6
 
6
7
  interface ServerCapabilities {
@@ -1,14 +1,15 @@
1
- import { M as McpClientManager } from '../server-CHMxuWKq.js';
2
- export { a as McpClientManagerOptions, b as McpServerOptions, c as buildMcpToolName, d as createMcpServer, g as getMcpPrefix, n as normalizeNameForMCP, p as parseMcpToolName } from '../server-CHMxuWKq.js';
1
+ import { M as McpClientManager } from '../server-BzNGKTP6.js';
2
+ export { a as McpClientManagerOptions, b as McpServerOptions, c as buildMcpToolName, d as createMcpServer, g as getMcpPrefix, n as normalizeNameForMCP, p as parseMcpToolName } from '../server-BzNGKTP6.js';
3
3
  import { T as TokenStorage, O as OAuthTokenData, a as OAuthProviderOptions } from '../types-2kTLUCnD.js';
4
4
  export { b as McpConfig, c as McpConnection, d as McpHttpServerConfig, e as McpOAuthConfig, M as McpServerConfig, f as McpSseServerConfig, g as McpStdioServerConfig, h as McpToolInfo, i as McpWebSocketServerConfig } from '../types-2kTLUCnD.js';
5
5
  import { OAuthClientProvider, OAuthDiscoveryState } from '@modelcontextprotocol/sdk/client/auth.js';
6
6
  export { OAuthClientProvider, OAuthDiscoveryState } from '@modelcontextprotocol/sdk/client/auth.js';
7
7
  import { OAuthClientMetadata, OAuthClientInformationMixed, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js';
8
8
  export { OAuthClientInformation, OAuthClientInformationFull, OAuthClientInformationMixed, OAuthClientMetadata, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js';
9
- import { T as Tool } from '../types-RPKUTu1k.js';
9
+ import { T as Tool } from '../types-DhXwOQwD.js';
10
10
  import '@modelcontextprotocol/sdk/client/index.js';
11
- import '../types-LrU4LRmX.js';
11
+ import '../types-kiGBF35b.js';
12
+ import '../computer-BPdxSo6X.js';
12
13
  import '../types-CD0rUKKT.js';
13
14
 
14
15
  /**
package/dist/mcp/index.js CHANGED
@@ -11,8 +11,7 @@ import {
11
11
  } from "../chunk-BZSFUEWM.js";
12
12
  import {
13
13
  ToolRegistry
14
- } from "../chunk-HL6JCRZJ.js";
15
- import "../chunk-3SK5GCI6.js";
14
+ } from "../chunk-XZN4QZLK.js";
16
15
  import "../chunk-5GEX6ZSB.js";
17
16
  import {
18
17
  buildMcpToolName,
@@ -20,6 +19,7 @@ import {
20
19
  normalizeNameForMCP,
21
20
  parseMcpToolName
22
21
  } from "../chunk-4SQA2UCV.js";
22
+ import "../chunk-3SK5GCI6.js";
23
23
  import {
24
24
  contentToString
25
25
  } from "../chunk-JACGEMTF.js";
@@ -7,7 +7,7 @@ import {
7
7
  SUPPORTED_PROVIDERS,
8
8
  detectProvider,
9
9
  resolveProvider
10
- } from "./chunk-5JN4SPI7.js";
10
+ } from "./chunk-7IQCQI2G.js";
11
11
  import "./chunk-DGUM43GV.js";
12
12
  export {
13
13
  DEFAULT_MODELS,
@@ -17,4 +17,4 @@ export {
17
17
  isOllamaRunning,
18
18
  ollamaBaseURL
19
19
  };
20
- //# sourceMappingURL=provider-factory-KCLIF34X.js.map
20
+ //# sourceMappingURL=provider-factory-TUHU3DIG.js.map
@@ -1,5 +1,5 @@
1
- import { A as AIProvider, C as ChatParams, a as ChatStreamChunk } from '../types-LrU4LRmX.js';
2
- import { C as CacheControlConfig } from '../cache-DsRqxx6v.js';
1
+ import { A as AIProvider, C as ChatParams, a as ChatStreamChunk } from '../types-kiGBF35b.js';
2
+ import { C as CacheControlConfig } from '../cache-BlBwXXPS.js';
3
3
 
4
4
  interface AnthropicProviderOptions {
5
5
  apiKey: string;
@@ -10,7 +10,7 @@ interface AnthropicProviderOptions {
10
10
  }
11
11
  declare class AnthropicProvider implements AIProvider {
12
12
  private client;
13
- private defaultModel;
13
+ readonly defaultModel: string;
14
14
  private cacheConfig;
15
15
  constructor(opts: AnthropicProviderOptions);
16
16
  chat(params: ChatParams): AsyncIterable<ChatStreamChunk>;
@@ -1,8 +1,9 @@
1
1
  import {
2
+ DEFAULT_ANTHROPIC_MODEL,
2
3
  streamAnthropicChat
3
- } from "../chunk-EKOGVTBT.js";
4
+ } from "../chunk-ZXSDKBYB.js";
4
5
  import "../chunk-HEQQQGK5.js";
5
- import "../chunk-L3L3FG5T.js";
6
+ import "../chunk-CCM2AXZG.js";
6
7
  import "../chunk-DGUM43GV.js";
7
8
 
8
9
  // src/providers/anthropic.ts
@@ -17,7 +18,7 @@ var AnthropicProvider = class {
17
18
  baseURL: opts.baseURL,
18
19
  maxRetries: 0
19
20
  });
20
- this.defaultModel = opts.model ?? "claude-opus-4.6";
21
+ this.defaultModel = opts.model ?? DEFAULT_ANTHROPIC_MODEL;
21
22
  this.cacheConfig = opts.cacheControl;
22
23
  }
23
24
  async *chat(params) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/providers/anthropic.ts"],"sourcesContent":["import Anthropic from \"@anthropic-ai/sdk\";\nimport type {\n AIProvider,\n ChatParams,\n ChatStreamChunk,\n} from \"./types.js\";\nimport type { CacheControlConfig } from \"./cache.js\";\nimport { streamAnthropicChat, type AnthropicStreamClient } from \"./anthropic-shared.js\";\n\nexport interface AnthropicProviderOptions {\n apiKey: string;\n baseURL?: string;\n model?: string;\n /** When enabled, injects cache_control markers on system prompt, tools, and messages. */\n cacheControl?: CacheControlConfig;\n}\n\nexport class AnthropicProvider implements AIProvider {\n private client: Anthropic;\n private defaultModel: string;\n private cacheConfig: CacheControlConfig | undefined;\n\n constructor(opts: AnthropicProviderOptions) {\n this.client = new Anthropic({\n apiKey: opts.apiKey,\n baseURL: opts.baseURL,\n maxRetries: 0,\n });\n this.defaultModel = opts.model ?? \"claude-opus-4.6\";\n this.cacheConfig = opts.cacheControl;\n }\n\n async *chat(params: ChatParams): AsyncIterable<ChatStreamChunk> {\n yield* streamAnthropicChat(\n this.client as unknown as AnthropicStreamClient,\n params,\n this.defaultModel,\n this.cacheConfig,\n );\n }\n}\n"],"mappings":";;;;;;;;AAAA,OAAO,eAAe;AAiBf,IAAM,oBAAN,MAA8C;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EAER,YAAY,MAAgC;AAC1C,SAAK,SAAS,IAAI,UAAU;AAAA,MAC1B,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,MACd,YAAY;AAAA,IACd,CAAC;AACD,SAAK,eAAe,KAAK,SAAS;AAClC,SAAK,cAAc,KAAK;AAAA,EAC1B;AAAA,EAEA,OAAO,KAAK,QAAoD;AAC9D,WAAO;AAAA,MACL,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/providers/anthropic.ts"],"sourcesContent":["import Anthropic from \"@anthropic-ai/sdk\";\nimport type {\n AIProvider,\n ChatParams,\n ChatStreamChunk,\n} from \"./types.js\";\nimport type { CacheControlConfig } from \"./cache.js\";\nimport {\n streamAnthropicChat,\n type AnthropicStreamClient,\n DEFAULT_ANTHROPIC_MODEL,\n} from \"./anthropic-shared.js\";\n\nexport interface AnthropicProviderOptions {\n apiKey: string;\n baseURL?: string;\n model?: string;\n /** When enabled, injects cache_control markers on system prompt, tools, and messages. */\n cacheControl?: CacheControlConfig;\n}\n\nexport class AnthropicProvider implements AIProvider {\n private client: Anthropic;\n readonly defaultModel: string;\n private cacheConfig: CacheControlConfig | undefined;\n\n constructor(opts: AnthropicProviderOptions) {\n this.client = new Anthropic({\n apiKey: opts.apiKey,\n baseURL: opts.baseURL,\n maxRetries: 0,\n });\n this.defaultModel = opts.model ?? DEFAULT_ANTHROPIC_MODEL;\n this.cacheConfig = opts.cacheControl;\n }\n\n async *chat(params: ChatParams): AsyncIterable<ChatStreamChunk> {\n yield* streamAnthropicChat(\n this.client as unknown as AnthropicStreamClient,\n params,\n this.defaultModel,\n this.cacheConfig,\n );\n }\n}\n"],"mappings":";;;;;;;;;AAAA,OAAO,eAAe;AAqBf,IAAM,oBAAN,MAA8C;AAAA,EAC3C;AAAA,EACC;AAAA,EACD;AAAA,EAER,YAAY,MAAgC;AAC1C,SAAK,SAAS,IAAI,UAAU;AAAA,MAC1B,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,MACd,YAAY;AAAA,IACd,CAAC;AACD,SAAK,eAAe,KAAK,SAAS;AAClC,SAAK,cAAc,KAAK;AAAA,EAC1B;AAAA,EAEA,OAAO,KAAK,QAAoD;AAC9D,WAAO;AAAA,MACL,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP;AAAA,EACF;AACF;","names":[]}