@intentic/sandbox-contract 1.224.0 → 1.225.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 (107) hide show
  1. package/README.md +14 -14
  2. package/dist/agent-catalog.js +3 -3
  3. package/dist/agent-catalog.js.map +1 -1
  4. package/dist/chores/chores.js +42 -42
  5. package/dist/chores/chores.js.map +1 -1
  6. package/dist/chores/extension-update.js +2 -2
  7. package/dist/chores/extension-update.js.map +1 -1
  8. package/dist/chores/fix-deps.js +1 -1
  9. package/dist/chores/fix-deps.js.map +1 -1
  10. package/dist/chores/probes.js +1 -1
  11. package/dist/chores/probes.js.map +1 -1
  12. package/dist/chores/verdict.js +2 -2
  13. package/dist/chores/verdict.js.map +1 -1
  14. package/dist/contracts/capabilities.contract.d.ts +41 -0
  15. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  16. package/dist/contracts/exit.contract.d.ts +80 -0
  17. package/dist/contracts/exit.contract.d.ts.map +1 -0
  18. package/dist/contracts/exit.contract.js +13 -0
  19. package/dist/contracts/exit.contract.js.map +1 -0
  20. package/dist/contracts/settings.contract.d.ts +12 -0
  21. package/dist/contracts/settings.contract.d.ts.map +1 -1
  22. package/dist/events.d.ts +4 -4
  23. package/dist/events.d.ts.map +1 -1
  24. package/dist/events.js +5 -5
  25. package/dist/events.js.map +1 -1
  26. package/dist/fast-tier.d.ts +9 -0
  27. package/dist/fast-tier.d.ts.map +1 -0
  28. package/dist/fast-tier.js +19 -0
  29. package/dist/fast-tier.js.map +1 -0
  30. package/dist/history-state.js +3 -3
  31. package/dist/history-state.js.map +1 -1
  32. package/dist/index.d.ts +203 -68
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +5 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/model-order.d.ts +1 -0
  37. package/dist/model-order.d.ts.map +1 -1
  38. package/dist/model-order.js +5 -0
  39. package/dist/model-order.js.map +1 -1
  40. package/dist/output-fields.d.ts.map +1 -1
  41. package/dist/output-fields.js +2 -2
  42. package/dist/output-fields.js.map +1 -1
  43. package/dist/prompt-complexity.d.ts +19 -0
  44. package/dist/prompt-complexity.d.ts.map +1 -0
  45. package/dist/prompt-complexity.js +83 -0
  46. package/dist/prompt-complexity.js.map +1 -0
  47. package/dist/publish-drafts.js +2 -2
  48. package/dist/publish-drafts.js.map +1 -1
  49. package/dist/schemas.d.ts +214 -0
  50. package/dist/schemas.d.ts.map +1 -1
  51. package/dist/schemas.js +113 -2
  52. package/dist/schemas.js.map +1 -1
  53. package/dist/workflow-faults.js +3 -3
  54. package/dist/workflow-faults.js.map +1 -1
  55. package/dist/workspace-state.d.ts +20 -20
  56. package/dist/workspace-state.d.ts.map +1 -1
  57. package/dist/workspace-state.js +20 -20
  58. package/dist/workspace-state.js.map +1 -1
  59. package/package.json +5 -5
  60. package/src/agent-catalog.test.ts +25 -25
  61. package/src/agent-catalog.ts +3 -3
  62. package/src/agent-run-model.test.ts +3 -3
  63. package/src/capability-ledger.test.ts +13 -13
  64. package/src/chores/chores.test.ts +1 -1
  65. package/src/chores/chores.ts +42 -42
  66. package/src/chores/digest.test.ts +1 -1
  67. package/src/chores/extension-update.ts +2 -2
  68. package/src/chores/fix-deps.ts +1 -1
  69. package/src/chores/probes.test.ts +6 -6
  70. package/src/chores/probes.ts +1 -1
  71. package/src/chores/stack.test.ts +3 -3
  72. package/src/chores/verdict.test.ts +20 -20
  73. package/src/chores/verdict.ts +2 -2
  74. package/src/contract-lock.test.ts +1 -1
  75. package/src/contracts/exit.contract.ts +42 -0
  76. package/src/contracts/providers.contract.ts +1 -1
  77. package/src/conversation-ids.ts +1 -1
  78. package/src/events.test.ts +3 -3
  79. package/src/events.ts +6 -6
  80. package/src/fast-tier.test.ts +88 -0
  81. package/src/fast-tier.ts +72 -0
  82. package/src/history-state.ts +3 -3
  83. package/src/hostnames.test.ts +1 -1
  84. package/src/index.ts +5 -0
  85. package/src/model-order.test.ts +11 -11
  86. package/src/model-order.ts +22 -0
  87. package/src/output-fields.ts +2 -2
  88. package/src/path-refs.test.ts +4 -4
  89. package/src/prompt-complexity.test.ts +160 -0
  90. package/src/prompt-complexity.ts +271 -0
  91. package/src/publish-drafts.ts +2 -2
  92. package/src/quick-model.test.ts +11 -11
  93. package/src/routes.test.ts +11 -5
  94. package/src/runtime-state.test.ts +1 -1
  95. package/src/schemas.test.ts +8 -8
  96. package/src/schemas.ts +311 -6
  97. package/src/search-globs.test.ts +2 -2
  98. package/src/share-paths.test.ts +1 -1
  99. package/src/title.test.ts +9 -9
  100. package/src/title.ts +1 -1
  101. package/src/tunnel-ids.test.ts +3 -3
  102. package/src/versions.test.ts +3 -3
  103. package/src/versions.ts +1 -1
  104. package/src/workflow-faults.test.ts +6 -6
  105. package/src/workflow-faults.ts +3 -3
  106. package/src/workspace-state.test.ts +32 -32
  107. package/src/workspace-state.ts +20 -20
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-complexity.d.ts","sourceRoot":"","sources":["../src/prompt-complexity.ts"],"names":[],"mappings":"AA0BA,MAAM,MAAM,cAAc,GAEpB,QAAQ,GACR,WAAW,GACX,YAAY,GAEZ,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,eAAe,GACf,aAAa,GACb,kBAAkB,GAElB,eAAe,GACf,YAAY,GACZ,gBAAgB,GAChB,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,cAAc,GACd,YAAY,GACZ,eAAe,GACf,wBAAwB,CAAC;AAE/B,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,CAAC;AAMjD,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAG7B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAEhC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAqB3B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAG9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAGvB,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CAC7C;AAWD,eAAO,MAAM,YAAY,OAAO,CAAC;AAqJjC,eAAO,MAAM,eAAe,UAAW,eAAe,KAAG,iBASxD,CAAC"}
@@ -0,0 +1,83 @@
1
+ const BASE_SCORE = 0.5;
2
+ export const FAST_CEILING = 0.25;
3
+ const MEDIUM_PROMPT_CHARS = 600;
4
+ const LONG_PROMPT_CHARS = 2400;
5
+ const SHORT_PROMPT_CHARS = 140;
6
+ const MANY_ATTACHMENTS = 3;
7
+ const MANY_VERBS = 3;
8
+ const EASY_WORDS = /\b(?:what(?:'s| is| are)|explain|describe|summari[sz]e|list|show me|where(?:'s| is| are)|rename|typo|reword|reformat|format this|tidy|define|translate|spell|abbreviat)/i;
9
+ const HARD_WORDS = /\b(?:refactor|redesign|architect|architecture|migrat|root cause|debug|investigat|diagnos|optimi[sz]|race condition|deadlock|memory leak|regression|security|threat model|benchmark|profil|audit|design a|plan (?:a|the|out)|why (?:does|is|are|did|would|can't|cannot))/i;
10
+ const MULTI_STEP = /\b(?:and then|after that|once (?:that|you)|followed by|as well as|then also)\b/i;
11
+ const CROSS_CUTTING = /\b(?:across (?:the|all|every)|every(?: single)? (?:file|module|package|component|usage|call ?site)|all (?:the|of the) (?:files|usages|call ?sites|places)|everywhere|throughout the|codebase-wide|repo-wide)\b/i;
12
+ const CODE_BLOCK = /```|^diff --git |^@@ .* @@|^[+-]{3} [ab]\//m;
13
+ const STACK_TRACE = /(?:^|\n)\s*(?:at [\w$.<>]+ \(|Traceback \(most recent call last\)|Caused by:|panic:|thread '.*' panicked|Unhandled|[A-Z]\w*(?:Error|Exception): )/;
14
+ const PATH_LIKE = /(?:^|\s)(?:@[\w./-]+|[\w-]+\/[\w./-]+\.[a-z]{1,5}\b|\b[\w-]+\.(?:ts|tsx|js|jsx|vue|py|go|rs|java|rb|css|scss|json|ya?ml|md|sql|sh)\b)/i;
15
+ const BARE_QUESTION = /^[^.!?]{0,200}\?\s*$/;
16
+ const VERBS = /\b(?:add|remove|delete|fix|write|create|make|update|change|move|rename|split|merge|extract|inline|wire|hook|test|check|run|build|deploy|document|implement|replace|convert|handle|support|expose|log|render|validate|parse|sort|filter|cache)\b/gi;
17
+ const LIST_LINES = /^\s*(?:[-*+]\s|\d+[.)]\s)/gm;
18
+ const forcing = (input, text) => {
19
+ const rules = [];
20
+ if (input.hasImages) {
21
+ rules.push("images");
22
+ }
23
+ if (input.planMode) {
24
+ rules.push("plan-mode");
25
+ }
26
+ if (input.unattended) {
27
+ rules.push("unattended");
28
+ }
29
+ if (CODE_BLOCK.test(text)) {
30
+ rules.push("code-block");
31
+ }
32
+ if (STACK_TRACE.test(text)) {
33
+ rules.push("stack-trace");
34
+ }
35
+ if (HARD_WORDS.test(text)) {
36
+ rules.push("hard-words");
37
+ }
38
+ if (MULTI_STEP.test(text) || (text.match(LIST_LINES)?.length ?? 0) >= 2) {
39
+ rules.push("multi-step");
40
+ }
41
+ if (CROSS_CUTTING.test(text)) {
42
+ rules.push("cross-cutting");
43
+ }
44
+ if (text.length > LONG_PROMPT_CHARS) {
45
+ rules.push("long-prompt");
46
+ }
47
+ if (input.attachments >= MANY_ATTACHMENTS) {
48
+ rules.push("many-attachments");
49
+ }
50
+ return rules;
51
+ };
52
+ const GRADED = [
53
+ { rule: "medium-prompt", weight: +0.2, of: (_input, text) => text.length > MEDIUM_PROMPT_CHARS },
54
+ { rule: "attachment", weight: +0.15, of: (input) => input.attachments > 0 },
55
+ { rule: "editor-context", weight: +0.1, of: (input) => input.editorContext },
56
+ { rule: "paths", weight: +0.15, of: (_input, text) => PATH_LIKE.test(text) },
57
+ {
58
+ rule: "many-verbs",
59
+ weight: +0.15,
60
+ of: (_input, text) => new Set((text.match(VERBS) ?? []).map((verb) => verb.toLowerCase())).size >= MANY_VERBS,
61
+ },
62
+ { rule: "after-hard-turn", weight: +0.25, of: (input) => input.afterHardTurn },
63
+ { rule: "short-prompt", weight: -0.1, of: (_input, text) => text.length <= SHORT_PROMPT_CHARS },
64
+ { rule: "easy-words", weight: -0.25, of: (_input, text) => EASY_WORDS.test(text) },
65
+ { rule: "bare-question", weight: -0.15, of: (_input, text) => BARE_QUESTION.test(text) },
66
+ {
67
+ rule: "no-workspace-reference",
68
+ weight: -0.1,
69
+ of: (input, text) => input.attachments === 0 && !input.editorContext && !PATH_LIKE.test(text),
70
+ },
71
+ ];
72
+ const round3 = (value) => Math.round(value * 1000) / 1000;
73
+ export const judgeComplexity = (input) => {
74
+ const text = input.prompt.trim();
75
+ const forced = forcing(input, text);
76
+ if (forced.length > 0) {
77
+ return { tier: "standard", score: 1, rules: forced };
78
+ }
79
+ const hits = GRADED.filter((feature) => feature.of(input, text));
80
+ const score = Math.min(1, Math.max(0, BASE_SCORE + hits.reduce((total, feature) => total + feature.weight, 0)));
81
+ return { tier: score <= FAST_CEILING ? "fast" : "standard", score: round3(score), rules: hits.map((feature) => feature.rule) };
82
+ };
83
+ //# sourceMappingURL=prompt-complexity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-complexity.js","sourceRoot":"","sources":["../src/prompt-complexity.ts"],"names":[],"mappings":"AA2GA,MAAM,UAAU,GAAG,GAAG,CAAC;AAKvB,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AAKjC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B,MAAM,UAAU,GAAG,CAAC,CAAC;AAQrB,MAAM,UAAU,GACZ,0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AAM,eAAe,GAAG,CAAC,KAAsB,EAAqB,EAAE;IACzE,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACjC,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IACzD,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAChH,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;AACnI,CAAC,CAAC"}
@@ -7,7 +7,7 @@ export const publishTurnPrompt = (drafts) => [
7
7
  ``,
8
8
  `Take them ONE AT A TIME, and for each:`,
9
9
  `1. Read the file. Set "status":"posting" BEFORE you act, so a turn that dies here cannot double-post.`,
10
- `2. Post exactly its "content" with its "title", "target" and "media" using that platform's skill.`,
10
+ `2. Post exactly its "content": with its "title", "target" and "media", using that platform's skill.`,
11
11
  ` A "target" that is a URL means this draft is a REPLY to whatever is at it: open that exact URL and`,
12
12
  ` reply where it lands. On reddit a comment permalink (.../comments/<post>/<slug>/<comment>/) has to`,
13
13
  ` nest under that comment rather than becoming a new top-level comment on the thread.`,
@@ -15,6 +15,6 @@ export const publishTurnPrompt = (drafts) => [
15
15
  ` If it failed, set "status":"failed" plus an "error" saying what went wrong in plain words the owner`,
16
16
  ` can act on, then move to the next draft instead of retrying in a loop.`,
17
17
  ``,
18
- `Never rewrite the content the owner approved these exact words. Never touch a draft not listed above.`,
18
+ `Never rewrite the content: the owner approved these exact words. Never touch a draft not listed above.`,
19
19
  ].join(`\n`);
20
20
  //# sourceMappingURL=publish-drafts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"publish-drafts.js","sourceRoot":"","sources":["../src/publish-drafts.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAYvC,MAAM,CAAC,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AASlF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAqE,EAAU,EAAE,CAC/G;IACI,mHAAmH;IACnH,EAAE;IACF,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,EAAE,UAAU,KAAK,CAAC,QAAQ,GAAG,CAAC;IAClE,EAAE;IACF,wCAAwC;IACxC,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,wFAAwF;IACxF,wGAAwG;IACxG,wGAAwG;IACxG,2EAA2E;IAC3E,EAAE;IACF,yGAAyG;CAC5G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"publish-drafts.js","sourceRoot":"","sources":["../src/publish-drafts.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAYvC,MAAM,CAAC,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AASlF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAqE,EAAU,EAAE,CAC/G;IACI,mHAAmH;IACnH,EAAE;IACF,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,EAAE,UAAU,KAAK,CAAC,QAAQ,GAAG,CAAC;IAClE,EAAE;IACF,wCAAwC;IACxC,uGAAuG;IACvG,qGAAqG;IACrG,uGAAuG;IACvG,uGAAuG;IACvG,wFAAwF;IACxF,wGAAwG;IACxG,wGAAwG;IACxG,2EAA2E;IAC3E,EAAE;IACF,wGAAwG;CAC3G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
package/dist/schemas.d.ts CHANGED
@@ -1629,6 +1629,12 @@ export declare const SandboxSettingsSchema: z.ZodObject<{
1629
1629
  changelogRepos: z.ZodDefault<z.ZodArray<z.ZodString>>;
1630
1630
  agentRunModels: z.ZodDefault<z.ZodArray<z.ZodString>>;
1631
1631
  agentRunEffort: z.ZodDefault<z.ZodString>;
1632
+ autoTier: z.ZodDefault<z.ZodEnum<{
1633
+ off: "off";
1634
+ on: "on";
1635
+ shadow: "shadow";
1636
+ }>>;
1637
+ autoFastModels: z.ZodDefault<z.ZodArray<z.ZodString>>;
1632
1638
  agentRetentionDays: z.ZodDefault<z.ZodNumber>;
1633
1639
  resumeAfterOutage: z.ZodDefault<z.ZodBoolean>;
1634
1640
  autoResumeOnRestart: z.ZodDefault<z.ZodBoolean>;
@@ -3438,10 +3444,12 @@ export declare const CapabilityKindSchema: z.ZodEnum<{
3438
3444
  devops: "devops";
3439
3445
  docker: "docker";
3440
3446
  endpoint: "endpoint";
3447
+ exit: "exit";
3441
3448
  extension: "extension";
3442
3449
  host: "host";
3443
3450
  identity: "identity";
3444
3451
  integration: "integration";
3452
+ localmodel: "localmodel";
3445
3453
  mcp: "mcp";
3446
3454
  monorepo: "monorepo";
3447
3455
  plugin: "plugin";
@@ -3628,6 +3636,61 @@ export declare const VpnConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3628
3636
  on: "on";
3629
3637
  }>>;
3630
3638
  }, z.core.$strip>], "provider">;
3639
+ export declare const ExitProviderSchema: z.ZodEnum<{
3640
+ tor: "tor";
3641
+ vpngate: "vpngate";
3642
+ wireguard: "wireguard";
3643
+ }>;
3644
+ export type ExitProvider = z.infer<typeof ExitProviderSchema>;
3645
+ export declare const CountryCodeSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
3646
+ export declare const TorExitConfigSchema: z.ZodObject<{
3647
+ provider: z.ZodLiteral<"tor">;
3648
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
3649
+ autoStart: z.ZodDefault<z.ZodEnum<{
3650
+ off: "off";
3651
+ on: "on";
3652
+ }>>;
3653
+ }, z.core.$strip>;
3654
+ export declare const VpngateExitConfigSchema: z.ZodObject<{
3655
+ provider: z.ZodLiteral<"vpngate">;
3656
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
3657
+ autoStart: z.ZodDefault<z.ZodEnum<{
3658
+ off: "off";
3659
+ on: "on";
3660
+ }>>;
3661
+ }, z.core.$strip>;
3662
+ export declare const WireguardExitConfigSchema: z.ZodObject<{
3663
+ provider: z.ZodLiteral<"wireguard">;
3664
+ config: z.ZodString;
3665
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
3666
+ autoStart: z.ZodDefault<z.ZodEnum<{
3667
+ off: "off";
3668
+ on: "on";
3669
+ }>>;
3670
+ }, z.core.$strip>;
3671
+ export declare const ExitConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3672
+ provider: z.ZodLiteral<"tor">;
3673
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
3674
+ autoStart: z.ZodDefault<z.ZodEnum<{
3675
+ off: "off";
3676
+ on: "on";
3677
+ }>>;
3678
+ }, z.core.$strip>, z.ZodObject<{
3679
+ provider: z.ZodLiteral<"vpngate">;
3680
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
3681
+ autoStart: z.ZodDefault<z.ZodEnum<{
3682
+ off: "off";
3683
+ on: "on";
3684
+ }>>;
3685
+ }, z.core.$strip>, z.ZodObject<{
3686
+ provider: z.ZodLiteral<"wireguard">;
3687
+ config: z.ZodString;
3688
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
3689
+ autoStart: z.ZodDefault<z.ZodEnum<{
3690
+ off: "off";
3691
+ on: "on";
3692
+ }>>;
3693
+ }, z.core.$strip>], "provider">;
3631
3694
  export declare const DockerConfigSchema: z.ZodObject<{
3632
3695
  gpu: z.ZodDefault<z.ZodEnum<{
3633
3696
  off: "off";
@@ -3644,6 +3707,7 @@ export declare const BrowserConfigSchema: z.ZodObject<{
3644
3707
  identity: z.ZodOptional<z.ZodString>;
3645
3708
  purpose: z.ZodOptional<z.ZodString>;
3646
3709
  openedAt: z.ZodOptional<z.ZodString>;
3710
+ exit: z.ZodOptional<z.ZodString>;
3647
3711
  }, z.core.$catchall<z.ZodString>>;
3648
3712
  export declare const IdentityConfigSchema: z.ZodObject<{
3649
3713
  email: z.ZodString;
@@ -3654,6 +3718,7 @@ export declare const IdentityConfigSchema: z.ZodObject<{
3654
3718
  off: "off";
3655
3719
  on: "on";
3656
3720
  }>>;
3721
+ exit: z.ZodOptional<z.ZodString>;
3657
3722
  }, z.core.$strip>;
3658
3723
  export type IdentityConfig = z.infer<typeof IdentityConfigSchema>;
3659
3724
  export declare const HostScopesSchema: z.ZodObject<{
@@ -3732,6 +3797,15 @@ export declare const EndpointConfigSchema: z.ZodObject<{
3732
3797
  apiKey: z.ZodOptional<z.ZodString>;
3733
3798
  headers: z.ZodOptional<z.ZodString>;
3734
3799
  }, z.core.$strip>;
3800
+ export declare const LocalModelConfigSchema: z.ZodObject<{
3801
+ model: z.ZodString;
3802
+ gpu: z.ZodDefault<z.ZodEnum<{
3803
+ off: "off";
3804
+ on: "on";
3805
+ }>>;
3806
+ url: z.ZodOptional<z.ZodURL>;
3807
+ }, z.core.$strip>;
3808
+ export type LocalModelConfig = z.infer<typeof LocalModelConfigSchema>;
3735
3809
  export declare const WalletNetworkSchema: z.ZodEnum<{
3736
3810
  "eip155:8453": "eip155:8453";
3737
3811
  "eip155:84532": "eip155:84532";
@@ -3761,6 +3835,10 @@ export type WireguardVpnConfig = z.infer<typeof WireguardVpnConfigSchema>;
3761
3835
  export type FortinetVpnConfig = z.infer<typeof FortinetVpnConfigSchema>;
3762
3836
  export type IpsecVpnConfig = z.infer<typeof IpsecVpnConfigSchema>;
3763
3837
  export type VpnConfig = z.infer<typeof VpnConfigSchema>;
3838
+ export type TorExitConfig = z.infer<typeof TorExitConfigSchema>;
3839
+ export type VpngateExitConfig = z.infer<typeof VpngateExitConfigSchema>;
3840
+ export type WireguardExitConfig = z.infer<typeof WireguardExitConfigSchema>;
3841
+ export type ExitConfig = z.infer<typeof ExitConfigSchema>;
3764
3842
  export type DockerConfig = z.infer<typeof DockerConfigSchema>;
3765
3843
  export type BrowserConfig = z.infer<typeof BrowserConfigSchema>;
3766
3844
  export type HostConfig = z.infer<typeof HostConfigSchema>;
@@ -3905,6 +3983,32 @@ export declare const CapabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3905
3983
  on: "on";
3906
3984
  }>>;
3907
3985
  }, z.core.$strip>], "provider">;
3986
+ }, z.core.$strip>, z.ZodObject<{
3987
+ id: z.ZodString;
3988
+ kind: z.ZodLiteral<"exit">;
3989
+ config: z.ZodDiscriminatedUnion<[z.ZodObject<{
3990
+ provider: z.ZodLiteral<"tor">;
3991
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
3992
+ autoStart: z.ZodDefault<z.ZodEnum<{
3993
+ off: "off";
3994
+ on: "on";
3995
+ }>>;
3996
+ }, z.core.$strip>, z.ZodObject<{
3997
+ provider: z.ZodLiteral<"vpngate">;
3998
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
3999
+ autoStart: z.ZodDefault<z.ZodEnum<{
4000
+ off: "off";
4001
+ on: "on";
4002
+ }>>;
4003
+ }, z.core.$strip>, z.ZodObject<{
4004
+ provider: z.ZodLiteral<"wireguard">;
4005
+ config: z.ZodString;
4006
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
4007
+ autoStart: z.ZodDefault<z.ZodEnum<{
4008
+ off: "off";
4009
+ on: "on";
4010
+ }>>;
4011
+ }, z.core.$strip>], "provider">;
3908
4012
  }, z.core.$strip>, z.ZodObject<{
3909
4013
  id: z.ZodString;
3910
4014
  kind: z.ZodLiteral<"docker">;
@@ -3927,6 +4031,7 @@ export declare const CapabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3927
4031
  identity: z.ZodOptional<z.ZodString>;
3928
4032
  purpose: z.ZodOptional<z.ZodString>;
3929
4033
  openedAt: z.ZodOptional<z.ZodString>;
4034
+ exit: z.ZodOptional<z.ZodString>;
3930
4035
  }, z.core.$catchall<z.ZodString>>;
