@modootoday/pmcp 0.18.3 → 0.19.0

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 (111) 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/dist/{apply-S2QI72W3.js → apply-JVLYYXAG.js} +17 -17
  6. package/dist/{broadcast-CBMVOV3G.js → broadcast-56NPEJWM.js} +3 -4
  7. package/dist/{chunk-JS5RTH4I.js → chunk-2Q6MNGU5.js} +2 -2
  8. package/dist/{chunk-QK4G7FCU.js → chunk-3O3FS6KM.js} +10 -8
  9. package/dist/{chunk-3MEYKFFO.js → chunk-3TG3KVHZ.js} +3 -3
  10. package/dist/{chunk-FX3LTTMB.js → chunk-47ZGCZQA.js} +3 -3
  11. package/dist/{chunk-6BN35BHI.js → chunk-4LV7KDTS.js} +67 -17
  12. package/dist/{chunk-CKTN6LKP.js → chunk-6MZTOC6H.js} +2 -2
  13. package/dist/{chunk-JM2KR2WJ.js → chunk-CYQIAEQT.js} +5 -5
  14. package/dist/{chunk-DCU2EXQV.js → chunk-D5D3V6RU.js} +4 -4
  15. package/dist/{chunk-LTZH5E3G.js → chunk-DHAPQUEF.js} +235 -30
  16. package/dist/{chunk-LBXO4VPG.js → chunk-E4FJOLPJ.js} +6 -3
  17. package/dist/chunk-FGEBSQQJ.js +7 -0
  18. package/dist/{chunk-OPYFEHKG.js → chunk-G7JONWL4.js} +29 -1
  19. package/dist/{chunk-HFE4QDJQ.js → chunk-HEPSITZX.js} +2 -2
  20. package/dist/{chunk-4GSGT55G.js → chunk-IEK4U5RR.js} +2 -2
  21. package/dist/{chunk-QEW4J3IZ.js → chunk-ISNRDHSD.js} +2 -2
  22. package/dist/{chunk-TVL5RTE6.js → chunk-ITDJ2EXN.js} +11 -1
  23. package/dist/{chunk-S3PIAMXV.js → chunk-J5XQW2CM.js} +68 -8
  24. package/dist/{chunk-PAX3QXX2.js → chunk-J5ZS7GLA.js} +2 -2
  25. package/dist/chunk-J6KL3COD.js +34 -0
  26. package/dist/{chunk-GZHHEHKY.js → chunk-JJBSYUSQ.js} +19 -7
  27. package/dist/{chunk-XJUNAVU2.js → chunk-KHQQGBFJ.js} +107 -20
  28. package/dist/{chunk-7PTG42QU.js → chunk-LCENQ6JR.js} +6 -6
  29. package/dist/{chunk-WM2RF2MI.js → chunk-NLKAEKSG.js} +3 -3
  30. package/dist/{chunk-7DEYLLIE.js → chunk-OHW3A7Z3.js} +2 -2
  31. package/dist/{chunk-TZORR6GZ.js → chunk-PFWTGEZJ.js} +2 -2
  32. package/dist/{chunk-HQWVGU3W.js → chunk-Q3GLKL4B.js} +5 -5
  33. package/dist/{chunk-2RTRY45B.js → chunk-QJRJCXX2.js} +30 -4
  34. package/dist/{chunk-E5XVSMBR.js → chunk-QXRD7N35.js} +2 -2
  35. package/dist/{chunk-M455QSCW.js → chunk-TPLV2YX2.js} +2 -2
  36. package/dist/{chunk-XELAZAIM.js → chunk-UD3BEEBQ.js} +54 -12
  37. package/dist/{chunk-EAWPJHJ7.js → chunk-UGODVKBJ.js} +2 -2
  38. package/dist/{chunk-IIBB37JE.js → chunk-UQNCBXXH.js} +14 -14
  39. package/dist/{chunk-F5LEGPGP.js → chunk-WJJ2KYE4.js} +2 -2
  40. package/dist/{chunk-TAOOPXBV.js → chunk-Y2MZ5RE3.js} +88 -56
  41. package/dist/{cli-ZN7ZVDEZ.js → cli-MUP2NSXT.js} +10 -9
  42. package/dist/{cli-MI4ZCAZ3.js → cli-T5LHBUY2.js} +8 -8
  43. package/dist/cli.js +3 -3
  44. package/dist/{completion-GYN7PX3T.js → completion-CCK3LWVR.js} +2 -2
  45. package/dist/{diagnostics-WACXQ33W.js → diagnostics-6WON3VMZ.js} +13 -12
  46. package/dist/{doctor-VSQ72A6X.js → doctor-UEXUOW5O.js} +19 -19
  47. package/dist/{entry-VFEZC2XB.js → entry-GMC6LRO2.js} +13 -12
  48. package/dist/{exec-mcp-TOQEJFK3.js → exec-mcp-FS7IPXNC.js} +14 -14
  49. package/dist/{harness-XCEWFGCG.js → harness-32PERNQY.js} +4 -4
  50. package/dist/harness-launch-gate.js +6 -5
  51. package/dist/harness-pane-runner.js +2 -1
  52. package/dist/harness-worker.js +8 -7
  53. package/dist/hook-body.js +446 -278
  54. package/dist/{hook-spec-C5fWTSCH.d.ts → hook-spec-0aGt29Pg.d.ts} +22 -2
  55. package/dist/{hooks-32AFBC3Z.js → hooks-VQCLHXRZ.js} +3 -3
  56. package/dist/{host-TE5PNDHJ.js → host-4WNPLAD5.js} +8 -7
  57. package/dist/{host-72OLHUX7.js → host-ED3XRUNM.js} +16 -16
  58. package/dist/{host-run-MXCH26ZD.js → host-run-PNY6NAYW.js} +28 -11
  59. package/dist/http.js +1 -1
  60. package/dist/{import-mcp-QWGZSIZR.js → import-mcp-WEUY6IVK.js} +12 -12
  61. package/dist/index.d.ts +6 -2
  62. package/dist/index.js +18 -18
  63. package/dist/{init-5M3XWOTJ.js → init-5ZDPHPWB.js} +2 -2
  64. package/dist/invoke-MB4SWBIE.js +24 -0
  65. package/dist/{list-FGDUU5DL.js → list-U4SUFIS7.js} +14 -14
  66. package/dist/{logout-KM5N5GOC.js → logout-M76LEHVP.js} +13 -13
  67. package/dist/{logs-TBUA4UWU.js → logs-H3RPKNTE.js} +3 -4
  68. package/dist/{mailbox-BMTZOSZ7.js → mailbox-O3MX6QPF.js} +3 -4
  69. package/dist/{mainline-KAD2ERLP.js → mainline-DG75NLBS.js} +306 -57
  70. package/dist/{mcp-FJ2UQ4RH.js → mcp-AXHV547W.js} +5 -5
  71. package/dist/{mcp-ND6ZQWJE.js → mcp-NSKAEV7J.js} +2 -2
  72. package/dist/{pause-7LILUVGL.js → pause-2HQ7CKMR.js} +3 -4
  73. package/dist/project/hook-adapter.d.ts +1 -1
  74. package/dist/{project-LZKQUV2W.js → project-FTXIKBML.js} +4 -4
  75. package/dist/{recovery-U6QB3PMT.js → recovery-54KHNJX4.js} +4 -3
  76. package/dist/{resume-26VFAAMH.js → resume-ETFTR5V3.js} +3 -4
  77. package/dist/{run-X4663F4M.js → run-UMHKF2GM.js} +4 -4
  78. package/dist/{run-YEVGHGTN.js → run-Y7NKULSP.js} +12 -12
  79. package/dist/{serve-S7MF42SS.js → serve-MRWTSSAU.js} +3 -3
  80. package/dist/setup-T6T2PFC4.js +20 -0
  81. package/dist/{start-login-GKFGTE2A.js → start-login-POISLJD2.js} +13 -13
  82. package/dist/{status-XG5GRWVU.js → status-GGDHOPSE.js} +21 -27
  83. package/dist/{status-RO55QPKV.js → status-GPSLH4VO.js} +3 -4
  84. package/dist/{status-FYG6XYQ6.js → status-XMATSURN.js} +13 -13
  85. package/dist/stdio.js +2 -2
  86. package/dist/{sweep-35LGQTTO.js → sweep-VY2TNOO5.js} +3 -4
  87. package/dist/{test-KFDO6ROC.js → test-ULKQY6FV.js} +51 -15
  88. package/dist/{tui-2MP7DRIX.js → tui-NGBCIBRW.js} +5 -5
  89. package/dist/{unbroadcast-5QNGAJR2.js → unbroadcast-RKTBP57G.js} +3 -4
  90. package/dist/{worker-3VS6RQEL.js → worker-Q7JWY6BR.js} +11 -10
  91. package/dist/{worktree-create-PZSRB7PH.js → worktree-create-NO4UOOEP.js} +2 -2
  92. package/dist/{worktree-list-JYB6VXLW.js → worktree-list-NEIDD66X.js} +4 -4
  93. package/dist/{worktree-sync-UF5CXPWV.js → worktree-sync-W4BDDLRO.js} +8 -9
  94. package/docs/commands.md +1 -1
  95. package/docs/git-workflow.md +58 -1
  96. package/docs/hooks.md +29 -0
  97. package/docs/project-configuration.md +15 -7
  98. package/docs/terminal-harness.md +14 -0
  99. package/gemini-extension.json +2 -2
  100. package/mcp.json +1 -1
  101. package/package.json +5 -5
  102. package/plugin.json +1 -1
  103. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  104. package/plugins/pmcp/.mcp.json +1 -1
  105. package/plugins/pmcp/gemini-extension.json +2 -2
  106. package/plugins/pmcp/mcp.json +1 -1
  107. package/plugins/pmcp/plugin.json +1 -1
  108. package/dist/chunk-26WLNWDG.js +0 -93
  109. package/dist/chunk-AF2IBMWN.js +0 -7
  110. package/dist/invoke-SFSN4XT7.js +0 -23
  111. package/dist/setup-DTKZLZUT.js +0 -18
