@tsconfigdotjson/vibe-os 0.2.0 → 0.3.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/README.md +19 -847
- package/THIRD_PARTY_NOTICES.md +28 -0
- package/dist/web/assets/index-82MhMOB4.css +1 -0
- package/dist/web/assets/index-82MhMOB4.css.br +0 -0
- package/dist/web/assets/index-82MhMOB4.css.gz +0 -0
- package/dist/web/assets/index-DCB2nO0u.js +36 -0
- package/dist/web/assets/index-DCB2nO0u.js.br +0 -0
- package/dist/web/assets/index-DCB2nO0u.js.gz +0 -0
- package/dist/web/index.html +2 -2
- package/package.json +2 -1
- package/scripts/notices.ts +3 -1
- package/server/api.ts +449 -20
- package/server/assets.generated.ts +13 -13
- package/server/attach.ts +65 -16
- package/server/browser.ts +1 -65
- package/server/cli.ts +48 -150
- package/server/client.ts +440 -0
- package/server/config.ts +64 -2
- package/server/db.ts +19 -0
- package/server/doctor.ts +176 -123
- package/server/harness.ts +378 -590
- package/server/harnesses/claude.ts +248 -0
- package/server/harnesses/codex.ts +241 -0
- package/server/harnesses/cursor.ts +202 -0
- package/server/harnesses/hermes.ts +259 -0
- package/server/harnesses/util.ts +181 -0
- package/server/headless.ts +358 -0
- package/server/index.ts +47 -14
- package/server/memory.ts +418 -0
- package/server/profiles.ts +27 -15
- package/server/projects.ts +52 -3
- package/server/reaper.ts +5 -3
- package/server/screens.ts +372 -0
- package/server/session.ts +84 -95
- package/server/setup.ts +73 -7
- package/server/windows.ts +51 -1
- package/shared/blanks.ts +113 -0
- package/shared/harness.ts +375 -0
- package/shared/wire.ts +105 -94
- package/dist/web/assets/index-B77Qk8B5.js +0 -35
- package/dist/web/assets/index-B77Qk8B5.js.br +0 -0
- package/dist/web/assets/index-B77Qk8B5.js.gz +0 -0
- package/dist/web/assets/index-CH5Em-Mo.css +0 -1
- package/dist/web/assets/index-CH5Em-Mo.css.br +0 -0
- package/dist/web/assets/index-CH5Em-Mo.css.gz +0 -0
package/shared/wire.ts
CHANGED
|
@@ -10,13 +10,25 @@
|
|
|
10
10
|
* Types only, deliberately. Every import of this file is an `import type` and
|
|
11
11
|
* erases at build time, so nothing here has to be packaged, compiled into the
|
|
12
12
|
* standalone binary, or resolved at runtime by either side. Runtime values that
|
|
13
|
-
* happen to describe the same things — `PALETTE`,
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* happen to describe the same things — `PALETTE`, the harness specs — stay on
|
|
14
|
+
* the server, where they are used, and are shipped to the browser as data
|
|
15
|
+
* rather than duplicated as a second literal.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Which program a profile launches: a harness id from `GET /api/harnesses`,
|
|
20
|
+
* or `shell` or `custom`.
|
|
21
|
+
*/
|
|
22
|
+
export type Harness = string;
|
|
23
|
+
|
|
24
|
+
export type {
|
|
25
|
+
ChoiceOption,
|
|
26
|
+
Field,
|
|
27
|
+
FlagSettings,
|
|
28
|
+
HarnessReport,
|
|
29
|
+
HarnessSpec,
|
|
30
|
+
McpMode,
|
|
31
|
+
} from "./harness";
|
|
20
32
|
|
|
21
33
|
/** Whether a window has been handed off to a real terminal. */
|
|
22
34
|
export type Handoff = "ssh" | null;
|
|
@@ -45,99 +57,29 @@ export interface ClientConfig {
|
|
|
45
57
|
themeColor: string;
|
|
46
58
|
/** Colour tokens a profile may use; `--profile-<token>` resolves each one. */
|
|
47
59
|
palette: readonly string[];
|
|
60
|
+
/** The scope limits a window gets when its profile sets none. */
|
|
61
|
+
memory: { high: string | null; max: string | null; swapMax: string | null };
|
|
48
62
|
}
|
|
49
63
|
|
|
50
|
-
/** `GET /api/
|
|
51
|
-
export interface
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
/** `GET /api/workspaces/:id/memory` — what the box has and each window costs. */
|
|
65
|
+
export interface MemoryReport {
|
|
66
|
+
box: {
|
|
67
|
+
total: number;
|
|
68
|
+
available: number;
|
|
69
|
+
swapTotal: number;
|
|
70
|
+
swapFree: number;
|
|
71
|
+
pressure: { some10: number; full10: number } | null;
|
|
72
|
+
} | null;
|
|
54
73
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* These are the right default for a profile precisely because they do not
|
|
58
|
-
* pin: a role called "Backend Manager" wants the best Opus, not the one that
|
|
59
|
-
* was current the day it was written.
|
|
74
|
+
* What opening another agent would be warned with right now, or null when
|
|
75
|
+
* there is room. The dock shows it, so it never disagrees with the question.
|
|
60
76
|
*/
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
effortLevels: string[];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Where Hermes' browser tools will land, and whether they will be the good ones.
|
|
72
|
-
*
|
|
73
|
-
* Hermes takes its CDP target from `browser.cdp_url` in `~/.hermes/config.yaml`
|
|
74
|
-
* and offers no per-invocation flag for it, so this is a property of the box
|
|
75
|
-
* rather than of a profile. The editor reads it to say which browser a role will
|
|
76
|
-
* drive instead of implying a choice it does not have.
|
|
77
|
-
*/
|
|
78
|
-
export interface HermesBrowser {
|
|
79
|
-
/** `browser.cdp_url` as configured, or null when nothing is set. */
|
|
80
|
-
cdpUrl: string | null;
|
|
81
|
-
/** `browser.backend`, or null when unset, which means Browser Use mode. */
|
|
82
|
-
backend: string | null;
|
|
83
|
-
/** The port the installed Chrome unit actually opened, when there is one. */
|
|
84
|
-
cdpPort: number | null;
|
|
85
|
-
/** Whether `cdpUrl` names that port. False is the whole reason this exists. */
|
|
86
|
-
connected: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Whether the `browser-use` CLI could run, directly or through `uvx`.
|
|
89
|
-
*
|
|
90
|
-
* Without it Hermes quietly keeps its twelve built-in browser tools, which
|
|
91
|
-
* works but costs the token saving that Browser Use mode is for.
|
|
92
|
-
*/
|
|
93
|
-
browserUse: boolean;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/** `GET /api/harness/hermes` — what the installed Hermes CLI is set up for. */
|
|
97
|
-
export interface HermesInfo {
|
|
98
|
-
available: boolean;
|
|
99
|
-
version: string | null;
|
|
100
|
-
/**
|
|
101
|
-
* Providers to offer in the datalist.
|
|
102
|
-
*
|
|
103
|
-
* A floor of the ones Hermes ships support for, merged with whatever its own
|
|
104
|
-
* config reports. `hermes model` is an interactive wizard with no listing
|
|
105
|
-
* mode, so unlike the Claude harness there is nothing authoritative to read.
|
|
106
|
-
*/
|
|
107
|
-
providers: string[];
|
|
108
|
-
/** The provider `hermes chat` would use with no `--provider`, if readable. */
|
|
109
|
-
defaultProvider: string | null;
|
|
110
|
-
/** The model `hermes chat` would use with no `--model`, if readable. */
|
|
111
|
-
defaultModel: string | null;
|
|
112
|
-
/** Values `--reasoning` accepts, weakest first — the order is the scale. */
|
|
113
|
-
reasoningLevels: string[];
|
|
114
|
-
browser: HermesBrowser;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** `GET /api/harness/cursor` — what the installed Cursor CLI is set up for. */
|
|
118
|
-
export interface CursorInfo {
|
|
119
|
-
available: boolean;
|
|
120
|
-
version: string | null;
|
|
121
|
-
/**
|
|
122
|
-
* Model ids `cursor-agent models` reports, in the order it printed them.
|
|
123
|
-
*
|
|
124
|
-
* Unlike Hermes, Cursor has a real listing mode — but the list is the
|
|
125
|
-
* account's, not the binary's: it needs a login and sometimes the network,
|
|
126
|
-
* so an empty list means "could not read", never "no models exist". The
|
|
127
|
-
* editor keeps the field free text with these as suggestions.
|
|
128
|
-
*/
|
|
129
|
-
models: string[];
|
|
130
|
-
/** The model `models` marked as current, when it marked one. */
|
|
131
|
-
defaultModel: string | null;
|
|
132
|
-
/**
|
|
133
|
-
* Whether `cursor-agent status` says someone is logged in.
|
|
134
|
-
*
|
|
135
|
-
* Three-valued on purpose: null is "could not tell", which covers a status
|
|
136
|
-
* output this build cannot read as well as a command that failed to run.
|
|
137
|
-
* Only a definite false is worth warning about — a profile launched while
|
|
138
|
-
* logged out opens a window that sits at the login prompt.
|
|
139
|
-
*/
|
|
140
|
-
loggedIn: boolean | null;
|
|
77
|
+
warning: string | null;
|
|
78
|
+
/** Keyed by window id. A window with no live session is absent. */
|
|
79
|
+
windows: Record<
|
|
80
|
+
string,
|
|
81
|
+
{ bytes: number; high: number | null; max: number | null; scoped: boolean }
|
|
82
|
+
>;
|
|
141
83
|
}
|
|
142
84
|
|
|
143
85
|
/**
|
|
@@ -204,6 +146,9 @@ export interface Profile {
|
|
|
204
146
|
/** argv tokens, already split and validated by the server. */
|
|
205
147
|
args: string[];
|
|
206
148
|
prompt: string;
|
|
149
|
+
/** systemd sizes (`2G`, `40%`, `infinity`), or null for the server default. */
|
|
150
|
+
memoryHigh: string | null;
|
|
151
|
+
memoryMax: string | null;
|
|
207
152
|
position: number;
|
|
208
153
|
createdAt: number;
|
|
209
154
|
}
|
|
@@ -222,5 +167,71 @@ export interface ProfileInput {
|
|
|
222
167
|
command?: string | null;
|
|
223
168
|
args?: string;
|
|
224
169
|
prompt?: string;
|
|
170
|
+
/** Empty or null goes back to the server default. */
|
|
171
|
+
memoryHigh?: string | null;
|
|
172
|
+
memoryMax?: string | null;
|
|
225
173
|
position?: number;
|
|
226
174
|
}
|
|
175
|
+
|
|
176
|
+
/** `GET /api/workspaces` — every workspace on the box, with its project. */
|
|
177
|
+
export interface WorkspaceSummary {
|
|
178
|
+
id: string;
|
|
179
|
+
name: string;
|
|
180
|
+
branch: string;
|
|
181
|
+
path: string;
|
|
182
|
+
projectId: string;
|
|
183
|
+
project: string;
|
|
184
|
+
lastOpenedAt: number;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** `GET /api/windows` — every window on the box, and whether it is running. */
|
|
188
|
+
export interface WindowSummary {
|
|
189
|
+
id: string;
|
|
190
|
+
/** What `vibe-os attach` takes: `quiet-amber-otter-1`. */
|
|
191
|
+
ref: string;
|
|
192
|
+
session: string;
|
|
193
|
+
workspace: string;
|
|
194
|
+
project: string;
|
|
195
|
+
/** The profile it was opened as, or null for a plain terminal. */
|
|
196
|
+
role: string | null;
|
|
197
|
+
/** Its session is running. Always false with `--no-sessions`. */
|
|
198
|
+
live: boolean;
|
|
199
|
+
/** What the program in it is doing. Null when it is not running. */
|
|
200
|
+
state: Activity | null;
|
|
201
|
+
/** When it last drew anything, in ms since the epoch, if seen since the server started. */
|
|
202
|
+
lastOutputAt: number | null;
|
|
203
|
+
/** The caller's own tag for the window, set when it was opened. */
|
|
204
|
+
label: string | null;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* What the program in a window is doing.
|
|
209
|
+
*
|
|
210
|
+
* `busy` is drawing right now, `question` is stopped on a dialog or a yes/no
|
|
211
|
+
* question, and `idle` is quiet at its prompt or finished.
|
|
212
|
+
*/
|
|
213
|
+
export type Activity = "busy" | "idle" | "question";
|
|
214
|
+
|
|
215
|
+
/** `POST /api/windows/:id/send` */
|
|
216
|
+
export interface SendInput {
|
|
217
|
+
/** The text to paste. Absent means the window's profile prompt. */
|
|
218
|
+
text?: string;
|
|
219
|
+
/** Values for the profile prompt's `{{blanks}}`, by label. */
|
|
220
|
+
blanks?: Record<string, string>;
|
|
221
|
+
/** Press Enter after the paste. */
|
|
222
|
+
submit?: boolean;
|
|
223
|
+
/** Paste even when the window is stopped on a question. */
|
|
224
|
+
force?: boolean;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** What a send did. */
|
|
228
|
+
export interface SendResult {
|
|
229
|
+
/** The session was started for this send. */
|
|
230
|
+
started: boolean;
|
|
231
|
+
/** The text went in and the window drew it. */
|
|
232
|
+
delivered: boolean;
|
|
233
|
+
/** What the window was doing when the text went in, or why it did not. */
|
|
234
|
+
state: Activity;
|
|
235
|
+
/** Why it was not delivered. */
|
|
236
|
+
reason?: string;
|
|
237
|
+
}
|