@modootoday/pmcp 0.18.2 → 0.18.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.
Files changed (108) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.mcp.json +1 -1
  5. package/CONTRIBUTING.md +10 -1
  6. package/README.md +22 -20
  7. package/dist/{apply-JUTGS5WZ.js → apply-75UWIUVQ.js} +12 -11
  8. package/dist/{available-DBSIVVJ6.js → available-GFMTJW4E.js} +3 -3
  9. package/dist/{chunk-I2ZP2PSA.js → chunk-3CA3NNVH.js} +5 -5
  10. package/dist/{chunk-VRPMYPZU.js → chunk-45Y3KZ3Q.js} +22 -2
  11. package/dist/{chunk-KMXRRSKT.js → chunk-4CRRLDDS.js} +1 -1
  12. package/dist/{chunk-LW4TG7EL.js → chunk-4JUSGIMX.js} +2 -2
  13. package/dist/{chunk-TXQ7L33K.js → chunk-6UXJ62XJ.js} +3 -3
  14. package/dist/{chunk-T3LKX23M.js → chunk-7B6IC3F7.js} +3 -3
  15. package/dist/{chunk-D77IRGHO.js → chunk-ARA4VDHD.js} +5 -5
  16. package/dist/{chunk-QEF7EK3T.js → chunk-DAR6RGRN.js} +2 -2
  17. package/dist/{chunk-BBTBJCFA.js → chunk-F5WBMUOT.js} +2 -2
  18. package/dist/{chunk-7HFIGCSL.js → chunk-FBIDDE3N.js} +19 -7
  19. package/dist/{chunk-NLEXKE7U.js → chunk-HE2C2S5A.js} +3 -3
  20. package/dist/{chunk-5QQWS4US.js → chunk-HEBCQTOD.js} +2 -2
  21. package/dist/{chunk-AJ4VXM2U.js → chunk-HEWZ6INU.js} +2 -2
  22. package/dist/{chunk-MPSQXSC6.js → chunk-ISZOLR3D.js} +5 -3
  23. package/dist/{chunk-TVL5RTE6.js → chunk-ITDJ2EXN.js} +11 -1
  24. package/dist/{chunk-PAX3QXX2.js → chunk-J5ZS7GLA.js} +2 -2
  25. package/dist/chunk-J6KL3COD.js +34 -0
  26. package/dist/{chunk-CJTKR6K6.js → chunk-JZK7ZO7K.js} +2 -2
  27. package/dist/{chunk-A7VF7A35.js → chunk-LFR245MZ.js} +5 -5
  28. package/dist/{chunk-7UCZAN4J.js → chunk-LGO2SZAS.js} +3 -3
  29. package/dist/{chunk-DMZHQZ7P.js → chunk-MSOZPOPX.js} +25 -3
  30. package/dist/chunk-MZCRCMEY.js +7 -0
  31. package/dist/{chunk-7GBYECSK.js → chunk-NLHLA2N5.js} +3 -3
  32. package/dist/{chunk-HDMBVLCZ.js → chunk-NWOV2E26.js} +2 -2
  33. package/dist/{chunk-RPQOBHVU.js → chunk-OB3P5RMN.js} +3 -3
  34. package/dist/{chunk-IG33DXLT.js → chunk-QBJC4DRP.js} +18 -18
  35. package/dist/{chunk-47O3X4VS.js → chunk-QRCAGKC6.js} +1 -1
  36. package/dist/{chunk-F5QYZK7E.js → chunk-R26RWSFW.js} +2 -2
  37. package/dist/{chunk-3IDXEV5E.js → chunk-TFRJ5QOS.js} +67 -17
  38. package/dist/{chunk-FENOGX3U.js → chunk-VQ2HEGWH.js} +2 -2
  39. package/dist/{chunk-2FIV63WC.js → chunk-XMXBE5IQ.js} +6 -6
  40. package/dist/{chunk-TNCZ6444.js → chunk-Y2XASHVY.js} +2 -2
  41. package/dist/{chunk-PKODFR5F.js → chunk-YRGDWUFY.js} +2 -2
  42. package/dist/{chunk-VMHUEOT5.js → chunk-YSUINA5Q.js} +9 -7
  43. package/dist/{chunk-3FCFAQDG.js → chunk-ZWLUH3F2.js} +2 -2
  44. package/dist/cli.js +3 -3
  45. package/dist/{completion-ILSRB3LW.js → completion-WYJAKJE4.js} +2 -2
  46. package/dist/{diagnostics-XKXVVQWH.js → diagnostics-ADIVFSBW.js} +7 -6
  47. package/dist/{doctor-O2E63YGO.js → doctor-BBCS4DF5.js} +12 -11
  48. package/dist/{entry-X6CSYQRQ.js → entry-DMOTX4SS.js} +13 -12
  49. package/dist/{exec-mcp-2PMWBPD7.js → exec-mcp-OBUM3DVW.js} +7 -6
  50. package/dist/{harness-L2KSI2ZB.js → harness-6AUE3I4Q.js} +4 -4
  51. package/dist/harness-launch-gate.js +6 -5
  52. package/dist/harness-pane-runner.js +2 -1
  53. package/dist/harness-worker.js +8 -7
  54. package/dist/{hooks-BHTA44X7.js → hooks-HLPQPVRY.js} +3 -3
  55. package/dist/{host-UWK754BW.js → host-5Q3X6OY7.js} +9 -8
  56. package/dist/{host-UIZAXXQH.js → host-LGSWU3PJ.js} +8 -7
  57. package/dist/{host-run-BI2OTZDZ.js → host-run-4NMQQASQ.js} +23 -10
  58. package/dist/http.js +5 -5
  59. package/dist/{import-mcp-GPKJI7DI.js → import-mcp-WU7TO2RT.js} +5 -4
  60. package/dist/index.d.ts +5 -1
  61. package/dist/index.js +17 -16
  62. package/dist/{init-3C2Y7BNJ.js → init-XA6XXLGA.js} +2 -2
  63. package/dist/{install-GG7HHZK2.js → install-MQ7QSJQ7.js} +3 -3
  64. package/dist/invoke-CYQZYU5T.js +24 -0
  65. package/dist/{list-MCP2FXUF.js → list-FB6RNYYB.js} +3 -3
  66. package/dist/{list-WL6L4J5H.js → list-FNGXY5D7.js} +7 -6
  67. package/dist/{logout-F5EJ5MOU.js → logout-N753FBZP.js} +6 -5
  68. package/dist/mailbox/index.js +4 -4
  69. package/dist/{mailbox-GDJ7BWQN.js → mailbox-5DWLH4W2.js} +3 -3
  70. package/dist/{mcp-FJ2UQ4RH.js → mcp-AXHV547W.js} +5 -5
  71. package/dist/{mcp-235QZN2A.js → mcp-GR4VXKTG.js} +2 -2
  72. package/dist/{project-5YV5CUEG.js → project-OEBACWEX.js} +4 -4
  73. package/dist/{recovery-U6QB3PMT.js → recovery-54KHNJX4.js} +4 -3
  74. package/dist/{reindex-Y27QJFDB.js → reindex-ZULHSQWY.js} +5 -5
  75. package/dist/{run-3SOVRQIA.js → run-7XNGPU2I.js} +4 -4
  76. package/dist/{run-3AXTZSR7.js → run-MDRUOEFL.js} +5 -4
  77. package/dist/{serve-DQMKTFIV.js → serve-HXHNWKEK.js} +12 -12
  78. package/dist/{start-login-YTZV6KMF.js → start-login-PWCEKNED.js} +6 -5
  79. package/dist/{status-MROQ7WR7.js → status-54IYX2FN.js} +6 -5
  80. package/dist/{status-UME2L33L.js → status-QFOBQ42J.js} +9 -8
  81. package/dist/stdio.js +7 -7
  82. package/dist/{test-AGZOJLRZ.js → test-36ZUVALT.js} +6 -5
  83. package/dist/{tui-G5LLWCSV.js → tui-CSRW4DN2.js} +5 -5
  84. package/dist/{validate-IU52H2IC.js → validate-AVM2VHMM.js} +4 -4
  85. package/dist/{worker-QZ5T6LJD.js → worker-EODWT4KK.js} +11 -10
  86. package/docs/compatibility.md +2 -1
  87. package/docs/known-issues.md +17 -0
  88. package/docs/project-configuration.md +8 -0
  89. package/docs/terminal-harness.md +14 -0
  90. package/docs/upgrading.md +23 -0
  91. package/gemini-extension.json +2 -2
  92. package/mcp.json +1 -1
  93. package/package.json +5 -6
  94. package/plugin.json +1 -1
  95. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  96. package/plugins/pmcp/.mcp.json +1 -1
  97. package/plugins/pmcp/gemini-extension.json +2 -2
  98. package/plugins/pmcp/mcp.json +1 -1
  99. package/plugins/pmcp/plugin.json +1 -1
  100. package/plugins/pmcp/skills/agent-assets-migrate/SKILL.md +8 -8
  101. package/plugins/pmcp/skills/marketplace-plugin-scaffold/SKILL.md +10 -8
  102. package/plugins/pmcp/skills/skill-package-scaffold/SKILL.md +12 -12
  103. package/skills/agent-assets-migrate/SKILL.md +8 -8
  104. package/skills/marketplace-plugin-scaffold/SKILL.md +10 -8
  105. package/skills/skill-package-scaffold/SKILL.md +12 -12
  106. package/CHANGELOG.md +0 -152
  107. package/dist/chunk-65KAQSJP.js +0 -7
  108. package/dist/invoke-44CJRVMK.js +0 -23
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  OPENCODE_CONFIG,
3
3
  mcpOutputs
