@krapht/ork 1.0.0-alpha.16 → 1.0.0-alpha.17

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 (46) hide show
  1. package/dist/{__build_info__-DcRdK0Du.mjs → __build_info__-C1Nm0hlJ.mjs} +2 -2
  2. package/dist/{attach-7lB5_jpr.mjs → attach-EP374oMP.mjs} +5 -5
  3. package/dist/{attach-B-FeE1dJ.mjs → attach-RQx__RzH.mjs} +1 -1
  4. package/dist/bin.mjs +35 -35
  5. package/dist/brief-Bs3cMQU0.mjs +100 -0
  6. package/dist/{builtin-files-BRSOObAv.mjs → builtin-files-yYaNTQRU.mjs} +1 -1
  7. package/dist/{completion-Cgb2qPPh.mjs → completion-DIXWlnAl.mjs} +46 -4
  8. package/dist/{context-BN9A2Nnu.mjs → context-Dq-VM_sq.mjs} +3 -3
  9. package/dist/{find-mLYsR0uC.mjs → find-k489laBa.mjs} +1 -1
  10. package/dist/{flags-CdgIH1L6.mjs → flags-B4ZZWspN.mjs} +3 -108
  11. package/dist/{follow-ups-DxCsOby1.mjs → follow-ups-DD8NTPe6.mjs} +8 -8
  12. package/dist/{format-hiDvtNGM.mjs → format-DQc9A_ei.mjs} +1 -1
  13. package/dist/in-a-run-D_9GlAlS.mjs +27 -0
  14. package/dist/{install-23g_1ngs.mjs → install-PVlV2QPq.mjs} +1 -1
  15. package/dist/{limits-C_Xz_t3C.mjs → limits-CHqBO7wb.mjs} +1 -1
  16. package/dist/{mcp-CWng9I9n.mjs → mcp-D38Ajb0b.mjs} +6 -6
  17. package/dist/{once-lvwcWfVf.mjs → once-DuUzpzL2.mjs} +3 -3
  18. package/dist/parse-BzWpMN-a.mjs +107 -0
  19. package/dist/{pause-Cy11KrXK.mjs → pause-Bx3ePGrn.mjs} +3 -3
  20. package/dist/{post-C9soCx7i.mjs → post-2CaJz_mV.mjs} +2 -2
  21. package/dist/{print-BaWiWf4v.mjs → print-n2qetUHc.mjs} +1 -1
  22. package/dist/{project-records-BRiyQzUo.mjs → project-records-Cune1l6I.mjs} +1 -1
  23. package/dist/{relay-C0M1TWMB.mjs → relay-D7RN4m68.mjs} +1 -1
  24. package/dist/{run-D_u9V_Ve.mjs → run-BfxdsQJk.mjs} +1 -1
  25. package/dist/{run-B-j3Qxqc.mjs → run-OOWQIKMJ.mjs} +17 -17
  26. package/dist/{send-qBxj0JbJ.mjs → send-CKth_vgn.mjs} +2 -2
  27. package/dist/{src-CXBmaGwS.mjs → src-BHod38UQ.mjs} +12 -1
  28. package/dist/{src-DN-RPsil.mjs → src-DLsFsmOD.mjs} +10 -1
  29. package/dist/{src-nXLIwDrt.mjs → src-DOjTY2ET.mjs} +235 -73
  30. package/dist/{src-DHDQ0itC.mjs → src-DmmrX2_C.mjs} +73 -18
  31. package/dist/{store-Dyr1mP8K.mjs → store-DACH768X.mjs} +1 -1
  32. package/dist/ui/assets/app-9Q-62Ywz.css +1 -0
  33. package/dist/ui/assets/app-CN3acQ-1.js +111 -0
  34. package/dist/ui/assets/{index-CVzwYlz3.js → index-B2uGxA4W.js} +2 -2
  35. package/dist/ui/index.html +1 -1
  36. package/dist/{ui-DLrSt5ny.mjs → ui-CJ-BX12n.mjs} +3 -3
  37. package/dist/{usage-CxmpYYO4.mjs → usage-DxZ6JGd4.mjs} +5 -4
  38. package/dist/{validate-BVrT43GO.mjs → validate-BS0nCccW.mjs} +3 -3
  39. package/dist/{watch-mkLm4t9D.mjs → watch-Dp7IB4FR.mjs} +5 -5
  40. package/dist/{workflows-Bvl2Fquu.mjs → workflows-Djo1edlK.mjs} +2 -2
  41. package/dist/{worktrees-DOOCoS2w.mjs → worktrees-Drof_Nyx.mjs} +4 -4
  42. package/package.json +1 -1
  43. package/dist/brief-BvMtIFio.mjs +0 -58
  44. package/dist/in-a-run-a447hxq8.mjs +0 -24
  45. package/dist/ui/assets/app-BPSCxb_l.css +0 -1
  46. package/dist/ui/assets/app-CnNRowFn.js +0 -111
