@aayambansal/squint 0.4.5 → 0.4.7
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 +6 -0
- package/dist/App-HWMVSRMF.js +23 -0
- package/dist/{cdp-Q4H6ZHPT.js → cdp-PBQKXC6R.js} +1 -1
- package/dist/{chunk-O2S6PAJE.js → chunk-7CAGWFAQ.js} +1 -1
- package/dist/chunk-7MOKOZOR.js +1415 -0
- package/dist/{chunk-ZLEP2TWF.js → chunk-ARDV4XH6.js} +5 -1
- package/dist/{chunk-XEQ6JXXL.js → chunk-AUJJGMZG.js} +1 -1
- package/dist/{chunk-RQHOE5MV.js → chunk-HC4E42SV.js} +50 -2
- package/dist/chunk-M25IQ7C7.js +587 -0
- package/dist/chunk-NX7XQY2X.js +147 -0
- package/dist/{chunk-CV5WVKHU.js → chunk-ZSDCMYZR.js} +58 -18
- package/dist/cli.js +261 -2099
- package/dist/{contextDoctor-U3YTDFVG.js → contextDoctor-A26C2ZDN.js} +1 -1
- package/dist/{preview-ZUCVWGZG.js → preview-WT34NVCH.js} +3 -3
- package/dist/remote-6O6FPTUF.js +114 -0
- package/dist/{sandbox-J2NCPYHJ.js → sandbox-MK7Q2YNO.js} +1 -1
- package/dist/shots-OKWOYF7F.js +2 -2
- package/dist/{skills-6NZP67QT.js → skills-POB4ZZY5.js} +1 -1
- package/dist/{state-QOS7WCZO.js → state-PLY7YAD2.js} +1 -1
- package/dist/variants-3IEP7DFY.js +1 -1
- package/package.json +1 -1
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
probeRuntime,
|
|
11
11
|
routeShotName,
|
|
12
12
|
runtimeSummary
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-ZSDCMYZR.js";
|
|
14
|
+
import "./chunk-7CAGWFAQ.js";
|
|
15
|
+
import "./chunk-HC4E42SV.js";
|
|
15
16
|
import "./chunk-IMDRXXFU.js";
|
|
16
17
|
import "./chunk-KVYGPLWW.js";
|
|
17
|
-
import "./chunk-RQHOE5MV.js";
|
|
18
18
|
export {
|
|
19
19
|
VIEWPORTS,
|
|
20
20
|
buildReviewPrompt,
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
connectDaemon,
|
|
4
|
+
socketPath
|
|
5
|
+
} from "./chunk-NX7XQY2X.js";
|
|
6
|
+
import "./chunk-7MOKOZOR.js";
|
|
7
|
+
import "./chunk-ARDV4XH6.js";
|
|
8
|
+
import "./chunk-AUJJGMZG.js";
|
|
9
|
+
import "./chunk-YHRAOBI2.js";
|
|
10
|
+
import "./chunk-QCHBDP46.js";
|
|
11
|
+
import "./chunk-YGSF2TSO.js";
|
|
12
|
+
import "./chunk-VH7OOFQP.js";
|
|
13
|
+
import "./chunk-K5QJMSJH.js";
|
|
14
|
+
import "./chunk-WAJXATCO.js";
|
|
15
|
+
import "./chunk-62JNF5M2.js";
|
|
16
|
+
import "./chunk-ZSDCMYZR.js";
|
|
17
|
+
import "./chunk-7CAGWFAQ.js";
|
|
18
|
+
import "./chunk-HC4E42SV.js";
|
|
19
|
+
import "./chunk-IMDRXXFU.js";
|
|
20
|
+
import "./chunk-KVYGPLWW.js";
|
|
21
|
+
|
|
22
|
+
// src/daemon/remote.ts
|
|
23
|
+
var noteId = 0;
|
|
24
|
+
var RemoteSession = class _RemoteSession {
|
|
25
|
+
constructor(client, engineId) {
|
|
26
|
+
this.client = client;
|
|
27
|
+
this.state = {
|
|
28
|
+
items: [],
|
|
29
|
+
liveText: "",
|
|
30
|
+
running: false,
|
|
31
|
+
runStartedAt: 0,
|
|
32
|
+
engineId,
|
|
33
|
+
devState: "stopped",
|
|
34
|
+
devUrl: null,
|
|
35
|
+
totals: { turns: 0, costUsd: 0 },
|
|
36
|
+
queue: [],
|
|
37
|
+
mode: "safe",
|
|
38
|
+
problems: [],
|
|
39
|
+
sandbox: false
|
|
40
|
+
};
|
|
41
|
+
client.onMessage((msg) => {
|
|
42
|
+
if (msg.type === "state" && msg.state) {
|
|
43
|
+
this.state = msg.state;
|
|
44
|
+
this.emit();
|
|
45
|
+
} else if (msg.type === "hello") {
|
|
46
|
+
this.role = msg.role === "observer" ? "observer" : "driver";
|
|
47
|
+
if (msg.role === "driver" && Date.now() - this.attachedAt > 1e3) {
|
|
48
|
+
this.overlay("the driver detached \u2014 this terminal now steers");
|
|
49
|
+
}
|
|
50
|
+
} else if (msg.type === "denied") {
|
|
51
|
+
this.overlay(String(msg.reason ?? "observer \u2014 read-only"));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
client;
|
|
56
|
+
state;
|
|
57
|
+
listeners = /* @__PURE__ */ new Set();
|
|
58
|
+
attachedAt = Date.now();
|
|
59
|
+
role = "driver";
|
|
60
|
+
static async connect(cwd) {
|
|
61
|
+
const client = await connectDaemon(socketPath(cwd));
|
|
62
|
+
return new Promise((resolve, reject) => {
|
|
63
|
+
const timer = setTimeout(() => reject(new Error("daemon never said hello")), 3e3);
|
|
64
|
+
const session = new _RemoteSession(client, "unknown");
|
|
65
|
+
client.onMessage((msg) => {
|
|
66
|
+
if (msg.type === "hello") {
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
session.state = { ...session.state, engineId: String(msg.engineId ?? "unknown") };
|
|
69
|
+
resolve(session);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
emit() {
|
|
75
|
+
for (const listener of this.listeners) listener();
|
|
76
|
+
}
|
|
77
|
+
/** Local-only status line layered onto the current snapshot. */
|
|
78
|
+
overlay(text) {
|
|
79
|
+
this.state = {
|
|
80
|
+
...this.state,
|
|
81
|
+
items: [...this.state.items, { id: 1e6 + ++noteId, role: "status", text }]
|
|
82
|
+
};
|
|
83
|
+
this.emit();
|
|
84
|
+
}
|
|
85
|
+
subscribe(listener) {
|
|
86
|
+
this.listeners.add(listener);
|
|
87
|
+
return () => this.listeners.delete(listener);
|
|
88
|
+
}
|
|
89
|
+
getState() {
|
|
90
|
+
return this.state;
|
|
91
|
+
}
|
|
92
|
+
input(raw) {
|
|
93
|
+
this.client.send({ type: "input", text: raw });
|
|
94
|
+
}
|
|
95
|
+
interrupt() {
|
|
96
|
+
this.client.send({ type: "interrupt" });
|
|
97
|
+
}
|
|
98
|
+
cycleMode() {
|
|
99
|
+
this.client.send({ type: "cycleMode" });
|
|
100
|
+
}
|
|
101
|
+
note(text) {
|
|
102
|
+
this.overlay(text);
|
|
103
|
+
}
|
|
104
|
+
summary() {
|
|
105
|
+
const mins = Math.max(1, Math.round((Date.now() - this.attachedAt) / 6e4));
|
|
106
|
+
return `detached after ${mins}m \u2014 the session keeps running (squint attach rejoins)`;
|
|
107
|
+
}
|
|
108
|
+
dispose() {
|
|
109
|
+
this.client.close();
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
RemoteSession
|
|
114
|
+
};
|
package/dist/shots-OKWOYF7F.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-QCHBDP46.js";
|
|
5
5
|
import "./chunk-YGSF2TSO.js";
|
|
6
6
|
import "./chunk-VH7OOFQP.js";
|
|
7
|
-
import "./chunk-IMDRXXFU.js";
|
|
8
|
-
import "./chunk-KVYGPLWW.js";
|
|
9
7
|
import "./chunk-K5QJMSJH.js";
|
|
10
8
|
import "./chunk-WAJXATCO.js";
|
|
9
|
+
import "./chunk-IMDRXXFU.js";
|
|
10
|
+
import "./chunk-KVYGPLWW.js";
|
|
11
11
|
export {
|
|
12
12
|
screenshotVariants
|
|
13
13
|
};
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
variantsRoot
|
|
12
12
|
} from "./chunk-YGSF2TSO.js";
|
|
13
13
|
import "./chunk-VH7OOFQP.js";
|
|
14
|
-
import "./chunk-KVYGPLWW.js";
|
|
15
14
|
import "./chunk-K5QJMSJH.js";
|
|
16
15
|
import "./chunk-WAJXATCO.js";
|
|
16
|
+
import "./chunk-KVYGPLWW.js";
|
|
17
17
|
export {
|
|
18
18
|
MAX_VARIANTS,
|
|
19
19
|
applyVariant,
|
package/package.json
CHANGED