@rivet-dev/flue 0.0.0-main.79e97f1
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 +26 -0
- package/dist/agent-coordinator.d.ts +89 -0
- package/dist/agent-coordinator.d.ts.map +1 -0
- package/dist/agent-coordinator.js +346 -0
- package/dist/agent-coordinator.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +3 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +2 -0
- package/dist/internal.js.map +1 -0
- package/dist/registry-ops-async.d.ts +7 -0
- package/dist/registry-ops-async.d.ts.map +1 -0
- package/dist/registry-ops-async.js +12 -0
- package/dist/registry-ops-async.js.map +1 -0
- package/dist/rivet-db.d.ts +7 -0
- package/dist/rivet-db.d.ts.map +1 -0
- package/dist/rivet-db.js +65 -0
- package/dist/rivet-db.js.map +1 -0
- package/dist/run-store-composite.d.ts +3 -0
- package/dist/run-store-composite.d.ts.map +1 -0
- package/dist/run-store-composite.js +43 -0
- package/dist/run-store-composite.js.map +1 -0
- package/dist/runtime.d.ts +8 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +7 -0
- package/dist/runtime.js.map +1 -0
- package/dist/stores/async-db.d.ts +10 -0
- package/dist/stores/async-db.d.ts.map +1 -0
- package/dist/stores/async-db.js +5 -0
- package/dist/stores/async-db.js.map +1 -0
- package/dist/stores/attachment-store.d.ts +4 -0
- package/dist/stores/attachment-store.d.ts.map +1 -0
- package/dist/stores/attachment-store.js +59 -0
- package/dist/stores/attachment-store.js.map +1 -0
- package/dist/stores/constants.d.ts +11 -0
- package/dist/stores/constants.d.ts.map +1 -0
- package/dist/stores/constants.js +11 -0
- package/dist/stores/constants.js.map +1 -0
- package/dist/stores/conversation-stream-store.d.ts +4 -0
- package/dist/stores/conversation-stream-store.d.ts.map +1 -0
- package/dist/stores/conversation-stream-store.js +35 -0
- package/dist/stores/conversation-stream-store.js.map +1 -0
- package/dist/stores/event-stream-store.d.ts +6 -0
- package/dist/stores/event-stream-store.d.ts.map +1 -0
- package/dist/stores/event-stream-store.js +156 -0
- package/dist/stores/event-stream-store.js.map +1 -0
- package/dist/stores/helpers.d.ts +2 -0
- package/dist/stores/helpers.d.ts.map +1 -0
- package/dist/stores/helpers.js +6 -0
- package/dist/stores/helpers.js.map +1 -0
- package/dist/stores/index.d.ts +11 -0
- package/dist/stores/index.d.ts.map +1 -0
- package/dist/stores/index.js +23 -0
- package/dist/stores/index.js.map +1 -0
- package/dist/stores/listener-registry.d.ts +6 -0
- package/dist/stores/listener-registry.d.ts.map +1 -0
- package/dist/stores/listener-registry.js +27 -0
- package/dist/stores/listener-registry.js.map +1 -0
- package/dist/stores/run-store.d.ts +4 -0
- package/dist/stores/run-store.d.ts.map +1 -0
- package/dist/stores/run-store.js +117 -0
- package/dist/stores/run-store.js.map +1 -0
- package/dist/stores/schema.d.ts +3 -0
- package/dist/stores/schema.d.ts.map +1 -0
- package/dist/stores/schema.js +241 -0
- package/dist/stores/schema.js.map +1 -0
- package/dist/stores/submission-store.d.ts +4 -0
- package/dist/stores/submission-store.d.ts.map +1 -0
- package/dist/stores/submission-store.js +261 -0
- package/dist/stores/submission-store.js.map +1 -0
- package/dist/target.d.ts +8 -0
- package/dist/target.d.ts.map +1 -0
- package/dist/target.js +420 -0
- package/dist/target.js.map +1 -0
- package/dist/workflow-coordinator.d.ts +71 -0
- package/dist/workflow-coordinator.d.ts.map +1 -0
- package/dist/workflow-coordinator.js +154 -0
- package/dist/workflow-coordinator.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { admitDetachedWorkflow, failRecoveredRun, handleRunRouteRequest, handleStreamHead, handleStreamRead, handleWorkflowRequest, } from '@flue/runtime/adapter-kit';
|
|
2
|
+
import { createRivetRunStore } from './run-store-composite.js';
|
|
3
|
+
import { createAsyncRunStore, ensureAsyncSqlSchema } from './stores/index.js';
|
|
4
|
+
export function createRivetWorkflowRuntime(options) {
|
|
5
|
+
const coordinators = new WeakMap();
|
|
6
|
+
const getCoordinator = (actor) => {
|
|
7
|
+
const coordinator = coordinators.get(actor);
|
|
8
|
+
if (!coordinator) {
|
|
9
|
+
throw new Error('[flue] Generated Rivet workflow coordinator was not initialized.');
|
|
10
|
+
}
|
|
11
|
+
return coordinator;
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
async prepare({ db, workflowName, actor }) {
|
|
15
|
+
await ensureAsyncSqlSchema(db);
|
|
16
|
+
const primary = createAsyncRunStore(db);
|
|
17
|
+
const mirror = options.createRegistryRunStore?.(actor);
|
|
18
|
+
return {
|
|
19
|
+
workflowName,
|
|
20
|
+
runStore: createRivetRunStore(primary, mirror),
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
attach(actor, prepared) {
|
|
24
|
+
const coordinator = new RivetWorkflowCoordinator(actor, prepared, options, options.createEventStreamStore(actor));
|
|
25
|
+
coordinators.set(actor, coordinator);
|
|
26
|
+
return coordinator;
|
|
27
|
+
},
|
|
28
|
+
onWake(actor, inherited = () => undefined) {
|
|
29
|
+
return getCoordinator(actor).onWake(inherited);
|
|
30
|
+
},
|
|
31
|
+
admitWorkflow(actor, input) {
|
|
32
|
+
return getCoordinator(actor).admitWorkflow(input);
|
|
33
|
+
},
|
|
34
|
+
onRequest(actor, request) {
|
|
35
|
+
return getCoordinator(actor).onRequest(request);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export class RivetWorkflowCoordinator {
|
|
40
|
+
actor;
|
|
41
|
+
prepared;
|
|
42
|
+
options;
|
|
43
|
+
eventStreamStore;
|
|
44
|
+
constructor(actor, prepared, options, eventStreamStore) {
|
|
45
|
+
this.actor = actor;
|
|
46
|
+
this.prepared = prepared;
|
|
47
|
+
this.options = options;
|
|
48
|
+
this.eventStreamStore = eventStreamStore;
|
|
49
|
+
}
|
|
50
|
+
async onWake(inherited) {
|
|
51
|
+
await inherited();
|
|
52
|
+
const run = await this.prepared.runStore.getRun(this.runId);
|
|
53
|
+
if (run?.status !== 'active')
|
|
54
|
+
return;
|
|
55
|
+
await failRecoveredRun({
|
|
56
|
+
workflowName: this.workflowName,
|
|
57
|
+
runId: this.runId,
|
|
58
|
+
error: new Error('Flue workflow execution was interrupted. Start a new workflow run explicitly if retry is appropriate.'),
|
|
59
|
+
runStore: this.prepared.runStore,
|
|
60
|
+
eventStreamStore: this.eventStreamStore,
|
|
61
|
+
createContext: ({ runId, request, initialEventIndex }) => this.createContext(request, runId, initialEventIndex),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
async onRequest(request) {
|
|
65
|
+
const runRoute = parseRunRoute(request);
|
|
66
|
+
if (runRoute) {
|
|
67
|
+
if (runRoute.action === 'ds-stream') {
|
|
68
|
+
const streamPath = runStreamPath(runRoute.runId);
|
|
69
|
+
if (request.method === 'HEAD')
|
|
70
|
+
return handleStreamHead(this.eventStreamStore, streamPath);
|
|
71
|
+
return handleStreamRead({ store: this.eventStreamStore, path: streamPath, request });
|
|
72
|
+
}
|
|
73
|
+
return handleRunRouteRequest({
|
|
74
|
+
workflowName: this.workflowName,
|
|
75
|
+
runId: runRoute.runId,
|
|
76
|
+
runStore: this.prepared.runStore,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (!parseWorkflowStart(request, this.workflowName))
|
|
80
|
+
return null;
|
|
81
|
+
const workflow = this.options.workflows.find((record) => record.name === this.workflowName)?.definition;
|
|
82
|
+
if (!workflow)
|
|
83
|
+
return null;
|
|
84
|
+
return handleWorkflowRequest({
|
|
85
|
+
request,
|
|
86
|
+
workflowName: this.workflowName,
|
|
87
|
+
runId: this.runId,
|
|
88
|
+
workflow,
|
|
89
|
+
runStore: this.prepared.runStore,
|
|
90
|
+
eventStreamStore: this.eventStreamStore,
|
|
91
|
+
createContext: ({ runId, request, initialEventIndex }) => this.createContext(request, runId, initialEventIndex),
|
|
92
|
+
startWorkflowAdmission: (_runId, run) => {
|
|
93
|
+
const completion = this.actor.keepAwake(Promise.resolve().then(run));
|
|
94
|
+
return { admitted: Promise.resolve(), completion };
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async admitWorkflow(options) {
|
|
99
|
+
const workflow = this.options.workflows.find((record) => record.name === this.workflowName)?.definition;
|
|
100
|
+
if (!workflow) {
|
|
101
|
+
throw new Error(`[flue] Workflow target "${this.workflowName}" is unavailable.`);
|
|
102
|
+
}
|
|
103
|
+
return admitDetachedWorkflow({
|
|
104
|
+
workflowName: this.workflowName,
|
|
105
|
+
runId: options.runId,
|
|
106
|
+
workflow,
|
|
107
|
+
input: options.input,
|
|
108
|
+
runStore: this.prepared.runStore,
|
|
109
|
+
eventStreamStore: this.eventStreamStore,
|
|
110
|
+
createContext: ({ runId, request, initialEventIndex }) => this.createContext(request, runId, initialEventIndex),
|
|
111
|
+
startWorkflowAdmission: (_runId, run) => {
|
|
112
|
+
const completion = this.actor.keepAwake(Promise.resolve().then(run));
|
|
113
|
+
return { admitted: Promise.resolve(), completion };
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
get workflowName() {
|
|
118
|
+
return this.prepared.workflowName;
|
|
119
|
+
}
|
|
120
|
+
get runId() {
|
|
121
|
+
return this.options.resolveRunId?.(this.actor) ?? this.actor.key[0] ?? this.actor.actorId;
|
|
122
|
+
}
|
|
123
|
+
createContext(request, runId, initialEventIndex) {
|
|
124
|
+
return this.options.createContext({
|
|
125
|
+
actor: this.actor,
|
|
126
|
+
request,
|
|
127
|
+
runId,
|
|
128
|
+
initialEventIndex,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function parseWorkflowStart(request, workflowName) {
|
|
133
|
+
if (request.method !== 'POST')
|
|
134
|
+
return false;
|
|
135
|
+
const url = new URL(request.url);
|
|
136
|
+
const segments = url.pathname.split('/').filter(Boolean);
|
|
137
|
+
if (segments.length !== 2 || segments[0] !== 'workflows')
|
|
138
|
+
return false;
|
|
139
|
+
return decodeURIComponent(segments[1] ?? '') === workflowName;
|
|
140
|
+
}
|
|
141
|
+
function parseRunRoute(request) {
|
|
142
|
+
const url = new URL(request.url);
|
|
143
|
+
const segments = url.pathname.split('/').filter(Boolean);
|
|
144
|
+
if (segments.length !== 2 || segments[0] !== 'runs')
|
|
145
|
+
return null;
|
|
146
|
+
const runId = decodeURIComponent(segments[1] ?? '');
|
|
147
|
+
if (!runId)
|
|
148
|
+
return null;
|
|
149
|
+
return { action: request.method === 'GET' && url.searchParams.has('meta') ? 'meta' : 'ds-stream', runId };
|
|
150
|
+
}
|
|
151
|
+
function runStreamPath(runId) {
|
|
152
|
+
return `runs/${runId}`;
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=workflow-coordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-coordinator.js","sourceRoot":"","sources":["../src/workflow-coordinator.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAmB,MAAM,mBAAmB,CAAC;AAsD/F,MAAM,UAAU,0BAA0B,CAAC,OAAoC;IAC9E,MAAM,YAAY,GAAG,IAAI,OAAO,EAAuD,CAAC;IAExF,MAAM,cAAc,GAAG,CAAC,KAAgC,EAA4B,EAAE;QACrF,MAAM,WAAW,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;QACrF,C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AAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,KAAK,KAAK,IAAI,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC;AAC3G,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IACnC,OAAO,QAAQ,KAAK,EAAE,CAAC;AACxB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rivet-dev/flue",
|
|
3
|
+
"version": "0.0.0-main.79e97f1",
|
|
4
|
+
"description": "Run Flue agents and workflows as durable Rivet Actors.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"rivetkit",
|
|
12
|
+
"rivet",
|
|
13
|
+
"flue",
|
|
14
|
+
"agents",
|
|
15
|
+
"workflows",
|
|
16
|
+
"actor",
|
|
17
|
+
"durable",
|
|
18
|
+
"ai"
|
|
19
|
+
],
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./runtime": {
|
|
30
|
+
"types": "./dist/runtime.d.ts",
|
|
31
|
+
"default": "./dist/runtime.js"
|
|
32
|
+
},
|
|
33
|
+
"./internal": {
|
|
34
|
+
"types": "./dist/internal.d.ts",
|
|
35
|
+
"default": "./dist/internal.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"main": "./dist/index.js",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
42
|
+
"check-types": "tsc --noEmit",
|
|
43
|
+
"check:types": "tsc --noEmit",
|
|
44
|
+
"test": "pnpm run test:node && pnpm run test:contracts",
|
|
45
|
+
"test:node": "bash -c 'for file in test/*.test.ts; do case \"$file\" in *contract*) continue ;; esac; tsx --test \"$file\" || exit $?; done'",
|
|
46
|
+
"test:contracts": "vitest run test/rivet-store-contracts.test.ts"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@flue/cli": "npm:@rivet-dev/labs-flue-cli@1.0.0-beta.9-rivet.2",
|
|
50
|
+
"@flue/runtime": "npm:@rivet-dev/labs-flue-runtime@1.0.0-beta.9-rivet.2",
|
|
51
|
+
"rivetkit": "0.0.0-main.79e97f1"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@rivetkit/engine-cli": "0.0.0-main.79e97f1",
|
|
55
|
+
"tsx": "^4.22.4",
|
|
56
|
+
"typescript": "6.0.3",
|
|
57
|
+
"vitest": "^4.0.15"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=22.19.0"
|
|
61
|
+
}
|
|
62
|
+
}
|