@vantageos/agent-engine 0.3.0-alpha.0 → 0.3.0-alpha.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.
- package/README.md +1 -1
- package/dist/component/_generated/api.d.ts +26 -2
- package/dist/component/_generated/component.d.ts +19 -0
- package/dist/component/_generated/dataModel.d.ts +38 -0
- package/dist/component/_generated/server.d.ts +106 -0
- package/dist/component/engine/agents.d.ts +3 -3
- package/dist/component/engine/awaitEventTimeout.js +3 -5
- package/dist/component/engine/connections.d.ts +1 -1
- package/dist/component/engine/delegation.d.ts +4 -4
- package/dist/component/engine/durableJob.d.ts +3 -26
- package/dist/component/engine/durableJob.js +14 -217
- package/dist/component/engine/mandates.d.ts +2 -2
- package/dist/component/engine/resolvers.js +1 -1
- package/dist/component/engine/sandboxCallback.d.ts +1 -1
- package/dist/component/engine/sessions.js +10 -38
- package/dist/component/engine/streams.d.ts +1 -1
- package/dist/component/engine/wakeup.d.ts +2 -2
- package/dist/component/engine/workflows.d.ts +0 -24
- package/dist/component/engine/workflows.js +2 -66
- package/dist/component/engine/world.d.ts +31 -30
- package/dist/component/engine/world.js +60 -36
- package/dist/component/schema.d.ts +27 -112
- package/dist/component/schema.js +1 -48
- package/package.json +6 -5
package/dist/component/schema.js
CHANGED
|
@@ -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,31 +29,10 @@ 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
32
|
awaitEventTimeouts: defineTable({
|
|
79
33
|
orgId: v.string(),
|
|
80
34
|
runId: v.optional(v.string()),
|
|
81
|
-
sessionId: v.optional(v.
|
|
35
|
+
sessionId: v.optional(v.string()),
|
|
82
36
|
awaitedEventName: v.string(),
|
|
83
37
|
deadlineAt: v.number(),
|
|
84
38
|
scheduledFunctionId: v.optional(v.id("_scheduled_functions")),
|
|
@@ -86,7 +40,6 @@ export default defineSchema({
|
|
|
86
40
|
cancelledAt: v.optional(v.number()),
|
|
87
41
|
})
|
|
88
42
|
.index("by_org", ["orgId"])
|
|
89
|
-
.index("by_org_session", ["orgId", "sessionId"])
|
|
90
43
|
.index("by_org_run", ["orgId", "runId"]),
|
|
91
44
|
wakeupDemoResults: defineTable({
|
|
92
45
|
orgId: v.string(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vantageos/agent-engine",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
3
|
+
"version": "0.3.0-alpha.1",
|
|
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",
|