@modootoday/pmcp 0.22.4 → 0.22.6

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 (82) 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-D2VIRMFY.js → apply-IQU3K5TB.js} +13 -13
  6. package/dist/{chunk-CPFJ7J4G.js → chunk-3HEYCZFZ.js} +5 -5
  7. package/dist/{chunk-RRPNPZ6I.js → chunk-42SO7KYX.js} +2 -2
  8. package/dist/chunk-4EQIZQX2.js +7 -0
  9. package/dist/{chunk-3IX5TBRW.js → chunk-5JWCGSZD.js} +2 -2
  10. package/dist/{chunk-FE7WOHZM.js → chunk-7CSUKCU7.js} +2 -2
  11. package/dist/{chunk-NDY3T7Z4.js → chunk-AOHHCYRF.js} +12 -12
  12. package/dist/{chunk-G7JONWL4.js → chunk-B3OZ4GGO.js} +13 -1
  13. package/dist/{chunk-PFHSFYQB.js → chunk-CLE6VHO6.js} +2 -2
  14. package/dist/{chunk-JONJ75SF.js → chunk-E4X6GSNI.js} +5 -5
  15. package/dist/{chunk-TAVFL3YB.js → chunk-G6QFWOLV.js} +2 -2
  16. package/dist/{chunk-W4W3EHQP.js → chunk-GSU22DYJ.js} +2 -2
  17. package/dist/{chunk-MIIGZRVC.js → chunk-H4Z2AIXM.js} +2 -2
  18. package/dist/{chunk-H45C5W2P.js → chunk-JN7TRPFB.js} +2 -2
  19. package/dist/{chunk-QUBU3ETR.js → chunk-JUEMDWWJ.js} +4 -4
  20. package/dist/{chunk-MTVRKWQI.js → chunk-KFMHTOSI.js} +3 -3
  21. package/dist/{chunk-F34XIDXT.js → chunk-KTANZVAJ.js} +2 -2
  22. package/dist/{chunk-P6LNYYYH.js → chunk-M6X6HVQK.js} +2 -2
  23. package/dist/{chunk-2A3F7ID4.js → chunk-PCSE36BM.js} +85 -11
  24. package/dist/{chunk-7XK2KWLJ.js → chunk-PX4FWUEN.js} +3 -3
  25. package/dist/{chunk-T7SLHAHQ.js → chunk-RZNZKI5A.js} +2 -2
  26. package/dist/{chunk-JJT5XRMV.js → chunk-SLL5FSDI.js} +2 -2
  27. package/dist/{chunk-2Q6MNGU5.js → chunk-SUDG7B6S.js} +2 -2
  28. package/dist/{chunk-5KA3RS5Y.js → chunk-TBVQ7SM7.js} +2 -2
  29. package/dist/{chunk-KR6PFEWU.js → chunk-TPTKRLI7.js} +3 -3
  30. package/dist/{chunk-FFCDSSKA.js → chunk-WV3YP35O.js} +7 -7
  31. package/dist/{cli-VCKKTXUU.js → cli-DYVNJYZ7.js} +8 -8
  32. package/dist/cli.js +3 -3
  33. package/dist/{completion-AAEBLVVB.js → completion-ORGJMKIY.js} +2 -2
  34. package/dist/{diagnostics-3XI6SJXF.js → diagnostics-TLKMQGMH.js} +5 -5
  35. package/dist/{doctor-GAJKPOKS.js → doctor-27ZFI6JY.js} +15 -15
  36. package/dist/{entry-GZCLQTIN.js → entry-T3HFGNC2.js} +9 -9
  37. package/dist/{exec-mcp-3V34UNPH.js → exec-mcp-IZYZI2KM.js} +11 -11
  38. package/dist/{harness-YH6U6MNV.js → harness-DSB275UL.js} +3 -3
  39. package/dist/harness-launch-gate.js +3 -3
  40. package/dist/harness-worker.js +5 -5
  41. package/dist/hook-body.js +139 -57
  42. package/dist/{hooks-JWB7D4ZB.js → hooks-UN4LMHZW.js} +3 -3
  43. package/dist/{host-DLBXM72V.js → host-5M4RWFKB.js} +6 -6
  44. package/dist/{host-LNH3TUR5.js → host-X4WU2J3Z.js} +13 -13
  45. package/dist/{host-run-FVO5PZK2.js → host-run-A64IXBGN.js} +4 -4
  46. package/dist/http.js +1 -1
  47. package/dist/{import-mcp-O553FGF3.js → import-mcp-PYX5OKQQ.js} +10 -10
  48. package/dist/index.d.ts +1 -1
  49. package/dist/index.js +14 -14
  50. package/dist/{init-A6AAIGJU.js → init-QUN7QS2K.js} +2 -2
  51. package/dist/{invoke-GDELKQCE.js → invoke-FGOUHWVB.js} +7 -7
  52. package/dist/{list-CQ4CPNWI.js → list-5YUAOTM7.js} +12 -12
  53. package/dist/{logout-TG32MVMB.js → logout-PAODLQ5M.js} +11 -11
  54. package/dist/{mainline-FMZ44NFC.js → mainline-CRL5B3X3.js} +25 -7
  55. package/dist/{mcp-UYQVTWEF.js → mcp-WUUKG3JV.js} +2 -2
  56. package/dist/{modes-COBVV7RA.js → modes-SEINLLMK.js} +3 -3
  57. package/dist/{project-NOTN6SMK.js → project-HY6O6DZQ.js} +4 -4
  58. package/dist/{run-77MDEDAX.js → run-55L6MVBR.js} +10 -10
  59. package/dist/{run-S5M6ZUUH.js → run-ZLIZZC2I.js} +4 -4
  60. package/dist/{serve-YNHUW5PQ.js → serve-HKBA6OSF.js} +3 -3
  61. package/dist/{setup-HYEYYVDU.js → setup-SOUBEZ3H.js} +4 -4
  62. package/dist/{start-login-SWQVPQG3.js → start-login-VRH4OLKM.js} +11 -11
  63. package/dist/{status-YPFUSE7K.js → status-6JX7PKQ3.js} +11 -11
  64. package/dist/{status-NGO7AC3U.js → status-CZG6ZPUG.js} +12 -12
  65. package/dist/stdio.js +2 -2
  66. package/dist/{test-2UYV4LSU.js → test-22FIZGYO.js} +11 -11
  67. package/dist/{tui-ZKP3D5JM.js → tui-JUEU727K.js} +4 -4
  68. package/dist/{worker-7OBOBMWM.js → worker-T7ERD4L7.js} +7 -7
  69. package/dist/{worktree-create-NO4UOOEP.js → worktree-create-KMXPQXIQ.js} +2 -2
  70. package/dist/{worktree-list-6CCHXXOZ.js → worktree-list-WH6OX6U7.js} +4 -4
  71. package/dist/{worktree-sync-5ZVA5PUC.js → worktree-sync-VWNOJD63.js} +5 -5
  72. package/docs/git-workflow.md +7 -0
  73. package/gemini-extension.json +2 -2
  74. package/mcp.json +1 -1
  75. package/package.json +5 -5
  76. package/plugin.json +1 -1
  77. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  78. package/plugins/pmcp/.mcp.json +1 -1
  79. package/plugins/pmcp/gemini-extension.json +2 -2
  80. package/plugins/pmcp/mcp.json +1 -1
  81. package/plugins/pmcp/plugin.json +1 -1
  82. package/dist/chunk-HOTGJQIV.js +0 -7
