@modootoday/pmcp 0.20.0 → 0.22.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-QJ6MGLBX.js → apply-3PR4UOES.js} +58 -24
- package/dist/{available-HYSDAFYH.js → available-BFXLII4A.js} +7 -7
- package/dist/{broadcast-LYOA6BEW.js → broadcast-ZALGUJVR.js} +4 -4
- package/dist/chunk-2GI5RM3M.js +53 -0
- package/dist/chunk-2QJGUR23.js +274 -0
- package/dist/{chunk-FD6VGFYZ.js → chunk-3LADLKAI.js} +207 -15
- package/dist/{chunk-MZEMLFFD.js → chunk-3OBJVG5R.js} +2 -2
- package/dist/{chunk-IQD4W53M.js → chunk-57Q75MS4.js} +18 -18
- package/dist/chunk-5YCKFU5Q.js +1672 -0
- package/dist/{chunk-IZABPDAO.js → chunk-5ZUDBC3P.js} +2 -2
- package/dist/{chunk-EKPMVEIA.js → chunk-73IDLWRI.js} +7 -4
- package/dist/{chunk-QYH2NR6G.js → chunk-7FV2LORT.js} +2 -2
- package/dist/{chunk-4VK5G3SV.js → chunk-E6YP2PMO.js} +3 -5
- package/dist/{chunk-RMHZFWHF.js → chunk-EPNTYTDZ.js} +33 -33
- package/dist/{chunk-5JPD6VIH.js → chunk-GBKRDRMZ.js} +22 -7
- package/dist/{chunk-T6GOWHK6.js → chunk-GFOQDLPL.js} +6 -1
- package/dist/{chunk-RBNMNKNN.js → chunk-JQVSDPFL.js} +3 -3
- package/dist/{chunk-OG7QR2DP.js → chunk-KEHB4FZP.js} +17 -2
- package/dist/chunk-KUBHGVTD.js +126 -0
- package/dist/chunk-L42U5XKC.js +7 -0
- package/dist/chunk-LFFIQBNY.js +115 -0
- package/dist/{chunk-O2JWF7ZM.js → chunk-LVNGMGOM.js} +2 -2
- package/dist/{chunk-PQTM27GU.js → chunk-MR5IBS6L.js} +6 -7
- package/dist/{chunk-OAIQ7A3R.js → chunk-NDED2O5B.js} +5 -5
- package/dist/{chunk-M2RYXWX2.js → chunk-NHUMPEPV.js} +2 -2
- package/dist/{chunk-ONP6JRFZ.js → chunk-OFJIMBTL.js} +2 -2
- package/dist/{chunk-YN5GQCHN.js → chunk-RHJEGLYM.js} +6 -1
- package/dist/{chunk-JBHGJKSL.js → chunk-RNC7PGW2.js} +2 -2
- package/dist/{chunk-J6HNP6HA.js → chunk-RNE4WPBS.js} +2 -2
- package/dist/{chunk-YDICIB2A.js → chunk-S4Y44CCC.js} +2 -2
- package/dist/{chunk-K2C3KFGB.js → chunk-SEM6WD7J.js} +29 -17
- package/dist/{chunk-CQZYQAAV.js → chunk-SLCNCAWY.js} +3 -3
- package/dist/{chunk-L4MFGGSI.js → chunk-SPZ42EWE.js} +2 -2
- package/dist/{chunk-QOFSPFJ6.js → chunk-TCW2H47H.js} +3405 -3395
- package/dist/{chunk-FQAJSNNU.js → chunk-TPGJXENR.js} +3 -3
- package/dist/chunk-UKR64U7J.js +20 -0
- package/dist/{chunk-66F3HLW4.js → chunk-XB363ZXT.js} +122 -4
- package/dist/{chunk-UD3BEEBQ.js → chunk-XZ2TDH3J.js} +80 -3
- package/dist/{chunk-QSIADSMQ.js → chunk-Z6WRFOFT.js} +3 -3
- package/dist/{claude-GT2BPXEL.js → claude-XVLF4N4S.js} +3 -3
- package/dist/{cli-IV5DJCXU.js → cli-6FWRBCWM.js} +8 -8
- package/dist/{cli-6HTAJ54L.js → cli-BEEDAD4E.js} +7 -7
- package/dist/cli.js +11 -11
- package/dist/{completion-PPM7MEI2.js → completion-LHYNCQ3N.js} +7 -7
- package/dist/{diagnostics-EWU2ROTG.js → diagnostics-ABTJUYZQ.js} +5 -6
- package/dist/{doctor-ZWZQMDKZ.js → doctor-GPPO5L4F.js} +36 -36
- package/dist/{entry-NDICBQ2F.js → entry-ARGY5CKA.js} +14 -15
- package/dist/{exec-mcp-AG4G7SG7.js → exec-mcp-JEF74XVP.js} +16 -14
- package/dist/{harness-JABSZCAA.js → harness-OCXW6YE4.js} +6 -6
- package/dist/harness-launch-gate.js +3 -4
- package/dist/harness-worker.js +5 -6
- package/dist/hook-body.js +247 -86
- package/dist/{hook-spec-C7umArqw.d.ts → hook-spec-hZL4MSgi.d.ts} +8 -3
- package/dist/hooks-JHXUN5MD.js +24 -0
- package/dist/{host-2SZRMHZX.js → host-OBRHBDRE.js} +6 -7
- package/dist/{host-BWZ5LA4Q.js → host-VI4ZFCZP.js} +18 -16
- package/dist/{host-run-SXLV4LHI.js → host-run-H7AITG7C.js} +5 -7
- package/dist/http.js +1 -1
- package/dist/{import-mcp-2M7SZRVQ.js → import-mcp-3Y33CUHF.js} +15 -12
- package/dist/index.d.ts +11 -2
- package/dist/index.js +25 -25
- package/dist/{init-HOOIFBAD.js → init-WZJHMWNJ.js} +3 -3
- package/dist/{install-HF6CROQP.js → install-7V6NIA7W.js} +4 -4
- package/dist/{invoke-JP4MILYY.js → invoke-GWWTXQLO.js} +7 -8
- package/dist/{list-UBSBUZKS.js → list-Y6UPLGNF.js} +21 -18
- package/dist/{logout-OO3DERRK.js → logout-KAUW4JZZ.js} +16 -13
- package/dist/{logs-K3QXKRD4.js → logs-74JGLQG6.js} +4 -4
- package/dist/{mailbox-DAJV6VAI.js → mailbox-VK5AVTHI.js} +7 -7
- package/dist/{mainline-6K5BA3WX.js → mainline-Q42M2GJ2.js} +173 -34
- package/dist/{mcp-JXNTKRJG.js → mcp-IDEUIY2F.js} +2 -2
- package/dist/{pause-GRVTSKOK.js → pause-CZ2OZYLC.js} +4 -4
- package/dist/project/hook-adapter.d.ts +1 -1
- package/dist/{project-M672MKQH.js → project-GVVWLDOJ.js} +5 -5
- package/dist/{pty-LHKJKY2E.js → pty-CDLQ4NP2.js} +3 -3
- package/dist/report-Z3JV2PCT.js +105 -0
- package/dist/{resume-6DMPGG3N.js → resume-DFIHT2RO.js} +4 -4
- package/dist/{run-ORBIERI3.js → run-HVNKQHVU.js} +4 -4
- package/dist/{run-5W566T3V.js → run-RRWB7U2Q.js} +15 -12
- package/dist/{serve-73SRPAV4.js → serve-KJSOU3BR.js} +3 -3
- package/dist/{session-XM2CR425.js → session-YZVX4NGN.js} +4 -4
- package/dist/{setup-ULKDPF5B.js → setup-3GET6K3J.js} +4 -4
- package/dist/smoke-FQQJOQBD.js +16 -0
- package/dist/{start-login-BGFAMCZL.js → start-login-RNHSEX5P.js} +16 -13
- package/dist/{status-YHXEAJ7U.js → status-3RTGDN2K.js} +10 -10
- package/dist/{status-YCW6YJ3S.js → status-RR4VZARJ.js} +40 -23
- package/dist/{status-73FEFQUQ.js → status-Y25ONHA5.js} +16 -13
- package/dist/stdio.js +2 -2
- package/dist/{sweep-XF2HG3EO.js → sweep-EPJMEZR6.js} +4 -4
- package/dist/{test-IMNBXOYW.js → test-7NYPQ6YU.js} +30 -20
- package/dist/{tui-5GDA22TB.js → tui-H5RPSF4B.js} +4 -4
- package/dist/{unbroadcast-XP3OCVN3.js → unbroadcast-NTOC3PY3.js} +4 -4
- package/dist/{worker-RV6NGSXT.js → worker-YWFTWIBP.js} +9 -10
- package/dist/{worktree-list-4PLE7K6L.js → worktree-list-EMKUMCTQ.js} +2 -2
- package/dist/{worktree-sync-GQVYAXGJ.js → worktree-sync-A277AF4M.js} +4 -6
- package/docs/commands.md +14 -7
- package/docs/git-workflow.md +53 -13
- package/docs/hooks.md +138 -10
- package/docs/project-configuration.md +31 -1
- package/docs/upgrading.md +58 -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/sessions/format.ts +2 -2
- package/plugins/pmcp/plugin.json +1 -1
- package/plugins/pmcp/skills/agent-assets-migrate/SKILL.md +11 -8
- package/plugins/pmcp/skills/pmcp-project-init/SKILL.md +11 -7
- package/skills/agent-assets-migrate/SKILL.md +11 -8
- package/skills/pmcp-project-init/SKILL.md +11 -7
- package/dist/chunk-7SDOSTW7.js +0 -130
- package/dist/chunk-AWZF72SH.js +0 -1025
- package/dist/chunk-FGYFA6JY.js +0 -7
- package/dist/chunk-ICF2JZSN.js +0 -92
- package/dist/chunk-ISNRDHSD.js +0 -74
- package/dist/chunk-QDY6BWE6.js +0 -396
- package/dist/hooks-YVQSDQV3.js +0 -21
|
@@ -2,17 +2,16 @@ import {
|
|
|
2
2
|
backupFiles
|
|
3
3
|
} from "./chunk-P4N7DBD5.js";
|
|
4
4
|
import {
|
|
5
|
-
BUNDLE_NATIVE_FILES,
|
|
6
|
-
HOOK_DIRECTORY,
|
|
7
5
|
checkProject,
|
|
6
|
+
guardVersionProblems,
|
|
8
7
|
prepare,
|
|
9
8
|
present,
|
|
10
9
|
writeNative
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
ANTIGRAVITY_MCP_PLUGIN
|
|
14
|
-
} from "./chunk-QDY6BWE6.js";
|
|
10
|
+
} from "./chunk-2QJGUR23.js";
|
|
15
11
|
import {
|
|
12
|
+
ANTIGRAVITY_MCP_PLUGIN,
|
|
13
|
+
BUNDLE_NATIVE_FILES,
|
|
14
|
+
HOOK_DIRECTORY as HOOK_DIRECTORY2,
|
|
16
15
|
changedSincePlan,
|
|
17
16
|
exists,
|
|
18
17
|
getKey,
|
|
@@ -22,17 +21,20 @@ import {
|
|
|
22
21
|
same,
|
|
23
22
|
splitKeyed,
|
|
24
23
|
withoutBlock
|
|
25
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TCW2H47H.js";
|
|
26
25
|
import {
|
|
27
26
|
RULES_DIR,
|
|
28
27
|
legacyLinks
|
|
29
28
|
} from "./chunk-NRBQK6UX.js";
|
|
29
|
+
import {
|
|
30
|
+
HOOK_DIRECTORY
|
|
31
|
+
} from "./chunk-5YCKFU5Q.js";
|
|
30
32
|
import {
|
|
31
33
|
LOCK_FILE,
|
|
32
34
|
replaceFile,
|
|
33
35
|
replaceLink,
|
|
34
36
|
writeLock
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XB363ZXT.js";
|
|
36
38
|
|
|
37
39
|
// src/project/apply/files.ts
|
|
38
40
|
import { mkdirSync } from "fs";
|
|
@@ -162,13 +164,13 @@ function backupBeforeWrite(spec, outputs, stale) {
|
|
|
162
164
|
".agents/hooks.json"
|
|
163
165
|
]),
|
|
164
166
|
...outputs.filter(
|
|
165
|
-
(output) => output.kind === "file" && output.path.startsWith(`${
|
|
167
|
+
(output) => output.kind === "file" && output.path.startsWith(`${HOOK_DIRECTORY2}/`)
|
|
166
168
|
).map((output) => output.path),
|
|
167
|
-
...stale.filter((entry) => entry.path.startsWith(`${
|
|
169
|
+
...stale.filter((entry) => entry.path.startsWith(`${HOOK_DIRECTORY2}/`)).map((entry) => entry.path)
|
|
168
170
|
];
|
|
169
171
|
const changedHooks = outputs.some(
|
|
170
|
-
(output) => (output.kind === "json" && output.managed !== void 0 || output.kind === "file" && output.path.startsWith(`${
|
|
171
|
-
) || stale.some((entry) => entry.path.startsWith(`${
|
|
172
|
+
(output) => (output.kind === "json" && output.managed !== void 0 || output.kind === "file" && output.path.startsWith(`${HOOK_DIRECTORY2}/`)) && !present(spec.root, output)
|
|
173
|
+
) || stale.some((entry) => entry.path.startsWith(`${HOOK_DIRECTORY2}/`));
|
|
172
174
|
if (!changedMcp && !staleMcp && !changedHooks) return void 0;
|
|
173
175
|
return backupFiles(spec.root, [
|
|
174
176
|
...MCP_PATHS,
|
|
@@ -187,7 +189,8 @@ function project(spec, options) {
|
|
|
187
189
|
}
|
|
188
190
|
const conflicts = [
|
|
189
191
|
...permissionConflicts(spec),
|
|
190
|
-
...changedSincePlan(spec.root, basis)
|
|
192
|
+
...changedSincePlan(spec.root, basis),
|
|
193
|
+
...guardVersionProblems(spec)
|
|
191
194
|
];
|
|
192
195
|
if (conflicts.length > 0) {
|
|
193
196
|
return { code: 3, problems: conflicts, outputs: outputs.length, pruned: 0 };
|
|
@@ -205,7 +208,196 @@ function project(spec, options) {
|
|
|
205
208
|
};
|
|
206
209
|
}
|
|
207
210
|
|
|
211
|
+
// src/project/unmanaged-hooks.ts
|
|
212
|
+
import { spawnSync } from "child_process";
|
|
213
|
+
import {
|
|
214
|
+
accessSync,
|
|
215
|
+
constants,
|
|
216
|
+
existsSync as existsSync3,
|
|
217
|
+
readFileSync as readFileSync2,
|
|
218
|
+
statSync
|
|
219
|
+
} from "fs";
|
|
220
|
+
import { dirname as dirname2, isAbsolute, join as join4, relative, resolve } from "path";
|
|
221
|
+
var SETTINGS = [
|
|
222
|
+
".claude/settings.json",
|
|
223
|
+
".claude/settings.local.json",
|
|
224
|
+
".codex/hooks.json"
|
|
225
|
+
];
|
|
226
|
+
var INTERPRETERS = /* @__PURE__ */ new Set([
|
|
227
|
+
"node",
|
|
228
|
+
"bun",
|
|
229
|
+
"deno",
|
|
230
|
+
"tsx",
|
|
231
|
+
"python",
|
|
232
|
+
"python3",
|
|
233
|
+
"bash",
|
|
234
|
+
"sh",
|
|
235
|
+
"zsh",
|
|
236
|
+
"dash",
|
|
237
|
+
"ruby",
|
|
238
|
+
"perl"
|
|
239
|
+
]);
|
|
240
|
+
function commands(value) {
|
|
241
|
+
const hooks = value?.["hooks"];
|
|
242
|
+
if (!hooks || typeof hooks !== "object" || Array.isArray(hooks)) return [];
|
|
243
|
+
const found = [];
|
|
244
|
+
for (const [event, groups] of Object.entries(hooks)) {
|
|
245
|
+
if (!Array.isArray(groups)) continue;
|
|
246
|
+
for (const group of groups) {
|
|
247
|
+
const entries = group?.["hooks"];
|
|
248
|
+
if (!Array.isArray(entries)) continue;
|
|
249
|
+
for (const entry of entries) {
|
|
250
|
+
const command = entry?.["command"];
|
|
251
|
+
if (typeof command === "string") found.push({ event, command });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return found;
|
|
256
|
+
}
|
|
257
|
+
function firstWords(command) {
|
|
258
|
+
const words = [];
|
|
259
|
+
let word = "";
|
|
260
|
+
let quote = null;
|
|
261
|
+
let started = false;
|
|
262
|
+
for (const char of command) {
|
|
263
|
+
if (quote) {
|
|
264
|
+
if (char === quote) quote = null;
|
|
265
|
+
else word += char;
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if (char === "'" || char === '"') {
|
|
269
|
+
quote = char;
|
|
270
|
+
started = true;
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
if (/\s/u.test(char)) {
|
|
274
|
+
if (started) words.push(word);
|
|
275
|
+
word = "";
|
|
276
|
+
started = false;
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
if (";|&<>()".includes(char)) break;
|
|
280
|
+
word += char;
|
|
281
|
+
started = true;
|
|
282
|
+
}
|
|
283
|
+
if (started) words.push(word);
|
|
284
|
+
return words;
|
|
285
|
+
}
|
|
286
|
+
function expand(word, vars) {
|
|
287
|
+
let unknown = null;
|
|
288
|
+
const path = word.replace(/^~(?=\/|$)/u, vars["HOME"] ?? "~").replace(/\$\{(\w+)\}|\$(\w+)/gu, (_, braced, bare) => {
|
|
289
|
+
const name = braced ?? bare;
|
|
290
|
+
const value = vars[name];
|
|
291
|
+
if (value === void 0) unknown ??= name;
|
|
292
|
+
return value ?? "";
|
|
293
|
+
});
|
|
294
|
+
if (unknown === "CLAUDE_PLUGIN_ROOT")
|
|
295
|
+
return { problem: "${CLAUDE_PLUGIN_ROOT} outside a plugin" };
|
|
296
|
+
if (unknown !== null) return { skip: true };
|
|
297
|
+
return { path };
|
|
298
|
+
}
|
|
299
|
+
function scriptProblem(path, direct) {
|
|
300
|
+
if (!existsSync3(path)) return "the script does not exist";
|
|
301
|
+
if (!statSync(path).isFile()) return "the script is not a file";
|
|
302
|
+
if (!direct) return null;
|
|
303
|
+
try {
|
|
304
|
+
accessSync(path, constants.X_OK);
|
|
305
|
+
} catch {
|
|
306
|
+
return "the script is not executable";
|
|
307
|
+
}
|
|
308
|
+
const head = readFileSync2(path).subarray(0, 2).toString("latin1");
|
|
309
|
+
if (head !== "#!") return "the script has no shebang";
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
312
|
+
function commandProblem(command, cwd, vars) {
|
|
313
|
+
const words = firstWords(command).filter(
|
|
314
|
+
(word, index, all) => !(/^\w+=/u.test(word) && all.slice(0, index).every((w) => /^\w+=/u.test(w)))
|
|
315
|
+
);
|
|
316
|
+
const program = words[0];
|
|
317
|
+
if (program === void 0) return "the command is empty";
|
|
318
|
+
const base = program.slice(program.lastIndexOf("/") + 1);
|
|
319
|
+
let target = program;
|
|
320
|
+
let direct = true;
|
|
321
|
+
if (INTERPRETERS.has(base)) {
|
|
322
|
+
const script = words.slice(1).find((word) => !word.startsWith("-"));
|
|
323
|
+
if (script === void 0 || words.slice(1).some((w) => /^-[ec]$/u.test(w)))
|
|
324
|
+
return null;
|
|
325
|
+
target = script;
|
|
326
|
+
direct = false;
|
|
327
|
+
}
|
|
328
|
+
if (!target.includes("/") && !target.includes("$")) return null;
|
|
329
|
+
const expanded = expand(target, vars);
|
|
330
|
+
if ("skip" in expanded) return null;
|
|
331
|
+
if ("problem" in expanded) return expanded.problem;
|
|
332
|
+
const path = isAbsolute(expanded.path) ? expanded.path : resolve(cwd, expanded.path);
|
|
333
|
+
return scriptProblem(path, direct);
|
|
334
|
+
}
|
|
335
|
+
function readHooksFile(path) {
|
|
336
|
+
try {
|
|
337
|
+
return JSON.parse(readFileSync2(path, "utf8"));
|
|
338
|
+
} catch {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
function pluginHookFiles(root) {
|
|
343
|
+
const listed = spawnSync(
|
|
344
|
+
"git",
|
|
345
|
+
["ls-files", "-z", "--", ":(glob)**/.claude-plugin/plugin.json"],
|
|
346
|
+
{ cwd: root, encoding: "utf8" }
|
|
347
|
+
);
|
|
348
|
+
if (listed.status !== 0) return [];
|
|
349
|
+
const found = [];
|
|
350
|
+
for (const manifest of listed.stdout.split("\0").filter(Boolean)) {
|
|
351
|
+
const plugin = dirname2(dirname2(join4(root, manifest)));
|
|
352
|
+
const declared = readHooksFile(join4(root, manifest))?.["hooks"];
|
|
353
|
+
const file = resolve(
|
|
354
|
+
plugin,
|
|
355
|
+
typeof declared === "string" ? declared : "hooks/hooks.json"
|
|
356
|
+
);
|
|
357
|
+
if (existsSync3(file)) found.push({ file, plugin });
|
|
358
|
+
}
|
|
359
|
+
return found;
|
|
360
|
+
}
|
|
361
|
+
function unmanagedHookProblems(root, env = process.env) {
|
|
362
|
+
return unmanagedHooks(root, env).problems;
|
|
363
|
+
}
|
|
364
|
+
function unmanagedHooks(root, env = process.env) {
|
|
365
|
+
let checked = 0;
|
|
366
|
+
const sources = [
|
|
367
|
+
...SETTINGS.map((file) => ({ file: join4(root, file), plugin: void 0 })),
|
|
368
|
+
...pluginHookFiles(root)
|
|
369
|
+
];
|
|
370
|
+
const problems = [];
|
|
371
|
+
for (const source of sources) {
|
|
372
|
+
if (!existsSync3(source.file)) continue;
|
|
373
|
+
const vars = {
|
|
374
|
+
...env,
|
|
375
|
+
CLAUDE_PROJECT_DIR: root,
|
|
376
|
+
CLAUDE_PLUGIN_ROOT: source.plugin
|
|
377
|
+
};
|
|
378
|
+
for (const { event, command } of commands(readHooksFile(source.file))) {
|
|
379
|
+
if (command.includes(`${HOOK_DIRECTORY}/`)) continue;
|
|
380
|
+
checked += 1;
|
|
381
|
+
const problem = commandProblem(command, root, vars);
|
|
382
|
+
if (problem)
|
|
383
|
+
problems.push({
|
|
384
|
+
file: relative(root, source.file),
|
|
385
|
+
event,
|
|
386
|
+
command,
|
|
387
|
+
problem
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return { checked, problems };
|
|
392
|
+
}
|
|
393
|
+
function describeHookProblem(problem) {
|
|
394
|
+
return `${problem.file} ${problem.event}: ${problem.command}: ${problem.problem}`;
|
|
395
|
+
}
|
|
396
|
+
|
|
208
397
|
export {
|
|
209
|
-
project
|
|
398
|
+
project,
|
|
399
|
+
unmanagedHookProblems,
|
|
400
|
+
unmanagedHooks,
|
|
401
|
+
describeHookProblem
|
|
210
402
|
};
|
|
211
|
-
//# sourceMappingURL=chunk-
|
|
403
|
+
//# sourceMappingURL=chunk-3LADLKAI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSkillServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LVNGMGOM.js";
|
|
4
4
|
import {
|
|
5
5
|
attachMailbox
|
|
6
6
|
} from "./chunk-JZKAJUVT.js";
|
|
@@ -84,4 +84,4 @@ export {
|
|
|
84
84
|
serveWithMailbox,
|
|
85
85
|
main
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-3OBJVG5R.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-HQOB7OQS.js";
|
|
6
6
|
import {
|
|
7
7
|
readStoreSettings
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MR5IBS6L.js";
|
|
9
9
|
import {
|
|
10
10
|
expandPath,
|
|
11
11
|
projectStateDir
|
|
@@ -47,22 +47,6 @@ function pruneLogs(dir, keepDays, now = /* @__PURE__ */ new Date()) {
|
|
|
47
47
|
return removed;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
// src/project/log-location.ts
|
|
51
|
-
import { dirname, join as join2 } from "path";
|
|
52
|
-
function logLocation(config, env) {
|
|
53
|
-
const hooks = config.raw.hooks ?? {};
|
|
54
|
-
const keepDays = readLoggingTable(config.raw.logging).keepDays;
|
|
55
|
-
if (typeof hooks.error_log === "string") {
|
|
56
|
-
const file = expandPath(config.dir, hooks.error_log);
|
|
57
|
-
return { dir: dirname(file), file, keepDays };
|
|
58
|
-
}
|
|
59
|
-
const settings = readStoreSettings(config.raw.sessions);
|
|
60
|
-
return {
|
|
61
|
-
dir: join2(projectStateDir(config.dir, settings.stateDir, env), "logs"),
|
|
62
|
-
keepDays
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
50
|
// src/logging/query.ts
|
|
67
51
|
import { existsSync as existsSync2, readFileSync, statSync as statSync2 } from "fs";
|
|
68
52
|
var UNITS = {
|
|
@@ -143,6 +127,22 @@ function tail(dir, state, file) {
|
|
|
143
127
|
return parse(text);
|
|
144
128
|
}
|
|
145
129
|
|
|
130
|
+
// src/project/log-location.ts
|
|
131
|
+
import { dirname, join as join2 } from "path";
|
|
132
|
+
function logLocation(config, env) {
|
|
133
|
+
const hooks = config.raw.hooks ?? {};
|
|
134
|
+
const keepDays = readLoggingTable(config.raw.logging).keepDays;
|
|
135
|
+
if (typeof hooks.error_log === "string") {
|
|
136
|
+
const file = expandPath(config.dir, hooks.error_log);
|
|
137
|
+
return { dir: dirname(file), file, keepDays };
|
|
138
|
+
}
|
|
139
|
+
const settings = readStoreSettings(config.raw.sessions);
|
|
140
|
+
return {
|
|
141
|
+
dir: join2(projectStateDir(config.dir, settings.stateDir, env), "logs"),
|
|
142
|
+
keepDays
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
146
|
export {
|
|
147
147
|
pruneLogs,
|
|
148
148
|
parseSince,
|
|
@@ -152,4 +152,4 @@ export {
|
|
|
152
152
|
tail,
|
|
153
153
|
logLocation
|
|
154
154
|
};
|
|
155
|
-
//# sourceMappingURL=chunk-
|
|
155
|
+
//# sourceMappingURL=chunk-57Q75MS4.js.map
|