@opengeni/api-router 0.22.2 → 0.26.1

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 (124) hide show
  1. package/dist/app.d.ts +2 -2
  2. package/dist/app.js +1 -1
  3. package/dist/auth/managed-auth.d.ts +0 -30
  4. package/dist/browser-controller-authority.d.ts +43 -0
  5. package/dist/browser-state-authority.d.ts +27 -0
  6. package/dist/{chunk-HWXJW5C7.js → chunk-JIKNR5YL.js} +27993 -14546
  7. package/dist/chunk-JIKNR5YL.js.map +1 -0
  8. package/dist/codemode.d.ts +23 -0
  9. package/dist/editable-artifact-live-hints.d.ts +11 -0
  10. package/dist/editable-artifact-native-kernel.d.ts +37 -0
  11. package/dist/editable-artifact-office-import.d.ts +22 -0
  12. package/dist/editable-artifact-production.d.ts +29 -0
  13. package/dist/editable-artifact-websocket.d.ts +49 -0
  14. package/dist/editable-artifact-workspace-files.d.ts +23 -0
  15. package/dist/github-browser-flow.d.ts +6 -0
  16. package/dist/http/cors.d.ts +1 -0
  17. package/dist/http/sse.d.ts +2 -0
  18. package/dist/index.d.ts +3 -2
  19. package/dist/index.js +1824 -30
  20. package/dist/index.js.map +1 -1
  21. package/dist/integrations/api-integrations.d.ts +24 -0
  22. package/dist/integrations/atlassian.d.ts +176 -0
  23. package/dist/integrations/github-skill-source.d.ts +5 -0
  24. package/dist/integrations/google-drive.d.ts +85 -0
  25. package/dist/integrations/oauth-client.d.ts +30 -1
  26. package/dist/integrations/provider-oauth.d.ts +19 -0
  27. package/dist/integrations/slack-bot.d.ts +4 -0
  28. package/dist/integrations/slack-interactions.d.ts +14 -2
  29. package/dist/integrations/social-api.d.ts +2 -1
  30. package/dist/mcp/editable-artifact-query-schema.d.ts +4 -0
  31. package/dist/mcp/editable-artifacts.d.ts +13 -0
  32. package/dist/mcp/receipts.d.ts +28 -0
  33. package/dist/mcp/scheduled-task-view.d.ts +518 -0
  34. package/dist/mcp/server.d.ts +14 -3
  35. package/dist/memory-slack-delivery.d.ts +9 -0
  36. package/dist/routes/api-integrations.d.ts +8 -0
  37. package/dist/routes/browser-identities.d.ts +5 -0
  38. package/dist/routes/browser-sessions.d.ts +6 -0
  39. package/dist/routes/company-profile.d.ts +3 -0
  40. package/dist/routes/computer-sessions.d.ts +6 -0
  41. package/dist/routes/editable-artifacts.d.ts +44 -0
  42. package/dist/routes/integration-features.d.ts +3 -0
  43. package/dist/routes/memory-slack-publications.d.ts +6 -0
  44. package/dist/routes/plugins.d.ts +8 -0
  45. package/dist/routes/sessions.d.ts +17 -2
  46. package/dist/routes/skills.d.ts +6 -0
  47. package/dist/routes/video-generation.d.ts +3 -0
  48. package/dist/sandbox/auth-callout.d.ts +2 -0
  49. package/dist/sandbox/channel-a.d.ts +59 -2
  50. package/dist/sandbox/metrics-ingestion.d.ts +6 -1
  51. package/dist/sandbox/viewer.d.ts +4 -2
  52. package/dist/temporal-schedule-cleanup.d.ts +26 -0
  53. package/package.json +19 -14
  54. package/src/app.ts +277 -41
  55. package/src/auth/managed-auth.ts +0 -16
  56. package/src/browser-controller-authority.ts +137 -0
  57. package/src/browser-state-authority.ts +236 -0
  58. package/src/codemode.ts +186 -0
  59. package/src/editable-artifact-live-hints.ts +64 -0
  60. package/src/editable-artifact-native-kernel.ts +659 -0
  61. package/src/editable-artifact-office-import.ts +230 -0
  62. package/src/editable-artifact-production.ts +419 -0
  63. package/src/editable-artifact-websocket.ts +311 -0
  64. package/src/editable-artifact-workspace-files.ts +186 -0
  65. package/src/github-browser-flow.ts +35 -6
  66. package/src/http/auth.ts +2 -0
  67. package/src/http/cors.ts +3 -0
  68. package/src/http/sse.ts +101 -6
  69. package/src/index.ts +147 -23
  70. package/src/integrations/api-integrations.ts +350 -0
  71. package/src/integrations/atlassian.ts +1621 -0
  72. package/src/integrations/github-skill-source.ts +142 -0
  73. package/src/integrations/google-drive.ts +1000 -64
  74. package/src/integrations/oauth-client.ts +159 -89
  75. package/src/integrations/provider-oauth.ts +777 -0
  76. package/src/integrations/slack-bot.ts +31 -2
  77. package/src/integrations/slack-interactions.ts +610 -42
  78. package/src/integrations/social-api.ts +11 -0
  79. package/src/mcp/documents.ts +74 -26
  80. package/src/mcp/editable-artifact-query-schema.ts +236 -0
  81. package/src/mcp/editable-artifacts.ts +448 -0
  82. package/src/mcp/receipts.ts +95 -0
  83. package/src/mcp/scheduled-task-view.ts +642 -0
  84. package/src/mcp/server.ts +1718 -310
  85. package/src/memory-slack-delivery.ts +209 -0
  86. package/src/observability.ts +3 -3
  87. package/src/routes/api-integrations.ts +407 -0
  88. package/src/routes/api-keys.ts +7 -1
  89. package/src/routes/browser-identities.ts +136 -0
  90. package/src/routes/browser-sessions.ts +2543 -0
  91. package/src/routes/codex.ts +7 -4
  92. package/src/routes/company-profile.ts +255 -0
  93. package/src/routes/computer-sessions.ts +1247 -0
  94. package/src/routes/connections.ts +358 -102
  95. package/src/routes/documents.ts +22 -3
  96. package/src/routes/editable-artifacts.ts +1159 -0
  97. package/src/routes/enrollments.ts +54 -12
  98. package/src/routes/environments.ts +60 -11
  99. package/src/routes/files.ts +277 -65
  100. package/src/routes/github.ts +18 -2
  101. package/src/routes/install.ts +38 -2
  102. package/src/routes/integration-features.ts +258 -0
  103. package/src/routes/machines.ts +1 -1
  104. package/src/routes/memory-slack-publications.ts +216 -0
  105. package/src/routes/packs.ts +437 -7
  106. package/src/routes/plugins.ts +751 -0
  107. package/src/routes/rigs.ts +77 -20
  108. package/src/routes/scheduled-tasks.ts +94 -42
  109. package/src/routes/sessions.ts +475 -234
  110. package/src/routes/skills.ts +174 -0
  111. package/src/routes/transcription-recordings.ts +65 -33
  112. package/src/routes/video-generation.ts +132 -0
  113. package/src/routes/workspaces.ts +46 -24
  114. package/src/sandbox/auth-callout.ts +16 -4
  115. package/src/sandbox/channel-a.ts +809 -85
  116. package/src/sandbox/enrollment.ts +13 -3
  117. package/src/sandbox/machines.ts +1 -1
  118. package/src/sandbox/metrics-ingestion.ts +121 -3
  119. package/src/sandbox/rematerialize.ts +35 -47
  120. package/src/sandbox/viewer.ts +58 -29
  121. package/src/temporal-schedule-cleanup.ts +135 -0
  122. package/dist/chunk-HWXJW5C7.js.map +0 -1
  123. package/dist/mcp/toolspace.d.ts +0 -62
  124. package/src/mcp/toolspace.ts +0 -1186
@@ -0,0 +1,518 @@
1
+ import type { ScheduledTask, ScheduledTaskScheduleSpec } from "@opengeni/contracts";
2
+ export declare const SCHEDULED_TASK_MCP_MAX_BYTES: number;
3
+ export declare const SCHEDULED_TASK_NAME_MAX_BYTES = 512;
4
+ export declare const SCHEDULED_TASK_PROMPT_MAX_BYTES: number;
5
+ export declare const SCHEDULED_TASK_SCHEDULE_FIELD_MAX_BYTES = 256;
6
+ type Utf8Projection = {
7
+ value: string;
8
+ originalBytes: number;
9
+ deliveredBytes: number;
10
+ truncated: boolean;
11
+ };
12
+ export type ScheduledTaskUtf8ProjectionFact = Omit<Utf8Projection, "value">;
13
+ type ScheduledTaskScheduleProjection = {
14
+ schedule: Extract<ScheduledTaskScheduleSpec, {
15
+ type: "manual";
16
+ }>;
17
+ projection: {
18
+ type: "manual";
19
+ truncated: false;
20
+ fields: Record<string, never>;
21
+ };
22
+ } | {
23
+ schedule: Extract<ScheduledTaskScheduleSpec, {
24
+ type: "once";
25
+ }>;
26
+ projection: {
27
+ type: "once";
28
+ truncated: boolean;
29
+ fields: {
30
+ runAt: ScheduledTaskUtf8ProjectionFact;
31
+ timeZone: ScheduledTaskUtf8ProjectionFact;
32
+ };
33
+ };
34
+ } | {
35
+ schedule: Extract<ScheduledTaskScheduleSpec, {
36
+ type: "interval";
37
+ }>;
38
+ projection: {
39
+ type: "interval";
40
+ truncated: boolean;
41
+ fields: {
42
+ startAt: ScheduledTaskUtf8ProjectionFact | null;
43
+ endAt: ScheduledTaskUtf8ProjectionFact | null;
44
+ };
45
+ };
46
+ } | {
47
+ schedule: Extract<ScheduledTaskScheduleSpec, {
48
+ type: "calendar";
49
+ }>;
50
+ projection: {
51
+ type: "calendar";
52
+ truncated: boolean;
53
+ fields: {
54
+ timeZone: ScheduledTaskUtf8ProjectionFact;
55
+ };
56
+ };
57
+ };
58
+ export declare function projectScheduledTaskUtf8(value: string, maxBytes: number): Utf8Projection;
59
+ export declare function projectScheduledTaskSchedule(schedule: ScheduledTaskScheduleSpec): ScheduledTaskScheduleProjection;
60
+ export declare function scheduledTaskMcpSummary(task: ScheduledTask): {
61
+ id: string;
62
+ name: string;
63
+ status: "active" | "paused";
64
+ schedule: {
65
+ type: "manual";
66
+ } | {
67
+ type: "once";
68
+ runAt: string;
69
+ timeZone: string;
70
+ } | {
71
+ type: "interval";
72
+ everySeconds: number;
73
+ startAt?: string | undefined;
74
+ endAt?: string | undefined;
75
+ } | {
76
+ type: "calendar";
77
+ timeZone: string;
78
+ hour: number;
79
+ minute: number;
80
+ daysOfWeek?: ("FRIDAY" | "MONDAY" | "SATURDAY" | "SUNDAY" | "THURSDAY" | "TUESDAY" | "WEDNESDAY")[] | undefined;
81
+ };
82
+ runMode: "existing_session" | "new_session_per_run" | "reusable_session";
83
+ overlapPolicy: "allow_concurrent" | "buffer_one" | "skip";
84
+ action: {
85
+ kind: "agent_turn";
86
+ sourceId?: never;
87
+ sourceGeneration?: never;
88
+ sourceLifecycleGeneration?: never;
89
+ destination?: never;
90
+ initiatingSubjectId?: never;
91
+ allDescendants?: never;
92
+ connection?: never;
93
+ limits?: never;
94
+ } | {
95
+ kind: "knowledge_source_sync";
96
+ sourceId: string;
97
+ sourceGeneration: number;
98
+ sourceLifecycleGeneration: number;
99
+ destination: {
100
+ kind: "organization";
101
+ workspaceId: null;
102
+ subjectId: null;
103
+ } | {
104
+ kind: "workspace";
105
+ workspaceId: string;
106
+ subjectId: null;
107
+ } | {
108
+ kind: "personal";
109
+ workspaceId: string | null;
110
+ subjectId: string;
111
+ };
112
+ initiatingSubjectId: string;
113
+ allDescendants: boolean;
114
+ connection: {
115
+ connectionId: string;
116
+ connectionVersion: number;
117
+ providerDomain: string;
118
+ kind: "api_key" | "app_install" | "delegated" | "oauth2";
119
+ ownerSubjectId: string;
120
+ };
121
+ limits: {
122
+ maxItems: number;
123
+ maxBytes: number;
124
+ maxFileBytes: number;
125
+ maxProviderRequests: number;
126
+ maxElapsedSeconds: number;
127
+ maxConcurrency: number;
128
+ maxFailureDetails: number;
129
+ };
130
+ };
131
+ targetSessionId: string | null;
132
+ reusableSessionId: string | null;
133
+ variableSetId: string | null;
134
+ rigId: string | null;
135
+ createdAt: string;
136
+ updatedAt: string;
137
+ configuration: {
138
+ model: string | null;
139
+ reasoningEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
140
+ sandboxBackend: "blaxel" | "cloudflare" | "daytona" | "docker" | "e2b" | "local" | "modal" | "none" | "runloop" | "selfhosted" | "vercel" | null;
141
+ hasGoal: boolean;
142
+ promptBytes: number;
143
+ resourceCount: number;
144
+ toolCount: number;
145
+ metadataKeyCount: number;
146
+ taskMetadataKeyCount: number;
147
+ };
148
+ projection: {
149
+ bounded: boolean;
150
+ name: ScheduledTaskUtf8ProjectionFact;
151
+ schedule: {
152
+ type: "manual";
153
+ truncated: false;
154
+ fields: Record<string, never>;
155
+ } | {
156
+ type: "once";
157
+ truncated: boolean;
158
+ fields: {
159
+ runAt: ScheduledTaskUtf8ProjectionFact;
160
+ timeZone: ScheduledTaskUtf8ProjectionFact;
161
+ };
162
+ } | {
163
+ type: "interval";
164
+ truncated: boolean;
165
+ fields: {
166
+ startAt: ScheduledTaskUtf8ProjectionFact | null;
167
+ endAt: ScheduledTaskUtf8ProjectionFact | null;
168
+ };
169
+ } | {
170
+ type: "calendar";
171
+ truncated: boolean;
172
+ fields: {
173
+ timeZone: ScheduledTaskUtf8ProjectionFact;
174
+ };
175
+ };
176
+ model: ScheduledTaskUtf8ProjectionFact | null;
177
+ createdAt: ScheduledTaskUtf8ProjectionFact;
178
+ updatedAt: ScheduledTaskUtf8ProjectionFact;
179
+ bytes: number;
180
+ maxBytes: number;
181
+ };
182
+ };
183
+ export declare function boundScheduledTaskDetailMcp(task: ScheduledTask): {
184
+ id: string;
185
+ name: string;
186
+ status: "active" | "paused";
187
+ schedule: {
188
+ type: "manual";
189
+ } | {
190
+ type: "once";
191
+ runAt: string;
192
+ timeZone: string;
193
+ } | {
194
+ type: "interval";
195
+ everySeconds: number;
196
+ startAt?: string | undefined;
197
+ endAt?: string | undefined;
198
+ } | {
199
+ type: "calendar";
200
+ timeZone: string;
201
+ hour: number;
202
+ minute: number;
203
+ daysOfWeek?: ("FRIDAY" | "MONDAY" | "SATURDAY" | "SUNDAY" | "THURSDAY" | "TUESDAY" | "WEDNESDAY")[] | undefined;
204
+ };
205
+ runMode: "existing_session" | "new_session_per_run" | "reusable_session";
206
+ overlapPolicy: "allow_concurrent" | "buffer_one" | "skip";
207
+ action: {
208
+ kind: "agent_turn";
209
+ sourceId?: never;
210
+ sourceGeneration?: never;
211
+ sourceLifecycleGeneration?: never;
212
+ destination?: never;
213
+ initiatingSubjectId?: never;
214
+ allDescendants?: never;
215
+ connection?: never;
216
+ limits?: never;
217
+ } | {
218
+ kind: "knowledge_source_sync";
219
+ sourceId: string;
220
+ sourceGeneration: number;
221
+ sourceLifecycleGeneration: number;
222
+ destination: {
223
+ kind: "organization";
224
+ workspaceId: null;
225
+ subjectId: null;
226
+ } | {
227
+ kind: "workspace";
228
+ workspaceId: string;
229
+ subjectId: null;
230
+ } | {
231
+ kind: "personal";
232
+ workspaceId: string | null;
233
+ subjectId: string;
234
+ };
235
+ initiatingSubjectId: string;
236
+ allDescendants: boolean;
237
+ connection: {
238
+ connectionId: string;
239
+ connectionVersion: number;
240
+ providerDomain: string;
241
+ kind: "api_key" | "app_install" | "delegated" | "oauth2";
242
+ ownerSubjectId: string;
243
+ };
244
+ limits: {
245
+ maxItems: number;
246
+ maxBytes: number;
247
+ maxFileBytes: number;
248
+ maxProviderRequests: number;
249
+ maxElapsedSeconds: number;
250
+ maxConcurrency: number;
251
+ maxFailureDetails: number;
252
+ };
253
+ };
254
+ targetSessionId: string | null;
255
+ reusableSessionId: string | null;
256
+ variableSetId: string | null;
257
+ rigId: string | null;
258
+ createdAt: string;
259
+ updatedAt: string;
260
+ configuration: {
261
+ model: string | null;
262
+ reasoningEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
263
+ sandboxBackend: "blaxel" | "cloudflare" | "daytona" | "docker" | "e2b" | "local" | "modal" | "none" | "runloop" | "selfhosted" | "vercel" | null;
264
+ hasGoal: boolean;
265
+ promptBytes: number;
266
+ resourceCount: number;
267
+ toolCount: number;
268
+ metadataKeyCount: number;
269
+ taskMetadataKeyCount: number;
270
+ };
271
+ projection: {
272
+ bounded: boolean;
273
+ name: ScheduledTaskUtf8ProjectionFact;
274
+ schedule: {
275
+ type: "manual";
276
+ truncated: false;
277
+ fields: Record<string, never>;
278
+ } | {
279
+ type: "once";
280
+ truncated: boolean;
281
+ fields: {
282
+ runAt: ScheduledTaskUtf8ProjectionFact;
283
+ timeZone: ScheduledTaskUtf8ProjectionFact;
284
+ };
285
+ } | {
286
+ type: "interval";
287
+ truncated: boolean;
288
+ fields: {
289
+ startAt: ScheduledTaskUtf8ProjectionFact | null;
290
+ endAt: ScheduledTaskUtf8ProjectionFact | null;
291
+ };
292
+ } | {
293
+ type: "calendar";
294
+ truncated: boolean;
295
+ fields: {
296
+ timeZone: ScheduledTaskUtf8ProjectionFact;
297
+ };
298
+ };
299
+ model: ScheduledTaskUtf8ProjectionFact | null;
300
+ createdAt: ScheduledTaskUtf8ProjectionFact;
301
+ updatedAt: ScheduledTaskUtf8ProjectionFact;
302
+ bytes: number;
303
+ maxBytes: number;
304
+ };
305
+ entity: {
306
+ agentConfig: {
307
+ prompt: string;
308
+ resources: Record<string, unknown>[];
309
+ tools: Record<string, unknown>[];
310
+ metadataKeys: string[];
311
+ model: string | null;
312
+ reasoningEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
313
+ sandboxBackend: "blaxel" | "cloudflare" | "daytona" | "docker" | "e2b" | "local" | "modal" | "none" | "runloop" | "selfhosted" | "vercel" | null;
314
+ goal: {
315
+ text: string;
316
+ successCriteria: string | null;
317
+ maxAutoContinuations: number | null;
318
+ } | null;
319
+ };
320
+ taskMetadataKeys: string[];
321
+ };
322
+ detailProjection: {
323
+ bounded: boolean;
324
+ fullEntityAvailableViaRest: boolean;
325
+ reducedForBytes: boolean;
326
+ terminal: boolean;
327
+ prompt: ScheduledTaskUtf8ProjectionFact;
328
+ goalText: ScheduledTaskUtf8ProjectionFact | null;
329
+ goalSuccessCriteria: ScheduledTaskUtf8ProjectionFact | null;
330
+ resources: {
331
+ originalCount: number;
332
+ deliveredCount: number;
333
+ originalBytes: number;
334
+ truncatedIdentityFieldCount: number;
335
+ };
336
+ tools: {
337
+ originalCount: number;
338
+ deliveredCount: number;
339
+ originalBytes: number;
340
+ truncatedIdentityFieldCount: number;
341
+ };
342
+ metadata: {
343
+ originalKeyCount: number;
344
+ deliveredKeyCount: number;
345
+ originalBytes: number;
346
+ truncatedKeyCount: number;
347
+ valuesIncluded: boolean;
348
+ };
349
+ taskMetadata: {
350
+ originalKeyCount: number;
351
+ deliveredKeyCount: number;
352
+ originalBytes: number;
353
+ truncatedKeyCount: number;
354
+ valuesIncluded: boolean;
355
+ };
356
+ bytes: number;
357
+ maxBytes: number;
358
+ };
359
+ };
360
+ export declare function boundScheduledTaskMcpPage(input: {
361
+ tasks: ScheduledTask[];
362
+ limit: number;
363
+ offset: number;
364
+ sourceHasMore: boolean;
365
+ maxBytes?: number;
366
+ }): {
367
+ tasks: {
368
+ id: string;
369
+ name: string;
370
+ status: "active" | "paused";
371
+ schedule: {
372
+ type: "manual";
373
+ } | {
374
+ type: "once";
375
+ runAt: string;
376
+ timeZone: string;
377
+ } | {
378
+ type: "interval";
379
+ everySeconds: number;
380
+ startAt?: string | undefined;
381
+ endAt?: string | undefined;
382
+ } | {
383
+ type: "calendar";
384
+ timeZone: string;
385
+ hour: number;
386
+ minute: number;
387
+ daysOfWeek?: ("FRIDAY" | "MONDAY" | "SATURDAY" | "SUNDAY" | "THURSDAY" | "TUESDAY" | "WEDNESDAY")[] | undefined;
388
+ };
389
+ runMode: "existing_session" | "new_session_per_run" | "reusable_session";
390
+ overlapPolicy: "allow_concurrent" | "buffer_one" | "skip";
391
+ action: {
392
+ kind: "agent_turn";
393
+ sourceId?: never;
394
+ sourceGeneration?: never;
395
+ sourceLifecycleGeneration?: never;
396
+ destination?: never;
397
+ initiatingSubjectId?: never;
398
+ allDescendants?: never;
399
+ connection?: never;
400
+ limits?: never;
401
+ } | {
402
+ kind: "knowledge_source_sync";
403
+ sourceId: string;
404
+ sourceGeneration: number;
405
+ sourceLifecycleGeneration: number;
406
+ destination: {
407
+ kind: "organization";
408
+ workspaceId: null;
409
+ subjectId: null;
410
+ } | {
411
+ kind: "workspace";
412
+ workspaceId: string;
413
+ subjectId: null;
414
+ } | {
415
+ kind: "personal";
416
+ workspaceId: string | null;
417
+ subjectId: string;
418
+ };
419
+ initiatingSubjectId: string;
420
+ allDescendants: boolean;
421
+ connection: {
422
+ connectionId: string;
423
+ connectionVersion: number;
424
+ providerDomain: string;
425
+ kind: "api_key" | "app_install" | "delegated" | "oauth2";
426
+ ownerSubjectId: string;
427
+ };
428
+ limits: {
429
+ maxItems: number;
430
+ maxBytes: number;
431
+ maxFileBytes: number;
432
+ maxProviderRequests: number;
433
+ maxElapsedSeconds: number;
434
+ maxConcurrency: number;
435
+ maxFailureDetails: number;
436
+ };
437
+ };
438
+ targetSessionId: string | null;
439
+ reusableSessionId: string | null;
440
+ variableSetId: string | null;
441
+ rigId: string | null;
442
+ createdAt: string;
443
+ updatedAt: string;
444
+ configuration: {
445
+ model: string | null;
446
+ reasoningEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
447
+ sandboxBackend: "blaxel" | "cloudflare" | "daytona" | "docker" | "e2b" | "local" | "modal" | "none" | "runloop" | "selfhosted" | "vercel" | null;
448
+ hasGoal: boolean;
449
+ promptBytes: number;
450
+ resourceCount: number;
451
+ toolCount: number;
452
+ metadataKeyCount: number;
453
+ taskMetadataKeyCount: number;
454
+ };
455
+ projection: {
456
+ bounded: boolean;
457
+ name: ScheduledTaskUtf8ProjectionFact;
458
+ schedule: {
459
+ type: "manual";
460
+ truncated: false;
461
+ fields: Record<string, never>;
462
+ } | {
463
+ type: "once";
464
+ truncated: boolean;
465
+ fields: {
466
+ runAt: ScheduledTaskUtf8ProjectionFact;
467
+ timeZone: ScheduledTaskUtf8ProjectionFact;
468
+ };
469
+ } | {
470
+ type: "interval";
471
+ truncated: boolean;
472
+ fields: {
473
+ startAt: ScheduledTaskUtf8ProjectionFact | null;
474
+ endAt: ScheduledTaskUtf8ProjectionFact | null;
475
+ };
476
+ } | {
477
+ type: "calendar";
478
+ truncated: boolean;
479
+ fields: {
480
+ timeZone: ScheduledTaskUtf8ProjectionFact;
481
+ };
482
+ };
483
+ model: ScheduledTaskUtf8ProjectionFact | null;
484
+ createdAt: ScheduledTaskUtf8ProjectionFact;
485
+ updatedAt: ScheduledTaskUtf8ProjectionFact;
486
+ bytes: number;
487
+ maxBytes: number;
488
+ };
489
+ }[];
490
+ page: {
491
+ limit: number;
492
+ offset: number;
493
+ hasMore: boolean;
494
+ nextOffset: number | null;
495
+ };
496
+ projection: {
497
+ bounded: boolean;
498
+ rowsDroppedForBytes: boolean;
499
+ droppedRowCount: number;
500
+ droppedRows: {
501
+ id: string;
502
+ nextAction: {
503
+ tool: string;
504
+ arguments: {
505
+ id: string;
506
+ includeEntity: boolean;
507
+ };
508
+ };
509
+ }[];
510
+ sourceRowsConsumed: number;
511
+ rowsReturned: number;
512
+ terminal: boolean;
513
+ reason?: string;
514
+ bytes: number;
515
+ maxBytes: number;
516
+ };
517
+ };
518
+ export {};
@@ -1,11 +1,9 @@
1
- import { type AccessGrant } from "@opengeni/contracts";
1
+ import { type AccessGrant, type SessionAuthorizationActor } from "@opengeni/contracts";
2
2
  import { listSessionDiscoverySummaries, type SessionDiscoveryCursor, type SessionDiscoveryOrderBy } from "@opengeni/db";
