@intentic/sandbox-contract 1.224.0 → 1.226.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.
- package/README.md +14 -14
- package/dist/agent-catalog.d.ts +2 -0
- package/dist/agent-catalog.d.ts.map +1 -1
- package/dist/agent-catalog.js +19 -3
- package/dist/agent-catalog.js.map +1 -1
- package/dist/chores/chores.js +42 -42
- package/dist/chores/chores.js.map +1 -1
- package/dist/chores/extension-update.js +2 -2
- package/dist/chores/extension-update.js.map +1 -1
- package/dist/chores/fix-deps.js +1 -1
- package/dist/chores/fix-deps.js.map +1 -1
- package/dist/chores/probes.js +1 -1
- package/dist/chores/probes.js.map +1 -1
- package/dist/chores/verdict.js +2 -2
- package/dist/chores/verdict.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +41 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/exit.contract.d.ts +80 -0
- package/dist/contracts/exit.contract.d.ts.map +1 -0
- package/dist/contracts/exit.contract.js +13 -0
- package/dist/contracts/exit.contract.js.map +1 -0
- package/dist/contracts/settings.contract.d.ts +12 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/events.d.ts +4 -4
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +5 -5
- package/dist/events.js.map +1 -1
- package/dist/fast-tier.d.ts +9 -0
- package/dist/fast-tier.d.ts.map +1 -0
- package/dist/fast-tier.js +19 -0
- package/dist/fast-tier.js.map +1 -0
- package/dist/history-state.js +3 -3
- package/dist/history-state.js.map +1 -1
- package/dist/index.d.ts +203 -68
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/model-order.d.ts +1 -0
- package/dist/model-order.d.ts.map +1 -1
- package/dist/model-order.js +5 -0
- package/dist/model-order.js.map +1 -1
- package/dist/output-fields.d.ts.map +1 -1
- package/dist/output-fields.js +2 -2
- package/dist/output-fields.js.map +1 -1
- package/dist/prompt-complexity.d.ts +19 -0
- package/dist/prompt-complexity.d.ts.map +1 -0
- package/dist/prompt-complexity.js +83 -0
- package/dist/prompt-complexity.js.map +1 -0
- package/dist/publish-drafts.js +2 -2
- package/dist/publish-drafts.js.map +1 -1
- package/dist/schemas.d.ts +214 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +113 -2
- package/dist/schemas.js.map +1 -1
- package/dist/workflow-faults.js +3 -3
- package/dist/workflow-faults.js.map +1 -1
- package/dist/workspace-state.d.ts +20 -20
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +20 -20
- package/dist/workspace-state.js.map +1 -1
- package/package.json +5 -5
- package/src/agent-catalog.test.ts +72 -27
- package/src/agent-catalog.ts +91 -3
- package/src/agent-run-model.test.ts +3 -3
- package/src/capability-ledger.test.ts +34 -15
- package/src/chores/chores.test.ts +1 -1
- package/src/chores/chores.ts +42 -42
- package/src/chores/digest.test.ts +1 -1
- package/src/chores/extension-update.ts +2 -2
- package/src/chores/fix-deps.ts +1 -1
- package/src/chores/probes.test.ts +6 -6
- package/src/chores/probes.ts +1 -1
- package/src/chores/stack.test.ts +3 -3
- package/src/chores/verdict.test.ts +20 -20
- package/src/chores/verdict.ts +2 -2
- package/src/contract-lock.test.ts +1 -1
- package/src/contracts/exit.contract.ts +42 -0
- package/src/contracts/providers.contract.ts +1 -1
- package/src/conversation-ids.ts +1 -1
- package/src/events.test.ts +3 -3
- package/src/events.ts +6 -6
- package/src/fast-tier.test.ts +88 -0
- package/src/fast-tier.ts +72 -0
- package/src/history-state.ts +3 -3
- package/src/hostnames.test.ts +1 -1
- package/src/index.ts +5 -0
- package/src/model-order.test.ts +11 -11
- package/src/model-order.ts +22 -0
- package/src/output-fields.ts +2 -2
- package/src/path-refs.test.ts +4 -4
- package/src/prompt-complexity.test.ts +160 -0
- package/src/prompt-complexity.ts +271 -0
- package/src/publish-drafts.ts +2 -2
- package/src/quick-model.test.ts +11 -11
- package/src/routes.test.ts +11 -5
- package/src/runtime-state.test.ts +1 -1
- package/src/schemas.test.ts +8 -8
- package/src/schemas.ts +311 -6
- package/src/search-globs.test.ts +2 -2
- package/src/share-paths.test.ts +1 -1
- package/src/title.test.ts +9 -9
- package/src/title.ts +1 -1
- package/src/tunnel-ids.test.ts +3 -3
- package/src/versions.test.ts +3 -3
- package/src/versions.ts +1 -1
- package/src/workflow-faults.test.ts +6 -6
- package/src/workflow-faults.ts +3 -3
- package/src/workspace-state.test.ts +32 -32
- package/src/workspace-state.ts +20 -20
package/dist/schemas.js
CHANGED
|
@@ -573,6 +573,8 @@ export const SandboxSettingsSchema = z.object({
|
|
|
573
573
|
changelogRepos: z.array(z.string()).max(50).default([]),
|
|
574
574
|
agentRunModels: z.array(z.string()).max(10).default([]),
|
|
575
575
|
agentRunEffort: z.string().default(""),
|
|
576
|
+
autoTier: z.enum(["off", "shadow", "on"]).default("shadow"),
|
|
577
|
+
autoFastModels: z.array(z.string()).max(10).default([]),
|
|
576
578
|
agentRetentionDays: z.number().min(0).max(365).default(3),
|
|
577
579
|
resumeAfterOutage: z.boolean().default(false),
|
|
578
580
|
autoResumeOnRestart: z.boolean().default(false),
|
|
@@ -1071,12 +1073,14 @@ export const CapabilityKindSchema = z.enum([
|
|
|
1071
1073
|
"extension",
|
|
1072
1074
|
"ssh",
|
|
1073
1075
|
"vpn",
|
|
1076
|
+
"exit",
|
|
1074
1077
|
"docker",
|
|
1075
1078
|
"browser",
|
|
1076
1079
|
"identity",
|
|
1077
1080
|
"host",
|
|
1078
1081
|
"agent",
|
|
1079
1082
|
"endpoint",
|
|
1083
|
+
"localmodel",
|
|
1080
1084
|
"wallet",
|
|
1081
1085
|
]);
|
|
1082
1086
|
export const CapabilityStateSchema = z.enum(["active", "pending", "error", "inactive"]);
|
|
@@ -1131,7 +1135,7 @@ export const VpnProviderSchema = z.enum(["wireguard", "fortinet", "ipsec"]);
|
|
|
1131
1135
|
const autoConnect = z.enum(["on", "off"]).default("on");
|
|
1132
1136
|
export const isForticlientCiphertext = (value) => /^Enc[X]?\s+[0-9A-Fa-f]{8,}$/.test(value.trim());
|
|
1133
1137
|
const notForticlientCiphertext = (field, label) => field.refine((value) => !isForticlientCiphertext(value), {
|
|
1134
|
-
message: `That looks like a value copied straight out of a FortiClient config
|
|
1138
|
+
message: `That looks like a value copied straight out of a FortiClient config, FortiClient encrypts it with a key tied to the machine that exported it, so it can't be used here. Enter the actual ${label} (ask whoever administers the gateway).`,
|
|
1135
1139
|
});
|
|
1136
1140
|
export const WireguardVpnConfigSchema = z.object({
|
|
1137
1141
|
provider: z.literal("wireguard"),
|
|
@@ -1172,6 +1176,29 @@ export const IpsecVpnConfigSchema = z.object({
|
|
|
1172
1176
|
autoConnect,
|
|
1173
1177
|
});
|
|
1174
1178
|
export const VpnConfigSchema = z.discriminatedUnion("provider", [WireguardVpnConfigSchema, FortinetVpnConfigSchema, IpsecVpnConfigSchema]);
|
|
1179
|
+
export const ExitProviderSchema = z.enum(["tor", "vpngate", "wireguard"]);
|
|
1180
|
+
export const CountryCodeSchema = z
|
|
1181
|
+
.string()
|
|
1182
|
+
.regex(/^[A-Za-z]{2}$/, "A country is its two-letter code, like DE, US or JP.")
|
|
1183
|
+
.transform((value) => value.toUpperCase());
|
|
1184
|
+
const autoStart = z.enum(["on", "off"]).default("off");
|
|
1185
|
+
export const TorExitConfigSchema = z.object({
|
|
1186
|
+
provider: z.literal("tor"),
|
|
1187
|
+
country: CountryCodeSchema.optional(),
|
|
1188
|
+
autoStart,
|
|
1189
|
+
});
|
|
1190
|
+
export const VpngateExitConfigSchema = z.object({
|
|
1191
|
+
provider: z.literal("vpngate"),
|
|
1192
|
+
country: CountryCodeSchema.optional(),
|
|
1193
|
+
autoStart,
|
|
1194
|
+
});
|
|
1195
|
+
export const WireguardExitConfigSchema = z.object({
|
|
1196
|
+
provider: z.literal("wireguard"),
|
|
1197
|
+
config: z.string().min(1),
|
|
1198
|
+
country: CountryCodeSchema.optional(),
|
|
1199
|
+
autoStart,
|
|
1200
|
+
});
|
|
1201
|
+
export const ExitConfigSchema = z.discriminatedUnion("provider", [TorExitConfigSchema, VpngateExitConfigSchema, WireguardExitConfigSchema]);
|
|
1175
1202
|
export const DockerConfigSchema = z.object({
|
|
1176
1203
|
gpu: z.enum(["on", "off"]).default("off"),
|
|
1177
1204
|
registryMirror: z.url().optional(),
|
|
@@ -1186,6 +1213,7 @@ export const BrowserConfigSchema = z
|
|
|
1186
1213
|
identity: z.string().optional(),
|
|
1187
1214
|
purpose: z.string().optional(),
|
|
1188
1215
|
openedAt: z.string().optional(),
|
|
1216
|
+
exit: z.string().optional(),
|
|
1189
1217
|
})
|
|
1190
1218
|
.catchall(z.string());
|
|
1191
1219
|
export const IdentityConfigSchema = z.object({
|
|
@@ -1194,6 +1222,7 @@ export const IdentityConfigSchema = z.object({
|
|
|
1194
1222
|
mailbox: z.string().optional(),
|
|
1195
1223
|
loginUrl: z.url().optional(),
|
|
1196
1224
|
openAccounts: z.enum(["on", "off"]).default("off"),
|
|
1225
|
+
exit: z.string().optional(),
|
|
1197
1226
|
});
|
|
1198
1227
|
const hostScope = z.enum(["on", "off"]);
|
|
1199
1228
|
export const HostScopesSchema = z.object({
|
|
@@ -1219,7 +1248,12 @@ export const EndpointConfigSchema = z.object({
|
|
|
1219
1248
|
apiKey: z.string().optional(),
|
|
1220
1249
|
headers: z.string().optional(),
|
|
1221
1250
|
});
|
|
1222
|
-
const
|
|
1251
|
+
export const LocalModelConfigSchema = z.object({
|
|
1252
|
+
model: z.string().min(1),
|
|
1253
|
+
gpu: z.enum(["on", "off"]).default("off"),
|
|
1254
|
+
url: z.url().optional(),
|
|
1255
|
+
});
|
|
1256
|
+
const usdAmount = z.string().regex(/^\d+(\.\d{1,6})?$/, "a USD amount like 0.50 (up to six decimals: USDC's own precision)");
|
|
1223
1257
|
export const WalletNetworkSchema = z.enum(["eip155:8453", "eip155:84532"]);
|
|
1224
1258
|
export const WalletConfigSchema = z.object({
|
|
1225
1259
|
network: WalletNetworkSchema.default("eip155:8453"),
|
|
@@ -1241,12 +1275,14 @@ export const CapabilitySchema = z.discriminatedUnion("kind", [
|
|
|
1241
1275
|
z.object({ id: entryId, kind: z.literal("extension"), config: ExtensionConfigSchema }),
|
|
1242
1276
|
z.object({ id: entryId, kind: z.literal("ssh"), config: SshConfigSchema }),
|
|
1243
1277
|
z.object({ id: entryId, kind: z.literal("vpn"), config: VpnConfigSchema }),
|
|
1278
|
+
z.object({ id: entryId, kind: z.literal("exit"), config: ExitConfigSchema }),
|
|
1244
1279
|
z.object({ id: entryId, kind: z.literal("docker"), config: DockerConfigSchema }),
|
|
1245
1280
|
z.object({ id: entryId, kind: z.literal("browser"), config: BrowserConfigSchema }),
|
|
1246
1281
|
z.object({ id: entryId, kind: z.literal("identity"), config: IdentityConfigSchema }),
|
|
1247
1282
|
z.object({ id: entryId, kind: z.literal("host"), config: HostConfigSchema }),
|
|
1248
1283
|
z.object({ id: entryId, kind: z.literal("agent"), config: AcpAgentConfigSchema }),
|
|
1249
1284
|
z.object({ id: entryId, kind: z.literal("endpoint"), config: EndpointConfigSchema }),
|
|
1285
|
+
z.object({ id: entryId, kind: z.literal("localmodel"), config: LocalModelConfigSchema }),
|
|
1250
1286
|
z.object({ id: entryId, kind: z.literal("wallet"), config: WalletConfigSchema }),
|
|
1251
1287
|
]);
|
|
1252
1288
|
export const PersonaPowersSchema = z.object({
|
|
@@ -1408,6 +1444,78 @@ export const ForticlientConnectionSchema = z.object({
|
|
|
1408
1444
|
needs: z.array(z.string()),
|
|
1409
1445
|
});
|
|
1410
1446
|
export const ForticlientImportSchema = z.object({ connections: z.array(ForticlientConnectionSchema) });
|
|
1447
|
+
export const ExitStateSchema = z.enum([
|
|
1448
|
+
"up",
|
|
1449
|
+
"starting",
|
|
1450
|
+
"down",
|
|
1451
|
+
"unavailable",
|
|
1452
|
+
"failed",
|
|
1453
|
+
]);
|
|
1454
|
+
export const ExitObservationSchema = z.object({
|
|
1455
|
+
ip: z.string(),
|
|
1456
|
+
country: z.string().optional(),
|
|
1457
|
+
countryName: z.string().optional(),
|
|
1458
|
+
});
|
|
1459
|
+
export const ExitPointSchema = z.object({
|
|
1460
|
+
country: z.string(),
|
|
1461
|
+
countryName: z.string(),
|
|
1462
|
+
servers: z.number(),
|
|
1463
|
+
share: z.number().optional(),
|
|
1464
|
+
});
|
|
1465
|
+
export const ExitCountriesSchema = z.object({
|
|
1466
|
+
countries: z.array(ExitPointSchema),
|
|
1467
|
+
live: z.boolean(),
|
|
1468
|
+
});
|
|
1469
|
+
export const ExitLinkSchema = z.object({
|
|
1470
|
+
id: z.string(),
|
|
1471
|
+
provider: ExitProviderSchema,
|
|
1472
|
+
state: ExitStateSchema,
|
|
1473
|
+
proxy: z.string(),
|
|
1474
|
+
country: z.string().optional(),
|
|
1475
|
+
observedCountry: z.string().optional(),
|
|
1476
|
+
ip: z.string().optional(),
|
|
1477
|
+
checkedAt: z.number().optional(),
|
|
1478
|
+
interface: z.string().optional(),
|
|
1479
|
+
since: z.number().optional(),
|
|
1480
|
+
autoStart: z.boolean(),
|
|
1481
|
+
detail: z.string().optional(),
|
|
1482
|
+
});
|
|
1483
|
+
export const ExitListSchema = z.object({ links: z.array(ExitLinkSchema) });
|
|
1484
|
+
export const TOR_EXIT_COUNTRIES = [
|
|
1485
|
+
{ country: "NL", countryName: "Netherlands", servers: 607, share: 0.304 },
|
|
1486
|
+
{ country: "DE", countryName: "Germany", servers: 415, share: 0.242 },
|
|
1487
|
+
{ country: "SE", countryName: "Sweden", servers: 344, share: 0.14 },
|
|
1488
|
+
{ country: "US", countryName: "United States", servers: 1171, share: 0.097 },
|
|
1489
|
+
{ country: "AT", countryName: "Austria", servers: 123, share: 0.054 },
|
|
1490
|
+
{ country: "LU", countryName: "Luxembourg", servers: 92, share: 0.033 },
|
|
1491
|
+
{ country: "FR", countryName: "France", servers: 63, share: 0.032 },
|
|
1492
|
+
{ country: "NO", countryName: "Norway", servers: 54, share: 0.026 },
|
|
1493
|
+
{ country: "RO", countryName: "Romania", servers: 71, share: 0.011 },
|
|
1494
|
+
{ country: "DK", countryName: "Denmark", servers: 15, share: 0.007 },
|
|
1495
|
+
{ country: "HU", countryName: "Hungary", servers: 20, share: 0.006 },
|
|
1496
|
+
{ country: "IT", countryName: "Italy", servers: 15, share: 0.006 },
|
|
1497
|
+
{ country: "UA", countryName: "Ukraine", servers: 23, share: 0.006 },
|
|
1498
|
+
{ country: "CH", countryName: "Switzerland", servers: 23, share: 0.006 },
|
|
1499
|
+
{ country: "IS", countryName: "Iceland", servers: 23, share: 0.003 },
|
|
1500
|
+
{ country: "PL", countryName: "Poland", servers: 8, share: 0.002 },
|
|
1501
|
+
{ country: "BG", countryName: "Bulgaria", servers: 17, share: 0.002 },
|
|
1502
|
+
{ country: "GB", countryName: "United Kingdom", servers: 8, share: 0.002 },
|
|
1503
|
+
{ country: "FI", countryName: "Finland", servers: 13, share: 0.002 },
|
|
1504
|
+
];
|
|
1505
|
+
export const VPNGATE_EXIT_COUNTRIES = [
|
|
1506
|
+
{ country: "JP", countryName: "Japan", servers: 46, share: 0.48 },
|
|
1507
|
+
{ country: "KR", countryName: "Korea, South", servers: 37, share: 0.39 },
|
|
1508
|
+
{ country: "VN", countryName: "Vietnam", servers: 3, share: 0.03 },
|
|
1509
|
+
{ country: "TH", countryName: "Thailand", servers: 2, share: 0.02 },
|
|
1510
|
+
{ country: "RU", countryName: "Russia", servers: 2, share: 0.02 },
|
|
1511
|
+
{ country: "RO", countryName: "Romania", servers: 1, share: 0.01 },
|
|
1512
|
+
{ country: "MX", countryName: "Mexico", servers: 1, share: 0.01 },
|
|
1513
|
+
{ country: "IN", countryName: "India", servers: 1, share: 0.01 },
|
|
1514
|
+
{ country: "CN", countryName: "China", servers: 1, share: 0.01 },
|
|
1515
|
+
{ country: "BY", countryName: "Belarus", servers: 1, share: 0.01 },
|
|
1516
|
+
];
|
|
1517
|
+
export const ExitIdParamSchema = z.object({ id: z.string() });
|
|
1518
|
+
export const ExitUseInputSchema = z.object({ id: z.string(), country: CountryCodeSchema.optional() });
|
|
1411
1519
|
export const MarketplaceRequestSchema = z.object({ url: z.url(), token: z.string().min(1).optional() });
|
|
1412
1520
|
export const MarketplaceSchema = z.object({ name: z.string(), plugins: z.array(RegistryEntrySchema) });
|
|
1413
1521
|
const extensionId = z
|
|
@@ -2258,6 +2366,9 @@ export const UsageTurnSchema = z.object({
|
|
|
2258
2366
|
proseChars: z.number().optional(),
|
|
2259
2367
|
searchCalls: z.number().optional(),
|
|
2260
2368
|
openingSearches: z.number().optional(),
|
|
2369
|
+
tierScore: z.number().optional(),
|
|
2370
|
+
tierRules: z.array(z.string()).optional(),
|
|
2371
|
+
tierRouted: z.boolean().optional(),
|
|
2261
2372
|
});
|
|
2262
2373
|
export const UsageRollupRowSchema = z.object({
|
|
2263
2374
|
day: z.string(),
|