@monoes/monomindcli 1.17.0 → 1.17.1

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 (176) hide show
  1. package/.claude/agents/engineering/engineering-security-engineer.md +1 -1
  2. package/.claude/commands/mastermind/_repeat.md +4 -0
  3. package/.claude/commands/mastermind/master.md +52 -1
  4. package/.claude/skills/mastermind/_repeat.md +2 -0
  5. package/dist/src/__tests__/browse-analyzer.test.js +42 -59
  6. package/dist/src/__tests__/browse-analyzer.test.js.map +1 -1
  7. package/dist/src/browser/dashboard/server.d.ts.map +1 -1
  8. package/dist/src/browser/dashboard/server.js +18 -0
  9. package/dist/src/browser/dashboard/server.js.map +1 -1
  10. package/dist/src/browser/dashboard/ui.html +37 -125
  11. package/dist/src/commands/agent-lifecycle.d.ts +17 -0
  12. package/dist/src/commands/agent-lifecycle.d.ts.map +1 -0
  13. package/dist/src/commands/agent-lifecycle.js +320 -0
  14. package/dist/src/commands/agent-lifecycle.js.map +1 -0
  15. package/dist/src/commands/agent-ops.d.ts +9 -0
  16. package/dist/src/commands/agent-ops.d.ts.map +1 -0
  17. package/dist/src/commands/agent-ops.js +329 -0
  18. package/dist/src/commands/agent-ops.js.map +1 -0
  19. package/dist/src/commands/agent.d.ts.map +1 -1
  20. package/dist/src/commands/agent.js +5 -907
  21. package/dist/src/commands/agent.js.map +1 -1
  22. package/dist/src/commands/analyze-ast.d.ts +26 -0
  23. package/dist/src/commands/analyze-ast.d.ts.map +1 -0
  24. package/dist/src/commands/analyze-ast.js +284 -0
  25. package/dist/src/commands/analyze-ast.js.map +1 -0
  26. package/dist/src/commands/analyze-boundaries.d.ts +14 -0
  27. package/dist/src/commands/analyze-boundaries.d.ts.map +1 -0
  28. package/dist/src/commands/analyze-boundaries.js +295 -0
  29. package/dist/src/commands/analyze-boundaries.js.map +1 -0
  30. package/dist/src/commands/analyze-diff.d.ts +8 -0
  31. package/dist/src/commands/analyze-diff.d.ts.map +1 -0
  32. package/dist/src/commands/analyze-diff.js +395 -0
  33. package/dist/src/commands/analyze-diff.js.map +1 -0
  34. package/dist/src/commands/analyze-graph.d.ts +14 -0
  35. package/dist/src/commands/analyze-graph.d.ts.map +1 -0
  36. package/dist/src/commands/analyze-graph.js +304 -0
  37. package/dist/src/commands/analyze-graph.js.map +1 -0
  38. package/dist/src/commands/analyze-imports.d.ts +11 -0
  39. package/dist/src/commands/analyze-imports.d.ts.map +1 -0
  40. package/dist/src/commands/analyze-imports.js +287 -0
  41. package/dist/src/commands/analyze-imports.js.map +1 -0
  42. package/dist/src/commands/analyze-symbols.d.ts +14 -0
  43. package/dist/src/commands/analyze-symbols.d.ts.map +1 -0
  44. package/dist/src/commands/analyze-symbols.js +302 -0
  45. package/dist/src/commands/analyze-symbols.js.map +1 -0
  46. package/dist/src/commands/analyze.d.ts +38 -0
  47. package/dist/src/commands/analyze.d.ts.map +1 -1
  48. package/dist/src/commands/analyze.js +12 -1827
  49. package/dist/src/commands/analyze.js.map +1 -1
  50. package/dist/src/commands/doctor-env-checks.d.ts +26 -0
  51. package/dist/src/commands/doctor-env-checks.d.ts.map +1 -0
  52. package/dist/src/commands/doctor-env-checks.js +189 -0
  53. package/dist/src/commands/doctor-env-checks.js.map +1 -0
  54. package/dist/src/commands/doctor-project-checks.d.ts +19 -0
  55. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -0
  56. package/dist/src/commands/doctor-project-checks.js +388 -0
  57. package/dist/src/commands/doctor-project-checks.js.map +1 -0
  58. package/dist/src/commands/doctor.d.ts.map +1 -1
  59. package/dist/src/commands/doctor.js +51 -942
  60. package/dist/src/commands/doctor.js.map +1 -1
  61. package/dist/src/commands/hive-mind-comms.d.ts +11 -0
  62. package/dist/src/commands/hive-mind-comms.d.ts.map +1 -0
  63. package/dist/src/commands/hive-mind-comms.js +242 -0
  64. package/dist/src/commands/hive-mind-comms.js.map +1 -0
  65. package/dist/src/commands/hive-mind-helpers.d.ts +35 -0
  66. package/dist/src/commands/hive-mind-helpers.d.ts.map +1 -0
  67. package/dist/src/commands/hive-mind-helpers.js +203 -0
  68. package/dist/src/commands/hive-mind-helpers.js.map +1 -0
  69. package/dist/src/commands/hive-mind-ops.d.ts +8 -0
  70. package/dist/src/commands/hive-mind-ops.d.ts.map +1 -0
  71. package/dist/src/commands/hive-mind-ops.js +233 -0
  72. package/dist/src/commands/hive-mind-ops.js.map +1 -0
  73. package/dist/src/commands/hive-mind-spawn.d.ts +12 -0
  74. package/dist/src/commands/hive-mind-spawn.d.ts.map +1 -0
  75. package/dist/src/commands/hive-mind-spawn.js +274 -0
  76. package/dist/src/commands/hive-mind-spawn.js.map +1 -0
  77. package/dist/src/commands/hive-mind.d.ts.map +1 -1
  78. package/dist/src/commands/hive-mind.js +10 -1129
  79. package/dist/src/commands/hive-mind.js.map +1 -1
  80. package/dist/src/commands/hooks-coverage-commands.d.ts +4 -4
  81. package/dist/src/commands/hooks-coverage-commands.d.ts.map +1 -1
  82. package/dist/src/commands/hooks-coverage-commands.js +19 -819
  83. package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
  84. package/dist/src/commands/hooks-coverage-gaps.d.ts +7 -0
  85. package/dist/src/commands/hooks-coverage-gaps.d.ts.map +1 -0
  86. package/dist/src/commands/hooks-coverage-gaps.js +334 -0
  87. package/dist/src/commands/hooks-coverage-gaps.js.map +1 -0
  88. package/dist/src/commands/hooks-coverage-routing.d.ts +7 -0
  89. package/dist/src/commands/hooks-coverage-routing.d.ts.map +1 -0
  90. package/dist/src/commands/hooks-coverage-routing.js +399 -0
  91. package/dist/src/commands/hooks-coverage-routing.js.map +1 -0
  92. package/dist/src/commands/init-subcommands.d.ts +8 -0
  93. package/dist/src/commands/init-subcommands.d.ts.map +1 -0
  94. package/dist/src/commands/init-subcommands.js +156 -0
  95. package/dist/src/commands/init-subcommands.js.map +1 -0
  96. package/dist/src/commands/init-upgrade.d.ts +6 -0
  97. package/dist/src/commands/init-upgrade.d.ts.map +1 -0
  98. package/dist/src/commands/init-upgrade.js +203 -0
  99. package/dist/src/commands/init-upgrade.js.map +1 -0
  100. package/dist/src/commands/init-wizard.d.ts +6 -0
  101. package/dist/src/commands/init-wizard.d.ts.map +1 -0
  102. package/dist/src/commands/init-wizard.js +246 -0
  103. package/dist/src/commands/init-wizard.js.map +1 -0
  104. package/dist/src/commands/init.d.ts.map +1 -1
  105. package/dist/src/commands/init.js +6 -623
  106. package/dist/src/commands/init.js.map +1 -1
  107. package/dist/src/commands/memory-admin.d.ts +10 -0
  108. package/dist/src/commands/memory-admin.d.ts.map +1 -0
  109. package/dist/src/commands/memory-admin.js +433 -0
  110. package/dist/src/commands/memory-admin.js.map +1 -0
  111. package/dist/src/commands/memory-crud.d.ts +9 -0
  112. package/dist/src/commands/memory-crud.d.ts.map +1 -0
  113. package/dist/src/commands/memory-crud.js +342 -0
  114. package/dist/src/commands/memory-crud.js.map +1 -0
  115. package/dist/src/commands/memory-list.d.ts +10 -0
  116. package/dist/src/commands/memory-list.d.ts.map +1 -0
  117. package/dist/src/commands/memory-list.js +321 -0
  118. package/dist/src/commands/memory-list.js.map +1 -0
  119. package/dist/src/commands/memory-transfer.d.ts +9 -0
  120. package/dist/src/commands/memory-transfer.d.ts.map +1 -0
  121. package/dist/src/commands/memory-transfer.js +372 -0
  122. package/dist/src/commands/memory-transfer.js.map +1 -0
  123. package/dist/src/commands/memory.d.ts +6 -0
  124. package/dist/src/commands/memory.d.ts.map +1 -1
  125. package/dist/src/commands/memory.js +10 -1441
  126. package/dist/src/commands/memory.js.map +1 -1
  127. package/dist/src/commands/neural-core.d.ts +8 -0
  128. package/dist/src/commands/neural-core.d.ts.map +1 -0
  129. package/dist/src/commands/neural-core.js +274 -0
  130. package/dist/src/commands/neural-core.js.map +1 -0
  131. package/dist/src/commands/neural-optimize.d.ts +7 -0
  132. package/dist/src/commands/neural-optimize.d.ts.map +1 -0
  133. package/dist/src/commands/neural-optimize.js +332 -0
  134. package/dist/src/commands/neural-optimize.js.map +1 -0
  135. package/dist/src/commands/neural-registry.d.ts +7 -0
  136. package/dist/src/commands/neural-registry.d.ts.map +1 -0
  137. package/dist/src/commands/neural-registry.js +290 -0
  138. package/dist/src/commands/neural-registry.js.map +1 -0
  139. package/dist/src/commands/neural.d.ts.map +1 -1
  140. package/dist/src/commands/neural.js +3 -974
  141. package/dist/src/commands/neural.js.map +1 -1
  142. package/dist/src/commands/platforms.d.ts.map +1 -1
  143. package/dist/src/commands/platforms.js +327 -7
  144. package/dist/src/commands/platforms.js.map +1 -1
  145. package/dist/src/commands/security-cve.d.ts +6 -0
  146. package/dist/src/commands/security-cve.d.ts.map +1 -0
  147. package/dist/src/commands/security-cve.js +310 -0
  148. package/dist/src/commands/security-cve.js.map +1 -0
  149. package/dist/src/commands/security-misc.d.ts +9 -0
  150. package/dist/src/commands/security-misc.d.ts.map +1 -0
  151. package/dist/src/commands/security-misc.js +293 -0
  152. package/dist/src/commands/security-misc.js.map +1 -0
  153. package/dist/src/commands/security-scan.d.ts +18 -0
  154. package/dist/src/commands/security-scan.d.ts.map +1 -0
  155. package/dist/src/commands/security-scan.js +328 -0
  156. package/dist/src/commands/security-scan.js.map +1 -0
  157. package/dist/src/commands/security.d.ts.map +1 -1
  158. package/dist/src/commands/security.js +3 -958
  159. package/dist/src/commands/security.js.map +1 -1
  160. package/dist/src/commands/session.js +1 -1
  161. package/dist/src/commands/session.js.map +1 -1
  162. package/dist/src/commands/swarm.d.ts.map +1 -1
  163. package/dist/src/commands/swarm.js +23 -17
  164. package/dist/src/commands/swarm.js.map +1 -1
  165. package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
  166. package/dist/src/mcp-tools/swarm-tools.js +77 -0
  167. package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
  168. package/dist/src/parser.d.ts.map +1 -1
  169. package/dist/src/parser.js +11 -6
  170. package/dist/src/parser.js.map +1 -1
  171. package/dist/src/routing/llm-caller.d.ts.map +1 -1
  172. package/dist/src/routing/llm-caller.js +1 -2
  173. package/dist/src/routing/llm-caller.js.map +1 -1
  174. package/dist/tsconfig.tsbuildinfo +1 -1
  175. package/package.json +2 -3
  176. package/scripts/understand-analyze.mjs +1 -1