4
- } from "./chunk-F5QYZK7E.js";
4
+ } from "./chunk-R26RWSFW.js";
5
5
  import {
6
6
  MARK,
7
7
  NATIVE_HOOK_FILES,
@@ -25,7 +25,7 @@ import {
25
25
  splitKeyed,
26
26
  uiClaudeOutputs,
27
27
  withoutBlock
28
- } from "./chunk-VRPMYPZU.js";
28
+ } from "./chunk-45Y3KZ3Q.js";
29
29
  import {
30
30
  ProjectError,
31
31
  RULES_DIR,
@@ -37,12 +37,12 @@ import {
37
37
  } from "./chunk-73AKO4UL.js";
38
38
  import {
39
39
  hostOutputs
40
- } from "./chunk-DMZHQZ7P.js";
40
+ } from "./chunk-MSOZPOPX.js";
41
41
  import {
42
42
  lockVersionProblem,
43
43
  readLock,
44
44
  replaceFile
45
- } from "./chunk-7HFIGCSL.js";
45
+ } from "./chunk-FBIDDE3N.js";
46
46
  import {
47
47
  CODEX_PLUGIN_LIST,
48
48
  claudeSettings,
@@ -1022,4 +1022,4 @@ export {
1022
1022
  prepare,
1023
1023
  checkProject
1024
1024
  };
1025
- //# sourceMappingURL=chunk-A7VF7A35.js.map
1025
+ //# sourceMappingURL=chunk-LFR245MZ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-34DECPVC.js";
4
4
  import {
5
5
  ptyBinary
6
- } from "./chunk-DMZHQZ7P.js";
6
+ } from "./chunk-MSOZPOPX.js";
7
7
  import {
8
8
  GroupStore,
9
9
  egressPolicy,
@@ -11,7 +11,7 @@ import {
11
11
  profileName,
12
12
  readPrivateJson,
13
13
  selectedProfile
14
- } from "./chunk-TVL5RTE6.js";
14
+ } from "./chunk-ITDJ2EXN.js";
15
15
  import {
16
16
  integer,
17
17
  object,
@@ -775,4 +775,4 @@ export {
775
775
  prepareBridge,
776
776
  assertBridge
777
777
  };
778
- //# sourceMappingURL=chunk-7UCZAN4J.js.map
778
+ //# sourceMappingURL=chunk-LGO2SZAS.js.map
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  nativeBinary,
3
3
  readLock
4
- } from "./chunk-7HFIGCSL.js";
4
+ } from "./chunk-FBIDDE3N.js";
5
+ import {
6
+ pickEnv
7
+ } from "./chunk-J6KL3COD.js";
5
8
 
