@runtypelabs/cli 2.35.3 → 2.35.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @runtypelabs/cli
2
2
 
3
+ ## 2.35.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 3285445: Remove the retired slow-mode execution throttle. Nothing produced `inSlowMode: true` since execution counts became uncapped, so the 10s delay branches, the `slow_mode_hourly` block type, the `X-Slow-Mode-*` headers, the `UsageTrackerDO.checkBuildTierExecution` / `resetSlowModeState` RPCs and their `hourly_rate_counts` table, and the `inSlowMode` field on 429 responses are gone. `/v1/usage-limits` keeps emitting `inSlowMode: false` as a deprecated constant because pinned Python/Ruby SDK models require the property. The plan-upgrade counter reset survives as `resetExecutionCountersForPlanChange` (daily + monthly). The Analytics Engine `doubles[3]` slot stays at 0 so historical column positions are unchanged.
8
+ - 0584e9a: Remove the development/production distinction on product surfaces (ADR 0023). Every surface accepts both test and live credentials and there is no promotion step; the `SURFACE_TYPE_PRERELEASE`, `SURFACE_HAS_LIVE_KEYS`, `SURFACE_ENVIRONMENT_MISMATCH` and `ENVIRONMENT_MISMATCH` errors are gone, OAuth-minted MCP surface keys are live keys, and a surface's integration tools resolve the organization-connection environment of the deployment they run in. For one release the wire keeps a compatibility shape: surface reads return `environment: 'production'` as a deprecated constant; create, update, ensure, FPO import, the MCP `create_surface` / `list_surfaces` inputs and the SDK `defineSurface` accept an `environment` key and ignore it; the `?environment=` list filter answers `400 SURFACE_ENVIRONMENT_RETIRED`. The `product_surfaces.environment` column is backfilled to `'production'`, never read, and dropped in a follow-up.
9
+ - Updated dependencies [31e02de]
10
+ - Updated dependencies [b08a7a2]
11
+ - Updated dependencies [3285445]
12
+ - Updated dependencies [0584e9a]
13
+ - @runtypelabs/sdk@9.4.0
14
+
15
+ ## 2.35.4
16
+
17
+ ### Patch Changes
18
+
19
+ - 8ab7d4a: Apply flow and agent version snapshots to the live execution rows atomically when publishing from any API surface.
20
+ - Updated dependencies [ccd07e2]
21
+ - Updated dependencies [8ab7d4a]
22
+ - @runtypelabs/sdk@9.3.2
23
+
3
24
  ## 2.35.3
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -762,12 +762,23 @@ runtype products init --from <url> --name "Custom Name"
762
762
 
763
763
  Manage flow versions.
764
764
 
765
- | Subcommand | Description |
766
- | ----------------------------------------------- | ---------------------------- |
767
- | `flow-versions list <flowId>` | List all versions for a flow |
768
- | `flow-versions get <flowId> <versionId>` | Get a specific version |
769
- | `flow-versions published <flowId>` | Get the published version |
770
- | `flow-versions publish <flowId> -v <versionId>` | Publish a version |
765
+ | Subcommand | Description |
766
+ | --------------------------------------------------------------------- | ---------------------------- |
767
+ | `flow-versions list <flowId>` | List all versions for a flow |
768
+ | `flow-versions get <flowId> <versionId>` | Get a specific version |
769
+ | `flow-versions published <flowId>` | Get the published version |
770
+ | `flow-versions publish <flowId> -v <versionId> [--overwrite-managed]` | Apply and publish a version |
771
+
772
+ ### `runtype agent-versions`
773
+
774
+ Manage Agent versions.
775
+
776
+ | Subcommand | Description |
777
+ | ----------------------------------------------------------------------- | --------------------------- |
778
+ | `agent-versions list <agentId>` | List all Agent versions |
779
+ | `agent-versions get <agentId> <versionId>` | Get a specific version |
780
+ | `agent-versions published <agentId>` | Get the published version |
781
+ | `agent-versions publish <agentId> -v <versionId> [--overwrite-managed]` | Apply and publish a version |
771
782
 
772
783
  ### `runtype billing`
773
784
 
@@ -987,9 +998,6 @@ pnpm test:watch
987
998
  ```bash
988
999
  # Simulate enterprise (unlimited)
989
1000
  export RUNTYPE_DEV_PLAN_OVERRIDE='{"scenarioId":"unlimited","plan":"enterprise","overrides":{}}'
990
-
991
- # Simulate slow mode
992
- export RUNTYPE_DEV_PLAN_OVERRIDE='{"scenarioId":"slow","plan":"trial","overrides":{"inSlowMode":true,"hourlyUsed":9,"hourlyLimit":10,"hourlyResetSeconds":600}}'
993
1001
  ```
994
1002
 
995
1003
  ## License
package/dist/index.js CHANGED
@@ -19324,7 +19324,7 @@ function date4(params) {
19324
19324
  return _coercedDate(ZodDate, params);
19325
19325
  }
19326
19326
 
