agent-comms 8.15.10 → 8.15.11

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.
@@ -15,7 +15,7 @@
15
15
  "source": "url",
16
16
  "url": "https://github.com/ExaDev/agent-comms.git"
17
17
  },
18
- "version": "8.15.10"
18
+ "version": "8.15.11"
19
19
  }
20
20
  ]
21
21
  }
@@ -18,5 +18,5 @@
18
18
  },
19
19
  "name": "agent-comms",
20
20
  "repository": "https://github.com/ExaDev/agent-comms",
21
- "version": "8.15.10"
21
+ "version": "8.15.11"
22
22
  }
package/README.md CHANGED
@@ -117,7 +117,7 @@ An explicit `dataDir` wins over the environment and the existing `slot.dir` over
117
117
  pi install npm:agent-comms
118
118
  ```
119
119
 
120
- The [`pi` manifest](/package.json) registers the extension automatically.
120
+ The [`pi` manifest](/package.json) registers the extension automatically. It points at the TypeScript source, which pi loads without a build step, so the same entry serves `pi install npm:agent-comms` and `pi install git:github.com/ExaDev/agent-comms`; the npm package ships `src` for that reason. A git install has no build output, so the bridge, API and mesh work but the dashboard routes answer 503 naming the missing frontend build; the npm package includes the built dashboard.
121
121
 
122
122
  The extension imports from `@earendil-works/pi-coding-agent` and `@earendil-works/pi-ai`, which the pi host provides, and its peer range requires `0.79.0` or later. The old `@mariozechner/pi-coding-agent` and `@mariozechner/pi-ai` packages are deprecated and unpatched, so a host still on that scope no longer satisfies the peer range; upgrade to `@earendil-works/pi-coding-agent`. A `@mariozechner` host at `0.73.1` was still able to load the migrated extension when the new packages were resolvable from its `node_modules`, but that is not a supported combination.
123
123
 
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pi-manifest-packed.integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pi-manifest-packed.integration.test.d.ts","sourceRoot":"","sources":["../../src/test/pi-manifest-packed.integration.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Every extension the `pi` manifest in package.json names must ship in the published package. `pi install npm:agent-comms` reported success and then could not load the extension when the manifest pointed at `src/`, which `files` did not publish (ExaDev/agent-comms#412, #440); nothing in the suite noticed, because the manifest and the tarball were never compared.
3
+ *
4
+ * The tarball contents come from `npm pack --dry-run`, the same file selection a publish uses, so a `files` entry or an ignore rule that drops the manifest's path fails here and not in a user's install.
5
+ */
6
+ import { spawnSync } from "node:child_process";
7
+ import * as fs from "node:fs";
8
+ import path from "node:path";
9
+ import { describe, expect, it } from "vitest";
10
+ const packageRoot = path.resolve(import.meta.dirname, "../..");
11
+ function isRecord(value) {
12
+ return typeof value === "object" && value !== null && !Array.isArray(value);
13
+ }
14
+ function isStringArray(value) {
15
+ return (Array.isArray(value) && value.every((item) => typeof item === "string"));
16
+ }
17
+ function readJson(file) {
18
+ return JSON.parse(fs.readFileSync(file, "utf-8"));
19
+ }
20
+ function manifestExtensions() {
21
+ const manifest = readJson(path.join(packageRoot, "package.json"));
22
+ if (!isRecord(manifest) || !isRecord(manifest.pi)) {
23
+ throw new Error("package.json has no pi manifest");
24
+ }
25
+ const { extensions } = manifest.pi;
26
+ if (!isStringArray(extensions)) {
27
+ throw new Error("package.json pi.extensions is not a list of paths");
28
+ }
29
+ return extensions;
30
+ }
31
+ function packedPaths() {
32
+ // --ignore-scripts keeps prepack and prepare out of a listing that only needs the file selection.
33
+ const result = spawnSync("npm", ["pack", "--dry-run", "--json", "--ignore-scripts"], { cwd: packageRoot, encoding: "utf-8" });
34
+ if (result.status !== 0) {
35
+ throw new Error(`npm pack --dry-run failed: ${result.stderr}`);
36
+ }
37
+ const listing = JSON.parse(result.stdout);
38
+ if (!Array.isArray(listing) || !isRecord(listing[0])) {
39
+ throw new Error("npm pack --dry-run printed no package listing");
40
+ }
41
+ const { files } = listing[0];
42
+ if (!Array.isArray(files)) {
43
+ throw new Error("npm pack --dry-run listing has no files");
44
+ }
45
+ return files.map((file) => {
46
+ if (!isRecord(file) || typeof file.path !== "string") {
47
+ throw new Error("npm pack --dry-run listed a file without a path");
48
+ }
49
+ return file.path;
50
+ });
51
+ }
52
+ describe("the pi manifest", () => {
53
+ it("names at least one extension, so the loop below cannot pass by checking nothing", () => {
54
+ expect(manifestExtensions().length).toBeGreaterThan(0);
55
+ });
56
+ it("names only extensions that exist in the repository", () => {
57
+ for (const extension of manifestExtensions()) {
58
+ expect(fs.existsSync(path.join(packageRoot, extension)), extension).toBe(true);
59
+ }
60
+ });
61
+ it("names only extensions the published package contains", () => {
62
+ const packed = new Set(packedPaths());
63
+ for (const extension of manifestExtensions()) {
64
+ expect(packed.has(path.posix.normalize(extension)), extension).toBe(true);
65
+ }
66
+ });
67
+ });
68
+ //# sourceMappingURL=pi-manifest-packed.integration.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pi-manifest-packed.integration.test.js","sourceRoot":"","sources":["../../src/test/pi-manifest-packed.integration.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAE/D,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CACxE,CAAC;AACJ,CA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,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agent-comms",
3
3
  "description": "Cross-harness communication mesh for LLM agents — rooms, DMs, presence, and real-time push delivery over TCP",
4
- "version": "8.15.10",
4
+ "version": "8.15.11",
5
5
  "bin": {
6
6
  "agent-comms": "dist/cli.js"
7
7
  },