@@ -612,7 +612,7 @@
612
612
  },
613
613
  {
614
614
  "name": "pmcp",
615
- "version": "0.22.4",
615
+ "version": "0.22.6",
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.22.4",
448
+ "version": "0.22.6",
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.22.4",
3
+ "version": "0.22.6",
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.22.4", "serve"]
6
+ "args": ["-y", "@modootoday/pmcp@0.22.6", "serve"]
7
7
  }
8
8
  }
9
9
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-PEMMV5YQ.js";
4
4
  import {
5
5
  specFrom
6
- } from "./chunk-TAVFL3YB.js";
6
+ } from "./chunk-G6QFWOLV.js";
7
7
  import {
8
8
  printSmoke,
9
9
  runSmoke
@@ -15,28 +15,28 @@ import {
15
15
  describeHookProblem,
16
16
  project,
17
17
  unmanagedHookProblems
18
- } from "./chunk-QUBU3ETR.js";
18
+ } from "./chunk-JUEMDWWJ.js";
19
19
  import "./chunk-P4N7DBD5.js";
20
- import "./chunk-MTVRKWQI.js";
20
+ import "./chunk-KFMHTOSI.js";
21
21
  import {
22
22
  checkBudget,
23
23
  renderFrontmatter,
24
24
  splitFrontmatter
25
- } from "./chunk-FFCDSSKA.js";
25
+ } from "./chunk-WV3YP35O.js";
26
26
  import "./chunk-UKR64U7J.js";
