@parallelworks/code 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +625 -113
  2. package/dist/accountApi.d.ts +31 -0
  3. package/dist/accountApi.js +182 -0
  4. package/dist/agentSwitcher.d.ts +120 -0
  5. package/dist/agentSwitcher.js +187 -0
  6. package/dist/ago.d.ts +1 -3
  7. package/dist/ago.js +8 -10
  8. package/dist/allocations.d.ts +41 -0
  9. package/dist/allocations.js +76 -0
  10. package/dist/api.d.ts +1319 -50
  11. package/dist/chatStrings.d.ts +189 -0
  12. package/dist/chatStrings.js +218 -0
  13. package/dist/claudeAccounts.d.ts +57 -2
  14. package/dist/claudeAccounts.js +144 -6
  15. package/dist/claudeApi.d.ts +2 -1
  16. package/dist/claudeApi.js +50 -4
  17. package/dist/claudeSignIn.d.ts +19 -1
  18. package/dist/claudeSignIn.js +12 -2
  19. package/dist/command.d.ts +5 -1
  20. package/dist/command.js +6 -1
  21. package/dist/commandsApi.d.ts +11 -1
  22. package/dist/commandsApi.js +24 -5
  23. package/dist/createPwCodeApi.d.ts +114 -6
  24. package/dist/createPwCodeApi.js +21 -3
  25. package/dist/directories.d.ts +161 -0
  26. package/dist/directories.js +301 -0
  27. package/dist/goal.d.ts +89 -0
  28. package/dist/goal.js +164 -0
  29. package/dist/imageFit.d.ts +23 -0
  30. package/dist/imageFit.js +27 -0
  31. package/dist/images.d.ts +28 -0
  32. package/dist/images.js +38 -6
  33. package/dist/index.d.ts +31 -15
  34. package/dist/index.js +29 -14
  35. package/dist/loadError.d.ts +8 -0
  36. package/dist/loadError.js +19 -0
  37. package/dist/locales/en/agentTranscript.js +74 -12
  38. package/dist/locales/en/agents.js +86 -11
  39. package/dist/locales/en.d.ts +137 -8
  40. package/dist/locales/es/agentTranscript.js +74 -12
  41. package/dist/locales/es/agents.js +86 -11
  42. package/dist/locales/ja/agentTranscript.js +77 -15
  43. package/dist/locales/ja/agents.js +60 -122
  44. package/dist/locales/ko/agentTranscript.js +74 -12
  45. package/dist/locales/ko/agents.js +86 -11
  46. package/dist/locales/zh/agentTranscript.js +72 -10
  47. package/dist/locales/zh/agents.js +86 -11
  48. package/dist/machine.d.ts +2 -0
  49. package/dist/modelPicker.d.ts +79 -0
  50. package/dist/modelPicker.js +107 -0
  51. package/dist/notices.d.ts +2 -0
  52. package/dist/notices.js +67 -32
  53. package/dist/platformDefaults.d.ts +22 -0
  54. package/dist/platformDefaults.js +30 -0
  55. package/dist/preferences.d.ts +78 -0
  56. package/dist/preferences.js +128 -0
  57. package/dist/pullRequestList.d.ts +10 -2
  58. package/dist/pullRequestList.js +41 -22
  59. package/dist/query.d.ts +9 -2
  60. package/dist/query.js +91 -10
  61. package/dist/session.d.ts +11 -2
  62. package/dist/session.js +16 -8
  63. package/dist/sessionActions.d.ts +11 -1
  64. package/dist/sessionActions.js +14 -6
  65. package/dist/sessionEvents.d.ts +37 -5
  66. package/dist/sessionEvents.js +196 -77
  67. package/dist/sessionGroups.d.ts +5 -4
  68. package/dist/sessionGroups.js +6 -5
  69. package/dist/sessionHeader.js +6 -2
  70. package/dist/sessionList.d.ts +68 -15
  71. package/dist/sessionList.js +91 -19
  72. package/dist/sessionScreen.d.ts +197 -0
  73. package/dist/sessionScreen.js +218 -0
  74. package/dist/sessionsApi.d.ts +29 -3
  75. package/dist/sessionsApi.js +180 -33
  76. package/dist/sessionsFeed.d.ts +22 -0
  77. package/dist/sessionsFeed.js +125 -0
  78. package/dist/settingsApi.d.ts +3 -1
  79. package/dist/startPage.d.ts +153 -0
  80. package/dist/startPage.js +174 -0
  81. package/dist/startSession.d.ts +41 -7
  82. package/dist/startSession.js +26 -4
  83. package/dist/todos.d.ts +42 -0
  84. package/dist/todos.js +104 -0
  85. package/dist/transcript.d.ts +1 -2
  86. package/dist/transcript.js +111 -117
  87. package/dist/transcriptRead.d.ts +56 -0
  88. package/dist/transcriptRead.js +121 -0
  89. package/dist/types.d.ts +11 -1
  90. package/dist/useComposer.d.ts +39 -6
  91. package/dist/useComposer.js +73 -9
  92. package/dist/useComposerImages.d.ts +5 -0
  93. package/dist/useComposerImages.js +27 -5
  94. package/dist/useComposerPastes.d.ts +70 -0
  95. package/dist/useComposerPastes.js +125 -0
  96. package/dist/useConversation.d.ts +16 -1
  97. package/dist/useConversation.js +104 -10
  98. package/dist/useMounted.d.ts +3 -0
  99. package/dist/useMounted.js +14 -0
  100. package/dist/useSubagent.d.ts +51 -3
  101. package/dist/useSubagent.js +72 -7
  102. package/dist/useTranscript.d.ts +23 -3
  103. package/dist/useTranscript.js +76 -19
  104. package/dist/wording.d.ts +5 -2
  105. package/dist/wording.js +8 -6
  106. package/dist/workingDirectories.d.ts +31 -0
  107. package/dist/workingDirectories.js +25 -1
  108. package/locales/en/agentTranscript.json +68 -11
  109. package/locales/en/agents.json +82 -10
  110. package/locales/es/agentTranscript.json +68 -11
  111. package/locales/es/agents.json +82 -10
  112. package/locales/ja/agentTranscript.json +71 -14
  113. package/locales/ja/agents.json +82 -10
  114. package/locales/ko/agentTranscript.json +68 -11
  115. package/locales/ko/agents.json +82 -10
  116. package/locales/zh/agentTranscript.json +66 -9
  117. package/locales/zh/agents.json +82 -10
  118. package/package.json +6 -3
package/dist/api.d.ts CHANGED
@@ -4,6 +4,134 @@
4
4
  */
5
5
 
