@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.
Files changed (107) 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-TM6B2Y3G.js → apply-QJ6MGLBX.js} +13 -13
  6. package/dist/{attachment-D84OGI6n.d.ts → attachment-ms6s8Aow.d.ts} +1 -1
  7. package/dist/{broadcast-DSCHWUMB.js → broadcast-LYOA6BEW.js} +4 -4
  8. package/dist/{chunk-YKU7KHJO.js → chunk-4VK5G3SV.js} +3 -3
  9. package/dist/{chunk-YXAPCHXJ.js → chunk-5JPD6VIH.js} +24 -4
  10. package/dist/{chunk-57FHYW74.js → chunk-66F3HLW4.js} +2 -2
  11. package/dist/{chunk-EONAJAMJ.js → chunk-7SDOSTW7.js} +3 -3
  12. package/dist/{chunk-IACJDHFQ.js → chunk-AWZF72SH.js} +5 -5
  13. package/dist/{chunk-FR6JHNLC.js → chunk-CQZYQAAV.js} +3 -3
  14. package/dist/{chunk-2S44RDO4.js → chunk-EKPMVEIA.js} +2 -2
  15. package/dist/{chunk-3UOFHLY4.js → chunk-FD6VGFYZ.js} +5 -5
  16. package/dist/chunk-FGYFA6JY.js +7 -0
  17. package/dist/{chunk-XNPOHPMJ.js → chunk-FQAJSNNU.js} +3 -3
  18. package/dist/{chunk-4XNAKVSO.js → chunk-IQD4W53M.js} +2 -2
  19. package/dist/{chunk-SPUCY4AG.js → chunk-IZABPDAO.js} +2 -2
  20. package/dist/{chunk-A6TM4NTI.js → chunk-J6HNP6HA.js} +2 -2
  21. package/dist/{chunk-PBDPWE5J.js → chunk-JBHGJKSL.js} +2 -2
  22. package/dist/{chunk-YYG3GUQW.js → chunk-K2C3KFGB.js} +9 -9
  23. package/dist/{chunk-BZ2RXI5I.js → chunk-L4MFGGSI.js} +2 -2
  24. package/dist/{chunk-W5RLIUNC.js → chunk-M2RYXWX2.js} +2 -2
  25. package/dist/{chunk-4XWVLC23.js → chunk-MZEMLFFD.js} +2 -2
  26. package/dist/{chunk-VDBUZKXC.js → chunk-O2JWF7ZM.js} +2 -2
  27. package/dist/{chunk-PG42KALG.js → chunk-OAIQ7A3R.js} +5 -5
  28. package/dist/{chunk-I4DLMIN5.js → chunk-ONP6JRFZ.js} +2 -2
  29. package/dist/{chunk-V7HG3STC.js → chunk-PQTM27GU.js} +32 -15
  30. package/dist/{chunk-YLPXTJJM.js → chunk-QDY6BWE6.js} +2 -2
  31. package/dist/{chunk-BRSESCGX.js → chunk-QOFSPFJ6.js} +13 -12
  32. package/dist/{chunk-RRKGSYQ4.js → chunk-QSIADSMQ.js} +13 -2
  33. package/dist/{chunk-MCYGYZVZ.js → chunk-QYH2NR6G.js} +2 -2
  34. package/dist/{chunk-XPWIJOZT.js → chunk-RBNMNKNN.js} +3 -3
  35. package/dist/{chunk-QTKD7JEL.js → chunk-RMHZFWHF.js} +15 -15
  36. package/dist/{chunk-QYQGPDBE.js → chunk-YDICIB2A.js} +2 -2
  37. package/dist/{chunk-CJ6OFTS3.js → chunk-YOWIYFIV.js} +6 -37
  38. package/dist/{claude-2C5L2HQL.js → claude-GT2BPXEL.js} +3 -3
  39. package/dist/{cli-YV6SFE4D.js → cli-6HTAJ54L.js} +4 -4
  40. package/dist/{cli-BVRPAI23.js → cli-IV5DJCXU.js} +8 -8
  41. package/dist/cli.js +3 -3
  42. package/dist/{completion-B3UT3GVI.js → completion-PPM7MEI2.js} +2 -2
  43. package/dist/{diagnostics-ONIAKCA3.js → diagnostics-EWU2ROTG.js} +6 -6
  44. package/dist/{doctor-MJFU5L6R.js → doctor-ZWZQMDKZ.js} +17 -17
  45. package/dist/{entry-DZGKCL4G.js → entry-NDICBQ2F.js} +10 -10
  46. package/dist/{exec-mcp-QK2VC6RX.js → exec-mcp-AG4G7SG7.js} +10 -10
  47. package/dist/{harness-GTED4GLK.js → harness-JABSZCAA.js} +3 -3
  48. package/dist/harness-launch-gate.js +4 -4
  49. package/dist/harness-worker.js +6 -6
  50. package/dist/hook-body.js +42 -20
  51. package/dist/{hooks-FRZ4SUNJ.js → hooks-YVQSDQV3.js} +3 -3
  52. package/dist/{host-AGNF2AQH.js → host-2SZRMHZX.js} +7 -7
  53. package/dist/{host-3HTCZNVJ.js → host-BWZ5LA4Q.js} +12 -12
  54. package/dist/{host-run-2OQZVQID.js → host-run-SXLV4LHI.js} +5 -5
  55. package/dist/http.d.ts +1 -1
  56. package/dist/http.js +1 -1
  57. package/dist/{import-mcp-7KEPR2B6.js → import-mcp-2M7SZRVQ.js} +8 -8
  58. package/dist/index.d.ts +2 -2
  59. package/dist/index.js +17 -17
  60. package/dist/{init-BHGCF7JL.js → init-HOOIFBAD.js} +2 -2
  61. package/dist/{invoke-CVHF6PEK.js → invoke-JP4MILYY.js} +8 -8
  62. package/dist/{list-6XGQ3FR3.js → list-UBSBUZKS.js} +10 -10
  63. package/dist/{logout-6RJLG2KG.js → logout-OO3DERRK.js} +9 -9
  64. package/dist/{logs-VTW7S2LR.js → logs-K3QXKRD4.js} +4 -4
  65. package/dist/mailbox/index.d.ts +3 -3
  66. package/dist/{mailbox-CNAONXN7.js → mailbox-DAJV6VAI.js} +9 -9
  67. package/dist/{mainline-JSG4MUKH.js → mainline-6K5BA3WX.js} +48 -25
  68. package/dist/{mcp-P55VLQLR.js → mcp-JXNTKRJG.js} +2 -2
  69. package/dist/{pause-V5VCNOSH.js → pause-GRVTSKOK.js} +4 -4
  70. package/dist/{project-B57IQPDK.js → project-M672MKQH.js} +4 -4
  71. package/dist/{pty-FD4JGBZL.js → pty-LHKJKY2E.js} +3 -3
  72. package/dist/{resume-7S4K3R4X.js → resume-6DMPGG3N.js} +4 -4
  73. package/dist/{run-MC2BPLOE.js → run-5W566T3V.js} +8 -8
  74. package/dist/{run-LFJXONLW.js → run-ORBIERI3.js} +4 -4
  75. package/dist/{serve-TFAEVXX3.js → serve-73SRPAV4.js} +3 -3
  76. package/dist/{setup-FHFQZJY6.js → setup-ULKDPF5B.js} +4 -4
  77. package/dist/{start-login-KXOHCR5A.js → start-login-BGFAMCZL.js} +9 -9
  78. package/dist/{status-AW7DOW7A.js → status-73FEFQUQ.js} +9 -9
  79. package/dist/{status-YXOIEVOJ.js → status-YCW6YJ3S.js} +13 -13
  80. package/dist/{status-OYRB3KL5.js → status-YHXEAJ7U.js} +7 -7
  81. package/dist/stdio.d.ts +2 -2
  82. package/dist/stdio.js +2 -2
  83. package/dist/{sweep-ZSYG6FNR.js → sweep-XF2HG3EO.js} +4 -4
  84. package/dist/{test-2HTOY4PJ.js → test-IMNBXOYW.js} +11 -13
  85. package/dist/{tui-DQFXYQ4H.js → tui-5GDA22TB.js} +4 -4
  86. package/dist/{unbroadcast-FONZJWEW.js → unbroadcast-XP3OCVN3.js} +4 -4
  87. package/dist/{validate-WOFI7TMT.js → validate-KFBCUFI4.js} +2 -2
  88. package/dist/{worker-UXPGXAV2.js → worker-RV6NGSXT.js} +8 -8
  89. package/docs/git-workflow.md +22 -5
  90. package/docs/hooks.md +1 -2
  91. package/docs/project-configuration.md +7 -5
  92. package/docs/upgrading.md +52 -0
  93. package/gemini-extension.json +2 -2
  94. package/mcp.json +1 -1
  95. package/package.json +5 -5
  96. package/plugin.json +1 -1
  97. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  98. package/plugins/pmcp/.mcp.json +1 -1
  99. package/plugins/pmcp/gemini-extension.json +2 -2
  100. package/plugins/pmcp/mcp.json +1 -1
  101. package/plugins/pmcp/mod/reader/read.ts +14 -4
  102. package/plugins/pmcp/mod/sessions/format.ts +16 -1
  103. package/plugins/pmcp/mod/sessions/types.ts +1 -1
  104. package/plugins/pmcp/plugin.json +1 -1
  105. package/schema/catalog-v1.json +1 -7
  106. package/dist/chunk-YGTJQVCK.js +0 -7
  107. 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
