pi-crew 0.11.7 → 0.11.9
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/.githooks/pre-commit +22 -0
- package/.githooks/pre-push +56 -0
- package/CHANGELOG.md +196 -1
- package/dist/index.mjs +533 -515
- package/docs/publishing.md +29 -0
- package/docs/usage.md +1 -1
- package/index.ts +3 -3
- package/install.mjs +4 -1
- package/package.json +8 -5
- package/scripts/install-hooks.mjs +32 -0
- package/skills/real-test-pi-crew/SKILL.md +57 -18
- package/src/config/config-validation.ts +8 -1
- package/src/config/defaults.ts +8 -1
- package/src/config/env-vars.ts +16 -1
- package/src/config/types.ts +28 -4
- package/src/extension/command-completions.ts +44 -22
- package/src/extension/registration/foreground-run-controller.ts +19 -10
- package/src/extension/registration/lifecycle-handlers.ts +6 -491
- package/src/extension/registration/lifecycle.ts +7 -90
- package/src/extension/registration/render-loop.ts +532 -0
- package/src/extension/team-tool/doctor.ts +6 -0
- package/src/extension/team-tool/handle-settings.ts +4 -1
- package/src/runtime/child-pi/child-pi-spawn.ts +7 -0
- package/src/runtime/child-pi/child-pi.ts +37 -2
- package/src/runtime/child-pi/pi-version.ts +187 -0
- package/src/runtime/classifier/classifier-service.ts +298 -0
- package/src/runtime/dispatch-batch.ts +4 -0
- package/src/runtime/live-session/live-session-runtime.ts +31 -0
- package/src/runtime/model/pi-args.ts +62 -3
- package/src/runtime/process/zombie-scanner.ts +168 -7
- package/src/runtime/rpc/README.md +64 -25
- package/src/runtime/rpc/rpc-worker.ts +146 -26
- package/src/runtime/run-worker.ts +89 -15
- package/src/runtime/scheduling/run-coalesced-task-group.ts +3 -0
- package/src/runtime/skill-instructions.ts +66 -1
- package/src/runtime/surface/resolve-surface.ts +34 -19
- package/src/runtime/task-runner/child-executor.ts +132 -0
- package/src/runtime/task-runner/pre-execution.ts +8 -0
- package/src/runtime/task-runner.ts +6 -0
- package/src/schema/config-schema.ts +20 -8
- package/src/schema/team-tool-schema.ts +4 -2
- package/src/state/contracts.ts +5 -0
- package/src/ui/dashboard-panes/agents-pane.ts +3 -2
- package/src/ui/dashboard-panes/health-pane.ts +6 -1
- package/src/ui/dashboard-panes/mailbox-pane.ts +12 -7
- package/src/ui/dashboard-panes/plan-pane.ts +5 -2
- package/src/ui/dashboard-panes/progress-pane.ts +8 -2
- package/src/ui/format-helpers.ts +11 -0
- package/src/ui/live-conversation-overlay.ts +5 -3
- package/src/ui/live-duration.ts +5 -4
- package/src/ui/live-run-sidebar.ts +90 -20
- package/src/ui/overlays/mailbox-compose-overlay.ts +31 -1
- package/src/ui/rail.ts +14 -1
- package/src/ui/run-action-dispatcher.ts +2 -1
- package/src/ui/run-dashboard.ts +62 -22
- package/src/ui/run-snapshot-cache.ts +32 -0
- package/src/ui/settings-overlay.ts +36 -3
- package/src/ui/tool-renderers/brief-mode.ts +2 -2
- package/src/ui/transcript-viewer.ts +4 -1
- package/src/ui/widget/index.ts +10 -2
- package/src/ui/widget/task-list.ts +22 -7
- package/src/ui/widget/widget-model.ts +5 -4
- package/src/ui/widget/widget-renderer.ts +212 -37
- package/src/utils/relative-time.ts +11 -3
- package/src/utils/socket-path.ts +48 -8
- package/src/utils/visual.ts +32 -2
package/src/utils/visual.ts
CHANGED
|
@@ -60,11 +60,41 @@ export function __test__visibleWidthCacheSize(): number {
|
|
|
60
60
|
function consumeAnsi(input: string, index: number): number {
|
|
61
61
|
const char = input[index];
|
|
62
62
|
if (!char || char !== "\u001b") return 0;
|
|
63
|
-
|
|
63
|
+
const next = input[index + 1];
|
|
64
|
+
if (next === "[") {
|
|
65
|
+
let i = index + 2;
|
|
66
|
+
while (i < input.length) {
|
|
67
|
+
const code = input.charCodeAt(i);
|
|
68
|
+
if (code >= 0x40 && code <= 0x7e) return i - index + 1;
|
|
69
|
+
i++;
|
|
70
|
+
}
|
|
71
|
+
return 0;
|
|
72
|
+
}
|
|
73
|
+
// R3-9: OSC sequences (`ESC ] … BEL` or `ESC ] … ESC \`) — OSC-8 hyperlinks
|
|
74
|
+
// (pi-tui `hyperlink()`, used by the crew widget) ride this branch. The
|
|
75
|
+
// truncation/wrap/sanitize helpers must treat the whole sequence as ONE
|
|
76
|
+
// zero-width unit, matching pi-tui's `visibleWidth` (which already strips
|
|
77
|
+
// OSC), or a clipped line would slice mid-escape and leak raw bytes into
|
|
78
|
+
// the terminal. Malformed payloads (stray control char) fall back to the
|
|
79
|
+
// pre-existing behaviour of treating the ESC as ordinary data.
|
|
80
|
+
//
|
|
81
|
+
// U6/DR4 (pi 1.0.4 adoption, 2026-10-06): APC sequences (`ESC _ … BEL` or
|
|
82
|
+
// `ESC _ … ESC \`) share the exact same grammar, so they ride the same
|
|
83
|
+
// scanner. pi-tui's `CURSOR_MARKER` — now a documented public contract —
|
|
84
|
+
// is an APC string (`\u001b_pi:c\u0007`) that focused components emit at
|
|
85
|
+
// the cursor position. Without this branch, truncateToWidth/wrapHard
|
|
86
|
+
// walked the marker's `_pi:c` payload as ordinary text (~6 visible
|
|
87
|
+
// columns) and could slice the sequence in half; with it, the whole
|
|
88
|
+
// marker is consumed as ONE zero-width unit, matching pi-tui's
|
|
89
|
+
// `visibleWidth` (which already zero-widths APC). Same malformed fallback:
|
|
90
|
+
// a stray control char cannot belong to an OSC/APC payload either.
|
|
91
|
+
if (next !== "]" && next !== "_") return 0;
|
|
64
92
|
let i = index + 2;
|
|
65
93
|
while (i < input.length) {
|
|
66
94
|
const code = input.charCodeAt(i);
|
|
67
|
-
if (code
|
|
95
|
+
if (code === 0x07) return i - index + 1; // BEL terminator
|
|
96
|
+
if (code === 0x1b && input[i + 1] === "\\") return i - index + 2; // ST terminator
|
|
97
|
+
if (code < 0x20) return 0; // control char cannot belong to an OSC/APC payload
|
|
68
98
|
i++;
|
|
69
99
|
}
|
|
70
100
|
return 0;
|