@vantageos/agent-engine 0.3.0-alpha.0 → 0.4.0-alpha.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.
@@ -1,50 +1,4 @@
1
1
  declare const _default: import("convex/server").SchemaDefinition<{
2
- durableJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
- workflowId?: string | undefined;
4
- lastError?: string | undefined;
5
- abandonedAtStep?: number | undefined;
6
- orgId: string;
7
- stepFunctionHandle: string;
8
- totalSteps: number;
9
- maxAttemptsPerStep: number;
10
- cursor: number;
11
- status: "running" | "completed" | "abandoned" | "cancelled";
12
- workflowVersion: string;
13
- createdAt: number;
14
- updatedAt: number;
15
- kind: string;
16
- }, {
17
- orgId: import("convex/values").VString<string, "required">;
18
- kind: import("convex/values").VString<string, "required">;
19
- stepFunctionHandle: import("convex/values").VString<string, "required">;
20
- totalSteps: import("convex/values").VFloat64<number, "required">;
21
- maxAttemptsPerStep: import("convex/values").VFloat64<number, "required">;
22
- cursor: import("convex/values").VFloat64<number, "required">;
23
- status: import("convex/values").VUnion<"running" | "completed" | "abandoned" | "cancelled", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"abandoned", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
24
- workflowId: import("convex/values").VString<string | undefined, "optional">;
25
- workflowVersion: import("convex/values").VString<string, "required">;
26
- lastError: import("convex/values").VString<string | undefined, "optional">;
27
- abandonedAtStep: import("convex/values").VFloat64<number | undefined, "optional">;
28
- createdAt: import("convex/values").VFloat64<number, "required">;
29
- updatedAt: import("convex/values").VFloat64<number, "required">;
30
- }, "required", "orgId" | "stepFunctionHandle" | "totalSteps" | "maxAttemptsPerStep" | "cursor" | "status" | "workflowId" | "workflowVersion" | "lastError" | "abandonedAtStep" | "createdAt" | "updatedAt" | "kind">, {
31
- by_org: ["orgId", "_creationTime"];
32
- by_org_status: ["orgId", "status", "_creationTime"];
33
- }, {}, {}>;
34
- callerStepInvocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
35
- orgId: string;
36
- createdAt: number;
37
- jobId: import("convex/values").GenericId<"durableJobs">;
38
- stepIndex: number;
39
- }, {
40
- orgId: import("convex/values").VString<string, "required">;
41
- jobId: import("convex/values").VId<import("convex/values").GenericId<"durableJobs">, "required">;
42
- stepIndex: import("convex/values").VFloat64<number, "required">;
43
- createdAt: import("convex/values").VFloat64<number, "required">;
44
- }, "required", "orgId" | "createdAt" | "jobId" | "stepIndex">, {
45
- by_org: ["orgId", "_creationTime"];
46
- by_org_job: ["orgId", "jobId", "_creationTime"];
47
- }, {}, {}>;
48
2
  agents: import("convex/server").TableDefinition<import("convex/values").VObject<{
49
3
  description?: string | undefined;
50
4
  reasoningEffort?: "none" | "low" | "medium" | "high" | undefined;
@@ -53,12 +7,12 @@ declare const _default: import("convex/server").SchemaDefinition<{
53
7
  maxInputTokensPerSession?: number | false | undefined;
54
8
  name: string;
55
9
  orgId: string;
56
- status: "draft" | "live" | "archived";
57
- createdAt: number;
58
- updatedAt: number;
59
10
  instructions: string;
60
11
  model: string;
12
+ status: "draft" | "live" | "archived";
61
13
  createdBy: string;
14
+ createdAt: number;
15
+ updatedAt: number;
62
16
  }, {
63
17
  orgId: import("convex/values").VString<string, "required">;
64
18
  name: import("convex/values").VString<string, "required">;
@@ -73,7 +27,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
73
27
  createdBy: import("convex/values").VString<string, "required">;
74
28
  createdAt: import("convex/values").VFloat64<number, "required">;
75
29
  updatedAt: import("convex/values").VFloat64<number, "required">;
76
- }, "required", "description" | "name" | "orgId" | "status" | "createdAt" | "updatedAt" | "instructions" | "model" | "reasoningEffort" | "modelProvider" | "maxSubagents" | "maxInputTokensPerSession" | "createdBy">, {
30
+ }, "required", "description" | "name" | "orgId" | "instructions" | "model" | "reasoningEffort" | "modelProvider" | "maxSubagents" | "maxInputTokensPerSession" | "status" | "createdBy" | "createdAt" | "updatedAt">, {
77
31
  by_org: ["orgId", "_creationTime"];
78
32
  by_org_status: ["orgId", "status", "_creationTime"];
79
33
  }, {}, {}>;
@@ -96,70 +50,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
96
50
  by_org_agent: ["orgId", "agentId", "_creationTime"];
97
51
  by_org_agent_tool: ["orgId", "agentId", "toolName", "_creationTime"];
98
52
  }, {}, {}>;
