@rosthq/cli 0.7.50 → 0.7.51

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 CHANGED
@@ -43334,6 +43334,7 @@ var forgePlanArtifact = external_exports.object({
43334
43334
  }
43335
43335
  }
43336
43336
  });
43337
+ var forgePlanArtifactSchema = forgePlanArtifact;
43337
43338
  var forgeImplementationArtifact = external_exports.object({
43338
43339
  changes: forgeArtifactList,
43339
43340
  verification: forgeArtifactList,
@@ -53362,7 +53363,9 @@ async function executeClaimedUnit(fetchImpl, appUrl2, state, config2, io, runtim
53362
53363
  // narrower endpoint — T1.9 scope); its Zod schema strips unrecognized keys on a non-strict
53363
53364
  // parse either way, so sending them there is harmless, just unused.
53364
53365
  ...input.kind === "work_order" ? { step_ledger: ledger.entries() } : {},
53365
- ...input.kind === "work_order" && result.transcript ? { transcript: result.transcript } : {}
53366
+ ...input.kind === "work_order" && result.transcript ? { transcript: result.transcript } : {},
53367
+ // DER-1371: the planner's structured decomposition — only sent when the model produced one.
53368
+ ...result.planArtifact ? { plan_artifact: result.planArtifact } : {}
53366
53369
  }, state.runner_secret);
53367
53370
  if (reported.status !== 200) {
53368
53371
  if (reported.status >= 400 && reported.status < 500) {
@@ -54108,12 +54111,14 @@ function runModelProcess(input) {
54108
54111
  const rawOutput = (out || err || "completed").trim();
54109
54112
  const redacted = redactForLog(rawOutput);
54110
54113
  const evidence = input.collectEvidence && code === 0 ? extractRunnerEvidence(rawOutput) : [];
54114
+ const planArtifact = input.collectEvidence && code === 0 ? extractForgePlanArtifact(rawOutput) : void 0;
54111
54115
  finish({
54112
54116
  ok: code === 0,
54113
54117
  summary: extractRunnerSummary(redacted).slice(0, 12e3),
54114
54118
  transcript: scrubTranscriptSessionIds(redacted).slice(0, MAX_TRANSCRIPT_CHARS),
54115
54119
  ...evidence.length > 0 ? { evidence } : {},
54116
- ...input.expectSessionEnvelope ? extractClaudeSessionId(rawOutput) : {}
54120
+ ...input.expectSessionEnvelope ? extractClaudeSessionId(rawOutput) : {},
54121
+ ...planArtifact ? { planArtifact } : {}
54117
54122
  });
54118
54123
  });
54119
54124
  child.on("error", (error51) => {
@@ -54206,6 +54211,25 @@ function extractRunnerEvidence(output) {
54206
54211
  }
54207
54212
  return [];
54208
54213
  }
54214
+ function extractForgePlanArtifact(output) {
54215
+ const directRecord = parseJsonObject(output.trim());
54216
+ if (directRecord) {
54217
+ const parsed = forgePlanArtifactSchema.safeParse(directRecord);
54218
+ if (parsed.success) {
54219
+ return parsed.data;
54220
+ }
54221
+ for (const key of ["result", "summary", "content", "text", "message"]) {
54222
+ const nested = typeof directRecord[key] === "string" ? parseJsonObject(directRecord[key].trim()) : null;
54223
+ if (nested) {
54224
+ const nestedParsed = forgePlanArtifactSchema.safeParse(nested);
54225
+ if (nestedParsed.success) {
54226
+ return nestedParsed.data;
54227
+ }
54228
+ }
54229
+ }
54230
+ }
54231
+ return void 0;
54232
+ }
54209
54233
  function extractClaudeSessionId(output) {
54210
54234
  const trimmed = output.trim();
54211
54235
  if (!trimmed.startsWith("{")) {