3931
4036
  }, z.core.$strip>, z.ZodObject<{
3932
4037
  id: z.ZodString;
@@ -3940,6 +4045,7 @@ export declare const CapabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3940
4045
  off: "off";
3941
4046
  on: "on";
3942
4047
  }>>;
4048
+ exit: z.ZodOptional<z.ZodString>;
3943
4049
  }, z.core.$strip>;
3944
4050
  }, z.core.$strip>, z.ZodObject<{
3945
4051
  id: z.ZodString;
@@ -3993,6 +4099,17 @@ export declare const CapabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3993
4099
  apiKey: z.ZodOptional<z.ZodString>;
3994
4100
  headers: z.ZodOptional<z.ZodString>;
3995
4101
  }, z.core.$strip>;
4102
+ }, z.core.$strip>, z.ZodObject<{
4103
+ id: z.ZodString;
4104
+ kind: z.ZodLiteral<"localmodel">;
4105
+ config: z.ZodObject<{
4106
+ model: z.ZodString;
4107
+ gpu: z.ZodDefault<z.ZodEnum<{
4108
+ off: "off";
4109
+ on: "on";
4110
+ }>>;
4111
+ url: z.ZodOptional<z.ZodURL>;
4112
+ }, z.core.$strip>;
3996
4113
  }, z.core.$strip>, z.ZodObject<{
3997
4114
  id: z.ZodString;
3998
4115
  kind: z.ZodLiteral<"wallet">;
@@ -4150,10 +4267,12 @@ export declare const CapabilitySummarySchema: z.ZodObject<{
4150
4267
  devops: "devops";
4151
4268
  docker: "docker";
4152
4269
  endpoint: "endpoint";
4270
+ exit: "exit";
4153
4271
  extension: "extension";
4154
4272
  host: "host";
4155
4273
  identity: "identity";
4156
4274
  integration: "integration";
4275
+ localmodel: "localmodel";
4157
4276
  mcp: "mcp";
4158
4277
  monorepo: "monorepo";
4159
4278
  plugin: "plugin";
@@ -4192,10 +4311,12 @@ export declare const CapabilitiesListSchema: z.ZodObject<{
4192
4311
  devops: "devops";
4193
4312
  docker: "docker";
4194
4313
  endpoint: "endpoint";
4314
+ exit: "exit";
4195
4315
  extension: "extension";
4196
4316
  host: "host";
4197
4317
  identity: "identity";
4198
4318
  integration: "integration";
4319
+ localmodel: "localmodel";
4199
4320
  mcp: "mcp";
4200
4321
  monorepo: "monorepo";
4201
4322
  plugin: "plugin";
@@ -4396,6 +4517,96 @@ export declare const ForticlientImportSchema: z.ZodObject<{
4396
4517
  needs: z.ZodArray<z.ZodString>;
4397
4518
  }, z.core.$strip>>;
4398
4519
  }, z.core.$strip>;
4520
+ export declare const ExitStateSchema: z.ZodEnum<{
4521
+ down: "down";
4522
+ failed: "failed";
4523
+ starting: "starting";
4524
+ unavailable: "unavailable";
4525
+ up: "up";
4526
+ }>;
4527
+ export type ExitState = z.infer<typeof ExitStateSchema>;
4528
+ export declare const ExitObservationSchema: z.ZodObject<{
4529
+ ip: z.ZodString;
4530
+ country: z.ZodOptional<z.ZodString>;
4531
+ countryName: z.ZodOptional<z.ZodString>;
4532
+ }, z.core.$strip>;
4533
+ export type ExitObservation = z.infer<typeof ExitObservationSchema>;
4534
+ export declare const ExitPointSchema: z.ZodObject<{
4535
+ country: z.ZodString;
4536
+ countryName: z.ZodString;
4537
+ servers: z.ZodNumber;
4538
+ share: z.ZodOptional<z.ZodNumber>;
4539
+ }, z.core.$strip>;
4540
+ export type ExitPoint = z.infer<typeof ExitPointSchema>;
4541
+ export declare const ExitCountriesSchema: z.ZodObject<{
4542
+ countries: z.ZodArray<z.ZodObject<{
4543
+ country: z.ZodString;
4544
+ countryName: z.ZodString;
4545
+ servers: z.ZodNumber;
4546
+ share: z.ZodOptional<z.ZodNumber>;
4547
+ }, z.core.$strip>>;
4548
+ live: z.ZodBoolean;
4549
+ }, z.core.$strip>;
4550
+ export declare const ExitLinkSchema: z.ZodObject<{
4551
+ id: z.ZodString;
4552
+ provider: z.ZodEnum<{
4553
+ tor: "tor";
4554
+ vpngate: "vpngate";
4555
+ wireguard: "wireguard";
4556
+ }>;
4557
+ state: z.ZodEnum<{
4558
+ down: "down";
4559
+ failed: "failed";
4560
+ starting: "starting";
4561
+ unavailable: "unavailable";
4562
+ up: "up";
4563
+ }>;
4564
+ proxy: z.ZodString;
4565
+ country: z.ZodOptional<z.ZodString>;
4566
+ observedCountry: z.ZodOptional<z.ZodString>;
4567
+ ip: z.ZodOptional<z.ZodString>;
4568
+ checkedAt: z.ZodOptional<z.ZodNumber>;
4569
+ interface: z.ZodOptional<z.ZodString>;
4570
+ since: z.ZodOptional<z.ZodNumber>;
4571
+ autoStart: z.ZodBoolean;
4572
+ detail: z.ZodOptional<z.ZodString>;
4573
+ }, z.core.$strip>;
4574
+ export type ExitLink = z.infer<typeof ExitLinkSchema>;
4575
+ export declare const ExitListSchema: z.ZodObject<{
4576
+ links: z.ZodArray<z.ZodObject<{
4577
+ id: z.ZodString;
4578
+ provider: z.ZodEnum<{
4579
+ tor: "tor";
4580
+ vpngate: "vpngate";
4581
+ wireguard: "wireguard";
4582
+ }>;
4583
+ state: z.ZodEnum<{
4584
+ down: "down";
4585
+ failed: "failed";
4586
+ starting: "starting";
4587
+ unavailable: "unavailable";
4588
+ up: "up";
4589
+ }>;
4590
+ proxy: z.ZodString;
4591
+ country: z.ZodOptional<z.ZodString>;
4592
+ observedCountry: z.ZodOptional<z.ZodString>;
4593
+ ip: z.ZodOptional<z.ZodString>;
4594
+ checkedAt: z.ZodOptional<z.ZodNumber>;
4595
+ interface: z.ZodOptional<z.ZodString>;
4596
+ since: z.ZodOptional<z.ZodNumber>;
4597
+ autoStart: z.ZodBoolean;
4598
+ detail: z.ZodOptional<z.ZodString>;
4599
+ }, z.core.$strip>>;
4600
+ }, z.core.$strip>;
4601
+ export declare const TOR_EXIT_COUNTRIES: readonly ExitPoint[];
4602
+ export declare const VPNGATE_EXIT_COUNTRIES: readonly ExitPoint[];
4603
+ export declare const ExitIdParamSchema: z.ZodObject<{
4604
+ id: z.ZodString;
4605
+ }, z.core.$strip>;
4606
+ export declare const ExitUseInputSchema: z.ZodObject<{
4607
+ id: z.ZodString;
4608
+ country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
4609
+ }, z.core.$strip>;
4399
4610
  export declare const MarketplaceRequestSchema: z.ZodObject<{
4400
4611
  url: z.ZodURL;
4401
4612
  token: z.ZodOptional<z.ZodString>;
@@ -8534,6 +8745,9 @@ export declare const UsageTurnSchema: z.ZodObject<{
8534
8745
  proseChars: z.ZodOptional<z.ZodNumber>;
8535
8746
  searchCalls: z.ZodOptional<z.ZodNumber>;
8536
8747
  openingSearches: z.ZodOptional<z.ZodNumber>;
8748
+ tierScore: z.ZodOptional<z.ZodNumber>;
8749
+ tierRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
8750
+ tierRouted: z.ZodOptional<z.ZodBoolean>;
8537
8751
  }, z.core.$strip>;
8538
8752
  export type UsageTurn = z.infer<typeof UsageTurnSchema>;
8539
8753
  export declare const UsageRollupRowSchema: z.ZodObject<{