@@ -612,7 +612,7 @@
612
612
  },
613
613
  {
614
614
  "name": "pmcp",
615
- "version": "0.18.3",
615
+ "version": "0.19.0",
616
616
  "description": "Find package skills and use native runtime project configuration.",
617
617
  "source": { "source": "local", "path": "./plugins/pmcp" },
618
618
  "policy": { "installation": "AVAILABLE", "authentication": "ON_USE" },
@@ -445,7 +445,7 @@
445
445
  },
446
446
  {
447
447
  "name": "pmcp",
448
- "version": "0.18.3",
448
+ "version": "0.19.0",
449
449
  "description": "Find package skills and use native runtime project configuration.",
450
450
  "source": "./plugins/pmcp"
451
451
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.18.3",
3
+ "version": "0.19.0",
4
4
  "description": "Find package skills and use native runtime project configuration.",
5
5
  "author": { "name": "modootoday" },
6
6
  "license": "Elastic-2.0",
package/.mcp.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "pmcp": {
4
4
  "type": "stdio",
5
5
  "command": "npx",
6
- "args": ["-y", "@modootoday/pmcp@0.18.3", "serve"]
6
+ "args": ["-y", "@modootoday/pmcp@0.19.0", "serve"]
7
7
  }
8
8
  }
9
9
  }
