@appchy/jarvis 0.1.120 → 0.1.121

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/bin.js CHANGED
@@ -4793,10 +4793,25 @@ function toVerification(said) {
4793
4793
  passed: parsed.passed === true,
4794
4794
  commit: String(parsed.commit ?? ""),
4795
4795
  message: String(parsed.message ?? ""),
4796
+ reason: REASONS.includes(parsed.reason) ? parsed.reason : "",
4797
+ run: toRun(parsed.run),
4796
4798
  notices: []
4797
4799
  };
4798
4800
  }
4799
- var STATES = ["idle", "started", "running", "finished"];
4801
+ var STATES = ["idle", "started", "running", "busy", "finished"];
4802
+ var REASONS = ["", "none", "other", "lost", "moved", "gone", "read"];
4803
+ function toRun(said) {
4804
+ if (!said || typeof said !== "object") return null;
4805
+ const run6 = said;
4806
+ return {
4807
+ task: String(run6.task ?? ""),
4808
+ gate: String(run6.gate ?? ""),
4809
+ done: Array.isArray(run6.done) ? run6.done.map(String) : [],
4810
+ gates: Array.isArray(run6.gates) ? run6.gates.map(String) : [],
4811
+ elapsedSeconds: Number(run6.elapsedSeconds) || 0,
4812
+ by: String(run6.by ?? "")
4813
+ };
4814
+ }
4800
4815
  function read(said) {
4801
4816
  for (const line of said.split("\n").reverse()) {
4802
4817
  if (!line.trim().startsWith("{")) continue;
@@ -4898,7 +4913,7 @@ async function observeWorkItem(ctx, req, options) {
4898
4913
  return getWorkItem(ctx, { id: req.id }, options);
4899
4914
  }
4900
4915
  async function verifyWorkItem(_ctx, req, options) {
4901
- const door = req.start ? "--async" : "--status";
4916
+ const door = req.start ? "--start" : "--status";
4902
4917
  return toVerification(await harnessSaid(["verify", "--task", req.id, door], options));
4903
4918
  }
4904
4919
  async function recordSession(ctx, req, options) {
@@ -10284,7 +10299,7 @@ import { createRequire as createRequire2 } from "module";
10284
10299
  var _require = createRequire2(import.meta.url);
10285
10300
  var VERSION2 = _require("../package.json").version ?? "0.0.0";
10286
10301
  var IS_DEV = String(_require("../package.json").name ?? "").endsWith("-dev");
10287
- var SHA = "9022153";
10302
+ var SHA = "36257e9";
10288
10303
  var BUILT = "2026-09-12";
10289
10304
  var BUILD = SHA ?? "source";
10290
10305
  var BUILD_LABEL = `${SHA ? `${VERSION2} (${SHA}${BUILT ? ` ${BUILT}` : ""})` : `${VERSION2} (source)`}${IS_DEV ? " \u2014 development build" : ""}`;
@@ -11912,7 +11927,7 @@ function updateTool(handlers) {
11912
11927
  function verifyTool(handlers) {
11913
11928
  return {
11914
11929
  name: "work_verify",
11915
- description: "Run this repo's own gates against an item and record the result on it. Completion refuses until they have passed at the current commit, so run this before work_complete rather than after being refused. It runs the whole configured set \u2014 there is no way to ask for one gate. Call once with start:true to set them going, then call WITHOUT it for progress and the result: asking never starts a run. They take minutes. One run per checkout; starting while another runs says whose it is.",
11930
+ description: "Run this repo's own gates against an item and record the result on it. Completion refuses until they have passed at the current commit, so run this before work_complete rather than after being refused. It runs the whole configured set \u2014 there is no way to ask for one gate. Call once with start:true to set them going, then call WITHOUT it for progress and the result: asking never starts a run. They take minutes. One run per checkout: 'busy' means the slot is held for somebody else's item, and nothing holds your place \u2014 ask again once it is free. When there is no result, `reason` says which kind of nothing it is.",
11916
11931
  metadata: { readOnly: false },
11917
11932
  input: {
11918
11933
  type: "object",
@@ -11928,10 +11943,31 @@ function verifyTool(handlers) {
11928
11943
  properties: {
11929
11944
  state: {
11930
11945
  type: "string",
11931
- enum: ["idle", "started", "running", "finished"],
11932
- description: "Only 'finished' carries a result; ask again until it does. 'idle' means nothing has run at this commit."
11946
+ enum: ["idle", "started", "running", "busy", "finished"],
11947
+ description: "Only 'finished' carries a result; ask again until it does. 'running' is YOUR run in flight and 'busy' is somebody else's holding the slot \u2014 on 'busy' every gate field below is empty, because you have no run. 'idle' means nothing usable has run for this item; `reason` says why."
11948
+ },
11949
+ reason: {
11950
+ type: "string",
11951
+ enum: ["", "none", "other", "lost", "moved", "gone", "read"],
11952
+ description: "Why there is no result: 'none' nothing ran \xB7 'other' the last run proved a different item \xB7 'lost' a run for this item stopped without recording \xB7 'moved' it passed and the code has changed since \xB7 'gone' its commit was rebased away \xB7 'read' that answer was already handed over. Empty when there is a result."
11953
+ },
11954
+ run: {
11955
+ type: ["object", "null"],
11956
+ description: "The run holding this CHECKOUT, which is not always yours \u2014 every other field here is about the item you asked about. Null when none is running.",
11957
+ properties: {
11958
+ task: { type: "string", description: "The item it is proving." },
11959
+ gate: { type: "string" },
11960
+ done: { type: "array", items: { type: "string" } },
11961
+ gates: { type: "array", items: { type: "string" } },
11962
+ elapsedSeconds: { type: "number" },
11963
+ by: {
11964
+ type: "string",
11965
+ description: "Who started it and whether you can reach them. Empty when nothing can say \u2014 never a guess about who did what."
11966
+ }
11967
+ },
11968
+ required: ["task", "gate", "done", "gates", "elapsedSeconds", "by"]
11933
11969
  },
11934
- gate: { type: "string", description: "The gate executing now." },
11970
+ gate: { type: "string", description: "The gate executing now, when it is yours." },
11935
11971
  elapsedSeconds: { type: "number" },
11936
11972
  passed: { type: "boolean", description: "Every gate ran and passed. False until finished." },
11937
11973
  commit: { type: "string" },
@@ -11951,7 +11987,7 @@ function verifyTool(handlers) {
11951
11987
  },
11952
11988
  notices: NOTICES
11953
11989
  },
11954
- required: ["state", "passed", "gates", "notices"]
11990
+ required: ["state", "reason", "passed", "gates", "notices"]
11955
11991
  },
11956
11992
  call: async (ctx, input) => {
11957
11993
  const response = await handlers.verify(ctx, input ?? {});