@@ -0,0 +1,107 @@
1
+ // ../core/src/list-filters/time.ts
2
+ /**
3
+ * @file The times every list's `--since` and `--until` take (specs/usage.md,
4
+ * RFC-017), and `ork prune --older-than`'s age: an age (`24h`, `30d`, `12w`)
5
+ * or a day (`2026-11-01`, in the machine's time zone).
6
+ */
7
+ const UNITS = {
8
+ h: 36e5,
9
+ d: 864e5,
10
+ w: 6048e5
11
+ };
12
+ /** `30d`, `12w`, `24h` before `now`, as an ISO time; `null` when it is not one. */
13
+ const agoTime = (text, now) => {
14
+ const match = /^(\d+)([hdw])$/u.exec(text);
15
+ if (match === null) return null;
16
+ const [, amount = "0", unit = "d"] = match;
17
+ if (Number(amount) === 0) return null;
18
+ const date = new Date(now - Number(amount) * (UNITS[unit] ?? 0));
19
+ return Number.isNaN(date.getTime()) ? null : date.toISOString();
20
+ };
21
+ /** A `YYYY-MM-DD` day's start in the machine's time zone, `after` days on. */
22
+ const dayTime = (text, after) => {
23
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/u.exec(text);
24
+ if (match === null) return null;
25
+ const [, year = "", month = "", day = ""] = match;
26
+ const start = new Date(Number(year), Number(month) - 1, Number(day));
27
+ if (start.getMonth() !== Number(month) - 1) return null;
28
+ if (start.getDate() !== Number(day)) return null;
29
+ start.setDate(start.getDate() + after);
30
+ return start.toISOString();
31
+ };
32
+ /** The start of the day `days` whole days ago, counting today as one. */
33
+ const wholeDays = (days, now) => {
34
+ const today = new Date(now);
35
+ return new Date(today.getFullYear(), today.getMonth(), today.getDate() - (days - 1)).toISOString();
36
+ };
37
+ /**
38
+ * `--since`: an age or the day it starts from. Days and weeks are whole days,
39
+ * today among them, as the Usage panel counts them; hours are exact.
40
+ */
41
+ const sinceTime = (text, now) => {
42
+ const ago = agoTime(text, now);
43
+ if (ago === null) return dayTime(text, 0);
44
+ if (text.endsWith("h")) return ago;
45
+ const amount = Number(text.slice(0, -1));
46
+ return wholeDays(text.endsWith("w") ? amount * 7 : amount, now);
47
+ };
48
+ /** `--until`: the last day it includes. */
49
+ const untilTime = (text) => dayTime(text, 1);
50
+ // ../core/src/list-filters/parse.ts
51
+ /**
52
+ * @file Reads a list's filter flags against its field table (RFC-017): each
53
+ * value checked, times turned into ISO times, and `--limit`.
54
+ */
55
+ const FOR = /^(agent|me|(project|person):\S+)$/u;
56
+ /** The field's value, checked; `null` when the field does not take it. */
57
+ const valueOf = (field, text, now) => {
58
+ if (text === "all" && field.all === true) return "all";
59
+ return {
60
+ enum: () => field.values?.includes(text) === true ? text : null,
61
+ text: () => text === "" ? null : text,
62
+ for: () => FOR.test(text) ? text : null,
63
+ since: () => sinceTime(text, now),
64
+ until: () => untilTime(text)
65
+ }[field.type]();
66
+ };
67
+ /** What the field takes, for the error that refuses a value. */
68
+ const takes = (field) => {
69
+ const all = field.all === true ? ["all"] : [];
70
+ const or = all.length === 0 ? "" : " or all";
71
+ return {
72
+ enum: `one of ${[...field.values ?? [], ...all].join(", ")}`,
73
+ text: `a value${or}`,
74
+ for: "agent, me, project:<name> or person:<name>",
75
+ since: `an age (30d), a day (2026-11-01)${or}`,
76
+ until: "a day (2026-11-01)"
77
+ }[field.type];
78
+ };
79
+ /**
80
+ * The filter `given` (a command's parsed flags, by field name) asks for, each
81
+ * value checked against `table`; `now` dates an age. The first value a field
82
+ * does not take is refused, naming the flag and what it takes.
83
+ */
84
+ const parseFilters = (table, given, now) => {
85
+ const filter = {};
86
+ for (const field of table.fields) {
87
+ const text = given[field.name];
88
+ if (typeof text !== "string") continue;
89
+ const value = valueOf(field, text, now);
90
+ if (value === null) return {
91
+ ok: false,
92
+ error: `--${field.name} takes ${takes(field)}, not \`${text}\`.`
93
+ };
94
+ filter[field.name] = value;
95
+ }
96
+ return {
97
+ ok: true,
98
+ filter
99
+ };
100
+ };
101
+ /** `--limit`: a positive whole number, else `null` (`0`, `-1`, `abc`, `2.5`). */
102
+ const parseLimit = (text) => {
103
+ if (!/^[1-9]\d*$/u.test(text)) return null;
104
+ const limit = Number(text);
105
+ return Number.isSafeInteger(limit) ? limit : null;
106
+ };
107
+ export { parseLimit as n, agoTime as r, parseFilters as t };
@@ -1,7 +1,7 @@
1
- import { En as requestPause, L as openStore, Tn as requestContinue } from "./src-DN-RPsil.mjs";
2
- import { t as findRun } from "./find-mLYsR0uC.mjs";
1
+ import { Dn as requestPause, En as requestContinue, L as openStore } from "./src-DLsFsmOD.mjs";
2
+ import { t as findRun } from "./find-k489laBa.mjs";
3
3
  import { c as write, l as writeErr, s as style } from "./output-B1kwo0YU.mjs";
