@modootoday/pmcp 0.26.1 → 0.28.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/{apply-7HWNHSQB.js → apply-6ORDPVZS.js} +9 -9
- package/dist/{chunk-GYL2C2Y5.js → chunk-2I54YKIV.js} +2 -2
- package/dist/{chunk-JDVDA5HW.js → chunk-45EC3JVG.js} +4 -4
- package/dist/{chunk-XPLT6DJC.js → chunk-4G6LXAM4.js} +26 -24
- package/dist/{chunk-YKICVMF7.js → chunk-4ZB5NJZA.js} +8 -3
- package/dist/{chunk-2VL3C52Y.js → chunk-5KE3B5TO.js} +2 -2
- package/dist/chunk-674APJDK.js +128 -0
- package/dist/{chunk-3T7CJS4A.js → chunk-6FUUX5WO.js} +2 -2
- package/dist/chunk-6TM7PLXG.js +154 -0
- package/dist/{chunk-RGTWJWQ7.js → chunk-7J25NFM6.js} +2 -2
- package/dist/{chunk-M2XABD33.js → chunk-BLE3YNCU.js} +3 -3
- package/dist/{chunk-GIK4TROM.js → chunk-C7VIQJLF.js} +2 -2
- package/dist/{chunk-CJD2HFXF.js → chunk-HUAPDSKW.js} +3 -3
- package/dist/{chunk-KWEW5EBE.js → chunk-IQYJWLGX.js} +2 -2
- package/dist/{chunk-A7MF7RMO.js → chunk-IWDZYK6V.js} +5 -5
- package/dist/{chunk-S2FUWBLO.js → chunk-J3C46RXZ.js} +61 -8
- package/dist/chunk-LXJTABBQ.js +1148 -0
- package/dist/{chunk-OHCUPXU4.js → chunk-LXWAU7AX.js} +65 -2
- package/dist/{chunk-MFQAQ4IJ.js → chunk-MPH7BQON.js} +4 -4
- package/dist/{chunk-T52AGUO7.js → chunk-N6Q2QB2H.js} +2 -2
- package/dist/{chunk-5ZP3ABPI.js → chunk-OFYDBK44.js} +2 -2
- package/dist/{chunk-BSG74PTY.js → chunk-Q2UBBZSD.js} +3 -3
- package/dist/{chunk-UHKHXS3E.js → chunk-Q7HMO7JX.js} +2 -2
- package/dist/chunk-RS2ST3KT.js +7 -0
- package/dist/{chunk-ZT75ACJ2.js → chunk-SHTSGJBH.js} +2 -2
- package/dist/chunk-TYXJBXZQ.js +441 -0
- package/dist/{chunk-E7BPELYH.js → chunk-V42DHBXN.js} +5 -5
- package/dist/chunk-WG7KH46S.js +71 -0
- package/dist/{cli-FVUHK2NB.js → cli-FXHKAXIV.js} +5 -5
- package/dist/cli.js +10 -10
- package/dist/{completion-O3KRUSJG.js → completion-OXAWXTUC.js} +6 -6
- package/dist/{diagnostics-PB5TKIAL.js → diagnostics-PTGOBBN7.js} +5 -5
- package/dist/{doctor-JVWINJT5.js → doctor-IVKT4F44.js} +11 -11
- package/dist/doctor-NKFZNSRD.js +106 -0
- package/dist/{entry-CY74PLN3.js → entry-7EWYX5XJ.js} +11 -11
- package/dist/{exec-mcp-HAKUGQZM.js → exec-mcp-WWVMIQLV.js} +7 -7
- package/dist/{harness-N234LNM7.js → harness-L5PBWKXS.js} +3 -3
- package/dist/harness-launch-gate.js +3 -3
- package/dist/harness-worker.js +5 -5
- package/dist/heavy-VBC4AGL6.js +1063 -0
- package/dist/hook-body.js +86 -45
- package/dist/{hooks-7K624JQC.js → hooks-BKLDQQSN.js} +3 -3
- package/dist/{host-PT7NRWG6.js → host-3GP3BJKY.js} +6 -6
- package/dist/host-TVWPNQV5.js +32 -0
- package/dist/{host-CCJFOCZJ.js → host-U7CA77BY.js} +9 -9
- package/dist/{host-run-RRBFTVYW.js → host-run-MHD72EGP.js} +4 -4
- package/dist/http.js +1 -1
- package/dist/{import-mcp-GCNNSLWH.js → import-mcp-7EV5RPWK.js} +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/{init-A4NLTERR.js → init-SHHALJOG.js} +2 -2
- package/dist/{invoke-G4LNWPTL.js → invoke-W42C5POV.js} +7 -7
- package/dist/jobs-FLHB3WER.js +26 -0
- package/dist/{list-EZYULVDW.js → list-GNNRY4NJ.js} +8 -8
- package/dist/{logout-BYO3UJUH.js → logout-DZVBFQYZ.js} +7 -7
- package/dist/{mainline-SWZPKA7U.js → mainline-D665V4Y3.js} +19 -3
- package/dist/{mcp-CZNYDYTJ.js → mcp-5A6WWV32.js} +2 -2
- package/dist/measure-Z5HPT26L.js +129 -0
- package/dist/plan-46BTJQIV.js +98 -0
- package/dist/{project-GLT3SO7Y.js → project-CKECETMB.js} +4 -4
- package/dist/{run-J5O2V3MB.js → run-LWVKCXS4.js} +6 -6
- package/dist/{run-OBQBKBPV.js → run-YMER7XMR.js} +4 -4
- package/dist/{serve-QCG4PCVS.js → serve-GYMBJPNJ.js} +3 -3
- package/dist/{setup-7JHWLV7K.js → setup-ZYD5XBKU.js} +2 -2
- package/dist/{start-login-LRO3RTHD.js → start-login-NE5QMH2F.js} +7 -7
- package/dist/{status-EZTFSD5S.js → status-HCZBWIC3.js} +8 -8
- package/dist/{status-BQLT7JRE.js → status-WP6NM6VP.js} +7 -7
- package/dist/stdio.js +2 -2
- package/dist/{test-O7TN5SBA.js → test-PLZ62G54.js} +7 -7
- package/dist/{tui-ODLF6QWC.js → tui-ZWLRAOCQ.js} +4 -4
- package/dist/{worker-AK4GLGPZ.js → worker-GMSWWVTS.js} +9 -9
- package/dist/{worktree-sync-BQZD4J73.js → worktree-sync-TQ75DK62.js} +4 -2
- package/docs/commands.md +24 -8
- package/docs/git-workflow.md +9 -0
- package/docs/project-configuration.md +1 -1
- 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-EIBKHS74.js +0 -7
- package/dist/heavy-X3KZ7WBU.js +0 -2211
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
},
|
|
613
613
|
{
|
|
614
614
|
"name": "pmcp",
|
|
615
|
-
"version": "0.
|
|
615
|
+
"version": "0.28.1",
|
|
616
616
|
"description": "Find package skills and use native runtime project configuration.",
|
|
617
617
|
"source": { "source": "local", "path": "./plugins/pmcp" },
|
|
618
618
|
"policy": { "installation": "AVAILABLE", "authentication": "ON_USE" },
|
package/.mcp.json
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-2MX5C7B2.js";
|
|
4
4
|
import {
|
|
5
5
|
specFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C7VIQJLF.js";
|
|
7
7
|
import {
|
|
8
8
|
printSmoke,
|
|
9
9
|
runSmoke
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
describeHookProblem,
|
|
16
16
|
project,
|
|
17
17
|
unmanagedHookProblems
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MPH7BQON.js";
|
|
19
19
|
import "./chunk-ANJMLKBR.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-HUAPDSKW.js";
|
|
21
21
|
import {
|
|
22
22
|
checkBudget,
|
|
23
23
|
renderFrontmatter,
|
|
24
24
|
splitFrontmatter
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-45EC3JVG.js";
|
|
26
|
+
import "./chunk-J3C46RXZ.js";
|
|
27
27
|
import "./chunk-FLG7VRTC.js";
|
|
28
28
|
import "./chunk-2GD7PQ7J.js";
|
|
29
29
|
import "./chunk-EATCUWGG.js";
|
|
@@ -33,7 +33,7 @@ import "./chunk-LFFIQBNY.js";
|
|
|
33
33
|
import "./chunk-HQOB7OQS.js";
|
|
34
34
|
import "./chunk-73AKO4UL.js";
|
|
35
35
|
import "./chunk-VQBXWMLT.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-4ZB5NJZA.js";
|
|
37
37
|
import "./chunk-WUFNKK3U.js";
|
|
38
38
|
import "./chunk-374AZ4J4.js";
|
|
39
39
|
import "./chunk-SDFJJJB5.js";
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
import "./chunk-YSAWTGNA.js";
|
|
58
58
|
import {
|
|
59
59
|
recordProjector
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-5KE3B5TO.js";
|
|
61
61
|
import "./chunk-PZ6D3WKD.js";
|
|
62
62
|
import "./chunk-N7ANFMA5.js";
|
|
63
63
|
import {
|
|
@@ -68,7 +68,7 @@ import "./chunk-KLIYFD3W.js";
|
|
|
68
68
|
import "./chunk-GUHOEIHP.js";
|
|
69
69
|
import "./chunk-IJBSOWHK.js";
|
|
70
70
|
import "./chunk-XWLMZKH2.js";
|
|
71
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-RS2ST3KT.js";
|
|
72
72
|
import "./chunk-GJXOFDJT.js";
|
|
73
73
|
import "./chunk-PMJG2CXF.js";
|
|
74
74
|
import "./chunk-J6KL3COD.js";
|
|
@@ -283,4 +283,4 @@ export {
|
|
|
283
283
|
projectOrCheck,
|
|
284
284
|
removeAndProject
|
|
285
285
|
};
|
|
286
|
-
//# sourceMappingURL=apply-
|
|
286
|
+
//# sourceMappingURL=apply-6ORDPVZS.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSkillServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IQYJWLGX.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-2I54YKIV.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
syncWorktree
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J3C46RXZ.js";
|
|
4
4
|
import {
|
|
5
5
|
localCli,
|
|
6
6
|
pmcpCommand,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
leaseSpecs,
|
|
30
30
|
readGitConfig
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4ZB5NJZA.js";
|
|
32
32
|
import {
|
|
33
33
|
ownerLine,
|
|
34
34
|
ownersOf,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
readHost,
|
|
78
78
|
readLock,
|
|
79
79
|
readLockFile
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-5KE3B5TO.js";
|
|
81
81
|
import {
|
|
82
82
|
DISABLE_ENV,
|
|
83
83
|
readLeaseSettings
|
|
@@ -6910,4 +6910,4 @@ export {
|
|
|
6910
6910
|
checkBudget,
|
|
6911
6911
|
readSpec
|
|
6912
6912
|
};
|
|
6913
|
-
//# sourceMappingURL=chunk-
|
|
6913
|
+
//# sourceMappingURL=chunk-45EC3JVG.js.map
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
marketplaceSpec
|
|
3
3
|
} from "./chunk-JANBBPKP.js";
|
|
4
|
+
import {
|
|
5
|
+
mailboxSpec
|
|
6
|
+
} from "./chunk-2HL2MFNI.js";
|
|
4
7
|
import {
|
|
5
8
|
harnessSpec,
|
|
6
9
|
tuiSpec
|
|
7
10
|
} from "./chunk-QR6A3TYP.js";
|
|
11
|
+
import {
|
|
12
|
+
waitSpec
|
|
13
|
+
} from "./chunk-F3R5HEUB.js";
|
|
14
|
+
import {
|
|
15
|
+
ownersSpec
|
|
16
|
+
} from "./chunk-D7IDT7OA.js";
|
|
8
17
|
import {
|
|
9
18
|
mcpSpec
|
|
10
19
|
} from "./chunk-UVTGY2R3.js";
|
|
11
|
-
import {
|
|
12
|
-
mailboxSpec
|
|
13
|
-
} from "./chunk-2HL2MFNI.js";
|
|
14
20
|
import {
|
|
15
21
|
gitSpec
|
|
16
22
|
} from "./chunk-4VVQLWTS.js";
|
|
17
23
|
import {
|
|
18
|
-
heavySpec
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
waitSpec
|
|
22
|
-
} from "./chunk-F3R5HEUB.js";
|
|
23
|
-
import {
|
|
24
|
-
ownersSpec
|
|
25
|
-
} from "./chunk-D7IDT7OA.js";
|
|
24
|
+
heavySpec,
|
|
25
|
+
hostSpec
|
|
26
|
+
} from "./chunk-LXWAU7AX.js";
|
|
26
27
|
import {
|
|
27
28
|
sessionsSpec
|
|
28
29
|
} from "./chunk-A4P3IIPE.js";
|
|
@@ -74,11 +75,11 @@ var completionSpec = {
|
|
|
74
75
|
var COMMANDS = [
|
|
75
76
|
{
|
|
76
77
|
...statusSpec,
|
|
77
|
-
load: async () => (await import("./status-
|
|
78
|
+
load: async () => (await import("./status-HCZBWIC3.js")).statusCommand
|
|
78
79
|
},
|
|
79
|
-
{ ...initSpec, load: async () => (await import("./init-
|
|
80
|
-
{ ...hooksSpec, load: async () => (await import("./hooks-
|
|
81
|
-
{ ...serveSpec, load: async () => (await import("./serve-
|
|
80
|
+
{ ...initSpec, load: async () => (await import("./init-SHHALJOG.js")).initCommand },
|
|
81
|
+
{ ...hooksSpec, load: async () => (await import("./hooks-BKLDQQSN.js")).hooksCommand },
|
|
82
|
+
{ ...serveSpec, load: async () => (await import("./serve-GYMBJPNJ.js")).serveCommand },
|
|
82
83
|
{ ...listSpec, load: async () => (await import("./list-LV5EKCF6.js")).listCommand },
|
|
83
84
|
{
|
|
84
85
|
...indexSpec,
|
|
@@ -115,28 +116,29 @@ var COMMANDS = [
|
|
|
115
116
|
{ ...syncSpec, load: async () => (await import("./install-5JH4DSFF.js")).syncCommand },
|
|
116
117
|
{
|
|
117
118
|
...projectSpec,
|
|
118
|
-
load: async () => (await import("./project-
|
|
119
|
+
load: async () => (await import("./project-CKECETMB.js")).projectCommand
|
|
119
120
|
},
|
|
120
121
|
{
|
|
121
122
|
...doctorSpec,
|
|
122
|
-
load: async () => (await import("./doctor-
|
|
123
|
+
load: async () => (await import("./doctor-IVKT4F44.js")).doctorCommand
|
|
123
124
|
},
|
|
124
125
|
{
|
|
125
126
|
...sessionsSpec,
|
|
126
127
|
load: async () => (await import("./cli-ZOY2274X.js")).sessionsCommand
|
|
127
128
|
},
|
|
128
129
|
{ ...logsSpec, load: async () => (await import("./logs-J4W6GFMK.js")).logsCommand },
|
|
129
|
-
{ ...gitSpec, load: async () => (await import("./cli-
|
|
130
|
+
{ ...gitSpec, load: async () => (await import("./cli-FXHKAXIV.js")).gitCommand },
|
|
130
131
|
{
|
|
131
132
|
...heavySpec,
|
|
132
|
-
load: async () => (await import("./heavy-
|
|
133
|
+
load: async () => (await import("./heavy-VBC4AGL6.js")).heavyCommand
|
|
133
134
|
},
|
|
135
|
+
{ ...hostSpec, load: async () => (await import("./host-TVWPNQV5.js")).hostCommand },
|
|
134
136
|
{ ...waitSpec, load: async () => (await import("./wait-HEODT7KV.js")).waitCommand },
|
|
135
137
|
{
|
|
136
138
|
...ownersSpec,
|
|
137
139
|
load: async () => (await import("./owners-MPI22SFU.js")).ownersCommand
|
|
138
140
|
},
|
|
139
|
-
{ ...mcpSpec, load: async () => (await import("./mcp-
|
|
141
|
+
{ ...mcpSpec, load: async () => (await import("./mcp-5A6WWV32.js")).mcpCommand },
|
|
140
142
|
{
|
|
141
143
|
...validateSpec,
|
|
142
144
|
load: async () => (await import("./validate-YXR7FJJX.js")).validateCommand
|
|
@@ -147,16 +149,16 @@ var COMMANDS = [
|
|
|
147
149
|
},
|
|
148
150
|
{
|
|
149
151
|
...harnessSpec,
|
|
150
|
-
load: async () => (await import("./harness-
|
|
152
|
+
load: async () => (await import("./harness-L5PBWKXS.js")).harnessCommand
|
|
151
153
|
},
|
|
152
|
-
{ ...tuiSpec, load: async () => (await import("./tui-
|
|
154
|
+
{ ...tuiSpec, load: async () => (await import("./tui-ZWLRAOCQ.js")).tuiCommand },
|
|
153
155
|
{
|
|
154
156
|
...marketplaceSpec,
|
|
155
157
|
load: async () => (await import("./marketplace-2X3OOEPW.js")).marketplaceCommand
|
|
156
158
|
},
|
|
157
159
|
{
|
|
158
160
|
...completionSpec,
|
|
159
|
-
load: async () => (await import("./completion-
|
|
161
|
+
load: async () => (await import("./completion-OXAWXTUC.js")).completionCommand
|
|
160
162
|
}
|
|
161
163
|
];
|
|
162
164
|
var PLANNED = [];
|
|
@@ -170,4 +172,4 @@ export {
|
|
|
170
172
|
PLANNED,
|
|
171
173
|
commandNamed
|
|
172
174
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-4G6LXAM4.js.map
|
|
@@ -186,12 +186,17 @@ function submodules(path, source) {
|
|
|
186
186
|
const read = new Reader(path, "git.submodules", source, [
|
|
187
187
|
"follow",
|
|
188
188
|
"shared",
|
|
189
|
-
"push"
|
|
189
|
+
"push",
|
|
190
|
+
"dir_to_gitlink",
|
|
191
|
+
"dir_to_gitlink_hint"
|
|
190
192
|
]);
|
|
193
|
+
const hint = read.string("dir_to_gitlink_hint");
|
|
191
194
|
return {
|
|
192
195
|
follow: read.oneOf("follow", ["clean_pins", "off"], "clean_pins"),
|
|
193
196
|
shared: read.list("shared"),
|
|
194
|
-
push: read.oneOf("push", ["pins", "off"], "off")
|
|
197
|
+
push: read.oneOf("push", ["pins", "off"], "off"),
|
|
198
|
+
dirToGitlink: read.oneOf("dir_to_gitlink", ["adopt", "refuse"], "adopt"),
|
|
199
|
+
...hint === void 0 ? {} : { dirToGitlinkHint: hint }
|
|
195
200
|
};
|
|
196
201
|
}
|
|
197
202
|
function leases(path, sessions) {
|
|
@@ -330,4 +335,4 @@ export {
|
|
|
330
335
|
gateTreePath,
|
|
331
336
|
leaseSpecs
|
|
332
337
|
};
|
|
333
|
-
//# sourceMappingURL=chunk-
|
|
338
|
+
//# sourceMappingURL=chunk-4ZB5NJZA.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-XWLMZKH2.js";
|
|
13
13
|
import {
|
|
14
14
|
VERSION
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RS2ST3KT.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigError
|
|
18
18
|
} from "./chunk-GJXOFDJT.js";
|
|
@@ -610,4 +610,4 @@ export {
|
|
|
610
610
|
hostEnvDoctor,
|
|
611
611
|
hostDoctor
|
|
612
612
|
};
|
|
613
|
-
//# sourceMappingURL=chunk-
|
|
613
|
+
//# sourceMappingURL=chunk-5KE3B5TO.js.map
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MODEL_KEYS
|
|
3
|
+
} from "./chunk-TYXJBXZQ.js";
|
|
4
|
+
|
|
5
|
+
// src/host/io/doctor.ts
|
|
6
|
+
var WEIGHT_RATIO_FLOOR = 2;
|
|
7
|
+
function lineFor(lines, device) {
|
|
8
|
+
return lines.find((line) => line.device === device);
|
|
9
|
+
}
|
|
10
|
+
function modelFindings(device, record, live) {
|
|
11
|
+
const recorded = record.devices[device];
|
|
12
|
+
const line = lineFor(live, device);
|
|
13
|
+
const warn = (message) => ({
|
|
14
|
+
level: "warn",
|
|
15
|
+
device,
|
|
16
|
+
message
|
|
17
|
+
});
|
|
18
|
+
if (line === void 0)
|
|
19
|
+
return [warn(`the kernel has no io.cost model for ${device}`)];
|
|
20
|
+
const found = [];
|
|
21
|
+
if (line.fields["ctrl"] !== "user")
|
|
22
|
+
found.push(
|
|
23
|
+
warn(
|
|
24
|
+
`io.cost.model ctrl=${line.fields["ctrl"] ?? "?"}: the kernel's own estimate is in use, not the recorded model`
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
const differ = MODEL_KEYS.filter(
|
|
28
|
+
(key) => Number(line.fields[key]) !== recorded.model[key]
|
|
29
|
+
).map(
|
|
30
|
+
(key) => `${key} live ${line.fields[key] ?? "none"}, recorded ${recorded.model[key]}`
|
|
31
|
+
);
|
|
32
|
+
if (differ.length > 0)
|
|
33
|
+
found.push(
|
|
34
|
+
warn(`io.cost.model differs from the record: ${differ.join("; ")}`)
|
|
35
|
+
);
|
|
36
|
+
if (found.length === 0)
|
|
37
|
+
found.push({
|
|
38
|
+
level: "ok",
|
|
39
|
+
device,
|
|
40
|
+
message: `io.cost.model matches the record measured ${recorded.measured_at}`
|
|
41
|
+
});
|
|
42
|
+
return found;
|
|
43
|
+
}
|
|
44
|
+
function qosFindings(device, live) {
|
|
45
|
+
const line = lineFor(live, device);
|
|
46
|
+
const warn = (message) => ({
|
|
47
|
+
level: "warn",
|
|
48
|
+
device,
|
|
49
|
+
message
|
|
50
|
+
});
|
|
51
|
+
if (line === void 0)
|
|
52
|
+
return [warn(`the kernel has no io.cost qos for ${device}`)];
|
|
53
|
+
const found = [];
|
|
54
|
+
if (line.fields["enable"] !== "1")
|
|
55
|
+
found.push(
|
|
56
|
+
warn("io.cost.qos enable=0: iocost is off, so io.weight does nothing")
|
|
57
|
+
);
|
|
58
|
+
if (line.fields["ctrl"] !== "user")
|
|
59
|
+
found.push(
|
|
60
|
+
warn(
|
|
61
|
+
`io.cost.qos ctrl=${line.fields["ctrl"] ?? "?"}: the kernel moves vrate itself and may run far past the model`
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
const max = Number(line.fields["max"]);
|
|
65
|
+
if (!(max <= 100))
|
|
66
|
+
found.push(
|
|
67
|
+
warn(
|
|
68
|
+
`io.cost.qos max=${line.fields["max"] ?? "none"} exceeds 100: vrate can outrun the model`
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
if (found.length === 0)
|
|
72
|
+
found.push({
|
|
73
|
+
level: "ok",
|
|
74
|
+
device,
|
|
75
|
+
message: "io.cost.qos caps vrate at the model (ctrl=user, max<=100)"
|
|
76
|
+
});
|
|
77
|
+
return found;
|
|
78
|
+
}
|
|
79
|
+
function diagnose(record, live) {
|
|
80
|
+
if (record === null || Object.keys(record.devices).length === 0)
|
|
81
|
+
return [
|
|
82
|
+
{
|
|
83
|
+
level: "warn",
|
|
84
|
+
device: null,
|
|
85
|
+
message: "no io model recorded; run pmcp host io measure"
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
return Object.keys(record.devices).sort().flatMap((device) => [
|
|
89
|
+
...modelFindings(device, record, live.model ?? []),
|
|
90
|
+
...qosFindings(device, live.qos ?? [])
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
93
|
+
function measureRefusal(live, device) {
|
|
94
|
+
const line = lineFor(live.qos ?? [], device);
|
|
95
|
+
if (line?.fields["ctrl"] !== "user") return null;
|
|
96
|
+
return [
|
|
97
|
+
`io.cost.qos on ${device} is ctrl=user, so vrate is held to the current model and a probe would measure that cap`,
|
|
98
|
+
`lift the cap for the measurement as root: echo '${device} enable=1 ctrl=auto' > /sys/fs/cgroup/io.cost.qos`,
|
|
99
|
+
"afterwards pmcp host io plan prints the capped qos line to restore"
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
function weightFinding(result) {
|
|
103
|
+
if (!result.valid || result.ratio === null)
|
|
104
|
+
return {
|
|
105
|
+
level: "warn",
|
|
106
|
+
device: null,
|
|
107
|
+
message: `weight check not valid: ${result.problem ?? "no result"}`
|
|
108
|
+
};
|
|
109
|
+
const rates = result.readers.map((entry) => `w${entry.weight} ${entry.rate?.iops ?? 0} IOPS`).join(", ");
|
|
110
|
+
if (result.ratio < WEIGHT_RATIO_FLOOR)
|
|
111
|
+
return {
|
|
112
|
+
level: "warn",
|
|
113
|
+
device: null,
|
|
114
|
+
message: `io.weight 100 vs 25 gave a ${result.ratio} ratio (${rates}): the weights have no effect`
|
|
115
|
+
};
|
|
116
|
+
return {
|
|
117
|
+
level: "ok",
|
|
118
|
+
device: null,
|
|
119
|
+
message: `io.weight 100 vs 25 gave a ${result.ratio} ratio (${rates})`
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export {
|
|
124
|
+
diagnose,
|
|
125
|
+
measureRefusal,
|
|
126
|
+
weightFinding
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=chunk-674APJDK.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-34DECPVC.js";
|
|
7
7
|
import {
|
|
8
8
|
ptyBinary
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5KE3B5TO.js";
|
|
10
10
|
|
|
11
11
|
// src/harness/adapters/systemd/admission.ts
|
|
12
12
|
var nativeHostTools = ["systemctl", "systemd-run"];
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
nativeHostTools,
|
|
37
37
|
assertNativeHost
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-6FUUX5WO.js.map
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runHeavy,
|
|
3
|
+
userManager
|
|
4
|
+
} from "./chunk-LXJTABBQ.js";
|
|
5
|
+
import {
|
|
6
|
+
MODEL_KEYS,
|
|
7
|
+
RESULT,
|
|
8
|
+
THREADS,
|
|
9
|
+
inScope,
|
|
10
|
+
jobArgv,
|
|
11
|
+
readJson,
|
|
12
|
+
selfArgv
|
|
13
|
+
} from "./chunk-TYXJBXZQ.js";
|
|
14
|
+
import {
|
|
15
|
+
ArgumentError,
|
|
16
|
+
EXIT,
|
|
17
|
+
one
|
|
18
|
+
} from "./chunk-Y6NFETNG.js";
|
|
19
|
+
import {
|
|
20
|
+
leaseSettingsFor
|
|
21
|
+
} from "./chunk-PZ6D3WKD.js";
|
|
22
|
+
import {
|
|
23
|
+
ConfigError,
|
|
24
|
+
findConfig
|
|
25
|
+
} from "./chunk-GJXOFDJT.js";
|
|
26
|
+
|
|
27
|
+
// src/host/io/record.ts
|
|
28
|
+
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "fs";
|
|
29
|
+
import { join } from "path";
|
|
30
|
+
var RECORD_FILE = "io-model.json";
|
|
31
|
+
function recordPath(leaseDir) {
|
|
32
|
+
return join(leaseDir, RECORD_FILE);
|
|
33
|
+
}
|
|
34
|
+
function validModel(value) {
|
|
35
|
+
if (typeof value !== "object" || value === null) return false;
|
|
36
|
+
const model = value;
|
|
37
|
+
return MODEL_KEYS.every(
|
|
38
|
+
(key) => typeof model[key] === "number" && Number.isInteger(model[key]) && model[key] > 0
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function readRecord(leaseDir) {
|
|
42
|
+
let text;
|
|
43
|
+
try {
|
|
44
|
+
text = readFileSync(recordPath(leaseDir), "utf8");
|
|
45
|
+
} catch (error) {
|
|
46
|
+
if (error.code === "ENOENT") return null;
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
const parsed = JSON.parse(text);
|
|
50
|
+
if (parsed.version !== 1 || typeof parsed.devices !== "object")
|
|
51
|
+
throw new Error(`${recordPath(leaseDir)} is not a version 1 io record`);
|
|
52
|
+
for (const [device, entry] of Object.entries(parsed.devices ?? {}))
|
|
53
|
+
if (entry?.device !== device || !validModel(entry.model))
|
|
54
|
+
throw new Error(`${recordPath(leaseDir)}: ${device} has no valid model`);
|
|
55
|
+
return parsed;
|
|
56
|
+
}
|
|
57
|
+
function writeRecord(leaseDir, entry) {
|
|
58
|
+
const current = readRecord(leaseDir);
|
|
59
|
+
const next = {
|
|
60
|
+
version: 1,
|
|
61
|
+
devices: { ...current?.devices ?? {}, [entry.device]: entry }
|
|
62
|
+
};
|
|
63
|
+
mkdirSync(leaseDir, { recursive: true });
|
|
64
|
+
const path = recordPath(leaseDir);
|
|
65
|
+
const temp = `${path}.${process.pid}.tmp`;
|
|
66
|
+
writeFileSync(temp, `${JSON.stringify(next, null, 2)}
|
|
67
|
+
`, { mode: 420 });
|
|
68
|
+
renameSync(temp, path);
|
|
69
|
+
return next;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// src/host/io/cli/shared.ts
|
|
73
|
+
import { randomBytes } from "crypto";
|
|
74
|
+
import { rmSync } from "fs";
|
|
75
|
+
import { dirname, join as join2 } from "path";
|
|
76
|
+
function leaseOf(context) {
|
|
77
|
+
try {
|
|
78
|
+
return leaseSettingsFor(context.cwd, one(context.args, "config"));
|
|
79
|
+
} catch (error) {
|
|
80
|
+
if (error instanceof ConfigError) throw new ArgumentError(error.message);
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function linuxOnly(context, verb) {
|
|
85
|
+
if (process.platform === "linux") return null;
|
|
86
|
+
context.ui.error(
|
|
87
|
+
`pmcp host io ${verb} needs Linux with cgroup v2 io.cost; this is ${process.platform}`
|
|
88
|
+
);
|
|
89
|
+
return EXIT.missingOptional;
|
|
90
|
+
}
|
|
91
|
+
function seconds(context, fallback) {
|
|
92
|
+
const text = one(context.args, "seconds");
|
|
93
|
+
if (text === void 0) return fallback;
|
|
94
|
+
const value = Number(text);
|
|
95
|
+
if (!Number.isInteger(value) || value < 1 || value > 600)
|
|
96
|
+
throw new ArgumentError("--seconds is a whole number from 1 to 600");
|
|
97
|
+
return value;
|
|
98
|
+
}
|
|
99
|
+
function probeDir(base) {
|
|
100
|
+
return join2(
|
|
101
|
+
base,
|
|
102
|
+
`.pmcp-io-probe-${process.pid}-${randomBytes(4).toString("hex")}`
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
async function underLease(context, lease, options) {
|
|
106
|
+
const say = (line) => context.ui.info(line);
|
|
107
|
+
const dir = options.job.dir;
|
|
108
|
+
const remove = () => rmSync(dir, { recursive: true, force: true });
|
|
109
|
+
process.once("exit", remove);
|
|
110
|
+
let argv = jobArgv(selfArgv(), options.verb, options.job);
|
|
111
|
+
if (options.scoped) {
|
|
112
|
+
const reason = userManager().unreachable(context.env);
|
|
113
|
+
if (reason === null)
|
|
114
|
+
argv = inScope(argv, `pmcp-io-probe-${process.pid}-${Date.now()}`);
|
|
115
|
+
else
|
|
116
|
+
say(
|
|
117
|
+
`no systemd user scope (${reason}); probing in this process's cgroup, where an io.max would cap the numbers`
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
const config = one(context.args, "config") ?? findConfig(context.cwd);
|
|
121
|
+
try {
|
|
122
|
+
const code = await runHeavy({
|
|
123
|
+
settings: lease,
|
|
124
|
+
profile: "default",
|
|
125
|
+
label: `pmcp host io ${options.verb}`,
|
|
126
|
+
lane: "bulk",
|
|
127
|
+
weight: lease.budget,
|
|
128
|
+
placed: true,
|
|
129
|
+
root: config ? dirname(config) : context.cwd,
|
|
130
|
+
argv,
|
|
131
|
+
cwd: context.cwd,
|
|
132
|
+
env: { ...context.env, UV_THREADPOOL_SIZE: THREADS },
|
|
133
|
+
say: (line) => process.stderr.write(`pmcp host io: ${line}
|
|
134
|
+
`)
|
|
135
|
+
});
|
|
136
|
+
if (code !== 0) return { code, result: null };
|
|
137
|
+
return { code, result: readJson(join2(dir, RESULT)) };
|
|
138
|
+
} finally {
|
|
139
|
+
remove();
|
|
140
|
+
process.off("exit", remove);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export {
|
|
145
|
+
recordPath,
|
|
146
|
+
readRecord,
|
|
147
|
+
writeRecord,
|
|
148
|
+
leaseOf,
|
|
149
|
+
linuxOnly,
|
|
150
|
+
seconds,
|
|
151
|
+
probeDir,
|
|
152
|
+
underLease
|
|
153
|
+
};
|
|
154
|
+
//# sourceMappingURL=chunk-6TM7PLXG.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOST_MANIFEST,
|
|
3
3
|
HOST_POLICY
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5KE3B5TO.js";
|
|
5
5
|
import {
|
|
6
6
|
projectStateDir
|
|
7
7
|
} from "./chunk-KLIYFD3W.js";
|
|
@@ -99,4 +99,4 @@ export {
|
|
|
99
99
|
hostApprovalDoctor,
|
|
100
100
|
writeApproval
|
|
101
101
|
};
|
|
102
|
-
//# sourceMappingURL=chunk-
|
|
102
|
+
//# sourceMappingURL=chunk-7J25NFM6.js.map
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-5ZABTVSW.js";
|
|
4
4
|
import {
|
|
5
5
|
dependencies
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OFYDBK44.js";
|
|
7
7
|
import {
|
|
8
8
|
interactiveEntry
|
|
9
9
|
} from "./chunk-LMT3PPXJ.js";
|
|
10
10
|
import {
|
|
11
11
|
assertNativeHost
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6FUUX5WO.js";
|
|
13
13
|
|
|
14
14
|
// src/tui/startup/host.ts
|
|
15
15
|
function terminalSupport() {
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
terminalSupport,
|
|
43
43
|
requireTerminal
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-BLE3YNCU.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-7CHUMF3E.js";
|
|
4
4
|
import {
|
|
5
5
|
readSpec
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-45EC3JVG.js";
|
|
7
7
|
import {
|
|
8
8
|
ArgumentError,
|
|
9
9
|
noConfig
|
|
@@ -27,4 +27,4 @@ function specFrom(context) {
|
|
|
27
27
|
export {
|
|
28
28
|
specFrom
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-C7VIQJLF.js.map
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
splitKeyed,
|
|
20
20
|
versionMatches,
|
|
21
21
|
withoutBlock
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-45EC3JVG.js";
|
|
23
23
|
import {
|
|
24
24
|
lockVersionProblem,
|
|
25
25
|
readLock,
|
|
26
26
|
replaceFile
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5KE3B5TO.js";
|
|
28
28
|
import {
|
|
29
29
|
ProjectError,
|
|
30
30
|
RULES_DIR,
|
|
@@ -273,4 +273,4 @@ export {
|
|
|
273
273
|
prepare,
|
|
274
274
|
checkProject
|
|
275
275
|
};
|
|
276
|
-
//# sourceMappingURL=chunk-
|
|
276
|
+
//# sourceMappingURL=chunk-HUAPDSKW.js.map
|