@blackbelt-technology/pi-dashboard-extension 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/skills/browser/LICENSE +201 -0
- package/.pi/skills/browser/SKILL.md +105 -0
- package/.pi/skills/browser/UPSTREAM.md +46 -0
- package/.pi/skills/browser/references/electron.md +351 -0
- package/.pi/skills/browser/references/web.md +2789 -0
- package/.pi/skills/browser/scripts/detect-dashboard.sh +55 -0
- package/.pi/skills/doctor/AGENTS.md +27 -0
- package/.pi/skills/doctor/SKILL.md +89 -0
- package/.pi/skills/doctor/_lib/checks.ts +177 -0
- package/.pi/skills/doctor/_lib/derive-tokens.ts +43 -0
- package/.pi/skills/doctor/_lib/front-matter.ts +122 -0
- package/.pi/skills/doctor/_lib/index.ts +14 -0
- package/.pi/skills/doctor/_lib/knowledge-hash.ts +74 -0
- package/.pi/skills/doctor/_lib/provenance.ts +50 -0
- package/.pi/skills/doctor/_lib/regenerate.ts +100 -0
- package/.pi/skills/doctor/_lib/router.ts +155 -0
- package/.pi/skills/doctor/_lib/server-tier.ts +62 -0
- package/.pi/skills/doctor/modules/build-reload.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/build-reload.md +51 -0
- package/.pi/skills/doctor/modules/env-node.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/env-node.md +49 -0
- package/.pi/skills/doctor/modules/install-topology.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/install-topology.md +53 -0
- package/.pi/skills/doctor/modules/model-resolution.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/model-resolution.md +53 -0
- package/.pi/skills/doctor/modules/peers.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/peers.md +57 -0
- package/.pi/skills/doctor/modules/pi-resolution.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/pi-resolution.md +60 -0
- package/.pi/skills/doctor/modules/plugins-bridges.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/plugins-bridges.md +56 -0
- package/.pi/skills/pi-dashboard/SKILL.md +68 -0
- package/.pi/skills/pi-dashboard/commands/README.md +45 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-flow-abort.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-flow-auto.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-git-branches.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-git-init.md +8 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-git-stash-pop.md +8 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-list-models.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-peer-list.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-peer-scan.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-pin-list.md +5 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-proposal-archive.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-proposal-attach.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-proposal-detach.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-server-config.md +5 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-server-health.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-server-tunnel-off.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-server-tunnel-on.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-server-tunnel-status.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-abort-all.md +14 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-abort.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-diff.md +11 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-fork.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-hide.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-info.md +11 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-kill.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-list-active.md +8 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-list-here.md +8 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-list.md +6 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-model.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-rename.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-resume.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-spawn.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-tell.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-thinking.md +10 -0
- package/.pi/skills/pi-dashboard/commands/dashboard-session-unhide.md +10 -0
- package/.pi/skills/pi-dashboard/references/api-reference.md +30 -0
- package/.pi/skills/pi-dashboard/references/recipes.md +38 -0
- package/.pi/skills/pi-dashboard/references/slash-commands.md +71 -0
- package/.pi/skills/pi-dashboard/scripts/dashboard-api.sh +6 -0
- package/.pi/skills/pi-dashboard/scripts/dashboard-bus.ts +217 -0
- package/.pi/skills/project-init/SKILL.md +279 -0
- package/.pi/skills/project-init/dox-doctrine.md +104 -0
- package/.pi/skills/project-init/profiles/coding/AGENTS.md.tmpl +111 -0
- package/.pi/skills/project-init/profiles/coding/profile.json +5 -0
- package/.pi/skills/project-init/profiles/coding/prompts/plan-change.md +5 -0
- package/.pi/skills/project-init/profiles/coding/prompts/tdd-loop.md +6 -0
- package/.pi/skills/project-init/profiles/coding/settings.json.tmpl +9 -0
- package/.pi/skills/project-init/profiles/docs/AGENTS.md.tmpl +37 -0
- package/.pi/skills/project-init/profiles/docs/profile.json +4 -0
- package/.pi/skills/project-init/profiles/docs/prompts/draft-page.md +5 -0
- package/.pi/skills/project-init/profiles/docs/settings.json.tmpl +9 -0
- package/package.json +12 -4
- package/src/AGENTS.md +56 -0
- package/src/__tests__/abort-latch.test.ts +97 -0
- package/src/__tests__/agent-settled.test.ts +82 -0
- package/src/__tests__/artifact-roots.test.ts +83 -0
- package/src/__tests__/ask-user-attachments.test.ts +106 -0
- package/src/__tests__/ask-user-tool.test.ts +90 -27
- package/src/__tests__/auto-session-namer.test.ts +339 -0
- package/src/__tests__/bridge-default-model-apply.test.ts +242 -0
- package/src/__tests__/bridge-default-model-gate.test.ts +50 -0
- package/src/__tests__/bridge-followup-chat-order.test.ts +215 -0
- package/src/__tests__/bridge-followup-multi-entry.test.ts +202 -0
- package/src/__tests__/bridge-followup-mutation.test.ts +217 -0
- package/src/__tests__/bridge-followup-queue-drain.test.ts +266 -0
- package/src/__tests__/bridge-hasui-flip.test.ts +109 -0
- package/src/__tests__/bridge-no-queue-mutation.test.ts +112 -0
- package/src/__tests__/bridge-plugin-emit-event.test.ts +44 -0
- package/src/__tests__/bridge-queue-update-forward.test.ts +77 -0
- package/src/__tests__/bridge-shadow-queue-gate.test.ts +299 -0
- package/src/__tests__/bridge-shutdown-reset.test.ts +159 -0
- package/src/__tests__/bridge-slash-command-routing.test.ts +127 -31
- package/src/__tests__/bridge-stop-after-turn.test.ts +72 -0
- package/src/__tests__/bridge-system-followup.test.ts +163 -0
- package/src/__tests__/bridge-thinking-level-select.test.ts +68 -0
- package/src/__tests__/browser-skill-registered.test.ts +84 -0
- package/src/__tests__/build-provider-catalogue.test.ts +35 -1
- package/src/__tests__/command-handler.test.ts +427 -29
- package/src/__tests__/commit-draft.test.ts +100 -0
- package/src/__tests__/connection-dropped-frames.test.ts +78 -0
- package/src/__tests__/custom-provider-apikey-roundtrip.test.ts +128 -0
- package/src/__tests__/cwd-missing-probe.test.ts +82 -0
- package/src/__tests__/dashboard-commands-shipped.test.ts +53 -0
- package/src/__tests__/dashboard-context-injector.test.ts +190 -0
- package/src/__tests__/doctor/checks.test.ts +121 -0
- package/src/__tests__/doctor/modules.test.ts +64 -0
- package/src/__tests__/doctor/provenance-hash.test.ts +94 -0
- package/src/__tests__/doctor/router.test.ts +143 -0
- package/src/__tests__/empty-actionable-guard-config.test.ts +32 -0
- package/src/__tests__/empty-actionable-guard.test.ts +73 -0
- package/src/__tests__/enrich-model-metadata.test.ts +21 -0
- package/src/__tests__/extension-slash-command-detection.test.ts +37 -1
- package/src/__tests__/filter-enabled-models.test.ts +151 -0
- package/src/__tests__/fixtures/turn-actionability-fixtures.ts +69 -0
- package/src/__tests__/git-info-status.test.ts +73 -0
- package/src/__tests__/git-poll.test.ts +69 -0
- package/src/__tests__/markdown-image-inliner.test.ts +37 -0
- package/src/__tests__/model-resolve.test.ts +379 -0
- package/src/__tests__/pi-version-tracker.test.ts +109 -0
- package/src/__tests__/process-scanner.test.ts +112 -22
- package/src/__tests__/project-init-detect-stack.test.ts +61 -0
- package/src/__tests__/project-init-dox-kb-config.test.ts +53 -0
- package/src/__tests__/project-init-profiles.test.ts +84 -0
- package/src/__tests__/project-init-scaffold.test.ts +139 -0
- package/src/__tests__/project-init-seed-doctrine.test.ts +100 -0
- package/src/__tests__/project-trust.test.ts +92 -0
- package/src/__tests__/prompt-expander.test.ts +191 -1
- package/src/__tests__/provider-register-reload.test.ts +36 -6
- package/src/__tests__/provider-register-thinking-levels.test.ts +51 -0
- package/src/__tests__/retry-tracker.test.ts +75 -70
- package/src/__tests__/role-manager.test.ts +585 -0
- package/src/__tests__/role-model-tools-registry-readiness.test.ts +114 -0
- package/src/__tests__/role-model-tools.test.ts +229 -0
- package/src/__tests__/search-files-completeness.test.ts +111 -0
- package/src/__tests__/search-files-ranking.test.ts +168 -0
- package/src/__tests__/server-auto-start.test.ts +121 -4
- package/src/__tests__/server-launcher-launch.test.ts +24 -6
- package/src/__tests__/server-launcher.test.ts +19 -2
- package/src/__tests__/session-sync.test.ts +36 -0
- package/src/__tests__/source-detector.test.ts +15 -0
- package/src/__tests__/subagent-frame-buffer.test.ts +239 -0
- package/src/__tests__/tool-result-image-inliner.test.ts +206 -0
- package/src/__tests__/tui-prompt-adapter.test.ts +70 -64
- package/src/__tests__/turn-actionability.test.ts +86 -0
- package/src/__tests__/vcs-info.test.ts +145 -4
- package/src/__tests__/visibility-intent.test.ts +43 -0
- package/src/abort-latch.ts +55 -0
- package/src/abort-latch.ts.AGENTS.md +3 -0
- package/src/agent-settled.ts +72 -0
- package/src/agent-settled.ts.AGENTS.md +3 -0
- package/src/artifact-roots.ts +73 -0
- package/src/artifact-roots.ts.AGENTS.md +3 -0
- package/src/ask-user-attachments.ts +121 -0
- package/src/ask-user-attachments.ts.AGENTS.md +3 -0
- package/src/ask-user-tool.ts +56 -58
- package/src/ask-user-tool.ts.AGENTS.md +3 -0
- package/src/auto-session-namer.ts +334 -0
- package/src/auto-session-namer.ts.AGENTS.md +3 -0
- package/src/bridge-context.ts +86 -8
- package/src/bridge-context.ts.AGENTS.md +3 -0
- package/src/bridge-default-model-gate.ts +48 -0
- package/src/bridge-default-model-gate.ts.AGENTS.md +3 -0
- package/src/bridge.ts +1373 -213
- package/src/bridge.ts.AGENTS.md +3 -0
- package/src/canvas-tool.ts +107 -0
- package/src/command-handler.ts +527 -42
- package/src/command-handler.ts.AGENTS.md +3 -0
- package/src/commit-draft-agent.ts +114 -0
- package/src/commit-draft-agent.ts.AGENTS.md +3 -0
- package/src/commit-draft.ts +136 -0
- package/src/commit-draft.ts.AGENTS.md +3 -0
- package/src/connection.ts +32 -1
- package/src/connection.ts.AGENTS.md +3 -0
- package/src/dashboard-context-injector.ts +124 -0
- package/src/dashboard-context-injector.ts.AGENTS.md +3 -0
- package/src/dashboard-default-adapter.ts +5 -0
- package/src/dashboard-default-adapter.ts.AGENTS.md +3 -0
- package/src/dev-build.ts.AGENTS.md +3 -0
- package/src/empty-actionable-guard-config.ts +32 -0
- package/src/empty-actionable-guard-config.ts.AGENTS.md +3 -0
- package/src/empty-actionable-guard.ts +90 -0
- package/src/empty-actionable-guard.ts.AGENTS.md +3 -0
- package/src/event-forwarder.ts.AGENTS.md +3 -0
- package/src/flow-event-wiring.ts +4 -14
- package/src/flow-event-wiring.ts.AGENTS.md +3 -0
- package/src/git-link-builder.ts.AGENTS.md +3 -0
- package/src/git-poll.ts +38 -0
- package/src/git-poll.ts.AGENTS.md +3 -0
- package/src/hasui-flip.ts +56 -0
- package/src/hasui-flip.ts.AGENTS.md +3 -0
- package/src/markdown-image-inliner.ts +45 -2
- package/src/markdown-image-inliner.ts.AGENTS.md +3 -0
- package/src/model-tracker.ts +145 -19
- package/src/model-tracker.ts.AGENTS.md +3 -0
- package/src/multiselect-decode.ts.AGENTS.md +3 -0
- package/src/multiselect-list.ts.AGENTS.md +3 -0
- package/src/multiselect-polyfill.ts.AGENTS.md +3 -0
- package/src/process-metrics.ts.AGENTS.md +3 -0
- package/src/process-scanner.ts +114 -103
- package/src/process-scanner.ts.AGENTS.md +3 -0
- package/src/project-init/AGENTS.md +12 -0
- package/src/project-init/detect-stack.ts +146 -0
- package/src/project-init/dox-kb-config.ts +47 -0
- package/src/project-init/profiles.ts +135 -0
- package/src/project-init/scaffold.ts +192 -0
- package/src/project-init/seed-doctrine.ts +95 -0
- package/src/project-trust.ts +63 -0
- package/src/project-trust.ts.AGENTS.md +3 -0
- package/src/prompt-bus.ts +25 -1
- package/src/prompt-bus.ts.AGENTS.md +3 -0
- package/src/prompt-expander.ts +238 -37
- package/src/prompt-expander.ts.AGENTS.md +3 -0
- package/src/provider-register.ts +323 -54
- package/src/provider-register.ts.AGENTS.md +3 -0
- package/src/retry-tracker.ts +64 -39
- package/src/retry-tracker.ts.AGENTS.md +3 -0
- package/src/role-manager.ts +436 -0
- package/src/role-manager.ts.AGENTS.md +3 -0
- package/src/role-model-tools.ts +301 -0
- package/src/role-model-tools.ts.AGENTS.md +3 -0
- package/src/server-auto-start.ts +59 -23
- package/src/server-auto-start.ts.AGENTS.md +3 -0
- package/src/server-launcher.ts +56 -16
- package/src/server-launcher.ts.AGENTS.md +3 -0
- package/src/session-sync.ts +111 -15
- package/src/session-sync.ts.AGENTS.md +3 -0
- package/src/slash-dispatch.ts +32 -15
- package/src/slash-dispatch.ts.AGENTS.md +3 -0
- package/src/source-detector.ts +13 -5
- package/src/source-detector.ts.AGENTS.md +3 -0
- package/src/subagent-frame-buffer.ts +220 -0
- package/src/subagent-frame-buffer.ts.AGENTS.md +3 -0
- package/src/tool-result-image-inliner.ts +204 -0
- package/src/tool-result-image-inliner.ts.AGENTS.md +3 -0
- package/src/tui-prompt-adapter.ts +123 -0
- package/src/tui-prompt-adapter.ts.AGENTS.md +3 -0
- package/src/turn-actionability.ts +117 -0
- package/src/turn-actionability.ts.AGENTS.md +3 -0
- package/src/ui-modules.ts.AGENTS.md +3 -0
- package/src/vcs-info.ts +91 -129
- package/src/vcs-info.ts.AGENTS.md +3 -0
- package/src/visibility-intent.ts +34 -0
- package/src/visibility-intent.ts.AGENTS.md +3 -0
- package/src/__tests__/usage-limit-orderer.test.ts +0 -105
- package/src/__tests__/vcs-info-jj.test.ts +0 -145
- package/src/usage-limit-orderer.ts +0 -76
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plugins-bridges
|
|
3
|
+
scope: Surface bridge registration (packages[] vs dashboardPluginBridges) + activation.
|
|
4
|
+
symptoms:
|
|
5
|
+
- flow wont show
|
|
6
|
+
- bridge not registered
|
|
7
|
+
- no sessions reporting
|
|
8
|
+
- bridge misregistered
|
|
9
|
+
- plugin not loading
|
|
10
|
+
- bridge degraded
|
|
11
|
+
depends-on:
|
|
12
|
+
- peers
|
|
13
|
+
derives-from:
|
|
14
|
+
- ~/.pi/agent/settings.json#packages[] + #dashboardPluginBridges (live)
|
|
15
|
+
- /api/health plugin bridgeLoadedFrom (server-enriched)
|
|
16
|
+
- packages/shared/src/plugin-bridge-register.ts (registration model)
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## SCOPE
|
|
20
|
+
Report each bridge's `bridgeLoadedFrom`, flag any bridge present only in
|
|
21
|
+
`dashboardPluginBridges` (invisible to pi's `packages[]` reader), and report
|
|
22
|
+
activation status.
|
|
23
|
+
|
|
24
|
+
## KNOWLEDGE
|
|
25
|
+
pi reads `packages[]`, NOT `dashboardPluginBridges`. A bridge listed ONLY in
|
|
26
|
+
`dashboardPluginBridges` is never invoked by pi → the "no sessions reporting"
|
|
27
|
+
bug. A correctly registered bridge appears in BOTH; `reconcilePluginBridgePackages`
|
|
28
|
+
(dashboard ≥ 0.5.4) writes both on restart.
|
|
29
|
+
|
|
30
|
+
The four dashboard bridges: `dashboard-flows`,
|
|
31
|
+
`dashboard-flows-anthropic-bridge`, `dashboard-goal`, `dashboard-automation`.
|
|
32
|
+
|
|
33
|
+
Activation: a bridge re-probes peers only on `session_start`. Status
|
|
34
|
+
`waiting_peers` names WHICH peer failed (see `peers` module); `degraded` means a
|
|
35
|
+
partial load. A disabled dashboard plugin auto-deregisters its bridge entirely.
|
|
36
|
+
|
|
37
|
+
## CHECKS
|
|
38
|
+
- Read `settings.json#packages[]` and `#dashboardPluginBridges`; a bridge in the
|
|
39
|
+
latter but not the former → misregistered (flag it).
|
|
40
|
+
- `/api/health` (server-enriched): each plugin's `bridgeLoadedFrom` should be
|
|
41
|
+
`packages[]`, not `dashboardPluginBridges`-only or missing.
|
|
42
|
+
- Anthropic bridge not active → report status + the per-peer probe result from
|
|
43
|
+
the `peers` module.
|
|
44
|
+
|
|
45
|
+
## FIX ROUTING
|
|
46
|
+
- misregistered (dashboardPluginBridges-only) → dashboard ≥ 0.5.4 writes both;
|
|
47
|
+
`POST /api/restart` to run `reconcilePluginBridgePackages`.
|
|
48
|
+
- `waiting_peers` → fix the failed peer (peers module), then respawn the session
|
|
49
|
+
(bridges wire hooks once per process).
|
|
50
|
+
- plugin disabled → enable it → the bridge auto-registers.
|
|
51
|
+
|
|
52
|
+
## DERIVES-FROM
|
|
53
|
+
Live: `settings.json` packages[]/dashboardPluginBridges. Server-enriched:
|
|
54
|
+
`/api/health` `bridgeLoadedFrom`. Model:
|
|
55
|
+
`packages/shared/src/plugin-bridge-register.ts`. Hash sidecar:
|
|
56
|
+
`plugins-bridges.knowledge.hash`.
|
|
@@ -16,6 +16,37 @@ metadata:
|
|
|
16
16
|
|
|
17
17
|
Interact with the pi-dashboard server from any pi session via its REST API.
|
|
18
18
|
|
|
19
|
+
## Typed bus client (preferred for commands)
|
|
20
|
+
|
|
21
|
+
Session/flow COMMAND verbs now ride the SAME WebSocket bus the web client uses,
|
|
22
|
+
via [`scripts/dashboard-bus.ts`](scripts/dashboard-bus.ts) — a thin CLI wrapping
|
|
23
|
+
`@blackbelt-technology/pi-dashboard-bus-client`. It discovers the port itself
|
|
24
|
+
(config.json / `DASHBOARD_PORT` / 8000) and resolves an id-prefix to a full
|
|
25
|
+
session id from the live subscription snapshot, so command prose no longer needs
|
|
26
|
+
to teach BASE-URL derivation or GET `/api/sessions` id-resolution.
|
|
27
|
+
|
|
28
|
+
Canonical example:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx tsx ./scripts/dashboard-bus.ts spawn /path/to/proj --prompt "/opsx-explore add-auth"
|
|
32
|
+
npx tsx ./scripts/dashboard-bus.ts until <id> idle
|
|
33
|
+
npx tsx ./scripts/dashboard-bus.ts prompt <id> "run the tests"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
LLM authors can also write an ordinary type-checked `.ts` script importing
|
|
37
|
+
`{ connect }` from `@blackbelt-technology/pi-dashboard-bus-client` for multi-step
|
|
38
|
+
orchestration (spawn → prompt → until idle → read → plugin) using `connect()`,
|
|
39
|
+
`spawn()`, `prompt()`, `until()`, `read.sessions()`, and `plugin("goal", …)`.
|
|
40
|
+
|
|
41
|
+
### Tier split
|
|
42
|
+
|
|
43
|
+
- **COMMAND verbs → bus** (`dashboard-bus.ts`): abort, send_prompt, spawn,
|
|
44
|
+
resume, flow_control, set_model, set_thinking_level, rename, hide/unhide,
|
|
45
|
+
attach/detach_proposal, plugin goal.
|
|
46
|
+
- **READ-ONLY + no-WS-twin → REST** (`dashboard-api.sh`): session / health /
|
|
47
|
+
config reads, git ops, grep/browse, `plugin_config_write`, tunnel, peer scan,
|
|
48
|
+
openspec archive/toggle. REST remains a supported compatibility shell.
|
|
49
|
+
|
|
19
50
|
## Setup — Discover the Dashboard URL
|
|
20
51
|
|
|
21
52
|
Read the port from config, defaulting to `8000`:
|
|
@@ -60,6 +91,10 @@ curl -s -b "pi_dash_token=YOUR_JWT" "$BASE/api/sessions" | jq .
|
|
|
60
91
|
|
|
61
92
|
### Control Sessions
|
|
62
93
|
|
|
94
|
+
> The `/dashboard:session-*` and `/dashboard:flow-*` MUTATION commands now route
|
|
95
|
+
> through the bus CLI (`scripts/dashboard-bus.ts`). The REST rows below stay as a
|
|
96
|
+
> supported compatibility shell.
|
|
97
|
+
|
|
63
98
|
| Action | Command |
|
|
64
99
|
|--------|---------|
|
|
65
100
|
| Send prompt | `curl -s -X POST "$BASE/api/session/ID/prompt" -H 'Content-Type: application/json' -d '{"text":"your message"}'` |
|
|
@@ -128,7 +163,40 @@ A convenience wrapper is available at [scripts/dashboard-api.sh](scripts/dashboa
|
|
|
128
163
|
./scripts/dashboard-api.sh POST /api/session/spawn '{"cwd":"/path/to/project"}'
|
|
129
164
|
```
|
|
130
165
|
|
|
166
|
+
## Slash Commands
|
|
167
|
+
|
|
168
|
+
The `/dashboard:*` namespace wraps common operations as one-shot slash commands.
|
|
169
|
+
Files live in [`commands/`](commands/) and are auto-discovered by the bridge's
|
|
170
|
+
prompt-expander (`/dashboard:session-list` resolves `dashboard-session-list.md`).
|
|
171
|
+
|
|
172
|
+
Two classes:
|
|
173
|
+
|
|
174
|
+
- **LLM-free** (`executable: bash` frontmatter) — body runs as bash, output
|
|
175
|
+
renders in chat, the LLM is never invoked (chat shows an "ℹ ran locally"
|
|
176
|
+
footer). Read-only / zero-blast-radius ops. Example:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
/dashboard:session-list # table of every session, no token cost
|
|
180
|
+
/dashboard:session-info abc123 # all fields for a session by id-prefix
|
|
181
|
+
/dashboard:server-health # pid + uptime
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
- **LLM-bound** (no `executable` frontmatter) — body expands into a user
|
|
185
|
+
message the LLM interprets. Mutations needing judgment or free-form text.
|
|
186
|
+
Example:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
/dashboard:session-tell abc123 please run the tests
|
|
190
|
+
/dashboard:session-abort-all # asks which sessions before aborting
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
LLM-free bodies get `PI_DASHBOARD_PORT` / `PI_DASHBOARD_BASE` injected, so they
|
|
194
|
+
curl the running dashboard without re-deriving the port. Full list:
|
|
195
|
+
[references/slash-commands.md](references/slash-commands.md).
|
|
196
|
+
Convention + frontmatter: [commands/README.md](commands/README.md).
|
|
197
|
+
|
|
131
198
|
## Detailed References
|
|
132
199
|
|
|
200
|
+
- [Slash Commands](references/slash-commands.md) — every `/dashboard:*` command, args, LLM-free vs LLM-bound
|
|
133
201
|
- [API Reference](references/api-reference.md) — Complete endpoint documentation with request/response schemas
|
|
134
202
|
- [Recipes](references/recipes.md) — Multi-step orchestration workflows
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# pi-dashboard slash commands
|
|
2
|
+
|
|
3
|
+
Slash commands under the `/dashboard:*` namespace. Each file is a prompt
|
|
4
|
+
template resolved by the bridge's prompt-expander. The `:` ↔ `-` alias means
|
|
5
|
+
`/dashboard:session-list` resolves `dashboard-session-list.md`.
|
|
6
|
+
|
|
7
|
+
## Naming
|
|
8
|
+
|
|
9
|
+
`/dashboard:<resource>-<verb>[-<modifier>]` — singular resource, hyphen-joined
|
|
10
|
+
verb. Files are named `dashboard-<resource>-<verb>[-<modifier>].md`.
|
|
11
|
+
|
|
12
|
+
Resource families: `server`, `session`, `proposal`, `flow`, `git`, `peer`, `pin`.
|
|
13
|
+
|
|
14
|
+
## Two classes
|
|
15
|
+
|
|
16
|
+
- **LLM-free** (`executable: bash` frontmatter): the body runs as bash, output
|
|
17
|
+
renders in chat, the LLM is never invoked. Read-only / zero-blast-radius ops
|
|
18
|
+
whose inputs are simple identifiers. Chat shows an "ℹ ran locally" footer.
|
|
19
|
+
- **LLM-bound** (no `executable` frontmatter): the body expands into a user
|
|
20
|
+
message the LLM interprets. Used for mutations needing judgment or free-form
|
|
21
|
+
text (e.g. `session-tell`).
|
|
22
|
+
|
|
23
|
+
## Frontmatter
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
---
|
|
27
|
+
executable: bash # opt-in; only "bash" supported. Omit for LLM-bound.
|
|
28
|
+
excludeFromContext: true # default true for executable: bash (no LLM context).
|
|
29
|
+
description: "one-liner" # cosmetic.
|
|
30
|
+
---
|
|
31
|
+
<body>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Resolution
|
|
35
|
+
|
|
36
|
+
The expander scans `<cwd>/.pi/skills/<skill>/commands/*.md` (one level) and
|
|
37
|
+
keys each file by basename. No install into `~/.pi/prompts/` is required.
|
|
38
|
+
See change: add-dashboard-slash-commands.
|
|
39
|
+
|
|
40
|
+
## Env available to executable: bash bodies
|
|
41
|
+
|
|
42
|
+
- `PI_DASHBOARD_PORT` — dashboard port (from `~/.pi/dashboard/config.json`, default 8000).
|
|
43
|
+
- `PI_DASHBOARD_BASE` — `http://localhost:$PI_DASHBOARD_PORT`.
|
|
44
|
+
|
|
45
|
+
Positional args bind as `$1`, `$2`, … (whitespace-split, quoting not honoured in v1).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Abort the running flow on a session. Usage /dashboard:flow-abort <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Abort the running flow on a session over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts flow <id-prefix> abort
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live snapshot and sends the typed `flow_control` verb with action `abort`. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Toggle autonomous mode for a session's flow. Usage /dashboard:flow-auto <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Toggle autonomous mode for a session's flow over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts flow <id-prefix> toggle_autonomous
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live snapshot and sends the typed `flow_control` verb with action `toggle_autonomous`. Report the new state, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Initialise a git repo in a directory. Usage /dashboard:git-init [cwd]
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Discover the base URL: prefer the $PI_DASHBOARD_PORT or $DASHBOARD_PORT env var, else read the port from ~/.pi/dashboard/config.json (default 8000); BASE="http://localhost:$PORT". When auth is enabled, include the JWT cookie. Resolve any <id-prefix> via GET /api/sessions, matching the first session whose id starts with the prefix.
|
|
5
|
+
|
|
6
|
+
Task: POST /api/git/init with body {"cwd": "<cwd>"}. Default <cwd> to the current working directory if no argument is given. Report the result.
|
|
7
|
+
|
|
8
|
+
Optional argument (cwd):
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: git stash pop in a directory. Usage /dashboard:git-stash-pop [cwd]
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Discover the base URL: prefer the $PI_DASHBOARD_PORT or $DASHBOARD_PORT env var, else read the port from ~/.pi/dashboard/config.json (default 8000); BASE="http://localhost:$PORT". When auth is enabled, include the JWT cookie. Resolve any <id-prefix> via GET /api/sessions, matching the first session whose id starts with the prefix.
|
|
5
|
+
|
|
6
|
+
Task: POST /api/git/stash-pop with body {"cwd": "<cwd>"}. Default <cwd> to the current working directory if no argument is given. Report the result.
|
|
7
|
+
|
|
8
|
+
Optional argument (cwd):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: List reachable models from the dashboard registry. Usage /dashboard:list-models [annotated]
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Discover the base URL: prefer the $PI_DASHBOARD_PORT or $DASHBOARD_PORT env var, else read the port from ~/.pi/dashboard/config.json (default 8000); BASE="http://localhost:$PORT". When auth is enabled, include the JWT cookie.
|
|
5
|
+
|
|
6
|
+
Task: GET $BASE/api/models. If the argument is `annotated` (or `1`), GET $BASE/api/models?annotated=1 instead. The response is `{ "object": "list", "data": [...] }` where each row is `{ id: "provider/modelId", provider, reasoning?, input?, contextWindow?, maxTokens?, cost? }`. In annotated mode each row also carries `excludedReason` (`null` = reachable, `no-credential` or `oauth-incompatible` = why it is not). Report the rows (id + provider + key capabilities; in annotated mode note the excludedReason for unreachable ones).
|
|
7
|
+
|
|
8
|
+
IMPORTANT: never parse ~/.pi/agent/providers.json or ~/.pi/agent/models.json for model inventory — those files hold roles/presets/custom entries, NOT the reachable catalogue, and a parse returns empty (silent failure). GET /api/models is the only correct model-introspection surface.
|
|
9
|
+
|
|
10
|
+
Arguments (optional `annotated`):
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
executable: bash
|
|
3
|
+
description: mDNS scan for peer dashboard servers on the network. Runs locally, no LLM.
|
|
4
|
+
---
|
|
5
|
+
curl -s -X POST "$PI_DASHBOARD_BASE/api/discover-servers" \
|
|
6
|
+
| jq -r '.data[]? | "\(.host):\(.port) v\(.version // "-") \(if .isLocal then "(local)" else "" end)"'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Attach an OpenSpec change to a session. Usage /dashboard:proposal-attach <id-prefix> <change-name>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Attach an OpenSpec change to a session over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts proposal-attach <id-prefix> <change>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix (first argument) to a full session id and sends the typed `attach_proposal` verb with the change name. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Arguments (id-prefix then change-name):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Detach the OpenSpec change from a session. Usage /dashboard:proposal-detach <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Detach the OpenSpec change from a session over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts proposal-detach <id-prefix>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live snapshot and sends the typed `detach_proposal` verb. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Disconnect the public tunnel. Usage /dashboard:server-tunnel-off
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Discover the base URL: prefer the $PI_DASHBOARD_PORT or $DASHBOARD_PORT env var, else read the port from ~/.pi/dashboard/config.json (default 8000); BASE="http://localhost:$PORT". When auth is enabled, include the JWT cookie. Resolve any <id-prefix> via GET /api/sessions, matching the first session whose id starts with the prefix.
|
|
5
|
+
|
|
6
|
+
Task: POST /api/tunnel-disconnect. Then GET /api/tunnel-status and confirm it is inactive.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Connect the public tunnel. Usage /dashboard:server-tunnel-on
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Discover the base URL: prefer the $PI_DASHBOARD_PORT or $DASHBOARD_PORT env var, else read the port from ~/.pi/dashboard/config.json (default 8000); BASE="http://localhost:$PORT". When auth is enabled, include the JWT cookie. Resolve any <id-prefix> via GET /api/sessions, matching the first session whose id starts with the prefix.
|
|
5
|
+
|
|
6
|
+
Task: POST /api/tunnel-connect. Then GET /api/tunnel-status and report the public URL.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Abort multiple running sessions (asks which). Usage /dashboard:session-abort-all
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). List active sessions over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts sessions
|
|
7
|
+
|
|
8
|
+
This prints sessions from the live snapshot (status streaming or active). Confirm scope with the user (all of them, only those in the current cwd, or a named subset) BEFORE acting. Then abort each chosen session:
|
|
9
|
+
|
|
10
|
+
npx tsx ./scripts/dashboard-bus.ts abort <id>
|
|
11
|
+
|
|
12
|
+
The CLI resolves each id-prefix to a full session id and sends the typed `abort` verb. Report per-session results.
|
|
13
|
+
|
|
14
|
+
Optional argument (a filter hint, e.g. 'here' or a cwd):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Abort the current run of a session. Usage /dashboard:session-abort <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Abort a session's current run over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts abort <id-prefix>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live subscription snapshot and sends the typed `abort` verb. It discovers the port itself. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
executable: bash
|
|
3
|
+
description: Show file changes (git diff) for a session by id-prefix. Usage /dashboard:session-diff <id>. Runs locally, no LLM.
|
|
4
|
+
---
|
|
5
|
+
ID="$1"
|
|
6
|
+
if [ -z "$ID" ]; then echo "usage: /dashboard:session-diff <id-prefix>" >&2; exit 2; fi
|
|
7
|
+
FULL=$(curl -s "$PI_DASHBOARD_BASE/api/sessions" \
|
|
8
|
+
| jq -r --arg id "$ID" '.data[] | select(.id | startswith($id)) | .id' | head -1)
|
|
9
|
+
if [ -z "$FULL" ]; then echo "no session matching $ID" >&2; exit 1; fi
|
|
10
|
+
curl -s "$PI_DASHBOARD_BASE/api/session-diff?sessionId=$FULL" \
|
|
11
|
+
| jq -r '.data.files[]? | "=== \(.path) ===\n\(.gitDiff // "(no git diff)")"'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fork a session into a new one. Usage /dashboard:session-fork <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Fork a session into a new one over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts resume <id-prefix> --fork
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live snapshot and sends the typed `resume` verb in fork mode. Report the new session id, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Hide a session from the dashboard list. Usage /dashboard:session-hide <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Hide a session from the dashboard list over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts hide <id-prefix>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live snapshot and sends the typed `hide` verb. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
executable: bash
|
|
3
|
+
description: Show every field of a session by id-prefix. Usage /dashboard:session-info <id>. Runs locally, no LLM.
|
|
4
|
+
---
|
|
5
|
+
ID="$1"
|
|
6
|
+
if [ -z "$ID" ]; then echo "usage: /dashboard:session-info <id-prefix>" >&2; exit 2; fi
|
|
7
|
+
curl -s "$PI_DASHBOARD_BASE/api/sessions" \
|
|
8
|
+
| jq -r --arg id "$ID" '
|
|
9
|
+
(.data[] | select(.id | startswith($id)))
|
|
10
|
+
// ("no session matching " + $id | halt_error(1))
|
|
11
|
+
| to_entries[] | "\(.key): \(.value)"'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Shut down (kill) a session. DESTRUCTIVE. Usage /dashboard:session-kill <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). This is DESTRUCTIVE — the session process is terminated. Confirm with the user first, then kill the session over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts kill <id-prefix>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live snapshot and sends the typed shutdown verb. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
executable: bash
|
|
3
|
+
description: List active/streaming sessions only. Runs locally, no LLM.
|
|
4
|
+
---
|
|
5
|
+
curl -s "$PI_DASHBOARD_BASE/api/sessions" \
|
|
6
|
+
| jq -r '.data[]
|
|
7
|
+
| select(.status=="streaming" or .status=="active")
|
|
8
|
+
| "\(.id[0:8]) \(.status) \(.name // "-") \(.cwd)"'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
executable: bash
|
|
3
|
+
description: List sessions whose cwd matches the current directory. Runs locally, no LLM.
|
|
4
|
+
---
|
|
5
|
+
curl -s "$PI_DASHBOARD_BASE/api/sessions" \
|
|
6
|
+
| jq -r --arg pwd "$PWD" '.data[]
|
|
7
|
+
| select(.cwd==$pwd)
|
|
8
|
+
| "\(.id[0:8]) \(.status // "-") \(.name // "-")"'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Switch a session's model. Usage /dashboard:session-model <id-prefix> <provider/modelId>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Switch a session's model over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts model <id-prefix> <provider> <modelId>
|
|
7
|
+
|
|
8
|
+
Split the `<provider/modelId>` argument on the first '/' into provider and modelId. The CLI resolves the id-prefix to a full session id and sends the typed `set_model` verb. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Arguments (id-prefix then provider/modelId):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Rename a session. Usage /dashboard:session-rename <id-prefix> <name>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Rename a session over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts rename <id-prefix> <name...>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix (first argument) to a full session id and sends the typed `rename` verb with the remaining text as the new name. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Arguments (id-prefix then new name):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Resume a session (continue mode). Usage /dashboard:session-resume <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Resume a session (continue mode) over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts resume <id-prefix>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live snapshot and sends the typed `resume` verb. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Spawn a new session in a directory. Usage /dashboard:session-spawn [cwd]
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Spawn a new session over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts spawn <cwd> [--prompt <text>] [--attach <change>]
|
|
7
|
+
|
|
8
|
+
Default <cwd> to the current working directory if no argument is given. Optionally pass `--prompt <text>` to send an initial prompt and `--attach <change>` to attach an OpenSpec change. The CLI sends the typed `spawn` verb and correlates the reply exactly. Report the new session id.
|
|
9
|
+
|
|
10
|
+
Optional argument (cwd):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Send a prompt to another session. Usage /dashboard:session-tell <id-prefix> <text>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Send a prompt to another session over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts prompt <id-prefix> <text...>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix (first argument) to a full session id from the live snapshot and sends the typed `send_prompt` verb with the remaining text. Report success, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Arguments (id-prefix then prompt text):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Set a session's thinking level. Usage /dashboard:session-thinking <id-prefix> <level>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Set a session's thinking level over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts thinking <id-prefix> <level>
|
|
7
|
+
|
|
8
|
+
Levels are off, low, medium, high. The CLI resolves the id-prefix to a full session id and sends the typed `set_thinking_level` verb. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Arguments (id-prefix then level):
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Unhide a previously hidden session. Usage /dashboard:session-unhide <id-prefix>
|
|
3
|
+
---
|
|
4
|
+
Use the pi-dashboard skill (see ../SKILL.md). Unhide a previously hidden session over the WebSocket bus:
|
|
5
|
+
|
|
6
|
+
npx tsx ./scripts/dashboard-bus.ts unhide <id-prefix>
|
|
7
|
+
|
|
8
|
+
The CLI resolves the id-prefix to a full session id from the live snapshot and sends the typed `unhide` verb. Report the result, or the error if no session matches the prefix.
|
|
9
|
+
|
|
10
|
+
Argument (id-prefix):
|
|
@@ -6,6 +6,20 @@ All responses use JSON. Mutation endpoints require `Content-Type: application/js
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## WebSocket bus verbs
|
|
10
|
+
|
|
11
|
+
Session/flow COMMAND verbs are preferably driven over the SAME WebSocket bus the
|
|
12
|
+
web client uses, via `@blackbelt-technology/pi-dashboard-bus-client` (wrapped by
|
|
13
|
+
[`scripts/dashboard-bus.ts`](../scripts/dashboard-bus.ts)). The client sends
|
|
14
|
+
`BrowserToServerMessage` verbs; the per-verb helpers are codegen'd from that
|
|
15
|
+
union, with a denylist that excludes `plugin_config_write` (stays REST). `spawn`
|
|
16
|
+
and `resume` replies are **exact-correlated** to the request; all other waits are
|
|
17
|
+
**structural** (matched on session-id + status). The REST endpoints below remain
|
|
18
|
+
a supported compatibility shell for the same operations plus the read-only and
|
|
19
|
+
no-WS-twin endpoints.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
9
23
|
## Health & Status
|
|
10
24
|
|
|
11
25
|
### `GET /api/health`
|
|
@@ -198,6 +212,16 @@ Control a running flow.
|
|
|
198
212
|
|
|
199
213
|
## Model Configuration
|
|
200
214
|
|
|
215
|
+
### `GET /api/models`
|
|
216
|
+
List the dashboard's reachable model catalogue (model-introspection surface). Ungated beyond the dashboard's own auth gate — no `pi-proxy-...` Bearer key required (same posture as `GET /api/provider-auth/status`). To inspect available/reachable models, call this endpoint; do NOT parse `~/.pi/agent/providers.json` or `~/.pi/agent/models.json` — that path is wrong and fails silently (those files hold roles/presets, not the catalogue).
|
|
217
|
+
|
|
218
|
+
**Query:**
|
|
219
|
+
- `annotated=1`: return every model plus `excludedReason` (`no-credential` | `oauth-incompatible`); default returns only reachable models.
|
|
220
|
+
|
|
221
|
+
**Responses:**
|
|
222
|
+
- `200`: `{ "object": "list", "data": [{ "id": "provider/modelId", "provider", "reasoning?", "input?", "contextWindow?", "maxTokens?", "cost?", "excludedReason?" }] }` (capability/cost metadata only — never credentials)
|
|
223
|
+
- `503`: model runtime (pi-ai) unavailable
|
|
224
|
+
|
|
201
225
|
### `POST /api/session/:id/model`
|
|
202
226
|
Set the model for a session.
|
|
203
227
|
|
|
@@ -427,6 +451,12 @@ Create a tunnel connection.
|
|
|
427
451
|
### `POST /api/tunnel-disconnect`
|
|
428
452
|
Disconnect the active tunnel.
|
|
429
453
|
|
|
454
|
+
**Body (optional):**
|
|
455
|
+
```json
|
|
456
|
+
{ "forget": true }
|
|
457
|
+
```
|
|
458
|
+
When `forget: true`, releases reserved URL (zrok v2 `zrok2 delete name`) and clears config `tunnel.zrok.reservedName`. Without body or `forget: false`, plain disconnect preserves reserved URL + config (URL stable on next connect).
|
|
459
|
+
|
|
430
460
|
---
|
|
431
461
|
|
|
432
462
|
## Server Lifecycle
|