@modootoday/pmcp 0.19.8 → 0.20.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.
- 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-6OEABVQT.js → apply-QJ6MGLBX.js} +17 -17
- package/dist/{attachment-D84OGI6n.d.ts → attachment-ms6s8Aow.d.ts} +1 -1
- package/dist/{available-GFMTJW4E.js → available-HYSDAFYH.js} +4 -4
- package/dist/{broadcast-56NPEJWM.js → broadcast-LYOA6BEW.js} +5 -5
- package/dist/{chunk-44YE6B63.js → chunk-4VK5G3SV.js} +3 -3
- package/dist/{chunk-7B2KRL2H.js → chunk-5JPD6VIH.js} +74 -7
- package/dist/{chunk-42RFOVU3.js → chunk-66F3HLW4.js} +17 -5
- package/dist/{chunk-CVZEVTTX.js → chunk-7SDOSTW7.js} +3 -3
- package/dist/{chunk-6U623E6Y.js → chunk-AWZF72SH.js} +6 -6
- package/dist/{chunk-J5ZS7GLA.js → chunk-C3G75JH7.js} +2 -2
- package/dist/{chunk-PTDMSVKS.js → chunk-CQZYQAAV.js} +3 -3
- package/dist/{chunk-SRX2ONSZ.js → chunk-EKPMVEIA.js} +2 -2
- package/dist/{chunk-GXACIGVS.js → chunk-FD6VGFYZ.js} +5 -5
- package/dist/chunk-FGYFA6JY.js +7 -0
- package/dist/{chunk-RXKX33WU.js → chunk-FQAJSNNU.js} +3 -3
- package/dist/{chunk-QPL7E2HW.js → chunk-GJXOFDJT.js} +9 -2
- package/dist/{chunk-JZK7ZO7K.js → chunk-I4U2A6HP.js} +2 -2
- package/dist/{chunk-UGODVKBJ.js → chunk-IQD4W53M.js} +2 -2
- package/dist/{chunk-TFZLX66B.js → chunk-IZABPDAO.js} +2 -2
- package/dist/{chunk-VHTRCE5G.js → chunk-J6HNP6HA.js} +3 -3
- package/dist/{chunk-QXDD75DY.js → chunk-JBHGJKSL.js} +3 -3
- package/dist/{chunk-NWOV2E26.js → chunk-JZKAJUVT.js} +2 -2
- package/dist/{chunk-VUSA7POL.js → chunk-K2C3KFGB.js} +9 -9
- package/dist/{chunk-TLIOBOZ2.js → chunk-L4MFGGSI.js} +2 -2
- package/dist/{chunk-XP2U3LO3.js → chunk-M2RYXWX2.js} +2 -2
- package/dist/{chunk-LJL4L73I.js → chunk-MZEMLFFD.js} +3 -3
- package/dist/{chunk-6QM5OWGZ.js → chunk-O2JWF7ZM.js} +2 -2
- package/dist/{chunk-SHZPE6FD.js → chunk-OAIQ7A3R.js} +5 -5
- package/dist/{chunk-3PW4FI7U.js → chunk-ONP6JRFZ.js} +2 -2
- package/dist/{chunk-HEBCQTOD.js → chunk-PEMMV5YQ.js} +2 -2
- package/dist/{chunk-DHAPQUEF.js → chunk-PQTM27GU.js} +32 -15
- package/dist/{chunk-7B6IC3F7.js → chunk-PUIWESU3.js} +3 -3
- package/dist/{chunk-P4424VLT.js → chunk-QDY6BWE6.js} +2 -2
- package/dist/{chunk-3CYQWRGM.js → chunk-QOFSPFJ6.js} +351 -86
- package/dist/{chunk-C4NHQGHL.js → chunk-QSIADSMQ.js} +13 -2
- package/dist/{chunk-E4FJOLPJ.js → chunk-QYH2NR6G.js} +3 -3
- package/dist/{chunk-XLXDXJY2.js → chunk-RBNMNKNN.js} +5 -5
- package/dist/{chunk-ZYSALKKW.js → chunk-RMHZFWHF.js} +21 -21
- package/dist/{chunk-7DLZC73N.js → chunk-RPCIROW7.js} +2 -2
- package/dist/{chunk-CTA7255D.js → chunk-YDICIB2A.js} +2 -2
- package/dist/{chunk-HEWZ6INU.js → chunk-YOWIYFIV.js} +27 -41
- package/dist/{claude-U2JC2DNQ.js → claude-GT2BPXEL.js} +3 -3
- package/dist/{cli-UFCFDIVI.js → cli-6HTAJ54L.js} +5 -5
- package/dist/{cli-BTPTJWCC.js → cli-IV5DJCXU.js} +8 -8
- package/dist/cli.js +3 -3
- package/dist/{completion-UI4IOYXY.js → completion-PPM7MEI2.js} +2 -2
- package/dist/{config-DnpLL2kT.d.ts → config-DzHB75Jz.d.ts} +2 -0
- package/dist/{diagnostics-QSQDE2KO.js → diagnostics-EWU2ROTG.js} +7 -7
- package/dist/{doctor-EOBNGAAB.js → doctor-ZWZQMDKZ.js} +20 -20
- package/dist/{entry-HBROO3YP.js → entry-NDICBQ2F.js} +12 -12
- package/dist/{exec-mcp-DZU2DEPD.js → exec-mcp-AG4G7SG7.js} +13 -13
- package/dist/{harness-H4OKGO6F.js → harness-JABSZCAA.js} +3 -3
- package/dist/harness-launch-gate.js +5 -5
- package/dist/harness-worker.js +7 -7
- package/dist/hook-body.js +361 -81
- package/dist/{hooks-T5JAK3VQ.js → hooks-YVQSDQV3.js} +3 -3
- package/dist/{host-5JOCZURV.js → host-2SZRMHZX.js} +8 -8
- package/dist/{host-IRPBT5AL.js → host-BWZ5LA4Q.js} +16 -16
- package/dist/{host-run-KPH5ZNYU.js → host-run-SXLV4LHI.js} +21 -13
- package/dist/http.d.ts +1 -1
- package/dist/http.js +1 -1
- package/dist/{import-mcp-24QRNZBJ.js → import-mcp-2M7SZRVQ.js} +11 -11
- package/dist/index.d.ts +6 -4
- package/dist/index.js +19 -19
- package/dist/{init-EPIJY23S.js → init-HOOIFBAD.js} +2 -2
- package/dist/{install-MQ7QSJQ7.js → install-HF6CROQP.js} +19 -9
- package/dist/{invoke-2SXY6G3P.js → invoke-JP4MILYY.js} +9 -9
- package/dist/{list-C3WEYY3N.js → list-UBSBUZKS.js} +13 -13
- package/dist/{list-FB6RNYYB.js → list-WK2IYUK7.js} +4 -4
- package/dist/{logout-J4SFSWMA.js → logout-OO3DERRK.js} +12 -12
- package/dist/{logs-H3RPKNTE.js → logs-K3QXKRD4.js} +6 -6
- package/dist/mailbox/index.d.ts +4 -4
- package/dist/mailbox/index.js +3 -3
- package/dist/{mailbox-UECKDZ3Q.js → mailbox-DAJV6VAI.js} +10 -10
- package/dist/{mailbox-5DWLH4W2.js → mailbox-YN6PG66A.js} +4 -4
- package/dist/{mainline-FPK4HWFF.js → mainline-6K5BA3WX.js} +55 -33
- package/dist/{mcp-W6OADCKB.js → mcp-JXNTKRJG.js} +2 -2
- package/dist/{pause-2HQ7CKMR.js → pause-GRVTSKOK.js} +5 -5
- package/dist/{project-TZAYGUHM.js → project-M672MKQH.js} +4 -4
- package/dist/{pty-XTJ4MIWK.js → pty-LHKJKY2E.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-6DMPGG3N.js} +5 -5
- package/dist/{run-QQB74HRI.js → run-5W566T3V.js} +14 -14
- package/dist/{run-XZ75CAFL.js → run-ORBIERI3.js} +4 -4
- package/dist/{serve-TILM4DH5.js → serve-73SRPAV4.js} +9 -9
- package/dist/{setup-63E3TVJK.js → setup-ULKDPF5B.js} +5 -6
- package/dist/{start-login-C2BWQNO5.js → start-login-BGFAMCZL.js} +12 -12
- package/dist/{status-3AU65SCN.js → status-73FEFQUQ.js} +12 -12
- package/dist/{status-JMXH6XG4.js → status-YCW6YJ3S.js} +23 -23
- package/dist/{status-CM753VKY.js → status-YHXEAJ7U.js} +8 -8
- package/dist/stdio.d.ts +2 -2
- package/dist/stdio.js +5 -5
- package/dist/{sweep-VY2TNOO5.js → sweep-XF2HG3EO.js} +5 -5
- package/dist/{test-MCM44GOL.js → test-IMNBXOYW.js} +15 -17
- package/dist/{tui-BL4OSDW4.js → tui-5GDA22TB.js} +6 -6
- package/dist/{unbroadcast-RKTBP57G.js → unbroadcast-XP3OCVN3.js} +5 -5
- package/dist/{validate-AVM2VHMM.js → validate-KFBCUFI4.js} +5 -5
- package/dist/{worker-GHQKC5XU.js → worker-RV6NGSXT.js} +10 -10
- package/dist/{worktree-list-NEIDD66X.js → worktree-list-4PLE7K6L.js} +4 -4
- package/docs/git-workflow.md +48 -12
- package/docs/hooks.md +23 -14
- package/docs/project-configuration.md +21 -12
- package/docs/upgrading.md +52 -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/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 +33 -8
- 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 +25 -2
- package/plugins/pmcp/mod/sessions/types.ts +1 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/schema/catalog-v1.json +4 -15
- 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-QHH3TXOA.js +0 -7
- package/dist/{core-C1LPjxK6.d.ts → core-Sug_rZrx.d.ts} +1 -1
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
import type { Broadcast, Lease, Pause, SessionRecord } from "./types";
|
|
4
4
|
|
|
5
5
|
export const STATE_FILES = {
|
|
6
|
-
records: "
|
|
6
|
+
records: "sessions",
|
|
7
|
+
// The records' former directory. Deprecated: 0.20 still writes every record there too and
|
|
8
|
+
// reads it when sessions/ lacks one; 0.21 stops writing it.
|
|
9
|
+
legacyRecords: "fleet",
|
|
7
10
|
pause: "pause.json",
|
|
8
11
|
broadcast: "broadcast.json",
|
|
9
12
|
history: "broadcast-history.jsonl",
|
|
@@ -11,14 +14,34 @@ export const STATE_FILES = {
|
|
|
11
14
|
|
|
12
15
|
export const STALE_MS = 30 * 60 * 1000;
|
|
13
16
|
|
|
17
|
+
// Of a session's copies (sessions/ and fleet/), the one updated last; the first wins a tie.
|
|
18
|
+
export function latestRecord(
|
|
19
|
+
copies: readonly (SessionRecord | null)[],
|
|
20
|
+
): SessionRecord | null {
|
|
21
|
+
const time = (record: SessionRecord) =>
|
|
22
|
+
Date.parse(record.updatedAt ?? record.startedAt ?? "") || 0;
|
|
23
|
+
let latest: SessionRecord | null = null;
|
|
24
|
+
for (const copy of copies)
|
|
25
|
+
if (copy && (!latest || time(copy) > time(latest))) latest = copy;
|
|
26
|
+
return latest;
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
const LEASE_NAME = /^[a-z0-9][a-z0-9_-]*$/u;
|
|
15
30
|
|
|
16
|
-
//
|
|
31
|
+
// The lease file name is part of the shared formats (docs/git-workflow.md); never change it.
|
|
17
32
|
export function leaseFile(name: string): string {
|
|
18
33
|
if (!LEASE_NAME.test(name)) throw new Error(`invalid lease name ${name}`);
|
|
19
34
|
return `${name}-lease.json`;
|
|
20
35
|
}
|
|
21
36
|
|
|
37
|
+
// A file leaseFile could have named, so a reader can find every lease without the configuration.
|
|
38
|
+
export function isLeaseFile(file: string): boolean {
|
|
39
|
+
return (
|
|
40
|
+
file.endsWith("-lease.json") &&
|
|
41
|
+
LEASE_NAME.test(file.slice(0, -"-lease.json".length))
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
22
45
|
type Fields = Record<string, unknown>;
|
|
23
46
|
|
|
24
47
|
const text = (value: unknown): value is string => typeof value === "string";
|
|
@@ -118,7 +118,7 @@ export interface Recipient {
|
|
|
118
118
|
readonly session?: string;
|
|
119
119
|
readonly alias?: string;
|
|
120
120
|
readonly roles?: readonly string[];
|
|
121
|
-
readonly
|
|
121
|
+
readonly worktree?: string;
|
|
122
122
|
// When the session started: a broadcast to all sent before then is not for it.
|
|
123
123
|
readonly since?: string;
|
|
124
124
|
}
|
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.
|
|
4
|
+
"version": "0.20.0",
|
|
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,26 +145,15 @@
|
|
|
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",
|
|
159
154
|
"items": {
|
|
160
155
|
"type": "string",
|
|
161
|
-
"
|
|
162
|
-
"job_estimate",
|
|
163
|
-
"job_submit",
|
|
164
|
-
"job_status",
|
|
165
|
-
"job_result",
|
|
166
|
-
"job_cancel"
|
|
167
|
-
]
|
|
156
|
+
"minLength": 1
|
|
168
157
|
}
|
|
169
158
|
}
|
|
170
159
|
},
|
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
|
package/dist/chunk-QHH3TXOA.js
DELETED