@kenkaiiii/gg-boss 4.3.140 → 4.3.141

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 (162) hide show
  1. package/dist/{chunk-JVQDTPYR.js → chunk-3EWLK53W.js} +18 -9
  2. package/dist/{chunk-JVQDTPYR.js.map → chunk-3EWLK53W.js.map} +1 -1
  3. package/dist/{chunk-5WNYQQPQ.js → chunk-QT366Y52.js} +4 -3
  4. package/dist/{chunk-5WNYQQPQ.js.map → chunk-QT366Y52.js.map} +1 -1
  5. package/dist/{chunk-PQAHDHVY.js → chunk-WJ4S4TOY.js} +3 -2
  6. package/dist/{chunk-PQAHDHVY.js.map → chunk-WJ4S4TOY.js.map} +1 -1
  7. package/dist/{chunk-B2WQ5E5J.js → chunk-YNWFCUMR.js} +2 -1
  8. package/dist/{chunk-B2WQ5E5J.js.map → chunk-YNWFCUMR.js.map} +1 -1
  9. package/dist/cli.js +2246 -182
  10. package/dist/cli.js.map +1 -1
  11. package/dist/{devtools-VBUDNGEI.js → devtools-4TI4D7F2.js} +3 -2
  12. package/dist/{devtools-VBUDNGEI.js.map → devtools-4TI4D7F2.js.map} +1 -1
  13. package/dist/{dist-7DAPKZGX.js → dist-VXOVSHZ5.js} +3 -2
  14. package/dist/{dist-7DAPKZGX.js.map → dist-VXOVSHZ5.js.map} +1 -1
  15. package/dist/{ignore-3AEIALHQ.js → ignore-76P4EAAU.js} +3 -2
  16. package/dist/{ignore-3AEIALHQ.js.map → ignore-76P4EAAU.js.map} +1 -1
  17. package/dist/index.js +21 -4
  18. package/dist/index.js.map +1 -1
  19. package/dist/{out-D65DTPFZ.js → out-XEXARMKS.js} +3 -2
  20. package/dist/{out-D65DTPFZ.js.map → out-XEXARMKS.js.map} +1 -1
  21. package/dist/pixel-WPYTQADG.js +14 -0
  22. package/dist/{pixel-fix-ALWXCLTS.js → pixel-fix-4WGZAJ5W.js} +4 -3
  23. package/dist/{pixel-fix-ALWXCLTS.js.map → pixel-fix-4WGZAJ5W.js.map} +1 -1
  24. package/package.json +10 -11
  25. package/dist/audio.d.ts +0 -21
  26. package/dist/audio.d.ts.map +0 -1
  27. package/dist/audio.js +0 -231
  28. package/dist/audio.js.map +0 -1
  29. package/dist/audio.test.d.ts +0 -2
  30. package/dist/audio.test.d.ts.map +0 -1
  31. package/dist/audio.test.js +0 -13
  32. package/dist/audio.test.js.map +0 -1
  33. package/dist/auto-update.d.ts +0 -24
  34. package/dist/auto-update.d.ts.map +0 -1
  35. package/dist/auto-update.js +0 -231
  36. package/dist/auto-update.js.map +0 -1
  37. package/dist/banner.d.ts +0 -17
  38. package/dist/banner.d.ts.map +0 -1
  39. package/dist/banner.js +0 -25
  40. package/dist/banner.js.map +0 -1
  41. package/dist/boss-footer.d.ts +0 -25
  42. package/dist/boss-footer.d.ts.map +0 -1
  43. package/dist/boss-footer.js +0 -107
  44. package/dist/boss-footer.js.map +0 -1
  45. package/dist/boss-phrases.d.ts +0 -9
  46. package/dist/boss-phrases.d.ts.map +0 -1
  47. package/dist/boss-phrases.js +0 -71
  48. package/dist/boss-phrases.js.map +0 -1
  49. package/dist/boss-store.d.ts +0 -245
  50. package/dist/boss-store.d.ts.map +0 -1
  51. package/dist/boss-store.js +0 -623
  52. package/dist/boss-store.js.map +0 -1
  53. package/dist/boss-system-prompt.d.ts +0 -3
  54. package/dist/boss-system-prompt.d.ts.map +0 -1
  55. package/dist/boss-system-prompt.js +0 -180
  56. package/dist/boss-system-prompt.js.map +0 -1
  57. package/dist/boss-tasks-overlay.d.ts +0 -22
  58. package/dist/boss-tasks-overlay.d.ts.map +0 -1
  59. package/dist/boss-tasks-overlay.js +0 -157
  60. package/dist/boss-tasks-overlay.js.map +0 -1
  61. package/dist/branding.d.ts +0 -32
  62. package/dist/branding.d.ts.map +0 -1
  63. package/dist/branding.js +0 -59
  64. package/dist/branding.js.map +0 -1
  65. package/dist/cli.d.ts +0 -3
  66. package/dist/cli.d.ts.map +0 -1
  67. package/dist/cli.smoke.test.d.ts +0 -2
  68. package/dist/cli.smoke.test.d.ts.map +0 -1
  69. package/dist/cli.smoke.test.js +0 -48
  70. package/dist/cli.smoke.test.js.map +0 -1
  71. package/dist/colors.d.ts +0 -14
  72. package/dist/colors.d.ts.map +0 -1
  73. package/dist/colors.js +0 -31
  74. package/dist/colors.js.map +0 -1
  75. package/dist/discover.d.ts +0 -13
  76. package/dist/discover.d.ts.map +0 -1
  77. package/dist/discover.js +0 -92
  78. package/dist/discover.js.map +0 -1
  79. package/dist/event-queue.d.ts +0 -16
  80. package/dist/event-queue.d.ts.map +0 -1
  81. package/dist/event-queue.js +0 -39
  82. package/dist/event-queue.js.map +0 -1
  83. package/dist/index.d.ts +0 -6
  84. package/dist/index.d.ts.map +0 -1
  85. package/dist/link-command.d.ts +0 -2
  86. package/dist/link-command.d.ts.map +0 -1
  87. package/dist/link-command.js +0 -120
  88. package/dist/link-command.js.map +0 -1
  89. package/dist/links.d.ts +0 -11
  90. package/dist/links.d.ts.map +0 -1
  91. package/dist/links.js +0 -22
  92. package/dist/links.js.map +0 -1
  93. package/dist/logger.d.ts +0 -41
  94. package/dist/logger.d.ts.map +0 -1
  95. package/dist/logger.js +0 -112
  96. package/dist/logger.js.map +0 -1
  97. package/dist/orchestrator-app.d.ts +0 -15
  98. package/dist/orchestrator-app.d.ts.map +0 -1
  99. package/dist/orchestrator-app.js +0 -599
  100. package/dist/orchestrator-app.js.map +0 -1
  101. package/dist/orchestrator.d.ts +0 -147
  102. package/dist/orchestrator.d.ts.map +0 -1
  103. package/dist/orchestrator.js +0 -707
  104. package/dist/orchestrator.js.map +0 -1
  105. package/dist/orchestrator.test.d.ts +0 -2
  106. package/dist/orchestrator.test.d.ts.map +0 -1
  107. package/dist/orchestrator.test.js +0 -55
  108. package/dist/orchestrator.test.js.map +0 -1
  109. package/dist/pixel-WB6VRJWP.js +0 -13
  110. package/dist/radio-picker.d.ts +0 -20
  111. package/dist/radio-picker.d.ts.map +0 -1
  112. package/dist/radio-picker.js +0 -31
  113. package/dist/radio-picker.js.map +0 -1
  114. package/dist/radio.d.ts +0 -43
  115. package/dist/radio.d.ts.map +0 -1
  116. package/dist/radio.js +0 -150
  117. package/dist/radio.js.map +0 -1
  118. package/dist/sessions.d.ts +0 -21
  119. package/dist/sessions.d.ts.map +0 -1
  120. package/dist/sessions.js +0 -122
  121. package/dist/sessions.js.map +0 -1
  122. package/dist/settings.d.ts +0 -11
  123. package/dist/settings.d.ts.map +0 -1
  124. package/dist/settings.js +0 -38
  125. package/dist/settings.js.map +0 -1
  126. package/dist/slash-commands.d.ts +0 -19
  127. package/dist/slash-commands.d.ts.map +0 -1
  128. package/dist/slash-commands.js +0 -76
  129. package/dist/slash-commands.js.map +0 -1
  130. package/dist/splash.d.ts +0 -21
  131. package/dist/splash.d.ts.map +0 -1
  132. package/dist/splash.js +0 -137
  133. package/dist/splash.js.map +0 -1
  134. package/dist/task-tools.d.ts +0 -18
  135. package/dist/task-tools.d.ts.map +0 -1
  136. package/dist/task-tools.js +0 -172
  137. package/dist/task-tools.js.map +0 -1
  138. package/dist/tasks-store.d.ts +0 -66
  139. package/dist/tasks-store.d.ts.map +0 -1
  140. package/dist/tasks-store.js +0 -199
  141. package/dist/tasks-store.js.map +0 -1
  142. package/dist/tasks-store.test.d.ts +0 -2
  143. package/dist/tasks-store.test.d.ts.map +0 -1
  144. package/dist/tasks-store.test.js +0 -138
  145. package/dist/tasks-store.test.js.map +0 -1
  146. package/dist/tool-formatters.d.ts +0 -7
  147. package/dist/tool-formatters.d.ts.map +0 -1
  148. package/dist/tool-formatters.js +0 -111
  149. package/dist/tool-formatters.js.map +0 -1
  150. package/dist/tools.d.ts +0 -26
  151. package/dist/tools.d.ts.map +0 -1
  152. package/dist/tools.js +0 -133
  153. package/dist/tools.js.map +0 -1
  154. package/dist/types.d.ts +0 -32
  155. package/dist/types.d.ts.map +0 -1
  156. package/dist/types.js +0 -2
  157. package/dist/types.js.map +0 -1
  158. package/dist/worker.d.ts +0 -47
  159. package/dist/worker.d.ts.map +0 -1
  160. package/dist/worker.js +0 -123
  161. package/dist/worker.js.map +0 -1
  162. /package/dist/{pixel-WB6VRJWP.js.map → pixel-WPYTQADG.js.map} +0 -0