@@ -1,36 +1,35 @@
1
1
  import {
2
2
  specFrom
3
- } from "./chunk-F5LEGPGP.js";
3
+ } from "./chunk-WJJ2KYE4.js";
4
4
  import {
5
5
  catalogFrom
6
6
  } from "./chunk-HEBCQTOD.js";
7
7
  import "./chunk-7DLZC73N.js";
8
8
  import {
9
9
  project
10
- } from "./chunk-HQWVGU3W.js";
10
+ } from "./chunk-Q3GLKL4B.js";
11
11
  import "./chunk-P4N7DBD5.js";
12
12
  import {
13
13
  renderFrontmatter,
14
14
  splitFrontmatter
15
- } from "./chunk-JM2KR2WJ.js";
16
- import "./chunk-E5XVSMBR.js";
15
+ } from "./chunk-CYQIAEQT.js";
16
+ import "./chunk-QXRD7N35.js";
17
17
  import {
18
18
  RUNTIMES
19
- } from "./chunk-XJUNAVU2.js";
19
+ } from "./chunk-KHQQGBFJ.js";
20
20
  import "./chunk-HQOB7OQS.js";
21
- import "./chunk-S3PIAMXV.js";
22
- import "./chunk-JS5RTH4I.js";
23
- import "./chunk-DCU2EXQV.js";
24
- import "./chunk-XELAZAIM.js";
25
- import "./chunk-QEW4J3IZ.js";
26
- import "./chunk-OPYFEHKG.js";
21
+ import "./chunk-J5XQW2CM.js";
22
+ import "./chunk-2Q6MNGU5.js";
23
+ import "./chunk-D5D3V6RU.js";
24
+ import "./chunk-UD3BEEBQ.js";
25
+ import "./chunk-ISNRDHSD.js";
26
+ import "./chunk-G7JONWL4.js";
27
27
  import "./chunk-EATCUWGG.js";
