@lakitu/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +166 -0
  2. package/convex/_generated/api.d.ts +45 -0
  3. package/convex/_generated/api.js +23 -0
  4. package/convex/_generated/dataModel.d.ts +58 -0
  5. package/convex/_generated/server.d.ts +143 -0
  6. package/convex/_generated/server.js +93 -0
  7. package/convex/cloud/CLAUDE.md +238 -0
  8. package/convex/cloud/_generated/api.ts +84 -0
  9. package/convex/cloud/_generated/component.ts +861 -0
  10. package/convex/cloud/_generated/dataModel.ts +60 -0
  11. package/convex/cloud/_generated/server.ts +156 -0
  12. package/convex/cloud/convex.config.ts +16 -0
  13. package/convex/cloud/index.ts +29 -0
  14. package/convex/cloud/intentSchema/generate.ts +447 -0
  15. package/convex/cloud/intentSchema/index.ts +16 -0
  16. package/convex/cloud/intentSchema/types.ts +418 -0
  17. package/convex/cloud/ksaPolicy.ts +554 -0
  18. package/convex/cloud/mail.ts +92 -0
  19. package/convex/cloud/schema.ts +322 -0
  20. package/convex/cloud/utils/kanbanContext.ts +229 -0
  21. package/convex/cloud/workflows/agentBoard.ts +451 -0
  22. package/convex/cloud/workflows/agentPrompt.ts +272 -0
  23. package/convex/cloud/workflows/agentThread.ts +374 -0
  24. package/convex/cloud/workflows/compileSandbox.ts +146 -0
  25. package/convex/cloud/workflows/crudBoard.ts +217 -0
  26. package/convex/cloud/workflows/crudKSAs.ts +262 -0
  27. package/convex/cloud/workflows/crudLorobeads.ts +371 -0
  28. package/convex/cloud/workflows/crudSkills.ts +205 -0
  29. package/convex/cloud/workflows/crudThreads.ts +708 -0
  30. package/convex/cloud/workflows/lifecycleSandbox.ts +1396 -0
  31. package/convex/cloud/workflows/sandboxConvex.ts +1046 -0
  32. package/convex/sandbox/README.md +90 -0
  33. package/convex/sandbox/_generated/api.d.ts +2934 -0
  34. package/convex/sandbox/_generated/api.js +23 -0
  35. package/convex/sandbox/_generated/dataModel.d.ts +60 -0
  36. package/convex/sandbox/_generated/server.d.ts +143 -0
  37. package/convex/sandbox/_generated/server.js +93 -0
  38. package/convex/sandbox/actions/bash.ts +130 -0
  39. package/convex/sandbox/actions/browser.ts +282 -0
  40. package/convex/sandbox/actions/file.ts +336 -0
  41. package/convex/sandbox/actions/lsp.ts +325 -0
  42. package/convex/sandbox/actions/pdf.ts +119 -0
  43. package/convex/sandbox/agent/codeExecLoop.ts +535 -0
  44. package/convex/sandbox/agent/decisions.ts +284 -0
  45. package/convex/sandbox/agent/index.ts +515 -0
  46. package/convex/sandbox/agent/subagents.ts +651 -0
  47. package/convex/sandbox/brandResearch/index.ts +417 -0
  48. package/convex/sandbox/context/index.ts +7 -0
  49. package/convex/sandbox/context/session.ts +402 -0
  50. package/convex/sandbox/convex.config.ts +17 -0
  51. package/convex/sandbox/index.ts +51 -0
  52. package/convex/sandbox/nodeActions/codeExec.ts +130 -0
  53. package/convex/sandbox/planning/beads.ts +187 -0
  54. package/convex/sandbox/planning/index.ts +8 -0
  55. package/convex/sandbox/planning/sync.ts +194 -0
  56. package/convex/sandbox/prompts/codeExec.ts +852 -0
  57. package/convex/sandbox/prompts/modes.ts +231 -0
  58. package/convex/sandbox/prompts/system.ts +142 -0
  59. package/convex/sandbox/schema.ts +510 -0
  60. package/convex/sandbox/state/artifacts.ts +99 -0
  61. package/convex/sandbox/state/checkpoints.ts +341 -0
  62. package/convex/sandbox/state/files.ts +383 -0
  63. package/convex/sandbox/state/index.ts +10 -0
  64. package/convex/sandbox/state/verification.actions.ts +268 -0
  65. package/convex/sandbox/state/verification.ts +101 -0
  66. package/convex/sandbox/tsconfig.json +25 -0
  67. package/convex/sandbox/utils/codeExecHelpers.ts +52 -0
  68. package/dist/cli/commands/build.d.ts +19 -0
  69. package/dist/cli/commands/build.d.ts.map +1 -0
  70. package/dist/cli/commands/build.js +223 -0
  71. package/dist/cli/commands/init.d.ts +16 -0
  72. package/dist/cli/commands/init.d.ts.map +1 -0
  73. package/dist/cli/commands/init.js +148 -0
  74. package/dist/cli/commands/publish.d.ts +12 -0
  75. package/dist/cli/commands/publish.d.ts.map +1 -0
  76. package/dist/cli/commands/publish.js +33 -0
  77. package/dist/cli/index.d.ts +14 -0
  78. package/dist/cli/index.d.ts.map +1 -0
  79. package/dist/cli/index.js +40 -0
  80. package/dist/sdk/builders.d.ts +104 -0
  81. package/dist/sdk/builders.d.ts.map +1 -0
  82. package/dist/sdk/builders.js +214 -0
  83. package/dist/sdk/index.d.ts +29 -0
  84. package/dist/sdk/index.d.ts.map +1 -0
  85. package/dist/sdk/index.js +38 -0
  86. package/dist/sdk/types.d.ts +107 -0
  87. package/dist/sdk/types.d.ts.map +1 -0
  88. package/dist/sdk/types.js +6 -0
  89. package/ksa/README.md +263 -0
  90. package/ksa/_generated/REFERENCE.md +2954 -0
  91. package/ksa/_generated/registry.ts +257 -0
  92. package/ksa/_shared/configReader.ts +302 -0
  93. package/ksa/_shared/configSchemas.ts +649 -0
  94. package/ksa/_shared/gateway.ts +175 -0
  95. package/ksa/_shared/ksaBehaviors.ts +411 -0
  96. package/ksa/_shared/ksaProxy.ts +248 -0
  97. package/ksa/_shared/localDb.ts +302 -0
  98. package/ksa/index.ts +134 -0
  99. package/package.json +93 -0
  100. package/runtime/browser/agent-browser.ts +330 -0
  101. package/runtime/entrypoint.ts +194 -0
  102. package/runtime/lsp/manager.ts +366 -0
  103. package/runtime/pdf/pdf-generator.ts +50 -0
  104. package/runtime/pdf/renderer.ts +357 -0
  105. package/runtime/pdf/schema.ts +97 -0
  106. package/runtime/services/file-watcher.ts +191 -0
  107. package/template/build.ts +307 -0
  108. package/template/e2b/Dockerfile +69 -0
  109. package/template/e2b/e2b.toml +13 -0
  110. package/template/e2b/prebuild.sh +68 -0
  111. package/template/e2b/start.sh +14 -0