6
9
  // src/project/host.ts
7
10
  import { createHash } from "crypto";
@@ -37,7 +40,9 @@ function hostManifest(host) {
37
40
  labels: { ...s.labels, "pmcp.host": s.name },
38
41
  restart: s.restart,
39
42
  max_restarts: s.maxRestarts,
40
- delivery_setup: true
43
+ delivery_setup: true,
44
+ // Only when declared, so an approval made before env existed stays valid.
45
+ ...s.env.length > 0 ? { env: s.env } : {}
41
46
  }))
42
47
  };
43
48
  }
@@ -66,6 +71,22 @@ function ptyBinaryDoctor(env) {
66
71
  detail: "pmcp-pty not found; set PMCP_PTY_BIN or put it on PATH"
67
72
  };
68
73
  }
74
+ function hostEnvDoctor(spec, env) {
75
+ return (spec.host?.sessions ?? []).filter((s) => s.env.length > 0).map((s) => {
76
+ const { missing } = pickEnv(s.env, env);
77
+ return missing.length === 0 ? {
78
+ tool: "project",
79
+ check: `host env (${s.name})`,
80
+ status: "ok",
81
+ detail: `set: ${s.env.join(", ")}`
82
+ } : {
83
+ tool: "project",
84
+ check: `host env (${s.name})`,
85
+ status: "warn",
86
+ detail: `not set: ${missing.join(", ")}; host up refuses ${s.name} until they are`
87
+ };
88
+ });
89
+ }
69
90
  var sha256 = (text) => createHash("sha256").update(text).digest("hex");
70
91
  function hostDoctor(spec) {
71
92
  if (!spec.host) return [];
@@ -99,6 +120,7 @@ export {
99
120
  hostOutputs,
100
121
  ptyBinary,
101
122
  ptyBinaryDoctor,
123
+ hostEnvDoctor,
102
124
  hostDoctor
103
125
  };
104
- //# sourceMappingURL=chunk-DMZHQZ7P.js.map
126
+ //# sourceMappingURL=chunk-MSOZPOPX.js.map
@@ -0,0 +1,7 @@
1
+ // src/commands/version.ts
2
+ var VERSION = "0.18.4";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-MZCRCMEY.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  loadEmbedder,
3
3
  openEntryVectors
4
- } from "./chunk-MPSQXSC6.js";
4
+ } from "./chunk-ISZOLR3D.js";
5
5
  import {
6
6
  readCatalog
7
- } from "./chunk-KMXRRSKT.js";
7
+ } from "./chunk-4CRRLDDS.js";
8
8
  import {
9
9
  DEFAULT_MODEL_ID,
10
10
  resolveEncoder
@@ -69,4 +69,4 @@ async function prepareSearch(catalog, options) {
69
69
  export {
70
70
  prepareSearch
71
71
  };
72
- //# sourceMappingURL=chunk-7GBYECSK.js.map
72
+ //# sourceMappingURL=chunk-NLHLA2N5.js.map
@@ -4,7 +4,7 @@ import {
4
4
  MailboxStore,
5
5
  readCredential,
6
6
  writeBindingFile
7
- } from "./chunk-CJTKR6K6.js";
7
+ } from "./chunk-JZK7ZO7K.js";
8
8
 
9
9
  // src/mailbox/attachment.ts
10
10
  async function attachMailbox(options) {
@@ -50,4 +50,4 @@ async function attachMailbox(options) {
50
50
  export {
51
51
  attachMailbox
52
52
  };
53
- //# sourceMappingURL=chunk-HDMBVLCZ.js.map
53
+ //# sourceMappingURL=chunk-NWOV2E26.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createSkillServer
3
- } from "./chunk-D77IRGHO.js";
3
+ } from "./chunk-ARA4VDHD.js";
4
4
  import {
5
5
  attachMailbox
6
- } from "./chunk-HDMBVLCZ.js";
6
+ } from "./chunk-NWOV2E26.js";
7
7
 