@@ -1,180 +0,0 @@
1
- export function buildBossSystemPrompt(projects) {
2
- const projectList = projects.map((p) => `- "${p.name}" → ${p.cwd}`).join("\n");
3
- return `You are gg-boss, an orchestrator. The user talks only to you. You drive multiple ggcoder workers — one per project — by deciding what to ask each one, monitoring progress, verifying their work, and reporting back.
4
-
5
- # Projects you control
6
-
7
- ${projectList}
8
-
9
- # Scope tags on user messages
10
-
11
- Every user message arrives prefixed with a scope tag the user picked via a Tab-cycled pill:
12
-
13
- - \`[scope:all] ...\` — you MAY consider any project above. Default to ONE project unless the user's text clearly signals breadth ("audit all of them", "in pixel and world", "every project"). Multiple projects in one turn is fine only when the work is genuinely independent.
14
- - \`[scope:<project>] ...\` — focus on that project ONLY. Do not pull other workers in even when it would seem helpful. The user is narrowing on purpose.
15
-
16
- The tag is metadata. Strip it before relaying to a worker — workers should never see "[scope:foo]" in their prompts. **Also never reference the tag in your reply to the user.** Don't write things like "I'll assume both since you used [scope:all]" — the user picked the scope via a UI pill, they don't think of it as a string they typed. If you need to acknowledge breadth, say "since you're scoped to all projects" or just act on the inferred intent without naming the tag.
17
-
18
- # Events you receive
19
-
20
- Every user-role message is one of:
21
-
22
- 1. A direct user message — respond to the user.
23
- 2. \`[event:worker_turn_complete]\` — a worker finished a turn. Contains project, turn number, tools used (✓/✗), the worker's final text, AND a trailing \`other_workers:\` line listing every other project's current status (e.g. \`other_workers: B(working) C(idle) D(working)\`).
24
- 3. \`[event:worker_error]\` — a worker hit an error. Diagnose, then retry or surface to the user. Same \`other_workers:\` trailer.
25
-
26
- **Always read the \`other_workers:\` trailer before deciding "the run is done".** During a parallel dispatch you receive ONE event per finishing worker, in arrival order. It is wrong to treat the event you're processing as "the last one" unless \`other_workers:\` shows every other worker is \`idle\` (or \`error\`). If any are \`working\`, more events are coming — finish your routing for THIS event, then wait.
27
-
28
- **The \`other_workers:\` trailer is LIVE state. It is NOT memory, NOT cached, NOT stale.** It is read from the worker pool at the exact moment the event was dispatched to you. If it says \`A(working)\` even though you remember A finishing earlier, that means A was auto-dispatched to its next pending task by the orchestrator while you were processing a different worker's event. NEVER claim "all idle" or "round complete" based on your own memory of completion events when the trailer disagrees — the trailer wins.
29
-
30
- **Watch for the \`auto_dispatched_since_last_event:\` trailer.** When it appears, the orchestrator has automatically picked up the next pending task for those projects (because you didn't explicitly dispatch). Treat them as in-flight; their next \`worker_turn_complete\` will arrive in due course. Do NOT call \`prompt_worker\` or \`dispatch_pending\` for those projects again until that completion event arrives — the worker is already busy and the call will fail with "worker is busy".
31
-
32
- **Never call \`add_task\` without first calling \`list_tasks(project=X)\`** to check for an existing entry covering the same intent. Re-creating a task you already added (or an equivalent one) leads to the worker seeing the same prompt twice and wastes a turn. If a similar task exists in any state — pending, in_progress, blocked, or done — reuse it (use \`update_task\` or \`prompt_worker\` against it) rather than adding a duplicate.
33
-
34
- **Never re-dispatch a task whose \`status\` is \`done\`.** A done task has been completed and verified (or you would have re-prompted before marking done). Re-dispatching it makes the worker repeat work it already finished. If you genuinely think a done task needs more work, mark it \`update_task(id, "pending", "<reason>")\` first to make the rollback explicit.
35
-
36
- # Your tools
37
-
38
- Worker dispatch:
39
-
40
- - \`list_workers()\` — all projects, cwds, current statuses (idle/working/error).
41
- - \`get_worker_status(project)\` — single-project status check.
42
- - \`prompt_worker(project, message, fresh?)\` — send a prompt directly to a worker. FIRE-AND-FORGET. Returns immediately; you'll get \`worker_turn_complete\` later. NEVER call this on a worker whose status is "working".
43
- - \`get_worker_summary(project)\` — most recent turn summary. Use to inspect what was actually done.
44
-
45
- Task plan (persistent backlog, visible in the user's Ctrl+T overlay):
46
-
47
- - \`add_task(project, title, description, fresh?)\` — append a task to the plan. \`title\` is the short label shown in the overlay; \`description\` is what gets sent to the worker when dispatched.
48
- - \`list_tasks(project?, status?)\` — read the plan. Returns task ids you can act on.
49
- - \`update_task(id, status?, notes?)\` — mark a task done / blocked / skipped, or add commentary. Use this AFTER a worker_turn_complete to close out the task you dispatched.
50
- - \`dispatch_pending(project?)\` — send the next pending task. Without a \`project\` arg, dispatches one task per IDLE worker (parallel fan-out). With \`project\`, only that one. Marks each as in_progress.
51
-
52
- # When to use prompt_worker vs add_task + dispatch_pending
53
-
54
- The task system is for **backlog management** — work the user wants tracked, paused, reviewed in the Ctrl+T overlay, and resumed later. It is NOT a wrapper around every dispatch.
55
-
56
- **Default**: when the user asks for work, call \`prompt_worker\` directly. One project or many — multi-project does not imply tasks; just dispatch in parallel.
57
-
58
- **Use \`add_task\` only when the user's intent is to manage the plan itself** — adding to it, curating it, or deferring work for later review. The signal is the user describing the task system as the object of their request, not the work as the object. If you're unsure, don't use add_task; ask which they want.
59
-
60
- **Mutually exclusive paths in one turn**: dispatching (\`prompt_worker\`) and queuing (\`add_task\`) are different intents. Pick one. If you queued tasks, do not also dispatch them in the same reply — let the user run them when they're ready. If you're dispatching, don't also queue.
61
-
62
- **\`dispatch_pending\` is for an existing plan** — call it when the user wants to run what's already in the backlog.
63
-
64
- For substantive task generation when the user IS asking you to plan, see "Planning substantive tasks" below.
65
-
66
- # Planning substantive tasks
67
-
68
- When the user asks you to plan tasks across projects WITHOUT specifying what to do (e.g. "plan some tasks", "create work for each project"), DO NOT default to trivial reconnaissance like "ls -la", "git status", "summarize README". That wastes the parallel infrastructure on output the user could get themselves in 5 seconds.
69
-
70
- Instead, follow this order of preference:
71
-
72
- 1. **Recon first, then plan.** Send a quick \`prompt_worker(project, "Read your codebase briefly and report 3-5 concrete improvements you'd recommend — bugs, refactors, missing tests, dead code, type holes, perf issues. Be specific: file paths, what to change, why.")\` to each project IN PARALLEL. When the recon turns complete, READ the recommendations from each \`worker_turn_complete\`, then \`add_task\` for the meaty ones.
73
-
74
- 2. **Real work, not summaries.** A good task description tells the worker to CHANGE something and includes acceptance criteria the worker can self-check:
75
- - "Add unit tests for X — run \`pnpm test\` and report failures."
76
- - "Refactor Y to remove Z duplication. Confirm with \`pnpm check && pnpm lint\`."
77
- - "Find and fix any \`as any\` casts in src/ that aren't justified by a comment. Run \`pnpm check\`."
78
- - "Audit the auth flow for token-leakage paths and patch them. Verify with \`pnpm test src/auth\`."
79
-
80
- 3. **Bad task descriptions** (DO NOT generate these unless explicitly asked):
81
- - "Run \`ls -la\` and report" — no work, no value.
82
- - "Summarize README" — no work.
83
- - "Show git status" — the user can run that.
84
- - "List package.json scripts" — the user can read that file.
85
-
86
- 4. **Each \`description\` must include a verification step.** What command/check tells the worker the task is complete? Bake it in. \`pnpm check\`, \`pnpm test\`, \`pnpm lint\`, \`pnpm build\`, or a specific manual check. Workers won't run verification unless you tell them to — and "Status: UNVERIFIED" responses cost you a re-prompt round trip.
87
-
88
- 5. **Parallel-friendly chunking.** Across N projects, the work should be GENUINELY independent — no task depends on another project's output. If two tasks must coordinate, sequence them or fold them into one project.
89
-
90
- When in doubt about what work matters, ASK the user "what kind of work?" rather than fabricating busywork. But once you have direction, plan substantively.
91
-
92
- # Task lifecycle
93
-
94
- For every task you dispatch (via \`dispatch_pending\` OR via the user pressing Enter in the overlay), a \`worker_turn_complete\` event will arrive eventually. The orchestrator auto-marks the task \`done\` (or \`blocked\` if any tool failed). You can override this with \`update_task\` when you have better signal — e.g. status was DONE but cross-check failed → \`update_task(id, "pending", "re-prompted: ...")\` and re-dispatch.
95
-
96
- ## When to set \`fresh: true\`
97
-
98
- Workers keep their conversation across prompts — useful for follow-ups, harmful when the topic shifts.
99
-
100
- Set \`fresh: true\` when:
101
- - The new task is unrelated to whatever this worker was last doing.
102
- - The user pivots ("forget that — instead, do X").
103
- - The worker's recent turns went the wrong way and you want a clean slate.
104
-
105
- Leave it off (the default) when this is the same task continuing — follow-ups, corrections, iteration on one feature. Don't over-trigger.
106
-
107
- # How workers reply
108
-
109
- Every worker is auto-briefed (gg-boss handles that — not your job) to end its reply with:
110
-
111
- \`\`\`
112
- Changed: ...
113
- Skipped: ...
114
- Verified: ...
115
- Notes: ...
116
- Status: DONE | UNVERIFIED | PARTIAL | BLOCKED | INFO
117
- \`\`\`
118
-
119
- # How to react to a worker_turn_complete
120
-
121
- For every event, do TWO things — in this order:
122
-
123
- **Step 1 — cross-check the claim against \`tools_used\`.** Status is the worker's self-grade. It's a hint, not authoritative. Look for these red flags:
124
-
125
- - "Verified: pnpm test passes" but bash was never invoked → re-prompt to actually run them.
126
- - "Changed: foo.ts" but no edit/write tool in tools_used → re-prompt.
127
- - "I checked the logs" but no read tool was used → re-prompt.
128
- - Final text is vague with no relevant tools at all → re-prompt for specifics.
129
-
130
- If a red flag fires, re-prompt and STOP this routing — wait for the next worker_turn_complete.
131
-
132
- **Step 2 — if cross-check passes, route off Status:**
133
-
134
- - **DONE** — work complete + verified. Update task to done if not already, give the user a one-line outcome, then dispatch the next pending task for that project (or stay silent if none).
135
- - **UNVERIFIED** — work done but no checks ran. **Default action: re-prompt.** Send \`prompt_worker(project, "Verify your work: run <specific command from the task description> and report the exact output. If it fails, fix the failure and re-run until it passes.")\` and \`update_task(id, "in_progress", "re-prompted: awaiting verification")\`. Only accept UNVERIFIED without re-prompting if the task description explicitly said no verification was needed.
136
- - **PARTIAL** — only some of the task done; rest is in \`Skipped:\`. **Default action: re-prompt for the rest** with the specific Skipped items quoted back to the worker. Only surface to the user if the worker explicitly says they need more info you don't have.
137
- - **BLOCKED** — worker is stuck. Read \`Notes:\` carefully. Try ONE corrective re-prompt with a different approach (different command, different file, different strategy). If the worker comes back BLOCKED again on the same thing, then surface to the user with the worker's notes attached. \`update_task(id, "blocked", <one-line summary>)\` only after that second failure.
138
- - **INFO** — no work happened, the worker answered a question. Use the answer.
139
-
140
- ## Re-prompt rules — be specific, not generic
141
-
142
- A re-prompt is \`prompt_worker(project, <corrective instruction>, fresh=false)\`. The instruction must be SPECIFIC about what's missing or wrong:
143
-
144
- - BAD: "verify your work"
145
- - GOOD: "Run \`pnpm test src/auth/\` and paste the exact output. If any test fails, read the failure, fix the cause, and re-run until green."
146
-
147
- - BAD: "you skipped some things"
148
- - GOOD: "You marked these Skipped: 'integration test for refresh token'. Implement that test, run \`pnpm test src/auth/refresh.test.ts\`, and report the result."
149
-
150
- - BAD: "try again"
151
- - GOOD: "Your last attempt with \`rg\` failed because the binary isn't installed. Use \`grep -rn\` instead. Specifically: grep -rn 'TODO' src/ and report the count by directory."
152
-
153
- The worker has full context of its prior turn (you set fresh=false), so don't repeat the original task description — just point at what was missing or wrong, and what to do about it.
154
-
155
- ## How many re-prompts before giving up
156
-
157
- - After 1 re-prompt and still UNVERIFIED/BLOCKED → try ONE more with a different angle.
158
- - After 2 re-prompts on the same task with no progress → surface to the user. Mark the task \`update_task(id, "blocked", <reason>)\`.
159
-
160
- This keeps the loop bounded — workers don't grind forever on a stuck task.
161
-
162
- # Style
163
-
164
- - Terse with the user. They want results, not narration.
165
- - Routine dispatches don't need user permission — just call \`prompt_worker\`.
166
- - Parallel dispatch when work is independent; sequential when one depends on another.
167
- - Use ONLY the project names listed above. Never invent.
168
- - After a verified-good worker turn with nothing left to dispatch, give a one-line update to the user — or stay silent if there's truly nothing to add.
169
-
170
- <!-- uncached -->
171
- Today's date: ${formatToday()}`;
172
- }
173
- function formatToday() {
174
- const today = new Date();
175
- const day = today.getDate();
176
- const month = today.toLocaleString("en-US", { month: "long" });
177
- const year = today.getFullYear();
178
- return `${day} ${month} ${year}`;
179
- }
180
- //# sourceMappingURL=boss-system-prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boss-system-prompt.js","sourceRoot":"","sources":["../src/boss-system-prompt.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,QAAuB;IAC3D,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/E,OAAO;;;;EAIP,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAoKG,WAAW,EAAE,EAAE,CAAC;AAChC,CAAC;AAED,SAAS,WAAW;IAClB,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IACzB,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;IAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,GAAG,GAAG,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;AACnC,CAAC"}
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- import type { GGBoss } from "./orchestrator.js";
3
- import type { WorkerView } from "./boss-store.js";
4
- interface BossTasksOverlayProps {
5
- boss: GGBoss;
6
- workers: WorkerView[];
7
- onClose: () => void;
8
- }
9
- /**
10
- * Multi-project task overlay for gg-boss. Read-mostly: tasks are added by the
11
- * boss agent (via add_task tool), so the overlay is just a backlog viewer with
12
- * two actions — delete a stuck task, or run all pending across idle workers.
13
- *
14
- * Keybinds (all the user actually needs):
15
- * ↑↓ / k j navigate
16
- * d delete selected task
17
- * r dispatch_pending across all idle workers (parallel fan-out)
18
- * Esc close
19
- */
20
- export declare function BossTasksOverlay({ boss, workers, onClose, }: BossTasksOverlayProps): React.ReactElement;
21
- export {};
22
- //# sourceMappingURL=boss-tasks-overlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boss-tasks-overlay.d.ts","sourceRoot":"","sources":["../src/boss-tasks-overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiBlD,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,GACR,EAAE,qBAAqB,GAAG,KAAK,CAAC,YAAY,CAsM5C"}
@@ -1,157 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import React, { useCallback, useEffect, useRef, useState } from "react";
3
- import { Box, Text, useInput } from "ink";
4
- import { useTheme } from "@kenkaiiii/ggcoder/ui/theme";
5
- import { useTasksState, tasksStore } from "./tasks-store.js";
6
- import { bossStore } from "./boss-store.js";
7
- import { projectColor } from "./colors.js";
8
- import { COLORS } from "./branding.js";
9
- function statusGlyph(status) {
10
- switch (status) {
11
- case "done":
12
- return "✓";
13
- case "in_progress":
14
- return "~";
15
- case "blocked":
16
- return "✗";
17
- case "skipped":
18
- return "—";
19
- default:
20
- return " ";
21
- }
22
- }
23
- /**
24
- * Multi-project task overlay for gg-boss. Read-mostly: tasks are added by the
25
- * boss agent (via add_task tool), so the overlay is just a backlog viewer with
26
- * two actions — delete a stuck task, or run all pending across idle workers.
27
- *
28
- * Keybinds (all the user actually needs):
29
- * ↑↓ / k j navigate
30
- * d delete selected task
31
- * r dispatch_pending across all idle workers (parallel fan-out)
32
- * Esc close
33
- */
34
- export function BossTasksOverlay({ boss, workers, onClose, }) {
35
- const theme = useTheme();
36
- const tasksState = useTasksState();
37
- const tasks = tasksState.tasks;
38
- const [selectedIndex, setSelectedIndex] = useState(0);
39
- const [status, setStatusMsg] = useState("");
40
- const statusTimer = useRef(null);
41
- const showStatus = useCallback((msg) => {
42
- setStatusMsg(msg);
43
- if (statusTimer.current)
44
- clearTimeout(statusTimer.current);
45
- statusTimer.current = setTimeout(() => setStatusMsg(""), 2500);
46
- }, []);
47
- // Group tasks by project (in worker order).
48
- const groupedTasks = workers.map((w) => ({
49
- project: w.name,
50
- tasks: tasks
51
- .filter((t) => t.project === w.name)
52
- .sort((a, b) => a.createdAt.localeCompare(b.createdAt)),
53
- }));
54
- const flatTasks = groupedTasks.flatMap((g) => g.tasks);
55
- // Clamp selection.
56
- useEffect(() => {
57
- if (flatTasks.length === 0) {
58
- setSelectedIndex(0);
59
- }
60
- else if (selectedIndex >= flatTasks.length) {
61
- setSelectedIndex(flatTasks.length - 1);
62
- }
63
- }, [flatTasks.length, selectedIndex]);
64
- const selected = flatTasks[selectedIndex];
65
- // Cap how many tasks render at once so the live-area height stays bounded.
66
- // Ink's log-update mispositions the cursor when the live area is much
67
- // larger than the next frame — going from a 30-line tasks pane back to a
68
- // 5-line chat chrome was clipping the user's scrollback above on close.
69
- // Mirrors ggcoder's `maxVisible = 15` cap. Selection stays visible by
70
- // scrolling the window when the cursor reaches the bottom.
71
- const MAX_VISIBLE = 12;
72
- const startIdx = Math.max(0, Math.min(flatTasks.length - MAX_VISIBLE, selectedIndex - MAX_VISIBLE + 1, selectedIndex));
73
- const endIdx = Math.min(flatTasks.length, startIdx + MAX_VISIBLE);
74
- const visibleIdSet = new Set(flatTasks.slice(startIdx, endIdx).map((t) => t.id));
75
- const showingTop = startIdx > 0;
76
- const showingBottom = endIdx < flatTasks.length;
77
- useInput((input, key) => {
78
- if (key.escape) {
79
- onClose();
80
- return;
81
- }
82
- if (key.upArrow || input === "k") {
83
- setSelectedIndex((i) => Math.max(0, i - 1));
84
- return;
85
- }
86
- if (key.downArrow || input === "j") {
87
- setSelectedIndex((i) => Math.min(flatTasks.length - 1, i + 1));
88
- return;
89
- }
90
- if (input === "d" && selected) {
91
- void tasksStore.remove(selected.id).then(() => showStatus("Deleted"));
92
- return;
93
- }
94
- if (input === "r") {
95
- // Close immediately so the user lands back in the chat view and can
96
- // watch worker activity stream in. Dispatch fires in the background;
97
- // worker_turn_complete events flow into history as normal.
98
- onClose();
99
- void (async () => {
100
- const dispatched = [];
101
- for (const w of workers) {
102
- // nextDispatchable picks pending OR blocked — so blocked tasks get
103
- // retried alongside fresh pending ones. Pending is preferred.
104
- const next = tasksStore.nextDispatchable(w.name);
105
- if (!next)
106
- continue;
107
- // Reset blocked → pending so the dispatch path's in_progress flip
108
- // lands on a clean state and not "blocked → in_progress" (which
109
- // looks like a status going backwards in the overlay).
110
- if (next.status === "blocked") {
111
- await tasksStore.update(next.id, { status: "pending", notes: undefined });
112
- }
113
- const res = await boss.dispatchTaskById(next.id);
114
- if (res.ok)
115
- dispatched.push({ project: w.name, title: next.title });
116
- }
117
- if (dispatched.length === 0) {
118
- bossStore.appendInfo("No pending or blocked tasks to run.", "info");
119
- }
120
- else {
121
- bossStore.appendTaskDispatch(dispatched);
122
- }
123
- })();
124
- return;
125
- }
126
- });
127
- const doneCount = tasks.filter((t) => t.status === "done").length;
128
- const inProgressCount = tasks.filter((t) => t.status === "in_progress").length;
129
- const pendingCount = tasks.filter((t) => t.status === "pending").length;
130
- const blockedCount = tasks.filter((t) => t.status === "blocked").length;
131
- return (_jsxs(Box, { flexDirection: "column", marginTop: 1, paddingX: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: COLORS.primary, bold: true, children: "Tasks" }), _jsx(Text, { color: theme.textDim, children: ` · ${tasks.length} total · ` }), _jsx(CountsRow, { theme: theme, done: doneCount, active: inProgressCount, pending: pendingCount, blocked: blockedCount })] }), flatTasks.length === 0 && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: theme.textDim, children: [" No tasks yet. Ask the boss to plan some — e.g. ", _jsx(Text, { color: theme.text, children: "\"plan some work\"" }), "."] }) })), showingTop && _jsx(Text, { color: theme.textDim, children: ` ↑ ${startIdx} more above` }), groupedTasks.map((group, gIdx) => {
132
- const startInFlat = groupedTasks.slice(0, gIdx).reduce((acc, g) => acc + g.tasks.length, 0);
133
- const visibleInSection = group.tasks.filter((t) => visibleIdSet.has(t.id));
134
- if (visibleInSection.length === 0)
135
- return null;
136
- return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { children: [_jsx(Text, { color: projectColor(group.project), bold: true, children: group.project }), _jsx(Text, { color: theme.textDim, children: ` · ${group.tasks.length}` })] }), visibleInSection.map((task) => {
137
- const realIdx = startInFlat + group.tasks.indexOf(task);
138
- const isSelected = realIdx === selectedIndex;
139
- const prefix = isSelected ? "❯ " : " ";
140
- const glyph = statusGlyph(task.status);
141
- const color = isSelected
142
- ? theme.primary
143
- : task.status === "done"
144
- ? theme.success
145
- : task.status === "in_progress"
146
- ? theme.warning
147
- : task.status === "blocked"
148
- ? theme.error
149
- : theme.text;
150
- return (_jsxs(Text, { color: color, bold: isSelected, children: [prefix, "[", glyph, "] ", task.title] }, task.id));
151
- })] }, group.project));
152
- }), showingBottom && (_jsx(Text, { color: theme.textDim, children: ` ↓ ${flatTasks.length - endIdx} more below` })), status && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: theme.success, children: " " + status }) })), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: theme.textDim, children: [_jsx(Text, { color: theme.primary, children: "\u2191\u2193" }), " move · (", _jsx(Text, { color: theme.primary, children: "d" }), ")elete · (", _jsx(Text, { color: theme.primary, children: "r" }), ")un pending · ", _jsx(Text, { color: theme.primary, children: "ESC" }), " close"] }) })] }));
153
- }
154
- function CountsRow({ theme, done, active, pending, blocked, }) {
155
- return (_jsxs(Text, { children: [_jsxs(Text, { color: theme.success, children: [done, " done"] }), _jsx(Text, { color: theme.textDim, children: " \u00B7 " }), _jsxs(Text, { color: theme.warning, children: [active, " active"] }), _jsx(Text, { color: theme.textDim, children: " \u00B7 " }), _jsxs(Text, { color: theme.text, children: [pending, " pending"] }), blocked > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.textDim, children: " \u00B7 " }), _jsxs(Text, { color: theme.error, children: [blocked, " blocked"] })] }))] }));
156
- }
157
- //# sourceMappingURL=boss-tasks-overlay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boss-tasks-overlay.js","sourceRoot":"","sources":["../src/boss-tasks-overlay.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkC,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvC,SAAS,WAAW,CAAC,MAAkB;IACrC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,MAAM;YACT,OAAO,GAAG,CAAC;QACb,KAAK,aAAa;YAChB,OAAO,GAAG,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,GAAG,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,GAAG,CAAC;QACb;YACE,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAQD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,GACe;IACtB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;IAC/B,MAAM,CAAC,aAAa,EAAE,g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;
2
- export declare const BRAND = "GG Boss";
3
- export declare const AUTHOR = "Ken Kai";
4
- export declare const LOGO_LINES: readonly string[];
5
- export declare const LOGO_GAP = " ";
6
- /**
7
- * GG Boss brand gradient — crimson → fuchsia. Deliberately distinct:
8
- * - gg-coder is cool blues/violets
9
- * - gg-editor is warm oranges/yellows
10
- * - gg-boss is fiery reds/pinks/magentas
11
- *
12
- * Palindromic 12-stop sequence so the banner gradient animates smoothly
13
- * (read forward, then back).
14
- */
15
- export declare const GRADIENT: readonly string[];
16
- /**
17
- * Pulse colors for the activity-indicator spinner. Tighter loop than GRADIENT
18
- * so the spinner pulses crisply through the brand palette.
19
- */
20
- export declare const PULSE_COLORS: readonly string[];
21
- export declare const COLORS: {
22
- readonly primary: "#e11d48";
23
- readonly accent: "#d946ef";
24
- readonly text: "#e2e8f0";
25
- readonly textDim: "#6b7280";
26
- readonly success: "#4ade80";
27
- readonly warning: "#fbbf24";
28
- readonly error: "#f87171";
29
- };
30
- /** Clear the entire scrollback + visible screen and reset cursor to home. */
31
- export declare function clearScreen(): void;
32
- //# sourceMappingURL=branding.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../src/branding.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,QAAc,CAAC;AACnC,eAAO,MAAM,KAAK,YAAY,CAAC;AAC/B,eAAO,MAAM,MAAM,YAAY,CAAC;AAEhC,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAA+C,CAAC;AAExF,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAE9B;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAarC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EASzC,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;CAQT,CAAC;AAEX,6EAA6E;AAC7E,wBAAgB,WAAW,IAAI,IAAI,CAElC"}
package/dist/branding.js DELETED
@@ -1,59 +0,0 @@
1
- // Pull version from package.json so banner + boot output stay in sync with
2
- // what npm sees — bumping package.json now updates the TUI automatically.
3
- import pkg from "../package.json" with { type: "json" };
4
- export const VERSION = pkg.version;
5
- export const BRAND = "GG Boss";
6
- export const AUTHOR = "Ken Kai";
7
- export const LOGO_LINES = [" ▄▀▀▀ ▄▀▀▀", " █ ▀█ █ ▀█", " ▀▄▄▀ ▀▄▄▀"];
8
- export const LOGO_GAP = " ";
9
- /**
10
- * GG Boss brand gradient — crimson → fuchsia. Deliberately distinct:
11
- * - gg-coder is cool blues/violets
12
- * - gg-editor is warm oranges/yellows
13
- * - gg-boss is fiery reds/pinks/magentas
14
- *
15
- * Palindromic 12-stop sequence so the banner gradient animates smoothly
16
- * (read forward, then back).
17
- */
18
- export const GRADIENT = [
19
- "#dc2626", // red-600
20
- "#e11d48", // rose-600
21
- "#be185d", // pink-700
22
- "#a21caf", // fuchsia-700
23
- "#c026d3", // fuchsia-600
24
- "#d946ef", // fuchsia-500
25
- "#c026d3", // fuchsia-600 (back)
26
- "#a21caf", // fuchsia-700 (back)
27
- "#be185d", // pink-700 (back)
28
- "#e11d48", // rose-600 (back)
29
- "#dc2626", // red-600 (back)
30
- "#b91c1c", // red-700 (slight darker tail)
31
- ];
32
- /**
33
- * Pulse colors for the activity-indicator spinner. Tighter loop than GRADIENT
34
- * so the spinner pulses crisply through the brand palette.
35
- */
36
- export const PULSE_COLORS = [
37
- "#dc2626", // crimson
38
- "#e11d48", // rose
39
- "#be185d", // wine
40
- "#a21caf", // magenta
41
- "#c026d3", // fuchsia
42
- "#a21caf", // back
43
- "#be185d", // back
44
- "#e11d48", // back
45
- ];
46
- export const COLORS = {
47
- primary: "#e11d48", // crimson-rose — main brand color
48
- accent: "#d946ef", // fuchsia — secondary
49
- text: "#e2e8f0",
50
- textDim: "#6b7280",
51
- success: "#4ade80",
52
- warning: "#fbbf24",
53
- error: "#f87171",
54
- };
55
- /** Clear the entire scrollback + visible screen and reset cursor to home. */
56
- export function clearScreen() {
57
- process.stdout.write("\x1b[2J\x1b[3J\x1b[H");
58
- }
59
- //# sourceMappingURL=branding.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"branding.js","sourceRoot":"","sources":["../src/branding.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,0EAA0E;AAC1E,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAExD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AACnC,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC;AAC/B,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC;AAEhC,MAAM,CAAC,MAAM,UAAU,GAAsB,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AAExF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC;AAE9B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAsB;IACzC,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,cAAc;IACzB,SAAS,EAAE,cAAc;IACzB,SAAS,EAAE,cAAc;IACzB,SAAS,EAAE,qBAAqB;IAChC,SAAS,EAAE,qBAAqB;IAChC,SAAS,EAAE,kBAAkB;IAC7B,SAAS,EAAE,kBAAkB;IAC7B,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE,+BAA+B;CAC3C,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,OAAO;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,SAAS,EAAE,kCAAkC;IACtD,MAAM,EAAE,SAAS,EAAE,sBAAsB;IACzC,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;CACR,CAAC;AAEX,6EAA6E;AAC7E,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAC/C,CAAC"}
package/dist/cli.d.ts DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cli.smoke.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.smoke.test.d.ts","sourceRoot":"","sources":["../src/cli.smoke.test.ts"],"names":[],"mappings":""}
@@ -1,48 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import { spawn } from "node:child_process";
3
- import path from "node:path";
4
- import { fileURLToPath } from "node:url";
5
- /**
6
- * End-to-end smoke test for the published CLI binary. Invokes the built bin
7
- * the same way npm/pnpm would after a global install, asserts it prints help
8
- * and exits 0. Catches:
9
- * - missing or broken shebang on dist/cli.js
10
- * - unresolved imports after build (e.g. forgot to bundle an asset)
11
- * - assets/* files not copied into dist (the build:copy step regressing)
12
- * - a CLI flag-parsing crash
13
- *
14
- * Runs on Linux/macOS/Windows when invoked from the repo (CI matrix).
15
- */
16
- const here = path.dirname(fileURLToPath(import.meta.url));
17
- const cliPath = path.resolve(here, "..", "dist", "cli.js");
18
- function runCli(args) {
19
- return new Promise((resolve, reject) => {
20
- const child = spawn(process.execPath, [cliPath, ...args], {
21
- stdio: ["ignore", "pipe", "pipe"],
22
- });
23
- let stdout = "";
24
- let stderr = "";
25
- child.stdout.on("data", (b) => (stdout += b.toString()));
26
- child.stderr.on("data", (b) => (stderr += b.toString()));
27
- child.on("error", reject);
28
- child.on("close", (code) => resolve({ code: code ?? -1, stdout, stderr }));
29
- setTimeout(() => {
30
- child.kill("SIGKILL");
31
- reject(new Error("CLI smoke test timed out"));
32
- }, 10_000);
33
- });
34
- }
35
- describe("ggboss CLI smoke", () => {
36
- it("--help exits 0 and prints brand", async () => {
37
- const r = await runCli(["--help"]);
38
- expect(r.code).toBe(0);
39
- const out = r.stdout + r.stderr;
40
- expect(out.toLowerCase()).toContain("gg boss");
41
- expect(out.toLowerCase()).toContain("usage");
42
- });
43
- it("-h is the same as --help", async () => {
44
- const r = await runCli(["-h"]);
45
- expect(r.code).toBe(0);
46
- });
47
- });
48
- //# sourceMappingURL=cli.smoke.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.smoke.test.js","sourceRoot":"","sources":["../src/cli.smoke.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;GAUG;AAEH,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE3D,SAAS,MAAM,CAAC,IAAc;IAC5B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,KAAK,GAAG,KAAK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G,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QAChC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC/C,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;QACxC,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/B,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/dist/colors.d.ts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * Stable project-color palette. Hashing the project name to a fixed slot lets
3
- * every UI surface (worker event row, status bar, scope pill, dispatched
4
- * badge, etc.) tag the same project with the same hue — turns scrollback into
5
- * a glanceable colour-coded timeline.
6
- *
7
- * Picked to look decent in both dark and light themes — saturated enough to
8
- * read on dim backgrounds, soft enough not to scream.
9
- */
10
- export declare const PROJECT_COLORS: readonly string[];
11
- export declare function stableHash(s: string): number;
12
- /** Pick a color for a project — same project name always returns the same color. */
13
- export declare function projectColor(name: string): string;
14
- //# sourceMappingURL=colors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAS3C,CAAC;AAEF,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAM5C;AAED,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD"}
package/dist/colors.js DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * Stable project-color palette. Hashing the project name to a fixed slot lets
3
- * every UI surface (worker event row, status bar, scope pill, dispatched
4
- * badge, etc.) tag the same project with the same hue — turns scrollback into
5
- * a glanceable colour-coded timeline.
6
- *
7
- * Picked to look decent in both dark and light themes — saturated enough to
8
- * read on dim backgrounds, soft enough not to scream.
9
- */
10
- export const PROJECT_COLORS = [
11
- "#60a5fa", // blue
12
- "#a78bfa", // violet
13
- "#4ade80", // green
14
- "#fbbf24", // amber
15
- "#f472b6", // pink
16
- "#22d3ee", // cyan
17
- "#fb923c", // orange
18
- "#34d399", // emerald
19
- ];
20
- export function stableHash(s) {
21
- let h = 0;
22
- for (let i = 0; i < s.length; i++) {
23
- h = (h * 31 + s.charCodeAt(i)) | 0;
24
- }
25
- return Math.abs(h);
26
- }
27
- /** Pick a color for a project — same project name always returns the same color. */
28
- export function projectColor(name) {
29
- return PROJECT_COLORS[stableHash(name) % PROJECT_COLORS.length];
30
- }
31
- //# sourceMappingURL=colors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"colors.js","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,UAAU;CACtB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,CAAS;IAClC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,CAAE,CAAC;AACnE,CAAC"}
@@ -1,13 +0,0 @@
1
- export interface DiscoveredProject {
2
- name: string;
3
- path: string;
4
- lastActiveMs: number;
5
- lastActiveDisplay: string;
6
- }
7
- /**
8
- * Scan ~/.gg/sessions/ and return projects sorted most-recent first.
9
- * Each session directory's name is the encoded cwd (slashes → underscores);
10
- * we decode it back and verify the directory still exists on disk.
11
- */
12
- export declare function discoverProjects(): Promise<DiscoveredProject[]>;
13
- //# sourceMappingURL=discover.d.ts.map