@dexto/core 1.16.5 → 1.17.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 (90) hide show
  1. package/dist/agent/schemas.d.ts +2 -2
  2. package/dist/llm/auth/index.d.ts +1 -1
  3. package/dist/llm/auth/index.d.ts.map +1 -1
  4. package/dist/llm/auth/types.d.ts +14 -0
  5. package/dist/llm/auth/types.d.ts.map +1 -1
  6. package/dist/llm/error-codes.cjs +2 -0
  7. package/dist/llm/error-codes.d.ts +2 -0
  8. package/dist/llm/error-codes.d.ts.map +1 -1
  9. package/dist/llm/error-codes.js +2 -0
  10. package/dist/llm/errors.cjs +27 -0
  11. package/dist/llm/errors.d.ts +9 -0
  12. package/dist/llm/errors.d.ts.map +1 -1
  13. package/dist/llm/errors.js +27 -0
  14. package/dist/llm/executor/tool-output-spill.cjs +46 -14
  15. package/dist/llm/executor/tool-output-spill.d.ts.map +1 -1
  16. package/dist/llm/executor/tool-output-spill.js +46 -14
  17. package/dist/llm/executor/turn-executor.cjs +3 -0
  18. package/dist/llm/executor/turn-executor.d.ts +5 -5
  19. package/dist/llm/executor/turn-executor.d.ts.map +1 -1
  20. package/dist/llm/executor/turn-executor.js +3 -0
  21. package/dist/llm/index.cjs +6 -0
  22. package/dist/llm/index.d.ts +3 -1
  23. package/dist/llm/index.d.ts.map +1 -1
  24. package/dist/llm/index.js +4 -0
  25. package/dist/llm/private-address.cjs +88 -0
  26. package/dist/llm/private-address.d.ts +3 -0
  27. package/dist/llm/private-address.d.ts.map +1 -0
  28. package/dist/llm/private-address.js +65 -0
  29. package/dist/llm/safe-download.cjs +159 -0
  30. package/dist/llm/safe-download.d.ts +21 -0
  31. package/dist/llm/safe-download.d.ts.map +1 -0
  32. package/dist/llm/safe-download.js +126 -0
  33. package/dist/llm/services/factory.cjs +204 -14
  34. package/dist/llm/services/factory.d.ts +1 -1
  35. package/dist/llm/services/factory.d.ts.map +1 -1
  36. package/dist/llm/services/factory.js +204 -14
  37. package/dist/logger/logger.cjs +8 -9
  38. package/dist/logger/logger.d.ts.map +1 -1
  39. package/dist/logger/logger.js +8 -9
  40. package/dist/logger/v2/dexto-logger.cjs +3 -2
  41. package/dist/logger/v2/dexto-logger.d.ts.map +1 -1
  42. package/dist/logger/v2/dexto-logger.js +3 -2
  43. package/dist/mcp/mcp-client.cjs +17 -8
  44. package/dist/mcp/mcp-client.d.ts +4 -2
  45. package/dist/mcp/mcp-client.d.ts.map +1 -1
  46. package/dist/mcp/mcp-client.js +17 -8
  47. package/dist/mcp/schemas.cjs +3 -0
  48. package/dist/mcp/schemas.d.ts +3 -0
  49. package/dist/mcp/schemas.d.ts.map +1 -1
  50. package/dist/mcp/schemas.js +3 -0
  51. package/dist/resources/handlers/filesystem-handler.cjs +7 -6
  52. package/dist/resources/handlers/filesystem-handler.d.ts.map +1 -1
  53. package/dist/resources/handlers/filesystem-handler.js +7 -6
  54. package/dist/systemPrompt/schemas.d.ts +3 -3
  55. package/dist/telemetry/decorators.cjs +2 -2
  56. package/dist/telemetry/decorators.js +2 -2
  57. package/dist/tools/tool-output-read.cjs +4 -3
  58. package/dist/tools/tool-output-read.d.ts.map +1 -1
  59. package/dist/tools/tool-output-read.js +4 -3
  60. package/dist/utils/index.cjs +3 -1
  61. package/dist/utils/index.d.ts +1 -0
  62. package/dist/utils/index.d.ts.map +1 -1
  63. package/dist/utils/index.js +1 -0
  64. package/dist/utils/metadata-address.cjs +138 -0
  65. package/dist/utils/metadata-address.d.ts +24 -0
  66. package/dist/utils/metadata-address.d.ts.map +1 -0
  67. package/dist/utils/metadata-address.js +113 -0
  68. package/dist/utils/path.cjs +0 -15
  69. package/dist/utils/path.d.ts +0 -6
  70. package/dist/utils/path.d.ts.map +1 -1
  71. package/dist/utils/path.js +0 -14
  72. package/dist/utils/redactor.cjs +242 -34
  73. package/dist/utils/redactor.d.ts +15 -0
  74. package/dist/utils/redactor.d.ts.map +1 -1
  75. package/dist/utils/redactor.js +238 -34
  76. package/dist/utils/text-boundary.cjs +32 -0
  77. package/dist/utils/text-boundary.d.ts +3 -0
  78. package/dist/utils/text-boundary.d.ts.map +1 -0
  79. package/dist/utils/text-boundary.js +9 -0
  80. package/dist/workspace/index.cjs +7 -2
  81. package/dist/workspace/index.d.ts +1 -0
  82. package/dist/workspace/index.d.ts.map +1 -1
  83. package/dist/workspace/index.js +4 -1
  84. package/dist/workspace/shell-environment.cjs +96 -0
  85. package/dist/workspace/shell-environment.d.ts +18 -0
  86. package/dist/workspace/shell-environment.d.ts.map +1 -0
  87. package/dist/workspace/shell-environment.js +72 -0
  88. package/dist/workspace/types.d.ts +9 -0
  89. package/dist/workspace/types.d.ts.map +1 -1
  90. package/package.json +2 -2