99
- sessions: import("convex/server").TableDefinition<import("convex/values").VObject<{
100
- workflowId?: string | undefined;
101
- workflowVersion?: string | undefined;
102
- orgId: string;
103
- status: "running" | "completed" | "cancelled";
104
- createdAt: number;
105
- updatedAt: number;
106
- createdBy: string;
107
- agentId: import("convex/values").GenericId<"agents">;
108
- }, {
109
- orgId: import("convex/values").VString<string, "required">;
110
- agentId: import("convex/values").VId<import("convex/values").GenericId<"agents">, "required">;
111
- status: import("convex/values").VUnion<"running" | "completed" | "cancelled", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
112
- createdBy: import("convex/values").VString<string, "required">;
113
- workflowId: import("convex/values").VString<string | undefined, "optional">;
114
- workflowVersion: import("convex/values").VString<string | undefined, "optional">;
115
- createdAt: import("convex/values").VFloat64<number, "required">;
116
- updatedAt: import("convex/values").VFloat64<number, "required">;
117
- }, "required", "orgId" | "status" | "workflowId" | "workflowVersion" | "createdAt" | "updatedAt" | "createdBy" | "agentId">, {
118
- by_org: ["orgId", "_creationTime"];
119
- by_org_agent: ["orgId", "agentId", "_creationTime"];
120
- }, {}, {}>;
121
- sessionEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
122
- payload?: string | undefined;
123
- name: "session.started" | "turn.started" | "turn.reasoning" | "turn.toolCall.requested" | "turn.toolCall.completed" | "turn.toolCall.denied" | "turn.completed" | "tool.approval.requested" | "tool.approval.resolved" | "sandbox.timeout";
124
- orgId: string;
125
- createdAt: number;
126
- sessionId: import("convex/values").GenericId<"sessions">;
127
- }, {
128
- orgId: import("convex/values").VString<string, "required">;
129
- sessionId: import("convex/values").VId<import("convex/values").GenericId<"sessions">, "required">;
130
- name: import("convex/values").VUnion<"session.started" | "turn.started" | "turn.reasoning" | "turn.toolCall.requested" | "turn.toolCall.completed" | "turn.toolCall.denied" | "turn.completed" | "tool.approval.requested" | "tool.approval.resolved" | "sandbox.timeout", [import("convex/values").VLiteral<"session.started", "required">, import("convex/values").VLiteral<"turn.started", "required">, import("convex/values").VLiteral<"turn.reasoning", "required">, import("convex/values").VLiteral<"turn.toolCall.requested", "required">, import("convex/values").VLiteral<"turn.toolCall.completed", "required">, import("convex/values").VLiteral<"turn.toolCall.denied", "required">, import("convex/values").VLiteral<"turn.completed", "required">, import("convex/values").VLiteral<"tool.approval.requested", "required">, import("convex/values").VLiteral<"tool.approval.resolved", "required">, import("convex/values").VLiteral<"sandbox.timeout", "required">], "required", never>;
131
- payload: import("convex/values").VString<string | undefined, "optional">;
132
- createdAt: import("convex/values").VFloat64<number, "required">;
133
- }, "required", "name" | "orgId" | "createdAt" | "sessionId" | "payload">, {
134
- by_org: ["orgId", "_creationTime"];
135
- by_org_session: ["orgId", "sessionId", "_creationTime"];
136
- }, {}, {}>;
137
- awaitEventTimeouts: import("convex/server").TableDefinition<import("convex/values").VObject<{
138
- sessionId?: import("convex/values").GenericId<"sessions"> | undefined;
139
- runId?: string | undefined;
140
- scheduledFunctionId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
141
- firedAt?: number | undefined;
142
- cancelledAt?: number | undefined;
143
- orgId: string;
144
- awaitedEventName: string;
145
- deadlineAt: number;
146
- }, {
147
- orgId: import("convex/values").VString<string, "required">;
148
- runId: import("convex/values").VString<string | undefined, "optional">;
149
- sessionId: import("convex/values").VId<import("convex/values").GenericId<"sessions"> | undefined, "optional">;
150
- awaitedEventName: import("convex/values").VString<string, "required">;
151
- deadlineAt: import("convex/values").VFloat64<number, "required">;
152
- scheduledFunctionId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
153
- firedAt: import("convex/values").VFloat64<number | undefined, "optional">;
154
- cancelledAt: import("convex/values").VFloat64<number | undefined, "optional">;
155
- }, "required", "orgId" | "sessionId" | "runId" | "awaitedEventName" | "deadlineAt" | "scheduledFunctionId" | "firedAt" | "cancelledAt">, {
156
- by_org: ["orgId", "_creationTime"];
157
- by_org_session: ["orgId", "sessionId", "_creationTime"];
158
- by_org_run: ["orgId", "runId", "_creationTime"];
159
- }, {}, {}>;
160
53
  wakeupDemoResults: import("convex/server").TableDefinition<import("convex/values").VObject<{
161
54
  wokenAt?: number | undefined;
162
- observedStatus?: "completed" | "cancelled" | "failed" | undefined;
55
+ observedStatus?: "completed" | "failed" | "cancelled" | undefined;
163
56
  observedResultSummary?: string | undefined;
164
57
  orgId: string;
165
58
  enqueuedAt: number;
@@ -167,7 +60,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
167
60
  orgId: import("convex/values").VString<string, "required">;
168
61
  enqueuedAt: import("convex/values").VFloat64<number, "required">;
169
62
  wokenAt: import("convex/values").VFloat64<number | undefined, "optional">;
170
- observedStatus: import("convex/values").VUnion<"completed" | "cancelled" | "failed" | undefined, [import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "optional", never>;
63
+ observedStatus: import("convex/values").VUnion<"completed" | "failed" | "cancelled" | undefined, [import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "optional", never>;
171
64
  observedResultSummary: import("convex/values").VString<string | undefined, "optional">;
172
65
  }, "required", "orgId" | "enqueuedAt" | "wokenAt" | "observedStatus" | "observedResultSummary">, {
173
66
  by_org: ["orgId", "_creationTime"];
@@ -177,11 +70,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
177
70
  orgId: string;
178
71
  createdAt: number;
179
72
  updatedAt: number;
180
- kind: "token bucket" | "fixed window";
181
73
  agentId: import("convex/values").GenericId<"agents">;
182
74
  scope: string;
183
75
  rate: number;
184
76
  period: number;
77
+ kind: "token bucket" | "fixed window";
185
78
  }, {
186
79
  orgId: import("convex/values").VString<string, "required">;
187
80
  agentId: import("convex/values").VId<import("convex/values").GenericId<"agents">, "required">;
@@ -192,7 +85,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
192
85
  capacity: import("convex/values").VFloat64<number | undefined, "optional">;
193
86
  createdAt: import("convex/values").VFloat64<number, "required">;
194
87
  updatedAt: import("convex/values").VFloat64<number, "required">;
195
- }, "required", "orgId" | "createdAt" | "updatedAt" | "kind" | "agentId" | "scope" | "rate" | "period" | "capacity">, {
88
+ }, "required", "orgId" | "createdAt" | "updatedAt" | "agentId" | "scope" | "rate" | "period" | "capacity" | "kind">, {
196
89
  by_org: ["orgId", "_creationTime"];
197
90
  by_org_agent: ["orgId", "agentId", "_creationTime"];
198
91
  by_org_agent_scope: ["orgId", "agentId", "scope", "_creationTime"];
@@ -252,9 +145,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
252
145
  resultSummary?: string | undefined;
253
146
  orgId: string;
254
147
  status: "completed" | "failed" | "pending" | "timedOut";
255
- workflowId: string;
256
148
  createdAt: number;
257
149
  updatedAt: number;
150
+ workflowId: string;
258
151
  awaitedEventName: string;
259
152
  sandboxId: string;
260
153
  }, {
@@ -266,7 +159,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
266
159
  resultSummary: import("convex/values").VString<string | undefined, "optional">;
267
160
  createdAt: import("convex/values").VFloat64<number, "required">;
268
161
  updatedAt: import("convex/values").VFloat64<number, "required">;
269
- }, "required", "orgId" | "status" | "workflowId" | "createdAt" | "updatedAt" | "awaitedEventName" | "sandboxId" | "resultSummary">, {
162
+ }, "required", "orgId" | "status" | "createdAt" | "updatedAt" | "workflowId" | "awaitedEventName" | "sandboxId" | "resultSummary">, {
270
163
  by_org: ["orgId", "_creationTime"];
271
164
  by_org_workflow: ["orgId", "workflowId", "_creationTime"];
272
165
  by_org_sandbox: ["orgId", "sandboxId", "_creationTime"];
@@ -328,11 +221,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
328
221
  delegationRuns: import("convex/server").TableDefinition<import("convex/values").VObject<{
329
222
  resultSummary?: string | undefined;
330
223
  orgId: string;
331
- status: "completed" | "cancelled" | "failed" | "pending";
332
- workflowId: string;
224
+ status: "completed" | "failed" | "cancelled" | "pending";
333
225
  createdAt: number;
334
226
  updatedAt: number;
335
227
  toolName: string;
228
+ workflowId: string;
336
229
  awaitedEventName: string;
337
230
  parentAgentId: import("convex/values").GenericId<"agents">;
338
231
  childAgentId: import("convex/values").GenericId<"agents">;
@@ -343,11 +236,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
343
236
  toolName: import("convex/values").VString<string, "required">;
344
237
  workflowId: import("convex/values").VString<string, "required">;
345
238
  awaitedEventName: import("convex/values").VString<string, "required">;
346
- status: import("convex/values").VUnion<"completed" | "cancelled" | "failed" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
239
+ status: import("convex/values").VUnion<"completed" | "failed" | "cancelled" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
347
240
  resultSummary: import("convex/values").VString<string | undefined, "optional">;
348
241
  createdAt: import("convex/values").VFloat64<number, "required">;
349
242
  updatedAt: import("convex/values").VFloat64<number, "required">;
350
- }, "required", "orgId" | "status" | "workflowId" | "createdAt" | "updatedAt" | "toolName" | "awaitedEventName" | "resultSummary" | "parentAgentId" | "childAgentId">, {
243
+ }, "required", "orgId" | "status" | "createdAt" | "updatedAt" | "toolName" | "workflowId" | "awaitedEventName" | "resultSummary" | "parentAgentId" | "childAgentId">, {
351
244
  by_org: ["orgId", "_creationTime"];
352
245
  by_org_parent: ["orgId", "parentAgentId", "_creationTime"];
353
246
  by_org_workflow: ["orgId", "workflowId", "_creationTime"];
@@ -356,22 +249,22 @@ declare const _default: import("convex/server").SchemaDefinition<{
356
249
  agentCloneRuns: import("convex/server").TableDefinition<import("convex/values").VObject<{
357
250
  resultSummary?: string | undefined;
358
251
  orgId: string;
359
- status: "completed" | "cancelled" | "failed" | "pending";
360
- workflowId: string;
252
+ status: "completed" | "failed" | "cancelled" | "pending";
361
253
  createdAt: number;
362
254
  updatedAt: number;
363
255
  agentId: import("convex/values").GenericId<"agents">;
256
+ workflowId: string;
364
257
  awaitedEventName: string;
365
258
  }, {
366
259
  orgId: import("convex/values").VString<string, "required">;
367
260
  agentId: import("convex/values").VId<import("convex/values").GenericId<"agents">, "required">;
368
261
  workflowId: import("convex/values").VString<string, "required">;
369
262
  awaitedEventName: import("convex/values").VString<string, "required">;
370
- status: import("convex/values").VUnion<"completed" | "cancelled" | "failed" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
263
+ status: import("convex/values").VUnion<"completed" | "failed" | "cancelled" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
371
264
  resultSummary: import("convex/values").VString<string | undefined, "optional">;
372
265
  createdAt: import("convex/values").VFloat64<number, "required">;
373
266
  updatedAt: import("convex/values").VFloat64<number, "required">;
374
- }, "required", "orgId" | "status" | "workflowId" | "createdAt" | "updatedAt" | "agentId" | "awaitedEventName" | "resultSummary">, {
267
+ }, "required", "orgId" | "status" | "createdAt" | "updatedAt" | "agentId" | "workflowId" | "awaitedEventName" | "resultSummary">, {
375
268
  by_org: ["orgId", "_creationTime"];
376
269
  by_org_agent: ["orgId", "agentId", "_creationTime"];
377
270
  }, {}, {}>;
@@ -444,9 +337,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
444
337
  resultSummary?: string | undefined;
445
338
  orgId: string;
446
339
  status: "pending" | "denied" | "authorized";
447
- workflowId: string;
448
340
  createdAt: number;
449
341
  updatedAt: number;
342
+ workflowId: string;
450
343
  awaitedEventName: string;
451
344
  connectionId: import("convex/values").GenericId<"connections">;
452
345
  url: string;
@@ -463,7 +356,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
463
356
  createdAt: import("convex/values").VFloat64<number, "required">;
464
357
  updatedAt: import("convex/values").VFloat64<number, "required">;
465
358
  resolvedAt: import("convex/values").VFloat64<number | undefined, "optional">;
466
- }, "required", "orgId" | "status" | "workflowId" | "createdAt" | "updatedAt" | "awaitedEventName" | "resolvedAt" | "resultSummary" | "connectionId" | "url" | "userCode">, {
359
+ }, "required", "orgId" | "status" | "createdAt" | "updatedAt" | "resolvedAt" | "workflowId" | "awaitedEventName" | "resultSummary" | "connectionId" | "url" | "userCode">, {
467
360
  by_org: ["orgId", "_creationTime"];
468
361
  by_org_connection: ["orgId", "connectionId", "_creationTime"];
469
362
  }, {}, {}>;
@@ -482,7 +375,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
482
375
  }, {}, {}>;
483
376
  worldRuns: import("convex/server").TableDefinition<import("convex/values").VObject<{
484
377
  orgId: string;
485
- status: "running" | "completed" | "cancelled" | "failed";
378
+ status: "completed" | "failed" | "cancelled" | "running";
486
379
  createdAt: number;
487
380
  updatedAt: number;
488
381
  runId: string;
@@ -490,7 +383,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
490
383
  }, {
491
384
  orgId: import("convex/values").VString<string, "required">;
492
385
  runId: import("convex/values").VString<string, "required">;
493
- status: import("convex/values").VUnion<"running" | "completed" | "cancelled" | "failed", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
386
+ status: import("convex/values").VUnion<"completed" | "failed" | "cancelled" | "running", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
494
387
  eventCount: import("convex/values").VFloat64<number, "required">;
495
388
  createdAt: import("convex/values").VFloat64<number, "required">;
496
389
  updatedAt: import("convex/values").VFloat64<number, "required">;
@@ -501,7 +394,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
501
394
  worldSteps: import("convex/server").TableDefinition<import("convex/values").VObject<{
502
395
  dataJson?: string | undefined;
503
396
  orgId: string;
504
- status: "running" | "completed" | "failed";
397
+ status: "completed" | "failed" | "running";
505
398
  createdAt: number;
506
399
  updatedAt: number;
507
400
  runId: string;
@@ -510,7 +403,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
510
403
  orgId: import("convex/values").VString<string, "required">;
511
404
  runId: import("convex/values").VString<string, "required">;
512
405
  stepId: import("convex/values").VString<string, "required">;
513
- status: import("convex/values").VUnion<"running" | "completed" | "failed", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
406
+ status: import("convex/values").VUnion<"completed" | "failed" | "running", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
514
407
  dataJson: import("convex/values").VString<string | undefined, "optional">;
515
408
  createdAt: import("convex/values").VFloat64<number, "required">;
516
409
  updatedAt: import("convex/values").VFloat64<number, "required">;
@@ -519,6 +412,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
519
412
  by_org_run_step: ["orgId", "runId", "stepId", "_creationTime"];
520
413
  }, {}, {}>;
521
414
  worldHooks: import("convex/server").TableDefinition<import("convex/values").VObject<{
415
+ awaitedEventName?: string | undefined;
416
+ expiresAt?: number | undefined;
417
+ scheduledFunctionId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
522
418
  orgId: string;
523
419
  status: "pending" | "disposed";
524
420
  createdAt: number;
@@ -532,9 +428,12 @@ declare const _default: import("convex/server").SchemaDefinition<{
532
428
  hookId: import("convex/values").VString<string, "required">;
533
429
  token: import("convex/values").VString<string, "required">;
534
430
  status: import("convex/values").VUnion<"pending" | "disposed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"disposed", "required">], "required", never>;
431
+ expiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
432
+ scheduledFunctionId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
433
+ awaitedEventName: import("convex/values").VString<string | undefined, "optional">;
535
434
  createdAt: import("convex/values").VFloat64<number, "required">;
536
435
  updatedAt: import("convex/values").VFloat64<number, "required">;
537
- }, "required", "orgId" | "status" | "createdAt" | "updatedAt" | "runId" | "hookId" | "token">, {
436
+ }, "required", "orgId" | "status" | "createdAt" | "updatedAt" | "awaitedEventName" | "runId" | "hookId" | "token" | "expiresAt" | "scheduledFunctionId">, {
538
437
  by_org_run: ["orgId", "runId", "_creationTime"];
539
438
  by_org_hook: ["orgId", "hookId", "_creationTime"];
540
439
  by_org_token: ["orgId", "token", "_creationTime"];
@@ -1,31 +1,6 @@
1
1
  import { defineSchema, defineTable } from "convex/server";
2
2
  import { v } from "convex/values";
3
3
  export default defineSchema({
4
- durableJobs: defineTable({
5
- orgId: v.string(),
6
- kind: v.string(),
7
- stepFunctionHandle: v.string(),
8
- totalSteps: v.number(),
9
- maxAttemptsPerStep: v.number(),
10
- cursor: v.number(),
11
- status: v.union(v.literal("running"), v.literal("completed"), v.literal("abandoned"), v.literal("cancelled")),
12
- workflowId: v.optional(v.string()),
13
- workflowVersion: v.string(),
14
- lastError: v.optional(v.string()),
15
- abandonedAtStep: v.optional(v.number()),
16
- createdAt: v.number(),
17
- updatedAt: v.number(),
18
- })
19
- .index("by_org", ["orgId"])
20
- .index("by_org_status", ["orgId", "status"]),
21
- callerStepInvocations: defineTable({
22
- orgId: v.string(),
23
- jobId: v.id("durableJobs"),
24
- stepIndex: v.number(),
25
- createdAt: v.number(),
26
- })
27
- .index("by_org", ["orgId"])
28
- .index("by_org_job", ["orgId", "jobId"]),
29
4
  agents: defineTable({
30
5
  orgId: v.string(),
31
6
  name: v.string(),
@@ -54,40 +29,6 @@ export default defineSchema({
54
29
  .index("by_org", ["orgId"])
55
30
  .index("by_org_agent", ["orgId", "agentId"])
56
31
  .index("by_org_agent_tool", ["orgId", "agentId", "toolName"]),
57
- sessions: defineTable({
58
- orgId: v.string(),
59
- agentId: v.id("agents"),
60
- status: v.union(v.literal("running"), v.literal("completed"), v.literal("cancelled")),
61
- createdBy: v.string(),
62
- workflowId: v.optional(v.string()),
63
- workflowVersion: v.optional(v.string()),
64
- createdAt: v.number(),
65
- updatedAt: v.number(),
66
- })
67
- .index("by_org", ["orgId"])
68
- .index("by_org_agent", ["orgId", "agentId"]),
69
- sessionEvents: defineTable({
70
- orgId: v.string(),
71
- sessionId: v.id("sessions"),
72
- name: v.union(v.literal("session.started"), v.literal("turn.started"), v.literal("turn.reasoning"), v.literal("turn.toolCall.requested"), v.literal("turn.toolCall.completed"), v.literal("turn.toolCall.denied"), v.literal("turn.completed"), v.literal("tool.approval.requested"), v.literal("tool.approval.resolved"), v.literal("sandbox.timeout")),
73
- payload: v.optional(v.string()),
74
- createdAt: v.number(),
75
- })
76
- .index("by_org", ["orgId"])
77
- .index("by_org_session", ["orgId", "sessionId"]),
78
- awaitEventTimeouts: defineTable({
79
- orgId: v.string(),
80
- runId: v.optional(v.string()),
81
- sessionId: v.optional(v.id("sessions")),
82
- awaitedEventName: v.string(),
83
- deadlineAt: v.number(),
84
- scheduledFunctionId: v.optional(v.id("_scheduled_functions")),
85
- firedAt: v.optional(v.number()),
86
- cancelledAt: v.optional(v.number()),
87
- })
88
- .index("by_org", ["orgId"])
89
- .index("by_org_session", ["orgId", "sessionId"])
90
- .index("by_org_run", ["orgId", "runId"]),
91
32
  wakeupDemoResults: defineTable({
92
33
  orgId: v.string(),
93
34
  enqueuedAt: v.number(),
@@ -291,6 +232,9 @@ export default defineSchema({
291
232
  hookId: v.string(),
292
233
  token: v.string(),
293
234
  status: v.union(v.literal("pending"), v.literal("disposed")),
235
+ expiresAt: v.optional(v.number()),
236
+ scheduledFunctionId: v.optional(v.id("_scheduled_functions")),
237
+ awaitedEventName: v.optional(v.string()),
294
238
  createdAt: v.number(),
295
239
  updatedAt: v.number(),
296
240
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vantageos/agent-engine",
3
- "version": "0.3.0-alpha.0",
3
+ "version": "0.4.0-alpha.0",
4
4
  "description": "Reusable Convex component: durable agent engine. Agent = data aggregate (root sheet + child tables), never compiled code. Built on @convex-dev/workflow + @convex-dev/workpool (+ @convex-dev/agent). Eve parity by design.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "scripts": {
41
41
  "dev": "convex dev",
42
- "test": "npm run typecheck:build && npm run check:consumer-types && vitest run && npm run test:guard && npm run test:world-convex && npm run test:first-orchestrator",
42
+ "test": "npm run typecheck:build && npm run check:consumer-types && npm run check:dts-jsdoc && vitest run && npm run test:guard && npm run test:world-convex && npm run test:first-orchestrator",
43
43
  "test:guard": "node --test evidence-skills/evals/guard.test.mjs",
44
44
  "test:world-convex": "npm ci --prefix world-convex && npm test --prefix world-convex",
45
45
  "test:first-orchestrator": "npm ci --prefix first-orchestrator && npm test --prefix first-orchestrator",
@@ -48,11 +48,12 @@
48
48
  "typecheck": "tsc --noEmit",
49
49
  "typecheck:build": "tsc -p tsconfig.build.json --noEmit",
50
50
  "check:consumer-types": "node scripts/check-consumer-types.mjs",
51
- "build": "tsc -p tsconfig.build.json",
52
- "prepublishOnly": "npm run build && npm run check:public",
51
+ "build": "tsc -p tsconfig.build.json && tsc -p tsconfig.build.types.json",
52
+ "prepublishOnly": "npm run build && npm run check:public && SKIP_BUILD=1 npm run check:dts-jsdoc",
53
53
  "check:generated": "node scripts/check-generated-freshness.mjs",
54
54
  "check:generated:content": "node scripts/check-generated-content.mjs",
55
- "check:public": "node scripts/check-public-package.mjs"
55
+ "check:public": "node scripts/check-public-package.mjs",
56
+ "check:dts-jsdoc": "node scripts/check-dts-jsdoc.mjs"
56
57
  },
57
58
  "dependencies": {
58
59
  "@convex-dev/agent": "0.6.4",