@appchy/jarvis 0.1.128 → 0.1.130

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
@@ -4645,10 +4645,13 @@ function findPeers() {
4645
4645
  }
4646
4646
  return live3;
4647
4647
  }
4648
+ var SESSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
4648
4649
  function toReach(holder, peers) {
4649
4650
  const away = Boolean(holder.envId) && Boolean(machine()) && holder.envId !== machine();
4650
4651
  const live3 = away ? null : peers;
4651
- if (live3 === null || !holder.session) return { live: "unknown", addresses: [], processes: 0 };
4652
+ if (live3 === null || !SESSION_ID.test(holder.session)) {
4653
+ return { live: "unknown", addresses: [], processes: 0 };
4654
+ }
4652
4655
  const running = live3.get(holder.session);
4653
4656
  if (!running || running.length === 0) return { live: "ended", addresses: [], processes: 0 };
4654
4657
  return {
@@ -4811,8 +4814,9 @@ function toWorkItem(req) {
4811
4814
  if (!name) return null;
4812
4815
  const backlog = parts[1] === "backlog";
4813
4816
  const filed = parts[1] === "complete" || parts[1] === "archive";
4817
+ const archived = parts[1] === "archive" && parts.length === 4;
4814
4818
  const bucket = backlog ? "queue" : parts.at(-3);
4815
- const status2 = !backlog && BUCKETS.includes(bucket) ? bucket : "queue";
4819
+ const status2 = archived ? "archived" : !backlog && BUCKETS.includes(bucket) ? bucket : "queue";
4816
4820
  const text = req.text ?? "";
4817
4821
  const front = parseFrontmatter(text) ?? {};
4818
4822
  return {
@@ -4825,13 +4829,19 @@ function toWorkItem(req) {
4825
4829
  code: asList(front.code),
4826
4830
  covers: asList(front.covers),
4827
4831
  dependsOn: asList(front.depends_on),
4828
- epic: backlog ? parts[2] ?? "" : parts.at(-4) ?? "",
4829
- version: backlog ? "backlog" : filed ? parts[2] ?? "" : parts[1] ?? "",
4832
+ // An archived item belongs to neither: it left the cut when it was archived, and
4833
+ // saying which one it USED to be in is the record's job, not the path's. The
4834
+ // reason and the origin live in its own `archived:` frontmatter.
4835
+ epic: archived ? "" : backlog ? parts[2] ?? "" : parts.at(-4) ?? "",
4836
+ version: archived ? "" : backlog ? "backlog" : filed ? parts[2] ?? "" : parts[1] ?? "",
4830
4837
  path: req.path,
4831
4838
  holders: [],
4832
4839
  updatedAt: asString(front.updated) ?? req.changedAt
4833
4840
  };
4834
4841
  }
4842
+ function hasLeftTheBoard(path23) {
4843
+ return path23.startsWith("versions/complete/") || path23.startsWith("versions/archive/");
4844
+ }
4835
4845
  function toPage(items, req) {
4836
4846
  const matched = items.filter((item2) => req.status ? item2.status === req.status : true).filter((item2) => req.owner ? item2.owner === req.owner : true).filter((item2) => req.epic ? item2.epic === req.epic : true).filter((item2) => req.version ? item2.version === req.version : true).sort(byPriorityThenName);
4837
4847
  const offset = req.offset ?? 0;
@@ -5067,13 +5077,12 @@ function scanTree(root) {
5067
5077
  return scan2;
5068
5078
  }
5069
5079
  var scanning = /* @__PURE__ */ new Map();
5070
- var LEFT_THE_BOARD = ["complete", "archive"];
5071
5080
  async function readTree(root) {
5072
5081
  const work = join5(root, "work");
5073
5082
  const items = [];
5074
5083
  for (const file of await walk(join5(work, "versions"))) {
5075
5084
  const path23 = pathIn(work, file);
5076
- if (LEFT_THE_BOARD.some((home) => path23.startsWith(`versions/${home}/`))) continue;
5085
+ if (hasLeftTheBoard(path23)) continue;
5077
5086
  const item2 = await readItem(work, file);
5078
5087
  if (item2) items.push(item2);
5079
5088
  }
@@ -10387,7 +10396,7 @@ import { createRequire as createRequire2 } from "module";
10387
10396
  var _require = createRequire2(import.meta.url);
10388
10397
  var VERSION2 = _require("../package.json").version ?? "0.0.0";
10389
10398
  var IS_DEV = String(_require("../package.json").name ?? "").endsWith("-dev");
10390
- var SHA = "9df9b58";
10399
+ var SHA = "c2189aa";
10391
10400
  var BUILT = "2026-09-12";
10392
10401
  var BUILD = SHA ?? "source";
10393
10402
  var BUILD_LABEL = `${SHA ? `${VERSION2} (${SHA}${BUILT ? ` ${BUILT}` : ""})` : `${VERSION2} (source)`}${IS_DEV ? " \u2014 development build" : ""}`;