@robodev-ai/runtime 0.5.0 → 0.5.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/package.json +2 -2
- package/src/local-jobs.test.ts +18 -0
- package/src/local-jobs.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robodev-ai/runtime",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Robodev project runtime — deploy-file classification, esbuild compile, module loading, schema push, route matching, OpenAPI, handler invocation, Robodev Auth, the socket engine, local file storage, and the offline PDF hop client. Shared by hosted Starbase and `robodev dev`.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"pg": "^8.16.3",
|
|
33
33
|
"zod": "^3.25.76",
|
|
34
34
|
"zod-to-json-schema": "^3.24.6",
|
|
35
|
-
"@robodev-ai/sdk": "0.
|
|
35
|
+
"@robodev-ai/sdk": "0.13.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/busboy": "^1.5.4",
|
package/src/local-jobs.test.ts
CHANGED
|
@@ -421,6 +421,24 @@ test("missing handler is route_not_found", async () => {
|
|
|
421
421
|
await waitUntil(() => store.jobs[0]?.last_error === "route_not_found");
|
|
422
422
|
});
|
|
423
423
|
|
|
424
|
+
test("handler receives clients.storage", async () => {
|
|
425
|
+
const store = memoryJobs();
|
|
426
|
+
const clients = mockClients();
|
|
427
|
+
const seen: unknown[] = [];
|
|
428
|
+
const engine = createLocalJobsEngine({
|
|
429
|
+
query: store.query,
|
|
430
|
+
getGeneration: () => ({
|
|
431
|
+
db: {} as RobodevDb,
|
|
432
|
+
jobs: [{ name: "digest", def: jobDef((ctx) => seen.push(ctx.storage)) }],
|
|
433
|
+
}),
|
|
434
|
+
clients: () => clients,
|
|
435
|
+
});
|
|
436
|
+
await engine.enqueue({ name: "digest" });
|
|
437
|
+
await engine.tickJobs();
|
|
438
|
+
await waitUntil(() => store.jobs[0]?.status === "succeeded");
|
|
439
|
+
assert.equal(seen[0], clients.storage);
|
|
440
|
+
});
|
|
441
|
+
|
|
424
442
|
test("hosted-only clients still throw in job handlers; email is real", async () => {
|
|
425
443
|
const store = memoryJobs();
|
|
426
444
|
const seen: string[] = [];
|
package/src/local-jobs.ts
CHANGED