@oh-my-pi/pi-ai 16.3.5 → 16.3.7

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 (236) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/types/api-registry.d.ts +1 -1
  3. package/dist/types/auth-broker/client.d.ts +4 -2
  4. package/dist/types/auth-broker/discover.d.ts +1 -1
  5. package/dist/types/auth-broker/index.d.ts +7 -7
  6. package/dist/types/auth-broker/refresher.d.ts +1 -1
  7. package/dist/types/auth-broker/remote-store.d.ts +11 -6
  8. package/dist/types/auth-broker/server.d.ts +1 -1
  9. package/dist/types/auth-broker/snapshot-cache.d.ts +1 -1
  10. package/dist/types/auth-broker/types.d.ts +14 -2
  11. package/dist/types/auth-broker/wire-schemas.d.ts +46 -0
  12. package/dist/types/auth-gateway/index.d.ts +3 -3
  13. package/dist/types/auth-gateway/server.d.ts +3 -3
  14. package/dist/types/auth-gateway/types.d.ts +1 -1
  15. package/dist/types/auth-retry.d.ts +2 -2
  16. package/dist/types/auth-storage.d.ts +44 -6
  17. package/dist/types/dialect/anthropic.d.ts +1 -1
  18. package/dist/types/dialect/catalog.d.ts +1 -1
  19. package/dist/types/dialect/coercion.d.ts +1 -1
  20. package/dist/types/dialect/deepseek.d.ts +1 -1
  21. package/dist/types/dialect/demotion.d.ts +16 -14
  22. package/dist/types/dialect/examples.d.ts +1 -1
  23. package/dist/types/dialect/factory.d.ts +1 -1
  24. package/dist/types/dialect/gemini.d.ts +1 -1
  25. package/dist/types/dialect/gemma.d.ts +1 -1
  26. package/dist/types/dialect/glm.d.ts +1 -1
  27. package/dist/types/dialect/harmony.d.ts +1 -1
  28. package/dist/types/dialect/hermes.d.ts +1 -1
  29. package/dist/types/dialect/history.d.ts +2 -2
  30. package/dist/types/dialect/index.d.ts +11 -11
  31. package/dist/types/dialect/inventory.d.ts +1 -1
  32. package/dist/types/dialect/kimi.d.ts +1 -1
  33. package/dist/types/dialect/minimax.d.ts +1 -1
  34. package/dist/types/dialect/owned-stream.d.ts +2 -2
  35. package/dist/types/dialect/qwen3.d.ts +1 -1
  36. package/dist/types/dialect/rendering.d.ts +2 -2
  37. package/dist/types/dialect/thinking.d.ts +1 -1
  38. package/dist/types/dialect/types.d.ts +1 -1
  39. package/dist/types/dialect/xml.d.ts +1 -1
  40. package/dist/types/error/classes.d.ts +1 -1
  41. package/dist/types/error/finalize.d.ts +3 -3
  42. package/dist/types/error/flags.d.ts +1 -1
  43. package/dist/types/error/format.d.ts +1 -1
  44. package/dist/types/error/index.d.ts +13 -13
  45. package/dist/types/error/provider.d.ts +1 -1
  46. package/dist/types/error/rate-limit.d.ts +1 -1
  47. package/dist/types/index.d.ts +47 -47
  48. package/dist/types/provider-details.d.ts +1 -1
  49. package/dist/types/providers/amazon-bedrock.d.ts +1 -1
  50. package/dist/types/providers/anthropic-client.d.ts +3 -3
  51. package/dist/types/providers/anthropic-messages-server-schema.d.ts +1 -1
  52. package/dist/types/providers/anthropic-messages-server.d.ts +2 -2
  53. package/dist/types/providers/anthropic-wire.d.ts +1 -1
  54. package/dist/types/providers/anthropic.d.ts +3 -3
  55. package/dist/types/providers/aws-credentials.d.ts +2 -2
  56. package/dist/types/providers/azure-openai-responses.d.ts +2 -2
  57. package/dist/types/providers/cursor.d.ts +18 -3
  58. package/dist/types/providers/devin.d.ts +1 -1
  59. package/dist/types/providers/error-message.d.ts +1 -1
  60. package/dist/types/providers/github-copilot-headers.d.ts +1 -1
  61. package/dist/types/providers/gitlab-duo-workflow.d.ts +2 -2
  62. package/dist/types/providers/gitlab-duo.d.ts +2 -2
  63. package/dist/types/providers/google-auth.d.ts +1 -1
  64. package/dist/types/providers/google-gemini-cli.d.ts +6 -4
  65. package/dist/types/providers/google-interactions.d.ts +3 -3
  66. package/dist/types/providers/google-shared.d.ts +7 -5
  67. package/dist/types/providers/google-vertex.d.ts +2 -2
  68. package/dist/types/providers/google.d.ts +2 -2
  69. package/dist/types/providers/kimi.d.ts +3 -3
  70. package/dist/types/providers/mock.d.ts +2 -2
  71. package/dist/types/providers/ollama.d.ts +1 -1
  72. package/dist/types/providers/openai-anthropic-shim.d.ts +2 -2
  73. package/dist/types/providers/openai-chat-server-schema.d.ts +1 -1
  74. package/dist/types/providers/openai-chat-server.d.ts +2 -2
  75. package/dist/types/providers/openai-codex/request-transformer.d.ts +1 -1
  76. package/dist/types/providers/openai-codex/response-handler.d.ts +1 -1
  77. package/dist/types/providers/openai-codex-responses.d.ts +3 -3
  78. package/dist/types/providers/openai-completions.d.ts +3 -3
  79. package/dist/types/providers/openai-reasoning-fallback.d.ts +1 -1
  80. package/dist/types/providers/openai-responses-server-schema.d.ts +1 -1
  81. package/dist/types/providers/openai-responses-server.d.ts +2 -2
  82. package/dist/types/providers/openai-responses.d.ts +5 -5
  83. package/dist/types/providers/openai-shared.d.ts +10 -9
  84. package/dist/types/providers/pi-native-client.d.ts +1 -1
  85. package/dist/types/providers/pi-native-server.d.ts +2 -2
  86. package/dist/types/providers/register-builtins.d.ts +3 -3
  87. package/dist/types/providers/synthetic.d.ts +3 -3
  88. package/dist/types/providers/transform-messages.d.ts +1 -1
  89. package/dist/types/providers/vision-guard.d.ts +1 -1
  90. package/dist/types/registry/alibaba-coding-plan.d.ts +1 -1
  91. package/dist/types/registry/anthropic.d.ts +1 -1
  92. package/dist/types/registry/api-key-login.d.ts +1 -1
  93. package/dist/types/registry/api-key-validation.d.ts +1 -1
  94. package/dist/types/registry/baseten.d.ts +2 -2
  95. package/dist/types/registry/cerebras.d.ts +2 -2
  96. package/dist/types/registry/cloudflare-ai-gateway.d.ts +1 -1
  97. package/dist/types/registry/coreweave.d.ts +2 -2
  98. package/dist/types/registry/cursor.d.ts +1 -1
  99. package/dist/types/registry/deepseek.d.ts +1 -1
  100. package/dist/types/registry/devin.d.ts +1 -1
  101. package/dist/types/registry/firepass.d.ts +2 -2
  102. package/dist/types/registry/fireworks.d.ts +2 -2
  103. package/dist/types/registry/github-copilot.d.ts +1 -1
  104. package/dist/types/registry/gitlab-duo-workflow.d.ts +1 -1
  105. package/dist/types/registry/gitlab-duo.d.ts +1 -1
  106. package/dist/types/registry/google-antigravity.d.ts +1 -1
  107. package/dist/types/registry/google-gemini-cli.d.ts +1 -1
  108. package/dist/types/registry/huggingface.d.ts +2 -2
  109. package/dist/types/registry/index.d.ts +4 -4
  110. package/dist/types/registry/kagi.d.ts +1 -1
  111. package/dist/types/registry/kilo.d.ts +1 -1
  112. package/dist/types/registry/kimi-code.d.ts +1 -1
  113. package/dist/types/registry/litellm.d.ts +1 -1
  114. package/dist/types/registry/llama-cpp.d.ts +1 -1
  115. package/dist/types/registry/lm-studio.d.ts +1 -1
  116. package/dist/types/registry/minimax-code-cn.d.ts +1 -1
  117. package/dist/types/registry/minimax-code.d.ts +1 -1
  118. package/dist/types/registry/moonshot.d.ts +2 -2
  119. package/dist/types/registry/nanogpt.d.ts +2 -2
  120. package/dist/types/registry/nvidia.d.ts +1 -1
  121. package/dist/types/registry/oauth/anthropic.d.ts +3 -3
  122. package/dist/types/registry/oauth/callback-server.d.ts +1 -1
  123. package/dist/types/registry/oauth/cursor.d.ts +1 -1
  124. package/dist/types/registry/oauth/devin.d.ts +1 -1
  125. package/dist/types/registry/oauth/github-copilot.d.ts +2 -2
  126. package/dist/types/registry/oauth/gitlab-duo-workflow.d.ts +2 -2
  127. package/dist/types/registry/oauth/gitlab-duo.d.ts +1 -1
  128. package/dist/types/registry/oauth/google-antigravity.d.ts +1 -1
  129. package/dist/types/registry/oauth/google-gemini-cli.d.ts +1 -1
  130. package/dist/types/registry/oauth/google-oauth-shared.d.ts +2 -2
  131. package/dist/types/registry/oauth/index.d.ts +2 -2
  132. package/dist/types/registry/oauth/kimi.d.ts +1 -1
  133. package/dist/types/registry/oauth/minimax-code.d.ts +2 -2
  134. package/dist/types/registry/oauth/openai-codex.d.ts +1 -1
  135. package/dist/types/registry/oauth/opencode.d.ts +1 -1
  136. package/dist/types/registry/oauth/perplexity.d.ts +1 -1
  137. package/dist/types/registry/oauth/types.d.ts +2 -2
  138. package/dist/types/registry/oauth/wafer.d.ts +1 -1
  139. package/dist/types/registry/oauth/xai-oauth.d.ts +3 -3
  140. package/dist/types/registry/oauth/xiaomi.d.ts +1 -1
  141. package/dist/types/registry/ollama-cloud.d.ts +1 -1
  142. package/dist/types/registry/ollama.d.ts +1 -1
  143. package/dist/types/registry/openai-codex-device.d.ts +1 -1
  144. package/dist/types/registry/openai-codex.d.ts +1 -1
  145. package/dist/types/registry/opencode-go.d.ts +1 -1
  146. package/dist/types/registry/opencode-zen.d.ts +1 -1
  147. package/dist/types/registry/openrouter.d.ts +2 -2
  148. package/dist/types/registry/parallel.d.ts +1 -1
  149. package/dist/types/registry/perplexity.d.ts +2 -2
  150. package/dist/types/registry/qianfan.d.ts +2 -2
  151. package/dist/types/registry/qwen-portal.d.ts +1 -1
  152. package/dist/types/registry/registry.d.ts +69 -69
  153. package/dist/types/registry/sakana.d.ts +2 -2
  154. package/dist/types/registry/synthetic.d.ts +2 -2
  155. package/dist/types/registry/tavily.d.ts +1 -1
  156. package/dist/types/registry/together.d.ts +1 -1
  157. package/dist/types/registry/types.d.ts +1 -1
  158. package/dist/types/registry/umans.d.ts +2 -2
  159. package/dist/types/registry/venice.d.ts +2 -2
  160. package/dist/types/registry/vercel-ai-gateway.d.ts +1 -1
  161. package/dist/types/registry/vllm.d.ts +1 -1
  162. package/dist/types/registry/wafer-serverless.d.ts +1 -1
  163. package/dist/types/registry/xai-oauth.d.ts +1 -1
  164. package/dist/types/registry/xiaomi-token-plan-ams.d.ts +1 -1
  165. package/dist/types/registry/xiaomi-token-plan-cn.d.ts +1 -1
  166. package/dist/types/registry/xiaomi-token-plan-sgp.d.ts +1 -1
  167. package/dist/types/registry/xiaomi.d.ts +1 -1
  168. package/dist/types/registry/zai.d.ts +2 -2
  169. package/dist/types/registry/zenmux.d.ts +2 -2
  170. package/dist/types/registry/zhipu-coding-plan.d.ts +2 -2
  171. package/dist/types/stream.d.ts +6 -6
  172. package/dist/types/types.d.ts +40 -21
  173. package/dist/types/usage/claude.d.ts +1 -1
  174. package/dist/types/usage/gemini.d.ts +1 -1
  175. package/dist/types/usage/github-copilot.d.ts +1 -1
  176. package/dist/types/usage/google-antigravity.d.ts +1 -1
  177. package/dist/types/usage/kimi.d.ts +1 -1
  178. package/dist/types/usage/minimax-code.d.ts +1 -1
  179. package/dist/types/usage/ollama.d.ts +1 -1
  180. package/dist/types/usage/openai-codex-reset.d.ts +1 -1
  181. package/dist/types/usage/openai-codex.d.ts +1 -1
  182. package/dist/types/usage/opencode-go.d.ts +1 -1
  183. package/dist/types/usage/zai.d.ts +1 -1
  184. package/dist/types/usage.d.ts +1 -1
  185. package/dist/types/utils/block-symbols.d.ts +15 -0
  186. package/dist/types/utils/empty-completion-retry.d.ts +2 -2
  187. package/dist/types/utils/event-stream.d.ts +1 -1
  188. package/dist/types/utils/harmony-leak.d.ts +1 -1
  189. package/dist/types/utils/http-inspector.d.ts +19 -0
  190. package/dist/types/utils/leaked-thinking-stream.d.ts +1 -1
  191. package/dist/types/utils/openai-http.d.ts +3 -9
  192. package/dist/types/utils/provider-response.d.ts +1 -1
  193. package/dist/types/utils/proxy.d.ts +1 -1
  194. package/dist/types/utils/request-debug.d.ts +1 -1
  195. package/dist/types/utils/retry.d.ts +1 -1
  196. package/dist/types/utils/schema/equality.d.ts +1 -1
  197. package/dist/types/utils/schema/index.d.ts +15 -15
  198. package/dist/types/utils/schema/normalize.d.ts +7 -2
  199. package/dist/types/utils/schema/spill.d.ts +1 -1
  200. package/dist/types/utils/schema/wire.d.ts +1 -1
  201. package/dist/types/utils/sse-debug.d.ts +1 -1
  202. package/dist/types/utils/thinking-loop.d.ts +2 -2
  203. package/dist/types/utils/tool-call-loop-guard.d.ts +1 -1
  204. package/dist/types/utils/tool-choice.d.ts +1 -1
  205. package/dist/types/utils/validation.d.ts +1 -1
  206. package/dist/types/utils.d.ts +14 -2
  207. package/package.json +4 -4
  208. package/src/auth-broker/client.ts +41 -12
  209. package/src/auth-broker/remote-store.ts +189 -9
  210. package/src/auth-broker/server.ts +109 -7
  211. package/src/auth-broker/types.ts +22 -1
  212. package/src/auth-broker/wire-schemas.ts +22 -0
  213. package/src/auth-storage.ts +292 -22
  214. package/src/dialect/demotion.ts +18 -19
  215. package/src/error/rate-limit.ts +1 -1
  216. package/src/providers/azure-openai-responses.ts +3 -2
  217. package/src/providers/cursor.ts +36 -0
  218. package/src/providers/google-gemini-cli.ts +12 -3
  219. package/src/providers/google-shared.ts +3 -1
  220. package/src/providers/mock.ts +10 -3
  221. package/src/providers/ollama.ts +2 -2
  222. package/src/providers/openai-codex-responses.ts +47 -39
  223. package/src/providers/openai-completions.ts +48 -9
  224. package/src/providers/openai-responses.ts +37 -23
  225. package/src/providers/openai-shared.ts +145 -26
  226. package/src/providers/transform-messages.ts +63 -9
  227. package/src/registry/oauth/wafer.ts +1 -1
  228. package/src/stream.ts +6 -0
  229. package/src/types.ts +45 -3
  230. package/src/usage/claude.ts +28 -8
  231. package/src/utils/block-symbols.ts +18 -0
  232. package/src/utils/http-inspector.ts +32 -4
  233. package/src/utils/openai-http.ts +6 -9
  234. package/src/utils/retry-after.ts +12 -1
  235. package/src/utils/schema/normalize.ts +131 -0
  236. package/src/utils.ts +78 -0
