pi-interactive-shell 0.9.0 → 0.10.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/CHANGELOG.md +27 -0
- package/README.md +21 -13
- package/SKILL.md +2 -2
- package/background-widget.ts +76 -0
- package/examples/prompts/codex-implement-plan.md +11 -3
- package/examples/prompts/codex-review-impl.md +11 -3
- package/examples/prompts/codex-review-plan.md +11 -3
- package/examples/skills/{codex-5.3-prompting → codex-5-3-prompting}/SKILL.md +1 -1
- package/examples/skills/codex-cli/SKILL.md +11 -5
- package/examples/skills/gpt-5-4-prompting/SKILL.md +202 -0
- package/handoff-utils.ts +92 -0
- package/headless-monitor.ts +6 -1
- package/index.ts +231 -416
- package/notification-utils.ts +134 -0
- package/overlay-component.ts +14 -213
- package/package.json +26 -6
- package/pty-log.ts +59 -0
- package/pty-protocol.ts +33 -0
- package/pty-session.ts +11 -134
- package/reattach-overlay.ts +5 -74
- package/runtime-coordinator.ts +69 -0
- package/scripts/install.js +5 -1
- package/session-manager.ts +21 -11
- package/session-query.ts +170 -0
- package/spawn-helper.ts +37 -0
- package/types.ts +3 -0
package/headless-monitor.ts
CHANGED
|
@@ -2,13 +2,17 @@ import { stripVTControlCharacters } from "node:util";
|
|
|
2
2
|
import type { PtyTerminalSession } from "./pty-session.js";
|
|
3
3
|
import type { InteractiveShellConfig } from "./config.js";
|
|
4
4
|
|
|
5
|
+
/** Runtime options for monitoring a headless dispatch session. */
|
|
5
6
|
export interface HeadlessMonitorOptions {
|
|
6
7
|
autoExitOnQuiet: boolean;
|
|
7
8
|
quietThreshold: number;
|
|
8
9
|
gracePeriod?: number;
|
|
9
10
|
timeout?: number;
|
|
11
|
+
/** Original session start time in ms since epoch, preserved when a foreground session moves headless. */
|
|
12
|
+
startedAt?: number;
|
|
10
13
|
}
|
|
11
14
|
|
|
15
|
+
/** Completion payload emitted when a headless dispatch session finishes. */
|
|
12
16
|
export interface HeadlessCompletionInfo {
|
|
13
17
|
exitCode: number | null;
|
|
14
18
|
signal?: number;
|
|
@@ -22,7 +26,7 @@ export interface HeadlessCompletionInfo {
|
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
export class HeadlessDispatchMonitor {
|
|
25
|
-
readonly startTime
|
|
29
|
+
readonly startTime: number;
|
|
26
30
|
private _disposed = false;
|
|
27
31
|
private quietTimer: ReturnType<typeof setTimeout> | null = null;
|
|
28
32
|
private timeoutTimer: ReturnType<typeof setTimeout> | null = null;
|
|
@@ -39,6 +43,7 @@ export class HeadlessDispatchMonitor {
|
|
|
39
43
|
private options: HeadlessMonitorOptions,
|
|
40
44
|
private onComplete: (info: HeadlessCompletionInfo) => void,
|
|
41
45
|
) {
|
|
46
|
+
this.startTime = options.startedAt ?? Date.now();
|
|
42
47
|
this.subscribe();
|
|
43
48
|
|
|
44
49
|
if (options.autoExitOnQuiet) {
|