@nexface/agent 0.1.1-alpha.0 → 0.1.1-alpha.10

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 (44) hide show
  1. package/dist/agent.d.ts +4 -8
  2. package/dist/agent.js +696 -319
  3. package/dist/agent.js.map +1 -1
  4. package/dist/browser-prompt.d.ts +1 -1
  5. package/dist/browser-prompt.generated.d.ts +1 -1
  6. package/dist/browser-prompt.generated.js +2 -2
  7. package/dist/errors.d.ts +2 -2
  8. package/dist/errors.js +1 -1
  9. package/dist/errors.js.map +1 -1
  10. package/dist/history-compaction.d.ts +22 -0
  11. package/dist/history-compaction.js +181 -0
  12. package/dist/history-compaction.js.map +1 -0
  13. package/dist/index.d.ts +2 -3
  14. package/dist/index.js +0 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/model/binding.d.ts +4 -0
  17. package/dist/model/binding.js.map +1 -1
  18. package/dist/models/{885.js → 39.js} +236 -42
  19. package/dist/models/851.js +10 -0
  20. package/dist/models/_chunks/{958-bedced75.js → 86-c0c5ac98.js} +5 -5
  21. package/dist/models/_chunks/{anthropic-messages~1-a4b25b48.js → anthropic-messages~1-d35e3e7d.js} +4 -4
  22. package/dist/models/_chunks/{google-generative-ai~1-78bb2822.js → google-generative-ai~1-2ba71457.js} +11 -11
  23. package/dist/models/_chunks/{openai-completions~1-7677fb83.js → openai-completions~1-b340f0e0.js} +4 -4
  24. package/dist/models/_chunks/{openai-responses~1-cc0a71cd.js → openai-responses~1-b53c65c2.js} +5 -5
  25. package/dist/models/anthropic-messages.d.ts +1 -1
  26. package/dist/models/anthropic-messages.js +3 -3
  27. package/dist/models/google-generative-ai.d.ts +1 -1
  28. package/dist/models/google-generative-ai.js +3 -3
  29. package/dist/models/openai-completions.js +6 -3
  30. package/dist/models/openai-responses.js +6 -3
  31. package/dist/request.d.ts +95 -0
  32. package/dist/request.js +238 -0
  33. package/dist/request.js.map +1 -0
  34. package/dist/tool-bridge.js +11 -73
  35. package/dist/tool-bridge.js.map +1 -1
  36. package/dist/tool-result.d.ts +1 -0
  37. package/dist/tool-result.js +12 -0
  38. package/dist/tool-result.js.map +1 -0
  39. package/dist/types.d.ts +32 -32
  40. package/dist/types.js.map +1 -1
  41. package/package.json +8 -13
  42. package/dist/models/956.js +0 -5
  43. /package/dist/models/_chunks/{879-7e580bb2.js → 360-7e580bb2.js} +0 -0
  44. /package/dist/models/_chunks/{35-e1813138.js → 474-e1813138.js} +0 -0
@@ -1,7 +1,7 @@
1
- import { OpenAI, shortHash, clampOpenAIPromptCacheKey } from "./35-e1813138.js";
2
- import { getProviderEnvValue, buildCopilotDynamicHeaders, parseStreamingJson, hasCopilotVisionInput } from "./958-bedced75.js";
3
- import { AssistantMessageEventStream } from "../885.js";
4
- import { sanitizeSurrogates, appendGrammarToolInputJsonDelta, resolveGrammarConstrainedSampling, getGrammarToolInput, headersToRecord, clampThinkingLevel, clampReasoning, resolveJsonSchemaStrictSampling, transformMessages, calculateCost, buildBaseOptions, retryProviderRequest, createGrammarToolInputProperties } from "./879-7e580bb2.js";
1
+ import { OpenAI, shortHash, clampOpenAIPromptCacheKey } from "./474-e1813138.js";
2
+ import { getProviderEnvValue, buildCopilotDynamicHeaders, parseStreamingJson, hasCopilotVisionInput } from "./86-c0c5ac98.js";
3
+ import { AssistantMessageEventStream } from "../39.js";
4
+ import { sanitizeSurrogates, appendGrammarToolInputJsonDelta, resolveGrammarConstrainedSampling, getGrammarToolInput, headersToRecord, clampThinkingLevel, clampReasoning, resolveJsonSchemaStrictSampling, transformMessages, calculateCost, buildBaseOptions, retryProviderRequest, createGrammarToolInputProperties } from "./360-7e580bb2.js";
5
5
  import { formatProviderError, normalizeProviderError } from "./error-body-8bee35c2.js";
6
6
 
7
7
 
@@ -1,12 +1,12 @@
1
1
  import { __webpack_require__ } from "../rslib-runtime.js";
