@staff0rd/assist 0.1183.0 → 0.1184.0

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.
@@ -9,10 +9,10 @@ import {
9
9
  import {
10
10
  buildDoctorProbes,
11
11
  diagnoseLink
12
- } from "./chunk-2OZNXGMF.js";
12
+ } from "./chunk-BDMLW7FT.js";
13
13
  import "./chunk-VABNWHSE.js";
14
14
  import "./chunk-DS2YJZZY.js";
15
- import "./chunk-OTBG7NWH.js";
15
+ import "./chunk-AHGWDOR4.js";
16
16
  import {
17
17
  loadLinkSpecs
18
18
  } from "./chunk-B2OH3RAT.js";
@@ -30,7 +30,7 @@ import {
30
30
  detectPlatform
31
31
  } from "./chunk-E36L7ASL.js";
32
32
  import "./chunk-GIHVMELY.js";
33
- import "./chunk-BCN5YGN4.js";
33
+ import "./chunk-ZUXPVZHJ.js";
34
34
  import "./chunk-6BPHYRZT.js";
35
35
  import "./chunk-W7Y4YARD.js";
36
36
  import "./chunk-ZJMB4FR7.js";
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-TJGF3Z72.js";
18
18
  import {
19
19
  package_default
20
- } from "./chunk-BCN5YGN4.js";
20
+ } from "./chunk-ZUXPVZHJ.js";
21
21
  import {
22
22
  adviceConfigHelp,
23
23
  askQuestionConfigHelp,
@@ -92,7 +92,7 @@ import { Command } from "commander";
92
92
  // src/commands/registerRootAction.ts
93
93
  function registerRootAction(program) {
94
94
  program.option("--no-open", "Do not open a browser on startup").action(
95
- async (options) => (await import("./web-YYRJTAU7.js")).web({
95
+ async (options) => (await import("./web-NQZOX5QB.js")).web({
96
96
  port: "3100",
97
97
  open: options.open
98
98
  })
@@ -273,7 +273,7 @@ function registerActivityCommands(cmd) {
273
273
  internalCommand(
274
274
  cmd.command("add-activity <id> <kind> <ref>").description(
275
275
  "Attach an activity ref (branch|commit|pr|slack|session|design) to a backlog item"
276
- ).option("--title <title>", "Title metadata for the ref").option("--url <url>", "URL metadata (auto-filled for branch/commit)").option("--state <state>", "State metadata for the ref").action(lazyAction(() => import("./addActivity-5UWKDHCJ.js"), "addActivity")),
276
+ ).option("--title <title>", "Title metadata for the ref").option("--url <url>", "URL metadata (auto-filled for branch/commit)").option("--state <state>", "State metadata for the ref").action(lazyAction(() => import("./addActivity-Z5MLKDWA.js"), "addActivity")),
277
277
  "/draft and /bug"
278
278
  );
279
279
  internalCommand(
@@ -644,7 +644,7 @@ function registerShowCommands(cmd) {
644
644
 
645
645
  // src/commands/registerBacklog.ts
646
646
  function registerWebCommand(cmd) {
647
- cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-KETYWG4M.js"), "web"));
647
+ cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-6EIQMFU6.js"), "web"));
648
648
  }
649
649
  var registrars = [
650
650
  registerItemCommands,
@@ -674,7 +674,7 @@ function registerBacklog(program) {
674
674
  const { setBacklogDir } = await import("./getBacklogDir-YYVRRAQE.js");
675
675
  setBacklogDir(thisCommand.opts().dir);
676
676
  }).action(
677
- async (options) => (await import("./web-KETYWG4M.js")).web({ port: "3100", open: options.open })
677
+ async (options) => (await import("./web-6EIQMFU6.js")).web({ port: "3100", open: options.open })
678
678
  );
679
679
  for (const register of registrars) {
680
680
  register(cmd);
@@ -987,7 +987,7 @@ function registerExtension(program) {
987
987
  ).action(async (options) => {
988
988
  const { extension } = await import("./extension-YYRD5EM6.js");
989
989
  const { printExtensionUrl } = await import("./printExtensionUrl-IW2WTSNS.js");
990
- const { signExtension } = await import("./signExtension-6PJQNRY6.js");
990
+ const { signExtension } = await import("./signExtension-2WE5G5QC.js");
991
991
  if (options.url) return printExtensionUrl();
992
992
  return options.sign ? signExtension() : extension();
993
993
  });
@@ -2659,7 +2659,7 @@ function registerDaemon(program) {
2659
2659
  const cmd = program.command("daemon").description("Long-lived daemon that owns web session PTYs");
2660
2660
  cmd.command("run").description(
2661
2661
  "Run the sessions daemon in the foreground (auto-spawned by assist sessions)"
2662
- ).action(lazyAction(() => import("./runDaemon-HL5GQ34S.js"), "runDaemon"));
2662
+ ).action(lazyAction(() => import("./runDaemon-342YVOQW.js"), "runDaemon"));
2663
2663
  cmd.command("status").description(
2664
2664
  "Show sessions daemon status, live sessions, and any stray daemon processes"
2665
2665
  ).action(lazyAction(() => import("./daemonStatus-EAZHBC6O.js"), "daemonStatus"));
@@ -2683,7 +2683,7 @@ function registerDiagnoseCommands(nodes, calledBy5) {
2683
2683
  nodes.command("doctor [name]").description(
2684
2684
  "Probe each hop of every link (or one) in order and stop at the first failure with a remediation"
2685
2685
  ).option("--json", "Output as JSON").action(
2686
- async (name, _options, command) => (await import("./doctorNodes-ODYR6ZAC.js")).doctorNodes(
2686
+ async (name, _options, command) => (await import("./doctorNodes-E5YNA7DH.js")).doctorNodes(
2687
2687
  name,
2688
2688
  command.optsWithGlobals()
2689
2689
  )
@@ -2713,14 +2713,14 @@ function registerPeerActionCommands(nodes, calledBy5) {
2713
2713
  internalCommand(
2714
2714
  nodes.command("restart <name>").description(
2715
2715
  "Restart a linked node's daemon and/or web server, wait for its link to reconnect and print its version"
2716
- ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-DIC2TQJ3.js"), "restartNode")),
2716
+ ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-5HU454NN.js"), "restartNode")),
2717
2717
  calledBy5
2718
2718
  );
2719
2719
  internalCommand(
2720
2720
  nodes.command("update <name>").description(
2721
2721
  "Run assist update on a linked node, restart it, wait for its link to reconnect and print its version"
2722
2722
  ).action(
2723
- async (name) => (await import("./updateNode-WNYIOE7M.js")).updateNode(name)
2723
+ async (name) => (await import("./updateNode-JH4FCU73.js")).updateNode(name)
2724
2724
  ),
2725
2725
  calledBy5
2726
2726
  );
@@ -2783,7 +2783,7 @@ function registerSetStatusCommand(cmd) {
2783
2783
  // src/commands/sessions/registerSessionsWeb.ts
2784
2784
  function registerSessionsWeb(cmd) {
2785
2785
  const webCmd = cmd.command("web").description("Start the sessions web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(
2786
- async (options, command) => (await import("./web-YYRJTAU7.js")).web({
2786
+ async (options, command) => (await import("./web-NQZOX5QB.js")).web({
2787
2787
  ...options,
2788
2788
  open: command.optsWithGlobals().open
2789
2789
  })
@@ -2798,7 +2798,7 @@ function registerSessionsWeb(cmd) {
2798
2798
  // src/commands/sessions/registerSessions.ts
2799
2799
  function registerSessions(program) {
2800
2800
  const cmd = program.command("sessions").description("Web dashboard for coding agent sessions").option("--no-open", "Do not open a browser on startup").action(
2801
- async (_options, command) => (await import("./web-YYRJTAU7.js")).web({
2801
+ async (_options, command) => (await import("./web-NQZOX5QB.js")).web({
2802
2802
  port: "3100",
2803
2803
  open: command.optsWithGlobals().open
2804
2804
  })
@@ -2,20 +2,20 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-HLGG6372.js";
6
- import "./chunk-V7LKPU6K.js";
7
- import "./chunk-2OZNXGMF.js";
5
+ } from "./chunk-BCPHWGET.js";
6
+ import "./chunk-R33Q64FL.js";
7
+ import "./chunk-BDMLW7FT.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
10
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-OTBG7NWH.js";
11
+ import "./chunk-AHGWDOR4.js";
12
12
  import "./chunk-B2OH3RAT.js";
13
13
  import "./chunk-QDXJDFNJ.js";
14
14
  import "./chunk-B7VOTF5Q.js";
15
15
  import "./chunk-E36L7ASL.js";
16
16
  import "./chunk-5H7EHZ3J.js";
17
17
  import "./chunk-GIHVMELY.js";
18
- import "./chunk-BCN5YGN4.js";
18
+ import "./chunk-ZUXPVZHJ.js";
19
19
  import "./chunk-W7Y4YARD.js";
20
20
  import "./chunk-ZJMB4FR7.js";
21
21
  import "./chunk-GRXFWFGP.js";
@@ -81,7 +81,7 @@ import {
81
81
  locateConversation,
82
82
  readTranscriptHead,
83
83
  transcriptMessages
84
- } from "./chunk-KRKOPIZX.js";
84
+ } from "./chunk-2I4XK5MA.js";
85
85
  import {
86
86
  CHECK_NOTE_KEY
87
87
  } from "./chunk-OLE7XSNB.js";
@@ -126,7 +126,7 @@ import {
126
126
  isHello,
127
127
  linkVersionCheck,
128
128
  negotiateProtocol
129
- } from "./chunk-OTBG7NWH.js";
129
+ } from "./chunk-AHGWDOR4.js";
130
130
  import {
131
131
  loadLinkSpecs
132
132
  } from "./chunk-B2OH3RAT.js";
@@ -265,7 +265,7 @@ import {
265
265
  import "./chunk-APZ6ZTDA.js";
266
266
  import "./chunk-BFQSGIN6.js";
267
267
  import "./chunk-D7UZLH36.js";
268
- import "./chunk-BCN5YGN4.js";
268
+ import "./chunk-ZUXPVZHJ.js";
269
269
  import "./chunk-EW2ZM2PC.js";
270
270
  import "./chunk-MYH4MQX2.js";
271
271
  import {
@@ -3336,32 +3336,22 @@ function appendTranscriptEcho(conversationId, echo) {
3336
3336
  }
3337
3337
  }
3338
3338
 
3339
- // src/commands/sessions/daemon/paneEcho/questionOtherText.ts
3340
- function parseQuestions(body) {
3339
+ // src/commands/sessions/daemon/paneEcho/questionAnswerText.ts
3340
+ function questionOrder(body) {
3341
3341
  try {
3342
3342
  const parsed = askQuestionInputSchema.safeParse(JSON.parse(body));
3343
- return parsed.success ? parsed.data.questions : [];
3343
+ return parsed.success ? parsed.data.questions.map((q) => q.question) : [];
3344
3344
  } catch {
3345
3345
  return [];
3346
3346
  }
3347
3347
  }
3348
- function otherOf(question, answer) {
3349
- let rest = answer;
3350
- for (const { label } of question.options) {
3351
- if (rest === label) return "";
3352
- if (rest.startsWith(`${label}, `)) rest = rest.slice(label.length + 2);
3353
- }
3354
- return rest.trim();
3355
- }
3356
- function questionOtherText(body, answers) {
3357
- const questions = parseQuestions(body);
3358
- const others = questions.flatMap((question) => {
3359
- const answer = answers[question.question];
3360
- const text = typeof answer === "string" ? otherOf(question, answer) : "";
3361
- return text ? [{ header: question.header, text }] : [];
3362
- });
3363
- if (others.length === 1) return others[0].text;
3364
- return others.map(({ header, text }) => `${header}: ${text}`).join("\n\n");
3348
+ function questionAnswerText(body, answers) {
3349
+ const order = questionOrder(body);
3350
+ const keys = [
3351
+ ...order.filter((question) => question in answers),
3352
+ ...Object.keys(answers).filter((question) => !order.includes(question))
3353
+ ];
3354
+ return keys.map((question) => answers[question].trim()).filter(Boolean).join("\n\n");
3365
3355
  }
3366
3356
 
3367
3357
  // src/commands/sessions/daemon/paneEcho/signOffText.ts
@@ -3399,7 +3389,7 @@ function paneEchoText(preview, d) {
3399
3389
  case "check":
3400
3390
  return (answersOf(d)[CHECK_NOTE_KEY] ?? "").trim();
3401
3391
  case "question":
3402
- return questionOtherText(preview.body, answersOf(d));
3392
+ return questionAnswerText(preview.body, answersOf(d));
3403
3393
  case "ask":
3404
3394
  case "backlog-item":
3405
3395
  case "rule":
@@ -3410,18 +3400,20 @@ function paneEchoText(preview, d) {
3410
3400
  }
3411
3401
 
3412
3402
  // src/commands/sessions/daemon/recordPaneEcho.ts
3403
+ var replyCommands = {
3404
+ question: "ask-question"
3405
+ };
3413
3406
  function recordPaneEcho(session, d) {
3414
3407
  const preview = session.pendingPrPreview;
3415
3408
  if (!session.pty?.sdk || !preview) return;
3416
- const text = paneEchoText(preview, d);
3409
+ const command = preview.kind && replyCommands[preview.kind];
3410
+ const text = command ? paneEchoText(preview, d) : "";
3417
3411
  const conversationId = conversationOf(session)?.id;
3418
- if (!text || !conversationId) return;
3412
+ if (!command || !text || !conversationId) return;
3419
3413
  const at = (/* @__PURE__ */ new Date()).toISOString();
3420
- appendTranscriptEcho(conversationId, { at, text });
3414
+ appendTranscriptEcho(conversationId, { at, command, text });
3421
3415
  session.lastEchoAt = at;
3422
- daemonLog(
3423
- `session ${session.id} echoed ${preview.kind} pane text into transcript`
3424
- );
3416
+ daemonLog(`session ${session.id} recorded ${preview.kind} reply text`);
3425
3417
  }
3426
3418
 
3427
3419
  // src/commands/sessions/daemon/decidePrPreview.ts
@@ -4416,7 +4408,8 @@ function latestUserRows(rows) {
4416
4408
  let restart = false;
4417
4409
  for (let i = rows.length - 1; i >= 0; i--) {
4418
4410
  const row = rows[i];
4419
- if (row.role === "user" && row.text !== void 0) texts.push(row.text);
4411
+ if (row.role === "user" && row.text !== void 0)
4412
+ texts.push(row.sent ?? row.text);
4420
4413
  else if (row.role === "restart") restart = true;
4421
4414
  else if (row.role === "assistant" && (texts.length || restart)) break;
4422
4415
  }
@@ -9673,7 +9666,7 @@ import { readFile } from "fs/promises";
9673
9666
  function parseEcho(line) {
9674
9667
  try {
9675
9668
  const echo = JSON.parse(line);
9676
- return typeof echo.at === "string" && typeof echo.text === "string" ? [{ at: echo.at, text: echo.text }] : [];
9669
+ return typeof echo.at === "string" && typeof echo.text === "string" && typeof echo.command === "string" ? [{ at: echo.at, command: echo.command, text: echo.text }] : [];
9677
9670
  } catch {
9678
9671
  return [];
9679
9672
  }
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-W7TRZLEM.js";
10
10
  import {
11
11
  package_default
12
- } from "./chunk-BCN5YGN4.js";
12
+ } from "./chunk-ZUXPVZHJ.js";
13
13
 
14
14
  // src/commands/extension/signExtension.ts
15
15
  import { rm as rm2 } from "fs/promises";
@@ -2,13 +2,13 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-HLGG6372.js";
6
- import "./chunk-V7LKPU6K.js";
7
- import "./chunk-2OZNXGMF.js";
5
+ } from "./chunk-BCPHWGET.js";
6
+ import "./chunk-R33Q64FL.js";
7
+ import "./chunk-BDMLW7FT.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
10
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-OTBG7NWH.js";
11
+ import "./chunk-AHGWDOR4.js";
12
12
  import "./chunk-B2OH3RAT.js";
13
13
  import "./chunk-QDXJDFNJ.js";
14
14
  import "./chunk-B7VOTF5Q.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-A7ONLVZD.js";
20
20
  import "./chunk-GIHVMELY.js";
21
21
  import "./chunk-2EW62DM5.js";
22
- import "./chunk-BCN5YGN4.js";
22
+ import "./chunk-ZUXPVZHJ.js";
23
23
  import "./chunk-W7Y4YARD.js";
24
24
  import "./chunk-ZJMB4FR7.js";
25
25
  import "./chunk-GRXFWFGP.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  web
3
- } from "./chunk-BC5UJTW6.js";
3
+ } from "./chunk-BZOP4WBR.js";
4
4
  import "./chunk-SURCYYQ6.js";
5
5
  import "./chunk-JNCFHWBK.js";
6
6
  import "./chunk-JM57BCD6.js";
7
- import "./chunk-V7LKPU6K.js";
8
- import "./chunk-2OZNXGMF.js";
7
+ import "./chunk-R33Q64FL.js";
8
+ import "./chunk-BDMLW7FT.js";
9
9
  import "./chunk-VABNWHSE.js";
10
10
  import "./chunk-DS2YJZZY.js";
11
11
  import "./chunk-BY2RUZMD.js";
12
12
  import "./chunk-JDPIT22R.js";
13
13
  import "./chunk-4HKB2TAG.js";
14
- import "./chunk-OTBG7NWH.js";
14
+ import "./chunk-AHGWDOR4.js";
15
15
  import "./chunk-B2OH3RAT.js";
16
16
  import "./chunk-QDXJDFNJ.js";
17
17
  import "./chunk-B7VOTF5Q.js";
@@ -139,7 +139,7 @@ import "./chunk-SJFAFWR7.js";
139
139
  import "./chunk-APZ6ZTDA.js";
140
140
  import "./chunk-BFQSGIN6.js";
141
141
  import "./chunk-D7UZLH36.js";
142
- import "./chunk-BCN5YGN4.js";
142
+ import "./chunk-ZUXPVZHJ.js";
143
143
  import "./chunk-YUV5QBHU.js";
144
144
  import "./chunk-UEWARAPX.js";
145
145
  import "./chunk-YVL3NXEB.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  web
3
- } from "./chunk-BC5UJTW6.js";
3
+ } from "./chunk-BZOP4WBR.js";
4
4
  import "./chunk-SURCYYQ6.js";
5
5
  import "./chunk-JNCFHWBK.js";
6
6
  import "./chunk-JM57BCD6.js";
7
- import "./chunk-V7LKPU6K.js";
8
- import "./chunk-2OZNXGMF.js";
7
+ import "./chunk-R33Q64FL.js";
8
+ import "./chunk-BDMLW7FT.js";
9
9
  import "./chunk-VABNWHSE.js";
10
10
  import "./chunk-DS2YJZZY.js";
11
11
  import "./chunk-BY2RUZMD.js";
12
12
  import "./chunk-JDPIT22R.js";
13
13
  import "./chunk-4HKB2TAG.js";
14
- import "./chunk-OTBG7NWH.js";
14
+ import "./chunk-AHGWDOR4.js";
15
15
  import "./chunk-B2OH3RAT.js";
16
16
  import "./chunk-QDXJDFNJ.js";
17
17
  import "./chunk-B7VOTF5Q.js";
@@ -139,7 +139,7 @@ import "./chunk-SJFAFWR7.js";
139
139
  import "./chunk-APZ6ZTDA.js";
140
140
  import "./chunk-BFQSGIN6.js";
141
141
  import "./chunk-D7UZLH36.js";
142
- import "./chunk-BCN5YGN4.js";
142
+ import "./chunk-ZUXPVZHJ.js";
143
143
  import "./chunk-YUV5QBHU.js";
144
144
  import "./chunk-UEWARAPX.js";
145
145
  import "./chunk-YVL3NXEB.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.1183.0",
3
+ "version": "0.1184.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {