@kosuke-ai/kosuke 1.0.47 → 1.0.49

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.
@@ -1,508 +0,0 @@
1
- // Alias: every command name before the grammar; remove one release after it ships.
2
- export const FORMER_COMMANDS = [
3
- { from: 'agent summary', handWritten: 'agent summary get' },
4
- { from: 'auth status', handWritten: 'auth status get' },
5
- {
6
- from: 'crons runs messages',
7
- operation: 'GET /api/organizations/{workspaceId}/crons/{cronId}/runs/{runId}/messages',
8
- },
9
- {
10
- from: 'deploy cancel',
11
- operation: 'POST /api/projects/{projectId}/settings/agentic-deploy/cancel',
12
- },
13
- { from: 'deploy list', operation: 'GET /api/projects/{projectId}/deploys' },
14
- {
15
- from: 'deploy message',
16
- operation: 'GET /api/projects/{projectId}/deploy-messages/{messageId}',
17
- },
18
- { from: 'deploy messages', operation: 'GET /api/projects/{projectId}/deploy-messages' },
19
- {
20
- from: 'deploy queue delete',
21
- operation: 'DELETE /api/projects/{projectId}/settings/agentic-deploy/queue/{queuedMessageId}',
22
- },
23
- {
24
- from: 'deploy queue list',
25
- operation: 'GET /api/projects/{projectId}/settings/agentic-deploy/queue',
26
- },
27
- {
28
- from: 'deploy queue move',
29
- operation: 'POST /api/projects/{projectId}/settings/agentic-deploy/queue/{queuedMessageId}/move',
30
- },
31
- {
32
- from: 'deploy queue resume',
33
- operation: 'POST /api/projects/{projectId}/settings/agentic-deploy/queue/resume',
34
- },
35
- {
36
- from: 'deploy queue send',
37
- operation: 'POST /api/projects/{projectId}/settings/agentic-deploy/queue/{queuedMessageId}/send',
38
- },
39
- {
40
- from: 'deploy queue steer',
41
- operation: 'POST /api/projects/{projectId}/settings/agentic-deploy/queue/{queuedMessageId}/steer',
42
- },
43
- {
44
- from: 'deploy queue update',
45
- operation: 'PATCH /api/projects/{projectId}/settings/agentic-deploy/queue/{queuedMessageId}',
46
- },
47
- { from: 'deploy run', operation: 'POST /api/projects/{projectId}/settings/agentic-deploy' },
48
- {
49
- from: 'deploy set-model',
50
- operation: 'PUT /api/projects/{projectId}/settings/agentic-deploy/model',
51
- },
52
- { from: 'devices request', operation: 'POST /api/devices/{deviceId}/requests' },
53
- { from: 'files mkdir', operation: 'POST /api/organizations/{workspaceId}/files/folders' },
54
- { from: 'files put', operation: 'POST /api/organizations/{workspaceId}/files' },
55
- { from: 'github repositories', operation: 'GET /api/auth/github/repositories' },
56
- { from: 'github status', operation: 'GET /api/auth/github/status' },
57
- { from: 'integrations describe', handWritten: 'integrations tools get' },
58
- { from: 'integrations execute', operation: 'POST /api/agent-integrations/execute' },
59
- { from: 'integrations tools', operation: 'GET /api/agent-integrations/tools' },
60
- { from: 'mac apps', operation: 'POST /api/devices/mac/apps' },
61
- { from: 'mac ax-tree', operation: 'POST /api/devices/mac/ax-tree' },
62
- { from: 'mac browser', operation: 'POST /api/devices/mac/browser' },
63
- { from: 'mac browser-connection-check', operation: 'POST /api/devices/mac/browser-connections' },
64
- { from: 'mac browser-connections', operation: 'GET /api/devices/mac/browser-connections' },
65
- { from: 'mac browser-profiles', operation: 'POST /api/devices/mac/browser-profiles' },
66
- { from: 'mac browser-sign-in', operation: 'POST /api/devices/mac/browser-sign-in' },
67
- { from: 'mac file-delete', operation: 'POST /api/devices/mac/file-delete' },
68
- { from: 'mac file-list', operation: 'POST /api/devices/mac/file-list' },
69
- { from: 'mac file-move', operation: 'POST /api/devices/mac/file-move' },
70
- { from: 'mac file-read', operation: 'POST /api/devices/mac/file-read' },
71
- { from: 'mac file-write', operation: 'POST /api/devices/mac/file-write' },
72
- { from: 'mac screenshot', operation: 'POST /api/devices/mac/screenshot' },
73
- { from: 'mac tools', operation: 'GET /api/devices/mac' },
74
- { from: 'mac windows', operation: 'POST /api/devices/mac/windows' },
75
- { from: 'members list', operation: 'GET /api/members' },
76
- { from: 'personal-tasks create', operation: 'POST /api/personal-tasks' },
77
- { from: 'personal-tasks delete', operation: 'DELETE /api/personal-tasks/{taskId}' },
78
- { from: 'personal-tasks get', operation: 'GET /api/personal-tasks/{taskId}' },
79
- { from: 'personal-tasks list', operation: 'GET /api/personal-tasks' },
80
- { from: 'personal-tasks move', operation: 'POST /api/personal-tasks/{taskId}/move' },
81
- { from: 'personal-tasks start', operation: 'POST /api/personal-tasks/{taskId}/start' },
82
- { from: 'personal-tasks update', operation: 'PATCH /api/personal-tasks/{taskId}' },
83
- { from: 'preview health', operation: 'GET /api/projects/{projectId}/preview/health' },
84
- { from: 'preview shared', operation: 'GET /api/shared-previews/{slug}' },
85
- {
86
- from: 'preview shared artifact',
87
- operation: 'GET /api/shared-previews/{slug}/artifacts/{artifactId}',
88
- },
89
- {
90
- from: 'projects batch-merging add-member',
91
- operation: 'POST /api/projects/{projectId}/batch-merging/members',
92
- },
93
- {
94
- from: 'projects batch-merging eject',
95
- operation: 'POST /api/projects/{projectId}/batch-merging/ejections',
96
- },
97
- { from: 'projects branches', operation: 'GET /api/projects/{projectId}/branches' },
98
- { from: 'projects env-vars add', operation: 'POST /api/projects/{projectId}/settings/env-vars' },
99
- {
100
- from: 'projects env-vars remove',
101
- operation: 'DELETE /api/projects/{projectId}/settings/env-vars',
102
- },
103
- { from: 'projects labels', operation: 'GET /api/projects/{projectId}/labels' },
104
- { from: 'projects labels color', operation: 'PATCH /api/projects/{projectId}/labels' },
105
- { from: 'projects labels usage', operation: 'GET /api/projects/{projectId}/labels/usage' },
106
- { from: 'projects live logs', operation: 'GET /api/projects/{projectId}/live/logs' },
107
- { from: 'projects live query', operation: 'POST /api/projects/{projectId}/live/query' },
108
- { from: 'projects live traffic', operation: 'GET /api/projects/{projectId}/live/traffic' },
109
- { from: 'projects live write', operation: 'POST /api/projects/{projectId}/live/writes' },
110
- {
111
- from: 'projects live write-status',
112
- operation: 'GET /api/projects/{projectId}/live/writes/{writeId}',
113
- },
114
- { from: 'projects releases', operation: 'GET /api/projects/{projectId}/releases' },
115
- { from: 'projects services add', operation: 'POST /api/projects/{projectId}/settings/services' },
116
- {
117
- from: 'projects services remove',
118
- operation: 'DELETE /api/projects/{projectId}/settings/services/{serviceId}',
119
- },
120
- { from: 'projects settings import', operation: 'POST /api/projects/{projectId}/settings/import' },
121
- { from: 'projects skills', operation: 'GET /api/projects/{projectId}/skills' },
122
- { from: 'projects switch-workflow', operation: 'POST /api/projects/{projectId}/workflow' },
123
- { from: 'projects versions', operation: 'GET /api/projects/{projectId}/versions' },
124
- { from: 'sensei cards', operation: 'GET /api/sensei/cards' },
125
- { from: 'sensei cards put', operation: 'POST /api/sensei/cards' },
126
- { from: 'sensei cards send-reply', operation: 'POST /api/sensei/cards/send-reply' },
127
- { from: 'sensei chat', operation: 'GET /api/sensei' },
128
- { from: 'sensei connect', operation: 'POST /api/sensei/connect' },
129
- { from: 'sensei delegates note', operation: 'POST /api/sensei/delegates/{delegateId}/notes' },
130
- { from: 'sensei describe', operation: 'POST /api/sensei/describe' },
131
- { from: 'sensei device-requests decide', operation: 'POST /api/sensei/device-requests/decide' },
132
- { from: 'sensei memory put', operation: 'PUT /api/sensei/memory' },
133
- { from: 'sensei merge-rule', operation: 'PUT /api/sensei/merge-rule' },
134
- { from: 'sensei messages reroute', operation: 'POST /api/sensei/messages/reroute' },
135
- {
136
- from: 'sensei notifications open',
137
- operation: 'POST /api/sensei/notifications/{notificationId}/open',
138
- },
139
- { from: 'sensei reels activity', operation: 'GET /api/sensei/reels/activity' },
140
- { from: 'sensei repository', operation: 'POST /api/sensei/repository' },
141
- { from: 'sensei sessions assess', operation: 'POST /api/sensei/sessions/assess' },
142
- { from: 'sensei sessions facts', operation: 'GET /api/sensei/sessions/facts' },
143
- { from: 'sensei suggest', operation: 'POST /api/sensei/suggest' },
144
- { from: 'sensei thread done', operation: 'POST /api/sensei/threads/{threadId}/done' },
145
- { from: 'sensei thread move', operation: 'POST /api/sensei/thread-move' },
146
- { from: 'sensei thread read', operation: 'GET /api/sensei/threads/{threadId}' },
147
- { from: 'sensei thread split', operation: 'POST /api/sensei/thread-split' },
148
- { from: 'sensei threads', operation: 'GET /api/sensei/threads' },
149
- { from: 'sensei widgets', operation: 'GET /api/sensei/widgets' },
150
- {
151
- from: 'sessions activate',
152
- operation: 'POST /api/projects/{projectId}/chat-sessions/{sessionId}/activate',
153
- },
154
- { from: 'sessions all', operation: 'GET /api/chat-sessions' },
155
- {
156
- from: 'sessions app-stack-start',
157
- operation: 'POST /api/projects/{projectId}/chat-sessions/{sessionId}/preview/app-stack',
158
- },
159
- {
160
- from: 'sessions artifacts attach',
161
- operation: 'POST /api/projects/{projectId}/chat-sessions/{sessionId}/artifacts',
162
- },
163
- {
164
- from: 'sessions desktop',
165
- operation: 'GET /api/projects/{projectId}/chat-sessions/{sessionId}/desktop',
166
- },
167
- {
168
- from: 'sessions desktop-control',
169
- operation: 'PUT /api/projects/{projectId}/chat-sessions/{sessionId}/desktop/control',
170
- },
171
- {
172
- from: 'sessions desktop-start',
173
- operation: 'POST /api/projects/{projectId}/chat-sessions/{sessionId}/desktop',
174
- },
175
- {
176
- from: 'sessions diff comments add',
177
- operation: 'POST /api/projects/{projectId}/chat-sessions/{sessionId}/preview/diff/comments',
178
- },
179
- {
180
- from: 'sessions diff commits',
181
- operation: 'GET /api/projects/{projectId}/chat-sessions/{sessionId}/preview/diff/commits',
182
- },
183
- {
184
- from: 'sessions diff files',
185
- operation: 'GET /api/projects/{projectId}/chat-sessions/{sessionId}/preview/diff/files',
186
- },
187
- {
188
- from: 'sessions diff patch',
189
- operation: 'GET /api/projects/{projectId}/chat-sessions/{sessionId}/preview/diff/patch',
190
- },
191
- {
192
- from: 'sessions edit-prompt',
193
- operation: 'PATCH /api/projects/{projectId}/chat-sessions/{sessionId}/prompt',
194
- },
195
- {
196
- from: 'sessions files write',
197
- operation: 'PUT /api/projects/{projectId}/chat-sessions/{sessionId}/preview/files/content',
198
- },
199
- {
200
- from: 'sessions git state',
201
- operation: 'GET /api/projects/{projectId}/chat-sessions/{sessionId}/preview/git-state',
202
- },
203
- {
204
- from: 'sessions go-ahead clear',
205
- operation: 'POST /api/projects/{projectId}/chat-sessions/{sessionId}/go-ahead/clear',
206
- },
207
- {
208
- from: 'sessions labels edit',
209
- operation: 'PATCH /api/projects/{projectId}/chat-sessions/{sessionId}/labels',
210
- },
211
- {
212
- from: 'sessions message',
213
- operation: 'GET /api/projects/{projectId}/chat-sessions/{sessionId}/messages/{messageId}',
214
- },
215
- {
216
- from: 'sessions messages',
217
- operation: 'GET /api/projects/{projectId}/chat-sessions/{sessionId}/messages',
218
- },
219
- { from: 'sessions needs-you', operation: 'GET /api/chat-sessions', fixed: { needsYou: true } },
220
- {
221
- from: 'sessions runtime-command',
222
- operation: 'POST /api/projects/{projectId}/chat-sessions/{sessionId}/runtime-commands',
223
- },
224
- { from: 'sessions skill-runs end', handWritten: 'sessions skill-runs finish' },
225
- { from: 'sessions watch', handWritten: 'sessions jobs watch' },
226
- { from: 'tasks all', operation: 'GET /api/tasks' },
227
- { from: 'tasks labels', operation: 'GET /api/organizations/{workspaceId}/labels' },
228
- { from: 'user auth-token revoke', operation: 'DELETE /api/user/api-keys/current' },
229
- { from: 'user crons artifacts list', operation: 'GET /api/user/crons/{cronId}/artifacts' },
230
- {
231
- from: 'user crons create',
232
- operation: 'POST /api/user/crons',
233
- formerFlags: { 'project-ids': 'project' },
234
- },
235
- { from: 'user crons get', operation: 'GET /api/user/crons/{cronId}' },
236
- { from: 'user crons list', operation: 'GET /api/user/crons' },
237
- { from: 'user crons run', operation: 'POST /api/user/crons/{cronId}/run' },
238
- {
239
- from: 'user crons runs artifacts get',
240
- operation: 'GET /api/user/crons/{cronId}/runs/{runId}/artifacts/{artifactId}',
241
- },
242
- {
243
- from: 'user crons runs artifacts list',
244
- operation: 'GET /api/user/crons/{cronId}/runs/{runId}/artifacts',
245
- },
246
- { from: 'user crons runs get', operation: 'GET /api/user/crons/{cronId}/runs/{runId}' },
247
- { from: 'user crons runs list', operation: 'GET /api/user/crons/{cronId}/runs' },
248
- {
249
- from: 'user crons update',
250
- operation: 'PATCH /api/user/crons/{cronId}',
251
- formerFlags: { 'project-ids': 'project' },
252
- },
253
- { from: 'user files delete', operation: 'DELETE /api/user/files/{fileId}' },
254
- { from: 'user files get', operation: 'GET /api/user/files/{fileId}' },
255
- { from: 'user files list', operation: 'GET /api/user/files' },
256
- { from: 'user files mkdir', operation: 'POST /api/user/files/folders' },
257
- { from: 'user files move', operation: 'PATCH /api/user/files/{fileId}' },
258
- { from: 'user files put', operation: 'POST /api/user/files' },
259
- {
260
- from: 'user integrations linkedin connect',
261
- operation: 'POST /api/user/integrations/linkedin/connections',
262
- },
263
- {
264
- from: 'user integrations linkedin list',
265
- operation: 'GET /api/user/integrations/linkedin/connections',
266
- },
267
- {
268
- from: 'user integrations linkedin reconnect',
269
- operation: 'POST /api/user/integrations/linkedin/connections/{connectionId}/reconnect',
270
- },
271
- { from: 'user integrations list', operation: 'GET /api/user/integrations' },
272
- {
273
- from: 'user integrations remove',
274
- operation: 'DELETE /api/user/integrations/{toolkit}/connections/{connectionId}',
275
- },
276
- { from: 'user integrations x connect', operation: 'POST /api/user/integrations/x/connections' },
277
- { from: 'user integrations x list', operation: 'GET /api/user/integrations/x/connections' },
278
- {
279
- from: 'user integrations x reconnect',
280
- operation: 'POST /api/user/integrations/x/connections/{connectionId}/reconnect',
281
- },
282
- // The member's Memory has one command set, Sensei's; `user memory put` has no alias, since
283
- // its file moves from the path to --file.
284
- { from: 'user memory list', operation: 'GET /api/sensei/memory' },
285
- { from: 'user plugins list', operation: 'GET /api/user/plugins' },
286
- { from: 'user plugins update', operation: 'PATCH /api/user/plugins/{pluginId}' },
287
- { from: 'user profile', operation: 'GET /api/user/profile' },
288
- { from: 'user push-devices register', operation: 'POST /api/push/devices' },
289
- { from: 'user push-devices remove', operation: 'DELETE /api/push/devices' },
290
- { from: 'user skills create', operation: 'POST /api/user/skills' },
291
- { from: 'user skills delete', operation: 'DELETE /api/user/skills/{skillId}' },
292
- { from: 'user skills get', operation: 'GET /api/user/skills/{skillId}' },
293
- { from: 'user skills list', operation: 'GET /api/user/skills' },
294
- { from: 'user skills update', operation: 'PATCH /api/user/skills/{skillId}' },
295
- { from: 'user subscriptions delete', operation: 'DELETE /api/user/subscriptions/{provider}' },
296
- { from: 'user subscriptions get', operation: 'GET /api/user/subscriptions' },
297
- { from: 'user subscriptions grok change', operation: 'POST /api/user/subscriptions/xai/access' },
298
- { from: 'user subscriptions grok get', operation: 'GET /api/user/subscriptions/xai/access' },
299
- {
300
- from: 'user subscriptions login antigravity cancel',
301
- operation: 'POST /api/user/subscriptions/login/antigravity/cancel',
302
- },
303
- {
304
- from: 'user subscriptions login antigravity complete',
305
- operation: 'POST /api/user/subscriptions/login/antigravity/complete',
306
- },
307
- {
308
- from: 'user subscriptions login antigravity start',
309
- operation: 'POST /api/user/subscriptions/login/antigravity',
310
- },
311
- {
312
- from: 'user subscriptions login claude complete',
313
- operation: 'POST /api/user/subscriptions/login/claude/complete',
314
- },
315
- {
316
- from: 'user subscriptions login claude start',
317
- operation: 'POST /api/user/subscriptions/login/claude',
318
- },
319
- {
320
- from: 'user subscriptions login codex complete',
321
- operation: 'POST /api/user/subscriptions/login/codex/complete',
322
- },
323
- {
324
- from: 'user subscriptions login codex start',
325
- operation: 'POST /api/user/subscriptions/login/codex',
326
- },
327
- {
328
- from: 'user subscriptions login muse complete',
329
- operation: 'POST /api/user/subscriptions/login/muse/complete',
330
- },
331
- {
332
- from: 'user subscriptions login muse start',
333
- operation: 'POST /api/user/subscriptions/login/muse',
334
- },
335
- {
336
- from: 'user subscriptions logins delete',
337
- operation: 'DELETE /api/user/subscriptions/{provider}/logins/{loginId}',
338
- },
339
- {
340
- from: 'user subscriptions logins recheck',
341
- operation: 'POST /api/user/subscriptions/{provider}/logins/recheck',
342
- },
343
- { from: 'user subscriptions set-default-model', operation: 'PATCH /api/user/subscriptions' },
344
- { from: 'user subscriptions set-key', operation: 'PUT /api/user/subscriptions/{provider}' },
345
- { from: 'user subscriptions token-usage', operation: 'GET /api/user/subscriptions/token-usage' },
346
- { from: 'user subscriptions usage', operation: 'GET /api/user/subscriptions/usage' },
347
- {
348
- from: 'workspaces access-status',
349
- operation: 'GET /api/organizations/{workspaceId}/access-status',
350
- },
351
- {
352
- from: 'workspaces ai-provider get',
353
- operation: 'GET /api/organizations/{workspaceId}/ai-provider',
354
- },
355
- {
356
- from: 'workspaces ai-provider google delete-method',
357
- operation: 'DELETE /api/organizations/{workspaceId}/ai-provider/google/method',
358
- },
359
- {
360
- from: 'workspaces ai-provider google get',
361
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/google',
362
- },
363
- {
364
- from: 'workspaces ai-provider google remove',
365
- operation: 'DELETE /api/organizations/{workspaceId}/ai-provider/google',
366
- },
367
- {
368
- from: 'workspaces ai-provider google save',
369
- operation: 'PUT /api/organizations/{workspaceId}/ai-provider/google',
370
- },
371
- {
372
- from: 'workspaces ai-provider google select-method',
373
- operation: 'PUT /api/organizations/{workspaceId}/ai-provider/google/method',
374
- },
375
- {
376
- from: 'workspaces ai-provider google usage',
377
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/google/usage',
378
- },
379
- {
380
- from: 'workspaces ai-provider login antigravity cancel',
381
- operation: 'POST /api/organizations/{workspaceId}/ai-provider/login/antigravity/cancel',
382
- },
383
- {
384
- from: 'workspaces ai-provider login antigravity complete',
385
- operation: 'POST /api/organizations/{workspaceId}/ai-provider/login/antigravity/complete',
386
- },
387
- {
388
- from: 'workspaces ai-provider login antigravity start',
389
- operation: 'POST /api/organizations/{workspaceId}/ai-provider/login/antigravity',
390
- },
391
- {
392
- from: 'workspaces ai-provider logins recheck',
393
- operation: 'POST /api/organizations/{workspaceId}/ai-provider/logins/recheck',
394
- },
395
- {
396
- from: 'workspaces ai-provider remove',
397
- operation: 'DELETE /api/organizations/{workspaceId}/ai-provider',
398
- },
399
- {
400
- from: 'workspaces ai-provider set',
401
- operation: 'PUT /api/organizations/{workspaceId}/ai-provider',
402
- },
403
- {
404
- from: 'workspaces ai-provider token-usage',
405
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/token-usage',
406
- },
407
- {
408
- from: 'workspaces ai-provider usage claude',
409
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/claude-usage',
410
- },
411
- {
412
- from: 'workspaces ai-provider usage codex',
413
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/codex-usage',
414
- },
415
- {
416
- from: 'workspaces ai-provider usage coding-plan',
417
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/coding-plan-usage',
418
- },
419
- {
420
- from: 'workspaces ai-provider usage deepseek',
421
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/deepseek-usage',
422
- },
423
- {
424
- from: 'workspaces ai-provider usage grok',
425
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/grok-usage',
426
- },
427
- {
428
- from: 'workspaces ai-provider usage kimi-code',
429
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/kimi-code-usage',
430
- },
431
- {
432
- from: 'workspaces ai-provider usage muse',
433
- operation: 'GET /api/organizations/{workspaceId}/ai-provider/muse-usage',
434
- },
435
- {
436
- from: 'workspaces artifacts',
437
- operation: 'GET /api/organizations/{workspaceId}/artifacts/search',
438
- },
439
- { from: 'workspaces credits', operation: 'GET /api/organizations/{workspaceId}/credits' },
440
- { from: 'workspaces grok change', operation: 'POST /api/organizations/{workspaceId}/grok' },
441
- { from: 'workspaces grok get', operation: 'GET /api/organizations/{workspaceId}/grok' },
442
- {
443
- from: 'workspaces integrations get',
444
- operation: 'GET /api/organizations/{workspaceId}/integrations/{toolkit}',
445
- },
446
- {
447
- from: 'workspaces integrations list',
448
- operation: 'GET /api/organizations/{workspaceId}/integrations',
449
- },
450
- {
451
- from: 'workspaces integrations remove',
452
- operation: 'DELETE /api/organizations/{workspaceId}/integrations/{toolkit}',
453
- },
454
- { from: 'workspaces members', operation: 'GET /api/organizations/{workspaceId}/members' },
455
- { from: 'workspaces plugins list', operation: 'GET /api/organizations/{workspaceId}/plugins' },
456
- {
457
- from: 'workspaces plugins update',
458
- operation: 'PATCH /api/organizations/{workspaceId}/plugins/{pluginId}',
459
- },
460
- {
461
- from: 'workspaces provider-login claude complete',
462
- operation: 'POST /api/organizations/{workspaceId}/provider-login/claude/complete',
463
- },
464
- {
465
- from: 'workspaces provider-login claude start',
466
- operation: 'POST /api/organizations/{workspaceId}/provider-login/claude',
467
- },
468
- {
469
- from: 'workspaces provider-login codex complete',
470
- operation: 'POST /api/organizations/{workspaceId}/provider-login/codex/complete',
471
- },
472
- {
473
- from: 'workspaces provider-login codex start',
474
- operation: 'POST /api/organizations/{workspaceId}/provider-login/codex',
475
- },
476
- {
477
- from: 'workspaces provider-login muse complete',
478
- operation: 'POST /api/organizations/{workspaceId}/provider-login/muse/complete',
479
- },
480
- {
481
- from: 'workspaces provider-login muse start',
482
- operation: 'POST /api/organizations/{workspaceId}/provider-login/muse',
483
- },
484
- {
485
- from: 'workspaces sandbox-limit',
486
- operation: 'GET /api/organizations/{workspaceId}/sandbox-limit',
487
- },
488
- { from: 'workspaces skills create', operation: 'POST /api/organizations/{workspaceId}/skills' },
489
- {
490
- from: 'workspaces skills delete',
491
- operation: 'DELETE /api/organizations/{workspaceId}/skills/{skillId}',
492
- },
493
- {
494
- from: 'workspaces skills get',
495
- operation: 'GET /api/organizations/{workspaceId}/skills/{skillId}',
496
- },
497
- { from: 'workspaces skills list', operation: 'GET /api/organizations/{workspaceId}/skills' },
498
- {
499
- from: 'workspaces skills update',
500
- operation: 'PATCH /api/organizations/{workspaceId}/skills/{skillId}',
501
- },
502
- {
503
- from: 'workspaces stop-sandboxes',
504
- operation: 'POST /api/organizations/{workspaceId}/stop-sandboxes',
505
- },
506
- { from: 'workspaces timezone-set', operation: 'PUT /api/organizations/{workspaceId}/timezone' },
507
- { from: 'workspaces usage', operation: 'GET /api/organizations/{workspaceId}/usage' },
508
- ];
@@ -1,89 +0,0 @@
1
- import { FORMER_COMMANDS } from './aliases.js';
2
- import { attachLeaf } from './attach.js';
3
- import { PERSONAL, scopeOf } from './variants.js';
4
- /** Groups that forward to a live child, so a listing of what runs can leave them out. */
5
- const FORWARDERS = new WeakSet();
6
- export function isForwarder(command) {
7
- return FORWARDERS.has(command);
8
- }
9
- /** `METHOD path`, the key an alias names an operation by. */
10
- export function operationKey(operation) {
11
- return `${operation.method.toUpperCase()} ${operation.path}`;
12
- }
13
- /**
14
- * Attaches every former name whose target this credential reaches: a hidden leaf where the
15
- * old path is free, a forwarder where it is now a live group. Runs after every live command,
16
- * so a forwarder finds its target.
17
- */
18
- export function attachFormerCommands(root, operations, runtime, formerCommands = FORMER_COMMANDS) {
19
- const byKey = new Map(operations.map((operation) => [operationKey(operation), operation]));
20
- for (const former of formerCommands) {
21
- const path = former.from.split(' ');
22
- const existing = find(root, path);
23
- if (former.operation) {
24
- const operation = byKey.get(former.operation);
25
- if (!operation)
26
- continue;
27
- if (existing) {
28
- const target = find(root, operation.command);
29
- if (!target)
30
- continue;
31
- const { prefix, suffix } = formArguments(operation);
32
- forward(existing, target, prefix, suffix);
33
- }
34
- else {
35
- attachLeaf(root, path, operation, runtime, {
36
- hidden: true,
37
- ...(former.fixed ? { fixed: former.fixed } : {}),
38
- ...(former.formerFlags ? { formerFlags: former.formerFlags } : {}),
39
- });
40
- }
41
- }
42
- else if (former.handWritten) {
43
- const target = find(root, former.handWritten.split(' '));
44
- if (!target)
45
- continue;
46
- forward(existing ?? hiddenLeaf(root, path), target, [], []);
47
- }
48
- }
49
- }
50
- /** What reaches a form on its live command: `personal` first, a selector last. */
51
- function formArguments(operation) {
52
- return {
53
- prefix: scopeOf(operation) === 'personal' ? [PERSONAL] : [],
54
- suffix: operation.variant?.when
55
- ? [`--${operation.variant.when.flag}`, operation.variant.when.equals]
56
- : [],
57
- };
58
- }
59
- /**
60
- * The old leaf's arguments, re-parsed by the live command. No options of its own, since
61
- * commander reads an ancestor's options anywhere on the line and would take a child's flag.
62
- */
63
- function forward(command, target, prefix, suffix) {
64
- FORWARDERS.add(command);
65
- command
66
- .allowUnknownOption()
67
- .allowExcessArguments()
68
- .action(async (...args) => {
69
- const self = args[args.length - 1];
70
- await target.parseAsync([...prefix, ...self.args, ...suffix], { from: 'user' });
71
- });
72
- }
73
- function hiddenLeaf(root, path) {
74
- let current = root;
75
- for (const [index, segment] of path.entries()) {
76
- const found = current.commands.find((command) => command.name() === segment);
77
- current = found ?? current.command(segment, { hidden: true });
78
- if (!found && index < path.length - 1)
79
- current.description('');
80
- }
81
- return current;
82
- }
83
- function find(root, path) {
84
- let current = root;
85
- for (const segment of path) {
86
- current = current?.commands.find((command) => command.name() === segment);
87
- }
88
- return current;
89
- }