2
- import { sanitizeSurrogates, appendGrammarToolInputJsonDelta, resolveGrammarConstrainedSampling, getGrammarToolInput, headersToRecord, clampThinkingLevel, resolveJsonSchemaStrictSampling, transformMessages, calculateCost, buildBaseOptions, retryProviderRequest, createGrammarToolInputProperties } from "./879-7e580bb2.js";
3
- import { OpenAI, shortHash, clampOpenAIPromptCacheKey } from "./35-e1813138.js";
4
- import { getProviderEnvValue, buildCopilotDynamicHeaders, parseStreamingJson, hasCopilotVisionInput } from "./958-bedced75.js";
2
+ import { sanitizeSurrogates, appendGrammarToolInputJsonDelta, resolveGrammarConstrainedSampling, getGrammarToolInput, headersToRecord, clampThinkingLevel, resolveJsonSchemaStrictSampling, transformMessages, calculateCost, buildBaseOptions, retryProviderRequest, createGrammarToolInputProperties } from "./360-7e580bb2.js";
3
+ import { OpenAI, shortHash, clampOpenAIPromptCacheKey } from "./474-e1813138.js";
4
+ import { getProviderEnvValue, buildCopilotDynamicHeaders, parseStreamingJson, hasCopilotVisionInput } from "./86-c0c5ac98.js";
5
5
  import { formatProviderError, normalizeProviderError } from "./error-body-8bee35c2.js";
6
- import { AssistantMessageEventStream } from "../885.js";
6
+ import { AssistantMessageEventStream } from "../39.js";
7
7
  import { splitDeferredTools } from "./deferred-tools-90f3c977.js";
8
8
 
9
- // NAMESPACE OBJECT: ../../../../../Users/bytedance/.codex/worktrees/c5f8/web-agent/node_modules/.pnpm/@earendil-works+pi-ai@0.84.1_@modelcontextprotocol+sdk@1.29.0_zod@4.4.3__ws@8.21.1_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js
9
+ // NAMESPACE OBJECT: ../../node_modules/.pnpm/@earendil-works+pi-ai@0.84.1_@modelcontextprotocol+sdk@1.29.0_zod@4.4.3__ws@8.21.1_zod@4.4.3/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js
10
10
  var openai_responses_namespaceObject = {};
11
11
  __webpack_require__.r(openai_responses_namespaceObject);
