@agent-native/dispatch 0.40.12 → 0.40.13
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @agent-native/dispatch
|
|
2
2
|
|
|
3
|
+
## 0.40.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Release all public npm packages with a patch version bump.
|
|
8
|
+
- Updated dependencies [88908c5]
|
|
9
|
+
- Updated dependencies [cc3c820]
|
|
10
|
+
- Updated dependencies [a78f2a0]
|
|
11
|
+
- Updated dependencies [bdb9e68]
|
|
12
|
+
- Updated dependencies [bb72f96]
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- Updated dependencies [5d05eb6]
|
|
15
|
+
- Updated dependencies [cbfea3c]
|
|
16
|
+
- Updated dependencies [b88b078]
|
|
17
|
+
- @agent-native/toolkit@0.201.1
|
|
18
|
+
|
|
3
19
|
## 0.40.12
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1121,11 +1137,4 @@
|
|
|
1121
1137
|
- 907dfa3: Resolve hosted workspace app sign-in from the authenticated live registry so custom mounted apps can receive Dispatch embed sessions without a copied app list. Keep the registry action scoped to its verified A2A caller and refresh the desktop canary identity state before automatic sign-in.
|
|
1122
1138
|
- 907dfa3: Preserve organization Google-only policies during shared sign-in by marking only Dispatch identities with a verified Google account link, while keeping existing local accounts and sessions additive.
|
|
1123
1139
|
|
|
1124
|
-
## 0.27.6
|
|
1125
|
-
|
|
1126
|
-
### Patch Changes
|
|
1127
|
-
|
|
1128
|
-
- 9e73795: Resolve hosted workspace app sign-in from the authenticated live registry so custom mounted apps can receive Dispatch embed sessions without a copied app list. Keep the registry action scoped to its verified A2A caller and refresh the desktop canary identity state before automatic sign-in.
|
|
1129
|
-
- 9e73795: Preserve organization Google-only policies during shared sign-in by marking only Dispatch identities with a verified Google account link, while keeping existing local accounts and sessions additive.
|
|
1130
|
-
|
|
1131
1140
|
For the full list of releases, see the [changelog archive](./changelog/archive/CHANGELOG.md).
|
|
@@ -47,9 +47,10 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
|
|
|
47
47
|
notes?: string | undefined;
|
|
48
48
|
scope?: "org" | "user" | undefined;
|
|
49
49
|
}, {
|
|
50
|
+
message?: undefined;
|
|
50
51
|
id?: undefined;
|
|
51
|
-
deleted?: undefined;
|
|
52
52
|
provider?: undefined;
|
|
53
|
+
deleted?: undefined;
|
|
53
54
|
providers: {
|
|
54
55
|
id: string;
|
|
55
56
|
label: string;
|
|
@@ -63,8 +64,8 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
|
|
|
63
64
|
found?: undefined;
|
|
64
65
|
registered?: undefined;
|
|
65
66
|
label?: undefined;
|
|
66
|
-
message?: undefined;
|
|
67
67
|
} | {
|
|
68
|
+
message?: undefined;
|
|
68
69
|
id?: undefined;
|
|
69
70
|
deleted?: undefined;
|
|
70
71
|
providers?: undefined;
|
|
@@ -73,18 +74,18 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
|
|
|
73
74
|
provider: import("node_modules/@agent-native/core/dist/provider-api").CustomProviderConfig;
|
|
74
75
|
registered?: undefined;
|
|
75
76
|
label?: undefined;
|
|
76
|
-
message?: undefined;
|
|
77
77
|
} | {
|
|
78
|
-
|
|
78
|
+
message?: undefined;
|
|
79
79
|
provider?: undefined;
|
|
80
|
+
deleted?: undefined;
|
|
80
81
|
providers?: undefined;
|
|
81
82
|
count?: undefined;
|
|
82
83
|
found: boolean;
|
|
83
84
|
id: string;
|
|
84
85
|
registered?: undefined;
|
|
85
86
|
label?: undefined;
|
|
86
|
-
message?: undefined;
|
|
87
87
|
} | {
|
|
88
|
+
message?: undefined;
|
|
88
89
|
provider?: undefined;
|
|
89
90
|
providers?: undefined;
|
|
90
91
|
count?: undefined;
|
|
@@ -93,10 +94,9 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
|
|
|
93
94
|
id: string;
|
|
94
95
|
registered?: undefined;
|
|
95
96
|
label?: undefined;
|
|
96
|
-
message?: undefined;
|
|
97
97
|
} | {
|
|
98
|
-
deleted?: undefined;
|
|
99
98
|
provider?: undefined;
|
|
99
|
+
deleted?: undefined;
|
|
100
100
|
providers?: undefined;
|
|
101
101
|
count?: undefined;
|
|
102
102
|
found?: undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/dispatch",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.13",
|
|
4
4
|
"description": "Dispatch — workspace control plane for agent-native apps. Vault, integrations, destinations, scheduled jobs, and cross-app delegation, shipped as a single drop-in package.",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"tailwind-merge": "^3.5.0",
|
|
90
90
|
"vaul": "^1.1.2",
|
|
91
91
|
"zod": "^4.3.6",
|
|
92
|
-
"@agent-native/toolkit": "0.201.
|
|
92
|
+
"@agent-native/toolkit": "0.201.1"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@react-router/dev": "^8.1.0",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"typescript-7": "npm:typescript@^7.0.2",
|
|
104
104
|
"vite": "8.1.0",
|
|
105
105
|
"vitest": "^4.1.5",
|
|
106
|
-
"@agent-native/core": "0.201.
|
|
106
|
+
"@agent-native/core": "0.201.1"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
109
|
"@agent-native/core": ">=0.198.6",
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { createHmac } from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
2
5
|
|
|
3
6
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
7
|
|
|
@@ -436,46 +439,62 @@ describe("Dispatch private icon assets", () => {
|
|
|
436
439
|
});
|
|
437
440
|
|
|
438
441
|
it("accepts a signed service JWT only for the private-icon audience", async () => {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
442
|
+
const databaseDir = fs.mkdtempSync(
|
|
443
|
+
path.join(os.tmpdir(), "dispatch-private-icon-assets-"),
|
|
444
|
+
);
|
|
445
|
+
let closeDatabase: (() => Promise<void>) | undefined;
|
|
446
|
+
try {
|
|
447
|
+
vi.stubEnv("A2A_SECRET", "example-dispatch-shared-secret");
|
|
448
|
+
vi.stubEnv("APP_URL", "https://dispatch.example.test");
|
|
449
|
+
vi.stubEnv("DATABASE_URL", `pglite:${databaseDir}`);
|
|
450
|
+
const { closeDbExec, getDbExec } = await import("@agent-native/core/db");
|
|
451
|
+
closeDatabase = closeDbExec;
|
|
452
|
+
const db = getDbExec();
|
|
453
|
+
await db.execute(
|
|
454
|
+
"CREATE TABLE organizations (id TEXT PRIMARY KEY, allowed_domain TEXT)",
|
|
455
|
+
);
|
|
456
|
+
await db.execute({
|
|
457
|
+
sql: "INSERT INTO organizations (id, allowed_domain) VALUES (?, ?)",
|
|
458
|
+
args: ["dispatch-org", null],
|
|
459
|
+
});
|
|
445
460
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
).toString("base64url");
|
|
451
|
-
const body = Buffer.from(
|
|
452
|
-
JSON.stringify({
|
|
453
|
-
sub: "owner@example.test",
|
|
454
|
-
iss: "https://content.example.test",
|
|
455
|
-
aud,
|
|
456
|
-
scope: "private-icon:read",
|
|
457
|
-
org_id: "dispatch-org",
|
|
458
|
-
asset_id: id,
|
|
459
|
-
iat: now,
|
|
460
|
-
exp: now + 60,
|
|
461
|
-
}),
|
|
462
|
-
).toString("base64url");
|
|
463
|
-
const unsigned = `${head}.${body}`;
|
|
464
|
-
const signature = createHmac("sha256", "example-dispatch-shared-secret")
|
|
465
|
-
.update(unsigned)
|
|
466
|
-
.digest("base64url");
|
|
467
|
-
return `${unsigned}.${signature}`;
|
|
468
|
-
};
|
|
461
|
+
const { verifyA2AToken } = await vi.importActual<
|
|
462
|
+
typeof import("@agent-native/core/a2a")
|
|
463
|
+
>("@agent-native/core/a2a");
|
|
464
|
+
mocks.verifyA2AToken.mockImplementation(verifyA2AToken);
|
|
469
465
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
466
|
+
const token = (aud: string) => {
|
|
467
|
+
const now = Math.floor(Date.now() / 1000);
|
|
468
|
+
const head = Buffer.from(
|
|
469
|
+
JSON.stringify({ alg: "HS256", typ: "JWT" }),
|
|
470
|
+
).toString("base64url");
|
|
471
|
+
const body = Buffer.from(
|
|
472
|
+
JSON.stringify({
|
|
473
|
+
sub: "owner@example.test",
|
|
474
|
+
iss: "https://content.example.test",
|
|
475
|
+
aud,
|
|
476
|
+
scope: "private-icon:read",
|
|
477
|
+
org_id: "dispatch-org",
|
|
478
|
+
asset_id: id,
|
|
479
|
+
iat: now,
|
|
480
|
+
exp: now + 60,
|
|
481
|
+
}),
|
|
482
|
+
).toString("base64url");
|
|
483
|
+
const unsigned = `${head}.${body}`;
|
|
484
|
+
const signature = createHmac("sha256", "example-dispatch-shared-secret")
|
|
485
|
+
.update(unsigned)
|
|
486
|
+
.digest("base64url");
|
|
487
|
+
return `${unsigned}.${signature}`;
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
const withToken = (value: string) => {
|
|
491
|
+
const requestEvent = event("GET");
|
|
492
|
+
requestEvent.req = new Request(requestEvent.url, {
|
|
493
|
+
headers: { authorization: `Bearer ${value}` },
|
|
494
|
+
});
|
|
495
|
+
return requestEvent;
|
|
496
|
+
};
|
|
477
497
|
|
|
478
|
-
try {
|
|
479
498
|
const handler = createPrivateIconAssetsHandler();
|
|
480
499
|
expect(
|
|
481
500
|
(
|
|
@@ -492,7 +511,12 @@ describe("Dispatch private icon assets", () => {
|
|
|
492
511
|
).status,
|
|
493
512
|
).toBe(200);
|
|
494
513
|
} finally {
|
|
495
|
-
|
|
514
|
+
try {
|
|
515
|
+
await closeDatabase?.();
|
|
516
|
+
} finally {
|
|
517
|
+
vi.unstubAllEnvs();
|
|
518
|
+
fs.rmSync(databaseDir, { recursive: true, force: true });
|
|
519
|
+
}
|
|
496
520
|
}
|
|
497
521
|
}, 20_000);
|
|
498
522
|
});
|