@blackbelt-technology/pi-agent-dashboard 0.6.1 → 0.7.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/README.md +40 -38
- package/docs/architecture.md +148 -2
- package/package.json +6 -4
- package/packages/extension/package.json +4 -3
- package/packages/extension/src/AGENTS.md +1 -0
- package/packages/extension/src/__tests__/bridge-resume-disconnect.test.ts +333 -0
- package/packages/extension/src/__tests__/openspec-cli-shim.test.ts +145 -0
- package/packages/extension/src/__tests__/provider-register-native-models.test.ts +182 -0
- package/packages/extension/src/__tests__/provider-register-thinking-levels.test.ts +54 -1
- package/packages/extension/src/__tests__/single-derivation-guard.test.ts +39 -0
- package/packages/extension/src/bridge-context.ts +21 -0
- package/packages/extension/src/bridge.ts +41 -6
- package/packages/extension/src/openspec-cli-shim.ts +173 -0
- package/packages/extension/src/openspec-cli-shim.ts.AGENTS.md +7 -0
- package/packages/extension/src/provider-register.ts +180 -17
- package/packages/extension/src/provider-register.ts.AGENTS.md +1 -1
- package/packages/extension/src/session-sync.ts +9 -4
- package/packages/server/package.json +8 -8
- package/packages/server/src/__tests__/decorate-goals-spend.test.ts +79 -0
- package/packages/server/src/__tests__/embed-lifecycle-boot-smoke.test.ts +44 -0
- package/packages/server/src/__tests__/goal-routes.test.ts +62 -7
- package/packages/server/src/__tests__/goal-supervisor.test.ts +4 -4
- package/packages/server/src/__tests__/headless-pid-registry.test.ts +7 -3
- package/packages/server/src/__tests__/memory-event-store.test.ts +369 -13
- package/packages/server/src/__tests__/models-introspection-thinking-map.test.ts +67 -0
- package/packages/server/src/__tests__/pi-changelog-routes.test.ts +9 -2
- package/packages/server/src/__tests__/recovery-offer.test.ts +42 -7
- package/packages/server/src/__tests__/recovery-reattach-retraction.test.ts +188 -0
- package/packages/server/src/__tests__/session-tags-persistence.test.ts +29 -0
- package/packages/server/src/browser-handlers/AGENTS.md +1 -1
- package/packages/server/src/browser-handlers/__tests__/session-meta-handler.test.ts +98 -1
- package/packages/server/src/browser-handlers/handler-context.ts +24 -13
- package/packages/server/src/browser-handlers/session-action-handler.ts +12 -1
- package/packages/server/src/browser-handlers/session-meta-handler.ts +29 -0
- package/packages/server/src/embed-lifecycle/AGENTS.md +17 -0
- package/packages/server/src/embed-lifecycle/__tests__/caps.test.ts +129 -0
- package/packages/server/src/embed-lifecycle/__tests__/embed-lifecycle-controller.test.ts +84 -0
- package/packages/server/src/embed-lifecycle/__tests__/identity-key.test.ts +73 -0
- package/packages/server/src/embed-lifecycle/__tests__/idle-reaper.test.ts +173 -0
- package/packages/server/src/embed-lifecycle/__tests__/lifecycle-config.test.ts +26 -0
- package/packages/server/src/embed-lifecycle/__tests__/lifecycle-event-capture.test.ts +32 -0
- package/packages/server/src/embed-lifecycle/__tests__/lifecycle-marker-persistence.test.ts +106 -0
- package/packages/server/src/embed-lifecycle/__tests__/lifecycle-metrics.test.ts +39 -0
- package/packages/server/src/embed-lifecycle/__tests__/liveness-probe.test.ts +77 -0
- package/packages/server/src/embed-lifecycle/__tests__/quiescence.test.ts +175 -0
- package/packages/server/src/embed-lifecycle/__tests__/reclamation-soak.test.ts +77 -0
- package/packages/server/src/embed-lifecycle/__tests__/session-lifecycle-policy.test.ts +38 -0
- package/packages/server/src/embed-lifecycle/__tests__/visitor-session-registry.test.ts +140 -0
- package/packages/server/src/embed-lifecycle/caps.ts +88 -0
- package/packages/server/src/embed-lifecycle/cwd-allowlist.ts +50 -0
- package/packages/server/src/embed-lifecycle/embed-lifecycle-controller.ts +90 -0
- package/packages/server/src/embed-lifecycle/identity-key.ts +73 -0
- package/packages/server/src/embed-lifecycle/idle-reaper.ts +161 -0
- package/packages/server/src/embed-lifecycle/lifecycle-event-capture.ts +30 -0
- package/packages/server/src/embed-lifecycle/lifecycle-metrics.ts +70 -0
- package/packages/server/src/embed-lifecycle/liveness-probe.ts +123 -0
- package/packages/server/src/embed-lifecycle/quiescence.ts +159 -0
- package/packages/server/src/embed-lifecycle/session-lifecycle-policy.ts +31 -0
- package/packages/server/src/embed-lifecycle/visitor-session-registry.ts +178 -0
- package/packages/server/src/event-wiring.ts +20 -0
- package/packages/server/src/event-wiring.ts.AGENTS.md +1 -0
- package/packages/server/src/goal/AGENTS.md +1 -0
- package/packages/server/src/goal/decorate-goals-spend.ts +47 -0
- package/packages/server/src/goal/goal-supervisor.ts +5 -3
- package/packages/server/src/model-proxy/AGENTS.md +2 -2
- package/packages/server/src/model-proxy/__tests__/internal-registry-native-merge.test.ts +155 -0
- package/packages/server/src/model-proxy/__tests__/read-native-models.test.ts +92 -0
- package/packages/server/src/model-proxy/internal-registry.ts +49 -23
- package/packages/server/src/model-proxy/registry-singleton.ts +15 -9
- package/packages/server/src/pairing/browser-gateway.ts +40 -11
- package/packages/server/src/pairing/browser-gateway.ts.AGENTS.md +1 -1
- package/packages/server/src/persistence/memory-event-store.ts +369 -23
- package/packages/server/src/persistence/memory-event-store.ts.AGENTS.md +1 -1
- package/packages/server/src/routes/AGENTS.md +2 -2
- package/packages/server/src/routes/goal-routes.ts +14 -9
- package/packages/server/src/routes/models-introspection-routes.ts +10 -0
- package/packages/server/src/routes/system-routes.ts +16 -1
- package/packages/server/src/server.ts +216 -65
- package/packages/server/src/server.ts.AGENTS.md +1 -1
- package/packages/server/src/session/memory-session-manager.ts +4 -0
- package/packages/server/src/session/session-scanner.ts +9 -0
- package/packages/server/src/session/session-to-meta.ts +6 -0
- package/packages/server/src/spawn-process/headless-pid-registry.ts +14 -4
- package/packages/shared/package.json +1 -1
- package/packages/shared/src/AGENTS.md +5 -3
- package/packages/shared/src/__tests__/models-json-reader.test.ts +100 -0
- package/packages/shared/src/__tests__/nightly-workflow-contract.test.ts +125 -0
- package/packages/shared/src/__tests__/openspec-poller-1.6.0-compat.test.ts +112 -0
- package/packages/shared/src/__tests__/pnpm-migration-contract.test.ts +177 -0
- package/packages/shared/src/__tests__/publish-workflow-contract.test.ts +6 -3
- package/packages/shared/src/browser-protocol.ts +22 -0
- package/packages/shared/src/config.ts +70 -0
- package/packages/shared/src/dashboard-plugin/AGENTS.md +1 -1
- package/packages/shared/src/dashboard-plugin/slot-props.ts +9 -0
- package/packages/shared/src/dashboard-plugin/ui-primitives.ts +19 -0
- package/packages/shared/src/models-json-reader.ts +98 -0
- package/packages/shared/src/platform/AGENTS.md +1 -1
- package/packages/shared/src/platform/paths.ts +12 -0
- package/packages/shared/src/session-meta.ts +9 -0
- package/packages/shared/src/types.ts +52 -1
- package/docs/AGENTS.md +0 -47
- package/packages/extension/AGENTS.md +0 -7
- package/packages/server/AGENTS.md +0 -7
- package/packages/shared/AGENTS.md +0 -7
- package/scripts/AGENTS.md +0 -38
|
@@ -178,6 +178,47 @@ export const DEFAULT_KEEPER_LOG: KeeperLogConfig = {
|
|
|
178
178
|
capturePiOutput: false,
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
+
// ── Embed session lifecycle ─────────────────────────────────────────
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Server-side lifecycle controls for machine-fronted (`ephemeral`) sessions:
|
|
185
|
+
* idempotent acquire, the idle reaper, and active-session caps. Disabled by
|
|
186
|
+
* default (D8) — every numeric threshold is inert while `enabled` is false, so
|
|
187
|
+
* an upgrade is byte-for-byte behavior-preserving until an operator opts in.
|
|
188
|
+
* Thresholds are seconds on the wire; the reaper converts to ms. Lives under
|
|
189
|
+
* `~/.pi/dashboard/config.json` `embedLifecycle`.
|
|
190
|
+
* See change: add-embed-session-lifecycle.
|
|
191
|
+
*/
|
|
192
|
+
export interface EmbedLifecycleConfig {
|
|
193
|
+
/** Master toggle. Default false — reaper, caps, and server-side acquire dormant. */
|
|
194
|
+
enabled: boolean;
|
|
195
|
+
/** Idle reap threshold: reap a quiescent ephemeral session after this idle. */
|
|
196
|
+
idleTimeoutSeconds: number;
|
|
197
|
+
/** Phantom force-reap ceiling: a run streaming longer than this without settling is wedged. */
|
|
198
|
+
hardCeilingSeconds: number;
|
|
199
|
+
/** Post-spawn/resume grace window before a fresh session is reap-eligible. */
|
|
200
|
+
graceWindowSeconds: number;
|
|
201
|
+
/** Reaper sweep cadence. */
|
|
202
|
+
sweepIntervalSeconds: number;
|
|
203
|
+
/** Bounded acquire-coalescing timeout: reject if `session_register` never arrives. */
|
|
204
|
+
registerTimeoutSeconds: number;
|
|
205
|
+
/** Per-visitor active-ephemeral cap (fairness bound for trusted identities). */
|
|
206
|
+
maxActiveEmbedSessionsPerVisitor: number;
|
|
207
|
+
/** Global active-ephemeral cap (the HARD security bound against spoofed identities). */
|
|
208
|
+
maxActiveEmbedSessionsGlobal: number;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export const DEFAULT_EMBED_LIFECYCLE: EmbedLifecycleConfig = {
|
|
212
|
+
enabled: false,
|
|
213
|
+
idleTimeoutSeconds: 1800,
|
|
214
|
+
hardCeilingSeconds: 3600,
|
|
215
|
+
graceWindowSeconds: 30,
|
|
216
|
+
sweepIntervalSeconds: 60,
|
|
217
|
+
registerTimeoutSeconds: 30,
|
|
218
|
+
maxActiveEmbedSessionsPerVisitor: 5,
|
|
219
|
+
maxActiveEmbedSessionsGlobal: 50,
|
|
220
|
+
};
|
|
221
|
+
|
|
181
222
|
export interface KnownServer {
|
|
182
223
|
host: string;
|
|
183
224
|
port: number;
|
|
@@ -301,6 +342,8 @@ export interface DashboardConfig {
|
|
|
301
342
|
openspec: OpenSpecPollConfig;
|
|
302
343
|
/** Session behavior — hydration worker offload toggle. */
|
|
303
344
|
sessions: SessionsConfig;
|
|
345
|
+
/** Embed/ephemeral session lifecycle controls (reaper, caps, acquire). Off by default. */
|
|
346
|
+
embedLifecycle: EmbedLifecycleConfig;
|
|
304
347
|
/** Keeper log behavior — gates capture of pi stdout/stderr into keeper-<id>.log. */
|
|
305
348
|
keeperLog: KeeperLogConfig;
|
|
306
349
|
/**
|
|
@@ -454,6 +497,7 @@ const DEFAULTS: DashboardConfig = {
|
|
|
454
497
|
memoryLimits: { ...DEFAULT_MEMORY_LIMITS },
|
|
455
498
|
openspec: { ...DEFAULT_OPENSPEC_POLL },
|
|
456
499
|
sessions: { ...DEFAULT_SESSIONS },
|
|
500
|
+
embedLifecycle: { ...DEFAULT_EMBED_LIFECYCLE },
|
|
457
501
|
keeperLog: { ...DEFAULT_KEEPER_LOG },
|
|
458
502
|
trustedNetworks: [],
|
|
459
503
|
resolvedTrustedNetworks: [],
|
|
@@ -541,6 +585,31 @@ function clampNumber(raw: any, fallback: number, min: number, max: number): numb
|
|
|
541
585
|
return n;
|
|
542
586
|
}
|
|
543
587
|
|
|
588
|
+
export function parseEmbedLifecycleConfig(raw: any): EmbedLifecycleConfig {
|
|
589
|
+
if (!raw || typeof raw !== "object") return { ...DEFAULT_EMBED_LIFECYCLE };
|
|
590
|
+
const d = DEFAULT_EMBED_LIFECYCLE;
|
|
591
|
+
return {
|
|
592
|
+
enabled: typeof raw.enabled === "boolean" ? raw.enabled : d.enabled,
|
|
593
|
+
idleTimeoutSeconds: clampNumber(raw.idleTimeoutSeconds, d.idleTimeoutSeconds, 1, 86_400),
|
|
594
|
+
hardCeilingSeconds: clampNumber(raw.hardCeilingSeconds, d.hardCeilingSeconds, 1, 604_800),
|
|
595
|
+
graceWindowSeconds: clampNumber(raw.graceWindowSeconds, d.graceWindowSeconds, 0, 3_600),
|
|
596
|
+
sweepIntervalSeconds: clampNumber(raw.sweepIntervalSeconds, d.sweepIntervalSeconds, 1, 3_600),
|
|
597
|
+
registerTimeoutSeconds: clampNumber(raw.registerTimeoutSeconds, d.registerTimeoutSeconds, 1, 600),
|
|
598
|
+
maxActiveEmbedSessionsPerVisitor: clampNumber(
|
|
599
|
+
raw.maxActiveEmbedSessionsPerVisitor,
|
|
600
|
+
d.maxActiveEmbedSessionsPerVisitor,
|
|
601
|
+
1,
|
|
602
|
+
10_000,
|
|
603
|
+
),
|
|
604
|
+
maxActiveEmbedSessionsGlobal: clampNumber(
|
|
605
|
+
raw.maxActiveEmbedSessionsGlobal,
|
|
606
|
+
d.maxActiveEmbedSessionsGlobal,
|
|
607
|
+
1,
|
|
608
|
+
100_000,
|
|
609
|
+
),
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
|
|
544
613
|
function parseSessionsConfig(raw: any): SessionsConfig {
|
|
545
614
|
if (!raw || typeof raw !== "object") return { ...DEFAULT_SESSIONS };
|
|
546
615
|
return {
|
|
@@ -844,6 +913,7 @@ export function loadConfig(): DashboardConfig {
|
|
|
844
913
|
memoryLimits: parseMemoryLimits(parsed.memoryLimits),
|
|
845
914
|
openspec: parseOpenSpecPollConfig(parsed.openspec),
|
|
846
915
|
sessions: parseSessionsConfig(parsed.sessions),
|
|
916
|
+
embedLifecycle: parseEmbedLifecycleConfig(parsed.embedLifecycle),
|
|
847
917
|
keeperLog: parseKeeperLogConfig(parsed.keeperLog),
|
|
848
918
|
trustedNetworks: parseTrustedNetworks(parsed.trustedNetworks),
|
|
849
919
|
resolvedTrustedNetworks: [],
|
|
@@ -11,4 +11,4 @@ Files in this directory. One row per source file.
|
|
|
11
11
|
| `route-descriptor.ts` | `RouteDescriptor` + `claimsToRouteDescriptors(claims)` + `interpolateParentPath(parentPath, params)` + `RouteClaimLike`. Shared depth-aware back-action type; client + runtime both depend on shared (avoids cycle). Emits back descriptors from `shell-overlay-route` claims. See change: fix-plugin-and-scoped-back-navigation. |
|
|
12
12
|
| `slot-props.ts` | `SlotPropsMap` (slot id → props type) + `SlotProps<S>` helper + `FolderDescriptor`/`ToolRendererImage`/`ToolRendererContext`/`AnyPluginContext`. Opaque `AnyPluginContext` keeps types-only package free of runtime dep. See change: wire-tool-renderer-slot. |
|
|
13
13
|
| `slot-types.ts` | Frozen slot taxonomy. Exports `SlotId` union, `Multiplicity`, `PayloadTier`, `SlotDefinition`, `SLOT_DEFINITIONS` map, `SettingsTab` + `VALID_SETTINGS_TABS` (adds resource page ids `skills`/`agents`/`extensions`/`prompts`/`themes`; change: resources-card-tabs), `SlotPredicateInput<S>` classifier. Adding slot = minor; removing/renaming = major. See change: slot-generic-claim-entry. Adds folder-scoped `worktree-card-section` slot (KB row inside worktree session cards). See change: kb-row-on-worktree-session-card. |
|
|
14
|
-
| `ui-primitives.ts` | Defines `UI_PRIMITIVE_KEYS` + `UiPrimitiveMap` + per-primitive prop interfaces (`UiAgentCardProps`, `UiMarkdownContentProps`, `UiConfirmDialogProps`, `UiDialogPortalProps`, `UiSearchableSelectDialogProps`, `UiZoomControlsProps`, format helpers). Adds `modelSelector: "ui:model-selector"` key + `UiModelSelectorProps {current?, models?, onSelect(modelLabel)}`; imports `ModelInfo` from `../types.js`. See change: add-ui-model-selector-primitive. Adds `dialog: "ui:dialog"` key + `UiDialogProps` + `UiDialogComponent` (static Footer/Cancel/Action) + intent/footer/cancel/action prop interfaces. `ui:confirm-dialog` contract unchanged (re-skinned via adapter). See change: unify-dialog-system. |
|
|
14
|
+
| `ui-primitives.ts` | Defines `UI_PRIMITIVE_KEYS` + `UiPrimitiveMap` + per-primitive prop interfaces (`UiAgentCardProps`, `UiMarkdownContentProps`, `UiConfirmDialogProps`, `UiDialogPortalProps`, `UiSearchableSelectDialogProps`, `UiZoomControlsProps`, format helpers). Adds `modelSelector: "ui:model-selector"` key + `UiModelSelectorProps {current?, models?, onSelect(modelLabel)}`; imports `ModelInfo` from `../types.js`. See change: add-ui-model-selector-primitive. Adds `dialog: "ui:dialog"` key + `UiDialogProps` + `UiDialogComponent` (static Footer/Cancel/Action) + intent/footer/cancel/action prop interfaces. `ui:confirm-dialog` contract unchanged (re-skinned via adapter). See change: unify-dialog-system. Adds `logBlock: "ui:log-block"` key + `UiLogBlockProps` (label/text/collapsible/preview/previewLines/maxHeightClass/copyIcon); consumed by the flows-plugin code-node log preview. See change: redesign-directory-card. |
|
|
@@ -24,6 +24,13 @@ export interface FolderDescriptor {
|
|
|
24
24
|
label?: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Where a folder section is being rendered. `sidebar` (default) = the sidebar
|
|
29
|
+
* folder card (raised pill); `card` = inside a session card (flat pill matching
|
|
30
|
+
* the SessionSubcard panels). See change: align-session-card-kb-slot-surface.
|
|
31
|
+
*/
|
|
32
|
+
export type SlotPlacement = "sidebar" | "card";
|
|
33
|
+
|
|
27
34
|
/**
|
|
28
35
|
* Image payload forwarded to `tool-renderer` plugins. Structural mirror of the
|
|
29
36
|
* client's `ChatImage` (kept inline so this types-only package stays free of a
|
|
@@ -51,10 +58,12 @@ export interface ToolRendererContext {
|
|
|
51
58
|
export interface SlotPropsMap {
|
|
52
59
|
"sidebar-folder-section": {
|
|
53
60
|
folder: FolderDescriptor;
|
|
61
|
+
placement?: SlotPlacement;
|
|
54
62
|
pluginContext: AnyPluginContext;
|
|
55
63
|
};
|
|
56
64
|
"worktree-card-section": {
|
|
57
65
|
folder: FolderDescriptor;
|
|
66
|
+
placement?: SlotPlacement;
|
|
58
67
|
pluginContext: AnyPluginContext;
|
|
59
68
|
};
|
|
60
69
|
"session-card-badge": {
|
|
@@ -63,6 +63,9 @@ export const UI_PRIMITIVE_KEYS = {
|
|
|
63
63
|
/** Reasoning / thinking block with collapsible content + elapsed-time badge.
|
|
64
64
|
* Matches the main chat view's thinking rendering. */
|
|
65
65
|
thinkingBlock: "ui:thinking-block",
|
|
66
|
+
/** Monospace log/stderr inset panel with a labelled header, copy control
|
|
67
|
+
* (always full text), and collapse/expand or `preview` (last-N-lines) mode. */
|
|
68
|
+
logBlock: "ui:log-block",
|
|
66
69
|
} as const;
|
|
67
70
|
|
|
68
71
|
/** Union of all valid UI primitive keys (literal-string narrowed). */
|
|
@@ -287,6 +290,21 @@ export interface UiPopoverProps {
|
|
|
287
290
|
* here. TypeScript will fail builds that reference the new key without
|
|
288
291
|
* matching registration in main.tsx.
|
|
289
292
|
*/
|
|
293
|
+
/**
|
|
294
|
+
* Public prop signature for the log-block primitive. Mirrors `LogBlock` in
|
|
295
|
+
* the client primitives dir. Adding optional props is non-breaking.
|
|
296
|
+
*/
|
|
297
|
+
export interface UiLogBlockProps {
|
|
298
|
+
label: string;
|
|
299
|
+
text: string;
|
|
300
|
+
collapsible?: boolean;
|
|
301
|
+
defaultOpen?: boolean;
|
|
302
|
+
preview?: boolean;
|
|
303
|
+
previewLines?: number;
|
|
304
|
+
maxHeightClass?: string;
|
|
305
|
+
copyIcon?: string;
|
|
306
|
+
}
|
|
307
|
+
|
|
290
308
|
export interface UiPrimitiveMap {
|
|
291
309
|
"ui:agent-card": ComponentType<UiAgentCardProps>;
|
|
292
310
|
"ui:markdown-content": ComponentType<UiMarkdownContentProps>;
|
|
@@ -303,6 +321,7 @@ export interface UiPrimitiveMap {
|
|
|
303
321
|
"ui:popover": ComponentType<UiPopoverProps>;
|
|
304
322
|
"ui:tool-call-step": ComponentType<UiToolCallStepProps>;
|
|
305
323
|
"ui:thinking-block": ComponentType<UiThinkingBlockProps>;
|
|
324
|
+
"ui:log-block": ComponentType<UiLogBlockProps>;
|
|
306
325
|
}
|
|
307
326
|
|
|
308
327
|
/**
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared reader for the user-authored `~/.pi/agent/models.json`.
|
|
3
|
+
*
|
|
4
|
+
* ONE pure flatten/precedence function consumed by BOTH registry paths — the
|
|
5
|
+
* bridge extension (`provider-register.ts`) and the dashboard server
|
|
6
|
+
* (`registry-singleton.readModels`) — so the two cannot diverge on how the
|
|
7
|
+
* native nested format is parsed.
|
|
8
|
+
*
|
|
9
|
+
* Accepted shapes (all coexist; on a `provider/id` collision the NESTED native
|
|
10
|
+
* entry wins over a legacy top-level entry):
|
|
11
|
+
* 1. Native nested — `{ providers: { <name>: { models: [ { id, … } ] } } }`.
|
|
12
|
+
* Each model is stamped `provider: <name>` (the PARENT key wins over any
|
|
13
|
+
* in-entry `provider`).
|
|
14
|
+
* 2. Legacy top-level array — `[ { provider, id, … } ]`.
|
|
15
|
+
* 3. Legacy `{ models: [ { provider, id, … } ] }`.
|
|
16
|
+
*
|
|
17
|
+
* Defensive PER-PROVIDER: a malformed provider block (or a non-array `models`)
|
|
18
|
+
* contributes no entries for that block and never throws; other providers still
|
|
19
|
+
* read. This function is PURE over already-parsed JSON — callers own file I/O
|
|
20
|
+
* and the `console.warn` on a JSON syntax error.
|
|
21
|
+
*
|
|
22
|
+
* See change: honor-native-models-json-metadata (D-X2).
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** A flattened custom-model entry as read from `models.json`. */
|
|
26
|
+
export interface NativeModelEntry {
|
|
27
|
+
id: string;
|
|
28
|
+
provider: string;
|
|
29
|
+
api?: string;
|
|
30
|
+
baseUrl?: string;
|
|
31
|
+
contextWindow?: number;
|
|
32
|
+
maxTokens?: number;
|
|
33
|
+
reasoning?: boolean;
|
|
34
|
+
thinkingLevelMap?: Record<string, unknown>;
|
|
35
|
+
/** Opaque runtime request-formatting hints (e.g. `thinkingFormat`). Never serialized to `/api/models`. */
|
|
36
|
+
compat?: Record<string, unknown>;
|
|
37
|
+
cost?: { input: number; output: number; cacheRead?: number; cacheWrite?: number };
|
|
38
|
+
input?: string[];
|
|
39
|
+
headers?: Record<string, string>;
|
|
40
|
+
oauthCompatible?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function isRecord(v: unknown): v is Record<string, unknown> {
|
|
44
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** A raw entry object is usable when it carries a string `id`. */
|
|
48
|
+
function hasStringId(v: unknown): v is Record<string, unknown> & { id: string } {
|
|
49
|
+
return isRecord(v) && typeof v.id === "string" && v.id.length > 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type EntryMap = Map<string, NativeModelEntry>;
|
|
53
|
+
|
|
54
|
+
function put(byKey: EntryMap, entry: NativeModelEntry): void {
|
|
55
|
+
byKey.set(`${entry.provider}/${entry.id}`, entry);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Legacy shapes: entries carry their own `provider` + `id`. */
|
|
59
|
+
function addLegacyEntries(byKey: EntryMap, entries: unknown[]): void {
|
|
60
|
+
for (const m of entries) {
|
|
61
|
+
if (hasStringId(m) && typeof m.provider === "string") put(byKey, m as unknown as NativeModelEntry);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Native nested `providers.<name>.models[]` — the parent key stamps `provider`. */
|
|
66
|
+
function addNestedProviders(byKey: EntryMap, providers: Record<string, unknown>): void {
|
|
67
|
+
for (const [name, block] of Object.entries(providers)) {
|
|
68
|
+
const models = isRecord(block) ? block.models : undefined;
|
|
69
|
+
if (!Array.isArray(models)) continue; // per-provider defensive: skip, keep the rest
|
|
70
|
+
for (const m of models) {
|
|
71
|
+
if (hasStringId(m)) put(byKey, { ...(m as object), provider: name } as NativeModelEntry);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Flatten a parsed `models.json` value into stamped `NativeModelEntry[]`.
|
|
78
|
+
* Deduped by `provider/id`; nested native entries win over legacy top-level
|
|
79
|
+
* entries on collision. Returns `[]` for any non-object / unusable input.
|
|
80
|
+
*/
|
|
81
|
+
export function flattenModelsJson(parsed: unknown): NativeModelEntry[] {
|
|
82
|
+
const byKey: EntryMap = new Map();
|
|
83
|
+
|
|
84
|
+
// 1. Legacy top-level array.
|
|
85
|
+
if (Array.isArray(parsed)) {
|
|
86
|
+
addLegacyEntries(byKey, parsed);
|
|
87
|
+
return [...byKey.values()];
|
|
88
|
+
}
|
|
89
|
+
if (!isRecord(parsed)) return [];
|
|
90
|
+
|
|
91
|
+
// 2. Legacy `{ models: [] }` — added BEFORE nested so nested wins on collision.
|
|
92
|
+
if (Array.isArray(parsed.models)) addLegacyEntries(byKey, parsed.models);
|
|
93
|
+
|
|
94
|
+
// 3. Native nested `providers.<name>.models[]`.
|
|
95
|
+
if (isRecord(parsed.providers)) addNestedProviders(byKey, parsed.providers);
|
|
96
|
+
|
|
97
|
+
return [...byKey.values()];
|
|
98
|
+
}
|
|
@@ -17,7 +17,7 @@ Files in this directory. One row per source file.
|
|
|
17
17
|
| `node-spawn.ts` | Canonical `node --import <loader> <entry>` argv builder. Exports `spawnNodeScript`, `buildNodeImportArgvParts`, `isTsxLoader`, `isJitiLoader`, `shouldUrlWrapEntry`, `toFileUrl`, `SpawnNodeScriptOptions`. URL-wraps loader always; entry wrap per `shouldUrlWrapEntry` (tsx+jiti reject `file://` entries; Windows default Node wraps). Single source for `--import` argv shape; lint `no-raw-node-import` enforces. |
|
|
18
18
|
| `npm.ts` | Recipe-based npm CLI API. Exports `Recipe` consts `NPM_ROOT_GLOBAL`, `NPM_OUTDATED`, `NPM_OUTDATED_GLOBAL`, `NPM_INSTALL`, `NPM_INSTALL_GLOBAL`, `NPM_VIEW_VERSION` + `NPM_RECIPES`. Typed funcs `rootGlobal`/`outdated`/`outdatedGlobal`/`install`/`installGlobal`/`viewVersion` return `Result<T>`; `*Or` variants swallow errors. Long install timeout 120s; outdated tolerates exit 1. |
|
|
19
19
|
| `openspec.ts` | Recipe-based OpenSpec tool module. Adds `OPENSPEC_CONFIG_PROFILE` + `OPENSPEC_UPDATE` recipes, `configProfile()`/`update()` runners, `writeOpenSpecConfigFile()` (atomic tmp+rename), `workflowSetSignature()`, `openSpecConfigFilePath()`. Adds `configListAsync` + `configListOrAsync` (async, non-blocking sibling of `configList`/`configListOr`, uses `runAsync`). Re-exports `CORE_WORKFLOWS`/`EXPANDED_WORKFLOWS` from types. See changes: add-openspec-profile-settings, fix-openspec-profile-load-race. |
|
|
20
|
-
| `paths.ts` | Isomorphic OS-aware path primitives (no `node:path`; browser-safe). Exports `normalizePath`, `samePath`, `parsePathInput`, `withTrailingSep`, `joinForDisplay`, `isFilesystemRoot`. Windows drive-letter + UNC root aware; case-insensitive on win32/darwin, case-sensitive on linux. Every helper takes injectable `platform` param. Used by pin storage, session grouping, path-picker UI. |
|
|
20
|
+
| `paths.ts` | Isomorphic OS-aware path primitives (no `node:path`; browser-safe). Exports `normalizePath`, `samePath`, `parsePathInput`, `withTrailingSep`, `joinForDisplay`, `isFilesystemRoot`. Windows drive-letter + UNC root aware; case-insensitive on win32/darwin, case-sensitive on linux. Every helper takes injectable `platform` param. Used by pin storage, session grouping, path-picker UI. Adds `caseInsensitiveFilesystem(platform?)` (darwin/win32⇒true) for embed-lifecycle canonical-cwd case-normalization. See change: add-embed-session-lifecycle. |
|
|
21
21
|
| `process-identify.ts` | Process identification by command-line marker. Exports `isPiCommandLine`, `findPidByMarker`, `isProcessLikePi`, `ProcessIdentifyOpts`. Unix: `ps -eo pid,command` + sentinel match; Windows stubs `[]`/`true` (delegates to headlessPidRegistry). Injectable `platform`/`exec` for tests. |
|
|
22
22
|
| `process-scan.ts` | Cross-platform process enumeration. Exports `parseEtime` (ps `etime` → ms), `isProcessRunning` (win32 tasklist, unix pgrep), `ProcessScanOpts`. Injectable `platform`/`exec`. Best-effort: failures return false/0. |
|
|
23
23
|
| `process.ts` | Cross-platform process primitives. Exports `parseNetstatListeners`, `findPortHolders`, `isProcessAlive`, `killProcess`, `killPidWithGroup`, `ProcessOpts`, `KillProcessResult`. Unix: `lsof`/SIGTERM→SIGKILL; Windows: `netstat -ano`/`taskkill /F /T`. Injectable `platform`/`exec`/`kill`. |
|
|
@@ -255,6 +255,18 @@ export function joinForDisplay(
|
|
|
255
255
|
* server-side `browse.ts` to compute `parent = null` uniformly
|
|
256
256
|
* (replacing the Unix-only `resolved === "/"` check).
|
|
257
257
|
*/
|
|
258
|
+
/**
|
|
259
|
+
* Whether the host filesystem is case-insensitive by default (macOS + Windows).
|
|
260
|
+
* Used to decide whether a canonical path should be case-normalized so that
|
|
261
|
+
* case-variant strings for one physical directory collapse to a single key.
|
|
262
|
+
* See change: add-embed-session-lifecycle.
|
|
263
|
+
*/
|
|
264
|
+
export function caseInsensitiveFilesystem(
|
|
265
|
+
platform: NodeJS.Platform = process.platform,
|
|
266
|
+
): boolean {
|
|
267
|
+
return platform === "darwin" || platform === "win32";
|
|
268
|
+
}
|
|
269
|
+
|
|
258
270
|
export function isFilesystemRoot(
|
|
259
271
|
resolved: string,
|
|
260
272
|
platform: NodeJS.Platform = process.platform,
|
|
@@ -117,6 +117,15 @@ export interface SessionMeta {
|
|
|
117
117
|
*/
|
|
118
118
|
kind?: "automation";
|
|
119
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Disposability marker mirror of `DashboardSession.lifecyclePolicy`.
|
|
122
|
+
* Persisted so a server restart never reclassifies an `"ephemeral"` session
|
|
123
|
+
* as `"durable"` (absent ⇒ durable) and lets it escape reaping forever.
|
|
124
|
+
* Restored by `sessionFromMeta` on cold start.
|
|
125
|
+
* See change: add-embed-session-lifecycle.
|
|
126
|
+
*/
|
|
127
|
+
lifecyclePolicy?: "ephemeral" | "durable";
|
|
128
|
+
|
|
120
129
|
/**
|
|
121
130
|
* Automation-run identity mirror of `DashboardSession.automationRun`.
|
|
122
131
|
* Persisted so a run session restored on cold start keeps its automation
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
/** Source environment where a pi session is running */
|
|
2
|
-
export type SessionSource =
|
|
2
|
+
export type SessionSource =
|
|
3
|
+
| "tui"
|
|
4
|
+
| "zed"
|
|
5
|
+
| "tmux"
|
|
6
|
+
| "dashboard"
|
|
7
|
+
| "terminal"
|
|
8
|
+
| "embed"
|
|
9
|
+
| "unknown";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Orthogonal disposability marker for a session, independent of `source`.
|
|
13
|
+
* `"ephemeral"` = a machine-fronted session the server MAY reclaim (idle
|
|
14
|
+
* reaper + active-session caps act ONLY on these); `"durable"` = an
|
|
15
|
+
* interactive session that keeps today's forever-alive semantics. Absent is
|
|
16
|
+
* treated as `"durable"` (see `effectiveLifecyclePolicy` / `isEphemeral`), so
|
|
17
|
+
* legacy bridges and pre-change `.meta.json` load unchanged. Any front (embed
|
|
18
|
+
* widget, chat gateway, automation) may set it. Persisted to `.meta.json` and
|
|
19
|
+
* restored on cold start so a restart never reclassifies an ephemeral session.
|
|
20
|
+
* See change: add-embed-session-lifecycle.
|
|
21
|
+
*/
|
|
22
|
+
export type LifecyclePolicy = "ephemeral" | "durable";
|
|
3
23
|
|
|
4
24
|
/** Current status of a session */
|
|
5
25
|
export type SessionStatus = "active" | "idle" | "streaming" | "ended";
|
|
@@ -70,6 +90,14 @@ export interface DashboardSession {
|
|
|
70
90
|
*/
|
|
71
91
|
nameSource?: "auto" | "user";
|
|
72
92
|
source: SessionSource;
|
|
93
|
+
/**
|
|
94
|
+
* Disposability marker. Absent ⇒ `"durable"`. Only `"ephemeral"` sessions
|
|
95
|
+
* are governed by the idle reaper and active-session caps. Read via
|
|
96
|
+
* `effectiveLifecyclePolicy` / `isEphemeral`, never compared raw (so absent
|
|
97
|
+
* defaults correctly). Persisted to `.meta.json`; restored on cold start.
|
|
98
|
+
* See change: add-embed-session-lifecycle.
|
|
99
|
+
*/
|
|
100
|
+
lifecyclePolicy?: LifecyclePolicy;
|
|
73
101
|
status: SessionStatus;
|
|
74
102
|
model?: string;
|
|
75
103
|
thinkingLevel?: string;
|
|
@@ -85,6 +113,23 @@ export interface DashboardSession {
|
|
|
85
113
|
* See change: session-card-last-activity-badge.
|
|
86
114
|
*/
|
|
87
115
|
lastActivityAt?: number;
|
|
116
|
+
/**
|
|
117
|
+
* Epoch ms of the latest bridge-normalized `agent_settled` (the version-
|
|
118
|
+
* agnostic "run at rest" mark — native on pi ≥ 0.80.4, synthesized on the
|
|
119
|
+
* floor). Server-captured in `event-wiring.ts`; NOT persisted; cold-start
|
|
120
|
+
* seeded from `events.jsonl` mtime in `session-scanner.ts` so a rehydrated
|
|
121
|
+
* quiescent session is evaluable without waiting for a fresh run to settle.
|
|
122
|
+
* Read by the lifecycle quiescence gate (never an inferred `status`).
|
|
123
|
+
* See change: add-embed-session-lifecycle.
|
|
124
|
+
*/
|
|
125
|
+
lastSettledAt?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Epoch ms of the latest `agent_start`. Newer than `lastSettledAt` ⇒ the
|
|
128
|
+
* session is mid-run (not at rest). Server-captured in `event-wiring.ts`; NOT
|
|
129
|
+
* persisted and NOT cold-start seeded (a rehydrated session has no run in
|
|
130
|
+
* flight ⇒ at rest). See change: add-embed-session-lifecycle.
|
|
131
|
+
*/
|
|
132
|
+
lastRunStartedAt?: number;
|
|
88
133
|
/**
|
|
89
134
|
* Server-managed per-session unread bit. `true` when an attention-worthy
|
|
90
135
|
* event (turn finished, ask_user appeared, agent_end with error) fired
|
|
@@ -767,6 +812,12 @@ export interface GoalRecord {
|
|
|
767
812
|
driverSessionId?: string;
|
|
768
813
|
createdAt: number;
|
|
769
814
|
updatedAt: number;
|
|
815
|
+
/** Total USD spend across this goal's linked sessions, **server-derived at
|
|
816
|
+
* read time** (Σ `DashboardSession.cost` over `sessionIds`). Never persisted
|
|
817
|
+
* to the goals file, never bridge-sent — same server-join convention as
|
|
818
|
+
* `groupId`. Optional; absent on legacy records / pre-scan cold start.
|
|
819
|
+
* See change: fix-goal-detail-turns-and-spend. */
|
|
820
|
+
totalSpendUsd?: number;
|
|
770
821
|
}
|
|
771
822
|
|
|
772
823
|
/** Shape of the on-disk goals file under the dashboard data dir.
|
package/docs/AGENTS.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# DOX — docs
|
|
2
|
-
|
|
3
|
-
Files in this directory. One row per file. Topic docs + repo-root config (root config files have no directory owner; catalogued here). Supersedes deleted `docs/file-index*.md` splits. See change: migrate-file-index-to-agents-tree.
|
|
4
|
-
|
|
5
|
-
| File | Purpose |
|
|
6
|
-
|------|---------|
|
|
7
|
-
| `FLOWS_HANDOFF_CHECKLIST.md` | (repo root) LLM handoff checklist. Verifies pi-flows + Anthropic-messages bridge + model resolution end-to-end. Reports ACTUAL resolved path+version per tier vs reference baseline. Tier 1 `createRequire` cwd-anchored; Tier 2 `resolvePiPackageEntry` walks `packages[]`. Peer present if Tier 1 OR Tier 2 resolves. |
|
|
8
|
-
| `architecture-notes/worker-offload-roadmap.md` | Worker offload roadmap. Main-loop CPU + sync-fs work → worker_threads. Proven pattern `offload-openspec-poll-to-worker` (fixed pool, FIFO, in-process fallback). Candidates: `scanAllSessions`, `loadSessionEvents`, `scanPiResources`. 4-change sequence. Rule of three before generic pool extraction. |
|
|
9
|
-
| `architecture.md` | Full architecture reference. 3 components: bridge extension, Node server, React client. WS ports 9999 (bridge) + 8000 (client). In-memory + JSON persistence. `/site` marketing app product-adjacent, separate build. "Server-Keypair Device Pairing" section: Topology 3 static PWA shell, Ed25519 TOFU identity, QR pairing, compare-code approval, bearer + WS-ticket auth, genuine-local trust. Global Escape dismissal: `escape-stack.ts` LIFO stack arbitrates portaled dismissible surfaces. `useEscapeDismiss` hook replaces self-managed `keydown` listeners; stacked overlays peel one layer per Escape. Adopted by Dialog, ImageLightbox, FilePreviewOverlay. See changes: add-server-keypair-pairing, fix-stacked-escape-closes-layers. |
|
|
10
|
-
| `biome.json` | (repo root) Biome 2.5.1 config. formatter off. vcs defaultBranch develop. tier ladder (Tier A error, Tier B/C warn). a11y override client. test override noExplicitAny off. ignores css + dist + archive + fixtures. See change: add-code-quality-skill. |
|
|
11
|
-
| `chat-display-preferences.md` | `DisplayPrefs` gate chat chrome (thinking, tool cards, results, separators, stats bars). Global `~/.pi/dashboard/preferences.json#displayPrefs`; per-session sparse override `.meta.json#displayPrefsOverride`; `mergeDisplayPrefs` deep-merges. Transport REST + WS `display_prefs_updated`. `ask_user` always renders. First-launch preset modal. See change: configurable-chat-display. |
|
|
12
|
-
| `chat-gateway-exploration.md` | (repo root) Explore-mode design record. pi ↔ chat platforms (Discord/Slack/Telegram) via generalized chat-gateway. No OpenSpec change, no implementation. Surveys 41 pi chat packages, 5 architectural families. Seeds future `openspec/changes/chat-gateway/`. Hermes reference. |
|
|
13
|
-
| `code-quality.md` | Biome ratchet. Rules graduate one-way off→warn→error; cleanup lands first, severity flip second. Tier A error, Tier B/C warn. Oracle `quality:changed` = `biome check --changed --error-on-warnings --write` + `tsc --noEmit` + `npm test`, single exit code. Graduation criterion 0 violations via `--only` JSON report. See change: add-code-quality-skill. |
|
|
14
|
-
| `context-mode-roi-report.md` | ROI analysis. context-mode MCP plugin vs kb extension. Verdict: trim not drop. Sandbox tools (ctx_execute*) = 97% calls, keep. Retrieval tools (ctx_search/index/fetch) redundant with kb, drop. ~24k token/session schema tax. 79% sessions never touch context-mode. Source markdown for PDF. |
|
|
15
|
-
| `context-mode-roi-report.pdf` | Rendered PDF of context-mode-roi-report.md. 13 pages. Built via document-converter facade (DOCX) + LibreOffice (DOCX→PDF). |
|
|
16
|
-
| `doctor-skill.md` | Modular doctor diagnostic skill. Router + 7 capability modules + _lib. Shell-first derive-on-run checks, multi-location pi, peer name-skew, two-tier self-update (knowledge-hash + --regenerate). Ships in packages/extension/.pi/skills/doctor/. See change: add-modular-doctor-skill. |
|
|
17
|
-
| `electron-bootstrap-flow.md` | Electron startup state machine. `app.whenReady()` → dashboard window. 5 states, 3 triggers, 3 end states (attach/done/loading-page-error). Health-probe `GET /api/health` port 8000. Electron launcher only. |
|
|
18
|
-
| `electron-build-methods.md` | 3 Electron build paths: local native (`npm run electron:build`), Docker cross-compile (--windows/--linux), CI publish.yml (tag push). Per-platform artifact/signing/node-pty matrix. |
|
|
19
|
-
| `electron-immutable-bundle.md` | Invariant: Electron bundle read-only at runtime. No post-install `npm install`. pi/openspec/tsx ship as deps under `<resourcesPath>/server/node_modules/`. electron-updater whole-app replacement. |
|
|
20
|
-
| `electron-qa-smoke-test-inventory.md` | (repo root) QA/smoke test inventory. All 574 archived OpenSpec proposals. 11864 test/verification items extracted by parallel gemma + deepseek workers, one per proposal. Grouped by month/change. Each bullet `[type]` what-verifies — path — status. Reference to find + build missing tests. |
|
|
21
|
-
| `electron-session.md` | Implementation session log. 21 phases. Branding/icons, packaging (NSIS/AppImage), `__dirname`/tsx saga, dead ends, 20 lessons. Describes pre-R3 managed-dir/wizard flow, superseded by electron-immutable-bundle.md. |
|
|
22
|
-
| `embedding-chat-view.md` | Subpath export `@blackbelt-technology/pi-dashboard-web/chat-embed` mounts live chat in sibling workspace. Workspace-only (dist/ tarball ships only `dist/`; subpath points raw `src/*.tsx`). Exports `ChatView`, `useSessionState` headless hook, pure reducer `applySessionMessage`/`createSessionAccumulator`. Required providers: `ThemeProvider` (throws if absent), `UiPrimitiveProvider` from dashboard-plugin-runtime, `MobileProvider`, `SessionAssetsProvider`, `DisplayPrefsProvider`, wouter `Router`, `ApiContext.Provider`. `FilePreviewProvider` self-mounted inside ChatView. Bounded-height scroll parent required for TanStack-virtualized transcript. Mandatory `"./package.json"` exports entry. Single-React dedupe. See change: add-embeddable-chat-view. |
|
|
23
|
-
| `examples/c4-example.md` | C4-model diagram example. Mermaid fenced blocks: `C4Context`, `C4Container`. Renders native GitHub/GitLab/VS Code, no toolchain. Mermaid C4 support experimental; nudge via `UpdateLayoutConfig`/`UpdateElementStyle`. |
|
|
24
|
-
| `faq.md` | Recurring how-to + troubleshooting questions, caveman style, cross-refs README.md + docs/. Covers media preview (PDF/video/AsciiDoc/YouTube); install paths (Electron/pi package/source, Windows Setup.exe/.zip/tarball/air-gapped); server start/daemon/status/auto-start; config; LAN exposure + pairing; OAuth; zrok tunnel + watchdog; headless-vs-tmux + session-type spawn; release/build/auto-update; npm Trusted Publishers; plugin architecture/slots; Electron native surfaces (tray, Doctor, white-screen VM, bundled native modules, `__dirname`, Vite main+preload); session-resume + spawn troubleshooting (Windows ENOENT, long paths, Gemini subagents, Node version updates). |
|
|
25
|
-
| `install-invoice-bot-extension.md` | Install `@blackbelt-technology/invoicebot` (local `../pi-invoice-bot`) as global pi extension. `npm install` first (local-path installs skip it; needs bundled `file:../pi-flows`). `pi install <abs-path>`. Bundled pi-flows extensions collide with global `@blackbelt-technology/pi-flows` (tool conflicts: ask_user/skill_read/flow_*). Fix: settings.json object form `"extensions": ["!node_modules/**"]`. pi extension, not dashboard plugin — absent from `/api/health` plugins[]. |
|
|
26
|
-
| `installation-windows.md` | Windows 10/11 install guide. 2 paths: Electron Setup.exe NSIS (per-user, bundled Node) + tarball/npm (advanced). Runtime layout `%USERPROFILE%\.pi-dashboard\` + `%USERPROFILE%\.pi\`. |
|
|
27
|
-
| `migration/from-pi-model-proxy.md` | Migration guide `@blackbelt-technology/pi-model-proxy` → dashboard built-in proxy. Extension binds `:9876` per-session vs dashboard `:8000/v1` always-on. Requires proxy API keys `pi-proxy-*`. URL + key migration steps. Coexistence supported (different ports/auth). |
|
|
28
|
-
| `perf-ws-broadcast-load.md` | WS broadcast load harness. Measures head-of-line blocking on single browser WS. `createDrainingWs` timing-aware fake socket drives real gateway. Test-only, regression-gated. |
|
|
29
|
-
| `plan/electron-app.md` | Comprehensive Electron desktop-app plan. Bundle dashboard standalone macOS/Linux/Windows, zero prereqs, bundled Node bootstraps deps. Monorepo current state. Remaining: `electron-desktop-bundle` change, 9 task groups, 46 tasks. Architecture diagrams. |
|
|
30
|
-
| `playwright.config.ts` | (repo root) Playwright config. testDir `tests/e2e`, `use.baseURL` imports `BASE_URL` from lifecycle.ts, single chromium project. globalSetup/globalTeardown = `tests/e2e/global-*.ts`. expect timeout 10s, globalTimeout 15min, retries CI?1:0. Opt-in browser E2E; not in `npm test`. `@playwright/test` pinned exact 1.61.1. chromium `channel` env-driven via `PW_CHANNEL`. See change: add-playwright-e2e. See change: parallelize-test-harness. See change: self-heal-host-playwright-browser. |
|
|
31
|
-
| `playwright.electron.config.ts` | (repo root) Playwright config for Electron-E2E suite. testDir `tests/e2e-electron`, testMatch `*.electron.spec.ts`. No Docker globalSetup (unlike `playwright.config.ts`, boots Docker web-client harness). Launches real packaged Electron app via Playwright `_electron`. Drives native-surface flows unit tests can't reach: zombie-adoption modal, Doctor version-skew row. timeout 90s, globalTimeout 15min, workers 1, retries CI?1:0, reporter html → `playwright-report-electron`. Run via `npm run test:e2e:electron` (pretest packages app via `electron-forge package`). CI: `.github/workflows/ci-e2e-electron.yml` (workflow_dispatch, xvfb). See change: electron-attach-ownership-fixes. |
|
|
32
|
-
| `plugin-claim-gates.md` | `predicate` vs `shouldRender` contract for plugin claims. See change: auto-hide-empty-session-subcards. |
|
|
33
|
-
| `plugin-intent-protocol.md` | Server-driven plugin UI. Plugins emit JSON intent trees; clients render via local primitive registry. One server emission → identical render per client. See change: adopt-server-driven-intent-rendering. |
|
|
34
|
-
| `plugin-ui-primitives.md` | Plugins access dashboard React primitives via runtime registry. `useUiPrimitive(key)` lookup. Keys `UI_PRIMITIVE_KEYS`. Shell → plugin flow, complements slot system. |
|
|
35
|
-
| `publishing-plugins.md` | Publish new plugin package to npm. Lockstep versioning (`sync-versions.js`). First publish seeds 0.0.1 via one-shot manual publish + revert; OIDC Trusted Publisher after. |
|
|
36
|
-
| `release-process.md` | Cut release how-to. Promote CHANGELOG `[Unreleased]` → versioned, bump + tag; CI publishes npm + Electron + GitHub Release. Conventional Commits enforced by review only. |
|
|
37
|
-
| `research/auto-trigger-plan-proposal.md` | Research dossier. Auto-trigger `plan-proposal` on `proposal.md` draft. Explore-mode, no change / no impl. Verdict: detection easy + native, headless execution BLOCKED — `plan-proposal` frontmatter pins to main interactive session (invokes `doubt-driven-review` nested-spawn + `scenario-design` `ask_user` gate). Re-entrancy smell: step 1 self-drafts proposal → fire only on out-of-flow draft (`proposal.md` exists, `tasks.md` not folded). 3 mechanisms: A pi ext `pi.on("tool_result")` + `pi.sendUserMessage`; B server fs-watcher + `session-api.ts` send-prompt; C git post-commit nudge. Automation = launcher, not runner. Sources: `.pi/skills/plan-proposal/SKILL.md`, docs/extensions.md, `packages/server/src/session-api.ts`. |
|
|
38
|
-
| `research/headroom-pi-integration.md` | Research dossier. Maps Headroom (local context-compression layer, shrinks tool outputs/logs/RAG before LLM, claims 60–95% token cut) integration into Pi. Explore-mode output, no implementation. Prior art: `@ryan_nookpi/pi-extension-headroom`, `@raquezha/noheadroom` (`pi --headroom`/`--tkmx`, `/headroom` cmd). Recommends Pi extension hooking `tool_result`/`context` events → local `/v1/compress` proxy → apply `toolResult` content mutations only (surgical, reversible). Open risk: Headroom issue #846 Pi support may be broken. Source: github.com/headroomlabs-ai/headroom. |
|
|
39
|
-
| `research/lora-dataset-from-pi-logs.md` | Research doc. Turns repo pi session JSONL logs into SFT dataset for LoRA adaptation of ~1T-param base model; target general instruction-following / agentic chat. Covers principles, pipeline-vs-real-log schema, LoRA formatting decisions, tradeoff tables, pitfalls. Organized Parts 1–9. Research basis for openspec changes `add-lora-dataset-export-skill` (Parts 1–6) + `add-automatic-session-kb-index` (Parts 7–9). Moved from root `research/` into `docs/research/` (consolidation). |
|
|
40
|
-
| `research/oh-my-pi-feature-adaptation.md` | Research artifact. omp (oh-my-pi, pi-mono fork) → pi-dashboard feature adaptation. Explore-mode output, no OpenSpec change. 3 vectors (UI / skill-ext / protocol). Tier 1 wins: #07 per-session share links+QR, #06 advisor server-side turn-watcher, todo/phase strip, #10 P0–P3 review verdict UI. Tier 2/3 + overlap list. Source: github.com/can1357/oh-my-pi README. |
|
|
41
|
-
| `research/reverse-spec-from-code-session.md` | Method playbook. HOW `reverse-spec-from-code` skill + 102-spec backfill built in one pi session. Companion to `reverse-spec-from-code.md` (data). Phased arc: investigate spec format -> build judge-JSON fitness fn on 6 ground-truth specs -> iterate prompt v1->v2 (66.8->97.2 req, cross-boundary exploration dominant lever) -> build skill (discover->generate->audit->validate->promote, scratch-first) -> live validate bus-client -> bulk 102 specs/~16 pkgs -> fix kb-pollution (scratch moved out of openspec/, promote=MOVE) -> model-loss test (judge constant) -> format hard-gate + validate gate -> land. Decisions: judge separate+constant, code=oracle not stale spec, scratch-first+confirm-promote, conservative discovery gate, deterministic validate over model judgment. Failure catalog + takeaways. Commits e9c582433, b999373c7. Skill: `packages/openspec-workflow/.pi/skills/reverse-spec-from-code/`. |
|
|
42
|
-
| `research/reverse-spec-from-code.md` | Research artifact. `reverse-spec-from-code` skill prompt tuning + generator-model-loss experiment. 6 real openspec/specs = ground truth; generators run BLIND (code only), judge @research scores gen-vs-real semantically. v1->v2 lever = cross-boundary exploration (server-restart 40->95); avg req 66.8->97.2. Model-loss curve (judge constant): opus 97.2 req / 6/6 validate, deepseek-v4-flash 95.8 / 6/6*, haiku-4.5 88.0 / 3/6 (format collapse dominant). Fix: one-line `#### Scenario:` format directive recovers cheap model to 6/6 valid. Config: @fast generator + format directive + validate gate + @research auditor ~= opus quality cheap. Raw specs in gitignored `.reverse-spec-scratch/`. Large-scenario test: coverage degrades with size (97% small -> 50-85% large); cheap-model gap widens with complexity (53-req giant 22pt opus-flash, opus 72 vs flash 50); mitigation = decompose into bounded sub-capabilities + full-layer discovery scope. Skill: `packages/openspec-workflow/.pi/skills/reverse-spec-from-code/`. |
|
|
43
|
-
| `research/t3code-feature-adaptation.md` | Research artifact. t3code (multi-provider web GUI wrapping Codex/Claude/Cursor/OpenCode) → pi-dashboard adaptation. Explore-mode output. 6 candidates: ① per-turn checkpoint/revert (shadow-git-ref, flagship), ② supervised approval [captured as add-supervised-tool-approval], ③ configurable keybindings (command registry), ④ multi-host SCM + AI PR text, ⑤ project scripts as commands (depends ③), ⑥ SSH remote [defer]. pi-dashboard edge = mid-turn queueing (t3code TODO), flows/goals, 4 themes, QR pairing, Docker all-in-one. Not-adaptable = multi-provider wrapping (pi-native identity). Source: github.com/pingdotgg/t3code. |
|
|
44
|
-
| `service-bootstrap.md` | 3 starters (Electron/Bridge/Standalone) × 2 surfaces (GUI/shell). Tool resolution (pi, openspec, node, tsx, bridge). `DASHBOARD_STARTER` env, `launchSource` on `/api/health`. |
|
|
45
|
-
| `skills-as-subagents.md` | Skill↔subagent bridge analysis. Wrap skill via thin `.pi/agents/<Name>.md` (model role, `inherit_context`, tools) loading `/skill:<name>` in isolated context → distilled report. 21 extension skills scored on subagent-fitness (Tier A wrap-now: video-transcription, session-to-guideline, doc-summarizer, kb-search; Tier B analysis-phase-only; Tier C inline). Model routing by function via role aliases (@fast glue/lookup, @research synthesis, `glm-5.2` reasoning/1M-ctx, @coding edits, @vision UI). Ships Tier A wrappers in PROJECT `.pi/agents/{Transcribe,SessionGuideline,DocSummarize,KbLookup}.md`. §8: `pi-dashboard-subagents` `resolveAgentMdPath` NOW 4-tier (project/user/bundled/package, commit 2dbd87a) — package tier USER-SCOPE ONLY, convention `<pkg-root>/agents/*.md` (NOT `.pi/agents/`), sees only configured pi packages. Package tier shipped via change `add-package-agent-discovery-tier` (archived 2026-07-07, user-scope only); its synced spec justifies "no project-scope" with stale claim `ExtensionContext` has no `isProjectTrusted()` — FALSE per current SDK. Project-scope-when-trusted = NOT-yet-proposed follow-up. Co-locate wrappers into `packages/*/agents/` only after it lands + packages registered. |
|
|
46
|
-
| `slash-command.md` | Bridge routes typed `/foo` chat text to pi handlers. `parseSendPrompt` + `bridge.ts::sessionPrompt` 11-step order. Extension command dispatch fix (`pi.dispatchCommand`, RPC keeper). |
|
|
47
|
-
| `vitest.config.ts` | (repo root) Root Vitest config. `defineConfig`. Vitest 4 dropped `vitest.workspace.ts`; projects live under `test.projects`. `test.projects` array registers each per-package `vitest.config.ts`; each carries own environment (jsdom client / node server+shared+extension), include globs, pool settings. `packages/shell` registered in `test.projects`. See change: add-server-keypair-pairing. |
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# DOX — packages/extension
|
|
2
|
-
|
|
3
|
-
Files in this directory. One row per source file.
|
|
4
|
-
|
|
5
|
-
| File | Purpose |
|
|
6
|
-
|------|---------|
|
|
7
|
-
| `vitest.config.ts` | Vitest config for extension package. Includes `src/**/__tests__/**/*.test.ts`, node env, `forks` pool, `maxWorkers: "50%"`, globalSetup `setup-home.ts`, per-file HOME isolation via `setup-home-perfile.ts` for `providers.json` write races. |
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# DOX — packages/server
|
|
2
|
-
|
|
3
|
-
Files in this directory. One row per source file.
|
|
4
|
-
|
|
5
|
-
| File | Purpose |
|
|
6
|
-
|------|---------|
|
|
7
|
-
| `vitest.config.ts` | Vitest config for server package. `include` `src/**/__tests__/**/*.test.ts`, `environment` `node`, `pool` `forks`, `maxWorkers` `50%`, `globalSetup` `setup-home.ts`. `setupFiles` resolves config-relative `setup-home-perfile.ts` so worktree-local source wins over hoisted node_modules. `resolve.alias` maps `@blackbelt-technology/pi-dashboard-shared` → `../shared/src` (worktree-local shared wins over hoisted symlink; mirrors client config). See change: `parallelize-test-suite`, fix-and-prefer-model-proxy-resolution. |
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# DOX — packages/shared
|
|
2
|
-
|
|
3
|
-
Files in this directory. One row per source file.
|
|
4
|
-
|
|
5
|
-
| File | Purpose |
|
|
6
|
-
|------|---------|
|
|
7
|
-
| `vitest.config.ts` | Vitest config for `@blackbelt-technology/pi-dashboard-shared`. Includes `src/**/__tests__/**/*.test.ts`, `environment` `node`, `pool` `forks`, `maxWorkers` `50%`. `globalSetup` runs shared `setup-home.ts`; `setupFiles` run per-file `src/test-support/setup-home-perfile.ts` for HOME isolation under parallelism (See change: `parallelize-test-suite`). |
|
package/scripts/AGENTS.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# DOX — scripts
|
|
2
|
-
|
|
3
|
-
Files in this directory. One row per file. Non-source area (migrated from `docs/file-index-skills-misc.md`; source of truth now here). See change: migrate-file-index-to-agents-tree.
|
|
4
|
-
|
|
5
|
-
| File | Purpose |
|
|
6
|
-
|------|---------|
|
|
7
|
-
| `__tests__/repair-meta-source.test.mjs` | Vitest unit tests for repair-meta-source.mjs. Asserts source:"dashboard" → cleaned (other fields preserved), source:"tui"/"cli"/"tmux"/absent → kept, malformed JSON counted as errors, idempotent re-run, --dry-run modifies nothing. |
|
|
8
|
-
| `__tests__/review-changes-parser.test.mjs` | Vitest unit tests for parseFindings + splitFindings (.pi/skills/implement/scripts/parse-findings.ts). parseFindings keeps only `finding` events, skips non-JSON lines; splitFindings buckets critical/major/warning/error as must-fix. |
|
|
9
|
-
| `__tests__/ship-it-manifest.test.mjs` | Vitest unit tests for ship-it `manifest.ts` (`.pi/skills/ship-it/scripts/`). parseManifest (well-formed / malformed / no-disposition-column → skip), deferDecision (all-manual→defer, non-manual→stop, id-ref resolve, no-manifest→legacy keyword fallback), filesystemRealityCheck (automated missing file → unsatisfied; manual-only never gated). See change: add-openspec-pipeline-orchestrators. |
|
|
10
|
-
| `__tests__/ship-it-no-weakening.test.mjs` | Vitest unit tests for ship-it `no-weakening.ts` assertNoWeakening. Rejects added `.only`/`.skip`/`xit`/`xdescribe`, net assertion deletion (expect() removed>added), strong→permissive matcher swap (toEqual→toBeDefined, toThrow→not.toThrow); accepts value-change fix, added assertion, non-assertion edit, empty diff. See change: add-openspec-pipeline-orchestrators. |
|
|
11
|
-
| `__tests__/skill-frontmatter.test.mjs` | Vitest guard over every repo `**/SKILL.md` (skips node_modules/dist/worktrees). Parses `---`-fenced frontmatter with `yaml`, asserts non-empty `description`. Catches unquoted description with inner `: ` (nested-mapping YAML error) that silently drops the skill at pi startup. See change: fix-skill-frontmatter-yaml. |
|
|
12
|
-
| `__tests__/test-up-port-derivation.test.mjs` | Vitest tests for parallel-worktree test-harness port/project derivation. Sources docker/lib-ports.sh; asserts derive_hash deterministic, derive_project compose-legal + distinct, base offsets land in 18000-18999/19000-19999 windows, is_free + find_free_in_window skip held ports, test-up.sh state file shape, compose interpolation (skips if no docker). |
|
|
13
|
-
| `_windows-introspection-probe.ts` | Probe child for Windows introspection smoke. Imports real `isVirtualMachine` + `defaultGetCmdline` (relative `.js`→`.ts` imports). Calls them against live PowerShell Get-CimInstance, prints `RESULT=<json>` (`{platform,vm,cmdline}`) to stdout. Run as subprocess so driver captures its stderr. See change: replace-wmic-with-powershell. |
|
|
14
|
-
| `build.sh` | Type-check + build dashboard. Flags: --check-only (tsc --noEmit only), --client-only (Vite build only). Auto-runs npm install if node_modules absent. |
|
|
15
|
-
| `commit-windows-parity.sh` | Stages and commits fix-windows-server-parity + consolidate-platform-handlers work in 5 logical chunks (fix:, test:, docs: x3). Modes: all | dry | 1..5. commit_stage helper resets index, stages per-stage filesets, commits with imperative conventional messages. |
|
|
16
|
-
| `fix-pty-permissions.cjs` | Postinstall: fix node-pty spawn-helper execute permissions |
|
|
17
|
-
| `generate-plugin-registry.mjs` | Standalone generator for packages/client/src/generated/plugin-registry.tsx (gitignored). Runs regeneratePluginRegistry via jiti outside Vite so prelint/prebuild hooks + fresh clones produce the file before tsc/vitest/vite. Respects NODE_ENV=production. |
|
|
18
|
-
| `lib/smoke-spawn-session.mjs` | Test helper: connects dashboard browser WS (`/ws`), sends spawn_session for cwd, waits for session_register/session_added. Uses global WebSocket (Node 22+, no wscat). Exit 0 on session live, 1 on failure/timeout, 2 on usage error. --url --cwd --timeout flags. Used by Docker smoke. |
|
|
19
|
-
| `maybe-patch-package.cjs` | postinstall guard: runs patch-package only when module resolvable + patches/ dir exists. No-ops on --omit=dev standalone installs (no patch-package, no patches/) → fixes exit 127 breaking standalone/Docker installs. Resolves bin via package.json bin field (Windows-safe). |
|
|
20
|
-
| `migrate-child-process-imports.sh` | One-shot sed migration: rewrites `from "node:child_process"` to platform/exec wrapper. platform/* files use ./exec.js, packages/shared/src non-platform use ./platform/exec.js, packages/server|extension|electron use @blackbelt-technology/pi-dashboard-shared/platform/exec.js. |
|
|
21
|
-
| `prune-orphan-worktrees.ts` | One-shot: `rm -rf` orphan `.worktrees/*` husk dirs (on disk, absent from `git worktree list`) left by kb DB handles recreating `.pi/dashboard/kb` after `git worktree remove`. Dry-run default; `--write` deletes. Guarded to parent-repo `.worktrees/` subtree (symlink-resolved via realpath), skips registered worktrees + main checkout. Idempotent. See change: sweep-worktree-residual-on-remove. |
|
|
22
|
-
| `rebuild-and-restart.sh` | Builds web client (npm run build), restarts dashboard server (pi-dashboard restart), reloads all pi sessions (npm run reload) after 1s sleep. |
|
|
23
|
-
| `rebuild-restart.sh` | Builds client + restarts server + reloads sessions. --check flag runs tsc --noEmit first; calls scripts/reload-all.sh for session reload. |
|
|
24
|
-
| `reload-all.sh` | Build bridge + reload all pi sessions |
|
|
25
|
-
| `repair-meta-source.mjs` | Removes `source: "dashboard"` from every `~/.pi/agent/sessions/**/*.meta.json`. Atomic tmp+rename. Idempotent. Prints `kept N / cleaned M / errors E`. Exit 0. See change: fix-dashboard-spawn-correlation-by-token. |
|
|
26
|
-
| `split-large-agents.mjs` | One-off Node script. Splits over-large directory `AGENTS.md` file-based. Rows > 200 chars promote to per-file `<File>.AGENTS.md` sidecar (full detail, pull-only, not auto-injected by pi); dir row keeps one-line summary + `→ see <File>.AGENTS.md` pointer. Rows ≤ 200 chars stay verbatim. Usage: `node scripts/split-large-agents.mjs <AGENTS.md> --write`. Ran once on `packages/client/src/components/AGENTS.md` (60 KB → ~26 KB, 111 sidecars). See change: split-components-agents-dedup-rollup. |
|
|
27
|
-
| `stop-dashboard.sh` | Stops pi-dashboard server. Reads port from ~/.pi/dashboard/config.json (default 8000); lsof -ti :PORT; SIGTERM, SIGKILL fallback after 5s. |
|
|
28
|
-
| `sync-versions-spec.js` | Pure helper extracted from sync-versions.js for unit tests. Exports isRewritableSemverSpec(spec) — true for X.Y.Z / ^X.Y.Z / ~X.Y.Z / prerelease+build; false for `*`, `latest`, workspace:*, git URLs, file:, OR-unions, empty/non-string. |
|
|
29
|
-
| `sync-versions.js` | Post-bump release helper. Reads every workspace `package.json`, enforces lockstep versions, rewrites every inter-package dep specifier (e.g. `"@blackbelt-technology/pi-dashboard-shared": "^<ver>"`) to current bumped version. Called by `release-cut` skill AND by `.github/workflows/publish.yml` `tag-and-push` job between `npm version -ws` + lockfile regen. Required because npm CLI does not implement pnpm/yarn `workspace:` protocol — plain semver ranges + sync at bump time. Cross-ref specifiers use plain `"^<ver>"`; `packages/electron` `"private": true` so `npm publish -ws` skips automatically. |
|
|
30
|
-
| `test-standalone-npm-install-docker.sh` | Docker smoke: packs workspaces + root, launches clean Linux container (default node:24-bookworm-slim), installs all tarballs at once (no --ignore-scripts), asserts pi-dashboard --version + start, polls /api/health (≤180s), GET /, spawn-session WS round-trip, /api/sessions, openspec CLI + /api/openspec-archive. Flags: --keep, custom IMAGE. |
|
|
31
|
-
| `test-standalone-npm-install.ps1` | Windows port of standalone-npm-install smoke. Packs workspaces, installs into isolated temp HOME, spawns pi-dashboard.cmd, polls /api/health (60s), asserts web UI reachable. -Port -Keep flags. Locks three Windows spawn bugs (jiti file:/// wrap, npm.cmd shell:true, node.exe prefix). |
|
|
32
|
-
| `test-standalone-npm-install.sh` | Bash standalone-install smoke: packs workspaces, installs tarballs into isolated temp HOME, spawns pi-dashboard headless, polls /api/health (60s), asserts web UI reachable. --keep --port flags. Probe rationale: post eliminate-electron-runtime-install, plain /api/health is readiness signal. |
|
|
33
|
-
| `verify-lockfile-versions.mjs` | Sanity gate after `npm install --package-lock-only` in `publish.yml` `tag-and-push` job. Reads `package-lock.json`, walks every `packages/<workspace>` entry's `dependencies` + `devDependencies`, asserts each `@blackbelt-technology/*` cross-ref specifier equals `^<root.version>`. Prints `file → name: spec (expected ^X.Y.Z)` per mismatch + exits 1. Catches lockfile-version drift before commit lands on tag. See change: fix-release-lockfile-drift. |
|
|
34
|
-
| `verify-release-deps.mjs` | Pre-release dependency-shape gate. RULES array asserts packages/server/package.json declares jiti, node-pty (>=1.2.0-beta.13), @earendil-works/pi-coding-agent (>=0.80.10), @fission-ai/openspec (>=1.3.0), tsx (>=4.21.0) in dependencies. Exits non-zero with repro-pointer report on violation. Run by release-cut skill + Release workflow. |
|
|
35
|
-
| `vitest.config.ts` | Vitest config for repo-root /scripts project. Includes scripts/__tests__/**/*.test.mjs, node env, forks pool, maxWorkers 50%. |
|
|
36
|
-
| `windows-job-object-smoke.ts` | Windows Job Object kill-on-close smoke (task 7.4a; CI: `ci-e2e-electron.yml` job `job-object-windows`). win32-only (skips + exit 0 elsewhere). Requires :8000 free → launches packaged app with throwaway HOME (no fake server → launch-server arm SPAWNS a real server) → reads server pid from `/api/health` → `taskkill /F /PID <electron-pid>` (NO `/T`, kills parent only) → asserts server pid dies + :8000 frees within 15s (Job Object `KILL_ON_JOB_CLOSE` cascade). Distinct `INFRA` vs `FAIL` exit signals (server-never-booted vs invariant-broken). See change: electron-attach-ownership-fixes. |
|
|
37
|
-
| `windows-liveness-smoke.ts` | Windows boot-parent-liveness smoke (CI: `_smoke.yml` standalone-install-smoke-windows). Imports `packages/server/src/boot-parent-liveness.ts` in-process so koffi actually loads. Asserts `computeBootParentAlive()` boolean + idempotent (no throw), `bootParentPid`/`readLivePpid()` numbers, and active tier via `bootParentLivenessTier()` = `tier2` on win32 (koffi `OpenProcess`+`WaitForSingleObject` loaded), `tier1` elsewhere. Guards silent Windows-wide Tier-1 degrade. Cross-platform (green on Linux legs + local). Exit 0 pass. See change: electron-attach-ownership-fixes (1b.4). |
|
|
38
|
-
| `windows-introspection-smoke.ts` | Windows introspection smoke driver (CI: `_smoke.yml` standalone-install-smoke-windows). Spawns `_windows-introspection-probe.ts` via `npx tsx` (buildSafeArgv), captures stdio. Asserts: probe exit 0; probe stderr no `wmic`/`is not recognized` signature; `isVirtualMachine` returns boolean; `defaultGetCmdline` returns string\|null, non-empty on win32 for own pid. Proves PowerShell Get-CimInstance path works on real Windows host (stub unit tests cannot). Cross-platform; win32 cmdline check load-bearing. Exit 0 pass. See change: replace-wmic-with-powershell. |
|