@@ -9,9 +9,9 @@ export declare const SecuritySchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
9
9
  type: z.ZodLiteral<"apiKey">;
10
10
  name: z.ZodString;
11
11
  in: z.ZodEnum<{
12
+ cookie: "cookie";
12
13
  header: "header";
13
14
  query: "query";
14
- cookie: "cookie";
15
15
  }>;
16
16
  description: z.ZodOptional<z.ZodString>;
17
17
  }, z.core.$strict>, z.ZodObject<{
@@ -105,9 +105,9 @@ export declare const AgentCardSchema: z.ZodObject<{
105
105
  type: z.ZodLiteral<"apiKey">;
106
106
  name: z.ZodString;
107
107
  in: z.ZodEnum<{
108
+ cookie: "cookie";
108
109
  header: "header";
109
110
  query: "query";
110
- cookie: "cookie";
111
111
  }>;
112
112
  description: z.ZodOptional<z.ZodString>;
113
113
  }, z.core.$strict>, z.ZodObject<{
@@ -1,2 +1,2 @@
1
- export type { LlmAuthResolver, LlmRuntimeAuthOverrides, ResolveLlmRuntimeAuthInput, } from './types.js';
1
+ export type { LlmAuthResolver, LlmRequestAuth, LlmRuntimeAuthOverrides, ResolveLlmRuntimeAuthInput, } from './types.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/llm/auth/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,eAAe,EACf,uBAAuB,EACvB,0BAA0B,GAC7B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/llm/auth/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,0BAA0B,GAC7B,MAAM,YAAY,CAAC"}
@@ -4,8 +4,22 @@ export type LlmRuntimeAuthOverrides = {
4
4
  baseURL?: string | undefined;
5
5
  headers?: Record<string, string> | undefined;
6
6
  fetch?: typeof fetch | undefined;
7
+ /** Optional host-owned credential provenance and failure classification for each request. */
8
+ requestAuth?: LlmRequestAuth | undefined;
7
9
  auth?: LlmRuntimeAuthInfo | undefined;
8
10
  };
11
+ /** Request authentication may replace the API key. The classification body is bounded to 64 KiB. */
12
+ export type LlmRequestAuth = {
13
+ fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<{
14
+ response: Response;
15
+ provenance: unknown;
16
+ }>;
17
+ isRetryableResponse: (input: {
18
+ response: Response;
19
+ provenance: unknown;
20
+ signal?: AbortSignal | null;
21
+ }) => Promise<boolean>;
22
+ };
9
23
  export type LlmRuntimeAuthInfo = {
10
24
  source: 'profile';
11
25
  profileId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/llm/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,MAAM,uBAAuB,GAAG;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAC7C,KAAK,CAAC,EAAE,OAAO,KAAK,GAAG,SAAS,CAAC;IACjC,IAAI,CAAC,EAAE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,QAAQ,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC1D,mBAAmB,EAAE,CAAC,KAAK,EAAE;QACzB,QAAQ,EAAE,QAAQ,CAAC;QACnB,UAAU,EAAE,OAAO,CAAC;QACpB,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;KAC/B,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACrC,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,MAAM,WAAW,eAAe;IAC5B,kBAAkB,CAAC,KAAK,EAAE,0BAA0B,GAAG,uBAAuB,GAAG,IAAI,CAAC;CACzF"}
@@ -27,6 +27,8 @@ var LLMErrorCode = /* @__PURE__ */ ((LLMErrorCode2) => {
27
27
  LLMErrorCode2["API_KEY_CANDIDATE_MISSING"] = "llm_api_key_candidate_missing";
28
28
  LLMErrorCode2["BASE_URL_MISSING"] = "llm_base_url_missing";
29
29
  LLMErrorCode2["BASE_URL_INVALID"] = "llm_base_url_invalid";
30
+ LLMErrorCode2["RUNTIME_AUTH_UNSUPPORTED"] = "llm_runtime_auth_unsupported";
31
+ LLMErrorCode2["RUNTIME_AUTH_CONFLICT"] = "llm_runtime_auth_conflict";
30
32
  LLMErrorCode2["CONFIG_MISSING"] = "llm_config_missing";
31
33
  LLMErrorCode2["MODEL_INCOMPATIBLE"] = "llm_model_incompatible";
32
34
  LLMErrorCode2["MODEL_UNKNOWN"] = "llm_model_unknown";
@@ -8,6 +8,8 @@ export declare enum LLMErrorCode {
8
8
  API_KEY_CANDIDATE_MISSING = "llm_api_key_candidate_missing",
9
9
  BASE_URL_MISSING = "llm_base_url_missing",
10
10
  BASE_URL_INVALID = "llm_base_url_invalid",
11
+ RUNTIME_AUTH_UNSUPPORTED = "llm_runtime_auth_unsupported",
12
+ RUNTIME_AUTH_CONFLICT = "llm_runtime_auth_conflict",
11
13
  CONFIG_MISSING = "llm_config_missing",// Required config (e.g., GOOGLE_VERTEX_PROJECT)
12
14
  MODEL_INCOMPATIBLE = "llm_model_incompatible",
13
15
  MODEL_UNKNOWN = "llm_model_unknown",
@@ -1 +1 @@
1
- {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/llm/error-codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,YAAY;IAEpB,eAAe,wBAAwB;IACvC,eAAe,wBAAwB,CAAE,0BAA0B;IACnE,yBAAyB,kCAAkC;IAC3D,gBAAgB,yBAAyB;IACzC,gBAAgB,yBAAyB;IACzC,cAAc,uBAAuB,CAAE,gDAAgD;IAGvF,kBAAkB,2BAA2B;IAC7C,aAAa,sBAAsB;IACnC,oBAAoB,6BAA6B;IAGjD,sBAAsB,+BAA+B;IACrD,uBAAuB,gCAAgC;IACvD,kBAAkB,2BAA2B;IAG7C,eAAe,wBAAwB;IACvC,mBAAmB,4BAA4B;IAC/C,oBAAoB,6BAA6B;IAGjD,aAAa,sBAAsB;IACnC,iBAAiB,0BAA0B;IAC3C,cAAc,uBAAuB,CAAE,0DAA0D;IACjG,cAAc,uBAAuB,CAAE,+CAA+C;IAGtF,oBAAoB,6BAA6B,CAAE,+CAA+C;IAGlG,sBAAsB,+BAA+B;CACxD"}
1
+ {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/llm/error-codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,YAAY;IAEpB,eAAe,wBAAwB;IACvC,eAAe,wBAAwB,CAAE,0BAA0B;IACnE,yBAAyB,kCAAkC;IAC3D,gBAAgB,yBAAyB;IACzC,gBAAgB,yBAAyB;IACzC,wBAAwB,iCAAiC;IACzD,qBAAqB,8BAA8B;IACnD,cAAc,uBAAuB,CAAE,gDAAgD;IAGvF,kBAAkB,2BAA2B;IAC7C,aAAa,sBAAsB;IACnC,oBAAoB,6BAA6B;IAGjD,sBAAsB,+BAA+B;IACrD,uBAAuB,gCAAgC;IACvD,kBAAkB,2BAA2B;IAG7C,eAAe,wBAAwB;IACvC,mBAAmB,4BAA4B;IAC/C,oBAAoB,6BAA6B;IAGjD,aAAa,sBAAsB;IACnC,iBAAiB,0BAA0B;IAC3C,cAAc,uBAAuB,CAAE,0DAA0D;IACjG,cAAc,uBAAuB,CAAE,+CAA+C;IAGtF,oBAAoB,6BAA6B,CAAE,+CAA+C;IAGlG,sBAAsB,+BAA+B;CACxD"}
@@ -5,6 +5,8 @@ var LLMErrorCode = /* @__PURE__ */ ((LLMErrorCode2) => {
5
5
  LLMErrorCode2["API_KEY_CANDIDATE_MISSING"] = "llm_api_key_candidate_missing";
6
6
  LLMErrorCode2["BASE_URL_MISSING"] = "llm_base_url_missing";
7
7
  LLMErrorCode2["BASE_URL_INVALID"] = "llm_base_url_invalid";
8
+ LLMErrorCode2["RUNTIME_AUTH_UNSUPPORTED"] = "llm_runtime_auth_unsupported";
9
+ LLMErrorCode2["RUNTIME_AUTH_CONFLICT"] = "llm_runtime_auth_conflict";
8
10
  LLMErrorCode2["CONFIG_MISSING"] = "llm_config_missing";
9
11
  LLMErrorCode2["MODEL_INCOMPATIBLE"] = "llm_model_incompatible";
10
12
  LLMErrorCode2["MODEL_UNKNOWN"] = "llm_model_unknown";
@@ -46,6 +46,33 @@ class LLMError {
46
46
  { provider }
47
47
  );
48
48
  }
49
+ static runtimeAuthUnsupported(provider) {
50
+ return new import_DextoRuntimeError.DextoRuntimeError(
51
+ import_error_codes.LLMErrorCode.RUNTIME_AUTH_UNSUPPORTED,
52
+ import_types.ErrorScope.LLM,
53
+ import_types2.ErrorType.USER,
54
+ `Provider '${provider}' cannot use these runtime gateway overrides`,
55
+ { provider }
56
+ );
57
+ }
58
+ static invalidRuntimeBaseURL(provider) {
59
+ return new import_DextoRuntimeError.DextoRuntimeError(
60
+ import_error_codes.LLMErrorCode.BASE_URL_INVALID,
61
+ import_types.ErrorScope.LLM,
62
+ import_types2.ErrorType.USER,
63
+ `Runtime baseURL for '${provider}' cannot be blank`,
64
+ { provider }
65
+ );
66
+ }
67
+ static runtimeAuthConflict(provider) {
68
+ return new import_DextoRuntimeError.DextoRuntimeError(
69
+ import_error_codes.LLMErrorCode.RUNTIME_AUTH_CONFLICT,
70
+ import_types.ErrorScope.LLM,
71
+ import_types2.ErrorType.USER,
72
+ "Runtime auth cannot supply both fetch and requestAuth",
73
+ { provider }
74
+ );
75
+ }
49
76
  static missingConfig(provider, configName) {
50
77
  return new import_DextoRuntimeError.DextoRuntimeError(
51
78
  import_error_codes.LLMErrorCode.CONFIG_MISSING,
@@ -15,6 +15,15 @@ export declare class LLMError {
15
15
  static baseUrlMissing(provider: LLMProvider): DextoRuntimeError<{
16
16
  provider: "local" | "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "ollama" | "dexto-nova";
17
17
  }>;
18
+ static runtimeAuthUnsupported(provider: LLMProvider): DextoRuntimeError<{
19
+ provider: "local" | "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "ollama" | "dexto-nova";
20
+ }>;
21
+ static invalidRuntimeBaseURL(provider: LLMProvider): DextoRuntimeError<{
22
+ provider: "local" | "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "ollama" | "dexto-nova";
23
+ }>;
24
+ static runtimeAuthConflict(provider: LLMProvider): DextoRuntimeError<{
25
+ provider: "local" | "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "ollama" | "dexto-nova";
26
+ }>;
18
27
  static missingConfig(provider: LLMProvider, configName: string): DextoRuntimeError<{
19
28
  provider: "local" | "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "ollama" | "dexto-nova";
20
29
  configName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/llm/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAKnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,qBAAa,QAAQ;IAEjB,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM;;;;IAUxD,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,WAAW;;;IAU3C,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM;;;;IAU9D,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM;;;;IAW3C;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM;;;;IAW1D,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM;;;;IAczC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM;;;;;;;IAenE;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM;;;IAa3C,M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AAE,MAAM;;;;;;;IAenE;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM;;;IAa3C,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM;;;;;;;IAU3E;;;OAGG;IACH,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;;IAa3E,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;;;;;;;IAchF,MAAM,CAAC,kBAAkB;CAU5B"}
@@ -24,6 +24,33 @@ class LLMError {
24
24
  { provider }
25
25
  );
26
26
  }
27
+ static runtimeAuthUnsupported(provider) {
28
+ return new DextoRuntimeError(
29
+ LLMErrorCode.RUNTIME_AUTH_UNSUPPORTED,
30
+ ErrorScope.LLM,
31
+ ErrorType.USER,
32
+ `Provider '${provider}' cannot use these runtime gateway overrides`,
33
+ { provider }
34
+ );
35
+ }
36
+ static invalidRuntimeBaseURL(provider) {
37
+ return new DextoRuntimeError(
38
+ LLMErrorCode.BASE_URL_INVALID,
39
+ ErrorScope.LLM,
40
+ ErrorType.USER,
41
+ `Runtime baseURL for '${provider}' cannot be blank`,
42
+ { provider }
43
+ );
44
+ }
45
+ static runtimeAuthConflict(provider) {
46
+ return new DextoRuntimeError(
47
+ LLMErrorCode.RUNTIME_AUTH_CONFLICT,
48
+ ErrorScope.LLM,
49
+ ErrorType.USER,
50
+ "Runtime auth cannot supply both fetch and requestAuth",
51
+ { provider }
52
+ );
53
+ }
27
54
  static missingConfig(provider, configName) {
28
55
  return new DextoRuntimeError(
29
56
  LLMErrorCode.CONFIG_MISSING,
@@ -25,12 +25,12 @@ __export(tool_output_spill_exports, {
25
25
  withToolOutputPreview: () => withToolOutputPreview
26
26
  });
27
27
  module.exports = __toCommonJS(tool_output_spill_exports);
28
+ var import_text_boundary = require("../../utils/text-boundary.js");
28
29
  const TOOL_OUTPUT_READ_TOOL_NAME = "tool_output_read";
29
30
  const CHARS_PER_TOKEN = 4;
30
31
  const MAX_INLINE_TOKENS = 4e3;
31
32
  const INLINE_WINDOW_RATIO = 0.1;
32
33
  const STEP_WINDOW_RATIO = 0.4;
33
- const STEP_SPILL_PREVIEW_CHARS = 16e3;
34
34
  const PREVIEW_HEAD_RATIO = 0.75;
35
35
  function toolOutputBudget(maxInputTokens) {
36
36
  return {
@@ -46,32 +46,57 @@ function planToolOutputSpills(results, budget) {
46
46
  let inlineChars = 0;
47
47
  for (const result of results) {
48
48
  if (result.textLength > budget.inlineCapChars) {
49
- previewChars.set(result.toolCallId, budget.inlineCapChars);
50
- inlineChars += budget.inlineCapChars;
49
+ const cap = Math.max(
50
+ budget.inlineCapChars,
51
+ outputMarker(result.toolCallId, result.textLength, 0, 0).length
52
+ );
53
+ if (cap < result.textLength) {
54
+ previewChars.set(result.toolCallId, cap);
55
+ inlineChars += cap;
56
+ } else {
57
+ inlineChars += result.textLength;
58
+ }
51
59
  } else {
52
60
  inlineChars += result.textLength;
53
61
  }
54
62
  }
55
- const stepPreviewChars = Math.min(budget.inlineCapChars, STEP_SPILL_PREVIEW_CHARS);
63
+ const stepPreviewChars = Math.floor(budget.inlineCapChars / 2);
56
64
  const largestFirst = results.filter((result) => result.textLength > stepPreviewChars).sort((left, right) => right.textLength - left.textLength);
57
65
  for (const result of largestFirst) {
58
66
  if (inlineChars <= budget.stepBudgetChars) break;
59
67
  const inlineNow = previewChars.get(result.toolCallId) ?? result.textLength;
60
- if (inlineNow <= stepPreviewChars) continue;
61
- previewChars.set(result.toolCallId, stepPreviewChars);
62
- inlineChars -= inlineNow - stepPreviewChars;
68
+ const target = Math.max(
69
+ stepPreviewChars,
70
+ outputMarker(result.toolCallId, result.textLength, 0, 0).length
71
+ );
72
+ if (inlineNow <= target) continue;
73
+ previewChars.set(result.toolCallId, target);
74
+ inlineChars -= inlineNow - target;
75
+ }
76
+ if (inlineChars <= budget.stepBudgetChars) return previewChars;
77
+ for (const result of [...results].sort(
78
+ (a, b) => (previewChars.get(b.toolCallId) ?? b.textLength) - (previewChars.get(a.toolCallId) ?? a.textLength)
79
+ )) {
80
+ if (inlineChars <= budget.stepBudgetChars) break;
81
+ const inlineNow = previewChars.get(result.toolCallId) ?? result.textLength;
82
+ const minimum = outputMarker(result.toolCallId, result.textLength, 0, 0).length;
83
+ const target = Math.max(minimum, inlineNow - (inlineChars - budget.stepBudgetChars));
84
+ if (target >= inlineNow) continue;
85
+ previewChars.set(result.toolCallId, target);
86
+ inlineChars -= inlineNow - target;
63
87
  }
64
88
  return previewChars;
65
89
  }
66
90
  function withToolOutputPreview(result, fullText, previewChars) {
67
- const headChars = Math.floor(previewChars * PREVIEW_HEAD_RATIO);
68
- const tailChars = previewChars - headChars;
69
91
  const id = result.meta.toolCallId;
70
- const preview = `${fullText.slice(0, headChars)}
71
-
72
- [Output truncated: showing the first ${headChars} and last ${tailChars} of ${fullText.length} characters. The full output is stored. Read any part with ${TOOL_OUTPUT_READ_TOOL_NAME}({ "id": "${id}", "offset": <line> }) or search it with ${TOOL_OUTPUT_READ_TOOL_NAME}({ "id": "${id}", "pattern": "<text>" }) instead of re-running the tool.]
73
-
74
- ` + fullText.slice(fullText.length - tailChars);
92
+ const marker = (head, tail) => outputMarker(id, fullText.length, head, tail);
93
+ const available = Math.max(0, previewChars - marker(previewChars, previewChars).length);
94
+ const headChars = (0, import_text_boundary.safeTextBoundary)(fullText, Math.floor(available * PREVIEW_HEAD_RATIO));
95
+ const tailStart = fullText.length - (available - Math.floor(available * PREVIEW_HEAD_RATIO));
96
+ const safeTailStart = (0, import_text_boundary.safeTextBoundary)(fullText, tailStart) === tailStart ? tailStart : tailStart + 1;
97
+ const tailChars = fullText.length - safeTailStart;
98
+ const previewMarker = marker(headChars, tailChars);
99
+ const preview = fullText.slice(0, headChars) + previewMarker + fullText.slice(safeTailStart);
75
100
  const content = [];
76
101
  let previewAdded = false;
77
102
  for (const part of result.content) {
@@ -84,6 +109,13 @@ function withToolOutputPreview(result, fullText, previewChars) {
84
109
  }
85
110
  return { ...result, content };
86
111
  }
112
+ function outputMarker(id, length, head, tail) {
113
+ return `
114
+
115
+ [Output truncated: showing the first ${head} and last ${tail} of ${length} characters. The full output is stored. Read any part with ${TOOL_OUTPUT_READ_TOOL_NAME}({ "id": "${id}", "offset": <line> }) or search it with ${TOOL_OUTPUT_READ_TOOL_NAME}({ "id": "${id}", "pattern": "<text>" }) instead of re-running the tool.]
116
+
117
+ `;
118
+ }
87
119
  // Annotate the CommonJS export names for ESM import in node:
88
120
  0 && (module.exports = {
89
121
  TOOL_OUTPUT_READ_TOOL_NAME,
@@ -1 +1 @@
1
- {"version":3,"file":"tool-output-spill.d.ts","sourceRoot":"","sources":["../../../src/llm/executor/tool-output-spill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,2DAA2D;AAC3D,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAgB7D,MAAM,WAAW,gBAAgB;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,gBAAgB,CAOzE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAChC,OAAO,EAAE,aAAa,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,EAClE,MAAM,EAAE,gBAAgB,GACzB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAwBrB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACrB,mBAAmB,CAqBrB"}
1
+ {"version":3,"file":"tool-output-spill.d.ts","sourceRoot":"","sources":["../../../src/llm/executor/tool-output-spill.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,2DAA2D;AAC3D,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAc7D,MAAM,WAAW,gBAAgB;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,gBAAgB,CAOzE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAChC,OAAO,EAAE,aAAa,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,EAClE,MAAM,EAAE,gBAAgB,GACzB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqDrB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACrB,mBAAmB,CAuBrB"}
@@ -1,10 +1,10 @@
1
1
  import "../../chunk-C6A6W6XS.js";
2
+ import { safeTextBoundary } from "../../utils/text-boundary.js";
2
3
  const TOOL_OUTPUT_READ_TOOL_NAME = "tool_output_read";
3
4
  const CHARS_PER_TOKEN = 4;
4
5
  const MAX_INLINE_TOKENS = 4e3;
5
6
  const INLINE_WINDOW_RATIO = 0.1;
6
7
  const STEP_WINDOW_RATIO = 0.4;
7
- const STEP_SPILL_PREVIEW_CHARS = 16e3;
8
8
  const PREVIEW_HEAD_RATIO = 0.75;
9
9
  function toolOutputBudget(maxInputTokens) {
10
10
  return {
@@ -20,32 +20,57 @@ function planToolOutputSpills(results, budget) {
20
20
  let inlineChars = 0;
21
21
  for (const result of results) {
22
22
  if (result.textLength > budget.inlineCapChars) {
23
- previewChars.set(result.toolCallId, budget.inlineCapChars);
24
- inlineChars += budget.inlineCapChars;
23
+ const cap = Math.max(
24
+ budget.inlineCapChars,
25
+ outputMarker(result.toolCallId, result.textLength, 0, 0).length
26
+ );
27
+ if (cap < result.textLength) {
28
+ previewChars.set(result.toolCallId, cap);
29
+ inlineChars += cap;
30
+ } else {
31
+ inlineChars += result.textLength;
32
+ }
25
33
  } else {
26
34
  inlineChars += result.textLength;
27
35
  }
28
36
  }
29
- const stepPreviewChars = Math.min(budget.inlineCapChars, STEP_SPILL_PREVIEW_CHARS);
37
+ const stepPreviewChars = Math.floor(budget.inlineCapChars / 2);
30
38
  const largestFirst = results.filter((result) => result.textLength > stepPreviewChars).sort((left, right) => right.textLength - left.textLength);
31
39
  for (const result of largestFirst) {
32
40
  if (inlineChars <= budget.stepBudgetChars) break;
33
41
  const inlineNow = previewChars.get(result.toolCallId) ?? result.textLength;
34
- if (inlineNow <= stepPreviewChars) continue;
35
- previewChars.set(result.toolCallId, stepPreviewChars);
36
- inlineChars -= inlineNow - stepPreviewChars;
42
+ const target = Math.max(
43
+ stepPreviewChars,
44
+ outputMarker(result.toolCallId, result.textLength, 0, 0).length
45
+ );
46
+ if (inlineNow <= target) continue;
47
+ previewChars.set(result.toolCallId, target);
48
+ inlineChars -= inlineNow - target;
49
+ }
50
+ if (inlineChars <= budget.stepBudgetChars) return previewChars;
51
+ for (const result of [...results].sort(
52
+ (a, b) => (previewChars.get(b.toolCallId) ?? b.textLength) - (previewChars.get(a.toolCallId) ?? a.textLength)
53
+ )) {
54
+ if (inlineChars <= budget.stepBudgetChars) break;
55
+ const inlineNow = previewChars.get(result.toolCallId) ?? result.textLength;
56
+ const minimum = outputMarker(result.toolCallId, result.textLength, 0, 0).length;
57
+ const target = Math.max(minimum, inlineNow - (inlineChars - budget.stepBudgetChars));
58
+ if (target >= inlineNow) continue;
59
+ previewChars.set(result.toolCallId, target);
60
+ inlineChars -= inlineNow - target;
37
61
  }
38
62
  return previewChars;
39
63
  }
40
64
  function withToolOutputPreview(result, fullText, previewChars) {
41
- const headChars = Math.floor(previewChars * PREVIEW_HEAD_RATIO);
42
- const tailChars = previewChars - headChars;
43
65
  const id = result.meta.toolCallId;
44
- const preview = `${fullText.slice(0, headChars)}
45
-
46
- [Output truncated: showing the first ${headChars} and last ${tailChars} of ${fullText.length} characters. The full output is stored. Read any part with ${TOOL_OUTPUT_READ_TOOL_NAME}({ "id": "${id}", "offset": <line> }) or search it with ${TOOL_OUTPUT_READ_TOOL_NAME}({ "id": "${id}", "pattern": "<text>" }) instead of re-running the tool.]
47
-
48
- ` + fullText.slice(fullText.length - tailChars);
66
+ const marker = (head, tail) => outputMarker(id, fullText.length, head, tail);
67
+ const available = Math.max(0, previewChars - marker(previewChars, previewChars).length);
68
+ const headChars = safeTextBoundary(fullText, Math.floor(available * PREVIEW_HEAD_RATIO));
69
+ const tailStart = fullText.length - (available - Math.floor(available * PREVIEW_HEAD_RATIO));
70
+ const safeTailStart = safeTextBoundary(fullText, tailStart) === tailStart ? tailStart : tailStart + 1;
71
+ const tailChars = fullText.length - safeTailStart;
72
+ const previewMarker = marker(headChars, tailChars);
73
+ const preview = fullText.slice(0, headChars) + previewMarker + fullText.slice(safeTailStart);
49
74
  const content = [];
50
75
  let previewAdded = false;
51
76
  for (const part of result.content) {
@@ -58,6 +83,13 @@ function withToolOutputPreview(result, fullText, previewChars) {
58
83
  }
59
84
  return { ...result, content };
60
85
  }
86
+ function outputMarker(id, length, head, tail) {
87
+ return `
88
+
89
+ [Output truncated: showing the first ${head} and last ${tail} of ${length} characters. The full output is stored. Read any part with ${TOOL_OUTPUT_READ_TOOL_NAME}({ "id": "${id}", "offset": <line> }) or search it with ${TOOL_OUTPUT_READ_TOOL_NAME}({ "id": "${id}", "pattern": "<text>" }) instead of re-running the tool.]
90
+
91
+ `;
92
+ }
61
93
  export {
62
94
  TOOL_OUTPUT_READ_TOOL_NAME,
63
95
  planToolOutputSpills,
@@ -49,6 +49,7 @@ var import_provider_error = require("./provider-error.js");
49
49
  var import_empty_response = require("./empty-response.js");
50
50
  var import_errors = require("../errors.js");
51
51
  var import_error_codes = require("../error-codes.js");
52
+ var import_safe_download = require("../safe-download.js");
52
53
  var import_DextoRuntimeError = require("../../errors/DextoRuntimeError.js");
53
54
  var import_error_conversion = require("../../utils/error-conversion.js");
54
55
  var import_codex_base_url = require("../providers/codex-base-url.js");
@@ -58,6 +59,7 @@ var import_manager2 = require("../../approval/manager.js");
58
59
  var import_errors2 = require("../../approval/errors.js");
59
60
  var import_content_audit = require("../../context/content-audit.js");
60
61
  var import_content_clone = require("../../context/content-clone.js");
62
+ const safeDownload = (0, import_safe_download.createSafeDownload)();
61
63
  const MCP_TOOL_PREFIX = "mcp--";
62
64
  const MODEL_REQUEST_MAX_RETRIES = 2;
63
65
  const EMPTY_RESPONSE_MAX_RETRIES = 1;
@@ -1328,6 +1330,7 @@ class TurnExecutor {
1328
1330
  tools: request.tools,
1329
1331
  abortSignal,
1330
1332
  messages: request.messages,
1333
+ experimental_download: safeDownload,
1331
1334
  ...this.config.maxOutputTokens !== void 0 && {
1332
1335
  maxOutputTokens: this.config.maxOutputTokens
1333
1336
  },
@@ -18,9 +18,9 @@ import type { LLMExecutionControl } from '../services/types.js';
18
18
  export declare const ModelStepResultStateSchema: z.ZodObject<{
19
19
  text: z.ZodString;
20
20
  finishReason: z.ZodEnum<{
21
+ length: "length";
21
22
  error: "error";
22
23
  unknown: "unknown";
23
- length: "length";
24
24
  cancelled: "cancelled";
25
25
  stop: "stop";
26
26
  other: "other";
@@ -72,9 +72,9 @@ export declare const TurnDriverStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
72
72
  cacheWriteTokens?: number | undefined;
73
73
  }>>>;
74
74
  lastFinishReason: z.ZodEnum<{
75
+ length: "length";
75
76
  error: "error";
76
77
  unknown: "unknown";
77
- length: "length";
78
78
  cancelled: "cancelled";
79
79
  stop: "stop";
80
80
  other: "other";
@@ -117,9 +117,9 @@ export declare const TurnDriverStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
117
117
  cacheWriteTokens?: number | undefined;
118
118
  }>>>;
119
119
  lastFinishReason: z.ZodEnum<{
120
+ length: "length";
120
121
  error: "error";
121
122
  unknown: "unknown";
122
- length: "length";
123
123
  cancelled: "cancelled";
124
124
  stop: "stop";
125
125
  other: "other";
@@ -137,9 +137,9 @@ export declare const TurnDriverStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
137
137
  result: z.ZodObject<{
138
138
  text: z.ZodString;
139
139
  finishReason: z.ZodEnum<{
140
+ length: "length";
140
141
  error: "error";
141
142
  unknown: "unknown";
142
- length: "length";
143
143
  cancelled: "cancelled";
144
144
  stop: "stop";
145
145
  other: "other";
@@ -192,9 +192,9 @@ export declare const TurnDriverStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
192
192
  cacheWriteTokens?: number | undefined;
193
193
  }>>>;
194
194
  lastFinishReason: z.ZodEnum<{
195
+ length: "length";
195
196
  error: "error";
196
197
  unknown: "unknown";
197
- length: "length";
198
198
  cancelled: "cancelled";
199
199
  stop: "stop";
200
200
  other: "other";
@@ -1 +1 @@
1
- {"version":3,"file":"turn-executor.d.ts","sourceRoot":"","sources":["../../../src/llm/executor/turn-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EAMb,KAAK,YAAY,EAEpB,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAa,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAY1D,OAAO,EACH,WAAW,EAId,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAcpD,OAAO,KAAK,EAA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,QAAQ,CAAC,0BAA0B,CAAO;IACzD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAU;IAE/C,OAAO,CAAC,qBAAqB;IAS7B;;;;OAIG;IACH,OAAO,CAAC,6BAA6B;IAgBrC;;;;;;;;;;;;OAYG;YACW,mBAAmB;IA2DjC;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;;OAGG;IACH,OAAO,CAAC,OAAO;IASf;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAOrB;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAO/B;;;;;;;;;;;;OAYG;YACW,cAAc;IA2F5B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAoB9B,OAAO,CAAC,qBAAqB;IAK7B;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAQ3B"}
@@ -29,6 +29,7 @@ import {
29
29
  import { isEmptyModelResponse } from "./empty-response.js";
30
30
  import { LLMError } from "../errors.js";
31
31
  import { LLMErrorCode } from "../error-codes.js";
32
+ import { createSafeDownload } from "../safe-download.js";
32
33
  import { DextoRuntimeError } from "../../errors/DextoRuntimeError.js";
33
34
  import { toError } from "../../utils/error-conversion.js";
34
35
  import { isCodexBaseURL } from "../providers/codex-base-url.js";
@@ -44,6 +45,7 @@ import {
44
45
  describeInternalMessageTailForAudit
45
46
  } from "../../context/content-audit.js";
46
47
  import { cloneStructuredValuePreservingUrls } from "../../context/content-clone.js";
48
+ const safeDownload = createSafeDownload();
47
49
  const MCP_TOOL_PREFIX = "mcp--";
48
50
  const MODEL_REQUEST_MAX_RETRIES = 2;
49
51
  const EMPTY_RESPONSE_MAX_RETRIES = 1;
@@ -1314,6 +1316,7 @@ class TurnExecutor {
1314
1316
  tools: request.tools,
1315
1317
  abortSignal,
1316
1318
  messages: request.messages,
1319
+ experimental_download: safeDownload,
1317
1320
  ...this.config.maxOutputTokens !== void 0 && {
1318
1321
  maxOutputTokens: this.config.maxOutputTokens
1319
1322
  },
@@ -22,6 +22,7 @@ __export(llm_exports, {
22
22
  CodexAppServerClient: () => import_codex_app_server.CodexAppServerClient,
23
23
  createCodexBaseURL: () => import_codex_base_url.createCodexBaseURL,
24
24
  createCodexLanguageModel: () => import_codex_app_server.createCodexLanguageModel,
25
+ createSafeDownload: () => import_safe_download.createSafeDownload,
25
26
  getCachedOpenRouterModelsWithInfo: () => import_openrouter_model_registry.getCachedOpenRouterModelsWithInfo,
26
27
  getCodexAuthModeLabel: () => import_codex_base_url.getCodexAuthModeLabel,
27
28
  getCodexProviderDisplayName: () => import_codex_base_url.getCodexProviderDisplayName,
@@ -30,6 +31,7 @@ __export(llm_exports, {
30
31
  getOpenRouterModelContextLength: () => import_openrouter_model_registry.getOpenRouterModelContextLength,
31
32
  getOpenRouterModelInfo: () => import_openrouter_model_registry.getOpenRouterModelInfo,
32
33
  isCodexBaseURL: () => import_codex_base_url.isCodexBaseURL,
34
+ isPrivateAddress: () => import_private_address.isPrivateAddress,
33
35
  loadLlmRegistryCache: () => import_auto_update.loadLlmRegistryCache,
34
36
  lookupOpenRouterModel: () => import_openrouter_model_registry.lookupOpenRouterModel,
35
37
  parseCodexBaseURL: () => import_codex_base_url.parseCodexBaseURL,
@@ -47,6 +49,8 @@ __reExport(llm_exports, require("./validation.js"), module.exports);
47
49
  __reExport(llm_exports, require("./usage-metadata.js"), module.exports);
48
50
  __reExport(llm_exports, require("./usage-scope.js"), module.exports);
49
51
  __reExport(llm_exports, require("./usage-summary.js"), module.exports);
52
+ var import_private_address = require("./private-address.js");
53
+ var import_safe_download = require("./safe-download.js");
50
54
  __reExport(llm_exports, require("./services/index.js"), module.exports);
51
55
  __reExport(llm_exports, require("./executor/index.js"), module.exports);
52
56
  __reExport(llm_exports, require("./schemas.js"), module.exports);
@@ -60,6 +64,7 @@ __reExport(llm_exports, require("./providers/local/index.js"), module.exports);
60
64
  CodexAppServerClient,
61
65
  createCodexBaseURL,
62
66
  createCodexLanguageModel,
67
+ createSafeDownload,
63
68
  getCachedOpenRouterModelsWithInfo,
64
69
  getCodexAuthModeLabel,
65
70
  getCodexProviderDisplayName,
@@ -68,6 +73,7 @@ __reExport(llm_exports, require("./providers/local/index.js"), module.exports);
68
73
  getOpenRouterModelContextLength,
69
74
  getOpenRouterModelInfo,
70
75
  isCodexBaseURL,
76
+ isPrivateAddress,
71
77
  loadLlmRegistryCache,
72
78
  lookupOpenRouterModel,
73
79
  parseCodexBaseURL,
@@ -6,7 +6,9 @@ export * from './validation.js';
6
6
  export * from './usage-metadata.js';
7
7
  export * from './usage-scope.js';
8
8
  export * from './usage-summary.js';
9
- export type { LlmAuthResolver, LlmRuntimeAuthOverrides, ResolveLlmRuntimeAuthInput, } from './auth/index.js';
9
+ export { isPrivateAddress } from './private-address.js';
10
+ export { createSafeDownload, type SafeDownloadOptions } from './safe-download.js';
11
+ export type { LlmAuthResolver, LlmRequestAuth, LlmRuntimeAuthOverrides, ResolveLlmRuntimeAuthInput, } from './auth/index.js';
10
12
  export * from './services/index.js';
11
13
  export * from './executor/index.js';
12
14
  export * from './schemas.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/llm/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,YAAY,EACR,eAAe,EACf,uBAAuB,EACvB,0BAA0B,GAC7B,MAAM,iBAAiB,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,OAAO,EACH,iCAAiC,EACjC,qBAAqB,EACrB,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,KAAK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AkB,EAClB,qBAAqB,EACrB,2BAA2B,EAC3B,cAAc,EACd,iBAAiB,EACjB,KAAK,aAAa,GACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACH,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,2BAA2B,EAChC,KAAK,cAAc,EACnB,KAAK,sBAAsB,GAC9B,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EACH,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,8BAA8B,EAC9B,KAAK,2BAA2B,GACnC,MAAM,2BAA2B,CAAC;AAGnC,cAAc,4BAA4B,CAAC"}
package/dist/llm/index.js CHANGED
@@ -7,6 +7,8 @@ export * from "./validation.js";
7
7
  export * from "./usage-metadata.js";
8
8
  export * from "./usage-scope.js";
9
9
  export * from "./usage-summary.js";
10
+ import { isPrivateAddress } from "./private-address.js";
11
+ import { createSafeDownload } from "./safe-download.js";
10
12
  export * from "./services/index.js";
11
13
  export * from "./executor/index.js";
12
14
  export * from "./schemas.js";
@@ -41,6 +43,7 @@ export {
41
43
  CodexAppServerClient,
42
44
  createCodexBaseURL,
43
45
  createCodexLanguageModel,
46
+ createSafeDownload,
44
47
  getCachedOpenRouterModelsWithInfo,
45
48
  getCodexAuthModeLabel,
46
49
  getCodexProviderDisplayName,
@@ -49,6 +52,7 @@ export {
49
52
  getOpenRouterModelContextLength,
50
53
  getOpenRouterModelInfo,
51
54
  isCodexBaseURL,
55
+ isPrivateAddress,
52
56
  loadLlmRegistryCache,
53
57
  lookupOpenRouterModel,
54
58
  parseCodexBaseURL,