remote-codex 0.11.19 → 0.11.20

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 (35) hide show
  1. package/apps/relay-server/dist/index.js +48 -1
  2. package/apps/supervisor-api/dist/index.js +27939 -4
  3. package/apps/supervisor-web/dist/assets/index-BdeDlmJY.js +5 -0
  4. package/apps/supervisor-web/dist/assets/index-BmBS1Wzk.css +1 -0
  5. package/apps/supervisor-web/dist/assets/thread-ui-C5nUCiEf.js +3624 -0
  6. package/apps/supervisor-web/dist/index.html +3 -3
  7. package/package.json +1 -39
  8. package/packages/agent-runtime/src/types.ts +3 -1
  9. package/packages/claude/src/runtimeAdapter.test.ts +25 -0
  10. package/packages/claude/src/runtimeAdapter.ts +85 -24
  11. package/packages/codex/src/appServerManager.test.ts +2 -1
  12. package/packages/codex/src/historyItems.test.ts +26 -0
  13. package/packages/codex/src/historyItems.ts +17 -0
  14. package/packages/codex/src/runtimeAdapter.ts +1 -1
  15. package/packages/db/src/repositories.ts +0 -123
  16. package/packages/db/src/schema.ts +1 -334
  17. package/packages/opencode/src/runtimeAdapter.test.ts +13 -1
  18. package/packages/opencode/src/runtimeAdapter.ts +1 -2
  19. package/packages/shared/src/index.ts +4 -1
  20. package/apps/supervisor-api/dist/chunk-IZBNFCMP.js +0 -29346
  21. package/apps/supervisor-api/dist/worker-index.d.ts +0 -2
  22. package/apps/supervisor-api/dist/worker-index.js +0 -197
  23. package/apps/supervisor-web/dist/assets/index-CUnlRID-.js +0 -6
  24. package/apps/supervisor-web/dist/assets/index-D3I41SIH.css +0 -1
  25. package/apps/supervisor-web/dist/assets/thread-ui-TBhog-RK.js +0 -3614
  26. package/packages/db/migrations/0018_control_plane.sql +0 -129
  27. package/packages/db/migrations/0019_control_plane_projects.sql +0 -19
  28. package/packages/db/migrations/0020_control_workspace_status.sql +0 -1
  29. package/packages/db/migrations/0021_control_sandbox_lifecycle_fields.sql +0 -3
  30. package/packages/db/migrations/0022_control_sandbox_resource_profile.sql +0 -1
  31. package/packages/db/migrations/0023_control_usage_import_state.sql +0 -18
  32. package/packages/db/migrations/0024_control_auth.sql +0 -23
  33. package/packages/db/migrations/0025_control_harness_credentials.sql +0 -29
  34. package/packages/db/migrations/0026_control_harness_usage_events.sql +0 -27
  35. package/packages/db/migrations/0027_harness_job_watches.sql +0 -24