6
6
  export interface paths {
7
+ "/api/aichat/conversations/{id}": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * Get conversation
16
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
17
+ *
18
+ * Get a conversation by ID. Optionally specify a branch to view.
19
+ */
20
+ get: operations["getAIChatConversation"];
21
+ put?: never;
22
+ post?: never;
23
+ /**
24
+ * Delete conversation
25
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
26
+ *
27
+ * Delete a conversation. Only the owner can delete.
28
+ */
29
+ delete: operations["deleteAIChatConversation"];
30
+ options?: never;
31
+ head?: never;
32
+ /**
33
+ * Update conversation
34
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
35
+ *
36
+ * Update conversation title or active branch.
37
+ */
38
+ patch: operations["updateAIChatConversation"];
39
+ trace?: never;
40
+ };
41
+ "/api/allocations": {
42
+ parameters: {
43
+ query?: never;
44
+ header?: never;
45
+ path?: never;
46
+ cookie?: never;
47
+ };
48
+ /**
49
+ * List allocations
50
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
51
+ *
52
+ * Returns allocations the user can access.
53
+ */
54
+ get: operations["list-user-allocations"];
55
+ put?: never;
56
+ post?: never;
57
+ delete?: never;
58
+ options?: never;
59
+ head?: never;
60
+ patch?: never;
61
+ trace?: never;
62
+ };
63
+ "/api/openai/v1/models": {
64
+ parameters: {
65
+ query?: never;
66
+ header?: never;
67
+ path?: never;
68
+ cookie?: never;
69
+ };
70
+ /**
71
+ * List available AI models
72
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
73
+ *
74
+ * Returns all AI models the user has access to. Model IDs are formatted as 'provider-id/model-name'.
75
+ */
76
+ get: operations["listAIChatModels"];
77
+ put?: never;
78
+ post?: never;
79
+ delete?: never;
80
+ options?: never;
81
+ head?: never;
82
+ patch?: never;
83
+ trace?: never;
84
+ };
85
+ "/api/previews": {
86
+ parameters: {
87
+ query?: never;
88
+ header?: never;
89
+ path?: never;
90
+ cookie?: never;
91
+ };
92
+ /**
93
+ * Get previews
94
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
95
+ *
96
+ * Returns the enabled previews for the current user.
97
+ */
98
+ get: operations["get-previews"];
99
+ put?: never;
100
+ post?: never;
101
+ delete?: never;
102
+ options?: never;
103
+ head?: never;
104
+ patch?: never;
105
+ trace?: never;
106
+ };
107
+ "/api/user/preferences": {
108
+ parameters: {
109
+ query?: never;
110
+ header?: never;
111
+ path?: never;
112
+ cookie?: never;
113
+ };
114
+ /**
115
+ * Get user preferences
116
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
117
+ *
118
+ * Returns the current user's saved UI preferences, such as list page display options and filters, keyed by view id.
119
+ */
120
+ get: operations["get-user-preferences"];
121
+ put?: never;
122
+ post?: never;
123
+ delete?: never;
124
+ options?: never;
125
+ head?: never;
126
+ /**
127
+ * Update user preferences
128
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
129
+ *
130
+ * Writes the given preference keys for the current user. A null value removes a key; keys not in the request are left unchanged.
131
+ */
132
+ patch: operations["update-user-preferences"];
133
+ trace?: never;
134
+ };
7
135
  "/api/code/sessions": {
8
136
  parameters: {
9
137
  query?: never;
@@ -26,6 +154,28 @@ export interface paths {
26
154
  patch?: never;
27
155
  trace?: never;
28
156
  };
157
+ "/api/code/machines/{machine}/directories": {
158
+ parameters: {
159
+ query?: never;
160
+ header?: never;
161
+ path?: never;
162
+ cookie?: never;
163
+ };
164
+ /**
165
+ * List the folders a new pw code session could start in
166
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
167
+ *
168
+ * Lists the folders in one directory of the machine, as the account its sessions run as sees them, leaving out files and anything the machine's deny rules cover. The machine answers only when its owner lets sessions start remotely.
169
+ */
170
+ get: operations["list-agent-machine-directories"];
171
+ put?: never;
172
+ post?: never;
173
+ delete?: never;
174
+ options?: never;
175
+ head?: never;
176
+ patch?: never;
177
+ trace?: never;
178
+ };
29
179
  "/api/code/machines/{machine}/palette": {
30
180
  parameters: {
31
181
  query?: never;
@@ -142,6 +292,28 @@ export interface paths {
142
292
  patch?: never;
143
293
  trace?: never;
144
294
  };
295
+ "/api/code/machines/{machine}/claude-code/accounts/{name}/move": {
296
+ parameters: {
297
+ query?: never;
298
+ header?: never;
299
+ path?: never;
300
+ cookie?: never;
301
+ };
302
+ get?: never;
303
+ put?: never;
304
+ /**
305
+ * Move a Claude Code account's sessions to another account
306
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
307
+ *
308
+ * Move a Claude Code account's sessions to another account. Switches every live session running Claude Code on the account to another, as the session settings route does for one: a turn waiting at the account's usage limit continues at once, and a running one switches after it. Every session on an account shares its usage limit, so this moves them off a spent one together. The daemon enforces each session's control policy.
309
+ */
310
+ post: operations["move-agent-machine-claude-account-sessions"];
311
+ delete?: never;
312
+ options?: never;
313
+ head?: never;
314
+ patch?: never;
315
+ trace?: never;
316
+ };
145
317
  "/api/code/machines/{machine}/claude-code/logins": {
146
318
  parameters: {
147
319
  query?: never;
@@ -424,6 +596,28 @@ export interface paths {
424
596
  patch?: never;
425
597
  trace?: never;
426
598
  };
599
+ "/api/code/machines/{machine}/sessions/{id}/direction/withdraw": {
600
+ parameters: {
601
+ query?: never;
602
+ header?: never;
603
+ path?: never;
604
+ cookie?: never;
605
+ };
606
+ get?: never;
607
+ put?: never;
608
+ /**
609
+ * Take back text steered into a pw code session's turn
610
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
611
+ *
612
+ * Takes back text steered into the running turn that the model has not read yet, as removing a pending message does in the pw code terminal. Answers with the ids taken back; the model already read the rest. Like taking back a queued message, it is not held to the remote permission ceiling.
613
+ */
614
+ post: operations["withdraw-agent-session-direction"];
615
+ delete?: never;
616
+ options?: never;
617
+ head?: never;
618
+ patch?: never;
619
+ trace?: never;
620
+ };
427
621
  "/api/code/machines/{machine}/sessions/{id}/fork": {
428
622
  parameters: {
429
623
  query?: never;
@@ -459,7 +653,7 @@ export interface paths {
459
653
  * Set, show, or clear a pw code session's goal
460
654
  * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
461
655
  *
462
- * Runs /goal with the same arguments the terminal takes. Setting or resuming a goal starts a turn on the session.
656
+ * Runs /goal with the same arguments the terminal takes, and answers with the goal as the call left it. Setting or resuming a goal starts a turn on the session. A bare edit only reads the goal, and is the one form that joins nothing to the conversation.
463
657
  */
464
658
  post: operations["set-agent-session-goal"];
465
659
  delete?: never;
@@ -876,6 +1070,50 @@ export interface paths {
876
1070
  patch?: never;
877
1071
  trace?: never;
878
1072
  };
1073
+ "/api/code/machines/{machine}/sessions/{id}/subagents/{subId}/direction/withdraw": {
1074
+ parameters: {
1075
+ query?: never;
1076
+ header?: never;
1077
+ path?: never;
1078
+ cookie?: never;
1079
+ };
1080
+ get?: never;
1081
+ put?: never;
1082
+ /**
1083
+ * Take back text steered into a pw code subagent's work
1084
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
1085
+ *
1086
+ * Takes back text steered into the subagent's work in flight that its model has not read yet. Answers with the ids taken back; the model already read the rest.
1087
+ */
1088
+ post: operations["withdraw-agent-session-subagent-direction"];
1089
+ delete?: never;
1090
+ options?: never;
1091
+ head?: never;
1092
+ patch?: never;
1093
+ trace?: never;
1094
+ };
1095
+ "/api/code/machines/{machine}/sessions/{id}/subagents/{subId}/dismiss": {
1096
+ parameters: {
1097
+ query?: never;
1098
+ header?: never;
1099
+ path?: never;
1100
+ cookie?: never;
1101
+ };
1102
+ get?: never;
1103
+ put?: never;
1104
+ /**
1105
+ * Take a pw code subagent off the session's list
1106
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
1107
+ *
1108
+ * Takes a subagent that is not running off the session's list for every window showing the session, and says so with a subagent_dismissed event on its feed. It is not deleted: its transcript still opens, a message or the session's model can still give it work, and running again lists it again. Refused with 409 while it runs; stop it first. Like stop, it is not held to the remote permission ceiling.
1109
+ */
1110
+ post: operations["dismiss-agent-session-subagent"];
1111
+ delete?: never;
1112
+ options?: never;
1113
+ head?: never;
1114
+ patch?: never;
1115
+ trace?: never;
1116
+ };
879
1117
  "/api/code/machines/{machine}/sessions/{id}/subagents/{subId}/messages": {
880
1118
  parameters: {
881
1119
  query?: never;
@@ -942,6 +1180,28 @@ export interface paths {
942
1180
  patch?: never;
943
1181
  trace?: never;
944
1182
  };
1183
+ "/api/code/machines/{machine}/sessions/{id}/transcript": {
1184
+ parameters: {
1185
+ query?: never;
1186
+ header?: never;
1187
+ path?: never;
1188
+ cookie?: never;
1189
+ };
1190
+ /**
1191
+ * Get a pw code session transcript, its end first
1192
+ * @description > This is a user-centric route, so the response will always be in the context of the currently authenticated user.
1193
+ *
1194
+ * Returns the session as get-agent-session does, with its history in two parts: tail holds the session and the end of its history, and older the history before it. The tail is written first, so a reader on a slow connection can show where the conversation stands while the rest arrives.
1195
+ */
1196
+ get: operations["get-agent-session-transcript"];
1197
+ put?: never;
1198
+ post?: never;
1199
+ delete?: never;
1200
+ options?: never;
1201
+ head?: never;
1202
+ patch?: never;
1203
+ trace?: never;
1204
+ };
945
1205
  "/api/code/machines/{machine}/sessions/{id}/worktree": {
946
1206
  parameters: {
947
1207
  query?: never;
@@ -997,7 +1257,7 @@ export interface webhooks {
997
1257
  };
998
1258
  /**
999
1259
  * pw code session event feed
1000
- * @description One JSON frame per message on the WebSocket at /ws/code/machines/{machine}/sessions/{id}/events?after=N. Pass the last seq seen as after to resume; a replay_truncated frame means the transcript must be refetched.
1260
+ * @description One JSON frame per message on the WebSocket at /ws/code/machines/{machine}/sessions/{id}/events?after=N. Pass the last seq seen as after to resume; a replay_truncated frame means the transcript must be refetched. With previews=refs the images a tool read come without their previews, each of which is read from the session's image route with preview=true.
1001
1261
  */
1002
1262
  get: operations["agent-session-events"];
1003
1263
  put?: never;
@@ -1036,6 +1296,7 @@ export interface components {
1036
1296
  name: string;
1037
1297
  plan?: string;
1038
1298
  refreshing?: boolean;
1299
+ sessions?: string[] | null;
1039
1300
  signInRequired?: boolean;
1040
1301
  usage?: string;
1041
1302
  /** Format: date-time */
@@ -1043,6 +1304,16 @@ export interface components {
1043
1304
  /** Format: double */
1044
1305
  weeklyUsedPercent?: number;
1045
1306
  };
1307
+ AgentClaudeAccountMoveBody: {
1308
+ /** @description Session id to leave on its account, such as the one the caller switches itself. */
1309
+ except?: string;
1310
+ /** @description Claude Code account on the machine to move the sessions to. */
1311
+ to: string;
1312
+ };
1313
+ AgentClaudeAccountMoved: {
1314
+ /** @description Ids of the sessions now on the account moved to. A session the caller may not drive stays where it is. */
1315
+ moved: string[] | null;
1316
+ };
1046
1317
  AgentClaudeLoginEvent: {
1047
1318
  data?: string;
1048
1319
  login: components["schemas"]["ClaudeLogin"];
@@ -1106,6 +1377,51 @@ export interface components {
1106
1377
  AgentDirectionDelivered: {
1107
1378
  /** @description False when no turn was running to take the text; send it as a message instead. */
1108
1379
  delivered: boolean;
1380
+ /** @description Names the delivered text, for taking it back before the model reads it and for matching the user_note event that reports it did. Empty from a machine whose pw code is too old to take it back. */
1381
+ id?: string;
1382
+ };
1383
+ AgentDirectionWithdrawBody: {
1384
+ /** @description The ids steering the text answered with. */
1385
+ ids: string[] | null;
1386
+ };
1387
+ AgentDirectionWithdrawn: {
1388
+ /** @description The ids taken back. The model already read the rest. */
1389
+ withdrawn: string[] | null;
1390
+ };
1391
+ AgentDirectories: {
1392
+ /** @description The folders in the directory, by name. */
1393
+ entries: components["schemas"]["AgentDirectory"][] | null;
1394
+ /** @description Home directory of the account the machine's sessions run as. */
1395
+ home?: string;
1396
+ /** @description Absolute path of the directory listed, with ~ expanded. */
1397
+ path: string;
1398
+ /** @description The directory holds more folders than one answer lists; a filter reaches the rest. */
1399
+ truncated?: boolean;
1400
+ };
1401
+ AgentDirectory: {
1402
+ name: string;
1403
+ /** @description The folder holds a .git, as a repository or one of its worktrees does. */
1404
+ repository?: boolean;
1405
+ };
1406
+ AgentGoalResult: {
1407
+ /** @description The unfinished goal's condition, empty with none standing. */
1408
+ condition?: string;
1409
+ /** @description What /goal printed. */
1410
+ output: string;
1411
+ /** @description Why the last check found the goal unmet. */
1412
+ reason?: string;
1413
+ /** @description Where the goal's loop stands after the call. */
1414
+ status?: components["schemas"]["GoalStatus"];
1415
+ /**
1416
+ * Format: int64
1417
+ * @description Tokens the session has spent over those turns.
1418
+ */
1419
+ tokens?: number;
1420
+ /**
1421
+ * Format: int64
1422
+ * @description Checks the unfinished goal has made since it was set, or since the session was last restored. A machine from before this field leaves it out.
1423
+ */
1424
+ turns?: number;
1109
1425
  };
1110
1426
  AgentImageBody: {
1111
1427
  /** @description The image, base64. Up to 6MiB. */
@@ -1150,6 +1466,8 @@ export interface components {
1150
1466
  claudeLogin?: boolean;
1151
1467
  /** @description Machine id the pw code daemon reported, when it answered. A local computer with the same id as a resource is the same host and is listed only as the resource. */
1152
1468
  daemonId?: string;
1469
+ /** @description The daemon lists the machine's folders, for choosing where a session starts. */
1470
+ directories?: boolean;
1153
1471
  error?: string;
1154
1472
  /** @description Hostname the daemon reported, when it answered. */
1155
1473
  hostname?: string;
@@ -1276,6 +1594,9 @@ export interface components {
1276
1594
  turnStartedAt?: string;
1277
1595
  /** Format: date-time */
1278
1596
  updatedAt: string;
1597
+ /** Format: date-time */
1598
+ usageLimitResumeAt?: string;
1599
+ waitingForUsageLimit?: boolean;
1279
1600
  workspace: string;
1280
1601
  };
1281
1602
  AgentSessionCleared: {
@@ -1449,6 +1770,12 @@ export interface components {
1449
1770
  /** @description The session's subagents in the order they started. Their status is empty when the machine's pw code is too old to say how its subagents stand. */
1450
1771
  subagents: components["schemas"]["Subagent"][] | null;
1451
1772
  };
1773
+ AgentTranscript: {
1774
+ /** @description The history before the tail's, oldest first. The whole history is older followed by tail.history. */
1775
+ older: components["schemas"]["HistoryItem"][] | null;
1776
+ /** @description The session, with the end of its history: what a reader sees first. */
1777
+ tail: components["schemas"]["AgentSessionDetail"];
1778
+ };
1452
1779
  AgentWorktreeLeft: {
1453
1780
  /**
1454
1781
  * @description left keeps the worktree on the machine; remove_failed is a session that left it, but whose worktree could not be removed and stays.
@@ -1456,30 +1783,154 @@ export interface components {
1456
1783
  */
1457
1784
  outcome: "left" | "removed" | "remove_failed";
1458
1785
  };
1459
- AllowedDirectory: {
1460
- edit?: boolean;
1461
- path: string;
1462
- subtree?: boolean;
1463
- };
1464
- ApprovalAnswer: {
1465
- allowDir?: boolean;
1466
- allowRules?: string[] | null;
1467
- allowed?: boolean;
1468
- answers?: components["schemas"]["AskQuestionAnswer"][] | null;
1469
- chat?: boolean;
1470
- clear?: boolean;
1471
- denyMessage?: string;
1472
- feedback?: string;
1473
- /** @enum {string} */
1474
- mode?: "" | "read-only" | "accept-edits" | "auto" | "bypass-permissions" | "plan";
1475
- plan?: string;
1476
- };
1477
- ApprovalRequest: {
1478
- agent?: string;
1479
- allowDir?: components["schemas"]["AllowedDirectory"];
1480
- callId?: string;
1481
- command?: string;
1482
- /** Format: date-time */
1786
+ Allocation: {
1787
+ /**
1788
+ * Format: double
1789
+ * @description Sum of the amounts of all the allocation's periods, a repeating period counted once per window. Absent without periods.
1790
+ */
1791
+ readonly allPeriodsTotal?: number;
1792
+ /** @description Resource types a managed allocation may fund. Empty means unrestricted. */
1793
+ allowed?: ("aws" | "azure" | "google" | "oracle" | "openstack" | "kubernetes" | "ai")[] | null;
1794
+ /** @description Names of the allocations above this one, the top-level one first. Only set when reading a single allocation. */
1795
+ readonly ancestors?: string[] | null;
1796
+ /** @description Whether the current user can edit the allocation amount */
1797
+ readonly canEditTotal?: boolean;
1798
+ /**
1799
+ * Format: int64
1800
+ * @description Current organization threshold level
1801
+ */
1802
+ readonly currentOrgThreshold?: number;
1803
+ /** @description Whether crossing an organization threshold freezes or shuts down resources charged to this allocation or the allocations under it. When false, its thresholds only notify, and its budget running out stops only work charged to it directly, not the allocations under it. Defaults to true. */
1804
+ enforceThresholds?: boolean;
1805
+ /**
1806
+ * Format: double
1807
+ * @description Estimated amount used
1808
+ */
1809
+ readonly estimatedUsed?: number;
1810
+ /** @description The allocation's period amounts summed by the fiscal year each period window starts in, earliest first. Absent without periods. */
1811
+ readonly fiscalYears?: components["schemas"]["AllocationFiscalYear"][] | null;
1812
+ /** @description Whether any allocation sits under this one. Only set when reading a single allocation. */
1813
+ readonly hasChildren?: boolean;
1814
+ /** @description Whether this allocation has associated cloud usage records */
1815
+ readonly hasCloudUsage?: boolean;
1816
+ /** @description Allocation ID, which its events target */
1817
+ readonly id?: string;
1818
+ /** @description Allocation name */
1819
+ name: string;
1820
+ /** @description Not chargeable: the allocation only holds budget for the allocations under it, and can't be billed directly. */
1821
+ nonChargeable?: boolean;
1822
+ /** @description Parent allocation name */
1823
+ parent?: string;
1824
+ /** @description Budget per period. Periods can't overlap, and the total follows the current period's amount. */
1825
+ periods?: components["schemas"]["AllocationPeriodAmount"][] | null;
1826
+ /** @description Whether the allocation's unit is rated in USD (false = a raw consumption unit) */
1827
+ readonly ratedInUsd?: boolean;
1828
+ /**
1829
+ * Format: int64
1830
+ * @description Number of resource groups currently billing this allocation
1831
+ */
1832
+ readonly resourceGroups?: number;
1833
+ /** @description Highest organization allocation threshold this allocation has crossed */
1834
+ readonly threshold?: components["schemas"]["CrossedThreshold"];
1835
+ /**
1836
+ * Format: double
1837
+ * @description Total allocation amount
1838
+ */
1839
+ total: number;
1840
+ /**
1841
+ * @description Allocation type: managed (USD, rated by the billing system) or custom (denominated in a custom unit). Derived from the unit when omitted.
1842
+ * @enum {string}
1843
+ */
1844
+ type?: "managed" | "custom";
1845
+ /** @description Unit of measurement */
1846
+ unit: string;
1847
+ /**
1848
+ * @description Why new resources cannot bill this allocation: no budget set, a freeze/shutdown threshold crossed, a not chargeable allocation, no period covers today, its budget or an enforcing ancestor's is used up, or, in a listing of your own allocations, it is shared with you to read but not to bill
1849
+ * @enum {string}
1850
+ */
1851
+ readonly unusableReason?: "no-budget" | "over-threshold" | "non-chargeable" | "no-active-period" | "budget-spent" | "no-access";
1852
+ /** @description Whether new resources can bill this allocation right now */
1853
+ readonly usable?: boolean;
1854
+ /**
1855
+ * Format: double
1856
+ * @description Amount used
1857
+ */
1858
+ readonly used?: number;
1859
+ };
1860
+ AllocationFiscalYear: {
1861
+ /**
1862
+ * Format: double
1863
+ * @description Sum of the allocation's period amounts whose windows start in this fiscal year
1864
+ */
1865
+ amount: number;
1866
+ /**
1867
+ * Format: date-time
1868
+ * @description End of the fiscal year (exclusive)
1869
+ */
1870
+ end: string;
1871
+ /**
1872
+ * @description Fiscal year label, such as FY27
1873
+ * @example FY27
1874
+ */
1875
+ name: string;
1876
+ /** @description Names of the periods counted in this fiscal year */
1877
+ periods: string[] | null;
1878
+ /**
1879
+ * Format: date-time
1880
+ * @description Start of the fiscal year
1881
+ */
1882
+ start: string;
1883
+ };
1884
+ AllocationPeriodAmount: {
1885
+ /** @description Whether the period covers now */
1886
+ readonly active?: boolean;
1887
+ /**
1888
+ * Format: double
1889
+ * @description Budget for the period
1890
+ */
1891
+ amount: number;
1892
+ /**
1893
+ * Format: date-time
1894
+ * @description End of the period (exclusive)
1895
+ */
1896
+ readonly end?: string;
1897
+ /** @description Period name */
1898
+ period: string;
1899
+ /**
1900
+ * @description How the period repeats; each window gets the full amount. Absent for a period that doesn't repeat.
1901
+ * @enum {string}
1902
+ */
1903
+ readonly repeat?: "monthly";
1904
+ /**
1905
+ * Format: date-time
1906
+ * @description Start of the period
1907
+ */
1908
+ readonly start?: string;
1909
+ };
1910
+ AllowedDirectory: {
1911
+ edit?: boolean;
1912
+ path: string;
1913
+ subtree?: boolean;
1914
+ };
1915
+ ApprovalAnswer: {
1916
+ allowDir?: boolean;
1917
+ allowRules?: string[] | null;
1918
+ allowed?: boolean;
1919
+ answers?: components["schemas"]["AskQuestionAnswer"][] | null;
1920
+ chat?: boolean;
1921
+ clear?: boolean;
1922
+ denyMessage?: string;
1923
+ feedback?: string;
1924
+ /** @enum {string} */
1925
+ mode?: "" | "read-only" | "accept-edits" | "auto" | "bypass-permissions" | "plan";
1926
+ plan?: string;
1927
+ };
1928
+ ApprovalRequest: {
1929
+ agent?: string;
1930
+ allowDir?: components["schemas"]["AllowedDirectory"];
1931
+ callId?: string;
1932
+ command?: string;
1933
+ /** Format: date-time */
1483
1934
  createdAt: string;
1484
1935
  id: string;
1485
1936
  /** @enum {string} */
@@ -1515,6 +1966,51 @@ export interface components {
1515
1966
  question?: string;
1516
1967
  text?: string;
1517
1968
  };
1969
+ AttachmentResponse: {
1970
+ /** @description MIME type */
1971
+ contentType: string;
1972
+ /** @description Parent conversation ID */
1973
+ conversationId?: string;
1974
+ /** @description Original filename */
1975
+ filename: string;
1976
+ /** @description Attachment ID */
1977
+ id: string;
1978
+ /** @description Associated message ID */
1979
+ messageId?: string;
1980
+ /**
1981
+ * Format: int64
1982
+ * @description File size in bytes
1983
+ */
1984
+ size: number;
1985
+ /**
1986
+ * Format: date-time
1987
+ * @description Upload timestamp
1988
+ */
1989
+ uploadedAt: string;
1990
+ };
1991
+ ChatToolDecision: {
1992
+ /**
1993
+ * Format: date-time
1994
+ * @description When it was settled
1995
+ */
1996
+ at: string;
1997
+ /**
1998
+ * @description Who settled it
1999
+ * @enum {string}
2000
+ */
2001
+ by: "user";
2002
+ /** @description Whether the user changed the arguments before allowing the call */
2003
+ edited?: boolean;
2004
+ /** @description The display name of the user who answered */
2005
+ name?: string;
2006
+ /**
2007
+ * @description How the call was settled
2008
+ * @enum {string}
2009
+ */
2010
+ status: "approved" | "denied" | "expired";
2011
+ /** @description The user who answered */
2012
+ username?: string;
2013
+ };
1518
2014
  ClaudeLogin: {
1519
2015
  account: string;
1520
2016
  email?: string;
@@ -1526,6 +2022,32 @@ export interface components {
1526
2022
  /** @enum {string} */
1527
2023
  status: "running" | "checking" | "signed_in" | "failed" | "canceled" | "expired";
1528
2024
  };
2025
+ ConversationResponse: {
2026
+ /** @description Currently active branch leaf ID */
2027
+ activeBranchId: string | null;
2028
+ /** @description All branch leaf IDs */
2029
+ branches?: string[] | null;
2030
+ /** @description Whether the user can add messages */
2031
+ canCollaborate: boolean;
2032
+ /**
2033
+ * Format: date-time
2034
+ * @description Creation timestamp
2035
+ */
2036
+ createdAt: string;
2037
+ /** @description Conversation ID */
2038
+ id: string;
2039
+ /** @description Whether the current user owns this conversation */
2040
+ isOwner: boolean;
2041
+ /** @description Message tree */
2042
+ messages: components["schemas"]["MessageResponse"][] | null;
2043
+ /** @description Conversation title */
2044
+ title: string | null;
2045
+ /**
2046
+ * Format: date-time
2047
+ * @description Last update timestamp
2048
+ */
2049
+ updatedAt: string | null;
2050
+ };
1529
2051
  CreateSessionBody: {
1530
2052
  /** @description Allocation to bill the session to. Required for org provider models. */
1531
2053
  allocation?: string;
@@ -1548,6 +2070,21 @@ export interface components {
1548
2070
  /** @description Absolute path on the machine to run in. Offer the caller workspaces their existing sessions already use. */
1549
2071
  workspace: string;
1550
2072
  };
2073
+ CrossedThreshold: {
2074
+ /**
2075
+ * @description Actions this threshold takes; only notify for an allocation that doesn't enforce thresholds
2076
+ * @example [
2077
+ * "freeze"
2078
+ * ]
2079
+ */
2080
+ actions: string[] | null;
2081
+ /**
2082
+ * Format: double
2083
+ * @description Usage percent of the crossed threshold
2084
+ * @example 80
2085
+ */
2086
+ threshold: number;
2087
+ };
1551
2088
  Error: {
1552
2089
  /** @description Stable, machine-readable error code, for clients to show a localized message. Every error carries one. Documented at /problems/. */
1553
2090
  code?: string;
@@ -1562,6 +2099,14 @@ export interface components {
1562
2099
  [key: string]: unknown;
1563
2100
  };
1564
2101
  };
2102
+ FunctionCall: {
2103
+ /** @description JSON string of arguments */
2104
+ arguments: string;
2105
+ /** @description Function name */
2106
+ name: string;
2107
+ } & {
2108
+ [key: string]: unknown;
2109
+ };
1565
2110
  GoalProgress: {
1566
2111
  condition?: string;
1567
2112
  /** Format: int64 */
@@ -1576,6 +2121,8 @@ export interface components {
1576
2121
  tokens?: number;
1577
2122
  /** Format: int64 */
1578
2123
  turns?: number;
2124
+ /** Format: int64 */
2125
+ waitedMs?: number;
1579
2126
  };
1580
2127
  GoalStatus: {
1581
2128
  active?: boolean;
@@ -1587,6 +2134,8 @@ export interface components {
1587
2134
  HistoryItem: {
1588
2135
  callId?: string;
1589
2136
  decision?: components["schemas"]["ToolDecision"];
2137
+ /** Format: int64 */
2138
+ durationMs?: number;
1590
2139
  fromMain?: boolean;
1591
2140
  images?: components["schemas"]["ImageContent"][] | null;
1592
2141
  /** @enum {string} */
@@ -1603,11 +2152,15 @@ export interface components {
1603
2152
  };
1604
2153
  ImageContent: {
1605
2154
  data: string;
2155
+ /** Format: int64 */
2156
+ height?: number;
1606
2157
  mime: string;
1607
2158
  originalMime?: string;
1608
2159
  /** Format: int64 */
1609
2160
  originalSize?: number;
1610
2161
  ref?: string;
2162
+ /** Format: int64 */
2163
+ width?: number;
1611
2164
  };
1612
2165
  MCPStatus: {
1613
2166
  err?: string;
@@ -1617,6 +2170,131 @@ export interface components {
1617
2170
  /** Format: int64 */
1618
2171
  tools?: number;
1619
2172
  };
2173
+ MessageAuthor: {
2174
+ /** @description Avatar image URL */
2175
+ avatarUrl?: string;
2176
+ /** @description User ID */
2177
+ id: string;
2178
+ /** @description Display name */
2179
+ name?: string;
2180
+ /** @description Username */
2181
+ username: string;
2182
+ };
2183
+ MessagePart: {
2184
+ /** @description Arguments as a JSON string */
2185
+ args: string;
2186
+ /** @description How a call that asked first was settled */
2187
+ decision?: components["schemas"]["ChatToolDecision"];
2188
+ /**
2189
+ * Format: date-time
2190
+ * @description When a waiting call stops being answerable
2191
+ */
2192
+ expiresAt?: string;
2193
+ /** @description Tool call ID */
2194
+ id: string;
2195
+ /**
2196
+ * @description Part kind
2197
+ * @enum {string}
2198
+ */
2199
+ kind: "tool_call" | "text";
2200
+ /** @description Tool name */
2201
+ name: string;
2202
+ /** @description What the tool returned to the model */
2203
+ result: string;
2204
+ /**
2205
+ * @description Whether the call succeeded, or that it waits for the user's approval
2206
+ * @enum {string}
2207
+ */
2208
+ status: "waiting" | "running" | "ok" | "error";
2209
+ /** @description What the model wrote at this point, for a text part */
2210
+ text?: string;
2211
+ };
2212
+ MessageResponse: {
2213
+ /** @description Attachment details */
2214
+ attachments?: components["schemas"]["AttachmentResponse"][] | null;
2215
+ /** @description Message author info */
2216
+ author?: components["schemas"]["MessageAuthor"];
2217
+ /** @description Message content */
2218
+ content: string | null;
2219
+ /** @description Message UUID */
2220
+ id: string;
2221
+ /** @description Model used */
2222
+ model: string | null;
2223
+ /** @description Parent message ID */
2224
+ parentId: string | null;
2225
+ /** @description Platform tool calls the server ran while writing this answer and the text written around them, in order. The last text part, when it ends the list, is the answer in content. Echo each run of calls back in history as an assistant message with the text before it and the calls, then one tool message per result. */
2226
+ parts?: components["schemas"]["MessagePart"][] | null;
2227
+ /** @description Provider ID */
2228
+ providerId: string | null;
2229
+ /** @description Reasoning/thinking content from the model */
2230
+ reasoning?: string;
2231
+ /**
2232
+ * Format: double
2233
+ * @description Reasoning duration in milliseconds
2234
+ */
2235
+ reasoningDuration?: number;
2236
+ /** @description Raw Responses API output items (reasoning with encrypted_content, function calls); echo back in history for cross-turn reasoning continuity */
2237
+ responsesOutput?: unknown[] | null;
2238
+ /** @description Message role */
2239
+ role: string;
2240
+ /** @description Whether the message was stopped early by user */
2241
+ stopped?: boolean;
2242
+ /**
2243
+ * Format: date-time
2244
+ * @description Message timestamp
2245
+ */
2246
+ timestamp: string;
2247
+ /** @description Token usage */
2248
+ tokensUsed?: components["schemas"]["Usage"];
2249
+ /** @description Tool call ID */
2250
+ toolCallId?: string;
2251
+ /** @description Tool calls */
2252
+ toolCalls?: components["schemas"]["ToolCall"][] | null;
2253
+ };
2254
+ ModelEntry: {
2255
+ /** @description Budget allocation the provider's resource group bills; absent for org and session models */
2256
+ allocation?: string;
2257
+ /**
2258
+ * Format: double
2259
+ * @description USD per prompt token written to the provider's prompt cache; 0 means cache writes are free
2260
+ */
2261
+ cache_write_rate?: number;
2262
+ /**
2263
+ * Format: double
2264
+ * @description USD per prompt token served from the provider's prompt cache; 0 means cache reads are free
2265
+ */
2266
+ cached_input_rate?: number;
2267
+ /** Format: int64 */
2268
+ context_window?: number;
2269
+ /** Format: int64 */
2270
+ created: number;
2271
+ id: string;
2272
+ /** Format: double */
2273
+ input_rate?: number;
2274
+ name?: string;
2275
+ object: string;
2276
+ /** Format: double */
2277
+ output_rate?: number;
2278
+ owned_by: string;
2279
+ provider?: string;
2280
+ provider_name?: string;
2281
+ provider_owner?: string;
2282
+ provider_type?: string;
2283
+ reasoning_efforts?: string[] | null;
2284
+ supports_responses?: boolean;
2285
+ supports_usage?: boolean;
2286
+ /** @description Whether the model accepts image input; absent when the platform has no capability data for it */
2287
+ supports_vision?: boolean;
2288
+ /** @enum {string} */
2289
+ tool_calling_mode: "native" | "emulated" | "none";
2290
+ usage_not_supported?: boolean;
2291
+ };
2292
+ ModelsResponse: {
2293
+ data: components["schemas"]["ModelEntry"][] | null;
2294
+ object: string;
2295
+ provider_issues?: components["schemas"]["ProviderIssue"][] | null;
2296
+ unreachable_sessions?: components["schemas"]["UnreachableSession"][] | null;
2297
+ };
1620
2298
  PasteRef: {
1621
2299
  /** Format: int64 */
1622
2300
  id: number;
@@ -1633,6 +2311,39 @@ export interface components {
1633
2311
  placeholder: string;
1634
2312
  text?: string;
1635
2313
  };
2314
+ Preview: {
2315
+ /** @description Indicates if the preview was enabled at a platform-wide level. */
2316
+ platform: boolean;
2317
+ /** @description Name of the preview. */
2318
+ preview: string;
2319
+ };
2320
+ PromptTokensDetails: {
2321
+ /**
2322
+ * Format: int64
2323
+ * @description Prompt tokens written to the provider's prompt cache
2324
+ */
2325
+ cache_write_tokens?: number;
2326
+ /**
2327
+ * Format: int64
2328
+ * @description Prompt tokens served from the provider's prompt cache
2329
+ */
2330
+ cached_tokens: number;
2331
+ };
2332
+ ProviderIssue: {
2333
+ /** @description The provider's own explanation, when it gave one */
2334
+ message?: string;
2335
+ /** @description Provider display name, matching the models it covers */
2336
+ provider: string;
2337
+ /** @description Stable provider name */
2338
+ provider_name: string;
2339
+ /** @description Provider owner's username; empty for organization connections */
2340
+ provider_owner?: string;
2341
+ /**
2342
+ * @description Why the connection is unusable
2343
+ * @enum {string}
2344
+ */
2345
+ status: "unauthorized" | "unreachable";
2346
+ };
1636
2347
  RemotePolicy: {
1637
2348
  maxPermissionMode: string;
1638
2349
  newSessions: boolean;
@@ -1660,6 +2371,8 @@ export interface components {
1660
2371
  autoCompactWindow?: number;
1661
2372
  autoName?: string;
1662
2373
  /** Format: int64 */
2374
+ backgroundMonitors?: number;
2375
+ /** Format: int64 */
1663
2376
  backgroundShells?: number;
1664
2377
  claudeAccount?: string;
1665
2378
  effectiveAllocation?: string;
@@ -1752,6 +2465,21 @@ export interface components {
1752
2465
  /** Format: int64 */
1753
2466
  outputTokens?: number;
1754
2467
  };
2468
+ ToolCall: {
2469
+ /** @description Function call details */
2470
+ function: components["schemas"]["FunctionCall"];
2471
+ /** @description Unique tool call ID */
2472
+ id?: string;
2473
+ /**
2474
+ * Format: int64
2475
+ * @description Tool call index (for streaming)
2476
+ */
2477
+ index?: number;
2478
+ /** @description Tool type */
2479
+ type?: string;
2480
+ } & {
2481
+ [key: string]: unknown;
2482
+ };
1755
2483
  ToolDecision: {
1756
2484
  action?: string;
1757
2485
  answers?: components["schemas"]["AskQuestionAnswer"][] | null;
@@ -1778,32 +2506,334 @@ export interface components {
1778
2506
  /** Format: int64 */
1779
2507
  pendingAgents?: number;
1780
2508
  };
1781
- TurnResult: {
1782
- blockedByHook?: string;
1783
- /** Format: double */
1784
- estimatedCost?: number;
1785
- /** Format: int64 */
1786
- inputTokens?: number;
1787
- /** Format: int64 */
1788
- iters?: number;
1789
- model?: string;
1790
- /** Format: int64 */
1791
- outputTokens?: number;
1792
- skills?: string[] | null;
2509
+ TurnResult: {
2510
+ blockedByHook?: string;
2511
+ /** Format: double */
2512
+ estimatedCost?: number;
2513
+ /** Format: int64 */
2514
+ inputTokens?: number;
2515
+ /** Format: int64 */
2516
+ iters?: number;
2517
+ model?: string;
2518
+ /** Format: int64 */
2519
+ outputTokens?: number;
2520
+ skills?: string[] | null;
2521
+ };
2522
+ UnreachableSession: {
2523
+ name: string;
2524
+ owner: string;
2525
+ };
2526
+ UpdateConversationInputBody: {
2527
+ activeBranchId?: string;
2528
+ title?: string;
2529
+ };
2530
+ UpdateUserPreferencesInputBody: {
2531
+ /** @description Preference keys to write. A null value removes the key; keys not present are left unchanged. */
2532
+ preferences: {
2533
+ [key: string]: unknown;
2534
+ };
2535
+ };
2536
+ Usage: {
2537
+ /**
2538
+ * Format: int64
2539
+ * @description Tokens in the completion
2540
+ */
2541
+ completion_tokens: number;
2542
+ /**
2543
+ * Format: int64
2544
+ * @description Tokens in the prompt, cached ones included
2545
+ */
2546
+ prompt_tokens: number;
2547
+ prompt_tokens_details?: components["schemas"]["PromptTokensDetails"];
2548
+ /**
2549
+ * Format: int64
2550
+ * @description Total tokens used
2551
+ */
2552
+ total_tokens: number;
2553
+ };
2554
+ UserPreferencesBody: {
2555
+ /** @description The user's saved UI preferences keyed by view id. Values are opaque JSON owned by the client. */
2556
+ preferences: {
2557
+ [key: string]: unknown;
2558
+ };
2559
+ };
2560
+ };
2561
+ responses: never;
2562
+ parameters: never;
2563
+ requestBodies: never;
2564
+ headers: never;
2565
+ pathItems: never;
2566
+ }
2567
+ export type $defs = Record<string, never>;
2568
+ export interface operations {
2569
+ getAIChatConversation: {
2570
+ parameters: {
2571
+ query?: {
2572
+ /** @description Specific branch to return (optional) */
2573
+ branchId?: string;
2574
+ };
2575
+ header?: never;
2576
+ path: {
2577
+ /** @description Conversation ID */
2578
+ id: string;
2579
+ };
2580
+ cookie?: never;
2581
+ };
2582
+ requestBody?: never;
2583
+ responses: {
2584
+ /** @description OK */
2585
+ 200: {
2586
+ headers: {
2587
+ [name: string]: unknown;
2588
+ };
2589
+ content: {
2590
+ "application/json": components["schemas"]["ConversationResponse"];
2591
+ };
2592
+ };
2593
+ /** @description Error */
2594
+ default: {
2595
+ headers: {
2596
+ [name: string]: unknown;
2597
+ };
2598
+ content: {
2599
+ "application/json": components["schemas"]["Error"];
2600
+ };
2601
+ };
2602
+ };
2603
+ };
2604
+ deleteAIChatConversation: {
2605
+ parameters: {
2606
+ query?: never;
2607
+ header?: never;
2608
+ path: {
2609
+ /** @description Conversation ID */
2610
+ id: string;
2611
+ };
2612
+ cookie?: never;
2613
+ };
2614
+ requestBody?: never;
2615
+ responses: {
2616
+ /** @description No Content */
2617
+ 204: {
2618
+ headers: {
2619
+ [name: string]: unknown;
2620
+ };
2621
+ content?: never;
2622
+ };
2623
+ /** @description Error */
2624
+ default: {
2625
+ headers: {
2626
+ [name: string]: unknown;
2627
+ };
2628
+ content: {
2629
+ "application/json": components["schemas"]["Error"];
2630
+ };
2631
+ };
2632
+ };
2633
+ };
2634
+ updateAIChatConversation: {
2635
+ parameters: {
2636
+ query?: never;
2637
+ header?: never;
2638
+ path: {
2639
+ /** @description Conversation ID */
2640
+ id: string;
2641
+ };
2642
+ cookie?: never;
2643
+ };
2644
+ requestBody: {
2645
+ content: {
2646
+ "application/json": components["schemas"]["UpdateConversationInputBody"];
2647
+ };
2648
+ };
2649
+ responses: {
2650
+ /** @description OK */
2651
+ 200: {
2652
+ headers: {
2653
+ [name: string]: unknown;
2654
+ };
2655
+ content: {
2656
+ "application/json": components["schemas"]["ConversationResponse"];
2657
+ };
2658
+ };
2659
+ /** @description Error */
2660
+ default: {
2661
+ headers: {
2662
+ [name: string]: unknown;
2663
+ };
2664
+ content: {
2665
+ "application/json": components["schemas"]["Error"];
2666
+ };
2667
+ };
2668
+ };
2669
+ };
2670
+ "list-user-allocations": {
2671
+ parameters: {
2672
+ query?: {
2673
+ /** @description Maximum number of allocations to return */
2674
+ limit?: number;
2675
+ /** @description Number of allocations to skip */
2676
+ skip?: number;
2677
+ /** @description Filter by allocation name (case-insensitive contains) */
2678
+ name?: string;
2679
+ /** @description Sort field and direction */
2680
+ sort?: "name" | "-name" | "total" | "-total";
2681
+ /** @description Which allocations to list: mine (default), those shared with you, or all, every allocation in the organization. Widening requires administrator access. */
2682
+ scope?: "mine" | "all";
2683
+ };
2684
+ header?: never;
2685
+ path?: never;
2686
+ cookie?: never;
2687
+ };
2688
+ requestBody?: never;
2689
+ responses: {
2690
+ /** @description OK */
2691
+ 200: {
2692
+ headers: {
2693
+ [name: string]: unknown;
2694
+ };
2695
+ content: {
2696
+ "application/json": components["schemas"]["Allocation"][] | null;
2697
+ };
2698
+ };
2699
+ /** @description Error */
2700
+ default: {
2701
+ headers: {
2702
+ [name: string]: unknown;
2703
+ };
2704
+ content: {
2705
+ "application/json": components["schemas"]["Error"];
2706
+ };
2707
+ };
2708
+ };
2709
+ };
2710
+ listAIChatModels: {
2711
+ parameters: {
2712
+ query?: never;
2713
+ header?: never;
2714
+ path?: never;
2715
+ cookie?: never;
2716
+ };
2717
+ requestBody?: never;
2718
+ responses: {
2719
+ /** @description OK */
2720
+ 200: {
2721
+ headers: {
2722
+ [name: string]: unknown;
2723
+ };
2724
+ content: {
2725
+ "application/json": components["schemas"]["ModelsResponse"];
2726
+ };
2727
+ };
2728
+ /** @description Error */
2729
+ default: {
2730
+ headers: {
2731
+ [name: string]: unknown;
2732
+ };
2733
+ content: {
2734
+ "application/json": components["schemas"]["Error"];
2735
+ };
2736
+ };
2737
+ };
2738
+ };
2739
+ "get-previews": {
2740
+ parameters: {
2741
+ query?: never;
2742
+ header?: never;
2743
+ path?: never;
2744
+ cookie?: never;
2745
+ };
2746
+ requestBody?: never;
2747
+ responses: {
2748
+ /** @description OK */
2749
+ 200: {
2750
+ headers: {
2751
+ [name: string]: unknown;
2752
+ };
2753
+ content: {
2754
+ "application/json": components["schemas"]["Preview"][] | null;
2755
+ };
2756
+ };
2757
+ /** @description Error */
2758
+ default: {
2759
+ headers: {
2760
+ [name: string]: unknown;
2761
+ };
2762
+ content: {
2763
+ "application/json": components["schemas"]["Error"];
2764
+ };
2765
+ };
2766
+ };
2767
+ };
2768
+ "get-user-preferences": {
2769
+ parameters: {
2770
+ query?: never;
2771
+ header?: never;
2772
+ path?: never;
2773
+ cookie?: never;
2774
+ };
2775
+ requestBody?: never;
2776
+ responses: {
2777
+ /** @description OK */
2778
+ 200: {
2779
+ headers: {
2780
+ [name: string]: unknown;
2781
+ };
2782
+ content: {
2783
+ "application/json": components["schemas"]["UserPreferencesBody"];
2784
+ };
2785
+ };
2786
+ /** @description Error */
2787
+ default: {
2788
+ headers: {
2789
+ [name: string]: unknown;
2790
+ };
2791
+ content: {
2792
+ "application/json": components["schemas"]["Error"];
2793
+ };
2794
+ };
2795
+ };
2796
+ };
2797
+ "update-user-preferences": {
2798
+ parameters: {
2799
+ query?: never;
2800
+ header?: never;
2801
+ path?: never;
2802
+ cookie?: never;
2803
+ };
2804
+ requestBody: {
2805
+ content: {
2806
+ "application/json": components["schemas"]["UpdateUserPreferencesInputBody"];
2807
+ };
2808
+ };
2809
+ responses: {
2810
+ /** @description OK */
2811
+ 200: {
2812
+ headers: {
2813
+ [name: string]: unknown;
2814
+ };
2815
+ content: {
2816
+ "application/json": components["schemas"]["UserPreferencesBody"];
2817
+ };
2818
+ };
2819
+ /** @description Error */
2820
+ default: {
2821
+ headers: {
2822
+ [name: string]: unknown;
2823
+ };
2824
+ content: {
2825
+ "application/json": components["schemas"]["Error"];
2826
+ };
2827
+ };
1793
2828
  };
1794
2829
  };
1795
- responses: never;
1796
- parameters: never;
1797
- requestBodies: never;
1798
- headers: never;
1799
- pathItems: never;
1800
- }
1801
- export type $defs = Record<string, never>;
1802
- export interface operations {
1803
2830
  "list-agent-sessions": {
1804
2831
  parameters: {
1805
2832
  query?: never;
1806
- header?: never;
2833
+ header?: {
2834
+ /** @description The ETag of a listing you hold. While nothing in it has changed, the answer is 304 with no body, and the machines are not asked to send their sessions again. */
2835
+ "If-None-Match"?: string;
2836
+ };
1807
2837
  path?: never;
1808
2838
  cookie?: never;
1809
2839
  };
@@ -1812,6 +2842,8 @@ export interface operations {
1812
2842
  /** @description OK */
1813
2843
  200: {
1814
2844
  headers: {
2845
+ "Cache-Control"?: string;
2846
+ ETag?: string;
1815
2847
  [name: string]: unknown;
1816
2848
  };
1817
2849
  content: {
@@ -1829,6 +2861,43 @@ export interface operations {
1829
2861
  };
1830
2862
  };
1831
2863
  };
2864
+ "list-agent-machine-directories": {
2865
+ parameters: {
2866
+ query?: {
2867
+ /** @description Directory to list: an absolute path, or one starting at ~ for the home directory, which an empty path lists. */
2868
+ path?: string;
2869
+ /** @description Keeps the folders whose names hold this text, in any case, those starting with it first. */
2870
+ filter?: string;
2871
+ };
2872
+ header?: never;
2873
+ path: {
2874
+ /** @description Machine id from the machines list. */
2875
+ machine: string;
2876
+ };
2877
+ cookie?: never;
2878
+ };
2879
+ requestBody?: never;
2880
+ responses: {
2881
+ /** @description OK */
2882
+ 200: {
2883
+ headers: {
2884
+ [name: string]: unknown;
2885
+ };
2886
+ content: {
2887
+ "application/json": components["schemas"]["AgentDirectories"];
2888
+ };
2889
+ };
2890
+ /** @description Error */
2891
+ default: {
2892
+ headers: {
2893
+ [name: string]: unknown;
2894
+ };
2895
+ content: {
2896
+ "application/json": components["schemas"]["Error"];
2897
+ };
2898
+ };
2899
+ };
2900
+ };
1832
2901
  "get-agent-workspace-palette": {
1833
2902
  parameters: {
1834
2903
  query: {
@@ -2034,6 +3103,42 @@ export interface operations {
2034
3103
  };
2035
3104
  };
2036
3105
  };
3106
+ "move-agent-machine-claude-account-sessions": {
3107
+ parameters: {
3108
+ query?: never;
3109
+ header?: never;
3110
+ path: {
3111
+ machine: string;
3112
+ name: string;
3113
+ };
3114
+ cookie?: never;
3115
+ };
3116
+ requestBody: {
3117
+ content: {
3118
+ "application/json": components["schemas"]["AgentClaudeAccountMoveBody"];
3119
+ };
3120
+ };
3121
+ responses: {
3122
+ /** @description OK */
3123
+ 200: {
3124
+ headers: {
3125
+ [name: string]: unknown;
3126
+ };
3127
+ content: {
3128
+ "application/json": components["schemas"]["AgentClaudeAccountMoved"];
3129
+ };
3130
+ };
3131
+ /** @description Error */
3132
+ default: {
3133
+ headers: {
3134
+ [name: string]: unknown;
3135
+ };
3136
+ content: {
3137
+ "application/json": components["schemas"]["Error"];
3138
+ };
3139
+ };
3140
+ };
3141
+ };
2037
3142
  "start-agent-claude-login": {
2038
3143
  parameters: {
2039
3144
  query?: never;
@@ -2173,8 +3278,14 @@ export interface operations {
2173
3278
  };
2174
3279
  "get-agent-session": {
2175
3280
  parameters: {
2176
- query?: never;
2177
- header?: never;
3281
+ query?: {
3282
+ /** @description Set to refs, each image in the history that has a ref comes with empty data: its preview is read from the session's image route with preview=true. Previews are most of what a transcript with pictures weighs. A machine whose pw predates this sends every preview. */
3283
+ previews?: "refs";
3284
+ };
3285
+ header?: {
3286
+ /** @description The ETag of a transcript you hold. While the session has not changed, the answer is 304 with no body, and its machine does not send the transcript again. */
3287
+ "If-None-Match"?: string;
3288
+ };
2178
3289
  path: {
2179
3290
  /** @description Machine id from the machines list. */
2180
3291
  machine: string;
@@ -2188,6 +3299,8 @@ export interface operations {
2188
3299
  /** @description OK */
2189
3300
  200: {
2190
3301
  headers: {
3302
+ "Cache-Control"?: string;
3303
+ ETag?: string;
2191
3304
  [name: string]: unknown;
2192
3305
  };
2193
3306
  content: {
@@ -2566,6 +3679,44 @@ export interface operations {
2566
3679
  };
2567
3680
  };
2568
3681
  };
3682
+ "withdraw-agent-session-direction": {
3683
+ parameters: {
3684
+ query?: never;
3685
+ header?: never;
3686
+ path: {
3687
+ /** @description Machine id from the machines list. */
3688
+ machine: string;
3689
+ /** @description Session id as the daemon reports it. */
3690
+ id: string;
3691
+ };
3692
+ cookie?: never;
3693
+ };
3694
+ requestBody: {
3695
+ content: {
3696
+ "application/json": components["schemas"]["AgentDirectionWithdrawBody"];
3697
+ };
3698
+ };
3699
+ responses: {
3700
+ /** @description OK */
3701
+ 200: {
3702
+ headers: {
3703
+ [name: string]: unknown;
3704
+ };
3705
+ content: {
3706
+ "application/json": components["schemas"]["AgentDirectionWithdrawn"];
3707
+ };
3708
+ };
3709
+ /** @description Error */
3710
+ default: {
3711
+ headers: {
3712
+ [name: string]: unknown;
3713
+ };
3714
+ content: {
3715
+ "application/json": components["schemas"]["Error"];
3716
+ };
3717
+ };
3718
+ };
3719
+ };
2569
3720
  "fork-agent-session": {
2570
3721
  parameters: {
2571
3722
  query?: never;
@@ -2624,7 +3775,7 @@ export interface operations {
2624
3775
  [name: string]: unknown;
2625
3776
  };
2626
3777
  content: {
2627
- "application/json": components["schemas"]["AgentCommandOutput"];
3778
+ "application/json": components["schemas"]["AgentGoalResult"];
2628
3779
  };
2629
3780
  };
2630
3781
  /** @description Error */
@@ -3340,6 +4491,80 @@ export interface operations {
3340
4491
  };
3341
4492
  };
3342
4493
  };
4494
+ "withdraw-agent-session-subagent-direction": {
4495
+ parameters: {
4496
+ query?: never;
4497
+ header?: never;
4498
+ path: {
4499
+ /** @description Machine id from the machines list. */
4500
+ machine: string;
4501
+ /** @description Session id as the daemon reports it. */
4502
+ id: string;
4503
+ /** @description Subagent id from the session's subagents. */
4504
+ subId: string;
4505
+ };
4506
+ cookie?: never;
4507
+ };
4508
+ requestBody: {
4509
+ content: {
4510
+ "application/json": components["schemas"]["AgentDirectionWithdrawBody"];
4511
+ };
4512
+ };
4513
+ responses: {
4514
+ /** @description OK */
4515
+ 200: {
4516
+ headers: {
4517
+ [name: string]: unknown;
4518
+ };
4519
+ content: {
4520
+ "application/json": components["schemas"]["AgentDirectionWithdrawn"];
4521
+ };
4522
+ };
4523
+ /** @description Error */
4524
+ default: {
4525
+ headers: {
4526
+ [name: string]: unknown;
4527
+ };
4528
+ content: {
4529
+ "application/json": components["schemas"]["Error"];
4530
+ };
4531
+ };
4532
+ };
4533
+ };
4534
+ "dismiss-agent-session-subagent": {
4535
+ parameters: {
4536
+ query?: never;
4537
+ header?: never;
4538
+ path: {
4539
+ /** @description Machine id from the machines list. */
4540
+ machine: string;
4541
+ /** @description Session id as the daemon reports it. */
4542
+ id: string;
4543
+ /** @description Subagent id from the session's subagents. */
4544
+ subId: string;
4545
+ };
4546
+ cookie?: never;
4547
+ };
4548
+ requestBody?: never;
4549
+ responses: {
4550
+ /** @description No Content */
4551
+ 204: {
4552
+ headers: {
4553
+ [name: string]: unknown;
4554
+ };
4555
+ content?: never;
4556
+ };
4557
+ /** @description Error */
4558
+ default: {
4559
+ headers: {
4560
+ [name: string]: unknown;
4561
+ };
4562
+ content: {
4563
+ "application/json": components["schemas"]["Error"];
4564
+ };
4565
+ };
4566
+ };
4567
+ };
3343
4568
  "send-agent-session-subagent-message": {
3344
4569
  parameters: {
3345
4570
  query?: never;
@@ -3452,6 +4677,50 @@ export interface operations {
3452
4677
  };
3453
4678
  };
3454
4679
  };
4680
+ "get-agent-session-transcript": {
4681
+ parameters: {
4682
+ query?: {
4683
+ /** @description Set to refs, each image in the history that has a ref comes with empty data: its preview is read from the session's image route with preview=true. */
4684
+ previews?: "refs";
4685
+ /** @description About how many history items the tail holds. It is longer when no item that near the end starts cleanly: a tool result is never parted from its call. */
4686
+ tail?: number;
4687
+ };
4688
+ header?: {
4689
+ /** @description The ETag of a transcript you hold. While the session has not changed, the answer is 304 with no body, and its machine does not send the transcript again. */
4690
+ "If-None-Match"?: string;
4691
+ };
4692
+ path: {
4693
+ /** @description Machine id from the machines list. */
4694
+ machine: string;
4695
+ /** @description Session id as the daemon reports it. */
4696
+ id: string;
4697
+ };
4698
+ cookie?: never;
4699
+ };
4700
+ requestBody?: never;
4701
+ responses: {
4702
+ /** @description OK */
4703
+ 200: {
4704
+ headers: {
4705
+ "Cache-Control"?: string;
4706
+ ETag?: string;
4707
+ [name: string]: unknown;
4708
+ };
4709
+ content: {
4710
+ "application/json": components["schemas"]["AgentTranscript"];
4711
+ };
4712
+ };
4713
+ /** @description Error */
4714
+ default: {
4715
+ headers: {
4716
+ [name: string]: unknown;
4717
+ };
4718
+ content: {
4719
+ "application/json": components["schemas"]["Error"];
4720
+ };
4721
+ };
4722
+ };
4723
+ };
3455
4724
  "get-agent-session-worktree": {
3456
4725
  parameters: {
3457
4726
  query?: never;