12
12
  __webpack_require__.d(openai_responses_namespaceObject, {
@@ -1,4 +1,4 @@
1
1
  import type { AgentModelConfig, AgentModelFactoryConfig } from "./types.js";
2
- export interface ModelConfigOptions extends Omit<AgentModelFactoryConfig, "capabilities"> {
2
+ export interface ModelConfigOptions extends AgentModelFactoryConfig {
3
3
  }
4
4
  export declare function createModelConfig(config: ModelConfigOptions): AgentModelConfig;
@@ -1,8 +1,7 @@
1
- import { lazyApi, AgentModelError, createProtocolModelConfig } from "./885.js";
2
- import { flattenModelCatalog } from "./956.js";
1
+ import { lazyApi, AgentModelError, flattenModelCatalog, createProtocolModelConfig } from "./39.js";
3
2
 
4
3
 
5
- const anthropicMessagesApi = () => lazyApi(() => import("./_chunks/anthropic-messages~1-a4b25b48.js").then(m => m.anthropic_messages_namespaceObject));
4
+ const anthropicMessagesApi = () => lazyApi(() => import("./_chunks/anthropic-messages~1-d35e3e7d.js").then(m => m.anthropic_messages_namespaceObject));
6
5
  //# sourceMappingURL=anthropic-messages.lazy.js.map
7
6
  var anthropic_namespaceObject = /*#__PURE__*/JSON.parse('{"anthropic-messages":{"claude-fable-5":{"id":"claude-fable-5","name":"Claude Fable 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":10,"output":50,"cacheRead":1,"cacheWrite":12.5},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"off":null,"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true}},"claude-haiku-4-5":{"id":"claude-haiku-4-5","name":"Claude Haiku 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":1,"output":5,"cacheRead":0.1,"cacheWrite":1.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true}},"claude-haiku-4-5-20251001":{"id":"claude-haiku-4-5-20251001","name":"Claude Haiku 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":1,"output":5,"cacheRead":0.1,"cacheWrite":1.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true}},"claude-opus-4-5":{"id":"claude-opus-4-5","name":"Claude Opus 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true}},"claude-opus-4-5-20251101":{"id":"claude-opus-4-5-20251101","name":"Claude Opus 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":200000,"maxTokens":64000,"compat":{"supportsStrictTools":true}},"claude-opus-4-6":{"id":"claude-opus-4-6","name":"Claude Opus 4.6","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true}},"claude-opus-4-7":{"id":"claude-opus-4-7","name":"Claude Opus 4.7","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true}},"claude-opus-4-8":{"id":"claude-opus-4-8","name":"Claude Opus 4.8","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true}},"claude-opus-5":{"id":"claude-opus-5","name":"Claude Opus 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":5,"output":25,"cacheRead":0.5,"cacheWrite":6.25},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsTemperature":false,"supportsStrictTools":true}},"claude-sonnet-4-5":{"id":"claude-sonnet-4-5","name":"Claude Sonnet 4.5 (latest)","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":1000000,"maxTokens":64000,"compat":{"supportsStrictTools":true}},"claude-sonnet-4-5-20250929":{"id":"claude-sonnet-4-5-20250929","name":"Claude Sonnet 4.5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":1000000,"maxTokens":64000,"compat":{"supportsStrictTools":true}},"claude-sonnet-4-6":{"id":"claude-sonnet-4-6","name":"Claude Sonnet 4.6","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":3,"output":15,"cacheRead":0.3,"cacheWrite":3.75},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true}},"claude-sonnet-5":{"id":"claude-sonnet-5","name":"Claude Sonnet 5","api":"anthropic-messages","provider":"anthropic","baseUrl":"https://api.anthropic.com","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":1000000,"maxTokens":128000,"thinkingLevelMap":{"xhigh":"xhigh","max":"max"},"compat":{"forceAdaptiveThinking":true,"supportsStrictTools":true}}}}')
8
7
  // This file is auto-generated by scripts/generate-models.ts
@@ -25,6 +24,7 @@ function createModelConfig(config) {
25
24
  api: "anthropic-messages",
26
25
  defaultBaseURL: "https://api.anthropic.com",
27
26
  stream: anthropicMessagesApi(),
27
+ preserveCatalogCompat: true,
28
28
  resolveCatalogModel: (model)=>Object.values(ANTHROPIC_MODELS).find(({ id })=>id === model)
29
29
  }, config);
30
30
  }
@@ -1,4 +1,4 @@
1
1
  import type { AgentModelConfig, AgentModelFactoryConfig } from "./types.js";
2
- export interface ModelConfigOptions extends Omit<AgentModelFactoryConfig, "capabilities" | "fetch" | "timeoutMs"> {
2
+ export interface ModelConfigOptions extends Omit<AgentModelFactoryConfig, "fetch" | "timeoutMs"> {
3
3
  }
4
4
  export declare function createModelConfig(config: ModelConfigOptions): AgentModelConfig;
@@ -1,8 +1,7 @@
1
- import { lazyApi, AgentModelError, createProtocolModelConfig } from "./885.js";
2
- import { flattenModelCatalog } from "./956.js";
1
+ import { lazyApi, AgentModelError, flattenModelCatalog, createProtocolModelConfig } from "./39.js";
3
2
 
4
3
 
5
- const googleGenerativeAIApi = () => lazyApi(() => import("./_chunks/google-generative-ai~1-78bb2822.js").then(m => m.google_generative_ai_namespaceObject));
4
+ const googleGenerativeAIApi = () => lazyApi(() => import("./_chunks/google-generative-ai~1-2ba71457.js").then(m => m.google_generative_ai_namespaceObject));
6
5
  //# sourceMappingURL=google-generative-ai.lazy.js.map
7
6
  var google_namespaceObject = /*#__PURE__*/JSON.parse('{"google-generative-ai":{"deep-research-max-preview-04-2026":{"id":"deep-research-max-preview-04-2026","name":"Deep Research Max Preview (Apr-21-2026)","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":0},"contextWindow":131072,"maxTokens":65536},"deep-research-preview-04-2026":{"id":"deep-research-preview-04-2026","name":"Deep Research Preview (Apr-21-2026)","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":0},"contextWindow":131072,"maxTokens":65536},"gemini-2.0-flash":{"id":"gemini-2.0-flash","name":"Gemini 2.0 Flash","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"cost":{"input":0.1,"output":0.4,"cacheRead":0.025,"cacheWrite":0},"contextWindow":1048576,"maxTokens":8192},"gemini-2.0-flash-lite":{"id":"gemini-2.0-flash-lite","name":"Gemini 2.0 Flash-Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"cost":{"input":0.075,"output":0.3,"cacheRead":0,"cacheWrite":0},"contextWindow":1048576,"maxTokens":8192},"gemini-2.5-computer-use-preview-10-2025":{"id":"gemini-2.5-computer-use-preview-10-2025","name":"Gemini 2.5 Computer Use Preview 10-2025","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":1.25,"output":10,"cacheRead":0,"cacheWrite":0},"contextWindow":131072,"maxTokens":65536},"gemini-2.5-flash":{"id":"gemini-2.5-flash","name":"Gemini 2.5 Flash","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.3,"output":2.5,"cacheRead":0.03,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},"gemini-2.5-flash-lite":{"id":"gemini-2.5-flash-lite","name":"Gemini 2.5 Flash-Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.1,"output":0.4,"cacheRead":0.01,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},"gemini-2.5-pro":{"id":"gemini-2.5-pro","name":"Gemini 2.5 Pro","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":1.25,"output":10,"cacheRead":0.125,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},"gemini-3-flash-preview":{"id":"gemini-3-flash-preview","name":"Gemini 3 Flash Preview","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.5,"output":3,"cacheRead":0.05,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-3-pro-preview":{"id":"gemini-3-pro-preview","name":"Gemini 3 Pro Preview","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null,"minimal":null,"low":"LOW","medium":null,"high":"HIGH"}},"gemini-3.1-flash-lite":{"id":"gemini-3.1-flash-lite","name":"Gemini 3.1 Flash Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.25,"output":1.5,"cacheRead":0.025,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-3.1-flash-lite-image":{"id":"gemini-3.1-flash-lite-image","name":"Nano Banana 2 Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.25,"output":30,"cacheRead":0,"cacheWrite":0},"contextWindow":65536,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-3.1-flash-lite-preview":{"id":"gemini-3.1-flash-lite-preview","name":"Gemini 3.1 Flash Lite Preview","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.25,"output":1.5,"cacheRead":0.025,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-3.1-flash-live-preview":{"id":"gemini-3.1-flash-live-preview","name":"Gemini 3.1 Flash Live Preview","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.75,"output":4.5,"cacheRead":0,"cacheWrite":0},"contextWindow":131072,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-3.1-pro-preview":{"id":"gemini-3.1-pro-preview","name":"Gemini 3.1 Pro Preview","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null,"minimal":null,"low":"LOW","medium":null,"high":"HIGH"}},"gemini-3.1-pro-preview-customtools":{"id":"gemini-3.1-pro-preview-customtools","name":"Gemini 3.1 Pro Preview Custom Tools","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null,"minimal":null,"low":"LOW","medium":null,"high":"HIGH"}},"gemini-3.5-flash":{"id":"gemini-3.5-flash","name":"Gemini 3.5 Flash","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":1.5,"output":9,"cacheRead":0.15,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-3.5-flash-lite":{"id":"gemini-3.5-flash-lite","name":"Gemini 3.5 Flash Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.3,"output":2.5,"cacheRead":0.03,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-3.6-flash":{"id":"gemini-3.6-flash","name":"Gemini 3.6 Flash","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":1.5,"output":7.5,"cacheRead":0.15,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-flash-latest":{"id":"gemini-flash-latest","name":"Gemini Flash Latest","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":1.5,"output":9,"cacheRead":0.15,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-flash-lite-latest":{"id":"gemini-flash-lite-latest","name":"Gemini Flash-Lite Latest","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.25,"output":1.5,"cacheRead":0.025,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"thinkingLevelMap":{"off":null}},"gemini-robotics-er-1.6-preview":{"id":"gemini-robotics-er-1.6-preview","name":"Gemini Robotics-ER 1.6 Preview","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":1,"output":5,"cacheRead":0,"cacheWrite":0},"contextWindow":131072,"maxTokens":65536},"gemma-4-26b-a4b-it":{"id":"gemma-4-26b-a4b-it","name":"Gemma 4 26B A4B IT","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":262144,"maxTokens":32768,"thinkingLevelMap":{"off":null,"minimal":"MINIMAL","low":null,"medium":null,"high":"HIGH"}},"gemma-4-31b-it":{"id":"gemma-4-31b-it","name":"Gemma 4 31B IT","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":262144,"maxTokens":32768,"thinkingLevelMap":{"off":null,"minimal":"MINIMAL","low":null,"medium":null,"high":"HIGH"}}}}')
8
7
  // This file is auto-generated by scripts/generate-models.ts
@@ -25,6 +24,7 @@ function createModelConfig(config) {
25
24
  defaultBaseURL: "https://generativelanguage.googleapis.com/v1beta",
26
25
  stream: googleGenerativeAIApi(),
27
26
  supportsCustomFetch: false,
27
+ preserveCatalogCompat: true,
28
28
  resolveCatalogModel: (model)=>Object.values(GOOGLE_MODELS).find(({ id })=>id === model)
29
29
  }, config);
30
30
  }