@@ -1,4 +1,4 @@
1
- import type { DialectDefinition, InbandScanEvent, InbandScanner, InbandScannerOptions } from "./types";
1
+ import type { DialectDefinition, InbandScanEvent, InbandScanner, InbandScannerOptions } from "./types.js";
2
2
  export declare class XmlInbandScanner implements InbandScanner {
3
3
  #private;
4
4
  constructor(options?: InbandScannerOptions);
@@ -1,4 +1,4 @@
1
- import type { CapturedHttpErrorResponse } from "../utils/http-inspector";
1
+ import type { CapturedHttpErrorResponse } from "../utils/http-inspector.js";
2
2
  /** Prefix on errors raised when an Anthropic SSE stream envelope is malformed. */
3
3
  export declare const STREAM_ENVELOPE_ERROR_PREFIX = "Anthropic stream envelope error:";
4
4
  /** Structured HTTP errors thrown by provider clients. */
@@ -1,6 +1,6 @@
1
- import type { Api } from "../types";
2
- import type { AbortSourceTracker } from "../utils/abort";
3
- import type { CapturedHttpErrorResponse, RawHttpRequestDump } from "../utils/http-inspector";
1
+ import type { Api } from "../types.js";
2
+ import type { AbortSourceTracker } from "../utils/abort.js";
3
+ import type { CapturedHttpErrorResponse, RawHttpRequestDump } from "../utils/http-inspector.js";
4
4
  /** Context a provider catch block hands to {@link finalize}. */
5
5
  export interface FinalizeOptions {
6
6
  /** Wire API, for api-specific text classification (e.g. stale-responses items). */
@@ -1,4 +1,4 @@
1
- import type { Api, AssistantMessage } from "../types";
1
+ import type { Api, AssistantMessage } from "../types.js";
2
2
  export declare const Flag: {
3
3
  readonly Class: 4096;
4
4
  readonly ThinkingLoop: 65536;
@@ -1,4 +1,4 @@
1
- import { type CapturedHttpErrorResponse, type RawHttpRequestDump } from "../utils/http-inspector";
1
+ import { type CapturedHttpErrorResponse, type RawHttpRequestDump } from "../utils/http-inspector.js";
2
2
  /** Inputs that steer {@link formatMessage}'s formatter selection. */
3
3
  export interface FormatMessageOptions {
4
4
  /** When present, the raw request is dumped into the message for 400-class failures. */
@@ -1,13 +1,13 @@
1
- export * from "./abort";
2
- export * from "./auth";
3
- export * from "./auth-classify";
4
- export * from "./aws";
5
- export * from "./classes";
6
- export * from "./finalize";
7
- export * from "./flags";
8
- export * from "./format";
9
- export * from "./gateway";
10
- export * from "./oauth";
11
- export * from "./provider";
12
- export * from "./retryable";
13
- export * from "./validation";
1
+ export * from "./abort.js";
2
+ export * from "./auth.js";
3
+ export * from "./auth-classify.js";
4
+ export * from "./aws.js";
5
+ export * from "./classes.js";
6
+ export * from "./finalize.js";
7
+ export * from "./flags.js";
8
+ export * from "./format.js";
9
+ export * from "./gateway.js";
10
+ export * from "./oauth.js";
11
+ export * from "./provider.js";
12
+ export * from "./retryable.js";
13
+ export * from "./validation.js";
@@ -1,4 +1,4 @@
1
- import { ProviderHttpError } from "./classes";
1
+ import { ProviderHttpError } from "./classes.js";
2
2
  /** Which part of a provider exchange produced a non-HTTP error. */
3
3
  export type ProviderResponseErrorKind =
4
4
  /** Stream closed before a terminal completion/response event. */
@@ -52,7 +52,7 @@ export declare function isUsageLimitOutcome(status: number | undefined, message:
52
52
  export declare function isOpaqueStatusBody(message: string): boolean;
53
53
  /**
54
54
  * Internal text matcher for usage/quota-limit phrasing. NOT part of the public
55
- * API — callers classify through {@link import("./flags").isUsageLimit} (the
55
+ * API — callers classify through {@link import("./flags.js").isUsageLimit} (the
56
56
  * flag accessor). `flags.ts` consumes this to populate `Flag.UsageLimit`, and
57
57
  * {@link isUsageLimitOutcome} uses it for the account-rotation decision.
58
58
  */
@@ -1,49 +1,49 @@
1
1
  export { type Type, type } from "arktype";
2
2
  export { type ZodType, z } from "zod/v4";
3
- export * from "./api-registry";
4
- export type * from "./auth-broker";
5
- export type { AuthGatewayBootOptions, ModelResolver } from "./auth-gateway/server";
6
- export * from "./auth-gateway/types";
7
- export * from "./auth-retry";
8
- export * from "./auth-storage";
9
- export * from "./error/rate-limit";
10
- export * from "./provider-details";
11
- export * from "./providers/anthropic";
12
- export * from "./providers/anthropic-client";
13
- export * from "./providers/azure-openai-responses";
14
- export type * from "./providers/cursor";
15
- export * from "./providers/gitlab-duo";
16
- export * from "./providers/gitlab-duo-workflow";
17
- export type * from "./providers/google";
18
- export type * from "./providers/google-gemini-cli";
19
- export type * from "./providers/google-vertex";
20
- export * from "./providers/kimi";
21
- export * from "./providers/mock";
22
- export * from "./providers/ollama";
23
- export * from "./providers/openai-codex-responses";
24
- export * from "./providers/openai-completions";
25
- export * from "./providers/openai-responses";
26
- export * from "./providers/synthetic";
27
- export * from "./registry";
28
- export * from "./stream";
29
- export * from "./types";
30
- export * from "./usage";
31
- export * from "./usage/claude";
32
- export * from "./usage/gemini";
33
- export * from "./usage/github-copilot";
34
- export * from "./usage/google-antigravity";
35
- export * from "./usage/kimi";
36
- export * from "./usage/minimax-code";
37
- export * from "./usage/ollama";
38
- export * from "./usage/openai-codex";
39
- export * from "./usage/openai-codex-reset";
40
- export * from "./usage/opencode-go";
41
- export * from "./usage/zai";
42
- export * from "./utils/anthropic-auth";
43
- export * from "./utils/event-stream";
44
- export * from "./utils/openrouter-headers";
45
- export * from "./utils/retry";
46
- export * from "./utils/schema";
47
- export * from "./utils/thinking-loop";
48
- export * from "./utils/tool-call-loop-guard";
49
- export * from "./utils/validation";
3
+ export * from "./api-registry.js";
4
+ export type * from "./auth-broker/index.js";
5
+ export type { AuthGatewayBootOptions, ModelResolver } from "./auth-gateway/server.js";
6
+ export * from "./auth-gateway/types.js";
7
+ export * from "./auth-retry.js";
8
+ export * from "./auth-storage.js";
9
+ export * from "./error/rate-limit.js";
10
+ export * from "./provider-details.js";
11
+ export * from "./providers/anthropic.js";
12
+ export * from "./providers/anthropic-client.js";
13
+ export * from "./providers/azure-openai-responses.js";
14
+ export type * from "./providers/cursor.js";
15
+ export * from "./providers/gitlab-duo.js";
16
+ export * from "./providers/gitlab-duo-workflow.js";
17
+ export type * from "./providers/google.js";
18
+ export type * from "./providers/google-gemini-cli.js";
19
+ export type * from "./providers/google-vertex.js";
20
+ export * from "./providers/kimi.js";
21
+ export * from "./providers/mock.js";
22
+ export * from "./providers/ollama.js";
23
+ export * from "./providers/openai-codex-responses.js";
24
+ export * from "./providers/openai-completions.js";
25
+ export * from "./providers/openai-responses.js";
26
+ export * from "./providers/synthetic.js";
27
+ export * from "./registry/index.js";
28
+ export * from "./stream.js";
29
+ export * from "./types.js";
30
+ export * from "./usage.js";
31
+ export * from "./usage/claude.js";
32
+ export * from "./usage/gemini.js";
33
+ export * from "./usage/github-copilot.js";
34
+ export * from "./usage/google-antigravity.js";
35
+ export * from "./usage/kimi.js";
36
+ export * from "./usage/minimax-code.js";
37
+ export * from "./usage/ollama.js";
38
+ export * from "./usage/openai-codex.js";
39
+ export * from "./usage/openai-codex-reset.js";
40
+ export * from "./usage/opencode-go.js";
41
+ export * from "./usage/zai.js";
42
+ export * from "./utils/anthropic-auth.js";
43
+ export * from "./utils/event-stream.js";
44
+ export * from "./utils/openrouter-headers.js";
45
+ export * from "./utils/retry.js";
46
+ export * from "./utils/schema/index.js";
47
+ export * from "./utils/thinking-loop.js";
48
+ export * from "./utils/tool-call-loop-guard.js";
49
+ export * from "./utils/validation.js";
@@ -1,4 +1,4 @@
1
- import type { Api, Model, Provider, ProviderSessionState } from "./types";
1
+ import type { Api, Model, Provider, ProviderSessionState } from "./types.js";
2
2
  export interface ProviderDetailField {
3
3
  label: string;
4
4
  value: string;
@@ -7,7 +7,7 @@
7
7
  * Bun's native `HTTPS_PROXY` support.
8
8
  */
9
9
  import type { Effort } from "@oh-my-pi/pi-catalog/effort";
10
- import type { StreamFunction, StreamOptions, ThinkingBudgets } from "../types";
10
+ import type { StreamFunction, StreamOptions, ThinkingBudgets } from "../types.js";
11
11
  export type BedrockThinkingDisplay = "summarized" | "omitted";
12
12
  export interface BedrockOptions extends StreamOptions {
13
13
  region?: string;
@@ -1,7 +1,7 @@
1
- import { AnthropicApiError, AnthropicConnectionError, AnthropicConnectionTimeoutError } from "../error";
1
+ import { AnthropicApiError, AnthropicConnectionError, AnthropicConnectionTimeoutError } from "../error/index.js";
2
2
  export { AnthropicApiError, AnthropicConnectionError, AnthropicConnectionTimeoutError };
3
- import type { FetchImpl } from "../types";
4
- import type { MessageCreateParamsStreaming } from "./anthropic-wire";
3
+ import type { FetchImpl } from "../types.js";
4
+ import type { MessageCreateParamsStreaming } from "./anthropic-wire.js";
5
5
  /** Per-request options accepted by {@link AnthropicMessages.create}. */
6
6
  export interface AnthropicRequestOptions {
7
7
  signal?: AbortSignal;
@@ -3,7 +3,7 @@
3
3
  * gateway. Maps canonical wire variants to our internal normalized omp Context
4
4
  * and options.
5
5
  */
6
- import type { ContentBlockParam, ImageBlockParam, MessageCreateParams, MessageParam, TextBlockParam, Tool, ToolChoice } from "./anthropic-wire";
6
+ import type { ContentBlockParam, ImageBlockParam, MessageCreateParams, MessageParam, TextBlockParam, Tool, ToolChoice } from "./anthropic-wire.js";
7
7
  export declare const cacheControlSchema: import("arktype/internal/variants/object.ts").ObjectType<{
8
8
  type: "ephemeral";
9
9
  ttl?: "1h" | "5m" | undefined;
@@ -1,10 +1,10 @@
1
- import type { AssistantMessage, AssistantMessageEventStream } from "../types";
1
+ import type { AssistantMessage, AssistantMessageEventStream } from "../types.js";
2
2
  /**
3
3
  * Anthropic Messages API (https://docs.anthropic.com/en/api/messages) ↔ pi-ai
4
4
  * gateway translation. Inbound: foreign HTTP body → omp Context. Outbound:
5
5
  * omp AssistantMessage[Stream] → Anthropic-shaped JSON / SSE.
6
6
  */
7
- import type { AuthGatewayStreamControl, AuthGatewayParsedRequest as ParsedRequest } from "../auth-gateway/types";
7
+ import type { AuthGatewayStreamControl, AuthGatewayParsedRequest as ParsedRequest } from "../auth-gateway/types.js";
8
8
  export type { ParsedRequest };
9
9
  export declare function parseRequest(body: unknown, headers?: Headers): ParsedRequest;
10
10
  export declare function encodeResponse(message: AssistantMessage, requestedModelId: string): Record<string, unknown>;
@@ -11,7 +11,7 @@
11
11
  * `scope`, tool `strict`/`eager_input_streaming`, mid-conversation `system`
12
12
  * role) are first-class here instead of being patched in via casts.
13
13
  */
14
- import type { TokenTaskBudget } from "../types";
14
+ import type { TokenTaskBudget } from "../types.js";
15
15
  /** Ephemeral prefix-cache breakpoint marker. */
16
16
  export type CacheControlEphemeral = {
17
17
  type: "ephemeral";
@@ -1,6 +1,6 @@
1
- import type { FetchImpl, Message, Model, ProviderSessionState, ServiceTier, SimpleStreamOptions, StreamFunction, StreamOptions, Usage } from "../types";
2
- import { type AnthropicFetchOptions, type AnthropicMessagesClientLike } from "./anthropic-client";
3
- import type { FallbackParam, MessageParam, TextBlockParam } from "./anthropic-wire";
1
+ import type { FetchImpl, Message, Model, ProviderSessionState, ServiceTier, SimpleStreamOptions, StreamFunction, StreamOptions, Usage } from "../types.js";
2
+ import { type AnthropicFetchOptions, type AnthropicMessagesClientLike } from "./anthropic-client.js";
3
+ import type { FallbackParam, MessageParam, TextBlockParam } from "./anthropic-wire.js";
4
4
  export type AnthropicHeaderOptions = {
5
5
  apiKey: string;
6
6
  baseUrl?: string;
@@ -18,8 +18,8 @@
18
18
  * Resolved credentials are cached process-wide per profile and refreshed
19
19
  * 60 s before `Expiration` to absorb clock skew.
20
20
  */
21
- import type { FetchImpl } from "../types";
22
- import type { AwsCredentials } from "./aws-sigv4";
21
+ import type { FetchImpl } from "../types.js";
22
+ import type { AwsCredentials } from "./aws-sigv4.js";
23
23
  export interface ResolvedCredentials extends AwsCredentials {
24
24
  /** Absolute expiration timestamp in ms. `undefined` for non-expiring static creds. */
25
25
  expiresAt?: number;
@@ -1,5 +1,5 @@
1
- import type { ServiceTier, StreamFunction, StreamOptions, ToolChoice } from "../types";
2
- export { parseAzureDeploymentNameMap } from "./openai-shared";
1
+ import type { ServiceTier, StreamFunction, StreamOptions, ToolChoice } from "../types.js";
2
+ export { parseAzureDeploymentNameMap } from "./openai-shared.js";
3
3
  export interface AzureOpenAIResponsesOptions extends StreamOptions {
4
4
  reasoning?: "minimal" | "low" | "medium" | "high" | "xhigh";
5
5
  reasoningSummary?: "auto" | "detailed" | "concise" | null;
@@ -1,7 +1,7 @@
1
1
  import { type JsonValue } from "@bufbuild/protobuf";
2
- import type { AssistantMessage, CursorExecHandlerResult, CursorExecHandlers, CursorToolResultHandler, Message, StreamFunction, StreamOptions, TextContent, ThinkingContent, ToolCall, ToolResultMessage } from "../types";
3
- import { kCursorExecResolved, kStreamingBlockIndex, kStreamingBlockKind, kStreamingLastParseLen, kStreamingPartialJson } from "../utils/block-symbols";
4
- import { AssistantMessageEventStream } from "../utils/event-stream";
2
+ import type { AssistantMessage, CursorExecHandlerResult, CursorExecHandlers, CursorToolResultHandler, Message, StreamFunction, StreamOptions, TextContent, ThinkingContent, ToolCall, ToolResultMessage } from "../types.js";
3
+ import { kCursorExecResolved, kStreamingBlockIndex, kStreamingBlockKind, kStreamingLastParseLen, kStreamingPartialJson } from "../utils/block-symbols.js";
4
+ import { AssistantMessageEventStream } from "../utils/event-stream.js";
5
5
  export declare const CURSOR_API_URL = "https://api2.cursor.sh";
6
6
  export declare const CURSOR_CLIENT_VERSION = "cli-2026.01.09-231024f";
7
7
  export interface CursorOptions extends StreamOptions {
@@ -44,6 +44,21 @@ export declare function resolveExecHandler<TArgs, TResult>(args: TArgs, handler:
44
44
  execResult: TResult;
45
45
  toolResult?: ToolResultMessage;
46
46
  }>;
47
+ /**
48
+ * Reject a Cursor exec-channel `grepArgs` frame whose `pattern` is empty or
49
+ * whitespace-only. Returns an actionable error message when the pattern is
50
+ * unusable (with a `glob`-aware hint when the model likely meant to list
51
+ * files), or `null` when the pattern is valid and grep should run.
52
+ *
53
+ * Exported for tests. Cursor's model sometimes sends `pattern=""` together
54
+ * with a non-empty `glob`, expecting grep to enumerate matching files; the
55
+ * downstream coding-agent `grep` tool rejects that with a bare "Pattern must
56
+ * not be empty", which the TUI renders as `?` in the tool preview (issue
57
+ * #4574). Handling it at the Cursor exec dispatch keeps the synthesized
58
+ * `toolCall` block off the persisted assistant message and gives the model a
59
+ * specific recovery hint.
60
+ */
61
+ export declare function emptyGrepPatternRejection(pattern: string | undefined, glob: string | undefined): string | null;
47
62
  /**
48
63
  * Merge the decoded completion-frame `McpArgs` map into the args assembled
49
64
  * from streamed `args_text_delta` snapshots.
@@ -1,4 +1,4 @@
1
- import type { StreamFunction, StreamOptions } from "../types";
1
+ import type { StreamFunction, StreamOptions } from "../types.js";
2
2
  /** Base host for Codeium/Windsurf's Cascade chat API (Connect protocol over HTTP/1.1). */
3
3
  export declare const DEVIN_API_URL = "https://server.codeium.com";
4
4
  export interface DevinOptions extends StreamOptions {
@@ -1,4 +1,4 @@
1
- import type { Api, Model } from "../types";
1
+ import type { Api, Model } from "../types.js";
2
2
  export declare function createProviderErrorMessage(model: Model<Api>, err: unknown): {
3
3
  role: "assistant";
4
4
  content: {
@@ -1,4 +1,4 @@
1
- import type { Message } from "../types";
1
+ import type { Message } from "../types.js";
2
2
  /**
3
3
  * Infer whether the current request to Copilot is user-initiated or agent-initiated.
4
4
  * Accepts `unknown[]` because providers may pass pre-converted message shapes.
@@ -1,6 +1,6 @@
1
1
  import { type GitLabDuoWorkflowNamespaceSelection } from "@oh-my-pi/pi-catalog/discovery/gitlab-duo-workflow";
2
- import type { AssistantMessage, Context, FetchImpl, Model, ProviderSessionState, StreamFunction, StreamOptions, Tool, ToolChoice, ToolResultMessage } from "../types";
3
- import { AssistantMessageEventStream } from "../utils/event-stream";
2
+ import type { AssistantMessage, Context, FetchImpl, Model, ProviderSessionState, StreamFunction, StreamOptions, Tool, ToolChoice, ToolResultMessage } from "../types.js";
3
+ import { AssistantMessageEventStream } from "../utils/event-stream.js";
4
4
  export declare const GITLAB_DUO_WORKFLOW_PROVIDER_ID = "gitlab-duo-agent";
5
5
  export declare const GITLAB_DUO_WORKFLOW_API = "gitlab-duo-agent";
6
6
  export declare const GITLAB_DUO_WORKFLOW_DEFINITION = "ambient";
@@ -1,5 +1,5 @@
1
- import type { Api, Context, Model, SimpleStreamOptions } from "../types";
2
- import { AssistantMessageEventStream } from "../utils/event-stream";
1
+ import type { Api, Context, Model, SimpleStreamOptions } from "../types.js";
2
+ import { AssistantMessageEventStream } from "../utils/event-stream.js";
3
3
  type GitLabProvider = "anthropic" | "openai";
4
4
  type GitLabOpenAIApiType = "chat" | "responses";
5
5
  export type GitLabModelMapping = {
@@ -11,7 +11,7 @@
11
11
  * Tokens are cached per source key and refreshed `GOOGLE_VERTEX_REFRESH_SKEW_MS` before expiry
12
12
  * (default 60s). Concurrent callers waiting on a refresh share the same in-flight promise.
13
13
  */
14
- import type { FetchImpl } from "../types";
14
+ import type { FetchImpl } from "../types.js";
15
15
  /**
16
16
  * Returns a Bearer access token suitable for the `Authorization` header on Vertex AI calls.
17
17
  * The token is cached in module scope and refreshed `GOOGLE_VERTEX_REFRESH_SKEW_MS` ms before it expires.
@@ -1,9 +1,9 @@
1
- import type { Context, Model, ProviderSessionState, StreamFunction, StreamOptions } from "../types";
2
- import type { Content, FunctionCallingConfigMode, ThinkingConfig } from "./google-shared";
3
- import { type GoogleThinkingLevel } from "./google-shared";
1
+ import type { Context, Model, ProviderSessionState, StreamFunction, StreamOptions } from "../types.js";
2
+ import type { Content, FunctionCallingConfigMode, ThinkingConfig } from "./google-shared.js";
3
+ import { type GoogleThinkingLevel } from "./google-shared.js";
4
4
  /**
5
5
  * Thinking level for Gemini 3 models. Re-exported from `google-shared` so existing
6
- * `import { GoogleThinkingLevel } from "./google-gemini-cli"` callers keep working.
6
+ * `import { GoogleThinkingLevel } from "./google-gemini-cli.js"` callers keep working.
7
7
  */
8
8
  export type { GoogleThinkingLevel };
9
9
  export interface GoogleGeminiCliOptions extends StreamOptions {
@@ -41,6 +41,8 @@ export interface GoogleGeminiCliOptions extends StreamOptions {
41
41
  budget: number;
42
42
  };
43
43
  };
44
+ /** Request that Cloud Code Assist omit human-readable thought summaries while still allowing internal reasoning. */
45
+ hideThinkingSummary?: boolean;
44
46
  /**
45
47
  * Upstream wire model id override for collapsed effort-tier variants.
46
48
  * Serialized as `requestModelId ?? model.requestModelId ?? model.id`.
@@ -1,6 +1,6 @@
1
- import type { Context, FetchImpl, Model, ProviderSessionState } from "../types";
2
- import { AssistantMessageEventStream } from "../utils/event-stream";
3
- import { type GoogleSharedStreamOptions } from "./google-shared";
1
+ import type { Context, FetchImpl, Model, ProviderSessionState } from "../types.js";
2
+ import { AssistantMessageEventStream } from "../utils/event-stream.js";
3
+ import { type GoogleSharedStreamOptions } from "./google-shared.js";
4
4
  type GoogleInteractionsApi = "google-generative-ai" | "google-vertex";
5
5
  /** Provider session state storing the last Gemini Interactions response id. */
6
6
  export interface GoogleInteractionsProviderSessionState extends ProviderSessionState {
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Shared utilities for Google Generative AI and Google Cloud Code Assist providers.
3
3
  */
4
- import type { AssistantMessage, Context, FetchImpl, Model, ServiceTier, StopReason, StreamOptions, TextContent, ThinkingContent, Tool, ToolCall } from "../types";
5
- import { AssistantMessageEventStream } from "../utils/event-stream";
6
- import { normalizeSchemaForGoogle } from "../utils/schema";
7
- import type { Content, FinishReason, FunctionCallingConfigMode, GenerateContentParameters, GenerateContentResponse, Part } from "./google-types";
8
- export type { Content, FunctionCallingConfigMode, GenerateContentParameters, GenerateContentResponse, ThinkingConfig, } from "./google-types";
4
+ import type { AssistantMessage, Context, FetchImpl, Model, ServiceTier, StopReason, StreamOptions, TextContent, ThinkingContent, Tool, ToolCall } from "../types.js";
5
+ import { AssistantMessageEventStream } from "../utils/event-stream.js";
6
+ import { normalizeSchemaForGoogle } from "../utils/schema/index.js";
7
+ import type { Content, FinishReason, FunctionCallingConfigMode, GenerateContentParameters, GenerateContentResponse, Part } from "./google-types.js";
8
+ export type { Content, FunctionCallingConfigMode, GenerateContentParameters, GenerateContentResponse, ThinkingConfig, } from "./google-types.js";
9
9
  export { normalizeSchemaForGoogle };
10
10
  type GoogleApiType = "google-generative-ai" | "google-gemini-cli" | "google-vertex";
11
11
  /**
@@ -33,6 +33,8 @@ export interface GoogleSharedStreamOptions extends StreamOptions {
33
33
  budgetTokens?: number;
34
34
  level?: GoogleThinkingLevel;
35
35
  };
36
+ /** Request that Google omit human-readable thought summaries while still allowing internal reasoning. */
37
+ hideThinkingSummary?: boolean;
36
38
  /** Gemini/Vertex serving tier (`flex`/`priority`); other values are omitted. */
37
39
  serviceTier?: ServiceTier;
38
40
  /**
@@ -1,5 +1,5 @@
1
- import type { StreamFunction } from "../types";
2
- import { type GoogleSharedStreamOptions } from "./google-shared";
1
+ import type { StreamFunction } from "../types.js";
2
+ import { type GoogleSharedStreamOptions } from "./google-shared.js";
3
3
  export interface GoogleVertexOptions extends GoogleSharedStreamOptions {
4
4
  project?: string;
5
5
  location?: string;
@@ -1,4 +1,4 @@
1
- import type { StreamFunction } from "../types";
2
- import { type GoogleSharedStreamOptions } from "./google-shared";
1
+ import type { StreamFunction } from "../types.js";
2
+ import { type GoogleSharedStreamOptions } from "./google-shared.js";
3
3
  export type GoogleOptions = GoogleSharedStreamOptions;
4
4
  export declare const streamGoogle: StreamFunction<"google-generative-ai">;
@@ -8,9 +8,9 @@
8
8
  * The Anthropic API is generally more stable and recommended.
9
9
  * Note: Kimi calculates TPM rate limits based on max_tokens, not actual output.
10
10
  */
11
- import type { Api, Context, Model } from "../types";
12
- import type { AssistantMessageEventStream } from "../utils/event-stream";
13
- import { type OpenAIAnthropicApiFormat, type OpenAIAnthropicShimOptions } from "./openai-anthropic-shim";
11
+ import type { Api, Context, Model } from "../types.js";
12
+ import type { AssistantMessageEventStream } from "../utils/event-stream.js";
13
+ import { type OpenAIAnthropicApiFormat, type OpenAIAnthropicShimOptions } from "./openai-anthropic-shim.js";
14
14
  export type KimiApiFormat = OpenAIAnthropicApiFormat;
15
15
  export interface KimiOptions extends OpenAIAnthropicShimOptions {
16
16
  /** API format: "openai" or "anthropic". Default: "anthropic" */
@@ -41,8 +41,8 @@
41
41
  * // Inspect calls afterwards.
42
42
  * expect(mock.calls).toHaveLength(2);
43
43
  */
44
- import type { Api, Context, Model, SimpleStreamOptions, StopDetails, StopReason, Usage } from "../types";
45
- import { AssistantMessageEventStream } from "../utils/event-stream";
44
+ import type { Api, Context, Model, SimpleStreamOptions, StopDetails, StopReason, Usage } from "../types.js";
45
+ import { AssistantMessageEventStream } from "../utils/event-stream.js";
46
46
  /** The API string this provider serves. */
47
47
  export declare const MOCK_API: "mock";
48
48
  export type MockApi = typeof MOCK_API;
@@ -1,4 +1,4 @@
1
- import type { StreamFunction, StreamOptions, ToolChoice } from "../types";
1
+ import type { StreamFunction, StreamOptions, ToolChoice } from "../types.js";
2
2
  export interface OllamaChatOptions extends StreamOptions {
3
3
  reasoning?: "minimal" | "low" | "medium" | "high" | "xhigh";
4
4
  disableReasoning?: boolean;
@@ -7,8 +7,8 @@
7
7
  * format, optional extra headers); the streaming/forwarding plumbing lives
8
8
  * here once.
9
9
  */
10
- import type { Context, Model, SimpleStreamOptions } from "../types";
11
- import { AssistantMessageEventStream } from "../utils/event-stream";
10
+ import type { Context, Model, SimpleStreamOptions } from "../types.js";
11
+ import { AssistantMessageEventStream } from "../utils/event-stream.js";
12
12
  export type OpenAIAnthropicApiFormat = "openai" | "anthropic";
13
13
  export interface OpenAIAnthropicShimOptions extends SimpleStreamOptions {
14
14
  /** API format: "openai" or "anthropic". */
@@ -6,7 +6,7 @@
6
6
  * official OpenAI SDK — which sends a growing pile of non-strict defaults (e.g.
7
7
  * `stream_options.include_obfuscation`) — does not trip 400s on shapes we simply ignore.
8
8
  */
9
- import type { ChatCompletionContentPart, ChatCompletionCreateParams, ChatCompletionMessageParam, ChatCompletionMessageToolCall, ChatCompletionTool, ChatCompletionToolChoiceOption } from "./openai-chat-wire";
9
+ import type { ChatCompletionContentPart, ChatCompletionCreateParams, ChatCompletionMessageParam, ChatCompletionMessageToolCall, ChatCompletionTool, ChatCompletionToolChoiceOption } from "./openai-chat-wire.js";
10
10
  export declare const textPartSchema: import("arktype/internal/variants/object.ts").ObjectType<{
11
11
  type: "text";
12
12
  text: string;
@@ -2,8 +2,8 @@
2
2
  * Parsed inbound OpenAI chat-completions request, ready to feed into pi-ai
3
3
  * `stream(model, context, options)`.
4
4
  */
5
- import type { AuthGatewayStreamControl, AuthGatewayParsedRequest as ParsedRequest } from "../auth-gateway/types";
6
- import type { AssistantMessage, AssistantMessageEventStream } from "../types";
5
+ import type { AuthGatewayStreamControl, AuthGatewayParsedRequest as ParsedRequest } from "../auth-gateway/types.js";
6
+ import type { AssistantMessage, AssistantMessageEventStream } from "../types.js";
7
7
  export type { ParsedRequest };
8
8
  export declare function parseRequest(body: unknown, headers?: Headers): ParsedRequest;
9
9
  export declare function encodeResponse(message: AssistantMessage, requestedModelId: string): Record<string, unknown>;
@@ -1,4 +1,4 @@
1
- import type { Api, Model } from "../../types";
1
+ import type { Api, Model } from "../../types.js";
2
2
  /** Reasoning replay scope for the Codex Responses API (`reasoning.context`). */
3
3
  export type CodexReasoningContext = "auto" | "current_turn" | "all_turns";
4
4
  export interface ReasoningConfig {
@@ -1,4 +1,4 @@
1
- import { ProviderHttpError } from "../../error";
1
+ import { ProviderHttpError } from "../../error/index.js";
2
2
  export type CodexRateLimit = {
3
3
  used_percent?: number;
4
4
  window_minutes?: number;
@@ -1,6 +1,6 @@
1
- import type { Context, Model, ProviderSessionState, ServiceTier, StreamFunction, StreamOptions, Tool, ToolChoice } from "../types";
2
- import { type CodexReasoningContext, type RequestBody } from "./openai-codex/request-transformer";
3
- import type { ResponseInput } from "./openai-responses-wire";
1
+ import type { Context, Model, ProviderSessionState, ServiceTier, StreamFunction, StreamOptions, Tool, ToolChoice } from "../types.js";
2
+ import { type CodexReasoningContext, type RequestBody } from "./openai-codex/request-transformer.js";
3
+ import type { ResponseInput } from "./openai-responses-wire.js";
4
4
  export interface OpenAICodexResponsesOptions extends StreamOptions {
5
5
  reasoning?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
6
6
  reasoningSummary?: "auto" | "concise" | "detailed" | null;
@@ -1,7 +1,7 @@
1
1
  import type { ResolvedOpenAICompat } from "@oh-my-pi/pi-catalog/types";
2
- import type { AssistantMessage, Context, Model, ServiceTier, StreamFunction, StreamOptions, ToolChoice } from "../types";
3
- import type { ChatCompletionMessageParam } from "./openai-chat-wire";
4
- export { applyOpenRouterRoutingVariant } from "./openai-shared";
2
+ import type { AssistantMessage, Context, Model, ServiceTier, StreamFunction, StreamOptions, ToolChoice } from "../types.js";
3
+ import type { ChatCompletionMessageParam } from "./openai-chat-wire.js";
4
+ export { applyOpenRouterRoutingVariant } from "./openai-shared.js";
5
5
  /**
6
6
  * Identify "real progress" stream chunks vs. keepalives, role-only preambles,
7
7
  * and empty `{choices:[]}` no-ops emitted by some OpenAI-compatible endpoints.
@@ -1,4 +1,4 @@
1
- import type { CapturedHttpErrorResponse } from "../utils/http-inspector";
1
+ import type { CapturedHttpErrorResponse } from "../utils/http-inspector.js";
2
2
  /** @internal */
3
3
  export type OpenAIReasoningEffortFallback = string | null;
4
4
  /** @internal */
@@ -7,7 +7,7 @@
7
7
  * Real clients (codex, openai-python, llm-git) routinely send these and a 400
8
8
  * is a worse outcome than dropping them on the floor.
9
9
  */
10
- import type { EasyInputMessage, ResponseCreateParams, ResponseFunctionToolCall, ResponseInputContent, ResponseInputItem, ResponseOutputMessage, ResponseReasoningItem, Tool as ResponsesTool } from "./openai-responses-wire";
10
+ import type { EasyInputMessage, ResponseCreateParams, ResponseFunctionToolCall, ResponseInputContent, ResponseInputItem, ResponseOutputMessage, ResponseReasoningItem, Tool as ResponsesTool } from "./openai-responses-wire.js";
11
11
  declare const inputImageBlockSchema: import("arktype/internal/variants/object.ts").ObjectType<{
12
12
  type: "input_image";
13
13
  detail?: "auto" | "high" | "low" | undefined;
@@ -8,8 +8,8 @@
8
8
  * Spec: https://platform.openai.com/docs/api-reference/responses
9
9
  * Inverse direction (source-of-truth for item shapes): ../../providers/openai-responses.ts
10
10
  */
11
- import type { AuthGatewayStreamControl, AuthGatewayParsedRequest as ParsedRequest } from "../auth-gateway/types";
12
- import type { AssistantMessage, AssistantMessageEventStream } from "../types";
11
+ import type { AuthGatewayStreamControl, AuthGatewayParsedRequest as ParsedRequest } from "../auth-gateway/types.js";
12
+ import type { AssistantMessage, AssistantMessageEventStream } from "../types.js";
13
13
  export type { ParsedRequest };
14
14
  export declare function parseRequest(body: unknown, headers?: Headers): ParsedRequest;
15
15
  export declare function formatError(status: number, type: string, message: string): Response;
@@ -1,8 +1,8 @@
1
- import type { Context, Model, OpenAICompat, ProviderSessionState, ServiceTier, StreamFunction, StreamOptions, Tool, ToolChoice } from "../types";
2
- import { type OpenAIResponsesToolChoice } from "../utils/tool-choice";
3
- import { type OpenAIReasoningEffortFallbackState } from "./openai-reasoning-fallback";
4
- import type { Tool as OpenAITool, ResponseCreateParamsStreaming, ResponseInput } from "./openai-responses-wire";
5
- import { type OpenAIStrictToolsScope, type OpenAIStrictToolsState } from "./openai-shared";
1
+ import type { Context, Model, OpenAICompat, ProviderSessionState, ServiceTier, StreamFunction, StreamOptions, Tool, ToolChoice } from "../types.js";
2
+ import { type OpenAIResponsesToolChoice } from "../utils/tool-choice.js";
3
+ import { type OpenAIReasoningEffortFallbackState } from "./openai-reasoning-fallback.js";
4
+ import type { Tool as OpenAITool, ResponseCreateParamsStreaming, ResponseInput } from "./openai-responses-wire.js";
5
+ import { type OpenAIStrictToolsScope, type OpenAIStrictToolsState } from "./openai-shared.js";
6
6
  export interface OpenAIResponsesOptions extends StreamOptions {
7
7
  reasoning?: "minimal" | "low" | "medium" | "high" | "xhigh";
8
8
  reasoningSummary?: "auto" | "detailed" | "concise" | null;