@modootoday/pmcp 0.21.0 → 0.22.1
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/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.mcp.json +1 -1
- package/dist/{apply-6FLMTJDV.js → apply-VMOFDOCN.js} +10 -10
- package/dist/{chunk-OFPNCLG7.js → chunk-3TS3CX3R.js} +2 -2
- package/dist/{chunk-Z4Q6RYJH.js → chunk-3W2GELNR.js} +2 -2
- package/dist/{chunk-VUM6LO77.js → chunk-6HCEEC6V.js} +45 -24
- package/dist/chunk-ACHBHIGD.js +7 -0
- package/dist/{chunk-KVNNVLJR.js → chunk-ALX7BECI.js} +2 -2
- package/dist/{chunk-OS5DF3LL.js → chunk-D5BLJIAA.js} +4 -4
- package/dist/{chunk-VBDDFO2V.js → chunk-DPVLHB3K.js} +2 -2
- package/dist/{chunk-33KGCJB2.js → chunk-FHK5BE2D.js} +2 -2
- package/dist/{chunk-ZIJ5IUXH.js → chunk-GBKRDRMZ.js} +14 -5
- package/dist/{chunk-GQP4GWU4.js → chunk-GRRURNVA.js} +5 -5
- package/dist/{chunk-POTI2RJ6.js → chunk-M5LC5TKQ.js} +2 -2
- package/dist/{chunk-G6JXCUSK.js → chunk-NYA4GX44.js} +2 -2
- package/dist/{chunk-UFWQTZDX.js → chunk-OKMWYNZF.js} +5 -5
- package/dist/{chunk-R3MVL67T.js → chunk-P2LJADGI.js} +12 -12
- package/dist/{chunk-YLITJLTR.js → chunk-SB6X342E.js} +3 -3
- package/dist/{chunk-5FW7A6TG.js → chunk-TMXWSGXH.js} +2 -2
- package/dist/chunk-UKR64U7J.js +20 -0
- package/dist/{chunk-DEY23WTH.js → chunk-UVGW56SY.js} +2 -2
- package/dist/{chunk-DJZPPCJP.js → chunk-V6LLHO4S.js} +3 -3
- package/dist/{chunk-TBKVC2TA.js → chunk-XWAE3VEQ.js} +2 -2
- package/dist/{chunk-3X5JQYKN.js → chunk-XYEI7KRO.js} +3 -3
- package/dist/{chunk-UD3BEEBQ.js → chunk-XZ2TDH3J.js} +80 -3
- package/dist/{cli-RVPR3MH3.js → cli-BEEDAD4E.js} +5 -5
- package/dist/cli.js +3 -3
- package/dist/{completion-YTPHEVEW.js → completion-XA7SR2OU.js} +2 -2
- package/dist/{diagnostics-IW54MLFK.js → diagnostics-AYSD3454.js} +5 -5
- package/dist/{doctor-EN4JPSKV.js → doctor-PDLZL4BR.js} +12 -12
- package/dist/{entry-TQWSDTJ4.js → entry-5CKOI3QK.js} +9 -9
- package/dist/{exec-mcp-KKQ75N5O.js → exec-mcp-EJZVPVU5.js} +8 -8
- package/dist/{harness-EB76F6BG.js → harness-VMQJY3KY.js} +3 -3
- package/dist/harness-launch-gate.js +3 -3
- package/dist/harness-worker.js +5 -5
- package/dist/{hooks-YWSHUNLM.js → hooks-SKD67KMA.js} +3 -3
- package/dist/{host-LSVITS6M.js → host-4BA3LM7Z.js} +6 -6
- package/dist/{host-OGGADMBT.js → host-GY2LFEZX.js} +10 -10
- package/dist/{host-run-XO2TS4JC.js → host-run-X3VDTIQ2.js} +4 -4
- package/dist/http.js +1 -1
- package/dist/{import-mcp-BJDJTPVS.js → import-mcp-G2VTD5KR.js} +7 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -11
- package/dist/{init-773PTQM5.js → init-JEK3QUAK.js} +2 -2
- package/dist/{invoke-Y7XH5S2L.js → invoke-7BUFBFJU.js} +7 -7
- package/dist/{list-5W65XVES.js → list-D3Y3TIC6.js} +9 -9
- package/dist/{logout-XO6ALD45.js → logout-T4JLFE2D.js} +8 -8
- package/dist/{mainline-M2NSTAGC.js → mainline-Q42M2GJ2.js} +106 -13
- package/dist/{mcp-R62ZNVGJ.js → mcp-GPIHVL65.js} +2 -2
- package/dist/{project-W5DQIZA6.js → project-6QRKXOMM.js} +4 -4
- package/dist/{run-OZLGSRHF.js → run-MVP22ENA.js} +7 -7
- package/dist/{run-WYJMTLX7.js → run-YHOLKUYB.js} +4 -4
- package/dist/{serve-DCQGAGB7.js → serve-EAESQK2I.js} +3 -3
- package/dist/{setup-D3KEJBGO.js → setup-3GET6K3J.js} +2 -2
- package/dist/{start-login-EKXM75XQ.js → start-login-K3TAZ3IH.js} +8 -8
- package/dist/{status-EDSEG32U.js → status-25DRPV7U.js} +8 -8
- package/dist/{status-23UDIYYP.js → status-DPPNTGHB.js} +9 -9
- package/dist/stdio.js +2 -2
- package/dist/{test-TM6PIZTV.js → test-I2V5AMQF.js} +8 -8
- package/dist/{tui-EQNJIDN5.js → tui-VCEN2L5I.js} +4 -4
- package/dist/{worker-7X6WBPEI.js → worker-NPQFYEBU.js} +7 -7
- package/dist/{worktree-sync-T6C5YEYS.js → worktree-sync-A277AF4M.js} +3 -5
- package/docs/commands.md +1 -1
- package/docs/compatibility.md +11 -10
- package/docs/git-workflow.md +29 -8
- package/docs/project-configuration.md +26 -1
- package/docs/upgrading.md +31 -0
- package/gemini-extension.json +2 -2
- package/mcp.json +1 -1
- package/package.json +5 -5
- package/plugin.json +1 -1
- package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
- package/plugins/pmcp/.mcp.json +1 -1
- package/plugins/pmcp/gemini-extension.json +2 -2
- package/plugins/pmcp/mcp.json +1 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/plugins/pmcp/skills/agent-assets-migrate/SKILL.md +11 -8
- package/plugins/pmcp/skills/pmcp-project-init/SKILL.md +11 -7
- package/skills/agent-assets-migrate/SKILL.md +11 -8
- package/skills/pmcp-project-init/SKILL.md +11 -7
- package/dist/chunk-2MAD4WNZ.js +0 -92
- package/dist/chunk-H4ZOKIER.js +0 -7
|
@@ -21,14 +21,14 @@ tool files.
|
|
|
21
21
|
|
|
22
22
|
List every source with its bytes and line count, and note which are links:
|
|
23
23
|
|
|
24
|
-
| Found | Goes to
|
|
25
|
-
| --------------------------------------------------------------------------------------------- |
|
|
26
|
-
| `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`, `.github/copilot-instructions.md` | merged into `AGENTS.md`; each then becomes a link to it
|
|
27
|
-
| `.claude/skills/<n>/`, `.agent/skills/<n>/` | `.agents/skills/<n>/` (whole folder)
|
|
28
|
-
| `.claude/commands/<n>.md`, `.agent/workflows/<n>.md` | `.agents/skills/<n>/SKILL.md` plus `[skills.<n>] invocation = "user"`
|
|
29
|
-
| `.claude/agents/<n>.md`, `.gemini/agents/<n>.md`, `.agent/agents/<n>.md` | `.agents/agents/<n>/agent.md`
|
|
30
|
-
| `.claude/rules/*.md` with `paths:` | `.agents/rules/<n>.md` with `trigger: glob` and `globs:`
|
|
31
|
-
| MCP entries in `.mcp.json`, `.gemini/settings.json`, `.codex/config.toml` | `[mcp.<alias>]` in `pmcp.toml`
|
|
24
|
+
| Found | Goes to |
|
|
25
|
+
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
|
26
|
+
| `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`, `.github/copilot-instructions.md` | merged into `AGENTS.md`; each then becomes a link to it, except `GEMINI.md` (section 2) |
|
|
27
|
+
| `.claude/skills/<n>/`, `.agent/skills/<n>/` | `.agents/skills/<n>/` (whole folder) |
|
|
28
|
+
| `.claude/commands/<n>.md`, `.agent/workflows/<n>.md` | `.agents/skills/<n>/SKILL.md` plus `[skills.<n>] invocation = "user"` |
|
|
29
|
+
| `.claude/agents/<n>.md`, `.gemini/agents/<n>.md`, `.agent/agents/<n>.md` | `.agents/agents/<n>/agent.md` |
|
|
30
|
+
| `.claude/rules/*.md` with `paths:` | `.agents/rules/<n>.md` with `trigger: glob` and `globs:` |
|
|
31
|
+
| MCP entries in `.mcp.json`, `.gemini/settings.json`, `.codex/config.toml` | `[mcp.<alias>]` in `pmcp.toml` |
|
|
32
32
|
|
|
33
33
|
pmcp has no Copilot or Cursor target. Keep those filenames as links to `AGENTS.md` so they
|
|
34
34
|
cannot drift.
|
|
@@ -38,6 +38,9 @@ cannot drift.
|
|
|
38
38
|
Diff each instruction file against the others line by line. Keep the union; where two say
|
|
39
39
|
different things, settle it from the code or ask, and record the decision. Do not summarise
|
|
40
40
|
during the move. Then replace each old file with a link (`ln -s AGENTS.md CLAUDE.md`).
|
|
41
|
+
For Gemini CLI, delete every `GEMINI.md` once its text is in the `AGENTS.md` beside it, and
|
|
42
|
+
set `"context": { "fileName": ["AGENTS.md"] }` in `.gemini/settings.json` (adding the key if
|
|
43
|
+
the file exists): Gemini CLI then reads `AGENTS.md` in each directory itself.
|
|
41
44
|
Use file-to-file links only: a directory symlink at the repository root, such as `.agents`
|
|
42
45
|
pointing at `.agent`, is rejected by the Codex sandbox.
|
|
43
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pmcp-project-init
|
|
3
|
-
description: Set up a repository so every coding agent reads the same instructions, skills, subagents, rules and MCP servers - one AGENTS.md with CLAUDE.md and
|
|
3
|
+
description: Set up a repository so every coding agent reads the same instructions, skills, subagents, rules and MCP servers - one AGENTS.md with CLAUDE.md linked to it and Gemini CLI set to read it, sources under .agents/, a pmcp.toml with [targets] and [mcp.*] entries, then the optional layers chosen from what the repository is (hook guards, sessions, the git workflow when it is a git checkout, logging, shared MCP authentication, marketplaces), then pmcp project and pmcp doctor, plus the one-time trust step each agent CLI needs. Use when starting a new repository the pmcp way, adding pmcp to a repository that has no agent assets yet, enabling hooks, sessions or the git workflow, or when asked to write a pmcp.toml. Not for moving existing scattered agent files (migrate them instead) or for hosting a skills server.
|
|
4
4
|
metadata:
|
|
5
5
|
tier: open
|
|
6
6
|
level: L2
|
|
@@ -22,18 +22,22 @@ Install `@modootoday/pmcp` as a dev dependency. Never run the bare unscoped name
|
|
|
22
22
|
through npx: that name is not the package, and whoever publishes it later would run in your
|
|
23
23
|
repository.
|
|
24
24
|
|
|
25
|
-
## 1. Instructions: one file,
|
|
25
|
+
## 1. Instructions: one file, one link, one setting
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
28
|
printf '# <project>\n\n' > AGENTS.md
|
|
29
29
|
ln -s AGENTS.md CLAUDE.md
|
|
30
|
-
|
|
30
|
+
mkdir -p .gemini
|
|
31
|
+
printf '{\n "context": { "fileName": ["AGENTS.md"] }\n}\n' > .gemini/settings.json
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
`AGENTS.md` is the real file. Claude Code reads `CLAUDE.md
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
`AGENTS.md` is the real file. Claude Code reads `CLAUDE.md`, so the link makes it read the
|
|
35
|
+
same text. Gemini CLI reads every name in `context.fileName`, in each directory, so the
|
|
36
|
+
setting makes it read `AGENTS.md` itself, nested ones included, and no `GEMINI.md` is
|
|
37
|
+
needed. If `.gemini/settings.json` already exists, add the key to it; `pmcp project` keeps
|
|
38
|
+
keys it does not own. pmcp creates neither the link nor the setting. Keep the link
|
|
39
|
+
file-to-file; a directory symlink at the repository root (for example `.agents` pointing at
|
|
40
|
+
another folder) is rejected by the Codex sandbox.
|
|
37
41
|
|
|
38
42
|
## 2. Sources under .agents/
|
|
39
43
|
|
package/dist/chunk-2MAD4WNZ.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
installIfStale,
|
|
3
|
-
movableSubmodules,
|
|
4
|
-
updateToPins
|
|
5
|
-
} from "./chunk-UD3BEEBQ.js";
|
|
6
|
-
import {
|
|
7
|
-
cherry,
|
|
8
|
-
distance
|
|
9
|
-
} from "./chunk-KUBHGVTD.js";
|
|
10
|
-
import {
|
|
11
|
-
reportModes,
|
|
12
|
-
restoreModes,
|
|
13
|
-
restoreSubmoduleModes,
|
|
14
|
-
withUmask
|
|
15
|
-
} from "./chunk-P6LNYYYH.js";
|
|
16
|
-
import {
|
|
17
|
-
git,
|
|
18
|
-
gitText
|
|
19
|
-
} from "./chunk-G7JONWL4.js";
|
|
20
|
-
|
|
21
|
-
// src/git/worktrees/sync.ts
|
|
22
|
-
function heldBy(root, upstream, ahead) {
|
|
23
|
-
const dirty = gitText(root, [
|
|
24
|
-
"status",
|
|
25
|
-
"--porcelain",
|
|
26
|
-
"--untracked-files=no",
|
|
27
|
-
"--ignore-submodules=all"
|
|
28
|
-
]);
|
|
29
|
-
if (dirty) return "uncommitted changes";
|
|
30
|
-
if (ahead === 0) return null;
|
|
31
|
-
const own = cherry(root, upstream).missing.length;
|
|
32
|
-
if (own > 0) return `${own} unlanded commit(s)`;
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
function syncWorktree(options) {
|
|
36
|
-
return withUmask(options.umask, () => syncOnce(options));
|
|
37
|
-
}
|
|
38
|
-
function syncOnce(options) {
|
|
39
|
-
const { ctx, report } = options;
|
|
40
|
-
if (!ctx.linked)
|
|
41
|
-
throw new Error(
|
|
42
|
-
"worktree sync moves a linked worktree; the main checkout uses pmcp git sync"
|
|
43
|
-
);
|
|
44
|
-
if (options.fetch !== false && git(ctx.root, ["fetch", "-q", ctx.remote, ctx.mainline]).status !== 0)
|
|
45
|
-
report.warn(
|
|
46
|
-
`fetch from ${ctx.remote} failed; judging against the last fetched ${ctx.upstream}`
|
|
47
|
-
);
|
|
48
|
-
const counted = distance(ctx.root, ctx.upstream);
|
|
49
|
-
if (counted === null)
|
|
50
|
-
throw new Error(`cannot compare HEAD with ${ctx.upstream}`);
|
|
51
|
-
if (counted.behind === 0) {
|
|
52
|
-
report.info(`already on ${ctx.upstream}`);
|
|
53
|
-
if (options.install !== void 0)
|
|
54
|
-
installIfStale(ctx.root, options.install, report);
|
|
55
|
-
return "current";
|
|
56
|
-
}
|
|
57
|
-
const holds = heldBy(ctx.root, ctx.upstream, counted.ahead);
|
|
58
|
-
if (holds !== null) {
|
|
59
|
-
report.warn(
|
|
60
|
-
`${counted.behind} commit(s) behind ${ctx.upstream} and holds ${holds}; left where it is`
|
|
61
|
-
);
|
|
62
|
-
return "held";
|
|
63
|
-
}
|
|
64
|
-
const submodules = options.followSubmodules ? movableSubmodules(ctx.root) : [];
|
|
65
|
-
const before = gitText(ctx.root, ["rev-parse", "HEAD"]);
|
|
66
|
-
const args = counted.ahead > 0 ? ["reset", "--keep", "-q", ctx.upstream] : ["merge", "--ff-only", "-q", ctx.upstream];
|
|
67
|
-
const moved = git(ctx.root, args);
|
|
68
|
-
if (moved.status !== 0) {
|
|
69
|
-
report.warn(
|
|
70
|
-
`could not move to ${ctx.upstream}: ${moved.stderr.trim().split("\n")[0] ?? ""}`
|
|
71
|
-
);
|
|
72
|
-
return "held";
|
|
73
|
-
}
|
|
74
|
-
const after = gitText(ctx.root, ["rev-parse", "HEAD"]);
|
|
75
|
-
report.info(
|
|
76
|
-
`moved ${before.slice(0, 10)} -> ${after.slice(0, 10)}, ${counted.behind} commit(s)`
|
|
77
|
-
);
|
|
78
|
-
for (const line of updateToPins(ctx.root, submodules)) report.info(line);
|
|
79
|
-
if (options.umask !== void 0)
|
|
80
|
-
reportModes(report, [
|
|
81
|
-
...restoreModes(ctx.root, before, after),
|
|
82
|
-
...restoreSubmoduleModes(ctx.root, before, after)
|
|
83
|
-
]);
|
|
84
|
-
if (options.install !== void 0)
|
|
85
|
-
installIfStale(ctx.root, options.install, report);
|
|
86
|
-
return "moved";
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
syncWorktree
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=chunk-2MAD4WNZ.js.map
|