@prismshadow/penguin-server 0.2.15 → 0.2.16

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.
Files changed (101) hide show
  1. package/dist/api/types.d.ts +86 -40
  2. package/dist/api/types.js +1 -1
  3. package/dist/auth-token.d.ts +1 -1
  4. package/dist/auth-token.js +2 -2
  5. package/dist/{chunk-NVWAYYRX.js → chunk-3SFJKLQU.js} +38 -3
  6. package/dist/{chunk-NVWAYYRX.js.map → chunk-3SFJKLQU.js.map} +1 -1
  7. package/dist/{chunk-5Z4UCHDB.js → chunk-D3JNA6ZI.js} +69 -6
  8. package/dist/chunk-D3JNA6ZI.js.map +1 -0
  9. package/dist/{chunk-TOOTEEM4.js → chunk-G7GY7PJU.js} +1 -1
  10. package/dist/chunk-G7GY7PJU.js.map +1 -0
  11. package/dist/{chunk-JKJXQTHH.js → chunk-W7JNIJ25.js} +1 -1
  12. package/dist/chunk-W7JNIJ25.js.map +1 -0
  13. package/dist/index.js +3413 -2500
  14. package/dist/index.js.map +1 -1
  15. package/dist/machine-status.js +1 -1
  16. package/dist/plugin/index.d.ts +28 -20
  17. package/dist/reset-admin-password.js +3 -4
  18. package/dist/reset-admin-password.js.map +1 -1
  19. package/package.json +5 -9
  20. package/web-dist/assets/{abnfDiagram-VCTEODGH-CKWh4hoA.js → abnfDiagram-VCTEODGH-0AKFiyig.js} +1 -1
  21. package/web-dist/assets/{addon-clipboard-DxLqat7q.js → addon-clipboard-BovFnNVg.js} +1 -1
  22. package/web-dist/assets/{addon-fit-B8oPGPkW.js → addon-fit-B1npgxQk.js} +1 -1
  23. package/web-dist/assets/{addon-web-links-C0W5TcK0.js → addon-web-links-D88QHj7A.js} +1 -1
  24. package/web-dist/assets/{arc-Dp9EkaAH.js → arc-Beox1Cgf.js} +1 -1
  25. package/web-dist/assets/{architectureDiagram-5GKGNRK7-BQ3LUcle.js → architectureDiagram-5GKGNRK7-CC1sLMY1.js} +1 -1
  26. package/web-dist/assets/{blockDiagram-I7D4REHJ-CZzyU0Jj.js → blockDiagram-I7D4REHJ-B8BY1PkZ.js} +1 -1
  27. package/web-dist/assets/{c4Diagram-7LVT6UL2-Qps3jeAu.js → c4Diagram-7LVT6UL2-yjY0BkxQ.js} +1 -1
  28. package/web-dist/assets/channel-mfsAVJLE.js +1 -0
  29. package/web-dist/assets/{chunk-2Q5K7J3B-CQMntzuX.js → chunk-2Q5K7J3B-DdgIvETg.js} +1 -1
  30. package/web-dist/assets/{chunk-5VM5RSS4-2H2ZJAte.js → chunk-5VM5RSS4-BE38k1Rs.js} +1 -1
  31. package/web-dist/assets/{chunk-F27PBJKO-B30xCNBv.js → chunk-F27PBJKO-D4YXmaqQ.js} +1 -1
  32. package/web-dist/assets/{chunk-IMKFNOWR-Cyfx4zDs.js → chunk-IMKFNOWR-CyJFdThc.js} +1 -1
  33. package/web-dist/assets/{chunk-JWPE2WC7-DADUytTh.js → chunk-JWPE2WC7-BAM_oEUU.js} +1 -1
  34. package/web-dist/assets/{chunk-POPQ4Y6H-9bjsAxLS.js → chunk-POPQ4Y6H-BP3D0FVi.js} +1 -1
  35. package/web-dist/assets/{chunk-SVP7TREG-B9xO1VpN.js → chunk-SVP7TREG-Clk8PdKZ.js} +1 -1
  36. package/web-dist/assets/{chunk-TICWLB2K-B6oDkrep.js → chunk-TICWLB2K-EvWPnEGg.js} +1 -1
  37. package/web-dist/assets/{chunk-XXDRQBXY-BbU8DR4B.js → chunk-XXDRQBXY-6p5D0UB1.js} +1 -1
  38. package/web-dist/assets/classDiagram-ZZMXUADV-BPVO1m8i.js +1 -0
  39. package/web-dist/assets/classDiagram-v2-VYDZK3BY-BPVO1m8i.js +1 -0
  40. package/web-dist/assets/{cose-bilkent-JH36ORCC-pkbuyec-.js → cose-bilkent-JH36ORCC-bpkI-tLJ.js} +1 -1
  41. package/web-dist/assets/{cynefin-OW5HDTMX-DU9YQQnc.js → cynefin-OW5HDTMX-srLaqJ4e.js} +1 -1
  42. package/web-dist/assets/{cynefinDiagram-5FMLGOSQ-3a3XuhQq.js → cynefinDiagram-5FMLGOSQ-BPfpHSPc.js} +1 -1
  43. package/web-dist/assets/{dagre-GXQ25YYZ-BfZ9C5CZ.js → dagre-GXQ25YYZ-C4fF5-j7.js} +1 -1
  44. package/web-dist/assets/{diagram-S7CK7UJ4-BoGhVBMn.js → diagram-S7CK7UJ4-BzBLb_9-.js} +1 -1
  45. package/web-dist/assets/{diagram-UQ7AKVKN-zE67quty.js → diagram-UQ7AKVKN-BJuJ1o_T.js} +1 -1
  46. package/web-dist/assets/{diagram-VSXAHHWV-NihoXeXm.js → diagram-VSXAHHWV-DFelN9i9.js} +1 -1
  47. package/web-dist/assets/{diagram-VX7I27RA-1627np0S.js → diagram-VX7I27RA-BgrEoPyp.js} +1 -1
  48. package/web-dist/assets/{diagram-Z3DM3KII-Ddg_bUan.js → diagram-Z3DM3KII-C71KiMiX.js} +1 -1
  49. package/web-dist/assets/{ebnfDiagram-PWID7BFC-CmPUOM4j.js → ebnfDiagram-PWID7BFC-EYteyp1b.js} +1 -1
  50. package/web-dist/assets/{erDiagram-RLTQ6QDP-DiTnEK72.js → erDiagram-RLTQ6QDP-B6n6-sz6.js} +1 -1
  51. package/web-dist/assets/{flowDiagram-HODETNUW-mGQ38tRM.js → flowDiagram-HODETNUW-BtoMTdyT.js} +1 -1
  52. package/web-dist/assets/{ganttDiagram-EL5Y4UJY-DU7MlzpW.js → ganttDiagram-EL5Y4UJY-CbOAa3vS.js} +1 -1
  53. package/web-dist/assets/{gitGraphDiagram-WWUBYQGX-CRE_3vjl.js → gitGraphDiagram-WWUBYQGX-B7-8sszH.js} +1 -1
  54. package/web-dist/assets/{highlighter-CzfXQ6yd.js → highlighter-Bj5l2XH_.js} +2 -2
  55. package/web-dist/assets/{highlighter-core-B5CvXcEK.js → highlighter-core-CMXoD8ze.js} +1 -1
  56. package/web-dist/assets/index-BOCqRT4e.css +1 -0
  57. package/web-dist/assets/index-BrMpjp2s.js +1286 -0
  58. package/web-dist/assets/{infoDiagram-27XIBGKW-Cdo6Ar-a.js → infoDiagram-27XIBGKW-BBjf6pkP.js} +1 -1
  59. package/web-dist/assets/{ishikawaDiagram-5VMMS53U-C27pgect.js → ishikawaDiagram-5VMMS53U-BBSvCv45.js} +1 -1
  60. package/web-dist/assets/{journeyDiagram-3NMN7TZE-CVxtKpLG.js → journeyDiagram-3NMN7TZE-CuHHl5zk.js} +1 -1
  61. package/web-dist/assets/{kanban-definition-UXKFOSKX-DWA31Da7.js → kanban-definition-UXKFOSKX-DJyP4Myw.js} +1 -1
  62. package/web-dist/assets/{layout-DWKCU9PO.js → layout-Bqqhdwtt.js} +1 -1
  63. package/web-dist/assets/{linear-BwCthj_k.js → linear-BZfUSIf8.js} +1 -1
  64. package/web-dist/assets/{mermaid.core-BcTrmPOv.js → mermaid.core-BlUspEsI.js} +6 -6
  65. package/web-dist/assets/{mindmap-definition-YA3MSWOX-BLEDhbn1.js → mindmap-definition-YA3MSWOX-BtyMD4wz.js} +1 -1
  66. package/web-dist/assets/{pegDiagram-XKGWAZYB-CLEM1SDU.js → pegDiagram-XKGWAZYB-BUF_GJ0B.js} +1 -1
  67. package/web-dist/assets/{pieDiagram-E7YTZNPT-B__g6eF0.js → pieDiagram-E7YTZNPT-nweubbsU.js} +1 -1
  68. package/web-dist/assets/{quadrantDiagram-AXDQQJYC-C7VQ2LMY.js → quadrantDiagram-AXDQQJYC-B_r4Wkxy.js} +1 -1
  69. package/web-dist/assets/{railroadDiagram-O6MQD6OU-eWNnzjwS.js → railroadDiagram-O6MQD6OU-Dn7nm0MX.js} +1 -1
  70. package/web-dist/assets/{requirementDiagram-BXWQKSXE-Bi5qeD4b.js → requirementDiagram-BXWQKSXE-DaagYJ49.js} +1 -1
  71. package/web-dist/assets/{sankeyDiagram-P5KCCOFB-DG1VOpXX.js → sankeyDiagram-P5KCCOFB-CqEX6H-B.js} +1 -1
  72. package/web-dist/assets/{sequenceDiagram-WJ2MYXX4-Fhkw73Th.js → sequenceDiagram-WJ2MYXX4-BzLfQO55.js} +1 -1
  73. package/web-dist/assets/{sizeCapture-INFHLROL-D9E_17SF.js → sizeCapture-INFHLROL-BcUuVH2L.js} +1 -1
  74. package/web-dist/assets/{stateDiagram-D77RDMKH-Cs5Y0xhW.js → stateDiagram-D77RDMKH-BO3LWLvT.js} +1 -1
  75. package/web-dist/assets/stateDiagram-v2-MP3YSRHH-B-EuucjM.js +1 -0
  76. package/web-dist/assets/{swimlanes-42K2YHIH-t-EocvKZ.js → swimlanes-42K2YHIH-etP_hkIB.js} +1 -1
  77. package/web-dist/assets/swimlanesDiagram-VR7AAH4N-0JbFdDbQ.js +8 -0
  78. package/web-dist/assets/{timeline-definition-24CTP7MA-CozGCxuA.js → timeline-definition-24CTP7MA-CTLt2XCT.js} +1 -1
  79. package/web-dist/assets/{vennDiagram-4TSXK5OY-ewU8ycSa.js → vennDiagram-4TSXK5OY-DPO6ZSvH.js} +1 -1
  80. package/web-dist/assets/{wardleyDiagram-VM6X3IG4-DuAhDu-0.js → wardleyDiagram-VM6X3IG4-DFofGg8b.js} +1 -1
  81. package/web-dist/assets/{xterm-v5e56GC9.js → xterm-RdyTuaAH.js} +1 -1
  82. package/web-dist/assets/{xychartDiagram-S5SC5T6Z-BxGuZO23.js → xychartDiagram-S5SC5T6Z-Bgtb34Gu.js} +1 -1
  83. package/web-dist/index.html +8 -3
  84. package/web-dist/{workflow-ui.css → workbench-ui.css} +72 -67
  85. package/dist/benchmark-package.d.ts +0 -39
  86. package/dist/benchmark-package.js +0 -97
  87. package/dist/benchmark-package.js.map +0 -1
  88. package/dist/chunk-54E64LWB.js +0 -63
  89. package/dist/chunk-54E64LWB.js.map +0 -1
  90. package/dist/chunk-5Z4UCHDB.js.map +0 -1
  91. package/dist/chunk-JKJXQTHH.js.map +0 -1
  92. package/dist/chunk-Q4ON2L6E.js +0 -52
  93. package/dist/chunk-Q4ON2L6E.js.map +0 -1
  94. package/dist/chunk-TOOTEEM4.js.map +0 -1
  95. package/web-dist/assets/channel--PblgLlC.js +0 -1
  96. package/web-dist/assets/classDiagram-ZZMXUADV-mn8tbuqa.js +0 -1
  97. package/web-dist/assets/classDiagram-v2-VYDZK3BY-mn8tbuqa.js +0 -1
  98. package/web-dist/assets/index-BdG4qRyI.js +0 -1275
  99. package/web-dist/assets/index-W-xYFoIm.css +0 -1
  100. package/web-dist/assets/stateDiagram-v2-MP3YSRHH-CEM51fAf.js +0 -1
  101. package/web-dist/assets/swimlanesDiagram-VR7AAH4N-BrR66vrK.js +0 -8