8
8
  // src/stdio.ts
9
9
  import { serveStdio } from "@modelcontextprotocol/server/stdio";
@@ -84,4 +84,4 @@ export {
84
84
  serveWithMailbox,
85
85
  main
86
86
  };
87
- //# sourceMappingURL=chunk-RPQOBHVU.js.map
87
+ //# sourceMappingURL=chunk-OB3P5RMN.js.map
@@ -61,15 +61,15 @@ var completionSpec = {
61
61
  var COMMANDS = [
62
62
  {
63
63
  ...statusSpec,
64
- load: async () => (await import("./status-UME2L33L.js")).statusCommand
64
+ load: async () => (await import("./status-QFOBQ42J.js")).statusCommand
65
65
  },
66
- { ...initSpec, load: async () => (await import("./init-3C2Y7BNJ.js")).initCommand },
67
- { ...hooksSpec, load: async () => (await import("./hooks-BHTA44X7.js")).hooksCommand },
68
- { ...serveSpec, load: async () => (await import("./serve-DQMKTFIV.js")).serveCommand },
69
- { ...listSpec, load: async () => (await import("./list-MCP2FXUF.js")).listCommand },
66
+ { ...initSpec, load: async () => (await import("./init-XA6XXLGA.js")).initCommand },
67
+ { ...hooksSpec, load: async () => (await import("./hooks-HLPQPVRY.js")).hooksCommand },
68
+ { ...serveSpec, load: async () => (await import("./serve-HXHNWKEK.js")).serveCommand },
69
+ { ...listSpec, load: async () => (await import("./list-FB6RNYYB.js")).listCommand },
70
70
  {
71
71
  ...indexSpec,
72
- load: async () => (await import("./reindex-Y27QJFDB.js")).indexCommand
72
+ load: async () => (await import("./reindex-ZULHSQWY.js")).indexCommand
73
73
  },
74
74
  {
75
75
  ...modelsSpec,
@@ -89,7 +89,7 @@ var COMMANDS = [
89
89
  },
90
90
  {
91
91
  ...availableSpec,
92
- load: async () => (await import("./available-DBSIVVJ6.js")).availableCommand
92
+ load: async () => (await import("./available-GFMTJW4E.js")).availableCommand
93
93
  },
94
94
  {
95
95
  ...previewSpec,
@@ -97,16 +97,16 @@ var COMMANDS = [
97
97
  },
98
98
  {
99
99
  ...installSpec,
100
- load: async () => (await import("./install-GG7HHZK2.js")).installCommand
100
+ load: async () => (await import("./install-MQ7QSJQ7.js")).installCommand
101
101
  },
102
- { ...syncSpec, load: async () => (await import("./install-GG7HHZK2.js")).syncCommand },
102
+ { ...syncSpec, load: async () => (await import("./install-MQ7QSJQ7.js")).syncCommand },
103
103
  {
104
104
  ...projectSpec,
105
- load: async () => (await import("./project-5YV5CUEG.js")).projectCommand
105
+ load: async () => (await import("./project-OEBACWEX.js")).projectCommand
106
106
  },
107
107
  {
108
108
  ...doctorSpec,
109
- load: async () => (await import("./doctor-O2E63YGO.js")).doctorCommand
109
+ load: async () => (await import("./doctor-BBCS4DF5.js")).doctorCommand
110
110
  },
111
111
  {
112
112
  ...sessionsSpec,
@@ -114,27 +114,27 @@ var COMMANDS = [
114
114
  },
115
115
  { ...logsSpec, load: async () => (await import("./logs-TBUA4UWU.js")).logsCommand },
116
116
  { ...gitSpec, load: async () => (await import("./cli-ZN7ZVDEZ.js")).gitCommand },
117
- { ...mcpSpec, load: async () => (await import("./mcp-235QZN2A.js")).mcpCommand },
117
+ { ...mcpSpec, load: async () => (await import("./mcp-GR4VXKTG.js")).mcpCommand },
118
118
  {
119
119
  ...validateSpec,
120
- load: async () => (await import("./validate-IU52H2IC.js")).validateCommand
120
+ load: async () => (await import("./validate-AVM2VHMM.js")).validateCommand
121
121
  },
122
122
  {
123
123
  ...mailboxSpec,
124
- load: async () => (await import("./mailbox-GDJ7BWQN.js")).mailboxCommand
124
+ load: async () => (await import("./mailbox-5DWLH4W2.js")).mailboxCommand
125
125
  },
126
126
  {
127
127
  ...harnessSpec,
128
- load: async () => (await import("./harness-L2KSI2ZB.js")).harnessCommand
128
+ load: async () => (await import("./harness-6AUE3I4Q.js")).harnessCommand
129
129
  },
130
- { ...tuiSpec, load: async () => (await import("./tui-G5LLWCSV.js")).tuiCommand },
130
+ { ...tuiSpec, load: async () => (await import("./tui-CSRW4DN2.js")).tuiCommand },
131
131
  {
132
132
  ...marketplaceSpec,
133
133
  load: async () => (await import("./marketplace-G4VQET5W.js")).marketplaceCommand
134
134
  },
135
135
  {
136
136
  ...completionSpec,
137
- load: async () => (await import("./completion-ILSRB3LW.js")).completionCommand
137
+ load: async () => (await import("./completion-WYJAKJE4.js")).completionCommand
138
138
  }
139
139
  ];
140
140
  var PLANNED = [];
@@ -148,4 +148,4 @@ export {
148
148
  PLANNED,
149
149
  commandNamed
150
150
  };
151
- //# sourceMappingURL=chunk-IG33DXLT.js.map
151
+ //# sourceMappingURL=chunk-QBJC4DRP.js.map
@@ -110,4 +110,4 @@ export {
110
110
  messageSchema,
111
111
  cursorSchema
112
112
  };
113
- //# sourceMappingURL=chunk-47O3X4VS.js.map
113
+ //# sourceMappingURL=chunk-QRCAGKC6.js.map
@@ -2,7 +2,7 @@ import {
2
2
  MARK,
3
3
  blockOutput,
4
4
  jsonOutput
5
- } from "./chunk-VRPMYPZU.js";
5
+ } from "./chunk-45Y3KZ3Q.js";
6
6
  import {
7
7
  ProjectError
8
8
  } from "./chunk-NRBQK6UX.js";
@@ -393,4 +393,4 @@ export {
393
393
  serversForTool,
394
394
  mcpOutputs
395
395
  };
396
- //# sourceMappingURL=chunk-F5QYZK7E.js.map
396
+ //# sourceMappingURL=chunk-R26RWSFW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  assertNativeHost
3
- } from "./chunk-LW4TG7EL.js";
3
+ } from "./chunk-4JUSGIMX.js";
4
4
  import {
5
5
  locateExecutable
6
6
  } from "./chunk-R2GPCZUX.js";
@@ -33,7 +33,7 @@ import {
33
33
  resourceClaim,
34
34
  resourceRunning,
35
35
  runtimeUnit
36
- } from "./chunk-7UCZAN4J.js";
36
+ } from "./chunk-LGO2SZAS.js";
37
37
  import {
38
38
  command
39
39
  } from "./chunk-34DECPVC.js";
