pi2dsh 0.3.5 → 0.4.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 (74) hide show
  1. package/dist/{all-Rt4K68QA.mjs → all-DSpxKvHa.mjs} +10 -10
  2. package/dist/{all-Rt4K68QA.mjs.map → all-DSpxKvHa.mjs.map} +1 -1
  3. package/dist/{anthropic-messages-Beym0_aC.mjs → anthropic-messages-BL9N1Idv.mjs} +3 -3
  4. package/dist/{anthropic-messages-Beym0_aC.mjs.map → anthropic-messages-BL9N1Idv.mjs.map} +1 -1
  5. package/dist/{azure-openai-responses-cHqZTgLD.mjs → azure-openai-responses-A67VbaZ1.mjs} +3 -3
  6. package/dist/{azure-openai-responses-cHqZTgLD.mjs.map → azure-openai-responses-A67VbaZ1.mjs.map} +1 -1
  7. package/dist/cli.mjs +1 -1
  8. package/dist/compat/pi-ai.d.mts +3 -38
  9. package/dist/compat/pi-ai.d.mts.map +1 -1
  10. package/dist/compat/pi-ai.mjs +3 -3
  11. package/dist/compat/pi-coding-agent.d.mts +32 -31
  12. package/dist/compat/pi-coding-agent.d.mts.map +1 -1
  13. package/dist/compat/pi-coding-agent.mjs +1 -1
  14. package/dist/credentials-oauth.mjs +2 -2
  15. package/dist/{dist-QBBA-dL_.mjs → dist-BYA74yh_.mjs} +2 -2
  16. package/dist/{dist-QBBA-dL_.mjs.map → dist-BYA74yh_.mjs.map} +1 -1
  17. package/dist/dist-DeonWo7m.mjs +1089 -0
  18. package/dist/dist-DeonWo7m.mjs.map +1 -0
  19. package/dist/{google-generative-ai-B7OZs5lu.mjs → google-generative-ai-DT5S8D8y.mjs} +2 -2
  20. package/dist/{google-generative-ai-B7OZs5lu.mjs.map → google-generative-ai-DT5S8D8y.mjs.map} +1 -1
  21. package/dist/{google-shared-CRsAUItF.mjs → google-shared-DYP_9cnK.mjs} +4 -4
  22. package/dist/{google-shared-CRsAUItF.mjs.map → google-shared-DYP_9cnK.mjs.map} +1 -1
  23. package/dist/{google-vertex-DmdaHQtB.mjs → google-vertex-Dpq7O7Be.mjs} +3 -3
  24. package/dist/{google-vertex-DmdaHQtB.mjs.map → google-vertex-Dpq7O7Be.mjs.map} +1 -1
  25. package/dist/host.mjs +1 -1
  26. package/dist/index.d.mts.map +1 -1
  27. package/dist/index.mjs +1 -1
  28. package/dist/{json-parse-CFyFZSLJ.mjs → json-parse-Dz5sKMTv.mjs} +2 -2
  29. package/dist/{json-parse-CFyFZSLJ.mjs.map → json-parse-Dz5sKMTv.mjs.map} +1 -1
  30. package/dist/{mcp-config-D2B3kv-Z.mjs → mcp-config-B3h5jTBb.mjs} +9 -8
  31. package/dist/mcp-config-B3h5jTBb.mjs.map +1 -0
  32. package/dist/{mistral-conversations-HHZCcFv_.mjs → mistral-conversations-BsxbCCWx.mjs} +4 -4
  33. package/dist/{mistral-conversations-HHZCcFv_.mjs.map → mistral-conversations-BsxbCCWx.mjs.map} +1 -1
  34. package/dist/{multipart-parser-CIa5BbwO.mjs → multipart-parser-woKCuALW.mjs} +3 -3
  35. package/dist/{multipart-parser-CIa5BbwO.mjs.map → multipart-parser-woKCuALW.mjs.map} +1 -1
  36. package/dist/{openai-codex-responses-vmovNu-q.mjs → openai-codex-responses-C7vviVT2.mjs} +3 -3
  37. package/dist/{openai-codex-responses-vmovNu-q.mjs.map → openai-codex-responses-C7vviVT2.mjs.map} +1 -1
  38. package/dist/{openai-completions-fXHhRolF.mjs → openai-completions-By8QNX1P.mjs} +3 -3
  39. package/dist/{openai-completions-fXHhRolF.mjs.map → openai-completions-By8QNX1P.mjs.map} +1 -1
  40. package/dist/{openai-responses-DKdCYf3h.mjs → openai-responses-DboJUcFN.mjs} +3 -3
  41. package/dist/{openai-responses-DKdCYf3h.mjs.map → openai-responses-DboJUcFN.mjs.map} +1 -1
  42. package/dist/{openai-responses-shared-D0Jq7yVP.mjs → openai-responses-shared-BDzn7nJY.mjs} +2 -2
  43. package/dist/{openai-responses-shared-D0Jq7yVP.mjs.map → openai-responses-shared-BDzn7nJY.mjs.map} +1 -1
  44. package/dist/{otel-BQSQRBLF.mjs → otel-PimLMoiV.mjs} +3 -3
  45. package/dist/{otel-BQSQRBLF.mjs.map → otel-PimLMoiV.mjs.map} +1 -1
  46. package/dist/{pi-ai-DhYGgq4Y.mjs → pi-ai-B_88Wb0r.mjs} +49 -6
  47. package/dist/{pi-ai-DhYGgq4Y.mjs.map → pi-ai-B_88Wb0r.mjs.map} +1 -1
  48. package/dist/{pi-coding-agent-DuqSaquA.mjs → pi-coding-agent-COMX0KHL.mjs} +34 -33
  49. package/dist/pi-coding-agent-COMX0KHL.mjs.map +1 -0
  50. package/dist/{pi-messages-CV-Ts8An.mjs → pi-messages-B-7Xo_I0.mjs} +3 -3
  51. package/dist/{pi-messages-CV-Ts8An.mjs.map → pi-messages-B-7Xo_I0.mjs.map} +1 -1
  52. package/dist/pi-types-KazmR2O5.d.mts +62 -0
  53. package/dist/pi-types-KazmR2O5.d.mts.map +1 -0
  54. package/dist/pi-uuid-Db8ShZsK.mjs +47 -0
  55. package/dist/pi-uuid-Db8ShZsK.mjs.map +1 -0
  56. package/dist/{provider-env-C72pF4vP.mjs → provider-env-D-cCRWzv.mjs} +2 -2
  57. package/dist/{provider-env-C72pF4vP.mjs.map → provider-env-D-cCRWzv.mjs.map} +1 -1
  58. package/dist/{runtime-D1oXtRIx.mjs → runtime-B7mEIRf-.mjs} +1183 -52
  59. package/dist/runtime-B7mEIRf-.mjs.map +1 -0
  60. package/dist/runtime.d.mts.map +1 -1
  61. package/dist/runtime.mjs +1 -1
  62. package/dist/{src-C3WBfOks.mjs → src-BEl3QrGL.mjs} +3 -3
  63. package/dist/{src-C3WBfOks.mjs.map → src-BEl3QrGL.mjs.map} +1 -1
  64. package/package.json +2 -2
  65. package/dist/build-BG7p2Lbr.mjs +0 -4416
  66. package/dist/build-BG7p2Lbr.mjs.map +0 -1
  67. package/dist/dist-IQKOgQyt.mjs +0 -10035
  68. package/dist/dist-IQKOgQyt.mjs.map +0 -1
  69. package/dist/mcp-config-D2B3kv-Z.mjs.map +0 -1
  70. package/dist/pi-coding-agent-DuqSaquA.mjs.map +0 -1
  71. package/dist/pi-types-BLt46jaf.d.mts +0 -2494
  72. package/dist/pi-types-BLt46jaf.d.mts.map +0 -1
  73. package/dist/rolldown-runtime-CTfmNlz1.mjs +0 -44
  74. package/dist/runtime-D1oXtRIx.mjs.map +0 -1
@@ -2,13 +2,13 @@
2
2
  import { a as AssistantMessageEventStream } from "./diagnostics-CJye1UFh.mjs";
3
3
  import { o as clampThinkingLevel } from "./images-models-DJtHo9Rp.mjs";
4
4
  import { t as headersToRecord } from "./headers-CPzZhJQn.mjs";
5
- import { t as getProviderEnvValue } from "./provider-env-C72pF4vP.mjs";
5
+ import { t as getProviderEnvValue } from "./provider-env-D-cCRWzv.mjs";
6
6
  import { t as retryProviderRequest } from "./provider-retry-Cw6YJ4cr.mjs";
7
7
  import { c as createGrammarToolInputProperties, i as buildBaseOptions } from "./transform-messages-DGq9mvhA.mjs";
8
8
  import { t as AzureOpenAI } from "./openai-DkzRh5_G.mjs";
9
9
  import { n as normalizeProviderError, t as formatProviderError } from "./error-body-DKA3lknR.mjs";
10
10
  import { t as clampOpenAIPromptCacheKey } from "./openai-prompt-cache-BDWtZRKh.mjs";
11
- import { n as convertResponsesTools, r as processResponsesStream, t as convertResponsesMessages } from "./openai-responses-shared-D0Jq7yVP.mjs";
11
+ import { n as convertResponsesTools, r as processResponsesStream, t as convertResponsesMessages } from "./openai-responses-shared-BDzn7nJY.mjs";
12
12
  //#region node_modules/.pnpm/@earendil-works+pi-ai@0.84.1_ws@8.21.3_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js
13
13
  const DEFAULT_AZURE_API_VERSION = "v1";
