@prismshadow/penguin-server 0.2.11 → 0.2.13

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 (80) hide show
  1. package/README.md +1 -1
  2. package/dist/api/types.d.ts +1014 -12
  3. package/dist/api/types.js +7 -0
  4. package/dist/auth-token.js +6 -4
  5. package/dist/auth-token.js.map +1 -1
  6. package/dist/{chunk-Q65VPAQS.js → chunk-3I2XOPJB.js} +102 -55
  7. package/dist/chunk-3I2XOPJB.js.map +1 -0
  8. package/dist/{chunk-ADZJYDNC.js → chunk-A3QANMU5.js} +293 -3
  9. package/dist/chunk-A3QANMU5.js.map +1 -0
  10. package/dist/chunk-B5IP37ZQ.js +56 -0
  11. package/dist/chunk-L2H3K4DT.js +7 -0
  12. package/dist/chunk-L2H3K4DT.js.map +1 -0
  13. package/dist/chunk-LPPVGHYD.js +83 -0
  14. package/dist/chunk-LPPVGHYD.js.map +1 -0
  15. package/dist/{chunk-TTGGJDNA.js → chunk-S3BI6R7I.js} +2 -2
  16. package/dist/{chunk-HOS3W3UP.js → chunk-TOOTEEM4.js} +50 -8
  17. package/dist/chunk-TOOTEEM4.js.map +1 -0
  18. package/dist/hmr/manifest.d.ts +1 -77
  19. package/dist/hmr/manifest.js +6 -1
  20. package/dist/index.js +50757 -20174
  21. package/dist/index.js.map +1 -1
  22. package/dist/initial-password.js +1 -0
  23. package/dist/lock.js +1 -0
  24. package/dist/machine-status.js +2 -1
  25. package/dist/machine-status.js.map +1 -1
  26. package/dist/plugin/index.d.ts +2595 -0
  27. package/dist/plugin/index.js.map +1 -0
  28. package/dist/reset-admin-password.js +7 -5
  29. package/dist/reset-admin-password.js.map +1 -1
  30. package/dist/secret-file.js +2 -0
  31. package/dist/secret-file.js.map +1 -1
  32. package/dist/version-report.js +3 -2
  33. package/package.json +11 -9
  34. package/web-dist/assets/{addon-clipboard-1cARCaK9.js → addon-clipboard-DrZY90Ks.js} +1 -1
  35. package/web-dist/assets/{addon-fit-BWdzl8Er.js → addon-fit-CtEAdAax.js} +1 -1
  36. package/web-dist/assets/{addon-web-links-DjXuvn4Z.js → addon-web-links-DJL13cYY.js} +1 -1
  37. package/web-dist/assets/c-BG-tZi7o.js +1 -0
  38. package/web-dist/assets/cpp-CaeG3uDQ.js +1 -0
  39. package/web-dist/assets/css-Br67jR8j.js +1 -0
  40. package/web-dist/assets/diff-jW5kmiru.js +1 -0
  41. package/web-dist/assets/github-dark-BQV5ugrc.js +1 -0
  42. package/web-dist/assets/github-light-Rcb2q3L5.js +1 -0
  43. package/web-dist/assets/go-B7VTfpnm.js +1 -0
  44. package/web-dist/assets/highlighter-CUb4XKtQ.js +2 -0
  45. package/web-dist/assets/{highlighter-Cu43iYr8.js → highlighter-core-CrBdruEx.js} +2 -2
  46. package/web-dist/assets/highlighter.worker-CL6f9Fzw.js +152 -0
  47. package/web-dist/assets/html-BW_6VhB7.js +1 -0
  48. package/web-dist/assets/index-CmfumtXy.js +570 -0
  49. package/web-dist/assets/index-Ywc2uM5u.css +1 -0
  50. package/web-dist/assets/ini-Dix3pTmg.js +1 -0
  51. package/web-dist/assets/java-BTDmaRNO.js +1 -0
  52. package/web-dist/assets/javascript-WyGyM1wV.js +1 -0
  53. package/web-dist/assets/json-B8JryHcM.js +1 -0
  54. package/web-dist/assets/jsx-8cLv2Six.js +1 -0
  55. package/web-dist/assets/log-CcaF_xNv.js +1 -0
  56. package/web-dist/assets/markdown-DX-TNHnc.js +1 -0
  57. package/web-dist/assets/php-CNeTOyEV.js +1 -0
  58. package/web-dist/assets/python-B6Ihcp-E.js +1 -0
  59. package/web-dist/assets/ruby-CYiNE6ps.js +1 -0
  60. package/web-dist/assets/rust-CxuBE0J8.js +1 -0
  61. package/web-dist/assets/shellscript-DgJyDXW6.js +1 -0
  62. package/web-dist/assets/sql-Dq2MiB0T.js +1 -0
  63. package/web-dist/assets/toml-Ms459DBw.js +1 -0
  64. package/web-dist/assets/tsx-D6116Ycy.js +1 -0
  65. package/web-dist/assets/typescript-BqvgUolh.js +1 -0
  66. package/web-dist/assets/xml-BkAJuBCc.js +1 -0
  67. package/web-dist/assets/{xterm-DKcY6q-I.js → xterm-B2oS8Mg8.js} +1 -1
  68. package/web-dist/assets/yaml-Bopit2L3.js +1 -0
  69. package/web-dist/index.html +2 -2
  70. package/dist/chunk-4SXGU7RO.js +0 -50
  71. package/dist/chunk-4SXGU7RO.js.map +0 -1
  72. package/dist/chunk-ADZJYDNC.js.map +0 -1
  73. package/dist/chunk-HOS3W3UP.js.map +0 -1
  74. package/dist/chunk-Q65VPAQS.js.map +0 -1
  75. package/dist/extension/index.d.ts +0 -212
  76. package/web-dist/assets/index-Bm9n7ZV-.js +0 -457
  77. package/web-dist/assets/index-DR4PrRzS.css +0 -1
  78. /package/dist/{extension/index.js.map → chunk-B5IP37ZQ.js.map} +0 -0
  79. /package/dist/{chunk-TTGGJDNA.js.map → chunk-S3BI6R7I.js.map} +0 -0
  80. /package/dist/{extension → plugin}/index.js +0 -0
