@ottocode/api 0.1.260 → 0.1.261

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,82 +1,76 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { client } from './client.gen';
3
3
  /**
4
- * Send a prompt using the ask service
5
- *
6
- * Streamlined endpoint used by the CLI to send prompts and receive assistant responses. Creates sessions as needed and reuses the last session when requested.
4
+ * Server health check
7
5
  */
8
- export const ask = (options) => {
9
- return (options.client ?? client).post({
10
- responseType: 'json',
11
- url: '/v1/ask',
12
- ...options,
13
- headers: {
14
- 'Content-Type': 'application/json',
15
- ...options.headers
16
- }
6
+ export const getRoot = (options) => {
7
+ return (options?.client ?? client).get({
8
+ responseType: 'text',
9
+ url: '/',
10
+ ...options
17
11
  });
18
12
  };
19
13
  /**
20
- * Get auth status for all providers
14
+ * Get server runtime information
21
15
  */
22
- export const getAuthStatus = (options) => {
16
+ export const getServerInfo = (options) => {
23
17
  return (options?.client ?? client).get({
24
18
  responseType: 'json',
25
- url: '/v1/auth/status',
19
+ url: '/v1/server/info',
26
20
  ...options
27
21
  });
28
22
  };
29
23
  /**
30
- * Setup or ensure OttoRouter wallet
24
+ * List sessions
31
25
  */
32
- export const setupOttoRouterWallet = (options) => {
33
- return (options?.client ?? client).post({
26
+ export const listSessions = (options) => {
27
+ return (options?.client ?? client).get({
34
28
  responseType: 'json',
35
- url: '/v1/auth/ottorouter/setup',
29
+ url: '/v1/sessions',
36
30
  ...options
37
31
  });
38
32
  };
39
33
  /**
40
- * Import OttoRouter wallet from private key
34
+ * Create a new session
41
35
  */
42
- export const importOttoRouterWallet = (options) => {
43
- return (options.client ?? client).post({
36
+ export const createSession = (options) => {
37
+ return (options?.client ?? client).post({
44
38
  responseType: 'json',
45
- url: '/v1/auth/ottorouter/import',
39
+ url: '/v1/sessions',
46
40
  ...options,
47
41
  headers: {
48
42
  'Content-Type': 'application/json',
49
- ...options.headers
43
+ ...options?.headers
50
44
  }
51
45
  });
52
46
  };
53
47
  /**
54
- * Export OttoRouter wallet private key
48
+ * Delete a session
55
49
  */
56
- export const exportOttoRouterWallet = (options) => {
57
- return (options?.client ?? client).get({
50
+ export const deleteSession = (options) => {
51
+ return (options.client ?? client).delete({
58
52
  responseType: 'json',
59
- url: '/v1/auth/ottorouter/export',
53
+ url: '/v1/sessions/{sessionId}',
60
54
  ...options
61
55
  });
62
56
  };
63
57
  /**
64
- * Remove auth for a provider
58
+ * Get a single session by ID
65
59
  */
66
- export const removeProvider = (options) => {
67
- return (options.client ?? client).delete({
60
+ export const getSession = (options) => {
61
+ return (options.client ?? client).get({
68
62
  responseType: 'json',
69
- url: '/v1/auth/{provider}',
63
+ url: '/v1/sessions/{sessionId}',
70
64
  ...options
71
65
  });
72
66
  };
73
67
  /**
74
- * Add API key for a provider
68
+ * Update session preferences
75
69
  */
76
- export const addProviderApiKey = (options) => {
77
- return (options.client ?? client).post({
70
+ export const updateSession = (options) => {
71
+ return (options.client ?? client).patch({
78
72
  responseType: 'json',
79
- url: '/v1/auth/{provider}',
73
+ url: '/v1/sessions/{sessionId}',
80
74
  ...options,
81
75
  headers: {
82
76
  'Content-Type': 'application/json',
@@ -85,137 +79,138 @@ export const addProviderApiKey = (options) => {
85
79
  });
86
80
  };
87
81
  /**
88
- * Get OAuth authorization URL
82
+ * Abort a running session
83
+ *
84
+ * Aborts any currently running assistant generation for the session
89
85
  */
90
- export const getOAuthUrl = (options) => {
91
- return (options.client ?? client).post({
86
+ export const abortSession = (options) => {
87
+ return (options.client ?? client).delete({
92
88
  responseType: 'json',
93
- url: '/v1/auth/{provider}/oauth/url',
94
- ...options,
95
- headers: {
96
- 'Content-Type': 'application/json',
97
- ...options.headers
98
- }
89
+ url: '/v1/sessions/{sessionId}/abort',
90
+ ...options
99
91
  });
100
92
  };
101
93
  /**
102
- * Exchange OAuth code for tokens
94
+ * Get queue state for a session
103
95
  */
104
- export const exchangeOAuthCode = (options) => {
105
- return (options.client ?? client).post({
96
+ export const getSessionQueue = (options) => {
97
+ return (options.client ?? client).get({
106
98
  responseType: 'json',
107
- url: '/v1/auth/{provider}/oauth/exchange',
108
- ...options,
109
- headers: {
110
- 'Content-Type': 'application/json',
111
- ...options.headers
112
- }
99
+ url: '/v1/sessions/{sessionId}/queue',
100
+ ...options
113
101
  });
114
102
  };
115
103
  /**
116
- * Start OAuth flow with redirect
104
+ * Remove a message from session queue
117
105
  */
118
- export const startOAuth = (options) => {
119
- return (options.client ?? client).get({
120
- url: '/v1/auth/{provider}/oauth/start',
106
+ export const removeFromQueue = (options) => {
107
+ return (options.client ?? client).delete({
108
+ responseType: 'json',
109
+ url: '/v1/sessions/{sessionId}/queue/{messageId}',
121
110
  ...options
122
111
  });
123
112
  };
124
113
  /**
125
- * OAuth callback handler
114
+ * Delete a shared session
126
115
  */
127
- export const oauthCallback = (options) => {
128
- return (options.client ?? client).get({
129
- responseType: 'text',
130
- url: '/v1/auth/{provider}/oauth/callback',
116
+ export const deleteShare = (options) => {
117
+ return (options.client ?? client).delete({
118
+ responseType: 'json',
119
+ url: '/v1/sessions/{sessionId}/share',
131
120
  ...options
132
121
  });
133
122
  };
134
123
  /**
135
- * Start Copilot device flow authentication
124
+ * Get share status for a session
136
125
  */
137
- export const startCopilotDeviceFlow = (options) => {
138
- return (options?.client ?? client).post({
126
+ export const getShareStatus = (options) => {
127
+ return (options.client ?? client).get({
139
128
  responseType: 'json',
140
- url: '/v1/auth/copilot/device/start',
129
+ url: '/v1/sessions/{sessionId}/share',
141
130
  ...options
142
131
  });
143
132
  };
144
133
  /**
145
- * Poll Copilot device flow for completion
134
+ * Share a session
146
135
  */
147
- export const pollCopilotDeviceFlow = (options) => {
136
+ export const shareSession = (options) => {
148
137
  return (options.client ?? client).post({
149
138
  responseType: 'json',
150
- url: '/v1/auth/copilot/device/poll',
151
- ...options,
152
- headers: {
153
- 'Content-Type': 'application/json',
154
- ...options.headers
155
- }
139
+ url: '/v1/sessions/{sessionId}/share',
140
+ ...options
156
141
  });
157
142
  };
158
143
  /**
159
- * Get available Copilot auth methods
144
+ * Sync shared session with new messages
160
145
  */
161
- export const getCopilotAuthMethods = (options) => {
146
+ export const syncShare = (options) => {
147
+ return (options.client ?? client).put({
148
+ responseType: 'json',
149
+ url: '/v1/sessions/{sessionId}/share',
150
+ ...options
151
+ });
152
+ };
153
+ /**
154
+ * List all shared sessions for a project
155
+ */
156
+ export const listShares = (options) => {
162
157
  return (options?.client ?? client).get({
163
158
  responseType: 'json',
164
- url: '/v1/auth/copilot/methods',
159
+ url: '/v1/shares',
165
160
  ...options
166
161
  });
167
162
  };
168
163
  /**
169
- * Save Copilot token after validating model access
164
+ * Retry a failed assistant message
170
165
  */
171
- export const saveCopilotToken = (options) => {
166
+ export const retryMessage = (options) => {
172
167
  return (options.client ?? client).post({
173
168
  responseType: 'json',
174
- url: '/v1/auth/copilot/token',
175
- ...options,
176
- headers: {
177
- 'Content-Type': 'application/json',
178
- ...options.headers
179
- }
169
+ url: '/v1/sessions/{sessionId}/messages/{messageId}/retry',
170
+ ...options
180
171
  });
181
172
  };
182
173
  /**
183
- * Import Copilot token from GitHub CLI (gh)
174
+ * Approve or deny a tool execution
184
175
  */
185
- export const importCopilotTokenFromGh = (options) => {
186
- return (options?.client ?? client).post({
176
+ export const resolveApproval = (options) => {
177
+ return (options.client ?? client).post({
187
178
  responseType: 'json',
188
- url: '/v1/auth/copilot/gh/import',
189
- ...options
179
+ url: '/v1/sessions/{id}/approval',
180
+ ...options,
181
+ headers: {
182
+ 'Content-Type': 'application/json',
183
+ ...options.headers
184
+ }
190
185
  });
191
186
  };
192
187
  /**
193
- * Get Copilot token diagnostics and model visibility
188
+ * Get pending approvals for a session
194
189
  */
195
- export const getCopilotDiagnostics = (options) => {
196
- return (options?.client ?? client).get({
190
+ export const getPendingApprovals = (options) => {
191
+ return (options.client ?? client).get({
197
192
  responseType: 'json',
198
- url: '/v1/auth/copilot/diagnostics',
193
+ url: '/v1/sessions/{id}/approval/pending',
199
194
  ...options
200
195
  });
201
196
  };
202
197
  /**
203
- * Mark onboarding as complete
198
+ * List messages for a session
204
199
  */
205
- export const completeOnboarding = (options) => {
206
- return (options?.client ?? client).post({
200
+ export const listMessages = (options) => {
201
+ return (options.client ?? client).get({
207
202
  responseType: 'json',
208
- url: '/v1/auth/onboarding/complete',
203
+ url: '/v1/sessions/{id}/messages',
209
204
  ...options
210
205
  });
211
206
  };
212
207
  /**
213
- * Create a branch from a session message
208
+ * Send a user message and enqueue assistant run
214
209
  */
215
- export const createBranch = (options) => {
210
+ export const createMessage = (options) => {
216
211
  return (options.client ?? client).post({
217
212
  responseType: 'json',
218
- url: '/v1/sessions/{sessionId}/branch',
213
+ url: '/v1/sessions/{id}/messages',
219
214
  ...options,
220
215
  headers: {
221
216
  'Content-Type': 'application/json',
@@ -224,35 +219,39 @@ export const createBranch = (options) => {
224
219
  });
225
220
  };
226
221
  /**
227
- * List branches of a session
222
+ * Subscribe to session event stream (SSE)
228
223
  */
229
- export const listBranches = (options) => {
230
- return (options.client ?? client).get({
231
- responseType: 'json',
232
- url: '/v1/sessions/{sessionId}/branches',
224
+ export const subscribeSessionStream = (options) => {
225
+ return (options.client ?? client).sse.get({
226
+ responseType: 'text',
227
+ url: '/v1/sessions/{id}/stream',
233
228
  ...options
234
229
  });
235
230
  };
236
231
  /**
237
- * Get parent session of a branch
232
+ * Subscribe to session event stream (SSE) using POST
238
233
  */
239
- export const getParentSession = (options) => {
240
- return (options.client ?? client).get({
241
- responseType: 'json',
242
- url: '/v1/sessions/{sessionId}/parent',
234
+ export const subscribeSessionStreamPost = (options) => {
235
+ return (options.client ?? client).sse.post({
236
+ responseType: 'text',
237
+ url: '/v1/sessions/{id}/stream',
243
238
  ...options
244
239
  });
245
240
  };
246
241
  /**
247
- * Get full configuration
242
+ * Send a prompt using the ask service
248
243
  *
249
- * Returns agents, authorized providers, models, and defaults
244
+ * Streamlined endpoint used by the CLI to send prompts and receive assistant responses. Creates sessions as needed and reuses the last session when requested.
250
245
  */
251
- export const getConfig = (options) => {
252
- return (options?.client ?? client).get({
246
+ export const ask = (options) => {
247
+ return (options.client ?? client).post({
253
248
  responseType: 'json',
254
- url: '/v1/config',
255
- ...options
249
+ url: '/v1/ask',
250
+ ...options,
251
+ headers: {
252
+ 'Content-Type': 'application/json',
253
+ ...options.headers
254
+ }
256
255
  });
257
256
  };
258
257
  /**
@@ -265,6 +264,18 @@ export const getCwd = (options) => {
265
264
  ...options
266
265
  });
267
266
  };
267
+ /**
268
+ * Get full configuration
269
+ *
270
+ * Returns agents, authorized providers, models, and defaults
271
+ */
272
+ export const getConfig = (options) => {
273
+ return (options?.client ?? client).get({
274
+ responseType: 'json',
275
+ url: '/v1/config',
276
+ ...options
277
+ });
278
+ };
268
279
  /**
269
280
  * Get available agents
270
281
  */
@@ -287,6 +298,22 @@ export const getProviders = (options) => {
287
298
  ...options
288
299
  });
289
300
  };
301
+ /**
302
+ * Discover models for a provider
303
+ *
304
+ * Discovers available models from a provider base URL. Currently supports Ollama-compatible providers.
305
+ */
306
+ export const discoverProviderModels = (options) => {
307
+ return (options.client ?? client).post({
308
+ responseType: 'json',
309
+ url: '/v1/config/providers/discover-models',
310
+ ...options,
311
+ headers: {
312
+ 'Content-Type': 'application/json',
313
+ ...options.headers
314
+ }
315
+ });
316
+ };
290
317
  /**
291
318
  * Delete provider override or custom provider entry
292
319
  */
@@ -322,12 +349,22 @@ export const getProviderModels = (options) => {
322
349
  });
323
350
  };
324
351
  /**
325
- * Update default configuration
326
- *
327
- * Update the default agent, provider, and/or model
352
+ * Get all models across authorized providers
328
353
  */
329
- export const updateDefaults = (options) => {
330
- return (options.client ?? client).patch({
354
+ export const getAllModels = (options) => {
355
+ return (options?.client ?? client).get({
356
+ responseType: 'json',
357
+ url: '/v1/config/models',
358
+ ...options
359
+ });
360
+ };
361
+ /**
362
+ * Update default configuration
363
+ *
364
+ * Update the default agent, provider, and/or model
365
+ */
366
+ export const updateDefaults = (options) => {
367
+ return (options.client ?? client).patch({
331
368
  responseType: 'json',
332
369
  url: '/v1/config/defaults',
333
370
  ...options,
@@ -361,26 +398,6 @@ export const updateDebugConfig = (options) => {
361
398
  }
362
399
  });
363
400
  };
364
- /**
365
- * Get all models across authorized providers
366
- */
367
- export const getAllModels = (options) => {
368
- return (options?.client ?? client).get({
369
- responseType: 'json',
370
- url: '/v1/config/models',
371
- ...options
372
- });
373
- };
374
- /**
375
- * Run diagnostics on the current configuration
376
- */
377
- export const runDoctor = (options) => {
378
- return (options?.client ?? client).get({
379
- responseType: 'json',
380
- url: '/v1/doctor',
381
- ...options
382
- });
383
- };
384
401
  /**
385
402
  * List project files
386
403
  *
@@ -426,17 +443,13 @@ export const readFile = (options) => {
426
443
  });
427
444
  };
428
445
  /**
429
- * Initialize a git repository
446
+ * Read raw file bytes
430
447
  */
431
- export const initGitRepo = (options) => {
432
- return (options?.client ?? client).post({
433
- responseType: 'json',
434
- url: '/v1/git/init',
435
- ...options,
436
- headers: {
437
- 'Content-Type': 'application/json',
438
- ...options?.headers
439
- }
448
+ export const getFileRaw = (options) => {
449
+ return (options.client ?? client).get({
450
+ responseType: 'blob',
451
+ url: '/v1/files/raw',
452
+ ...options
440
453
  });
441
454
  };
442
455
  /**
@@ -452,22 +465,22 @@ export const getGitStatus = (options) => {
452
465
  });
453
466
  };
454
467
  /**
455
- * Get git diff for a file
468
+ * Get git branch information
456
469
  */
457
- export const getGitDiff = (options) => {
458
- return (options.client ?? client).get({
470
+ export const getGitBranch = (options) => {
471
+ return (options?.client ?? client).get({
459
472
  responseType: 'json',
460
- url: '/v1/git/diff',
473
+ url: '/v1/git/branch',
461
474
  ...options
462
475
  });
463
476
  };
464
477
  /**
465
- * Get git branch information
478
+ * Get git diff for a file
466
479
  */
467
- export const getGitBranch = (options) => {
468
- return (options?.client ?? client).get({
480
+ export const getGitDiff = (options) => {
481
+ return (options.client ?? client).get({
469
482
  responseType: 'json',
470
- url: '/v1/git/branch',
483
+ url: '/v1/git/diff',
471
484
  ...options
472
485
  });
473
486
  };
@@ -499,6 +512,34 @@ export const unstageFiles = (options) => {
499
512
  }
500
513
  });
501
514
  };
515
+ /**
516
+ * Restore files to HEAD
517
+ */
518
+ export const restoreFiles = (options) => {
519
+ return (options.client ?? client).post({
520
+ responseType: 'json',
521
+ url: '/v1/git/restore',
522
+ ...options,
523
+ headers: {
524
+ 'Content-Type': 'application/json',
525
+ ...options.headers
526
+ }
527
+ });
528
+ };
529
+ /**
530
+ * Delete untracked files
531
+ */
532
+ export const deleteFiles = (options) => {
533
+ return (options.client ?? client).post({
534
+ responseType: 'json',
535
+ url: '/v1/git/delete',
536
+ ...options,
537
+ headers: {
538
+ 'Content-Type': 'application/json',
539
+ ...options.headers
540
+ }
541
+ });
542
+ };
502
543
  /**
503
544
  * Commit staged changes
504
545
  */
@@ -562,30 +603,16 @@ export const pullChanges = (options) => {
562
603
  });
563
604
  };
564
605
  /**
565
- * Restore files to HEAD
566
- */
567
- export const restoreFiles = (options) => {
568
- return (options.client ?? client).post({
569
- responseType: 'json',
570
- url: '/v1/git/restore',
571
- ...options,
572
- headers: {
573
- 'Content-Type': 'application/json',
574
- ...options.headers
575
- }
576
- });
577
- };
578
- /**
579
- * Delete untracked files
606
+ * Initialize a git repository
580
607
  */
581
- export const deleteFiles = (options) => {
582
- return (options.client ?? client).post({
608
+ export const initGitRepo = (options) => {
609
+ return (options?.client ?? client).post({
583
610
  responseType: 'json',
584
- url: '/v1/git/delete',
611
+ url: '/v1/git/init',
585
612
  ...options,
586
613
  headers: {
587
614
  'Content-Type': 'application/json',
588
- ...options.headers
615
+ ...options?.headers
589
616
  }
590
617
  });
591
618
  };
@@ -628,22 +655,26 @@ export const addGitRemote = (options) => {
628
655
  });
629
656
  };
630
657
  /**
631
- * List configured MCP servers
658
+ * List all terminals
659
+ *
660
+ * Get a list of all active terminal sessions
632
661
  */
633
- export const listMcpServers = (options) => {
662
+ export const getTerminals = (options) => {
634
663
  return (options?.client ?? client).get({
635
664
  responseType: 'json',
636
- url: '/v1/mcp/servers',
665
+ url: '/v1/terminals',
637
666
  ...options
638
667
  });
639
668
  };
640
669
  /**
641
- * Add a new MCP server
670
+ * Create a new terminal
671
+ *
672
+ * Spawn a new terminal process
642
673
  */
643
- export const addMcpServer = (options) => {
674
+ export const postTerminals = (options) => {
644
675
  return (options.client ?? client).post({
645
676
  responseType: 'json',
646
- url: '/v1/mcp/servers',
677
+ url: '/v1/terminals',
647
678
  ...options,
648
679
  headers: {
649
680
  'Content-Type': 'application/json',
@@ -652,62 +683,73 @@ export const addMcpServer = (options) => {
652
683
  });
653
684
  };
654
685
  /**
655
- * Remove an MCP server
686
+ * Kill terminal
687
+ *
688
+ * Terminate a running terminal process
656
689
  */
657
- export const removeMcpServer = (options) => {
690
+ export const deleteTerminalsById = (options) => {
658
691
  return (options.client ?? client).delete({
659
692
  responseType: 'json',
660
- url: '/v1/mcp/servers/{name}',
693
+ url: '/v1/terminals/{id}',
661
694
  ...options
662
695
  });
663
696
  };
664
697
  /**
665
- * Start an MCP server
698
+ * Get terminal details
699
+ *
700
+ * Get information about a specific terminal
666
701
  */
667
- export const startMcpServer = (options) => {
668
- return (options.client ?? client).post({
702
+ export const getTerminalsById = (options) => {
703
+ return (options.client ?? client).get({
669
704
  responseType: 'json',
670
- url: '/v1/mcp/servers/{name}/start',
705
+ url: '/v1/terminals/{id}',
671
706
  ...options
672
707
  });
673
708
  };
674
709
  /**
675
- * Stop an MCP server
710
+ * Connect to terminal WebSocket
711
+ *
712
+ * Upgrade to a WebSocket for bidirectional terminal I/O. Generated HTTP clients cannot consume the upgraded connection directly.
676
713
  */
677
- export const stopMcpServer = (options) => {
678
- return (options.client ?? client).post({
679
- responseType: 'json',
680
- url: '/v1/mcp/servers/{name}/stop',
714
+ export const connectTerminalWebSocket = (options) => {
715
+ return (options.client ?? client).get({
716
+ url: '/v1/terminals/{id}/ws',
681
717
  ...options
682
718
  });
683
719
  };
684
720
  /**
685
- * Revoke auth for an MCP server
721
+ * Stream terminal output
722
+ *
723
+ * Get real-time terminal output via SSE
686
724
  */
687
- export const revokeMcpAuth = (options) => {
688
- return (options.client ?? client).delete({
689
- responseType: 'json',
690
- url: '/v1/mcp/servers/{name}/auth',
725
+ export const getTerminalsByIdOutput = (options) => {
726
+ return (options.client ?? client).sse.get({
727
+ responseType: 'text',
728
+ url: '/v1/terminals/{id}/output',
691
729
  ...options
692
730
  });
693
731
  };
694
732
  /**
695
- * Initiate auth for an MCP server
733
+ * Stream terminal output using POST
734
+ *
735
+ * Compatibility alias for terminal output SSE
696
736
  */
697
- export const initiateMcpAuth = (options) => {
698
- return (options.client ?? client).post({
699
- responseType: 'json',
700
- url: '/v1/mcp/servers/{name}/auth',
737
+ export const postTerminalsByIdOutput = (options) => {
738
+ return (options.client ?? client).sse.post({
739
+ responseType: 'text',
740
+ url: '/v1/terminals/{id}/output',
701
741
  ...options
702
742
  });
703
743
  };
704
744
  /**
705
- * Complete MCP server auth callback
745
+ * Send input to terminal
746
+ *
747
+ * Write data to terminal stdin
706
748
  */
707
- export const completeMcpAuth = (options) => {
749
+ export const postTerminalsByIdInput = (options) => {
708
750
  return (options.client ?? client).post({
709
751
  responseType: 'json',
710
- url: '/v1/mcp/servers/{name}/auth/callback',
752
+ url: '/v1/terminals/{id}/input',
711
753
  ...options,
712
754
  headers: {
713
755
  'Content-Type': 'application/json',
@@ -716,42 +758,38 @@ export const completeMcpAuth = (options) => {
716
758
  });
717
759
  };
718
760
  /**
719
- * Get auth status for an MCP server
720
- */
721
- export const getMcpAuthStatus = (options) => {
722
- return (options.client ?? client).get({
723
- responseType: 'json',
724
- url: '/v1/mcp/servers/{name}/auth/status',
725
- ...options
726
- });
727
- };
728
- /**
729
- * Test connection to an MCP server
761
+ * Resize terminal
762
+ *
763
+ * Resize the pseudo-terminal dimensions.
730
764
  */
731
- export const testMcpServer = (options) => {
765
+ export const resizeTerminal = (options) => {
732
766
  return (options.client ?? client).post({
733
767
  responseType: 'json',
734
- url: '/v1/mcp/servers/{name}/test',
735
- ...options
768
+ url: '/v1/terminals/{id}/resize',
769
+ ...options,
770
+ headers: {
771
+ 'Content-Type': 'application/json',
772
+ ...options.headers
773
+ }
736
774
  });
737
775
  };
738
776
  /**
739
- * List messages for a session
777
+ * Get files modified in a session
740
778
  */
741
- export const listMessages = (options) => {
779
+ export const getSessionFiles = (options) => {
742
780
  return (options.client ?? client).get({
743
781
  responseType: 'json',
744
- url: '/v1/sessions/{id}/messages',
782
+ url: '/v1/sessions/{sessionId}/files',
745
783
  ...options
746
784
  });
747
785
  };
748
786
  /**
749
- * Send a user message and enqueue assistant run
787
+ * Create a branch from a session message
750
788
  */
751
- export const createMessage = (options) => {
789
+ export const createBranch = (options) => {
752
790
  return (options.client ?? client).post({
753
791
  responseType: 'json',
754
- url: '/v1/sessions/{id}/messages',
792
+ url: '/v1/sessions/{sessionId}/branch',
755
793
  ...options,
756
794
  headers: {
757
795
  'Content-Type': 'application/json',
@@ -760,12 +798,22 @@ export const createMessage = (options) => {
760
798
  });
761
799
  };
762
800
  /**
763
- * Get usage information for an OAuth provider
801
+ * List branches of a session
764
802
  */
765
- export const getProviderUsage = (options) => {
803
+ export const listBranches = (options) => {
766
804
  return (options.client ?? client).get({
767
805
  responseType: 'json',
768
- url: '/v1/provider-usage/{provider}',
806
+ url: '/v1/sessions/{sessionId}/branches',
807
+ ...options
808
+ });
809
+ };
810
+ /**
811
+ * Get parent session of a branch
812
+ */
813
+ export const getParentSession = (options) => {
814
+ return (options.client ?? client).get({
815
+ responseType: 'json',
816
+ url: '/v1/sessions/{sessionId}/parent',
769
817
  ...options
770
818
  });
771
819
  };
@@ -832,56 +880,58 @@ export const exportResearchSession = (options) => {
832
880
  });
833
881
  };
834
882
  /**
835
- * Approve or deny a tool execution
883
+ * Get OttoRouter account balance
884
+ *
885
+ * Returns wallet balance, subscription, account info, limits, and usage data
836
886
  */
837
- export const resolveApproval = (options) => {
838
- return (options.client ?? client).post({
887
+ export const getOttoRouterBalance = (options) => {
888
+ return (options?.client ?? client).get({
839
889
  responseType: 'json',
840
- url: '/v1/sessions/{id}/approval',
841
- ...options,
842
- headers: {
843
- 'Content-Type': 'application/json',
844
- ...options.headers
845
- }
890
+ url: '/v1/ottorouter/balance',
891
+ ...options
846
892
  });
847
893
  };
848
894
  /**
849
- * Get pending approvals for a session
895
+ * Get OttoRouter wallet info
896
+ *
897
+ * Returns whether the wallet is configured and its public key
850
898
  */
851
- export const getPendingApprovals = (options) => {
852
- return (options.client ?? client).get({
899
+ export const getOttoRouterWallet = (options) => {
900
+ return (options?.client ?? client).get({
853
901
  responseType: 'json',
854
- url: '/v1/sessions/{id}/approval/pending',
902
+ url: '/v1/ottorouter/wallet',
855
903
  ...options
856
904
  });
857
905
  };
858
906
  /**
859
- * Delete a session
907
+ * Get USDC token balance
908
+ *
909
+ * Fetches USDC balance from Solana blockchain for the configured wallet
860
910
  */
861
- export const deleteSession = (options) => {
862
- return (options.client ?? client).delete({
911
+ export const getOttoRouterUsdcBalance = (options) => {
912
+ return (options?.client ?? client).get({
863
913
  responseType: 'json',
864
- url: '/v1/sessions/{sessionId}',
914
+ url: '/v1/ottorouter/usdc-balance',
865
915
  ...options
866
916
  });
867
917
  };
868
918
  /**
869
- * Get a single session by ID
919
+ * Get estimated fees for a Polar topup
870
920
  */
871
- export const getSession = (options) => {
921
+ export const getPolarTopupEstimate = (options) => {
872
922
  return (options.client ?? client).get({
873
923
  responseType: 'json',
874
- url: '/v1/sessions/{sessionId}',
924
+ url: '/v1/ottorouter/topup/polar/estimate',
875
925
  ...options
876
926
  });
877
927
  };
878
928
  /**
879
- * Update session preferences
929
+ * Create a Polar checkout for topping up
880
930
  */
881
- export const updateSession = (options) => {
882
- return (options.client ?? client).patch({
931
+ export const createPolarCheckout = (options) => {
932
+ return (options.client ?? client).post({
883
933
  responseType: 'json',
884
- url: '/v1/sessions/{sessionId}',
934
+ url: '/v1/ottorouter/topup/polar',
885
935
  ...options,
886
936
  headers: {
887
937
  'Content-Type': 'application/json',
@@ -890,174 +940,152 @@ export const updateSession = (options) => {
890
940
  });
891
941
  };
892
942
  /**
893
- * Get queue state for a session
943
+ * Select topup method for pending request
894
944
  */
895
- export const getSessionQueue = (options) => {
896
- return (options.client ?? client).get({
945
+ export const selectTopupMethod = (options) => {
946
+ return (options.client ?? client).post({
897
947
  responseType: 'json',
898
- url: '/v1/sessions/{sessionId}/queue',
899
- ...options
948
+ url: '/v1/ottorouter/topup/select',
949
+ ...options,
950
+ headers: {
951
+ 'Content-Type': 'application/json',
952
+ ...options.headers
953
+ }
900
954
  });
901
955
  };
902
956
  /**
903
- * Remove a message from session queue
957
+ * Cancel pending topup
904
958
  */
905
- export const removeFromQueue = (options) => {
906
- return (options.client ?? client).delete({
959
+ export const cancelTopup = (options) => {
960
+ return (options.client ?? client).post({
907
961
  responseType: 'json',
908
- url: '/v1/sessions/{sessionId}/queue/{messageId}',
909
- ...options
962
+ url: '/v1/ottorouter/topup/cancel',
963
+ ...options,
964
+ headers: {
965
+ 'Content-Type': 'application/json',
966
+ ...options.headers
967
+ }
910
968
  });
911
969
  };
912
970
  /**
913
- * Retry a failed assistant message
971
+ * Get pending topup for a session
914
972
  */
915
- export const retryMessage = (options) => {
916
- return (options.client ?? client).post({
973
+ export const getPendingTopup = (options) => {
974
+ return (options.client ?? client).get({
917
975
  responseType: 'json',
918
- url: '/v1/sessions/{sessionId}/messages/{messageId}/retry',
976
+ url: '/v1/ottorouter/topup/pending',
919
977
  ...options
920
978
  });
921
979
  };
922
980
  /**
923
- * Delete a shared session
981
+ * Get status of a Polar checkout
924
982
  */
925
- export const deleteShare = (options) => {
926
- return (options.client ?? client).delete({
983
+ export const getPolarTopupStatus = (options) => {
984
+ return (options.client ?? client).get({
927
985
  responseType: 'json',
928
- url: '/v1/sessions/{sessionId}/share',
986
+ url: '/v1/ottorouter/topup/polar/status',
929
987
  ...options
930
988
  });
931
989
  };
932
990
  /**
933
- * Get share status for a session
991
+ * Get estimated fees for a Razorpay topup
934
992
  */
935
- export const getShareStatus = (options) => {
993
+ export const getRazorpayTopupEstimate = (options) => {
936
994
  return (options.client ?? client).get({
937
995
  responseType: 'json',
938
- url: '/v1/sessions/{sessionId}/share',
996
+ url: '/v1/ottorouter/topup/razorpay/estimate',
939
997
  ...options
940
998
  });
941
999
  };
942
1000
  /**
943
- * Share a session
1001
+ * Create a Razorpay order for topping up
944
1002
  */
945
- export const shareSession = (options) => {
1003
+ export const createRazorpayOrder = (options) => {
946
1004
  return (options.client ?? client).post({
947
1005
  responseType: 'json',
948
- url: '/v1/sessions/{sessionId}/share',
949
- ...options
1006
+ url: '/v1/ottorouter/topup/razorpay',
1007
+ ...options,
1008
+ headers: {
1009
+ 'Content-Type': 'application/json',
1010
+ ...options.headers
1011
+ }
950
1012
  });
951
1013
  };
952
1014
  /**
953
- * Sync shared session with new messages
1015
+ * Verify Razorpay payment and credit balance
954
1016
  */
955
- export const syncShare = (options) => {
956
- return (options.client ?? client).put({
1017
+ export const verifyRazorpayPayment = (options) => {
1018
+ return (options.client ?? client).post({
957
1019
  responseType: 'json',
958
- url: '/v1/sessions/{sessionId}/share',
959
- ...options
1020
+ url: '/v1/ottorouter/topup/razorpay/verify',
1021
+ ...options,
1022
+ headers: {
1023
+ 'Content-Type': 'application/json',
1024
+ ...options.headers
1025
+ }
960
1026
  });
961
1027
  };
962
1028
  /**
963
- * List all shared sessions for a project
1029
+ * Get auth status for all providers
964
1030
  */
965
- export const listShares = (options) => {
1031
+ export const getAuthStatus = (options) => {
966
1032
  return (options?.client ?? client).get({
967
1033
  responseType: 'json',
968
- url: '/v1/shares',
969
- ...options
970
- });
971
- };
972
- /**
973
- * Get files modified in a session
974
- */
975
- export const getSessionFiles = (options) => {
976
- return (options.client ?? client).get({
977
- responseType: 'json',
978
- url: '/v1/sessions/{sessionId}/files',
1034
+ url: '/v1/auth/status',
979
1035
  ...options
980
1036
  });
981
1037
  };
982
1038
  /**
983
- * List sessions
1039
+ * Setup or ensure OttoRouter wallet
984
1040
  */
985
- export const listSessions = (options) => {
986
- return (options?.client ?? client).get({
1041
+ export const setupOttoRouterWallet = (options) => {
1042
+ return (options?.client ?? client).post({
987
1043
  responseType: 'json',
988
- url: '/v1/sessions',
1044
+ url: '/v1/auth/ottorouter/setup',
989
1045
  ...options
990
1046
  });
991
1047
  };
992
1048
  /**
993
- * Create a new session
1049
+ * Import OttoRouter wallet from private key
994
1050
  */
995
- export const createSession = (options) => {
996
- return (options?.client ?? client).post({
1051
+ export const importOttoRouterWallet = (options) => {
1052
+ return (options.client ?? client).post({
997
1053
  responseType: 'json',
998
- url: '/v1/sessions',
1054
+ url: '/v1/auth/ottorouter/import',
999
1055
  ...options,
1000
1056
  headers: {
1001
1057
  'Content-Type': 'application/json',
1002
- ...options?.headers
1058
+ ...options.headers
1003
1059
  }
1004
1060
  });
1005
1061
  };
1006
1062
  /**
1007
- * Abort a running session
1008
- *
1009
- * Aborts any currently running assistant generation for the session
1010
- */
1011
- export const abortSession = (options) => {
1012
- return (options.client ?? client).delete({
1013
- responseType: 'json',
1014
- url: '/v1/sessions/{sessionId}/abort',
1015
- ...options
1016
- });
1017
- };
1018
- /**
1019
- * Get OttoRouter account balance
1020
- *
1021
- * Returns wallet balance, subscription, account info, limits, and usage data
1022
- */
1023
- export const getOttoRouterBalance = (options) => {
1024
- return (options?.client ?? client).get({
1025
- responseType: 'json',
1026
- url: '/v1/ottorouter/balance',
1027
- ...options
1028
- });
1029
- };
1030
- /**
1031
- * Get OttoRouter wallet info
1032
- *
1033
- * Returns whether the wallet is configured and its public key
1063
+ * Export OttoRouter wallet private key
1034
1064
  */
1035
- export const getOttoRouterWallet = (options) => {
1065
+ export const exportOttoRouterWallet = (options) => {
1036
1066
  return (options?.client ?? client).get({
1037
1067
  responseType: 'json',
1038
- url: '/v1/ottorouter/wallet',
1068
+ url: '/v1/auth/ottorouter/export',
1039
1069
  ...options
1040
1070
  });
1041
1071
  };
1042
1072
  /**
1043
- * Get USDC token balance
1044
- *
1045
- * Fetches USDC balance from Solana blockchain for the configured wallet
1073
+ * Remove auth for a provider
1046
1074
  */
1047
- export const getOttoRouterUsdcBalance = (options) => {
1048
- return (options?.client ?? client).get({
1075
+ export const removeProvider = (options) => {
1076
+ return (options.client ?? client).delete({
1049
1077
  responseType: 'json',
1050
- url: '/v1/ottorouter/usdc-balance',
1078
+ url: '/v1/auth/{provider}',
1051
1079
  ...options
1052
1080
  });
1053
1081
  };
1054
1082
  /**
1055
- * Create a Polar checkout for topping up
1083
+ * Add API key for a provider
1056
1084
  */
1057
- export const createPolarCheckout = (options) => {
1085
+ export const addProviderApiKey = (options) => {
1058
1086
  return (options.client ?? client).post({
1059
1087
  responseType: 'json',
1060
- url: '/v1/ottorouter/topup/polar',
1088
+ url: '/v1/auth/{provider}',
1061
1089
  ...options,
1062
1090
  headers: {
1063
1091
  'Content-Type': 'application/json',
@@ -1066,12 +1094,12 @@ export const createPolarCheckout = (options) => {
1066
1094
  });
1067
1095
  };
1068
1096
  /**
1069
- * Select topup method for pending request
1097
+ * Get OAuth authorization URL
1070
1098
  */
1071
- export const selectTopupMethod = (options) => {
1099
+ export const getOAuthUrl = (options) => {
1072
1100
  return (options.client ?? client).post({
1073
1101
  responseType: 'json',
1074
- url: '/v1/ottorouter/topup/select',
1102
+ url: '/v1/auth/{provider}/oauth/url',
1075
1103
  ...options,
1076
1104
  headers: {
1077
1105
  'Content-Type': 'application/json',
@@ -1080,12 +1108,12 @@ export const selectTopupMethod = (options) => {
1080
1108
  });
1081
1109
  };
1082
1110
  /**
1083
- * Cancel pending topup
1111
+ * Exchange OAuth code for tokens
1084
1112
  */
1085
- export const cancelTopup = (options) => {
1113
+ export const exchangeOAuthCode = (options) => {
1086
1114
  return (options.client ?? client).post({
1087
1115
  responseType: 'json',
1088
- url: '/v1/ottorouter/topup/cancel',
1116
+ url: '/v1/auth/{provider}/oauth/exchange',
1089
1117
  ...options,
1090
1118
  headers: {
1091
1119
  'Content-Type': 'application/json',
@@ -1094,52 +1122,41 @@ export const cancelTopup = (options) => {
1094
1122
  });
1095
1123
  };
1096
1124
  /**
1097
- * Get pending topup for a session
1098
- */
1099
- export const getPendingTopup = (options) => {
1100
- return (options.client ?? client).get({
1101
- responseType: 'json',
1102
- url: '/v1/ottorouter/topup/pending',
1103
- ...options
1104
- });
1105
- };
1106
- /**
1107
- * Get estimated fees for a Polar topup
1125
+ * Start OAuth flow with redirect
1108
1126
  */
1109
- export const getPolarTopupEstimate = (options) => {
1127
+ export const startOAuth = (options) => {
1110
1128
  return (options.client ?? client).get({
1111
- responseType: 'json',
1112
- url: '/v1/ottorouter/topup/polar/estimate',
1129
+ url: '/v1/auth/{provider}/oauth/start',
1113
1130
  ...options
1114
1131
  });
1115
1132
  };
1116
1133
  /**
1117
- * Get status of a Polar checkout
1134
+ * OAuth callback handler
1118
1135
  */
1119
- export const getPolarTopupStatus = (options) => {
1136
+ export const oauthCallback = (options) => {
1120
1137
  return (options.client ?? client).get({
1121
- responseType: 'json',
1122
- url: '/v1/ottorouter/topup/polar/status',
1138
+ responseType: 'text',
1139
+ url: '/v1/auth/{provider}/oauth/callback',
1123
1140
  ...options
1124
1141
  });
1125
1142
  };
1126
1143
  /**
1127
- * Get estimated fees for a Razorpay topup
1144
+ * Start Copilot device flow authentication
1128
1145
  */
1129
- export const getRazorpayTopupEstimate = (options) => {
1130
- return (options.client ?? client).get({
1146
+ export const startCopilotDeviceFlow = (options) => {
1147
+ return (options?.client ?? client).post({
1131
1148
  responseType: 'json',
1132
- url: '/v1/ottorouter/topup/razorpay/estimate',
1149
+ url: '/v1/auth/copilot/device/start',
1133
1150
  ...options
1134
1151
  });
1135
1152
  };
1136
1153
  /**
1137
- * Create a Razorpay order for topping up
1154
+ * Poll Copilot device flow for completion
1138
1155
  */
1139
- export const createRazorpayOrder = (options) => {
1156
+ export const pollCopilotDeviceFlow = (options) => {
1140
1157
  return (options.client ?? client).post({
1141
1158
  responseType: 'json',
1142
- url: '/v1/ottorouter/topup/razorpay',
1159
+ url: '/v1/auth/copilot/device/poll',
1143
1160
  ...options,
1144
1161
  headers: {
1145
1162
  'Content-Type': 'application/json',
@@ -1148,12 +1165,22 @@ export const createRazorpayOrder = (options) => {
1148
1165
  });
1149
1166
  };
1150
1167
  /**
1151
- * Verify Razorpay payment and credit balance
1168
+ * Get available Copilot auth methods
1152
1169
  */
1153
- export const verifyRazorpayPayment = (options) => {
1170
+ export const getCopilotAuthMethods = (options) => {
1171
+ return (options?.client ?? client).get({
1172
+ responseType: 'json',
1173
+ url: '/v1/auth/copilot/methods',
1174
+ ...options
1175
+ });
1176
+ };
1177
+ /**
1178
+ * Save Copilot token after validating model access
1179
+ */
1180
+ export const saveCopilotToken = (options) => {
1154
1181
  return (options.client ?? client).post({
1155
1182
  responseType: 'json',
1156
- url: '/v1/ottorouter/topup/razorpay/verify',
1183
+ url: '/v1/auth/copilot/token',
1157
1184
  ...options,
1158
1185
  headers: {
1159
1186
  'Content-Type': 'application/json',
@@ -1162,76 +1189,66 @@ export const verifyRazorpayPayment = (options) => {
1162
1189
  });
1163
1190
  };
1164
1191
  /**
1165
- * Get skills enable/disable config and counts
1192
+ * Import Copilot token from GitHub CLI (gh)
1166
1193
  */
1167
- export const getSkillsConfig = (options) => {
1168
- return (options?.client ?? client).get({
1194
+ export const importCopilotTokenFromGh = (options) => {
1195
+ return (options?.client ?? client).post({
1169
1196
  responseType: 'json',
1170
- url: '/v1/config/skills',
1197
+ url: '/v1/auth/copilot/gh/import',
1171
1198
  ...options
1172
1199
  });
1173
1200
  };
1174
1201
  /**
1175
- * Update skills enable/disable config
1176
- */
1177
- export const updateSkillsConfig = (options) => {
1178
- return (options.client ?? client).put({
1179
- responseType: 'json',
1180
- url: '/v1/config/skills',
1181
- ...options,
1182
- headers: {
1183
- 'Content-Type': 'application/json',
1184
- ...options.headers
1185
- }
1186
- });
1187
- };
1188
- /**
1189
- * List discovered skills
1202
+ * Get Copilot token diagnostics and model visibility
1190
1203
  */
1191
- export const listSkills = (options) => {
1204
+ export const getCopilotDiagnostics = (options) => {
1192
1205
  return (options?.client ?? client).get({
1193
1206
  responseType: 'json',
1194
- url: '/v1/skills',
1207
+ url: '/v1/auth/copilot/diagnostics',
1195
1208
  ...options
1196
1209
  });
1197
1210
  };
1198
1211
  /**
1199
- * Get a skill by name
1212
+ * Mark onboarding as complete
1200
1213
  */
1201
- export const getSkill = (options) => {
1202
- return (options.client ?? client).get({
1214
+ export const completeOnboarding = (options) => {
1215
+ return (options?.client ?? client).post({
1203
1216
  responseType: 'json',
1204
- url: '/v1/skills/{name}',
1217
+ url: '/v1/auth/onboarding/complete',
1205
1218
  ...options
1206
1219
  });
1207
1220
  };
1208
1221
  /**
1209
- * List files in a skill directory
1222
+ * Get tunnel status
1210
1223
  */
1211
- export const listSkillFiles = (options) => {
1212
- return (options.client ?? client).get({
1224
+ export const getTunnelStatus = (options) => {
1225
+ return (options?.client ?? client).get({
1213
1226
  responseType: 'json',
1214
- url: '/v1/skills/{name}/files',
1227
+ url: '/v1/tunnel/status',
1215
1228
  ...options
1216
1229
  });
1217
1230
  };
1218
1231
  /**
1219
- * Read a specific file from a skill directory
1232
+ * Start a tunnel
1220
1233
  */
1221
- export const getSkillFile = (options) => {
1222
- return (options.client ?? client).get({
1234
+ export const startTunnel = (options) => {
1235
+ return (options?.client ?? client).post({
1223
1236
  responseType: 'json',
1224
- url: '/v1/skills/{name}/files/{filePath}',
1225
- ...options
1237
+ url: '/v1/tunnel/start',
1238
+ ...options,
1239
+ headers: {
1240
+ 'Content-Type': 'application/json',
1241
+ ...options?.headers
1242
+ }
1226
1243
  });
1227
1244
  };
1228
1245
  /**
1229
- * Validate a SKILL.md content
1246
+ * Register an external tunnel URL
1230
1247
  */
1231
- export const validateSkill = (options) => {
1248
+ export const registerTunnel = (options) => {
1232
1249
  return (options.client ?? client).post({
1233
1250
  responseType: 'json',
1234
- url: '/v1/skills/validate',
1251
+ url: '/v1/tunnel/register',
1235
1252
  ...options,
1236
1253
  headers: {
1237
1254
  'Content-Type': 'application/json',
@@ -1240,46 +1257,62 @@ export const validateSkill = (options) => {
1240
1257
  });
1241
1258
  };
1242
1259
  /**
1243
- * Check if a skill name is valid
1260
+ * Stop the tunnel
1244
1261
  */
1245
- export const validateSkillName = (options) => {
1246
- return (options.client ?? client).get({
1262
+ export const stopTunnel = (options) => {
1263
+ return (options?.client ?? client).post({
1247
1264
  responseType: 'json',
1248
- url: '/v1/skills/validate-name/{name}',
1265
+ url: '/v1/tunnel/stop',
1249
1266
  ...options
1250
1267
  });
1251
1268
  };
1252
1269
  /**
1253
- * Subscribe to session event stream (SSE)
1270
+ * Get QR code for tunnel URL
1254
1271
  */
1255
- export const subscribeSessionStream = (options) => {
1256
- return (options.client ?? client).sse.get({
1272
+ export const getTunnelQr = (options) => {
1273
+ return (options?.client ?? client).get({
1274
+ responseType: 'json',
1275
+ url: '/v1/tunnel/qr',
1276
+ ...options
1277
+ });
1278
+ };
1279
+ /**
1280
+ * Subscribe to tunnel status stream
1281
+ */
1282
+ export const subscribeTunnelStream = (options) => {
1283
+ return (options?.client ?? client).sse.get({
1257
1284
  responseType: 'text',
1258
- url: '/v1/sessions/{id}/stream',
1285
+ url: '/v1/tunnel/stream',
1259
1286
  ...options
1260
1287
  });
1261
1288
  };
1262
1289
  /**
1263
- * List all terminals
1264
- *
1265
- * Get a list of all active terminal sessions
1290
+ * Subscribe to tunnel status stream
1266
1291
  */
1267
- export const getTerminals = (options) => {
1292
+ export const subscribeTunnelStreamPost = (options) => {
1293
+ return (options?.client ?? client).sse.post({
1294
+ responseType: 'text',
1295
+ url: '/v1/tunnel/stream',
1296
+ ...options
1297
+ });
1298
+ };
1299
+ /**
1300
+ * List configured MCP servers
1301
+ */
1302
+ export const listMcpServers = (options) => {
1268
1303
  return (options?.client ?? client).get({
1269
1304
  responseType: 'json',
1270
- url: '/v1/terminals',
1305
+ url: '/v1/mcp/servers',
1271
1306
  ...options
1272
1307
  });
1273
1308
  };
1274
1309
  /**
1275
- * Create a new terminal
1276
- *
1277
- * Spawn a new terminal process
1310
+ * Add a new MCP server
1278
1311
  */
1279
- export const postTerminals = (options) => {
1312
+ export const addMcpServer = (options) => {
1280
1313
  return (options.client ?? client).post({
1281
1314
  responseType: 'json',
1282
- url: '/v1/terminals',
1315
+ url: '/v1/mcp/servers',
1283
1316
  ...options,
1284
1317
  headers: {
1285
1318
  'Content-Type': 'application/json',
@@ -1288,50 +1321,62 @@ export const postTerminals = (options) => {
1288
1321
  });
1289
1322
  };
1290
1323
  /**
1291
- * Kill terminal
1292
- *
1293
- * Terminate a running terminal process
1324
+ * Remove an MCP server
1294
1325
  */
1295
- export const deleteTerminalsById = (options) => {
1326
+ export const removeMcpServer = (options) => {
1296
1327
  return (options.client ?? client).delete({
1297
1328
  responseType: 'json',
1298
- url: '/v1/terminals/{id}',
1329
+ url: '/v1/mcp/servers/{name}',
1299
1330
  ...options
1300
1331
  });
1301
1332
  };
1302
1333
  /**
1303
- * Get terminal details
1304
- *
1305
- * Get information about a specific terminal
1334
+ * Start an MCP server
1306
1335
  */
1307
- export const getTerminalsById = (options) => {
1308
- return (options.client ?? client).get({
1336
+ export const startMcpServer = (options) => {
1337
+ return (options.client ?? client).post({
1309
1338
  responseType: 'json',
1310
- url: '/v1/terminals/{id}',
1339
+ url: '/v1/mcp/servers/{name}/start',
1311
1340
  ...options
1312
1341
  });
1313
1342
  };
1314
1343
  /**
1315
- * Stream terminal output
1316
- *
1317
- * Get real-time terminal output via SSE
1344
+ * Stop an MCP server
1318
1345
  */
1319
- export const getTerminalsByIdOutput = (options) => {
1320
- return (options.client ?? client).sse.get({
1321
- responseType: 'text',
1322
- url: '/v1/terminals/{id}/output',
1346
+ export const stopMcpServer = (options) => {
1347
+ return (options.client ?? client).post({
1348
+ responseType: 'json',
1349
+ url: '/v1/mcp/servers/{name}/stop',
1323
1350
  ...options
1324
1351
  });
1325
1352
  };
1326
1353
  /**
1327
- * Send input to terminal
1328
- *
1329
- * Write data to terminal stdin
1354
+ * Revoke auth for an MCP server
1330
1355
  */
1331
- export const postTerminalsByIdInput = (options) => {
1356
+ export const revokeMcpAuth = (options) => {
1357
+ return (options.client ?? client).delete({
1358
+ responseType: 'json',
1359
+ url: '/v1/mcp/servers/{name}/auth',
1360
+ ...options
1361
+ });
1362
+ };
1363
+ /**
1364
+ * Initiate auth for an MCP server
1365
+ */
1366
+ export const initiateMcpAuth = (options) => {
1332
1367
  return (options.client ?? client).post({
1333
1368
  responseType: 'json',
1334
- url: '/v1/terminals/{id}/input',
1369
+ url: '/v1/mcp/servers/{name}/auth',
1370
+ ...options
1371
+ });
1372
+ };
1373
+ /**
1374
+ * Complete MCP server auth callback
1375
+ */
1376
+ export const completeMcpAuth = (options) => {
1377
+ return (options.client ?? client).post({
1378
+ responseType: 'json',
1379
+ url: '/v1/mcp/servers/{name}/auth/callback',
1335
1380
  ...options,
1336
1381
  headers: {
1337
1382
  'Content-Type': 'application/json',
@@ -1340,36 +1385,72 @@ export const postTerminalsByIdInput = (options) => {
1340
1385
  });
1341
1386
  };
1342
1387
  /**
1343
- * Get tunnel status
1388
+ * Get auth status for an MCP server
1344
1389
  */
1345
- export const getTunnelStatus = (options) => {
1390
+ export const getMcpAuthStatus = (options) => {
1391
+ return (options.client ?? client).get({
1392
+ responseType: 'json',
1393
+ url: '/v1/mcp/servers/{name}/auth/status',
1394
+ ...options
1395
+ });
1396
+ };
1397
+ /**
1398
+ * Test connection to an MCP server
1399
+ */
1400
+ export const testMcpServer = (options) => {
1401
+ return (options.client ?? client).post({
1402
+ responseType: 'json',
1403
+ url: '/v1/mcp/servers/{name}/test',
1404
+ ...options
1405
+ });
1406
+ };
1407
+ /**
1408
+ * Get usage information for an OAuth provider
1409
+ */
1410
+ export const getProviderUsage = (options) => {
1411
+ return (options.client ?? client).get({
1412
+ responseType: 'json',
1413
+ url: '/v1/provider-usage/{provider}',
1414
+ ...options
1415
+ });
1416
+ };
1417
+ /**
1418
+ * Run diagnostics on the current configuration
1419
+ */
1420
+ export const runDoctor = (options) => {
1346
1421
  return (options?.client ?? client).get({
1347
1422
  responseType: 'json',
1348
- url: '/v1/tunnel/status',
1423
+ url: '/v1/doctor',
1349
1424
  ...options
1350
1425
  });
1351
1426
  };
1352
1427
  /**
1353
- * Start a tunnel
1428
+ * List discovered skills
1354
1429
  */
1355
- export const startTunnel = (options) => {
1356
- return (options?.client ?? client).post({
1430
+ export const listSkills = (options) => {
1431
+ return (options?.client ?? client).get({
1357
1432
  responseType: 'json',
1358
- url: '/v1/tunnel/start',
1359
- ...options,
1360
- headers: {
1361
- 'Content-Type': 'application/json',
1362
- ...options?.headers
1363
- }
1433
+ url: '/v1/skills',
1434
+ ...options
1364
1435
  });
1365
1436
  };
1366
1437
  /**
1367
- * Register an external tunnel URL
1438
+ * Get skills enable/disable config and counts
1368
1439
  */
1369
- export const registerTunnel = (options) => {
1370
- return (options.client ?? client).post({
1440
+ export const getSkillsConfig = (options) => {
1441
+ return (options?.client ?? client).get({
1371
1442
  responseType: 'json',
1372
- url: '/v1/tunnel/register',
1443
+ url: '/v1/config/skills',
1444
+ ...options
1445
+ });
1446
+ };
1447
+ /**
1448
+ * Update skills enable/disable config
1449
+ */
1450
+ export const updateSkillsConfig = (options) => {
1451
+ return (options.client ?? client).put({
1452
+ responseType: 'json',
1453
+ url: '/v1/config/skills',
1373
1454
  ...options,
1374
1455
  headers: {
1375
1456
  'Content-Type': 'application/json',
@@ -1378,22 +1459,56 @@ export const registerTunnel = (options) => {
1378
1459
  });
1379
1460
  };
1380
1461
  /**
1381
- * Stop the tunnel
1462
+ * Get a skill by name
1382
1463
  */
1383
- export const stopTunnel = (options) => {
1384
- return (options?.client ?? client).post({
1464
+ export const getSkill = (options) => {
1465
+ return (options.client ?? client).get({
1385
1466
  responseType: 'json',
1386
- url: '/v1/tunnel/stop',
1467
+ url: '/v1/skills/{name}',
1387
1468
  ...options
1388
1469
  });
1389
1470
  };
1390
1471
  /**
1391
- * Get QR code for tunnel URL
1472
+ * List files in a skill directory
1392
1473
  */
1393
- export const getTunnelQr = (options) => {
1394
- return (options?.client ?? client).get({
1474
+ export const listSkillFiles = (options) => {
1475
+ return (options.client ?? client).get({
1395
1476
  responseType: 'json',
1396
- url: '/v1/tunnel/qr',
1477
+ url: '/v1/skills/{name}/files',
1478
+ ...options
1479
+ });
1480
+ };
1481
+ /**
1482
+ * Read a specific file from a skill directory
1483
+ */
1484
+ export const getSkillFile = (options) => {
1485
+ return (options.client ?? client).get({
1486
+ responseType: 'json',
1487
+ url: '/v1/skills/{name}/files/{filePath}',
1488
+ ...options
1489
+ });
1490
+ };
1491
+ /**
1492
+ * Validate a SKILL.md content
1493
+ */
1494
+ export const validateSkill = (options) => {
1495
+ return (options.client ?? client).post({
1496
+ responseType: 'json',
1497
+ url: '/v1/skills/validate',
1498
+ ...options,
1499
+ headers: {
1500
+ 'Content-Type': 'application/json',
1501
+ ...options.headers
1502
+ }
1503
+ });
1504
+ };
1505
+ /**
1506
+ * Check if a skill name is valid
1507
+ */
1508
+ export const validateSkillName = (options) => {
1509
+ return (options.client ?? client).get({
1510
+ responseType: 'json',
1511
+ url: '/v1/skills/validate-name/{name}',
1397
1512
  ...options
1398
1513
  });
1399
1514
  };