@ag-eco/agentplate-cli 0.13.2 → 0.13.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ag-eco/agentplate-cli",
3
- "version": "0.13.2",
3
+ "version": "0.13.4",
4
4
  "description": "Multi-agent orchestration for AI coding agents — spawn workers in git worktrees via tmux, coordinate through SQLite mail, merge with tiered conflict resolution. Pluggable runtime adapters for Claude Code, Pi, and more.",
5
5
  "author": "Jaymin West",
6
6
  "license": "MIT",
@@ -96,7 +96,11 @@ const SIBLING_TOOLS: SiblingTool[] = [
96
96
  * tool's entrypoint resolved inside this package. PATH-independent.
97
97
  */
98
98
  function toolArgv(tool: SiblingTool, ...cmd: string[]): string[] {
99
- const entryPath = new URL(tool.entry, import.meta.url).pathname;
99
+ // Resolve via import.meta.dir (a decoded filesystem path) rather than
100
+ // `new URL(...).pathname`, which percent-encodes — a path like
101
+ // `/Users/Jane Doe/...` would become `/Users/Jane%20Doe/...` and fail to
102
+ // spawn, surfacing as a spurious "loam/sprout/trellis unavailable" error.
103
+ const entryPath = join(import.meta.dir, tool.entry);
100
104
  return [process.execPath, entryPath, ...cmd];
101
105
  }
102
106
 
@@ -139,13 +139,15 @@ export function resolveUiDistPath(
139
139
  ): string {
140
140
  const projectDist = join(projectRoot, "ui", "dist");
141
141
  if (_exists(projectDist)) return projectDist;
142
- return new URL("../../ui/dist", import.meta.url).pathname;
142
+ // import.meta.dir is a decoded filesystem path; `new URL(...).pathname` would
143
+ // percent-encode spaces/special chars in the install path and 404 the SPA.
144
+ return join(import.meta.dir, "..", "..", "ui", "dist");
143
145
  }
144
146
 
145
147
  /** Read the package version once at module load to avoid circular imports with index.ts. */
146
148
  const _pkgVersion = (): string => {
147
149
  try {
148
- const raw = readFileSync(new URL("../../package.json", import.meta.url).pathname, "utf-8");
150
+ const raw = readFileSync(join(import.meta.dir, "..", "..", "package.json"), "utf-8");
149
151
  return (JSON.parse(raw) as { version: string }).version;
150
152
  } catch {
151
153
  return "unknown";
@@ -49,14 +49,17 @@ describe("checkDatabases", () => {
49
49
  rmSync(tempDir, { recursive: true, force: true });
50
50
  });
51
51
 
52
- test("fails when required database files do not exist (merge-queue.db is optional)", () => {
52
+ test("fails only for sessions.db when no databases exist (mail/metrics/merge-queue are optional)", () => {
53
53
  const checks = checkDatabases(mockConfig, tempDir) as DoctorCheck[];
54
54
 
55
55
  expect(checks).toHaveLength(4);
56
- expect(checks[0]?.status).toBe("fail");
56
+ // mail.db and metrics.db are created lazily on first write (first mail /
57
+ // first session-end metric) — their absence in a fresh project is normal.
58
+ expect(checks[0]?.status).toBe("pass");
57
59
  expect(checks[0]?.name).toBe("mail.db exists");
58
- expect(checks[1]?.status).toBe("fail");
60
+ expect(checks[1]?.status).toBe("pass");
59
61
  expect(checks[1]?.name).toBe("metrics.db exists");
62
+ // sessions.db is created at `ap init` (run creation), so its absence is a failure.
60
63
  expect(checks[2]?.status).toBe("fail");
61
64
  expect(checks[2]?.name).toBe("sessions.db exists");
62
65
  // merge-queue.db is created lazily on first merge — its absence is normal.
@@ -21,6 +21,7 @@ export const checkDatabases: DoctorCheckFn = (_config, agentplateDir): DoctorChe
21
21
  }> = [
22
22
  {
23
23
  name: "mail.db",
24
+ optional: true,
24
25
  tables: ["messages"],
25
26
  requiredColumns: {
26
27
  messages: [
@@ -40,6 +41,7 @@ export const checkDatabases: DoctorCheckFn = (_config, agentplateDir): DoctorChe
40
41
  },
41
42
  {
42
43
  name: "metrics.db",
44
+ optional: true,
43
45
  tables: ["sessions"],
44
46
  requiredColumns: {
45
47
  sessions: [
@@ -246,7 +246,9 @@ describe("checkEcosystem", () => {
246
246
  const results = await check(mockConfig, "/tmp/.agentplate");
247
247
 
248
248
  const loam = results.find((r) => r.name === "loam semver");
249
- const hasHint = loam?.details?.some((d) => d.includes("@ag-eco/loam-cli"));
249
+ // loam/sprout/trellis are bundled into @ag-eco/agentplate-cli now, so the
250
+ // install hint points at the single package, not a standalone @ag-eco/loam-cli.
251
+ const hasHint = loam?.details?.some((d) => d.includes("@ag-eco/agentplate-cli"));
250
252
  expect(hasHint).toBe(true);
251
253
  });
252
254
 
package/src/version.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Single source of truth for the package version, shared by every bundled bin
3
3
  * (ap/agentplate, lm/loam, sr, tl). Updated by scripts/version-bump.ts.
4
4
  */
5
- export const VERSION = "0.13.2";
5
+ export const VERSION = "0.13.4";