3
3
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
4
  import type { ApiRouteDeps } from "@opengeni/core";
5
- import type { ToolspaceMcpSurface } from "./toolspace";
6
5
  export type McpServerOptions = {
7
6
  requestOrigin?: string | null;
8
- toolspace?: ToolspaceMcpSurface | null;
9
7
  workspaceMemoryEnabled?: boolean | undefined;
10
8
  };
11
9
  export declare function buildOpenGeniMcpServer(deps: ApiRouteDeps, grant: AccessGrant, options?: McpServerOptions): McpServer;
@@ -33,6 +31,19 @@ export declare function isHumanDirectedTurn(turn: {
33
31
  * identified machine child-notification caller is refused).
34
32
  */
35
33
  export declare function assertGoalReactivationAllowed(deps: ApiRouteDeps, workspaceId: string, sessionId: string, callerTurnId: string | null): Promise<void>;
34
+ export declare function memorySlackPublicationActor(actor: Extract<SessionAuthorizationActor, {
35
+ kind: "agent_attempt";
36
+ }>, sessionId: string, fallbackOwnerLabel: string | null): {
37
+ actor: {
38
+ kind: "human" | "service";
39
+ subjectId: string;
40
+ initiatingHumanSubjectId: string | null;
41
+ sessionId: string;
42
+ turnId: string;
43
+ attemptId: string;
44
+ };
45
+ ownerLabel: string | null;
46
+ };
36
47
  export declare function encodeSessionDiscoveryCursor(cursor: SessionDiscoveryCursor): string;
37
48
  export declare function decodeSessionDiscoveryCursor(value: string): SessionDiscoveryCursor;
38
49
  export declare function capSessionDiscoveryPage(page: Awaited<ReturnType<typeof listSessionDiscoverySummaries>>, includeLastMessage: boolean): {
@@ -0,0 +1,9 @@
1
+ import { type ClaimedMemorySlackPublication } from "@opengeni/db";
2
+ import { type ApiRouteDeps } from "@opengeni/core";
3
+ export declare function drainMemorySlackPublicationsOnce(deps: ApiRouteDeps): Promise<boolean>;
4
+ export declare function startMemorySlackPublicationPump(deps: ApiRouteDeps, options?: {
5
+ intervalMs?: number;
6
+ maxPerTick?: number;
7
+ }): () => Promise<void>;
8
+ export declare function formatMemorySlackPublicationMessage(deps: Pick<ApiRouteDeps, "settings">, publication: ClaimedMemorySlackPublication): string;
9
+ export declare function memorySlackDestinationDrift(error: unknown): boolean;
@@ -0,0 +1,8 @@
1
+ import { type ApiRouteDeps } from "@opengeni/core";
2
+ import type { FetchLike } from "@opengeni/network";
3
+ import type { Hono } from "hono";
4
+ export type ApiIntegrationRouteOverrides = Readonly<{
5
+ fetchImpl?: FetchLike;
6
+ }>;
7
+ export declare function apiIntegrationRequiresConnection(authScheme: Record<string, unknown>): boolean;
8
+ export declare function registerApiIntegrationRoutes(app: Hono, deps: ApiRouteDeps, overrides?: ApiIntegrationRouteOverrides): void;
@@ -0,0 +1,5 @@
1
+ import { type ApiRouteDeps } from "@opengeni/core";
2
+ import type { Hono } from "hono";
3
+ import { HTTPException } from "hono/http-exception";
4
+ export declare function registerBrowserIdentityRoutes(app: Hono, deps: ApiRouteDeps): void;
5
+ export declare function browserIdentityRouteError(error: unknown): HTTPException;
@@ -0,0 +1,6 @@
1
+ import { InteractionActor, type AccessGrant } from "@opengeni/contracts";
2
+ import { type ApiRouteDeps } from "@opengeni/core";
3
+ import type { Hono } from "hono";
4
+ export declare function registerBrowserSessionRoutes(app: Hono, deps: ApiRouteDeps): void;
5
+ export declare function validateBrowserRequestOrigin(value: string | undefined, allowedPattern: string): string | null;
6
+ export declare function interactionActorForGrant(grant: AccessGrant): ReturnType<typeof InteractionActor.parse>;
@@ -0,0 +1,3 @@
1
+ import { type ApiRouteDeps } from "@opengeni/core";
2
+ import type { Hono } from "hono";
3
+ export declare function registerCompanyProfileRoutes(app: Hono, deps: ApiRouteDeps): void;
@@ -0,0 +1,6 @@
1
+ import { type ApiRouteDeps } from "@opengeni/core";
2
+ import type { Hono } from "hono";
3
+ /** Public ComputerSession resource surface. Physical app/window authority stays
4
+ * in the same placement controller used by BrowserSession; this route owns only
5
+ * durable authorization, placement fencing, lifecycle receipts, and routing. */
6
+ export declare function registerComputerSessionRoutes(app: Hono, deps: ApiRouteDeps): void;
@@ -0,0 +1,44 @@
1
+ import type { AccessGrant } from "@opengeni/contracts";
2
+ import { type AccessDeps, type EditableArtifactActor, type EditableArtifactApplicationPort, type EditableArtifactDurableExportService, type EditableArtifactOfficeImportPort, type EditableArtifactModality } from "@opengeni/core";
3
+ import type { Hono } from "hono";
4
+ export declare const EDITABLE_ARTIFACT_HTTP_REQUEST_MAX_BYTES: number;
5
+ export declare const EDITABLE_ARTIFACT_EXPORT_REQUEST_MAX_BYTES: number;
6
+ export declare const EDITABLE_ARTIFACT_LIVE_TICKET_REQUEST_MAX_BYTES: number;
7
+ export type EditableArtifactRouteScope = Readonly<{
8
+ accountId: string;
9
+ workspaceId: string;
10
+ }>;
11
+ export type EditableArtifactRouteActor = EditableArtifactActor;
12
+ /**
13
+ * Authenticated transport context. Until a distinct editable-artifact
14
+ * capability is introduced, the existing workspace `artifacts:read` and
15
+ * `artifacts:publish` capabilities intentionally gate read and write here too;
16
+ * the application still performs the durable per-artifact authorization.
17
+ */
18
+ export type EditableArtifactRouteAuthority = Readonly<{
19
+ scope: EditableArtifactRouteScope;
20
+ actor: EditableArtifactRouteActor;
21
+ }>;
22
+ export type MintEditableArtifactLiveTicketOutput = Readonly<{
23
+ artifactId: string;
24
+ modality: EditableArtifactModality;
25
+ replicaId: string;
26
+ token: string;
27
+ expiresAt: string;
28
+ protocolVersion: number;
29
+ }>;
30
+ export type EditableArtifactRouteDependencies = AccessDeps & Readonly<{
31
+ editableArtifacts?: EditableArtifactApplicationPort;
32
+ editableArtifactExports?: EditableArtifactDurableExportService;
33
+ editableArtifactOfficeImports?: EditableArtifactOfficeImportPort;
34
+ /** Test/embedding seam; returned ids are still authorized one by one. */
35
+ editableArtifactSessionArtifactIds?: (scope: EditableArtifactRouteScope, sourceSessionId: string, limit: number) => Promise<readonly string[]>;
36
+ }>;
37
+ export type EditableArtifactApplicationErrorCode = "not_found" | "forbidden" | "conflict" | "unsupported_protocol" | "limit_exceeded" | "unavailable";
38
+ /** A bounded, deliberate failure emitted by the injected application boundary. */
39
+ export declare class EditableArtifactApplicationError extends Error {
40
+ readonly code: EditableArtifactApplicationErrorCode;
41
+ constructor(code: EditableArtifactApplicationErrorCode);
42
+ }
43
+ export declare function registerEditableArtifactRoutes(app: Hono, deps: EditableArtifactRouteDependencies): void;
44
+ export declare function editableArtifactActorForGrant(grant: AccessGrant, rawReplicaId: string): EditableArtifactRouteActor;
@@ -0,0 +1,3 @@
1
+ import { type ApiRouteDeps } from "@opengeni/core";
2
+ import type { Hono } from "hono";
3
+ export declare function registerIntegrationFeatureRoutes(app: Hono, deps: ApiRouteDeps): void;
@@ -0,0 +1,6 @@
1
+ import { type MemorySlackPublication as MemorySlackPublicationRecord } from "@opengeni/contracts";
2
+ import { type ApiRouteDeps } from "@opengeni/core";
3
+ import type { Hono } from "hono";
4
+ export declare function registerMemorySlackPublicationRoutes(app: Hono, deps: ApiRouteDeps): void;
5
+ /** Defensively protects legacy rows without rewriting their durable projection. */
6
+ export declare function sanitizeMemorySlackPublicationHistory(publication: MemorySlackPublicationRecord): MemorySlackPublicationRecord;
@@ -0,0 +1,8 @@
1
+ import { type ApiRouteDeps, type GitHubSkillSourceClient } from "@opengeni/core";
2
+ import type { FetchLike } from "@opengeni/network";
3
+ import type { Hono } from "hono";
4
+ export type PluginRouteOverrides = Readonly<{
5
+ fetchImpl?: FetchLike;
6
+ github?: GitHubSkillSourceClient;
7
+ }>;
8
+ export declare function registerPluginRoutes(app: Hono, deps: ApiRouteDeps, overrides?: PluginRouteOverrides): void;