- const directory = `${options.stateDir}/${STATE_PATHS.records}`;
53
- const names = await files.list(directory).catch(() => [] as string[]);
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 names.filter((item) => item.endsWith(".json")).sort()) {
56
- const record = asRecord(await readJson(files, `${directory}/${name}`));
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: "fleet",
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 desk?: string;
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
  }
@@ -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.9",
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",
@@ -153,13 +153,7 @@
153
153
  "type": "array",
154
154
  "items": {
155
155
  "type": "string",
156
- "enum": [
157
- "job_estimate",
158
- "job_submit",
159
- "job_status",
160
- "job_result",
161
- "job_cancel"
162
- ]
156
+ "minLength": 1
163
157
  }
164
158
  }
165
159
  },
@@ -1,7 +0,0 @@
1
- // src/commands/version.ts
2
- var VERSION = "0.19.9";
3
-
4
- export {
5
- VERSION
6
- };
7
- //# sourceMappingURL=chunk-YGTJQVCK.js.map
@@ -2,9 +2,9 @@ import { z } from 'zod';
2
2
 
3
3
  declare const operationSchema: z.ZodEnum<{
4
4
  read: "read";
5
+ sessions: "sessions";
5
6
  inbox: "inbox";
6
7
  ack: "ack";
7
- sessions: "sessions";
8
8
  send: "send";
9
9
  }>;
10
10
  type MailboxOperation = z.output<typeof operationSchema>;