@blackbelt-technology/pi-agent-dashboard 0.10.0 → 0.11.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/AGENTS.md +2 -2
- package/README.md +47 -6
- package/docs/architecture.md +1369 -63
- package/package.json +14 -9
- package/packages/extension/package.json +5 -3
- package/packages/extension/src/bridge-handlers/dispatch.ts +57 -3
- package/packages/extension/src/bridge-handlers/instance.ts +10 -1
- package/packages/extension/src/bridge-handlers/lifecycle.ts +65 -26
- package/packages/extension/src/bridge-ticket-client.ts +61 -7
- package/packages/extension/src/bridge-tls-checks.ts +79 -0
- package/packages/extension/src/bridge.ts +41 -28
- package/packages/extension/src/canvas-tool.ts +2 -0
- package/packages/extension/src/command-handler.ts +80 -6
- package/packages/extension/src/connect-target.ts +23 -0
- package/packages/extension/src/connection.ts +30 -7
- package/packages/extension/src/dashboard-http-origin.ts +88 -0
- package/packages/extension/src/dev-build.ts +11 -1
- package/packages/extension/src/git-link-builder.ts +11 -2
- package/packages/extension/src/inbound-limits.ts +138 -0
- package/packages/extension/src/local-token-header.ts +77 -6
- package/packages/extension/src/model-refresh.ts +69 -0
- package/packages/extension/src/pinned-endpoint.ts +44 -0
- package/packages/extension/src/project-trust-live.ts +143 -0
- package/packages/extension/src/project-trust.ts +159 -20
- package/packages/extension/src/provider-register.ts +59 -18
- package/packages/extension/src/remote-registration-gate.ts +21 -21
- package/packages/extension/src/remote-upgrade-preparer.ts +104 -0
- package/packages/extension/src/role-model-tools.ts +47 -6
- package/packages/extension/src/server-auto-start.ts +1 -1
- package/packages/extension/src/server-proof-probe.ts +117 -0
- package/packages/extension/src/session-sync.ts +42 -12
- package/packages/extension/src/vault-delivery.ts +11 -1
- package/packages/server/package.json +8 -8
- package/packages/server/src/access/access-grants.ts +61 -8
- package/packages/server/src/access/access-health.ts +10 -0
- package/packages/server/src/access/access-plane.ts +5 -1
- package/packages/server/src/access/containment-gate.ts +55 -17
- package/packages/server/src/access/cwd-verdict.ts +3 -3
- package/packages/server/src/access/pi-trust-live.ts +244 -0
- package/packages/server/src/access/pi-trust-mirror-service.ts +44 -11
- package/packages/server/src/access/planes.ts +106 -1
- package/packages/server/src/access/preview-egress-store.ts +153 -0
- package/packages/server/src/access/prompt-channel.ts +5 -0
- package/packages/server/src/access/provisioning-wiring.ts +113 -0
- package/packages/server/src/access/provisioning.ts +763 -0
- package/packages/server/src/access/yolo-session.ts +54 -2
- package/packages/server/src/acp-bridge/acp-session-adapter.ts +8 -3
- package/packages/server/src/agent-events/agent-event-hub.ts +158 -0
- package/packages/server/src/auth/audit-log.ts +80 -0
- package/packages/server/src/auth/auth-plugin.ts +44 -25
- package/packages/server/src/auth/auth.ts +24 -4
- package/packages/server/src/auth/bearer-auth.ts +52 -12
- package/packages/server/src/auth/cors-origin.ts +76 -29
- package/packages/server/src/auth/csp-report-paths.ts +31 -0
- package/packages/server/src/auth/csp-report-sink.ts +302 -0
- package/packages/server/src/auth/csp-report-store.ts +406 -0
- package/packages/server/src/auth/csp.ts +105 -9
- package/packages/server/src/auth/dashboard-credential-store.ts +4 -0
- package/packages/server/src/auth/dashboard-state-caller.ts +29 -0
- package/packages/server/src/auth/local-proof-refusal-log.ts +89 -0
- package/packages/server/src/auth/local-proof.ts +69 -18
- package/packages/server/src/auth/localhost-guard.ts +48 -10
- package/packages/server/src/auth/nav-intent.ts +72 -0
- package/packages/server/src/auth/passkey/passkey-assets.ts +99 -0
- package/packages/server/src/auth/passkey/passkey-pages.ts +17 -81
- package/packages/server/src/auth/passkey/passkey-routes.ts +8 -0
- package/packages/server/src/auth/pi-legacy-credentials.ts +3 -0
- package/packages/server/src/auth/plugin-server-trust.ts +29 -0
- package/packages/server/src/auth/plugin-trust-store.ts +103 -0
- package/packages/server/src/auth/proven-tls.ts +45 -0
- package/packages/server/src/auth/provider-auth-storage.ts +6 -1
- package/packages/server/src/auth/radius-mcp.ts +1 -1
- package/packages/server/src/auth/request-principal.ts +32 -0
- package/packages/server/src/auth/secret-rotation.ts +246 -0
- package/packages/server/src/auth/secure-origin.ts +56 -0
- package/packages/server/src/auth/serve-app-host.ts +111 -11
- package/packages/server/src/auth/ws-ticket.ts +39 -1
- package/packages/server/src/auth/ws-upgrade-reject-log.ts +4 -1
- package/packages/server/src/browser-handlers/directory-handler.ts +23 -0
- package/packages/server/src/browser-handlers/folder-gate.ts +55 -0
- package/packages/server/src/browser-handlers/handler-context.ts +25 -2
- package/packages/server/src/browser-handlers/session-action-handler.ts +9 -1
- package/packages/server/src/browser-handlers/subscription-handler.ts +100 -2
- package/packages/server/src/browser-handlers/terminal-handler.ts +108 -10
- package/packages/server/src/canvas/canvas-accumulator.ts +35 -7
- package/packages/server/src/cli.ts +210 -39
- package/packages/server/src/config-api.ts +23 -1
- package/packages/server/src/config-snapshot.ts +48 -1
- package/packages/server/src/directory-service.ts +160 -54
- package/packages/server/src/event-wiring.ts +143 -108
- package/packages/server/src/git-worktree/git-operations.ts +44 -10
- package/packages/server/src/git-worktree/redact-git-text.ts +124 -0
- package/packages/server/src/git-worktree/ref-arg.ts +39 -0
- package/packages/server/src/git-worktree/worktree-init-trust.ts +43 -1
- package/packages/server/src/identity/http-road-classification.ts +13 -1
- package/packages/server/src/identity/ws-message-scope.ts +1 -0
- package/packages/server/src/identity/ws-road-classification.ts +1 -0
- package/packages/server/src/known-server-moves.ts +36 -15
- package/packages/server/src/lib/browse-roots.ts +118 -17
- package/packages/server/src/lib/client-dist.ts +36 -21
- package/packages/server/src/lib/dashboard-state-guard.ts +230 -0
- package/packages/server/src/lib/diagram-render.ts +4 -6
- package/packages/server/src/lib/eml.ts +3 -8
- package/packages/server/src/lib/file-cwd-admission.ts +145 -0
- package/packages/server/src/lib/grep-worker.ts +23 -0
- package/packages/server/src/lib/grep.ts +93 -7
- package/packages/server/src/lib/index-html.ts +81 -0
- package/packages/server/src/lib/office-preview.ts +2 -3
- package/packages/server/src/lib/path-containment.ts +7 -0
- package/packages/server/src/lib/resolve-file-mention.ts +11 -9
- package/packages/server/src/lib/route-admission.ts +80 -0
- package/packages/server/src/lib/writable-md-target.ts +4 -0
- package/packages/server/src/lifecycle/recovery-server.ts +65 -18
- package/packages/server/src/live-server/capability-redact.ts +15 -0
- package/packages/server/src/live-server/live-browser-gate.ts +22 -0
- package/packages/server/src/live-server/live-capability.ts +224 -17
- package/packages/server/src/live-server/live-csp-report.ts +63 -0
- package/packages/server/src/live-server/live-csp.ts +93 -0
- package/packages/server/src/live-server/live-egress.ts +435 -0
- package/packages/server/src/live-server/live-exposure.ts +149 -0
- package/packages/server/src/live-server/live-log.ts +21 -0
- package/packages/server/src/live-server/live-origin-scan.ts +298 -0
- package/packages/server/src/live-server/live-server-manager.ts +209 -33
- package/packages/server/src/live-server/live-server-proxy.ts +162 -17
- package/packages/server/src/live-server/live-static.ts +228 -0
- package/packages/server/src/openspec/dependencies-file.ts +122 -0
- package/packages/server/src/openspec/openspec-change-watcher.ts +3 -1
- package/packages/server/src/openspec/openspec-dependency-inputs.ts +281 -0
- package/packages/server/src/openspec/openspec-poll-fs-helpers.ts +72 -26
- package/packages/server/src/openspec/openspec-poll-worker-pool.ts +48 -12
- package/packages/server/src/openspec/openspec-poll-worker.ts +95 -9
- package/packages/server/src/openspec/workflow-schema-status.ts +379 -0
- package/packages/server/src/openspec/workflow-schema.ts +141 -267
- package/packages/server/src/package/npm-search-proxy.ts +5 -2
- package/packages/server/src/package/provider-probe.ts +8 -2
- package/packages/server/src/pairing/browser-gateway.ts +188 -12
- package/packages/server/src/pairing/device-token-services.ts +26 -0
- package/packages/server/src/pairing/paired-devices.ts +335 -22
- package/packages/server/src/pairing/pairing.ts +34 -4
- package/packages/server/src/pairing/socket-locality.ts +26 -0
- package/packages/server/src/persistence/preferences-store.ts +9 -0
- package/packages/server/src/pi/bridge-channel.ts +33 -0
- package/packages/server/src/pi/bridge-upgrade-auth.ts +18 -3
- package/packages/server/src/pi/gateway-listeners.ts +9 -3
- package/packages/server/src/pi/host-project-trust.ts +14 -6
- package/packages/server/src/pi/pi-gateway.ts +191 -21
- package/packages/server/src/pi/resource-toggle-trust.ts +1 -1
- package/packages/server/src/plugin-discovery-wiring.ts +142 -0
- package/packages/server/src/plugin-event-seam.ts +116 -4
- package/packages/server/src/plugin-runtime-clients.ts +89 -0
- package/packages/server/src/routes/access-routes.ts +159 -9
- package/packages/server/src/routes/agent-event-stream-routes.ts +137 -0
- package/packages/server/src/routes/canvas-types-routes.ts +20 -6
- package/packages/server/src/routes/csp-violations-routes.ts +162 -0
- package/packages/server/src/routes/file-routes.ts +329 -209
- package/packages/server/src/routes/file-write-binary-routes.ts +77 -20
- package/packages/server/src/routes/folder-project-routes.ts +18 -12
- package/packages/server/src/routes/git-routes.ts +319 -203
- package/packages/server/src/routes/grep-routes.ts +38 -14
- package/packages/server/src/routes/known-servers-routes.ts +189 -91
- package/packages/server/src/routes/live-server-routes.ts +378 -15
- package/packages/server/src/routes/local-proof-routes.ts +14 -0
- package/packages/server/src/routes/nav-intent-routes.ts +46 -0
- package/packages/server/src/routes/openspec-group-routes.ts +53 -44
- package/packages/server/src/routes/openspec-routes.ts +379 -28
- package/packages/server/src/routes/package-routes.ts +58 -10
- package/packages/server/src/routes/pairing-routes.ts +146 -10
- package/packages/server/src/routes/pi-trust-query-routes.ts +330 -0
- package/packages/server/src/routes/plugin-activation-routes.ts +59 -0
- package/packages/server/src/routes/plugin-runtime-client-routes.ts +149 -0
- package/packages/server/src/routes/provider-auth-routes.ts +15 -2
- package/packages/server/src/routes/resource-activation-routes.ts +18 -4
- package/packages/server/src/routes/session-routes.ts +51 -4
- package/packages/server/src/routes/system-routes.ts +84 -15
- package/packages/server/src/routes/ui-link-base.ts +88 -0
- package/packages/server/src/runtime-overlay/runtime-io.ts +2 -9
- package/packages/server/src/server.ts +648 -137
- package/packages/server/src/session/hydration-state.ts +148 -0
- package/packages/server/src/session/memory-session-manager.ts +7 -0
- package/packages/server/src/session/replay-exit-controller.ts +221 -0
- package/packages/server/src/session/retained-transcript.ts +9 -2
- package/packages/server/src/session/session-load-worker.ts +11 -2
- package/packages/server/src/spawn-process/headless-pid-registry.ts +14 -9
- package/packages/server/src/terminal/terminal-manager.ts +54 -46
- package/packages/server/src/tls/tls-bridge-route.ts +61 -0
- package/packages/server/src/tls/tls-config-validation.ts +2 -0
- package/packages/server/src/vault/device-expiry-sweep.ts +36 -0
- package/packages/server/src/vault/vault-delivery-hub.ts +155 -25
- package/packages/server/src/watch-files-handler.ts +66 -0
- package/packages/shared/package.json +1 -1
- package/packages/shared/src/browser-protocol.ts +148 -2
- package/packages/shared/src/canvas-declare.ts +27 -0
- package/packages/shared/src/config.ts +372 -53
- package/packages/shared/src/containment-guard.ts +35 -0
- package/packages/shared/src/dashboard-plugin/anthropic-peer-names.ts +9 -0
- package/packages/shared/src/dashboard-plugin/event-type-owners.ts +50 -0
- package/packages/shared/src/dashboard-plugin/file-handler.ts +2 -0
- package/packages/shared/src/dashboard-plugin/host-api.ts +61 -0
- package/packages/shared/src/dashboard-plugin/host-fx-classes.ts +23 -0
- package/packages/shared/src/dashboard-plugin/host-import-map.ts +38 -0
- package/packages/shared/src/dashboard-plugin/index.ts +2 -0
- package/packages/shared/src/dashboard-plugin/manifest-types.ts +54 -1
- package/packages/shared/src/dashboard-plugin/plugin-status.ts +54 -0
- package/packages/shared/src/dashboard-plugin/slot-props.ts +45 -3
- package/packages/shared/src/dashboard-plugin/slot-types.ts +8 -0
- package/packages/shared/src/dashboard-plugin/subagent-types.ts +219 -0
- package/packages/shared/src/dashboard-plugin/ui-primitives.ts +28 -0
- package/packages/shared/src/display-prefs.ts +13 -0
- package/packages/shared/src/doctor-core.ts +94 -27
- package/packages/shared/src/live-server.ts +141 -0
- package/packages/shared/src/local-proof-signal.ts +16 -0
- package/packages/shared/src/loopback-host.ts +26 -0
- package/packages/shared/src/mcp/verb-tiers.generated.ts +178 -0
- package/packages/shared/src/mdns-discovery.ts +25 -6
- package/packages/shared/src/nav-intent.ts +29 -0
- package/packages/shared/src/openspec-dependencies.ts +760 -0
- package/packages/shared/src/openspec-poller.ts +3 -2
- package/packages/shared/src/pairing-knock-client.ts +44 -4
- package/packages/shared/src/pi-trust-live-query.ts +93 -0
- package/packages/shared/src/pi-trust-mirror-snapshot.ts +5 -7
- package/packages/shared/src/pi-trust-mirror-types.ts +36 -3
- package/packages/shared/src/pi-trust-mirror.ts +29 -3
- package/packages/shared/src/pi-trust-resource-digest.ts +255 -0
- package/packages/shared/src/platform/ensure-bundled-git.ts +57 -34
- package/packages/shared/src/platform/git-source.ts +88 -26
- package/packages/shared/src/platform/git.ts +14 -8
- package/packages/shared/src/platform/process.ts +48 -4
- package/packages/shared/src/platform/resolve-pi-shell.ts +76 -0
- package/packages/shared/src/platform/select-git-source.ts +7 -0
- package/packages/shared/src/plugin-route-cwd.ts +95 -0
- package/packages/shared/src/preview-egress.ts +138 -0
- package/packages/shared/src/project-root.ts +16 -0
- package/packages/shared/src/protocol.ts +40 -1
- package/packages/shared/src/recommended-extensions.ts +18 -0
- package/packages/shared/src/recovery-timing.ts +27 -0
- package/packages/shared/src/remote-credentials.ts +63 -0
- package/packages/shared/src/rest-api.ts +55 -8
- package/packages/shared/src/route-tiers.ts +55 -1
- package/packages/shared/src/runtime-overlay/archive-safety.d.mts +2 -0
- package/packages/shared/src/runtime-overlay/archive-safety.mjs +33 -0
- package/packages/shared/src/runtime-overlay/manifest.d.mts +7 -0
- package/packages/shared/src/runtime-overlay/manifest.mjs +22 -2
- package/packages/shared/src/safe-local-path.ts +24 -0
- package/packages/shared/src/sanitize-profiles.ts +98 -0
- package/packages/shared/src/server-launcher.ts +9 -1
- package/packages/shared/src/server-pinning.ts +55 -2
- package/packages/shared/src/server-routes.ts +462 -0
- package/packages/shared/src/session-ui-path.ts +11 -0
- package/packages/shared/src/tls-only-token.ts +16 -0
- package/packages/shared/src/tool-registry/definitions.ts +5 -5
- package/packages/shared/src/tool-registry/strategies.ts +12 -11
- package/packages/shared/src/types.ts +66 -0
- package/packages/shared/src/url-policy.ts +96 -0
- package/packages/shared/src/vault-delivery.ts +15 -0
- package/packages/shared/src/ws-message-tiers.ts +1 -0
package/AGENTS.md
CHANGED
|
@@ -69,8 +69,8 @@ grep -nE 'FAIL|Error|✗|✘|Tests +[0-9]+ (failed|passed)' /tmp/pi-test.log
|
|
|
69
69
|
Quick reference:
|
|
70
70
|
```bash
|
|
71
71
|
npm run reload # after packages/extension/ changes
|
|
72
|
-
|
|
73
|
-
npm run build &&
|
|
72
|
+
npx tsx .pi/skills/implement/scripts/restart-server.ts # after packages/server|packages/shared changes (jiti — no build; mints local proof)
|
|
73
|
+
npm run build && npx tsx .pi/skills/implement/scripts/restart-server.ts # after packages/client changes (production)
|
|
74
74
|
curl -s http://localhost:8000/api/health | jq .mode # dev | production
|
|
75
75
|
```
|
|
76
76
|
`/api/restart` is the single restart source of truth (CLI `restart` delegates to it when the dashboard is up). `--dev` proxies to Vite with automatic production fallback. `full-rebuild.ts` = deploy checked-out dev to the local instance; NOT a feature step.
|
package/README.md
CHANGED
|
@@ -298,7 +298,15 @@ CLI flags → environment variables → config file → built-in defaults.
|
|
|
298
298
|
|
|
299
299
|
Push notifications: manage devices and webhooks under Settings ▸ Sessions ▸ Push notifications; details in "Push Notifications" in [docs/architecture.md](docs/architecture.md).
|
|
300
300
|
|
|
301
|
-
The bridge also honours `PI_DASHBOARD_URL=ws://host:port` to point at a remote server instead of localhost.
|
|
301
|
+
The bridge also honours `PI_DASHBOARD_URL=ws://host:port` to point at a remote server instead of localhost. For a remote server, `port` is the **pi gateway** port (default `9999`), not the web UI port.
|
|
302
|
+
|
|
303
|
+
A remote bridge (one with `PI_DASHBOARD_TOKEN` set) also makes HTTP calls to the dashboard (ticket mint, identity check, trust query). It sends those to the dashboard's **HTTP** origin, resolved as:
|
|
304
|
+
|
|
305
|
+
1. `PI_DASHBOARD_HTTP_URL` (e.g. `https://dash.example`) when set. Only its origin is used. It applies to the host named in `PI_DASHBOARD_URL`; an invalid value (not `http(s)`, or with credentials) is refused, never ignored.
|
|
306
|
+
2. Plaintext `ws://host:<port>`: `http://host:<HTTP port>`, where the HTTP port is `PI_DASHBOARD_PORT` → `DASHBOARD_PORT` → `8000`. The bridge machine's own `~/.pi/dashboard/config.json` is not read. If this machine also runs its own dashboard on a custom port, set `PI_DASHBOARD_HTTP_URL` instead.
|
|
307
|
+
3. `wss://host[:port]` or a port-less `ws://host`: the endpoint's own origin (a TLS proxy in front is assumed to route `/api`).
|
|
308
|
+
|
|
309
|
+
**Breaking (narrow):** a plaintext reverse proxy serving both `/api` and the bridge path on one explicit non-default `ws://host:<port>` now needs `PI_DASHBOARD_HTTP_URL` (or `PI_DASHBOARD_PORT=<port>`). The bridge log prints the resolved `http origin <origin> (<source>)`; `bridge ticket wrong-origin` means that origin is not the dashboard's HTTP listener.
|
|
302
310
|
|
|
303
311
|
#### Pi sessions directory
|
|
304
312
|
|
|
@@ -376,6 +384,17 @@ pi-dashboard open [--url <origin>] # or authorize this browser tab, the
|
|
|
376
384
|
|
|
377
385
|
Docker: `docker exec <container> pi-dashboard pair approve`. The CLI must run as the same OS user as the server. Per-setup table: "How do I approve a pending device pairing request?" in [docs/faq.md](docs/faq.md).
|
|
378
386
|
|
|
387
|
+
### Local access (`requireLocalProof`)
|
|
388
|
+
|
|
389
|
+
Default `requireLocalProof: true`. A caller on the loopback address with no forwarding header (bare loopback) reads observe-tier REST and `/v1/*` only. Every other REST route and WebSocket needs local proof: a `pi_dash_local` cookie, the `X-Pi-Local-Proof` header from the CLI or bridge, the desktop app, or a signed-in/paired principal. Refusal: `403 network_not_allowed` with `reason: "local_proof_required"`.
|
|
390
|
+
|
|
391
|
+
- Browser tab refused: run `pi-dashboard open` (opens the dashboard already authorized). Forwarded loopback (`ssh -L`, VS Code port forward, WSL): run `pi-dashboard open --print` on the server, then open the URL through a forward on the same port (the cookie is bound to the port).
|
|
392
|
+
- Scripts on this host: `pi-dashboard api <METHOD> <path> [--data <json>]` (mints proof per request). Raw `curl` to control routes is refused.
|
|
393
|
+
- Opt-out: `"requireLocalProof": false` in `config.json` (live, no restart). **Opting out re-exposes the control plane to every container on the host** (Docker Desktop `host.docker.internal`, `--network host`, `ssh -R`, `socat` all look like bare loopback). Keep it on unless the host is single-user and no container or relay reaches `127.0.0.1`.
|
|
394
|
+
- Upgrade: the first start rotates the local token and `auth.secret` once, so everyone signs in again. Stop every dashboard instance before upgrading.
|
|
395
|
+
|
|
396
|
+
See [docs/architecture.md](docs/architecture.md) (Trust and Credential Boundaries) and [docs/faq.md](docs/faq.md).
|
|
397
|
+
|
|
379
398
|
### LAN access
|
|
380
399
|
|
|
381
400
|
Bind wide first: `bindHost` or `PI_DASHBOARD_HOST=0.0.0.0` (restart required). Then `network.trustMode` decides who admits LAN peers:
|
|
@@ -395,6 +414,8 @@ Details: [How do I expose the dashboard on my LAN?](docs/faq.md#how-do-i-expose-
|
|
|
395
414
|
|
|
396
415
|
The dashboard auto-connects a [zrok](https://zrok.io/) tunnel on start when `tunnel.enabled` is `true`. Install with `brew install zrok` (macOS) and run `zrok enable <token>` to enrol — the dashboard reads zrok's own config (`~/.zrok2/environment.json`), no keys are stored in the dashboard. Reserved shares provide persistent URLs across restarts.
|
|
397
416
|
|
|
417
|
+
Shell output (`!`, `!!`, exec templates) reaches every tunnel viewer; only credential-vault values are masked. Do not print secrets in shell commands on a tunneled session — see [FAQ](docs/faq.md#can-tunnel-viewers-see-shell-command-output).
|
|
418
|
+
|
|
398
419
|
### OpenSpec background polling
|
|
399
420
|
|
|
400
421
|
Tune how often the server polls known directories for OpenSpec updates (`openspec` block):
|
|
@@ -494,13 +515,16 @@ npx tsx packages/server/src/cli.ts --dev # proxy to Vite dev server
|
|
|
494
515
|
|
|
495
516
|
### Graceful restart via API
|
|
496
517
|
|
|
518
|
+
A bare `curl` to a control or operate route is refused (`403 local_proof_required`): `requireLocalProof` is on by
|
|
519
|
+
default, so a local caller must prove it is on this machine. `pi-dashboard api` mints that proof for each request.
|
|
520
|
+
|
|
497
521
|
```bash
|
|
498
522
|
# Restart in the same mode
|
|
499
|
-
|
|
523
|
+
pi-dashboard api POST /api/restart
|
|
500
524
|
|
|
501
525
|
# Switch to dev / production
|
|
502
|
-
|
|
503
|
-
|
|
526
|
+
pi-dashboard api POST /api/restart --data '{"dev":true}'
|
|
527
|
+
pi-dashboard api POST /api/restart --data '{"dev":false}'
|
|
504
528
|
|
|
505
529
|
# Check current mode
|
|
506
530
|
curl -s http://localhost:8000/api/health | jq .mode
|
|
@@ -625,6 +649,23 @@ The skill has two modes:
|
|
|
625
649
|
|
|
626
650
|
For the slot taxonomy, the manifest schema, and the plugin context API, see the skill's reference docs (or the runtime: [`@blackbelt-technology/dashboard-plugin-runtime`](https://www.npmjs.com/package/@blackbelt-technology/dashboard-plugin-runtime)). The reference fixture is [`packages/demo-plugin/`](packages/demo-plugin/).
|
|
627
651
|
|
|
652
|
+
|
|
653
|
+
### Installing and trusting third-party dashboard plugins
|
|
654
|
+
|
|
655
|
+
A dashboard plugin published as a pi package (keyword `pi-dashboard-plugin`) installs like any pi package:
|
|
656
|
+
|
|
657
|
+
```bash
|
|
658
|
+
pi install npm:<package> --scope global
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
- **Through the dashboard** (Packages tab, or `POST /api/packages/install` with `scope: "global"`): the plugin appears live in the Plugins tab, no restart.
|
|
662
|
+
- **From a terminal `pi install`**: the dashboard is not told, so the plugin appears after a dashboard restart.
|
|
663
|
+
- **Local scope** (`pi install -l`, project `.pi/settings.json`): detected for active sessions' folders and listed as `local-detected`, never loaded. Install it globally to enable it.
|
|
664
|
+
- **Server code** of a plugin that arrives as a pi package (`pi-package` source) is default-deny: it stays `server-untrusted` until a local operator grants server trust in the Plugins tab (`POST /api/plugins/:id/trust {"server": true}`, localhost only). Plugins from other sources run under the existing pi extension trust.
|
|
665
|
+
- **Client UI** of a prebuilt plugin (manifest `clientBundle`) is loaded at runtime only after a local operator trusts that exact build: the grant pins the bundle's content hash (`auth.trustedPlugins`). A rebuilt bundle needs a fresh grant ("Trust this version").
|
|
666
|
+
|
|
667
|
+
Details: [`docs/runtime-plugin-clients.md`](docs/runtime-plugin-clients.md) and [`docs/publishing-plugins.md`](docs/publishing-plugins.md).
|
|
668
|
+
|
|
628
669
|
---
|
|
629
670
|
|
|
630
671
|
## Troubleshooting
|
|
@@ -801,12 +842,12 @@ pi -e packages/extension/src/bridge.ts # or just `pi` if installed
|
|
|
801
842
|
# Chained with && so a refused sync aborts before the restart.
|
|
802
843
|
pnpm run build \
|
|
803
844
|
&& node scripts/sync-served-client.mjs \
|
|
804
|
-
&&
|
|
845
|
+
&& pi-dashboard restart
|
|
805
846
|
# Full verified rebuild script (build + sync + restart + reload)
|
|
806
847
|
./scripts/rebuild-restart.sh
|
|
807
848
|
|
|
808
849
|
# After server changes (runs TypeScript directly, no build needed)
|
|
809
|
-
|
|
850
|
+
pi-dashboard restart # in a dev checkout: npx tsx packages/server/src/cli.ts restart
|
|
810
851
|
|
|
811
852
|
# After bridge extension changes
|
|
812
853
|
pnpm run reload
|