@@ -1,4 +1,4 @@
1
- import { integer, real, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core';
1
+ import { integer, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core';
2
2
 
3
3
  export const hosts = sqliteTable('hosts', {
4
4
  id: text('id').primaryKey(),
@@ -177,336 +177,3 @@ export const policies = sqliteTable('policies', {
177
177
  createdAt: text('created_at').notNull(),
178
178
  updatedAt: text('updated_at').notNull()
179
179
  });
180
-
181
- export const controlUsers = sqliteTable(
182
- 'control_users',
183
- {
184
- id: text('id').primaryKey(),
185
- authProvider: text('auth_provider').notNull(),
186
- authSubject: text('auth_subject').notNull(),
187
- email: text('email').notNull(),
188
- displayName: text('display_name'),
189
- status: text('status').notNull().default('active'),
190
- plan: text('plan').notNull().default('developer'),
191
- billingCustomerId: text('billing_customer_id'),
192
- quotaProfile: text('quota_profile').notNull().default('developer'),
193
- createdAt: text('created_at').notNull(),
194
- updatedAt: text('updated_at').notNull(),
195
- lastSeenAt: text('last_seen_at'),
196
- },
197
- (table) => ({
198
- authSubjectUnique: uniqueIndex('control_users_auth_subject_idx').on(
199
- table.authProvider,
200
- table.authSubject,
201
- ),
202
- }),
203
- );
204
-
205
- export const controlAuthIdentities = sqliteTable(
206
- 'control_auth_identities',
207
- {
208
- id: text('id').primaryKey(),
209
- userId: text('user_id').notNull(),
210
- authProvider: text('auth_provider').notNull(),
211
- authSubject: text('auth_subject').notNull(),
212
- email: text('email'),
213
- displayName: text('display_name'),
214
- createdAt: text('created_at').notNull(),
215
- updatedAt: text('updated_at').notNull(),
216
- },
217
- (table) => ({
218
- authSubjectUnique: uniqueIndex('control_auth_identities_subject_idx').on(
219
- table.authProvider,
220
- table.authSubject,
221
- ),
222
- }),
223
- );
224
-
225
- export const controlPasswordCredentials = sqliteTable(
226
- 'control_password_credentials',
227
- {
228
- id: text('id').primaryKey(),
229
- userId: text('user_id').notNull(),
230
- email: text('email').notNull(),
231
- passwordHash: text('password_hash').notNull(),
232
- createdAt: text('created_at').notNull(),
233
- updatedAt: text('updated_at').notNull(),
234
- lastUsedAt: text('last_used_at'),
235
- },
236
- (table) => ({
237
- emailUnique: uniqueIndex('control_password_credentials_email_idx').on(table.email),
238
- userUnique: uniqueIndex('control_password_credentials_user_idx').on(table.userId),
239
- }),
240
- );
241
-
242
- export const controlProjects = sqliteTable('control_projects', {
243
- id: text('id').primaryKey(),
244
- userId: text('user_id').notNull(),
245
- name: text('name').notNull(),
246
- slug: text('slug').notNull(),
247
- status: text('status').notNull().default('active'),
248
- createdAt: text('created_at').notNull(),
249
- updatedAt: text('updated_at').notNull(),
250
- });
251
-
252
- export const controlSandboxes = sqliteTable('control_sandboxes', {
253
- id: text('id').primaryKey(),
254
- userId: text('user_id').notNull().unique(),
255
- state: text('state').notNull(),
256
- image: text('image').notNull(),
257
- region: text('region').notNull(),
258
- resourceProfile: text('resource_profile').notNull().default('standard'),
259
- k8sNamespace: text('k8s_namespace'),
260
- k8sPodName: text('k8s_pod_name'),
261
- routerBaseUrl: text('router_base_url'),
262
- workerServiceName: text('worker_service_name'),
263
- s3Prefix: text('s3_prefix').notNull(),
264
- gatewayKeyId: text('gateway_key_id'),
265
- lastStartedAt: text('last_started_at'),
266
- lastSeenAt: text('last_seen_at'),
267
- idleTimeoutAt: text('idle_timeout_at'),
268
- statusReason: text('status_reason'),
269
- startupProgress: integer('startup_progress').notNull().default(0),
270
- lastFailureCode: text('last_failure_code'),
271
- lastFailureMessage: text('last_failure_message'),
272
- createdAt: text('created_at').notNull(),
273
- updatedAt: text('updated_at').notNull(),
274
- });
275
-
276
- export const controlWorkspaces = sqliteTable(
277
- 'control_workspaces',
278
- {
279
- id: text('id').primaryKey(),
280
- userId: text('user_id').notNull(),
281
- projectId: text('project_id'),
282
- sandboxId: text('sandbox_id').notNull(),
283
- name: text('name').notNull(),
284
- slug: text('slug').notNull(),
285
- status: text('status').notNull().default('active'),
286
- path: text('path').notNull(),
287
- sourceType: text('source_type').notNull(),
288
- gitUrl: text('git_url'),
289
- defaultBranch: text('default_branch'),
290
- createdAt: text('created_at').notNull(),
291
- updatedAt: text('updated_at').notNull(),
292
- },
293
- (table) => ({
294
- sandboxSlugUnique: uniqueIndex('control_workspaces_sandbox_slug_idx').on(
295
- table.sandboxId,
296
- table.slug,
297
- ),
298
- }),
299
- );
300
-
301
- export const controlSessions = sqliteTable('control_sessions', {
302
- id: text('id').primaryKey(),
303
- userId: text('user_id').notNull(),
304
- sandboxId: text('sandbox_id').notNull(),
305
- workspaceId: text('workspace_id').notNull(),
306
- provider: text('provider').notNull(),
307
- workerSessionId: text('worker_session_id'),
308
- title: text('title').notNull(),
309
- status: text('status').notNull(),
310
- lastActivityAt: text('last_activity_at'),
311
- createdAt: text('created_at').notNull(),
312
- updatedAt: text('updated_at').notNull(),
313
- });
314
-
315
- export const controlGatewayUsers = sqliteTable(
316
- 'control_gateway_users',
317
- {
318
- id: text('id').primaryKey(),
319
- userId: text('user_id').notNull(),
320
- provider: text('provider').notNull(),
321
- externalUserId: text('external_user_id').notNull(),
322
- createdAt: text('created_at').notNull(),
323
- },
324
- (table) => ({
325
- userProviderUnique: uniqueIndex('control_gateway_users_user_provider_idx').on(
326
- table.userId,
327
- table.provider,
328
- ),
329
- providerExternalUnique: uniqueIndex('control_gateway_users_provider_external_idx').on(
330
- table.provider,
331
- table.externalUserId,
332
- ),
333
- }),
334
- );
335
-
336
- export const controlGatewayKeys = sqliteTable(
337
- 'control_gateway_keys',
338
- {
339
- id: text('id').primaryKey(),
340
- userId: text('user_id').notNull(),
341
- sandboxId: text('sandbox_id').notNull(),
342
- provider: text('provider').notNull(),
343
- externalKeyId: text('external_key_id').notNull(),
344
- keyCiphertext: text('key_ciphertext'),
345
- status: text('status').notNull(),
346
- createdAt: text('created_at').notNull(),
347
- rotatedAt: text('rotated_at'),
348
- revokedAt: text('revoked_at'),
349
- },
350
- (table) => ({
351
- sandboxProviderUnique: uniqueIndex('control_gateway_keys_sandbox_provider_idx').on(
352
- table.sandboxId,
353
- table.provider,
354
- ),
355
- providerExternalUnique: uniqueIndex('control_gateway_keys_provider_external_idx').on(
356
- table.provider,
357
- table.externalKeyId,
358
- ),
359
- }),
360
- );
361
-
362
- export const controlHarnessUsers = sqliteTable(
363
- 'control_harness_users',
364
- {
365
- id: text('id').primaryKey(),
366
- userId: text('user_id').notNull(),
367
- provider: text('provider').notNull(),
368
- externalUserId: text('external_user_id').notNull(),
369
- createdAt: text('created_at').notNull(),
370
- },
371
- (table) => ({
372
- userProviderUnique: uniqueIndex('control_harness_users_user_provider_idx').on(
373
- table.userId,
374
- table.provider,
375
- ),
376
- providerExternalUnique: uniqueIndex('control_harness_users_provider_external_idx').on(
377
- table.provider,
378
- table.externalUserId,
379
- ),
380
- }),
381
- );
382
-
383
- export const controlHarnessKeys = sqliteTable(
384
- 'control_harness_keys',
385
- {
386
- id: text('id').primaryKey(),
387
- userId: text('user_id').notNull(),
388
- sandboxId: text('sandbox_id').notNull(),
389
- provider: text('provider').notNull(),
390
- externalKeyId: text('external_key_id').notNull(),
391
- keyCiphertext: text('key_ciphertext'),
392
- secretName: text('secret_name'),
393
- secretKey: text('secret_key'),
394
- status: text('status').notNull(),
395
- createdAt: text('created_at').notNull(),
396
- rotatedAt: text('rotated_at'),
397
- revokedAt: text('revoked_at'),
398
- },
399
- (table) => ({
400
- sandboxProviderUnique: uniqueIndex('control_harness_keys_sandbox_provider_idx').on(
401
- table.sandboxId,
402
- table.provider,
403
- ),
404
- providerExternalUnique: uniqueIndex('control_harness_keys_provider_external_idx').on(
405
- table.provider,
406
- table.externalKeyId,
407
- ),
408
- }),
409
- );
410
-
411
- export const controlUsageEvents = sqliteTable('control_usage_events', {
412
- id: text('id').primaryKey(),
413
- userId: text('user_id').notNull(),
414
- sandboxId: text('sandbox_id').notNull(),
415
- workspaceId: text('workspace_id'),
416
- sessionId: text('session_id'),
417
- gatewayKeyId: text('gateway_key_id'),
418
- provider: text('provider').notNull(),
419
- model: text('model').notNull(),
420
- inputTokens: integer('input_tokens').notNull().default(0),
421
- outputTokens: integer('output_tokens').notNull().default(0),
422
- cachedTokens: integer('cached_tokens').notNull().default(0),
423
- costUsd: real('cost_usd').notNull().default(0),
424
- externalRequestId: text('external_request_id'),
425
- occurredAt: text('occurred_at').notNull(),
426
- importedAt: text('imported_at').notNull(),
427
- });
428
-
429
- export const controlHarnessUsageEvents = sqliteTable(
430
- 'control_harness_usage_events',
431
- {
432
- id: text('id').primaryKey(),
433
- userId: text('user_id').notNull(),
434
- sandboxId: text('sandbox_id').notNull(),
435
- workspaceId: text('workspace_id'),
436
- sessionId: text('session_id'),
437
- provider: text('provider').notNull(),
438
- module: text('module').notNull(),
439
- tool: text('tool'),
440
- runId: text('run_id'),
441
- jobId: text('job_id'),
442
- externalEventId: text('external_event_id'),
443
- computeUnits: real('compute_units').notNull().default(0),
444
- costUsd: real('cost_usd').notNull().default(0),
445
- status: text('status').notNull().default('unknown'),
446
- metadataJson: text('metadata_json').notNull().default('{}'),
447
- occurredAt: text('occurred_at').notNull(),
448
- importedAt: text('imported_at').notNull(),
449
- },
450
- (table) => ({
451
- providerExternalEventUnique: uniqueIndex('control_harness_usage_provider_event_idx')
452
- .on(table.provider, table.externalEventId),
453
- }),
454
- );
455
-
456
- export const controlUsageImportState = sqliteTable('control_usage_import_state', {
457
- id: text('id').primaryKey(),
458
- provider: text('provider').notNull(),
459
- source: text('source').notNull(),
460
- cursor: text('cursor'),
461
- lastStartedAt: text('last_started_at'),
462
- lastSucceededAt: text('last_succeeded_at'),
463
- lastFailedAt: text('last_failed_at'),
464
- lastFailureMessage: text('last_failure_message'),
465
- lastSourceCount: integer('last_source_count').notNull().default(0),
466
- lastImportedCount: integer('last_imported_count').notNull().default(0),
467
- lastDuplicateCount: integer('last_duplicate_count').notNull().default(0),
468
- lastFailureCount: integer('last_failure_count').notNull().default(0),
469
- updatedAt: text('updated_at').notNull(),
470
- }, (table) => ({
471
- providerSourceIdx: uniqueIndex('control_usage_import_state_provider_source_idx')
472
- .on(table.provider, table.source),
473
- }));
474
-
475
- export const controlAuditLogs = sqliteTable('control_audit_logs', {
476
- id: text('id').primaryKey(),
477
- userId: text('user_id'),
478
- action: text('action').notNull(),
479
- resourceType: text('resource_type').notNull(),
480
- resourceId: text('resource_id'),
481
- metadataJson: text('metadata_json').notNull(),
482
- createdAt: text('created_at').notNull(),
483
- });
484
-
485
- export const harnessNotifyRegistrations = sqliteTable('harness_notify_registrations', {
486
- id: text('id').primaryKey(),
487
- agentId: text('agent_id').notNull(),
488
- hookToken: text('hook_token').notNull(),
489
- secret: text('secret').notNull(),
490
- callbackUrl: text('callback_url').notNull(),
491
- registeredAt: text('registered_at').notNull(),
492
- updatedAt: text('updated_at').notNull(),
493
- });
494
-
495
- export const harnessJobWatches = sqliteTable(
496
- 'harness_job_watches',
497
- {
498
- id: text('id').primaryKey(),
499
- jobId: text('job_id').notNull(),
500
- threadId: text('thread_id').notNull(),
501
- title: text('title'),
502
- status: text('status').notNull().default('pending'),
503
- lastJobStatus: text('last_job_status'),
504
- lastError: text('last_error'),
505
- createdAt: text('created_at').notNull(),
506
- updatedAt: text('updated_at').notNull(),
507
- deliveredAt: text('delivered_at'),
508
- },
509
- (table) => ({
510
- jobIdUnique: uniqueIndex('harness_job_watches_job_id_idx').on(table.jobId),
511
- }),
512
- );
@@ -22,6 +22,18 @@ afterEach(async () => {
22
22
  });
23
23
 
24
24
  describe('OpenCodeRuntimeAdapter', () => {
25
+ it('does not expose MCP toolbox affordances until the runtime supports MCP status', async () => {
26
+ const adapter = new OpenCodeRuntimeAdapter({
27
+ home: await tempHome(),
28
+ });
29
+
30
+ expect(adapter.capabilities.management.mcpStatus).toBe(false);
31
+ expect(adapter.managementSchema.toolboxItems.map((item) => item.command)).toEqual([
32
+ '/compact',
33
+ '/fork',
34
+ ]);
35
+ });
36
+
25
37
  it('keeps provider and variant in model selections', async () => {
26
38
  const sessionCreate = vi.fn(async () => ({
27
39
  id: 'session-1',
@@ -1179,7 +1191,7 @@ describe('OpenCodeRuntimeAdapter', () => {
1179
1191
  });
1180
1192
 
1181
1193
  await adapter.start();
1182
- expect(adapter.capabilities.controls.sandboxMode).toBe(true);
1194
+ expect(adapter.capabilities.controls.sandboxMode).toBe(false);
1183
1195
  await adapter.startSession({
1184
1196
  cwd: '/tmp/project',
1185
1197
  model: 'opencode/big-pickle',
@@ -151,7 +151,7 @@ const opencodeCapabilities: AgentProviderCapabilities = {
151
151
  controls: {
152
152
  planMode: true,
153
153
  permissionRequests: false,
154
- sandboxMode: true,
154
+ sandboxMode: false,
155
155
  performanceMode: false,
156
156
  goals: false,
157
157
  },
@@ -777,7 +777,6 @@ export class OpenCodeRuntimeAdapter extends EventEmitter implements AgentRuntime
777
777
  toolboxItems: [
778
778
  { action: 'compact', command: '/compact', label: 'Compact' },
779
779
  { action: 'fork', command: '/fork', label: 'Fork', panel: 'fork' },
780
- { action: 'mcp', command: '/mcp', label: 'MCP', panel: 'mcp' },
781
780
  ],
782
781
  hookCommandTemplates: [],
783
782
  providerConfigFormat: 'json',
@@ -19,6 +19,7 @@ export type ApiErrorCode =
19
19
  | 'unauthorized'
20
20
  | 'not_found'
21
21
  | 'conflict'
22
+ | 'confirmation_required'
22
23
  | 'provider_goal_error'
23
24
  | 'forbidden'
24
25
  | 'unauthorized'
@@ -310,7 +311,9 @@ export type AgentBackendToolboxActionDto =
310
311
  | 'fork'
311
312
  | 'skills'
312
313
  | 'mcp'
313
- | 'hooks';
314
+ | 'hooks'
315
+ | 'prompt'
316
+ | 'unsupported';
314
317
 
315
318
  export interface AgentBackendToolboxItemSchemaDto {
316
319
  action: AgentBackendToolboxActionDto;