@runtypelabs/cli 2.22.7 → 2.22.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +186 -23
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -15181,7 +15181,7 @@ var edgeContextPayloadSchema = external_exports.object({
15181
15181
  exp: external_exports.number().int().positive()
15182
15182
  });
15183
15183
 
15184
- // ../shared/dist/chunk-KR4LFVFE.mjs
15184
+ // ../shared/dist/chunk-3FPSMWBQ.mjs
15185
15185
  function getNestedValue(obj, path18) {
15186
15186
  let normalizedPath = path18;
15187
15187
  normalizedPath = normalizedPath.replace(/^\$\.?/, "");
@@ -15566,7 +15566,7 @@ function resolveFallback(parsed, context, tracking) {
15566
15566
  }
15567
15567
  var templateEngine = new SimpleTemplateEngine();
15568
15568
 
15569
- // ../shared/dist/chunk-KYIGNRXE.mjs
15569
+ // ../shared/dist/chunk-MMDRPM6Q.mjs
15570
15570
  var tokensSchema = external_exports.object({ input: external_exports.number(), output: external_exports.number() });
15571
15571
  var wireStopReasonSchema = external_exports.enum([
15572
15572
  "end_turn",
@@ -15712,7 +15712,12 @@ var unifiedTextStartEventSchema = external_exports.object({
15712
15712
  id: external_exports.string(),
15713
15713
  role: external_exports.enum(["user", "assistant", "system"]).optional(),
15714
15714
  turnId: external_exports.string().optional(),
15715
- stepId: external_exports.string().optional()
15715
+ stepId: external_exports.string().optional(),
15716
+ // When this text block is produced by a flow running as a tool (nested
15717
+ // execution), the parent model tool-call id — matches `tool_start.toolCallId`,
15718
+ // so consumers route the nested streamed text into the parent tool's row.
15719
+ // Absent for top-level (non-nested) text.
15720
+ parentToolCallId: external_exports.string().optional()
15716
15721
  });
15717
15722
  var unifiedTextDeltaEventSchema = external_exports.object({
15718
15723
  ...unifiedBase,
@@ -15731,7 +15736,12 @@ var unifiedReasoningStartEventSchema = external_exports.object({
15731
15736
  type: external_exports.literal("reasoning_start"),
15732
15737
  id: external_exports.string(),
15733
15738
  // `scope:"loop"` marks loop-level reflection (E3 fold); default renders as thinking.
15734
- scope: external_exports.enum(["turn", "loop"]).optional()
15739
+ scope: external_exports.enum(["turn", "loop"]).optional(),
15740
+ // When this reasoning block is produced by a flow running as a tool (nested
15741
+ // execution), the parent model tool-call id — matches `tool_start.toolCallId`,
15742
+ // so consumers route the nested thinking into the parent tool's row. Absent
15743
+ // for top-level (non-nested) reasoning. Mirrors `text_start.parentToolCallId`.
15744
+ parentToolCallId: external_exports.string().optional()
15735
15745
  });
15736
15746
  var unifiedReasoningDeltaEventSchema = external_exports.object({
15737
15747
  ...unifiedBase,
@@ -15855,6 +15865,10 @@ var unifiedToolCompleteEventSchema = external_exports.object({
15855
15865
  iteration: external_exports.number().optional(),
15856
15866
  stepId: external_exports.string().optional()
15857
15867
  });
15868
+ var unifiedSubagentAttributionSchema = external_exports.object({
15869
+ toolName: external_exports.string(),
15870
+ agentName: external_exports.string().optional()
15871
+ });
15858
15872
  var unifiedApprovalStartEventSchema = external_exports.object({
15859
15873
  ...unifiedBase,
15860
15874
  type: external_exports.literal("approval_start"),
@@ -15868,7 +15882,10 @@ var unifiedApprovalStartEventSchema = external_exports.object({
15868
15882
  parameters: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
15869
15883
  timeout: external_exports.number().optional(),
15870
15884
  startedAt: external_exports.string().optional(),
15871
- iteration: external_exports.number().optional()
15885
+ iteration: external_exports.number().optional(),
15886
+ // Present when the approval originated inside a subagent's execution.
15887
+ // Attribution only — never a control signal.
15888
+ subagent: unifiedSubagentAttributionSchema.optional()
15872
15889
  });
15873
15890
  var unifiedApprovalCompleteEventSchema = external_exports.object({
15874
15891
  ...unifiedBase,
@@ -16005,6 +16022,10 @@ var externalAgentContextSchema = external_exports.object({
16005
16022
  contextId: external_exports.string().optional(),
16006
16023
  taskId: external_exports.string().optional()
16007
16024
  });
16025
+ var subagentAttributionSchema = external_exports.object({
16026
+ toolName: external_exports.string(),
16027
+ agentName: external_exports.string().optional()
16028
+ });
16008
16029
  var tokensSchema2 = external_exports.object({ input: external_exports.number(), output: external_exports.number() });
16009
16030
  var wireStopReasonSchema2 = external_exports.enum([
16010
16031
  "end_turn",
@@ -16156,7 +16177,11 @@ var agentApprovalStartEventSchema = external_exports.object({
16156
16177
  parameters: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
16157
16178
  timeout: external_exports.number(),
16158
16179
  startedAt: external_exports.string(),
16159
- externalAgent: externalAgentContextSchema.optional()
16180
+ externalAgent: externalAgentContextSchema.optional(),
16181
+ // Present when the approval originated inside a subagent's execution (a
16182
+ // child agent's tool required approval). Attribution only — see
16183
+ // {@link subagentAttributionSchema}.
16184
+ subagent: subagentAttributionSchema.optional()
16160
16185
  });
16161
16186
  var agentApprovalCompleteEventSchema = external_exports.object({
16162
16187
  ...baseAgentEvent,
@@ -17058,7 +17083,13 @@ var setVariableConfigSchema = external_exports.object({
17058
17083
  // rejecting it. Required so nested set-variable steps validate when the
17059
17084
  // recursive conditional union lands (see
17060
17085
  // `docs/features/planning/2026-06-04-conditional-nested-step-strict-validation.md`).
17061
- value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.null(), external_exports.record(external_exports.string(), external_exports.unknown())]),
17086
+ value: external_exports.union([
17087
+ external_exports.string(),
17088
+ external_exports.number(),
17089
+ external_exports.boolean(),
17090
+ external_exports.null(),
17091
+ external_exports.record(external_exports.string(), external_exports.unknown())
17092
+ ]),
17062
17093
  valueTemplate: external_exports.string().optional()
17063
17094
  });
17064
17095
  var sendStreamConfigSchema = external_exports.object({
@@ -17694,10 +17725,63 @@ var promptConfigSchema = external_exports.object({
17694
17725
  mode: external_exports.string().optional()
17695
17726
  // UI mode (task, agent, etc.)
17696
17727
  });
17728
+ var conditionalBranchSchema = external_exports.object({
17729
+ /** Stable identifier (unique within the conditional). */
17730
+ id: external_exports.string().min(1, "Branch id is required"),
17731
+ /** Display name ("High priority", "POST", ...). */
17732
+ name: external_exports.string().optional(),
17733
+ /** JS expression; template `{{var}}` references resolve first. */
17734
+ condition: external_exports.string().min(1, "Branch condition is required"),
17735
+ steps: external_exports.array(external_exports.lazy(() => contextStepSchema))
17736
+ });
17697
17737
  var conditionalConfigSchema = external_exports.object({
17698
- condition: external_exports.string().min(1, "Condition is required"),
17699
- trueSteps: external_exports.array(external_exports.lazy(() => contextStepSchema)),
17700
- falseSteps: external_exports.array(external_exports.lazy(() => contextStepSchema)).optional()
17738
+ /** Legacy binary shape. Required unless `branches` is provided. */
17739
+ condition: external_exports.string().min(1, "Condition is required").optional(),
17740
+ trueSteps: external_exports.array(external_exports.lazy(() => contextStepSchema)).optional(),
17741
+ falseSteps: external_exports.array(external_exports.lazy(() => contextStepSchema)).optional(),
17742
+ /**
17743
+ * N-way named branches, evaluated in order with first-match-wins. When
17744
+ * present (non-empty), this takes precedence over the legacy
17745
+ * `condition`/`trueSteps`/`falseSteps` shape.
17746
+ */
17747
+ branches: external_exports.array(conditionalBranchSchema).optional(),
17748
+ /** Steps to run when no branch condition matches (the pinned "Otherwise"). */
17749
+ otherwiseSteps: external_exports.array(external_exports.lazy(() => contextStepSchema)).optional(),
17750
+ /**
17751
+ * Optional unified branch output. After the taken branch runs, this variable
17752
+ * is bound to the value of the branch's LAST enabled, explicitly-named,
17753
+ * value-producing step (walking back past disabled / unnamed / `when`-skipped
17754
+ * steps). Left absent if the taken branch produced no named output. Lets
17755
+ * divergent branches surface a single result under one name.
17756
+ * (This is an SSA φ-node — it merges the value out of whichever branch ran.)
17757
+ */
17758
+ outputVariable: external_exports.string().optional()
17759
+ }).superRefine((config3, ctx) => {
17760
+ const hasBranches = Array.isArray(config3.branches) && config3.branches.length > 0;
17761
+ if (!hasBranches) {
17762
+ if (typeof config3.condition !== "string" || config3.condition.length === 0) {
17763
+ ctx.addIssue({ code: "custom", path: ["condition"], message: "Condition is required" });
17764
+ }
17765
+ if (!Array.isArray(config3.trueSteps)) {
17766
+ ctx.addIssue({
17767
+ code: "custom",
17768
+ path: ["trueSteps"],
17769
+ message: "trueSteps is required unless branches is provided"
17770
+ });
17771
+ }
17772
+ return;
17773
+ }
17774
+ const seen = /* @__PURE__ */ new Set();
17775
+ config3.branches.forEach((branch, index) => {
17776
+ if (seen.has(branch.id)) {
17777
+ ctx.addIssue({
17778
+ code: "custom",
17779
+ path: ["branches", index, "id"],
17780
+ message: `Duplicate branch id "${branch.id}"`
17781
+ });
17782
+ }
17783
+ seen.add(branch.id);
17784
+ });
17701
17785
  });
17702
17786
  var saveMemoryConfigSchema = external_exports.object({
17703
17787
  profileTemplate: external_exports.string().min(1, "Profile template is required"),
@@ -18352,7 +18436,8 @@ function normalizeCrawlConfig(config3) {
18352
18436
  if (maxAgeRaw !== void 0 && maxAgeRaw !== null) validateNumber(maxAgeRaw, "maxAge", "crawl");
18353
18437
  if (modifiedSince !== void 0) validateString(modifiedSince, "modifiedSince", "crawl");
18354
18438
  if (config3.options !== void 0) validateObject(config3.options, "options", "crawl");
18355
- if (config3.authenticate !== void 0) validateObject(config3.authenticate, "authenticate", "crawl");
18439
+ if (config3.authenticate !== void 0)
18440
+ validateObject(config3.authenticate, "authenticate", "crawl");
18356
18441
  if (config3.cookies !== void 0) validateArray(config3.cookies, "cookies", "crawl");
18357
18442
  if (setExtraHTTPHeaders !== void 0) {
18358
18443
  validateObject(setExtraHTTPHeaders, "setExtraHTTPHeaders", "crawl");
@@ -18375,7 +18460,8 @@ function normalizeCrawlConfig(config3) {
18375
18460
  }
18376
18461
  if (userAgent !== void 0) validateString(userAgent, "userAgent", "crawl");
18377
18462
  if (jsonOptions !== void 0) validateObject(jsonOptions, "jsonOptions", "crawl");
18378
- if (config3.streamOutput !== void 0) validateBoolean(config3.streamOutput, "streamOutput", "crawl");
18463
+ if (config3.streamOutput !== void 0)
18464
+ validateBoolean(config3.streamOutput, "streamOutput", "crawl");
18379
18465
  if (pollIntervalMsRaw !== void 0 && pollIntervalMsRaw !== null) {
18380
18466
  validateNumber(pollIntervalMsRaw, "pollIntervalMs", "crawl");
18381
18467
  }
@@ -18735,11 +18821,19 @@ function normalizeTemplateConfig(config3) {
18735
18821
  validateArray(config3.sampleData, "sampleData", "template");
18736
18822
  for (const [i, scenario] of config3.sampleData.entries()) {
18737
18823
  if (typeof scenario !== "object" || scenario === null || Array.isArray(scenario)) {
18738
- throw new NormalizationError(`sampleData[${i}] must be an object`, "template", `sampleData[${i}]`);
18824
+ throw new NormalizationError(
18825
+ `sampleData[${i}] must be an object`,
18826
+ "template",
18827
+ `sampleData[${i}]`
18828
+ );
18739
18829
  }
18740
18830
  validateString(scenario.name, `sampleData[${i}].name`, "template", true);
18741
18831
  if (typeof scenario.data !== "object" || scenario.data === null || Array.isArray(scenario.data)) {
18742
- throw new NormalizationError(`sampleData[${i}].data must be an object`, "template", `sampleData[${i}].data`);
18832
+ throw new NormalizationError(
18833
+ `sampleData[${i}].data must be an object`,
18834
+ "template",
18835
+ `sampleData[${i}].data`
18836
+ );
18743
18837
  }
18744
18838
  }
18745
18839
  }
@@ -18764,7 +18858,9 @@ function normalizeTemplateConfig(config3) {
18764
18858
  }
18765
18859
  function normalizeConditionalConfig(config3) {
18766
18860
  validateConfig(config3, "conditional");
18767
- validateString(config3.condition, "condition", "conditional", true);
18861
+ const rawBranches = config3.branches;
18862
+ const hasBranches = Array.isArray(rawBranches) && rawBranches.length > 0;
18863
+ validateString(config3.condition, "condition", "conditional", !hasBranches);
18768
18864
  const trueSteps = config3.trueSteps ?? config3.true_steps;
18769
18865
  const falseSteps = config3.falseSteps ?? config3.false_steps;
18770
18866
  if (trueSteps) {
@@ -18786,10 +18882,37 @@ function normalizeConditionalConfig(config3) {
18786
18882
  return normalizeContextStep(stepWithDefaults);
18787
18883
  });
18788
18884
  };
18885
+ let branches;
18886
+ if (hasBranches) {
18887
+ validateArray(rawBranches, "branches", "conditional");
18888
+ branches = rawBranches.map((branch, index) => {
18889
+ if (!branch || typeof branch !== "object") {
18890
+ throw new NormalizationError(
18891
+ `branches[${index}] must be an object`,
18892
+ "conditional",
18893
+ "branches"
18894
+ );
18895
+ }
18896
+ validateString(branch.condition, `branches[${index}].condition`, "conditional", true);
18897
+ const branchSteps = Array.isArray(branch.steps) ? branch.steps : [];
18898
+ return {
18899
+ id: typeof branch.id === "string" && branch.id.length > 0 ? branch.id : `branch-${index}`,
18900
+ ...typeof branch.name === "string" && branch.name.length > 0 ? { name: branch.name } : {},
18901
+ condition: branch.condition,
18902
+ steps: normalizeNestedSteps(branchSteps, `conditional-branch-${index}`)
18903
+ };
18904
+ });
18905
+ }
18906
+ const otherwiseSteps = Array.isArray(config3.otherwiseSteps) ? normalizeNestedSteps(config3.otherwiseSteps, "conditional-otherwise") : void 0;
18789
18907
  return {
18790
- condition: config3.condition,
18908
+ ...typeof config3.condition === "string" && config3.condition.length > 0 ? { condition: config3.condition } : {},
18791
18909
  trueSteps: trueSteps ? normalizeNestedSteps(trueSteps, "conditional-true") : [],
18792
- falseSteps: falseSteps ? normalizeNestedSteps(falseSteps, "conditional-false") : void 0
18910
+ falseSteps: falseSteps ? normalizeNestedSteps(falseSteps, "conditional-false") : void 0,
18911
+ ...branches ? { branches } : {},
18912
+ ...otherwiseSteps ? { otherwiseSteps } : {},
18913
+ // Preserve the optional unified branch-output binding through normalization —
18914
+ // the manual rebuild above would otherwise drop it (not condition/branches).
18915
+ ...typeof config3.outputVariable === "string" && config3.outputVariable.length > 0 ? { outputVariable: config3.outputVariable } : {}
18793
18916
  };
18794
18917
  }
18795
18918
  function normalizeSetVariableConfig(config3) {
@@ -19905,8 +20028,18 @@ function conditionalNestingDepth(config3) {
19905
20028
  if (depth > MAX_CONDITIONAL_NESTING_DEPTH) break;
19906
20029
  if (!node || typeof node !== "object") continue;
19907
20030
  const cfg = node;
19908
- for (const key of ["trueSteps", "falseSteps", "true_steps", "false_steps"]) {
19909
- const branch = cfg[key];
20031
+ const branchArrays = [];
20032
+ for (const key of ["trueSteps", "falseSteps", "true_steps", "false_steps", "otherwiseSteps"]) {
20033
+ branchArrays.push(cfg[key]);
20034
+ }
20035
+ if (Array.isArray(cfg.branches)) {
20036
+ for (const branch of cfg.branches) {
20037
+ if (branch && typeof branch === "object") {
20038
+ branchArrays.push(branch.steps);
20039
+ }
20040
+ }
20041
+ }
20042
+ for (const branch of branchArrays) {
19910
20043
  if (!Array.isArray(branch)) continue;
19911
20044
  for (const s of branch) {
19912
20045
  if (s && typeof s === "object" && s.type === "conditional") {
@@ -20955,7 +21088,7 @@ const helpers = (function createHelpers() {
20955
21088
 
20956
21089
  extractURLs: (text) => {
20957
21090
  if (typeof text !== 'string') return []
20958
- const urlRegex = /https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)/g
21091
+ const urlRegex = /https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&/=]*)/g
20959
21092
  const matches = text.match(urlRegex)
20960
21093
  return matches ? [...new Set(matches)] : []
20961
21094
  },
@@ -21142,6 +21275,13 @@ const helpers = (function createHelpers() {
21142
21275
  return str
21143
21276
  }
21144
21277
  },
21278
+
21279
+ coalesce: (...values) => {
21280
+ for (const value of values) {
21281
+ if (value !== null && value !== undefined) return value
21282
+ }
21283
+ return null
21284
+ },
21145
21285
  }
21146
21286
  })()
21147
21287
  `.trim();
@@ -41536,10 +41676,10 @@ var FLOW_STEP_TYPE_METADATA = {
41536
41676
  configHints: "template (Liquid body), outputFormat, outputVariable, optional inputs map, optional partials, optional pdfOptions, optional asArtifact, optional streamOutput, optional sampleData"
41537
41677
  },
41538
41678
  conditional: {
41539
- description: "Branch the flow based on a JavaScript expression. Routes to trueSteps or falseSteps.",
41679
+ description: "Branch the flow on JavaScript expressions. Either the legacy binary shape (condition \u2192 trueSteps / falseSteps) or N-way named branches evaluated first-match-wins with an otherwise fallback. Set outputVariable to merge the taken branch into one named result.",
41540
41680
  category: "control-flow",
41541
41681
  isPrompt: false,
41542
- configHints: "condition (JS expression), trueSteps, falseSteps"
41682
+ configHints: "either { condition, trueSteps, falseSteps } or { branches: [{ id, name, condition, steps }], otherwiseSteps }, optional outputVariable"
41543
41683
  },
41544
41684
  "fetch-url": {
41545
41685
  description: "Make an HTTP request and capture the response.",
@@ -41870,6 +42010,7 @@ var SURFACE_TYPE_METADATA = {
41870
42010
  messagesMutable: false,
41871
42011
  deliveryModel: "real_time",
41872
42012
  mediaSupport: "images",
42013
+ textMediaDelivery: "inline_html",
41873
42014
  interactiveUI: "generative",
41874
42015
  inboundMediaSupport: true,
41875
42016
  consumerType: "human",
@@ -41891,6 +42032,7 @@ var SURFACE_TYPE_METADATA = {
41891
42032
  messagesMutable: false,
41892
42033
  deliveryModel: "sync",
41893
42034
  mediaSupport: "none",
42035
+ textMediaDelivery: "none",
41894
42036
  interactiveUI: "none",
41895
42037
  inboundMediaSupport: true,
41896
42038
  consumerType: "machine",
@@ -41912,6 +42054,7 @@ var SURFACE_TYPE_METADATA = {
41912
42054
  messagesMutable: false,
41913
42055
  deliveryModel: "sync",
41914
42056
  mediaSupport: "none",
42057
+ textMediaDelivery: "none",
41915
42058
  interactiveUI: "none",
41916
42059
  inboundMediaSupport: false,
41917
42060
  consumerType: "agent",
@@ -41932,7 +42075,10 @@ var SURFACE_TYPE_METADATA = {
41932
42075
  streaming: "none",
41933
42076
  messagesMutable: false,
41934
42077
  deliveryModel: "async",
41935
- mediaSupport: "rich",
42078
+ // Email delivers no native attachments — the adapter ignores
42079
+ // OutboundMessage.media; images only render via inline HTML <img>.
42080
+ mediaSupport: "images",
42081
+ textMediaDelivery: "inline_html",
41936
42082
  interactiveUI: "none",
41937
42083
  inboundMediaSupport: true,
41938
42084
  consumerType: "human",
@@ -41959,6 +42105,7 @@ var SURFACE_TYPE_METADATA = {
41959
42105
  messagesMutable: false,
41960
42106
  deliveryModel: "sync",
41961
42107
  mediaSupport: "none",
42108
+ textMediaDelivery: "none",
41962
42109
  interactiveUI: "none",
41963
42110
  inboundMediaSupport: false,
41964
42111
  consumerType: "machine",
@@ -41981,6 +42128,7 @@ var SURFACE_TYPE_METADATA = {
41981
42128
  messagesMutable: false,
41982
42129
  deliveryModel: "sync",
41983
42130
  mediaSupport: "none",
42131
+ textMediaDelivery: "none",
41984
42132
  interactiveUI: "none",
41985
42133
  inboundMediaSupport: false,
41986
42134
  consumerType: "agent",
@@ -42002,6 +42150,7 @@ var SURFACE_TYPE_METADATA = {
42002
42150
  messagesMutable: true,
42003
42151
  deliveryModel: "real_time",
42004
42152
  mediaSupport: "rich",
42153
+ textMediaDelivery: "link",
42005
42154
  interactiveUI: "forms",
42006
42155
  inboundMediaSupport: true,
42007
42156
  consumerType: "human",
@@ -42031,6 +42180,7 @@ var SURFACE_TYPE_METADATA = {
42031
42180
  messagesMutable: false,
42032
42181
  deliveryModel: "async",
42033
42182
  mediaSupport: "none",
42183
+ textMediaDelivery: "none",
42034
42184
  interactiveUI: "none",
42035
42185
  inboundMediaSupport: false,
42036
42186
  consumerType: "machine",
@@ -42052,6 +42202,7 @@ var SURFACE_TYPE_METADATA = {
42052
42202
  messagesMutable: false,
42053
42203
  deliveryModel: "async",
42054
42204
  mediaSupport: "none",
42205
+ textMediaDelivery: "none",
42055
42206
  interactiveUI: "none",
42056
42207
  inboundMediaSupport: false,
42057
42208
  consumerType: "human",
@@ -42072,6 +42223,7 @@ var SURFACE_TYPE_METADATA = {
42072
42223
  messagesMutable: false,
42073
42224
  deliveryModel: "async",
42074
42225
  mediaSupport: "images",
42226
+ textMediaDelivery: "link",
42075
42227
  interactiveUI: "none",
42076
42228
  inboundMediaSupport: true,
42077
42229
  consumerType: "human",
@@ -42105,6 +42257,7 @@ var SURFACE_TYPE_METADATA = {
42105
42257
  messagesMutable: true,
42106
42258
  deliveryModel: "real_time",
42107
42259
  mediaSupport: "rich",
42260
+ textMediaDelivery: "link",
42108
42261
  interactiveUI: "buttons",
42109
42262
  inboundMediaSupport: true,
42110
42263
  consumerType: "human",
@@ -42125,6 +42278,7 @@ var SURFACE_TYPE_METADATA = {
42125
42278
  messagesMutable: false,
42126
42279
  deliveryModel: "async",
42127
42280
  mediaSupport: "rich",
42281
+ textMediaDelivery: "link",
42128
42282
  interactiveUI: "buttons",
42129
42283
  inboundMediaSupport: true,
42130
42284
  consumerType: "human",
@@ -42145,6 +42299,7 @@ var SURFACE_TYPE_METADATA = {
42145
42299
  messagesMutable: true,
42146
42300
  deliveryModel: "real_time",
42147
42301
  mediaSupport: "rich",
42302
+ textMediaDelivery: "native",
42148
42303
  interactiveUI: "buttons",
42149
42304
  inboundMediaSupport: true,
42150
42305
  consumerType: "human",
@@ -42165,6 +42320,7 @@ var SURFACE_TYPE_METADATA = {
42165
42320
  messagesMutable: false,
42166
42321
  deliveryModel: "real_time",
42167
42322
  mediaSupport: "images",
42323
+ textMediaDelivery: "link",
42168
42324
  interactiveUI: "none",
42169
42325
  inboundMediaSupport: false,
42170
42326
  consumerType: "human",
@@ -42185,6 +42341,7 @@ var SURFACE_TYPE_METADATA = {
42185
42341
  messagesMutable: false,
42186
42342
  deliveryModel: "sync",
42187
42343
  mediaSupport: "none",
42344
+ textMediaDelivery: "none",
42188
42345
  interactiveUI: "none",
42189
42346
  inboundMediaSupport: false,
42190
42347
  consumerType: "agent",
@@ -42215,6 +42372,7 @@ var SURFACE_TYPE_METADATA = {
42215
42372
  messagesMutable: false,
42216
42373
  deliveryModel: "real_time",
42217
42374
  mediaSupport: "images",
42375
+ textMediaDelivery: "inline_html",
42218
42376
  interactiveUI: "generative",
42219
42377
  inboundMediaSupport: true,
42220
42378
  consumerType: "human",
@@ -42228,6 +42386,11 @@ var SURFACE_TYPE_METADATA = {
42228
42386
  behaviorTypeRef: "runtype://types/surface-configs"
42229
42387
  }
42230
42388
  };
42389
+ var EMAIL_HTML_CAPABILITY_HINT = [
42390
+ "## Channel capabilities",
42391
+ '- Formatting: author the reply as an HTML email body. Write well-formed HTML and put all styling in inline `style="..."` attributes (no `<style>` blocks, no external CSS). Use semantic tags freely: `<p>`, `<h1>`-`<h3>`, `<ul>`/`<ol>`/`<li>`, `<table>`, `<a>`, `<strong>`/`<em>`, `<blockquote>`, `<img>`. Do NOT emit `<script>`, `<iframe>`, `<head>`, `<body>`, or `<html>` wrappers: Runtype wraps your body in the email document and strips any active or unsafe content before sending.',
42392
+ '- Images: embed an image with `<img src="https://..." alt="...">` and it renders inline in the email. (Some clients ask the recipient to load remote images.)'
42393
+ ].join("\n");
42231
42394
  var SURFACE_TYPE_GUIDE = (() => {
42232
42395
  const lines = Object.entries(SURFACE_TYPE_METADATA).map(([type, info]) => {
42233
42396
  return `- **${type}**: ${info.description}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/cli",
3
- "version": "2.22.7",
3
+ "version": "2.22.9",
4
4
  "description": "Command-line interface for Runtype AI platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "rosie-skills": "0.8.1",
25
25
  "yaml": "^2.9.0",
26
26
  "@runtypelabs/ink-components": "0.3.2",
27
- "@runtypelabs/sdk": "5.1.0",
28
- "@runtypelabs/terminal-animations": "0.2.1"
27
+ "@runtypelabs/terminal-animations": "0.2.1",
28
+ "@runtypelabs/sdk": "5.2.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@runtypelabs/persona": "3.37.0",
@@ -39,7 +39,7 @@
39
39
  "tsx": "^4.7.1",
40
40
  "typescript": "^5.3.3",
41
41
  "vitest": "^4.1.0",
42
- "@runtypelabs/shared": "1.37.0"
42
+ "@runtypelabs/shared": "1.39.0"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=22.0.0"