@@ -1,15 +1,18 @@
1
- import { lazyApi, createProtocolModelConfig } from "./885.js";
1
+ import { lazyApi, createProtocolModelConfig } from "./39.js";
2
+ import { OPENAI_MODELS } from "./851.js";
2
3
 
3
4
 
4
- const openAICompletionsApi = () => lazyApi(() => import("./_chunks/openai-completions~1-7677fb83.js"));
5
+ const openAICompletionsApi = () => lazyApi(() => import("./_chunks/openai-completions~1-b340f0e0.js"));
5
6
  //# sourceMappingURL=openai-completions.lazy.js.map
6
7
 
7
8
 
9
+
8
10
  function createModelConfig(config) {
9
11
  return createProtocolModelConfig({
10
12
  provider: "openai-compatible",
11
13
  api: "openai-completions",
12
- stream: openAICompletionsApi()
14
+ stream: openAICompletionsApi(),
15
+ resolveCatalogModel: (model)=>Object.values(OPENAI_MODELS).find(({ id })=>id === model)
13
16
  }, config);
14
17
  }
15
18
 
@@ -1,15 +1,18 @@
1
- import { lazyApi, createProtocolModelConfig } from "./885.js";
1
+ import { lazyApi, createProtocolModelConfig } from "./39.js";
2
+ import { OPENAI_MODELS } from "./851.js";
2
3
 
