@runtypelabs/cli 2.36.4 → 2.37.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/dist/index.js +453 -48
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -610,7 +610,7 @@ var OAuthManager = class {
|
|
|
610
610
|
// src/auth/api-key-manager.ts
|
|
611
611
|
import { RuntypeApiError } from "@runtypelabs/sdk";
|
|
612
612
|
|
|
613
|
-
// ../shared/dist/chunk-
|
|
613
|
+
// ../shared/dist/chunk-WSSJEVIH.mjs
|
|
614
614
|
var MODEL_FAMILY_PROVIDER_IDS = {
|
|
615
615
|
"claude-fable-5": {
|
|
616
616
|
"anthropic": "claude-fable-5",
|
|
@@ -903,11 +903,18 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
903
903
|
"vercel": "zai/glm-5.2-fast"
|
|
904
904
|
},
|
|
905
905
|
"glm-5-3": {
|
|
906
|
+
"mixlayer": "z-ai/glm-5.3",
|
|
906
907
|
"vercel": "zai/glm-5.3"
|
|
907
908
|
},
|
|
909
|
+
"glm-5-3-fast": {
|
|
910
|
+
"vercel": "zai/glm-5.3-fast"
|
|
911
|
+
},
|
|
908
912
|
"glm-5-3-flash": {
|
|
909
913
|
"vercel": "zai/glm-5.3-flash"
|
|
910
914
|
},
|
|
915
|
+
"glm-5-3-promo-50": {
|
|
916
|
+
"vercel": "zai/glm-5.3-promo-50"
|
|
917
|
+
},
|
|
911
918
|
"glm-5.2": {
|
|
912
919
|
"mixlayer": "z-ai/glm-5.2",
|
|
913
920
|
"vercel": "zai/glm-5.2"
|
|
@@ -916,11 +923,18 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
916
923
|
"vercel": "zai/glm-5.2-fast"
|
|
917
924
|
},
|
|
918
925
|
"glm-5.3": {
|
|
926
|
+
"mixlayer": "z-ai/glm-5.3",
|
|
919
927
|
"vercel": "zai/glm-5.3"
|
|
920
928
|
},
|
|
929
|
+
"glm-5.3-fast": {
|
|
930
|
+
"vercel": "zai/glm-5.3-fast"
|
|
931
|
+
},
|
|
921
932
|
"glm-5.3-flash": {
|
|
922
933
|
"vercel": "zai/glm-5.3-flash"
|
|
923
934
|
},
|
|
935
|
+
"glm-5.3-promo-50": {
|
|
936
|
+
"vercel": "zai/glm-5.3-promo-50"
|
|
937
|
+
},
|
|
924
938
|
"gpt-4-1": {
|
|
925
939
|
"openai": "gpt-4.1",
|
|
926
940
|
"vercel": "openai/gpt-4.1"
|
|
@@ -1194,6 +1208,13 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
1194
1208
|
"gpt-5.6-terra-fast": {
|
|
1195
1209
|
"vercel": "openai/gpt-5.6-terra-fast"
|
|
1196
1210
|
},
|
|
1211
|
+
"gpt-6-astra": {
|
|
1212
|
+
"openai": "gpt-6-astra",
|
|
1213
|
+
"vercel": "openai/gpt-6-astra"
|
|
1214
|
+
},
|
|
1215
|
+
"gpt-6-astra-fast": {
|
|
1216
|
+
"vercel": "openai/gpt-6-astra-fast"
|
|
1217
|
+
},
|
|
1197
1218
|
"gpt-image-1-5": {
|
|
1198
1219
|
"openai": "gpt-image-1.5"
|
|
1199
1220
|
},
|
|
@@ -1379,9 +1400,21 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
1379
1400
|
"ling-3-0-flash": {
|
|
1380
1401
|
"vercel": "inclusionai/ling-3.0-flash"
|
|
1381
1402
|
},
|
|
1403
|
+
"ling-3-0-flash-sante": {
|
|
1404
|
+
"vercel": "inclusionai/ling-3.0-flash-sante"
|
|
1405
|
+
},
|
|
1406
|
+
"ling-3-0-flash-sante-free": {
|
|
1407
|
+
"vercel": "inclusionai/ling-3.0-flash-sante-free"
|
|
1408
|
+
},
|
|
1382
1409
|
"ling-3.0-flash": {
|
|
1383
1410
|
"vercel": "inclusionai/ling-3.0-flash"
|
|
1384
1411
|
},
|
|
1412
|
+
"ling-3.0-flash-sante": {
|
|
1413
|
+
"vercel": "inclusionai/ling-3.0-flash-sante"
|
|
1414
|
+
},
|
|
1415
|
+
"ling-3.0-flash-sante-free": {
|
|
1416
|
+
"vercel": "inclusionai/ling-3.0-flash-sante-free"
|
|
1417
|
+
},
|
|
1385
1418
|
"llama-3.1-70b": {
|
|
1386
1419
|
"vercel": "meta/llama-3.1-70b"
|
|
1387
1420
|
},
|
|
@@ -1499,6 +1532,12 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
1499
1532
|
"muse-spark-1-2-contributor": {
|
|
1500
1533
|
"vercel": "meta/muse-spark-1.2-contributor"
|
|
1501
1534
|
},
|
|
1535
|
+
"muse-spark-1-3": {
|
|
1536
|
+
"vercel": "meta/muse-spark-1.3"
|
|
1537
|
+
},
|
|
1538
|
+
"muse-spark-1-3-contributor": {
|
|
1539
|
+
"vercel": "meta/muse-spark-1.3-contributor"
|
|
1540
|
+
},
|
|
1502
1541
|
"muse-spark-1.1": {
|
|
1503
1542
|
"vercel": "meta/muse-spark-1.1"
|
|
1504
1543
|
},
|
|
@@ -1508,6 +1547,12 @@ var MODEL_FAMILY_PROVIDER_IDS = {
|
|
|
1508
1547
|
"muse-spark-1.2-contributor": {
|
|
1509
1548
|
"vercel": "meta/muse-spark-1.2-contributor"
|
|
1510
1549
|
},
|
|
1550
|
+
"muse-spark-1.3": {
|
|
1551
|
+
"vercel": "meta/muse-spark-1.3"
|
|
1552
|
+
},
|
|
1553
|
+
"muse-spark-1.3-contributor": {
|
|
1554
|
+
"vercel": "meta/muse-spark-1.3-contributor"
|
|
1555
|
+
},
|
|
1511
1556
|
"namazu": {
|
|
1512
1557
|
"vercel": "sakana/namazu"
|
|
1513
1558
|
},
|
|
@@ -5638,18 +5683,18 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
5638
5683
|
};
|
|
5639
5684
|
});
|
|
5640
5685
|
function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
5641
|
-
const
|
|
5686
|
+
const isPresent2 = key in input2;
|
|
5642
5687
|
const isOptionalOut = optout === "optional";
|
|
5643
|
-
if (!
|
|
5688
|
+
if (!isPresent2 && isOptionalOut && optin === "optional") {
|
|
5644
5689
|
return;
|
|
5645
5690
|
}
|
|
5646
5691
|
if (result.issues.length) {
|
|
5647
|
-
if (optin !== void 0 && isOptionalOut && !
|
|
5692
|
+
if (optin !== void 0 && isOptionalOut && !isPresent2) {
|
|
5648
5693
|
return;
|
|
5649
5694
|
}
|
|
5650
5695
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
5651
5696
|
}
|
|
5652
|
-
if (!
|
|
5697
|
+
if (!isPresent2 && optin === void 0) {
|
|
5653
5698
|
if (!result.issues.length) {
|
|
5654
5699
|
final.issues.push({
|
|
5655
5700
|
code: "invalid_type",
|
|
@@ -5661,7 +5706,7 @@ function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
|
5661
5706
|
return;
|
|
5662
5707
|
}
|
|
5663
5708
|
if (result.value === void 0) {
|
|
5664
|
-
if (
|
|
5709
|
+
if (isPresent2) {
|
|
5665
5710
|
final.value[key] = void 0;
|
|
5666
5711
|
}
|
|
5667
5712
|
} else {
|
|
@@ -5835,7 +5880,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
5835
5880
|
continue;
|
|
5836
5881
|
const id = ids[key];
|
|
5837
5882
|
const k2 = typeof key === "symbol" ? `syms[${syms.indexOf(key)}]` : esc(key);
|
|
5838
|
-
const
|
|
5883
|
+
const isPresent2 = `${k2} in input`;
|
|
5839
5884
|
const schema = shape[key];
|
|
5840
5885
|
const optin = schema?._zod?.optin;
|
|
5841
5886
|
const isOptionalIn = optin !== void 0;
|
|
@@ -5844,7 +5889,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
5844
5889
|
if (isOptionalIn && isOptionalOut) {
|
|
5845
5890
|
const assign = optin === "optional" ? `${id}_present` : `${id}.value !== undefined || ${id}_present`;
|
|
5846
5891
|
doc.write(`
|
|
5847
|
-
const ${id}_present = ${
|
|
5892
|
+
const ${id}_present = ${isPresent2};
|
|
5848
5893
|
if (!${id}.issues.length || ${id}_present) {
|
|
5849
5894
|
if (${id}.issues.length) {${prefixStr(id, k2)}
|
|
5850
5895
|
}
|
|
@@ -5857,7 +5902,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
5857
5902
|
`);
|
|
5858
5903
|
} else if (!isOptionalIn) {
|
|
5859
5904
|
doc.write(`
|
|
5860
|
-
const ${id}_present = ${
|
|
5905
|
+
const ${id}_present = ${isPresent2};
|
|
5861
5906
|
if (${id}.issues.length) {${prefixStr(id, k2)}
|
|
5862
5907
|
}
|
|
5863
5908
|
if (!${id}_present && !${id}.issues.length) {
|
|
@@ -5880,7 +5925,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
5880
5925
|
}
|
|
5881
5926
|
|
|
5882
5927
|
if (${id}.value === undefined) {
|
|
5883
|
-
if (${
|
|
5928
|
+
if (${isPresent2}) {
|
|
5884
5929
|
newResult[${k2}] = undefined;
|
|
5885
5930
|
}
|
|
5886
5931
|
} else {
|
|
@@ -6340,13 +6385,13 @@ function handleTupleResult(result, final, index) {
|
|
|
6340
6385
|
function handleTupleResults(itemResults, final, items, input2, optoutStart) {
|
|
6341
6386
|
for (let i = 0; i < items.length; i++) {
|
|
6342
6387
|
const r = itemResults[i];
|
|
6343
|
-
const
|
|
6344
|
-
if (!
|
|
6388
|
+
const isPresent2 = i < input2.length;
|
|
6389
|
+
if (!isPresent2 && i >= optoutStart && items[i]._zod.optin === "optional") {
|
|
6345
6390
|
final.value.length = i;
|
|
6346
6391
|
break;
|
|
6347
6392
|
}
|
|
6348
6393
|
if (r.issues.length) {
|
|
6349
|
-
if (!
|
|
6394
|
+
if (!isPresent2 && i >= optoutStart) {
|
|
6350
6395
|
final.value.length = i;
|
|
6351
6396
|
break;
|
|
6352
6397
|
}
|
|
@@ -21471,7 +21516,7 @@ var BuiltInToolIdPrefix = {
|
|
|
21471
21516
|
PLATFORM: "platform"
|
|
21472
21517
|
};
|
|
21473
21518
|
|
|
21474
|
-
// ../shared/dist/chunk-
|
|
21519
|
+
// ../shared/dist/chunk-3XRATUCG.mjs
|
|
21475
21520
|
function sanitizeToolNameForAiSdk(name) {
|
|
21476
21521
|
return name.replace(/[^a-zA-Z0-9_]/g, "_").toLowerCase().replace(/_+/g, "_").replace(/^_|_$/g, "");
|
|
21477
21522
|
}
|
|
@@ -21626,6 +21671,12 @@ function resolveModelOptionalSettings(model) {
|
|
|
21626
21671
|
return [];
|
|
21627
21672
|
}
|
|
21628
21673
|
|
|
21674
|
+
// ../shared/dist/chunk-HIIORCZ5.mjs
|
|
21675
|
+
var REPLAY_FROM_START = Object.freeze({
|
|
21676
|
+
row: 0,
|
|
21677
|
+
sub: Number.POSITIVE_INFINITY
|
|
21678
|
+
});
|
|
21679
|
+
|
|
21629
21680
|
// ../shared/dist/chunk-HD3SKN3O.mjs
|
|
21630
21681
|
var edgeAuthSnapshotSchema = external_exports.object({
|
|
21631
21682
|
/**
|
|
@@ -21701,17 +21752,10 @@ var resolvedEdgeAuthSnapshotSchema = edgeAuthSnapshotSchema.extend({
|
|
|
21701
21752
|
resolvedAt: external_exports.number().int().positive()
|
|
21702
21753
|
});
|
|
21703
21754
|
|
|
21704
|
-
// ../shared/dist/chunk-
|
|
21705
|
-
var
|
|
21706
|
-
|
|
21707
|
-
|
|
21708
|
-
"paused",
|
|
21709
|
-
"completed",
|
|
21710
|
-
"failed",
|
|
21711
|
-
"cancelled",
|
|
21712
|
-
"interrupted"
|
|
21713
|
-
];
|
|
21714
|
-
var agentExecutionStatusSchema = external_exports.enum(AGENT_EXECUTION_STATUSES);
|
|
21755
|
+
// ../shared/dist/chunk-4VLXOKEV.mjs
|
|
21756
|
+
var CONTAINER_SANDBOX_INSTANCE_TYPE = "standard-4";
|
|
21757
|
+
|
|
21758
|
+
// ../shared/dist/chunk-PDK72EP7.mjs
|
|
21715
21759
|
var RUNTYPE_ITERATION = "runtype.iteration";
|
|
21716
21760
|
var RUNTYPE_TURN_INDEX = "runtype.turn.index";
|
|
21717
21761
|
var RUNTYPE_LEGACY_ATTRIBUTE_ALIASES = {
|
|
@@ -21754,17 +21798,34 @@ var OPENINFERENCE_CONTENT_PREFIXES = [
|
|
|
21754
21798
|
];
|
|
21755
21799
|
var AI_SDK_CONTENT_PREFIXES = ["ai.response.toolCalls"];
|
|
21756
21800
|
var MASTRA_CONTENT_PREFIXES = ["mastra.metadata.body"];
|
|
21801
|
+
var CLOUDFLARE_AGENTS_CONTENT_PREFIXES = [
|
|
21802
|
+
"cloudflare.agents.metadata.",
|
|
21803
|
+
"cloudflare.agents.runtime_context."
|
|
21804
|
+
];
|
|
21757
21805
|
var GEN_AI_CONTENT_ATTRIBUTE_PREFIXES = [
|
|
21758
21806
|
...OPENINFERENCE_CONTENT_PREFIXES,
|
|
21759
21807
|
...AI_SDK_CONTENT_PREFIXES,
|
|
21760
|
-
...MASTRA_CONTENT_PREFIXES
|
|
21808
|
+
...MASTRA_CONTENT_PREFIXES,
|
|
21809
|
+
...CLOUDFLARE_AGENTS_CONTENT_PREFIXES
|
|
21761
21810
|
];
|
|
21762
21811
|
var GEN_AI_CONTENT_ATTRIBUTE_NAMES = /* @__PURE__ */ new Set([
|
|
21763
21812
|
...Object.values(GEN_AI_CONTENT_ATTRIBUTES),
|
|
21764
21813
|
...Object.values(GEN_AI_CONTENT_ATTRIBUTE_ALIASES).flat()
|
|
21765
21814
|
]);
|
|
21766
21815
|
|
|
21767
|
-
// ../shared/dist/chunk-
|
|
21816
|
+
// ../shared/dist/chunk-ZDRWUYBY.mjs
|
|
21817
|
+
var AGENT_EXECUTION_STATUSES = [
|
|
21818
|
+
"queued",
|
|
21819
|
+
"running",
|
|
21820
|
+
"paused",
|
|
21821
|
+
"completed",
|
|
21822
|
+
"failed",
|
|
21823
|
+
"cancelled",
|
|
21824
|
+
"interrupted"
|
|
21825
|
+
];
|
|
21826
|
+
var agentExecutionStatusSchema = external_exports.enum(AGENT_EXECUTION_STATUSES);
|
|
21827
|
+
|
|
21828
|
+
// ../shared/dist/chunk-6UABSJMP.mjs
|
|
21768
21829
|
var CANONICAL_LOG_COLUMN_SET = {
|
|
21769
21830
|
// @snake-case-ok-start: R2 SQL / Iceberg column naming convention
|
|
21770
21831
|
event_id: true,
|
|
@@ -26794,10 +26855,6 @@ function speechProfilesSemanticallyEqual(legacy, canonical) {
|
|
|
26794
26855
|
const resolved = resolveVoiceSpeechProfile({ speech: canonical });
|
|
26795
26856
|
return JSON.stringify(legacy) === JSON.stringify(resolved);
|
|
26796
26857
|
}
|
|
26797
|
-
var REPLAY_FROM_START = Object.freeze({
|
|
26798
|
-
row: 0,
|
|
26799
|
-
sub: Number.POSITIVE_INFINITY
|
|
26800
|
-
});
|
|
26801
26858
|
var agUiEventBase = {
|
|
26802
26859
|
// INVARIANT: Metadata is absent or an object; an explicit null fails the spec parse.
|
|
26803
26860
|
metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
@@ -27058,6 +27115,89 @@ function stripTrailingChars(value, char) {
|
|
|
27058
27115
|
}
|
|
27059
27116
|
return end === value.length ? value : value.slice(0, end);
|
|
27060
27117
|
}
|
|
27118
|
+
var AGENT_ALIAS_MAX_LENGTH = 63;
|
|
27119
|
+
var AGENT_INLINE_DEFINITION_FIELDS = [
|
|
27120
|
+
"claudeManagedConfig",
|
|
27121
|
+
"model",
|
|
27122
|
+
"systemPrompt",
|
|
27123
|
+
"temperature",
|
|
27124
|
+
"topP",
|
|
27125
|
+
"topK",
|
|
27126
|
+
"frequencyPenalty",
|
|
27127
|
+
"presencePenalty",
|
|
27128
|
+
"seed",
|
|
27129
|
+
"maxTokens",
|
|
27130
|
+
"tools",
|
|
27131
|
+
"artifacts",
|
|
27132
|
+
"loopConfig",
|
|
27133
|
+
"advisor",
|
|
27134
|
+
"reasoning",
|
|
27135
|
+
"voice",
|
|
27136
|
+
"errorHandling",
|
|
27137
|
+
"loggingPolicy",
|
|
27138
|
+
"piiRedaction",
|
|
27139
|
+
"temporal",
|
|
27140
|
+
"memory",
|
|
27141
|
+
"sandbox",
|
|
27142
|
+
"tenancyStrategy"
|
|
27143
|
+
];
|
|
27144
|
+
function isPresent(value) {
|
|
27145
|
+
return value !== void 0 && value !== null;
|
|
27146
|
+
}
|
|
27147
|
+
function hasAgentSelector(agent) {
|
|
27148
|
+
if (!agent) return false;
|
|
27149
|
+
return isPresent(agent.alias) || isPresent(agent.versionId);
|
|
27150
|
+
}
|
|
27151
|
+
function agentSelectorViolation(agent) {
|
|
27152
|
+
if (!agent) return null;
|
|
27153
|
+
const hasAlias = isPresent(agent.alias);
|
|
27154
|
+
const hasVersionId = isPresent(agent.versionId);
|
|
27155
|
+
if (!hasAlias && !hasVersionId) return null;
|
|
27156
|
+
if (hasAlias && hasVersionId) {
|
|
27157
|
+
return {
|
|
27158
|
+
code: "selector_conflict",
|
|
27159
|
+
path: "agent.versionId",
|
|
27160
|
+
message: "An agent selects at most one version: supply agent.alias or agent.versionId, not both."
|
|
27161
|
+
};
|
|
27162
|
+
}
|
|
27163
|
+
if (!isPresent(agent.agentId) && !isPresent(agent.name)) {
|
|
27164
|
+
return {
|
|
27165
|
+
code: "selector_requires_identity",
|
|
27166
|
+
path: "agent.agentId",
|
|
27167
|
+
message: "A version selector needs an agent identity: supply agent.agentId or agent.name alongside it."
|
|
27168
|
+
};
|
|
27169
|
+
}
|
|
27170
|
+
for (const field of AGENT_INLINE_DEFINITION_FIELDS) {
|
|
27171
|
+
if (isPresent(agent[field])) {
|
|
27172
|
+
return {
|
|
27173
|
+
code: "inline_definition_with_selector",
|
|
27174
|
+
path: `agent.${field}`,
|
|
27175
|
+
message: `agent.${field} is an inline definition and cannot be combined with a version selector; the selected version supplies the definition.`
|
|
27176
|
+
};
|
|
27177
|
+
}
|
|
27178
|
+
}
|
|
27179
|
+
if (hasAlias) {
|
|
27180
|
+
const alias = agent.alias;
|
|
27181
|
+
if (typeof alias !== "string" || alias.length === 0 || alias.length > AGENT_ALIAS_MAX_LENGTH) {
|
|
27182
|
+
return {
|
|
27183
|
+
code: "selector_conflict",
|
|
27184
|
+
path: "agent.alias",
|
|
27185
|
+
message: `agent.alias must be a string of at most ${AGENT_ALIAS_MAX_LENGTH} characters.`
|
|
27186
|
+
};
|
|
27187
|
+
}
|
|
27188
|
+
}
|
|
27189
|
+
if (hasVersionId) {
|
|
27190
|
+
const versionId = agent.versionId;
|
|
27191
|
+
if (typeof versionId !== "string" || versionId.length === 0) {
|
|
27192
|
+
return {
|
|
27193
|
+
code: "selector_conflict",
|
|
27194
|
+
path: "agent.versionId",
|
|
27195
|
+
message: "agent.versionId must be a non-empty string."
|
|
27196
|
+
};
|
|
27197
|
+
}
|
|
27198
|
+
}
|
|
27199
|
+
return null;
|
|
27200
|
+
}
|
|
27061
27201
|
var CLIENT_EXECUTED_TOOL_TYPES = /* @__PURE__ */ new Set(["local", "webmcp"]);
|
|
27062
27202
|
function isClientExecutedToolType(toolType) {
|
|
27063
27203
|
return typeof toolType === "string" && CLIENT_EXECUTED_TOOL_TYPES.has(toolType);
|
|
@@ -27722,12 +27862,12 @@ var sandboxNetworkAccessSchema = external_exports.union([
|
|
|
27722
27862
|
]);
|
|
27723
27863
|
var sandboxConfigSchema = external_exports.object({
|
|
27724
27864
|
enabled: external_exports.boolean(),
|
|
27725
|
-
//
|
|
27726
|
-
provider: external_exports.enum(["runtype-sandbox", "daytona"]).optional(),
|
|
27727
|
-
//
|
|
27728
|
-
persistence: external_exports.enum(["ephemeral", "conversation", "named"]).optional(),
|
|
27729
|
-
//
|
|
27730
|
-
instanceType: external_exports.enum(["standard-1", "standard-2", "standard-3", "standard-4"]).optional(),
|
|
27865
|
+
// INVARIANT: Parsing preserves stored providers; capability validation rejects unsupported enabled values.
|
|
27866
|
+
provider: external_exports.enum(["runtype-sandbox", "daytona"]).optional().describe("Only runtype-sandbox is currently supported. Daytona is retained for stored-config parsing but rejected at authoring/execution."),
|
|
27867
|
+
// INVARIANT: Named persistence remains readable but fails capability validation when enabled.
|
|
27868
|
+
persistence: external_exports.enum(["ephemeral", "conversation", "named"]).optional().describe("Supported: ephemeral or conversation. Named remains parseable for stored configs but cannot be enabled."),
|
|
27869
|
+
// INVARIANT: The hosted provider only provisions standard-4; other enabled sizes fail capability validation.
|
|
27870
|
+
instanceType: external_exports.enum(["standard-1", "standard-2", "standard-3", "standard-4"]).optional().describe("Only standard-4 is supported on the hosted Agent Sandbox path; other sizes cannot be enabled."),
|
|
27731
27871
|
networkAccess: sandboxNetworkAccessSchema.optional(),
|
|
27732
27872
|
ttl: external_exports.enum(["5m", "1h", "24h", "unlimited"]).optional(),
|
|
27733
27873
|
sleepAfter: external_exports.enum(["5m", "15m", "30m", "1h"]).optional(),
|
|
@@ -27749,6 +27889,7 @@ var agentDurabilityConfigSchema = external_exports.object({
|
|
|
27749
27889
|
maxBudgetMs: external_exports.number().int().min(1e3).max(864e5).nullable().optional(),
|
|
27750
27890
|
forced: external_exports.enum(["durable", "in_process"]).optional()
|
|
27751
27891
|
});
|
|
27892
|
+
var turnDurabilityOverrideSchema = agentDurabilityConfigSchema.pick({ forced: true, watchLeaseMs: true }).extend({ watchLeaseMs: external_exports.number().int().min(1e4).max(18e5).optional() }).strict();
|
|
27752
27893
|
var DEFAULT_TURN_MAX_BUDGET_MS = 30 * 60 * 1e3;
|
|
27753
27894
|
var agentRuntimeConfigSchema = external_exports.object({
|
|
27754
27895
|
model: external_exports.string().optional(),
|
|
@@ -33362,6 +33503,147 @@ var endUserUsageResponseSchema = external_exports.object({
|
|
|
33362
33503
|
executions: external_exports.number().int().nonnegative()
|
|
33363
33504
|
}).merge(endUserUsageMoneySchema)
|
|
33364
33505
|
});
|
|
33506
|
+
var PRODUCTION_HEALTH_MAX_DAYS = 90;
|
|
33507
|
+
var PRODUCTION_HEALTH_DEFAULT_DAYS = 7;
|
|
33508
|
+
var INSIGHT_SEVERITIES = ["critical", "warning", "info"];
|
|
33509
|
+
var metricDeltaSchema = external_exports.object({
|
|
33510
|
+
value: external_exports.number().nullable(),
|
|
33511
|
+
previous: external_exports.number().nullable()
|
|
33512
|
+
});
|
|
33513
|
+
var executionCountsSchema = external_exports.object({
|
|
33514
|
+
/** Runs that started inside the current period. */
|
|
33515
|
+
current: external_exports.number().int(),
|
|
33516
|
+
/** Runs that started inside the preceding period of equal length. */
|
|
33517
|
+
previous: external_exports.number().int(),
|
|
33518
|
+
/** Current-period runs that finished successfully. */
|
|
33519
|
+
successes: external_exports.number().int(),
|
|
33520
|
+
/** Current-period runs that ended in an error or lost their stream. */
|
|
33521
|
+
failures: external_exports.number().int(),
|
|
33522
|
+
/** Current-period runs with no verdict: still running, paused mid-run, or cancelled. */
|
|
33523
|
+
unsettled: external_exports.number().int()
|
|
33524
|
+
});
|
|
33525
|
+
var productionHealthQuerySchema = external_exports.object({
|
|
33526
|
+
days: external_exports.coerce.number().int().min(1).max(PRODUCTION_HEALTH_MAX_DAYS).optional().default(PRODUCTION_HEALTH_DEFAULT_DAYS)
|
|
33527
|
+
});
|
|
33528
|
+
var healthInsightSchema = external_exports.object({
|
|
33529
|
+
id: external_exports.string(),
|
|
33530
|
+
severity: external_exports.enum(INSIGHT_SEVERITIES),
|
|
33531
|
+
title: external_exports.string(),
|
|
33532
|
+
detail: external_exports.string(),
|
|
33533
|
+
href: external_exports.string().optional()
|
|
33534
|
+
});
|
|
33535
|
+
var surfaceUsageSchema = external_exports.object({
|
|
33536
|
+
/** Surface the agent executions were attributed to; rows with no surface type are grouped as `unknown`. */
|
|
33537
|
+
surfaceType: external_exports.string(),
|
|
33538
|
+
/** Agent executions on this surface in the current period. Counts agent runs only, not flow runs. */
|
|
33539
|
+
executions: external_exports.number().int(),
|
|
33540
|
+
/** Share of those agent executions that completed. */
|
|
33541
|
+
successRate: external_exports.number().nullable()
|
|
33542
|
+
});
|
|
33543
|
+
var executionCostMetricSchema = metricDeltaSchema.extend({
|
|
33544
|
+
knownValue: external_exports.number(),
|
|
33545
|
+
knownPrevious: external_exports.number(),
|
|
33546
|
+
incompleteRuns: external_exports.number().int(),
|
|
33547
|
+
previousIncompleteRuns: external_exports.number().int()
|
|
33548
|
+
});
|
|
33549
|
+
var productionHealthResponseSchema = external_exports.object({
|
|
33550
|
+
period: external_exports.object({
|
|
33551
|
+
days: external_exports.number().int(),
|
|
33552
|
+
start: external_exports.string(),
|
|
33553
|
+
end: external_exports.string(),
|
|
33554
|
+
previousStart: external_exports.string()
|
|
33555
|
+
}),
|
|
33556
|
+
/**
|
|
33557
|
+
* Run totals across BOTH populations, read from the run ledgers: one row per
|
|
33558
|
+
* run, whatever it did. `agents` is broken out first because an agent turn
|
|
33559
|
+
* drives a flow internally and used to be counted on both lines at once.
|
|
33560
|
+
* Every field is agents plus flows plus historical runs of unknown population.
|
|
33561
|
+
*/
|
|
33562
|
+
// WHY(docs/why/apps/api/src/services.md#the-run-ledger-cannot-count-agent-runs): two tables, disjoint by construction
|
|
33563
|
+
executions: executionCountsSchema.extend({
|
|
33564
|
+
/** Agent runs, from `agent_executions` — the only table that holds an externally hosted agent's runs. */
|
|
33565
|
+
agents: executionCountsSchema,
|
|
33566
|
+
/** Flow runs, from `flow_executions` rows that no agent drove. */
|
|
33567
|
+
flows: executionCountsSchema,
|
|
33568
|
+
/** Historical runs whose agent/flow identity cannot safely be recovered. */
|
|
33569
|
+
unclassified: executionCountsSchema
|
|
33570
|
+
}),
|
|
33571
|
+
/** Daily UTC intervals anchored to period.start, counting the same root runs as executions. */
|
|
33572
|
+
activity: external_exports.array(
|
|
33573
|
+
external_exports.object({
|
|
33574
|
+
date: external_exports.string(),
|
|
33575
|
+
agents: external_exports.number().int(),
|
|
33576
|
+
flows: external_exports.number().int(),
|
|
33577
|
+
unclassified: external_exports.number().int()
|
|
33578
|
+
})
|
|
33579
|
+
).optional(),
|
|
33580
|
+
/**
|
|
33581
|
+
* Successful runs over SETTLED runs. Runs still open, paused, or cancelled
|
|
33582
|
+
* are outside both halves of this division. Null when nothing settled.
|
|
33583
|
+
*/
|
|
33584
|
+
successRate: metricDeltaSchema,
|
|
33585
|
+
/**
|
|
33586
|
+
* 95th percentile of a run's wall clock, end to end: context steps, tool
|
|
33587
|
+
* steps and queueing included. Measured over settled runs only. A run that
|
|
33588
|
+
* paused for an approval or a client tool and then resumed carries the wait
|
|
33589
|
+
* inside its wall clock. Null when no settled run recorded a duration.
|
|
33590
|
+
*/
|
|
33591
|
+
p95LatencyMs: metricDeltaSchema,
|
|
33592
|
+
/**
|
|
33593
|
+
* Estimated model cost of EVERY run in the period, divided by the successful
|
|
33594
|
+
* ones, so failed runs load the average. Cost includes all observed model invocations,
|
|
33595
|
+
* including retries, fallback, compaction, and descendants. Null when any
|
|
33596
|
+
* run has incomplete model accounting.
|
|
33597
|
+
*/
|
|
33598
|
+
// WHY(docs/why/apps/api/src/services.md#production-health-cost-is-model-cost-not-billed-spend): not billed spend, never reconciles
|
|
33599
|
+
modelCostPerSuccess: metricDeltaSchema,
|
|
33600
|
+
/** Estimated model cost across every run in the window, failed runs included. */
|
|
33601
|
+
totalModelCost: metricDeltaSchema,
|
|
33602
|
+
costs: external_exports.object({
|
|
33603
|
+
model: executionCostMetricSchema,
|
|
33604
|
+
tool: executionCostMetricSchema,
|
|
33605
|
+
total: executionCostMetricSchema
|
|
33606
|
+
}),
|
|
33607
|
+
/**
|
|
33608
|
+
* Share of runs where at least one attempt routed to a fallback model instead
|
|
33609
|
+
* of the configured one, over every run in the period. Null while any run has incomplete
|
|
33610
|
+
* model accounting.
|
|
33611
|
+
*/
|
|
33612
|
+
fallbackShare: metricDeltaSchema,
|
|
33613
|
+
/**
|
|
33614
|
+
* Eval pass rates. `value` and `previous` are the latest scored run and the previous scored run in
|
|
33615
|
+
* the same suite, compared run over run rather than period over
|
|
33616
|
+
* period, so either may predate the window.
|
|
33617
|
+
*/
|
|
33618
|
+
evals: metricDeltaSchema.extend({
|
|
33619
|
+
suiteId: external_exports.string().nullable(),
|
|
33620
|
+
suiteName: external_exports.string().nullable(),
|
|
33621
|
+
/** When the most recent eval run of any kind was created; null if none has ever run. */
|
|
33622
|
+
lastRunAt: external_exports.string().nullable(),
|
|
33623
|
+
/**
|
|
33624
|
+
* When the run behind `value` was created; null while nothing has ever
|
|
33625
|
+
* scored. Older than `lastRunAt` whenever the newest run is still
|
|
33626
|
+
* processing, failed, cancelled, or graded nothing, so this is the only
|
|
33627
|
+
* timestamp a pass rate may be shown beside.
|
|
33628
|
+
*/
|
|
33629
|
+
// INVARIANT: value belongs to this run, never to lastRunAt
|
|
33630
|
+
lastScoredRunAt: external_exports.string().nullable(),
|
|
33631
|
+
/**
|
|
33632
|
+
* Whether `lastRunAt` falls inside the current period. Any eval run counts,
|
|
33633
|
+
* including one still processing, cancelled, failed, or with no graders, so
|
|
33634
|
+
* this can be true while `value` is null, and false while `value` is set.
|
|
33635
|
+
*/
|
|
33636
|
+
// INVARIANT: recency is asked of every eval run; pass rates come only from runs that scored
|
|
33637
|
+
ranInPeriod: external_exports.boolean()
|
|
33638
|
+
}),
|
|
33639
|
+
agents: external_exports.object({
|
|
33640
|
+
/** Share of agent runs that stopped because they hit the turn ceiling. Counts are in `executions.agents`. */
|
|
33641
|
+
maxTurnsShare: metricDeltaSchema
|
|
33642
|
+
}),
|
|
33643
|
+
surfaces: external_exports.array(surfaceUsageSchema),
|
|
33644
|
+
insights: external_exports.array(healthInsightSchema),
|
|
33645
|
+
generatedAt: external_exports.string()
|
|
33646
|
+
});
|
|
33365
33647
|
var RUNTIME_ARTIFACT_MANIFEST_VERSION = "2026-06-08";
|
|
33366
33648
|
var runtimeArtifactResourceTypeSchema = external_exports.enum(["flow", "agent"]);
|
|
33367
33649
|
var runtimeArtifactEntrypointSchema = external_exports.enum(["flow", "agent"]);
|
|
@@ -35131,6 +35413,29 @@ function finalize2(r) {
|
|
|
35131
35413
|
r.valid = r.errors.length === 0;
|
|
35132
35414
|
return r;
|
|
35133
35415
|
}
|
|
35416
|
+
function getAgentSandboxCapabilityIssues(config3) {
|
|
35417
|
+
if (!config3 || typeof config3 !== "object" || !("enabled" in config3) || config3.enabled !== true)
|
|
35418
|
+
return [];
|
|
35419
|
+
const sandbox = config3;
|
|
35420
|
+
const capabilities = {
|
|
35421
|
+
provider: ["runtype-sandbox"],
|
|
35422
|
+
persistence: ["ephemeral", "conversation"],
|
|
35423
|
+
instanceType: [CONTAINER_SANDBOX_INSTANCE_TYPE]
|
|
35424
|
+
};
|
|
35425
|
+
const issues = [];
|
|
35426
|
+
for (const [field, supported] of Object.entries(capabilities)) {
|
|
35427
|
+
const requested = sandbox[field];
|
|
35428
|
+
if (typeof requested !== "string" || supported.includes(requested)) continue;
|
|
35429
|
+
issues.push({
|
|
35430
|
+
code: "unsupported_sandbox_capability",
|
|
35431
|
+
path: `config.sandbox.${field}`,
|
|
35432
|
+
requested,
|
|
35433
|
+
supported,
|
|
35434
|
+
message: `Agent Sandbox ${field} '${requested}' is unavailable; supported: ${supported.join(", ")}`
|
|
35435
|
+
});
|
|
35436
|
+
}
|
|
35437
|
+
return issues;
|
|
35438
|
+
}
|
|
35134
35439
|
function reservedToolNameIssue(name, path21) {
|
|
35135
35440
|
return createIssue(
|
|
35136
35441
|
"error",
|
|
@@ -35164,6 +35469,12 @@ function validateAgentDefinition(agent, capIndex) {
|
|
|
35164
35469
|
);
|
|
35165
35470
|
}
|
|
35166
35471
|
if (isNestedFpoAgent(agent)) {
|
|
35472
|
+
for (const issue2 of getAgentSandboxCapabilityIssues(agent.config?.sandbox)) {
|
|
35473
|
+
result.errors.push(createIssue("error", issue2.code, issue2.message, `${base}.${issue2.path}`, void 0, {
|
|
35474
|
+
requested: issue2.requested,
|
|
35475
|
+
supported: issue2.supported
|
|
35476
|
+
}));
|
|
35477
|
+
}
|
|
35167
35478
|
validateNestedAgent(agent, base, result);
|
|
35168
35479
|
} else {
|
|
35169
35480
|
validateFlatAgent(agent, base, result);
|
|
@@ -36768,6 +37079,14 @@ var AgentInputSchema = external_exports.object({
|
|
|
36768
37079
|
*/
|
|
36769
37080
|
agentType: external_exports.enum(["runtype", "claude_managed"]).optional(),
|
|
36770
37081
|
claudeManagedConfig: DispatchClaudeManagedConfigSchema.optional(),
|
|
37082
|
+
/**
|
|
37083
|
+
* Release alias selecting which stored version runs (ADR 0025). Mutually
|
|
37084
|
+
* exclusive with `versionId`. With a selector present and `agentId` absent,
|
|
37085
|
+
* `name` becomes a lookup key rather than an inline agent's name.
|
|
37086
|
+
*/
|
|
37087
|
+
alias: external_exports.string().min(1).max(AGENT_ALIAS_MAX_LENGTH).optional(),
|
|
37088
|
+
/** Immutable `agent_versions` id to run. Mutually exclusive with `alias`. */
|
|
37089
|
+
versionId: external_exports.string().min(1).optional(),
|
|
36771
37090
|
name: external_exports.string().min(1).optional(),
|
|
36772
37091
|
model: external_exports.string().min(1).optional(),
|
|
36773
37092
|
systemPrompt: external_exports.string().optional(),
|
|
@@ -36829,6 +37148,8 @@ var AgentInputSchema = external_exports.object({
|
|
|
36829
37148
|
memory: memoryConfigSchema.optional(),
|
|
36830
37149
|
// WHY(docs/why/packages/shared/src/api-schemas.md#sandbox-mirrors-the-saved-agent-execute-route-so): sandbox mirrors the saved-agent execute route so both hosted-agent entry points stay in lockstep.
|
|
36831
37150
|
sandbox: sandboxConfigSchema.optional(),
|
|
37151
|
+
// WHY(ADR-0020): durability mirrors the SAVED agent config, like sandbox above, so a round-tripped config still validates.
|
|
37152
|
+
durability: agentDurabilityConfigSchema.optional(),
|
|
36832
37153
|
tenancyStrategy: agentRuntimeConfigSchema.shape.tenancyStrategy
|
|
36833
37154
|
}).superRefine((val, ctx) => {
|
|
36834
37155
|
const unsupported = val.tenancyStrategy !== void 0 ? [["tenancyStrategy"], "tenancyStrategy is server-authored; save it on an agent"] : val.voice !== void 0 ? [["voice"], "voice is unsupported by agent dispatch"] : val.tools?.toolSearch !== void 0 ? [["tools", "toolSearch"], "toolSearch is unsupported by quick-agent dispatch"] : Object.keys(val.temporal ?? {}).some((key) => key !== "timezone") ? [["temporal"], "Only temporal.timezone is supported by agent dispatch"] : void 0;
|
|
@@ -36840,9 +37161,21 @@ var AgentInputSchema = external_exports.object({
|
|
|
36840
37161
|
message
|
|
36841
37162
|
});
|
|
36842
37163
|
}
|
|
37164
|
+
const selectorViolation = agentSelectorViolation(val);
|
|
37165
|
+
if (selectorViolation) {
|
|
37166
|
+
ctx.addIssue({
|
|
37167
|
+
code: "custom",
|
|
37168
|
+
path: selectorViolation.path.replace(/^agent\./, "").split("."),
|
|
37169
|
+
message: selectorViolation.message
|
|
37170
|
+
});
|
|
37171
|
+
return;
|
|
37172
|
+
}
|
|
36843
37173
|
if (val.agentId) {
|
|
36844
37174
|
return;
|
|
36845
37175
|
}
|
|
37176
|
+
if (hasAgentSelector(val)) {
|
|
37177
|
+
return;
|
|
37178
|
+
}
|
|
36846
37179
|
if (val.agentType !== "claude_managed") {
|
|
36847
37180
|
if (!val.name) {
|
|
36848
37181
|
ctx.addIssue({ code: "custom", path: ["name"], message: "name is required" });
|
|
@@ -37531,6 +37864,40 @@ var SANDBOX_TTL_OPTIONS = [
|
|
|
37531
37864
|
{ label: "2 hours", value: 2 * 60 * 60 },
|
|
37532
37865
|
{ label: "Unlimited", value: null }
|
|
37533
37866
|
];
|
|
37867
|
+
var sandboxDeployRetentionSchema = external_exports.enum(["10m", "1h", "24h", "unlimited"]);
|
|
37868
|
+
var sandboxDeploySleepPolicySchema = external_exports.discriminatedUnion("mode", [
|
|
37869
|
+
external_exports.object({ mode: external_exports.literal("never") }).strict(),
|
|
37870
|
+
external_exports.object({ mode: external_exports.literal("idle"), after: external_exports.enum(["5m", "15m", "30m", "1h"]) }).strict()
|
|
37871
|
+
]);
|
|
37872
|
+
var explicitSandboxDeployRequestSchema = external_exports.object({
|
|
37873
|
+
code: external_exports.string().min(1),
|
|
37874
|
+
packageJson: external_exports.string().optional(),
|
|
37875
|
+
language: external_exports.enum(["javascript", "typescript", "python"]).optional(),
|
|
37876
|
+
port: external_exports.number().int().min(1).max(65535).optional(),
|
|
37877
|
+
sandboxId: external_exports.string().min(1).optional(),
|
|
37878
|
+
startCommand: external_exports.string().optional(),
|
|
37879
|
+
files: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
37880
|
+
retention: sandboxDeployRetentionSchema.optional(),
|
|
37881
|
+
sleepPolicy: sandboxDeploySleepPolicySchema.optional(),
|
|
37882
|
+
managed: external_exports.literal(false).optional()
|
|
37883
|
+
}).passthrough();
|
|
37884
|
+
var daytonaSandboxDeployRequestSchema = explicitSandboxDeployRequestSchema.extend({
|
|
37885
|
+
labels: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
37886
|
+
autoStopInterval: external_exports.number().int().nonnegative().optional(),
|
|
37887
|
+
autoDeleteInterval: external_exports.number().int().min(-1).optional()
|
|
37888
|
+
}).refine((value) => value.sleepPolicy === void 0 || value.autoStopInterval === void 0, {
|
|
37889
|
+
path: ["sleepPolicy"],
|
|
37890
|
+
message: "Specify sleepPolicy or autoStopInterval, not both"
|
|
37891
|
+
});
|
|
37892
|
+
var sandboxDeployEffectivePolicySchema = external_exports.object({
|
|
37893
|
+
retention: sandboxDeployRetentionSchema,
|
|
37894
|
+
origin: external_exports.enum(["explicit", "legacy-default"]),
|
|
37895
|
+
expiresAt: external_exports.string().nullable(),
|
|
37896
|
+
metering: external_exports.enum(["active", "legacy-untracked"]),
|
|
37897
|
+
sleepPolicy: sandboxDeploySleepPolicySchema.optional(),
|
|
37898
|
+
autoStopInterval: external_exports.number().optional(),
|
|
37899
|
+
autoDeleteInterval: external_exports.number().optional()
|
|
37900
|
+
});
|
|
37534
37901
|
var SANDBOX_RETENTION_DEFAULT_SECONDS = 60 * 60;
|
|
37535
37902
|
var SANDBOX_BACKUP_UNLIMITED_TTL_SECONDS = 365 * 24 * 60 * 60;
|
|
37536
37903
|
var APP_MANIFEST_LIMITS = {
|
|
@@ -47932,13 +48299,44 @@ function getActiveDeploySandboxPreviewUrl() {
|
|
|
47932
48299
|
function setActiveDeploySandboxPreviewUrl(url2) {
|
|
47933
48300
|
activeDeploySandboxPreviewUrl = url2;
|
|
47934
48301
|
}
|
|
48302
|
+
var deployLifecycleParameters = {
|
|
48303
|
+
retention: {
|
|
48304
|
+
type: "string",
|
|
48305
|
+
enum: ["10m", "1h", "24h", "unlimited"],
|
|
48306
|
+
description: "Runtype destruction backstop. Omitted: Daytona 10m, Runtype Sandbox unlimited. Provider sleep/loss can end availability earlier."
|
|
48307
|
+
},
|
|
48308
|
+
sleepPolicy: {
|
|
48309
|
+
description: "Idle compute policy, independent of retention. Legacy Runtype Sandbox supports idle only.",
|
|
48310
|
+
oneOf: [
|
|
48311
|
+
{ type: "object", properties: { mode: { const: "never" } }, required: ["mode"], additionalProperties: false },
|
|
48312
|
+
{ type: "object", properties: { mode: { const: "idle" }, after: { enum: ["5m", "15m", "30m", "1h"] } }, required: ["mode", "after"], additionalProperties: false }
|
|
48313
|
+
]
|
|
48314
|
+
}
|
|
48315
|
+
};
|
|
48316
|
+
function deployLifecycleOptions(args) {
|
|
48317
|
+
return {
|
|
48318
|
+
...args.retention !== void 0 ? { retention: args.retention } : {},
|
|
48319
|
+
...args.sleepPolicy !== void 0 ? { sleepPolicy: args.sleepPolicy } : {}
|
|
48320
|
+
};
|
|
48321
|
+
}
|
|
47935
48322
|
function createDeploySandboxLocalTool(client, debugMode) {
|
|
47936
48323
|
return {
|
|
47937
|
-
description: "Deploy
|
|
48324
|
+
description: "Deploy a live Daytona server preview. Retention defaults to ten minutes; provider autostop is independent. The preview URL is not durable hosting.",
|
|
47938
48325
|
parametersSchema: {
|
|
47939
48326
|
type: "object",
|
|
47940
48327
|
properties: {
|
|
47941
48328
|
code: { type: "string", description: "Code to deploy (written to main file)" },
|
|
48329
|
+
...deployLifecycleParameters,
|
|
48330
|
+
autoStopInterval: {
|
|
48331
|
+
type: "integer",
|
|
48332
|
+
minimum: 0,
|
|
48333
|
+
description: "Daytona SDK inactivity in minutes; default 120, zero disables. Cannot be combined with sleepPolicy."
|
|
48334
|
+
},
|
|
48335
|
+
autoDeleteInterval: {
|
|
48336
|
+
type: "integer",
|
|
48337
|
+
minimum: -1,
|
|
48338
|
+
description: "Minutes continuously stopped before Daytona deletes: -1 disables, zero deletes on stop. May end availability before Runtype retention."
|
|
48339
|
+
},
|
|
47942
48340
|
packageJson: {
|
|
47943
48341
|
type: "object",
|
|
47944
48342
|
description: 'package.json content as a JSON object, e.g. { "dependencies": { "express": "^4.18.2" } }'
|
|
@@ -47971,6 +48369,9 @@ function createDeploySandboxLocalTool(client, debugMode) {
|
|
|
47971
48369
|
}
|
|
47972
48370
|
const request = {
|
|
47973
48371
|
code,
|
|
48372
|
+
...deployLifecycleOptions(args),
|
|
48373
|
+
...typeof args.autoStopInterval === "number" ? { autoStopInterval: args.autoStopInterval } : {},
|
|
48374
|
+
...typeof args.autoDeleteInterval === "number" ? { autoDeleteInterval: args.autoDeleteInterval } : {},
|
|
47974
48375
|
...args.packageJson && typeof args.packageJson === "object" ? { packageJson: JSON.stringify(args.packageJson) } : typeof args.packageJson === "string" ? { packageJson: args.packageJson } : {},
|
|
47975
48376
|
...typeof args.language === "string" ? { language: args.language } : {},
|
|
47976
48377
|
...typeof args.port === "number" ? { port: args.port } : {},
|
|
@@ -47999,6 +48400,7 @@ function createDeploySandboxLocalTool(client, debugMode) {
|
|
|
47999
48400
|
sandboxId: result.sandboxId,
|
|
48000
48401
|
previewUrl: result.previewUrl,
|
|
48001
48402
|
output: result.output,
|
|
48403
|
+
effectivePolicy: result.effectivePolicy,
|
|
48002
48404
|
...result.error ? { error: result.error } : {}
|
|
48003
48405
|
};
|
|
48004
48406
|
} catch (error61) {
|
|
@@ -48017,11 +48419,12 @@ function createDeploySandboxLocalTool(client, debugMode) {
|
|
|
48017
48419
|
var activeCfSandboxId;
|
|
48018
48420
|
function createDeployCfSandboxLocalTool(client, debugMode) {
|
|
48019
48421
|
return {
|
|
48020
|
-
description: "Deploy
|
|
48422
|
+
description: "Deploy a live Runtype Sandbox server preview. Omitted retention preserves the unlimited legacy backstop; explicit lifecycle policy requires rollout enablement. Provider sleep/loss can end availability earlier; the URL is not durable hosting.",
|
|
48021
48423
|
parametersSchema: {
|
|
48022
48424
|
type: "object",
|
|
48023
48425
|
properties: {
|
|
48024
48426
|
code: { type: "string", description: "Code to deploy (main entry point file)" },
|
|
48427
|
+
...deployLifecycleParameters,
|
|
48025
48428
|
packageJson: {
|
|
48026
48429
|
type: "object",
|
|
48027
48430
|
description: 'package.json content as a JSON object, e.g. { "dependencies": { "hono": "^4.0.0" } }'
|
|
@@ -48054,6 +48457,7 @@ function createDeployCfSandboxLocalTool(client, debugMode) {
|
|
|
48054
48457
|
}
|
|
48055
48458
|
const request = {
|
|
48056
48459
|
code,
|
|
48460
|
+
...deployLifecycleOptions(args),
|
|
48057
48461
|
...args.packageJson && typeof args.packageJson === "object" ? { packageJson: JSON.stringify(args.packageJson) } : typeof args.packageJson === "string" ? { packageJson: args.packageJson } : {},
|
|
48058
48462
|
...typeof args.language === "string" ? { language: args.language } : {},
|
|
48059
48463
|
...typeof args.port === "number" ? { port: args.port } : {},
|
|
@@ -48081,6 +48485,7 @@ function createDeployCfSandboxLocalTool(client, debugMode) {
|
|
|
48081
48485
|
sandboxId: result.sandboxId,
|
|
48082
48486
|
previewUrl: result.previewUrl,
|
|
48083
48487
|
output: result.output,
|
|
48488
|
+
effectivePolicy: result.effectivePolicy,
|
|
48084
48489
|
...result.error ? { error: result.error } : {}
|
|
48085
48490
|
};
|
|
48086
48491
|
} catch (error61) {
|
|
@@ -50887,19 +51292,19 @@ function upsertSessionSnapshots(snapshots, nextSnapshot) {
|
|
|
50887
51292
|
return result;
|
|
50888
51293
|
}
|
|
50889
51294
|
function buildLiveSessionSnapshot(liveState, rawEvents, sessionIndex, model) {
|
|
50890
|
-
const
|
|
50891
|
-
const hasLiveState = liveState.phase === "thinking" ||
|
|
51295
|
+
const isError2 = liveState.phase === "error";
|
|
51296
|
+
const hasLiveState = liveState.phase === "thinking" || isError2 || Boolean(liveState.content) || Boolean(liveState.reasoning) || liveState.tools.length > 0 || rawEvents.length > 0 || Boolean(liveState.contextCompaction?.active);
|
|
50892
51297
|
if (!hasLiveState) return void 0;
|
|
50893
51298
|
return {
|
|
50894
51299
|
sessionIndex,
|
|
50895
|
-
status:
|
|
51300
|
+
status: isError2 ? "error" : "live",
|
|
50896
51301
|
model,
|
|
50897
51302
|
cost: liveState.totalCost,
|
|
50898
51303
|
content: liveState.content,
|
|
50899
51304
|
reasoning: liveState.reasoning,
|
|
50900
51305
|
tools: liveState.tools,
|
|
50901
51306
|
rawEvents,
|
|
50902
|
-
...
|
|
51307
|
+
...isError2 && liveState.error ? { errorMessage: liveState.error.message } : {}
|
|
50903
51308
|
};
|
|
50904
51309
|
}
|
|
50905
51310
|
function copyToClipboard(text) {
|
|
@@ -65851,7 +66256,7 @@ async function configureWithFallbackWriter(agent, options) {
|
|
|
65851
66256
|
return {
|
|
65852
66257
|
configured: false,
|
|
65853
66258
|
changed: false,
|
|
65854
|
-
error: `Could not inspect ${MCP_AGENT_DEFINITIONS[agent].displayName}'s MCP configuration: ${
|
|
66259
|
+
error: `Could not inspect ${MCP_AGENT_DEFINITIONS[agent].displayName}'s MCP configuration: ${getErrorMessage2(error61)}`
|
|
65855
66260
|
};
|
|
65856
66261
|
}
|
|
65857
66262
|
if (inspected.server?.identity === RUNTYPE_MCP_URL) {
|
|
@@ -65881,7 +66286,7 @@ async function configureWithFallbackWriter(agent, options) {
|
|
|
65881
66286
|
changed: false,
|
|
65882
66287
|
configPath: inspected.configPath,
|
|
65883
66288
|
backupPath,
|
|
65884
|
-
error: `Could not update ${MCP_AGENT_DEFINITIONS[agent].displayName}'s MCP configuration: ${
|
|
66289
|
+
error: `Could not update ${MCP_AGENT_DEFINITIONS[agent].displayName}'s MCP configuration: ${getErrorMessage2(error61)}`
|
|
65885
66290
|
};
|
|
65886
66291
|
}
|
|
65887
66292
|
if (!installation.success) {
|
|
@@ -65904,7 +66309,7 @@ async function configureWithFallbackWriter(agent, options) {
|
|
|
65904
66309
|
changed: false,
|
|
65905
66310
|
configPath: installation.path,
|
|
65906
66311
|
backupPath,
|
|
65907
|
-
error: `The MCP config could not be verified, so the previous config was restored: ${
|
|
66312
|
+
error: `The MCP config could not be verified, so the previous config was restored: ${getErrorMessage2(error61)}`
|
|
65908
66313
|
};
|
|
65909
66314
|
}
|
|
65910
66315
|
if (verified.server?.identity !== RUNTYPE_MCP_URL) {
|
|
@@ -65924,7 +66329,7 @@ async function configureWithFallbackWriter(agent, options) {
|
|
|
65924
66329
|
backupPath
|
|
65925
66330
|
};
|
|
65926
66331
|
}
|
|
65927
|
-
function
|
|
66332
|
+
function getErrorMessage2(error61) {
|
|
65928
66333
|
return error61 instanceof Error ? error61.message : String(error61);
|
|
65929
66334
|
}
|
|
65930
66335
|
function restoreFallbackConfig(configPath, backupPath) {
|
|
@@ -65949,7 +66354,7 @@ async function configureMcpAgent(agent, options = {}) {
|
|
|
65949
66354
|
return {
|
|
65950
66355
|
configured: false,
|
|
65951
66356
|
changed: false,
|
|
65952
|
-
error: `Could not configure ${MCP_AGENT_DEFINITIONS[agent].displayName}: ${
|
|
66357
|
+
error: `Could not configure ${MCP_AGENT_DEFINITIONS[agent].displayName}: ${getErrorMessage2(error61)}`
|
|
65953
66358
|
};
|
|
65954
66359
|
}
|
|
65955
66360
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.37.0",
|
|
4
4
|
"description": "Command-line interface for Runtype AI platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@modelcontextprotocol/client": "2.0.0",
|
|
12
12
|
"@modelcontextprotocol/core": "2.0.0",
|
|
13
13
|
"@runtypelabs/ink-components": "0.3.7",
|
|
14
|
-
"@runtypelabs/sdk": "9.
|
|
14
|
+
"@runtypelabs/sdk": "9.10.0",
|
|
15
15
|
"@runtypelabs/terminal-animations": "0.2.4",
|
|
16
16
|
"add-mcp": "2.0.0",
|
|
17
17
|
"chalk": "^5.3.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@modelcontextprotocol/server": "2.0.0",
|
|
35
35
|
"@runtypelabs/persona": "4.22.0",
|
|
36
|
-
"@runtypelabs/shared": "3.
|
|
36
|
+
"@runtypelabs/shared": "3.45.0",
|
|
37
37
|
"@types/express": "^5.0.6",
|
|
38
38
|
"@types/micromatch": "^4.0.9",
|
|
39
39
|
"@types/node": "^25.3.3",
|