28
28
  import {
29
29
  ProjectError
30
30
  } from "./chunk-NRBQK6UX.js";
31
31
  import "./chunk-3PW4FI7U.js";
32
- import "./chunk-26WLNWDG.js";
33
- import "./chunk-LTZH5E3G.js";
32
+ import "./chunk-DHAPQUEF.js";
34
33
  import "./chunk-C4NHQGHL.js";
35
34
  import "./chunk-Q5H3L6Y4.js";
36
35
  import "./chunk-73AKO4UL.js";
@@ -41,15 +40,16 @@ import {
41
40
  kindOf
42
41
  } from "./chunk-4CRRLDDS.js";
43
42
  import "./chunk-YSAWTGNA.js";
44
- import "./chunk-2RTRY45B.js";
43
+ import "./chunk-QJRJCXX2.js";
45
44
  import {
46
45
  recordProjector
47
- } from "./chunk-TAOOPXBV.js";
46
+ } from "./chunk-Y2MZ5RE3.js";
48
47
  import "./chunk-OEH47H6A.js";
49
48
  import "./chunk-IJBSOWHK.js";
50
- import "./chunk-AF2IBMWN.js";
49
+ import "./chunk-FGEBSQQJ.js";
51
50
  import "./chunk-QPL7E2HW.js";
52
51
  import "./chunk-PMJG2CXF.js";
52
+ import "./chunk-J6KL3COD.js";
53
53
 
54
54
  // src/project/edit.ts
55
55
  import {
@@ -239,4 +239,4 @@ export {
239
239
  projectOrCheck,
240
240
  removeAndProject
241
241
  };
242
- //# sourceMappingURL=apply-S2QI72W3.js.map
242
+ //# sourceMappingURL=apply-JVLYYXAG.js.map
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  change
3
- } from "./chunk-LBXO4VPG.js";
4
- import "./chunk-26WLNWDG.js";
5
- import "./chunk-LTZH5E3G.js";
3
+ } from "./chunk-E4FJOLPJ.js";
4
+ import "./chunk-DHAPQUEF.js";
6
5
  import "./chunk-C4NHQGHL.js";
7
6
  import "./chunk-A4PKLESO.js";
8
7
  import "./chunk-OEH47H6A.js";
@@ -15,4 +14,4 @@ var run = (context) => change(context, "broadcast");
15
14
  export {
16
15
  run
17
16
  };
18
- //# sourceMappingURL=broadcast-CBMVOV3G.js.map
17
+ //# sourceMappingURL=broadcast-56NPEJWM.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  git,
3
3
  gitText
4
- } from "./chunk-OPYFEHKG.js";
4
+ } from "./chunk-G7JONWL4.js";
5
5
 
6
6
  // src/git/detect.ts
7
7
  import { createHash } from "crypto";
@@ -81,4 +81,4 @@ export {
81
81
  detect,
82
82
  listWorktrees
83
83
  };
84
- //# sourceMappingURL=chunk-JS5RTH4I.js.map
84
+ //# sourceMappingURL=chunk-2Q6MNGU5.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  hostApprovalDoctor
3
- } from "./chunk-4GSGT55G.js";
3
+ } from "./chunk-IEK4U5RR.js";
4
4
  import {
5
5
  project
6
- } from "./chunk-HQWVGU3W.js";
6
+ } from "./chunk-Q3GLKL4B.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-JM2KR2WJ.js";
19
+ } from "./chunk-CYQIAEQT.js";
20
20
  import {
21
21
  ANTIGRAVITY_MCP_PLUGIN,
22
22
  serversForTool
23
- } from "./chunk-E5XVSMBR.js";
23
+ } from "./chunk-QXRD7N35.js";
24
24
  import {
25
25
  permissionDoctor,
26
26
  pluginBinaryDoctor,
27
27
  uiClaudeDoctor
28
- } from "./chunk-XJUNAVU2.js";
28
+ } from "./chunk-KHQQGBFJ.js";
29
29
  import {
30
30
  pathPmcp,
31
31
  pmcpCommand
@@ -33,11 +33,12 @@ import {
33
33
  import {
34
34
  createFilesStore,
35
35
  inboxKey
36
- } from "./chunk-LTZH5E3G.js";
36
+ } from "./chunk-DHAPQUEF.js";
37
37
  import {
38
38
  hostDoctor,
39
+ hostEnvDoctor,
39
40
  ptyBinaryDoctor
40
- } from "./chunk-2RTRY45B.js";
41
+ } from "./chunk-QJRJCXX2.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-QK4G7FCU.js.map
645
+ //# sourceMappingURL=chunk-3O3FS6KM.js.map
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-5ZABTVSW.js";
4
4
  import {
5
5
  dependencies
6
- } from "./chunk-WM2RF2MI.js";
6
+ } from "./chunk-NLKAEKSG.js";
7
7
  import {
8
8
  interactiveEntry
9
9
  } from "./chunk-LMT3PPXJ.js";