27
- import "./chunk-2A3F7ID4.js";
28
- import "./chunk-RRPNPZ6I.js";
27
+ import "./chunk-PCSE36BM.js";
28
+ import "./chunk-42SO7KYX.js";
29
29
  import "./chunk-EATCUWGG.js";
30
30
  import "./chunk-OFJIMBTL.js";
31
31
  import "./chunk-LFFIQBNY.js";
32
32
  import "./chunk-HQOB7OQS.js";
33
33
  import "./chunk-73AKO4UL.js";
34
- import "./chunk-P6LNYYYH.js";
35
- import "./chunk-FE7WOHZM.js";
36
- import "./chunk-2Q6MNGU5.js";
34
+ import "./chunk-M6X6HVQK.js";
35
+ import "./chunk-7CSUKCU7.js";
36
+ import "./chunk-SUDG7B6S.js";
37
37
  import "./chunk-7I7O7ZNT.js";
38
38
  import "./chunk-Z6WRFOFT.js";
39
- import "./chunk-G7JONWL4.js";
39
+ import "./chunk-B3OZ4GGO.js";
40
40
  import "./chunk-Q5H3L6Y4.js";
41
41
  import {
42
42
  RUNTIMES,
@@ -53,14 +53,14 @@ import {
53
53
  import "./chunk-YSAWTGNA.js";
54
54
  import {
55
55
  recordProjector
56
- } from "./chunk-F34XIDXT.js";
56
+ } from "./chunk-KTANZVAJ.js";
57
57
  import {
58
58
  ProjectError
59
59
  } from "./chunk-NRBQK6UX.js";
60
60
  import "./chunk-OEH47H6A.js";
61
61
  import "./chunk-IJBSOWHK.js";
62
62
  import "./chunk-XWLMZKH2.js";
63
- import "./chunk-HOTGJQIV.js";
63
+ import "./chunk-4EQIZQX2.js";
64
64
  import "./chunk-GJXOFDJT.js";
65
65
  import "./chunk-PMJG2CXF.js";
66
66
  import "./chunk-J6KL3COD.js";
@@ -275,4 +275,4 @@ export {
275
275
  projectOrCheck,
276
276
  removeAndProject
277
277
  };
278
- //# sourceMappingURL=apply-D2VIRMFY.js.map
278
+ //# sourceMappingURL=apply-IQU3K5TB.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  hostApprovalDoctor
3
- } from "./chunk-3IX5TBRW.js";
3
+ } from "./chunk-5JWCGSZD.js";
4
4
  import {
5
5
  wakeableBy
6
6
  } from "./chunk-JQVSDPFL.js";
@@ -12,7 +12,7 @@ import {
12
12
  describeHookProblem,
13
13
  project,
14
14
  unmanagedHooks
15
- } from "./chunk-QUBU3ETR.js";
15
+ } from "./chunk-JUEMDWWJ.js";
16
16
  import {
17
17
  ANTIGRAVITY_MCP_PLUGIN,
18
18
  agentNames,
@@ -23,7 +23,7 @@ import {
23
23
  skillNames,
24
24
  splitFrontmatter,
25
25
  uiClaudeDoctor
26
- } from "./chunk-FFCDSSKA.js";
26
+ } from "./chunk-WV3YP35O.js";
27
27
  import {
28
28
  pathPmcp,
29
29
  pmcpCommand
@@ -37,7 +37,7 @@ import {
37
37
  hostEnvDoctor,
38
38
  ptyBinaryDoctor,
39
39
  readLockFile
40
- } from "./chunk-F34XIDXT.js";
40
+ } from "./chunk-KTANZVAJ.js";
41
41
  import {
42
42
  ProjectError
43
43
  } from "./chunk-NRBQK6UX.js";
@@ -671,4 +671,4 @@ export {
671
671
  spawnRunner,
672
672
  doctor
673
673
  };
