@blackbelt-technology/pi-dashboard-extension 0.7.0 → 0.8.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/SKILL.md +28 -14
- package/.pi/skills/browser/UPSTREAM.md +10 -1
- package/.pi/skills/browser/references/electron.agent.md +57 -0
- package/.pi/skills/browser/references/own-browser.md +299 -0
- package/.pi/skills/browser/references/web.agent.md +323 -0
- package/.pi/skills/browser/scripts/check-panerelay.sh +157 -0
- package/.pi/skills/doctor/SKILL.md +3 -9
- package/.pi/skills/doctor/_lib/checks.ts +14 -68
- package/.pi/skills/doctor/_lib/derive-tokens.ts +1 -0
- package/.pi/skills/doctor/modules/apple-tools.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/apple-tools.md +51 -0
- package/.pi/skills/doctor/modules/oauth-redirect-base.knowledge.hash +1 -0
- package/.pi/skills/doctor/modules/oauth-redirect-base.md +71 -0
- package/.pi/skills/doctor/modules/pi-resolution.knowledge.hash +1 -1
- package/.pi/skills/doctor/modules/pi-resolution.md +21 -1
- package/.pi/skills/pi-dashboard/references/api-reference.agent.md +69 -0
- package/.pi/skills/project-init/SKILL.md +1 -7
- package/.pi/skills/project-init/dox-doctrine.md +42 -0
- package/.pi/skills/project-init/profiles/docs/profile.json +1 -1
- package/README.md +19 -0
- package/agents/DoxTriage.md +80 -0
- package/package.json +22 -11
- package/src/agent-settled.ts +27 -9
- package/src/auto-session-namer.ts +486 -70
- package/src/autostart-guard.ts +99 -0
- package/src/autostart-lock.ts +258 -0
- package/src/bridge-context.ts +86 -5
- package/src/bridge-ticket-client.ts +105 -0
- package/src/bridge.ts +917 -213
- package/src/command-handler.ts +332 -57
- package/src/connect-target.ts +130 -0
- package/src/connection.ts +371 -7
- package/src/endpoint-resolution.ts +221 -0
- package/src/flow-event-wiring.ts +125 -3
- package/src/followup-buffer.ts +217 -0
- package/src/instance-verification.ts +125 -0
- package/src/local-token-header.ts +44 -0
- package/src/model-refresh.ts +95 -0
- package/src/notify-proxy.ts +33 -0
- package/src/pi-env.d.ts +4 -0
- package/src/pi-retry-settings.ts +91 -0
- package/src/provider-register.ts +86 -21
- package/src/remote-registration-gate.ts +102 -0
- package/src/retry-tracker.ts +265 -86
- package/src/role-manager.ts +20 -0
- package/src/role-model-tools.ts +38 -3
- package/src/server-auto-start.ts +144 -2
- package/src/server-pin-store.ts +92 -0
- package/src/session-move.ts +275 -0
- package/src/session-sync.ts +24 -5
- package/src/subagent-forward-sites.ts +69 -0
- package/src/subagent-frame-buffer.ts +24 -3
- package/src/subagent-frame-strip.ts +109 -0
- package/src/subagent-tick-throttle.ts +250 -0
- package/src/transcript-backfill.ts +151 -0
- package/src/transcript-request-guard.ts +76 -0
- package/src/transport-diagnostics.ts +76 -0
- package/src/turn-actionability.ts +20 -0
- package/src/ui-stale-guard.ts +58 -0
- package/.pi/skills/doctor/AGENTS.md +0 -27
- package/src/AGENTS.md +0 -57
- package/src/__tests__/abort-latch.test.ts +0 -97
- package/src/__tests__/agent-settled.test.ts +0 -82
- package/src/__tests__/artifact-roots.test.ts +0 -83
- package/src/__tests__/ask-user-attachments.test.ts +0 -106
- package/src/__tests__/ask-user-schema-discriminator.test.ts +0 -141
- package/src/__tests__/ask-user-tool.test.ts +0 -571
- package/src/__tests__/auto-session-namer.test.ts +0 -339
- package/src/__tests__/bridge-default-model-apply.test.ts +0 -242
- package/src/__tests__/bridge-default-model-gate.test.ts +0 -50
- package/src/__tests__/bridge-entry-id-pi-070.test.ts +0 -174
- package/src/__tests__/bridge-followup-chat-order.test.ts +0 -215
- package/src/__tests__/bridge-followup-multi-entry.test.ts +0 -202
- package/src/__tests__/bridge-followup-mutation.test.ts +0 -217
- package/src/__tests__/bridge-followup-queue-drain.test.ts +0 -266
- package/src/__tests__/bridge-hasui-flip.test.ts +0 -109
- package/src/__tests__/bridge-no-queue-mutation.test.ts +0 -112
- package/src/__tests__/bridge-plugin-emit-event.test.ts +0 -44
- package/src/__tests__/bridge-queue-update-forward.test.ts +0 -77
- package/src/__tests__/bridge-resume-disconnect.test.ts +0 -333
- package/src/__tests__/bridge-shadow-queue-gate.test.ts +0 -299
- package/src/__tests__/bridge-shutdown-reset.test.ts +0 -159
- package/src/__tests__/bridge-slash-command-routing.test.ts +0 -458
- package/src/__tests__/bridge-stop-after-turn.test.ts +0 -72
- package/src/__tests__/bridge-system-followup.test.ts +0 -163
- package/src/__tests__/bridge-thinking-level-select.test.ts +0 -68
- package/src/__tests__/browser-skill-registered.test.ts +0 -84
- package/src/__tests__/build-provider-catalogue.test.ts +0 -210
- package/src/__tests__/command-handler.test.ts +0 -1180
- package/src/__tests__/commit-draft.test.ts +0 -100
- package/src/__tests__/connection-dropped-frames.test.ts +0 -78
- package/src/__tests__/connection-suppress-auto-start.test.ts +0 -97
- package/src/__tests__/connection.test.ts +0 -344
- package/src/__tests__/credentials-updated.test.ts +0 -26
- package/src/__tests__/custom-provider-apikey-roundtrip.test.ts +0 -128
- package/src/__tests__/cwd-missing-probe.test.ts +0 -82
- package/src/__tests__/dashboard-commands-shipped.test.ts +0 -53
- package/src/__tests__/dashboard-context-injector.test.ts +0 -190
- package/src/__tests__/dashboard-default-adapter.test.ts +0 -77
- package/src/__tests__/dev-build.test.ts +0 -79
- package/src/__tests__/doctor/checks.test.ts +0 -121
- package/src/__tests__/doctor/modules.test.ts +0 -64
- package/src/__tests__/doctor/provenance-hash.test.ts +0 -94
- package/src/__tests__/doctor/router.test.ts +0 -143
- package/src/__tests__/empty-actionable-guard-config.test.ts +0 -32
- package/src/__tests__/empty-actionable-guard.test.ts +0 -73
- package/src/__tests__/enrich-model-metadata.test.ts +0 -222
- package/src/__tests__/event-forwarder.test.ts +0 -119
- package/src/__tests__/extension-slash-command-detection.test.ts +0 -143
- package/src/__tests__/filter-enabled-models.test.ts +0 -151
- package/src/__tests__/fixtures/turn-actionability-fixtures.ts +0 -69
- package/src/__tests__/fork-entryid-timing.test.ts +0 -88
- package/src/__tests__/git-info-status.test.ts +0 -73
- package/src/__tests__/git-link-builder.test.ts +0 -102
- package/src/__tests__/git-poll.test.ts +0 -69
- package/src/__tests__/markdown-image-inliner.test.ts +0 -392
- package/src/__tests__/model-resolve.test.ts +0 -379
- package/src/__tests__/multiselect-dashboard-routing.test.ts +0 -203
- package/src/__tests__/multiselect-list.test.ts +0 -137
- package/src/__tests__/multiselect-polyfill.test.ts +0 -92
- package/src/__tests__/no-session-replacement-calls.test.ts +0 -99
- package/src/__tests__/no-tui-multiselect-arm-regression.test.ts +0 -81
- package/src/__tests__/openspec-activity-detector.test.ts +0 -337
- package/src/__tests__/openspec-cli-shim.test.ts +0 -145
- package/src/__tests__/openspec-poller.test.ts +0 -124
- package/src/__tests__/pi-version-tracker.test.ts +0 -109
- package/src/__tests__/process-metrics.test.ts +0 -47
- package/src/__tests__/process-scanner-kill.test.ts +0 -61
- package/src/__tests__/process-scanner.test.ts +0 -292
- package/src/__tests__/project-init-detect-stack.test.ts +0 -61
- package/src/__tests__/project-init-dox-kb-config.test.ts +0 -53
- package/src/__tests__/project-init-profiles.test.ts +0 -84
- package/src/__tests__/project-init-scaffold.test.ts +0 -139
- package/src/__tests__/project-init-seed-doctrine.test.ts +0 -100
- package/src/__tests__/project-trust.test.ts +0 -92
- package/src/__tests__/prompt-bus-wiring.test.ts +0 -791
- package/src/__tests__/prompt-bus.test.ts +0 -513
- package/src/__tests__/prompt-expander.test.ts +0 -398
- package/src/__tests__/provider-register-native-models.test.ts +0 -182
- package/src/__tests__/provider-register-reload.test.ts +0 -498
- package/src/__tests__/provider-register-thinking-levels.test.ts +0 -104
- package/src/__tests__/retry-tracker.test.ts +0 -152
- package/src/__tests__/role-manager.test.ts +0 -585
- package/src/__tests__/role-model-tools-registry-readiness.test.ts +0 -114
- package/src/__tests__/role-model-tools.test.ts +0 -229
- package/src/__tests__/search-files-completeness.test.ts +0 -111
- package/src/__tests__/search-files-ranking.test.ts +0 -168
- package/src/__tests__/server-auto-start.test.ts +0 -375
- package/src/__tests__/server-launcher-launch.test.ts +0 -96
- package/src/__tests__/server-launcher.test.ts +0 -101
- package/src/__tests__/server-probe.test.ts +0 -25
- package/src/__tests__/session-switch.test.ts +0 -139
- package/src/__tests__/session-sync.test.ts +0 -243
- package/src/__tests__/single-derivation-guard.test.ts +0 -39
- package/src/__tests__/source-detector.test.ts +0 -88
- package/src/__tests__/stats-extractor.test.ts +0 -92
- package/src/__tests__/subagent-frame-buffer.test.ts +0 -239
- package/src/__tests__/tool-result-image-inliner.test.ts +0 -206
- package/src/__tests__/tui-prompt-adapter.test.ts +0 -213
- package/src/__tests__/turn-actionability.test.ts +0 -86
- package/src/__tests__/ui-decorators.test.ts +0 -309
- package/src/__tests__/ui-modules.test.ts +0 -293
- package/src/__tests__/vcs-info.test.ts +0 -265
- package/src/__tests__/visibility-intent.test.ts +0 -43
- package/src/__tests__/watchdog.test.ts +0 -161
- package/src/abort-latch.ts.AGENTS.md +0 -3
- package/src/agent-settled.ts.AGENTS.md +0 -3
- package/src/artifact-roots.ts.AGENTS.md +0 -3
- package/src/ask-user-attachments.ts.AGENTS.md +0 -3
- package/src/ask-user-tool.ts.AGENTS.md +0 -3
- package/src/auto-session-namer.ts.AGENTS.md +0 -3
- package/src/bridge-context.ts.AGENTS.md +0 -3
- package/src/bridge-default-model-gate.ts.AGENTS.md +0 -3
- package/src/bridge.ts.AGENTS.md +0 -3
- package/src/command-handler.ts.AGENTS.md +0 -3
- package/src/commit-draft-agent.ts.AGENTS.md +0 -3
- package/src/commit-draft.ts.AGENTS.md +0 -3
- package/src/connection.ts.AGENTS.md +0 -3
- package/src/dashboard-context-injector.ts.AGENTS.md +0 -3
- package/src/dashboard-default-adapter.ts.AGENTS.md +0 -3
- package/src/dev-build.ts.AGENTS.md +0 -3
- package/src/empty-actionable-guard-config.ts.AGENTS.md +0 -3
- package/src/empty-actionable-guard.ts.AGENTS.md +0 -3
- package/src/event-forwarder.ts.AGENTS.md +0 -3
- package/src/flow-event-wiring.ts.AGENTS.md +0 -3
- package/src/git-link-builder.ts.AGENTS.md +0 -3
- package/src/git-poll.ts.AGENTS.md +0 -3
- package/src/hasui-flip.ts.AGENTS.md +0 -3
- package/src/markdown-image-inliner.ts.AGENTS.md +0 -3
- package/src/model-tracker.ts.AGENTS.md +0 -3
- package/src/multiselect-decode.ts.AGENTS.md +0 -3
- package/src/multiselect-list.ts.AGENTS.md +0 -3
- package/src/multiselect-polyfill.ts.AGENTS.md +0 -3
- package/src/openspec-cli-shim.ts.AGENTS.md +0 -7
- package/src/process-metrics.ts.AGENTS.md +0 -3
- package/src/process-scanner.ts.AGENTS.md +0 -3
- package/src/project-init/AGENTS.md +0 -12
- package/src/project-trust.ts.AGENTS.md +0 -3
- package/src/prompt-bus.ts.AGENTS.md +0 -3
- package/src/prompt-expander.ts.AGENTS.md +0 -3
- package/src/provider-register.ts.AGENTS.md +0 -3
- package/src/retry-tracker.ts.AGENTS.md +0 -3
- package/src/role-manager.ts.AGENTS.md +0 -3
- package/src/role-model-tools.ts.AGENTS.md +0 -3
- package/src/server-auto-start.ts.AGENTS.md +0 -3
- package/src/server-launcher.ts.AGENTS.md +0 -3
- package/src/session-sync.ts.AGENTS.md +0 -3
- package/src/slash-dispatch.ts.AGENTS.md +0 -3
- package/src/source-detector.ts.AGENTS.md +0 -3
- package/src/subagent-frame-buffer.ts.AGENTS.md +0 -3
- package/src/tool-result-image-inliner.ts.AGENTS.md +0 -3
- package/src/tui-prompt-adapter.ts.AGENTS.md +0 -3
- package/src/turn-actionability.ts.AGENTS.md +0 -3
- package/src/ui-modules.ts.AGENTS.md +0 -3
- package/src/vcs-info.ts.AGENTS.md +0 -3
- package/src/visibility-intent.ts.AGENTS.md +0 -3
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# process-scanner.ts — index
|
|
2
|
-
|
|
3
|
-
Detect child processes of a pi session. Exports `getOwnPgid`, `captureChildPgids`, `scanTrackedProcesses`, `scanChildProcesses`, `killProcessByPgid`, `scanWindowsProcesses`, `killWindowsProcess`, `ChildProcessInfo`, `ScanOptions`, `parseEtime`. Unix via ps/PGID two-phase (capture + check); Windows via PowerShell Get-CimInstance. Resolves system tools via global tool registry.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# DOX — packages/extension/src/project-init
|
|
2
|
-
|
|
3
|
-
Testable core of the `project-init` skill (shipped at `.pi/skills/project-init/`).
|
|
4
|
-
One row per source file.
|
|
5
|
-
|
|
6
|
-
| File | Purpose |
|
|
7
|
-
|------|---------|
|
|
8
|
-
| `profiles.ts` | Profile resolver. Exports `Profile`, `ResolveProfilesOptions`, `resolveProfiles`, `readProfile`, `shippedProfilesDir`, `userProfilesDir`. Enumerates `<skill>/profiles/*` ∪ `~/.pi/project-profiles/*`; user wins by name. Profile = dir with `AGENTS.md.tmpl` + `settings.json.tmpl` (required) + optional `profile.json` (`description`, `dox` + `stackAware` default false) + `prompts/*.md`. `stackAware` → templates carry `{{INSTALL_CMD}}`/`{{INIT_GATE}}` filled from `detect-stack.ts`. See change: project-init-skill-and-profiles. |
|
|
9
|
-
| `seed-doctrine.ts` | DOX doctrine seed. Exports `DOX_MARKER` (`<!-- dox-doctrine -->`), `doctrinePath`, `buildDoctrineOptions`, `buildDoctrineBlock`, `seedDoctrine`. Reads shipped `dox-doctrine.md`; extracts WRITE + one READ variant (kb-wired vs manual) by comment delimiters; appends block to target AGENTS.md only when marker absent (idempotent). See change: project-init-skill-and-profiles. |
|
|
10
|
-
| `detect-stack.ts` | Technology-stack detection for the `coding` (stack-aware) profile. Exports `Stack`, `STACKS` (npm/pnpm/yarn/bun/cargo/go/poetry/pip/maven/gradle), `detectStack(dir)` (marker-file best guess, JS lockfile beats plain package.json, pyproject `[tool.poetry]`→poetry else pip; bare→null), `stackSubstitutions(stack)` → `{INSTALL_CMD,TEST_CMD,BUILD_CMD,INIT_GATE,INIT_COMMAND}`. See change: project-init-skill-and-profiles. |
|
|
11
|
-
| `dox-kb-config.ts` | kb-config fragment for DOX-opted scaffold. Exports `DOX_KB_CONFIG` (`indexAgentsFiles:true` + `directoryLevelAgents.enabled:true` + `.` source), `kbConfigPath`, `writeDoxKbConfig` (writes `.pi/dashboard/knowledge_base.json` when absent). Validates against kb config schema. See change: project-init-skill-and-profiles. |
|
|
12
|
-
| `scaffold.ts` | Full scaffold. Exports `ScaffoldOptions`, `ScaffoldPlan`, `ScaffoldResult`, `planScaffold`, `scaffoldProfile`, `isValidWorktreeInit`. Renders `{{KEY}}` from `{PROJECT_NAME, ...substitutions}` (stack subs for stack-aware profiles); writes AGENTS.md + `.pi/settings.json` + `.pi/prompts/*.md`; DOX profile seeds doctrine + kb config. `ScaffoldResult.leftover` = unfilled placeholders (must be empty). `planScaffold` reports conflicts; `scaffoldProfile` throws on conflict unless `overwrite`. `isValidWorktreeInit` mirrors change-A `normalizeHook`. See change: project-init-skill-and-profiles. |
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# project-trust.ts — index
|
|
2
|
-
|
|
3
|
-
`project_trust` auto-decision (pure gate + defensive cwd read). `decideProjectTrust({dashboardSpawned,isHeadless,eventCwd,activationCwd})` → `"trust"` ONLY when all hold (dashboard-spawned AND headless AND `eventCwd===activationCwd`); every other case (incl. `eventCwd` undefined) → `"defer"` (deny-by-default). `readEventCwd(event,ctx)` reads `event.cwd` then `ctx.cwd` inside try/catch (stale/replaced ctx throw → undefined → defer); never a cached ctx. Bridge registers a `project_trust` handler at activation returning `{trusted:"yes",remember:false}` (per-run) / `{trusted:"undecided"}`; captures `activationCwd` at module scope (event fires pre-`session_start`, during resource-loader reload). See change: adopt-pi-074-080-features.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# prompt-bus.ts — index
|
|
2
|
-
|
|
3
|
-
Prompt dispatch bus — first-response-wins adapter routing + cross-adapter dismissal. Exports `PromptBus`, `PromptComponent`, `PromptClaim`, `PromptRequest`, `PromptResponse`, `PromptAdapter`, `PromptBusOptions`. Replaces ui-proxy race pattern / `emitPromptAndAwait`. Routes by priority; default 5min timeout.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# prompt-expander.ts — index
|
|
2
|
-
|
|
3
|
-
Expand prompt templates from disk for dashboard slash commands (`pi.sendUserMessage` skips expansion). Exports `loadPromptTemplate`, `expandPromptTemplateFromDisk`, `LoadedPromptTemplate`, `PromptFrontmatter`. Resolves from `.pi/prompts/`, `.pi/skills/<skill>/SKILL.md`, `<skill>/commands/*.md`, pi.getCommands registry; `:` ↔ `-` alias resolution.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# provider-register.ts — index
|
|
2
|
-
|
|
3
|
-
Register custom LLM providers + auto-discovered models from `~/.pi/agent/providers.json`. Exports `activate`, `buildProviderCatalogue`, `_buildProviderCatalogue`, `reloadProviders`, `onProviderChanged`, `enrichModelMetadata`, `toModelInfo`, `getModelDisplayName`, `getSessionInfo`, `getCustomProviderNames`, `toRegisterApiKey`, `ModelMetadata`, `CatalogProbe`. Implements `model:resolve` handler (`@role` via `lookupRole()`, `provider/model[:thinking]`, bare id). See change: add-agent-role-model-tools — `getModelRegistry()` sources ONLY the `ctx.modelRegistry`-captured ref (dead `pi.modelRegistry` cast removed); `flow:resolve-model` alias DELETED; `getCustomProviderNames()` added for `list_models` custom flag. See change: fix-thinking-level-supported-projection — `toModelInfo` drops allowlist treatment of `thinkingLevelMap`. Derives `supportedThinkingLevels` via local `deriveSupportedThinkingLevels(reasoning, thinkingLevelMap)` mirroring pi `getSupportedThinkingLevels` verbatim. `thinkingLevelMap` = sparse override table, not allowlist: unmentioned level stays supported, `null` disables that level, `xhigh` supported only when declared non-null. Non-reasoning model → `["off"]`. Reasoning + no map → `[off,minimal,low,medium,high]` (xhigh excluded, needs explicit entry). Field emitted only when model carries thinking metadata (reasoning flag present OR thinkingLevelMap); else undefined so client shows all six. Rule inlined, NOT imported from `@earendil-works/pi-ai`: pi-ai `.d.ts` re-exports via `.ts` extensions (`export * from "./models.ts"`) repo tsconfig (no `allowImportingTsExtensions`) cannot resolve; main entry gives TS2305, `/compat` absent in pinned 0.75.5 gives TS2307. See change: honor-native-models-json-metadata — `registerEntry` registers the UNION of `/v1/models` ids + user-authored `providers.<name>.models[]` ids; per-id metadata precedence native `models.json` (`loadNativeModels`→shared `flattenModelsJson`) → registry `probe(name,id)` → `enrichModelMetadata`; native `thinkingLevelMap`/`compat` spread through `pi.registerProvider` + carried on `ModelMetadata`. `deriveSupportedThinkingLevels` gains `maxSupported` param + explicit fail-CLOSED `max` branch (`maxSupported && map.max != null`); canonical list extended to `off..xhigh,max`. `getMaxSupported()` probes the SESSION runtime's own `getSupportedThinkingLevels` (0.75.5 has no `max`; 0.80.10 does), fail-closed. `deriveSupportedThinkingLevels` exported for the E11 synthetic-table test. `toModelInfo` stays a hard whitelist — never emits `compat`/`apiKey`. Server derives NO levels (D-X1: one derivation here).
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# retry-tracker.ts — index
|
|
2
|
-
|
|
3
|
-
Pure helper class `RetryTracker` synthesizes `auto_retry_start` / `auto_retry_end` by OBSERVING pi's own retry behavior — NO regex. pi ExtensionAPI does NOT expose `auto_retry_*` (verified pi 0.70/0.73; https://github.com/badlogic/pi-mono/discussions/2073). Observe model: error `message_end` records a pending failure + emits NOTHING; `observeMessageStart` on the next assistant `message_start` (same turn, no user prompt) emits `auto_retry_start{attempt,maxAttempts:-1,delayMs:-1,errorMessage}`; non-error `message_end` closing a chain emits `auto_retry_end{success:true}`; terminal error `agent_end` in a chain emits `auto_retry_end{success:false,finalError}`. A non-retryable terminal error (pi never re-attempts → no fresh `message_start`) emits NO `auto_retry_start`. `RETRYABLE_PATTERN` deleted. Bridge drives `observeMessageEnd` (sync, before `agent_end`) + `observeMessageStart` (assistant) + `observeAgentEnd` + `noteAbort`. See change: simplify-error-retry-single-card.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# role-manager.ts — index
|
|
2
|
-
|
|
3
|
-
Manages session model roles. Registers six `roles:*` handlers (`roles:get-all`/`set`/`remove`/`preset-load`/`preset-save`/`preset-delete`) — renamed from `flow:role-*`, NO alias (change: add-agent-role-model-tools D11). `roles:get-all` payload adds `builtinRoleNames = [...DEFAULT_ROLE_NAMES]`; `roles:set`+`roles:remove` re-validate name via shared `isValidRoleName(role, [])`; `roles:remove` rejects built-ins server-side then `removeRoleFromSchema`+save (change: add-custom-roles-ui). Exports `DEFAULT_ROLE_NAMES`, `lookupRole(ref)` (single `@role`→literal accessor: `{literal?,reason?}`, strips `@`, re-reads disk), `getModelRole` (delegates to `lookupRole`), `overlayDefaultRoles`, `overlayRoles(cfg)`/`effectiveRoleNames(cfg)` (effective schema = defaults ∪ added − removed), `addRoleName`/`removeRoleFromSchema` (mutate cfg; purge-on-remove). `RoleConfig` gains `roleNames`/`removedRoles`. `roles:get-all` overlays effective schema at read time — never empty, no auto-write. `role:resolve-model` = deprecated one-release alias via `lookupRole`; sets `probe.reason` when unconfigured. See change: add-agent-role-model-tools. See change: roles-standalone-defaults-and-local-install-detection.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# role-model-tools.ts — index
|
|
2
|
-
|
|
3
|
-
Agent-facing tools registered via `pi.registerTool` (capability agent-role-model-tools). Exports `registerRoleModelTools(pi,{getRegistry})`, `buildModelRows`, `buildModelsResult`, `ModelRow`, `ModelsResult`. `list_models` (read, roles-independent, source = `getRegistry().getAvailable()` = ModelSelector path; `annotated` derives `excludedReason` from `getAll()`\`getAvailable()` since pi ModelRegistry lacks `getAllAnnotated()`; custom flag via `getCustomProviderNames()`; result carries `registryReady` discriminator via `buildModelsResult` — falsy registry ⇒ `{ models:[], registryReady:false, reason }` (spawn-before-hydration, retry), else `registryReady:true`; disambiguates empty-vs-unhydrated; annotated obeys same discriminator. See change: fix-list-models-empty-on-unhydrated-registry), `list_roles` (read, bound-only, no models key), `update_roles` (write, discriminated `action`, every mutation gated behind `ctx.ui.confirm`, routes through role-manager accessors + atomic write). See change: add-agent-role-model-tools.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# server-auto-start.ts — index
|
|
2
|
-
|
|
3
|
-
Auto-start orchestration: discover dashboard via mDNS → health-check fallback → spawn server process. Exports `DiscoveredServer`, `AutoStartDeps`, `AutoStartResult`, `autoStartServer`. Honors `PI_DASHBOARD_NO_MDNS` opt-out gate, `shouldSuppressAutoStart` restart-quiesce hook, `onServerSpawned` PID exclusion callback, `onLaunchStart`/`onLaunchEnd` spinner hooks. Surfaces `getDashboardServerLogPath()` on launch failure.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# server-launcher.ts — index
|
|
2
|
-
|
|
3
|
-
Spawns dashboard server as detached process via shared `launchDashboardServer`. Exports `LaunchResult`, `resolveServerCliPath`, `buildSpawnEnv`, `buildSpawnArgs`, `launchServer`, `DEFAULT_SERVER_MAX_OLD_SPACE_MB`. Resolves CLI path (monorepo-dev vs installed), stamps `DASHBOARD_STARTER=Bridge`, logs to `getDashboardServerLogPath()`, 10s health timeout. `buildSpawnEnv` adds `--max-old-space-size=8192` to `NODE_OPTIONS` (heap headroom) unless the user already pinned a limit. See change: bound-subagent-event-serialization. Classifies `JitiNotFoundError`/`PortConflictError`/`EarlyExitError` → `logOwned` flag.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# session-sync.ts — index
|
|
2
|
-
|
|
3
|
-
Session register/replay/switch lifecycle. Exports `sendStateSync`, `replaySessionEntries`, `handleSessionChange`. First register tagged `registerReason:"spawn"` (scrubs single-use `PI_DASHBOARD_SPAWN_TOKEN`); reconnects tagged `"reattach"`. Sends commands_list, flows_list, models_list, providers_list, git_info_update. Delegates to `detectSessionSource`, `gatherGitInfo`, `buildProviderCatalogue`.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# slash-dispatch.ts — index
|
|
2
|
-
|
|
3
|
-
Extension slash-command dispatch (routing-step 9). Exports `tryDispatchExtensionCommand`, `FeedbackSink`, `DispatchConnection`. Three paths: B `pi.dispatchCommand` direct; C headless RPC `dispatch_extension_command` to server; D tmux/WT error feedback. Guarantees exactly one `started` + one terminal event. Non-extension text returns `false` (caller falls through).
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# source-detector.ts — index
|
|
2
|
-
|
|
3
|
-
Detects session source env. Exports `detectSessionSource(hasUI?, sessionFile?)` → `SessionSource`. TUI attached → `tui`/`tmux` (ZED_TERM/TMUX). Headless → reads `.meta.json` sidecar via `readSessionMeta` for `"dashboard"`; else `zed`/`tmux`/`tui`.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# subagent-frame-buffer.ts — index
|
|
2
|
-
|
|
3
|
-
Pure class `SubagentFrameBuffer` + `SUBAGENT_CHANNELS` set. Makes running-subagent timeline reconcilable. D1: `buffer(channel,data)` retains latest frame per `agentId` while bridge not ready (bounded `maxAgents`=64, drop-oldest, re-insert=most-recent); `drain()` returns buffered frames emission-order + clears (bridge flushes on re-register). D2: tracks latest snapshot per RUNNING agent (dropped on `subagents:completed`/`failed`), BOUNDED to `maxAgents` (same latest-wins/drop-oldest as `pending` via `evictToBound`) so resync storage stays bounded; `resync(agentId)` returns it or undefined (unknown/finished no-op). `markForwarded` counts ready-path + updates snapshot. `reset()` on session change/shutdown. `stats` counters (forwarded/buffered/flushed/droppedNoAgentId/overflowEvicted/resync*). Statics `isSubagentChannel`, `agentIdOf`. See change: fix-subagent-live-detail-reliability.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# tool-result-image-inliner.ts — index
|
|
2
|
-
|
|
3
|
-
Bridge Fix B tool-result image inliner. On `tool_execution_end` scans result text for absolute image paths (png/jpg/jpeg/gif/webp/svg/avif/bmp) resolving to existing files. Inlines via `inlineLocalImagePath` as `type:"image"` content blocks. Caps: `MAX_IMAGES_PER_RESULT=4`, `MAX_PER_IMAGE_BYTES`, `MAX_PER_MESSAGE_BYTES`. Strips consumed path from text (no dead link, D5). Over-cap/missing/non-image left as text → falls back to artifact route. Pure; `readFile` injected. Exports `inlineToolResultImages`, `ImageContentBlock`, `MAX_IMAGES_PER_RESULT`. Adds `isAllowedPath` gate (artifact-root containment) before disk read; preserves pre-existing non-text content blocks; padding-aware base64 byte budget. Byte-dedup: skips appending an image whose bytes match an image block already in the result (e.g. MCP `browser` returns text + native image for same screenshot) → strips path, no side-by-side duplicate; genuinely-different images still inline. See change: inline-agent-screenshot-artifacts, fix-duplicate-inlined-screenshot.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# tui-prompt-adapter.ts — index
|
|
2
|
-
|
|
3
|
-
Production PromptBus adapter for Pi's TUI. Exports `createTuiPromptAdapter(ui, bus)` and `TuiPromptUi`. Presents select/input/confirm/editor through captured unpatched `ctx.ui` methods (registered before `ctx.ui` is patched). Forwards confirm `metadata.message` as the rendered second arg (empty string when absent) so terminal confirm dialogs keep the context the dashboard already shows. Boolean confirm → `"true"`/`"false"` string; null answer → cancelled. Aborts its dialog when another adapter answers first or on cancel via a per-prompt `AbortController` map. Intentionally has no multiselect arm — pi 0.70 RPC mode's `ctx.ui.custom` is a no-op and would auto-cancel the dashboard-rendered dialog (see change: fix-multiselect-tui-arm-self-cancel); multiselect is handled by the bus-routed `ctx.ui.multiselect` patch + `DashboardDefaultAdapter`. See change: fix-confirm-context-in-pi-tui (PR #286).
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# turn-actionability.ts — index
|
|
2
|
-
|
|
3
|
-
Pure provider-agnostic classifier. Exports `classifyTurnActionability(turn)` → `normal`/`empty-actionable`/`truncated`/`error`, `ClassifiableTurn`, `TurnActionability`. `empty-actionable` = terminal non-error stop, no visible text part, no tool call (thinking-only/empty). Error precedence > truncation (`length`/`max_tokens`) > empty-actionable; text/toolCall part → normal regardless of stop reason. Shape-only, no provider id. See change: fix-gemini-subagent-silent-tool-schema-failure.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# ui-modules.ts — index
|
|
2
|
-
|
|
3
|
-
Extension UI system bridge side. Exports `refreshUiModules`, `subscribeUiInvalidate`, `handleUiManagement`, `INVALIDATE_RATE_CAP_PER_SEC`, `UiModulesBridgeCtx`, `UiManagementInbound`. Synchronous `ui:list-modules` probe → `ui_modules_list` + `ext_ui_decorator` messages. Last-write-wins dedup. 20/sec `ui:invalidate` throttle. `ui_management` re-emit with `_reply` → `ui_data_list`.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# vcs-info.ts — index
|
|
2
|
-
|
|
3
|
-
Gathers git branch/remote/PR/worktree info via shared platform git helpers. Exports `GitInfo`, `detectBranch`, `detectRemoteUrl`, `detectPrNumber`, `detectWorktree`, `detectIsGitRepo`, `gatherGitInfo`. `detectWorktree` compares `--git-common-dir` vs `--show-toplevel`. `detectIsGitRepo` returns tri-state `boolean\|undefined` from `git.isGitRepo()` Result: ok→value, exit-128→false, else→undefined (never false on inconclusive probe); attached to `session_register` (session-sync.ts, bridge.ts). Builds links via `buildGitLinks`. Returns undefined if not a repo. Exports `gatherGitStatus(cwd)` → `GitStatus\|undefined` via shared `git.gitStatusV2` (`git status --porcelain=v2 --branch`). See changes: gate-session-worktree-button-on-git, add-session-uncommitted-indicator-and-commit.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# visibility-intent.ts — index
|
|
2
|
-
|
|
3
|
-
Resolves `session_register` visibility fields. Exports `resolveVisibilityIntent`, `buildVisibilityRegisterFields`. `PI_DASHBOARD_VISIBLE` beats `PI_DASHBOARD_HIDDEN`; absent ⇒ undefined (server auto-hide heuristic). Emits `{ hasUI?, visibilityIntent? }` slice omitting absent fields. See change auto-hide-headless-worker-sessions.
|