14
14
  const AZURE_TOOL_CALL_PROVIDERS = /* @__PURE__ */ new Set([
@@ -206,4 +206,4 @@ function buildParams(model, context, options, deploymentName, grammarToolInputPr
206
206
  //#endregion
207
207
  export { stream, streamSimple };
208
208
 
209
- //# sourceMappingURL=azure-openai-responses-cHqZTgLD.mjs.map
209
+ //# sourceMappingURL=azure-openai-responses-A67VbaZ1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"azure-openai-responses-cHqZTgLD.mjs","names":[],"sources":["../node_modules/.pnpm/@earendil-works+pi-ai@0.84.1_ws@8.21.3_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js"],"sourcesContent":["import { AzureOpenAI } from \"openai\";\nimport { clampThinkingLevel } from \"../models.js\";\nimport { formatProviderError, normalizeProviderError } from \"../utils/error-body.js\";\nimport { AssistantMessageEventStream } from \"../utils/event-stream.js\";\nimport { headersToRecord } from \"../utils/headers.js\";\nimport { getProviderEnvValue } from \"../utils/provider-env.js\";\nimport { retryProviderRequest } from \"../utils/provider-retry.js\";\nimport { createGrammarToolInputProperties } from \"./constrained-sampling.js\";\nimport { clampOpenAIPromptCacheKey } from \"./openai-prompt-cache.js\";\nimport { convertResponsesMessages, convertResponsesTools, processResponsesStream } from \"./openai-responses-shared.js\";\nimport { buildBaseOptions } from \"./simple-options.js\";\nconst DEFAULT_AZURE_API_VERSION = \"v1\";\nconst AZURE_TOOL_CALL_PROVIDERS = new Set([\"openai\", \"openai-codex\", \"opencode\", \"azure-openai-responses\"]);\n// OpenAI Responses rejects max_output_tokens below 16: https://github.com/earendil-works/pi/issues/6265\nconst OPENAI_RESPONSES_MIN_OUTPUT_TOKENS = 16;\nfunction parseDeploymentNameMap(value) {\n const map = new Map();\n if (!value)\n return map;\n for (const entry of value.split(\",\")) {\n const trimmed = entry.trim();\n if (!trimmed)\n continue;\n const [modelId, deploymentName] = trimmed.split(\"=\", 2);\n if (!modelId || !deploymentName)\n continue;\n map.set(modelId.trim(), deploymentName.trim());\n }\n return map;\n}\nfunction resolveDeploymentName(model, options) {\n if (options?.azureDeploymentName) {\n return options.azureDeploymentName;\n }\n const mappedDeployment = parseDeploymentNameMap(getProviderEnvValue(\"AZURE_OPENAI_DEPLOYMENT_NAME_MAP\", options?.env)).get(model.id);\n return mappedDeployment || model.id;\n}\nfunction formatAzureOpenAIError(error) {\n return formatProviderError(normalizeProviderError(error), \"Azure OpenAI API error\");\n}\n/**\n * Generate function for Azure OpenAI Responses API\n */\nexport const stream = (model, context, options) => {\n const stream = new AssistantMessageEventStream();\n // Start async processing\n (async () => {\n const deploymentName = resolveDeploymentName(model, options);\n const output = {\n role: \"assistant\",\n content: [],\n api: \"azure-openai-responses\",\n provider: model.provider,\n model: model.id,\n usage: {\n input: 0,\n output: 0,\n cacheRead: 0,\n cacheWrite: 0,\n totalTokens: 0,\n cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },\n },\n stopReason: \"pending\",\n timestamp: Date.now(),\n };\n try {\n // Create Azure OpenAI client\n const apiKey = options?.apiKey;\n if (!apiKey) {\n throw new Error(`No API key for provider: ${model.provider}`);\n }\n const client = createClient(model, apiKey, options);\n const grammarToolInputProperties = createGrammarToolInputProperties(context.tools, model.compat?.supportsOpenAIGrammarTools ?? false);\n let params = buildParams(model, context, options, deploymentName, grammarToolInputProperties);\n const nextParams = await options?.onPayload?.(params, model);\n if (nextParams !== undefined) {\n params = nextParams;\n }\n const requestOptions = {\n ...(options?.signal ? { signal: options.signal } : {}),\n ...(options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {}),\n maxRetries: 0,\n };\n const { data: openaiStream, response } = await retryProviderRequest(() => client.responses.create(params, requestOptions).withResponse(), {\n maxRetries: options?.maxRetries,\n maxRetryDelayMs: options?.maxRetryDelayMs,\n signal: options?.signal,\n });\n await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);\n stream.push({ type: \"start\", partial: output });\n await processResponsesStream(openaiStream, output, stream, model, { grammarToolInputProperties });\n if (options?.signal?.aborted) {\n throw new Error(\"Request was aborted\");\n }\n if (output.stopReason === \"pending\") {\n throw new Error(\"Azure OpenAI Responses stream ended without a stop reason\");\n }\n if (output.stopReason === \"aborted\" || output.stopReason === \"error\") {\n throw new Error(output.errorMessage || \"An unknown error occurred\");\n }\n stream.push({ type: \"done\", reason: output.stopReason, message: output });\n stream.end();\n }\n catch (error) {\n for (const block of output.content) {\n delete block.index;\n // Streaming scratch buffers are only used during parsing; never persist them.\n delete block.partialJson;\n delete block.customInput;\n }\n output.stopReason = options?.signal?.aborted ? \"aborted\" : \"error\";\n output.errorMessage = formatAzureOpenAIError(error);\n stream.push({ type: \"error\", reason: output.stopReason, error: output });\n stream.end();\n }\n })();\n return stream;\n};\nexport const streamSimple = (model, context, options) => {\n const apiKey = options?.apiKey;\n if (!apiKey) {\n throw new Error(`No API key for provider: ${model.provider}`);\n }\n const base = buildBaseOptions(model, context, options, apiKey);\n const clampedReasoning = options?.reasoning ? clampThinkingLevel(model, options.reasoning) : undefined;\n const reasoningEffort = clampedReasoning === \"off\" ? undefined : clampedReasoning;\n return stream(model, context, {\n ...base,\n reasoningEffort,\n });\n};\nfunction normalizeAzureBaseUrl(baseUrl) {\n const trimmed = baseUrl.trim().replace(/\\/+$/, \"\");\n let url;\n try {\n url = new URL(trimmed);\n }\n catch {\n throw new Error(`Invalid Azure OpenAI base URL: ${baseUrl}`);\n }\n const isAzureHost = url.hostname.endsWith(\".openai.azure.com\") ||\n url.hostname.endsWith(\".cognitiveservices.azure.com\") ||\n url.hostname.endsWith(\".ai.azure.com\");\n const normalizedPath = url.pathname.replace(/\\/+$/, \"\");\n // Ensure Azure hosts have /openai/v1 as base path so the AzureOpenAI SDK\n // can append /deployments/<model>/... and ?api-version=v1 correctly.\n if (isAzureHost &&\n (normalizedPath === \"\" ||\n normalizedPath === \"/\" ||\n normalizedPath === \"/openai\" ||\n normalizedPath === \"/openai/v1/responses\")) {\n url.pathname = \"/openai/v1\";\n url.search = \"\";\n }\n return url.toString().replace(/\\/+$/, \"\");\n}\nfunction buildDefaultBaseUrl(resourceName) {\n return `https://${resourceName}.openai.azure.com/openai/v1`;\n}\nfunction resolveAzureConfig(model, options) {\n const apiVersion = options?.azureApiVersion ||\n getProviderEnvValue(\"AZURE_OPENAI_API_VERSION\", options?.env) ||\n DEFAULT_AZURE_API_VERSION;\n const baseUrl = options?.azureBaseUrl?.trim() || getProviderEnvValue(\"AZURE_OPENAI_BASE_URL\", options?.env)?.trim() || undefined;\n const resourceName = options?.azureResourceName || getProviderEnvValue(\"AZURE_OPENAI_RESOURCE_NAME\", options?.env);\n let resolvedBaseUrl = baseUrl;\n if (!resolvedBaseUrl && resourceName) {\n resolvedBaseUrl = buildDefaultBaseUrl(resourceName);\n }\n if (!resolvedBaseUrl && model.baseUrl) {\n resolvedBaseUrl = model.baseUrl;\n }\n if (!resolvedBaseUrl) {\n throw new Error(\"Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.\");\n }\n return {\n baseUrl: normalizeAzureBaseUrl(resolvedBaseUrl),\n apiVersion,\n };\n}\nfunction createClient(model, apiKey, options) {\n const headers = { ...model.headers };\n if (options?.headers) {\n Object.assign(headers, options.headers);\n }\n const { baseUrl, apiVersion } = resolveAzureConfig(model, options);\n return new AzureOpenAI({\n apiKey,\n apiVersion,\n dangerouslyAllowBrowser: true,\n fetch: options?.fetch,\n defaultHeaders: headers,\n baseURL: baseUrl,\n });\n}\nfunction buildParams(model, context, options, deploymentName, grammarToolInputProperties = createGrammarToolInputProperties(context.tools, model.compat?.supportsOpenAIGrammarTools ?? false)) {\n const messages = convertResponsesMessages(model, context, AZURE_TOOL_CALL_PROVIDERS, {\n grammarToolInputProperties,\n });\n const params = {\n model: deploymentName,\n input: messages,\n stream: true,\n prompt_cache_key: clampOpenAIPromptCacheKey(options?.sessionId),\n store: false,\n };\n if (options?.maxTokens) {\n params.max_output_tokens = Math.max(options.maxTokens, OPENAI_RESPONSES_MIN_OUTPUT_TOKENS);\n }\n if (options?.temperature !== undefined) {\n params.temperature = options?.temperature;\n }\n if (context.tools && context.tools.length > 0) {\n params.tools = convertResponsesTools(context.tools, {\n supportsStrictMode: model.compat?.supportsStrictMode ?? true,\n supportsOpenAIGrammarTools: model.compat?.supportsOpenAIGrammarTools ?? false,\n });\n }\n if (model.reasoning) {\n if (options?.reasoningEffort || options?.reasoningSummary) {\n const effort = options?.reasoningEffort\n ? (model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort)\n : \"medium\";\n params.reasoning = {\n effort: effort,\n summary: options?.reasoningSummary || \"auto\",\n };\n params.include = [\"reasoning.encrypted_content\"];\n }\n else if (model.thinkingLevelMap?.off !== null) {\n params.reasoning = {\n effort: (model.thinkingLevelMap?.off ?? \"none\"),\n };\n }\n }\n // Last so custom keys override the named request fields.\n if (options?.samplingParams) {\n Object.assign(params, options.samplingParams);\n }\n return params;\n}\n//# sourceMappingURL=azure-openai-responses.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAWA,MAAM,4BAA4B;AAClC,MAAM,4CAA4B,IAAI,IAAI;CAAC;CAAU;CAAgB;CAAY;AAAwB,CAAC;AAE1G,MAAM,qCAAqC;AAC3C,SAAS,uBAAuB,OAAO;CACnC,MAAM,sBAAM,IAAI,IAAI;CACpB,IAAI,CAAC,OACD,OAAO;CACX,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG,GAAG;EAClC,MAAM,UAAU,MAAM,KAAK;EAC3B,IAAI,CAAC,SACD;EACJ,MAAM,CAAC,SAAS,kBAAkB,QAAQ,MAAM,KAAK,CAAC;EACtD,IAAI,CAAC,WAAW,CAAC,gBACb;EACJ,IAAI,IAAI,QAAQ,KAAK,GAAG,eAAe,KAAK,CAAC;CACjD;CACA,OAAO;AACX;AACA,SAAS,sBAAsB,OAAO,SAAS;CAC3C,IAAI,SAAS,qBACT,OAAO,QAAQ;CAGnB,OADyB,uBAAuB,oBAAoB,oCAAoC,SAAS,GAAG,CAAC,CAAC,CAAC,IAAI,MAAM,EAC3G,KAAK,MAAM;AACrC;AACA,SAAS,uBAAuB,OAAO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A,yBAAyB;EACzB,OAAO,SAAS;EAChB,gBAAgB;EAChB,SAAS;CACb,CAAC;AACL;AACA,SAAS,YAAY,OAAO,SAAS,SAAS,gBAAgB,6BAA6B,iCAAiC,QAAQ,OAAO,MAAM,QAAQ,8BAA8B,KAAK,GAAG;CAI3L,MAAM,SAAS;EACX,OAAO;EACP,OALa,yBAAyB,OAAO,SAAS,2BAA2B,EACjF,2BACJ,CAGkB;EACd,QAAQ;EACR,kBAAkB,0BAA0B,SAAS,SAAS;EAC9D,OAAO;CACX;CACA,IAAI,SAAS,WACT,OAAO,oBAAoB,KAAK,IAAI,QAAQ,WAAW,kCAAkC;CAE7F,IAAI,SAAS,gBAAgB,KAAA,GACzB,OAAO,cAAc,SAAS;CAElC,IAAI,QAAQ,SAAS,QAAQ,MAAM,SAAS,GACxC,OAAO,QAAQ,sBAAsB,QAAQ,OAAO;EAChD,oBAAoB,MAAM,QAAQ,sBAAsB;EACxD,4BAA4B,MAAM,QAAQ,8BAA8B;CAC5E,CAAC;CAEL,IAAI,MAAM,WAAW;EACjB,IAAI,SAAS,mBAAmB,SAAS,kBAAkB;GAIvD,OAAO,YAAY;IACf,QAJW,SAAS,kBACjB,MAAM,mBAAmB,QAAQ,oBAAoB,QAAQ,kBAC9D;IAGF,SAAS,SAAS,oBAAoB;GAC1C;GACA,OAAO,UAAU,CAAC,6BAA6B;EACnD,OACK,IAAI,MAAM,kBAAkB,QAAQ,MACrC,OAAO,YAAY,EACf,QAAS,MAAM,kBAAkB,OAAO,OAC5C;CAER;CAEA,IAAI,SAAS,gBACT,OAAO,OAAO,QAAQ,QAAQ,cAAc;CAEhD,OAAO;AACX"}
1
+ {"version":3,"file":"azure-openai-responses-A67VbaZ1.mjs","names":[],"sources":["../node_modules/.pnpm/@earendil-works+pi-ai@0.84.1_ws@8.21.3_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js"],"sourcesContent":["import { AzureOpenAI } from \"openai\";\nimport { clampThinkingLevel } from \"../models.js\";\nimport { formatProviderError, normalizeProviderError } from \"../utils/error-body.js\";\nimport { AssistantMessageEventStream } from \"../utils/event-stream.js\";\nimport { headersToRecord } from \"../utils/headers.js\";\nimport { getProviderEnvValue } from \"../utils/provider-env.js\";\nimport { retryProviderRequest } from \"../utils/provider-retry.js\";\nimport { createGrammarToolInputProperties } from \"./constrained-sampling.js\";\nimport { clampOpenAIPromptCacheKey } from \"./openai-prompt-cache.js\";\nimport { convertResponsesMessages, convertResponsesTools, processResponsesStream } from \"./openai-responses-shared.js\";\nimport { buildBaseOptions } from \"./simple-options.js\";\nconst DEFAULT_AZURE_API_VERSION = \"v1\";\nconst AZURE_TOOL_CALL_PROVIDERS = new Set([\"openai\", \"openai-codex\", \"opencode\", \"azure-openai-responses\"]);\n// OpenAI Responses rejects max_output_tokens below 16: https://github.com/earendil-works/pi/issues/6265\nconst OPENAI_RESPONSES_MIN_OUTPUT_TOKENS = 16;\nfunction parseDeploymentNameMap(value) {\n const map = new Map();\n if (!value)\n return map;\n for (const entry of value.split(\",\")) {\n const trimmed = entry.trim();\n if (!trimmed)\n continue;\n const [modelId, deploymentName] = trimmed.split(\"=\", 2);\n if (!modelId || !deploymentName)\n continue;\n map.set(modelId.trim(), deploymentName.trim());\n }\n return map;\n}\nfunction resolveDeploymentName(model, options) {\n if (options?.azureDeploymentName) {\n return options.azureDeploymentName;\n }\n const mappedDeployment = parseDeploymentNameMap(getProviderEnvValue(\"AZURE_OPENAI_DEPLOYMENT_NAME_MAP\", options?.env)).get(model.id);\n return mappedDeployment || model.id;\n}\nfunction formatAzureOpenAIError(error) {\n return formatProviderError(normalizeProviderError(error), \"Azure OpenAI API error\");\n}\n/**\n * Generate function for Azure OpenAI Responses API\n */\nexport const stream = (model, context, options) => {\n const stream = new AssistantMessageEventStream();\n // Start async processing\n (async () => {\n const deploymentName = resolveDeploymentName(model, options);\n const output = {\n role: \"assistant\",\n content: [],\n api: \"azure-openai-responses\",\n provider: model.provider,\n model: model.id,\n usage: {\n input: 0,\n output: 0,\n cacheRead: 0,\n cacheWrite: 0,\n totalTokens: 0,\n cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },\n },\n stopReason: \"pending\",\n timestamp: Date.now(),\n };\n try {\n // Create Azure OpenAI client\n const apiKey = options?.apiKey;\n if (!apiKey) {\n throw new Error(`No API key for provider: ${model.provider}`);\n }\n const client = createClient(model, apiKey, options);\n const grammarToolInputProperties = createGrammarToolInputProperties(context.tools, model.compat?.supportsOpenAIGrammarTools ?? false);\n let params = buildParams(model, context, options, deploymentName, grammarToolInputProperties);\n const nextParams = await options?.onPayload?.(params, model);\n if (nextParams !== undefined) {\n params = nextParams;\n }\n const requestOptions = {\n ...(options?.signal ? { signal: options.signal } : {}),\n ...(options?.timeoutMs !== undefined ? { timeout: options.timeoutMs } : {}),\n maxRetries: 0,\n };\n const { data: openaiStream, response } = await retryProviderRequest(() => client.responses.create(params, requestOptions).withResponse(), {\n maxRetries: options?.maxRetries,\n maxRetryDelayMs: options?.maxRetryDelayMs,\n signal: options?.signal,\n });\n await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);\n stream.push({ type: \"start\", partial: output });\n await processResponsesStream(openaiStream, output, stream, model, { grammarToolInputProperties });\n if (options?.signal?.aborted) {\n throw new Error(\"Request was aborted\");\n }\n if (output.stopReason === \"pending\") {\n throw new Error(\"Azure OpenAI Responses stream ended without a stop reason\");\n }\n if (output.stopReason === \"aborted\" || output.stopReason === \"error\") {\n throw new Error(output.errorMessage || \"An unknown error occurred\");\n }\n stream.push({ type: \"done\", reason: output.stopReason, message: output });\n stream.end();\n }\n catch (error) {\n for (const block of output.content) {\n delete block.index;\n // Streaming scratch buffers are only used during parsing; never persist them.\n delete block.partialJson;\n delete block.customInput;\n }\n output.stopReason = options?.signal?.aborted ? \"aborted\" : \"error\";\n output.errorMessage = formatAzureOpenAIError(error);\n stream.push({ type: \"error\", reason: output.stopReason, error: output });\n stream.end();\n }\n })();\n return stream;\n};\nexport const streamSimple = (model, context, options) => {\n const apiKey = options?.apiKey;\n if (!apiKey) {\n throw new Error(`No API key for provider: ${model.provider}`);\n }\n const base = buildBaseOptions(model, context, options, apiKey);\n const clampedReasoning = options?.reasoning ? clampThinkingLevel(model, options.reasoning) : undefined;\n const reasoningEffort = clampedReasoning === \"off\" ? undefined : clampedReasoning;\n return stream(model, context, {\n ...base,\n reasoningEffort,\n });\n};\nfunction normalizeAzureBaseUrl(baseUrl) {\n const trimmed = baseUrl.trim().replace(/\\/+$/, \"\");\n let url;\n try {\n url = new URL(trimmed);\n }\n catch {\n throw new Error(`Invalid Azure OpenAI base URL: ${baseUrl}`);\n }\n const isAzureHost = url.hostname.endsWith(\".openai.azure.com\") ||\n url.hostname.endsWith(\".cognitiveservices.azure.com\") ||\n url.hostname.endsWith(\".ai.azure.com\");\n const normalizedPath = url.pathname.replace(/\\/+$/, \"\");\n // Ensure Azure hosts have /openai/v1 as base path so the AzureOpenAI SDK\n // can append /deployments/<model>/... and ?api-version=v1 correctly.\n if (isAzureHost &&\n (normalizedPath === \"\" ||\n normalizedPath === \"/\" ||\n normalizedPath === \"/openai\" ||\n normalizedPath === \"/openai/v1/responses\")) {\n url.pathname = \"/openai/v1\";\n url.search = \"\";\n }\n return url.toString().replace(/\\/+$/, \"\");\n}\nfunction buildDefaultBaseUrl(resourceName) {\n return `https://${resourceName}.openai.azure.com/openai/v1`;\n}\nfunction resolveAzureConfig(model, options) {\n const apiVersion = options?.azureApiVersion ||\n getProviderEnvValue(\"AZURE_OPENAI_API_VERSION\", options?.env) ||\n DEFAULT_AZURE_API_VERSION;\n const baseUrl = options?.azureBaseUrl?.trim() || getProviderEnvValue(\"AZURE_OPENAI_BASE_URL\", options?.env)?.trim() || undefined;\n const resourceName = options?.azureResourceName || getProviderEnvValue(\"AZURE_OPENAI_RESOURCE_NAME\", options?.env);\n let resolvedBaseUrl = baseUrl;\n if (!resolvedBaseUrl && resourceName) {\n resolvedBaseUrl = buildDefaultBaseUrl(resourceName);\n }\n if (!resolvedBaseUrl && model.baseUrl) {\n resolvedBaseUrl = model.baseUrl;\n }\n if (!resolvedBaseUrl) {\n throw new Error(\"Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.\");\n }\n return {\n baseUrl: normalizeAzureBaseUrl(resolvedBaseUrl),\n apiVersion,\n };\n}\nfunction createClient(model, apiKey, options) {\n const headers = { ...model.headers };\n if (options?.headers) {\n Object.assign(headers, options.headers);\n }\n const { baseUrl, apiVersion } = resolveAzureConfig(model, options);\n return new AzureOpenAI({\n apiKey,\n apiVersion,\n dangerouslyAllowBrowser: true,\n fetch: options?.fetch,\n defaultHeaders: headers,\n baseURL: baseUrl,\n });\n}\nfunction buildParams(model, context, options, deploymentName, grammarToolInputProperties = createGrammarToolInputProperties(context.tools, model.compat?.supportsOpenAIGrammarTools ?? false)) {\n const messages = convertResponsesMessages(model, context, AZURE_TOOL_CALL_PROVIDERS, {\n grammarToolInputProperties,\n });\n const params = {\n model: deploymentName,\n input: messages,\n stream: true,\n prompt_cache_key: clampOpenAIPromptCacheKey(options?.sessionId),\n store: false,\n };\n if (options?.maxTokens) {\n params.max_output_tokens = Math.max(options.maxTokens, OPENAI_RESPONSES_MIN_OUTPUT_TOKENS);\n }\n if (options?.temperature !== undefined) {\n params.temperature = options?.temperature;\n }\n if (context.tools && context.tools.length > 0) {\n params.tools = convertResponsesTools(context.tools, {\n supportsStrictMode: model.compat?.supportsStrictMode ?? true,\n supportsOpenAIGrammarTools: model.compat?.supportsOpenAIGrammarTools ?? false,\n });\n }\n if (model.reasoning) {\n if (options?.reasoningEffort || options?.reasoningSummary) {\n const effort = options?.reasoningEffort\n ? (model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort)\n : \"medium\";\n params.reasoning = {\n effort: effort,\n summary: options?.reasoningSummary || \"auto\",\n };\n params.include = [\"reasoning.encrypted_content\"];\n }\n else if (model.thinkingLevelMap?.off !== null) {\n params.reasoning = {\n effort: (model.thinkingLevelMap?.off ?? \"none\"),\n };\n }\n }\n // Last so custom keys override the named request fields.\n if (options?.samplingParams) {\n Object.assign(params, options.samplingParams);\n }\n return params;\n}\n//# sourceMappingURL=azure-openai-responses.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAWA,MAAM,4BAA4B;AAClC,MAAM,4CAA4B,IAAI,IAAI;CAAC;CAAU;CAAgB;CAAY;AAAwB,CAAC;AAE1G,MAAM,qCAAqC;AAC3C,SAAS,uBAAuB,OAAO;CACnC,MAAM,sBAAM,IAAI,IAAI;CACpB,IAAI,CAAC,OACD,OAAO;CACX,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG,GAAG;EAClC,MAAM,UAAU,MAAM,KAAK;EAC3B,IAAI,CAAC,SACD;EACJ,MAAM,CAAC,SAAS,kBAAkB,QAAQ,MAAM,KAAK,CAAC;EACtD,IAAI,CAAC,WAAW,CAAC,gBACb;EACJ,IAAI,IAAI,QAAQ,KAAK,GAAG,eAAe,KAAK,CAAC;CACjD;CACA,OAAO;AACX;AACA,SAAS,sBAAsB,OAAO,SAAS;CAC3C,IAAI,SAAS,qBACT,OAAO,QAAQ;CAGnB,OADyB,uBAAuB,oBAAoB,oCAAoC,SAAS,GAAG,CAAC,CAAC,CAAC,IAAI,MAAM,EAC3G,KAAK,MAAM;AACrC;AACA,SAAS,uBAAuB,OAAO;CACnC,OAAO,oBAAoB,uBAAuB,KAAK,GAAG,wBAAwB;AACtF;;;;AAIA,MAAa,UAAU,OAAO,SAAS,YAAY;CAC/C,MAAM,SAAS,IAAI,4BAA4B;CAE/C,CAAC,YAAY;EACT,MAAM,iBAAiB,sBAAsB,OAAO,OAAO;EAC3D,MAAM,SAAS;GACX,MAAM;GACN,SAAS,CAAC;GACV,KAAK;GACL,UAAU,MAAM;GAChB,OAAO,MAAM;GACb,OAAO;IACH,OAAO;IACP,QAAQ;IACR,WAAW;IACX,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CACA,IAAI,SAAS,WACT,OAAO,oBAAoB,KAAK,IAAI,QAAQ,WAAW,kCAAkC;CAE7F,IAAI,SAAS,gBAAgB,KAAA,GACzB,OAAO,cAAc,SAAS;CAElC,IAAI,QAAQ,SAAS,QAAQ,MAAM,SAAS,GACxC,OAAO,QAAQ,sBAAsB,QAAQ,OAAO;EAChD,oBAAoB,MAAM,QAAQ,sBAAsB;EACxD,4BAA4B,MAAM,QAAQ,8BAA8B;CAC5E,CAAC;CAEL,IAAI,MAAM,WAAW;EACjB,IAAI,SAAS,mBAAmB,SAAS,kBAAkB;GAIvD,OAAO,YAAY;IACf,QAJW,SAAS,kBACjB,MAAM,mBAAmB,QAAQ,oBAAoB,QAAQ,kBAC9D;IAGF,SAAS,SAAS,oBAAoB;GAC1C;GACA,OAAO,UAAU,CAAC,6BAA6B;EACnD,OACK,IAAI,MAAM,kBAAkB,QAAQ,MACrC,OAAO,YAAY,EACf,QAAS,MAAM,kBAAkB,OAAO,OAC5C;CAER;CAEA,IAAI,SAAS,gBACT,OAAO,OAAO,QAAQ,QAAQ,cAAc;CAEhD,OAAO;AACX"}
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as analyzePackage, c as EVENT_RULES, i as generateBundle, l as HOST_IMPORT_RULES, n as convertPiMcpConfig, o as API_RULES, p as UI_CONTEXT_RULES, r as renderMcpPatch, s as CONTEXT_RULES } from "./mcp-config-D2B3kv-Z.mjs";
2
+ import { a as analyzePackage, c as EVENT_RULES, i as generateBundle, l as HOST_IMPORT_RULES, n as convertPiMcpConfig, o as API_RULES, p as UI_CONTEXT_RULES, r as renderMcpPatch, s as CONTEXT_RULES } from "./mcp-config-B3h5jTBb.mjs";
3
3
  import { t as resolvePiPackage } from "./source-0sA5z08z.mjs";
4
4
  import { writeFileSync } from "node:fs";
5
5
  import { parseArgs } from "node:util";
@@ -1,41 +1,6 @@
1
1
 
2
- import { $ as TPickDeferred, $n as Integer, $r as IsAny, $t as This, A as TTuple, An as IsUnion, Ar as _Object_, At as ConstructorParameters, B as With, Bn as IsNumber, Br as Boolean, Bt as TUncapitalizeDeferred, C as Constructor, Cn as IsVoid, Cr as IsGeneric, Ct as TIndexDeferred, D as TFunction, Dn as IsUnsafe, Dr as TRef, Dt as Exclude, E as IsFunction, En as result_d_exports, Er as Ref, Et as TExtractDeferred, F as Instantiate, Fn as String, Fr as TUnknown, Ft as TConditionalDeferred, G as TRequired, Gn as TNull, Gr as TBigInt, Gt as Capitalize, H as TReturnType, Hn as TNumber, Hr as TBoolean, Ht as Lowercase, I as TInstantiate, In as TString, Ir as Unknown, It as TUppercase, J as ReadonlyType, Jn as TLiteral, Jr as _Array_, Jt as Call, K as TRequiredDeferred, Kn as IsLiteral, Kr as IsArray, Kt as TCapitalize, L as TInstantiateType, Ln as IsSymbol, Lr as IsReadonly, Lt as TUppercaseDeferred, M as IsOptional, Mn as Union, Mr as Parameter, Mt as TConstructorParametersDeferred, N as Optional, Nn as TScript$1, Nr as TParameter, Nt as Conditional, O as _Function_, On as TUnsafe, Or as IsObject, Ot as TExclude, P as TOptional, Pn as IsString, Pr as IsUnknown, Pt as TConditional, Q as TPick, Qn as TIntersect, Qr as Any, Qt as TThis, R as TState, Rn as Symbol$1, Rr as Readonly, Rt as Uppercase, S as StaticParse, Sn as TRest, Sr as Generic, St as TIndex, T as TConstructor, Tn as Void, Tr as IsRef, Tt as TExtract, U as TReturnTypeDeferred, Un as IsNull, Ur as BigInt, Ut as TLowercase, V as ReturnType, Vn as Number, Vr as IsBoolean, Vt as Uncapitalize, W as Required, Wn as Null, Wr as IsBigInt, Wt as TLowercaseDeferred, X as TReadonlyObjectDeferred, Xn as Intersect, Xr as IsImmutable, Xt as TCall, Y as TReadonlyObject, Yn as TLiteralValue, Yr as Immutable, Yt as IsCall, Z as Pick, Zn as IsIntersect, Zr as TImmutable, Zt as IsThis, _ as TProperties, _i as TStringOptions, _n as IsUndefined, _r as IsCyclic, _t as TKeyOfDeferred, a as TextContent, ai as EncodeBuilder, an as TRecord, ar as Dependent, at as TParametersDeferred, b as StaticDecode, bn as IsRest, br as Never, bt as TInstanceTypeDeferred, c as ToolResultMessage, ci as IsKind, cn as TRecordValue, cr as Identifier, ct as TOmitDeferred, d as Module, di as TFormat, dn as TemplateLiteral, dr as Enum, dt as TNonNullableDeferred, ei as TAny, en as IsRecord, er as IsInteger, et as Partial$1, f as TModule, fi as TIntersectOptions, fn as Extends, fr as IsEnum, ft as Mapped, g as TEvaluateDeferred, gi as TSchemaOptions, gn as TInterfaceDeferred, gr as Cyclic, gt as TKeyOf, h as TEvaluate, hi as TSchema, hn as TInterface, hr as TEnumValue, ht as KeyOf, i as Message, ii as Encode, in as RecordValue, ir as TInfer, it as TParameters, j as Tuple, jn as TUnion, jr as IsParameter, jt as TConstructorParameters, k as IsTuple, kn as Unsafe, kr as TObject, kt as TExcludeDeferred, l as Usage, li as IsSchema, ln as IsTemplateLiteral, lr as IsIdentifier, lt as NonNullable, m as Evaluate, mi as TObjectOptions, mn as Interface, mr as TEnum, mt as TMappedDeferred, n as AssistantMessage, ni as Decode, nn as RecordKey, nr as Infer, nt as TPartialDeferred, o as ThinkingContent, oi as IsCodec, on as TRecordKey, or as IsDependent, ot as Omit, p as TModuleDeferred, pi as TNumberOptions, pn as TExtends, pr as IsEnumValue, pt as TMapped, q as ReadonlyObject, qn as Literal, qr as TArray, qt as TCapitalizeDeferred, r as ImageContent, ri as DecodeBuilder, rn as RecordPattern, rr as IsInfer, rt as Parameters, s as ToolCallContent, si as TCodec, sn as TRecordPattern, sr as TDependent, st as TOmit, t as AgentMessage, ti as Codec, tn as Record$1, tr as TInteger, tt as TPartial, u as UserMessage, ui as TArrayOptions, un as TTemplateLiteral, ur as TIdentifier, ut as TNonNullable, v as TRequiredArray, vi as TTupleOptions, vn as TUndefined, vr as TCyclic, vt as InstanceType, w as IsConstructor, wn as TVoid, wr as TGeneric, wt as Extract, x as StaticEncode, xn as Rest, xr as TNever, xt as Index, y as Static, yn as Undefined, yr as IsNever, yt as TInstanceType, z as TWith, zn as TSymbol, zr as TReadonly, zt as TUncapitalize } from "../pi-types-BLt46jaf.mjs";
3
- //#region node_modules/.pnpm/typebox@1.3.13/node_modules/typebox/build/type/types/_refine.d.mts
4
- /** Applies a Refine check to the given type. */
5
- type TRefineAdd<Type extends TSchema = TSchema> = ('~refine' extends keyof Type ? Type : TRefine<Type>);
6
- /** Represents a type with embedded Refine check. */
7
- type TRefine<Type extends TSchema = TSchema> = (Type & {
8
- '~refine': TRefinement<unknown>[];
9
- });
10
- type TRefineCheckCallback<Value extends unknown = unknown> = (value: Value) => boolean;
11
- type TRefineErrorCallback<Value extends unknown = unknown> = (value: Value) => string;
12
- interface TRefinement<Value extends unknown = unknown> {
13
- check: TRefineCheckCallback<Value>;
14
- error: TRefineErrorCallback<Value>;
15
- }
16
- /** Refines a type with an explicit check */
17
- declare function Refine<Type extends TSchema, Value = Static<Type>>(type: Type, check: TRefineCheckCallback<Value>, error: TRefineErrorCallback<Value>): TRefineAdd<Type>;
18
- /** Refines a type with an explicit check */
19
- declare function Refine<Type extends TSchema, Value = Static<Type>>(type: Type, check: TRefineCheckCallback<Value>): TRefineAdd<Type>;
20
- /** Returns true if the given value is a TRefine. */
21
- declare function IsRefine(value: unknown): value is TRefine;
22
- //#endregion
23
- //#region node_modules/.pnpm/typebox@1.3.13/node_modules/typebox/build/type/script/script.d.mts
24
- type TScriptOptions = TArrayOptions | TIntersectOptions | TNumberOptions | TObjectOptions | TStringOptions | TTupleOptions;
25
- /** Parses a string-based TypeScript type expression into a TypeBox type. */
26
- type TScript<Context extends TProperties, Input extends string> = (TScript$1<Input> extends [infer Type extends TSchema, string] ? TInstantiateType<Context, TState<[], []>, Type> : TNever);
27
- /** Parses a type from a TypeScript type expression */
28
- declare function Script<Script extends string>(input: Script): TScript<{}, Script>;
29
- /** Parses a type from a TypeScript type expression */
30
- declare function Script<Context extends TProperties, Script extends string>(context: Context, input: Script): TScript<Context, Script>;
31
- /** Parses a type from a TypeScript type expression */
32
- declare function Script<Script extends string>(input: Script, options: TScriptOptions): TScript<{}, Script>;
33
- /** Parses a type from a TypeScript type expression */
34
- declare function Script<Context extends TProperties, Script extends string>(context: Context, input: Script, options: TScriptOptions): TScript<Context, Script>;
35
- declare namespace typebox_d_exports {
36
- export { Any, _Array_ as Array, BigInt, Boolean, Call, Capitalize, Codec, Conditional, Constructor, ConstructorParameters, Cyclic, Decode, DecodeBuilder, Dependent, Encode, EncodeBuilder, Enum, Evaluate, Exclude, Extends, result_d_exports as ExtendsResult, Extract, _Function_ as Function, Generic, Identifier, Immutable, Index, Infer, InstanceType, Instantiate, Integer, Interface, Intersect, IsAny, IsArray, IsBigInt, IsBoolean, IsCall, IsCodec, IsConstructor, IsCyclic, IsDependent, IsEnum, IsEnumValue, IsFunction, IsGeneric, IsIdentifier, IsImmutable, IsInfer, IsInteger, IsIntersect, IsKind, IsLiteral, IsNever, IsNull, IsNumber, IsObject, IsOptional, IsParameter, IsReadonly, IsRecord, IsRef, IsRefine, IsRest, IsSchema, IsString, IsSymbol, IsTemplateLiteral, IsThis, IsTuple, IsUndefined, IsUnion, IsUnknown, IsUnsafe, IsVoid, KeyOf, Literal, Lowercase, Mapped, Module, Never, NonNullable, Null, Number, _Object_ as Object, Omit, Optional, Parameter, Parameters, Partial$1 as Partial, Pick, Readonly, ReadonlyObject, ReadonlyType, Record$1 as Record, RecordKey, RecordPattern, RecordValue, Ref, Refine, Required, Rest, ReturnType, Script, Static, StaticDecode, StaticEncode, StaticParse, String, Symbol$1 as Symbol, TAny, TArray, TArrayOptions, TBigInt, TBoolean, TCall, TCapitalize, TCapitalizeDeferred, TCodec, TConditional, TConditionalDeferred, TConstructor, TConstructorParameters, TConstructorParametersDeferred, TCyclic, TDependent, TEnum, TEnumValue, TEvaluate, TEvaluateDeferred, TExclude, TExcludeDeferred, TExtends, TExtract, TExtractDeferred, TFormat, TFunction, TGeneric, TIdentifier, TImmutable, TIndex, TIndexDeferred, TInfer, TInstanceType, TInstanceTypeDeferred, TInstantiate, TInteger, TInterface, TInterfaceDeferred, TIntersect, TIntersectOptions, TKeyOf, TKeyOfDeferred, TLiteral, TLiteralValue, TLowercase, TLowercaseDeferred, TMapped, TMappedDeferred, TModule, TModuleDeferred, TNever, TNonNullable, TNonNullableDeferred, TNull, TNumber, TNumberOptions, TObject, TObjectOptions, TOmit, TOmitDeferred, TOptional, TParameter, TParameters, TParametersDeferred, TPartial, TPartialDeferred, TPick, TPickDeferred, TProperties, TReadonly, TReadonlyObject, TReadonlyObjectDeferred, TRecord, TRecordKey, TRecordPattern, TRecordValue, TRef, TRefine, TRefineCheckCallback, TRefineErrorCallback, TRefinement, TRequired, TRequiredArray, TRequiredDeferred, TRest, TReturnType, TReturnTypeDeferred, TSchema, TSchemaOptions, TScript, TString, TStringOptions, TSymbol, TTemplateLiteral, TThis, TTuple, TTupleOptions, TUncapitalize, TUncapitalizeDeferred, TUndefined, TUnion, TUnknown, TUnsafe, TUppercase, TUppercaseDeferred, TVoid, TWith, TemplateLiteral, This, Tuple, Uncapitalize, Undefined, Union, Unknown, Unsafe, Uppercase, Void, With };
37
- }
38
- //#endregion
2
+ import { a as TextContent, c as ToolResultMessage, i as Message, l as Usage, n as AssistantMessage, o as ThinkingContent, r as ImageContent, s as ToolCallContent, t as AgentMessage, u as UserMessage } from "../pi-types-KazmR2O5.mjs";
3
+ import { Static, TSchema, Type } from "typebox";
39
4
  //#region src/compat/vendor/pi-ai-overflow.d.ts
40
5
  /**
41
6
  * Check if an assistant message represents a context overflow error.
@@ -366,5 +331,5 @@ declare function StringEnum<T extends readonly string[]>(values: T, options?: St
366
331
  default?: T[number];
367
332
  };
368
333
  //#endregion
369
- export { type AgentMessage, Api, type AssistantMessage, AssistantMessageEventStream, type ImageContent, type Message, Model, ModelThinkingLevel, ModelsError, type Static, StringEnum, StringEnumOptions, type TSchema, type TextContent, type ThinkingContent, ThinkingLevel, ThinkingLevelMap, type ToolCallContent, type ToolResultMessage, typebox_d_exports as Type, type Usage, type UserMessage, __setPiAiLlmBridge, anthropicMessagesApi, anthropicOAuth, builtinProviders, clampThinkingLevel, complete, contentText, createProvider, generatePKCE, getApiProvider, getApiProviders, getModel, getModels, getProvider, getProviders, getSupportedThinkingLevels, githubCopilotOAuth, isContextOverflow, isRecoverableLength, isRetryableAssistantError, kimiCodingOAuth, lazyApi, lazyStream, loadAnthropicOAuth, loadGitHubCopilotOAuth, loadKimiCodingOAuth, loadOpenAICodexOAuth, modelsAreEqual, openAICompletionsApi, openAIResponsesApi, openaiCodexOAuth, pollOAuthDeviceCodeFlow, realBuiltinProvider, registerApiProvider, registerProvider, stream, unregisterApiProviders, uuidv7 };
334
+ export { type AgentMessage, Api, type AssistantMessage, AssistantMessageEventStream, type ImageContent, type Message, Model, ModelThinkingLevel, ModelsError, type Static, StringEnum, StringEnumOptions, type TSchema, type TextContent, type ThinkingContent, ThinkingLevel, ThinkingLevelMap, type ToolCallContent, type ToolResultMessage, Type, type Usage, type UserMessage, __setPiAiLlmBridge, anthropicMessagesApi, anthropicOAuth, builtinProviders, clampThinkingLevel, complete, contentText, createProvider, generatePKCE, getApiProvider, getApiProviders, getModel, getModels, getProvider, getProviders, getSupportedThinkingLevels, githubCopilotOAuth, isContextOverflow, isRecoverableLength, isRetryableAssistantError, kimiCodingOAuth, lazyApi, lazyStream, loadAnthropicOAuth, loadGitHubCopilotOAuth, loadKimiCodingOAuth, loadOpenAICodexOAuth, modelsAreEqual, openAICompletionsApi, openAIResponsesApi, openaiCodexOAuth, pollOAuthDeviceCodeFlow, realBuiltinProvider, registerApiProvider, registerProvider, stream, unregisterApiProviders, uuidv7 };
370
335
  //# sourceMappingURL=pi-ai.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pi-ai.d.mts","names":[],"sources":["../../node_modules/.pnpm/typebox@1.3.13/node_modules/typebox/build/type/types/_refine.d.mts","../../node_modules/.pnpm/typebox@1.3.13/node_modules/typebox/build/type/script/script.d.mts","../../node_modules/.pnpm/typebox@1.3.13/node_modules/typebox/build/typebox.d.mts","../../src/compat/vendor/pi-ai-overflow.ts","../../src/compat/vendor/pi-ai-retry.ts","../../src/compat/vendor/pi-uuid.ts","../../src/compat/vendor/pi-ai-provider.ts","../../src/compat/vendor/pi-ai-event-stream.ts","../../src/compat/vendor/pi-ai-lazy.ts","../../src/compat/vendor/pi-oauth-flows/openai-codex.ts","../../src/compat/vendor/pi-oauth-flows/anthropic.ts","../../src/compat/vendor/pi-oauth-flows/github-copilot.ts","../../src/compat/vendor/pi-oauth-flows/kimi-coding.ts","../../src/compat/vendor/pi-oauth-flows/pkce.ts","../../src/compat/vendor/pi-oauth-flows/device-code.ts","../../src/compat/pi-ai.ts"],"x_google_ignoreList":[0,1,2],"mappings":";;;;KAGY,WAAW,aAAa,UAAU,oCAAoC,OAAO,OAAO,QAAQ;;KAI5F,QAAQ,aAAa,UAAU,YAAY;EACnD,WAAW;;KAEH,qBAAqB,oCAAoC,OAAO;KAChE,qBAAqB,oCAAoC,OAAO;UAC3D,YAAY;EACzB,OAAO,qBAAqB;EAC5B,OAAO,qBAAqB;;;iBAGR,OAAO,aAAa,SAAS,QAAQ,OAAO,OAAO,MAAM,MAAM,OAAO,qBAAqB,QAAQ,OAAO,qBAAqB,SAAS,WAAW;;iBAEnJ,OAAO,aAAa,SAAS,QAAQ,OAAO,OAAO,MAAM,MAAM,OAAO,qBAAqB,SAAS,WAAW;;iBAI/G,SAAS,iBAAiB,SAAS;;;KClB/C,iBAAiB,gBAAgB,oBAAoB,iBAAiB,iBAAiB,iBAAiB;;KAExG,QAAQ,gBAAgB,aAAa,yBAAyB,UAAe,sBAAsB,aAAa,mBAAmB,iBAAiB,SAAS,gBAAgB,QAAQ;;iBAEzK,OAAO,uBAAuB,OAAO,SAAS,YAAY;;iBAE1D,OAAO,gBAAgB,aAAa,uBAAuB,SAAS,SAAS,OAAO,SAAS,QAAQ,SAAS;;iBAE9G,OAAO,uBAAuB,OAAO,QAAQ,SAAS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B,kBAAkB;iBAazD,iBAAiB,cAAc;iBAM/B;iBAIA,YAAY;iBAIZ,SAAS,mBAAmB;iBAI5B,UAAU;;;;;;;iBA8CJ,oBAAoB,qBAAqB,QAAQ;iBAcvD;iBAIA;iBAIA;iBAwBA,oBAAoB;EAAQ;EAAY;EAAc;EAAa;EAAiB;EAAiB;IAAQ;;;cAYhH,4BAAiC;cACjC,0BAA+B;cAC/B,8BAAmC;cACnC,2BAAgC;UASnC;EACR;EACA,YAAY;EACZ,kBAAkB;;iBAaJ,oBAAoB,UAAU,mBAAmB;iBAWjD,eAAe,cAAc;iBAI7B,mBAAmB;iBAInB,uBAAuB;KAUlC,iBAAiB,OAAO,eAAe,SAAS,eAAe,SAAS;EAC3E,UAAU;GACT,OAAO,kBAAkB;;KAGvB,gBAAgB;iBAIL,mBAAmB,QAAQ;iBAWrB,SAAS,OAAO,eAAe,SAAS,eAAe,UAAU,gBAAgB;iBAOvF,OAAO,OAAO,eAAe,SAAS,eAAe,UAAU;UAI9D,kBAAkB;EACjC;EACA,UAAU;;iBAGI,WAAW,6BACzB,QAAQ,GACR,UAAS,kBAAkB;EACxB;EAAgB,MAAM;EAAG;EAAsB,UAAU"}
1
+ {"version":3,"file":"pi-ai.d.mts","names":[],"sources":["../../src/compat/vendor/pi-ai-overflow.ts","../../src/compat/vendor/pi-ai-retry.ts","../../src/compat/vendor/pi-uuid.ts","../../src/compat/vendor/pi-ai-provider.ts","../../src/compat/vendor/pi-ai-event-stream.ts","../../src/compat/vendor/pi-ai-lazy.ts","../../src/compat/vendor/pi-oauth-flows/openai-codex.ts","../../src/compat/vendor/pi-oauth-flows/anthropic.ts","../../src/compat/vendor/pi-oauth-flows/github-copilot.ts","../../src/compat/vendor/pi-oauth-flows/kimi-coding.ts","../../src/compat/vendor/pi-oauth-flows/pkce.ts","../../src/compat/vendor/pi-oauth-flows/device-code.ts","../../src/compat/pi-ai.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A;iBAwBA,oBAAoB;EAAQ;EAAY;EAAc;EAAa;EAAiB;EAAiB;IAAQ;;;cAYhH,4BAAiC;cACjC,0BAA+B;cAC/B,8BAAmC;cACnC,2BAAgC;UASnC;EACR;EACA,YAAY;EACZ,kBAAkB;;iBAaJ,oBAAoB,UAAU,mBAAmB;iBAWjD,eAAe,cAAc;iBAI7B,mBAAmB;iBAInB,uBAAuB;KAUlC,iBAAiB,OAAO,eAAe,SAAS,eAAe,SAAS;EAC3E,UAAU;GACT,OAAO,kBAAkB;;KAGvB,gBAAgB;iBAIL,mBAAmB,QAAQ;iBAWrB,SAAS,OAAO,eAAe,SAAS,eAAe,UAAU,gBAAgB;iBAOvF,OAAO,OAAO,eAAe,SAAS,eAAe,UAAU;UAI9D,kBAAkB;EACjC;EACA,UAAU;;iBAGI,WAAW,6BACzB,QAAQ,GACR,UAAS,kBAAkB;EACxB;EAAgB,MAAM;EAAG;EAAsB,UAAU"}
@@ -1,4 +1,4 @@
1
1
 
2
- import { c as uuidv7, t as typebox_exports } from "../build-BG7p2Lbr.mjs";
3
- import { A as openaiCodexOAuth, B as isRecoverableLength, C as registerApiProvider, D as kimiCodingOAuth, E as unregisterApiProviders, F as lazyApi, I as lazyStream, L as AssistantMessageEventStream, M as pollOAuthDeviceCodeFlow, N as ModelsError, O as githubCopilotOAuth, P as createProvider, R as isRetryableAssistantError, S as realBuiltinProvider, T as stream, _ as loadKimiCodingOAuth, a as clampThinkingLevel, b as openAICompletionsApi, c as getApiProvider, d as getModels, f as getProvider, g as loadGitHubCopilotOAuth, h as loadAnthropicOAuth, i as builtinProviders, j as generatePKCE, k as anthropicOAuth, l as getApiProviders, m as getSupportedThinkingLevels, n as __setPiAiLlmBridge, o as complete, p as getProviders, r as anthropicMessagesApi, s as contentText, t as StringEnum, u as getModel, v as loadOpenAICodexOAuth, w as registerProvider, x as openAIResponsesApi, y as modelsAreEqual, z as isContextOverflow } from "../pi-ai-DhYGgq4Y.mjs";
4
- export { AssistantMessageEventStream, ModelsError, StringEnum, typebox_exports as Type, __setPiAiLlmBridge, anthropicMessagesApi, anthropicOAuth, builtinProviders, clampThinkingLevel, complete, contentText, createProvider, generatePKCE, getApiProvider, getApiProviders, getModel, getModels, getProvider, getProviders, getSupportedThinkingLevels, githubCopilotOAuth, isContextOverflow, isRecoverableLength, isRetryableAssistantError, kimiCodingOAuth, lazyApi, lazyStream, loadAnthropicOAuth, loadGitHubCopilotOAuth, loadKimiCodingOAuth, loadOpenAICodexOAuth, modelsAreEqual, openAICompletionsApi, openAIResponsesApi, openaiCodexOAuth, pollOAuthDeviceCodeFlow, realBuiltinProvider, registerApiProvider, registerProvider, stream, unregisterApiProviders, uuidv7 };
2
+ import { A as anthropicOAuth, B as isContextOverflow, C as realBuiltinProvider, D as unregisterApiProviders, E as stream, F as createProvider, I as lazyApi, L as lazyStream, M as generatePKCE, N as pollOAuthDeviceCodeFlow, O as kimiCodingOAuth, P as ModelsError, R as AssistantMessageEventStream, S as openAIResponsesApi, T as registerProvider, V as isRecoverableLength, _ as loadGitHubCopilotOAuth, a as builtinProviders, b as modelsAreEqual, c as contentText, d as getModel, f as getModels, g as loadAnthropicOAuth, h as getSupportedThinkingLevels, i as anthropicMessagesApi, j as openaiCodexOAuth, k as githubCopilotOAuth, l as getApiProvider, m as getProviders, n as Type, o as clampThinkingLevel, p as getProvider, r as __setPiAiLlmBridge, s as complete, t as StringEnum, u as getApiProviders, v as loadKimiCodingOAuth, w as registerApiProvider, x as openAICompletionsApi, y as loadOpenAICodexOAuth, z as isRetryableAssistantError } from "../pi-ai-B_88Wb0r.mjs";
3
+ import { t as uuidv7 } from "../pi-uuid-Db8ShZsK.mjs";
4
+ export { AssistantMessageEventStream, ModelsError, StringEnum, Type, __setPiAiLlmBridge, anthropicMessagesApi, anthropicOAuth, builtinProviders, clampThinkingLevel, complete, contentText, createProvider, generatePKCE, getApiProvider, getApiProviders, getModel, getModels, getProvider, getProviders, getSupportedThinkingLevels, githubCopilotOAuth, isContextOverflow, isRecoverableLength, isRetryableAssistantError, kimiCodingOAuth, lazyApi, lazyStream, loadAnthropicOAuth, loadGitHubCopilotOAuth, loadKimiCodingOAuth, loadOpenAICodexOAuth, modelsAreEqual, openAICompletionsApi, openAIResponsesApi, openaiCodexOAuth, pollOAuthDeviceCodeFlow, realBuiltinProvider, registerApiProvider, registerProvider, stream, unregisterApiProviders, uuidv7 };
@@ -1,7 +1,8 @@
1
1
 
2
- import { Hn as TNumber, Hr as TBoolean, In as TString, P as TOptional, a as TextContent, i as Message, kr as TObject, l as Usage, qr as TArray, r as ImageContent, t as AgentMessage } from "../pi-types-BLt46jaf.mjs";
2
+ import { a as TextContent, i as Message, l as Usage, r as ImageContent, t as AgentMessage } from "../pi-types-KazmR2O5.mjs";
3
3
  import { B as SettingsListTheme, F as SelectListTheme, i as Component } from "../pi-tui-iHoF2tFc.mjs";
4
4
  import path$1 from "path";
5
+ import { Type } from "typebox";
5
6
  //#region src/compat/vendor/pi-messages.d.ts
6
7
  declare const COMPACTION_SUMMARY_PREFIX = "The conversation history before this point was compacted into the following summary:\n\n<summary>\n";
7
8
  declare const COMPACTION_SUMMARY_SUFFIX = "\n</summary>";
@@ -562,9 +563,9 @@ declare function createBashToolDefinition(cwd: any, options: any): {
562
563
  description: string;
563
564
  promptSnippet: string;
564
565
  promptGuidelines: string[] | undefined;
565
- parameters: TObject<{
566
- command: TString;
567
- timeout: TOptional<TNumber>;
566
+ parameters: Type.TObject<{
567
+ command: Type.TString;
568
+ timeout: Type.TOptional<Type.TNumber>;
568
569
  }>;
569
570
  execute(_toolCallId: any, { command, timeout }: {
570
571
  command: any;
@@ -600,10 +601,10 @@ declare function createReadToolDefinition(cwd: any, options: any): {
600
601
  description: string;
601
602
  promptSnippet: string;
602
603
  promptGuidelines: string[];
603
- parameters: TObject<{
604
- path: TString;
605
- offset: TOptional<TNumber>;
606
- limit: TOptional<TNumber>;
604
+ parameters: Type.TObject<{
605
+ path: Type.TString;
606
+ offset: Type.TOptional<Type.TNumber>;
607
+ limit: Type.TOptional<Type.TNumber>;
607
608
  }>;
608
609
  execute(_toolCallId: any, { path, offset, limit }: {
609
610
  path: any;
@@ -632,11 +633,11 @@ declare function createEditToolDefinition(cwd: any, options: any): {
632
633
  description: string;
633
634
  promptSnippet: string;
634
635
  promptGuidelines: string[];
635
- parameters: TObject<{
636
- path: TString;
637
- edits: TArray<TObject<{
638
- oldText: TString;
639
- newText: TString;
636
+ parameters: Type.TObject<{
637
+ path: Type.TString;
638
+ edits: Type.TArray<Type.TObject<{
639
+ oldText: Type.TString;
640
+ newText: Type.TString;
640
641
  }>>;
641
642
  }>;
642
643
  renderShell: string;
@@ -663,9 +664,9 @@ declare function createWriteToolDefinition(cwd: any, options: any): {
663
664
  description: string;
664
665
  promptSnippet: string;
665
666
  promptGuidelines: string[];
666
- parameters: TObject<{
667
- path: TString;
668
- content: TString;
667
+ parameters: Type.TObject<{
668
+ path: Type.TString;
669
+ content: Type.TString;
669
670
  }>;
670
671
  execute(_toolCallId: any, { path, content }: {
671
672
  path: any;
@@ -691,14 +692,14 @@ declare function createGrepToolDefinition(cwd: any, options: any): {
691
692
  label: string;
692
693
  description: string;
693
694
  promptSnippet: string;
694
- parameters: TObject<{
695
- pattern: TString;
696
- path: TOptional<TString>;
697
- glob: TOptional<TString>;
698
- ignoreCase: TOptional<TBoolean>;
699
- literal: TOptional<TBoolean>;
700
- context: TOptional<TNumber>;
701
- limit: TOptional<TNumber>;
695
+ parameters: Type.TObject<{
696
+ pattern: Type.TString;
697
+ path: Type.TOptional<Type.TString>;
698
+ glob: Type.TOptional<Type.TString>;
699
+ ignoreCase: Type.TOptional<Type.TBoolean>;
700
+ literal: Type.TOptional<Type.TBoolean>;
701
+ context: Type.TOptional<Type.TNumber>;
702
+ limit: Type.TOptional<Type.TNumber>;
702
703
  }>;
703
704
  execute(_toolCallId: any, { pattern, path: searchDir, glob, ignoreCase, literal, context, limit }: {
704
705
  pattern: any;
@@ -729,10 +730,10 @@ declare function createFindToolDefinition(cwd: any, options: any): {
729
730
  label: string;
730
731
  description: string;
731
732
  promptSnippet: string;
732
- parameters: TObject<{
733
- pattern: TString;
734
- path: TOptional<TString>;
735
- limit: TOptional<TNumber>;
733
+ parameters: Type.TObject<{
734
+ pattern: Type.TString;
735
+ path: Type.TOptional<Type.TString>;
736
+ limit: Type.TOptional<Type.TNumber>;
736
737
  }>;
737
738
  execute(_toolCallId: any, { pattern, path: searchDir, limit }: {
738
739
  pattern: any;
@@ -759,9 +760,9 @@ declare function createLsToolDefinition(cwd: any, options: any): {
759
760
  label: string;
760
761
  description: string;
761
762
  promptSnippet: string;
762
- parameters: TObject<{
763
- path: TOptional<TString>;
764
- limit: TOptional<TNumber>;
763
+ parameters: Type.TObject<{
764
+ path: Type.TOptional<Type.TString>;
765
+ limit: Type.TOptional<Type.TNumber>;
765
766
  }>;
766
767
  execute(_toolCallId: any, { path, limit }: {
767
768
  path: any;
@@ -1 +1 @@
1
- {"version":3,"file":"pi-coding-agent.d.mts","names":[],"sources":["../../src/compat/vendor/pi-messages.ts","../../src/compat/vendor/pi-session-manager.ts","../../src/compat/vendor/pi-truncate.ts","../../src/compat/vendor/pi-file-mutation-queue.ts","../../src/compat/vendor/pi-config-shim.ts","../../src/compat/vendor/pi-extension-runtime.ts","../../src/compat/vendor/pi-tools/bash.ts","../../src/compat/vendor/pi-tools/read.ts","../../src/compat/vendor/pi-tools/edit.ts","../../src/compat/vendor/pi-tools/write.ts","../../src/compat/vendor/pi-tools/grep.ts","../../src/compat/vendor/pi-tools/find.ts","../../src/compat/vendor/pi-tools/ls.ts","../../src/compat/vendor/pi-skills-format.ts","../../src/compat/pi-coding-agent.ts"],"mappings":";;;;;cAUa;cAKA;cAGA;cAKA;;;;UAKI;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;;;;;UAOgB,cAAc;EAC9B;EACA;EACA,mBAAmB,cAAc;EACjC;EACA,UAAU;EACV;;UAGgB;EAChB;EACA;EACA;EACA;;UAGgB;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S;iBAI/B,mBAAmB,UAAS,0BAA+B;EAAU;;iBAU3E,kBAAkB,aAAa,UAAU;GAAkB;;iBAS3D,oBAAoB,aAAa,UAAU;GAAkB;;iBAS7D,cAAc;iBAed;iBAMA,YAAY;iBAUN,WAAW,cAAc,oBAAkB;iBAU3C,aACpB,OAAO,YACP,kBACA;EAAa;IACZ;EACG;EAAU;EAAc;EAAkB;;EAC1C;EAAW;;iBAeD,qBAAqB;iBAMrB;EACd,KAAK,iBAAiB;EACtB,GAAG,iBAAiB,UAAU;EAC9B;;cA2BI,6BAA6B;EACjC,OAAO;EAGP;;cAGW,+BAA+B;cAC/B,wBAAwB;cACxB,uBAAuB;EAClC;EACA;EACA;;cAEW,+BAA+B;cAC/B,kCAAkC;cAClC,6BAA6B;cAC7B,mCAAmC;cACnC,gCAAgC;cAChC,iCAAiC;cACjC,kCAAkC;cAElC,qBAAqB;UACxB;EACR,YAAY;EACZ,YAAY;EACZ;EAGA,QAAQ;EAIR,YAAY;;UASG;GACd;;UAEc;GACd;;UAEc;GACd;;UAEc;GACd;;iBAGa,WAAW,iBAAiB,iBAAiB,WAAU;UAMtD;EACf;EACA;;iBAGc,sBACd,cACA,wBACA,eACA,oBACC;iBAUa,QAAQ,oBAAoB;iBAI5B,QAAQ;iBAIR,WAAW,aAAa"}
1
+ {"version":3,"file":"pi-coding-agent.d.mts","names":[],"sources":["../../src/compat/vendor/pi-messages.ts","../../src/compat/vendor/pi-session-manager.ts","../../src/compat/vendor/pi-truncate.ts","../../src/compat/vendor/pi-file-mutation-queue.ts","../../src/compat/vendor/pi-config-shim.ts","../../src/compat/vendor/pi-extension-runtime.ts","../../src/compat/vendor/pi-tools/bash.ts","../../src/compat/vendor/pi-tools/read.ts","../../src/compat/vendor/pi-tools/edit.ts","../../src/compat/vendor/pi-tools/write.ts","../../src/compat/vendor/pi-tools/grep.ts","../../src/compat/vendor/pi-tools/find.ts","../../src/compat/vendor/pi-tools/ls.ts","../../src/compat/vendor/pi-skills-format.ts","../../src/compat/pi-coding-agent.ts"],"mappings":";;;;;;cAUa;cAKA;cAGA;cAKA;;;;UAKI;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;;;;;UAOgB,cAAc;EAC9B;EACA;EACA,mBAAmB,cAAc;EACjC;EACA,UAAU;EACV;;UAGgB;EAChB;EACA;EACA;EACA;;UAGgB;EAChB;EACA;EACA;EACA;;;;;iBAOe,oBAAoB,KAAK;iBAkBzB,2BAA2B,iBAAiB,gBAAgB,oBAAoB;iBAShF,+BACf,iBACA,sBACA,oBACE;;iBAUa,oBACf,oBACA,mBAAmB,cAAc,iBACjC,kBACA,8BACA,oBACE;;;;;;;;;iBAmBa,aAAa,UAAU,iBAAiB;;;cC5G3C;UAEI;EAChB;EACA;EACA;EACA;EACA;EACA;;UAGgB;EAChB;EACA;;UAGgB;EAChB;EACA;EACA;EACA;;UAGgB,4BAA4B;EAC5C;EACA,SAAS;;UAGO,iCAAiC;EACjD;EACA;;UAGgB,yBAAyB;EACzC;EACA;EACA;;UAGgB,gBAAgB,qBAAqB;EACrD;EACA;EACA;EACA;;EAEA,UAAU;;EAEV,QAAQ;;EAER;;UAGgB,mBAAmB,qBAAqB;EACxD;EACA;EACA;;EAEA,UAAU;;EAEV,QAAQ;;EAER;;;;;;;;;;;;UAagB,YAAY,qBAAqB;EACjD;EACA;EACA,OAAO;;;UAIS,mBAAmB;EACnC;EACA;EACA;;;UAIgB,yBAAyB;EACzC;EACA;;;;;;;;;;;;;;UAegB,mBAAmB,qBAAqB;EACxD;EACA;EACA,mBAAmB,cAAc;EACjC,UAAU;EACV;;;KAIW,eACT,sBACA,2BACA,mBACA,kBACA,qBACA,cACA,qBACA,aACA;;KAGS,YAAY,gBAAgB;;UAGvB;EAChB,OAAO;EACP,UAAU;;EAEV;;EAEA;;UAGgB;EAChB,UAAU;EACV;EACA;IAAS;IAAkB;;;UAGX;EAChB;EACA;;EAEA;;EAEA;;EAEA;EACA,SAAS;EACT,UAAU;EACV;E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;;cAGvB,+BAAqB;cACrB,sBAAY;cAEZ;UACH;EACR,SAAS,YAAY;EAGrB,IAAI;EAGJ;;UAKe;EACf;EACA;IAAc;IAAc;IAAiB;IAAgB;;;cAUlD;;EAGC,YAAA,iBAAiB;EAI7B,yBAAyB;;KAStB,0BAA0B,SAAS,4BAA4B;EAAU;;iBAG9D,4BAA4B,SAAS;iBAI/B,mBAAmB,UAAS,0BAA+B;EAAU;;iBAU3E,kBAAkB,aAAa,UAAU;GAAkB;;iBAS3D,oBAAoB,aAAa,UAAU;GAAkB;;iBAS7D,cAAc;iBAed;iBAMA,YAAY;iBAUN,WAAW,cAAc,oBAAkB;iBAU3C,aACpB,OAAO,YACP,kBACA;EAAa;IACZ;EACG;EAAU;EAAc;EAAkB;;EAC1C;EAAW;;iBAeD,qBAAqB;iBAMrB;EACd,KAAK,iBAAiB;EACtB,GAAG,iBAAiB,UAAU;EAC9B;;cA2BI,6BAA6B;EACjC,OAAO;EAGP;;cAGW,+BAA+B;cAC/B,wBAAwB;cACxB,uBAAuB;EAClC;EACA;EACA;;cAEW,+BAA+B;cAC/B,kCAAkC;cAClC,6BAA6B;cAC7B,mCAAmC;cACnC,gCAAgC;cAChC,iCAAiC;cACjC,kCAAkC;cAElC,qBAAqB;UACxB;EACR,YAAY;EACZ,YAAY;EACZ;EAGA,QAAQ;EAIR,YAAY;;UASG;GACd;;UAEc;GACd;;UAEc;GACd;;UAEc;GACd;;iBAGa,WAAW,iBAAiB,iBAAiB,WAAU;UAMtD;EACf;EACA;;iBAGc,sBACd,cACA,wBACA,eACA,oBACC;iBAUa,QAAQ,oBAAoB;iBAI5B,QAAQ;iBAIR,WAAW,aAAa"}
@@ -1,4 +1,4 @@
1
1
 
2
2
  import { t as getAgentDir } from "../pi-config-shim-CZ1wFzqM.mjs";
3
- import { $ as isBashToolResult, $t as buildSessionContext, A as copyToClipboard, At as createGrepToolDefinition, B as generateSummary, Bt as createLocalBashOperations, C as ToolExecutionComponent, Ct as wrapRegisteredTool, D as calculateContextTokens, Dt as createFindTool, E as __setSubagentSessionFactory, Et as createLsToolDefinition, F as defineTool, Ft as createReadTool, G as getPackageDir, Gt as formatSize, H as getBinDir, Ht as withFileMutationQueue, I as ensureTool, It as createReadToolDefinition, J as getSettingsListTheme, Jt as truncateTail, K as getReadmePath, Kt as truncateHead, L as estimateTokens, Lt as bashToolSystemPromptContribution, M as createCodingTools, Mt as createWriteToolDefinition, N as createEventBus, Nt as createEditTool, O as compact, Ot as createFindToolDefinition, P as createReadOnlyTools, Pt as createEditToolDefinition, Q as initTheme, Qt as buildContextEntries, R as findCutPoint, Rt as createBashTool, S as Theme, St as truncateToVisualLines, T as VERSION, Tt as createLsTool, U as getLanguageFromPath, Ut as DEFAULT_MAX_BYTES, V as generateSummaryWithUsage, Vt as createExtensionRuntime, W as getMarkdownTheme, Wt as DEFAULT_MAX_LINES, X as getToolPath, Xt as SessionManager, Y as getShellConfig, Yt as CURRENT_SESSION_VERSION, Z as highlightCode, Zt as assertValidSessionId, _ as ModelRegistry, _t as resizeImage, a as CustomMessageComponent, an as parseSessionEntries, at as isToolCallEventType, b as SettingsManager, bt as stripFrontmatter, c as DefaultResourceLoader, cn as BRANCH_SUMMARY_SUFFIX, ct as keyText, d as ExtensionInputComponent, dn as bashExecutionToText, dt as parseFrontmatter, en as findMostRecentSession, et as isEditToolResult, f as ExtensionRunner, fn as convertToLlm, ft as parseSkillBlock, g as InMemorySettingsStorage, gt as renderDiff, h as FooterComponent, hn as createCustomMessage, ht as readStoredCredential, i as CustomEditor, in as migrateSessionEntries, it as isReadToolResult, j as createAgentSession, jt as createWriteTool, k as convertToPng, kt as createGrepTool, l as DynamicBorder, ln as COMPACTION_SUMMARY_PREFIX, lt as loadSkills, m as FileSettingsStorage, mn as createCompactionSummaryMessage, mt as rawKeyHint, n as BorderedLoader, nn as getLatestCompactionEntry, nt as isGrepToolResult, o as DEFAULT_COMPACTION_SETTINGS, on as sessionEntryToContextMessages, ot as isWriteToolResult, p as ExtensionSelectorComponent, pn as createBranchSummaryMessage, pt as processImage, q as getSelectListTheme, qt as truncateLine, r as CONFIG_DIR_NAME, rn as loadEntriesFromFile, rt as isLsToolResult, s as DefaultPackageManager, sn as BRANCH_SUMMARY_PREFIX, st as keyHint, t as AssistantMessageComponent, tn as getDefaultSessionDir, tt as isFindToolResult, u as ExtensionEditorComponent, un as COMPACTION_SUMMARY_SUFFIX, ut as loadSkillsFromDir, v as ModelRuntime, vt as serializeConversation, w as UserMessageComponent, wt as formatSkillsForPrompt, x as SettingsSelectorComponent, xt as theme, y as ProjectTrustStore, yt as shouldCompact, z as generateBranchSummary, zt as createBashToolDefinition } from "../pi-coding-agent-DuqSaquA.mjs";
3
+ import { $ as isBashToolResult, $t as buildSessionContext, A as copyToClipboard, At as createGrepToolDefinition, B as generateSummary, Bt as createLocalBashOperations, C as ToolExecutionComponent, Ct as wrapRegisteredTool, D as calculateContextTokens, Dt as createFindTool, E as __setSubagentSessionFactory, Et as createLsToolDefinition, F as defineTool, Ft as createReadTool, G as getPackageDir, Gt as formatSize, H as getBinDir, Ht as withFileMutationQueue, I as ensureTool, It as createReadToolDefinition, J as getSettingsListTheme, Jt as truncateTail, K as getReadmePath, Kt as truncateHead, L as estimateTokens, Lt as bashToolSystemPromptContribution, M as createCodingTools, Mt as createWriteToolDefinition, N as createEventBus, Nt as createEditTool, O as compact, Ot as createFindToolDefinition, P as createReadOnlyTools, Pt as createEditToolDefinition, Q as initTheme, Qt as buildContextEntries, R as findCutPoint, Rt as createBashTool, S as Theme, St as truncateToVisualLines, T as VERSION, Tt as createLsTool, U as getLanguageFromPath, Ut as DEFAULT_MAX_BYTES, V as generateSummaryWithUsage, Vt as createExtensionRuntime, W as getMarkdownTheme, Wt as DEFAULT_MAX_LINES, X as getToolPath, Xt as SessionManager, Y as getShellConfig, Yt as CURRENT_SESSION_VERSION, Z as highlightCode, Zt as assertValidSessionId, _ as ModelRegistry, _t as resizeImage, a as CustomMessageComponent, an as parseSessionEntries, at as isToolCallEventType, b as SettingsManager, bt as stripFrontmatter, c as DefaultResourceLoader, cn as BRANCH_SUMMARY_SUFFIX, ct as keyText, d as ExtensionInputComponent, dn as bashExecutionToText, dt as parseFrontmatter, en as findMostRecentSession, et as isEditToolResult, f as ExtensionRunner, fn as convertToLlm, ft as parseSkillBlock, g as InMemorySettingsStorage, gt as renderDiff, h as FooterComponent, hn as createCustomMessage, ht as readStoredCredential, i as CustomEditor, in as migrateSessionEntries, it as isReadToolResult, j as createAgentSession, jt as createWriteTool, k as convertToPng, kt as createGrepTool, l as DynamicBorder, ln as COMPACTION_SUMMARY_PREFIX, lt as loadSkills, m as FileSettingsStorage, mn as createCompactionSummaryMessage, mt as rawKeyHint, n as BorderedLoader, nn as getLatestCompactionEntry, nt as isGrepToolResult, o as DEFAULT_COMPACTION_SETTINGS, on as sessionEntryToContextMessages, ot as isWriteToolResult, p as ExtensionSelectorComponent, pn as createBranchSummaryMessage, pt as processImage, q as getSelectListTheme, qt as truncateLine, r as CONFIG_DIR_NAME, rn as loadEntriesFromFile, rt as isLsToolResult, s as DefaultPackageManager, sn as BRANCH_SUMMARY_PREFIX, st as keyHint, t as AssistantMessageComponent, tn as getDefaultSessionDir, tt as isFindToolResult, u as ExtensionEditorComponent, un as COMPACTION_SUMMARY_SUFFIX, ut as loadSkillsFromDir, v as ModelRuntime, vt as serializeConversation, w as UserMessageComponent, wt as formatSkillsForPrompt, x as SettingsSelectorComponent, xt as theme, y as ProjectTrustStore, yt as shouldCompact, z as generateBranchSummary, zt as createBashToolDefinition } from "../pi-coding-agent-COMX0KHL.mjs";
4
4
  export { AssistantMessageComponent, BRANCH_SUMMARY_PREFIX, BRANCH_SUMMARY_SUFFIX, BorderedLoader, COMPACTION_SUMMARY_PREFIX, COMPACTION_SUMMARY_SUFFIX, CONFIG_DIR_NAME, CURRENT_SESSION_VERSION, CustomEditor, CustomMessageComponent, DEFAULT_COMPACTION_SETTINGS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DefaultPackageManager, DefaultResourceLoader, DynamicBorder, ExtensionEditorComponent, ExtensionInputComponent, ExtensionRunner, ExtensionSelectorComponent, FileSettingsStorage, FooterComponent, InMemorySettingsStorage, ModelRegistry, ModelRuntime, ProjectTrustStore, SessionManager, SettingsManager, SettingsSelectorComponent, Theme, ToolExecutionComponent, UserMessageComponent, VERSION, __setSubagentSessionFactory, assertValidSessionId, bashExecutionToText, bashToolSystemPromptContribution, buildContextEntries, buildSessionContext, calculateContextTokens, compact, convertToLlm, convertToPng, copyToClipboard, createAgentSession, createBashTool, createBashToolDefinition, createBranchSummaryMessage, createCodingTools, createCompactionSummaryMessage, createCustomMessage, createEditTool, createEditToolDefinition, createEventBus, createExtensionRuntime, createFindTool, createFindToolDefinition, createGrepTool, createGrepToolDefinition, createLocalBashOperations, createLsTool, createLsToolDefinition, createReadOnlyTools, createReadTool, createReadToolDefinition, createWriteTool, createWriteToolDefinition, defineTool, ensureTool, estimateTokens, findCutPoint, findMostRecentSession, formatSize, formatSkillsForPrompt, generateBranchSummary, generateSummary, generateSummaryWithUsage, getAgentDir, getBinDir, getDefaultSessionDir, getLanguageFromPath, getLatestCompactionEntry, getMarkdownTheme, getPackageDir, getReadmePath, getSelectListTheme, getSettingsListTheme, getShellConfig, getToolPath, highlightCode, initTheme, isBashToolResult, isEditToolResult, isFindToolResult, isGrepToolResult, isLsToolResult, isReadToolResult, isToolCallEventType, isWriteToolResult, keyHint, keyText, loadEntriesFromFile, loadSkills, loadSkillsFromDir, migrateSessionEntries, parseFrontmatter, parseSessionEntries, parseSkillBlock, processImage, rawKeyHint, readStoredCredential, renderDiff, resizeImage, serializeConversation, sessionEntryToContextMessages, shouldCompact, stripFrontmatter, theme, truncateHead, truncateLine, truncateTail, truncateToVisualLines, withFileMutationQueue, wrapRegisteredTool };
@@ -1,8 +1,8 @@
1
1
 
2
+ import { a as builtinProviders } from "./pi-ai-B_88Wb0r.mjs";
2
3
  import { t as getAgentDir } from "./pi-config-shim-CZ1wFzqM.mjs";
3
- import "./pi-coding-agent-DuqSaquA.mjs";
4
+ import "./pi-coding-agent-COMX0KHL.mjs";
4
5
  import { i as resolveOAuthApiKey, o as storedOAuthCredential, r as providerSupportsOAuth, t as FileCredentialStore } from "./oauth-bridge-C6fL1qSv.mjs";
5
- import { i as builtinProviders } from "./pi-ai-DhYGgq4Y.mjs";
6
6
  import { join } from "node:path";
7
7
  import { CredentialProvider } from "@deepseek-ai/dsh-credentials";
8
8
  //#region src/credentials-oauth.ts
@@ -1,5 +1,5 @@
1
1
 
2
- import { i as __require, t as __commonJSMin } from "./rolldown-runtime-CTfmNlz1.mjs";
2
+ import { G as __require, H as __commonJSMin } from "./pi-ai-B_88Wb0r.mjs";
3
3
  //#region node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
4
4
  var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
5
  /**
@@ -1243,4 +1243,4 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
1243
1243
  export default require_dist();
1244
1244
  export {};
1245
1245
 
1246
- //# sourceMappingURL=dist-QBBA-dL_.mjs.map
1246
+ //# sourceMappingURL=dist-BYA74yh_.mjs.map