@@ -44,7 +44,7 @@ import {
44
44
  profileName,
45
45
  readPrivateJson,
46
46
  selectedProfile
47
- } from "./chunk-TVL5RTE6.js";
47
+ } from "./chunk-ITDJ2EXN.js";
48
48
  import {
49
49
  id,
50
50
  integer,
@@ -55,11 +55,22 @@ import {
55
55
  import {
56
56
  runtimeExecutables
57
57
  } from "./chunk-BU65MNVU.js";
58
+ import {
59
+ envNames,
60
+ pickEnv
61
+ } from "./chunk-J6KL3COD.js";
58
62
 
59
63
  // src/harness/groups/service.ts
60
64
  import { randomUUID as randomUUID2 } from "crypto";
61
- import { realpathSync as realpathSync4, statSync, unlinkSync as unlinkSync2 } from "fs";
65
+ import {
66
+ existsSync as existsSync3,
67
+ readFileSync,
68
+ realpathSync as realpathSync4,
69
+ statSync,
70
+ unlinkSync as unlinkSync2
71
+ } from "fs";
62
72
  import { join as join9 } from "path";
73
+ import { parse } from "smol-toml";
63
74
 
64
75
  // src/harness/adapters/terminal/lifecycle.ts
65
76
  import { randomUUID } from "crypto";
@@ -755,7 +766,15 @@ async function start(connection, spec) {
755
766
  ] : gate;
756
767
  connection.ensure();
757
768
  connection.must(
758
- spawnRequest(connection, id2, nonce, argv, spec.cwd, spec.runtime)
769
+ spawnRequest(
770
+ connection,
771
+ id2,
772
+ nonce,
773
+ argv,
774
+ spec.cwd,
775
+ spec.runtime,
776
+ pickEnv(spec.envNames ?? [], process.env).values
777
+ )
759
778
  );
760
779
  const deadline = Date.now() + 5e3;
761
780
  while (!existsSync2(journal.path("proof"))) {
@@ -767,7 +786,7 @@ async function start(connection, spec) {
767
786
  records.save(proof.session);
768
787
  return proof.session;
769
788
  }
770
- function spawnRequest(connection, id2, nonce, argv, cwd, runtime) {
789
+ function spawnRequest(connection, id2, nonce, argv, cwd, runtime, env = {}) {
771
790
  return {
772
791
  op: "spawn",
773
792
  name: `pmcp-${id2}`,
@@ -776,7 +795,7 @@ function spawnRequest(connection, id2, nonce, argv, cwd, runtime) {
776
795
  cols: 160,
777
796
  rows: 42,
778
797
  profile: profileOf(runtime),
779
- env: { PMCP_PTY_BIN: connection.binary() },
798
+ env: { ...env, PMCP_PTY_BIN: connection.binary() },
780
799
  labels: {
781
800
  "pmcp.owner": connection.records.owner,
782
801
  "pmcp.session": id2,
@@ -1118,7 +1137,8 @@ async function budgetOperation(directory, operation) {
1118
1137
  generation: text(spec.generation, "generation"),
1119
1138
  role: spec.role,
1120
1139
  ...resource ? { resource } : {},
1121
- ...dockerPreparation ? { dockerPreparation } : {}
1140
+ ...dockerPreparation ? { dockerPreparation } : {},
1141
+ ...Array.isArray(spec.envNames) ? { envNames: spec.envNames } : {}
1122
1142
  });
1123
1143
  return { ok: true, session };
1124
1144
  }
@@ -1175,6 +1195,28 @@ function configureBudget(context, input) {
1175
1195
  }
1176
1196
 
1177
1197
  // src/harness/groups/service.ts
1198
+ function groupEnv(value) {
1199
+ try {
1200
+ return envNames(value, "env");
1201
+ } catch {
1202
+ throw new Error("invalid_env_names");
1203
+ }
1204
+ }
1205
+ function projectHarnessEnv(projectRoot) {
1206
+ const path = join9(projectRoot, "pmcp.toml");
1207
+ if (!existsSync3(path)) return void 0;
1208
+ let raw;
1209
+ try {
1210
+ raw = parse(readFileSync(path, "utf8"));
1211
+ } catch {
1212
+ throw new Error("invalid_project_config");
1213
+ }
1214
+ const harness = raw["harness"];
1215
+ if (harness === void 0) return void 0;
1216
+ if (harness === null || typeof harness !== "object" || Array.isArray(harness))
1217
+ throw new Error("invalid_env_names");
1218
+ return harness["env"];
1219
+ }
1178
1220
  async function createGroup(input) {
1179
1221
  const projectRoot = realpathSync4(text(input.projectRoot, "project_root"));
1180
1222
  if (!statSync(projectRoot).isDirectory())
@@ -1188,6 +1230,9 @@ async function createGroup(input) {
1188
1230
  const supported = Object.keys(runtimeExecutables);
1189
1231
  if (allowedRuntimes.some((runtime) => !supported.includes(runtime)))
1190
1232
  throw new Error("unsupported_runtime");
1233
+ const env = groupEnv(input.env ?? projectHarnessEnv(projectRoot));
1234
+ if (profile === "docker" && env.length > 0)
1235
+ throw new Error("env_requires_native_profile");
1191
1236
  const memoryMb = integer(input.memoryMb ?? 2048, "memory_budget", 128, 4096);
1192
1237
  const maxActive = integer(input.maxActive ?? 1, "max_active", 1, 5);
1193
1238
  const dockerPolicy2 = profile === "docker" ? loadDockerPolicy(input.dockerPolicyFile, projectRoot, allowedRuntimes) : void 0;
@@ -1205,7 +1250,8 @@ async function createGroup(input) {
1205
1250
  memoryMb,
1206
1251
  maxActive,
1207
1252
  sessions: [],
1208
- ...dockerPolicy2 ? { dockerPolicy: dockerPolicy2 } : {}
1253
+ ...dockerPolicy2 ? { dockerPolicy: dockerPolicy2 } : {},
1254
+ ...env.length > 0 ? { env } : {}
1209
1255
  };
1210
1256
  const groupFile = join9(backend.runDirectory, "group.json");
1211
1257
  privateJson(groupFile, { group, leases: [], deliveries: [] });
@@ -1538,12 +1584,12 @@ function inspectDeliveries(context, requestId) {
1538
1584
  import { randomUUID as randomUUID4 } from "crypto";
1539
1585
 
1540
1586
  // src/harness/adapters/process/recover-lock.ts
1541
- import { existsSync as existsSync3, lstatSync as lstatSync4, unlinkSync as unlinkSync3 } from "fs";
1587
+ import { existsSync as existsSync4, lstatSync as lstatSync4, unlinkSync as unlinkSync3 } from "fs";
1542
1588
  import { join as join11 } from "path";
1543
1589
  function recoverInputLock(backend, sessionId) {
1544
1590
  backend.inspect(sessionId);
1545
1591
  const path = join11(backend.runDirectory, `${sessionId}.input.lock`);
1546
- if (!existsSync3(path)) return;
1592
+ if (!existsSync4(path)) return;
1547
1593
  const before = lstatSync4(path);
1548
1594
  const record = object(readPrivateJson(path));
1549
1595
  if (record.id !== sessionId) throw new Error("foreign_writer_lock");
@@ -1559,7 +1605,7 @@ import { realpathSync as realpathSync5 } from "fs";
1559
1605
  import { relative as relative4 } from "path";
1560
1606
 
1561
1607
  // src/harness/launch/service.ts
1562
- import { existsSync as existsSync4 } from "fs";
1608
+ import { existsSync as existsSync5 } from "fs";
1563
1609
  function assertLaunchAdmission(records) {
1564
1610
  for (const journal of launchJournals(records)) {
1565
1611
  if (journal.abortRecord()?.state === "stopped" && unitActive(journal.intent().unit))
@@ -1584,12 +1630,12 @@ function inspectPendingStarts(context) {
1584
1630
  role: journal.intent().role,
1585
1631
  runtime: journal.intent().runtime,
1586
1632
  controllerExited: controllerExited(journal.intent().controllerIdentity),
1587
- proofPresent: existsSync4(journal.path("proof")),
1588
- recordPresent: existsSync4(journal.records.path(journal.id)),
1633
+ proofPresent: existsSync5(journal.path("proof")),
1634
+ recordPresent: existsSync5(journal.records.path(journal.id)),
1589
1635
  registered: context.store.state.group.sessions.some(
1590
1636
  (session) => session.id === journal.id
1591
1637
  ),
1592
- authorizationPresent: existsSync4(journal.path("grant")),
1638
+ authorizationPresent: existsSync5(journal.path("grant")),
1593
1639
  processingConfirmed: false,
1594
1640
  inputReplayed: false
1595
1641
  }));
@@ -1680,6 +1726,9 @@ async function startSession(context, input) {
1680
1726
  cwd
1681
1727
  );
1682
1728
  if (!executablePath) throw new Error("runtime_executable_unavailable");
1729
+ const envNames2 = group.env ?? [];
1730
+ const unset = pickEnv(envNames2, process.env).missing;
1731
+ if (unset.length > 0) throw new Error(`env_not_set:${unset.join(",")}`);
1683
1732
  const argv = resource ? [executablePath, "start", "--attach", "--interactive", resource.id] : [executablePath, ...args];
1684
1733
  const result = await budgetOperation(backend.runDirectory, {
1685
1734
  action: "start",
@@ -1692,7 +1741,8 @@ async function startSession(context, input) {
1692
1741
  generation: group.generation,
1693
1742
  role,
1694
1743
  ...resource ? { resource } : {},
1695
- ...dockerPreparation ? { dockerPreparation } : {}
1744
+ ...dockerPreparation ? { dockerPreparation } : {},
1745
+ ...envNames2.length > 0 ? { envNames: envNames2 } : {}
1696
1746
  }
1697
1747
  });
1698
1748
  const session = result.session;
@@ -1931,4 +1981,4 @@ export {
1931
1981
  isReadOnly,
1932
1982
  runOperation
1933
1983
  };
1934
- //# sourceMappingURL=chunk-3IDXEV5E.js.map
1984
+ //# sourceMappingURL=chunk-TFRJ5QOS.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-7DLZC73N.js";
4
4
  import {
5
5
  readSpec
6
- } from "./chunk-VRPMYPZU.js";
6
+ } from "./chunk-45Y3KZ3Q.js";
7
7
  import {
8
8
  ArgumentError
9
9
  } from "./chunk-A4PKLESO.js";
@@ -28,4 +28,4 @@ function specFrom(context) {
28
28
  export {
29
29
  specFrom
30
30
  };
31
- //# sourceMappingURL=chunk-FENOGX3U.js.map
31
+ //# sourceMappingURL=chunk-VQ2HEGWH.js.map
@@ -7,24 +7,24 @@ import {
7
7
  observeSession,
8
8
  openGroup,
9
9
  runOperation
10
- } from "./chunk-3IDXEV5E.js";
10
+ } from "./chunk-TFRJ5QOS.js";
11
11
  import {
12
12
  nativeHostTools
13
- } from "./chunk-LW4TG7EL.js";
13
+ } from "./chunk-4JUSGIMX.js";
14
14
  import {
15
15
  locateExecutable
16
16
  } from "./chunk-R2GPCZUX.js";
17
17
  import {
18
18
  artifact,
19
19
  stateDirectory
20
- } from "./chunk-7UCZAN4J.js";
20
+ } from "./chunk-LGO2SZAS.js";
21
21
  import {
22
22
  ptyBinary
23
- } from "./chunk-DMZHQZ7P.js";
23
+ } from "./chunk-MSOZPOPX.js";
24
24
  import {
25
25
  GroupStore,
26
26
  privateJson
27
- } from "./chunk-TVL5RTE6.js";
27
+ } from "./chunk-ITDJ2EXN.js";
28
28
  import {
29
29
  integer,
30
30
  object,
@@ -249,4 +249,4 @@ async function invoke(operation) {
249
249
  export {
250
250
  invoke
251
251
  };
252
- //# sourceMappingURL=chunk-2FIV63WC.js.map
252
+ //# sourceMappingURL=chunk-XMXBE5IQ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  operationSchema,
5
5
  sendSchema,
6
6
  sessionsSchema
7
- } from "./chunk-47O3X4VS.js";
7
+ } from "./chunk-QRCAGKC6.js";
8
8
 
9
9
  // src/tools/mailbox.ts
10
10
  function registerMailboxTools(server, service) {
@@ -54,4 +54,4 @@ function registerMailboxTools(server, service) {
54
54
  export {
55
55
  registerMailboxTools
56
56
  };
57
- //# sourceMappingURL=chunk-TNCZ6444.js.map
57
+ //# sourceMappingURL=chunk-Y2XASHVY.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOST_MANIFEST,
3
3
  HOST_POLICY
4
- } from "./chunk-DMZHQZ7P.js";
4
+ } from "./chunk-MSOZPOPX.js";
5
5
  import {
6
6
  projectStateDir
7
7
  } from "./chunk-OEH47H6A.js";
@@ -99,4 +99,4 @@ export {
99
99
  hostApprovalDoctor,
100
100
  writeApproval
101
101
  };
102
- //# sourceMappingURL=chunk-PKODFR5F.js.map
102
+ //# sourceMappingURL=chunk-YRGDWUFY.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  hostApprovalDoctor
3
- } from "./chunk-PKODFR5F.js";
3
+ } from "./chunk-YRGDWUFY.js";
4
4
  import {
5
5
  project
6
- } from "./chunk-I2ZP2PSA.js";
6
+ } from "./chunk-3CA3NNVH.js";
7
7
  import {
8
8
  wakeableBy
9
9
  } from "./chunk-WIW772I3.js";
@@ -16,16 +16,16 @@ import {
16
16
  marketplaceDoctor,
17
17
  skillNames,
18
18
  splitFrontmatter
19
- } from "./chunk-A7VF7A35.js";
19
+ } from "./chunk-LFR245MZ.js";
20
20
  import {
21
21
  ANTIGRAVITY_MCP_PLUGIN,
22
22
  serversForTool
23
- } from "./chunk-F5QYZK7E.js";
23
+ } from "./chunk-R26RWSFW.js";
24
24
  import {
25
25
  permissionDoctor,
26
26
  pluginBinaryDoctor,
27
27
  uiClaudeDoctor
28
- } from "./chunk-VRPMYPZU.js";
28
+ } from "./chunk-45Y3KZ3Q.js";
29
29
  import {
30
30
  pathPmcp,
31
31
  pmcpCommand
@@ -36,8 +36,9 @@ import {
36
36
  } from "./chunk-LTZH5E3G.js";
37
37
  import {
38
38
  hostDoctor,
39
+ hostEnvDoctor,
39
40
  ptyBinaryDoctor
40
- } from "./chunk-DMZHQZ7P.js";
41
+ } from "./chunk-MSOZPOPX.js";
41
42
  import {
42
43
  projectStateDir
43
44
  } from "./chunk-OEH47H6A.js";