4
- import { i as continueRefusal } from "./in-a-run-a447hxq8.mjs";
4
+ import { i as continueRefusal } from "./in-a-run-D_9GlAlS.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  // src/commands/pause.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { ir as redact } from "./src-DN-RPsil.mjs";
2
- import { b as githubDraftRefusal } from "./__build_info__-DcRdK0Du.mjs";
1
+ import { ar as redact } from "./src-DLsFsmOD.mjs";
2
+ import { b as githubDraftRefusal } from "./__build_info__-C1Nm0hlJ.mjs";
3
3
  // ../core/src/follow-ups/post.ts
4
4
  /** Posts `f`'s draft as a GitHub comment once `confirmed`, and marks it done. */
5
5
  const postFollowUpMessage = async (f, options) => {
@@ -1,5 +1,5 @@
1
- import { a as refuseIdsWithJson } from "./flags-CdgIH1L6.mjs";
2
1
  import { c as write } from "./output-B1kwo0YU.mjs";
2
+ import { a as refuseIdsWithJson } from "./flags-B4ZZWspN.mjs";
3
3
  // src/list/print.ts
4
4
  /**
5
5
  * Prints `rows`: `--ids` their ids (`table.id`) comma-separated; `--json` the
@@ -1,4 +1,4 @@
1
- import { Ar as hasInRepoFiles, Br as projectRootOf, Fr as projectsHome, L as openStore, Lr as shownPath, Mr as newProjectId, Nr as placeFiles, jr as inRepoPlace } from "./src-DN-RPsil.mjs";
1
+ import { Ir as projectsHome, L as openStore, Mr as inRepoPlace, Nr as newProjectId, Pr as placeFiles, Rr as shownPath, Vr as projectRootOf, jr as hasInRepoFiles } from "./src-DLsFsmOD.mjs";
2
2
  import { C as termOf, c as write, l as writeErr, s as style, w as cut } from "./output-B1kwo0YU.mjs";
3
3
  import { n as chip } from "./chips-BqcT58qr.mjs";
4
4
  import path from "node:path";
@@ -1,4 +1,4 @@
1
- import { Cn as linkNodes, L as openStore, wn as unlinkNodes, xn as addressOf } from "./src-DN-RPsil.mjs";
1
+ import { L as openStore, Sn as addressOf, Tn as unlinkNodes, wn as linkNodes } from "./src-DLsFsmOD.mjs";
2
2
  import { c as write, l as writeErr, s as style } from "./output-B1kwo0YU.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  // src/commands/relay.ts
@@ -1,4 +1,4 @@
1
- import { $t as gitOk, Qt as git } from "./src-DN-RPsil.mjs";
1
+ import { $t as git, en as gitOk } from "./src-DLsFsmOD.mjs";
2
2
  import path from "node:path";
3
3
  import { copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -1,13 +1,13 @@
1
- import { Ct as startRun, G as parseInputPairs, Gn as endOf, Hn as loadProject, Ir as runDirOf, K as resolveInputs, L as openStore, Nr as placeFiles, Pn as templateOf, Qr as beforeOf, Qt as git, Sn as endLinksOf, St as walkSummary, Ti as DRIVER_IDS, Tt as userMessageText, U as createReplay, Un as machineRulesOf, Vn as gitRulesOf, W as replayLoopAnswers, Wn as createSignals, Zt as inspectProject, _n as deliverFollowUp, _r as maskReplacer, _t as planNodeSession, ar as createFeedback, at as adoptedCalls, ct as DETACHED_ENV, dn as createFollowUps, dr as renderTemplate, dt as NOT_STARTED, et as createRelay, fn as checkFollowUpsDue, gn as takeFollowUps, in as sessionDriver, it as createCalls, kn as liveStatus, lt as detachRun, m as resolveBase, mi as retiredDriverHint, mr as socketPath, n as resumedOptions, pr as serveRun, t as createWorkspace, tr as runGh, ui as isClaudeNode, ur as parseTemplate, wi as AGENT_DRIVERS, xi as readyDriver, zr as inside } from "./src-DN-RPsil.mjs";
2
- import { c as callsShown, d as createDecisionQueue, l as createTerminalHuman, o as formatEvent, s as formatRunEvent, t as attachRun } from "./attach-B-FeE1dJ.mjs";
3
- import { h as nodeSession, n as ORK_VERSION, v as findFollowUp } from "./__build_info__-DcRdK0Du.mjs";
4
- import { n as newRunId } from "./find-mLYsR0uC.mjs";
1
+ import { $r as beforeOf, $t as git, An as liveStatus, Br as inside, Cn as endLinksOf, Ct as startRun, Ei as DRIVER_IDS, Fn as templateOf, G as parseInputPairs, Gn as createSignals, Hn as gitRulesOf, K as resolveInputs, Kn as endOf, L as openStore, Lr as runDirOf, Pr as placeFiles, Qt as inspectProject, R as storePath, Si as readyDriver, St as walkSummary, Ti as AGENT_DRIVERS, Tt as userMessageText, U as createReplay, Un as loadProject, W as replayLoopAnswers, Wn as machineRulesOf, _n as takeFollowUps, _t as planNodeSession, an as sessionDriver, at as adoptedCalls, ct as DETACHED_ENV, di as isClaudeNode, dr as parseTemplate, dt as NOT_STARTED, et as createRelay, fn as createFollowUps, fr as renderTemplate, hi as retiredDriverHint, hr as socketPath, it as createCalls, lt as detachRun, m as resolveBase, mr as serveRun, n as resumedOptions, nr as runGh, or as createFeedback, pn as checkFollowUpsDue, t as createWorkspace, vn as deliverFollowUp, vr as maskReplacer } from "./src-DLsFsmOD.mjs";
2
+ import { c as callsShown, d as createDecisionQueue, l as createTerminalHuman, o as formatEvent, s as formatRunEvent, t as attachRun } from "./attach-RQx__RzH.mjs";
3
+ import { h as nodeSession, n as ORK_VERSION, v as findFollowUp } from "./__build_info__-C1Nm0hlJ.mjs";
4
+ import { n as newRunId } from "./find-k489laBa.mjs";
5
5
  import { c as write, i as detachHint, l as writeErr, s as style } from "./output-B1kwo0YU.mjs";
6
- import { _ as namedMcpEntries, a as builtinExecutors, d as maskedEnv, f as maskedNamesOfRun, g as clearOutputFiles, h as sessionEnv, i as onPath, l as clearStateFiles, m as runScrubber, n as missingProgramMessage, r as missingPrograms, t as envProblems, v as resultOf } from "./src-DHDQ0itC.mjs";
7
- import { i as refusedBuiltin, o as workflowArg } from "./workflows-Bvl2Fquu.mjs";
8
- import { a as formatReport, c as checksHere, d as runReadyDriver, f as unfitLines, i as walkLoaded, l as chooseReadyDriver, o as warningLines, s as budgetWarningLines, t as loadWorkflow, u as overrideRefusal } from "./validate-BVrT43GO.mjs";
6
+ import { _ as clearOutputFiles, a as builtinExecutors, d as maskedEnv, f as maskedNamesOfRun, i as onPath, l as clearStateFiles, m as sessionEnv, n as missingProgramMessage, p as runScrubber, r as missingPrograms, t as envProblems, v as namedMcpEntries, y as resultOf } from "./src-DmmrX2_C.mjs";
7
+ import { i as refusedBuiltin, o as workflowArg } from "./workflows-Djo1edlK.mjs";
8
+ import { a as formatReport, c as checksHere, d as runReadyDriver, f as unfitLines, i as walkLoaded, l as chooseReadyDriver, o as warningLines, s as budgetWarningLines, t as loadWorkflow, u as overrideRefusal } from "./validate-BS0nCccW.mjs";
9
9
  import { a as createView, o as styler } from "./verdict-CMvPCpWC.mjs";
10
- import { i as runLimits, r as limitsRefusal, t as chatNotice } from "./limits-C_Xz_t3C.mjs";
10
+ import { i as runLimits, r as limitsRefusal, t as chatNotice } from "./limits-CHqBO7wb.mjs";
11
11
  import path from "node:path";
12
12
  import { appendFileSync, existsSync, linkSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
13
13
  import { createHash, randomUUID } from "node:crypto";
@@ -1162,7 +1162,8 @@ const runWorkflowFile = async (options) => {
1162
1162
  const executorOptions = {
1163
1163
  runtimeFor: (driver) => options.runtime(driver, placeFiles(place).runs),
1164
1164
  inPlace: options.inPlace,
1165
- maskedNames
1165
+ maskedNames,
1166
+ store: storePath(options.home)
1166
1167
  };
1167
1168
  if (options.driver !== void 0) executorOptions.driver = options.driver;
1168
1169
  if (ready.readyDriver !== void 0) executorOptions.readyDriver = ready.readyDriver;
@@ -1251,7 +1252,7 @@ const isDriver = (value) => AGENT_DRIVERS.some((d) => d.id === value);
1251
1252
  /** Why `--driver` refuses a value: a retired id names its replacement. */
1252
1253
  const badDriver = (value) => `--${retiredDriverHint(value) ?? `driver must be one of ${AGENT_DRIVERS.map((d) => d.id).join(", ")}, got \`${value}\``}`;
1253
1254
  /** Loads the drivers only when a run starts, so other commands stay fast. */
1254
- const loadRuntime = async (driver, runs) => (await import("./src-CXBmaGwS.mjs")).createRuntime(driver, sessionEnv(process.env), runs);
1255
+ const loadRuntime = async (driver, runs) => (await import("./src-BHod38UQ.mjs")).createRuntime(driver, sessionEnv(process.env), runs);
1255
1256
  /**
1256
1257
  * Ctrl-C asks the run to stop, and so does a terminal closing or a polite kill,
1257
1258
  * so that the run ends tidily and leaves no result unscrubbed.
@@ -1302,7 +1303,7 @@ const run = defineCommand({
1302
1303
  },
1303
1304
  "follow-ups": {
1304
1305
  type: "string",
1305
- description: "Follow-up ids an agent does (repeatable or comma-separated): they become the run's brief, done when it publishes"
1306
+ description: "Follow-up ids an agent does, or `due` for every due one (repeatable or comma-separated): they become the run's brief, done when it publishes"
1306
1307
  },
1307
1308
  driver: {
1308
1309
  type: "string",
@@ -1373,8 +1374,9 @@ const run = defineCommand({
1373
1374
  process.exitCode = 1;
1374
1375
  return;
1375
1376
  }
1377
+ const { prepareFollowUps: prepare, followUpsFlagFine: flagFine } = await import("./brief-Bs3cMQU0.mjs");
1376
1378
  const cwd = process.cwd();
1377
- if (refusedBuiltin([args.workflow], cwd)) return;
1379
+ if (refusedBuiltin([args.workflow], cwd) || !flagFine(rawArgs)) return;
1378
1380
  const target = workflowArg(args.workflow, cwd);
1379
1381
  const store = openStore();
1380
1382
  if (args.detach) {
@@ -1406,9 +1408,8 @@ const run = defineCommand({
1406
1408
  }
1407
1409
  return;
1408
1410
  }
1409
- const { prepareFollowUps } = await import("./brief-BvMtIFio.mjs");
1410
- const taking = prepareFollowUps(store, rawArgs, args["run-id"], target);
1411
- if (taking === void 0) {
1411
+ const taken = await prepare(store, rawArgs, args["run-id"], target);
1412
+ if (taken === void 0) {
1412
1413
  store.close();
1413
1414
  return;
1414
1415
  }
@@ -1416,7 +1417,7 @@ const run = defineCommand({
1416
1417
  const common = {
1417
1418
  file: target.file,
1418
1419
  cwd,
1419
- inputs: taking.inputs,
1420
+ ...taken,
1420
1421
  inPlace: args["in-place"],
1421
1422
  ...args["machine-claude"] ? { machineClaude: true } : {},
1422
1423
  json: args.json,
@@ -1424,7 +1425,6 @@ const run = defineCommand({
1424
1425
  runtime: loadRuntime,
1425
1426
  store,
1426
1427
  ...human === void 0 ? {} : { human },
1427
- ...taking.runId === void 0 ? {} : { runId: taking.runId },
1428
1428
  out: write,
1429
1429
  err: writeErr,
1430
1430
  ...args.driver === void 0 ? {} : { driver: args.driver }
@@ -1,6 +1,6 @@
1
- import { $ as sendFromScript, L as openStore, Q as scriptRefusal, Z as TOO_LONG } from "./src-DN-RPsil.mjs";
1
+ import { $ as sendFromScript, L as openStore, Q as scriptRefusal, Z as TOO_LONG } from "./src-DLsFsmOD.mjs";
2
2
  import { l as writeErr } from "./output-B1kwo0YU.mjs";
3
- import { u as inheritedScrubber } from "./src-DHDQ0itC.mjs";
3
+ import { u as inheritedScrubber } from "./src-DmmrX2_C.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  // src/commands/send.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { It as lowerChild, Jn as END_KINDS, Kn as outcomeEnd, Lt as programFound, Qn as FEEDBACK_TARGETS, Rt as startAt, Xn as FEEDBACK_KINDS, Yn as endFor, Zn as FEEDBACK_SEVERITIES, gr as MASK, un as FOLLOW_UP_KINDS, vr as maskSecrets, vt as parseReport, wi as AGENT_DRIVERS, zn as countedTokens } from "./src-DN-RPsil.mjs";
1
+ import { $n as FEEDBACK_TARGETS, Bn as countedTokens, It as lowerChild, Lt as programFound, Qn as FEEDBACK_SEVERITIES, Rt as startAt, Ti as AGENT_DRIVERS, Xn as endFor, Yn as END_KINDS, Zn as FEEDBACK_KINDS, _r as MASK, dn as FOLLOW_UP_KINDS, qn as outcomeEnd, vt as parseReport, yr as maskSecrets } from "./src-DLsFsmOD.mjs";
2
2
  import { n as holdGuard, r as orphanGuard } from "./orphan-guard-BFKg8VSd.mjs";
3
3
  import path from "node:path";
4
4
  import { z } from "zod";
@@ -1633,8 +1633,19 @@ const cacheEnv = (spec) => spec.promptCache === "1h" ? { [PROMPT_CACHE_1H]: "1"
1633
1633
  const strictMcpOf = (spec) => spec.tools.strictMcp === true || spec.machineClaude !== true;
1634
1634
  /** The variables that keep the machine's auto-memory out of a session. */
1635
1635
  const memoryEnv = (spec) => spec.machineClaude === true ? {} : { [NO_AUTO_MEMORY]: "1" };
1636
+ /** Claude Code's default timeout for a Bash call, in milliseconds. */
1637
+ const BASH_TIMEOUT = "BASH_DEFAULT_TIMEOUT_MS";
1638
+ /**
1639
+ * Ten minutes, Claude Code's own most for a Bash call. At its default of two, a
1640
+ * longer command (a typecheck of the workspace) moves to the background, and
1641
+ * the session then polls it with `sleep`, `until` or `Monitor`, which ask.
1642
+ */
1643
+ const BASH_TIMEOUT_MS = 6e5;
1644
+ /** The variables that let a session's Bash calls run to the end in front. */
1645
+ const bashEnv = () => ({ [BASH_TIMEOUT]: String(BASH_TIMEOUT_MS) });
1636
1646
  /** Everything a session adds to its driver's environment. */
1637
1647
  const driverEnv = (spec) => ({
1648
+ ...bashEnv(),
1638
1649
  ...cacheEnv(spec),
1639
1650
  ...memoryEnv(spec)
1640
1651
  });
@@ -9285,6 +9285,15 @@ const usageListTable = { fields: [
9285
9285
  type: "until"
9286
9286
  }
9287
9287
  ] };
9288
+ /** Every core list's table, by the command that lists it. */
9289
+ const LIST_TABLES = {
9290
+ ps: runListTable,
9291
+ "feedback list": feedbackListTable,
9292
+ "follow-ups list": followUpListTable,
9293
+ "decide --list": decisionListTable,
9294
+ "worktrees list": worktreeListTable,
9295
+ usage: usageListTable
9296
+ };
9288
9297
  // ../core/src/machine/priority.ts
9289
9298
  /**
9290
9299
  * @file Starting a child at the project's priority (`priority:`): `low`, the
@@ -19010,4 +19019,4 @@ const createWorkspace = (options) => {
19010
19019
  close
19011
19020
  };
19012
19021
  };
19013
- export { sendFromScript as $, DISCUSSIONS as $n, programsRunBy as $r, gitOk as $t, declaredTriggers as A, lockWaitsOf as An, hasInRepoFiles as Ar, endedWith as At, planPrune as B, PROJECT_FILE as Bn, projectRootOf as Br, feedbackListTable as Bt, compareVersions as C, ORK_LAYOUT as Ci, linkNodes as Cn, toolLinks as Cr, startRun as Ct, triggersReport as D, EXPERIMENTS as Di, requestStop as Dn, AGENT_SOURCES as Dr, runScope as Dt, lateTriggers as E, firstLine as Ei, requestPause as En, deleteAgent as Er, heldTimeout as Et, activeTree as F, processAlive as Fn, projectsHome as Fr, slotWaitLine as Ft, parseInputPairs as G, endOf as Gn, writePlainFile as Gr, applyClean as Gt, listOrkWorktrees as H, loadProject as Hn, estimateTokens as Hr, runListTable as Ht, isNodeEvent as I, stillTheSameProcess as In, runDirOf as Ir, lowerChild as It, driverRefusals as J, END_KINDS as Jn, applyEdits as Jr, planClean as Jt, resolveInputs as K, outcomeEnd as Kn, skillsIn as Kr, cleanStep as Kt, openStore as L, isItem as Ln, shownPath as Lr, programFound as Lt, workflowTextHash as M, runStatus as Mn, newProjectId as Mr, stoppedEnd as Mt, takeWatchLock as N, slotWaitsOf as Nn, placeFiles as Nr, declaredProblem as Nt, createWatcher as O, experimentsOn as Oi, tellLiveRun as On, catalogAgent as Or, calledWorkflows as Ot, watchingPid as P, templateOf$1 as Pn, placeFor as Pr, slotClock as Pt, scriptRefusal as Q, FEEDBACK_TARGETS as Qn, beforeOf as Qr, git as Qt, storePath as R, nestItems as Rn, workflowDirOf as Rr, startAt as Rt, detectInstaller as S, AGENT_TOOL_LAYOUTS as Si, endLinksOf as Sn, linkTools as Sr, walkSummary as St, parseVersion as T, DRIVER_IDS as Ti, requestContinue as Tn, createAgent as Tr, userMessageText as Tt, createReplay as U, machineRulesOf as Un, guardedBase as Ur, usageListTable as Ut, createdWorktrees as V, gitRulesOf as Vn, LESSON_CAP_TOKENS as Vr, followUpListTable as Vt, replayLoopAnswers as W, createSignals as Wn, plainPathInside as Wr, worktreeListTable as Wt, driverQueues as X, FEEDBACK_KINDS as Xn, readDocument as Xr, stepPrunes as Xt, sessionRefusals as Y, endFor as Yn, newWorkflowText as Yr, stepActs as Yt, TOO_LONG as Z, FEEDBACK_SEVERITIES as Zn, renameNodeTypes as Zr, inspectProject as Zt, capsHere as _, TOOL_PREFIX as _i, deliverFollowUp as _n, maskReplacer as _r, planNodeSession as _t, planRemove as a, WorkflowSchema as ai, nodeSays as an, createFeedback as ar, adoptedCalls as at, runningRunIds as b, driverChecks as bi, DEFAULT_FOLLOW_UPS_RULE as bn, applySteps as br, checkWorkflowText as bt, repoRoot as c, settingsOf as ci, mcpNotText as cn, targetOf as cr, DETACHED_ENV as ct, planLine as d, isToolNode as di, createFollowUps as dn, renderTemplate as dr, NOT_STARTED as dt, renderJsonSchema as ei, clearGitLocalEnv as en, planPost as er, createRelay as et, removeRefusal as f, DriverSchema as fi, checkFollowUpsDue as fn, readCondition as fr, limitsNow as ft, usageReport as g, INTEGRATIONS as gi, takeFollowUps as gn, MASK as gr, explainSession as gt, USAGE_DIMENSIONS as h, timeoutMs as hi, startFollowUpChecks as hn, socketRoom as hr, explainWorkflowText as ht, lostWork as i, EdgeInputSchema as ii, sessionDriver as in, redact as ir, createCalls as it, readProjectTriggers as j, pausedOf as jn, inRepoPlace as jr, failedWith as jt, triggerStanding as k, knownExperiments as ki, liveStatus as kn, loadAgents as kr, lockWaitLine as kt, labelOf as l, NodeSchema as li, serversIn as ln, evaluate as lr, detachRun as lt, resolveBase as m, retiredDriverHint as mi, recordPublished as mn, socketPath as mr, planReason as mt, resumedOptions as n, serializeWorkflow as ni, modelDriver as nn, sendPost as nr, answerDecision as nt, projectHead as o, CheckReportSchema as oi, declaredOutputOf as on, fingerprint as or, detachResume as ot, stateParts as p, NodeIdSchema as pi, markDue as pn, serveRun as pr, limitsReport as pt, budgetWarnings as q, END_DETAIL_LIMIT as qn, WorkflowEditSchema as qr, keyOf as qt, applyRemove as r, markValue as ri, namingNoDriver as rn, publishPost as rr, pendingDecisions as rt, readWorktrees as s, expandEdge as si, MCP_FILE as sn, normalizeTitle as sr, resumable as st, createWorkspace as t, parseWorkflow as ti, envReadsOf as tn, runGh as tr, followRunTree as tt, mergeStateOf as u, isClaudeNode as ui, FOLLOW_UP_KINDS as un, parseTemplate as ur, followEvents as ut, planUpgrade as v, integrationFor as vi, followUpProblem as vn, maskSecrets as vr, parseReport as vt, isNewer as w, AGENT_DRIVERS as wi, unlinkNodes as wn, toolsInUse as wr, MESSAGE_LIMIT as wt, runningScript as x, readyDriver as xi, addressOf as xn, planMoveInto as xr, walkChecks as xt, releaseNotes as y, PREFERRED_DRIVER as yi, liveSessionOf as yn, planAgentMigration as yr, reportSchemaFor as yt, applyPrune as z, countedTokens as zn, inside as zr, decisionListTable as zt };
19022
+ export { sendFromScript as $, FEEDBACK_TARGETS as $n, beforeOf as $r, git as $t, declaredTriggers as A, knownExperiments as Ai, liveStatus as An, loadAgents as Ar, endedWith as At, planPrune as B, countedTokens as Bn, inside as Br, decisionListTable as Bt, compareVersions as C, AGENT_TOOL_LAYOUTS as Ci, endLinksOf as Cn, linkTools as Cr, startRun as Ct, triggersReport as D, firstLine as Di, requestPause as Dn, deleteAgent as Dr, runScope as Dt, lateTriggers as E, DRIVER_IDS as Ei, requestContinue as En, createAgent as Er, heldTimeout as Et, activeTree as F, templateOf$1 as Fn, placeFor as Fr, slotWaitLine as Ft, parseInputPairs as G, createSignals as Gn, plainPathInside as Gr, worktreeListTable as Gt, listOrkWorktrees as H, gitRulesOf as Hn, LESSON_CAP_TOKENS as Hr, followUpListTable as Ht, isNodeEvent as I, processAlive as In, projectsHome as Ir, lowerChild as It, driverRefusals as J, END_DETAIL_LIMIT as Jn, WorkflowEditSchema as Jr, keyOf as Jt, resolveInputs as K, endOf as Kn, writePlainFile as Kr, applyClean as Kt, openStore as L, stillTheSameProcess as Ln, runDirOf as Lr, programFound as Lt, workflowTextHash as M, pausedOf as Mn, inRepoPlace as Mr, stoppedEnd as Mt, takeWatchLock as N, runStatus as Nn, newProjectId as Nr, declaredProblem as Nt, createWatcher as O, EXPERIMENTS as Oi, requestStop as On, AGENT_SOURCES as Or, calledWorkflows as Ot, watchingPid as P, slotWaitsOf as Pn, placeFiles as Pr, slotClock as Pt, scriptRefusal as Q, FEEDBACK_SEVERITIES as Qn, renameNodeTypes as Qr, inspectProject as Qt, storePath as R, isItem as Rn, shownPath as Rr, startAt as Rt, detectInstaller as S, readyDriver as Si, addressOf as Sn, planMoveInto as Sr, walkSummary as St, parseVersion as T, AGENT_DRIVERS as Ti, unlinkNodes as Tn, toolsInUse as Tr, userMessageText as Tt, createReplay as U, loadProject as Un, estimateTokens as Ur, runListTable as Ut, createdWorktrees as V, PROJECT_FILE as Vn, projectRootOf as Vr, feedbackListTable as Vt, replayLoopAnswers as W, machineRulesOf as Wn, guardedBase as Wr, usageListTable as Wt, driverQueues as X, endFor as Xn, newWorkflowText as Xr, stepActs as Xt, sessionRefusals as Y, END_KINDS as Yn, applyEdits as Yr, planClean as Yt, TOO_LONG as Z, FEEDBACK_KINDS as Zn, readDocument as Zr, stepPrunes as Zt, capsHere as _, INTEGRATIONS as _i, takeFollowUps as _n, MASK as _r, planNodeSession as _t, planRemove as a, EdgeInputSchema as ai, sessionDriver as an, redact as ar, adoptedCalls as at, runningRunIds as b, PREFERRED_DRIVER as bi, liveSessionOf as bn, planAgentMigration as br, checkWorkflowText as bt, repoRoot as c, expandEdge as ci, MCP_FILE as cn, normalizeTitle as cr, DETACHED_ENV as ct, planLine as d, isClaudeNode as di, FOLLOW_UP_KINDS as dn, parseTemplate as dr, NOT_STARTED as dt, programsRunBy as ei, gitOk as en, DISCUSSIONS as er, createRelay as et, removeRefusal as f, isToolNode as fi, createFollowUps as fn, renderTemplate as fr, limitsNow as ft, usageReport as g, timeoutMs as gi, startFollowUpChecks as gn, socketRoom as gr, explainSession as gt, USAGE_DIMENSIONS as h, retiredDriverHint as hi, recordPublished as hn, socketPath as hr, explainWorkflowText as ht, lostWork as i, markValue as ii, namingNoDriver as in, publishPost as ir, createCalls as it, readProjectTriggers as j, lockWaitsOf as jn, hasInRepoFiles as jr, failedWith as jt, triggerStanding as k, experimentsOn as ki, tellLiveRun as kn, catalogAgent as kr, lockWaitLine as kt, labelOf as l, settingsOf as li, mcpNotText as ln, targetOf as lr, detachRun as lt, resolveBase as m, NodeIdSchema as mi, markDue as mn, serveRun as mr, planReason as mt, resumedOptions as n, parseWorkflow as ni, envReadsOf as nn, runGh as nr, answerDecision as nt, projectHead as o, WorkflowSchema as oi, nodeSays as on, createFeedback as or, detachResume as ot, stateParts as p, DriverSchema as pi, checkFollowUpsDue as pn, readCondition as pr, limitsReport as pt, budgetWarnings as q, outcomeEnd as qn, skillsIn as qr, cleanStep as qt, applyRemove as r, serializeWorkflow as ri, modelDriver as rn, sendPost as rr, pendingDecisions as rt, readWorktrees as s, CheckReportSchema as si, declaredOutputOf as sn, fingerprint as sr, resumable as st, createWorkspace as t, renderJsonSchema as ti, clearGitLocalEnv as tn, planPost as tr, followRunTree as tt, mergeStateOf as u, NodeSchema as ui, serversIn as un, evaluate as ur, followEvents as ut, planUpgrade as v, TOOL_PREFIX as vi, deliverFollowUp as vn, maskReplacer as vr, parseReport as vt, isNewer as w, ORK_LAYOUT as wi, linkNodes as wn, toolLinks as wr, MESSAGE_LIMIT as wt, runningScript as x, driverChecks as xi, DEFAULT_FOLLOW_UPS_RULE as xn, applySteps as xr, walkChecks as xt, releaseNotes as y, integrationFor as yi, followUpProblem as yn, maskSecrets as yr, reportSchemaFor as yt, applyPrune as z, nestItems as zn, workflowDirOf as zr, LIST_TABLES as zt };