pi-session-cleanup 1.1.0 → 1.1.2
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 -17
- package/package.json +3 -3
- package/src/agent-target.ts +361 -361
- package/src/index.ts +1 -1
- package/src/session-agent.ts +103 -103
- package/src/session-cleanup-command.ts +268 -268
- package/src/session-delete.ts +165 -11
- package/src/session-entry.ts +23 -23
- package/src/session-format.ts +98 -98
- package/src/session-nix-command.ts +353 -329
- package/src/session-quit-shutdown.ts +40 -40
- package/src/session-selection.ts +167 -167
- package/src/session-sort.ts +137 -137
- package/src/session-source.ts +32 -32
- package/src/tui/agent-target-picker.ts +306 -306
- package/src/tui/session-cleanup-picker.ts +592 -592
- package/src/types-shims.d.ts +23 -9
- package/src/types.ts +1 -1
package/src/types-shims.d.ts
CHANGED
|
@@ -11,6 +11,15 @@ declare namespace NodeJS {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
declare const process: NodeJS.Process;
|
|
14
|
+
declare function setTimeout(handler: () => void, timeout?: number): { unref?(): void };
|
|
15
|
+
declare function clearTimeout(timeout: { unref?(): void }): void;
|
|
16
|
+
type Buffer = { length: number; toString(encoding?: string): string };
|
|
17
|
+
declare const Buffer: {
|
|
18
|
+
alloc(size: number): Buffer;
|
|
19
|
+
concat(chunks: Buffer[]): Buffer;
|
|
20
|
+
from(value: string): Buffer;
|
|
21
|
+
isBuffer(value: unknown): value is Buffer;
|
|
22
|
+
};
|
|
14
23
|
|
|
15
24
|
declare module "node:assert/strict" {
|
|
16
25
|
const assert: {
|
|
@@ -23,15 +32,20 @@ declare module "node:assert/strict" {
|
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
declare module "node:child_process" {
|
|
26
|
-
|
|
35
|
+
interface ChildProcessLike {
|
|
36
|
+
stderr?: {
|
|
37
|
+
on(event: "data", handler: (chunk: unknown) => void): void;
|
|
38
|
+
};
|
|
39
|
+
kill(): void;
|
|
40
|
+
on(event: "error", handler: (error: Error) => void): void;
|
|
41
|
+
on(event: "close", handler: (status: number | null) => void): void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function spawn(
|
|
27
45
|
command: string,
|
|
28
46
|
args?: readonly string[],
|
|
29
47
|
options?: Record<string, unknown>,
|
|
30
|
-
):
|
|
31
|
-
status: number | null;
|
|
32
|
-
stderr?: unknown;
|
|
33
|
-
error?: Error;
|
|
34
|
-
};
|
|
48
|
+
): ChildProcessLike;
|
|
35
49
|
}
|
|
36
50
|
|
|
37
51
|
declare module "node:fs" {
|
|
@@ -75,7 +89,7 @@ declare module "node:url" {
|
|
|
75
89
|
export function fileURLToPath(url: unknown): string;
|
|
76
90
|
}
|
|
77
91
|
|
|
78
|
-
declare module "@
|
|
92
|
+
declare module "@earendil-works/pi-tui" {
|
|
79
93
|
export interface Component {
|
|
80
94
|
render(width: number): string[];
|
|
81
95
|
handleInput(data: string): void;
|
|
@@ -92,8 +106,8 @@ declare module "@mariozechner/pi-tui" {
|
|
|
92
106
|
export function visibleWidth(text: string): number;
|
|
93
107
|
}
|
|
94
108
|
|
|
95
|
-
declare module "@
|
|
96
|
-
import type { Component } from "@
|
|
109
|
+
declare module "@earendil-works/pi-coding-agent" {
|
|
110
|
+
import type { Component } from "@earendil-works/pi-tui";
|
|
97
111
|
|
|
98
112
|
export function getAgentDir(): string;
|
|
99
113
|
|
package/src/types.ts
CHANGED