@prismshadow/penguin-server 0.2.17 → 0.2.18
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/dist/api/types.d.ts +181 -17
- package/dist/api/types.js +9 -1
- package/dist/auth-token.js +1 -1
- package/dist/{chunk-HPOHMZCH.js → chunk-5YLLSHY3.js} +61 -2
- package/dist/chunk-5YLLSHY3.js.map +1 -0
- package/dist/{chunk-D3JNA6ZI.js → chunk-B3PSKR3D.js} +2 -2
- package/dist/chunk-B3PSKR3D.js.map +1 -0
- package/dist/{chunk-HDBZRVA5.js → chunk-BRMNPLU6.js} +9 -1
- package/dist/chunk-BRMNPLU6.js.map +1 -0
- package/dist/index.js +8331 -6769
- package/dist/index.js.map +1 -1
- package/dist/machine-status.js +1 -1
- package/dist/plugin/index.d.ts +57 -16
- package/dist/reset-admin-password.js +2 -2
- package/package.json +4 -4
- package/web-dist/assets/{abnfDiagram-VCTEODGH-DMzkb4l4.js → abnfDiagram-VCTEODGH-C_Ej4MyZ.js} +1 -1
- package/web-dist/assets/{addon-clipboard-BtD2BVSi.js → addon-clipboard-eONBCa8x.js} +1 -1
- package/web-dist/assets/{addon-fit-Dr6HWsi_.js → addon-fit-Dk6bkT8u.js} +1 -1
- package/web-dist/assets/{addon-web-links-VEE3YLzQ.js → addon-web-links-e0JpGvGv.js} +1 -1
- package/web-dist/assets/{arc-CvMPOU_B.js → arc-ytwqobEL.js} +1 -1
- package/web-dist/assets/{architectureDiagram-5GKGNRK7-Bk65mIBz.js → architectureDiagram-5GKGNRK7-oxT9SNOE.js} +1 -1
- package/web-dist/assets/{blockDiagram-I7D4REHJ-D54-XSNs.js → blockDiagram-I7D4REHJ-D8OXfpb9.js} +1 -1
- package/web-dist/assets/{c4Diagram-7LVT6UL2-Dm954LSt.js → c4Diagram-7LVT6UL2-BNYNzSWK.js} +1 -1
- package/web-dist/assets/channel-7Be_pU-b.js +1 -0
- package/web-dist/assets/{chunk-2Q5K7J3B-D_LJ_7Cn.js → chunk-2Q5K7J3B-C2yNhFmh.js} +1 -1
- package/web-dist/assets/{chunk-5VM5RSS4-B8RI4tl3.js → chunk-5VM5RSS4-CAeuhwbB.js} +1 -1
- package/web-dist/assets/{chunk-F27PBJKO-aVSYH9JV.js → chunk-F27PBJKO-DSuRiLxP.js} +1 -1
- package/web-dist/assets/{chunk-IMKFNOWR-DnkdWeq2.js → chunk-IMKFNOWR-MStar4cf.js} +1 -1
- package/web-dist/assets/{chunk-JWPE2WC7-C2pJzKuW.js → chunk-JWPE2WC7-CIgQwRv4.js} +1 -1
- package/web-dist/assets/{chunk-POPQ4Y6H-Bx7Iikzx.js → chunk-POPQ4Y6H-CA8evx9g.js} +1 -1
- package/web-dist/assets/{chunk-SVP7TREG-qJC2SMqr.js → chunk-SVP7TREG-bR7-FT1W.js} +1 -1
- package/web-dist/assets/{chunk-TICWLB2K-Crl_BgKI.js → chunk-TICWLB2K-C0ZdCnvI.js} +1 -1
- package/web-dist/assets/{chunk-XXDRQBXY-BFFemuGm.js → chunk-XXDRQBXY-CzozFLFI.js} +1 -1
- package/web-dist/assets/classDiagram-ZZMXUADV-BjVhvDIH.js +1 -0
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-BjVhvDIH.js +1 -0
- package/web-dist/assets/{cose-bilkent-JH36ORCC-Bmh2Kx7h.js → cose-bilkent-JH36ORCC-nkjrY6eI.js} +1 -1
- package/web-dist/assets/{cynefin-OW5HDTMX-BveNWnUV.js → cynefin-OW5HDTMX-D2A0h062.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-5FMLGOSQ-85itazbJ.js → cynefinDiagram-5FMLGOSQ-DFZQ7d_T.js} +1 -1
- package/web-dist/assets/{dagre-GXQ25YYZ-DIZT-KY_.js → dagre-GXQ25YYZ-DPYLLARd.js} +1 -1
- package/web-dist/assets/{diagram-S7CK7UJ4-Dum-g63f.js → diagram-S7CK7UJ4-B204Nrur.js} +1 -1
- package/web-dist/assets/{diagram-UQ7AKVKN-DallMKJl.js → diagram-UQ7AKVKN-DWORCZlS.js} +1 -1
- package/web-dist/assets/{diagram-VSXAHHWV-DWELqxfN.js → diagram-VSXAHHWV-Su6Bzm4Z.js} +1 -1
- package/web-dist/assets/{diagram-VX7I27RA-BNs0gB9E.js → diagram-VX7I27RA-B4p8ssYj.js} +1 -1
- package/web-dist/assets/{diagram-Z3DM3KII-C9mF9xAd.js → diagram-Z3DM3KII-BgMz7jjW.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-PWID7BFC-D_Diy9HH.js → ebnfDiagram-PWID7BFC-DBCS3Cwc.js} +1 -1
- package/web-dist/assets/{erDiagram-RLTQ6QDP-4QTS5VIh.js → erDiagram-RLTQ6QDP-DEm39S5C.js} +1 -1
- package/web-dist/assets/{flowDiagram-HODETNUW-CliTRrtV.js → flowDiagram-HODETNUW-CEUQGUza.js} +1 -1
- package/web-dist/assets/{ganttDiagram-EL5Y4UJY-DCRd-Ss4.js → ganttDiagram-EL5Y4UJY-myYTgwFp.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-WWUBYQGX-CTz13GjS.js → gitGraphDiagram-WWUBYQGX-BAQ0Kl1C.js} +1 -1
- package/web-dist/assets/{highlighter-BScH1Ud3.js → highlighter-DRTMVWxI.js} +2 -2
- package/web-dist/assets/{highlighter-core-DKz8Z6-I.js → highlighter-core-DgISzHrX.js} +1 -1
- package/web-dist/assets/index-PA-IFoA6.js +1300 -0
- package/web-dist/assets/index-oCEyg9BT.css +1 -0
- package/web-dist/assets/{infoDiagram-27XIBGKW-DNfTEPAV.js → infoDiagram-27XIBGKW-B2WDMvX9.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-5VMMS53U-B7aCjjG1.js → ishikawaDiagram-5VMMS53U-8qHTttjq.js} +1 -1
- package/web-dist/assets/{journeyDiagram-3NMN7TZE-COmDALVr.js → journeyDiagram-3NMN7TZE-DKE_xRCO.js} +1 -1
- package/web-dist/assets/{kanban-definition-UXKFOSKX-BzUfPINh.js → kanban-definition-UXKFOSKX-EnJbHEmV.js} +1 -1
- package/web-dist/assets/{layout-BwzuPU4M.js → layout-BlhCFmEZ.js} +1 -1
- package/web-dist/assets/{linear-WPZTYjz3.js → linear-Dw2VzU-D.js} +1 -1
- package/web-dist/assets/{mermaid.core-zKzlwpkw.js → mermaid.core-CaXNMz57.js} +6 -6
- package/web-dist/assets/{mindmap-definition-YA3MSWOX-DCRg7eAx.js → mindmap-definition-YA3MSWOX-DnTTfqbu.js} +1 -1
- package/web-dist/assets/{pegDiagram-XKGWAZYB-DyphzDLU.js → pegDiagram-XKGWAZYB-C3SArVd6.js} +1 -1
- package/web-dist/assets/{pieDiagram-E7YTZNPT-BI5DueGA.js → pieDiagram-E7YTZNPT-CTOmO6ke.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-AXDQQJYC-GZxSMY2Z.js → quadrantDiagram-AXDQQJYC-CbUsMwzO.js} +1 -1
- package/web-dist/assets/{railroadDiagram-O6MQD6OU-DEFCigBf.js → railroadDiagram-O6MQD6OU-Co2hsvaZ.js} +1 -1
- package/web-dist/assets/{requirementDiagram-BXWQKSXE-Br0thc4j.js → requirementDiagram-BXWQKSXE-BqFG0eYQ.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-P5KCCOFB-DYf0pY67.js → sankeyDiagram-P5KCCOFB-YgQHJlB7.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-WJ2MYXX4-1EFMboX4.js → sequenceDiagram-WJ2MYXX4-CdDrP6O2.js} +1 -1
- package/web-dist/assets/{sizeCapture-INFHLROL-BuOFv-5q.js → sizeCapture-INFHLROL-CKwbEVhU.js} +1 -1
- package/web-dist/assets/{stateDiagram-D77RDMKH-Bg3H1tjX.js → stateDiagram-D77RDMKH-kTJR3t2p.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-DzaSnZwj.js +1 -0
- package/web-dist/assets/{swimlanes-42K2YHIH-BuOa6Osb.js → swimlanes-42K2YHIH-DCAO3rCQ.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-DNfCLejq.js +8 -0
- package/web-dist/assets/{timeline-definition-24CTP7MA-BDekfdDT.js → timeline-definition-24CTP7MA-DEjnyzKw.js} +1 -1
- package/web-dist/assets/{vennDiagram-4TSXK5OY-DnC09UI4.js → vennDiagram-4TSXK5OY-DSihUvCq.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-VM6X3IG4-BXKvxuZQ.js → wardleyDiagram-VM6X3IG4-CnAoMeCH.js} +1 -1
- package/web-dist/assets/{xterm-oY4DYg5s.js → xterm-3JwPT74G.js} +1 -1
- package/web-dist/assets/{xychartDiagram-S5SC5T6Z-DdDC1VLb.js → xychartDiagram-S5SC5T6Z-43dHqZTr.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/workbench-ui.css +164 -34
- package/dist/chunk-D3JNA6ZI.js.map +0 -1
- package/dist/chunk-HDBZRVA5.js.map +0 -1
- package/dist/chunk-HPOHMZCH.js.map +0 -1
- package/web-dist/assets/channel-CVHI75kz.js +0 -1
- package/web-dist/assets/classDiagram-ZZMXUADV-CBdzAPFu.js +0 -1
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-CBdzAPFu.js +0 -1
- package/web-dist/assets/index-BUvJ5Ctt.js +0 -1299
- package/web-dist/assets/index-DRj7nvPY.css +0 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-DfaDaPAd.js +0 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-BopAC7b8.js +0 -8
package/dist/api/types.d.ts
CHANGED
|
@@ -42,6 +42,27 @@ interface WorkbenchResponse {
|
|
|
42
42
|
*/
|
|
43
43
|
stream?: AsyncIterable<Uint8Array | string>;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* One AMSP record as `WorkbenchHost.subscribe` hands it over: the envelope every Trace line and
|
|
47
|
+
* every unnamed event of a Session's stream is. `type` is `session_meta`, `model_msg` or
|
|
48
|
+
* `event_msg`; `payload.type` names the record (`task_begin`, `partial_text`, `tool_call`,
|
|
49
|
+
* `task_end`, …; a `session_meta` payload has none); `origin` is the chain of child Session ids
|
|
50
|
+
* a subagent's record came through, outer to inner, and is absent on the main Session's own.
|
|
51
|
+
*
|
|
52
|
+
* Typed by its envelope rather than by every payload AMSP defines: a workbench keeps the types
|
|
53
|
+
* it was written against (`.harness/`), and a record type that grew with each new payload would
|
|
54
|
+
* stop fitting them.
|
|
55
|
+
*/
|
|
56
|
+
interface WorkbenchRecord {
|
|
57
|
+
/** ISO 8601 UTC. */
|
|
58
|
+
timestamp: string;
|
|
59
|
+
type: string;
|
|
60
|
+
payload: {
|
|
61
|
+
type?: string;
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
origin?: string[];
|
|
65
|
+
}
|
|
45
66
|
/** How the Web App draws a contributed tab: a page of the workbench, or a renderer it carries. */
|
|
46
67
|
type WorkbenchTabRenderer = {
|
|
47
68
|
iframe: {
|
|
@@ -204,11 +225,11 @@ interface MeResponse {
|
|
|
204
225
|
* "desktop" is the shell's own window (one-shot token); "setup" was claimed through the
|
|
205
226
|
* first-login link on a server whose admin password has never been set. Both may set a
|
|
206
227
|
* password without the old one (it is random and was never shown); only "desktop" opens
|
|
207
|
-
* desktop-only routes. "
|
|
208
|
-
*
|
|
209
|
-
* sign-in.
|
|
228
|
+
* desktop-only routes. "remote" is the one-hour session Penguin Remote exchanged the local
|
|
229
|
+
* API token for; it counts as the person's sign-in. "token" marks the local API token itself,
|
|
230
|
+
* sent as a Bearer header; it cannot perform writes requiring a person's sign-in.
|
|
210
231
|
*/
|
|
211
|
-
sessionVia: "password" | "desktop" | "setup" | "token";
|
|
232
|
+
sessionVia: "password" | "desktop" | "setup" | "remote" | "token";
|
|
212
233
|
/**
|
|
213
234
|
* The upload limits currently in force, so the composer can refuse an oversize pick before
|
|
214
235
|
* reading it and can name the real number in the message. They are admin-settable and ride
|
|
@@ -485,8 +506,97 @@ interface UiPrefs {
|
|
|
485
506
|
* everywhere else.
|
|
486
507
|
*/
|
|
487
508
|
browserBackend?: BrowserBackend;
|
|
509
|
+
/** Light / dark / follow the system. */
|
|
510
|
+
themeMode?: string | null;
|
|
511
|
+
/** Which theme renders the app (a theme id). */
|
|
512
|
+
themeId?: string | null;
|
|
513
|
+
/** The accent preset, or "neutral" for the theme's own. */
|
|
514
|
+
accent?: string | null;
|
|
515
|
+
/** The root text size step. */
|
|
516
|
+
textSize?: string | null;
|
|
517
|
+
/** The Latin face paired over the theme's own ("theme" = keep the theme's). */
|
|
518
|
+
fontLatin?: string | null;
|
|
519
|
+
/** The CJK face paired over the theme's own ("theme" = keep the theme's). */
|
|
520
|
+
fontCjk?: string | null;
|
|
521
|
+
/** Interface language: zh / en / system. */
|
|
522
|
+
lang?: string | null;
|
|
523
|
+
/** Display currency for prices. */
|
|
524
|
+
currency?: string | null;
|
|
525
|
+
/** The terminal's appearance: light / dark / follow the app. */
|
|
526
|
+
terminalTheme?: string | null;
|
|
527
|
+
/** Whether tool cards name the built-in tools by their short alias. */
|
|
528
|
+
toolAliases?: boolean | null;
|
|
529
|
+
/** Whether task-completion notifications were asked for (each browser still needs its own OS permission). */
|
|
530
|
+
notifications?: boolean | null;
|
|
531
|
+
/** Whether the floating dock launcher was put away. */
|
|
532
|
+
launcherHidden?: boolean | null;
|
|
533
|
+
/** Mid-run send mode: steer or queue as a follow-up. */
|
|
534
|
+
steerMode?: string | null;
|
|
535
|
+
/** The custom background's display settings; the image itself is GET|PUT /api/me/background-image. */
|
|
536
|
+
background?: BackgroundSettingsDto | null;
|
|
537
|
+
/**
|
|
538
|
+
* Which background image the account holds, as an opaque id that changes whenever the image
|
|
539
|
+
* does; absent or null when it holds none. Written only by PUT /api/me/background-image (PUT
|
|
540
|
+
* /api/me/prefs refuses it): a browser compares it with the image it has cached and fetches the
|
|
541
|
+
* image only when they differ.
|
|
542
|
+
*/
|
|
543
|
+
backgroundImageId?: string | null;
|
|
488
544
|
[key: string]: unknown;
|
|
489
545
|
}
|
|
546
|
+
/** The custom background's display settings, as the Web App stores them. */
|
|
547
|
+
interface BackgroundSettingsDto {
|
|
548
|
+
/** 0–100: how much of the page colour shows through the image. */
|
|
549
|
+
transparency: number;
|
|
550
|
+
mode: string;
|
|
551
|
+
position: string;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* The background image cap, in characters of the data URL: the same number the Web App encodes
|
|
555
|
+
* against, so the browser and the server cannot disagree about what "too large" means.
|
|
556
|
+
*/
|
|
557
|
+
declare const BACKGROUND_IMAGE_MAX_CHARS: number;
|
|
558
|
+
/** GET /api/me/background-image. */
|
|
559
|
+
interface BackgroundImageResponse {
|
|
560
|
+
/** A PNG / JPEG / WebP data URL, or null when the account holds no image. */
|
|
561
|
+
image: string | null;
|
|
562
|
+
imageId: string | null;
|
|
563
|
+
}
|
|
564
|
+
/** PUT /api/me/background-image: the image to keep, or null to remove it. */
|
|
565
|
+
interface BackgroundImageRequest {
|
|
566
|
+
image: string | null;
|
|
567
|
+
}
|
|
568
|
+
/** PUT /api/me/background-image's answer: the id the image is now known by (null once removed). */
|
|
569
|
+
interface BackgroundImagePutResponse {
|
|
570
|
+
imageId: string | null;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* The kinds of draft the account keeps, as the first segment of a draft key
|
|
574
|
+
* (`<kind>:<id>`). The id names what the draft belongs to, so the server can drop it with that
|
|
575
|
+
* thing: `chat` — a Project's new-conversation draft (`chat:<projectId>`); `parked` — a
|
|
576
|
+
* Project's parked draft conversations (`parked:<projectId>`); `org` — a Project's
|
|
577
|
+
* create-organization form (`org:<projectId>`); `channel` — a company-mode channel's composer
|
|
578
|
+
* (`channel:<projectId>.<orgId>.<channelId>`); `session` — a Session's composer
|
|
579
|
+
* (`session:<sessionId>`); `a2ui` — a reply's form answers in progress
|
|
580
|
+
* (`a2ui:<sessionId>:<block>`).
|
|
581
|
+
*/
|
|
582
|
+
declare const DRAFT_KINDS: readonly ["chat", "parked", "org", "channel", "session", "a2ui"];
|
|
583
|
+
type DraftKind = (typeof DRAFT_KINDS)[number];
|
|
584
|
+
/** One draft's cap, in characters of its JSON text. */
|
|
585
|
+
declare const DRAFT_VALUE_MAX_CHARS: number;
|
|
586
|
+
/** Draft writes one PATCH may carry. */
|
|
587
|
+
declare const DRAFTS_PATCH_MAX_ENTRIES = 50;
|
|
588
|
+
/** GET /api/me/drafts: every draft the account keeps, by key, as the JSON each was written with. */
|
|
589
|
+
interface DraftsResponse {
|
|
590
|
+
drafts: Record<string, unknown>;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* PATCH /api/me/drafts: drafts to write, by key; `null` removes one. Applied together. When the
|
|
594
|
+
* account then holds more than its bound, its least recently written drafts outside this patch
|
|
595
|
+
* are dropped.
|
|
596
|
+
*/
|
|
597
|
+
interface DraftsPatchRequest {
|
|
598
|
+
drafts: Record<string, unknown>;
|
|
599
|
+
}
|
|
490
600
|
/** A group balance pinned beside the user name: which Project's key reads which group's balance. */
|
|
491
601
|
interface PinnedBalance {
|
|
492
602
|
projectId: string;
|
|
@@ -1269,6 +1379,38 @@ interface AgentCreateRequest {
|
|
|
1269
1379
|
interface AgentCreateResponse {
|
|
1270
1380
|
agent: AgentSummary;
|
|
1271
1381
|
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Where a deleted Agent's files stand. The Agent itself is gone the moment DELETE answers: its
|
|
1384
|
+
* folder was moved out of the Project's agents directory in one rename, and every list and route
|
|
1385
|
+
* stopped seeing it. What follows is the removal of that folder's contents in the background,
|
|
1386
|
+
* which this reports.
|
|
1387
|
+
*/
|
|
1388
|
+
interface AgentDeletionInfo {
|
|
1389
|
+
/** Names this deletion (GET /api/projects/:projectId/agent-deletions/:deletionId). */
|
|
1390
|
+
deletionId: string;
|
|
1391
|
+
agentId: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* `counting`: the folder is walked to learn how many entries it holds (`total` grows);
|
|
1394
|
+
* `removing`: they are removed (`removed` grows towards `total`); `done`: nothing is left;
|
|
1395
|
+
* `failed`: some entries could not be removed (`error` says why). What is left is tried again
|
|
1396
|
+
* when the server next starts.
|
|
1397
|
+
*/
|
|
1398
|
+
phase: "counting" | "removing" | "done" | "failed";
|
|
1399
|
+
/** Entries found: so far while counting, then in all. Files and folders alike. */
|
|
1400
|
+
total: number;
|
|
1401
|
+
/** Entries removed so far. */
|
|
1402
|
+
removed: number;
|
|
1403
|
+
/** The first error the removal met, as the operating system worded it (`failed` only). */
|
|
1404
|
+
error?: string;
|
|
1405
|
+
}
|
|
1406
|
+
/** DELETE /api/projects/:projectId/agents/:agentId (202). */
|
|
1407
|
+
interface AgentDeleteResponse {
|
|
1408
|
+
deletion: AgentDeletionInfo;
|
|
1409
|
+
}
|
|
1410
|
+
/** GET /api/projects/:projectId/agent-deletions/:deletionId. */
|
|
1411
|
+
interface AgentDeletionResponse {
|
|
1412
|
+
deletion: AgentDeletionInfo;
|
|
1413
|
+
}
|
|
1272
1414
|
interface AgentModelConfigDto {
|
|
1273
1415
|
maxTokens?: number;
|
|
1274
1416
|
thinkingLevel?: ThinkingLevelName;
|
|
@@ -1898,6 +2040,12 @@ interface ArchivedSessionsQuery {
|
|
|
1898
2040
|
/** One Project the user can open (404 `project_not_found` otherwise); absent = every Project they own or are a member of. */
|
|
1899
2041
|
projectId?: string;
|
|
1900
2042
|
}
|
|
2043
|
+
/**
|
|
2044
|
+
* Which servers' groups GET /api/me/archived-sessions/groups answers with: `here` this server's
|
|
2045
|
+
* alone, never waiting on a machine; `machines` the machines' alone. Absent: both, in one answer.
|
|
2046
|
+
* The Web App asks the two apart, so a machine that answers nothing never holds this server's.
|
|
2047
|
+
*/
|
|
2048
|
+
type ArchivedSessionGroupServers = "here" | "machines";
|
|
1901
2049
|
/** One group of the archive page: one Workspace of one Project, on this server or on one machine. */
|
|
1902
2050
|
interface ArchivedSessionGroup {
|
|
1903
2051
|
projectId: string;
|
|
@@ -4899,10 +5047,19 @@ interface RestartResponse {
|
|
|
4899
5047
|
interface MachineSocketFact {
|
|
4900
5048
|
/**
|
|
4901
5049
|
* `connected` once the handshake completed, `dialling` while a dial is outstanding, `refused`
|
|
4902
|
-
* when the machine answered the handshake with a status (a program predating the socket),
|
|
4903
|
-
* `
|
|
4904
|
-
|
|
4905
|
-
|
|
5050
|
+
* when the machine answered the handshake with a status (a program predating the socket),
|
|
5051
|
+
* `unanswered` when its server answers HTTP and never answered the handshake, and `failed` when
|
|
5052
|
+
* the dial did not complete or a socket that was up closed.
|
|
5053
|
+
*
|
|
5054
|
+
* `unanswered` is a server PROCESS older than the socket: an update handed to a running server
|
|
5055
|
+
* swaps its platform and never the process that takes the upgrade, so the machine reports the
|
|
5056
|
+
* current build and still has no socket: it is not running this server's version, which a remote
|
|
5057
|
+
* machine must. A restart of its server, and failing that an update or a reinstall, brings it
|
|
5058
|
+
* there; the Machines page reads the state as needing a restart. It lasts until a handshake
|
|
5059
|
+
* completes: a
|
|
5060
|
+
* machine dialled again keeps it while the dial is outstanding, instead of reading `dialling`.
|
|
5061
|
+
*/
|
|
5062
|
+
state: "connected" | "dialling" | "refused" | "unanswered" | "failed";
|
|
4906
5063
|
/** When that state was entered (ISO). */
|
|
4907
5064
|
since: string;
|
|
4908
5065
|
/** The transport's own words where there are any: a refusal's status, a dial's error. */
|
|
@@ -5097,11 +5254,11 @@ interface MachineEnvOnly {
|
|
|
5097
5254
|
}
|
|
5098
5255
|
/**
|
|
5099
5256
|
* A machine this server keeps connected, while it is being brought back. Attempts back off
|
|
5100
|
-
* from
|
|
5101
|
-
*
|
|
5102
|
-
*
|
|
5103
|
-
*
|
|
5104
|
-
* explanation.
|
|
5257
|
+
* from 15 s, doubling, and stop after `maxAttempts` failures in a row — or after the first, when
|
|
5258
|
+
* ssh refused in a way no retry fixes, or when a person asks to stop
|
|
5259
|
+
* (`POST …/machines/:machineId/stop-reconnecting`) — until a person asks for a Retry
|
|
5260
|
+
* (`POST …/machines/:machineId/reconnect`). After three failures in a row the connection check
|
|
5261
|
+
* runs on its own, and its answer is what the page shows as the explanation.
|
|
5105
5262
|
*/
|
|
5106
5263
|
interface MachineReconnect {
|
|
5107
5264
|
/** When this streak began: the moment the machine was found not connected, or the Retry that began it again. */
|
|
@@ -5116,9 +5273,11 @@ interface MachineReconnect {
|
|
|
5116
5273
|
* The streak stopped, and nothing runs until a person asks for a Retry, which begins a new
|
|
5117
5274
|
* one: `attempts` — `maxAttempts` failed in a row; `ssh` — ssh refused in a way retrying
|
|
5118
5275
|
* cannot fix (a host key unknown or changed, an unusable key file, a key refused, a broken
|
|
5119
|
-
* ssh config), said by `sshReason
|
|
5276
|
+
* ssh config), said by `sshReason`; `cancelled` — a person stopped it. An attempt that was
|
|
5277
|
+
* under way when it was stopped runs out: it may still connect the machine, and its failure
|
|
5278
|
+
* is the `lastError`.
|
|
5120
5279
|
*/
|
|
5121
|
-
gaveUp?: "attempts" | "ssh";
|
|
5280
|
+
gaveUp?: "attempts" | "ssh" | "cancelled";
|
|
5122
5281
|
/** The last attempt's failure in the far side's words; null before the first one fails. */
|
|
5123
5282
|
lastError: string | null;
|
|
5124
5283
|
/** Why ssh refused, when the last failure was ssh's own — for the page to say in its language. */
|
|
@@ -6682,7 +6841,12 @@ interface BrowserExtensionPairingResponse {
|
|
|
6682
6841
|
code: string;
|
|
6683
6842
|
/** ISO time the code stops working. */
|
|
6684
6843
|
expiresAt: string;
|
|
6685
|
-
/**
|
|
6844
|
+
/**
|
|
6845
|
+
* The address the browser reaches this server at, which the extension pairs with: the public
|
|
6846
|
+
* origin (scheme, host and port; from the forwarded headers when the server trusts a proxy).
|
|
6847
|
+
* Null only from an older server, which echoed the request's `Origin` and had none to echo for
|
|
6848
|
+
* a call that carried no `Origin`.
|
|
6849
|
+
*/
|
|
6686
6850
|
origin: string | null;
|
|
6687
6851
|
}
|
|
6688
6852
|
/** POST /api/builtin-browser/extension/pair (no cookie: the extension's own request). */
|
|
@@ -7117,4 +7281,4 @@ interface DesktopBrowserEventMessage {
|
|
|
7117
7281
|
event: DesktopBrowserEvent;
|
|
7118
7282
|
}
|
|
7119
7283
|
|
|
7120
|
-
export { API_SOCKET_PATH, type AdminPasswordResetRequest, type AdminUserCreateRequest, type AdminUserCreateResponse, type AdminUsersResponse, type AgentApiKeyCreateRequest, type AgentApiKeyCreateResponse, type AgentApiKeyInfo, type AgentApiResponse, type AgentApiSettings, type AgentApiUpdateRequest, type AgentCompactionConfigDto, type AgentConfigDto, type AgentConfigResponse, type AgentConfigUpdateRequest, type AgentCreateRequest, type AgentCreateResponse, type AgentHooksConfigDto, type AgentHooksResponse, type AgentImportRequest, type AgentImportResponse, type AgentKernelUpdateResponse, type AgentMcpServerItem, type AgentMcpServersResponse, type AgentMemoryConfigDto, type AgentModelConfigDto, type AgentPluginsInstallResponse, type AgentSchedulesConfigDto, type AgentSkillsConfigDto, type AgentSkillsResponse, type AgentSummary, type AgentTraceDateGroup, type AgentTraceFileRef, type AgentTraceSessionEntry, type AgentTraceSessionFile, type AgentTraceSessionGroup, type AgentTracesResponse, type AgentVaultConfigDto, type AgentsResponse, type ApprovalDecisionRequest, type ApprovalMode, type ArchivedSessionGroup, type ArchivedSessionGroupsResponse, type ArchivedSessionSource, type ArchivedSessionsBatch, type ArchivedSessionsBatchFilter, type ArchivedSessionsBatchResponse, type ArchivedSessionsQuery, type ArchivedSessionsResponse, type ArchivedSessionsRowsQuery, type AuthLoginRequest, type AuthResponse, type BenchmarkArchiveGitOrigin, type BenchmarkArchiveImportRequest, type BenchmarkArchiveImportResponse, type BenchmarkCaseScore, type BenchmarkCaseSummary, type BenchmarkCasesResponse, type BenchmarkCreateCase, type BenchmarkCreateRequest, type BenchmarkCreateResponse, type BenchmarkEvaluation, type BenchmarkManifestProblem, type BenchmarkOrigin, type BenchmarkOriginKind, type BenchmarkRunScore, type BenchmarkStatus, type BenchmarkSummary, type BenchmarksResponse, type BrowserBackend, type BrowserBackendInfo, type BrowserBackendResponse, type BrowserExtensionCloseCode, type BrowserExtensionPairRequest, type BrowserExtensionPairResponse, type BrowserExtensionPairingResponse, type BrowserExtensionRecord, type BrowserExtensionsResponse, type BrowserHello, type BrowserLinkCapabilities, type BuiltinBrowserAction, type BuiltinBrowserDialog, type BuiltinBrowserExecResult, type BuiltinBrowserHistoryEntry, type BuiltinBrowserHistoryResponse, type BuiltinBrowserImportBrowser, type BuiltinBrowserImportRequest, type BuiltinBrowserImportResult, type BuiltinBrowserImportSource, type BuiltinBrowserImportSourcesResponse, type BuiltinBrowserLoadWarning, type BuiltinBrowserMetrics, type BuiltinBrowserScanResult, type BuiltinBrowserScreenshot, type BuiltinBrowserServerEvent, type BuiltinBrowserSettings, type BuiltinBrowserStatus, type BuiltinBrowserTab, type BuiltinBrowserTabMetrics, type BuiltinBrowserTabsResponse, type BuiltinBrowserUnavailableReason, type CaseMaterial, type ChatDefaultsDto, type CommandPolicyDto, type CommandPolicyRuleDto, type CompanyServerEvent, type ConnectionSourceDto, type ContextFileShare, type ContextToolShare, type ContributionsResponse, type CostParts, type CredentialInfo, type DefaultModelResponse, type DefaultModelUpdateRequest, type DesktopBrowserCommand, type DesktopBrowserCommandMessage, type DesktopBrowserCookie, type DesktopBrowserEvent, type DesktopBrowserEventMessage, type DesktopBrowserReplyMessage, type DesktopFolderAccessMessage, type DesktopFolderAccessResult, type DesktopFolderAccessResultMessage, type DesktopOpenPrivacySettingsMessage, type DesktopPrivacyPane, type DesktopTrayCommandMessage, type DesktopTrayLocale, type DesktopTrayPatch, type DesktopTrayStatus, type DesktopTrayStatusMessage, type DesktopTrayStatusResponse, type DesktopUpdateStatus, type DesktopUpdateStatusResponse, type DesktopUpdaterCommandMessage, type DesktopUpdaterStatusMessage, type DirAccessResponse, type DirEntryInfo, type DirListResponse, type DirLocation, type DirStandardFolders, type DirectorySkillItem, type DirectorySkillsResponse, type DraftShortcut, type Employment, type EndpointModelListRequest, type EndpointModelListResponse, type ErrorBody, type ErrorDetails, type FeishuBindingInfo, type FeishuBindingPutRequest, type FeishuBindingResponse, type FeishuTestRequest, type FeishuTestResponse, type FilesCreateRequest, type FilesMoveRequest, type FilesStatRequest, type FilesStatResponse, type FilesWriteRequest, type GoalResponse, type GoalServerEvent, type GoalStateView, type HistoryMessage, type HookArchiveInstallRequest, type HookItem, type InstallResponse, type InstalledPlugin, type InstalledPluginsResponse, type LanguageIndexResponse, type LanguageSummary, MACHINE_PHASES, type MachineCheck, type MachineConfigSync, type MachineDiagnosis, type MachineEnvOnly, type MachineEvent, type MachineInfo, type MachineJob, type MachinePhase, type MachineReconnect, type MachineServerEvent, type MachineServerStatus, type MachineSkippedModel, type MachineSocketFact, type MachineSourceReach, type MachineSshFailure, type MachineUninstallRequest, type MachineUseRefusal, type MachinesAddRequest, type MachinesCheckoutImage, type MachinesResponse, type MachinesStopUsingRequest, type MachinesUseRequest, type MachinesUseResponse, type McpServerTestResponse, type McpTransport, type MeResponse, type MemberAddRequest, type MemberAddResponse, type MemberInfo, type MembersResponse, type MemoryFileInfo, type MemoryFileResponse, type MemoryFilesResponse, type MemoryImportMode, type MemoryImportRequest, type MemoryImportResponse, type MemoryOverviewResponse, type MemoryScopeExport, type MemoryScopeInfo, type MemoryTransferFile, type MessagesLiveTail, type MessagesPageInfo, type MessagesResponse, type MessagingAccount, type MessagingAccountHolder, type MessagingAccountHoldersResponse, type MessagingAccountsResponse, type MessagingBindingCommon, type MessagingBindingInfo, type MessagingBindingStateRequest, type MessagingBindingsResponse, type MessagingChannel, type MessagingChannelState, type MessagingDeliveryError, type MessagingDeliveryPatch, type MessagingRuntimeState, type MessagingRuntimeStatus, type MessagingTestMessageResponse, type MessagingUnreachableMachine, type MessagingUnreachableReason, type ModelBalanceAmount, type ModelBalanceErrorCode, type ModelBalanceFailure, type ModelBalanceReading, type ModelBalanceResponse, type ModelEffectiveConnection, type ModelInfo, type ModelOAuthCodeRequest, type ModelOAuthCodeResponse, type ModelOAuthErrorCode, type ModelOAuthMode, type ModelOAuthStartRequest, type ModelOAuthStartResponse, type ModelOAuthStatusResponse, type ModelPricingDto, type ModelProtocolDetectRequest, type ModelProtocolDetectResponse, type ModelProtocolProbeDto, type ModelRefDto, type ModelScopeAuthFlowErrorCode, type ModelScopeAuthFlowStatusResponse, type ModelScopeAuthStartResponse, type ModelTestRequest, type ModelTestResponse, type ModelUpdateEntry, type ModelVisionDetectRequest, type ModelVisionDetectResponse, type ModelVisionOutcome, type ModelsResponse, type ModelsUpdateRequest, type OrgApprovalMode, type OrgBudgetAlert, type OrgCalendarItem, type OrgCalendarOutcome, type OrgCalendarResponse, type OrgCalendarUpsertRequest, type OrgCalendarWriteResponse, type OrgChannelCreateRequest, type OrgChannelDetail, type OrgChannelItem, type OrgChannelMember, type OrgChannelMemberRequest, type OrgChannelMessage, type OrgChannelMessageSendRequest, type OrgChannelMessagesResponse, type OrgChannelNotice, type OrgChannelNoticeKind, type OrgChannelPatchRequest, type OrgChannelReadRequest, type OrgChannelsResponse, type OrgChartResponse, type OrgDeskItem, type OrgDeskResponse, type OrgEmployeeItem, type OrgEmployeePatchRequest, type OrgEmployeeState, type OrgFinanceEmployee, type OrgFinanceResponse, type OrgFinanceTicket, type OrgHandbookFile, type OrgHandbookFileResponse, type OrgHandbookFileWriteRequest, type OrgHandbookFilesResponse, type OrgHandbookResponse, type OrgHireRequest, type OrgInbox, type OrgLanguage, type OrgSessionsResponse, type OrgSpendSummary, type OrgStatus, type OrgTicketAttachRequest, type OrgTicketBlockRequest, type OrgTicketChange, type OrgTicketCreateRequest, type OrgTicketDetail, type OrgTicketHistoryAction, type OrgTicketHistoryEntry, type OrgTicketItem, type OrgTicketMoveRequest, type OrgTicketPriority, type OrgTicketProgressRequest, type OrgTicketSessionItem, type OrgTicketStartRequest, type OrgTicketStartResponse, type OrgTicketStatus, type OrgTicketUpdateRequest, type OrgTicketsResponse, type OrgTriggerKind, type OrganizationCreateRequest, type OrganizationDetail, type OrganizationPatchRequest, type OrganizationSettings, type OrganizationSummary, type OrganizationsResponse, type PasswordChangeRequest, type PendingFollowUpInfo, type PendingSteeringInfo, type PinnedBalance, type PlatformAuthFlowErrorCode, type PlatformAuthFlowStatusResponse, type PlatformAuthStartResponse, type PlatformModelSyncResponse, type PluginArchiveImportRequest, type PluginConfigActionDecl, type PluginConfigActionResponse, type PluginConfigBackend, type PluginConfigColumnGroup, type PluginConfigEntry, type PluginConfigField, type PluginConfigNewRow, type PluginConfigNotice, type PluginConfigOption, type PluginConfigPinColumn, type PluginConfigResponse, type PluginConfigRowChoice, type PluginConfigTableColumn, type PluginConfigTableRow, type PluginConfigUnavailableDecl, type PluginConfigUpdateRequest, type PluginConfiguration, type PluginFilesResponse, type PluginGroupItem, type PluginIndexEntry, type PluginIndexResponse, type PluginInstallOutcome, type PluginInstallRequest, type PluginItem, type PluginLibraryResponse, type PluginMcpServerItem, type PluginReadmeResponse, type PluginSetupKeyItem, type PluginUpdateRef, type PrefsResponse, type PresetSyncMode, type PresetSyncRequest, type PresetSyncResponse, type ProjectCreateRequest, type ProjectCreateResponse, type ProjectRole, type ProjectScheduleItem, type ProjectSchedulesResponse, type ProjectSummary, type ProjectUpdateRequest, type ProjectUpdateResponse, type ProjectsResponse, type ProtocolProbeOutcome, type ProviderConnectionDto, type ProviderConnectionUpdate, type ProxyProbeDto, type ProxyProbeOutcome, type ProxyProbeProvider, type ProxyProbeResponse, type ProxyProbeTargetDto, type ProxyProbeTargetsResponse, type QQBindingInfo, type QQBindingPutRequest, type QQBindingResponse, type QQScanPollResponse, type QQScanStartResponse, type QQTestRequest, type QQTestResponse, type QuickStartItem, type RecalledMessageResponse, type RendererRef, type RequestSpan, type RestartResponse, type RetryNowResponse, type ScheduleItem, type ScheduleServerEvent, type ScheduleStatus, type ScheduleUpsertRequest, type SchedulesResponse, type SemanticIdKind, type SemanticIdSuggestReason, type SemanticIdSuggestRequest, type SemanticIdSuggestResponse, type ServerEvent, type ServerSettings, type ServerSettingsResponse, type ServerSettingsUpdateRequest, type SessionBackgroundTasks, type SessionBatchPageRequest, type SessionBatchResult, type SessionCategory, type SessionCategoryCounts, type SessionContextParts, type SessionContextResponse, type SessionCreateRequest, type SessionCreateResponse, type SessionForkRequest, type SessionForkResponse, type SessionInfo, type SessionPatchRequest, type SessionProcessInfo, type SessionProcessesResponse, type SessionResponse, type SessionSandbox, type SessionSandboxMode, type SessionSandboxNetwork, type SessionSandboxPreset, type SessionStatus, type SessionSwitchModelRequest, type SessionTracesResponse, type SessionsBatchRequest, type SessionsBatchResponse, type SessionsResponse, type SkillArchiveInstallRequest, type SkillMetadataItem, type SshHostRequest, type SshHostResponse, type SshHostSummary, type SshHostsResponse, type SteerRequest, type StoredKeybindings, type SubagentMessageResponse, type SubagentRuntimeInfo, TICKET_SLUG_PATTERN, type TaskCreateRequest, type TaskCreateResponse, type TaskInputPart, type TelegramBindingInfo, type TelegramBindingPutRequest, type TelegramBindingResponse, type TelegramTestRequest, type TelegramTestResponse, type ToolCallSpan, type TraceAnalysisResponse, type TraceEventsResponse, type TraceFileInfo, type TraceImportRequest, type TraceImportResponse, type TraceModelSegment, type TraceOtherSpan, type TracePosition, type TraceTaskStats, type TraceToolSpan, type UiPrefs, type UnavailableSandboxBackend, type UnsatisfiedPlugin, type UpdateCheckResponse, type UpdateJobPhase, type UpdateJobStatus, type UpdateProfileRequest, type UpdateProfileResponse, type UpdateRunResponse, type UploadLimits, type UsageAgentSeries, type UsageBucket, type UsageEntitySeriesCounts, type UsageErrorCount, type UsageErrorItem, type UsageErrorKind, type UsageErrors, type UsageErrorsClearResponse, type UsageErrorsPage, type UsageGranularity, type UsageGroupBy, type UsageGroupRow, type UsageModelSeries, type UsageModelTotal, type UsageModelTotals, type UsageResponse, type UsageSeriesPoint, type UsageTrendPointInTrace, type UserInfo, type VaultEntryInfo, type VaultEntryUpdate, type VaultResponse, type VaultUpdateRequest, type VersionHistoryDiffResponse, type VersionHistoryResponse, type VersionResponse, type VersionRollbackResponse, type WeChatBindingInfo, type WeChatBindingPutRequest, type WeChatBindingResponse, type WeChatScanPollResponse, type WeChatScanStartResponse, type WeChatScanStatus, type WeChatScanVerifyRequest, type WeChatTestResponse, type WebContribution, type WorkbenchInfo, type WorkbenchRequest, type WorkbenchResponse, type WorkbenchVersion, type WorkspaceFileEntry, type WorkspaceFilesResponse, type WorkspaceSearchHit, type WorkspaceSearchResponse, apiSocketPath, sessionKindPath };
|
|
7284
|
+
export { API_SOCKET_PATH, type AdminPasswordResetRequest, type AdminUserCreateRequest, type AdminUserCreateResponse, type AdminUsersResponse, type AgentApiKeyCreateRequest, type AgentApiKeyCreateResponse, type AgentApiKeyInfo, type AgentApiResponse, type AgentApiSettings, type AgentApiUpdateRequest, type AgentCompactionConfigDto, type AgentConfigDto, type AgentConfigResponse, type AgentConfigUpdateRequest, type AgentCreateRequest, type AgentCreateResponse, type AgentDeleteResponse, type AgentDeletionInfo, type AgentDeletionResponse, type AgentHooksConfigDto, type AgentHooksResponse, type AgentImportRequest, type AgentImportResponse, type AgentKernelUpdateResponse, type AgentMcpServerItem, type AgentMcpServersResponse, type AgentMemoryConfigDto, type AgentModelConfigDto, type AgentPluginsInstallResponse, type AgentSchedulesConfigDto, type AgentSkillsConfigDto, type AgentSkillsResponse, type AgentSummary, type AgentTraceDateGroup, type AgentTraceFileRef, type AgentTraceSessionEntry, type AgentTraceSessionFile, type AgentTraceSessionGroup, type AgentTracesResponse, type AgentVaultConfigDto, type AgentsResponse, type ApprovalDecisionRequest, type ApprovalMode, type ArchivedSessionGroup, type ArchivedSessionGroupServers, type ArchivedSessionGroupsResponse, type ArchivedSessionSource, type ArchivedSessionsBatch, type ArchivedSessionsBatchFilter, type ArchivedSessionsBatchResponse, type ArchivedSessionsQuery, type ArchivedSessionsResponse, type ArchivedSessionsRowsQuery, type AuthLoginRequest, type AuthResponse, BACKGROUND_IMAGE_MAX_CHARS, type BackgroundImagePutResponse, type BackgroundImageRequest, type BackgroundImageResponse, type BackgroundSettingsDto, type BenchmarkArchiveGitOrigin, type BenchmarkArchiveImportRequest, type BenchmarkArchiveImportResponse, type BenchmarkCaseScore, type BenchmarkCaseSummary, type BenchmarkCasesResponse, type BenchmarkCreateCase, type BenchmarkCreateRequest, type BenchmarkCreateResponse, type BenchmarkEvaluation, type BenchmarkManifestProblem, type BenchmarkOrigin, type BenchmarkOriginKind, type BenchmarkRunScore, type BenchmarkStatus, type BenchmarkSummary, type BenchmarksResponse, type BrowserBackend, type BrowserBackendInfo, type BrowserBackendResponse, type BrowserExtensionCloseCode, type BrowserExtensionPairRequest, type BrowserExtensionPairResponse, type BrowserExtensionPairingResponse, type BrowserExtensionRecord, type BrowserExtensionsResponse, type BrowserHello, type BrowserLinkCapabilities, type BuiltinBrowserAction, type BuiltinBrowserDialog, type BuiltinBrowserExecResult, type BuiltinBrowserHistoryEntry, type BuiltinBrowserHistoryResponse, type BuiltinBrowserImportBrowser, type BuiltinBrowserImportRequest, type BuiltinBrowserImportResult, type BuiltinBrowserImportSource, type BuiltinBrowserImportSourcesResponse, type BuiltinBrowserLoadWarning, type BuiltinBrowserMetrics, type BuiltinBrowserScanResult, type BuiltinBrowserScreenshot, type BuiltinBrowserServerEvent, type BuiltinBrowserSettings, type BuiltinBrowserStatus, type BuiltinBrowserTab, type BuiltinBrowserTabMetrics, type BuiltinBrowserTabsResponse, type BuiltinBrowserUnavailableReason, type CaseMaterial, type ChatDefaultsDto, type CommandPolicyDto, type CommandPolicyRuleDto, type CompanyServerEvent, type ConnectionSourceDto, type ContextFileShare, type ContextToolShare, type ContributionsResponse, type CostParts, type CredentialInfo, DRAFTS_PATCH_MAX_ENTRIES, DRAFT_KINDS, DRAFT_VALUE_MAX_CHARS, type DefaultModelResponse, type DefaultModelUpdateRequest, type DesktopBrowserCommand, type DesktopBrowserCommandMessage, type DesktopBrowserCookie, type DesktopBrowserEvent, type DesktopBrowserEventMessage, type DesktopBrowserReplyMessage, type DesktopFolderAccessMessage, type DesktopFolderAccessResult, type DesktopFolderAccessResultMessage, type DesktopOpenPrivacySettingsMessage, type DesktopPrivacyPane, type DesktopTrayCommandMessage, type DesktopTrayLocale, type DesktopTrayPatch, type DesktopTrayStatus, type DesktopTrayStatusMessage, type DesktopTrayStatusResponse, type DesktopUpdateStatus, type DesktopUpdateStatusResponse, type DesktopUpdaterCommandMessage, type DesktopUpdaterStatusMessage, type DirAccessResponse, type DirEntryInfo, type DirListResponse, type DirLocation, type DirStandardFolders, type DirectorySkillItem, type DirectorySkillsResponse, type DraftKind, type DraftShortcut, type DraftsPatchRequest, type DraftsResponse, type Employment, type EndpointModelListRequest, type EndpointModelListResponse, type ErrorBody, type ErrorDetails, type FeishuBindingInfo, type FeishuBindingPutRequest, type FeishuBindingResponse, type FeishuTestRequest, type FeishuTestResponse, type FilesCreateRequest, type FilesMoveRequest, type FilesStatRequest, type FilesStatResponse, type FilesWriteRequest, type GoalResponse, type GoalServerEvent, type GoalStateView, type HistoryMessage, type HookArchiveInstallRequest, type HookItem, type InstallResponse, type InstalledPlugin, type InstalledPluginsResponse, type LanguageIndexResponse, type LanguageSummary, MACHINE_PHASES, type MachineCheck, type MachineConfigSync, type MachineDiagnosis, type MachineEnvOnly, type MachineEvent, type MachineInfo, type MachineJob, type MachinePhase, type MachineReconnect, type MachineServerEvent, type MachineServerStatus, type MachineSkippedModel, type MachineSocketFact, type MachineSourceReach, type MachineSshFailure, type MachineUninstallRequest, type MachineUseRefusal, type MachinesAddRequest, type MachinesCheckoutImage, type MachinesResponse, type MachinesStopUsingRequest, type MachinesUseRequest, type MachinesUseResponse, type McpServerTestResponse, type McpTransport, type MeResponse, type MemberAddRequest, type MemberAddResponse, type MemberInfo, type MembersResponse, type MemoryFileInfo, type MemoryFileResponse, type MemoryFilesResponse, type MemoryImportMode, type MemoryImportRequest, type MemoryImportResponse, type MemoryOverviewResponse, type MemoryScopeExport, type MemoryScopeInfo, type MemoryTransferFile, type MessagesLiveTail, type MessagesPageInfo, type MessagesResponse, type MessagingAccount, type MessagingAccountHolder, type MessagingAccountHoldersResponse, type MessagingAccountsResponse, type MessagingBindingCommon, type MessagingBindingInfo, type MessagingBindingStateRequest, type MessagingBindingsResponse, type MessagingChannel, type MessagingChannelState, type MessagingDeliveryError, type MessagingDeliveryPatch, type MessagingRuntimeState, type MessagingRuntimeStatus, type MessagingTestMessageResponse, type MessagingUnreachableMachine, type MessagingUnreachableReason, type ModelBalanceAmount, type ModelBalanceErrorCode, type ModelBalanceFailure, type ModelBalanceReading, type ModelBalanceResponse, type ModelEffectiveConnection, type ModelInfo, type ModelOAuthCodeRequest, type ModelOAuthCodeResponse, type ModelOAuthErrorCode, type ModelOAuthMode, type ModelOAuthStartRequest, type ModelOAuthStartResponse, type ModelOAuthStatusResponse, type ModelPricingDto, type ModelProtocolDetectRequest, type ModelProtocolDetectResponse, type ModelProtocolProbeDto, type ModelRefDto, type ModelScopeAuthFlowErrorCode, type ModelScopeAuthFlowStatusResponse, type ModelScopeAuthStartResponse, type ModelTestRequest, type ModelTestResponse, type ModelUpdateEntry, type ModelVisionDetectRequest, type ModelVisionDetectResponse, type ModelVisionOutcome, type ModelsResponse, type ModelsUpdateRequest, type OrgApprovalMode, type OrgBudgetAlert, type OrgCalendarItem, type OrgCalendarOutcome, type OrgCalendarResponse, type OrgCalendarUpsertRequest, type OrgCalendarWriteResponse, type OrgChannelCreateRequest, type OrgChannelDetail, type OrgChannelItem, type OrgChannelMember, type OrgChannelMemberRequest, type OrgChannelMessage, type OrgChannelMessageSendRequest, type OrgChannelMessagesResponse, type OrgChannelNotice, type OrgChannelNoticeKind, type OrgChannelPatchRequest, type OrgChannelReadRequest, type OrgChannelsResponse, type OrgChartResponse, type OrgDeskItem, type OrgDeskResponse, type OrgEmployeeItem, type OrgEmployeePatchRequest, type OrgEmployeeState, type OrgFinanceEmployee, type OrgFinanceResponse, type OrgFinanceTicket, type OrgHandbookFile, type OrgHandbookFileResponse, type OrgHandbookFileWriteRequest, type OrgHandbookFilesResponse, type OrgHandbookResponse, type OrgHireRequest, type OrgInbox, type OrgLanguage, type OrgSessionsResponse, type OrgSpendSummary, type OrgStatus, type OrgTicketAttachRequest, type OrgTicketBlockRequest, type OrgTicketChange, type OrgTicketCreateRequest, type OrgTicketDetail, type OrgTicketHistoryAction, type OrgTicketHistoryEntry, type OrgTicketItem, type OrgTicketMoveRequest, type OrgTicketPriority, type OrgTicketProgressRequest, type OrgTicketSessionItem, type OrgTicketStartRequest, type OrgTicketStartResponse, type OrgTicketStatus, type OrgTicketUpdateRequest, type OrgTicketsResponse, type OrgTriggerKind, type OrganizationCreateRequest, type OrganizationDetail, type OrganizationPatchRequest, type OrganizationSettings, type OrganizationSummary, type OrganizationsResponse, type PasswordChangeRequest, type PendingFollowUpInfo, type PendingSteeringInfo, type PinnedBalance, type PlatformAuthFlowErrorCode, type PlatformAuthFlowStatusResponse, type PlatformAuthStartResponse, type PlatformModelSyncResponse, type PluginArchiveImportRequest, type PluginConfigActionDecl, type PluginConfigActionResponse, type PluginConfigBackend, type PluginConfigColumnGroup, type PluginConfigEntry, type PluginConfigField, type PluginConfigNewRow, type PluginConfigNotice, type PluginConfigOption, type PluginConfigPinColumn, type PluginConfigResponse, type PluginConfigRowChoice, type PluginConfigTableColumn, type PluginConfigTableRow, type PluginConfigUnavailableDecl, type PluginConfigUpdateRequest, type PluginConfiguration, type PluginFilesResponse, type PluginGroupItem, type PluginIndexEntry, type PluginIndexResponse, type PluginInstallOutcome, type PluginInstallRequest, type PluginItem, type PluginLibraryResponse, type PluginMcpServerItem, type PluginReadmeResponse, type PluginSetupKeyItem, type PluginUpdateRef, type PrefsResponse, type PresetSyncMode, type PresetSyncRequest, type PresetSyncResponse, type ProjectCreateRequest, type ProjectCreateResponse, type ProjectRole, type ProjectScheduleItem, type ProjectSchedulesResponse, type ProjectSummary, type ProjectUpdateRequest, type ProjectUpdateResponse, type ProjectsResponse, type ProtocolProbeOutcome, type ProviderConnectionDto, type ProviderConnectionUpdate, type ProxyProbeDto, type ProxyProbeOutcome, type ProxyProbeProvider, type ProxyProbeResponse, type ProxyProbeTargetDto, type ProxyProbeTargetsResponse, type QQBindingInfo, type QQBindingPutRequest, type QQBindingResponse, type QQScanPollResponse, type QQScanStartResponse, type QQTestRequest, type QQTestResponse, type QuickStartItem, type RecalledMessageResponse, type RendererRef, type RequestSpan, type RestartResponse, type RetryNowResponse, type ScheduleItem, type ScheduleServerEvent, type ScheduleStatus, type ScheduleUpsertRequest, type SchedulesResponse, type SemanticIdKind, type SemanticIdSuggestReason, type SemanticIdSuggestRequest, type SemanticIdSuggestResponse, type ServerEvent, type ServerSettings, type ServerSettingsResponse, type ServerSettingsUpdateRequest, type SessionBackgroundTasks, type SessionBatchPageRequest, type SessionBatchResult, type SessionCategory, type SessionCategoryCounts, type SessionContextParts, type SessionContextResponse, type SessionCreateRequest, type SessionCreateResponse, type SessionForkRequest, type SessionForkResponse, type SessionInfo, type SessionPatchRequest, type SessionProcessInfo, type SessionProcessesResponse, type SessionResponse, type SessionSandbox, type SessionSandboxMode, type SessionSandboxNetwork, type SessionSandboxPreset, type SessionStatus, type SessionSwitchModelRequest, type SessionTracesResponse, type SessionsBatchRequest, type SessionsBatchResponse, type SessionsResponse, type SkillArchiveInstallRequest, type SkillMetadataItem, type SshHostRequest, type SshHostResponse, type SshHostSummary, type SshHostsResponse, type SteerRequest, type StoredKeybindings, type SubagentMessageResponse, type SubagentRuntimeInfo, TICKET_SLUG_PATTERN, type TaskCreateRequest, type TaskCreateResponse, type TaskInputPart, type TelegramBindingInfo, type TelegramBindingPutRequest, type TelegramBindingResponse, type TelegramTestRequest, type TelegramTestResponse, type ToolCallSpan, type TraceAnalysisResponse, type TraceEventsResponse, type TraceFileInfo, type TraceImportRequest, type TraceImportResponse, type TraceModelSegment, type TraceOtherSpan, type TracePosition, type TraceTaskStats, type TraceToolSpan, type UiPrefs, type UnavailableSandboxBackend, type UnsatisfiedPlugin, type UpdateCheckResponse, type UpdateJobPhase, type UpdateJobStatus, type UpdateProfileRequest, type UpdateProfileResponse, type UpdateRunResponse, type UploadLimits, type UsageAgentSeries, type UsageBucket, type UsageEntitySeriesCounts, type UsageErrorCount, type UsageErrorItem, type UsageErrorKind, type UsageErrors, type UsageErrorsClearResponse, type UsageErrorsPage, type UsageGranularity, type UsageGroupBy, type UsageGroupRow, type UsageModelSeries, type UsageModelTotal, type UsageModelTotals, type UsageResponse, type UsageSeriesPoint, type UsageTrendPointInTrace, type UserInfo, type VaultEntryInfo, type VaultEntryUpdate, type VaultResponse, type VaultUpdateRequest, type VersionHistoryDiffResponse, type VersionHistoryResponse, type VersionResponse, type VersionRollbackResponse, type WeChatBindingInfo, type WeChatBindingPutRequest, type WeChatBindingResponse, type WeChatScanPollResponse, type WeChatScanStartResponse, type WeChatScanStatus, type WeChatScanVerifyRequest, type WeChatTestResponse, type WebContribution, type WorkbenchInfo, type WorkbenchRecord, type WorkbenchRequest, type WorkbenchResponse, type WorkbenchVersion, type WorkspaceFileEntry, type WorkspaceFilesResponse, type WorkspaceSearchHit, type WorkspaceSearchResponse, apiSocketPath, sessionKindPath };
|
package/dist/api/types.js
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
API_SOCKET_PATH,
|
|
3
|
+
BACKGROUND_IMAGE_MAX_CHARS,
|
|
4
|
+
DRAFTS_PATCH_MAX_ENTRIES,
|
|
5
|
+
DRAFT_KINDS,
|
|
6
|
+
DRAFT_VALUE_MAX_CHARS,
|
|
3
7
|
MACHINE_PHASES,
|
|
4
8
|
TICKET_SLUG_PATTERN,
|
|
5
9
|
apiSocketPath,
|
|
6
10
|
sessionKindPath
|
|
7
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-BRMNPLU6.js";
|
|
8
12
|
import "../chunk-B5IP37ZQ.js";
|
|
9
13
|
export {
|
|
10
14
|
API_SOCKET_PATH,
|
|
15
|
+
BACKGROUND_IMAGE_MAX_CHARS,
|
|
16
|
+
DRAFTS_PATCH_MAX_ENTRIES,
|
|
17
|
+
DRAFT_KINDS,
|
|
18
|
+
DRAFT_VALUE_MAX_CHARS,
|
|
11
19
|
MACHINE_PHASES,
|
|
12
20
|
TICKET_SLUG_PATTERN,
|
|
13
21
|
apiSocketPath,
|
package/dist/auth-token.js
CHANGED
|
@@ -714,6 +714,47 @@ var machinesAdoptedAt = {
|
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
716
|
|
|
717
|
+
// src/db/migrations/steps/2026-10-26-user-drafts.ts
|
|
718
|
+
var userDrafts = {
|
|
719
|
+
name: "2026-10-26-user-drafts",
|
|
720
|
+
// Additive: two new tables and two indexes. A user's unsent drafts and the custom background
|
|
721
|
+
// image, which used to live only in the browser that made them. A predecessor build never
|
|
722
|
+
// reads either table, so a rollback survives it; its Web App then keeps drafts and the image
|
|
723
|
+
// in that browser alone, as it always did.
|
|
724
|
+
swapSafe: true,
|
|
725
|
+
up(db) {
|
|
726
|
+
db.exec(`
|
|
727
|
+
CREATE TABLE IF NOT EXISTS user_drafts ( -- a user's unsent drafts (composer text, parked conversations, form answers), so they follow the account to another browser; bounded per user, dropped with the Session or Project they belong to
|
|
728
|
+
user_id TEXT NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
|
|
729
|
+
draft_key TEXT NOT NULL,
|
|
730
|
+
session_id TEXT,
|
|
731
|
+
project_id TEXT,
|
|
732
|
+
value_json TEXT NOT NULL,
|
|
733
|
+
updated_at TEXT NOT NULL,
|
|
734
|
+
PRIMARY KEY (user_id, draft_key)
|
|
735
|
+
);
|
|
736
|
+
CREATE INDEX IF NOT EXISTS idx_user_drafts_session ON user_drafts(session_id);
|
|
737
|
+
CREATE INDEX IF NOT EXISTS idx_user_drafts_project ON user_drafts(project_id);
|
|
738
|
+
CREATE TABLE IF NOT EXISTS user_background_images ( -- the custom background image of a user's appearance settings, apart from ui_prefs so the megabyte it may hold is read only by the one route that serves it
|
|
739
|
+
user_id TEXT PRIMARY KEY REFERENCES users(user_id) ON DELETE CASCADE,
|
|
740
|
+
image TEXT NOT NULL,
|
|
741
|
+
image_id TEXT NOT NULL,
|
|
742
|
+
updated_at TEXT NOT NULL
|
|
743
|
+
);
|
|
744
|
+
`);
|
|
745
|
+
},
|
|
746
|
+
// LOSES every draft and background image the accounts hold on the server. A browser that still
|
|
747
|
+
// caches them keeps showing its own copy; another browser starts without them.
|
|
748
|
+
down(db) {
|
|
749
|
+
db.exec(`
|
|
750
|
+
DROP INDEX IF EXISTS idx_user_drafts_project;
|
|
751
|
+
DROP INDEX IF EXISTS idx_user_drafts_session;
|
|
752
|
+
DROP TABLE IF EXISTS user_drafts;
|
|
753
|
+
DROP TABLE IF EXISTS user_background_images;
|
|
754
|
+
`);
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
|
|
717
758
|
// src/db/migrations/index.ts
|
|
718
759
|
var MIGRATIONS = [
|
|
719
760
|
messagingBindings,
|
|
@@ -735,7 +776,8 @@ var MIGRATIONS = [
|
|
|
735
776
|
agentApiSessionSettings,
|
|
736
777
|
agentApiConcurrency,
|
|
737
778
|
machinesAdoptedAt,
|
|
738
|
-
modelTablesAdoption
|
|
779
|
+
modelTablesAdoption,
|
|
780
|
+
userDrafts
|
|
739
781
|
];
|
|
740
782
|
function migrate2(db, options = {}) {
|
|
741
783
|
return migrate(db, MIGRATIONS, options);
|
|
@@ -899,6 +941,23 @@ CREATE TABLE IF NOT EXISTS ui_prefs (
|
|
|
899
941
|
user_id TEXT PRIMARY KEY REFERENCES users(user_id) ON DELETE CASCADE,
|
|
900
942
|
prefs_json TEXT NOT NULL -- {theme?, lastProjectId?, ...} free-form JSON
|
|
901
943
|
);
|
|
944
|
+
CREATE TABLE IF NOT EXISTS user_drafts ( -- a user's unsent drafts (composer text, parked conversations, form answers), so they follow the account to another browser; bounded per user, dropped with the Session or Project they belong to
|
|
945
|
+
user_id TEXT NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
|
|
946
|
+
draft_key TEXT NOT NULL, -- <kind>:<id> (api/types.ts DRAFT_KINDS)
|
|
947
|
+
session_id TEXT, -- the Session the key names (session / a2ui kinds); NULL otherwise
|
|
948
|
+
project_id TEXT, -- the Project the key names (chat / parked / org / channel kinds); NULL otherwise
|
|
949
|
+
value_json TEXT NOT NULL, -- the draft as the Web App wrote it
|
|
950
|
+
updated_at TEXT NOT NULL, -- last write (ISO); the oldest go first when the user's bound is exceeded
|
|
951
|
+
PRIMARY KEY (user_id, draft_key)
|
|
952
|
+
);
|
|
953
|
+
CREATE INDEX IF NOT EXISTS idx_user_drafts_session ON user_drafts(session_id);
|
|
954
|
+
CREATE INDEX IF NOT EXISTS idx_user_drafts_project ON user_drafts(project_id);
|
|
955
|
+
CREATE TABLE IF NOT EXISTS user_background_images ( -- the custom background image of a user's appearance settings, apart from ui_prefs so the megabyte it may hold is read only by the one route that serves it
|
|
956
|
+
user_id TEXT PRIMARY KEY REFERENCES users(user_id) ON DELETE CASCADE,
|
|
957
|
+
image TEXT NOT NULL, -- data URL (image/png|jpeg|webp, <= BACKGROUND_IMAGE_MAX_CHARS characters)
|
|
958
|
+
image_id TEXT NOT NULL, -- content hash; mirrored into ui_prefs.backgroundImageId so a browser fetches the image only when it changed
|
|
959
|
+
updated_at TEXT NOT NULL
|
|
960
|
+
);
|
|
902
961
|
CREATE TABLE IF NOT EXISTS browser_extensions ( -- one row per Chrome paired to a user (builtin-browser/extension-pairing.ts): the PenguinHarness Browser extension's long-lived credential, stored only hashed; NOT rebuildable \u2014 a lost row means pairing that Chrome again
|
|
903
962
|
extension_id TEXT PRIMARY KEY, -- random id shown in the Web App's list
|
|
904
963
|
user_id TEXT NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
|
|
@@ -1133,4 +1192,4 @@ export {
|
|
|
1133
1192
|
openDatabaseReadOnly,
|
|
1134
1193
|
openDatabase
|
|
1135
1194
|
};
|
|
1136
|
-
//# sourceMappingURL=chunk-
|
|
1195
|
+
//# sourceMappingURL=chunk-5YLLSHY3.js.map
|