674
- //# sourceMappingURL=chunk-CPFJ7J4G.js.map
674
+ //# sourceMappingURL=chunk-3HEYCZFZ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  git,
3
3
  gitText
4
- } from "./chunk-G7JONWL4.js";
4
+ } from "./chunk-B3OZ4GGO.js";
5
5
 
6
6
  // src/git/superseded.ts
7
7
  import { existsSync } from "fs";
@@ -129,4 +129,4 @@ export {
129
129
  isAncestor,
130
130
  distance
131
131
  };
132
- //# sourceMappingURL=chunk-RRPNPZ6I.js.map
132
+ //# sourceMappingURL=chunk-42SO7KYX.js.map
@@ -0,0 +1,7 @@
1
+ // src/commands/version.ts
2
+ var VERSION = "0.22.6";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-4EQIZQX2.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOST_MANIFEST,
3
3
  HOST_POLICY
4
- } from "./chunk-F34XIDXT.js";
4
+ } from "./chunk-KTANZVAJ.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-3IX5TBRW.js.map
102
+ //# sourceMappingURL=chunk-5JWCGSZD.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  detect
3
- } from "./chunk-2Q6MNGU5.js";
3
+ } from "./chunk-SUDG7B6S.js";
4
4
  import {
5
5
  readStoreSettings,
6
6
  resolveLeaseFiles,
@@ -392,4 +392,4 @@ export {
392
392
  gateTreePath,
393
393
  leaseSpecs
394
394
  };
395
- //# sourceMappingURL=chunk-FE7WOHZM.js.map
395
+ //# sourceMappingURL=chunk-7CSUKCU7.js.map
@@ -61,11 +61,11 @@ var completionSpec = {
61
61
  var COMMANDS = [
62
62
  {
63
63
  ...statusSpec,
64
- load: async () => (await import("./status-NGO7AC3U.js")).statusCommand
64
+ load: async () => (await import("./status-CZG6ZPUG.js")).statusCommand
65
65
  },
66
- { ...initSpec, load: async () => (await import("./init-A6AAIGJU.js")).initCommand },
67
- { ...hooksSpec, load: async () => (await import("./hooks-JWB7D4ZB.js")).hooksCommand },
68
- { ...serveSpec, load: async () => (await import("./serve-YNHUW5PQ.js")).serveCommand },
66
+ { ...initSpec, load: async () => (await import("./init-QUN7QS2K.js")).initCommand },
67
+ { ...hooksSpec, load: async () => (await import("./hooks-UN4LMHZW.js")).hooksCommand },
68
+ { ...serveSpec, load: async () => (await import("./serve-HKBA6OSF.js")).serveCommand },
69
69
  { ...listSpec, load: async () => (await import("./list-WK2IYUK7.js")).listCommand },
70
70
  {
71
71
  ...indexSpec,
@@ -102,19 +102,19 @@ var COMMANDS = [
102
102
  { ...syncSpec, load: async () => (await import("./install-7V6NIA7W.js")).syncCommand },
103
103
  {
104
104
  ...projectSpec,
105
- load: async () => (await import("./project-NOTN6SMK.js")).projectCommand
105
+ load: async () => (await import("./project-HY6O6DZQ.js")).projectCommand
106
106
  },
107
107
  {
108
108
  ...doctorSpec,
109
- load: async () => (await import("./doctor-GAJKPOKS.js")).doctorCommand
109
+ load: async () => (await import("./doctor-27ZFI6JY.js")).doctorCommand
110
110
  },
111
111
  {
112
112
  ...sessionsSpec,
113
113
  load: async () => (await import("./cli-34EDFXJA.js")).sessionsCommand
114
114
  },
115
115
  { ...logsSpec, load: async () => (await import("./logs-UHJM7ZCL.js")).logsCommand },
116
- { ...gitSpec, load: async () => (await import("./cli-VCKKTXUU.js")).gitCommand },
117
- { ...mcpSpec, load: async () => (await import("./mcp-UYQVTWEF.js")).mcpCommand },
116
+ { ...gitSpec, load: async () => (await import("./cli-DYVNJYZ7.js")).gitCommand },
117
+ { ...mcpSpec, load: async () => (await import("./mcp-WUUKG3JV.js")).mcpCommand },
118
118
  {
119
119
  ...validateSpec,
120
120
  load: async () => (await import("./validate-KFBCUFI4.js")).validateCommand
@@ -125,16 +125,16 @@ var COMMANDS = [
125
125
  },
126
126
  {
127
127
  ...harnessSpec,
128
- load: async () => (await import("./harness-YH6U6MNV.js")).harnessCommand
128
+ load: async () => (await import("./harness-DSB275UL.js")).harnessCommand
129
129
  },
130
- { ...tuiSpec, load: async () => (await import("./tui-ZKP3D5JM.js")).tuiCommand },
130
+ { ...tuiSpec, load: async () => (await import("./tui-JUEU727K.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-AAEBLVVB.js")).completionCommand
137
+ load: async () => (await import("./completion-ORGJMKIY.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-NDY3T7Z4.js.map
151
+ //# sourceMappingURL=chunk-AOHHCYRF.js.map
@@ -24,6 +24,17 @@ function git(cwd, args, extra) {
24
24
  const stderr = run.stderr || run.error?.message || "";
25
25
  return { status: run.status ?? 1, stdout: run.stdout ?? "", stderr };
26
26
  }
27
+ function gitWithInput(cwd, args, input) {
28
+ const run = spawnSync("git", args, {
29
+ cwd,
30
+ encoding: "utf8",
31
+ env: cleanEnv(),
32
+ input,
33
+ maxBuffer: 256 * 1024 * 1024
34
+ });
35
+ const stderr = run.stderr || run.error?.message || "";
36
+ return { status: run.status ?? 1, stdout: run.stdout ?? "", stderr };
37
+ }
27
38
  function gitText(cwd, args) {
28
39
  const run = git(cwd, args);
29
40
  if (run.status !== 0) return "";
@@ -72,9 +83,10 @@ function runCommand(argv, cwd, extra) {
72
83
 
73
84
  export {
74
85
  git,
86
+ gitWithInput,
75
87
  gitText,
76
88
  gitOk,
77
89
  runCommandLogged,
78
90
  runCommand
79
91
  };
80
- //# sourceMappingURL=chunk-G7JONWL4.js.map
92
+ //# sourceMappingURL=chunk-B3OZ4GGO.js.map
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  nativeBinary,
9
9
  ptyBinary
10
- } from "./chunk-F34XIDXT.js";
10
+ } from "./chunk-KTANZVAJ.js";
11
11
 
12
12
  // src/tui/rust.ts
13
13
  import { spawn } from "child_process";
@@ -62,4 +62,4 @@ export {
62
62
  runTui,
63
63
  dependencies
64
64
  };
65
- //# sourceMappingURL=chunk-PFHSFYQB.js.map
65
+ //# sourceMappingURL=chunk-CLE6VHO6.js.map
@@ -7,20 +7,20 @@ import {
7
7
  observeSession,
8
8
  openGroup,
9
9
  runOperation
10
- } from "./chunk-KR6PFEWU.js";
10
+ } from "./chunk-TPTKRLI7.js";
11
11
  import {
12
12
  nativeHostTools
13
- } from "./chunk-W4W3EHQP.js";
13
+ } from "./chunk-GSU22DYJ.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-H45C5W2P.js";
20
+ } from "./chunk-JN7TRPFB.js";
21
21
  import {
22
22
  ptyBinary
23
- } from "./chunk-F34XIDXT.js";
23
+ } from "./chunk-KTANZVAJ.js";
24
24
  import {
25
25
  GroupStore,
26
26
  privateJson
@@ -249,4 +249,4 @@ async function invoke(operation) {
249
249
  export {
250
250
  invoke
251
251
  };
252
- //# sourceMappingURL=chunk-JONJ75SF.js.map
252
+ //# sourceMappingURL=chunk-E4X6GSNI.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RPCIROW7.js";
4
4
  import {
5
5
  readSpec
6
- } from "./chunk-FFCDSSKA.js";
6
+ } from "./chunk-WV3YP35O.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-TAVFL3YB.js.map
31
+ //# sourceMappingURL=chunk-G6QFWOLV.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-34DECPVC.js";
7
7
  import {
8
8
  ptyBinary
9
- } from "./chunk-F34XIDXT.js";
9
+ } from "./chunk-KTANZVAJ.js";
10
10
 
11
11
  // src/harness/adapters/systemd/admission.ts
12
12
  var nativeHostTools = ["systemctl", "systemd-run"];
@@ -36,4 +36,4 @@ export {
36
36
  nativeHostTools,
37
37
  assertNativeHost
38
38
  };
39
- //# sourceMappingURL=chunk-W4W3EHQP.js.map
39
+ //# sourceMappingURL=chunk-GSU22DYJ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RPCIROW7.js";
4
4
  import {
5
5
  readSpec
6
- } from "./chunk-FFCDSSKA.js";
6
+ } from "./chunk-WV3YP35O.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-MIIGZRVC.js.map
28
+ //# sourceMappingURL=chunk-H4Z2AIXM.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-34DECPVC.js";
4
4
  import {
5
5
  ptyBinary
6
- } from "./chunk-F34XIDXT.js";
6
+ } from "./chunk-KTANZVAJ.js";
7
7
  import {
8
8
  GroupStore,
9
9
  egressPolicy,
@@ -775,4 +775,4 @@ export {
775
775
  prepareBridge,
776
776
  assertBridge
777
777
  };
778
- //# sourceMappingURL=chunk-H45C5W2P.js.map
778
+ //# sourceMappingURL=chunk-JN7TRPFB.js.map
@@ -7,7 +7,7 @@ import {
7
7
  prepare,
8
8
  present,
9
9
  writeNative
10
- } from "./chunk-MTVRKWQI.js";
10
+ } from "./chunk-KFMHTOSI.js";
11
11
  import {
12
12
  ANTIGRAVITY_MCP_PLUGIN,
13
13
  BUNDLE_NATIVE_FILES,
@@ -21,7 +21,7 @@ import {
21
21
  same,
22
22
  splitKeyed,
23
23
  withoutBlock
24
- } from "./chunk-FFCDSSKA.js";
24
+ } from "./chunk-WV3YP35O.js";
25
25
  import {
26
26
  HOOK_DIRECTORY
27
27
  } from "./chunk-7DYWCQVB.js";
@@ -30,7 +30,7 @@ import {
30
30
  replaceFile,
31
31
  replaceLink,
32
32
  writeLock
33
- } from "./chunk-F34XIDXT.js";
33
+ } from "./chunk-KTANZVAJ.js";
34
34
  import {
35
35
  RULES_DIR,
36
36
  legacyLinks
@@ -400,4 +400,4 @@ export {
400
400
  unmanagedHooks,
401
401
  describeHookProblem
402
402
  };
403
- //# sourceMappingURL=chunk-QUBU3ETR.js.map
403
+ //# sourceMappingURL=chunk-JUEMDWWJ.js.map
@@ -19,12 +19,12 @@ import {
19
19
  splitKeyed,
20
20
  versionMatches,
21
21
  withoutBlock
22
- } from "./chunk-FFCDSSKA.js";
22
+ } from "./chunk-WV3YP35O.js";
23
23
  import {
24
24
  lockVersionProblem,
25
25
  readLock,
26
26
  replaceFile
27
- } from "./chunk-F34XIDXT.js";
27
+ } from "./chunk-KTANZVAJ.js";
28
28
  import {
29
29
  ProjectError,
30
30
  RULES_DIR,
@@ -271,4 +271,4 @@ export {
271
271
  prepare,
272
272
  checkProject
273
273
  };
274
- //# sourceMappingURL=chunk-MTVRKWQI.js.map
274
+ //# sourceMappingURL=chunk-KFMHTOSI.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-XWLMZKH2.js";
10
10
  import {
11
11
  VERSION
12
- } from "./chunk-HOTGJQIV.js";
12
+ } from "./chunk-4EQIZQX2.js";
13
13
  import {
14
14
  ConfigError
15
15
  } from "./chunk-GJXOFDJT.js";
@@ -598,4 +598,4 @@ export {
598
598
  hostEnvDoctor,
599
599
  hostDoctor
600
600
  };
601
- //# sourceMappingURL=chunk-F34XIDXT.js.map
601
+ //# sourceMappingURL=chunk-KTANZVAJ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  gitText
3
- } from "./chunk-G7JONWL4.js";
3
+ } from "./chunk-B3OZ4GGO.js";
4
4
 