@@ -619,6 +620,7 @@ function doctor(spec, options) {
619
620
  findings.push(...hostDoctor(spec));
620
621
  if (spec.host) findings.push(hostApprovalDoctor(spec.root));
621
622
  if (spec.host) findings.push(ptyBinaryDoctor(process.env));
623
+ findings.push(...hostEnvDoctor(spec, process.env));
622
624
  findings.push(...pluginBinaryDoctor(spec.mcp));
623
625
  const wanted = (tool) => spec.tools.has(tool) && (options.only === void 0 || options.only.has(tool));
624
626
  if (wanted("claude")) findings.push(...claude(spec, options));
@@ -640,4 +642,4 @@ export {
640
642
  spawnRunner,
641
643
  doctor
642
644
  };
643
- //# sourceMappingURL=chunk-VMHUEOT5.js.map
645
+ //# sourceMappingURL=chunk-YSUINA5Q.js.map
@@ -5,7 +5,7 @@ import {
5
5
  POLICIES,
6
6
  RUNTIMES,
7
7
  customPolicy
8
- } from "./chunk-VRPMYPZU.js";
8
+ } from "./chunk-45Y3KZ3Q.js";
9
9
 
10
10
  // src/hooks/inspection/list.ts
11
11
  function policyRows(compiled) {
@@ -39,4 +39,4 @@ function policyRows(compiled) {
39
39
  export {
40
40
  policyRows
41
41
  };
42
- //# sourceMappingURL=chunk-3FCFAQDG.js.map
42
+ //# sourceMappingURL=chunk-ZWLUH3F2.js.map
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  COMMANDS,
4
4
  PLANNED,
5
5
  commandNamed
6
- } from "./chunk-IG33DXLT.js";
6
+ } from "./chunk-QBJC4DRP.js";
7
7
  import "./chunk-2P4Z2NUX.js";
8
8
  import "./chunk-3Y3HDMHA.js";
9
9
  import {
@@ -32,7 +32,7 @@ import {
32
32
  import "./chunk-V4NPDK6X.js";
33
33
  import {
34
34
  VERSION
35
- } from "./chunk-65KAQSJP.js";
35
+ } from "./chunk-MZCRCMEY.js";
36
36
 
37
37
  // src/cli/ui.ts
38
38
  var ESC = String.fromCharCode(27);
@@ -185,7 +185,7 @@ async function defaultEntry(options, context) {
185
185
  });
186
186
  if (mode === "server") return run(required("serve"), [], context);
187
187
  if (mode === "terminal") {
188
- const { terminalSupport } = await import("./host-UIZAXXQH.js");
188
+ const { terminalSupport } = await import("./host-LGSWU3PJ.js");
189
189
  const support = terminalSupport();
190
190
  if (support.supported) return run(required("tui"), [], context);
191
191
  context.ui.info(`Terminal workspace unavailable: ${support.reason}`);