pantheon-cli 0.2.119 → 0.2.121

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/dist/pantheon.mjs CHANGED
@@ -44701,7 +44701,8 @@ If you are an agent:
44701
44701
  - Never run pantheon handoff / pantheon resume in a shell
44702
44702
  - Do not import @pantheon/core or write ~/pantheon yourself
44703
44703
  - If pantheon_* tools are missing, tell the human to run
44704
- pantheon mcp-install and reload MCP. Do not invent spaces.
44704
+ npm i -g pantheon-cli@latest and reload MCP. Global updates refresh existing
44705
+ agent configuration automatically. Do not invent spaces.
44705
44706
  - If a write loses its receipt to a closed connection or timeout, Drive may
44706
44707
  still be uploading. Say the outcome is unconfirmed, reload MCP, and repeat
44707
44708
  it; Pantheon deduplicates.
@@ -44810,7 +44811,7 @@ Terminal (this CLI)
44810
44811
  sync optional escape hatch \u2014 handoff/resume already sync
44811
44812
  spaces list local consciences (spaces)
44812
44813
  help this guide
44813
- mcp-install repair/refresh agent config after connecting
44814
+ mcp-install repair agent config only when automatic setup failed
44814
44815
  mcp-uninstall remove Pantheon MCP from Cursor / Claude / Codex / Windsurf
44815
44816
  (ChatGPT Classic, Replit, and Grok Bot have no local MCP)
44816
44817
  mcp start the stdio MCP server (agents launch this)
@@ -48309,8 +48310,7 @@ function installMcpClients(home) {
48309
48310
  detail: "Settings \u2192 Agent setup \u2192 Grok Bot (HTTPS MCP + browser OAuth)"
48310
48311
  });
48311
48312
  }
48312
- writeSlashCommands();
48313
- writeCodexSkill();
48313
+ installAgentAssets();
48314
48314
  written.push({ name: "/pantheon-* commands", detail: "~/.cursor, ~/.claude" });
48315
48315
  written.push({ name: "Agent skill", detail: "~/.agents, ~/.codex" });
48316
48316
  skipped.push({ name: "ChatGPT Classic", detail: "no local MCP \u2014 use ChatGPT.app or Codex" });
@@ -48396,6 +48396,15 @@ function installMcpFromConfig() {
48396
48396
  if (!stored) throw new Error("Not connected. Run pantheon connect <code> first.");
48397
48397
  return { ...installMcpClients(stored.config.home), apiUrl: stored.config.apiUrl };
48398
48398
  }
48399
+ function installAfterGlobalUpdate() {
48400
+ const stored = loadMachineConfig();
48401
+ if (!stored) {
48402
+ installAgentAssets();
48403
+ return { connected: false };
48404
+ }
48405
+ installMcpClients(stored.config.home);
48406
+ return { connected: true };
48407
+ }
48399
48408
 
48400
48409
  // src/progress.ts
48401
48410
  import { spawn } from "node:child_process";
@@ -49280,6 +49289,21 @@ function positional() {
49280
49289
  return void 0;
49281
49290
  }
49282
49291
  async function main() {
49292
+ if (cmd === "_postinstall") {
49293
+ const globalInstall = ["1", "true"].includes(
49294
+ (process.env.npm_config_global || "").toLowerCase()
49295
+ );
49296
+ if (!globalInstall) return;
49297
+ try {
49298
+ installAfterGlobalUpdate();
49299
+ } catch (error2) {
49300
+ process.stderr.write(
49301
+ `pantheon: installed, but agent configuration refresh needs repair \u2014 ${error2 instanceof Error ? error2.message : String(error2)}
49302
+ `
49303
+ );
49304
+ }
49305
+ return;
49306
+ }
49283
49307
  if (!cmd || cmd === "help" || cmd === "--help" || cmd === "-h") {
49284
49308
  process.stdout.write(GUIDE);
49285
49309
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pantheon-cli",
3
- "version": "0.2.119",
3
+ "version": "0.2.121",
4
4
  "description": "Carry agent conscience between AI coding agents. Hand off a conversation in one agent, resume it in another.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,7 +8,8 @@
8
8
  "pantheon": "./dist/pantheon.mjs"
9
9
  },
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "postinstall.mjs"
12
13
  ],
13
14
  "engines": {
14
15
  "node": ">=20"
@@ -36,6 +37,7 @@
36
37
  "scripts": {
37
38
  "start": "tsx src/index.ts",
38
39
  "test": "tsx --test test/*.test.ts",
39
- "build": "node scripts/build.mjs"
40
+ "build": "node scripts/build.mjs",
41
+ "postinstall": "node postinstall.mjs"
40
42
  }
41
43
  }
@@ -0,0 +1,21 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { fileURLToPath } from "node:url";
3
+
4
+ const globalInstall = ["1", "true"].includes(
5
+ (process.env.npm_config_global || "").toLowerCase(),
6
+ );
7
+
8
+ // Local workspace installs may run before dist exists. Only a published global
9
+ // install should refresh files in the user's agent configuration directories.
10
+ if (globalInstall) {
11
+ const cli = fileURLToPath(new URL("./dist/pantheon.mjs", import.meta.url));
12
+ const result = spawnSync(process.execPath, [cli, "_postinstall"], {
13
+ env: process.env,
14
+ stdio: "inherit",
15
+ });
16
+ if (result.error) {
17
+ process.stderr.write(
18
+ `pantheon: installed, but automatic agent refresh could not start — ${result.error.message}\n`,
19
+ );
20
+ }
21
+ }