@join-pantheon/cli 0.35.0 → 0.35.1-rc.2

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 (52) hide show
  1. package/dist/agent-outage.js +165 -35
  2. package/dist/agent-token.js +5 -3
  3. package/dist/agents.js +6 -4
  4. package/dist/approvals-list.js +87 -0
  5. package/dist/board.js +491 -88
  6. package/dist/brief.js +17 -0
  7. package/dist/cli.js +687 -95
  8. package/dist/client.js +159 -19
  9. package/dist/config.js +3 -2
  10. package/dist/continued.js +56 -1
  11. package/dist/decision-ui.js +5 -3
  12. package/dist/doctor.js +84 -16
  13. package/dist/file-lock.js +40 -5
  14. package/dist/flow-stats.js +18 -1
  15. package/dist/home-guard.js +336 -54
  16. package/dist/home-safety.js +2 -0
  17. package/dist/hud-queue.js +91 -0
  18. package/dist/install.js +15 -1
  19. package/dist/mcp-instructions.js +67 -28
  20. package/dist/mcp.js +129 -24
  21. package/dist/notice-linux.js +15 -4
  22. package/dist/notice-windows.js +2 -2
  23. package/dist/notifier.js +2 -1
  24. package/dist/notify.js +28 -9
  25. package/dist/open-in.js +4 -3
  26. package/dist/pickup.js +17 -0
  27. package/dist/plain.js +139 -3
  28. package/dist/profile.js +12 -8
  29. package/dist/protocol.js +1 -1
  30. package/dist/question-goal.js +74 -0
  31. package/dist/readiness-alert.js +24 -3
  32. package/dist/refusal.js +2 -2
  33. package/dist/relay.js +143 -28
  34. package/dist/removed.js +4 -4
  35. package/dist/run-control.js +4 -3
  36. package/dist/run-failure.js +67 -10
  37. package/dist/setup-changes.js +7 -6
  38. package/dist/signed-out.js +144 -21
  39. package/dist/spend.js +5 -4
  40. package/dist/tray.js +24 -6
  41. package/dist/update-check.js +2 -1
  42. package/dist/uri-handler.js +10 -2
  43. package/dist/which.js +2 -0
  44. package/dist/worker-policy.js +212 -10
  45. package/dist/worker.js +942 -133
  46. package/dist/worklist.js +31 -1
  47. package/helper/macos/main.swift +42 -3
  48. package/helper/macos/menubar.swift +482 -87
  49. package/helper/macos/prebuilt/manifest.json +5 -5
  50. package/helper/macos/prebuilt/pantheon-hud +0 -0
  51. package/helper/macos/prebuilt/pantheon-tray +0 -0
  52. package/package.json +1 -1
package/dist/brief.js CHANGED
@@ -1,4 +1,14 @@
1
1
  import { OWED_WORDS, plainRequest } from "./plain.js";
2
+ export function answeredQuestions(acts, isQuestionGoal, me, now = Date.now()) {
3
+ const asked = new Map(acts.filter((a) => a.act === "ASK" && a.from === me && !!a.goal && isQuestionGoal(a.goal)).map((a) => [a.id, a]));
4
+ return acts
5
+ .filter((a) => a.act === "ANSWER" && a.from !== me && !!a.ref && asked.has(a.ref) && now - a.ts < 86_400_000)
6
+ .sort((x, y) => x.ts - y.ts)
7
+ .map((a) => ({ from: plainText(a.from), question: plainText(asked.get(a.ref).body), answer: plainText(a.body), at: a.ts }));
8
+ }
9
+ function plainText(t) {
10
+ return String(t).replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029]+/g, " ");
11
+ }
2
12
  export function clip(value, max = 160) {
3
13
  const line = value.replace(/\s+/g, " ").trim();
4
14
  return line.length <= max ? line : `${line.slice(0, max - 1)}…`;
@@ -53,6 +63,13 @@ export function renderBrief(input) {
53
63
  lines.push(` ${(OWED_WORDS[o.kind] ?? o.kind.toLowerCase()).padEnd(22)} ${clip(plainRequest(o.body, input.person.member))}`);
54
64
  }
55
65
  }
66
+ if (input.answers?.length) {
67
+ lines.push("");
68
+ lines.push("answers to your questions (last 24h)");
69
+ for (const a of input.answers.slice(-6)) {
70
+ lines.push(` ${ageOf(a.at, now).padEnd(10)} ${clip(`${a.from} answered your question "${clip(a.question, 60)}": ${a.answer}`)}`);
71
+ }
72
+ }
56
73
  lines.push("");
57
74
  lines.push("your agent (last 24h)");
58
75
  if (!input.recentRuns.length) {