@@ -6,10 +6,10 @@ export { HarnessHistoryEntry, IfacesSummary } from '@prismshadow/penguin-core';
6
6
  import { IfacesDiff } from '@prismshadow/penguin-hmr';
7
7
  export { IfaceChange, IfacesDiff, MemberChange, ModuleChange } from '@prismshadow/penguin-hmr';
8
8
 
9
- /** A request the workflow's handler receives (the HTTP shape, minus the transport). */
10
- interface WorkflowRequest {
9
+ /** A request the workbench's handler receives (the HTTP shape, minus the transport). */
10
+ interface WorkbenchRequest {
11
11
  method: string;
12
- /** Path below the workflow's `api/` mount, always starting with `/`. */
12
+ /** Path below the workbench's `api/` mount, always starting with `/`. */
13
13
  path: string;
14
14
  query: Record<string, string>;
15
15
  /** Request headers, names lower-cased. The app's own credentials (`cookie`, `authorization`) are withheld. */
@@ -19,12 +19,12 @@ interface WorkflowRequest {
19
19
  /** The body as sent, when there is one and it is not JSON: a form, an upload, plain text. */
20
20
  bytes?: Uint8Array;
21
21
  }
22
- interface WorkflowResponse {
22
+ interface WorkbenchResponse {
23
23
  /** HTTP status; 200 when absent. */
24
24
  status?: number;
25
25
  /**
26
26
  * Response headers. Naming a `content-type` is what makes the response something other than
27
- * JSON; `location` with a 3xx status redirects. `set-cookie` is dropped — a workflow does not
27
+ * JSON; `location` with a 3xx status redirects. `set-cookie` is dropped — a workbench does not
28
28
  * write the app's cookies.
29
29
  */
30
30
  headers?: Record<string, string>;
@@ -42,8 +42,8 @@ interface WorkflowResponse {
42
42
  */
43
43
  stream?: AsyncIterable<Uint8Array | string>;
44
44
  }
45
- /** How the Web App draws a contributed tab: a page of the workflow, or a renderer it carries. */
46
- type WorkflowTabRenderer = {
45
+ /** How the Web App draws a contributed tab: a page of the workbench, or a renderer it carries. */
46
+ type WorkbenchTabRenderer = {
47
47
  iframe: {
48
48
  src: string;
49
49
  };
@@ -51,28 +51,28 @@ type WorkflowTabRenderer = {
51
51
  builtin: string;
52
52
  };
53
53
  /**
54
- * One tab beside Chat, as the workflow contributed it (`WebModule.sessionTabs`). In a
55
- * manifest `renderer.iframe.src` is a path inside the workflow folder, under `ui/`; in a
56
- * `WorkflowInfo` it is the URL that file is served from.
54
+ * One tab beside Chat, as the workbench contributed it (`WebModule.sessionTabs`). In a
55
+ * manifest `renderer.iframe.src` is a path inside the workbench folder, under `ui/`; in a
56
+ * `WorkbenchInfo` it is the URL that file is served from.
57
57
  */
58
- interface WorkflowTab {
58
+ interface WorkbenchTab {
59
59
  id: string;
60
- /** Unique within the workflow; the tab's stable name (it appears in the full-page URL). */
60
+ /** Unique within the workbench; the tab's stable name (it appears in the full-page URL). */
61
61
  key: string;
62
62
  title: string;
63
63
  titleZh?: string;
64
- renderer: WorkflowTabRenderer;
64
+ renderer: WorkbenchTabRenderer;
65
65
  }
66
- interface WorkflowInfo {
66
+ interface WorkbenchInfo {
67
67
  id: string;
68
68
  name: string;
69
69
  version: string | null;
70
70
  /** Content revision of the whole folder (what history records). */
71
71
  revision: string;
72
- /** Content revision of `ui/`: the cache key of the workflow's pages. Null when it has no `ui/`. */
72
+ /** Content revision of `ui/`: the cache key of the workbench's pages. Null when it has no `ui/`. */
73
73
  uiRev: string | null;
74
74
  /** The tabs of the instance that is SERVING — the previous one's while `error` is set. */
75
- tabs: WorkflowTab[];
75
+ tabs: WorkbenchTab[];
76
76
  loadedAt: string;
77
77
  /** The boot error when the current files do not load (the previous instance, if any, keeps serving). */
78
78
  error: string | null;
@@ -82,7 +82,7 @@ interface WorkflowInfo {
82
82
  */
83
83
  hints: string[];
84
84
  }
85
- interface WorkflowVersion {
85
+ interface WorkbenchVersion {
86
86
  revision: string;
87
87
  savedAt: string;
88
88
  name: string;
@@ -204,8 +204,9 @@ interface MeResponse {
204
204
  * "desktop" is the shell's own window (one-shot token); "setup" was claimed through the
205
205
  * first-login link on a server whose admin password has never been set. Both may set a
206
206
  * password without the old one (it is random and was never shown); only "desktop" opens
207
- * desktop-only routes. "token" marks a request authenticated by the local API token's
208
- * Bearer header (the CLI and agent-driven calls) — no stored session at all.
207
+ * desktop-only routes. "token" marks the local API token's authority, carried by a Bearer
208
+ * header or an exchanged Remote cookie; neither can perform writes requiring a person's
209
+ * sign-in.
209
210
  */
210
211
  sessionVia: "password" | "desktop" | "setup" | "token";
211
212
  /**
@@ -744,10 +745,11 @@ interface ModelsUpdateRequest {
744
745
  * `POST /models/sync-presets` (owner): `add` adds the catalog's presets the Project lacks
745
746
  * (retired rows never), as a new Project stores them, writes the catalog's
746
747
  * `[providers.<id>]` table for a group that has neither rows nor a table yet, and seeds the
747
- * added rows' promotions, touching nothing else; `restore` puts every built-in row and
748
- * built-in group table back to the catalog (facts reset, base URLs and protocols set on models
749
- * or groups return to the catalog's, keys and the user's own rows and groups kept, promotions
750
- * reset, deleted presets added back).
748
+ * added rows' promotions, touching nothing else; `restore` makes the model configuration a new
749
+ * Project's and keeps only the API keys: the presets in catalog order, the catalog's group
750
+ * tables, default model and promotions, no vision model, and every other row and every
751
+ * user-defined group deleted. Penguin Go included: its platform's next sync brings back the
752
+ * platform's own models and promotions.
751
753
  */
752
754
  type PresetSyncMode = "add" | "restore";
753
755
  interface PresetSyncRequest {
@@ -756,7 +758,7 @@ interface PresetSyncRequest {
756
758
  interface PresetSyncResponse extends ModelsResponse {
757
759
  /** Preset rows added (both modes). */
758
760
  added: number;
759
- /** Built-in rows reset to the catalog (`restore`; 0 for `add`). */
761
+ /** Preset rows the Project already had that `restore` changed (0 for `add`). */
760
762
  restored: number;
761
763
  }
762
764
  /**
@@ -1178,6 +1180,8 @@ interface AgentSummary {
1178
1180
  vaultKeyCount: number;
1179
1181
  /** Schedule count (number of .toml files under agent_state/schedule/, including invalid ones). */
1180
1182
  scheduleCount: number;
1183
+ /** Workbench folders with a manifest, including ones with a load error. */
1184
+ workbenchCount: number;
1181
1185
  /** Installed Skill count (number of agent_state/skills/<name>/ directories with a SKILL.md). */
1182
1186
  skillCount: number;
1183
1187
  /** Installed hook-package count (number of agent_state/hooks/<name>/ directories with a hooks.json). */
@@ -1438,6 +1442,14 @@ interface AgentApiSettings {
1438
1442
  * change here applies to API Sessions created afterwards.
1439
1443
  */
1440
1444
  approvalMode: ApprovalMode;
1445
+ /** Null follows the Project's default model. Applied only to new API Sessions. */
1446
+ model: ModelRefDto | null;
1447
+ /** Null follows the Agent/Project thinking configuration. */
1448
+ thinkingLevel: ThinkingLevelName | null;
1449
+ /** Null creates a temporary Workspace for each new API Session. */
1450
+ workspace: string | null;
1451
+ /** Positive integer. Checked for each API run; defaults to four concurrent Agent sessions. */
1452
+ maxConcurrentRuns: number;
1441
1453
  keys: AgentApiKeyInfo[];
1442
1454
  }
1443
1455
  interface AgentApiResponse {
@@ -1453,6 +1465,10 @@ interface AgentApiUpdateRequest {
1453
1465
  enabled?: boolean;
1454
1466
  open?: boolean;
1455
1467
  approvalMode?: ApprovalMode;
1468
+ model?: ModelRefDto | null;
1469
+ thinkingLevel?: ThinkingLevelName | null;
1470
+ workspace?: string | null;
1471
+ maxConcurrentRuns?: number;
1456
1472
  }
1457
1473
  /** POST …/api/keys body (owner only). */
1458
1474
  interface AgentApiKeyCreateRequest {
@@ -1702,7 +1718,7 @@ interface SessionInfo {
1702
1718
  * What kind of conversation this is, read from core session_meta — the single source of
1703
1719
  * truth (the DB stores no source). With the user's marks it decides where the Session is
1704
1720
  * listed (`archived`): a `user` Session is in the sidebar until archived; an `api`,
1705
- * `schedule` or `cli` Session is archived until the user keeps it, and in the sidebar marked
1721
+ * `schedule`, `cli` or `workbench` Session is archived until the user keeps it, and in the sidebar marked
1706
1722
  * with its source once kept; a `subagent` or `company` Session is in no list — its parent's
1707
1723
  * Agent panel and company mode's own views open them. A Trace head that records no source
1708
1724
  * (written before it was required) reads as `company` for a row the organization runtime
@@ -1737,7 +1753,7 @@ interface SessionInfo {
1737
1753
  hasTrace: boolean;
1738
1754
  /**
1739
1755
  * Whether the Session is archived — the listing rule's answer, never the bare mark: the user
1740
- * archived it, or a program opened it (source `api`, `schedule` or `cli`) and the user has
1756
+ * archived it, or a program opened it (source `api`, `schedule`, `cli` or `workbench`) and the user has
1741
1757
  * not kept it. An archived Session is left out of the sidebar and listed on the archive page
1742
1758
  * (`/api/me/archived-sessions`). Always false for a `subagent` or `company` Session, which is
1743
1759
  * in no list.
@@ -1772,7 +1788,7 @@ interface SessionInfo {
1772
1788
  * the organization and is not read while company mode is off — this is a durable stamp on
1773
1789
  * the row: development mode's list hides an "org" Session either way.
1774
1790
  */
1775
- client?: "web" | "cli" | "org" | "api";
1791
+ client?: "web" | "cli" | "org" | "api" | "workbench";
1776
1792
  /**
1777
1793
  * Background work the Session's loaded runtime still owns: command sessions running past
1778
1794
  * their yield window (`exec_command` promotions and `run_in_background` launches) and
@@ -1793,7 +1809,7 @@ interface SessionBackgroundTasks {
1793
1809
  }
1794
1810
  /**
1795
1811
  * Session list category, the listing rule applied server-side: `archived` when the user
1796
- * archived the Session, or when a program opened it (source `api`, `schedule` or `cli`) and the
1812
+ * archived the Session, or when a program opened it (source `api`, `schedule`, `cli` or `workbench`) and the
1797
1813
  * user has not kept it — unarchiving keeps it; otherwise `active`. A `subagent` or `company`
1798
1814
  * Session belongs to neither, whatever its marks: the list leaves it out of every category and
1799
1815
  * every total (a parent's Agent panel and company mode's own views open them).
@@ -1858,7 +1874,7 @@ interface SessionsResponse {
1858
1874
  * `user`, or a row whose Trace has not been read yet); the other three are what a program
1859
1875
  * opened. `subagent` and `company` Sessions are never archived, so never listed.
1860
1876
  */
1861
- type ArchivedSessionSource = "user" | "api" | "schedule" | "cli";
1877
+ type ArchivedSessionSource = "user" | "api" | "schedule" | "cli" | "workbench";
1862
1878
  /** Query of GET /api/me/archived-sessions/groups, and the part every archive query shares. */
1863
1879
  interface ArchivedSessionsQuery {
1864
1880
  /** Case-insensitive substring of the title (the DB title, else the Trace's first-prompt title); at most 200 characters. */
@@ -2202,6 +2218,11 @@ interface MessagesPageInfo {
2202
2218
  * window is told from a plain rotation. Absent when the Session has no Trace yet.
2203
2219
  */
2204
2220
  contextModel?: ModelRefDto;
2221
+ /**
2222
+ * Agent State directory recorded by the starting context's `session_meta`. Seeds memory
2223
+ * change detection when that record falls before the window. Absent without a Trace.
2224
+ */
2225
+ agentState?: string;
2205
2226
  }
2206
2227
  /** Message history: the full messages and events from concatenating all of this Session's Trace files in order (excludes partial_*). */
2207
2228
  interface MessagesResponse {
@@ -3198,19 +3219,19 @@ type ScheduleServerEvent =
3198
3219
  name: string;
3199
3220
  sessionId: string;
3200
3221
  }
3201
- /** A workflow of the Agent was (re)loaded — its folder changed, a reload was requested, or a version was restored. */
3222
+ /** A workbench of the Agent was (re)loaded — its folder changed, a reload was requested, or a version was restored. */
3202
3223
  | {
3203
- type: "workflow_updated";
3224
+ type: "workbench_updated";
3204
3225
  projectId: string;
3205
3226
  agentId: string;
3206
- workflow: WorkflowInfo;
3227
+ workbench: WorkbenchInfo;
3207
3228
  }
3208
- /** A workflow's folder is gone — removed from the Web App or deleted on disk. */
3229
+ /** A workbench's folder is gone — removed from the Web App or deleted on disk. */
3209
3230
  | {
3210
- type: "workflow_removed";
3231
+ type: "workbench_removed";
3211
3232
  projectId: string;
3212
3233
  agentId: string;
3213
- workflowId: string;
3234
+ workbenchId: string;
3214
3235
  };
3215
3236
  interface TraceFileInfo {
3216
3237
  /** Trace file index (one file corresponds to one complete model context). */
@@ -4206,10 +4227,8 @@ interface BenchmarkArchiveImportRequest {
4206
4227
  */
4207
4228
  overwrite?: boolean;
4208
4229
  /**
4209
- * The repository folder the package was fetched from, at one commit: what
4210
- * `penguin benchmark import --origin-url … --origin-ref … --origin-path …` sends for an Agent's
4211
- * import of a folder link. The copy's origin is then `git` with these fields and the time of the
4212
- * import, instead of `zip`.
4230
+ * The repository folder the package was fetched from, pinned to one commit. The copy's origin
4231
+ * is then `git` with these fields and the import time, instead of `zip`.
4213
4232
  */
4214
4233
  origin?: BenchmarkArchiveGitOrigin;
4215
4234
  }
@@ -4286,6 +4305,10 @@ interface PluginItem {
4286
4305
  repository?: string;
4287
4306
  /** The plugin's skills (metadata only), each with its own dated `version`. */
4288
4307
  skills: SkillMetadataItem[];
4308
+ workbenches?: Array<{
4309
+ name: string;
4310
+ version: string;
4311
+ }>;
4289
4312
  /** The hook points the plugin's hook package answers at (`[]` without one). */
4290
4313
  hooks: string[];
4291
4314
  /** The hook package's own dated version (`penguin.hooks.version`, `YYYY.MM.DD.N`); absent without a hook package. */
@@ -4359,6 +4382,11 @@ interface PluginInstallRequest {
4359
4382
  names: string[];
4360
4383
  }
4361
4384
  interface AgentPluginsInstallResponse {
4385
+ workbenches?: Array<{
4386
+ name: string;
4387
+ plugin: string;
4388
+ version: string;
4389
+ }>;
4362
4390
  skills: SkillMetadataItem[];
4363
4391
  hooks: HookItem[];
4364
4392
  /** The Agent's MCP servers after the install (a plugin's servers join its `tools.mcpServers`). A server name the Agent already has from someone else is 409 `mcp_server_name_taken`, nothing installed. */
@@ -4428,6 +4456,9 @@ interface SkillArchiveInstallRequest {
4428
4456
  interface PluginIndexEntry {
4429
4457
  /** Package specifier — the string a Project's plugin list names. */
4430
4458
  name: string;
4459
+ /** Localized display names; the UI falls back to the package name. */
4460
+ title?: string;
4461
+ titleZh?: string;
4431
4462
  /** Semantic version of this entry. */
4432
4463
  version: string;
4433
4464
  description: string;
@@ -6380,6 +6411,10 @@ interface BrowserLinkCapabilities {
6380
6411
  */
6381
6412
  interface BuiltinBrowserTab {
6382
6413
  id: number;
6414
+ /** The built-in tab belongs to this conversation; absent for pages opened outside a conversation. */
6415
+ sessionId?: string;
6416
+ /** Electron storage partition, shared only within this tab's Project. */
6417
+ partition?: string;
6383
6418
  url: string;
6384
6419
  title: string;
6385
6420
  loading: boolean;
@@ -6618,6 +6653,8 @@ interface BuiltinBrowserImportSourcesResponse {
6618
6653
  }
6619
6654
  /** POST /api/builtin-browser/import. */
6620
6655
  interface BuiltinBrowserImportRequest {
6656
+ sessionId?: string;
6657
+ projectId?: string;
6621
6658
  sourceId: string;
6622
6659
  cookies?: boolean;
6623
6660
  history?: boolean;
@@ -6682,6 +6719,7 @@ type BuiltinBrowserServerEvent =
6682
6719
  /** Create a guest for `url`, then POST /tabs/claim with `requestId` once it has a webContents id. */
6683
6720
  | {
6684
6721
  type: "builtin_browser_open";
6722
+ partition?: string;
6685
6723
  requestId: string;
6686
6724
  url: string;
6687
6725
  activate: boolean;
@@ -6690,6 +6728,12 @@ type BuiltinBrowserServerEvent =
6690
6728
  } | {
6691
6729
  type: "builtin_browser_close";
6692
6730
  tabId: number;
6731
+ }
6732
+ /** A draft or healed conversation acquired its permanent id. */
6733
+ | {
6734
+ type: "builtin_browser_session";
6735
+ fromSessionId: string;
6736
+ sessionId: string;
6693
6737
  } | {
6694
6738
  type: "builtin_browser_activity";
6695
6739
  tabId: number;
@@ -6757,11 +6801,13 @@ type DesktopBrowserCommand =
6757
6801
  | {
6758
6802
  op: "set-cookies";
6759
6803
  cookies: DesktopBrowserCookie[];
6804
+ partition?: string;
6760
6805
  }
6761
6806
  /** Reply: `{}`. */
6762
6807
  | {
6763
6808
  op: "clear-data";
6764
6809
  storages: ("cookies" | "cache" | "storage")[];
6810
+ partition?: string;
6765
6811
  }
6766
6812
  /**
6767
6813
  * Reply: `{}`. The tabs whose pages may be throttled while out of sight (Electron's background
@@ -6885,4 +6931,4 @@ interface DesktopBrowserEventMessage {
6885
6931
  event: DesktopBrowserEvent;
6886
6932
  }
6887
6933
 
6888
- export { 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 MachineInfo, type MachineJob, type MachinePhase, type MachineReconnect, type MachineServerEvent, type MachineServerStatus, type MachineSkippedModel, 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 MessagingBindingCommon, type MessagingBindingInfo, type MessagingBindingStateRequest, type MessagingBindingsResponse, type MessagingChannel, type MessagingChannelState, type MessagingDeliveryError, type MessagingDeliveryPatch, type MessagingRuntimeState, type MessagingRuntimeStatus, type MessagingTestMessageResponse, 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 WorkflowInfo, type WorkflowRequest, type WorkflowResponse, type WorkflowVersion, type WorkspaceFileEntry, type WorkspaceFilesResponse, type WorkspaceSearchHit, type WorkspaceSearchResponse };
6934
+ export { 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 MachineInfo, type MachineJob, type MachinePhase, type MachineReconnect, type MachineServerEvent, type MachineServerStatus, type MachineSkippedModel, 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 MessagingBindingCommon, type MessagingBindingInfo, type MessagingBindingStateRequest, type MessagingBindingsResponse, type MessagingChannel, type MessagingChannelState, type MessagingDeliveryError, type MessagingDeliveryPatch, type MessagingRuntimeState, type MessagingRuntimeStatus, type MessagingTestMessageResponse, 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 };
package/dist/api/types.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MACHINE_PHASES,
3
3
  TICKET_SLUG_PATTERN
4
- } from "../chunk-JKJXQTHH.js";
4
+ } from "../chunk-W7JNIJ25.js";
5
5
  import "../chunk-B5IP37ZQ.js";
6
6
  export {
7
7
  MACHINE_PHASES,
@@ -1,5 +1,5 @@
1
1
  /** How a session was established, as stored. NULL on rows formed before the column existed. */
2
- type SessionViaValue = "password" | "desktop" | "setup" | "cli";
2
+ type SessionViaValue = "password" | "desktop" | "setup" | "cli" | "remote";
3
3
 
4
4
  /** An hour: long enough for a controller to finish, short enough to forget. */
5
5
  declare const CLI_TOKEN_TTL_MS: number;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  AuthSessionsRepo,
3
3
  UsersRepo
4
- } from "./chunk-TOOTEEM4.js";
4
+ } from "./chunk-G7GY7PJU.js";
5
5
  import {
6
6
  openExistingDatabase
7
- } from "./chunk-NVWAYYRX.js";
7
+ } from "./chunk-3SFJKLQU.js";
8
8
  import "./chunk-B5IP37ZQ.js";
9
9
 
10
10
  // src/auth-token.ts
@@ -552,6 +552,36 @@ var MIGRATIONS = [
552
552
  // background Session away again.
553
553
  down() {
554
554
  }
555
+ },
556
+ {
557
+ version: 17,
558
+ name: "agent-api-session-settings",
559
+ // Retain until the minimum supported database version exceeds 16; the maintainer raising
560
+ // that baseline removes this upgrade after all supported data roots have these columns.
561
+ // Nullable additions preserve existing keys, exposure, approvals and new-Session defaults.
562
+ swapSafe: true,
563
+ up(db) {
564
+ ensureColumn(db, "agent_api", "provider", "TEXT");
565
+ ensureColumn(db, "agent_api", "model_id", "TEXT");
566
+ ensureColumn(db, "agent_api", "thinking_level", "TEXT");
567
+ ensureColumn(db, "agent_api", "workspace", "TEXT");
568
+ },
569
+ // Keep the saved defaults on rollback; older builds ignore the additional columns.
570
+ down() {
571
+ }
572
+ },
573
+ {
574
+ version: 18,
575
+ name: "agent-api-concurrency",
576
+ // Retain until the minimum supported database version exceeds 17. The maintainer raising
577
+ // that baseline removes this upgrade once every supported data root has the column.
578
+ swapSafe: true,
579
+ up(db) {
580
+ ensureColumn(db, "agent_api", "max_concurrent_runs", "INTEGER NOT NULL DEFAULT 4");
581
+ },
582
+ // Keep the configured limit on rollback; older builds ignore this column.
583
+ down() {
584
+ }
555
585
  }
556
586
  ];
557
587
  var LATEST_VERSION = MIGRATIONS.reduce((n, m) => Math.max(n, m.version), 0);
@@ -629,7 +659,7 @@ CREATE TABLE IF NOT EXISTS auth_sessions (
629
659
  user_id TEXT NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,
630
660
  created_at TEXT NOT NULL,
631
661
  expires_at TEXT NOT NULL, -- 30-day sliding renewal, topped up in place when <29 days remain
632
- via TEXT -- 'password'|'desktop'|'setup'|'cli'; NULL = legacy (password)
662
+ via TEXT -- 'password'|'desktop'|'setup'|'cli'|'remote'; NULL = legacy (password)
633
663
  );
634
664
  -- deleteExpired runs on every login and mint, deleteByUser on every admin reset; without
635
665
  -- these both scan the whole table.
@@ -766,7 +796,12 @@ CREATE TABLE IF NOT EXISTS agent_api ( -- per-Agent public API settings
766
796
  agent_id TEXT NOT NULL,
767
797
  enabled INTEGER NOT NULL DEFAULT 0, -- the API tab's switch; off = every /api/amsp request for it is 404 agent_not_found
768
798
  open INTEGER NOT NULL DEFAULT 0, -- keyless access: a request without Authorization is accepted; off = 401 unauthorized
769
- approval_mode TEXT NOT NULL DEFAULT 'allow-all', -- the approval mode an API Session is CREATED with (allow-all|deny-all|read-only|always-ask); copied onto sessions.approval_mode, never read per decision
799
+ approval_mode TEXT NOT NULL DEFAULT 'allow-all', -- copied onto each new API Session
800
+ provider TEXT, -- NULL pair follows the Project default model
801
+ model_id TEXT,
802
+ thinking_level TEXT, -- NULL follows Agent/Project configuration
803
+ workspace TEXT, -- NULL creates a temporary Workspace
804
+ max_concurrent_runs INTEGER NOT NULL DEFAULT 4,
770
805
  updated_at TEXT NOT NULL,
771
806
  PRIMARY KEY (project_id, agent_id)
772
807
  );
@@ -978,4 +1013,4 @@ export {
978
1013
  openDatabaseReadOnly,
979
1014
  openDatabase
980
1015
  };
981
- //# sourceMappingURL=chunk-NVWAYYRX.js.map
1016
+ //# sourceMappingURL=chunk-3SFJKLQU.js.map