@modootoday/pmcp 0.19.7 → 0.19.9
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-2N53IUWM.js → apply-TM6B2Y3G.js} +17 -17
- package/dist/{available-GFMTJW4E.js → available-HYSDAFYH.js} +4 -4
- package/dist/{broadcast-56NPEJWM.js → broadcast-DSCHWUMB.js} +5 -5
- package/dist/{chunk-AAMJ5A2R.js → chunk-2S44RDO4.js} +2 -2
- package/dist/{chunk-M6OLH75N.js → chunk-3UOFHLY4.js} +5 -5
- package/dist/{chunk-UGODVKBJ.js → chunk-4XNAKVSO.js} +2 -2
- package/dist/{chunk-L6XBFXDT.js → chunk-4XWVLC23.js} +3 -3
- package/dist/{chunk-AW3OY32A.js → chunk-57FHYW74.js} +17 -5
- package/dist/{chunk-MARV7HLS.js → chunk-A6TM4NTI.js} +3 -3
- package/dist/{chunk-RVE3EMGF.js → chunk-BRSESCGX.js} +344 -80
- package/dist/{chunk-YGA2HFGB.js → chunk-BZ2RXI5I.js} +2 -2
- package/dist/{chunk-J5ZS7GLA.js → chunk-C3G75JH7.js} +2 -2
- package/dist/{chunk-HEWZ6INU.js → chunk-CJ6OFTS3.js} +22 -5
- package/dist/{chunk-P2B7CDRM.js → chunk-EONAJAMJ.js} +3 -3
- package/dist/{chunk-N2GVNL4G.js → chunk-FR6JHNLC.js} +3 -3
- package/dist/{chunk-QPL7E2HW.js → chunk-GJXOFDJT.js} +9 -2
- package/dist/{chunk-3PW4FI7U.js → chunk-I4DLMIN5.js} +2 -2
- package/dist/{chunk-JZK7ZO7K.js → chunk-I4U2A6HP.js} +2 -2
- package/dist/{chunk-WS4SDGEE.js → chunk-IACJDHFQ.js} +6 -6
- package/dist/{chunk-NWOV2E26.js → chunk-JZKAJUVT.js} +2 -2
- package/dist/{chunk-E4FJOLPJ.js → chunk-MCYGYZVZ.js} +3 -3
- package/dist/{chunk-RUFB4N2P.js → chunk-PBDPWE5J.js} +3 -3
- package/dist/{chunk-HEBCQTOD.js → chunk-PEMMV5YQ.js} +2 -2
- package/dist/{chunk-6FZXF3G6.js → chunk-PG42KALG.js} +5 -5
- package/dist/{chunk-7B6IC3F7.js → chunk-PUIWESU3.js} +3 -3
- package/dist/{chunk-JBW4JPIF.js → chunk-QTKD7JEL.js} +21 -21
- package/dist/{chunk-F3PZXF55.js → chunk-QYQGPDBE.js} +2 -2
- package/dist/{chunk-7DLZC73N.js → chunk-RPCIROW7.js} +2 -2
- package/dist/{chunk-C4NHQGHL.js → chunk-RRKGSYQ4.js} +1 -1
- package/dist/{chunk-HSIQKOI5.js → chunk-SPUCY4AG.js} +2 -2
- package/dist/{chunk-DHAPQUEF.js → chunk-V7HG3STC.js} +2 -2
- package/dist/{chunk-OOPTHZVQ.js → chunk-VDBUZKXC.js} +2 -2
- package/dist/{chunk-XP2U3LO3.js → chunk-W5RLIUNC.js} +2 -2
- package/dist/{chunk-3MAHF3RQ.js → chunk-XNPOHPMJ.js} +3 -3
- package/dist/{chunk-XLXDXJY2.js → chunk-XPWIJOZT.js} +5 -5
- package/dist/chunk-YGTJQVCK.js +7 -0
- package/dist/{chunk-LYMHFHDJ.js → chunk-YKU7KHJO.js} +3 -3
- package/dist/{chunk-6GOAMHFJ.js → chunk-YLPXTJJM.js} +2 -2
- package/dist/{chunk-7B2KRL2H.js → chunk-YXAPCHXJ.js} +52 -5
- package/dist/{chunk-L6YMDRKU.js → chunk-YYG3GUQW.js} +9 -9
- package/dist/{claude-U2JC2DNQ.js → claude-2C5L2HQL.js} +3 -3
- package/dist/{cli-BTPTJWCC.js → cli-BVRPAI23.js} +8 -8
- package/dist/{cli-UFCFDIVI.js → cli-YV6SFE4D.js} +5 -5
- package/dist/cli.js +3 -3
- package/dist/{completion-6PLM6T4X.js → completion-B3UT3GVI.js} +2 -2
- package/dist/{config-DnpLL2kT.d.ts → config-DzHB75Jz.d.ts} +2 -0
- package/dist/{diagnostics-E3ZFK2DG.js → diagnostics-ONIAKCA3.js} +7 -7
- package/dist/{doctor-AVJ6V5OZ.js → doctor-MJFU5L6R.js} +20 -20
- package/dist/{entry-J7YM5OF3.js → entry-DZGKCL4G.js} +12 -12
- package/dist/{exec-mcp-IEQRT3UO.js → exec-mcp-QK2VC6RX.js} +13 -13
- package/dist/{harness-OM5AYSLY.js → harness-GTED4GLK.js} +3 -3
- package/dist/harness-launch-gate.js +5 -5
- package/dist/harness-worker.js +7 -7
- package/dist/hook-body.js +319 -61
- package/dist/{hooks-PPUVHNN6.js → hooks-FRZ4SUNJ.js} +3 -3
- package/dist/{host-53O2BR6F.js → host-3HTCZNVJ.js} +16 -16
- package/dist/{host-EJF3JFMD.js → host-AGNF2AQH.js} +8 -8
- package/dist/{host-run-YPSYP6TC.js → host-run-2OQZVQID.js} +21 -13
- package/dist/http.js +1 -1
- package/dist/{import-mcp-7I7USMVM.js → import-mcp-7KEPR2B6.js} +11 -11
- package/dist/index.d.ts +5 -3
- package/dist/index.js +19 -19
- package/dist/{init-4AXJXIZQ.js → init-BHGCF7JL.js} +2 -2
- package/dist/{install-MQ7QSJQ7.js → install-HF6CROQP.js} +19 -9
- package/dist/{invoke-TWWYDHG7.js → invoke-CVHF6PEK.js} +9 -9
- package/dist/{list-TBCWXSK2.js → list-6XGQ3FR3.js} +13 -13
- package/dist/{list-FB6RNYYB.js → list-WK2IYUK7.js} +4 -4
- package/dist/{logout-QXOOQ2NB.js → logout-6RJLG2KG.js} +12 -12
- package/dist/{logs-H3RPKNTE.js → logs-VTW7S2LR.js} +6 -6
- package/dist/mailbox/index.d.ts +1 -1
- package/dist/mailbox/index.js +3 -3
- package/dist/{mailbox-UECKDZ3Q.js → mailbox-CNAONXN7.js} +8 -8
- package/dist/{mailbox-5DWLH4W2.js → mailbox-YN6PG66A.js} +4 -4
- package/dist/{mainline-FPK4HWFF.js → mainline-JSG4MUKH.js} +11 -12
- package/dist/{mcp-XHFC7DUL.js → mcp-P55VLQLR.js} +2 -2
- package/dist/{pause-2HQ7CKMR.js → pause-V5VCNOSH.js} +5 -5
- package/dist/{project-IDRHI3AJ.js → project-B57IQPDK.js} +4 -4
- package/dist/{pty-XTJ4MIWK.js → pty-FD4JGBZL.js} +3 -3
- package/dist/{recovery-54KHNJX4.js → recovery-HB2YFQSQ.js} +3 -3
- package/dist/{reindex-ZULHSQWY.js → reindex-I7RYWCUR.js} +5 -5
- package/dist/{resume-ETFTR5V3.js → resume-7S4K3R4X.js} +5 -5
- package/dist/{run-X7CPBDYV.js → run-LFJXONLW.js} +4 -4
- package/dist/{run-BYQVIDBZ.js → run-MC2BPLOE.js} +14 -14
- package/dist/{serve-ZWZEEMAO.js → serve-TFAEVXX3.js} +9 -9
- package/dist/{setup-63E3TVJK.js → setup-FHFQZJY6.js} +5 -6
- package/dist/{start-login-YACBMXW2.js → start-login-KXOHCR5A.js} +12 -12
- package/dist/{status-GFD3YOYT.js → status-AW7DOW7A.js} +12 -12
- package/dist/{status-CM753VKY.js → status-OYRB3KL5.js} +8 -8
- package/dist/{status-QHOZDGYN.js → status-YXOIEVOJ.js} +23 -23
- package/dist/stdio.js +5 -5
- package/dist/{sweep-VY2TNOO5.js → sweep-ZSYG6FNR.js} +5 -5
- package/dist/{test-NAVM6ZFB.js → test-2HTOY4PJ.js} +13 -13
- package/dist/{tui-W7QMB743.js → tui-DQFXYQ4H.js} +6 -6
- package/dist/{unbroadcast-RKTBP57G.js → unbroadcast-FONZJWEW.js} +5 -5
- package/dist/{validate-AVM2VHMM.js → validate-WOFI7TMT.js} +5 -5
- package/dist/{worker-4ADJPJ2A.js → worker-UXPGXAV2.js} +10 -10
- package/dist/{worktree-list-NEIDD66X.js → worktree-list-4PLE7K6L.js} +4 -4
- package/docs/git-workflow.md +26 -7
- package/docs/hooks.md +22 -12
- package/docs/project-configuration.md +19 -12
- package/gemini-extension.json +2 -2
- package/mcp.json +1 -1
- package/package.json +6 -6
- 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/mod/draw.tsx +9 -2
- package/plugins/pmcp/mod/guard.ts +3 -3
- package/plugins/pmcp/mod/model.ts +15 -4
- package/plugins/pmcp/mod/reader/read.ts +19 -4
- package/plugins/pmcp/mod/reader/settings.ts +7 -0
- package/plugins/pmcp/mod/reader/types.ts +2 -0
- package/plugins/pmcp/mod/sessions/format.ts +9 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/schema/catalog-v1.json +3 -8
- package/schema/library.json +3 -8
- package/schema/marketplace-manifest.json +2 -6
- package/schema/skill-frontmatter.json +3 -8
- package/schema/skill-metadata-core.json +3 -8
- package/dist/chunk-DXJZ2ZCX.js +0 -56
- package/dist/chunk-ZVXYPC3Q.js +0 -7
package/gemini-extension.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcp",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.9",
|
|
4
4
|
"mcpServers": {
|
|
5
5
|
"pmcp": {
|
|
6
6
|
"type": "stdio",
|
|
7
7
|
"command": "npx",
|
|
8
|
-
"args": ["-y", "@modootoday/pmcp@0.19.
|
|
8
|
+
"args": ["-y", "@modootoday/pmcp@0.19.9", "serve"]
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|
package/mcp.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modootoday/pmcp",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.9",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"author": "modootoday",
|
|
6
6
|
"description": "Use the skills your packages already ship, and keep your AI tools' project configuration in one place.",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"format:check": "prettier --check ."
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@modelcontextprotocol/server": "^2.
|
|
107
|
+
"@modelcontextprotocol/server": "^2.4.0",
|
|
108
108
|
"zod": "^4.5.1",
|
|
109
109
|
"semver": "7.8.5",
|
|
110
110
|
"smol-toml": "1.9.0",
|
|
@@ -136,9 +136,9 @@
|
|
|
136
136
|
"bun": ">=1.3.0"
|
|
137
137
|
},
|
|
138
138
|
"optionalDependencies": {
|
|
139
|
-
"@modootoday/pmcp-linux-x64": "0.19.
|
|
140
|
-
"@modootoday/pmcp-linux-arm64": "0.19.
|
|
141
|
-
"@modootoday/pmcp-darwin-x64": "0.19.
|
|
142
|
-
"@modootoday/pmcp-darwin-arm64": "0.19.
|
|
139
|
+
"@modootoday/pmcp-linux-x64": "0.19.9",
|
|
140
|
+
"@modootoday/pmcp-linux-arm64": "0.19.9",
|
|
141
|
+
"@modootoday/pmcp-darwin-x64": "0.19.9",
|
|
142
|
+
"@modootoday/pmcp-darwin-arm64": "0.19.9"
|
|
143
143
|
}
|
|
144
144
|
}
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "pmcp",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.9",
|
|
5
5
|
"description": "Find package skills and use native runtime project configuration.",
|
|
6
6
|
"author": { "name": "modootoday" },
|
|
7
7
|
"license": "Elastic-2.0",
|
package/plugins/pmcp/.mcp.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcp",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.9",
|
|
4
4
|
"mcpServers": {
|
|
5
5
|
"pmcp": {
|
|
6
6
|
"type": "stdio",
|
|
7
7
|
"command": "npx",
|
|
8
|
-
"args": ["-y", "@modootoday/pmcp@0.19.
|
|
8
|
+
"args": ["-y", "@modootoday/pmcp@0.19.9", "serve"]
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|
package/plugins/pmcp/mcp.json
CHANGED
|
@@ -33,7 +33,10 @@ export async function drawPane($: any, e: any): Promise<any> {
|
|
|
33
33
|
const columns = Math.max(20, Number(e.props?.bodyColumns ?? 80));
|
|
34
34
|
const now = state.now;
|
|
35
35
|
const nameWidth = Math.max(4, ...records.map((r) => labelOf(r).length));
|
|
36
|
-
const placeWidth = Math.max(
|
|
36
|
+
const placeWidth = Math.max(
|
|
37
|
+
5,
|
|
38
|
+
...records.map((r) => placeOf(r, state.settings?.worktreeRoot).length),
|
|
39
|
+
);
|
|
37
40
|
const fixed = 2 + nameWidth + 1 + 8 + placeWidth + 1 + MARKS + 5;
|
|
38
41
|
const actionWidth = Math.max(0, columns - fixed);
|
|
39
42
|
const mark = bandMark(state.snapshot);
|
|
@@ -93,7 +96,11 @@ export async function drawPane($: any, e: any): Promise<any> {
|
|
|
93
96
|
{labelOf(record).padEnd(nameWidth)}{" "}
|
|
94
97
|
</Text>
|
|
95
98
|
<Text color={look.color}>{look.word.padEnd(8)}</Text>
|
|
96
|
-
<Text dimColor>
|
|
99
|
+
<Text dimColor>
|
|
100
|
+
{placeOf(record, state.settings?.worktreeRoot).padEnd(
|
|
101
|
+
placeWidth,
|
|
102
|
+
)}{" "}
|
|
103
|
+
</Text>
|
|
97
104
|
<Text color="warning">{marksOf(record).padEnd(MARKS)}</Text>
|
|
98
105
|
<Text dimColor>
|
|
99
106
|
{ageOf(record.updatedAt, now).padStart(4)}{" "}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Leave foreign-edit decisions to the person because the mod must not enforce independent policy.
|
|
2
|
-
import { nameOf } from "./model";
|
|
2
|
+
import { linkedWorktreeOf, nameOf } from "./model";
|
|
3
3
|
import type { SessionRecord } from "./reader/index";
|
|
4
4
|
import { state } from "./state";
|
|
5
5
|
|
|
@@ -11,8 +11,8 @@ function checkoutOf(target: string, records: readonly SessionRecord[]): string {
|
|
|
11
11
|
best = root;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
return
|
|
14
|
+
const linked = linkedWorktreeOf(target, state.settings?.worktreeRoot);
|
|
15
|
+
return linked.length > best.length && target !== linked ? linked : best;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export async function holdForeignEdit($: any, e: any, next: any): Promise<any> {
|
|
@@ -68,11 +68,22 @@ export function byKind(a: SessionRecord, b: SessionRecord): number {
|
|
|
68
68
|
return labelOf(a).localeCompare(labelOf(b));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
//
|
|
72
|
-
|
|
71
|
+
// The linked worktree directory directly under the worktree root that holds path, or "".
|
|
72
|
+
// Without a root (settings projected before it was written) the default root is matched.
|
|
73
|
+
export function linkedWorktreeOf(path: string, worktreeRoot?: string): string {
|
|
74
|
+
if (!worktreeRoot)
|
|
75
|
+
return /^(.*\/\.claude\/worktrees\/[^/]+)(?:\/|$)/u.exec(path)?.[1] ?? "";
|
|
76
|
+
const root = worktreeRoot.replace(/\/+$/u, "");
|
|
77
|
+
if (!path.startsWith(`${root}/`)) return "";
|
|
78
|
+
const name = path.slice(root.length + 1).split("/")[0];
|
|
79
|
+
return name ? `${root}/${name}` : "";
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// A linked worktree is named by its directory: detached ones have no branch to show.
|
|
83
|
+
export function placeOf(record: SessionRecord, worktreeRoot?: string): string {
|
|
73
84
|
const worktree = record.worktree ?? "";
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
85
|
+
const linked = linkedWorktreeOf(worktree.replace(/\/+$/u, ""), worktreeRoot);
|
|
86
|
+
if (linked) return linked.split("/").pop()!;
|
|
76
87
|
if (record.branch) return record.branch;
|
|
77
88
|
return worktree.replace(/\/+$/u, "").split("/").pop() || "-";
|
|
78
89
|
}
|
|
@@ -3,11 +3,12 @@ import {
|
|
|
3
3
|
asLease,
|
|
4
4
|
asPause,
|
|
5
5
|
asRecord,
|
|
6
|
-
|
|
6
|
+
isLeaseFile,
|
|
7
7
|
recordLive,
|
|
8
8
|
STATE_FILES,
|
|
9
9
|
} from "../sessions/format";
|
|
10
10
|
import type {
|
|
11
|
+
Lease,
|
|
11
12
|
ReadOptions,
|
|
12
13
|
SessionRecord,
|
|
13
14
|
SessionSnapshot,
|
|
@@ -19,7 +20,6 @@ export { STALE_MS } from "../sessions/format";
|
|
|
19
20
|
export const STATE_PATHS = {
|
|
20
21
|
records: STATE_FILES.records,
|
|
21
22
|
pause: STATE_FILES.pause,
|
|
22
|
-
lease: leaseFile("lockfile"),
|
|
23
23
|
broadcast: STATE_FILES.broadcast,
|
|
24
24
|
} as const;
|
|
25
25
|
|
|
@@ -61,16 +61,31 @@ export async function readRecords(
|
|
|
61
61
|
return records;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
// Every live lease in the state directory, whatever its name; the one held longest is shown.
|
|
65
|
+
export async function readLease(
|
|
66
|
+
files: StateFiles,
|
|
67
|
+
options: ReadOptions,
|
|
68
|
+
): Promise<Lease | null> {
|
|
69
|
+
const names = await files.list(options.stateDir).catch(() => [] as string[]);
|
|
70
|
+
let held: Lease | null = null;
|
|
71
|
+
for (const name of names.filter(isLeaseFile).sort()) {
|
|
72
|
+
const lease = asLease(await readJson(files, `${options.stateDir}/${name}`));
|
|
73
|
+
if (!lease || !(await isAlive(files, lease.pid))) continue;
|
|
74
|
+
if (!held || Date.parse(lease.since ?? "") < Date.parse(held.since ?? ""))
|
|
75
|
+
held = lease;
|
|
76
|
+
}
|
|
77
|
+
return held;
|
|
78
|
+
}
|
|
79
|
+
|
|
64
80
|
export async function readSessionState(
|
|
65
81
|
files: StateFiles,
|
|
66
82
|
options: ReadOptions,
|
|
67
83
|
): Promise<SessionSnapshot> {
|
|
68
84
|
const at = (name: string) => `${options.stateDir}/${name}`;
|
|
69
|
-
const lease = asLease(await readJson(files, at(STATE_PATHS.lease)));
|
|
70
85
|
return {
|
|
71
86
|
records: await readRecords(files, options),
|
|
72
87
|
pause: asPause(await readJson(files, at(STATE_PATHS.pause))),
|
|
73
|
-
lease:
|
|
88
|
+
lease: await readLease(files, options),
|
|
74
89
|
broadcast: asBroadcast(await readJson(files, at(STATE_PATHS.broadcast))),
|
|
75
90
|
};
|
|
76
91
|
}
|
|
@@ -44,11 +44,18 @@ export function parseUiSettings(
|
|
|
44
44
|
)
|
|
45
45
|
return null;
|
|
46
46
|
if (SWITCHES.some((key) => typeof raw[key] !== "boolean")) return null;
|
|
47
|
+
const worktrees = raw.worktreeRoot;
|
|
48
|
+
if (
|
|
49
|
+
worktrees !== undefined &&
|
|
50
|
+
(typeof worktrees !== "string" || worktrees === "")
|
|
51
|
+
)
|
|
52
|
+
return null;
|
|
47
53
|
return {
|
|
48
54
|
...(declared ? { stateDir: within(projectRoot, declared) } : {}),
|
|
49
55
|
sessionsPane: raw.sessionsPane === true,
|
|
50
56
|
statusBand: raw.statusBand === true,
|
|
51
57
|
commands: raw.commands === true,
|
|
52
58
|
holdForeignEdits: raw.holdForeignEdits === true,
|
|
59
|
+
...(worktrees ? { worktreeRoot: within(projectRoot, worktrees) } : {}),
|
|
53
60
|
};
|
|
54
61
|
}
|
|
@@ -35,4 +35,6 @@ export interface UiSettings {
|
|
|
35
35
|
readonly statusBand: boolean;
|
|
36
36
|
readonly commands: boolean;
|
|
37
37
|
readonly holdForeignEdits: boolean;
|
|
38
|
+
// [git.worktrees] root, absolute once parsed; absent in files projected before it was written.
|
|
39
|
+
readonly worktreeRoot?: string;
|
|
38
40
|
}
|
|
@@ -13,12 +13,20 @@ export const STALE_MS = 30 * 60 * 1000;
|
|
|
13
13
|
|
|
14
14
|
const LEASE_NAME = /^[a-z0-9][a-z0-9_-]*$/u;
|
|
15
15
|
|
|
16
|
-
//
|
|
16
|
+
// The lease file name is part of the shared formats (docs/git-workflow.md); never change it.
|
|
17
17
|
export function leaseFile(name: string): string {
|
|
18
18
|
if (!LEASE_NAME.test(name)) throw new Error(`invalid lease name ${name}`);
|
|
19
19
|
return `${name}-lease.json`;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// A file leaseFile could have named, so a reader can find every lease without the configuration.
|
|
23
|
+
export function isLeaseFile(file: string): boolean {
|
|
24
|
+
return (
|
|
25
|
+
file.endsWith("-lease.json") &&
|
|
26
|
+
LEASE_NAME.test(file.slice(0, -"-lease.json".length))
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
type Fields = Record<string, unknown>;
|
|
23
31
|
|
|
24
32
|
const text = (value: unknown): value is string => typeof value === "string";
|
package/plugins/pmcp/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "pmcp",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.9",
|
|
5
5
|
"description": "Find package skills and use native runtime project configuration.",
|
|
6
6
|
"author": { "name": "modootoday" },
|
|
7
7
|
"license": "Elastic-2.0",
|
package/schema/catalog-v1.json
CHANGED
|
@@ -145,14 +145,9 @@
|
|
|
145
145
|
},
|
|
146
146
|
"tier": {
|
|
147
147
|
"type": "string",
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"paid",
|
|
152
|
-
"internal"
|
|
153
|
-
],
|
|
154
|
-
"deprecated": true,
|
|
155
|
-
"description": "Inherited from marketplace metadata.tier; repeated skill tiers warn."
|
|
148
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
149
|
+
"description": "Inherited from marketplace metadata.tier; repeated skill tiers warn.",
|
|
150
|
+
"deprecated": true
|
|
156
151
|
},
|
|
157
152
|
"server-tools": {
|
|
158
153
|
"type": "array",
|
package/schema/library.json
CHANGED
|
@@ -145,14 +145,9 @@
|
|
|
145
145
|
},
|
|
146
146
|
"tier": {
|
|
147
147
|
"type": "string",
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"paid",
|
|
152
|
-
"internal"
|
|
153
|
-
],
|
|
154
|
-
"deprecated": true,
|
|
155
|
-
"description": "Inherited from marketplace metadata.tier; repeated skill tiers warn."
|
|
148
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
149
|
+
"description": "Inherited from marketplace metadata.tier; repeated skill tiers warn.",
|
|
150
|
+
"deprecated": true
|
|
156
151
|
},
|
|
157
152
|
"target-version": {
|
|
158
153
|
"type": "string",
|
|
@@ -54,12 +54,8 @@
|
|
|
54
54
|
"properties": {
|
|
55
55
|
"tier": {
|
|
56
56
|
"type": "string",
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
"free",
|
|
60
|
-
"paid",
|
|
61
|
-
"internal"
|
|
62
|
-
]
|
|
57
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
58
|
+
"description": "A tier name in kebab case; the default set is open, free, paid and internal."
|
|
63
59
|
},
|
|
64
60
|
"description": {
|
|
65
61
|
"type": "string",
|
|
@@ -145,14 +145,9 @@
|
|
|
145
145
|
},
|
|
146
146
|
"tier": {
|
|
147
147
|
"type": "string",
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"paid",
|
|
152
|
-
"internal"
|
|
153
|
-
],
|
|
154
|
-
"deprecated": true,
|
|
155
|
-
"description": "Inherited from marketplace metadata.tier; repeated skill tiers warn."
|
|
148
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
149
|
+
"description": "Inherited from marketplace metadata.tier; repeated skill tiers warn.",
|
|
150
|
+
"deprecated": true
|
|
156
151
|
}
|
|
157
152
|
},
|
|
158
153
|
"additionalProperties": {},
|
|
@@ -115,14 +115,9 @@
|
|
|
115
115
|
},
|
|
116
116
|
"tier": {
|
|
117
117
|
"type": "string",
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"paid",
|
|
122
|
-
"internal"
|
|
123
|
-
],
|
|
124
|
-
"deprecated": true,
|
|
125
|
-
"description": "Inherited from marketplace metadata.tier; repeated skill tiers warn."
|
|
118
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
119
|
+
"description": "Inherited from marketplace metadata.tier; repeated skill tiers warn.",
|
|
120
|
+
"deprecated": true
|
|
126
121
|
}
|
|
127
122
|
},
|
|
128
123
|
"additionalProperties": {},
|
package/dist/chunk-DXJZ2ZCX.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
readGitConfig
|
|
3
|
-
} from "./chunk-7B2KRL2H.js";
|
|
4
|
-
import {
|
|
5
|
-
detect
|
|
6
|
-
} from "./chunk-2Q6MNGU5.js";
|
|
7
|
-
import {
|
|
8
|
-
readStoreSettings,
|
|
9
|
-
resolveLeaseFiles
|
|
10
|
-
} from "./chunk-DHAPQUEF.js";
|
|
11
|
-
import {
|
|
12
|
-
projectStateDir
|
|
13
|
-
} from "./chunk-OEH47H6A.js";
|
|
14
|
-
import {
|
|
15
|
-
findConfig,
|
|
16
|
-
readConfig
|
|
17
|
-
} from "./chunk-QPL7E2HW.js";
|
|
18
|
-
|
|
19
|
-
// src/git/setup.ts
|
|
20
|
-
import { dirname, join, resolve } from "path";
|
|
21
|
-
function loadGit(cwd, configPath, env) {
|
|
22
|
-
const path = configPath === void 0 ? findConfig(cwd) : resolve(cwd, configPath);
|
|
23
|
-
if (path === null)
|
|
24
|
-
return new Error("no pmcp.toml found; the git workflow is opt-in");
|
|
25
|
-
const project = readConfig(path);
|
|
26
|
-
const config = readGitConfig(project);
|
|
27
|
-
if (config === null)
|
|
28
|
-
return new Error(`[git] is absent or disabled in ${path}`);
|
|
29
|
-
const ctx = detect(cwd, { remote: config.remote, mainline: config.mainline });
|
|
30
|
-
if (ctx === null) return new Error(`${cwd} is not inside a git checkout`);
|
|
31
|
-
const stateDir = projectStateDir(ctx.root, config.stateDir, env);
|
|
32
|
-
const override = config.gate?.treeEnv ? env[config.gate.treeEnv] : void 0;
|
|
33
|
-
const tree = override || (config.gate?.tree ?? join(stateDir, "gate", "tree"));
|
|
34
|
-
const settings = readStoreSettings(
|
|
35
|
-
project.raw["sessions"],
|
|
36
|
-
project.raw["git"]
|
|
37
|
-
);
|
|
38
|
-
const leaseFiles = resolveLeaseFiles(settings.leaseFiles, dirname(tree));
|
|
39
|
-
return { config, ctx, stateDir, gateTree: tree, leaseFiles };
|
|
40
|
-
}
|
|
41
|
-
function gateTreePath(setup) {
|
|
42
|
-
return setup.gateTree;
|
|
43
|
-
}
|
|
44
|
-
function leaseSpecs(config) {
|
|
45
|
-
if (config.leases.length > 0) return config.leases;
|
|
46
|
-
const paths = config.sync?.installWhenChanged ?? [];
|
|
47
|
-
if (paths.length === 0) return [];
|
|
48
|
-
return [{ name: "lockfile", paths }];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export {
|
|
52
|
-
loadGit,
|
|
53
|
-
gateTreePath,
|
|
54
|
-
leaseSpecs
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=chunk-DXJZ2ZCX.js.map
|