10
10
  import {
11
11
  assertNativeHost
12
- } from "./chunk-HFE4QDJQ.js";
12
+ } from "./chunk-HEPSITZX.js";
13
13
 
14
14
  // src/tui/startup/host.ts
15
15
  function terminalSupport() {
@@ -42,4 +42,4 @@ export {
42
42
  terminalSupport,
43
43
  requireTerminal
44
44
  };
45
- //# sourceMappingURL=chunk-3MEYKFFO.js.map
45
+ //# sourceMappingURL=chunk-3TG3KVHZ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-34DECPVC.js";
4
4
  import {
5
5
  ptyBinary
6
- } from "./chunk-2RTRY45B.js";
6
+ } from "./chunk-QJRJCXX2.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-FX3LTTMB.js.map
778
+ //# sourceMappingURL=chunk-47ZGCZQA.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  assertNativeHost
3
- } from "./chunk-HFE4QDJQ.js";
3
+ } from "./chunk-HEPSITZX.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-FX3LTTMB.js";
36
+ } from "./chunk-47ZGCZQA.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-6BN35BHI.js.map
1984
+ //# sourceMappingURL=chunk-4LV7KDTS.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-7DLZC73N.js";
4
4
  import {
5
5
  readSpec
6
- } from "./chunk-XJUNAVU2.js";
6
+ } from "./chunk-KHQQGBFJ.js";
7
7
  import {
8
8
  ArgumentError
9
9
  } from "./chunk-A4PKLESO.js";
@@ -25,4 +25,4 @@ function serverFrom(context) {
25
25
  export {
26
26
  serverFrom
27
27
  };
28
- //# sourceMappingURL=chunk-CKTN6LKP.js.map
28
+ //# sourceMappingURL=chunk-6MZTOC6H.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  OPENCODE_CONFIG,
3
3
  mcpOutputs
4
- } from "./chunk-E5XVSMBR.js";
4
+ } from "./chunk-QXRD7N35.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-XJUNAVU2.js";
28
+ } from "./chunk-KHQQGBFJ.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-2RTRY45B.js";
40
+ } from "./chunk-QJRJCXX2.js";
41
41
  import {
42
42
  lockVersionProblem,
43
43
  readLock,
44
44
  replaceFile
45
- } from "./chunk-TAOOPXBV.js";
45
+ } from "./chunk-Y2MZ5RE3.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-JM2KR2WJ.js.map
1025
+ //# sourceMappingURL=chunk-CYQIAEQT.js.map
@@ -2,15 +2,15 @@ import {
2
2
  installIfStale,
3
3
  movableSubmodules,
4
4
  updateToPins
5
- } from "./chunk-XELAZAIM.js";
5
+ } from "./chunk-UD3BEEBQ.js";
6
6
  import {
7
7
  cherry,
8
8
  distance
9
- } from "./chunk-QEW4J3IZ.js";
9
+ } from "./chunk-ISNRDHSD.js";
10
10
  import {
11
11
  git,
12
12
  gitText
13
- } from "./chunk-OPYFEHKG.js";
13
+ } from "./chunk-G7JONWL4.js";
14
14
 
15
15
  // src/git/worktrees/sync.ts
16
16
  function heldBy(root, upstream, ahead) {
@@ -75,4 +75,4 @@ function syncWorktree(options) {
75
75
  export {
76
76
  syncWorktree
77
77
  };
78
- //# sourceMappingURL=chunk-DCU2EXQV.js.map
78
+ //# sourceMappingURL=chunk-D5D3V6RU.js.map