19327
- // ../shared/dist/chunk-LQJZUSP5.mjs
19327
+ // ../shared/dist/chunk-HD3SKN3O.mjs
19328
19328
  var edgeAuthSnapshotSchema = external_exports.object({
19329
19329
  /**
19330
19330
  * Schema version. A plain positive int (not a literal) so a consumer pinned
@@ -19363,7 +19363,40 @@ var edgeAuthSnapshotSchema = external_exports.object({
19363
19363
  * Optional for additive-compat with records written before this field existed (absent = "no expiry recorded").
19364
19364
  * API keys populate it from their `expiresAt`; client tokens have no expiry (null).
19365
19365
  */
19366
- expiresAt: external_exports.number().int().positive().nullable().optional()
19366
+ expiresAt: external_exports.number().int().positive().nullable().optional(),
19367
+ /**
19368
+ * ADDITIVE-OPTIONAL (origin consumer, D-119 step 1): credential row id.
19369
+ * Present only on records refreshed by the origin's auth-time write-through;
19370
+ * mutation-time writes may omit it and the origin fast path then falls back.
19371
+ */
19372
+ keyId: external_exports.string().min(1).optional(),
19373
+ /** Credential display name; additive-optional, see {@link keyId}. */
19374
+ keyName: external_exports.string().nullable().optional(),
19375
+ /** Credential prefix (e.g. `rt_live_`); additive-optional, see {@link keyId}. */
19376
+ keyPrefix: external_exports.string().optional(),
19377
+ /** Account trust ceiling already applied to `scopes`; additive-optional. */
19378
+ accountTrustTier: external_exports.enum(["unverified_agent", "verified"]).optional(),
19379
+ /**
19380
+ * True only when `orgId` is the POST-workspace-authorization value the
19381
+ * origin's own DB path would have resolved (mutation-time writes stamp the
19382
+ * raw row org instead). The origin fast path requires this marker — serving
19383
+ * an unauthorized raw org would change auth semantics.
19384
+ */
19385
+ workspaceResolved: external_exports.boolean().optional(),
19386
+ /**
19387
+ * Epoch ms the producer resolved this identity. The origin fast path bounds
19388
+ * acceptance by this (never staler than the workspace-membership cache the
19389
+ * DB path itself consults), so a membership removal cannot outlive the
19390
+ * bound the DB path already accepts. Additive-optional.
19391
+ */
19392
+ resolvedAt: external_exports.number().int().positive().optional()
19393
+ });
19394
+ var resolvedEdgeAuthSnapshotSchema = edgeAuthSnapshotSchema.extend({
19395
+ keyId: external_exports.string().min(1),
19396
+ keyPrefix: external_exports.string().min(1),
19397
+ accountTrustTier: external_exports.enum(["unverified_agent", "verified"]),
19398
+ workspaceResolved: external_exports.literal(true),
19399
+ resolvedAt: external_exports.number().int().positive()
19367
19400
  });
19368
19401
 
19369
19402
  // ../shared/dist/chunk-P75VQJDW.mjs
@@ -21621,7 +21654,7 @@ var recordCollectionSchemaSchema = external_exports.strictObject({
21621
21654
  additionalProperties: external_exports.boolean().optional()
21622
21655
  }).superRefine((schema, ctx) => addSemanticIssues(schema, ctx));
21623
21656
 