@@ -29,8 +29,8 @@ interface ErrorBody {
29
29
  type ApprovalMode = "allow-all" | "deny-all" | "read-only" | "always-ask";
30
30
  /** Session run status: idle / Task in progress / compacting. */
31
31
  type SessionStatus = "idle" | "running" | "compacting";
32
- /** Session source marker (default = user-created): triggered by Schedule / registered as a subagent session. */
33
- type SessionSource = "schedule" | "subagent";
32
+ /** Session source marker (default = user-created): triggered by Schedule / registered as a subagent session / created by a Benchmark evaluation or optimization. */
33
+ type SessionSource = "schedule" | "subagent" | "benchmark";
34
34
  interface UserInfo {
35
35
  /** Semantic id, i.e. login name: `^[a-z][a-z0-9_-]{1,31}$`, immutable after creation. */
36
36
  userId: string;
@@ -38,8 +38,31 @@ interface UserInfo {
38
38
  isAdmin: boolean;
39
39
  /** Still using the initial password (seeded/set by admin): frontend prompts the user to change it soon. */
40
40
  passwordIsInitial: boolean;
41
+ /**
42
+ * Nickname the account chose (1-32 characters), shown wherever the id would otherwise be.
43
+ * Omitted when unset — every account that predates the Profile page starts without one, and
44
+ * a surface with no value falls back to `userId`.
45
+ */
46
+ displayName?: string;
47
+ /**
48
+ * Avatar as a `data:image/...;base64,` URL, at most 131072 characters. Omitted when unset,
49
+ * and a surface with no value draws the letter placeholder instead.
50
+ */
51
+ avatar?: string;
41
52
  createdAt: string;
42
53
  }
54
+ /**
55
+ * PUT /api/me/profile — a patch, not a replacement: an absent field keeps what is stored,
56
+ * `null` clears it, a string sets it. A body naming neither field is a 400, since it can only
57
+ * be a mistake.
58
+ */
59
+ interface UpdateProfileRequest {
60
+ displayName?: string | null;
61
+ avatar?: string | null;
62
+ }
63
+ interface UpdateProfileResponse {
64
+ user: UserInfo;
65
+ }
43
66
  interface AuthLoginRequest {
44
67
  userId: string;
45
68
  password: string;
@@ -95,6 +118,12 @@ interface MeResponse {
95
118
  * just an admin's.
96
119
  */
97
120
  uploadLimits: UploadLimits;
121
+ /**
122
+ * Whether company mode is enabled server-wide (the admin switch in server settings, default
123
+ * on). Off hides the mode switch in every client and 404s every organization route; the
124
+ * user's own preference (`UiPrefs.companyMode`) only hides the switch for that user.
125
+ */
126
+ companyMode: boolean;
98
127
  }
99
128
  /**
100
129
  * Upload limits as the web app sees them: whole MB, the same unit the admin form uses, so the
@@ -184,6 +213,13 @@ interface ServerSettings {
184
213
  * image and the JSON framing), which is why raising it needs no separate setting.
185
214
  */
186
215
  attachmentTotalMb: number;
216
+ /**
217
+ * Company mode master switch (default on). Off stops the organization scheduler (no
218
+ * calendar event or chat mention fires, nothing is backfilled when it is turned on again),
219
+ * every `/api/projects/:projectId/organizations` route answers 404, and `GET /api/me`
220
+ * reports it so clients hide the mode switch. Organizations on disk are untouched.
221
+ */
222
+ companyMode: boolean;
187
223
  }
188
224
  interface ServerSettingsResponse {
189
225
  settings: ServerSettings;
@@ -192,6 +228,8 @@ interface ServerSettingsResponse {
192
228
  interface ServerSettingsUpdateRequest {
193
229
  proxyForApp?: boolean;
194
230
  proxyForAgent?: boolean;
231
+ /** Company mode master switch; see `ServerSettings.companyMode`. */
232
+ companyMode?: boolean;
195
233
  /**
196
234
  * New proxy address. Accepted forms: any proxy URL undici's dispatcher takes —
197
235
  * `http://`, `https://`, `socks5://` / `socks://`, credentials allowed — or bare
@@ -214,6 +252,53 @@ interface ServerSettingsUpdateRequest {
214
252
  */
215
253
  attachmentTotalMb?: number;
216
254
  }
255
+ /**
256
+ * The endpoints the proxy reachability probe covers. A fixed list: the route takes a provider
257
+ * id from this set and never a URL, so nothing a caller sends decides what the server fetches.
258
+ *
259
+ * GLM is two entries rather than one because it is two hosts: Z.AI serves the global endpoint
260
+ * and BigModel the mainland one, they are reached over different routes, and a proxy can carry
261
+ * one and not the other.
262
+ */
263
+ type ProxyProbeProvider = "openai" | "anthropic" | "gemini" | "deepseek" | "zai" | "bigmodel";
264
+ /**
265
+ * One probe's verdict. `reachable` means an HTTP answer arrived, whatever its status — a
266
+ * rejected credential still proves the whole path works. The rest are transport failures,
267
+ * named so a proxy that swallows connections can be told apart from one whose address does
268
+ * not resolve: `timeout` (no answer within the probe's window), `dns` (the name never
269
+ * became an address), `refused` (the connection was refused at the TCP level), `tls` (the
270
+ * handshake or the certificate failed) and `network` (anything else).
271
+ */
272
+ type ProxyProbeOutcome = "reachable" | "timeout" | "dns" | "refused" | "tls" | "network";
273
+ /**
274
+ * One probe target. Served before any probe runs so the page can list what it is about to
275
+ * request — the URLs are the concrete answer to "what does no API key mean here".
276
+ */
277
+ interface ProxyProbeTargetDto {
278
+ provider: ProxyProbeProvider;
279
+ /** The exact URL a probe requests, unauthenticated. */
280
+ url: string;
281
+ }
282
+ /** What the probe endpoint would request, without requesting it. */
283
+ interface ProxyProbeTargetsResponse {
284
+ targets: ProxyProbeTargetDto[];
285
+ }
286
+ /** One provider's probe result. */
287
+ interface ProxyProbeDto extends ProxyProbeTargetDto {
288
+ outcome: ProxyProbeOutcome;
289
+ /** Wall time in milliseconds until the answer's headers arrived, or until the attempt failed. */
290
+ ms: number;
291
+ /** The HTTP status, present only when `outcome` is `reachable`. */
292
+ status?: number;
293
+ }
294
+ /**
295
+ * One probe's answer. The route measures a single target per call: the page asks for all of
296
+ * them at once and fills each row the moment its own answer lands, so one black-holed host
297
+ * cannot hold every other result behind its timeout.
298
+ */
299
+ interface ProxyProbeResponse {
300
+ probe: ProxyProbeDto;
301
+ }
217
302
  /**
218
303
  * One draft-screen shortcut: a prompt the user wrote, filed under a name they chose. Clicking it
219
304
  * fills the composer exactly like a built-in example does, and sends nothing. Deliberately holds
@@ -249,6 +334,12 @@ interface UiPrefs {
249
334
  * known key holding user-authored text rather than a flag or an id.
250
335
  */
251
336
  draftShortcuts?: DraftShortcut[];
337
+ /** Personal company-mode switch (default on): off only hides this user's mode switch; organizations keep running. */
338
+ companyMode?: boolean;
339
+ /** The work mode the user last chose in the shell: development (default) or company. */
340
+ workMode?: "dev" | "company";
341
+ /** The organization last opened in company mode, as `<projectId>/<orgId>`. */
342
+ lastOrgKey?: string;
252
343
  [key: string]: unknown;
253
344
  }
254
345
  interface PrefsResponse {
@@ -328,7 +419,12 @@ interface ModelInfo {
328
419
  provider: string;
329
420
  /** Upstream model id (the request id actually sent to AgentHub); paired with `provider` forms the entry's unique key. */
330
421
  modelId: string;
331
- /** Display name: explicit TOML field (user-edited) takes priority, then the built-in catalog; falls back to unset (frontend shows modelId). */
422
+ /**
423
+ * Display name: explicit TOML field (user-edited) takes priority, then the built-in catalog;
424
+ * falls back to unset (frontend shows modelId). The empty string is reported as such and
425
+ * means the user cleared the name on a model the catalog does name — render it as modelId,
426
+ * and send it back unchanged, since absent would ask for the catalog's name instead.
427
+ */
332
428
  displayName?: string;
333
429
  contextWindow?: number;
334
430
  /** AgentHub client protocol (`openai-chat`, `openai-responses`, etc.); defaults to AgentHub inferring it from modelId. */
@@ -387,7 +483,11 @@ interface ModelUpdateEntry {
387
483
  provider: string;
388
484
  /** Upstream model id (sent to AgentHub as-is). */
389
485
  modelId: string;
390
- /** Display name; the server does not persist it when it matches the built-in catalog (keeps the config file clean). */
486
+ /**
487
+ * Display name; the server does not persist it when it matches the built-in catalog (keeps
488
+ * the config file clean). Absent and empty are different requests: absent inherits whatever
489
+ * the catalog calls the model, the empty string records that the user cleared the name.
490
+ */
391
491
  displayName?: string;
392
492
  /**
393
493
  * The pair reference this entry was renamed from (provided when either the group or the
@@ -540,10 +640,22 @@ interface ModelProtocolProbeDto {
540
640
  /** HTTP status, when a response arrived at all. */
541
641
  status?: number;
542
642
  }
543
- /** Detection result: probes run sequentially and stop at the first served protocol, so `probes` lists only the ones actually run, in order. */
643
+ /**
644
+ * Detection result: probes run sequentially over the candidate base URLs derived from the
645
+ * one that was typed and stop at the first served protocol, so `probes` lists only the
646
+ * ones actually run, in order.
647
+ */
544
648
  interface ModelProtocolDetectResponse {
545
- /** The first protocol the endpoint serves (an AgentHub client type); absent when none of the three matched. */
649
+ /** The first protocol an endpoint serves (an AgentHub client type); absent when none of the three matched. */
546
650
  detected?: string;
651
+ /**
652
+ * The base URL the detected protocol answered at — the typed URL normalized (endpoint
653
+ * path stripped, repeated `/v1` collapsed) and possibly with a trailing `/v1` added or
654
+ * removed, so `https://host/v1/chat/completions` comes back as `https://host/v1`.
655
+ * Present only alongside `detected`; callers write it back into their base URL field,
656
+ * since that is where the protocol is served.
657
+ */
658
+ baseUrl?: string;
547
659
  probes: ModelProtocolProbeDto[];
548
660
  }
549
661
  /**
@@ -1111,6 +1223,25 @@ interface SessionInfo {
1111
1223
  tracePath?: string;
1112
1224
  /** Present when the Session has an ENABLED messaging binding: its channel (the sidebar row's per-channel indicator). */
1113
1225
  messagingChannel?: MessagingChannel;
1226
+ /**
1227
+ * Company mode: the organization that owns this Session — a desk session of one of its
1228
+ * employees, or a session contributing to one of its tickets — read from the organization
1229
+ * caches. Absent for every ordinary Session. Development mode's list and its time buckets
1230
+ * hide every row that carries it (only while company mode is available to that user: it is
1231
+ * stamped either way, and company mode is what lists these Sessions instead), and the
1232
+ * company sidebar's 工位 / 工单会话 groups are where they are listed.
1233
+ */
1234
+ orgId?: string;
1235
+ /**
1236
+ * Which client opened the Session, as stored on the index row: "cli" from the CLI (a
1237
+ * Session adopted from a legacy CLI-direct Trace included), "org" from the organization
1238
+ * runtime (a desk or a ticket session), "web" otherwise. Absent only on a row that
1239
+ * predates the column, which reads as "web". Unlike {@link SessionInfo.orgId} — projected
1240
+ * from the organization caches, so it disappears with the organization and is not read
1241
+ * while company mode is off — this is a durable stamp on the row: development mode's list
1242
+ * hides an "org" Session either way.
1243
+ */
1244
+ client?: "web" | "cli" | "org";
1114
1245
  /**
1115
1246
  * Background work the Session's loaded runtime still owns: command sessions running past
1116
1247
  * their yield window (`exec_command` promotions and `run_in_background` launches) and
@@ -1130,7 +1261,7 @@ interface SessionBackgroundTasks {
1130
1261
  subagents: number;
1131
1262
  }
1132
1263
  /**
1133
- * Session list category, the sidebar's four-way split applied server-side: archived wins
1264
+ * Session list category, the sidebar's five-way split applied server-side: archived wins
1134
1265
  * regardless of origin (archiving is an explicit user action), then the origin's bucket,
1135
1266
  * and a Session with no (or an unknown) source is `active` — user-created rows.
1136
1267
  */
@@ -1196,10 +1327,21 @@ interface SessionCreateRequest {
1196
1327
  approvalMode?: ApprovalMode;
1197
1328
  /**
1198
1329
  * Creating-client hint stored on the Session row: "cli" when the CLI creates the
1199
- * Session through the API; defaults to "web". Informational provenance only — lists
1200
- * serve every row regardless of client.
1330
+ * Session through the API, "org" when the organization runtime opened it (a desk or a
1331
+ * ticket session — company mode's own, kept out of development mode's lists whether or
1332
+ * not the organization still exists); defaults to "web". A REQUEST may send only "web" or
1333
+ * "cli": the runtime writes "org" by calling the service directly, so no caller can claim
1334
+ * an organization's provenance for its own Session. Lists serve every row regardless of
1335
+ * client; only development mode's session list filters on it.
1336
+ */
1337
+ client?: "web" | "cli" | "org";
1338
+ /**
1339
+ * Marks the Session as created by a Benchmark evaluation or optimization (the Evaluation
1340
+ * Center's Use flows, and the Test Sessions agent-evaluation launches through the CLI). Only
1341
+ * this value is accepted from a client: `subagent` and `schedule` are written by the server
1342
+ * itself. The Web App files such Sessions into the Evaluations folder of the session list.
1201
1343
  */
1202
- client?: "web" | "cli";
1344
+ source?: "benchmark";
1203
1345
  }
1204
1346
  interface SessionCreateResponse {
1205
1347
  session: SessionInfo;
@@ -2138,7 +2280,7 @@ type ServerEvent =
2138
2280
  agentId: string;
2139
2281
  sessionId: string;
2140
2282
  source: SessionSource;
2141
- } | ScheduleServerEvent | GoalServerEvent;
2283
+ } | ScheduleServerEvent | GoalServerEvent | CompanyServerEvent;
2142
2284
  /** Goal-mode progress on the session channel (the chat page drives its goal banner from these). */
2143
2285
  type GoalServerEvent =
2144
2286
  /** A goal run began (published before the first round). */
@@ -2430,6 +2572,47 @@ interface FilesWriteRequest {
2430
2572
  */
2431
2573
  ifVersion?: string;
2432
2574
  }
2575
+ /** Move or rename one Workspace file (the Files panel's context menu). */
2576
+ interface FilesMoveRequest {
2577
+ /** Source path, relative to the Workspace root. */
2578
+ from: string;
2579
+ /** Destination path, relative to the Workspace root. Its parent directory is created when missing. */
2580
+ to: string;
2581
+ /**
2582
+ * Move precondition, read exactly like {@link FilesWriteRequest.ifVersion}: the marker the
2583
+ * caller got from this file's `ETag` on `GET files/content`, which the file must still
2584
+ * carry. It differs on only one point — the marker guards the **source**. The destination
2585
+ * has none, because the caller never read it, which is why an occupied destination is
2586
+ * refused with 409 `target_exists` rather than overwritten.
2587
+ *
2588
+ * A directory `from` is a 400 whatever this field says: a directory carries no single
2589
+ * version marker, so the precondition that protects this operation cannot be expressed for
2590
+ * one, and silently moving a tree without that protection is worse than refusing to move it.
2591
+ */
2592
+ ifVersion?: string;
2593
+ }
2594
+ /**
2595
+ * One Workspace search match. `kind`, `sizeBytes` and `mtime` are named and typed exactly as
2596
+ * {@link WorkspaceFileEntry} names them: a hit is drawn by the same row renderer as a tree
2597
+ * entry, and it can only render identically if it carries the same fields.
2598
+ */
2599
+ interface WorkspaceSearchHit {
2600
+ /** Workspace-relative, "/"-separated, with no leading "./" (a tree entry's `name` is only its last segment). */
2601
+ path: string;
2602
+ kind: "dir" | "file";
2603
+ sizeBytes: number;
2604
+ mtime: string;
2605
+ }
2606
+ interface WorkspaceSearchResponse {
2607
+ /** Shallowest first, then directories before files, then by name — the order the breadth-first walk produced. */
2608
+ hits: WorkspaceSearchHit[];
2609
+ /**
2610
+ * A cap stopped the walk (200 hits, or 20000 directory entries visited), so this is a
2611
+ * partial list. Breadth-first is what makes that degrade well: the hits that survive
2612
+ * truncation are the shallowest ones, not the ones that happened to be enumerated first.
2613
+ */
2614
+ truncated: boolean;
2615
+ }
2433
2616
  /** Batch file existence check (message file cards only list files that actually exist). */
2434
2617
  interface FilesStatRequest {
2435
2618
  /** Paths relative to the Workspace root (≤100 items, each ≤512 characters). */
@@ -2882,6 +3065,11 @@ interface BenchmarkCaseScore {
2882
3065
  interface BenchmarkEvaluation {
2883
3066
  /** Evaluation timestamp (ISO 8601). */
2884
3067
  time: string;
3068
+ /**
3069
+ * Agent under test in this round (the `agent_id` field), part of the record's label; `null`
3070
+ * when the record carries none, as a Benchmark evaluates whichever Agents it is pointed at.
3071
+ */
3072
+ agentId: string | null;
2885
3073
  /** Evaluation summary title (a one-line conclusion; shown separately from the body summary; required when generating, tolerated as unset when displaying). */
2886
3074
  summaryTitle?: string;
2887
3075
  /** Evaluation summary body: how the score was derived, what optimizations were made to the Agent this round (required when generating, tolerated as unset when displaying). */
@@ -2902,6 +3090,11 @@ interface BenchmarkEvaluation {
2902
3090
  durationMs: number;
2903
3091
  cases: BenchmarkCaseScore[];
2904
3092
  }
3093
+ /**
3094
+ * Whether the Skill that builds a Benchmark is done with it, and how it ended; see
3095
+ * `BenchmarkSummary.status`.
3096
+ */
3097
+ type BenchmarkStatus = "draft" | "published" | "failed";
2905
3098
  interface BenchmarkSummary {
2906
3099
  /** Directory name is the identifier (semantic naming, e.g. swe-bench-v1). */
2907
3100
  id: string;
@@ -2910,10 +3103,26 @@ interface BenchmarkSummary {
2910
3103
  description?: string;
2911
3104
  /** Number of runs per case (the `runs` field in benchmark_config.toml, ≥1; defaults to 1). */
2912
3105
  runs?: number;
3106
+ /**
3107
+ * `draft` while the Skill that builds the Benchmark is still writing its cases and
3108
+ * calibrating their difficulty — the Web App masks such a Benchmark; `published` once the
3109
+ * Benchmark is frozen and its Formal Baseline recorded; `failed` when calibration ended
3110
+ * without a Pilot result that could be frozen, which leaves the Benchmark unusable — the Web
3111
+ * App masks it too and says it has to be deleted and created again. benchmark_config.toml is
3112
+ * read literally: only `draft` is a draft and only `failed` is a failure, so a missing field,
3113
+ * or any other value, reads as published.
3114
+ */
3115
+ status: BenchmarkStatus;
2913
3116
  /** Case count (number of case subfolders). */
2914
3117
  caseCount: number;
2915
3118
  /** Time-ordered evaluation records (the evaluations[] in scoreboard.yaml). */
2916
3119
  evaluations: BenchmarkEvaluation[];
3120
+ /**
3121
+ * Agents this Benchmark has evaluated: the distinct non-null `agentId`s of `evaluations`, in
3122
+ * first-seen order. Empty while nothing has been evaluated — a Benchmark names no Agent of its
3123
+ * own.
3124
+ */
3125
+ agentIds: string[];
2917
3126
  }
2918
3127
  interface BenchmarksResponse {
2919
3128
  benchmarks: BenchmarkSummary[];
@@ -2928,6 +3137,36 @@ interface BenchmarkCaseSummary {
2928
3137
  interface BenchmarkCasesResponse {
2929
3138
  cases: BenchmarkCaseSummary[];
2930
3139
  }
3140
+ /**
3141
+ * POST /api/projects/:p/benchmarks (owner only): create a Benchmark by hand. The
3142
+ * server writes the on-disk layout the evaluation Skills read — `benchmark_config.toml`, a
3143
+ * `scoreboard.yaml` holding `evaluations: []`, and one `<case id>/` per case with
3144
+ * `statement/README.md` and `rubric/README.md`. 409 `benchmark_exists` when the directory is
3145
+ * already there; nothing is merged into an existing Benchmark.
3146
+ */
3147
+ interface BenchmarkCreateRequest {
3148
+ /** Directory name, which is the identifier: letters, digits, `_` and `-` only. */
3149
+ id: string;
3150
+ title: string;
3151
+ description?: string;
3152
+ /** Runs per case for the optimization loop (integer ≥ 1; default 1). */
3153
+ runs?: number;
3154
+ /** At least one case; ids must be unique within the request. */
3155
+ cases: BenchmarkCreateCase[];
3156
+ }
3157
+ interface BenchmarkCreateCase {
3158
+ /** Case directory name: `CASE-` followed by letters, digits, `_` and `-` (for example `CASE-001-excel-task`). */
3159
+ id: string;
3160
+ /** Written as the statement README's first heading, which the case list reads back as the case title. */
3161
+ title: string;
3162
+ /** Statement body (Markdown), written after that heading; the Target Agent sees only this side. */
3163
+ statement: string;
3164
+ /** Scoring rubric (Markdown, items totalling 100 points), written verbatim as `rubric/README.md`. */
3165
+ rubric: string;
3166
+ }
3167
+ interface BenchmarkCreateResponse {
3168
+ benchmark: BenchmarkSummary;
3169
+ }
2931
3170
  interface SkillMetadataItem {
2932
3171
  /** Skill directory name (the identity key for install / uninstall / Prompt addressing). */
2933
3172
  name: string;
@@ -3124,6 +3363,50 @@ interface DesktopUpdaterCommandMessage {
3124
3363
  type: "desktop-updater-command";
3125
3364
  action: "check" | "download" | "install";
3126
3365
  }
3366
+ /** The two languages the Web App has; the shell's tray menu follows whichever is in use. */
3367
+ type DesktopTrayLocale = "zh" | "en";
3368
+ /** What the shell is currently doing about its tray icon. */
3369
+ interface DesktopTrayStatus {
3370
+ /** Whether an icon is shown in the system tray while the app runs. */
3371
+ showTrayIcon: boolean;
3372
+ /**
3373
+ * The language the tray menu is drawn in. Until a page reports one the shell uses the
3374
+ * device language, so this can differ from the Web App's until the first report lands.
3375
+ */
3376
+ locale: DesktopTrayLocale;
3377
+ }
3378
+ /**
3379
+ * What one PUT asks the shell to change. Every field is optional and a request must carry at
3380
+ * least one: the switch and the language reach this route from different parts of the page.
3381
+ */
3382
+ interface DesktopTrayPatch {
3383
+ showTrayIcon?: boolean;
3384
+ locale?: DesktopTrayLocale;
3385
+ }
3386
+ /**
3387
+ * GET / PUT /api/desktop/tray (desktop-shell sessions only): the tray preference.
3388
+ * `status` is null until the shell's first push lands (a beat after server start); a
3389
+ * client that finds null reads it as on, which is the shell's own default.
3390
+ */
3391
+ interface DesktopTrayStatusResponse {
3392
+ status: DesktopTrayStatus | null;
3393
+ }
3394
+ /** Shell → server push over the utilityProcess message channel. */
3395
+ interface DesktopTrayStatusMessage {
3396
+ type: "desktop-tray-status";
3397
+ status: DesktopTrayStatus;
3398
+ }
3399
+ /**
3400
+ * Server → shell command over the utilityProcess message channel (relayed from PUT
3401
+ * /api/desktop/tray). A patch, not a snapshot: the switch and the language are written by
3402
+ * different parts of the page at different moments, and neither should have to restate the
3403
+ * other's value to change its own.
3404
+ */
3405
+ interface DesktopTrayCommandMessage {
3406
+ type: "desktop-tray-command";
3407
+ showTrayIcon?: boolean;
3408
+ locale?: DesktopTrayLocale;
3409
+ }
3127
3410
  /**
3128
3411
  * The outcome of one self-update run (`penguin update --yes` on the server host), carried
3129
3412
  * by {@link UpdateJobStatus.result}. `unsupported` covers both a server not launched via
@@ -3319,5 +3602,724 @@ interface MachinesResponse {
3319
3602
  imageVersion: string | null;
3320
3603
  job: MachineJob | null;
3321
3604
  }
3605
+ /**
3606
+ * Organization status: `paused` stops every automatic trigger; humans can still talk to any
3607
+ * desk. These two values are the whole lifecycle — no route deletes an organization, so a
3608
+ * paused one keeps its conversations, employees, desks and tickets.
3609
+ */
3610
+ type OrgStatus = "active" | "paused";
3611
+ /** Approval mode for desk and ticket sessions; unattended runs never get always-ask. */
3612
+ type OrgApprovalMode = "allow-all" | "read-only" | "deny-all";
3613
+ /** The five kanban columns, each a directory under `tickets/<yyyy-mm>/`. */
3614
+ type OrgTicketStatus = "proposed" | "in_progress" | "review" | "done" | "rejected";
3615
+ type OrgTicketPriority = "P0" | "P1" | "P2";
3616
+ /** Live employee state: running when the desk or any ticket session has a Task in progress; paused when budget-paused. */
3617
+ type OrgEmployeeState = "running" | "idle" | "paused";
3618
+ /**
3619
+ * The trigger kinds an `[org_trigger]` block carries. `ticket_notice` is read-only: a ticket
3620
+ * change starts no run of its own, so nothing writes that kind any more, and it stays in the
3621
+ * union because Traces recorded while it did still carry it.
3622
+ */
3623
+ type OrgTriggerKind = "init" | "event" | "mention" | "ticket_notice" | "ticket_work";
3624
+ /** The ticket changes an employee is told about, listed in the body of its next calendar sweep. */
3625
+ type OrgTicketChange = "assigned" | "blocked" | "blocker_closed" | "done" | "rejected";
3626
+ /** What the last evaluation of a calendar event did. */
3627
+ type OrgCalendarOutcome = "fired" | "queued" | "paused" | "missed" | "error";
3628
+ /**
3629
+ * The organization's working language: the language its handbook, its CEO's initialization
3630
+ * run, every employee brief and every desk and ticket run are written in. Detected from the
3631
+ * mission at creation (CJK text → `zh`, anything else → `en`) unless the request names one.
3632
+ */
3633
+ type OrgLanguage = "zh" | "en";
3634
+ /** The organization's settings as `org_config.toml` records them. */
3635
+ interface OrganizationSettings {
3636
+ name: string;
3637
+ mission: string;
3638
+ status: OrgStatus;
3639
+ /** IANA timezone: budget periods (natural months) and chat day files follow it. */
3640
+ timezone: string;
3641
+ approvalMode: OrgApprovalMode;
3642
+ /** Chat @-chain limit: a message whose hop reaches it records its mentions without triggering anyone. */
3643
+ mentionChainLimit: number;
3644
+ budgetWarnRatio: number;
3645
+ budgetPauseRatio: number;
3646
+ createdBy: string;
3647
+ /** The shared workspace root when it is not the organization's own `workspace/` (absolute path). */
3648
+ workspace?: string;
3649
+ /** The model desks and ticket sessions run on when the employee names none; absent = the Project default. */
3650
+ model?: {
3651
+ provider: string;
3652
+ modelId: string;
3653
+ };
3654
+ /** The working language (`language` in `org_config.toml`); absent on an organization written before the field existed, which reads as `en`. */
3655
+ language?: OrgLanguage;
3656
+ }
3657
+ /** Period spend against the CEO's budget (= the whole organization). */
3658
+ interface OrgSpendSummary {
3659
+ /** `yyyy-mm` in the organization's timezone. */
3660
+ period: string;
3661
+ cost: number;
3662
+ budget?: number;
3663
+ /** cost / budget; absent without a budget. */
3664
+ ratio?: number;
3665
+ }
3666
+ interface OrganizationSummary {
3667
+ projectId: string;
3668
+ orgId: string;
3669
+ name: string;
3670
+ mission: string;
3671
+ status: OrgStatus;
3672
+ employeeCount: number;
3673
+ runningCount: number;
3674
+ pausedCount: number;
3675
+ /** proposed + in_progress + review. */
3676
+ openTickets: number;
3677
+ blockedTickets: number;
3678
+ createdBy: string;
3679
+ spend: OrgSpendSummary;
3680
+ /** Present when `org_config.toml` / `org_chart.yaml` fail validation: the organization is listed but every automatic trigger is held until it is fixed. */
3681
+ invalid?: string;
3682
+ }
3683
+ interface OrganizationsResponse {
3684
+ organizations: OrganizationSummary[];
3685
+ }
3686
+ interface OrgEmployeeItem {
3687
+ agentId: string;
3688
+ /** Agent display name (system_config.yaml); falls back to the id. */
3689
+ name: string;
3690
+ title: string;
3691
+ /** null for the CEO (the root). */
3692
+ reportsTo: string | null;
3693
+ duties?: string;
3694
+ /** As written in the chart: a sub-directory of the shared workspace (`.` = all of it) or an absolute path. */
3695
+ workspace: string;
3696
+ /** Where that resolves to; absent when the directory does not exist (the entry is then invalid). */
3697
+ resolvedWorkspace?: string;
3698
+ /** Monthly budget in USD for this employee plus all subordinates; absent = unbounded. */
3699
+ budget?: number;
3700
+ model?: {
3701
+ provider: string;
3702
+ modelId: string;
3703
+ };
3704
+ state: OrgEmployeeState;
3705
+ desk?: {
3706
+ sessionId: string;
3707
+ workspace: string;
3708
+ openedAt: string;
3709
+ };
3710
+ /** Period spend: own sessions, and cumulative (own + every subordinate). */
3711
+ spend: {
3712
+ own: number;
3713
+ cumulative: number;
3714
+ ratio?: number;
3715
+ };
3716
+ /** Why the entry cannot be triggered (missing Agent, missing workspace directory). */
3717
+ invalid?: string;
3718
+ }
3719
+ interface OrgChartResponse {
3720
+ ceoAgentId: string;
3721
+ employees: OrgEmployeeItem[];
3722
+ }
3723
+ interface OrgCalendarItem {
3724
+ agentId: string;
3725
+ name: string;
3726
+ title?: string;
3727
+ prompt: string;
3728
+ enabled: boolean;
3729
+ startAt: string;
3730
+ period?: string;
3731
+ endAt?: string;
3732
+ status: ScheduleStatus;
3733
+ invalidReason?: string;
3734
+ nextFireAt?: string;
3735
+ lastFiredAt?: string;
3736
+ /** What the most recent evaluation did (absent until the event has been evaluated once). */
3737
+ lastOutcome?: OrgCalendarOutcome;
3738
+ /** The organization or this employee is paused, so due slots are skipped, not fired. */
3739
+ paused: boolean;
3740
+ }
3741
+ interface OrgCalendarResponse {
3742
+ events: OrgCalendarItem[];
3743
+ invalidFiles: Array<{
3744
+ agentId: string;
3745
+ name: string;
3746
+ error: string;
3747
+ }>;
3748
+ }
3749
+ /**
3750
+ * One line of a ticket's operation history, kept in the file's frontmatter apart from the
3751
+ * progress prose: what was done, by whom (`agent:<id>` / `user:<id>` — an employee is recognised
3752
+ * from the Agent id its command subprocesses carry, a person otherwise), and when.
3753
+ */
3754
+ type OrgTicketHistoryAction = "created" | "assigned" | "moved" | "blocked" | "unblocked" | "progress" | "session_started" | "session_attached" | "edited";
3755
+ interface OrgTicketHistoryEntry {
3756
+ at: string;
3757
+ by: string;
3758
+ action: OrgTicketHistoryAction;
3759
+ /** The action's detail: the column moved to, the new owner, the block reason, the session id. */
3760
+ note?: string;
3761
+ }
3762
+ /**
3763
+ * The ticket id's slug: lowercase letters in hyphen-joined words, no digits (the date prefix
3764
+ * already carries the numbers), chosen for meaning — derived from an ASCII title, proposed by
3765
+ * the Project's model for a title in another language, or passed explicitly.
3766
+ */
3767
+ declare const TICKET_SLUG_PATTERN: RegExp;
3768
+ interface OrgTicketItem {
3769
+ ticketId: string;
3770
+ title: string;
3771
+ status: OrgTicketStatus;
3772
+ /** The ONE responsible principal (`agent:<id>` / `user:<id>`); who filed it is the history's `created` entry. */
3773
+ owner: string;
3774
+ parent?: string;
3775
+ notify: string[];
3776
+ priority: OrgTicketPriority;
3777
+ due?: string;
3778
+ /** Non-empty = blocked; the ticket stays in its column. */
3779
+ blocked?: string;
3780
+ blockedBy?: string;
3781
+ /** Contributing session ids, in the order they were attached. */
3782
+ sessions: string[];
3783
+ /** Any contributing session has a Task in progress. */
3784
+ running: boolean;
3785
+ /** Period cost of the contributing sessions (a session attached to n tickets counts 1/n here). */
3786
+ cost: number;
3787
+ /** Header/column disagreement or a duplicate id: shown with a danger mark, left where it is. */
3788
+ invalid?: string;
3789
+ }
3790
+ interface OrgTicketSessionItem {
3791
+ sessionId: string;
3792
+ agentId: string;
3793
+ title?: string;
3794
+ status: SessionStatus;
3795
+ lastActiveAt?: string;
3796
+ }
3797
+ interface OrgTicketDetail extends OrgTicketItem {
3798
+ goal: string;
3799
+ acceptanceCriteria: string;
3800
+ /** `## Progress` as plain sentences; who wrote one and when is the matching history entry. */
3801
+ progress: string[];
3802
+ result: string;
3803
+ /** The operation history from the frontmatter, oldest first. */
3804
+ history: OrgTicketHistoryEntry[];
3805
+ /** The whole file, for the Markdown view and for clients that prefer to edit it as text. */
3806
+ body: string;
3807
+ children: string[];
3808
+ /** Own cost plus every descendant's along `Parent`. */
3809
+ rolledUpCost: number;
3810
+ sessionItems: OrgTicketSessionItem[];
3811
+ }
3812
+ interface OrgTicketsResponse {
3813
+ columns: Record<OrgTicketStatus, OrgTicketItem[]>;
3814
+ /** Files that failed to parse (skipped; also recorded as errors). */
3815
+ invalidFiles: Array<{
3816
+ path: string;
3817
+ error: string;
3818
+ }>;
3819
+ }
3820
+ /**
3821
+ * What a `system` line records, structured: the kind of event and its parameters, so a client
3822
+ * renders the sentence in the reader's language and with the principals' display names instead
3823
+ * of showing the English `text` verbatim. `text` stays the English sentence (the CLI, older
3824
+ * clients and the file itself read it); `notice` is the same fact for a client that can do better.
3825
+ */
3826
+ type OrgChannelNoticeKind = "employee_joined" | "employee_left" | "channel_created" | "channel_archived" | "channel_unarchived" | "channel_joined" | "channel_invited" | "channel_left" | "channel_removed" | "budget_warned" | "budget_paused"
3827
+ /**
3828
+ * Legacy, read-only: ticket changes no longer write into a channel — the board is read from
3829
+ * the board and the overview's inbox. These three kinds stay so the lines already in an
3830
+ * organization's message files keep rendering; nothing writes them any more.
3831
+ */
3832
+ | "ticket_blocked" | "ticket_done" | "ticket_rejected";
3833
+ /**
3834
+ * The parameters each kind carries, all strings: principals as `agent:<id>` / `user:<id>`
3835
+ * (`agent`, `principal`, `by`, `reportsTo`), a ticket as `ticket` + `title`, a budget event as
3836
+ * `agent`, `period`, `percent`, `cost`, `budget`.
3837
+ */
3838
+ interface OrgChannelNotice {
3839
+ kind: OrgChannelNoticeKind;
3840
+ params: Record<string, string>;
3841
+ }
3842
+ interface OrgChannelMessage {
3843
+ id: string;
3844
+ /** ISO 8601 UTC. */
3845
+ time: string;
3846
+ /** `agent:<id>` / `user:<id>` / `system`. */
3847
+ sender: string;
3848
+ hop: number;
3849
+ text: string;
3850
+ /** Principals mentioned, `all` included. */
3851
+ mentions: string[];
3852
+ refs?: {
3853
+ ticket?: string;
3854
+ session?: string;
3855
+ replyTo?: string;
3856
+ };
3857
+ /** Present on `system` lines the server wrote with a structured notice; absent on lines from before the field existed. */
3858
+ notice?: OrgChannelNotice;
3859
+ }
3860
+ /**
3861
+ * One channel as the API reports it. The all-hands channel (`default_channel`,
3862
+ * `everyone: true`) exists for as long as the organization does and every employee and
3863
+ * Project member is in it; every other channel carries the membership its members edit.
3864
+ */
3865
+ interface OrgChannelItem {
3866
+ channelId: string;
3867
+ /** As stored; the UI renders the all-hands channel's label itself. */
3868
+ name: string;
3869
+ /** "" when unset. */
3870
+ purpose: string;
3871
+ /** True only for `default_channel`: membership is implicit. */
3872
+ everyone: boolean;
3873
+ /** An archived channel is read-only and folded away. */
3874
+ archived: boolean;
3875
+ /** `user:<id>` / `agent:<id>` / `system`. */
3876
+ createdBy: string;
3877
+ /** ISO 8601 UTC. */
3878
+ createdAt: string;
3879
+ /** Implicit membership counted for the all-hands channel. */
3880
+ memberCount: number;
3881
+ /** Whether the caller (person or employee) is a member. */
3882
+ isMember: boolean;
3883
+ /** People only; 0 for an employee caller. */
3884
+ unread: number;
3885
+ /** People only; 0 for an employee caller. */
3886
+ mentionsMe: number;
3887
+ lastMessageAt: string | null;
3888
+ }
3889
+ interface OrgChannelMember {
3890
+ /** `agent:<id>` or `user:<id>`. */
3891
+ principal: string;
3892
+ name: string;
3893
+ kind: "agent" | "user";
3894
+ }
3895
+ interface OrgChannelDetail extends OrgChannelItem {
3896
+ /** The all-hands channel resolves to every employee plus every Project member. */
3897
+ members: OrgChannelMember[];
3898
+ }
3899
+ interface OrgChannelsResponse {
3900
+ /** `default_channel` first, then by name. */
3901
+ channels: OrgChannelItem[];
3902
+ }
3903
+ interface OrgChannelCreateRequest {
3904
+ channelId: string;
3905
+ name?: string;
3906
+ purpose?: string;
3907
+ }
3908
+ interface OrgChannelPatchRequest {
3909
+ name?: string;
3910
+ purpose?: string;
3911
+ archived?: boolean;
3912
+ }
3913
+ interface OrgChannelMemberRequest {
3914
+ /** `agent:<id>` (an employee) or `user:<id>` (a Project member). */
3915
+ principal: string;
3916
+ }
3917
+ interface OrgChannelMessagesResponse {
3918
+ /** The channel served. */
3919
+ channelId: string;
3920
+ /** The day file served (`yyyy-mm-dd` in the organization's timezone). */
3921
+ date: string;
3922
+ /** The days this channel has a file for, newest first, for paging back. */
3923
+ days: string[];
3924
+ messages: OrgChannelMessage[];
3925
+ /** Messages of this channel after the caller's read cursor in it, across the recent days. */
3926
+ unread: number;
3927
+ /** Of those, the ones that mention the caller (or all). */
3928
+ mentionsMe: number;
3929
+ lastReadId?: string;
3930
+ }
3931
+ interface OrgBudgetAlert {
3932
+ agentId: string;
3933
+ period: string;
3934
+ warnedAt?: string;
3935
+ pausedAt?: string;
3936
+ }
3937
+ interface OrgFinanceEmployee {
3938
+ agentId: string;
3939
+ name: string;
3940
+ title: string;
3941
+ reportsTo: string | null;
3942
+ own: number;
3943
+ cumulative: number;
3944
+ budget?: number;
3945
+ ratio?: number;
3946
+ warned: boolean;
3947
+ paused: boolean;
3948
+ }
3949
+ interface OrgFinanceTicket {
3950
+ ticketId: string;
3951
+ title: string;
3952
+ status: OrgTicketStatus;
3953
+ parent?: string;
3954
+ cost: number;
3955
+ rolledUp: number;
3956
+ }
3957
+ interface OrgFinanceResponse {
3958
+ period: string;
3959
+ currency: "USD";
3960
+ employees: OrgFinanceEmployee[];
3961
+ tickets: OrgFinanceTicket[];
3962
+ /** Daily cost of the organization's sessions over the period. */
3963
+ daily: Array<{
3964
+ date: string;
3965
+ cost: number;
3966
+ }>;
3967
+ alerts: OrgBudgetAlert[];
3968
+ total: number;
3969
+ /** Some usage ran on a model without pricing: tokens were counted, cost is a lower bound. */
3970
+ unpriced: boolean;
3971
+ }
3972
+ interface OrgDeskItem {
3973
+ agentId: string;
3974
+ name: string;
3975
+ sessionId: string;
3976
+ title?: string;
3977
+ status: SessionStatus;
3978
+ workspace: string;
3979
+ lastActiveAt?: string;
3980
+ }
3981
+ interface OrgSessionsResponse {
3982
+ desks: OrgDeskItem[];
3983
+ tickets: Array<{
3984
+ ticketId: string;
3985
+ title: string;
3986
+ status: OrgTicketStatus;
3987
+ sessions: OrgTicketSessionItem[];
3988
+ }>;
3989
+ }
3990
+ interface OrgDeskResponse {
3991
+ agentId: string;
3992
+ sessionId: string;
3993
+ workspace: string;
3994
+ openedAt: string;
3995
+ /** True when this call created the desk session. */
3996
+ created: boolean;
3997
+ }
3998
+ interface OrganizationDetail extends OrganizationSummary {
3999
+ settings: OrganizationSettings;
4000
+ board: Record<OrgTicketStatus, number>;
4001
+ /** Today's calendar events (organization timezone) with their outcomes. */
4002
+ today: OrgCalendarItem[];
4003
+ pending: {
4004
+ /** Unread messages mentioning the caller (or all). */
4005
+ mentions: number;
4006
+ reviewTickets: OrgTicketItem[];
4007
+ blockedByMe: OrgTicketItem[];
4008
+ };
4009
+ /** The last messages of the all-hands channel. */
4010
+ recentMessages: OrgChannelMessage[];
4011
+ alerts: OrgBudgetAlert[];
4012
+ /** What the overview's inbox lists; absent only from a server older than the field. */
4013
+ inbox?: OrgInbox;
4014
+ /** The CEO's desk session once opened (creation opens it). */
4015
+ ceoDeskSessionId?: string;
4016
+ }
4017
+ /**
4018
+ * The overview's inbox: the three things a person is waited on or told about — messages
4019
+ * that name them (or `@all`) in the all-hands channel, the tickets that are blocked (all of
4020
+ * them, whoever they wait on), and the tickets closed as done this period. Newest first in
4021
+ * each list; each capped at a page.
4022
+ */
4023
+ interface OrgInbox {
4024
+ mentions: OrgChannelMessage[];
4025
+ blockedTickets: OrgTicketItem[];
4026
+ doneTickets: Array<OrgTicketItem & {
4027
+ closedAt?: string;
4028
+ }>;
4029
+ }
4030
+ interface OrganizationCreateRequest {
4031
+ /** Semantic id, unique within the Project; also the directory name. */
4032
+ orgId: string;
4033
+ name?: string;
4034
+ mission: string;
4035
+ timezone?: string;
4036
+ /** An existing absolute directory to use as the shared workspace; default = the organization's own `workspace/`. */
4037
+ workspace?: string;
4038
+ /** The model for desks and ticket sessions (a configured pair); default = the Project default. */
4039
+ model?: {
4040
+ provider: string;
4041
+ modelId: string;
4042
+ };
4043
+ /**
4044
+ * The CEO's monthly budget in USD, written as the `budget` of its `org_chart.yaml` entry.
4045
+ * Budgets are compared on the cumulative line, so the CEO's is the whole company's.
4046
+ * Omitted = 100; 0 is a real (zero) budget, not "unbounded" — only clearing the field
4047
+ * later (`PATCH …/employees/:agentId` with `budget: null`) leaves the CEO unbounded.
4048
+ */
4049
+ ceoBudget?: number;
4050
+ /** The working language; omitted = detected from the mission. */
4051
+ language?: OrgLanguage;
4052
+ }
4053
+ interface OrganizationPatchRequest {
4054
+ name?: string;
4055
+ mission?: string;
4056
+ status?: OrgStatus;
4057
+ approvalMode?: OrgApprovalMode;
4058
+ timezone?: string;
4059
+ mentionChainLimit?: number;
4060
+ budgetWarnRatio?: number;
4061
+ budgetPauseRatio?: number;
4062
+ /** null returns to the organization's own `workspace/`. */
4063
+ workspace?: string | null;
4064
+ /** null returns to the Project default. */
4065
+ model?: {
4066
+ provider: string;
4067
+ modelId: string;
4068
+ } | null;
4069
+ language?: OrgLanguage;
4070
+ }
4071
+ /**
4072
+ * A semantic id proposed for a display name — the organization and channel dialogs let the
4073
+ * user name the thing first and derive the id from that name. The server asks the Project's
4074
+ * default model for a short English snake_case id (a Chinese name has no mechanical
4075
+ * transliteration), falling back to an ASCII slug of the name when the model is unavailable,
4076
+ * and to a dated placeholder when neither can name it. The request never fails for a name it
4077
+ * cannot translate: a dialog that asked for an id always gets one back.
4078
+ */
4079
+ interface SemanticIdSuggestRequest {
4080
+ /** The display name typed so far (or the mission, when nothing else names the thing). */
4081
+ name: string;
4082
+ /** What the id is for: decides the prompt's examples and the fallback's prefix. */
4083
+ kind: "org" | "channel";
4084
+ /** Ids already in use in the target scope; the proposal avoids them. */
4085
+ taken?: string[];
4086
+ }
4087
+ /**
4088
+ * Why a proposal fell all the way through to a placeholder — what the client tells the user to
4089
+ * explain the id it was just handed. `no_default_model`: the Project has no default model to
4090
+ * ask. `model_failed`: it was asked and the request failed (no credential, a rejection, a
4091
+ * timeout). `unusable_answer`: it answered twice and neither answer yielded an id.
4092
+ * `no_ascii`: no model was consulted at all and the name carries no ASCII to transliterate.
4093
+ */
4094
+ type SemanticIdSuggestReason = "no_default_model" | "model_failed" | "unusable_answer" | "no_ascii";
4095
+ interface SemanticIdSuggestResponse {
4096
+ /** A valid semantic id (`^[a-z][a-z0-9_]{1,63}$`), not in `taken`. */
4097
+ id: string;
4098
+ /** Who produced it: the model, the ASCII fallback, or the dated placeholder that names nothing. */
4099
+ source: "model" | "fallback" | "placeholder";
4100
+ /** Present only with `source: "placeholder"`: why the two real paths produced nothing. */
4101
+ reason?: SemanticIdSuggestReason;
4102
+ }
4103
+ interface OrgHireRequest {
4104
+ /** Employ an existing Agent … */
4105
+ agentId?: string;
4106
+ /** … or create one (the two are exclusive). Plugins default to agent-company + agent-development. */
4107
+ newAgent?: {
4108
+ agentId: string;
4109
+ name?: string;
4110
+ description?: string;
4111
+ plugins?: string[];
4112
+ };
4113
+ title: string;
4114
+ reportsTo: string;
4115
+ workspace?: string;
4116
+ budget?: number;
4117
+ duties?: string;
4118
+ model?: {
4119
+ provider: string;
4120
+ modelId: string;
4121
+ };
4122
+ }
4123
+ interface OrgEmployeePatchRequest {
4124
+ title?: string;
4125
+ reportsTo?: string;
4126
+ workspace?: string;
4127
+ /** null clears the budget. */
4128
+ budget?: number | null;
4129
+ duties?: string;
4130
+ /** null clears the model (back to the Project default). */
4131
+ model?: {
4132
+ provider: string;
4133
+ modelId: string;
4134
+ } | null;
4135
+ }
4136
+ interface OrgCalendarUpsertRequest {
4137
+ /** POST only: the employee the event belongs to. */
4138
+ agentId?: string;
4139
+ /** POST only: the file name. */
4140
+ name?: string;
4141
+ title?: string;
4142
+ prompt: string;
4143
+ enabled: boolean;
4144
+ startAt: string;
4145
+ period?: string;
4146
+ endAt?: string;
4147
+ }
4148
+ /**
4149
+ * What a calendar write answers: the stored event, plus advisory `warnings` — one line each —
4150
+ * about the rota: another employee's recurring event on the same start minute, or the same
4151
+ * employee already holding a recurring event (desks that fire together compete for the same
4152
+ * budget minute and the same tickets). The write succeeds regardless; the CLI prints the
4153
+ * lines so the scheduling employee can stagger.
4154
+ */
4155
+ interface OrgCalendarWriteResponse extends OrgCalendarItem {
4156
+ warnings?: string[];
4157
+ }
4158
+ interface OrgTicketCreateRequest {
4159
+ title: string;
4160
+ /** Overrides the slug derived from the title; lowercase English words joined by hyphens. */
4161
+ slug?: string;
4162
+ goal?: string;
4163
+ acceptanceCriteria?: string;
4164
+ /** The whole Markdown body instead of goal + acceptanceCriteria (the frontmatter is still generated). */
4165
+ body?: string;
4166
+ /**
4167
+ * The responsible principal: an employee's `agent:<id>` (or bare Agent id) or a member's
4168
+ * `user:<id>`. Default = the caller — the session's employee inside a desk or ticket
4169
+ * session, else the token's or cookie's user.
4170
+ */
4171
+ owner?: string;
4172
+ parent?: string;
4173
+ notify?: string[];
4174
+ priority?: OrgTicketPriority;
4175
+ due?: string;
4176
+ }
4177
+ interface OrgTicketUpdateRequest {
4178
+ title?: string;
4179
+ /** The new responsible principal; never null — a ticket always has an owner. */
4180
+ owner?: string;
4181
+ parent?: string | null;
4182
+ notify?: string[];
4183
+ priority?: OrgTicketPriority;
4184
+ due?: string | null;
4185
+ goal?: string;
4186
+ acceptanceCriteria?: string;
4187
+ result?: string;
4188
+ }
4189
+ interface OrgTicketMoveRequest {
4190
+ status: OrgTicketStatus;
4191
+ /** Required when moving into rejected; recorded under Result. */
4192
+ reason?: string;
4193
+ }
4194
+ interface OrgTicketBlockRequest {
4195
+ reason: string;
4196
+ /** A ticket id or a principal. */
4197
+ by?: string;
4198
+ }
4199
+ interface OrgTicketProgressRequest {
4200
+ text: string;
4201
+ /**
4202
+ * The calling session (CLI: PENGUIN_SESSION_ID); the session is booked as a contributing
4203
+ * session and the history entry is attributed to its employee. Honoured only for a request
4204
+ * carrying the local API token — the control environment's credential; a signed-in user's
4205
+ * write is attributed to the user.
4206
+ */
4207
+ sessionId?: string;
4208
+ /**
4209
+ * The calling employee's Agent id (CLI: PENGUIN_AGENT_ID from the control environment), the
4210
+ * identity a write is recorded under; it wins over the session's employee, is honoured only
4211
+ * with the local API token, like sessionId, and is ignored — the write falls back to the
4212
+ * session's employee, then to the person — when it names no employee.
4213
+ */
4214
+ agentId?: string;
4215
+ }
4216
+ interface OrgTicketStartRequest {
4217
+ /** The employee the ticket session runs as (CLI: PENGUIN_AGENT_ID); defaults to the ticket owner. */
4218
+ agentId?: string;
4219
+ message?: string;
4220
+ /** Another directory inside the shared workspace; defaults to the employee's desk workspace. */
4221
+ workspace?: string;
4222
+ }
4223
+ interface OrgTicketStartResponse {
4224
+ sessionId: string;
4225
+ }
4226
+ interface OrgTicketAttachRequest {
4227
+ sessionId: string;
4228
+ }
4229
+ interface OrgChannelMessageSendRequest {
4230
+ text: string;
4231
+ refs?: {
4232
+ ticket?: string;
4233
+ session?: string;
4234
+ replyTo?: string;
4235
+ };
4236
+ /**
4237
+ * The calling session (CLI: PENGUIN_SESSION_ID): the message is sent as its Agent and
4238
+ * inherits its hop. Honoured only for a request carrying the local API token — the control
4239
+ * environment's credential; a signed-in user's message is sent as the user, at hop 0.
4240
+ */
4241
+ sessionId?: string;
4242
+ }
4243
+ interface OrgChannelReadRequest {
4244
+ /** Mark everything up to this message id as read. */
4245
+ upTo: string;
4246
+ }
4247
+ /** The handbook index (`handbook/README.md`), the file every work run reads first. */
4248
+ interface OrgHandbookResponse {
4249
+ content: string;
4250
+ }
4251
+ /** One file of the organization handbook (`handbook/`, the company's knowledge base); `path` is relative to that directory. */
4252
+ interface OrgHandbookFile {
4253
+ path: string;
4254
+ size: number;
4255
+ updatedAt: string;
4256
+ }
4257
+ interface OrgHandbookFilesResponse {
4258
+ /** The index first, then the other documents by path. */
4259
+ files: OrgHandbookFile[];
4260
+ }
4261
+ interface OrgHandbookFileResponse {
4262
+ path: string;
4263
+ content: string;
4264
+ }
4265
+ interface OrgHandbookFileWriteRequest {
4266
+ content: string;
4267
+ }
4268
+ /** Company-mode notifications on the user-level event stream (best effort; the query routes carry the durable state). */
4269
+ type CompanyServerEvent =
4270
+ /** A work run (desk session) or ticket session was started by the organization scheduler or a ticket start. */
4271
+ {
4272
+ type: "org_run";
4273
+ projectId: string;
4274
+ orgId: string;
4275
+ agentId: string;
4276
+ sessionId: string;
4277
+ kind: OrgTriggerKind;
4278
+ }
4279
+ /** A new channel message (mentions included, so the client can tell whether it is addressed). */
4280
+ | {
4281
+ type: "org_channel";
4282
+ projectId: string;
4283
+ orgId: string;
4284
+ channelId: string;
4285
+ message: OrgChannelMessage;
4286
+ }
4287
+ /** A ticket's status, owner, blocked state or contributing sessions changed. */
4288
+ | {
4289
+ type: "org_ticket";
4290
+ projectId: string;
4291
+ orgId: string;
4292
+ ticketId: string;
4293
+ change: string;
4294
+ }
4295
+ /** Budget warning, pause or resume for an employee. */
4296
+ | {
4297
+ type: "org_budget";
4298
+ projectId: string;
4299
+ orgId: string;
4300
+ agentId: string;
4301
+ state: "warned" | "paused" | "resumed";
4302
+ ratio: number;
4303
+ };
4304
+ /** How the web app renders a contributed surface: a name from its own registry, or an iframe. */
4305
+ type RendererRef = {
4306
+ builtin: string;
4307
+ } | {
4308
+ iframe: {
4309
+ src: string;
4310
+ namespace: string;
4311
+ };
4312
+ };
4313
+ /** One contribution to a web slot: its id, the contributing module, and the slot's data. */
4314
+ interface WebContribution {
4315
+ id: string;
4316
+ from: string;
4317
+ [key: string]: unknown;
4318
+ }
4319
+ interface ContributionsResponse {
4320
+ pages: WebContribution[];
4321
+ agentTabs: WebContribution[];
4322
+ sessionTabs: WebContribution[];
4323
+ }
3322
4324
 
3323
- export type { AdminPasswordResetRequest, AdminUserCreateRequest, AdminUserCreateResponse, AdminUsersResponse, AgentCompactionConfigDto, AgentConfigDto, AgentConfigResponse, AgentConfigUpdateRequest, AgentCreateRequest, AgentCreateResponse, AgentHooksConfigDto, AgentHooksResponse, AgentImportRequest, AgentImportResponse, AgentKernelUpdateResponse, AgentMemoryConfigDto, AgentModelConfigDto, AgentPluginsInstallResponse, AgentSchedulesConfigDto, AgentSkillsConfigDto, AgentSkillsResponse, AgentSummary, AgentTraceDateGroup, AgentTraceFileRef, AgentTraceSessionEntry, AgentTraceSessionFile, AgentTraceSessionGroup, AgentTracesResponse, AgentVaultConfigDto, AgentsResponse, ApprovalDecisionRequest, ApprovalMode, AuthLoginRequest, AuthResponse, BenchmarkCaseScore, BenchmarkCaseSummary, BenchmarkCasesResponse, BenchmarkEvaluation, BenchmarkRunScore, BenchmarkSummary, BenchmarksResponse, CaseMaterial, ChatDefaultsDto, CommandPolicyDto, CommandPolicyRuleDto, ContextFileShare, ContextToolShare, CredentialInfo, DefaultModelResponse, DefaultModelUpdateRequest, DesktopUpdateStatus, DesktopUpdateStatusResponse, DesktopUpdaterCommandMessage, DesktopUpdaterStatusMessage, DirEntryInfo, DirListResponse, DirectorySkillItem, DirectorySkillsResponse, DraftShortcut, EndpointModelListRequest, EndpointModelListResponse, ErrorBody, FeishuBindingInfo, FeishuBindingPutRequest, FeishuBindingResponse, FeishuTestRequest, FeishuTestResponse, FilesStatRequest, FilesStatResponse, FilesWriteRequest, GoalResponse, GoalServerEvent, GoalStateView, HistoryMessage, HookArchiveInstallRequest, HookItem, InstallResponse, MachineInfo, MachineJob, MachineServerStatus, MachinesResponse, McpServerTestResponse, MeResponse, MemberAddRequest, MemberAddResponse, MemberInfo, MembersResponse, MemoryFileInfo, MemoryFileResponse, MemoryFilesResponse, MemoryImportMode, MemoryImportRequest, MemoryImportResponse, MemoryOverviewResponse, MemoryScopeExport, MemoryScopeInfo, MemoryTransferFile, MessagesLiveTail, MessagesPageInfo, MessagesResponse, MessagingBindingCommon, MessagingBindingInfo, MessagingBindingStateRequest, MessagingBindingsResponse, MessagingChannel, MessagingChannelState, MessagingDeliveryError, MessagingDeliveryPatch, MessagingRuntimeState, MessagingRuntimeStatus, MessagingTestMessageResponse, ModelInfo, ModelOAuthCodeRequest, ModelOAuthCodeResponse, ModelOAuthErrorCode, ModelOAuthMode, ModelOAuthStartRequest, ModelOAuthStartResponse, ModelOAuthStatusResponse, ModelPricingDto, ModelProtocolDetectRequest, ModelProtocolDetectResponse, ModelProtocolProbeDto, ModelRefDto, ModelTestRequest, ModelTestResponse, ModelUpdateEntry, ModelVisionDetectRequest, ModelVisionDetectResponse, ModelVisionOutcome, ModelsResponse, ModelsUpdateRequest, PasswordChangeRequest, PendingFollowUpInfo, PendingSteeringInfo, PluginFilesResponse, PluginGroupItem, PluginInstallRequest, PluginItem, PluginLibraryResponse, PluginUpdateRef, PrefsResponse, ProjectCreateRequest, ProjectCreateResponse, ProjectRole, ProjectSummary, ProjectUpdateRequest, ProjectUpdateResponse, ProjectsResponse, ProtocolProbeOutcome, QQBindingInfo, QQBindingPutRequest, QQBindingResponse, QQScanPollResponse, QQScanStartResponse, QQTestRequest, QQTestResponse, RecalledMessageResponse, RequestSpan, RestartResponse, RetryNowResponse, ScheduleItem, ScheduleServerEvent, ScheduleStatus, ScheduleUpsertRequest, SchedulesResponse, ServerEvent, ServerSettings, ServerSettingsResponse, ServerSettingsUpdateRequest, SessionBackgroundTasks, SessionCategory, SessionCategoryCounts, SessionContextParts, SessionContextResponse, SessionCreateRequest, SessionCreateResponse, SessionForkRequest, SessionForkResponse, SessionInfo, SessionPatchRequest, SessionProcessInfo, SessionProcessesResponse, SessionResponse, SessionSource, SessionStatus, SessionTracesResponse, SessionsResponse, SkillArchiveInstallRequest, SkillMetadataItem, SteerRequest, SubagentMessageResponse, SubagentRuntimeInfo, TaskCreateRequest, TaskCreateResponse, TaskInputPart, TelegramBindingInfo, TelegramBindingPutRequest, TelegramBindingResponse, TelegramTestRequest, TelegramTestResponse, ToolCallSpan, TraceAnalysisResponse, TraceEventsResponse, TraceFileInfo, TraceImportRequest, TraceImportResponse, TraceModelSegment, TraceOtherSpan, TracePosition, TraceTaskStats, TraceToolSpan, UiPrefs, UpdateCheckResponse, UpdateJobPhase, UpdateJobStatus, UpdateRunResponse, UploadLimits, UsageAgentSeries, UsageBucket, UsageEntitySeriesCounts, UsageErrorCount, UsageErrorItem, UsageErrorKind, UsageErrors, UsageErrorsClearResponse, UsageErrorsPage, UsageGranularity, UsageGroupBy, UsageGroupRow, UsageModelSeries, UsageModelTotal, UsageModelTotals, UsageResponse, UsageSeriesPoint, UsageTrendPointInTrace, UserInfo, VaultEntryInfo, VaultEntryUpdate, VaultResponse, VaultUpdateRequest, VersionResponse, WeChatBindingInfo, WeChatBindingPutRequest, WeChatBindingResponse, WeChatScanPollResponse, WeChatScanStartResponse, WeChatScanStatus, WeChatScanVerifyRequest, WeChatTestResponse, WorkspaceFileEntry, WorkspaceFilesResponse };
4325
+ export { type AdminPasswordResetRequest, type AdminUserCreateRequest, type AdminUserCreateResponse, type AdminUsersResponse, type AgentCompactionConfigDto, type AgentConfigDto, type AgentConfigResponse, type AgentConfigUpdateRequest, type AgentCreateRequest, type AgentCreateResponse, type AgentHooksConfigDto, type AgentHooksResponse, type AgentImportRequest, type AgentImportResponse, type AgentKernelUpdateResponse, 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 AuthLoginRequest, type AuthResponse, type BenchmarkCaseScore, type BenchmarkCaseSummary, type BenchmarkCasesResponse, type BenchmarkCreateCase, type BenchmarkCreateRequest, type BenchmarkCreateResponse, type BenchmarkEvaluation, type BenchmarkRunScore, type BenchmarkStatus, type BenchmarkSummary, type BenchmarksResponse, type CaseMaterial, type ChatDefaultsDto, type CommandPolicyDto, type CommandPolicyRuleDto, type CompanyServerEvent, type ContextFileShare, type ContextToolShare, type ContributionsResponse, type CredentialInfo, type DefaultModelResponse, type DefaultModelUpdateRequest, type DesktopTrayCommandMessage, type DesktopTrayLocale, type DesktopTrayPatch, type DesktopTrayStatus, type DesktopTrayStatusMessage, type DesktopTrayStatusResponse, type DesktopUpdateStatus, type DesktopUpdateStatusResponse, type DesktopUpdaterCommandMessage, type DesktopUpdaterStatusMessage, type DirEntryInfo, type DirListResponse, type DirectorySkillItem, type DirectorySkillsResponse, type DraftShortcut, type EndpointModelListRequest, type EndpointModelListResponse, type ErrorBody, type FeishuBindingInfo, type FeishuBindingPutRequest, type FeishuBindingResponse, type FeishuTestRequest, type FeishuTestResponse, type FilesMoveRequest, type FilesStatRequest, type FilesStatResponse, type FilesWriteRequest, type GoalResponse, type GoalServerEvent, type GoalStateView, type HistoryMessage, type HookArchiveInstallRequest, type HookItem, type InstallResponse, type MachineInfo, type MachineJob, type MachineServerStatus, type MachinesResponse, type McpServerTestResponse, 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 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 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 PluginFilesResponse, type PluginGroupItem, type PluginInstallRequest, type PluginItem, type PluginLibraryResponse, type PluginUpdateRef, type PrefsResponse, type ProjectCreateRequest, type ProjectCreateResponse, type ProjectRole, type ProjectSummary, type ProjectUpdateRequest, type ProjectUpdateResponse, type ProjectsResponse, type ProtocolProbeOutcome, 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 RecalledMessageResponse, type RendererRef, type RequestSpan, type RestartResponse, type RetryNowResponse, type ScheduleItem, type ScheduleServerEvent, type ScheduleStatus, type ScheduleUpsertRequest, type SchedulesResponse, type SemanticIdSuggestReason, type SemanticIdSuggestRequest, type SemanticIdSuggestResponse, type ServerEvent, type ServerSettings, type ServerSettingsResponse, type ServerSettingsUpdateRequest, type SessionBackgroundTasks, 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 SessionSource, type SessionStatus, type SessionTracesResponse, type SessionsResponse, type SkillArchiveInstallRequest, type SkillMetadataItem, type SteerRequest, 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 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 VersionResponse, type WeChatBindingInfo, type WeChatBindingPutRequest, type WeChatBindingResponse, type WeChatScanPollResponse, type WeChatScanStartResponse, type WeChatScanStatus, type WeChatScanVerifyRequest, type WeChatTestResponse, type WebContribution, type WorkspaceFileEntry, type WorkspaceFilesResponse, type WorkspaceSearchHit, type WorkspaceSearchResponse };