@juanibiapina/pi-gob 0.6.0 → 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/package.json +4 -14
- package/src/daemon-client.ts +240 -0
- package/src/index.ts +439 -0
- package/src/segment.ts +82 -0
- package/src/types.ts +119 -0
- package/dist/daemon-client.d.ts +0 -44
- package/dist/daemon-client.d.ts.map +0 -1
- package/dist/daemon-client.js +0 -218
- package/dist/daemon-client.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -387
- package/dist/index.js.map +0 -1
- package/dist/segment.d.ts +0 -24
- package/dist/segment.d.ts.map +0 -1
- package/dist/segment.js +0 -67
- package/dist/segment.js.map +0 -1
- package/dist/types.d.ts +0 -74
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -6
- package/dist/types.js.map +0 -1
package/src/segment.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Powerbar segment formatting for gob running jobs.
|
|
3
|
+
*
|
|
4
|
+
* Each job with historical run data renders its own progress bar.
|
|
5
|
+
* Jobs without progress data are grouped: 1 shows its command, N shows "N jobs".
|
|
6
|
+
* Parts are joined with " · ".
|
|
7
|
+
*
|
|
8
|
+
* Examples:
|
|
9
|
+
* 1 job, no history: "⚙ npm run dev"
|
|
10
|
+
* 1 job, with history: "⚙ npm run dev ████░░░░ 57%"
|
|
11
|
+
* mixed: "⚙ npm run dev ████░░░░ 57% · 2 jobs"
|
|
12
|
+
* all with history: "⚙ npm run dev ████░░░░ 57% · make build ████████ 100%"
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { JobResponse } from "./types.js";
|
|
16
|
+
|
|
17
|
+
const BAR_WIDTH = 8;
|
|
18
|
+
|
|
19
|
+
/** Display label for a job: description if set, otherwise the raw command. */
|
|
20
|
+
function jobLabel(job: JobResponse): string {
|
|
21
|
+
return job.description || job.command.join(" ");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface SegmentData {
|
|
25
|
+
text: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
color: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Compute progress percentage for a running job with known average duration.
|
|
32
|
+
* Returns undefined if no historical data. Clamps to 0–100.
|
|
33
|
+
*/
|
|
34
|
+
function jobProgress(job: JobResponse): number | undefined {
|
|
35
|
+
if (job.avg_duration_ms <= 0 || !job.started_at) return undefined;
|
|
36
|
+
|
|
37
|
+
const start = new Date(job.started_at).getTime();
|
|
38
|
+
const elapsedMs = Date.now() - start;
|
|
39
|
+
const pct = Math.round((elapsedMs / job.avg_duration_ms) * 100);
|
|
40
|
+
|
|
41
|
+
return Math.max(0, Math.min(100, pct));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Render a progress bar using block characters.
|
|
46
|
+
* "████░░░░ 57%" or "████████ 100%"
|
|
47
|
+
*/
|
|
48
|
+
function renderBar(pct: number): string {
|
|
49
|
+
const filled = Math.round((pct / 100) * BAR_WIDTH);
|
|
50
|
+
const empty = BAR_WIDTH - filled;
|
|
51
|
+
return `${"█".repeat(filled)}${"░".repeat(empty)} ${pct}%`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Format running jobs into a powerbar segment payload.
|
|
56
|
+
*/
|
|
57
|
+
export function formatJobSegment(jobs: JobResponse[]): SegmentData {
|
|
58
|
+
if (jobs.length === 0) {
|
|
59
|
+
return { text: "", icon: "⚙", color: "muted" };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const withBar: string[] = [];
|
|
63
|
+
const withoutBar: JobResponse[] = [];
|
|
64
|
+
for (const job of jobs) {
|
|
65
|
+
const pct = jobProgress(job);
|
|
66
|
+
if (pct !== undefined) {
|
|
67
|
+
withBar.push(`${jobLabel(job)} ${renderBar(pct)}`);
|
|
68
|
+
} else {
|
|
69
|
+
withoutBar.push(job);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const parts: string[] = [...withBar];
|
|
74
|
+
|
|
75
|
+
if (withoutBar.length === 1) {
|
|
76
|
+
parts.push(jobLabel(withoutBar[0]));
|
|
77
|
+
} else if (withoutBar.length > 1) {
|
|
78
|
+
parts.push(`${withoutBar.length} jobs`);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return { text: parts.join(" · "), icon: "⚙", color: "muted" };
|
|
82
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript types mirroring the gob daemon protocol.
|
|
3
|
+
* See gob/internal/daemon/protocol.go for the canonical definitions.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Request types
|
|
7
|
+
export type RequestType =
|
|
8
|
+
| "ping"
|
|
9
|
+
| "shutdown"
|
|
10
|
+
| "list"
|
|
11
|
+
| "add"
|
|
12
|
+
| "create"
|
|
13
|
+
| "stop"
|
|
14
|
+
| "start"
|
|
15
|
+
| "restart"
|
|
16
|
+
| "remove"
|
|
17
|
+
| "stop_all"
|
|
18
|
+
| "signal"
|
|
19
|
+
| "get_job"
|
|
20
|
+
| "runs"
|
|
21
|
+
| "stats"
|
|
22
|
+
| "subscribe"
|
|
23
|
+
| "version"
|
|
24
|
+
| "ports"
|
|
25
|
+
| "remove_run";
|
|
26
|
+
|
|
27
|
+
// Event types
|
|
28
|
+
export type EventType =
|
|
29
|
+
| "job_added"
|
|
30
|
+
| "job_started"
|
|
31
|
+
| "job_stopped"
|
|
32
|
+
| "job_removed"
|
|
33
|
+
| "job_updated"
|
|
34
|
+
| "run_started"
|
|
35
|
+
| "run_stopped"
|
|
36
|
+
| "run_removed"
|
|
37
|
+
| "ports_updated";
|
|
38
|
+
|
|
39
|
+
// Protocol messages
|
|
40
|
+
export interface Request {
|
|
41
|
+
type: RequestType;
|
|
42
|
+
payload?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface Response {
|
|
46
|
+
success: boolean;
|
|
47
|
+
error?: string;
|
|
48
|
+
data?: Record<string, unknown>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Port information
|
|
52
|
+
export interface PortInfo {
|
|
53
|
+
port: number;
|
|
54
|
+
protocol: string;
|
|
55
|
+
pid: number;
|
|
56
|
+
address: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Job response from daemon
|
|
60
|
+
export interface JobResponse {
|
|
61
|
+
id: string;
|
|
62
|
+
pid: number;
|
|
63
|
+
status: string;
|
|
64
|
+
command: string[];
|
|
65
|
+
workdir: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
blocked?: boolean;
|
|
68
|
+
created_at: string;
|
|
69
|
+
started_at: string;
|
|
70
|
+
stopped_at?: string;
|
|
71
|
+
stdout_path: string;
|
|
72
|
+
stderr_path: string;
|
|
73
|
+
exit_code?: number | null;
|
|
74
|
+
ports?: PortInfo[];
|
|
75
|
+
|
|
76
|
+
// Statistics
|
|
77
|
+
run_count: number;
|
|
78
|
+
success_count: number;
|
|
79
|
+
failure_count: number;
|
|
80
|
+
success_rate: number;
|
|
81
|
+
avg_duration_ms: number;
|
|
82
|
+
failure_avg_duration_ms: number;
|
|
83
|
+
min_duration_ms: number;
|
|
84
|
+
max_duration_ms: number;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Run response from daemon
|
|
88
|
+
export interface RunResponse {
|
|
89
|
+
id: string;
|
|
90
|
+
job_id: string;
|
|
91
|
+
pid: number;
|
|
92
|
+
status: string;
|
|
93
|
+
exit_code?: number | null;
|
|
94
|
+
stdout_path: string;
|
|
95
|
+
stderr_path: string;
|
|
96
|
+
started_at: string;
|
|
97
|
+
stopped_at?: string;
|
|
98
|
+
duration_ms: number;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Event from subscription stream
|
|
102
|
+
export interface Event {
|
|
103
|
+
type: EventType;
|
|
104
|
+
job_id: string;
|
|
105
|
+
job: JobResponse;
|
|
106
|
+
run?: RunResponse;
|
|
107
|
+
ports?: PortInfo[];
|
|
108
|
+
job_count: number;
|
|
109
|
+
running_job_count: number;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Job ports response
|
|
113
|
+
export interface JobPorts {
|
|
114
|
+
job_id: string;
|
|
115
|
+
pid: number;
|
|
116
|
+
ports: PortInfo[];
|
|
117
|
+
status?: string;
|
|
118
|
+
message?: string;
|
|
119
|
+
}
|
package/dist/daemon-client.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Daemon client for connecting to gob daemon via Unix socket.
|
|
3
|
-
* Uses the newline-delimited JSON protocol defined in gob's daemon package.
|
|
4
|
-
*/
|
|
5
|
-
import type { Event, JobResponse, Response } from "./types.js";
|
|
6
|
-
export declare class DaemonClient {
|
|
7
|
-
private socketPath;
|
|
8
|
-
private subscriptionConn;
|
|
9
|
-
private _connected;
|
|
10
|
-
constructor();
|
|
11
|
-
get connected(): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Probe the daemon socket and verify it's reachable.
|
|
14
|
-
* Does NOT auto-start the daemon.
|
|
15
|
-
* Returns true if daemon is running, false otherwise.
|
|
16
|
-
*/
|
|
17
|
-
connect(): Promise<boolean>;
|
|
18
|
-
/**
|
|
19
|
-
* Send a request to the daemon over an ephemeral connection.
|
|
20
|
-
*/
|
|
21
|
-
sendRequest(type: string, payload?: Record<string, unknown>): Promise<Response>;
|
|
22
|
-
/**
|
|
23
|
-
* List jobs, optionally filtered by workdir.
|
|
24
|
-
*/
|
|
25
|
-
list(workdir?: string): Promise<JobResponse[]>;
|
|
26
|
-
/**
|
|
27
|
-
* Subscribe to daemon events. Returns an unsubscribe function.
|
|
28
|
-
* The subscription uses a persistent connection that streams events.
|
|
29
|
-
*
|
|
30
|
-
* @param workdir - Filter events to jobs in this workdir
|
|
31
|
-
* @param onEvent - Callback for each event
|
|
32
|
-
* @param onError - Callback when the subscription disconnects
|
|
33
|
-
*/
|
|
34
|
-
subscribe(workdir: string | undefined, onEvent: (event: Event) => void, onError: (err: Error) => void): () => void;
|
|
35
|
-
/**
|
|
36
|
-
* Close the subscription connection.
|
|
37
|
-
*/
|
|
38
|
-
private closeSubscription;
|
|
39
|
-
/**
|
|
40
|
-
* Disconnect from the daemon, closing the subscription.
|
|
41
|
-
*/
|
|
42
|
-
disconnect(): void;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=daemon-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-client.d.ts","sourceRoot":"","sources":["../src/daemon-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAW,QAAQ,EAAE,MAAM,YAAY,CAAC;AAyExE,qBAAa,YAAY;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,gBAAgB,CAA2B;IACnD,OAAO,CAAC,UAAU,CAAS;;IAM3B,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAgBjC;;OAEG;IACG,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQrF;;OAEG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAgBpD;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,GAAG,MAAM,IAAI;IAqElH;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;OAEG;IACH,UAAU,IAAI,IAAI;CAIlB"}
|
package/dist/daemon-client.js
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Daemon client for connecting to gob daemon via Unix socket.
|
|
3
|
-
* Uses the newline-delimited JSON protocol defined in gob's daemon package.
|
|
4
|
-
*/
|
|
5
|
-
import * as net from "node:net";
|
|
6
|
-
import * as os from "node:os";
|
|
7
|
-
import * as path from "node:path";
|
|
8
|
-
/**
|
|
9
|
-
* Get the gob daemon socket path.
|
|
10
|
-
* Uses $XDG_RUNTIME_DIR/gob/daemon.sock if set.
|
|
11
|
-
* Falls back to ~/Library/Application Support/gob/daemon.sock on macOS
|
|
12
|
-
* (matching adrg/xdg Go library behavior).
|
|
13
|
-
* Falls back to /run/user/<uid>/gob/daemon.sock on Linux.
|
|
14
|
-
*/
|
|
15
|
-
function getSocketPath() {
|
|
16
|
-
const xdgRuntime = process.env.XDG_RUNTIME_DIR;
|
|
17
|
-
if (xdgRuntime) {
|
|
18
|
-
return path.join(xdgRuntime, "gob", "daemon.sock");
|
|
19
|
-
}
|
|
20
|
-
// macOS fallback — adrg/xdg uses ~/Library/Application Support as RuntimeDir
|
|
21
|
-
if (process.platform === "darwin") {
|
|
22
|
-
return path.join(os.homedir(), "Library", "Application Support", "gob", "daemon.sock");
|
|
23
|
-
}
|
|
24
|
-
// Linux fallback if XDG_RUNTIME_DIR not set
|
|
25
|
-
return path.join("/run/user", String(process.getuid?.()), "gob", "daemon.sock");
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Send a single request over a new ephemeral connection and return the response.
|
|
29
|
-
* The daemon closes the connection after each response (except subscribe).
|
|
30
|
-
*/
|
|
31
|
-
async function sendEphemeralRequest(socketPath, req) {
|
|
32
|
-
return new Promise((resolve, reject) => {
|
|
33
|
-
const conn = net.createConnection(socketPath);
|
|
34
|
-
let buffer = "";
|
|
35
|
-
conn.on("connect", () => {
|
|
36
|
-
conn.write(`${JSON.stringify(req)}\n`);
|
|
37
|
-
});
|
|
38
|
-
conn.on("data", (data) => {
|
|
39
|
-
buffer += data.toString();
|
|
40
|
-
const newlineIdx = buffer.indexOf("\n");
|
|
41
|
-
if (newlineIdx !== -1) {
|
|
42
|
-
const line = buffer.slice(0, newlineIdx);
|
|
43
|
-
try {
|
|
44
|
-
const resp = JSON.parse(line);
|
|
45
|
-
conn.destroy();
|
|
46
|
-
resolve(resp);
|
|
47
|
-
}
|
|
48
|
-
catch (err) {
|
|
49
|
-
conn.destroy();
|
|
50
|
-
reject(new Error(`Failed to parse response: ${err}`));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
conn.on("error", (err) => {
|
|
55
|
-
reject(err);
|
|
56
|
-
});
|
|
57
|
-
conn.on("close", () => {
|
|
58
|
-
if (buffer.trim()) {
|
|
59
|
-
try {
|
|
60
|
-
resolve(JSON.parse(buffer.trim()));
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
reject(new Error("Connection closed before complete response"));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
// Timeout after 5 seconds
|
|
68
|
-
conn.setTimeout(5000, () => {
|
|
69
|
-
conn.destroy();
|
|
70
|
-
reject(new Error("Connection timed out"));
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
export class DaemonClient {
|
|
75
|
-
socketPath;
|
|
76
|
-
subscriptionConn = null;
|
|
77
|
-
_connected = false;
|
|
78
|
-
constructor() {
|
|
79
|
-
this.socketPath = getSocketPath();
|
|
80
|
-
}
|
|
81
|
-
get connected() {
|
|
82
|
-
return this._connected;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Probe the daemon socket and verify it's reachable.
|
|
86
|
-
* Does NOT auto-start the daemon.
|
|
87
|
-
* Returns true if daemon is running, false otherwise.
|
|
88
|
-
*/
|
|
89
|
-
async connect() {
|
|
90
|
-
try {
|
|
91
|
-
const resp = await sendEphemeralRequest(this.socketPath, {
|
|
92
|
-
type: "version",
|
|
93
|
-
payload: { client_version: "pi-extension" },
|
|
94
|
-
});
|
|
95
|
-
if (resp.success) {
|
|
96
|
-
this._connected = true;
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
catch {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Send a request to the daemon over an ephemeral connection.
|
|
107
|
-
*/
|
|
108
|
-
async sendRequest(type, payload) {
|
|
109
|
-
const req = { type: type };
|
|
110
|
-
if (payload) {
|
|
111
|
-
req.payload = payload;
|
|
112
|
-
}
|
|
113
|
-
return sendEphemeralRequest(this.socketPath, req);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* List jobs, optionally filtered by workdir.
|
|
117
|
-
*/
|
|
118
|
-
async list(workdir) {
|
|
119
|
-
const payload = {};
|
|
120
|
-
if (workdir) {
|
|
121
|
-
payload.workdir = workdir;
|
|
122
|
-
}
|
|
123
|
-
const resp = await this.sendRequest("list", payload);
|
|
124
|
-
if (!resp.success) {
|
|
125
|
-
throw new Error(`list failed: ${resp.error}`);
|
|
126
|
-
}
|
|
127
|
-
const jobs = resp.data?.jobs;
|
|
128
|
-
if (!jobs || !Array.isArray(jobs)) {
|
|
129
|
-
return [];
|
|
130
|
-
}
|
|
131
|
-
return jobs;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Subscribe to daemon events. Returns an unsubscribe function.
|
|
135
|
-
* The subscription uses a persistent connection that streams events.
|
|
136
|
-
*
|
|
137
|
-
* @param workdir - Filter events to jobs in this workdir
|
|
138
|
-
* @param onEvent - Callback for each event
|
|
139
|
-
* @param onError - Callback when the subscription disconnects
|
|
140
|
-
*/
|
|
141
|
-
subscribe(workdir, onEvent, onError) {
|
|
142
|
-
// Close existing subscription if any
|
|
143
|
-
this.closeSubscription();
|
|
144
|
-
const conn = net.createConnection(this.socketPath);
|
|
145
|
-
this.subscriptionConn = conn;
|
|
146
|
-
let buffer = "";
|
|
147
|
-
let gotInitialResponse = false;
|
|
148
|
-
conn.on("connect", () => {
|
|
149
|
-
const req = { type: "subscribe" };
|
|
150
|
-
if (workdir) {
|
|
151
|
-
req.payload = { workdir };
|
|
152
|
-
}
|
|
153
|
-
conn.write(`${JSON.stringify(req)}\n`);
|
|
154
|
-
});
|
|
155
|
-
conn.on("data", (data) => {
|
|
156
|
-
buffer += data.toString();
|
|
157
|
-
// Process all complete lines
|
|
158
|
-
for (let newlineIdx = buffer.indexOf("\n"); newlineIdx !== -1; newlineIdx = buffer.indexOf("\n")) {
|
|
159
|
-
const line = buffer.slice(0, newlineIdx);
|
|
160
|
-
buffer = buffer.slice(newlineIdx + 1);
|
|
161
|
-
if (!line.trim())
|
|
162
|
-
continue;
|
|
163
|
-
try {
|
|
164
|
-
const parsed = JSON.parse(line);
|
|
165
|
-
if (!gotInitialResponse) {
|
|
166
|
-
// First message is the subscribe response
|
|
167
|
-
gotInitialResponse = true;
|
|
168
|
-
if (!parsed.success) {
|
|
169
|
-
conn.destroy();
|
|
170
|
-
onError(new Error(`Subscribe failed: ${parsed.error}`));
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
// Subsequent messages are events
|
|
176
|
-
onEvent(parsed);
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
// Skip malformed lines
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
conn.on("error", (err) => {
|
|
184
|
-
this.subscriptionConn = null;
|
|
185
|
-
onError(err);
|
|
186
|
-
});
|
|
187
|
-
conn.on("close", () => {
|
|
188
|
-
const wasSubscription = this.subscriptionConn === conn;
|
|
189
|
-
if (wasSubscription) {
|
|
190
|
-
this.subscriptionConn = null;
|
|
191
|
-
onError(new Error("Subscription connection closed"));
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
// Return unsubscribe function
|
|
195
|
-
return () => {
|
|
196
|
-
if (this.subscriptionConn === conn) {
|
|
197
|
-
this.closeSubscription();
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Close the subscription connection.
|
|
203
|
-
*/
|
|
204
|
-
closeSubscription() {
|
|
205
|
-
if (this.subscriptionConn) {
|
|
206
|
-
this.subscriptionConn.destroy();
|
|
207
|
-
this.subscriptionConn = null;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Disconnect from the daemon, closing the subscription.
|
|
212
|
-
*/
|
|
213
|
-
disconnect() {
|
|
214
|
-
this.closeSubscription();
|
|
215
|
-
this._connected = false;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
//# sourceMappingURL=daemon-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-client.js","sourceRoot":"","sources":["../src/daemon-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC;;;;;;GAMG;AACH,SAAS,aAAa;IACrB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAC/C,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IACpD,CAAC;IACD,6EAA6E;IAC7E,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IACxF,CAAC;IACD,4CAA4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* Daemon client for connecting to gob daemon via Unix socket.\n * Uses the newline-delimited JSON protocol defined in gob's daemon package.\n */\n\nimport * as net from \"node:net\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\nimport type { Event, JobResponse, Request, Response } from \"./types.js\";\n\n/**\n * Get the gob daemon socket path.\n * Uses $XDG_RUNTIME_DIR/gob/daemon.sock if set.\n * Falls back to ~/Library/Application Support/gob/daemon.sock on macOS\n * (matching adrg/xdg Go library behavior).\n * Falls back to /run/user/<uid>/gob/daemon.sock on Linux.\n */\nfunction getSocketPath(): string {\n\tconst xdgRuntime = process.env.XDG_RUNTIME_DIR;\n\tif (xdgRuntime) {\n\t\treturn path.join(xdgRuntime, \"gob\", \"daemon.sock\");\n\t}\n\t// macOS fallback — adrg/xdg uses ~/Library/Application Support as RuntimeDir\n\tif (process.platform === \"darwin\") {\n\t\treturn path.join(os.homedir(), \"Library\", \"Application Support\", \"gob\", \"daemon.sock\");\n\t}\n\t// Linux fallback if XDG_RUNTIME_DIR not set\n\treturn path.join(\"/run/user\", String(process.getuid?.()), \"gob\", \"daemon.sock\");\n}\n\n/**\n * Send a single request over a new ephemeral connection and return the response.\n * The daemon closes the connection after each response (except subscribe).\n */\nasync function sendEphemeralRequest(socketPath: string, req: Request): Promise<Response> {\n\treturn new Promise((resolve, reject) => {\n\t\tconst conn = net.createConnection(socketPath);\n\t\tlet buffer = \"\";\n\n\t\tconn.on(\"connect\", () => {\n\t\t\tconn.write(`${JSON.stringify(req)}\\n`);\n\t\t});\n\n\t\tconn.on(\"data\", (data) => {\n\t\t\tbuffer += data.toString();\n\t\t\tconst newlineIdx = buffer.indexOf(\"\\n\");\n\t\t\tif (newlineIdx !== -1) {\n\t\t\t\tconst line = buffer.slice(0, newlineIdx);\n\t\t\t\ttry {\n\t\t\t\t\tconst resp = JSON.parse(line) as Response;\n\t\t\t\t\tconn.destroy();\n\t\t\t\t\tresolve(resp);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconn.destroy();\n\t\t\t\t\treject(new Error(`Failed to parse response: ${err}`));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tconn.on(\"error\", (err) => {\n\t\t\treject(err);\n\t\t});\n\n\t\tconn.on(\"close\", () => {\n\t\t\tif (buffer.trim()) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(JSON.parse(buffer.trim()) as Response);\n\t\t\t\t} catch {\n\t\t\t\t\treject(new Error(\"Connection closed before complete response\"));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Timeout after 5 seconds\n\t\tconn.setTimeout(5000, () => {\n\t\t\tconn.destroy();\n\t\t\treject(new Error(\"Connection timed out\"));\n\t\t});\n\t});\n}\n\nexport class DaemonClient {\n\tprivate socketPath: string;\n\tprivate subscriptionConn: net.Socket | null = null;\n\tprivate _connected = false;\n\n\tconstructor() {\n\t\tthis.socketPath = getSocketPath();\n\t}\n\n\tget connected(): boolean {\n\t\treturn this._connected;\n\t}\n\n\t/**\n\t * Probe the daemon socket and verify it's reachable.\n\t * Does NOT auto-start the daemon.\n\t * Returns true if daemon is running, false otherwise.\n\t */\n\tasync connect(): Promise<boolean> {\n\t\ttry {\n\t\t\tconst resp = await sendEphemeralRequest(this.socketPath, {\n\t\t\t\ttype: \"version\",\n\t\t\t\tpayload: { client_version: \"pi-extension\" },\n\t\t\t});\n\t\t\tif (resp.success) {\n\t\t\t\tthis._connected = true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Send a request to the daemon over an ephemeral connection.\n\t */\n\tasync sendRequest(type: string, payload?: Record<string, unknown>): Promise<Response> {\n\t\tconst req: Request = { type: type as Request[\"type\"] };\n\t\tif (payload) {\n\t\t\treq.payload = payload;\n\t\t}\n\t\treturn sendEphemeralRequest(this.socketPath, req);\n\t}\n\n\t/**\n\t * List jobs, optionally filtered by workdir.\n\t */\n\tasync list(workdir?: string): Promise<JobResponse[]> {\n\t\tconst payload: Record<string, unknown> = {};\n\t\tif (workdir) {\n\t\t\tpayload.workdir = workdir;\n\t\t}\n\t\tconst resp = await this.sendRequest(\"list\", payload);\n\t\tif (!resp.success) {\n\t\t\tthrow new Error(`list failed: ${resp.error}`);\n\t\t}\n\t\tconst jobs = resp.data?.jobs;\n\t\tif (!jobs || !Array.isArray(jobs)) {\n\t\t\treturn [];\n\t\t}\n\t\treturn jobs as JobResponse[];\n\t}\n\n\t/**\n\t * Subscribe to daemon events. Returns an unsubscribe function.\n\t * The subscription uses a persistent connection that streams events.\n\t *\n\t * @param workdir - Filter events to jobs in this workdir\n\t * @param onEvent - Callback for each event\n\t * @param onError - Callback when the subscription disconnects\n\t */\n\tsubscribe(workdir: string | undefined, onEvent: (event: Event) => void, onError: (err: Error) => void): () => void {\n\t\t// Close existing subscription if any\n\t\tthis.closeSubscription();\n\n\t\tconst conn = net.createConnection(this.socketPath);\n\t\tthis.subscriptionConn = conn;\n\t\tlet buffer = \"\";\n\t\tlet gotInitialResponse = false;\n\n\t\tconn.on(\"connect\", () => {\n\t\t\tconst req: Request = { type: \"subscribe\" };\n\t\t\tif (workdir) {\n\t\t\t\treq.payload = { workdir };\n\t\t\t}\n\t\t\tconn.write(`${JSON.stringify(req)}\\n`);\n\t\t});\n\n\t\tconn.on(\"data\", (data) => {\n\t\t\tbuffer += data.toString();\n\t\t\t// Process all complete lines\n\t\t\tfor (let newlineIdx = buffer.indexOf(\"\\n\"); newlineIdx !== -1; newlineIdx = buffer.indexOf(\"\\n\")) {\n\t\t\t\tconst line = buffer.slice(0, newlineIdx);\n\t\t\t\tbuffer = buffer.slice(newlineIdx + 1);\n\n\t\t\t\tif (!line.trim()) continue;\n\n\t\t\t\ttry {\n\t\t\t\t\tconst parsed = JSON.parse(line);\n\n\t\t\t\t\tif (!gotInitialResponse) {\n\t\t\t\t\t\t// First message is the subscribe response\n\t\t\t\t\t\tgotInitialResponse = true;\n\t\t\t\t\t\tif (!parsed.success) {\n\t\t\t\t\t\t\tconn.destroy();\n\t\t\t\t\t\t\tonError(new Error(`Subscribe failed: ${parsed.error}`));\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Subsequent messages are events\n\t\t\t\t\tonEvent(parsed as Event);\n\t\t\t\t} catch {\n\t\t\t\t\t// Skip malformed lines\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tconn.on(\"error\", (err) => {\n\t\t\tthis.subscriptionConn = null;\n\t\t\tonError(err);\n\t\t});\n\n\t\tconn.on(\"close\", () => {\n\t\t\tconst wasSubscription = this.subscriptionConn === conn;\n\t\t\tif (wasSubscription) {\n\t\t\t\tthis.subscriptionConn = null;\n\t\t\t\tonError(new Error(\"Subscription connection closed\"));\n\t\t\t}\n\t\t});\n\n\t\t// Return unsubscribe function\n\t\treturn () => {\n\t\t\tif (this.subscriptionConn === conn) {\n\t\t\t\tthis.closeSubscription();\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Close the subscription connection.\n\t */\n\tprivate closeSubscription(): void {\n\t\tif (this.subscriptionConn) {\n\t\t\tthis.subscriptionConn.destroy();\n\t\t\tthis.subscriptionConn = null;\n\t\t}\n\t}\n\n\t/**\n\t * Disconnect from the daemon, closing the subscription.\n\t */\n\tdisconnect(): void {\n\t\tthis.closeSubscription();\n\t\tthis._connected = false;\n\t}\n}\n"]}
|
package/dist/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gob Extension
|
|
3
|
-
*
|
|
4
|
-
* Manages gob background jobs from within pi.
|
|
5
|
-
* Connects to the gob daemon via Unix socket for real-time job monitoring.
|
|
6
|
-
* Emits powerbar:update events with segment id "gob" showing running jobs.
|
|
7
|
-
* Use /gob to view and interact with running and stopped jobs.
|
|
8
|
-
*/
|
|
9
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
|
-
export default function (pi: ExtensionAPI): void;
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AAWtF,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,YAAY,QAkaxC"}
|