21624
- // ../shared/dist/chunk-UHVYJQIV.mjs
21657
+ // ../shared/dist/chunk-4HCZLGCG.mjs
21625
21658
  var MCPServerCategory = {
21626
21659
  COMMUNICATION: "communication",
21627
21660
  PRODUCTIVITY: "productivity",
@@ -24627,7 +24660,7 @@ function unwrapVectorSourceTemplate(source) {
24627
24660
  return inner;
24628
24661
  }
24629
24662
 
24630
- // ../shared/dist/chunk-4NTZPO3M.mjs
24663
+ // ../shared/dist/chunk-6D5PSRBO.mjs
24631
24664
  var jsonPatchOperationSchema = external_exports.object({
24632
24665
  op: external_exports.enum(["add", "remove", "replace", "move", "copy", "test"]),
24633
24666
  /** JSON Pointer (RFC 6901) into the state document. `''` addresses the root. */
@@ -24732,6 +24765,10 @@ var unifiedExecutionErrorEventSchema = external_exports.object({
24732
24765
  kind: executionKindSchema,
24733
24766
  error: unifiedErrorPayloadSchema,
24734
24767
  completedAt: external_exports.string().optional(),
24768
+ // WHY(#7794): Loop-level stop reason on a FAILING agent terminal; loose like execution_complete's, absent on the error route.
24769
+ stopReason: external_exports.string().optional(),
24770
+ // WHY(#7794): Salvaged assistant text a FAILED agent run still produced, so a messaging surface can deliver it.
24771
+ finalOutput: external_exports.string().optional(),
24735
24772
  code: external_exports.string().optional(),
24736
24773
  upgradeUrl: external_exports.string().optional(),
24737
24774
  // WHY(docs/why/packages/shared/src/utils.md#blockreason-mirrors-platformkeyblockreason-in-mo): blockReason mirrors PlatformKeyBlockReason (in model-execution, which shared can't import) as a string, for
@@ -25151,7 +25188,7 @@ var UNIFIED_SSE_EVENT_TYPES = _unifiedTuple([
25151
25188
  "custom"
25152
25189
  ]);
25153
25190
 
25154
- // ../shared/dist/chunk-DO7XWE4H.mjs
25191
+ // ../shared/dist/chunk-5SCRYWGC.mjs
25155
25192
  var mediaAnnotationsSchema = external_exports.object({
25156
25193
  audience: external_exports.array(external_exports.enum(["user", "assistant"])).optional()
25157
25194
  });
@@ -26378,6 +26415,16 @@ function isReservedRuntypeToolName(name) {
26378
26415
  function reservedToolNameMessage(subject, name) {
26379
26416
  return `${subject} "${name}" collides with the reserved tool name "${RUNTYPE_SET_STATE_TOOL_NAME}" (the agent state write tool). Tool names are lowercased and non-alphanumeric characters become "_" before the model sees them, so every spelling that normalizes to it is reserved with it. "runtype_" is a reserved tool namespace. Rename the tool.`;
26380
26417
  }
26418
+ function isCatalogToolCallStepToolId(toolId) {
26419
+ return isBuiltInToolId(toolId) || isPlatformToolId(toolId);
26420
+ }
26421
+ function isKnownCatalogToolId(toolId) {
26422
+ const { baseId } = parseToolInstanceId(toolId);
26423
+ return isBuiltInIntegrationToolId(baseId) || getBuiltInToolById(baseId) !== void 0;
26424
+ }
26425
+ function unknownCatalogToolMessage(toolId) {
26426
+ return `Tool "${toolId}" is not a built-in or platform catalog tool. Check the id against the tool catalog (list_tools), or point toolId at a saved tool's "tool_..." id or its "tool:<name>" reference.`;
26427
+ }
26381
26428
  var apiKeyRequestStatusSchema = external_exports.enum([
26382
26429
  "pending",
26383
26430
  "approved",
@@ -26993,7 +27040,9 @@ var agentRuntimeConfigSchema = external_exports.object({
26993
27040
  maxTurns: external_exports.number().int().min(1).max(100).optional(),
26994
27041
  maxCost: external_exports.number().min(0).optional(),
26995
27042
  enableReflection: external_exports.boolean().optional(),
26996
- reflectionInterval: external_exports.number().int().min(1).max(50).optional()
27043
+ reflectionInterval: external_exports.number().int().min(1).max(50).optional(),
27044
+ // WHY(#7794): Defaults true; false keeps the pre-#7794 verdict for a length-truncated tool call.
27045
+ treatLengthCutoffAsFailure: external_exports.boolean().optional()
26997
27046
  }).optional(),
26998
27047
  voice: external_exports.object({
26999
27048
  enabled: external_exports.boolean().optional(),
@@ -27396,7 +27445,9 @@ var toolCallConfigSchema = external_exports.object({
27396
27445
  streamOutput: external_exports.boolean().optional(),
27397
27446
  maxRetries: external_exports.number().int().min(0).optional(),
27398
27447
  timeout: external_exports.number().int().positive().optional(),
27399
- onError: external_exports.enum(["fail", "continue", "retry"]).optional()
27448
+ onError: external_exports.enum(["fail", "continue", "retry"]).optional(),
27449
+ // WHY(#7748): Per-tool settings for a catalog toolId — the agent plane's `toolConfigs` entry, for one deterministic call.
27450
+ toolConfig: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
27400
27451
  });
27401
27452
  var storeVectorConfigSchema = external_exports.object({
27402
27453
  vectorsSource: external_exports.string().optional(),
@@ -29661,6 +29712,9 @@ function normalizeToolCallConfig(config3) {
29661
29712
  if (config3.onError) {
29662
29713
  validateEnum(config3.onError, ["fail", "continue", "retry"], "onError", "tool-call");
29663
29714
  }
29715
+ if (config3.toolConfig !== void 0 && config3.toolConfig !== null) {
29716
+ validateObject(config3.toolConfig, "toolConfig", "tool-call", true);
29717
+ }
29664
29718
  return {
29665
29719
  toolId: config3.toolId,
29666
29720
  parameters: config3.parameters,
@@ -29668,7 +29722,9 @@ function normalizeToolCallConfig(config3) {
29668
29722
  outputVariable: config3.outputVariable,
29669
29723
  maxRetries: config3.maxRetries,
29670
29724
  timeout: config3.timeout,
29671
- onError: config3.onError
29725
+ onError: config3.onError,
29726
+ // WHY(#7748): The closed config is the dispatch carrier; dropping this would silently default every configurable catalog tool.
29727
+ toolConfig: config3.toolConfig
29672
29728
  };
29673
29729
  }
29674
29730
  function normalizeSuccessCriteria(criteria) {
@@ -30942,48 +30998,30 @@ var CONDITIONAL_BRANCH_STEP_KEYS = [
30942
30998
  "false_steps",
30943
30999
  "otherwiseSteps"
30944
31000
  ];
30945
- function walkStepConditionExpressions(node2, basePath, stepRef, buckets, depth) {
31001
+ function walkStepTree(node2, basePath, depth, visitor) {
30946
31002
  if (!isObjectRecord(node2)) return;
30947
31003
  if (node2.enabled === false) return;
30948
- checkConditionExpression(node2.when, `${basePath}.when`, stepRef, buckets);
31004
+ if (visitor.visitStep(node2, basePath, depth) === false) return;
30949
31005
  if (!isObjectRecord(node2.config)) return;
30950
31006
  const config3 = node2.config;
30951
31007
  if (node2.type === "loop") {
30952
- checkConditionExpression(config3.until, `${basePath}.config.until`, stepRef, buckets);
30953
31008
  if (Array.isArray(config3.steps)) {
30954
31009
  config3.steps.forEach(
30955
- (nested, nestedIndex) => walkStepConditionExpressions(
30956
- nested,
30957
- `${basePath}.config.steps[${nestedIndex}]`,
30958
- stepRef,
30959
- buckets,
30960
- depth
30961
- )
31010
+ (nested, nestedIndex) => walkStepTree(nested, `${basePath}.config.steps[${nestedIndex}]`, depth, visitor)
30962
31011
  );
30963
31012
  }
30964
31013
  return;
30965
31014
  }
30966
31015
  if (node2.type !== "conditional") return;
30967
- checkConditionExpression(config3.condition, `${basePath}.config.condition`, stepRef, buckets);
30968
31016
  if (depth >= MAX_CONDITIONAL_NESTING_DEPTH) return;
30969
31017
  if (Array.isArray(config3.branches)) {
30970
31018
  config3.branches.forEach((branch, branchIndex) => {
30971
31019
  if (!isObjectRecord(branch)) return;
30972
- checkConditionExpression(
30973
- branch.condition,
30974
- `${basePath}.config.branches[${branchIndex}].condition`,
30975
- stepRef,
30976
- buckets
30977
- );
31020
+ const branchPath = `${basePath}.config.branches[${branchIndex}]`;
31021
+ visitor.visitBranch?.(branch, branchPath);
30978
31022
  if (Array.isArray(branch.steps)) {
30979
31023
  branch.steps.forEach(
30980
- (nested, nestedIndex) => walkStepConditionExpressions(
30981
- nested,
30982
- `${basePath}.config.branches[${branchIndex}].steps[${nestedIndex}]`,
30983
- stepRef,
30984
- buckets,
30985
- depth + 1
30986
- )
31024
+ (nested, nestedIndex) => walkStepTree(nested, `${branchPath}.steps[${nestedIndex}]`, depth + 1, visitor)
30987
31025
  );
30988
31026
  }
30989
31027
  });
@@ -30992,22 +31030,66 @@ function walkStepConditionExpressions(node2, basePath, stepRef, buckets, depth)
30992
31030
  const arr = config3[key];
30993
31031
  if (!Array.isArray(arr)) continue;
30994
31032
  arr.forEach(
30995
- (nested, nestedIndex) => walkStepConditionExpressions(
30996
- nested,
30997
- `${basePath}.config.${key}[${nestedIndex}]`,
30998
- stepRef,
30999
- buckets,
31000
- depth + 1
31001
- )
31033
+ (nested, nestedIndex) => walkStepTree(nested, `${basePath}.config.${key}[${nestedIndex}]`, depth + 1, visitor)
31002
31034
  );
31003
31035
  }
31004
31036
  }
31037
+ function conditionExpressionVisitor(stepRef, buckets) {
31038
+ return {
31039
+ visitStep: (node2, basePath) => {
31040
+ checkConditionExpression(node2.when, `${basePath}.when`, stepRef, buckets);
31041
+ if (!isObjectRecord(node2.config)) return;
31042
+ const config3 = node2.config;
31043
+ if (node2.type === "loop") {
31044
+ checkConditionExpression(config3.until, `${basePath}.config.until`, stepRef, buckets);
31045
+ } else if (node2.type === "conditional") {
31046
+ checkConditionExpression(config3.condition, `${basePath}.config.condition`, stepRef, buckets);
31047
+ }
31048
+ },
31049
+ visitBranch: (branch, branchPath) => {
31050
+ checkConditionExpression(branch.condition, `${branchPath}.condition`, stepRef, buckets);
31051
+ }
31052
+ };
31053
+ }
31005
31054
  function validateConditionExpressions(flowSteps, buckets, conditionalStepsExceedingDepth) {
31006
31055
  for (const [stepIndex, step] of flowSteps.entries()) {
31007
31056
  if (step.enabled === false) continue;
31008
31057
  if (conditionalStepsExceedingDepth.has(stepIndex)) continue;
31009
31058
  const stepRef = { index: stepIndex, name: step.name, type: step.type };
31010
- walkStepConditionExpressions(step, `flowSteps[${stepIndex}]`, stepRef, buckets, 1);
31059
+ walkStepTree(step, `flowSteps[${stepIndex}]`, 1, conditionExpressionVisitor(stepRef, buckets));
31060
+ }
31061
+ }
31062
+ var TOOL_CALL_STEP_UNKNOWN_CATALOG_TOOL_CODE = "TOOL_CALL_STEP_UNKNOWN_CATALOG_TOOL";
31063
+ function toolCallStepToolIdVisitor(stepRef, buckets) {
31064
+ return {
31065
+ visitStep: (node2, basePath, depth) => {
31066
+ if (node2.type !== "tool-call") return depth < MAX_CONDITIONAL_NESTING_DEPTH;
31067
+ const config3 = isObjectRecord(node2.config) ? node2.config : void 0;
31068
+ const toolId = config3?.toolId;
31069
+ if (typeof toolId === "string" && isCatalogToolCallStepToolId(toolId) && !isKnownCatalogToolId(toolId)) {
31070
+ addIssue(
31071
+ "error",
31072
+ {
31073
+ code: TOOL_CALL_STEP_UNKNOWN_CATALOG_TOOL_CODE,
31074
+ // WHY(.claude/rules/flow-validation.md): Single-sourced with both executors' dispatch-time throw so the sentence cannot drift.
31075
+ message: unknownCatalogToolMessage(toolId),
31076
+ path: `${basePath}.config.toolId`,
31077
+ step: stepRef,
31078
+ details: { toolId }
31079
+ },
31080
+ buckets
31081
+ );
31082
+ }
31083
+ return false;
31084
+ }
31085
+ };
31086
+ }
31087
+ function validateToolCallStepToolIds(flowSteps, buckets, conditionalStepsExceedingDepth) {
31088
+ for (const [stepIndex, step] of flowSteps.entries()) {
31089
+ if (step.enabled === false) continue;
31090
+ if (conditionalStepsExceedingDepth.has(stepIndex)) continue;
31091
+ const stepRef = { index: stepIndex, name: step.name, type: step.type };
31092
+ walkStepTree(step, `flowSteps[${stepIndex}]`, 1, toolCallStepToolIdVisitor(stepRef, buckets));
31011
31093
  }
31012
31094
  }
31013
31095
  var TOOL_STRATEGY_REQUIRED_MULTISTEP_CODE = "TOOL_STRATEGY_REQUIRED_MULTISTEP";
@@ -32238,6 +32320,7 @@ function collectFlowStructureIssues(flowData, deps, buckets) {
32238
32320
  validateUpsertRecordSourceShape(flowData.flowSteps, buckets);
32239
32321
  validateStoreVectorSource(flowData.flowSteps, buckets, deps.declaredFlowInputs);
32240
32322
  validateConditionExpressions(flowData.flowSteps, buckets, recursiveStepsRejected);
32323
+ validateToolCallStepToolIds(flowData.flowSteps, buckets, recursiveStepsRejected);
32241
32324
  validateToolCallStrategyMultiStep(flowData.flowSteps, buckets);
32242
32325
  validateToolCallStrategyNoneWithTools(flowData.flowSteps, buckets);
32243
32326
  validateOptionalParamsInToolTemplates(flowData.flowSteps, buckets);
@@ -32686,6 +32769,20 @@ var runtimeHostDependencySchema = external_exports.union([
32686
32769
  backgroundRunCoordinatorDependencySchema,
32687
32770
  unknownHostDependencySchema
32688
32771
  ]);
32772
+ var edgeArtifactMarkerSchema = external_exports.object({
32773
+ /** Same tolerance rule as the edge-auth snapshot: plain positive int. */
32774
+ schemaVersion: external_exports.number().int().positive(),
32775
+ resourceType: runtimeArtifactResourceTypeSchema,
32776
+ resourceId: external_exports.string().min(1),
32777
+ /** Hash of the materialized payload (the immutable artifact identity). */
32778
+ exportHash: external_exports.string().min(1),
32779
+ /** Epoch ms the marker was written. */
32780
+ updatedAt: external_exports.number().int().positive(),
32781
+ /** Published version behind the payload, when the export was version-pinned. */
32782
+ versionId: external_exports.string().min(1).nullable().optional(),
32783
+ /** Runtime package version the payload was materialized against. */
32784
+ runtimePackageVersion: external_exports.string().min(1).optional()
32785
+ });
32689
32786
  var SKILL_NAME_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;
32690
32787
  var EMIT_ARTIFACT_MARKDOWN_TOOL_ID = "emit_artifact_markdown";
32691
32788
  var EMIT_ARTIFACT_COMPONENT_TOOL_ID = "emit_artifact_component";
@@ -33333,7 +33430,9 @@ var agentLoopConfigSchema = external_exports.object({
33333
33430
  maxTurns: external_exports.number().int().min(1).max(100).optional(),
33334
33431
  maxCost: external_exports.number().nonnegative().optional(),
33335
33432
  enableReflection: external_exports.boolean().optional(),
33336
- reflectionInterval: external_exports.number().int().min(1).max(50).optional()
33433
+ reflectionInterval: external_exports.number().int().min(1).max(50).optional(),
33434
+ // WHY(#7794): Defaults true; false keeps the pre-#7794 verdict for a length-truncated tool call.
33435
+ treatLengthCutoffAsFailure: external_exports.boolean().optional()
33337
33436
  });
33338
33437
  var agentReasoningConfigSchema = external_exports.object({
33339
33438
  enabled: external_exports.boolean().optional(),
@@ -33649,6 +33748,7 @@ var surfaceSchema = external_exports.object({
33649
33748
  routes: external_exports.array(routeSchema).min(1, "Surface must have at least one route"),
33650
33749
  status: external_exports.enum(["draft", "active", "paused"]).optional(),
33651
33750
  environment: external_exports.enum(["production", "development"]).optional()
33751
+ // deprecated: ignored
33652
33752
  });
33653
33753
  var recordSchema = external_exports.object({
33654
33754
  id: external_exports.string().min(1),
@@ -34028,7 +34128,8 @@ function mergeResults(...results) {
34028
34128
  var FORWARDED_CORE_CODES = /* @__PURE__ */ new Set([
34029
34129
  ...NAMESPACE_VARIABLE_REFERENCE_CODES,
34030
34130
  RESERVED_TOOL_NAME_CODE,
34031
- STORE_VECTOR_MODEL_MISSING_CODE
34131
+ STORE_VECTOR_MODEL_MISSING_CODE,
34132
+ TOOL_CALL_STEP_UNKNOWN_CATALOG_TOOL_CODE
34032
34133
  ]);
34033
34134
  function validateFlowDefinition(flow, capIndex, context) {
34034
34135
  const result = emptyResult();
@@ -34072,7 +34173,7 @@ function validateFlowDefinition(flow, capIndex, context) {
34072
34173
  if (step.type === "tool-call" && context?.toolIds) {
34073
34174
  const config3 = step.config;
34074
34175
  const toolId = config3?.toolId;
34075
- if (toolId && !context.toolIds.has(toolId)) {
34176
+ if (toolId && !isCatalogToolCallStepToolId(toolId) && !context.toolIds.has(toolId)) {
34076
34177
  result.warnings.push(
34077
34178
  createIssue(
34078
34179
  "warning",
@@ -35488,7 +35589,9 @@ var AgentLoopConfigSchema = external_exports.object({
35488
35589
  maxTurns: external_exports.number().int().min(1).max(100).optional(),
35489
35590
  maxCost: external_exports.number().min(0).optional(),
35490
35591
  enableReflection: external_exports.boolean().optional(),
35491
- reflectionInterval: external_exports.number().int().min(1).max(50).optional()
35592
+ reflectionInterval: external_exports.number().int().min(1).max(50).optional(),
35593
+ // WHY(#7794): Defaults true; false keeps the pre-#7794 verdict for a length-truncated tool call.
35594
+ treatLengthCutoffAsFailure: external_exports.boolean().optional()
35492
35595
  });
35493
35596
  var VirtualAgentArtifactConfigSchema = external_exports.object({
35494
35597
  enabled: external_exports.literal(true),
@@ -41842,15 +41945,14 @@ import React10 from "react";
41842
41945
  import { render as render10 } from "ink";
41843
41946
  import { useState as useState11, useEffect as useEffect12 } from "react";
41844
41947
  var surfacesCommand = new Command11("surfaces").description("View product surfaces");
41845
- surfacesCommand.command("list").description("List surfaces across your products").option("--json", "Output as JSON").option("--limit <n>", "Maximum number of surfaces to return").option("--cursor <cursor>", "Pagination cursor for the next page").option("--type <type>", "Filter by surface type").option("--status <status>", "Filter by surface status").option("--environment <environment>", "Filter by surface environment").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(
41948
+ surfacesCommand.command("list").description("List surfaces across your products").option("--json", "Output as JSON").option("--limit <n>", "Maximum number of surfaces to return").option("--cursor <cursor>", "Pagination cursor for the next page").option("--type <type>", "Filter by surface type").option("--status <status>", "Filter by surface status").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(
41846
41949
  async (options) => {
41847
41950
  const apiKey = await ensureAuth();
41848
41951
  if (!apiKey) return;
41849
41952
  const client = createCliClient(apiKey);
41850
41953
  const query = buildListParams(options, {
41851
41954
  type: options.type,
41852
- status: options.status,
41853
- environment: options.environment
41955
+ status: options.status
41854
41956
  });
41855
41957
  if (!isTTY(options) || options.json) {
41856
41958
  try {
@@ -41871,9 +41973,6 @@ surfacesCommand.command("list").description("List surfaces across your products"
41871
41973
  if (surface.status) {
41872
41974
  console.log(` Status: ${surface.status}`);
41873
41975
  }
41874
- if (surface.environment) {
41875
- console.log(` Environment: ${surface.environment}`);
41876
- }
41877
41976
  if (surface.updatedAt) {
41878
41977
  console.log(` Updated: ${surface.updatedAt}`);
41879
41978
  }
@@ -41920,7 +42019,6 @@ surfacesCommand.command("list").description("List surfaces across your products"
41920
42019
  { label: "Type", value: surface.type, color: "gray" },
41921
42020
  { label: "Product", value: surface.productId, color: "gray" },
41922
42021
  { label: "Status", value: surface.status, color: "gray" },
41923
- { label: "Environment", value: surface.environment, color: "gray" },
41924
42022
  { label: "Updated", value: surface.updatedAt }
41925
42023
  ]
41926
42024
  });
@@ -41950,7 +42048,6 @@ surfacesCommand.command("get <id>").description("Get surface details including i
41950
42048
  { label: "Type", value: data.type },
41951
42049
  { label: "Product", value: data.productId },
41952
42050
  { label: "Status", value: data.status },
41953
- { label: "Environment", value: data.environment },
41954
42051
  { label: "Created", value: data.createdAt },
41955
42052
  { label: "Updated", value: data.updatedAt }
41956
42053
  ]);
@@ -42009,7 +42106,6 @@ Keys (${keys.length}):`));
42009
42106
  { label: "Type", value: data.type, color: "gray" },
42010
42107
  { label: "Product", value: data.productId, color: "gray" },
42011
42108
  { label: "Status", value: data.status, color: "gray" },
42012
- { label: "Environment", value: data.environment, color: "gray" },
42013
42109
  { label: "Created", value: data.createdAt },
42014
42110
  { label: "Updated", value: data.updatedAt },
42015
42111
  { label: `Items (${items.length})`, value: itemSummary },
@@ -49375,13 +49471,11 @@ var OverviewTranscriptPane = memo6(function OverviewTranscriptPane2({
49375
49471
 
49376
49472
  // src/ink/marathon/upgrade-modal-utils.ts
49377
49473
  var UPGRADE_LIMIT_TYPES = /* @__PURE__ */ new Set([
49378
- "slow_mode_hourly",
49379
49474
  "daily_limit",
49380
49475
  "monthly_limit",
49381
49476
  "spend_limit"
49382
49477
  ]);
49383
49478
  var UPGRADE_CODES = /* @__PURE__ */ new Set([
49384
- "SLOW_MODE_HOURLY_LIMIT_EXCEEDED",
49385
49479
  "DAILY_EXECUTION_LIMIT_EXCEEDED",
49386
49480
  "MONTHLY_EXECUTION_LIMIT_EXCEEDED",
49387
49481
  "SPEND_LIMIT_EXCEEDED"
@@ -59931,7 +60025,6 @@ async function runPersonaInit(options) {
59931
60025
  name: "Local Persona Playground",
59932
60026
  type: "chat",
59933
60027
  status: "active",
59934
- environment: "development",
59935
60028
  behavior: {
59936
60029
  type: "chat",
59937
60030
  welcomeMessage: "Try asking me to inspect or update this local page. I can use WebMCP tools registered by the HTML file.",
@@ -61861,16 +61954,21 @@ flowVersionsCommand.command("published <flowId>").description("Get the published
61861
61954
  const { waitUntilExit } = render26(React26.createElement(App));
61862
61955
  await waitUntilExit();
61863
61956
  });
61864
- flowVersionsCommand.command("publish <flowId>").description("Publish a version").requiredOption("-v, --version <versionId>", "Version ID to publish").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (flowId, options) => {
61957
+ flowVersionsCommand.command("publish <flowId>").description("Publish a version").requiredOption("-v, --version <versionId>", "Version ID to publish").option("--overwrite-managed", "Confirm replacing a definition managed by code").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (flowId, options) => {
61865
61958
  const apiKey = await ensureAuth();
61866
61959
  if (!apiKey) return;
61867
61960
  const client = createCliClient(apiKey);
61868
61961
  if (!isTTY(options)) {
61869
61962
  try {
61870
- await client.post(`/flow-versions/${flowId}/publish`, {
61871
- versionId: options.version
61872
- });
61963
+ const result = await client.post(
61964
+ `/flow-versions/${flowId}/publish`,
61965
+ {
61966
+ versionId: options.version,
61967
+ ...options.overwriteManaged ? { onConflict: "overwrite" } : {}
61968
+ }
61969
+ );
61873
61970
  console.log(chalk35.green("Version published"));
61971
+ for (const warning of result.warnings ?? []) console.warn(chalk35.yellow(`Warning: ${warning}`));
61874
61972
  } catch (error61) {
61875
61973
  const message = error61 instanceof Error ? error61.message : "Unknown error";
61876
61974
  console.error(chalk35.red("Failed to publish version"));
@@ -61883,12 +61981,20 @@ flowVersionsCommand.command("publish <flowId>").description("Publish a version")
61883
61981
  const [loading, setLoading] = useState42(true);
61884
61982
  const [success2, setSuccess] = useState42(null);
61885
61983
  const [error61, setError] = useState42(null);
61984
+ const [successMessage, setSuccessMessage] = useState42("Version published");
61886
61985
  useEffect36(() => {
61887
61986
  const run2 = async () => {
61888
61987
  try {
61889
- await client.post(`/flow-versions/${flowId}/publish`, {
61890
- versionId: options.version
61891
- });
61988
+ const result = await client.post(
61989
+ `/flow-versions/${flowId}/publish`,
61990
+ {
61991
+ versionId: options.version,
61992
+ ...options.overwriteManaged ? { onConflict: "overwrite" } : {}
61993
+ }
61994
+ );
61995
+ if (result.warnings?.length) {
61996
+ setSuccessMessage(`Version published. ${result.warnings.join(" ")}`);
61997
+ }
61892
61998
  setSuccess(true);
61893
61999
  setLoading(false);
61894
62000
  } catch (err) {
@@ -61903,7 +62009,7 @@ flowVersionsCommand.command("publish <flowId>").description("Publish a version")
61903
62009
  loading,
61904
62010
  loadingLabel: "Publishing version...",
61905
62011
  success: success2,
61906
- successMessage: "Version published",
62012
+ successMessage,
61907
62013
  error: error61
61908
62014
  });
61909
62015
  };
@@ -62133,17 +62239,22 @@ agentVersionsCommand.command("published <agentId>").description("Get the publish
62133
62239
  const { waitUntilExit } = render27(React27.createElement(App));
62134
62240
  await waitUntilExit();
62135
62241
  });
62136
- agentVersionsCommand.command("publish <agentId>").description("Publish a version").requiredOption("-v, --version <versionId>", "Version ID to publish").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(
62242
+ agentVersionsCommand.command("publish <agentId>").description("Publish a version").requiredOption("-v, --version <versionId>", "Version ID to publish").option("--overwrite-managed", "Confirm replacing a definition managed by code").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(
62137
62243
  async (agentId, options) => {
62138
62244
  const apiKey = await ensureAuth();
62139
62245
  if (!apiKey) return;
62140
62246
  const client = createCliClient(apiKey);
62141
62247
  if (!isTTY(options)) {
62142
62248
  try {
62143
- await client.post(`/agent-versions/${agentId}/publish`, {
62144
- versionId: options.version
62145
- });
62249
+ const result = await client.post(
62250
+ `/agent-versions/${agentId}/publish`,
62251
+ {
62252
+ versionId: options.version,
62253
+ ...options.overwriteManaged ? { onConflict: "overwrite" } : {}
62254
+ }
62255
+ );
62146
62256
  console.log(chalk36.green("Version published"));
62257
+ for (const warning of result.warnings ?? []) console.warn(chalk36.yellow(`Warning: ${warning}`));
62147
62258
  } catch (error61) {
62148
62259
  const message = error61 instanceof Error ? error61.message : "Unknown error";
62149
62260
  console.error(chalk36.red("Failed to publish version"));
@@ -62156,12 +62267,20 @@ agentVersionsCommand.command("publish <agentId>").description("Publish a version
62156
62267
  const [loading, setLoading] = useState43(true);
62157
62268
  const [success2, setSuccess] = useState43(null);
62158
62269
  const [error61, setError] = useState43(null);
62270
+ const [successMessage, setSuccessMessage] = useState43("Version published");
62159
62271
  useEffect37(() => {
62160
62272
  const run2 = async () => {
62161
62273
  try {
62162
- await client.post(`/agent-versions/${agentId}/publish`, {
62163
- versionId: options.version
62164
- });
62274
+ const result = await client.post(
62275
+ `/agent-versions/${agentId}/publish`,
62276
+ {
62277
+ versionId: options.version,
62278
+ ...options.overwriteManaged ? { onConflict: "overwrite" } : {}
62279
+ }
62280
+ );
62281
+ if (result.warnings?.length) {
62282
+ setSuccessMessage(`Version published. ${result.warnings.join(" ")}`);
62283
+ }
62165
62284
  setSuccess(true);
62166
62285
  setLoading(false);
62167
62286
  } catch (err) {
@@ -62176,7 +62295,7 @@ agentVersionsCommand.command("publish <agentId>").description("Publish a version
62176
62295
  loading,
62177
62296
  loadingLabel: "Publishing version...",
62178
62297
  success: success2,
62179
- successMessage: "Version published",
62298
+ successMessage,
62180
62299
  error: error61
62181
62300
  });
62182
62301
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/cli",
3
- "version": "2.35.3",
3
+ "version": "2.35.5",
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.3.1",
14
+ "@runtypelabs/sdk": "9.4.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.17.1",
36
- "@runtypelabs/shared": "3.35.1",
36
+ "@runtypelabs/shared": "3.37.0",
37
37
  "@types/express": "^5.0.6",
38
38
  "@types/micromatch": "^4.0.9",
39
39
  "@types/node": "^25.3.3",