@@ -24,7 +24,7 @@ capability:
24
24
  model_preference: opus
25
25
  termination: All identified vulnerabilities have remediation steps documented
26
26
  triggers:
27
- - pattern: "\\b(auth|jwt|session|oauth|saml|oidc|csrf|xss|sql.injection|ssrf|rce|lfi)\\b"
27
+ - pattern: "\\b(jwt|oauth|saml|oidc|csrf|xss|sql.injection|ssrf|rce|lfi|session\\W{0,3}(hijack|fixation|token\\W{0,3}theft)\\w*|auth\\w*\\W{0,3}(bypass|bug|vuln|flaw|exploit)\\w*)\\b"
28
28
  mode: "inject"
29
29
  - pattern: "CVE-\\d{4}-\\d+"
30
30
  mode: "inject"
@@ -325,6 +325,8 @@ RECENT_HIL=$(find . -maxdepth 3 \( -name "humaninloop*.md" -o -name "humaninloop
325
325
 
326
326
  **Skip this section if `tillend_mode` is not true.** Proceed to section 5.
327
327
 
328
+ **`LOOP_ASYNC_PENDING` escape hatch:** If the calling skill set `LOOP_ASYNC_PENDING=true` before invoking the postamble (because it spawned background agents whose results have not yet arrived in this turn), skip the empty-round check entirely — treat this round as non-empty and go directly to section 6 to schedule the next run. The next scheduled run will evaluate results from the agents that are currently in-flight. Output: `[tillend] Async work in flight — deferring empty-round check to run <next_rep>.`
329
+
328
330
  After each run in tillend mode, evaluate whether this run produced **zero findings and zero actions**. The loop stops only when a complete round finds nothing new and makes no changes — not when the AI predicts there is nothing left.
329
331
 
330
332
  **You (the AI running the loop) must now assess your own output from this run.** Answer these two questions:
@@ -459,6 +461,8 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
459
461
 
460
462
  ## Notes for Calling Commands
461
463
 
464
+ - **Async agents in loop mode**: In `--repeat` or `--tillend` mode, all subagents MUST be synchronous (`run_in_background: false` or omitted). The postamble's empty-round check runs in the same turn as the command — background agents complete in a later turn and their output is invisible to the check. If a skill must go async (e.g. it needs to spawn a long-running agent), set `LOOP_ASYNC_PENDING=true` before invoking the postamble; section 4 will skip the empty-round check and schedule the next run unconditionally. The next run will then evaluate the results.
465
+ - **Loop state is durable across turns**: The counter and all loop parameters survive across `ScheduleWakeup` fires via two mechanisms: (1) `--rep <N> --loop <ID>` is re-encoded in every ScheduleWakeup prompt, and (2) the `.monomind/loops/<ID>.json` file stores current state persistently. There is no in-memory counter — the counter is always re-read from the prompt flags or the file.
462
466
  - **`<command_slug>`**: lowercase command name without namespace (`build` for `/mastermind:build`, `mastermind-idea` for `/mastermind:idea`)
463
467
  - **Dashboard**: the monomind panel reads `.monomind/loops/*.json`; `type` field is `"repeat"` or `"tillend"`; HIL status shows as `"hil:pending"`
464
468
  - **Stopping a loop**: create `.monomind/loops/${LOOP_ID}.stop` or delete the `.json` file; the next wake-up detects it
@@ -347,6 +347,21 @@ curl -s -o /dev/null -X POST "${CTRL_URL}/api/mastermind/event" \
347
347
  '{type:"session:start",session:$sid,prompt:$prompt,mode:$mode,project:$proj,ts:(now*1000|floor)}')" || true
348
348
  ```
349
349
 
350
+ ### Step 3.5 — Design Gate
351
+
352
+ <HARD-GATE>
353
+ STOP before Step 4. If `domains_needed` includes `build` (or any code/feature/fix work):
354
+
355
+ 1. Invoke `Skill("mastermind:design")` NOW — pass `resolved_prompt` as the task description
356
+ 2. Do NOT write any code, do NOT spawn any domain managers, do NOT proceed to Step 4 until the design skill returns with an approved spec
357
+ 3. When design returns: save the approved spec as `build_spec` in `current.json`
358
+ 4. Only then continue to Step 4
359
+
360
+ If `domains_needed` contains ONLY non-build domains (marketing, sales, research, content, ops, finance, idea): skip this gate and go directly to Step 4.
361
+
362
+ Rationale: without a design gate, master spawns agents before the user has confirmed what to build. The design gate replicates the superpowers workflow: questions → approaches → spec approval → plan → execute.
363
+ </HARD-GATE>
364
+
350
365
  ### Step 4 — Decompose
351
366
 
352
367
  For each domain in `domains_needed`, assess complexity:
@@ -423,7 +438,39 @@ If mode = confirm: show plan and wait for user response. Valid responses:
423
438
  - Any modification (e.g. "add sales domain", "remove marketing") — apply the change, re-show the plan, wait again
424
439
  - "cancel" or "stop" — emit `session:complete` with `status: blocked`, reason "cancelled by user", then STOP
425
440
 
426
- If mode = auto: proceed immediately.
441
+ After the user says "go" (and `build` is in `domains_needed`), ask once:
442
+ > "For the build work: **subagents** (recommended — fresh agent per task with 2-stage review, like mastermind:taskdev) or **inline** (direct execution, mastermind:execute)?"
443
+
444
+ - "subagents" → `build_exec_mode = "taskdev"`
445
+ - "inline" → `build_exec_mode = "execute"`
446
+ - No answer / skipped → `build_exec_mode = "taskdev"` (default)
447
+
448
+ If mode = auto: `build_exec_mode = "taskdev"` (default).
449
+
450
+ **Persist `build_exec_mode` to `current.json`** (required — Phase C reads it from there):
451
+
452
+ ```bash
453
+ REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
454
+ _get_mono_dir() {
455
+ local w="${1:-$(pwd)}"
456
+ if [ -d "$w/.git" ]; then echo "$w/.git/monomind"; return; fi
457
+ if [ -f "$w/.git" ]; then
458
+ local m; m=$(grep '^gitdir:' "$w/.git" | sed 's/gitdir: *//')
459
+ [ -z "$m" ] && { echo "$w/.monomind"; return; }
460
+ [[ "$m" != /* ]] && m="$w/$m"
461
+ echo "$(dirname "$(dirname "$m")")/monomind"; return
462
+ fi
463
+ echo "$w/.monomind"
464
+ }
465
+ MONO_DIR=$(_get_mono_dir "$REPO_ROOT")
466
+ SESSION_STATE="$MONO_DIR/sessions/current.json"
467
+ # LLM: replace EXEC_MODE_VALUE with the resolved value: taskdev or execute
468
+ build_exec_mode="EXEC_MODE_VALUE"
469
+ [ "$build_exec_mode" = "EXEC_MODE_VALUE" ] && build_exec_mode="taskdev"
470
+ jq --arg m "$build_exec_mode" '. + {build_exec_mode: $m}' \
471
+ "$SESSION_STATE" > "$SESSION_STATE.tmp" && mv "$SESSION_STATE.tmp" "$SESSION_STATE"
472
+ echo "build_exec_mode=$build_exec_mode written to current.json"
473
+ ```
427
474
 
428
475
  ### Step 6 — Monotask Setup
429
476
 
@@ -678,12 +725,15 @@ for domain in $(jq -r '.domains_needed[]? // empty' "$SESSION_STATE" | grep -v '
678
725
  if [ -z "$board_id" ]; then
679
726
  echo "WARN: DOMAIN=$domain has no board_id — Step 6 may not have run or monotask is missing. Task agent will run without board tracking."
680
727
  fi
728
+ exec_mode=""
729
+ [ "$domain" = "build" ] && exec_mode=$(jq -r '.build_exec_mode // "taskdev"' "$SESSION_STATE")
681
730
  echo "DOMAIN=$domain \
682
731
  MANAGER=$(jq -r --arg d "$domain" '.domain_managers[$d] // "coordinator"' "$SESSION_STATE") \
683
732
  BOARD=$board_id \
684
733
  TODO=$(jq -r --arg d "$domain" '.todo_cols[$d] // ""' "$SESSION_STATE") \
685
734
  DOING=$(jq -r --arg d "$domain" '.doing_cols[$d] // ""' "$SESSION_STATE") \
686
735
  DONE=$(jq -r --arg d "$domain" '.done_cols[$d] // ""' "$SESSION_STATE") \
736
+ EXEC_MODE=$exec_mode \
687
737
  GOAL=$(jq -r --arg d "$domain" '.domain_goals[$d] // .prompt' "$SESSION_STATE" | tr -d '\n')"
688
738
  done
689
739
  ```
@@ -698,6 +748,7 @@ Each Task call must include a complete briefing following the Monotask Task Brie
698
748
  - Instruction to create monotask cards directly using `monotask card create $BOARD_ID $COL_TODO_ID "<title>" --json` for all sub-tasks
699
749
  - Instruction to use `Skill("mastermind:do")` to execute tasks (Task agents have Skill tool access — do NOT use slash command syntax)
700
750
  - Instruction to spawn specialized agents using the domain-appropriate swarm topology
751
+ - **For the `build` domain only:** include `build_exec_mode` (value: `"taskdev"` or `"execute"`) and instruct the manager: "Use `Skill("mastermind:taskdev")` if build_exec_mode is `taskdev`, or `Skill("mastermind:execute")` if `execute`. This was chosen by the user in Step 5."
701
752
  - Instruction to return the unified output schema when done
702
753
 
703
754
  Example Task call for Development Manager. Substitute all **pre-known** `<…>` placeholders (project_name, SESSION_ID, board/col IDs, goals, manager name) before calling Task. Placeholders like `<status>`, `<path1>`, `<action1>` are filled at runtime by the spawned agent — do not attempt to substitute them. `subagent_type` is the **string value** of `$domain_manager_build` (e.g. `"Backend Architect"`), not a variable reference.
@@ -27,6 +27,8 @@ If the stop file exists:
27
27
 
28
28
  ## Step 2 — Tillend termination check (tillend mode only — skip for fixed-count)
29
29
 
30
+ **`LOOP_ASYNC_PENDING` escape hatch:** If the calling skill set `LOOP_ASYNC_PENDING=true` before invoking this postamble (because it spawned background agents whose results have not yet arrived), skip the empty-round check and go directly to Step 4 to schedule the next run. Output: `[tillend] Async work in flight — deferring empty-round check to run <next_rep>.`
31
+
30
32
  Evaluate now whether this run produced **zero findings AND zero actions**:
31
33
 
32
34
  - **Findings**: issues found, problems detected, items flagged, security vulnerabilities, tasks discovered, errors reported
@@ -1,85 +1,68 @@
1
1
  import { describe, it, expect, vi, beforeEach } from 'vitest';
2
- // Shared mock instance so tests can override `create` per-test
3
- const mockCreate = vi.fn().mockResolvedValue({
4
- content: [{
5
- type: 'text',
6
- text: JSON.stringify({
7
- id: 'linkedin:comment_post',
8
- platform: 'linkedin',
9
- name: 'Comment on Post',
10
- params: ['post_url', 'text'],
11
- steps: [
12
- { type: 'navigate', url: '{{params.post_url}}' },
13
- { type: 'find', selectors: ['.comment-box'], as: 'box' },
14
- { type: 'click', target: '{{box}}' },
15
- { type: 'type', target: '{{box}}', text: '{{params.text}}', humanDelay: true },
16
- { type: 'wait', condition: 'network_idle', timeout: 3000 },
17
- ],
18
- }),
19
- }],
2
+ import { EventEmitter } from 'events';
3
+ // Mock child_process.spawn so tests don't invoke the real claude CLI
4
+ vi.mock('child_process', async (importOriginal) => {
5
+ const actual = await importOriginal();
6
+ return { ...actual, spawn: vi.fn() };
20
7
  });
21
- // Mock Anthropic SDK before importing analyzer
22
- vi.mock('@anthropic-ai/sdk', () => {
23
- const MockAnthropic = vi.fn(function () {
24
- this.messages = { create: mockCreate };
8
+ async function makeSpawnMock(stdout, exitCode = 0) {
9
+ const { spawn } = vi.mocked(await import('child_process'));
10
+ spawn.mockImplementationOnce(() => {
11
+ const proc = new EventEmitter();
12
+ proc.stdout = new EventEmitter();
13
+ proc.stderr = new EventEmitter();
14
+ proc.kill = vi.fn();
15
+ setTimeout(() => {
16
+ proc.stdout.emit('data', Buffer.from(stdout));
17
+ proc.emit('close', exitCode);
18
+ }, 0);
19
+ return proc;
25
20
  });
26
- return { default: MockAnthropic };
27
- });
21
+ }
22
+ const VALID_ACTION_DEF = {
23
+ id: 'linkedin:comment_post',
24
+ platform: 'linkedin',
25
+ name: 'Comment on Post',
26
+ params: ['post_url', 'text'],
27
+ steps: [
28
+ { type: 'navigate', url: '{{params.post_url}}' },
29
+ { type: 'find', selectors: ['.comment-box'], as: 'box' },
30
+ { type: 'click', target: '{{box}}' },
31
+ { type: 'type', target: '{{box}}', text: '{{params.text}}', humanDelay: true },
32
+ { type: 'wait', condition: 'network_idle', timeout: 3000 },
33
+ ],
34
+ };
28
35
  function mockPage(url = 'https://linkedin.com/feed', title = 'LinkedIn') {
29
36
  return {
30
37
  url: vi.fn().mockResolvedValue(url),
31
38
  evaluate: vi.fn().mockImplementation((expr) => {
32
39
  if (expr === 'document.title')
33
40
  return Promise.resolve(title);
34
- return Promise.resolve('[]'); // empty elements for DOM capture
41
+ return Promise.resolve('[]');
35
42
  }),
36
43
  };
37
44
  }
38
45
  describe('analyzePageForAction', () => {
39
46
  let analyzePageForAction;
40
47
  beforeEach(async () => {
41
- mockCreate.mockResolvedValue({
42
- content: [{
43
- type: 'text',
44
- text: JSON.stringify({
45
- id: 'linkedin:comment_post',
46
- platform: 'linkedin',
47
- name: 'Comment on Post',
48
- params: ['post_url', 'text'],
49
- steps: [
50
- { type: 'navigate', url: '{{params.post_url}}' },
51
- { type: 'find', selectors: ['.comment-box'], as: 'box' },
52
- { type: 'click', target: '{{box}}' },
53
- { type: 'type', target: '{{box}}', text: '{{params.text}}', humanDelay: true },
54
- { type: 'wait', condition: 'network_idle', timeout: 3000 },
55
- ],
56
- }),
57
- }],
58
- });
48
+ vi.resetModules();
59
49
  const mod = await import('@monoes/monobrowse');
60
50
  analyzePageForAction = mod.analyzePageForAction;
61
- });
62
- it('returns a valid ActionDef from mocked Claude response', async () => {
63
- const page = mockPage();
64
- // Pass a dummy key via options (Anthropic SDK is mocked no real call is made)
65
- const result = await analyzePageForAction(page, 'comment on a LinkedIn post', { apiKey: 'sk-test' });
51
+ }, 20000); // monolean: re-importing the workspace package can exceed the 10s default under full-suite parallel load
52
+ it('returns a valid ActionDef from mocked claude --print response', async () => {
53
+ await makeSpawnMock(JSON.stringify(VALID_ACTION_DEF));
54
+ const result = await analyzePageForAction(mockPage(), 'comment on a LinkedIn post');
66
55
  expect(result.id).toBe('linkedin:comment_post');
67
56
  expect(result.steps).toHaveLength(5);
68
57
  expect(result.params).toContain('text');
69
58
  });
70
- it('throws on invalid JSON from Claude', async () => {
71
- mockCreate.mockResolvedValueOnce({
72
- content: [{ type: 'text', text: 'not json at all' }],
73
- });
74
- const page = mockPage();
75
- await expect(analyzePageForAction(page, 'test', { apiKey: 'sk-test' })).rejects.toThrow('invalid JSON');
59
+ it('throws on invalid JSON from claude', async () => {
60
+ await makeSpawnMock('not json at all');
61
+ await expect(analyzePageForAction(mockPage(), 'test')).rejects.toThrow('invalid JSON');
76
62
  });
77
63
  it('throws when ActionDef is missing id', async () => {
78
- mockCreate.mockResolvedValueOnce({
79
- content: [{ type: 'text', text: JSON.stringify({ steps: [] }) }],
80
- });
81
- const page = mockPage();
82
- await expect(analyzePageForAction(page, 'test', { apiKey: 'sk-test' })).rejects.toThrow('invalid ActionDef');
64
+ await makeSpawnMock(JSON.stringify({ steps: [] }));
65
+ await expect(analyzePageForAction(mockPage(), 'test')).rejects.toThrow('invalid ActionDef');
83
66
  });
84
67
  });
85
68
  //# sourceMappingURL=browse-analyzer.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browse-analyzer.test.js","sourceRoot":"","sources":["../../../src/__tests__/browse-analyzer.test.ts"],"names":[],"mappings":"AAAA,OAAO,E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,CAAC,oBAAoB,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC9F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/browser/dashboard/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,sBAAsB,CAAC;AAKjE,UAAU,eAAe;IACvB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAID,wBAAgB,kBAAkB,CAAC,IAAI,SAAe,GAAG,eAAe,CAuDvE"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/browser/dashboard/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,sBAAsB,CAAC;AAKjE,UAAU,eAAe;IACvB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAID,wBAAgB,kBAAkB,CAAC,IAAI,SAAe,GAAG,eAAe,CAuEvE"}
@@ -30,6 +30,24 @@ export function getDashboardServer(port = DEFAULT_PORT) {
30
30
  res.end(JSON.stringify(recentRuns));
31
31
  return;
32
32
  }
33
+ if (req.method === 'POST' && req.url === '/api/mastermind/event') {
34
+ const chunks = [];
35
+ req.on('data', (chunk) => chunks.push(chunk));
36
+ req.on('end', () => {
37
+ try {
38
+ const body = Buffer.concat(chunks).toString('utf8');
39
+ JSON.parse(body); // validate before broadcast
40
+ for (const client of clients) {
41
+ if (client.readyState === client.OPEN)
42
+ client.send(body);
43
+ }
44
+ }
45
+ catch { }
46
+ res.writeHead(200, { 'Content-Type': 'application/json' });
47
+ res.end('{"ok":true}');
48
+ });
49
+ return;
50
+ }
33
51
  res.writeHead(404);
34
52
  res.end();
35
53
  });
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../src/browser/dashboard/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6C,MAAM,MAAM,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,eAAe,EAAkB,MAAM,IAAI,CAAC;AAGrD,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,YAAY,GAAG,IAAI,CAAC;AAQ1B,IAAI,QAAQ,GAA2B,IAAI,CAAC;AAE5C,MAAM,UAAU,kBAAkB,CAAC,IAAI,GAAG,YAAY;IACpD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAE9B,MAAM,UAAU,GAAgB,EAAE,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAa,CAAC;IACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAE5C,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,GAAoB,EAAE,GAAmB,EAAE,EAAE;QAClF,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,GAAG,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;YAC5C,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAC9C,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC,CAAC;gBACpD,GAAG,CAAC,GAAG,CAAC,IA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SAAS,CAAC,KAAgB;YACxB,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAClC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,IAAI,MAAM,CAAC,UAAU,KAAK,MAAM,CAAC,IAAI;oBAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC;QACD,KAAK;YACH,UAAU,CAAC,KAAK,EAAE,CAAC;YACnB,GAAG,CAAC,KAAK,EAAE,CAAC;YACZ,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;KACF,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -420,8 +420,9 @@ body { background: #0b0b14; color: #ccc; font-family: system-ui,-apple-system,sa
420
420
  <!-- ── top bar ─────────────────────────────────────── -->
421
421
  <div id="topbar">
422
422
  <span class="logo">monomind <span>dashboard</span></span>
423
- <span class="pill pill-run" id="p-workflows" title="Total workflows">⚡ workflows</span>
424
- <span class="pill pill-done" id="p-actions" title="Total actions">✓ actions</span>
423
+ <span class="pill pill-run" id="p-run">● 0</span>
424
+ <span class="pill pill-done" id="p-done">✓ 0</span>
425
+ <span class="pill pill-fail" id="p-fail">✗ 0</span>
425
426
  <span id="conn">
426
427
  <span id="conn-dot"></span>
427
428
  <span id="conn-label">connecting…</span>
@@ -434,9 +435,12 @@ body { background: #0b0b14; color: #ccc; font-family: system-ui,-apple-system,sa
434
435
  <!-- sidebar -->
435
436
  <nav id="sidebar">
436
437
  <div class="nav-section-label">Project</div>
437
- <div class="nav-item active" data-panel="monoagent">
438
- <span class="nav-icon">🤖</span> MonoAgent
439
- <span class="nav-badge green" id="nb-ma">0</span>
438
+ <div class="nav-item active" data-panel="playbooks">
439
+ <span class="nav-icon">⚡</span> Runs
440
+ <span class="nav-badge" id="nb-run">0</span>
441
+ </div>
442
+ <div class="nav-item" data-panel="builder">
443
+ <span class="nav-icon">🔧</span> Builder
440
444
  </div>
441
445
 
442
446
  <div class="nav-section-label" style="margin-top:8px">System</div>
@@ -454,38 +458,21 @@ body { background: #0b0b14; color: #ccc; font-family: system-ui,-apple-system,sa
454
458
  <!-- main -->
455
459
  <div id="main">
456
460
 
457
- <!-- MonoAgent panel -->
458
- <div class="panel active" id="monoagent-panel">
461
+ <!-- Playbook Runs panel -->
462
+ <div class="panel active" id="pb-panel">
459
463
  <div class="panel-header">
460
- <span class="panel-title">MonoAgent Workflows</span>
461
- <span class="panel-subtitle" id="ma-subtitle">loading…</span>
462
- <button onclick="loadMonoagentData()" style="margin-left:auto;background:#1a1a2e;border:1px solid #2a2a4a;color:#a78bfa;padding:3px 10px;border-radius:6px;cursor:pointer;font-size:11px">↻ Refresh</button>
464
+ <span class="panel-title">Playbook Runs</span>
465
+ <span class="panel-subtitle" id="pb-subtitle">0 runs</span>
463
466
  </div>
464
- <div style="flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:16px">
465
- <!-- Workflow list -->
466
- <div>
467
- <div style="font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#3a3a5a;margin-bottom:8px">Workflows</div>
468
- <div id="ma-workflows" style="display:grid;gap:8px;align-content:start"></div>
469
- <div class="empty" id="ma-wf-empty" style="display:none">
470
- <span class="empty-icon">🤖</span>
471
- <span class="empty-title">No workflows found</span>
472
- <span class="empty-sub">Create one with: <code style="color:#7c3aed">monoagent workflow create</code></span>
473
- </div>
474
- </div>
475
- <!-- Action run history -->
476
- <div>
477
- <div style="font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#3a3a5a;margin-bottom:8px">Action History</div>
478
- <div id="ma-history" style="display:grid;gap:6px;align-content:start"></div>
479
- <div class="empty" id="ma-hist-empty" style="display:none">
480
- <span class="empty-icon">📋</span>
481
- <span class="empty-title">No action history</span>
482
- <span class="empty-sub">Run an action with: <code style="color:#7c3aed">monoagent run &lt;ACTION_ID&gt;</code></span>
483
- </div>
484
- </div>
467
+ <div id="pb-cards" style="overflow-y:auto;flex:1;padding:12px;display:grid;gap:10px;align-content:start"></div>
468
+ <div class="empty" id="pb-empty">
469
+ <span class="empty-icon">⚡</span>
470
+ <span class="empty-title">No playbook runs yet</span>
471
+ <span class="empty-sub">Use the Builder tab to create and run playbooks,<br>or run via CLI: <code style="color:#7c3aed">npx monomind browse playbook run &lt;name&gt;</code></span>
485
472
  </div>
486
473
  </div>
487
474
 
488
- <!-- Builder panel (kept for internal use, hidden from nav) -->
475
+ <!-- Builder panel -->
489
476
  <div class="panel" id="builder-panel">
490
477
  <!-- Toolbar -->
491
478
  <div id="builder-toolbar">
@@ -586,11 +573,12 @@ function navigateToPanel(target) {
586
573
  var navItem = document.querySelector('[data-panel="' + target + '"]');
587
574
  if (navItem) navItem.classList.add('active');
588
575
  document.querySelectorAll('.panel').forEach(function(p) { p.classList.remove('active'); });
589
- var panelId = target + '-panel';
576
+ var panelId = target === 'playbooks' ? 'pb-panel'
577
+ : target === 'builder' ? 'builder-panel'
578
+ : target + '-panel';
590
579
  var panel = document.getElementById(panelId);
591
580
  if (panel) panel.classList.add('active');
592
581
  if (target === 'builder') renderEdges();
593
- if (target === 'monoagent') loadMonoagentData();
594
582
  location.hash = target;
595
583
  }
596
584
 
@@ -604,7 +592,7 @@ document.querySelectorAll('.nav-item').forEach(function(item) {
604
592
  // Hash-based routing on load
605
593
  (function() {
606
594
  var hash = location.hash.replace('#', '');
607
- var validPanels = ['monoagent', 'agents', 'memory', 'sessions'];
595
+ var validPanels = ['playbooks', 'builder', 'agents', 'memory', 'sessions'];
608
596
  if (hash && validPanels.indexOf(hash) !== -1) {
609
597
  // defer until after renderEdges is defined
610
598
  window.addEventListener('load', function() { navigateToPanel(hash); });
@@ -625,7 +613,20 @@ function esc(s) {
625
613
  }
626
614
 
627
615
  function updateHeader() {
628
- // no-op: topbar pills are updated by loadMonoagentData
616
+ var running = 0, done = 0, fail = 0;
617
+ for (var id in runs) {
618
+ var s = runs[id].status;
619
+ if (s === 'running') running++;
620
+ else if (s === 'completed') done++;
621
+ else if (s === 'failed') fail++;
622
+ }
623
+ document.getElementById('p-run').textContent = '● ' + running;
624
+ document.getElementById('p-done').textContent = '✓ ' + done;
625
+ document.getElementById('p-fail').textContent = '✗ ' + fail;
626
+ document.getElementById('nb-run').textContent = String(running || Object.keys(runs).length);
627
+ document.getElementById('nb-run').className = 'nav-badge' + (running ? '' : ' green');
628
+ var total = Object.keys(runs).length;
629
+ document.getElementById('pb-subtitle').textContent = total + (total === 1 ? ' run' : ' runs');
629
630
  }
630
631
 
631
632
  function progressPct(r) {
@@ -647,7 +648,6 @@ function elapsed(r) {
647
648
  function renderCards() {
648
649
  var cards = document.getElementById('pb-cards');
649
650
  var empty = document.getElementById('pb-empty');
650
- if (!cards) return; // panel removed from DOM
651
651
  var sorted = Object.values(runs).sort(function(a, b) { return b.startedAt - a.startedAt; });
652
652
  if (!sorted.length) { cards.innerHTML = ''; empty.style.display = 'flex'; return; }
653
653
  empty.style.display = 'none';
@@ -1737,94 +1737,6 @@ function handleEvent(evt) {
1737
1737
  renderCards();
1738
1738
  }
1739
1739
 
1740
- // ═══════════════════════════════════════════════════════════════════
1741
- // MONOAGENT DATA
1742
- // ═══════════════════════════════════════════════════════════════════
1743
- var MA_STATE_COLORS = { COMPLETED: '#22c55e', FAILED: '#ef4444', PENDING: '#f59e0b', RUNNING: '#a78bfa' };
1744
-
1745
- function maStateLabel(state) {
1746
- var s = (state || '').toUpperCase();
1747
- return { color: MA_STATE_COLORS[s] || '#555', text: s || 'UNKNOWN' };
1748
- }
1749
-
1750
- function renderWorkflows(workflows) {
1751
- var el = document.getElementById('ma-workflows');
1752
- var empty = document.getElementById('ma-wf-empty');
1753
- if (!workflows || !workflows.length) {
1754
- el.innerHTML = '';
1755
- empty.style.display = 'flex';
1756
- return;
1757
- }
1758
- empty.style.display = 'none';
1759
- el.innerHTML = workflows.map(function(wf) {
1760
- var active = wf.is_active;
1761
- var updated = wf.updated_at && wf.updated_at !== '0001-01-01T00:00:00Z'
1762
- ? new Date(wf.updated_at).toLocaleDateString()
1763
- : '—';
1764
- return '<div style="background:#0f0f1e;border:1px solid #1a1a2e;border-radius:8px;padding:10px 14px;display:flex;align-items:center;gap:10px">' +
1765
- '<span style="font-size:16px">' + (active ? '▶' : '⏸') + '</span>' +
1766
- '<div style="flex:1;min-width:0">' +
1767
- '<div style="font-weight:600;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">' + esc(wf.name || wf.id) + '</div>' +
1768
- '<div style="font-size:10px;color:#3a3a5a;margin-top:2px">' + esc(wf.id) + ' · v' + (wf.version || 1) + ' · updated ' + esc(updated) + '</div>' +
1769
- (wf.description ? '<div style="font-size:10px;color:#555;margin-top:2px">' + esc(wf.description) + '</div>' : '') +
1770
- '</div>' +
1771
- '<span style="font-size:10px;padding:2px 7px;border-radius:10px;border:1px solid;' +
1772
- (active ? 'background:#22c55e15;border-color:#22c55e44;color:#22c55e' : 'background:#33333315;border-color:#33333344;color:#555') + '">' +
1773
- (active ? 'active' : 'inactive') +
1774
- '</span>' +
1775
- '</div>';
1776
- }).join('');
1777
- document.getElementById('nb-ma').textContent = String(workflows.length);
1778
- }
1779
-
1780
- function renderHistory(actions) {
1781
- var el = document.getElementById('ma-history');
1782
- var empty = document.getElementById('ma-hist-empty');
1783
- if (!actions || !actions.length) {
1784
- el.innerHTML = '';
1785
- empty.style.display = 'flex';
1786
- return;
1787
- }
1788
- empty.style.display = 'none';
1789
- el.innerHTML = actions.map(function(a) {
1790
- var sl = maStateLabel(a.state);
1791
- var dt = a.created_at
1792
- ? new Date(typeof a.created_at === 'number' ? a.created_at * 1000 : a.created_at).toLocaleString()
1793
- : '—';
1794
- return '<div style="background:#0f0f1e;border:1px solid #1a1a2e;border-radius:6px;padding:8px 12px;display:flex;align-items:center;gap:10px">' +
1795
- '<div style="flex:1;min-width:0">' +
1796
- '<div style="font-weight:600;font-size:11px">' + esc(a.type || '(unnamed)') + '</div>' +
1797
- '<div style="font-size:10px;color:#3a3a5a;margin-top:2px">' +
1798
- esc(a.id.slice(0, 8)) + '… · ' + esc(a.platform || '') + ' · ' + esc(dt) +
1799
- '</div>' +
1800
- '</div>' +
1801
- '<span style="font-size:10px;font-weight:600;color:' + sl.color + '">' + sl.text + '</span>' +
1802
- '</div>';
1803
- }).join('');
1804
- }
1805
-
1806
- function loadMonoagentData() {
1807
- document.getElementById('ma-subtitle').textContent = 'loading…';
1808
- fetch('/monoagent/data')
1809
- .then(function(r) { return r.json(); })
1810
- .then(function(d) {
1811
- renderWorkflows(d.workflows || []);
1812
- renderHistory(d.actions || []);
1813
- var wc = (d.workflows || []).length;
1814
- var ac = (d.actions || []).length;
1815
- document.getElementById('ma-subtitle').textContent = wc + ' workflow' + (wc !== 1 ? 's' : '') + ' · ' + ac + ' action' + (ac !== 1 ? 's' : '');
1816
- document.getElementById('p-workflows').textContent = '⚡ ' + wc;
1817
- document.getElementById('p-actions').textContent = '✓ ' + ac;
1818
- })
1819
- .catch(function(e) {
1820
- document.getElementById('ma-subtitle').textContent = 'error loading data';
1821
- console.error('monoagent data fetch failed', e);
1822
- });
1823
- }
1824
-
1825
- // Load monoagent data on startup (it's the default panel)
1826
- loadMonoagentData();
1827
-
1828
1740
  // ═══════════════════════════════════════════════════════════════════
1829
1741
  // CONNECTION
1830
1742
  // ═══════════════════════════════════════════════════════════════════
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Agent lifecycle commands — spawn, list, status, stop
3
+ */
4
+ import type { Command } from '../types.js';
5
+ export declare function updateSwarmActivityMetrics(agentCountDelta: number): void;
6
+ export declare const AGENT_TYPES: {
7
+ value: string;
8
+ label: string;
9
+ hint: string;
10
+ }[];
11
+ export declare function getAgentCapabilities(type: string): string[];
12
+ export declare function formatStatus(status: unknown): string;
13
+ export declare const spawnCommand: Command;
14
+ export declare const listCommand: Command;
15
+ export declare const statusCommand: Command;
16
+ export declare const stopCommand: Command;
17
+ //# sourceMappingURL=agent-lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-lifecycle.d.ts","sourceRoot":"","sources":["../../../src/commands/agent-lifecycle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAS1E,wBAAgB,0BAA0B,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAgCxE;AAED,eAAO,MAAM,WAAW;;;;GAgBvB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAa3D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAUpD;AAID,eAAO,MAAM,YAAY,EAAE,OA2F1B,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,OA0DzB,CAAC;AAIF,eAAO,MAAM,aAAa,EAAE,OA2D3B,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,OA8CzB,CAAC"}