@illuminis/comprism 0.1.3 → 0.1.5
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 +61 -2
- package/out/agent/command.d.ts +75 -4
- package/out/agent/command.js +221 -26
- package/out/agent/render.d.ts +56 -8
- package/out/agent/render.js +441 -39
- package/out/agent/session.d.ts +156 -2
- package/out/agent/session.js +795 -154
- package/out/commands/agents.d.ts +2 -0
- package/out/commands/agents.js +79 -0
- package/out/commands/ask.d.ts +1 -1
- package/out/commands/ask.js +88 -12
- package/out/commands/commands-thin.js +79 -17
- package/out/commands/config.d.ts +1 -0
- package/out/commands/config.js +138 -0
- package/out/commands/cost.d.ts +1 -0
- package/out/commands/cost.js +167 -0
- package/out/commands/hooks.d.ts +1 -0
- package/out/commands/hooks.js +83 -0
- package/out/commands/install.d.ts +44 -1
- package/out/commands/install.js +198 -4
- package/out/commands/instructions.d.ts +1 -0
- package/out/commands/instructions.js +113 -0
- package/out/commands/integrations.d.ts +3 -0
- package/out/commands/integrations.js +215 -0
- package/out/commands/jobs.d.ts +5 -0
- package/out/commands/jobs.js +157 -0
- package/out/commands/login.js +249 -43
- package/out/commands/memory.d.ts +3 -0
- package/out/commands/memory.js +113 -0
- package/out/commands/permissions.d.ts +1 -0
- package/out/commands/permissions.js +94 -0
- package/out/commands/plugins.d.ts +4 -0
- package/out/commands/plugins.js +192 -0
- package/out/commands/privacy.d.ts +1 -0
- package/out/commands/privacy.js +57 -0
- package/out/commands/providerKey.d.ts +32 -0
- package/out/commands/providerKey.js +108 -0
- package/out/commands/repl.d.ts +12 -1
- package/out/commands/repl.js +1649 -122
- package/out/commands/report.d.ts +39 -0
- package/out/commands/report.js +115 -0
- package/out/commands/review.d.ts +5 -0
- package/out/commands/review.js +223 -0
- package/out/commands/sessions.d.ts +23 -0
- package/out/commands/sessions.js +115 -0
- package/out/commands/settings.d.ts +3 -1
- package/out/commands/settings.js +18 -16
- package/out/commands/skills.d.ts +21 -0
- package/out/commands/skills.js +207 -0
- package/out/commands/unattended.d.ts +7 -0
- package/out/commands/unattended.js +351 -0
- package/out/commands/update.d.ts +1 -0
- package/out/commands/update.js +123 -0
- package/out/commands/welcome.d.ts +25 -1
- package/out/commands/welcome.js +71 -35
- package/out/commands/worktrees.d.ts +5 -0
- package/out/commands/worktrees.js +186 -0
- package/out/executor/browser.d.ts +14 -0
- package/out/executor/browser.js +270 -0
- package/out/executor/diagnostics.d.ts +2 -0
- package/out/executor/diagnostics.js +181 -0
- package/out/executor/files.js +270 -40
- package/out/executor/git.js +42 -29
- package/out/executor/hooks.d.ts +42 -58
- package/out/executor/hooks.js +89 -182
- package/out/executor/index.d.ts +21 -5
- package/out/executor/index.js +160 -14
- package/out/executor/paths.d.ts +6 -1
- package/out/executor/paths.js +34 -6
- package/out/executor/sandbox.d.ts +40 -0
- package/out/executor/sandbox.js +299 -0
- package/out/executor/shell.d.ts +49 -4
- package/out/executor/shell.js +302 -56
- package/out/executor/toolservers.d.ts +20 -0
- package/out/executor/toolservers.js +189 -0
- package/out/executor/worktree.d.ts +9 -0
- package/out/executor/worktree.js +119 -0
- package/out/graph/read-python.js +2 -1
- package/out/lib/attach.d.ts +56 -12
- package/out/lib/attach.js +230 -63
- package/out/lib/clipboard.d.ts +23 -0
- package/out/lib/clipboard.js +182 -0
- package/out/lib/commandlist.d.ts +20 -0
- package/out/lib/commandlist.js +58 -0
- package/out/lib/decision.d.ts +22 -0
- package/out/lib/decision.js +50 -0
- package/out/lib/fingerprint.d.ts +25 -0
- package/out/lib/fingerprint.js +58 -0
- package/out/lib/gateway.d.ts +190 -2
- package/out/lib/gateway.js +59 -4
- package/out/lib/history.d.ts +24 -0
- package/out/lib/history.js +137 -0
- package/out/lib/ide.d.ts +19 -0
- package/out/lib/ide.js +131 -0
- package/out/lib/keyboard.d.ts +98 -0
- package/out/lib/keyboard.js +390 -0
- package/out/lib/lastlogin.d.ts +14 -0
- package/out/lib/lastlogin.js +105 -0
- package/out/lib/machine.d.ts +21 -0
- package/out/lib/machine.js +91 -0
- package/out/lib/notify.d.ts +4 -0
- package/out/lib/notify.js +52 -0
- package/out/lib/output.d.ts +48 -0
- package/out/lib/output.js +108 -0
- package/out/lib/picker.d.ts +1 -0
- package/out/lib/picker.js +158 -0
- package/out/lib/project-ops.d.ts +19 -0
- package/out/lib/project-ops.js +146 -0
- package/out/lib/project.d.ts +28 -0
- package/out/lib/project.js +114 -0
- package/out/lib/prompt.d.ts +3 -0
- package/out/lib/prompt.js +36 -2
- package/out/lib/queue.d.ts +13 -0
- package/out/lib/queue.js +116 -0
- package/out/lib/readiness.d.ts +19 -0
- package/out/lib/readiness.js +170 -1
- package/out/lib/self.d.ts +23 -0
- package/out/lib/self.js +124 -0
- package/out/lib/sessions.d.ts +19 -0
- package/out/lib/sessions.js +221 -0
- package/out/lib/startcache.d.ts +13 -0
- package/out/lib/startcache.js +78 -0
- package/out/lib/stdin.d.ts +32 -0
- package/out/lib/stdin.js +117 -0
- package/out/lib/store.d.ts +40 -0
- package/out/lib/store.js +138 -0
- package/out/lib/sync.d.ts +18 -0
- package/out/lib/sync.js +81 -0
- package/out/lib/ui.d.ts +10 -4
- package/out/lib/ui.js +65 -25
- package/out/lib/voice.d.ts +36 -0
- package/out/lib/voice.js +160 -1
- package/out/native/dictate +0 -0
- package/out/postinstall.js +42 -17
- package/out/providers/anthropic.d.ts +22 -0
- package/out/providers/anthropic.js +80 -0
- package/out/providers/index.d.ts +8 -0
- package/out/providers/index.js +83 -0
- package/out/providers/openai.d.ts +11 -0
- package/out/providers/openai.js +57 -0
- package/out/thin.js +595 -33
- package/package.json +11 -50
package/out/agent/session.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ProjectFacts } from "../lib/project";
|
|
1
2
|
import * as ui from "./render";
|
|
2
3
|
export interface SessionOptions {
|
|
3
4
|
/** Where the workspace lives, and the URL of the server that owns it. */
|
|
@@ -5,6 +6,9 @@ export interface SessionOptions {
|
|
|
5
6
|
/** The workspace credential the device flow minted. Never a decodable token. */
|
|
6
7
|
credential: string;
|
|
7
8
|
root: string;
|
|
9
|
+
/** The project, start folder, branch and added folders (manual 2.1 to 2.3).
|
|
10
|
+
* `root` is the project root when this is present. */
|
|
11
|
+
project?: ProjectFacts;
|
|
8
12
|
/** read_only, approve_writes, auto_edit or full_auto. Named, not numbered. */
|
|
9
13
|
permissionMode?: string;
|
|
10
14
|
/** Investigate and propose, change nothing. */
|
|
@@ -23,6 +27,25 @@ export interface SessionOptions {
|
|
|
23
27
|
* corpus study, which has to measure each model as itself. */
|
|
24
28
|
pinModel?: boolean;
|
|
25
29
|
maxSpendUsd?: number;
|
|
30
|
+
/** Stop after this many steps (manual 4.13). */
|
|
31
|
+
maxSteps?: number;
|
|
32
|
+
/** Reasoning effort asked for: low, medium or high (manual 4.18). */
|
|
33
|
+
effort?: string;
|
|
34
|
+
/** Commands run in the operating system's sandbox (manual 4.12). */
|
|
35
|
+
sandbox?: boolean;
|
|
36
|
+
/** Seconds each command may run (manual 5.12); the service applies it. */
|
|
37
|
+
commandTimeoutS?: number;
|
|
38
|
+
/** Background processes outlive the job; the session stops them (5.13). */
|
|
39
|
+
keepProcesses?: boolean;
|
|
40
|
+
/** Start from this GitHub issue (manual 5.20). */
|
|
41
|
+
issue?: number;
|
|
42
|
+
/** Lead this team (manual 5.27). */
|
|
43
|
+
team?: string;
|
|
44
|
+
/** A review job (manual 5.19). */
|
|
45
|
+
review?: {
|
|
46
|
+
pr?: number;
|
|
47
|
+
post?: boolean;
|
|
48
|
+
};
|
|
26
49
|
/** Commands the person has approved in advance, matched exactly.
|
|
27
50
|
*
|
|
28
51
|
* The one thing a run with nobody watching cannot otherwise do is verify its
|
|
@@ -35,6 +58,8 @@ export interface SessionOptions {
|
|
|
35
58
|
* Ids only: the server holds the text for half an hour and nothing here has
|
|
36
59
|
* ever seen the contents. */
|
|
37
60
|
attachmentIds?: string[];
|
|
61
|
+
/** Files named that could not be attached. Names only (manual 3.10). */
|
|
62
|
+
leftOut?: string[];
|
|
38
63
|
/** Nobody is at the keyboard. Approvals cannot be asked for, so the
|
|
39
64
|
* permission mode has to have settled them in advance. */
|
|
40
65
|
headless?: boolean;
|
|
@@ -47,6 +72,10 @@ export interface SessionOptions {
|
|
|
47
72
|
* process owns the keyboard and lends it here. Absent, this class opens its
|
|
48
73
|
* own reader as before, which is the standalone command's case. */
|
|
49
74
|
confirm?: (question: string) => Promise<boolean>;
|
|
75
|
+
/** Ask the person for a line of text on the same lent keyboard: the plan
|
|
76
|
+
* question and the agent's questions (manual 4.2, 4.3). Resolves null when
|
|
77
|
+
* the person pressed Ctrl+C, which stops the job. */
|
|
78
|
+
prompt?: (question: string) => Promise<string | null>;
|
|
50
79
|
/** Continue a job that already exists, rather than starting one. */
|
|
51
80
|
resumeJobId?: string;
|
|
52
81
|
/** The job this question follows on from. The server loads that job's
|
|
@@ -55,6 +84,27 @@ export interface SessionOptions {
|
|
|
55
84
|
continuesJob?: string;
|
|
56
85
|
/** Go without the code map for this job. See `command.ts`. */
|
|
57
86
|
withoutMap?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Which conversation this job belongs to.
|
|
89
|
+
*
|
|
90
|
+
* Sent because the server cannot work it out. With no conversation id it
|
|
91
|
+
* files the work under a person's DAY on one client, so three separate
|
|
92
|
+
* sessions in one afternoon were stored as one row called "cli, 2026-09-21"
|
|
93
|
+
* and the terminal's own session list disagreed with the Sessions screen.
|
|
94
|
+
* The terminal has always known which session it was in; it simply never
|
|
95
|
+
* said.
|
|
96
|
+
*/
|
|
97
|
+
conversationId?: string;
|
|
98
|
+
/** `--max-minutes` (manual 10.7), held by the service. */
|
|
99
|
+
maxMinutes?: number;
|
|
100
|
+
/** `--schema`, `--config`, `--no-personal` (manual 10.5, 10.8), sent as read. */
|
|
101
|
+
answerSchema?: Record<string, unknown>;
|
|
102
|
+
settingsConfig?: Record<string, unknown>;
|
|
103
|
+
noPersonal?: boolean;
|
|
104
|
+
/** A queued job this run carries out (manual 10.17 to 10.19). */
|
|
105
|
+
queuedJob?: string;
|
|
106
|
+
/** `--output stream`: handed the service's stream lines as they arrive. */
|
|
107
|
+
onStream?: (items: Array<Record<string, unknown>>) => void;
|
|
58
108
|
}
|
|
59
109
|
export interface JobResult {
|
|
60
110
|
outcome: string;
|
|
@@ -72,15 +122,44 @@ export interface JobResult {
|
|
|
72
122
|
* model and the arithmetic are all on the server, so a client that wrote its
|
|
73
123
|
* own wording would be a second answer to the same question. */
|
|
74
124
|
receipt: string;
|
|
125
|
+
/** The receipt card, worded by the server. Drawn as sent. */
|
|
126
|
+
card?: ui.ReceiptCard | null;
|
|
75
127
|
/** Which models did the work, and each one's share, as the server reported
|
|
76
128
|
* it. Taken as sent, never recalculated here. */
|
|
77
129
|
models: ui.ModelShare[];
|
|
78
130
|
text: string;
|
|
79
131
|
testsPassed?: boolean;
|
|
132
|
+
/** How the job ended, in the service's words (manual 5.15): the first line,
|
|
133
|
+
* the proof lines and the exit status. Absent from an older service. */
|
|
134
|
+
ending?: {
|
|
135
|
+
line: string | null;
|
|
136
|
+
proof: string[];
|
|
137
|
+
exit: number | null;
|
|
138
|
+
reason?: string;
|
|
139
|
+
};
|
|
140
|
+
/** The result object a script reads (manual 10.3), exactly as the service
|
|
141
|
+
* built it. Printed with --output json; never assembled here. */
|
|
142
|
+
result?: Record<string, unknown>;
|
|
143
|
+
/** Reason word to exit number, as the service sent it (Appendix B). */
|
|
144
|
+
exitStatus?: Record<string, number>;
|
|
145
|
+
/** Why the job was refused before it started, as a reason word: the
|
|
146
|
+
* service's own, or what the reply showed (no sign in, no connection). */
|
|
147
|
+
refusalReason?: string;
|
|
80
148
|
/** Share of everything the job sent that the provider served from cache. */
|
|
81
149
|
reusedPct?: number | null;
|
|
150
|
+
/** The agent's checklist as it ended (manual 4.4). */
|
|
151
|
+
todos: Array<{
|
|
152
|
+
content: string;
|
|
153
|
+
status: string;
|
|
154
|
+
}>;
|
|
155
|
+
/** The full reason for the last step's model, for `why` (manual 4.16). */
|
|
156
|
+
why?: string[];
|
|
157
|
+
/** Notes typed after the last step, to be sent as new requests (6.8). */
|
|
158
|
+
lateNotes: string[];
|
|
82
159
|
}
|
|
83
160
|
export declare class TerminalSession {
|
|
161
|
+
/** The VS Code window this terminal is inside, when there is one (VS Code manual 9.12). */
|
|
162
|
+
private editor;
|
|
84
163
|
private socket;
|
|
85
164
|
private readonly executor;
|
|
86
165
|
private readonly opts;
|
|
@@ -92,6 +171,15 @@ export declare class TerminalSession {
|
|
|
92
171
|
* with nothing between the copies. */
|
|
93
172
|
private lastSaid;
|
|
94
173
|
private canceled;
|
|
174
|
+
/** The live "thinking 12s" line while the model works on a step. Drawn in
|
|
175
|
+
* place and erased before anything else prints, so it never lands in the
|
|
176
|
+
* answer. Without it a step is a blank screen for as long as the model takes,
|
|
177
|
+
* and "thinking" and "hung" look identical. */
|
|
178
|
+
private working;
|
|
179
|
+
/** When the current wait began, kept across the line being redrawn. Cleared
|
|
180
|
+
* when a step finishes, so the next step counts from its own start. */
|
|
181
|
+
private workFrom;
|
|
182
|
+
private readonly write;
|
|
95
183
|
constructor(opts: SessionOptions, write?: (s: string) => void);
|
|
96
184
|
/** Where the socket lives, derived from the workspace URL.
|
|
97
185
|
*
|
|
@@ -122,8 +210,13 @@ export declare class TerminalSession {
|
|
|
122
210
|
* the run frame already sends as the workspace. One expression, so the map
|
|
123
211
|
* and the job record can never be about two different projects. */
|
|
124
212
|
private project;
|
|
213
|
+
/** Connections lost during this job, so reconnecting gives up in the end. */
|
|
214
|
+
private drops;
|
|
125
215
|
/** Why the one service would not start this job, in its own words. */
|
|
126
216
|
private refusal;
|
|
217
|
+
private refusalReason;
|
|
218
|
+
private refusalResult;
|
|
219
|
+
private refusalTable;
|
|
127
220
|
/** The workspace does not carry the permission question yet, so fall back. */
|
|
128
221
|
private olderWorkspace;
|
|
129
222
|
/** Set while one is actually running, so two never overlap. */
|
|
@@ -152,11 +245,68 @@ export declare class TerminalSession {
|
|
|
152
245
|
private remap;
|
|
153
246
|
/** Run one request to its end. Resolves with how it went. */
|
|
154
247
|
run(request: string): Promise<JobResult>;
|
|
155
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* A pass to rejoin this job after a dropped connection, trying for about
|
|
250
|
+
* half a minute, inside the service's window (manual 8.9). Null when the
|
|
251
|
+
* service could not be reached again, or refused.
|
|
252
|
+
*/
|
|
253
|
+
private reconnect;
|
|
254
|
+
/** Stop the running job. Takes effect mid action, not at the end of the run:
|
|
255
|
+
* a command already running on this machine is stopped too (manual 6.7). */
|
|
156
256
|
cancel(): void;
|
|
157
|
-
/** Something typed while it works. Joins the conversation at the next step
|
|
257
|
+
/** Something typed while it works. Joins the conversation at the next step;
|
|
258
|
+
* the service says so in the `note` event it sends back (6.8). */
|
|
158
259
|
steer(text: string): void;
|
|
260
|
+
/** Esc: finish the current action, then wait (manual 6.7). */
|
|
261
|
+
pause(): void;
|
|
262
|
+
/** Carry on after Esc, with a correction or without one. */
|
|
263
|
+
carryOn(text: string): void;
|
|
264
|
+
/** This job's id, once the service has issued it (`transcript`, 6.9). */
|
|
265
|
+
jobId: string | undefined;
|
|
266
|
+
/** Set from Esc until the job carries on or stops. */
|
|
267
|
+
paused: boolean;
|
|
268
|
+
/** Helpers running now, from the service's own events (manual 5.25). */
|
|
269
|
+
readonly helpers: Map<string, {
|
|
270
|
+
id: string;
|
|
271
|
+
question: string;
|
|
272
|
+
agent?: string | null;
|
|
273
|
+
}>;
|
|
274
|
+
/** `stop h2` (5.25): the service stops that one helper. */
|
|
275
|
+
stopHelper(id: string): void;
|
|
276
|
+
/** `queue` and `queue clear` (6.8): the service answers with the notes. */
|
|
277
|
+
queue(clear: boolean): void;
|
|
278
|
+
/** Ctrl+O: each action's full input and output, or the short line (6.9). */
|
|
279
|
+
full: boolean;
|
|
159
280
|
private announce;
|
|
281
|
+
/** The allowance and plan notes, printed under the first line so it stays first. */
|
|
282
|
+
private allowanceLine;
|
|
283
|
+
/** A running command's output on screen (manual 5.12): the first lines as
|
|
284
|
+
* they arrive, then held, and at the end either the rest or the last lines
|
|
285
|
+
* with a count of what was left out. How many is the service's number. */
|
|
286
|
+
private screen;
|
|
287
|
+
private stream;
|
|
288
|
+
private flushScreen;
|
|
289
|
+
/** Changes already put in front of the person to approve, so they are not
|
|
290
|
+
* shown twice. Every other change is shown as it is made (5.6 to 5.8). */
|
|
291
|
+
private asked;
|
|
292
|
+
/** The sandbox this machine offers, worked out once (manual 4.12). */
|
|
293
|
+
private sandboxChecked;
|
|
294
|
+
private sandboxSystem;
|
|
295
|
+
/** The full reason for the last step, as the service wrote it (4.16). */
|
|
296
|
+
lastWhy: string[];
|
|
297
|
+
/** An unattended run refused an action that needed approval (Appendix B, 4). */
|
|
298
|
+
refusedUnattended: boolean;
|
|
299
|
+
/** Approved actions by call, and what exactly was approved (manual 4.8). */
|
|
300
|
+
private approvedCalls;
|
|
301
|
+
/** Approvals waiting here that the browser may answer first (web manual 6.15). */
|
|
302
|
+
private answeredElsewhere;
|
|
303
|
+
/** An action as approved: its name, its arguments and the real folder it
|
|
304
|
+
* runs in, so a changed argument or a moved folder is caught. */
|
|
305
|
+
private fingerprint;
|
|
306
|
+
/** Starts the working line with the service's own words. Only on a real
|
|
307
|
+
* terminal: a piped or unattended run gets the answer and nothing else. */
|
|
308
|
+
private startWorking;
|
|
309
|
+
private stopWorking;
|
|
160
310
|
private narrate;
|
|
161
311
|
private targetOf;
|
|
162
312
|
/** Put a change in front of the person and wait.
|
|
@@ -171,5 +321,9 @@ export declare class TerminalSession {
|
|
|
171
321
|
* a script that needs to change files says so by choosing a mode that allows
|
|
172
322
|
* it, up front. */
|
|
173
323
|
private ask;
|
|
324
|
+
/** The plan question or one of the agent's questions (manual 4.2, 4.3).
|
|
325
|
+
* Returns what the person typed, or null for Ctrl+C. The meaning of the
|
|
326
|
+
* answer (y, n, a number, words) is decided by the service. */
|
|
327
|
+
private question;
|
|
174
328
|
private report;
|
|
175
329
|
}
|