@@ -0,0 +1,861 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated `ComponentApi` utility.
4
+ *
5
+ * THIS CODE IS AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+
11
+ import type { FunctionReference } from "convex/server";
12
+
13
+ /**
14
+ * A utility for referencing a Convex component's exposed API.
15
+ *
16
+ * Useful when expecting a parameter like `components.myComponent`.
17
+ * Usage:
18
+ * ```ts
19
+ * async function myFunction(ctx: QueryCtx, component: ComponentApi) {
20
+ * return ctx.runQuery(component.someFile.someQuery, { ...args });
21
+ * }
22
+ * ```
23
+ */
24
+ export type ComponentApi<Name extends string | undefined = string | undefined> =
25
+ {
26
+ mail: {
27
+ inbox: FunctionReference<
28
+ "action",
29
+ "internal",
30
+ { limit?: number; recipientId?: string },
31
+ any,
32
+ Name
33
+ >;
34
+ markRead: FunctionReference<
35
+ "mutation",
36
+ "internal",
37
+ { mailId: string },
38
+ any,
39
+ Name
40
+ >;
41
+ send: FunctionReference<
42
+ "action",
43
+ "internal",
44
+ {
45
+ messageType: string;
46
+ payload: any;
47
+ recipientId: string;
48
+ ttlMs?: number;
49
+ },
50
+ any,
51
+ Name
52
+ >;
53
+ };
54
+ workflows: {
55
+ agentBoard: {
56
+ startCardExecution: FunctionReference<
57
+ "action",
58
+ "internal",
59
+ { boardId: string; cardId: string; runId: string; taskId: string },
60
+ any,
61
+ Name
62
+ >;
63
+ stopCardExecution: FunctionReference<
64
+ "action",
65
+ "internal",
66
+ { cardId: string },
67
+ any,
68
+ Name
69
+ >;
70
+ };
71
+ agentPrompt: {
72
+ executeBoardPlan: FunctionReference<
73
+ "action",
74
+ "internal",
75
+ {
76
+ plan: {
77
+ description: string;
78
+ stages: Array<{
79
+ description: string;
80
+ name: string;
81
+ order: number;
82
+ skillId?: string;
83
+ type: "agent" | "human";
84
+ }>;
85
+ title: string;
86
+ };
87
+ workspaceId: string;
88
+ },
89
+ any,
90
+ Name
91
+ >;
92
+ generateBoardPlan: FunctionReference<
93
+ "action",
94
+ "internal",
95
+ { userPrompt: string; workspaceId: string },
96
+ any,
97
+ Name
98
+ >;
99
+ runPrompt: FunctionReference<
100
+ "action",
101
+ "internal",
102
+ {
103
+ model?: string;
104
+ projectId: string;
105
+ prompt: string;
106
+ systemPrompt?: string;
107
+ tools?: Array<string>;
108
+ },
109
+ any,
110
+ Name
111
+ >;
112
+ runResearch: FunctionReference<
113
+ "action",
114
+ "internal",
115
+ { depth?: "quick" | "thorough"; projectId: string; query: string },
116
+ any,
117
+ Name
118
+ >;
119
+ };
120
+ agentThread: {
121
+ continueThread: FunctionReference<
122
+ "action",
123
+ "internal",
124
+ { content: string; threadId: string; userId: string },
125
+ any,
126
+ Name
127
+ >;
128
+ getThreadWithMessages: FunctionReference<
129
+ "query",
130
+ "internal",
131
+ { threadId: string; userId: string },
132
+ any,
133
+ Name
134
+ >;
135
+ listRecentThreads: FunctionReference<
136
+ "query",
137
+ "internal",
138
+ { limit?: number; userId: string },
139
+ any,
140
+ Name
141
+ >;
142
+ sendMessage: FunctionReference<
143
+ "action",
144
+ "internal",
145
+ {
146
+ content: string;
147
+ sandboxConfig?: {
148
+ gatewayUrl: string;
149
+ preCreatedSandbox: {
150
+ deletedKSAs: Array<string>;
151
+ fromPool: boolean;
152
+ sandboxId: string;
153
+ sandboxUrl: string;
154
+ timings: any;
155
+ };
156
+ sandboxJwt: string;
157
+ };
158
+ skillIds?: Array<string>;
159
+ threadId: string;
160
+ userId: string;
161
+ },
162
+ any,
163
+ Name
164
+ >;
165
+ startThread: FunctionReference<
166
+ "action",
167
+ "internal",
168
+ {
169
+ boardId?: string;
170
+ content: string;
171
+ orgId?: string;
172
+ sandboxConfig?: {
173
+ gatewayUrl: string;
174
+ preCreatedSandbox: {
175
+ deletedKSAs: Array<string>;
176
+ fromPool: boolean;
177
+ sandboxId: string;
178
+ sandboxUrl: string;
179
+ timings: any;
180
+ };
181
+ sandboxJwt: string;
182
+ };
183
+ skillIds?: Array<string>;
184
+ title?: string;
185
+ userId: string;
186
+ },
187
+ any,
188
+ Name
189
+ >;
190
+ };
191
+ compileSandbox: {
192
+ getAgents: FunctionReference<"query", "internal", {}, any, Name>;
193
+ getBuiltInDeliverables: FunctionReference<
194
+ "query",
195
+ "internal",
196
+ {},
197
+ any,
198
+ Name
199
+ >;
200
+ getBuiltInSkills: FunctionReference<"query", "internal", {}, any, Name>;
201
+ getBuiltInTools: FunctionReference<"query", "internal", {}, any, Name>;
202
+ getLatestVersion: FunctionReference<"query", "internal", {}, any, Name>;
203
+ getManifest: FunctionReference<
204
+ "query",
205
+ "internal",
206
+ { version?: string },
207
+ any,
208
+ Name
209
+ >;
210
+ getToolImplementation: FunctionReference<
211
+ "query",
212
+ "internal",
213
+ { toolId: string },
214
+ any,
215
+ Name
216
+ >;
217
+ listCustomTools: FunctionReference<"query", "internal", {}, any, Name>;
218
+ };
219
+ crudBoard: {
220
+ executePlan: FunctionReference<
221
+ "action",
222
+ "internal",
223
+ {
224
+ plan: {
225
+ description: string;
226
+ stages: Array<{
227
+ description: string;
228
+ name: string;
229
+ order: number;
230
+ skillId?: string;
231
+ type: "agent" | "human";
232
+ }>;
233
+ title: string;
234
+ };
235
+ workspaceId: string;
236
+ },
237
+ any,
238
+ Name
239
+ >;
240
+ generatePlan: FunctionReference<
241
+ "action",
242
+ "internal",
243
+ { useOpenCode?: boolean; userPrompt: string; workspaceId: string },
244
+ any,
245
+ Name
246
+ >;
247
+ };
248
+ crudKSAs: {
249
+ get: FunctionReference<
250
+ "query",
251
+ "internal",
252
+ { name: string },
253
+ any,
254
+ Name
255
+ >;
256
+ getAllConfigSchemas: FunctionReference<
257
+ "query",
258
+ "internal",
259
+ {},
260
+ any,
261
+ Name
262
+ >;
263
+ getByNames: FunctionReference<
264
+ "query",
265
+ "internal",
266
+ { names: Array<string> },
267
+ any,
268
+ Name
269
+ >;
270
+ getCategories: FunctionReference<"query", "internal", {}, any, Name>;
271
+ getCoreKSANames: FunctionReference<"query", "internal", {}, any, Name>;
272
+ getDefaultKSASet: FunctionReference<
273
+ "query",
274
+ "internal",
275
+ {
276
+ purpose: "research" | "content" | "automation" | "minimal" | "all";
277
+ },
278
+ any,
279
+ Name
280
+ >;
281
+ getGroups: FunctionReference<"query", "internal", {}, any, Name>;
282
+ getKSAConfigSchema: FunctionReference<
283
+ "query",
284
+ "internal",
285
+ { name: string },
286
+ any,
287
+ Name
288
+ >;
289
+ getKSADefaults: FunctionReference<
290
+ "query",
291
+ "internal",
292
+ { name: string },
293
+ any,
294
+ Name
295
+ >;
296
+ getMergedConfig: FunctionReference<
297
+ "query",
298
+ "internal",
299
+ { name: string; userConfig: any },
300
+ any,
301
+ Name
302
+ >;
303
+ list: FunctionReference<
304
+ "query",
305
+ "internal",
306
+ { category?: "core" | "skills" | "deliverables" },
307
+ any,
308
+ Name
309
+ >;
310
+ listByGroup: FunctionReference<
311
+ "query",
312
+ "internal",
313
+ { group: "research" },
314
+ any,
315
+ Name
316
+ >;
317
+ listForLibrary: FunctionReference<"query", "internal", {}, any, Name>;
318
+ listGrouped: FunctionReference<"query", "internal", {}, any, Name>;
319
+ search: FunctionReference<
320
+ "query",
321
+ "internal",
322
+ { keyword: string },
323
+ any,
324
+ Name
325
+ >;
326
+ };
327
+ crudLorobeads: {
328
+ compact: FunctionReference<
329
+ "action",
330
+ "internal",
331
+ { cardId: string },
332
+ any,
333
+ Name
334
+ >;
335
+ getCardIssues: FunctionReference<
336
+ "query",
337
+ "internal",
338
+ { cardId: string },
339
+ any,
340
+ Name
341
+ >;
342
+ getFullState: FunctionReference<
343
+ "query",
344
+ "internal",
345
+ { cardId: string },
346
+ any,
347
+ Name
348
+ >;
349
+ getLatestSnapshot: FunctionReference<
350
+ "query",
351
+ "internal",
352
+ { cardId: string },
353
+ any,
354
+ Name
355
+ >;
356
+ getLatestUpdateTime: FunctionReference<
357
+ "query",
358
+ "internal",
359
+ { cardId: string },
360
+ any,
361
+ Name
362
+ >;
363
+ getRunSnapshot: FunctionReference<
364
+ "query",
365
+ "internal",
366
+ { runId: string },
367
+ any,
368
+ Name
369
+ >;
370
+ getSnapshotById: FunctionReference<
371
+ "query",
372
+ "internal",
373
+ { id: string },
374
+ any,
375
+ Name
376
+ >;
377
+ getUpdates: FunctionReference<
378
+ "query",
379
+ "internal",
380
+ { cardId: string; limit?: number; since: number },
381
+ any,
382
+ Name
383
+ >;
384
+ listSnapshots: FunctionReference<
385
+ "query",
386
+ "internal",
387
+ { cardId: string; limit?: number },
388
+ any,
389
+ Name
390
+ >;
391
+ pushUpdate: FunctionReference<
392
+ "mutation",
393
+ "internal",
394
+ { cardId: string; clientId: string; updateBytes: ArrayBuffer },
395
+ any,
396
+ Name
397
+ >;
398
+ saveSnapshot: FunctionReference<
399
+ "action",
400
+ "internal",
401
+ {
402
+ beadsStateJson?: string;
403
+ cardId: string;
404
+ loroSnapshot: ArrayBuffer;
405
+ runId?: string;
406
+ vfsManifest?: Array<{
407
+ path: string;
408
+ r2Key: string;
409
+ size: number;
410
+ type: string;
411
+ }>;
412
+ },
413
+ any,
414
+ Name
415
+ >;
416
+ syncIssue: FunctionReference<
417
+ "mutation",
418
+ "internal",
419
+ {
420
+ beadsId: string;
421
+ blocks?: Array<string>;
422
+ cardId: string;
423
+ metadata?: any;
424
+ parent?: string;
425
+ status: string;
426
+ title: string;
427
+ type: string;
428
+ },
429
+ any,
430
+ Name
431
+ >;
432
+ };
433
+ crudSkills: {
434
+ create: FunctionReference<
435
+ "mutation",
436
+ "internal",
437
+ {
438
+ orgId?: string;
439
+ skill: {
440
+ category: string;
441
+ configSchema?: any;
442
+ defaults?: any;
443
+ description: string;
444
+ icon: string;
445
+ name: string;
446
+ prompt?: string;
447
+ skillId: string;
448
+ toolIds: Array<string>;
449
+ };
450
+ userId?: string;
451
+ },
452
+ any,
453
+ Name
454
+ >;
455
+ get: FunctionReference<
456
+ "query",
457
+ "internal",
458
+ { skillId: string },
459
+ any,
460
+ Name
461
+ >;
462
+ getByIds: FunctionReference<
463
+ "query",
464
+ "internal",
465
+ { skillIds: Array<string> },
466
+ any,
467
+ Name
468
+ >;
469
+ list: FunctionReference<
470
+ "query",
471
+ "internal",
472
+ {
473
+ category?: string;
474
+ includeBuiltIn?: boolean;
475
+ orgId?: string;
476
+ userId?: string;
477
+ },
478
+ any,
479
+ Name
480
+ >;
481
+ listCategories: FunctionReference<"query", "internal", any, any, Name>;
482
+ remove: FunctionReference<
483
+ "mutation",
484
+ "internal",
485
+ { skillId: string },
486
+ any,
487
+ Name
488
+ >;
489
+ resyncBuiltIns: FunctionReference<
490
+ "mutation",
491
+ "internal",
492
+ any,
493
+ any,
494
+ Name
495
+ >;
496
+ update: FunctionReference<
497
+ "mutation",
498
+ "internal",
499
+ {
500
+ skillId: string;
501
+ updates: {
502
+ category?: string;
503
+ configSchema?: any;
504
+ defaults?: any;
505
+ description?: string;
506
+ icon?: string;
507
+ name?: string;
508
+ prompt?: string;
509
+ toolIds?: Array<string>;
510
+ };
511
+ },
512
+ any,
513
+ Name
514
+ >;
515
+ };
516
+ crudThreads: {
517
+ clearConversation: FunctionReference<
518
+ "mutation",
519
+ "internal",
520
+ { projectId: string },
521
+ any,
522
+ Name
523
+ >;
524
+ createThread: FunctionReference<
525
+ "mutation",
526
+ "internal",
527
+ {
528
+ boardId?: string;
529
+ orgId?: string;
530
+ title?: string;
531
+ userId: string;
532
+ workspaceId?: string;
533
+ },
534
+ any,
535
+ Name
536
+ >;
537
+ deleteThread: FunctionReference<
538
+ "mutation",
539
+ "internal",
540
+ { threadId: string; userId: string },
541
+ any,
542
+ Name
543
+ >;
544
+ getConversation: FunctionReference<
545
+ "query",
546
+ "internal",
547
+ { projectId: string },
548
+ any,
549
+ Name
550
+ >;
551
+ getThreadArtifact: FunctionReference<
552
+ "query",
553
+ "internal",
554
+ { artifactId: string },
555
+ any,
556
+ Name
557
+ >;
558
+ getThreadMessages: FunctionReference<
559
+ "query",
560
+ "internal",
561
+ { threadId: string; userId: string },
562
+ any,
563
+ Name
564
+ >;
565
+ listThreadArtifacts: FunctionReference<
566
+ "query",
567
+ "internal",
568
+ { threadId: string; userId: string },
569
+ any,
570
+ Name
571
+ >;
572
+ listThreads: FunctionReference<
573
+ "query",
574
+ "internal",
575
+ {
576
+ boardId?: string;
577
+ orgId?: string;
578
+ userId: string;
579
+ workspaceId?: string;
580
+ },
581
+ any,
582
+ Name
583
+ >;
584
+ listWorkspaceThreads: FunctionReference<
585
+ "query",
586
+ "internal",
587
+ { userId: string; workspaceId: string },
588
+ any,
589
+ Name
590
+ >;
591
+ saveConversationMessage: FunctionReference<
592
+ "mutation",
593
+ "internal",
594
+ {
595
+ content: string;
596
+ metadata?: any;
597
+ projectId: string;
598
+ role: "user" | "assistant";
599
+ },
600
+ any,
601
+ Name
602
+ >;
603
+ sendThreadMessage: FunctionReference<
604
+ "mutation",
605
+ "internal",
606
+ {
607
+ content: string;
608
+ metadata?: {
609
+ data?: any;
610
+ generationTime?: number;
611
+ sessionLogs?: any;
612
+ thinking?: any;
613
+ type?:
614
+ | "text"
615
+ | "subagent"
616
+ | "board_execution"
617
+ | "frame_preview"
618
+ | "artifact"
619
+ | "session_logs";
620
+ };
621
+ role: "user" | "assistant";
622
+ threadId: string;
623
+ userId: string;
624
+ },
625
+ any,
626
+ Name
627
+ >;
628
+ };
629
+ lifecycleSandbox: {
630
+ appendSessionLogs: FunctionReference<
631
+ "mutation",
632
+ "internal",
633
+ { logs: Array<string>; sessionId: string },
634
+ any,
635
+ Name
636
+ >;
637
+ cancelSession: FunctionReference<
638
+ "action",
639
+ "internal",
640
+ { sessionId: string },
641
+ any,
642
+ Name
643
+ >;
644
+ cancelSessionMutation: FunctionReference<
645
+ "mutation",
646
+ "internal",
647
+ { sessionId: string },
648
+ any,
649
+ Name
650
+ >;
651
+ completeFromForwarder: FunctionReference<
652
+ "mutation",
653
+ "internal",
654
+ {
655
+ messagesCount: number;
656
+ output: string;
657
+ sandboxId: string;
658
+ sessionId: string;
659
+ todos: Array<any>;
660
+ toolCalls: Array<{ name: string; status?: string }>;
661
+ },
662
+ any,
663
+ Name
664
+ >;
665
+ completeSandbox: FunctionReference<
666
+ "mutation",
667
+ "internal",
668
+ {
669
+ artifacts?: Array<any>;
670
+ diffs?: Array<any>;
671
+ error?: string;
672
+ output: string;
673
+ sessionId: string;
674
+ todos?: Array<any>;
675
+ toolCalls?: Array<any>;
676
+ },
677
+ any,
678
+ Name
679
+ >;
680
+ create: FunctionReference<
681
+ "mutation",
682
+ "internal",
683
+ { config?: any; projectId: string; secret?: string },
684
+ any,
685
+ Name
686
+ >;
687
+ createSession: FunctionReference<
688
+ "mutation",
689
+ "internal",
690
+ { config?: any; projectId: string; secret?: string },
691
+ any,
692
+ Name
693
+ >;
694
+ get: FunctionReference<
695
+ "query",
696
+ "internal",
697
+ { sessionId: string },
698
+ any,
699
+ Name
700
+ >;
701
+ getActiveSessionForCard: FunctionReference<
702
+ "query",
703
+ "internal",
704
+ { cardId: string },
705
+ any,
706
+ Name
707
+ >;
708
+ getSession: FunctionReference<
709
+ "query",
710
+ "internal",
711
+ { sessionId: string },
712
+ any,
713
+ Name
714
+ >;
715
+ getSessionDetails: FunctionReference<
716
+ "query",
717
+ "internal",
718
+ { sessionId: string },
719
+ any,
720
+ Name
721
+ >;
722
+ getSessionMetrics: FunctionReference<
723
+ "query",
724
+ "internal",
725
+ { sessionId: string },
726
+ any,
727
+ Name
728
+ >;
729
+ listSessions: FunctionReference<
730
+ "query",
731
+ "internal",
732
+ { limit?: number; projectId: string },
733
+ any,
734
+ Name
735
+ >;
736
+ spawnSandbox: FunctionReference<
737
+ "action",
738
+ "internal",
739
+ {
740
+ boardId?: string;
741
+ cardId?: string;
742
+ deliverables?: Array<any>;
743
+ fallbackModels?: Array<string>;
744
+ maxTokens?: number;
745
+ model?: string;
746
+ projectId: string;
747
+ prompt: string;
748
+ runId?: string;
749
+ sessionId: string;
750
+ systemPrompt?: string;
751
+ tools?: Array<string>;
752
+ useOpenCode?: boolean;
753
+ },
754
+ any,
755
+ Name
756
+ >;
757
+ startSession: FunctionReference<
758
+ "action",
759
+ "internal",
760
+ { config?: any; projectId: string; prompt: string },
761
+ any,
762
+ Name
763
+ >;
764
+ updateSessionStatus: FunctionReference<
765
+ "mutation",
766
+ "internal",
767
+ {
768
+ error?: string;
769
+ output?: any;
770
+ sandboxId?: string;
771
+ sessionId: string;
772
+ status:
773
+ | "pending"
774
+ | "running"
775
+ | "completed"
776
+ | "failed"
777
+ | "cancelled";
778
+ },
779
+ any,
780
+ Name
781
+ >;
782
+ };
783
+ sandboxConvex: {
784
+ appendLogs: FunctionReference<
785
+ "mutation",
786
+ "internal",
787
+ {
788
+ logs: Array<
789
+ | string
790
+ | {
791
+ details?: string;
792
+ icon?: string;
793
+ label: string;
794
+ status?: string;
795
+ type: string;
796
+ }
797
+ >;
798
+ sessionId: string;
799
+ },
800
+ any,
801
+ Name
802
+ >;
803
+ cancelSession: FunctionReference<
804
+ "action",
805
+ "internal",
806
+ { sessionId: string },
807
+ any,
808
+ Name
809
+ >;
810
+ createSession: FunctionReference<
811
+ "mutation",
812
+ "internal",
813
+ { config?: any; projectId: string; prompt: string },
814
+ any,
815
+ Name
816
+ >;
817
+ getActiveSessionForCard: FunctionReference<
818
+ "query",
819
+ "internal",
820
+ { cardId: string },
821
+ any,
822
+ Name
823
+ >;
824
+ getActiveSessionForThread: FunctionReference<
825
+ "query",
826
+ "internal",
827
+ { threadId: string },
828
+ any,
829
+ Name
830
+ >;
831
+ getSession: FunctionReference<
832
+ "query",
833
+ "internal",
834
+ { sessionId: string },
835
+ any,
836
+ Name
837
+ >;
838
+ getSessionWithLogs: FunctionReference<
839
+ "query",
840
+ "internal",
841
+ { sessionId: string },
842
+ any,
843
+ Name
844
+ >;
845
+ listSessions: FunctionReference<
846
+ "query",
847
+ "internal",
848
+ { limit?: number; projectId: string },
849
+ any,
850
+ Name
851
+ >;
852
+ startSession: FunctionReference<
853
+ "action",
854
+ "internal",
855
+ { config?: any; projectId: string; prompt: string },
856
+ any,
857
+ Name
858
+ >;
859
+ };
860
+ };
861
+ };