@modootoday/pmcp 0.22.12 → 0.23.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/affected-D6FRJPPI.js +836 -0
- package/dist/{apply-LPKZZ6EL.js → apply-3PWUO4J5.js} +27 -22
- package/dist/{available-BFXLII4A.js → available-74CMIBPD.js} +9 -9
- package/dist/{broadcast-DZGMSZRG.js → broadcast-VKZY7WSD.js} +6 -5
- package/dist/chunk-2GZKA33O.js +173 -0
- package/dist/chunk-2HL2MFNI.js +159 -0
- package/dist/{chunk-OAX6MIOZ.js → chunk-2K4WYN4C.js} +2 -2
- package/dist/{chunk-PEMMV5YQ.js → chunk-2MX5C7B2.js} +3 -3
- package/dist/{chunk-7I7O7ZNT.js → chunk-3V37OZQH.js} +5 -3
- package/dist/chunk-43MXRTKH.js +134 -0
- package/dist/chunk-4VVQLWTS.js +93 -0
- package/dist/{chunk-DYZVHO2L.js → chunk-5HNLHI5F.js} +2 -2
- package/dist/{chunk-JEL35P7S.js → chunk-5NDUWEMW.js} +2 -2
- package/dist/chunk-65BW7Y6O.js +40 -0
- package/dist/{chunk-HUBJWC7T.js → chunk-6NRLBSEG.js} +7 -7
- package/dist/chunk-6QJ3F445.js +166 -0
- package/dist/{chunk-2OOWAGBE.js → chunk-72V6U7CZ.js} +3 -3
- package/dist/{chunk-RPCIROW7.js → chunk-7CHUMF3E.js} +2 -2
- package/dist/{chunk-INT7QLEU.js → chunk-7DJQASH3.js} +25 -6
- package/dist/chunk-7IRXUPM2.js +7 -0
- package/dist/{chunk-UDVYVRGJ.js → chunk-DNSHJIS4.js} +2 -2
- package/dist/{chunk-UMQLIRSU.js → chunk-DZTSCJOZ.js} +3 -3
- package/dist/{chunk-KEHB4FZP.js → chunk-E2E4HIEN.js} +49 -3
- package/dist/{chunk-SUJCVEBM.js → chunk-EQF64INS.js} +3 -3
- package/dist/chunk-F3R5HEUB.js +39 -0
- package/dist/chunk-FOLA4EUJ.js +261 -0
- package/dist/chunk-FQLCD4HU.js +24 -0
- package/dist/{chunk-OEH47H6A.js → chunk-GUHOEIHP.js} +3 -20
- package/dist/{chunk-B2WRYGHJ.js → chunk-HES44LTA.js} +5 -5
- package/dist/{chunk-RHJEGLYM.js → chunk-HF5D6B2U.js} +45 -6
- package/dist/{chunk-R5MT42JS.js → chunk-HYXOJYVR.js} +2 -2
- package/dist/chunk-JANBBPKP.js +50 -0
- package/dist/{chunk-ITOTOC6Y.js → chunk-JJFPSFDU.js} +3 -3
- package/dist/{chunk-XNML2KIC.js → chunk-JPYQDOEW.js} +3 -3
- package/dist/{chunk-SPZQRLL5.js → chunk-KYGGQPAH.js} +18 -6
- package/dist/{chunk-EX4YXPVW.js → chunk-LGRFYN5T.js} +2 -2
- package/dist/{chunk-DP326AER.js → chunk-LO54UUDE.js} +2 -2
- package/dist/{chunk-5QKXEWDB.js → chunk-MHKY6TNF.js} +6 -4
- package/dist/chunk-N7ANFMA5.js +171 -0
- package/dist/{chunk-KPKMEUUH.js → chunk-OGCJO6HQ.js} +9 -8
- package/dist/{chunk-N63QCJHX.js → chunk-P25V6NEX.js} +5 -5
- package/dist/{chunk-PUIWESU3.js → chunk-Q6V274OB.js} +8 -6
- package/dist/chunk-QR6A3TYP.js +315 -0
- package/dist/{chunk-EIDIVIAD.js → chunk-QYLOIM4U.js} +9 -2
- package/dist/{chunk-MIFPPUWY.js → chunk-RRKA3GF5.js} +4 -4
- package/dist/{chunk-7CSUKCU7.js → chunk-RZYZILU4.js} +17 -96
- package/dist/{chunk-FODUHLZM.js → chunk-SDQYZDHS.js} +2 -2
- package/dist/chunk-SGFTHKKS.js +86 -0
- package/dist/chunk-T6C3TSTO.js +99 -0
- package/dist/chunk-UVTGY2R3.js +78 -0
- package/dist/{chunk-LLT5FQBE.js → chunk-VBVNOLRR.js} +7 -3
- package/dist/{chunk-ABTJQ4QV.js → chunk-WBPVNCQO.js} +20 -5
- package/dist/{chunk-63RZGEVI.js → chunk-WQBKQTNT.js} +98 -26
- package/dist/{chunk-YGOWIJPE.js → chunk-WZYGM3FR.js} +6 -2
- package/dist/chunk-Y6NFETNG.js +232 -0
- package/dist/{chunk-D5MIZM6L.js → chunk-YRNFMPZB.js} +7 -8
- package/dist/{chunk-2GRECE6B.js → chunk-ZXMECZBI.js} +4 -4
- package/dist/{cli-34EDFXJA.js → cli-GFDT4YXM.js} +14 -15
- package/dist/{cli-JXPJFHUA.js → cli-YWV7FLYO.js} +24 -12
- package/dist/cli.js +317 -51
- package/dist/{completion-KTECNPVY.js → completion-OKGNN7DE.js} +25 -21
- package/dist/{diagnostics-I5VZHK42.js → diagnostics-N4XRRCQG.js} +10 -6
- package/dist/{doctor-JJ2VUNHT.js → doctor-3H6UYNEA.js} +27 -23
- package/dist/{entry-OT7BN3ID.js → entry-KDLLG6ED.js} +19 -15
- package/dist/{exec-mcp-3E4SRJUY.js → exec-mcp-AENALAHJ.js} +15 -11
- package/dist/{harness-Q236VJSU.js → harness-GRYTNUF2.js} +26 -44
- package/dist/harness-launch-gate.js +8 -4
- package/dist/harness-worker.js +10 -6
- package/dist/heavy-BGXKJKYB.js +1965 -0
- package/dist/hook-body.js +69 -21
- package/dist/hooks-V25ANQ4Q.js +24 -0
- package/dist/{host-LT5JMUFJ.js → host-4EGPADOJ.js} +11 -7
- package/dist/{host-UDC4HVX3.js → host-MLSWY7D7.js} +24 -17
- package/dist/{host-run-LD63JGN7.js → host-run-VI52IUKF.js} +10 -6
- package/dist/http.js +1 -1
- package/dist/{import-mcp-URVONIZ3.js → import-mcp-FIXFLUDM.js} +18 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -12
- package/dist/init-ALTBFUPP.js +14 -0
- package/dist/{install-7V6NIA7W.js → install-5JH4DSFF.js} +10 -10
- package/dist/{invoke-JW5OC2HO.js → invoke-7T7UY57O.js} +12 -8
- package/dist/{list-UM4DYJRL.js → list-JFZ7UZLV.js} +18 -14
- package/dist/{list-WK2IYUK7.js → list-LV5EKCF6.js} +11 -7
- package/dist/{logout-H5X4D26I.js → logout-7CNBO76Z.js} +15 -11
- package/dist/{logs-UHJM7ZCL.js → logs-2JEMSNSG.js} +11 -10
- package/dist/{mailbox-NIMBOQPA.js → mailbox-5FVFMQ2J.js} +12 -44
- package/dist/{mailbox-YN6PG66A.js → mailbox-ZHZWZMAY.js} +14 -21
- package/dist/{mainline-74WCH4T4.js → mainline-6PBT3VNR.js} +75 -126
- package/dist/{marketplace-G4VQET5W.js → marketplace-2X3OOEPW.js} +10 -9
- package/dist/{mcp-6P3MVT4V.js → mcp-MVQVMAKJ.js} +4 -4
- package/dist/{mcp-AXHV547W.js → mcp-PBTQ5SJW.js} +2 -2
- package/dist/{models-ISU4DCMA.js → models-XSF45MCD.js} +9 -5
- package/dist/{pause-CBZ3BTJL.js → pause-CMZOIHTJ.js} +6 -5
- package/dist/{preview-DT7DWG5F.js → preview-465CQJBQ.js} +4 -4
- package/dist/{project-6QUIC73W.js → project-FZGJRG2U.js} +14 -12
- package/dist/{reindex-I7RYWCUR.js → reindex-D62HQAN2.js} +7 -7
- package/dist/{report-ZHOHQ4PZ.js → report-UB7MXAUB.js} +14 -13
- package/dist/{resume-UJEWQ66P.js → resume-PAKIT4TT.js} +6 -5
- package/dist/{run-HQTB7N2R.js → run-TOP37ZQC.js} +14 -10
- package/dist/run-VGJDMA2O.js +23 -0
- package/dist/{serve-APEVIJD2.js → serve-LR7SJHNH.js} +13 -13
- package/dist/{session-YZVX4NGN.js → session-3YVVO2GR.js} +6 -6
- package/dist/{setup-SOUBEZ3H.js → setup-6AQUOWOH.js} +7 -4
- package/dist/{smoke-2FI5D74B.js → smoke-6X6IXQIQ.js} +4 -4
- package/dist/{start-login-ER7DEGYN.js → start-login-X37KGCCB.js} +16 -12
- package/dist/{status-KN2ZE64O.js → status-4PYPTYUB.js} +7 -6
- package/dist/{status-7NYXRZ3R.js → status-E4AFUOQO.js} +24 -13
- package/dist/{status-OGABWCPO.js → status-LBRK37GA.js} +35 -30
- package/dist/stdio.js +2 -2
- package/dist/{sweep-EPZCW63Q.js → sweep-VURZU6DI.js} +6 -5
- package/dist/{test-WRZQERYC.js → test-D2EEFUN2.js} +18 -14
- package/dist/{tui-YUHQ36FC.js → tui-D7E3MD3X.js} +45 -19
- package/dist/{unbroadcast-N6LXHAMT.js → unbroadcast-7AMLURCG.js} +6 -5
- package/dist/{validate-KFBCUFI4.js → validate-YXR7FJJX.js} +11 -9
- package/dist/wait-HEODT7KV.js +141 -0
- package/dist/{worker-OKBJNDEI.js → worker-WTBC6VYO.js} +12 -8
- package/dist/{worktree-create-KMXPQXIQ.js → worktree-create-FTSLMZWS.js} +2 -2
- package/docs/commands.md +108 -36
- package/docs/git-workflow.md +51 -0
- package/docs/hooks.md +11 -4
- package/docs/project-configuration.md +136 -20
- package/docs/terminal-workspace.md +2 -0
- package/docs/upgrading.md +54 -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/headless-agents-ci-scaffold/SKILL.md +1 -1
- package/plugins/pmcp/skills/pmcp-project-init/SKILL.md +1 -1
- package/plugins/pmcp/skills/pmcp-sessions-and-git/SKILL.md +3 -2
- package/skills/headless-agents-ci-scaffold/SKILL.md +1 -1
- package/skills/pmcp-project-init/SKILL.md +1 -1
- package/skills/pmcp-sessions-and-git/SKILL.md +3 -2
- package/dist/chunk-2P4Z2NUX.js +0 -28
- package/dist/chunk-3C5FVHQ3.js +0 -7
- package/dist/chunk-3Y3HDMHA.js +0 -108
- package/dist/chunk-A4PKLESO.js +0 -112
- package/dist/chunk-E3DQB5LS.js +0 -48
- package/dist/chunk-GFOQDLPL.js +0 -35
- package/dist/chunk-JWRZDYB5.js +0 -59
- package/dist/chunk-LMUBBIE2.js +0 -83
- package/dist/chunk-SMZPYJQI.js +0 -151
- package/dist/hooks-PABOEQO6.js +0 -24
- package/dist/init-4O24ZNUQ.js +0 -14
- package/dist/run-GZK3XJ62.js +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/commands/options/inspection.ts
|
|
2
2
|
var configOption = {
|
|
3
3
|
name: "config",
|
|
4
|
-
describe: "
|
|
4
|
+
describe: "A pmcp.toml to read instead of the nearest one.",
|
|
5
5
|
placeholder: "<file>"
|
|
6
6
|
};
|
|
7
7
|
var nearestConfigOption = {
|
|
@@ -11,7 +11,7 @@ var nearestConfigOption = {
|
|
|
11
11
|
};
|
|
12
12
|
var jsonOption = {
|
|
13
13
|
name: "json",
|
|
14
|
-
describe: "Print the
|
|
14
|
+
describe: "Print the result as one JSON envelope on stdout.",
|
|
15
15
|
boolean: true
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
nearestConfigOption,
|
|
21
21
|
jsonOption
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-JPYQDOEW.js.map
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readLeaseSettings
|
|
3
|
+
} from "./chunk-FOLA4EUJ.js";
|
|
1
4
|
import {
|
|
2
5
|
ProjectError
|
|
3
6
|
} from "./chunk-TYY5TYHF.js";
|
|
4
7
|
import {
|
|
5
8
|
projectStateDir
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FQLCD4HU.js";
|
|
7
10
|
import {
|
|
8
11
|
lockProblem
|
|
9
12
|
} from "./chunk-XWLMZKH2.js";
|
|
10
13
|
import {
|
|
11
14
|
VERSION
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7IRXUPM2.js";
|
|
13
16
|
import {
|
|
14
17
|
ConfigError
|
|
15
18
|
} from "./chunk-GJXOFDJT.js";
|
|
@@ -230,7 +233,7 @@ import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
|
230
233
|
import { join as join4 } from "path";
|
|
231
234
|
|
|
232
235
|
// src/project/host-spec.ts
|
|
233
|
-
import { isAbsolute, normalize } from "path";
|
|
236
|
+
import { dirname as dirname3, isAbsolute, normalize } from "path";
|
|
234
237
|
|
|
235
238
|
// src/project/host-plugins.ts
|
|
236
239
|
var HOST_PORT = /^(\[[0-9a-f:]+\]|[a-z0-9.-]+):(\*|[0-9]{1,5})$/iu;
|
|
@@ -423,9 +426,17 @@ function names(path, where, value) {
|
|
|
423
426
|
return fail2(path, error.message);
|
|
424
427
|
}
|
|
425
428
|
}
|
|
429
|
+
function declaresPtyHost(host) {
|
|
430
|
+
if (host === null || typeof host !== "object" || Array.isArray(host))
|
|
431
|
+
return host !== void 0;
|
|
432
|
+
const keys = Object.keys(host);
|
|
433
|
+
return keys.length === 0 || keys.some((key) => key !== "lease");
|
|
434
|
+
}
|
|
426
435
|
function readHost(path, raw) {
|
|
427
436
|
if (raw === void 0) return void 0;
|
|
428
|
-
const root = table2(path, "[host]", raw);
|
|
437
|
+
const { lease, ...root } = table2(path, "[host]", raw);
|
|
438
|
+
if (lease !== void 0) readLeaseSettings(path, dirname3(path), { lease });
|
|
439
|
+
if (!declaresPtyHost(raw)) return void 0;
|
|
429
440
|
only(path, "[host]", root, [
|
|
430
441
|
"sessions",
|
|
431
442
|
"answers",
|
|
@@ -581,6 +592,8 @@ export {
|
|
|
581
592
|
packagedBinary,
|
|
582
593
|
missingBinary,
|
|
583
594
|
nativeBinary,
|
|
595
|
+
declaresPtyHost,
|
|
596
|
+
readHost,
|
|
584
597
|
replaceFile,
|
|
585
598
|
replaceLink,
|
|
586
599
|
lockVersionProblem,
|
|
@@ -589,7 +602,6 @@ export {
|
|
|
589
602
|
readLockFile,
|
|
590
603
|
readLock,
|
|
591
604
|
writeLock,
|
|
592
|
-
readHost,
|
|
593
605
|
HOST_MANIFEST,
|
|
594
606
|
HOST_POLICY,
|
|
595
607
|
hostOutputs,
|
|
@@ -598,4 +610,4 @@ export {
|
|
|
598
610
|
hostEnvDoctor,
|
|
599
611
|
hostDoctor
|
|
600
612
|
};
|
|
601
|
-
//# sourceMappingURL=chunk-
|
|
613
|
+
//# sourceMappingURL=chunk-KYGGQPAH.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
nativeBinary,
|
|
9
9
|
ptyBinary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KYGGQPAH.js";
|
|
11
11
|
|
|
12
12
|
// src/tui/rust.ts
|
|
13
13
|
import { spawn } from "child_process";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
runTui,
|
|
63
63
|
dependencies
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-LGRFYN5T.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-34DECPVC.js";
|
|
4
4
|
import {
|
|
5
5
|
ptyBinary
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KYGGQPAH.js";
|
|
7
7
|
import {
|
|
8
8
|
GroupStore,
|
|
9
9
|
egressPolicy,
|
|
@@ -775,4 +775,4 @@ export {
|
|
|
775
775
|
prepareBridge,
|
|
776
776
|
assertBridge
|
|
777
777
|
};
|
|
778
|
-
//# sourceMappingURL=chunk-
|
|
778
|
+
//# sourceMappingURL=chunk-LO54UUDE.js.map
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-HQOB7OQS.js";
|
|
6
6
|
import {
|
|
7
7
|
readStoreSettings
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3V37OZQH.js";
|
|
9
9
|
import {
|
|
10
|
-
expandPath,
|
|
11
10
|
projectStateDir
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FQLCD4HU.js";
|
|
12
|
+
import {
|
|
13
|
+
expandPath
|
|
14
|
+
} from "./chunk-GUHOEIHP.js";
|
|
13
15
|
|
|
14
16
|
// src/logging/sinks/file.ts
|
|
15
17
|
import {
|
|
@@ -152,4 +154,4 @@ export {
|
|
|
152
154
|
tail,
|
|
153
155
|
logLocation
|
|
154
156
|
};
|
|
155
|
-
//# sourceMappingURL=chunk-
|
|
157
|
+
//# sourceMappingURL=chunk-MHKY6TNF.js.map
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// src/lease/files.ts
|
|
2
|
+
import { spawnSync } from "child_process";
|
|
3
|
+
import {
|
|
4
|
+
appendFileSync,
|
|
5
|
+
existsSync,
|
|
6
|
+
mkdirSync,
|
|
7
|
+
readFileSync,
|
|
8
|
+
readdirSync,
|
|
9
|
+
renameSync,
|
|
10
|
+
rmSync,
|
|
11
|
+
writeFileSync
|
|
12
|
+
} from "fs";
|
|
13
|
+
import { join } from "path";
|
|
14
|
+
var LANES = [
|
|
15
|
+
"gate",
|
|
16
|
+
"hook",
|
|
17
|
+
"interactive",
|
|
18
|
+
"bulk"
|
|
19
|
+
];
|
|
20
|
+
function leasePaths(dir) {
|
|
21
|
+
return {
|
|
22
|
+
dir,
|
|
23
|
+
lock: join(dir, "heavy.lock"),
|
|
24
|
+
admit: join(dir, "admit.lock"),
|
|
25
|
+
holder: join(dir, "heavy.holder"),
|
|
26
|
+
waiters: join(dir, "waiters"),
|
|
27
|
+
running: join(dir, "running"),
|
|
28
|
+
settled: join(dir, "heavy.settled"),
|
|
29
|
+
log: join(dir, "heavy.log"),
|
|
30
|
+
usage: join(dir, "usage.jsonl"),
|
|
31
|
+
released: join(dir, "heavy.released")
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function nowUtc() {
|
|
35
|
+
return (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/u, "Z");
|
|
36
|
+
}
|
|
37
|
+
function epoch() {
|
|
38
|
+
return Math.floor(Date.now() / 1e3);
|
|
39
|
+
}
|
|
40
|
+
function newId() {
|
|
41
|
+
const random = Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0");
|
|
42
|
+
return `${epoch()}-${random}`;
|
|
43
|
+
}
|
|
44
|
+
function oneLine(text) {
|
|
45
|
+
return text.replace(/[\n\t]/gu, " ").slice(0, 200);
|
|
46
|
+
}
|
|
47
|
+
function writeRecord(file, pid, fields) {
|
|
48
|
+
const temporary = `${file}.tmp.${pid}`;
|
|
49
|
+
const lines = [
|
|
50
|
+
`pid=${pid}`,
|
|
51
|
+
`since=${fields.since ?? epoch()}`,
|
|
52
|
+
`started=${fields.started ?? nowUtc()}`,
|
|
53
|
+
`cwd=${fields.cwd}`,
|
|
54
|
+
`label=${fields.label}`,
|
|
55
|
+
`lane=${fields.lane}`,
|
|
56
|
+
`weight=${fields.weight}`,
|
|
57
|
+
`queued=${fields.queued ?? Date.now()}`,
|
|
58
|
+
`session=${fields.session}`,
|
|
59
|
+
...fields.bypass ? [`bypass=${fields.bypass}`] : [],
|
|
60
|
+
...fields.grace ? ["grace=1"] : [],
|
|
61
|
+
...fields.id ? [`id=${fields.id}`] : [],
|
|
62
|
+
...fields.promote ? [`promote=${fields.promote}`] : [],
|
|
63
|
+
...fields.cancel ? [`cancel=${fields.cancel}`] : []
|
|
64
|
+
];
|
|
65
|
+
writeFileSync(temporary, `${lines.join("\n")}
|
|
66
|
+
`);
|
|
67
|
+
renameSync(temporary, file);
|
|
68
|
+
}
|
|
69
|
+
function readRecord(file) {
|
|
70
|
+
let text;
|
|
71
|
+
try {
|
|
72
|
+
text = readFileSync(file, "utf8");
|
|
73
|
+
} catch {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
const field = (name) => text.split("\n").find((line) => line.startsWith(`${name}=`))?.slice(name.length + 1) ?? "";
|
|
77
|
+
const pid = Number(field("pid"));
|
|
78
|
+
if (!Number.isInteger(pid) || pid <= 0) return null;
|
|
79
|
+
const since = Number(field("since")) || epoch();
|
|
80
|
+
const lane = field("lane");
|
|
81
|
+
return {
|
|
82
|
+
pid,
|
|
83
|
+
since,
|
|
84
|
+
started: field("started"),
|
|
85
|
+
cwd: field("cwd"),
|
|
86
|
+
label: field("label"),
|
|
87
|
+
lane: LANES.includes(lane) ? lane : "interactive",
|
|
88
|
+
weight: Number(field("weight")) || 1,
|
|
89
|
+
queued: Number(field("queued")) || since * 1e3,
|
|
90
|
+
session: field("session"),
|
|
91
|
+
bypass: field("bypass"),
|
|
92
|
+
grace: field("grace") === "1",
|
|
93
|
+
id: field("id"),
|
|
94
|
+
promote: field("promote"),
|
|
95
|
+
cancel: field("cancel")
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function removeRecord(file, pid) {
|
|
99
|
+
if (readRecord(file)?.pid === pid) rmSync(file, { force: true });
|
|
100
|
+
}
|
|
101
|
+
function pidAlive(pid) {
|
|
102
|
+
try {
|
|
103
|
+
process.kill(pid, 0);
|
|
104
|
+
return true;
|
|
105
|
+
} catch (error) {
|
|
106
|
+
return error.code === "EPERM";
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function leaseHeld(paths) {
|
|
110
|
+
if (!existsSync(paths.lock)) return false;
|
|
111
|
+
return spawnSync("flock", ["-n", paths.lock, "true"]).status !== 0;
|
|
112
|
+
}
|
|
113
|
+
function logEvent(paths, pid, event, detail) {
|
|
114
|
+
try {
|
|
115
|
+
mkdirSync(paths.dir, { recursive: true });
|
|
116
|
+
appendFileSync(paths.log, `${nowUtc()} ${pid} ${event} ${detail}
|
|
117
|
+
`);
|
|
118
|
+
} catch {
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function liveRecords(dir, prune = true) {
|
|
122
|
+
let names;
|
|
123
|
+
try {
|
|
124
|
+
names = readdirSync(dir);
|
|
125
|
+
} catch {
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
const found = [];
|
|
129
|
+
for (const name of names) {
|
|
130
|
+
if (name.includes(".tmp.")) continue;
|
|
131
|
+
const file = join(dir, name);
|
|
132
|
+
const record = readRecord(file);
|
|
133
|
+
if (record === null || !pidAlive(record.pid)) {
|
|
134
|
+
if (prune) rmSync(file, { force: true });
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
found.push(record);
|
|
138
|
+
}
|
|
139
|
+
const rank = (record) => LANES.indexOf(record.lane);
|
|
140
|
+
return found.sort(
|
|
141
|
+
(a, b) => rank(a) - rank(b) || a.queued - b.queued || a.pid - b.pid
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function liveWaiters(paths) {
|
|
145
|
+
return liveRecords(paths.waiters);
|
|
146
|
+
}
|
|
147
|
+
function describeRecord(record) {
|
|
148
|
+
if (record === null) return "an unrecorded process";
|
|
149
|
+
if (!pidAlive(record.pid))
|
|
150
|
+
return `a new holder (last record: pid ${record.pid} ${record.label}, gone)`;
|
|
151
|
+
return `pid ${record.pid} ${record.label} (cwd ${record.cwd}, ${epoch() - record.since}s)`;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export {
|
|
155
|
+
LANES,
|
|
156
|
+
leasePaths,
|
|
157
|
+
nowUtc,
|
|
158
|
+
epoch,
|
|
159
|
+
newId,
|
|
160
|
+
oneLine,
|
|
161
|
+
writeRecord,
|
|
162
|
+
readRecord,
|
|
163
|
+
removeRecord,
|
|
164
|
+
pidAlive,
|
|
165
|
+
leaseHeld,
|
|
166
|
+
logEvent,
|
|
167
|
+
liveRecords,
|
|
168
|
+
liveWaiters,
|
|
169
|
+
describeRecord
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=chunk-N7ANFMA5.js.map
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
configFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7CHUMF3E.js";
|
|
4
4
|
import {
|
|
5
5
|
readFixtures,
|
|
6
6
|
smoke
|
|
7
7
|
} from "./chunk-ARXCYFFZ.js";
|
|
8
8
|
import {
|
|
9
|
-
ArgumentError
|
|
10
|
-
|
|
9
|
+
ArgumentError,
|
|
10
|
+
EXIT,
|
|
11
|
+
noConfig
|
|
12
|
+
} from "./chunk-Y6NFETNG.js";
|
|
11
13
|
|
|
12
14
|
// src/commands/hooks/smoke.ts
|
|
13
15
|
import { readFileSync } from "fs";
|
|
@@ -36,13 +38,12 @@ function printSmoke(ui, result) {
|
|
|
36
38
|
}
|
|
37
39
|
async function run(context, file) {
|
|
38
40
|
const config = configFrom(context);
|
|
39
|
-
if (!config)
|
|
40
|
-
throw new ArgumentError("no pmcp.toml here or above; pass --config");
|
|
41
|
+
if (!config) throw noConfig();
|
|
41
42
|
const result = runSmoke(config.dir, file, context.env);
|
|
42
43
|
if (context.args.flags.has("json"))
|
|
43
44
|
context.ui.data(JSON.stringify({ version: 1, ...result }) + "\n");
|
|
44
|
-
else printSmoke(context.ui, result);
|
|
45
|
-
return result.findings.length === 0 ?
|
|
45
|
+
else printSmoke(context.ui.results, result);
|
|
46
|
+
return result.findings.length === 0 ? EXIT.ok : EXIT.differences;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
export {
|
|
@@ -50,4 +51,4 @@ export {
|
|
|
50
51
|
printSmoke,
|
|
51
52
|
run
|
|
52
53
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-OGCJO6HQ.js.map
|
|
@@ -7,20 +7,20 @@ import {
|
|
|
7
7
|
observeSession,
|
|
8
8
|
openGroup,
|
|
9
9
|
runOperation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DZTSCJOZ.js";
|
|
11
11
|
import {
|
|
12
12
|
nativeHostTools
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SDQYZDHS.js";
|
|
14
14
|
import {
|
|
15
15
|
locateExecutable
|
|
16
16
|
} from "./chunk-R2GPCZUX.js";
|
|
17
17
|
import {
|
|
18
18
|
artifact,
|
|
19
19
|
stateDirectory
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LO54UUDE.js";
|
|
21
21
|
import {
|
|
22
22
|
ptyBinary
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KYGGQPAH.js";
|
|
24
24
|
import {
|
|
25
25
|
GroupStore,
|
|
26
26
|
privateJson
|
|
@@ -249,4 +249,4 @@ async function invoke(operation) {
|
|
|
249
249
|
export {
|
|
250
250
|
invoke
|
|
251
251
|
};
|
|
252
|
-
//# sourceMappingURL=chunk-
|
|
252
|
+
//# sourceMappingURL=chunk-P25V6NEX.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catalogFrom,
|
|
3
3
|
rootsFrom
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2MX5C7B2.js";
|
|
5
5
|
import {
|
|
6
6
|
configFrom
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7CHUMF3E.js";
|
|
8
8
|
import {
|
|
9
9
|
indexSpec
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7DJQASH3.js";
|
|
11
11
|
import {
|
|
12
12
|
ArgumentError,
|
|
13
13
|
EXIT,
|
|
14
14
|
one
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Y6NFETNG.js";
|
|
16
16
|
import {
|
|
17
17
|
loadEmbedder,
|
|
18
18
|
openEntryVectors
|
|
@@ -121,9 +121,11 @@ var indexCommand = {
|
|
|
121
121
|
`${todo.length} of ${entries.length} to encode`,
|
|
122
122
|
embedder.modelId
|
|
123
123
|
);
|
|
124
|
-
|
|
124
|
+
const progress = context.ui.progress(todo.length, "encoded");
|
|
125
|
+
for (const [done, entry] of todo.entries()) {
|
|
125
126
|
const vector = embedder.embedPassage ? await embedder.embedPassage(entry.description) : await embedder.embed(entry.description);
|
|
126
127
|
store.write(key, entry.name, entry.description, vector);
|
|
128
|
+
progress(done + 1);
|
|
127
129
|
}
|
|
128
130
|
const indexed = store.read(key).size;
|
|
129
131
|
if (context.args.flags.has("json")) {
|
|
@@ -165,4 +167,4 @@ export {
|
|
|
165
167
|
indexPath,
|
|
166
168
|
indexCommand
|
|
167
169
|
};
|
|
168
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-Q6V274OB.js.map
|