@powerhousedao/switchboard 6.2.3-dev.33 → 6.2.3-dev.35
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/.tsbuild/test/boot-mcp-enabled.test.d.ts +2 -0
- package/.tsbuild/test/boot-mcp-enabled.test.d.ts.map +1 -0
- package/.tsbuild/test/boot-privacy.test.d.ts +2 -0
- package/.tsbuild/test/boot-privacy.test.d.ts.map +1 -0
- package/.tsbuild/test/mcp-flag.test.d.ts +2 -0
- package/.tsbuild/test/mcp-flag.test.d.ts.map +1 -0
- package/.tsbuild/tsconfig.tsbuildinfo +1 -1
- package/CHANGELOG.md +50 -0
- package/README.md +1 -0
- package/dist/index.mjs +1 -1
- package/dist/{server-DAgJkmvH.mjs → server-CXAp5TOI.mjs} +149 -34
- package/dist/server-CXAp5TOI.mjs.map +1 -0
- package/dist/server.d.mts +22 -1
- package/dist/server.d.mts.map +1 -1
- package/dist/server.mjs +3 -3
- package/package.json +16 -15
- package/test/attachment-reference-read-model.test.ts +6 -1
- package/test/boot-mcp-enabled.test.ts +121 -0
- package/test/boot-privacy.test.ts +243 -0
- package/test/boot-unsupported-stored-documents.test.ts +9 -6
- package/test/fatal-shutdown.test.ts +31 -1
- package/test/mcp-flag.test.ts +56 -0
- package/test/workflow-runtime.test.ts +14 -1
- package/tsconfig.json +3 -0
- package/dist/server-DAgJkmvH.mjs.map +0 -1
|
@@ -26,6 +26,7 @@ import { startSwitchboard } from "../src/server.mjs";
|
|
|
26
26
|
import {
|
|
27
27
|
PH_WORKFLOWS_ENABLED,
|
|
28
28
|
bindPackagePieces,
|
|
29
|
+
canReadAttachmentRef,
|
|
29
30
|
composeWorkflowRuntime,
|
|
30
31
|
assertWorkflowPackageLoadable,
|
|
31
32
|
resolveWorkflowsEnabled,
|
|
@@ -245,7 +246,19 @@ describe("composeWorkflowRuntime", () => {
|
|
|
245
246
|
expect(deps.webhooks).toEqual({ id: "webhooks" });
|
|
246
247
|
expect(typeof deps.assertCanRead).toBe("function");
|
|
247
248
|
expect(typeof deps.assertCanWrite).toBe("function");
|
|
248
|
-
expect(
|
|
249
|
+
expect(deps.canReadAttachmentRef).toBe(canReadAttachmentRef);
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
it("lets a step read any well-formed attachment ref", async () => {
|
|
253
|
+
const hash = "a".repeat(64);
|
|
254
|
+
// No document references it: runs read attachments as they read documents.
|
|
255
|
+
expect(await canReadAttachmentRef("wf-1", `attachment://v1:${hash}`)).toBe(
|
|
256
|
+
true,
|
|
257
|
+
);
|
|
258
|
+
expect(await canReadAttachmentRef("wf-1", `attachment://v2:${hash}`)).toBe(
|
|
259
|
+
false,
|
|
260
|
+
);
|
|
261
|
+
expect(await canReadAttachmentRef("wf-1", "not-a-ref")).toBe(false);
|
|
249
262
|
});
|
|
250
263
|
|
|
251
264
|
it("serves a subgraph the GraphQL manager can construct", async () => {
|