@vecteur/cli 0.5.0 → 0.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vecteur/cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "vecteur": "bin/vecteur.js"
package/src/contract.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // GENERATED by scripts/gen-contract.mjs from owner TypeScript projections.
2
- export const OWNER_CONTRACT_IDENTITY = "api-sha256:0c052b44526d01d46a674d63ecd1bf8c0abf790e9b1bb9ba674c3e1f7acb9219;run-wire-sha256:30cae1b53b6142917e0f633d1f8edcbbe4d8eded0397cef91200dfddffd701d4";
2
+ export const OWNER_CONTRACT_IDENTITY = "api-sha256:0c052b44526d01d46a674d63ecd1bf8c0abf790e9b1bb9ba674c3e1f7acb9219;run-wire-sha256:b3d36080eb87ef8e01b24fa832a9c16ff06b0011bc5fc37fa520ea61303d2884";
3
3
  export const RECOVERY_ACTIONS = Object.freeze({"delete_project":{"label":"Delete a project","href":"/projects"},"upgrade_plan":{"label":"Upgrade your plan","href":"/dashboard/billing"},"wait_for_reset":{"label":"Wait until the UTC reset","href":null}});
4
- export const EVENT_KINDS = Object.freeze(["source","step_started","step_finished","tool_call","tool_result","synthesis","artifact","terminal","heartbeat","assistant_delta","knowledge_binding","engineering_projection","provider_attempt","clarification"]);
4
+ export const EVENT_KINDS = Object.freeze(["source","step_started","step_finished","tool_call","tool_result","synthesis","artifact","terminal","heartbeat","assistant_delta","knowledge_binding","engineering_projection","provider_attempt","clarification","input_rows"]);
5
5
  export const RETIRED_EVENT_KINDS = Object.freeze(["context_frame","cta","step_label"]);
6
6
  export const TERMINAL_FIELDS = Object.freeze(["answer","defect","deliverable_asked","evidence_dag","instruction_source","intent","missing_input_need","missing_inputs","provider_retry_offer","recovery","refusal_unfounded","state","steps","unmet_wanted"]);
7
7
  export const ARTIFACT_MEDIA_TYPES = Object.freeze({"binary":"application/octet-stream","code":"text/plain","csv":"text/csv","docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document","drive":"application/vnd.google-drive","html":"text/html","jpeg":"image/jpeg","json":"application/json","md":"text/markdown","pdf":"application/pdf","png":"image/png","svg":"image/svg+xml","xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});
package/src/format.js CHANGED
@@ -103,6 +103,27 @@ export function taskLines(events) {
103
103
  });
104
104
  }
105
105
 
106
+ /**
107
+ * SOURCES › ASSUMPTIONS, SPOKEN BY THIS DOOR TOO (RunWire v2 `input_rows`, CONTRACTS S1).
108
+ *
109
+ * One block per owner verb the turn's programs called, the LAST ledger event of the run
110
+ * standing: what the customer stated (`your brief`), what the program assumed, what the
111
+ * method's declared default was let stand, and how many arguments the program set from a
112
+ * variable (no value the record can read). Rows print through `inputLines`, the same shape
113
+ * as the legacy step inputs, so the origin words are the contract's.
114
+ */
115
+ export function assumptionLines(events) {
116
+ const ledger = events.filter((event) => event?.kind === "input_rows").at(-1);
117
+ const blocks = Array.isArray(ledger?.payload?.blocks) ? ledger.payload.blocks : [];
118
+ return blocks.flatMap((block) => {
119
+ if (!block || typeof block.verb !== "string") return [];
120
+ const set = Number.isInteger(block.program_set) && block.program_set > 0
121
+ ? ` · ${block.program_set} set by the program` : "";
122
+ const rows = Array.isArray(block.rows) ? block.rows : [];
123
+ return [` ${plainLine(block.verb)}${set}`, ...inputLines(rows)];
124
+ });
125
+ }
126
+
106
127
  function shellQuote(value) {
107
128
  return `'${String(value).replaceAll("'", `'"'"'`)}'`;
108
129
  }
@@ -194,10 +215,12 @@ export function humanRun(value, { projectId, cost } = {}) {
194
215
  throw new CliError("artifact_invalid", "Run carries malformed artifact metadata");
195
216
  }
196
217
  const tasks = taskLines(value.events);
218
+ const assumptions = assumptionLines(value.events);
197
219
  const lines = [];
198
220
  if (terminal.answer !== undefined) lines.push(terminal.answer, "");
199
221
  if (tasks.length) lines.push("Steps:", ...tasks, "");
200
222
  if (origins.length) lines.push("Inputs and origins:", ...origins, "");
223
+ if (assumptions.length) lines.push("Assumptions:", ...assumptions, "");
201
224
  if (artifacts.length) {
202
225
  lines.push("Artifacts:");
203
226
  for (const artifact of artifacts) {