@modootoday/pmcp 0.19.9 → 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-TM6B2Y3G.js → apply-QJ6MGLBX.js} +13 -13
- package/dist/{attachment-D84OGI6n.d.ts → attachment-ms6s8Aow.d.ts} +1 -1
- package/dist/{broadcast-DSCHWUMB.js → broadcast-LYOA6BEW.js} +4 -4
- package/dist/{chunk-YKU7KHJO.js → chunk-4VK5G3SV.js} +3 -3
- package/dist/{chunk-YXAPCHXJ.js → chunk-5JPD6VIH.js} +24 -4
- package/dist/{chunk-57FHYW74.js → chunk-66F3HLW4.js} +2 -2
- package/dist/{chunk-EONAJAMJ.js → chunk-7SDOSTW7.js} +3 -3
- package/dist/{chunk-IACJDHFQ.js → chunk-AWZF72SH.js} +5 -5
- package/dist/{chunk-FR6JHNLC.js → chunk-CQZYQAAV.js} +3 -3
- package/dist/{chunk-2S44RDO4.js → chunk-EKPMVEIA.js} +2 -2
- package/dist/{chunk-3UOFHLY4.js → chunk-FD6VGFYZ.js} +5 -5
- package/dist/chunk-FGYFA6JY.js +7 -0
- package/dist/{chunk-XNPOHPMJ.js → chunk-FQAJSNNU.js} +3 -3
- package/dist/{chunk-4XNAKVSO.js → chunk-IQD4W53M.js} +2 -2
- package/dist/{chunk-SPUCY4AG.js → chunk-IZABPDAO.js} +2 -2
- package/dist/{chunk-A6TM4NTI.js → chunk-J6HNP6HA.js} +2 -2
- package/dist/{chunk-PBDPWE5J.js → chunk-JBHGJKSL.js} +2 -2
- package/dist/{chunk-YYG3GUQW.js → chunk-K2C3KFGB.js} +9 -9
- package/dist/{chunk-BZ2RXI5I.js → chunk-L4MFGGSI.js} +2 -2
- package/dist/{chunk-W5RLIUNC.js → chunk-M2RYXWX2.js} +2 -2
- package/dist/{chunk-4XWVLC23.js → chunk-MZEMLFFD.js} +2 -2
- package/dist/{chunk-VDBUZKXC.js → chunk-O2JWF7ZM.js} +2 -2
- package/dist/{chunk-PG42KALG.js → chunk-OAIQ7A3R.js} +5 -5
- package/dist/{chunk-I4DLMIN5.js → chunk-ONP6JRFZ.js} +2 -2
- package/dist/{chunk-V7HG3STC.js → chunk-PQTM27GU.js} +32 -15
- package/dist/{chunk-YLPXTJJM.js → chunk-QDY6BWE6.js} +2 -2
- package/dist/{chunk-BRSESCGX.js → chunk-QOFSPFJ6.js} +13 -12
- package/dist/{chunk-RRKGSYQ4.js → chunk-QSIADSMQ.js} +13 -2
- package/dist/{chunk-MCYGYZVZ.js → chunk-QYH2NR6G.js} +2 -2
- package/dist/{chunk-XPWIJOZT.js → chunk-RBNMNKNN.js} +3 -3
- package/dist/{chunk-QTKD7JEL.js → chunk-RMHZFWHF.js} +15 -15
- package/dist/{chunk-QYQGPDBE.js → chunk-YDICIB2A.js} +2 -2
- package/dist/{chunk-CJ6OFTS3.js → chunk-YOWIYFIV.js} +6 -37
- package/dist/{claude-2C5L2HQL.js → claude-GT2BPXEL.js} +3 -3
- package/dist/{cli-YV6SFE4D.js → cli-6HTAJ54L.js} +4 -4
- package/dist/{cli-BVRPAI23.js → cli-IV5DJCXU.js} +8 -8
- package/dist/cli.js +3 -3
- package/dist/{completion-B3UT3GVI.js → completion-PPM7MEI2.js} +2 -2
- package/dist/{diagnostics-ONIAKCA3.js → diagnostics-EWU2ROTG.js} +6 -6
- package/dist/{doctor-MJFU5L6R.js → doctor-ZWZQMDKZ.js} +17 -17
- package/dist/{entry-DZGKCL4G.js → entry-NDICBQ2F.js} +10 -10
- package/dist/{exec-mcp-QK2VC6RX.js → exec-mcp-AG4G7SG7.js} +10 -10
- package/dist/{harness-GTED4GLK.js → harness-JABSZCAA.js} +3 -3
- package/dist/harness-launch-gate.js +4 -4
- package/dist/harness-worker.js +6 -6
- package/dist/hook-body.js +42 -20
- package/dist/{hooks-FRZ4SUNJ.js → hooks-YVQSDQV3.js} +3 -3
- package/dist/{host-AGNF2AQH.js → host-2SZRMHZX.js} +7 -7
- package/dist/{host-3HTCZNVJ.js → host-BWZ5LA4Q.js} +12 -12
- package/dist/{host-run-2OQZVQID.js → host-run-SXLV4LHI.js} +5 -5
- package/dist/http.d.ts +1 -1
- package/dist/http.js +1 -1
- package/dist/{import-mcp-7KEPR2B6.js → import-mcp-2M7SZRVQ.js} +8 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -17
- package/dist/{init-BHGCF7JL.js → init-HOOIFBAD.js} +2 -2
- package/dist/{invoke-CVHF6PEK.js → invoke-JP4MILYY.js} +8 -8
- package/dist/{list-6XGQ3FR3.js → list-UBSBUZKS.js} +10 -10
- package/dist/{logout-6RJLG2KG.js → logout-OO3DERRK.js} +9 -9
- package/dist/{logs-VTW7S2LR.js → logs-K3QXKRD4.js} +4 -4
- package/dist/mailbox/index.d.ts +3 -3
- package/dist/{mailbox-CNAONXN7.js → mailbox-DAJV6VAI.js} +9 -9
- package/dist/{mainline-JSG4MUKH.js → mainline-6K5BA3WX.js} +48 -25
- package/dist/{mcp-P55VLQLR.js → mcp-JXNTKRJG.js} +2 -2
- package/dist/{pause-V5VCNOSH.js → pause-GRVTSKOK.js} +4 -4
- package/dist/{project-B57IQPDK.js → project-M672MKQH.js} +4 -4
- package/dist/{pty-FD4JGBZL.js → pty-LHKJKY2E.js} +3 -3
- package/dist/{resume-7S4K3R4X.js → resume-6DMPGG3N.js} +4 -4
- package/dist/{run-MC2BPLOE.js → run-5W566T3V.js} +8 -8
- package/dist/{run-LFJXONLW.js → run-ORBIERI3.js} +4 -4
- package/dist/{serve-TFAEVXX3.js → serve-73SRPAV4.js} +3 -3
- package/dist/{setup-FHFQZJY6.js → setup-ULKDPF5B.js} +4 -4
- package/dist/{start-login-KXOHCR5A.js → start-login-BGFAMCZL.js} +9 -9
- package/dist/{status-AW7DOW7A.js → status-73FEFQUQ.js} +9 -9
- package/dist/{status-YXOIEVOJ.js → status-YCW6YJ3S.js} +13 -13
- package/dist/{status-OYRB3KL5.js → status-YHXEAJ7U.js} +7 -7
- package/dist/stdio.d.ts +2 -2
- package/dist/stdio.js +2 -2
- package/dist/{sweep-ZSYG6FNR.js → sweep-XF2HG3EO.js} +4 -4
- package/dist/{test-2HTOY4PJ.js → test-IMNBXOYW.js} +11 -13
- package/dist/{tui-DQFXYQ4H.js → tui-5GDA22TB.js} +4 -4
- package/dist/{unbroadcast-FONZJWEW.js → unbroadcast-XP3OCVN3.js} +4 -4
- package/dist/{validate-WOFI7TMT.js → validate-KFBCUFI4.js} +2 -2
- package/dist/{worker-UXPGXAV2.js → worker-RV6NGSXT.js} +8 -8
- package/docs/git-workflow.md +22 -5
- package/docs/hooks.md +1 -2
- package/docs/project-configuration.md +7 -5
- 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/reader/read.ts +14 -4
- package/plugins/pmcp/mod/sessions/format.ts +16 -1
- package/plugins/pmcp/mod/sessions/types.ts +1 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/schema/catalog-v1.json +1 -7
- package/dist/chunk-YGTJQVCK.js +0 -7
- package/dist/{core-C1LPjxK6.d.ts → core-Sug_rZrx.d.ts} +1 -1
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
asPause,
|
|
5
5
|
asRecord,
|
|
6
6
|
isLeaseFile,
|
|
7
|
+
latestRecord,
|
|
7
8
|
recordLive,
|
|
8
9
|
STATE_FILES,
|
|
9
10
|
} from "../sessions/format";
|
|
@@ -49,11 +50,20 @@ export async function readRecords(
|
|
|
49
50
|
files: StateFiles,
|
|
50
51
|
options: ReadOptions,
|
|
51
52
|
): Promise<SessionRecord[]> {
|
|
52
|
-
|
|
53
|
-
const
|
|
53
|
+
// sessions/ and the deprecated fleet/: each session once, the copy updated last.
|
|
54
|
+
const found = new Map<string, (SessionRecord | null)[]>();
|
|
55
|
+
for (const folder of [STATE_PATHS.records, STATE_FILES.legacyRecords]) {
|
|
56
|
+
const directory = `${options.stateDir}/${folder}`;
|
|
57
|
+
const names = await files.list(directory).catch(() => [] as string[]);
|
|
58
|
+
for (const name of names.filter((item) => item.endsWith(".json")))
|
|
59
|
+
found.set(name, [
|
|
60
|
+
...(found.get(name) ?? []),
|
|
61
|
+
asRecord(await readJson(files, `${directory}/${name}`)),
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
54
64
|
const records: SessionRecord[] = [];
|
|
55
|
-
for (const name of
|
|
56
|
-
const record =
|
|
65
|
+
for (const name of [...found.keys()].sort()) {
|
|
66
|
+
const record = latestRecord(found.get(name)!);
|
|
57
67
|
if (!record) continue;
|
|
58
68
|
const pidAlive = await isAlive(files, record.pid);
|
|
59
69
|
if (recordLive(record, options.now, pidAlive)) records.push(record);
|
|
@@ -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,6 +14,18 @@ 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.
|
|
@@ -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
package/dist/chunk-YGTJQVCK.js
DELETED