@modootoday/pmcp 0.22.11 → 0.22.13
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-ZWO2F5EM.js +836 -0
- package/dist/{apply-DXM56NV3.js → apply-OIKQ5SIY.js} +21 -17
- package/dist/{available-BFXLII4A.js → available-Z5MIDFPH.js} +3 -3
- package/dist/{broadcast-DZGMSZRG.js → broadcast-BF2QL3O7.js} +6 -5
- package/dist/{chunk-TU2SG5BM.js → chunk-24L4MO7H.js} +2 -2
- package/dist/{chunk-7I7O7ZNT.js → chunk-3V37OZQH.js} +5 -3
- package/dist/{chunk-PEMMV5YQ.js → chunk-4O4ZOSBQ.js} +3 -3
- package/dist/{chunk-7ZWSCSZM.js → chunk-5IZFEVPW.js} +2 -2
- package/dist/{chunk-TQODDSIG.js → chunk-5KWDQFVY.js} +4 -4
- package/dist/{chunk-R5MT42JS.js → chunk-5OFQVW2K.js} +2 -2
- package/dist/{chunk-REFEJ4VJ.js → chunk-5PNS6V5C.js} +2 -2
- package/dist/chunk-65BW7Y6O.js +40 -0
- package/dist/{chunk-IATFWEAX.js → chunk-733WVP2R.js} +19 -7
- package/dist/{chunk-URCQLONP.js → chunk-737BENAU.js} +8 -8
- package/dist/{chunk-GFOQDLPL.js → chunk-74O7KZUH.js} +13 -3
- package/dist/{chunk-5ZUEPPFZ.js → chunk-7ZOQELXR.js} +9 -7
- package/dist/{chunk-ENOMRAFS.js → chunk-A6DARDQ4.js} +3 -3
- package/dist/{chunk-PUIWESU3.js → chunk-A7XCUR2C.js} +4 -4
- package/dist/{chunk-P4N7DBD5.js → chunk-ANJMLKBR.js} +2 -2
- package/dist/chunk-BN4XAXMQ.js +65 -0
- package/dist/chunk-FOLA4EUJ.js +261 -0
- package/dist/chunk-FQLCD4HU.js +24 -0
- package/dist/chunk-G4ATQPQI.js +35 -0
- package/dist/{chunk-TZWLT6FD.js → chunk-GNVME5AD.js} +2 -2
- package/dist/{chunk-OEH47H6A.js → chunk-GUHOEIHP.js} +3 -20
- package/dist/{chunk-PIVKGKMR.js → chunk-ISGBOJT7.js} +3 -3
- package/dist/{chunk-RPCIROW7.js → chunk-J3QUG6O5.js} +2 -2
- package/dist/{chunk-B2WRYGHJ.js → chunk-JW5NMQTU.js} +3 -3
- package/dist/{chunk-2GOR4ZKO.js → chunk-K2VU3B4W.js} +99 -27
- package/dist/{chunk-5QKXEWDB.js → chunk-MHKY6TNF.js} +6 -4
- package/dist/chunk-N7ANFMA5.js +171 -0
- package/dist/{chunk-URP3QIWI.js → chunk-NNGGNXF2.js} +2 -2
- package/dist/{chunk-7CSUKCU7.js → chunk-P5D6RKMT.js} +13 -94
- package/dist/{chunk-EA2OSLFJ.js → chunk-QBSJL3SP.js} +42 -31
- package/dist/chunk-SGFTHKKS.js +86 -0
- package/dist/{chunk-Z5RNKEHF.js → chunk-T4GVN7XO.js} +5 -5
- package/dist/chunk-T6C3TSTO.js +99 -0
- package/dist/{chunk-NRBQK6UX.js → chunk-TYY5TYHF.js} +14 -1
- package/dist/{chunk-VEOYGFEQ.js → chunk-UED3RH53.js} +2 -2
- package/dist/{chunk-37RGCHTK.js → chunk-VNZTULFD.js} +3 -3
- package/dist/chunk-VSTUKACC.js +7 -0
- package/dist/{chunk-A4PKLESO.js → chunk-WFY7ATSZ.js} +8 -4
- package/dist/{chunk-KPKMEUUH.js → chunk-XSWF7APE.js} +3 -3
- package/dist/{chunk-GIDKCJVZ.js → chunk-ZKB7ZNKY.js} +4 -4
- package/dist/{chunk-ZEERJLE5.js → chunk-ZS5IDQFJ.js} +6 -6
- package/dist/{cli-JXPJFHUA.js → cli-FSSYFCV3.js} +15 -9
- package/dist/{cli-34EDFXJA.js → cli-IHVNE3WL.js} +9 -9
- package/dist/cli.js +19 -13
- package/dist/{completion-25CHR7SR.js → completion-ZTTJVV4C.js} +8 -6
- package/dist/{diagnostics-4PQSTI2X.js → diagnostics-XC5L6Z3E.js} +11 -7
- package/dist/{doctor-MHFALEWR.js → doctor-FGDSUBR3.js} +21 -17
- package/dist/{entry-25VWXTCW.js → entry-NNB2CQLZ.js} +20 -16
- package/dist/{exec-mcp-OQP5OU26.js → exec-mcp-ZU3Z3XT6.js} +16 -12
- package/dist/{harness-DTXPIWKL.js → harness-B7ANLH5M.js} +5 -5
- package/dist/harness-launch-gate.js +9 -5
- package/dist/harness-worker.js +11 -7
- package/dist/heavy-IIZBO4YM.js +1909 -0
- package/dist/hook-body.js +69 -21
- package/dist/{hooks-E33GKFRS.js → hooks-IEJTW7BV.js} +5 -5
- package/dist/{host-4YG67ZQ2.js → host-5P4D7GSE.js} +18 -14
- package/dist/host-XXWQ23LD.js +28 -0
- package/dist/{host-run-AJR2THEY.js → host-run-AEWHFVQL.js} +11 -7
- package/dist/http.js +1 -1
- package/dist/{import-mcp-MGDRREMJ.js → import-mcp-BQM5DKYH.js} +16 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -14
- package/dist/{init-RMTFPDJQ.js → init-L6GUO3PW.js} +2 -2
- package/dist/{install-7V6NIA7W.js → install-OFVLR7TI.js} +3 -3
- package/dist/invoke-3BQ5NG3P.js +29 -0
- package/dist/{list-WJE6NS7Y.js → list-EU4MJOXA.js} +17 -13
- package/dist/{list-WK2IYUK7.js → list-WWYCGD3X.js} +4 -4
- package/dist/{logout-SZY5GBIH.js → logout-6DFDYJUI.js} +16 -12
- package/dist/{logs-UHJM7ZCL.js → logs-BRF6DBKG.js} +7 -6
- package/dist/{mailbox-YN6PG66A.js → mailbox-AQCTXO3H.js} +3 -3
- package/dist/{mailbox-NIMBOQPA.js → mailbox-QYA2LQSE.js} +9 -41
- package/dist/{mainline-74WCH4T4.js → mainline-O5AEHG3J.js} +69 -121
- package/dist/{marketplace-G4VQET5W.js → marketplace-TI5HFAHB.js} +2 -2
- package/dist/{mcp-AXHV547W.js → mcp-4R53HSGY.js} +2 -2
- package/dist/{mcp-BPTTJKWL.js → mcp-HR5JFUW7.js} +2 -2
- package/dist/{models-ISU4DCMA.js → models-63NQBSV3.js} +2 -2
- package/dist/{pause-CBZ3BTJL.js → pause-UF7FQDJX.js} +6 -5
- package/dist/{preview-DT7DWG5F.js → preview-WSESS2UN.js} +3 -3
- package/dist/{project-6GDQBLDC.js → project-JXXL24WN.js} +6 -6
- package/dist/{reindex-I7RYWCUR.js → reindex-3GPKAFBW.js} +5 -5
- package/dist/{report-ZHOHQ4PZ.js → report-JUSKQPAC.js} +7 -6
- package/dist/{resume-UJEWQ66P.js → resume-3WAROOQ3.js} +6 -5
- package/dist/{run-V4LBDW5O.js → run-VUUQS4WY.js} +5 -5
- package/dist/{run-5UM7WUTH.js → run-XRWU4L73.js} +14 -10
- package/dist/{serve-723OCAUT.js → serve-OEX5V5CD.js} +7 -7
- package/dist/{setup-SOUBEZ3H.js → setup-SWNAC2C7.js} +6 -4
- package/dist/{smoke-2FI5D74B.js → smoke-5BGJXAHX.js} +4 -4
- package/dist/{start-login-M425T4GS.js → start-login-MG26NDE3.js} +16 -12
- package/dist/{status-XAP66PLK.js → status-APADL7O2.js} +16 -12
- package/dist/{status-KN2ZE64O.js → status-GKCIVAAR.js} +6 -5
- package/dist/{status-QEFRBTOO.js → status-LH7Q255G.js} +18 -14
- package/dist/stdio.js +2 -2
- package/dist/{sweep-EPZCW63Q.js → sweep-VTVPDAPY.js} +6 -5
- package/dist/{test-TL7DRDMD.js → test-TK2J3IB7.js} +17 -13
- package/dist/{tui-DGGNATMI.js → tui-YTPHHKCW.js} +5 -5
- package/dist/{unbroadcast-N6LXHAMT.js → unbroadcast-CH7BAQ2G.js} +6 -5
- package/dist/{validate-KFBCUFI4.js → validate-5QVZBE6W.js} +4 -4
- package/dist/wait-4HYJJAWO.js +141 -0
- package/dist/{worker-N7EOJVI3.js → worker-RBXYAMR4.js} +13 -9
- package/dist/{worktree-create-KMXPQXIQ.js → worktree-create-FEZNQUQ6.js} +2 -2
- package/docs/commands.md +48 -12
- package/docs/git-workflow.md +51 -0
- package/docs/hooks.md +8 -1
- package/docs/project-configuration.md +134 -18
- package/docs/upgrading.md +11 -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/dist/chunk-L7LQEVTE.js +0 -7
- package/dist/host-W6B2O44Q.js +0 -24
- package/dist/invoke-JRFOK374.js +0 -25
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LANES
|
|
3
|
+
} from "./chunk-N7ANFMA5.js";
|
|
4
|
+
import {
|
|
5
|
+
Reader,
|
|
6
|
+
child,
|
|
7
|
+
table
|
|
8
|
+
} from "./chunk-T6C3TSTO.js";
|
|
9
|
+
import {
|
|
10
|
+
expandPath
|
|
11
|
+
} from "./chunk-GUHOEIHP.js";
|
|
12
|
+
import {
|
|
13
|
+
ConfigError,
|
|
14
|
+
findConfig,
|
|
15
|
+
readConfig
|
|
16
|
+
} from "./chunk-GJXOFDJT.js";
|
|
17
|
+
|
|
18
|
+
// src/lease/config.ts
|
|
19
|
+
import { availableParallelism } from "os";
|
|
20
|
+
var DISABLE_ENV = "PMCP_HEAVY_DISABLE";
|
|
21
|
+
var NOW_ENV = "PMCP_HEAVY_NOW";
|
|
22
|
+
var BUSY_EXIT = 75;
|
|
23
|
+
var KEYS = [
|
|
24
|
+
"enabled",
|
|
25
|
+
"dir",
|
|
26
|
+
"marker_env",
|
|
27
|
+
"legacy_marker_env",
|
|
28
|
+
"legacy_skip_env",
|
|
29
|
+
"max_load",
|
|
30
|
+
"max_io",
|
|
31
|
+
"io_window",
|
|
32
|
+
"hard_factor",
|
|
33
|
+
"max_wait",
|
|
34
|
+
"load_grace",
|
|
35
|
+
"hold_warn",
|
|
36
|
+
"hold_max",
|
|
37
|
+
"heartbeat",
|
|
38
|
+
"poll",
|
|
39
|
+
"memory_max",
|
|
40
|
+
"budget",
|
|
41
|
+
"lanes",
|
|
42
|
+
"weights",
|
|
43
|
+
"commands",
|
|
44
|
+
"tiny",
|
|
45
|
+
"per_session",
|
|
46
|
+
"profiles",
|
|
47
|
+
"heavy",
|
|
48
|
+
"guard",
|
|
49
|
+
"io",
|
|
50
|
+
"usage_cap",
|
|
51
|
+
"settle_window"
|
|
52
|
+
];
|
|
53
|
+
var SIZE = /^[1-9]\d*[KMGT]$/u;
|
|
54
|
+
function fail(path, message) {
|
|
55
|
+
throw new ConfigError(path, message);
|
|
56
|
+
}
|
|
57
|
+
function memory(path, where, value) {
|
|
58
|
+
if (value === void 0) return void 0;
|
|
59
|
+
if (typeof value !== "string" || !SIZE.test(value))
|
|
60
|
+
fail(path, `[${where}] memory_max must be a size such as "6G" or "512M"`);
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
function whole(path, where, key, value, fallback) {
|
|
64
|
+
if (value === void 0) return fallback;
|
|
65
|
+
if (!Number.isInteger(value) || value < 0)
|
|
66
|
+
fail(path, `[${where}] ${key} must be a whole number`);
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
function argvList(path, value) {
|
|
70
|
+
if (value === void 0) return [];
|
|
71
|
+
const valid = Array.isArray(value) && value.every(
|
|
72
|
+
(item) => Array.isArray(item) && item.length > 0 && item.every((word) => typeof word === "string" && word !== "")
|
|
73
|
+
);
|
|
74
|
+
if (!valid)
|
|
75
|
+
fail(
|
|
76
|
+
path,
|
|
77
|
+
'[host.lease] heavy must be a list of argv prefixes, such as [["npm", "install"]]'
|
|
78
|
+
);
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
function perLane(path, where, raw, defaults, least) {
|
|
82
|
+
const found = { ...defaults };
|
|
83
|
+
for (const [key, value] of Object.entries(raw ?? {})) {
|
|
84
|
+
if (!LANES.includes(key))
|
|
85
|
+
fail(path, `unknown key [${where}] ${key}`);
|
|
86
|
+
const number = whole(path, where, key, value, 0);
|
|
87
|
+
if (number < least)
|
|
88
|
+
fail(path, `[${where}] ${key} must be at least ${least}`);
|
|
89
|
+
found[key] = number;
|
|
90
|
+
}
|
|
91
|
+
return found;
|
|
92
|
+
}
|
|
93
|
+
function commands(path, value) {
|
|
94
|
+
if (value === void 0) return [];
|
|
95
|
+
if (!Array.isArray(value))
|
|
96
|
+
fail(path, "[host.lease] commands must be a list of tables");
|
|
97
|
+
return value.map((item, at) => {
|
|
98
|
+
const where = `host.lease.commands[${at}]`;
|
|
99
|
+
const entry = table(path, where, item) ?? {};
|
|
100
|
+
new Reader(path, where, entry, ["argv", "lane", "weight"]);
|
|
101
|
+
const [argv] = argvList(path, [entry["argv"]]);
|
|
102
|
+
const lane = entry["lane"];
|
|
103
|
+
if (lane !== void 0 && !LANES.includes(lane))
|
|
104
|
+
fail(path, `[${where}] lane must be ${LANES.join(" | ")}`);
|
|
105
|
+
const weight = entry["weight"];
|
|
106
|
+
if (weight !== void 0 && !(Number.isInteger(weight) && weight >= 0))
|
|
107
|
+
fail(path, `[${where}] weight must be a whole number`);
|
|
108
|
+
return {
|
|
109
|
+
argv,
|
|
110
|
+
...lane ? { lane } : {},
|
|
111
|
+
...weight !== void 0 ? { weight } : {}
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function profile(path, name, raw, base) {
|
|
116
|
+
const where = `host.lease.profiles.${name}`;
|
|
117
|
+
const read = new Reader(path, where, raw, [
|
|
118
|
+
"max_wait",
|
|
119
|
+
"load_grace",
|
|
120
|
+
"memory_max"
|
|
121
|
+
]);
|
|
122
|
+
const memoryMax = memory(path, where, raw["memory_max"]) ?? base.memoryMax;
|
|
123
|
+
return {
|
|
124
|
+
maxWait: read.int("max_wait", base.maxWait),
|
|
125
|
+
loadGrace: whole(
|
|
126
|
+
path,
|
|
127
|
+
where,
|
|
128
|
+
"load_grace",
|
|
129
|
+
raw["load_grace"],
|
|
130
|
+
base.loadGrace
|
|
131
|
+
),
|
|
132
|
+
...memoryMax ? { memoryMax } : {}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function profiles(path, raw, base) {
|
|
136
|
+
const named = {
|
|
137
|
+
default: base,
|
|
138
|
+
gate: { ...base, maxWait: 2700, loadGrace: 600 },
|
|
139
|
+
// Commit-hook work is short: a brief host check, then it runs unless the host is severe.
|
|
140
|
+
hook: { ...base, maxWait: 900, loadGrace: 30 }
|
|
141
|
+
};
|
|
142
|
+
for (const [name, value] of Object.entries(raw ?? {})) {
|
|
143
|
+
if (!/^[a-z][a-z0-9_-]{0,31}$/u.test(name))
|
|
144
|
+
fail(path, `[host.lease.profiles] bad name ${name}`);
|
|
145
|
+
const inner = table(path, `host.lease.profiles.${name}`, value) ?? {};
|
|
146
|
+
named[name] = profile(path, name, inner, named[name] ?? base);
|
|
147
|
+
}
|
|
148
|
+
return named;
|
|
149
|
+
}
|
|
150
|
+
function ioSettings(path, raw) {
|
|
151
|
+
const table2 = raw ?? {};
|
|
152
|
+
new Reader(path, "host.lease.io", table2, ["enabled", "weights", "max"]);
|
|
153
|
+
const enabled = table2["enabled"] ?? "auto";
|
|
154
|
+
if (enabled !== "auto" && typeof enabled !== "boolean")
|
|
155
|
+
fail(path, '[host.lease.io] enabled must be "auto", true or false');
|
|
156
|
+
const weights = perLane(
|
|
157
|
+
path,
|
|
158
|
+
"host.lease.io.weights",
|
|
159
|
+
child(path, table2, "host.lease.io", "weights"),
|
|
160
|
+
{ gate: 500, hook: 300, interactive: 100, bulk: 25 },
|
|
161
|
+
1
|
|
162
|
+
);
|
|
163
|
+
if (Object.values(weights).some((weight) => weight > 1e4))
|
|
164
|
+
fail(path, "[host.lease.io.weights] a weight is at most 10000");
|
|
165
|
+
const max = {};
|
|
166
|
+
for (const [lane, line] of Object.entries(
|
|
167
|
+
child(path, table2, "host.lease.io", "max") ?? {}
|
|
168
|
+
)) {
|
|
169
|
+
if (!LANES.includes(lane))
|
|
170
|
+
fail(path, `unknown key [host.lease.io.max] ${lane}`);
|
|
171
|
+
if (typeof line !== "string" || !/^\d+:\d+( [a-z]+=(\d+|max))+$/u.test(line))
|
|
172
|
+
fail(
|
|
173
|
+
path,
|
|
174
|
+
`[host.lease.io.max] ${lane} must be an io.max line such as "8:0 wbps=50000000"`
|
|
175
|
+
);
|
|
176
|
+
max[lane] = line;
|
|
177
|
+
}
|
|
178
|
+
return { enabled, weights, max };
|
|
179
|
+
}
|
|
180
|
+
function hardFactor(path, value) {
|
|
181
|
+
if (value === void 0) return 2;
|
|
182
|
+
if (typeof value !== "number" || !(value >= 1))
|
|
183
|
+
fail(path, "[host.lease] hard_factor must be a number of at least 1");
|
|
184
|
+
return value;
|
|
185
|
+
}
|
|
186
|
+
function readLeaseSettings(path, dir, host) {
|
|
187
|
+
const root = table(path, "host", host) ?? {};
|
|
188
|
+
const raw = child(path, root, "host", "lease") ?? {};
|
|
189
|
+
const read = new Reader(path, "host.lease", raw, KEYS);
|
|
190
|
+
const memoryMax = memory(path, "host.lease", raw["memory_max"]);
|
|
191
|
+
const base = {
|
|
192
|
+
maxWait: read.int("max_wait", 3600),
|
|
193
|
+
loadGrace: whole(path, "host.lease", "load_grace", raw["load_grace"], 900),
|
|
194
|
+
...memoryMax ? { memoryMax } : {}
|
|
195
|
+
};
|
|
196
|
+
const holdMax = read.positive("hold_max");
|
|
197
|
+
const legacyMarkerEnv = read.envName("legacy_marker_env");
|
|
198
|
+
const legacySkipEnv = read.envName("legacy_skip_env");
|
|
199
|
+
const lanes = child(path, raw, "host.lease", "lanes");
|
|
200
|
+
const weights = child(path, raw, "host.lease", "weights");
|
|
201
|
+
return {
|
|
202
|
+
enabled: read.bool("enabled", true),
|
|
203
|
+
dir: expandPath(dir, read.string("dir") ?? "~/.cache/pmcp/host"),
|
|
204
|
+
markerEnv: read.envName("marker_env") ?? "PMCP_HEAVY_LEASE",
|
|
205
|
+
...legacyMarkerEnv ? { legacyMarkerEnv } : {},
|
|
206
|
+
...legacySkipEnv ? { legacySkipEnv } : {},
|
|
207
|
+
maxLoad: read.positive("max_load") ?? availableParallelism(),
|
|
208
|
+
maxIo: read.positive("max_io") ?? 8,
|
|
209
|
+
ioWindow: read.oneOf("io_window", ["avg10", "avg60", "avg300"], "avg60"),
|
|
210
|
+
hardFactor: hardFactor(path, raw["hard_factor"]),
|
|
211
|
+
holdWarn: read.int("hold_warn", 1800),
|
|
212
|
+
...holdMax ? { holdMax } : {},
|
|
213
|
+
heartbeat: read.int("heartbeat", 60),
|
|
214
|
+
poll: read.int("poll", 15),
|
|
215
|
+
budget: read.int("budget", 4),
|
|
216
|
+
slots: perLane(
|
|
217
|
+
path,
|
|
218
|
+
"host.lease.lanes",
|
|
219
|
+
lanes,
|
|
220
|
+
{ gate: 1, hook: 1, interactive: 2, bulk: 1 },
|
|
221
|
+
0
|
|
222
|
+
),
|
|
223
|
+
weights: perLane(
|
|
224
|
+
path,
|
|
225
|
+
"host.lease.weights",
|
|
226
|
+
weights,
|
|
227
|
+
{ gate: 1, hook: 1, interactive: 2, bulk: 3 },
|
|
228
|
+
1
|
|
229
|
+
),
|
|
230
|
+
commands: commands(path, raw["commands"]),
|
|
231
|
+
tiny: argvList(path, raw["tiny"]),
|
|
232
|
+
perSession: whole(path, "host.lease", "per_session", raw["per_session"], 1),
|
|
233
|
+
profiles: profiles(path, child(path, raw, "host.lease", "profiles"), base),
|
|
234
|
+
heavy: argvList(path, raw["heavy"]),
|
|
235
|
+
guard: read.oneOf("guard", ["observe", "warn", "deny", "off"], "observe"),
|
|
236
|
+
io: ioSettings(path, child(path, raw, "host.lease", "io")),
|
|
237
|
+
usageCap: read.int("usage_cap", 5e6),
|
|
238
|
+
settleWindow: whole(
|
|
239
|
+
path,
|
|
240
|
+
"host.lease",
|
|
241
|
+
"settle_window",
|
|
242
|
+
raw["settle_window"],
|
|
243
|
+
60
|
|
244
|
+
)
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function leaseSettingsFor(cwd, configPath) {
|
|
248
|
+
const path = configPath ?? findConfig(cwd);
|
|
249
|
+
if (path === null) return readLeaseSettings("pmcp.toml", cwd, void 0);
|
|
250
|
+
const config = readConfig(path);
|
|
251
|
+
return readLeaseSettings(config.path, config.dir, config.raw["host"]);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export {
|
|
255
|
+
DISABLE_ENV,
|
|
256
|
+
NOW_ENV,
|
|
257
|
+
BUSY_EXIT,
|
|
258
|
+
readLeaseSettings,
|
|
259
|
+
leaseSettingsFor
|
|
260
|
+
};
|
|
261
|
+
//# sourceMappingURL=chunk-FOLA4EUJ.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
expandPath
|
|
3
|
+
} from "./chunk-GUHOEIHP.js";
|
|
4
|
+
import {
|
|
5
|
+
gitCommonDir
|
|
6
|
+
} from "./chunk-IJBSOWHK.js";
|
|
7
|
+
|
|
8
|
+
// src/sessions/state-dir.ts
|
|
9
|
+
import { createHash } from "crypto";
|
|
10
|
+
import { realpathSync } from "fs";
|
|
11
|
+
import { homedir } from "os";
|
|
12
|
+
import { join } from "path";
|
|
13
|
+
function projectStateDir(root, override, env = process.env) {
|
|
14
|
+
if (override) return expandPath(root, override);
|
|
15
|
+
const anchor = gitCommonDir(root) ?? realpathSync(root);
|
|
16
|
+
const id = createHash("sha256").update(anchor).digest("hex").slice(0, 16);
|
|
17
|
+
const base = env["XDG_STATE_HOME"] || join(homedir(), ".local", "state");
|
|
18
|
+
return join(base, "pmcp", "projects", id);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
projectStateDir
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-FQLCD4HU.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/commands/specs/wait.ts
|
|
2
|
+
var waitSpec = {
|
|
3
|
+
name: "wait",
|
|
4
|
+
describe: "Sleep until a process exits or a condition holds, never matching itself",
|
|
5
|
+
usage: "pmcp wait --pid <pid>... | --until <exists:<path>|gone:<path>|load-below:<n>|no-process:<text>>... [--timeout <s>] [--interval <s>]",
|
|
6
|
+
options: [
|
|
7
|
+
{
|
|
8
|
+
name: "pid",
|
|
9
|
+
describe: "Wait until this process has exited; repeatable.",
|
|
10
|
+
placeholder: "<pid>",
|
|
11
|
+
repeat: true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "until",
|
|
15
|
+
describe: "Wait until this holds: exists:<path>, gone:<path>, load-below:<n>, no-process:<text>; repeatable, all must hold.",
|
|
16
|
+
placeholder: "<condition>",
|
|
17
|
+
repeat: true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "timeout",
|
|
21
|
+
describe: "Give up after this many seconds and exit 75 (default 3600).",
|
|
22
|
+
placeholder: "<s>"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "interval",
|
|
26
|
+
describe: "Seconds between checks (default 5).",
|
|
27
|
+
placeholder: "<s>"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
waitSpec
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=chunk-G4ATQPQI.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-733WVP2R.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-GNVME5AD.js.map
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
checkoutOf
|
|
3
|
-
gitCommonDir
|
|
2
|
+
checkoutOf
|
|
4
3
|
} from "./chunk-IJBSOWHK.js";
|
|
5
4
|
|
|
6
|
-
// src/sessions/state-dir.ts
|
|
7
|
-
import { createHash } from "crypto";
|
|
8
|
-
import { realpathSync } from "fs";
|
|
9
|
-
import { homedir as homedir2 } from "os";
|
|
10
|
-
import { join as join2 } from "path";
|
|
11
|
-
|
|
12
5
|
// src/sessions/paths.ts
|
|
13
6
|
import { homedir } from "os";
|
|
14
7
|
import {
|
|
@@ -32,17 +25,7 @@ function expandPath(base, path) {
|
|
|
32
25
|
return isAbsolute(path) ? path : resolve(mainCheckoutBase(base), path);
|
|
33
26
|
}
|
|
34
27
|
|
|
35
|
-
// src/sessions/state-dir.ts
|
|
36
|
-
function projectStateDir(root, override, env = process.env) {
|
|
37
|
-
if (override) return expandPath(root, override);
|
|
38
|
-
const anchor = gitCommonDir(root) ?? realpathSync(root);
|
|
39
|
-
const id = createHash("sha256").update(anchor).digest("hex").slice(0, 16);
|
|
40
|
-
const base = env["XDG_STATE_HOME"] || join2(homedir2(), ".local", "state");
|
|
41
|
-
return join2(base, "pmcp", "projects", id);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
28
|
export {
|
|
45
|
-
expandPath
|
|
46
|
-
projectStateDir
|
|
29
|
+
expandPath
|
|
47
30
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-GUHOEIHP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertNativeHost
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5IZFEVPW.js";
|
|
4
4
|
import {
|
|
5
5
|
locateExecutable
|
|
6
6
|
} from "./chunk-R2GPCZUX.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
resourceClaim,
|
|
34
34
|
resourceRunning,
|
|
35
35
|
runtimeUnit
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GNVME5AD.js";
|
|
37
37
|
import {
|
|
38
38
|
command
|
|
39
39
|
} from "./chunk-34DECPVC.js";
|
|
@@ -1981,4 +1981,4 @@ export {
|
|
|
1981
1981
|
isReadOnly,
|
|
1982
1982
|
runOperation
|
|
1983
1983
|
};
|
|
1984
|
-
//# sourceMappingURL=chunk-
|
|
1984
|
+
//# sourceMappingURL=chunk-ISGBOJT7.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ArgumentError,
|
|
3
3
|
one
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WFY7ATSZ.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigError,
|
|
7
7
|
findConfig,
|
|
@@ -26,4 +26,4 @@ function configFrom(context) {
|
|
|
26
26
|
export {
|
|
27
27
|
configFrom
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-J3QUG6O5.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openStore,
|
|
3
3
|
readStoreSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3V37OZQH.js";
|
|
5
5
|
import {
|
|
6
6
|
ArgumentError,
|
|
7
7
|
one
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WFY7ATSZ.js";
|
|
9
9
|
import {
|
|
10
10
|
findConfig,
|
|
11
11
|
readConfig
|
|
@@ -74,4 +74,4 @@ export {
|
|
|
74
74
|
storeFrom,
|
|
75
75
|
change
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-JW5NMQTU.js.map
|