5
5
  // src/git/modes.ts
6
6
  import { chmodSync, lstatSync } from "fs";
@@ -92,4 +92,4 @@ export {
92
92
  restoreSubmoduleModes,
93
93
  reportModes
94
94
  };
95
- //# sourceMappingURL=chunk-P6LNYYYH.js.map
95
+ //# sourceMappingURL=chunk-M6X6HVQK.js.map
@@ -2,19 +2,20 @@ import {
2
2
  GitReadError,
3
3
  cherry,
4
4
  distance
5
- } from "./chunk-RRPNPZ6I.js";
5
+ } from "./chunk-42SO7KYX.js";
6
6
  import {
7
7
  reportModes,
8
8
  restoreModes,
9
9
  restoreSubmoduleModes,
10
10
  withUmask
11
- } from "./chunk-P6LNYYYH.js";
11
+ } from "./chunk-M6X6HVQK.js";
12
12
  import {
13
13
  git,
14
14
  gitOk,
15
15
  gitText,
16
+ gitWithInput,
16
17
  runCommand
17
- } from "./chunk-G7JONWL4.js";
18
+ } from "./chunk-B3OZ4GGO.js";
18
19
 
19
20
  // src/git/install.ts
20
21
  import { createHash } from "crypto";
@@ -85,9 +86,77 @@ function installIfStale(root, spec, report) {
85
86
  return 0;
86
87
  }