3
4
 
4
- const openAIResponsesApi = () => lazyApi(() => import("./_chunks/openai-responses~1-cc0a71cd.js").then(m => m.openai_responses_namespaceObject));
5
+ const openAIResponsesApi = () => lazyApi(() => import("./_chunks/openai-responses~1-b53c65c2.js").then(m => m.openai_responses_namespaceObject));
5
6
  //# sourceMappingURL=openai-responses.lazy.js.map
6
7
 
7
8
 
9
+
8
10
  function createModelConfig(config) {
9
11
  return createProtocolModelConfig({
10
12
  provider: "openai-compatible",
11
13
  api: "openai-responses",
12
- stream: openAIResponsesApi()
14
+ stream: openAIResponsesApi(),
15
+ resolveCatalogModel: (model)=>Object.values(OPENAI_MODELS).find(({ id })=>id === model)
13
16
  }, config);
14
17
  }
15
18
 
@@ -0,0 +1,95 @@
1
+ import { type Message, type RunAgentInput } from "@ag-ui/core";
2
+ export type { Message, RunAgentInput } from "@ag-ui/core";
3
+ import type { AgentContextEntry, AgentToolDefinition } from "@nexface/tools";
4
+ import type { AgentMessage, AgentModelToolCall, AgentRun, AgentRunInput } from "./types.js";
5
+ import type { HistorySummary } from "./history-compaction.js";
6
+ export interface AgentRequestState {
7
+ readonly nexface: RequestContinuation;
8
+ }
9
+ export type AgentResumeEntry = NonNullable<AgentRunInput["resume"]>[0] | {
10
+ readonly interruptId: string;
11
+ readonly status: "resolved";
12
+ readonly payload: {
13
+ readonly toolResultMessageId: string;
14
+ readonly confirmed?: boolean;
15
+ };
16
+ };
17
+ export interface BrowserToolResult {
18
+ readonly toolCallId: string;
19
+ readonly result?: unknown;
20
+ readonly error?: {
21
+ readonly code: string;
22
+ readonly message: string;
23
+ };
24
+ readonly confirmed?: boolean;
25
+ }
26
+ export interface InternalRequestInput {
27
+ readonly messages: readonly AgentMessage[];
28
+ readonly newMessages: readonly AgentMessage[];
29
+ readonly tools: readonly AgentToolDefinition<any, any>[];
30
+ readonly contexts: readonly AgentContextEntry[];
31
+ readonly continuation?: RequestContinuation;
32
+ readonly resume?: AgentResumeEntry;
33
+ readonly toolResult?: BrowserToolResult;
34
+ readonly receipts: readonly Message[];
35
+ }
36
+ export interface RequestContinuation {
37
+ version: 2;
38
+ threadId: string;
39
+ timeline: Array<{
40
+ messageId: string;
41
+ } | {
42
+ internal: AgentMessage;
43
+ }>;
44
+ model: {
45
+ provider: string;
46
+ model: string;
47
+ };
48
+ loadedSkills: string[];
49
+ browserSkillLoaded: boolean;
50
+ contextRevision: number;
51
+ lastContextSerialized?: string;
52
+ replay?: unknown;
53
+ summary?: HistorySummary;
54
+ compactionAttemptBeforeMessageId?: string;
55
+ pending?: {
56
+ kind: "client-tool-execution";
57
+ interruptId: string;
58
+ calls: AgentModelToolCall[];
59
+ definition: AgentToolDefinition<any, any>;
60
+ step: number;
61
+ recoverableFailures: number;
62
+ unresolvedToolFailures: string[];
63
+ browserSkillAvailable: boolean;
64
+ loadBrowserSkill: boolean;
65
+ };
66
+ }
67
+ export declare const approvalResponseSchema: {
68
+ type: string;
69
+ properties: {
70
+ approved: {
71
+ type: string;
72
+ };
73
+ };
74
+ required: string[];
75
+ additionalProperties: boolean;
76
+ };
77
+ export declare const toolResultResponseSchema: {
78
+ type: string;
79
+ properties: {
80
+ toolResultMessageId: {
81
+ type: string;
82
+ };
83
+ confirmed: {
84
+ type: string;
85
+ };
86
+ };
87
+ required: string[];
88
+ additionalProperties: boolean;
89
+ };
90
+ export declare function parseResume(value: unknown, allowMetadata?: boolean): AgentResumeEntry;
91
+ export declare function convertMessages(values: readonly Message[]): AgentMessage[];
92
+ export declare function decodeRequest(value: RunAgentInput): InternalRequestInput;
93
+ export declare function toProtocolMessages(messages: AgentMessage[]): Message[];
94
+ export declare function runResponse(run: AgentRun): Response;
95
+ export declare function mergeProtocolMessages(messages: Message[], previous: Message[]): Message[];
@@ -0,0 +1,238 @@
1
+ import { MessageSchema } from "@ag-ui/core";
2
+ import { getToolResultError } from "./tool-result.js";
3
+ export const approvalResponseSchema = {
4
+ type: "object", properties: { approved: { type: "boolean" } }, required: ["approved"], additionalProperties: false,
5
+ };
6
+ export const toolResultResponseSchema = {
7
+ type: "object", properties: { toolResultMessageId: { type: "string" }, confirmed: { type: "boolean" } }, required: ["toolResultMessageId"], additionalProperties: false,
8
+ };
9
+ export function parseResume(value, allowMetadata = false) {
10
+ if (!value || typeof value !== "object" || Array.isArray(value))
11
+ throw new Error("Invalid resume entry.");
12
+ const entry = value;
13
+ const allowed = ["interruptId", "status", "payload", ...(allowMetadata ? ["metadata"] : [])];
14
+ if (Object.keys(entry).some((key) => !allowed.includes(key)) || typeof entry.interruptId !== "string" || !entry.interruptId)
15
+ throw new Error("Invalid resume entry.");
16
+ if (entry.status === "cancelled") {
17
+ if (entry.payload !== undefined)
18
+ throw new Error("A cancelled response cannot carry a payload.");
19
+ return { interruptId: entry.interruptId, status: "cancelled" };
20
+ }
21
+ const payload = entry.payload;
22
+ if (entry.status !== "resolved" || !payload || typeof payload !== "object" || Array.isArray(payload))
23
+ throw new Error("A resolved response requires a payload.");
24
+ if (typeof payload.approved === "boolean" && Object.keys(payload).every((key) => key === "approved")) {
25
+ return { interruptId: entry.interruptId, status: "resolved", payload: { approved: payload.approved } };
26
+ }
27
+ if (typeof payload.toolResultMessageId === "string" && payload.toolResultMessageId && (payload.confirmed === undefined || typeof payload.confirmed === "boolean") && Object.keys(payload).every((key) => key === "toolResultMessageId" || key === "confirmed")) {
28
+ return { interruptId: entry.interruptId, status: "resolved", payload: { toolResultMessageId: payload.toolResultMessageId, ...(payload.confirmed === undefined ? {} : { confirmed: payload.confirmed }) } };
29
+ }
30
+ throw new Error("Invalid resume payload.");
31
+ }
32
+ export function convertMessages(values) {
33
+ const ids = new Set();
34
+ const calls = new Map();
35
+ return values.flatMap((value) => {
36
+ const message = MessageSchema.parse(value);
37
+ if (ids.has(message.id))
38
+ throw new Error("Duplicate message ID.");
39
+ ids.add(message.id);
40
+ if (message.role === "activity" || message.role === "reasoning")
41
+ return [];
42
+ if (message.role === "assistant") {
43
+ for (const call of message.toolCalls ?? [])
44
+ calls.set(call.id, call.function.name);
45
+ return [{ id: message.id, role: "assistant", content: message.content ?? null, toolCalls: (message.toolCalls ?? []).map((call) => ({ id: call.id, ...call.function })) }];
46
+ }
47
+ if (message.role === "tool") {
48
+ const name = calls.get(message.toolCallId);
49
+ if (!name)
50
+ throw new Error("A tool result has no preceding tool call.");
51
+ const content = message.error !== undefined && getToolResultError(message.content) === undefined
52
+ ? JSON.stringify({ error: { code: "TOOL_ERROR", message: message.error }, content: message.content }) : message.content;
53
+ return [{ id: message.id, role: "tool", name, toolCallId: message.toolCallId, content }];
54
+ }
55
+ if (message.role === "user") {
56
+ if (Array.isArray(message.content) && message.content.some((part) => part.type !== "text" && part.type !== "image"))
57
+ throw new Error("This Agent supports text and image input only.");
58
+ const content = typeof message.content === "string" ? message.content.trim() : message.content;
59
+ if (!content.length)
60
+ throw new Error("Agent message content is required.");
61
+ return [{ id: message.id, role: "user", content: content }];
62
+ }
63
+ throw new Error(`Unsupported model history role: ${message.role}.`);
64
+ });
65
+ }
66
+ export function decodeRequest(value) {
67
+ const extension = value.forwardedProps?.nexface;
68
+ if (extension && (extension.version !== 2 || "checkpoint" in extension || "confirmedToolCallId" in extension))
69
+ throw new Error("Unsupported Nexface request version or recovery channel.");
70
+ const state = value.state;
71
+ if (state != null && (typeof state !== "object" || Array.isArray(state)))
72
+ throw new Error("Invalid Agent state.");
73
+ if (state && "nexface" in state && (!state.nexface || typeof state.nexface !== "object" || Array.isArray(state.nexface)))
74
+ throw new Error("Invalid Nexface state.");
75
+ const restored = state?.nexface;
76
+ if (restored && (restored.version !== 2 || restored.threadId !== value.threadId || !Array.isArray(restored.timeline)))
77
+ throw new Error("Agent state does not match this thread or version.");
78
+ const converted = new Map(convertMessages(value.messages).map((message) => [message.id, message]));
79
+ const source = new Map(value.messages.map((message) => [message.id, message]));
80
+ const used = new Set();
81
+ const messages = (restored?.timeline ?? []).flatMap((entry) => {
82
+ if ("internal" in entry) {
83
+ if (!entry.internal || (entry.internal.role !== "system" && entry.internal.role !== "application_context"))
84
+ throw new Error("Invalid internal history.");
85
+ return [structuredClone(entry.internal)];
86
+ }
87
+ const message = converted.get(entry.messageId);
88
+ if (!message || used.has(entry.messageId))
89
+ throw new Error("State message is missing or repeated.");
90
+ used.add(entry.messageId);
91
+ return [message];
92
+ });
93
+ const pending = restored?.pending;
94
+ if (value.resume && value.resume.length !== 1)
95
+ throw new Error("Exactly one resume entry is required.");
96
+ const resume = value.resume?.[0] ? parseResume(value.resume[0], true) : undefined;
97
+ const receipts = [];
98
+ let toolResult;
99
+ if (pending) {
100
+ if (!resume || resume.interruptId !== pending.interruptId || !Array.isArray(pending.calls) || !pending.calls.length)
101
+ throw new Error("Resume does not match the pending interrupt.");
102
+ if (pending.kind !== "client-tool-execution")
103
+ throw new Error("Invalid pending kind.");
104
+ if (resume.status === "resolved") {
105
+ if (!("toolResultMessageId" in resume.payload))
106
+ throw new Error("A client tool requires a result reference.");
107
+ const message = source.get(resume.payload.toolResultMessageId);
108
+ if (!message || used.has(message.id) || message.role !== "tool" || message.toolCallId !== pending.calls[0].id)
109
+ throw new Error("Resume result does not match the pending call.");
110
+ const owner = [...messages].reverse().find((item) => item.role === "assistant");
111
+ const ownerIndex = value.messages.findIndex((item) => item.id === owner?.id);
112
+ const receiptIndex = value.messages.indexOf(message);
113
+ if (ownerIndex < 0 || receiptIndex <= ownerIndex || value.messages.slice(ownerIndex + 1, receiptIndex).some((item) => item.role === "user" || (item.role === "assistant" && item.toolCalls?.length)))
114
+ throw new Error("The receipt does not belong to the pending assistant batch.");
115
+ let payload;
116
+ try {
117
+ payload = JSON.parse(message.content);
118
+ }
119
+ catch {
120
+ if (!message.error)
121
+ throw new Error("Invalid tool result.");
122
+ }
123
+ if (message.error !== undefined)
124
+ payload = { error: { code: payload?.error?.code ?? "TOOL_ERROR", message: message.error } };
125
+ if (!payload || typeof payload !== "object" || (!("result" in payload) && !("error" in payload)))
126
+ throw new Error("Invalid tool result.");
127
+ if (payload.error && (typeof payload.error.code !== "string" || typeof payload.error.message !== "string"))
128
+ throw new Error("Invalid tool error.");
129
+ toolResult = { toolCallId: message.toolCallId, ...(payload.error ? { error: payload.error } : { result: payload.result }), ...(resume.payload.confirmed === undefined ? {} : { confirmed: resume.payload.confirmed }) };
130
+ receipts.push(message);
131
+ }
132
+ else {
133
+ const owner = [...messages].reverse().find((message) => message.role === "assistant");
134
+ const ownerIndex = value.messages.findIndex((message) => message.id === owner?.id);
135
+ for (const message of value.messages.slice(ownerIndex + 1)) {
136
+ if (message.role === "user")
137
+ break;
138
+ if (used.has(message.id) || message.role !== "tool" || !pending.calls.some((call) => call.id === message.toolCallId))
139
+ continue;
140
+ let payload;
141
+ try {
142
+ payload = JSON.parse(message.content);
143
+ }
144
+ catch {
145
+ throw new Error("Invalid cancellation receipt.");
146
+ }
147
+ const first = message.toolCallId === pending.calls[0].id;
148
+ if (!(first ? ["TOOL_CANCELLED", "TOOL_CONFIRMATION_INVALIDATED"] : ["TOOL_SKIPPED", "TOOL_CANCELLED"]).includes(payload?.error?.code))
149
+ throw new Error("Cancellation cannot replace an execution result.");
150
+ if (receipts.some((receipt) => receipt.role === "tool" && receipt.toolCallId === message.toolCallId))
151
+ throw new Error("Repeated cancellation receipt.");
152
+ receipts.push(message);
153
+ }
154
+ }
155
+ }
156
+ else if (resume)
157
+ throw new Error("Cannot resume without a pending interrupt.");
158
+ const receiptIds = new Set(receipts.map((message) => message.id));
159
+ const newMessages = value.messages.flatMap((message) => {
160
+ if (used.has(message.id) || receiptIds.has(message.id))
161
+ return [];
162
+ if (pending && message.role === "tool" && pending.calls.some((call) => call.id === message.toolCallId))
163
+ throw new Error("Repeated or unexpected pending result.");
164
+ const convertedMessage = converted.get(message.id);
165
+ if (pending && resume?.status === "resolved" && convertedMessage)
166
+ throw new Error("A resolved response cannot start a new task.");
167
+ return convertedMessage ? [convertedMessage] : [];
168
+ });
169
+ return {
170
+ messages, newMessages, receipts, ...(restored ? { continuation: structuredClone(restored) } : {}), ...(resume ? { resume } : {}), ...(toolResult ? { toolResult } : {}),
171
+ tools: value.tools.map((tool) => ({ name: tool.name, description: tool.description, inputSchema: tool.parameters, effect: extension?.toolMetadata?.[tool.name]?.effect ?? "action" })),
172
+ contexts: value.context.map((context, index) => {
173
+ let data = context.value;
174
+ try {
175
+ data = JSON.parse(context.value);
176
+ }
177
+ catch { /* Context values may be plain text. */ }
178
+ if (data && typeof data === "object" && "name" in data && "value" in data)
179
+ return data;
180
+ return { name: `context${index}`, description: context.description, value: data };
181
+ }),
182
+ };
183
+ }
184
+ export function toProtocolMessages(messages) {
185
+ return messages.flatMap((message) => {
186
+ message.id ??= globalThis.crypto.randomUUID();
187
+ if (message.role === "system" || message.role === "application_context")
188
+ return [];
189
+ if (message.role === "assistant")
190
+ return [{ id: message.id, role: "assistant", ...(message.content === null ? {} : { content: message.content }), toolCalls: message.toolCalls.map(({ id, name, arguments: args }) => ({ id, type: "function", function: { name, arguments: args } })) }];
191
+ if (message.role === "tool") {
192
+ const error = getToolResultError(message.content);
193
+ return [{ id: message.id, role: "tool", toolCallId: message.toolCallId, content: message.content, ...(error === undefined ? {} : { error }) }];
194
+ }
195
+ return [{ id: message.id, role: "user", content: message.content }];
196
+ });
197
+ }
198
+ export function runResponse(run) {
199
+ const encoder = new TextEncoder();
200
+ const iterator = run[Symbol.asyncIterator]();
201
+ void run.result.catch(() => undefined);
202
+ return new Response(new ReadableStream({
203
+ async pull(controller) {
204
+ try {
205
+ const next = await iterator.next();
206
+ if (next.done)
207
+ controller.close();
208
+ else
209
+ controller.enqueue(encoder.encode(`data: ${JSON.stringify(next.value)}\n\n`));
210
+ }
211
+ catch (error) {
212
+ controller.error(error);
213
+ }
214
+ },
215
+ async cancel() { run.cancel(); await iterator.return?.(); },
216
+ }), { headers: {
217
+ "Content-Type": "text/event-stream",
218
+ "Cache-Control": "no-cache, no-transform",
219
+ "X-Accel-Buffering": "no",
220
+ } });
221
+ }
222
+ export function mergeProtocolMessages(messages, previous) {
223
+ const remaining = new Map(messages.map((message) => [message.id, message]));
224
+ const mergedHistory = previous.flatMap((old) => {
225
+ const message = remaining.get(old.id);
226
+ if (!message)
227
+ return old.role === "activity" || old.role === "reasoning" ? [old] : [];
228
+ remaining.delete(old.id);
229
+ const merged = { ...old, ...message };
230
+ if (message.role === "tool" && old.role === "tool" && old.error !== undefined)
231
+ merged.content = old.content;
232
+ if (message.role === "assistant" && old.role === "assistant")
233
+ merged.toolCalls = message.toolCalls?.map((call) => ({ ...old.toolCalls?.find((item) => item.id === call.id), ...call }));
234
+ return [MessageSchema.parse(merged)];
235
+ });
236
+ return [...mergedHistory, ...remaining.values()];
237
+ }
238
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoC,MAAM,aAAa,CAAC;AAI9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAqDtD,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,oBAAoB,EAAE,KAAK;CACnH,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,KAAK;CACxK,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,KAAc,EAAE,aAAa,GAAG,KAAK;IAC/D,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC1G,MAAM,KAAK,GAAG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