zidane 6.5.2 → 6.5.4
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/dist/{acp-565X8nVP.js → acp-CIpD8UIw.js} +2 -2
- package/dist/{acp-565X8nVP.js.map → acp-CIpD8UIw.js.map} +1 -1
- package/dist/acp-cli.js +5 -5
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-CvO7UOxv.js → agent-8kfGIDb_.js} +2 -2
- package/dist/{agent-CvO7UOxv.js.map → agent-8kfGIDb_.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-Dov2mC5e.js → anthropic-qaw8XAc9.js} +2 -2
- package/dist/{anthropic-Dov2mC5e.js.map → anthropic-qaw8XAc9.js.map} +1 -1
- package/dist/{auth-B8ZuBcKC.js → auth-BLy7X1SY.js} +8 -5
- package/dist/{auth-B8ZuBcKC.js.map → auth-BLy7X1SY.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +20 -15
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +3 -3
- package/dist/{context-transport-ClvadrlH.js → context-transport-Bco9Wo0b.js} +3 -3
- package/dist/{context-transport-ClvadrlH.js.map → context-transport-Bco9Wo0b.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/daytona.d.ts.map +1 -1
- package/dist/contexts/daytona.js +5 -2
- package/dist/contexts/daytona.js.map +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/cursor-iojRXHF9.js +139 -0
- package/dist/cursor-iojRXHF9.js.map +1 -0
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-DfERTrql.d.ts → index-BSNr0OQn.d.ts} +20 -3
- package/dist/index-BSNr0OQn.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/{login-Cl6ML2XN.js → login-D3CKhgbI.js} +2 -2
- package/dist/{login-Cl6ML2XN.js.map → login-D3CKhgbI.js.map} +1 -1
- package/dist/{mcp-DdntU47g.js → mcp-D9fqOQo5.js} +3 -3
- package/dist/{mcp-DdntU47g.js.map → mcp-D9fqOQo5.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{oauth-bkEOybqm.js → oauth-ZebH9NHb.js} +70 -11
- package/dist/oauth-ZebH9NHb.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/pkce-t8BcPyEi.js +30 -0
- package/dist/pkce-t8BcPyEi.js.map +1 -0
- package/dist/plugins.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +68 -1
- package/dist/providers/xai.js.map +1 -0
- package/dist/providers-Bxs-XHir.js +137 -0
- package/dist/providers-Bxs-XHir.js.map +1 -0
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +5 -5
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/rolldown-runtime-BhDjJH2R.js +15 -0
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{stdio-BQeCMmuK.js → stdio-DPpBDPx5.js} +13 -4
- package/dist/{stdio-BQeCMmuK.js.map → stdio-DPpBDPx5.js.map} +1 -1
- package/dist/{stdio-loader-BN1l1ZAG.js → stdio-loader-CI4sPFve.js} +11 -6
- package/dist/stdio-loader-CI4sPFve.js.map +1 -0
- package/dist/{tool-formatters-B2gBbKaS.d.ts → tool-formatters-BfKqWm5N.d.ts} +3 -3
- package/dist/{tool-formatters-B2gBbKaS.d.ts.map → tool-formatters-BfKqWm5N.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-CmFKUw8M.js → transcript-anchors-Bv8HQ3S2.js} +36 -31
- package/dist/transcript-anchors-Bv8HQ3S2.js.map +1 -0
- package/dist/{transcript-anchors-CeIxhKP7.d.ts → transcript-anchors-CNqDbrc9.d.ts} +2 -2
- package/dist/{transcript-anchors-CeIxhKP7.d.ts.map → transcript-anchors-CNqDbrc9.d.ts.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +19 -13
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-Dyv3Z-Ff.d.ts → turn-operations-CnIpcenJ.d.ts} +3 -3
- package/dist/{turn-operations-Dyv3Z-Ff.d.ts.map → turn-operations-CnIpcenJ.d.ts.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{xai-Du6Wfnlb.js → xai-DILdFGzN.js} +11 -94
- package/dist/xai-DILdFGzN.js.map +1 -0
- package/docs/RESTATE.md +7 -0
- package/package.json +18 -17
- package/dist/index-DfERTrql.d.ts.map +0 -1
- package/dist/oauth-bkEOybqm.js.map +0 -1
- package/dist/providers-B6mFe7OD.js +0 -264
- package/dist/providers-B6mFe7OD.js.map +0 -1
- package/dist/stdio-loader-BN1l1ZAG.js.map +0 -1
- package/dist/transcript-anchors-CmFKUw8M.js.map +0 -1
- package/dist/xai-Du6Wfnlb.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers-Bxs-XHir.js","names":["BASE_URL","getApiKey"],"sources":["../src/providers/cursor.ts","../src/providers/mistral.ts","../src/providers/zai.ts"],"sourcesContent":["import type { Provider, StreamCallbacks } from '.'\nimport { CURSOR_OAUTH_PROVIDER_ID } from '../chat/oauth-page/cursor'\nimport { resolveOAuthApiKey } from './oauth'\nimport { openaiCompat } from './openai-compat'\n\n/**\n * Cursor provider (OAuth).\n *\n * Auth is fully wired: `bun run auth --cursor` (or the TUI wizard) logs in via\n * Cursor's poll-based PKCE flow and persists credentials; this provider resolves\n * + refreshes the OAuth token on every turn via {@link resolveOAuthApiKey}.\n *\n * Inference is **not** wired yet. Cursor does not expose an OpenAI-compatible\n * HTTP endpoint — it speaks a protobuf/Connect agent protocol over HTTP/2 to\n * `api2.cursor.sh`. Implementing `stream()` requires porting that transport\n * (generated protobuf schemas + an HTTP/2 streaming client) in-process, which\n * is intentionally left as a follow-up. Until then `stream()` resolves the\n * token (proving auth works) and then throws a clear, actionable error.\n *\n * The `openaiCompat` base supplies the message-format helpers (`formatTools`,\n * `userMessage`, `toolResultsMessage`, …) so the provider satisfies the full\n * `Provider` contract and slots into the registry; only `stream` is overridden.\n */\nexport interface CursorParams {\n /** Bypass OAuth resolution with an explicit token (mainly for tests). */\n apiKey?: string\n defaultModel?: string\n /**\n * Extra HTTP headers for the eventual Cursor transport. Accepted for API\n * parity with the other providers and forwarded to the openai-compat base,\n * but inert until Cursor inference is implemented (the `stream` override\n * currently throws before any request is made).\n */\n extraHeaders?: Record<string, string>\n}\n\nconst DEFAULT_MODEL = 'claude-4.6-sonnet'\n\nconst NOT_IMPLEMENTED_MESSAGE\n = 'Cursor OAuth login works, but inference over Cursor is not implemented yet. '\n + 'Cursor uses a protobuf/HTTP-2 agent protocol (not an OpenAI-compatible API), '\n + 'so the streaming transport still needs to be ported. Use another provider for now.'\n\nexport function cursor(params?: CursorParams): Provider {\n const defaultModel = params?.defaultModel || DEFAULT_MODEL\n\n // Base only provides the format/serialization methods; `baseURL` is never\n // hit because we override `stream` below.\n const base = openaiCompat({\n name: 'cursor',\n apiKey: params?.apiKey ?? 'oauth',\n baseURL: 'https://api2.cursor.sh',\n defaultModel,\n capabilities: { vision: true, imageInToolResult: false },\n extraHeaders: params?.extraHeaders,\n })\n\n return {\n ...base,\n meta: { ...base.meta, defaultModel },\n async stream(options, callbacks: StreamCallbacks) {\n // Resolve (and lazily refresh) the OAuth token so auth failures surface\n // here with the right remediation, distinct from the not-implemented path.\n await resolveOAuthApiKey(\n {\n provider: 'cursor',\n providerId: CURSOR_OAUTH_PROVIDER_ID,\n params,\n missingError: 'No Cursor credentials found. Run `bun run auth --cursor` first.',\n refreshError: reason => `Cursor OAuth token refresh failed. Run \\`bun run auth --cursor\\` again. ${reason}`,\n },\n callbacks,\n )\n void options\n throw new Error(NOT_IMPLEMENTED_MESSAGE)\n },\n }\n}\n","import type { Provider, ProviderCapabilities } from '.'\nimport type { ThinkingLevel } from '../types'\nimport { openaiCompat } from './openai-compat'\n\n// Mistral La Plateforme — OpenAI-compatible `/v1/chat/completions`. Model ids\n// are plain slugs (`mistral-medium-latest`, `devstral-2512`, …). Reasoning is\n// NOT a separate wire field here: with `reasoning_effort: 'high'` the response\n// `content` becomes a list of `thinking` / `text` chunks (handled by\n// `openaiCompat`'s content-chunk path), and with `'none'` it stays a plain\n// string. See https://docs.mistral.ai/studio-api/conversations/reasoning.\nconst BASE_URL = 'https://api.mistral.ai/v1'\n\nexport interface MistralParams {\n apiKey?: string\n defaultModel?: string\n /**\n * Override the base URL — e.g. point at a regional endpoint or a gateway in\n * front of La Plateforme.\n */\n baseURL?: string\n /**\n * Provider capability flags. The `mistral-medium` / `mistral-large` /\n * `pixtral` families accept `image_url` parts — default:\n * `{ vision: true, imageInToolResult: false }`. Set `vision: false` when\n * pinning a text-only model (`codestral`, `devstral`, `ministral`).\n */\n capabilities?: ProviderCapabilities\n /**\n * Extra HTTP headers sent on every request. Forwarded to the underlying\n * {@link openaiCompat} client.\n */\n extraHeaders?: Record<string, string>\n}\n\nfunction getApiKey(params?: MistralParams): string {\n // Resolution order aligned with the other providers: explicit > env > fail.\n if (typeof params?.apiKey === 'string' && params.apiKey.length > 0)\n return params.apiKey\n\n if (process.env.MISTRAL_API_KEY)\n return process.env.MISTRAL_API_KEY\n\n throw new Error('No Mistral API key found. Pass `apiKey` or set MISTRAL_API_KEY in your environment.')\n}\n\n/**\n * Model ids that accept `reasoning_effort`. Mistral rejects unknown request\n * fields on some routes, so the knob is sent only for the families that\n * document it (`mistral-small-*`, `mistral-medium-3.5` / `-2604`, and the\n * deprecated-but-live `magistral-*`); `codestral` / `devstral` / `ministral`\n * requests stay byte-identical to what they were without this planner.\n */\nconst REASONING_MODELS = /^(?:magistral-|mistral-small-|mistral-medium-(?:3\\.5|2604))/\n\n/**\n * Map zidane's thinking level to Mistral's `reasoning_effort`. Only the two\n * documented values are emitted — `'none'` (thinking chunk omitted, `content`\n * stays a plain string) and `'high'` (full thinking chunk). `adaptive` sends\n * nothing so the model's own default applies.\n *\n * Exported for tests.\n */\nexport function planMistralReasoning(\n ctx: { model: string, thinking?: ThinkingLevel },\n): Record<string, unknown> | undefined {\n if (!REASONING_MODELS.test(ctx.model))\n return undefined\n if (ctx.thinking === undefined || ctx.thinking === 'adaptive')\n return undefined\n return { reasoning_effort: ctx.thinking === 'off' ? 'none' : 'high' }\n}\n\n/**\n * Mistral provider (La Plateforme).\n *\n * Thin wrapper around {@link openaiCompat} with Mistral-specific defaults\n * (base URL, default model, `reasoning_effort` planner). `supportsReasoning`\n * stays off: Mistral carries thinking inside `content` chunks rather than a\n * `reasoning_content` field, so there is nothing to echo back upstream —\n * thinking streams to the UI and is dropped from subsequent requests.\n */\nexport function mistral(params?: MistralParams): Provider {\n return openaiCompat({\n name: 'mistral',\n apiKey: getApiKey(params),\n baseURL: params?.baseURL || BASE_URL,\n defaultModel: params?.defaultModel || 'mistral-medium-latest',\n capabilities: params?.capabilities ?? { vision: true, imageInToolResult: false },\n planReasoningRequest: planMistralReasoning,\n extraHeaders: params?.extraHeaders,\n })\n}\n","import type { Provider, ProviderCapabilities } from '.'\nimport type { ThinkingLevel } from '../types'\nimport { openaiCompat } from './openai-compat'\n\n// Z.ai (Zhipu) GLM Open Platform — OpenAI-compatible endpoint. Model ids are\n// plain lowercase slugs (`glm-4.7`, `glm-4.7-flash`, …), reasoning streams in\n// the `reasoning_content` delta field, and thinking is toggled via an\n// `extra_body.thinking` object rather than a `reasoning_effort` string.\n// See https://docs.z.ai/guides/develop/http/introduction and\n// https://docs.z.ai/guides/capabilities/thinking-mode.\nconst BASE_URL = 'https://api.z.ai/api/paas/v4'\n\nexport interface ZaiParams {\n apiKey?: string\n defaultModel?: string\n /**\n * Override the base URL — e.g. point at the dedicated Coding Plan endpoint\n * instead of the standard API endpoint.\n */\n baseURL?: string\n /**\n * Provider capability flags. GLM text models are text-only — default:\n * `{ vision: false, imageInToolResult: false }`.\n */\n capabilities?: ProviderCapabilities\n /**\n * Extra HTTP headers sent on every request. Forwarded to the underlying\n * {@link openaiCompat} client.\n */\n extraHeaders?: Record<string, string>\n}\n\nfunction getApiKey(params?: ZaiParams): string {\n // Resolution order aligned with the other providers: explicit > env > fail.\n if (typeof params?.apiKey === 'string' && params.apiKey.length > 0)\n return params.apiKey\n\n if (process.env.ZAI_API_KEY)\n return process.env.ZAI_API_KEY\n\n throw new Error('No Z.ai API key found. Pass `apiKey` or set ZAI_API_KEY in your environment.')\n}\n\n/**\n * Map zidane's thinking level to Z.ai's `extra_body.thinking` request shape.\n * GLM has no depth knob — thinking is a binary switch — so any non-`off`\n * level enables it and `off` explicitly disables it (GLM-5.x/4.7 think by\n * default, so a silent omission would not turn thinking off).\n *\n * Exported for tests.\n */\nexport function planZaiReasoning(\n ctx: { thinking?: ThinkingLevel },\n): Record<string, unknown> {\n const enabled = !!ctx.thinking && ctx.thinking !== 'off'\n return { thinking: { type: enabled ? 'enabled' : 'disabled' } }\n}\n\n/**\n * Z.ai (Zhipu) GLM provider.\n *\n * Thin wrapper around {@link openaiCompat} pinned to the `reasoning_content`\n * round-trip mode: thinking arrives in the `reasoning_content` delta field and\n * is echoed back on assistant messages under the same name, keeping GLM's\n * interleaved/preserved thinking coherent across tool calls.\n */\nexport function zai(params?: ZaiParams): Provider {\n return openaiCompat({\n name: 'zai',\n apiKey: getApiKey(params),\n baseURL: params?.baseURL || BASE_URL,\n defaultModel: params?.defaultModel || 'glm-4.7-flash',\n capabilities: params?.capabilities ?? { vision: false, imageInToolResult: false },\n supportsReasoning: true,\n reasoningMode: 'reasoning_content',\n reasoningContentField: 'reasoning_content',\n planReasoningRequest: planZaiReasoning,\n extraHeaders: params?.extraHeaders,\n })\n}\n"],"mappings":";;;;AAoCA,MAAM,gBAAgB;AAEtB,MAAM,0BACF;AAIJ,SAAgB,OAAO,QAAiC;CACtD,MAAM,eAAe,QAAQ,gBAAgB;CAI7C,MAAM,OAAO,aAAa;EACxB,MAAM;EACN,QAAQ,QAAQ,UAAU;EAC1B,SAAS;EACT;EACA,cAAc;GAAE,QAAQ;GAAM,mBAAmB;EAAM;EACvD,cAAc,QAAQ;CACxB,CAAC;CAED,OAAO;EACL,GAAG;EACH,MAAM;GAAE,GAAG,KAAK;GAAM;EAAa;EACnC,MAAM,OAAO,SAAS,WAA4B;GAGhD,MAAM,mBACJ;IACE,UAAU;IACV,YAAY;IACZ;IACA,cAAc;IACd,eAAc,WAAU,2EAA2E;GACrG,GACA,SACF;GAEA,MAAM,IAAI,MAAM,uBAAuB;EACzC;CACF;AACF;;;ACnEA,MAAMA,aAAW;AAwBjB,SAASC,YAAU,QAAgC;CAEjD,IAAI,OAAO,QAAQ,WAAW,YAAY,OAAO,OAAO,SAAS,GAC/D,OAAO,OAAO;CAEhB,IAAI,QAAQ,IAAI,iBACd,OAAO,QAAQ,IAAI;CAErB,MAAM,IAAI,MAAM,qFAAqF;AACvG;;;;;;;;AASA,MAAM,mBAAmB;;;;;;;;;AAUzB,SAAgB,qBACd,KACqC;CACrC,IAAI,CAAC,iBAAiB,KAAK,IAAI,KAAK,GAClC,OAAO,KAAA;CACT,IAAI,IAAI,aAAa,KAAA,KAAa,IAAI,aAAa,YACjD,OAAO,KAAA;CACT,OAAO,EAAE,kBAAkB,IAAI,aAAa,QAAQ,SAAS,OAAO;AACtE;;;;;;;;;;AAWA,SAAgB,QAAQ,QAAkC;CACxD,OAAO,aAAa;EAClB,MAAM;EACN,QAAQA,YAAU,MAAM;EACxB,SAAS,QAAQ,WAAWD;EAC5B,cAAc,QAAQ,gBAAgB;EACtC,cAAc,QAAQ,gBAAgB;GAAE,QAAQ;GAAM,mBAAmB;EAAM;EAC/E,sBAAsB;EACtB,cAAc,QAAQ;CACxB,CAAC;AACH;;;ACjFA,MAAM,WAAW;AAsBjB,SAAS,UAAU,QAA4B;CAE7C,IAAI,OAAO,QAAQ,WAAW,YAAY,OAAO,OAAO,SAAS,GAC/D,OAAO,OAAO;CAEhB,IAAI,QAAQ,IAAI,aACd,OAAO,QAAQ,IAAI;CAErB,MAAM,IAAI,MAAM,8EAA8E;AAChG;;;;;;;;;AAUA,SAAgB,iBACd,KACyB;CAEzB,OAAO,EAAE,UAAU,EAAE,MADL,CAAC,CAAC,IAAI,YAAY,IAAI,aAAa,QACd,YAAY,WAAW,EAAE;AAChE;;;;;;;;;AAUA,SAAgB,IAAI,QAA8B;CAChD,OAAO,aAAa;EAClB,MAAM;EACN,QAAQ,UAAU,MAAM;EACxB,SAAS,QAAQ,WAAW;EAC5B,cAAc,QAAQ,gBAAgB;EACtC,cAAc,QAAQ,gBAAgB;GAAE,QAAQ;GAAO,mBAAmB;EAAM;EAChF,mBAAmB;EACnB,eAAe;EACf,uBAAuB;EACvB,sBAAsB;EACtB,cAAc,QAAQ;CACxB,CAAC;AACH"}
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $f as SchemaSanitizeProfile, Ap as openai, Bf as StreamCallbacks, Bp as cerebras, Cp as openaiCompat, Dp as OpenAIParams, Fp as LocalParams, Gf as ToolSpec, Gp as arcee, Hf as TokenCountPayload, Hp as baseten, If as HistoryRepair, Ip as local, Jf as planZaiReasoning, Jp as AnthropicParams, Kf as TurnResult, Lf as Provider, Lp as CursorParams, Mp as MistralParams, Np as mistral, Pp as planMistralReasoning, Qf as SchemaSanitizeOptions, Qp as applyAnthropicCacheBreakpoints, Rf as ProviderCapabilities, Rp as cursor,
|
|
2
|
-
export { type AnthropicParams, type ArceeParams, type BasetenParams, type CerebrasParams, type CursorParams, HistoryRepair, type LocalParams, type MistralParams, type ModelCatalog, type ModelCatalogEntry, type ModelCatalogSource, type OAuthParams, type OAuthProviderInterface, type OpenAICompatAuthHeader, OpenAICompatHttpError, type OpenAICompatParams, type OpenAIParams, type OpenRouterParams, type PromptCacheKeyContext, type PromptCacheKeyOption, Provider, ProviderCapabilities, ProviderMeta, type ResolveOAuthApiKeyOptions, type SchemaSanitizeOptions, type SchemaSanitizeProfile, type SchemaSanitizeResult, StreamCallbacks, StreamOptions, TokenCountPayload, ToolCall, ToolResult, ToolSpec, TurnResult, type XaiParams, type ZaiParams, anthropic, applyAnthropicCacheBreakpoints, arcee, baseten, cerebras, classifyOpenAICompatError, credentialsFilePath, credentialsFromParams, cursor, derivePromptCacheKey, extractRuntimeCredentials, getModelCatalog, isOAuthAccessToken, local, mapOAIFinishReason, mistral, openai, openaiCompat, openrouter, planBasetenReasoning, planMistralReasoning, planZaiReasoning, readOAuthCredentials, registerCustomOAuthProvider, resolveOAuthApiKey, resolvePromptCacheKey, sanitizeToolSchema, sanitizeToolSpecs, setModelCatalog, writeOAuthCredentials, xai, zai };
|
|
1
|
+
import { $f as SchemaSanitizeProfile, Ap as openai, Bf as StreamCallbacks, Bp as cerebras, C_ as ModelCatalog, Cm as getOAuthProvider, Cp as openaiCompat, D_ as setModelCatalog, Dp as OpenAIParams, E_ as getModelCatalog, Em as registerOAuthProvider, Fp as LocalParams, Gf as ToolSpec, Gp as arcee, Hf as TokenCountPayload, Hp as baseten, If as HistoryRepair, Ip as local, Jf as planZaiReasoning, Jp as AnthropicParams, Kf as TurnResult, Lf as Provider, Lp as CursorParams, Mp as MistralParams, Np as mistral, Pp as planMistralReasoning, Qf as SchemaSanitizeOptions, Qp as applyAnthropicCacheBreakpoints, Rf as ProviderCapabilities, Rp as cursor, Sm as getOAuthApiKey, T_ as ModelCatalogSource, Tm as refreshOpenAICodexToken, Uf as ToolCall, Up as planBasetenReasoning, Vf as StreamOptions, Vp as BasetenParams, Wf as ToolResult, Wp as ArceeParams, Xf as XaiParams, Yf as zai, Zf as xai, Zp as anthropic, _m as readOAuthCredentials, ap as openrouter, bm as writeOAuthCredentials, cm as PromptCacheKeyOption, dm as OAuthParams, dp as OpenAICompatParams, ep as SchemaSanitizeResult, fm as ResolveOAuthApiKeyOptions, gm as isOAuthAccessToken, hm as extractRuntimeCredentials, lm as derivePromptCacheKey, lp as OpenAICompatAuthHeader, mm as credentialsFromParams, np as sanitizeToolSpecs, pm as credentialsFilePath, qf as ZaiParams, rp as OpenRouterParams, sm as PromptCacheKeyContext, tp as sanitizeToolSchema, um as resolvePromptCacheKey, up as OpenAICompatHttpError, vm as registerCustomOAuthProvider, vp as classifyOpenAICompatError, w_ as ModelCatalogEntry, wm as refreshAnthropicToken, xm as OAuthProviderInterface, xp as mapOAIFinishReason, ym as resolveOAuthApiKey, zf as ProviderMeta, zp as CerebrasParams } from "./index-BSNr0OQn.js";
|
|
2
|
+
export { type AnthropicParams, type ArceeParams, type BasetenParams, type CerebrasParams, type CursorParams, HistoryRepair, type LocalParams, type MistralParams, type ModelCatalog, type ModelCatalogEntry, type ModelCatalogSource, type OAuthParams, type OAuthProviderInterface, type OpenAICompatAuthHeader, OpenAICompatHttpError, type OpenAICompatParams, type OpenAIParams, type OpenRouterParams, type PromptCacheKeyContext, type PromptCacheKeyOption, Provider, ProviderCapabilities, ProviderMeta, type ResolveOAuthApiKeyOptions, type SchemaSanitizeOptions, type SchemaSanitizeProfile, type SchemaSanitizeResult, StreamCallbacks, StreamOptions, TokenCountPayload, ToolCall, ToolResult, ToolSpec, TurnResult, type XaiParams, type ZaiParams, anthropic, applyAnthropicCacheBreakpoints, arcee, baseten, cerebras, classifyOpenAICompatError, credentialsFilePath, credentialsFromParams, cursor, derivePromptCacheKey, extractRuntimeCredentials, getModelCatalog, getOAuthApiKey, getOAuthProvider, isOAuthAccessToken, local, mapOAIFinishReason, mistral, openai, openaiCompat, openrouter, planBasetenReasoning, planMistralReasoning, planZaiReasoning, readOAuthCredentials, refreshAnthropicToken, refreshOpenAICodexToken, registerCustomOAuthProvider, registerOAuthProvider, resolveOAuthApiKey, resolvePromptCacheKey, sanitizeToolSchema, sanitizeToolSpecs, setModelCatalog, writeOAuthCredentials, xai, zai };
|
package/dist/providers.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { E as getModelCatalog, S as resolvePromptCacheKey, b as sanitizeToolSpecs, f as mapOAIFinishReason, j as setModelCatalog, l as classifyOpenAICompatError, m as openaiCompat, n as OpenAICompatHttpError, x as derivePromptCacheKey, y as sanitizeToolSchema } from "./openai-compat-CnHeo4Lz.js";
|
|
2
|
-
import { n as anthropic, r as applyAnthropicCacheBreakpoints } from "./anthropic-
|
|
3
|
-
import { a as readOAuthCredentials, c as writeOAuthCredentials, i as isOAuthAccessToken, n as credentialsFromParams, o as registerCustomOAuthProvider, r as extractRuntimeCredentials, s as resolveOAuthApiKey, t as credentialsFilePath } from "./oauth-
|
|
2
|
+
import { n as anthropic, r as applyAnthropicCacheBreakpoints } from "./anthropic-qaw8XAc9.js";
|
|
3
|
+
import { a as readOAuthCredentials, c as writeOAuthCredentials, d as refreshAnthropicToken, f as refreshOpenAICodexToken, i as isOAuthAccessToken, l as getOAuthApiKey, n as credentialsFromParams, o as registerCustomOAuthProvider, p as registerOAuthProvider, r as extractRuntimeCredentials, s as resolveOAuthApiKey, t as credentialsFilePath, u as getOAuthProvider } from "./oauth-ZebH9NHb.js";
|
|
4
4
|
import { arcee } from "./providers/arcee.js";
|
|
5
5
|
import { baseten, planBasetenReasoning } from "./providers/baseten.js";
|
|
6
6
|
import { cerebras } from "./providers/cerebras.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { a as cursor, i as planMistralReasoning, n as zai, r as mistral, t as planZaiReasoning } from "./providers-B6mFe7OD.js";
|
|
7
|
+
import { a as cursor, i as planMistralReasoning, n as zai, r as mistral, t as planZaiReasoning } from "./providers-Bxs-XHir.js";
|
|
9
8
|
import { local } from "./providers/local.js";
|
|
10
9
|
import { openai } from "./providers/openai.js";
|
|
11
10
|
import { openrouter } from "./providers/openrouter.js";
|
|
12
|
-
|
|
11
|
+
import { xai } from "./providers/xai.js";
|
|
12
|
+
export { OpenAICompatHttpError, anthropic, applyAnthropicCacheBreakpoints, arcee, baseten, cerebras, classifyOpenAICompatError, credentialsFilePath, credentialsFromParams, cursor, derivePromptCacheKey, extractRuntimeCredentials, getModelCatalog, getOAuthApiKey, getOAuthProvider, isOAuthAccessToken, local, mapOAIFinishReason, mistral, openai, openaiCompat, openrouter, planBasetenReasoning, planMistralReasoning, planZaiReasoning, readOAuthCredentials, refreshAnthropicToken, refreshOpenAICodexToken, registerCustomOAuthProvider, registerOAuthProvider, resolveOAuthApiKey, resolvePromptCacheKey, sanitizeToolSchema, sanitizeToolSpecs, setModelCatalog, writeOAuthCredentials, xai, zai };
|
package/dist/restate.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Am as AgentStats, Dm as AgentBehavior, Lf as Provider, Om as AgentClock, Rh as ToolContext, Th as ToolResultContent, Vf as StreamOptions, Xi as McpToolWrap, Yi as McpToolMeta, _g as SessionStore, eg as ToolStateStore, mh as SessionTurn, xh as ToolBatchExecutor, zh as ToolDef } from "./index-BSNr0OQn.js";
|
|
2
2
|
import { g as TaskExitInfo, h as TaskEntry, l as ExecutionHandle, o as DetachedTasksCapability } from "./types-M2DauK2D.js";
|
|
3
3
|
|
|
4
4
|
//#region src/restate/types.d.ts
|
package/dist/restate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { L as buildAliasMaps } from "./openai-compat-CnHeo4Lz.js";
|
|
2
2
|
import { c as toolOutputByteLength, l as toolResultToText, r as coerceToolResultContent } from "./types-BIarq1qE.js";
|
|
3
|
-
import { Dt as reserveChildLabel, Ln as hydrateReadStateFromSessionAsync, a as stagedToolState, i as isToolStateOps } from "./agent-
|
|
3
|
+
import { Dt as reserveChildLabel, Ln as hydrateReadStateFromSessionAsync, a as stagedToolState, i as isToolStateOps } from "./agent-8kfGIDb_.js";
|
|
4
4
|
import { r as formatTokenUsage } from "./stats-DAKBEKjc.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
//#region src/restate/awakeable.ts
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __exportAll = (all, no_symbols) => {
|
|
5
|
+
let target = {};
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
14
|
+
//#endregion
|
|
15
|
+
export { __require as n, __exportAll as t };
|
package/dist/session/sqlite.d.ts
CHANGED
package/dist/session.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ag as FileMapAdapter, Cg as loadSession, Dg as RemoteStoreOptions, Eg as withExtensionSession, Fg as PairingDrop, Gg as autoDetectAndConvert, Ig as PairingDropKind, Mg as createFileMapStore, Og as createRemoteStore, Qg as fromOpenAI, Sg as getExtensionSessionState, Tg as setExtensionSessionState, Ug as ToWireMessagesOptions, Zg as fromAnthropic, _g as SessionStore, bg as deleteExtensionSessionState, dg as CreateSessionOptions, fg as LoadSessionOptions, gg as SessionRun, hg as SessionMetaRow, i_ as toWireMessages, jg as FileMapStoreOptions, kg as createMemoryStore, mg as SessionData, mh as SessionTurn, n_ as toAnthropic, pg as Session, ph as SessionMessage, qg as dropInvalidToolPairings, r_ as toOpenAI, uh as SessionContentBlock, vg as createSession, wg as resumeChainRunIds, xg as demoteStaleRunningStatus, yg as currentExtensionSession } from "./index-BSNr0OQn.js";
|
|
2
2
|
export { CreateSessionOptions, type FileMapAdapter, type FileMapStoreOptions, LoadSessionOptions, type PairingDrop, type PairingDropKind, type RemoteStoreOptions, Session, type SessionContentBlock, SessionData, type SessionMessage, SessionMetaRow, SessionRun, SessionStore, type SessionTurn, type ToWireMessagesOptions, autoDetectAndConvert, createFileMapStore, createMemoryStore, createRemoteStore, createSession, currentExtensionSession, deleteExtensionSessionState, demoteStaleRunningStatus, dropInvalidToolPairings, fromAnthropic, fromOpenAI, getExtensionSessionState, loadSession, resumeChainRunIds, setExtensionSessionState, toAnthropic, toOpenAI, toWireMessages, withExtensionSession };
|
package/dist/skills.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $c as createSkillActivationState, Ac as SkillInstallError, Bc as discoverSkills, Cc as resolveSkills, Dc as SKILL_PROVENANCE_FILE, Ec as stripShellInterpolations, Fc as installSkillFromSpec, Gc as buildCatalog, Hc as inferSource, Ic as listSkillCandidates, Jc as ActivationVia, Kc as IMPLICITLY_ALLOWED_SKILL_TOOLS, Lc as parseSkillInstallSpec, Mc as SkillInstallOptions, Nc as SkillInstallResult, Oc as SkillCandidateDetail, Pc as SkillInstallSpec, Qc as SkillActivationStateOptions, Rc as readSkillProvenance, Sc as validateSkillName, Tc as interpolateShellCommands, Uc as parseFrontmatter, Vc as getDefaultScanPaths, Wc as parseSkillFile, Xc as DeactivationReason, Yc as ActiveSkill, Zc as SkillActivationState, _c as matchesAllowedTool, ag as
|
|
1
|
+
import { $c as createSkillActivationState, Ac as SkillInstallError, Bc as discoverSkills, Cc as resolveSkills, Dc as SKILL_PROVENANCE_FILE, Ec as stripShellInterpolations, Fc as installSkillFromSpec, Gc as buildCatalog, Hc as inferSource, Ic as listSkillCandidates, Jc as ActivationVia, Kc as IMPLICITLY_ALLOWED_SKILL_TOOLS, Lc as parseSkillInstallSpec, Mc as SkillInstallOptions, Nc as SkillInstallResult, Oc as SkillCandidateDetail, Pc as SkillInstallSpec, Qc as SkillActivationStateOptions, Rc as readSkillProvenance, Sc as validateSkillName, Tc as interpolateShellCommands, Uc as parseFrontmatter, Vc as getDefaultScanPaths, Wc as parseSkillFile, Xc as DeactivationReason, Yc as ActiveSkill, Zc as SkillActivationState, _c as matchesAllowedTool, ag as ShellInterpolationApproval, bc as validateResourcePathReal, cg as SkillResource, dc as defineSkill, fc as writeSkillToDisk, gc as isToolAllowedByUnion, hc as SkillValidationResult, jc as SkillInstallErrorCode, kc as SkillInstallCandidate, lg as SkillSource, mc as SkillValidationIssue, og as SkillConfig, pc as writeSkillsToDisk, qc as installAllowedToolsGate, sg as SkillDiagnostic, ug as SkillsConfig, vc as parseAllowedToolPattern, wc as InterpolateShellCommandsOptions, xc as validateSkillForWrite, yc as validateResourcePath, zc as SourcedScanPath } from "./index-BSNr0OQn.js";
|
|
2
2
|
export { type ActivationVia, type ActiveSkill, type DeactivationReason, IMPLICITLY_ALLOWED_SKILL_TOOLS, type InterpolateShellCommandsOptions, SKILL_PROVENANCE_FILE, type ShellInterpolationApproval, type SkillActivationState, type SkillActivationStateOptions, type SkillCandidateDetail, type SkillConfig, type SkillDiagnostic, type SkillInstallCandidate, SkillInstallError, type SkillInstallErrorCode, type SkillInstallOptions, type SkillInstallResult, type SkillInstallSpec, type SkillResource, type SkillSource, type SkillValidationIssue, type SkillValidationResult, type SkillsConfig, type SourcedScanPath, buildCatalog, createSkillActivationState, defineSkill, discoverSkills, getDefaultScanPaths, inferSource, installAllowedToolsGate, installSkillFromSpec, interpolateShellCommands, isToolAllowedByUnion, listSkillCandidates, matchesAllowedTool, parseAllowedToolPattern, parseFrontmatter, parseSkillFile, parseSkillInstallSpec, readSkillProvenance, resolveSkills, stripShellInterpolations, validateResourcePath, validateResourcePathReal, validateSkillForWrite, validateSkillName, writeSkillToDisk, writeSkillsToDisk };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.js";
|
|
2
2
|
import * as z from "zod/v4";
|
|
3
|
-
//#region node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
3
|
+
//#region node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
4
4
|
const RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
5
5
|
/**
|
|
6
6
|
* Assert 'object' type schema.
|
|
@@ -1876,17 +1876,26 @@ z.union([
|
|
|
1876
1876
|
CreateTaskResultSchema
|
|
1877
1877
|
]);
|
|
1878
1878
|
//#endregion
|
|
1879
|
-
//#region node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
1879
|
+
//#region node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
1880
1880
|
var stdio_exports = /* @__PURE__ */ __exportAll({
|
|
1881
1881
|
ReadBuffer: () => ReadBuffer,
|
|
1882
|
+
STDIO_DEFAULT_MAX_BUFFER_SIZE: () => STDIO_DEFAULT_MAX_BUFFER_SIZE,
|
|
1882
1883
|
deserializeMessage: () => deserializeMessage,
|
|
1883
1884
|
serializeMessage: () => serializeMessage
|
|
1884
1885
|
});
|
|
1886
|
+
const STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
1885
1887
|
/**
|
|
1886
1888
|
* Buffers a continuous stdio stream into discrete JSON-RPC messages.
|
|
1887
1889
|
*/
|
|
1888
1890
|
var ReadBuffer = class {
|
|
1891
|
+
constructor(options) {
|
|
1892
|
+
this._maxBufferSize = options?.maxBufferSize ?? 10485760;
|
|
1893
|
+
}
|
|
1889
1894
|
append(chunk) {
|
|
1895
|
+
if ((this._buffer?.length ?? 0) + chunk.length > this._maxBufferSize) {
|
|
1896
|
+
this.clear();
|
|
1897
|
+
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
1898
|
+
}
|
|
1890
1899
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
1891
1900
|
}
|
|
1892
1901
|
readMessage() {
|
|
@@ -1910,4 +1919,4 @@ function serializeMessage(message) {
|
|
|
1910
1919
|
//#endregion
|
|
1911
1920
|
export { serializeMessage as n, stdio_exports as r, ReadBuffer as t };
|
|
1912
1921
|
|
|
1913
|
-
//# sourceMappingURL=stdio-
|
|
1922
|
+
//# sourceMappingURL=stdio-DPpBDPx5.js.map
|