87
88
 
89
+ // src/git/added-submodules.ts
90
+ import { existsSync as existsSync2, mkdirSync as mkdirSync2, readdirSync, renameSync } from "fs";
91
+ import { dirname as dirname2, join as join2 } from "path";
92
+ var ADDED_GITLINK = /^:\d{6} 160000 [0-9a-f]{40} ([0-9a-f]{40}) [AT]\t(.+)$/u;
93
+ function initAddedSubmodules(root, from, to) {
94
+ const raw = gitText(root, [
95
+ "diff",
96
+ "--raw",
97
+ "--abbrev=40",
98
+ "--no-renames",
99
+ from,
100
+ to
101
+ ]);
102
+ const lines = [];
103
+ for (const entry of raw.split("\n")) {
104
+ const added = ADDED_GITLINK.exec(entry);
105
+ if (!added) continue;
106
+ const [, pin = "", path = ""] = added;
107
+ lines.push(`${path}: ${initOne(root, path, pin)}`);
108
+ }
109
+ return lines;
110
+ }
111
+ function initOne(root, path, pin) {
112
+ const dir = join2(root, path);
113
+ if (existsSync2(join2(dir, ".git"))) return "already checked out";
114
+ let displaced = "";
115
+ if (existsSync2(dir) && readdirSync(dir).length > 0) {
116
+ if (unignoredFiles(root, path).length > 0)
117
+ return `new submodule not checked out: ${path} holds files git does not ignore; move them aside, then git submodule update --init ${path}`;
118
+ displaced = displace(root, path);
119
+ }
120
+ const done = git(root, ["submodule", "update", "--init", "-q", "--", path]);
121
+ const aside = displaced ? `; its ignored files from before are in ${displaced}, so run the install again` : "";
122
+ if (done.status !== 0)
123
+ return `new submodule not checked out: ${done.stderr.trim()}${aside}`;
124
+ return `new submodule checked out at ${pin.slice(0, 10)}${aside}`;
125
+ }
126
+ function unignoredFiles(root, path) {
127
+ const kept = [];
128
+ let level = [path];
129
+ while (level.length > 0) {
130
+ const entries = level.flatMap(
131
+ (dir) => readdirSync(join2(root, dir), { withFileTypes: true }).map((entry) => ({
132
+ path: `${dir}/${entry.name}`,
133
+ dir: entry.isDirectory()
134
+ }))
135
+ );
136
+ const checked = gitWithInput(
137
+ root,
138
+ ["check-ignore", "--no-index", "--stdin", "-z"],
139
+ entries.map((entry) => `${entry.path}\0`).join("")
140
+ );
141
+ const ignored = new Set(checked.stdout.split("\0").filter(Boolean));
142
+ const open = entries.filter((entry) => !ignored.has(entry.path));
143
+ kept.push(...open.filter((entry) => !entry.dir).map((entry) => entry.path));
144
+ level = open.filter((entry) => entry.dir).map((entry) => entry.path);
145
+ }
146
+ return kept;
147
+ }
148
+ function displace(root, path) {
149
+ const gitDir = gitText(root, ["rev-parse", "--absolute-git-dir"]);
150
+ const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/gu, "-");
151
+ const target = join2(gitDir, "pmcp-displaced", stamp, path);
152
+ mkdirSync2(dirname2(target), { recursive: true });
153
+ renameSync(join2(root, path), target);
154
+ return target;
155
+ }
156
+
88
157
  // src/git/submodules.ts
89
- import { existsSync as existsSync2 } from "fs";
90
- import { join as join2 } from "path";
158
+ import { existsSync as existsSync3 } from "fs";
159
+ import { join as join3 } from "path";
91
160
  var GITLINK = /^:160000 160000 ([0-9a-f]{40}) ([0-9a-f]{40}) M\t(.+)$/u;
92
161
  function clean(dir) {
93
162
  return git(dir, ["status", "--porcelain"]).stdout.trim() === "";
@@ -104,7 +173,7 @@ function blocking(dir, head, pin) {
104
173
  }
105
174
  function followOne(dir, oldPin, newPin, shared) {
106
175
  const short = newPin.slice(0, 10);
107
- if (!existsSync2(join2(dir, ".git"))) return "not checked out, left alone";
176
+ if (!existsSync3(join3(dir, ".git"))) return "not checked out, left alone";
108
177
  const head = gitText(dir, ["rev-parse", "HEAD"]);
109
178
  if (head === newPin) return `already at ${short}`;
110
179
  if (head !== oldPin)
@@ -137,7 +206,7 @@ function followPins(root, from, to, shared = []) {
137
206
  if (!match) continue;
138
207
  const [, oldPin = "", newPin = "", path = ""] = match;
139
208
  lines.push(
140
- `${path}: ${followOne(join2(root, path), oldPin, newPin, shared.includes(path))}`
209
+ `${path}: ${followOne(join3(root, path), oldPin, newPin, shared.includes(path))}`
141
210
  );
142
211
  }
143
212
  return lines;
@@ -145,8 +214,8 @@ function followPins(root, from, to, shared = []) {
145
214
  function movableSubmodules(root) {
146
215
  const listed = git(root, ["submodule", "status"]).stdout;
147
216
  return listed.split("\n").filter((line) => /^[ +]/u.test(line)).map((line) => line.trim().split(/\s+/u)[1] ?? "").filter((path) => {
148
- const dir = join2(root, path);
149
- if (!path || !existsSync2(join2(dir, ".git"))) return false;
217
+ const dir = join3(root, path);
218
+ if (!path || !existsSync3(join3(dir, ".git"))) return false;
150
219
  const local = gitText(dir, [
151
220
  "rev-list",
152
221
  "--count",
@@ -161,7 +230,7 @@ function updateToPins(root, paths) {
161
230
  const lines = [];
162
231
  for (const path of paths) {
163
232
  const pin = gitText(root, ["rev-parse", `HEAD:${path}`]);
164
- const dir = join2(root, path);
233
+ const dir = join3(root, path);
165
234
  if (!pin || !hasCommit(dir, pin)) {
166
235
  lines.push(
167
236
  `${path}: left alone, ${pin.slice(0, 10) || "its pin"} is not in its checkout`
@@ -243,6 +312,10 @@ function syncOnce(options) {
243
312
  `moved ${before.slice(0, 10)} -> ${after.slice(0, 10)}, ${counted.behind} commit(s)`
244
313
  );
245
314
  for (const line of updateToPins(ctx.root, submodules)) report.info(line);
315
+ if (options.followSubmodules) {
316
+ for (const line of initAddedSubmodules(ctx.root, before, after))
317
+ report.info(line);
318
+ }
246
319
  if (options.umask !== void 0)
247
320
  reportModes(report, [
248
321
  ...restoreModes(ctx.root, before, after),
@@ -258,7 +331,8 @@ export {
258
331
  lockHash,
259
332
  installState,
260
333
  installIfStale,
334
+ initAddedSubmodules,
261
335
  followPins,
262
336
  syncWorktree
263
337
  };
264
- //# sourceMappingURL=chunk-2A3F7ID4.js.map
338
+ //# sourceMappingURL=chunk-PCSE36BM.js.map