@hasna/machines 0.0.36 → 0.0.37
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/dist/cli/index.js +13 -7
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/index.js +13 -7
- package/dist/mcp/index.js +13 -7
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -10266,14 +10266,20 @@ function runOptionalAdapterChecks(context, adapters) {
|
|
|
10266
10266
|
}
|
|
10267
10267
|
return checks;
|
|
10268
10268
|
}
|
|
10269
|
-
function runDoctor(machineId
|
|
10269
|
+
function runDoctor(machineId, options = {}) {
|
|
10270
|
+
const implicitLocalMachine = !machineId;
|
|
10271
|
+
const requestedMachineId = machineId ?? getLocalMachineId();
|
|
10272
|
+
const reportedMachineId = implicitLocalMachine ? "local" : requestedMachineId;
|
|
10270
10273
|
const now = options.now ?? new Date;
|
|
10271
10274
|
const { manifest, info: manifestSource } = readManifestWithSource({ adapter: options.manifestAdapter ?? null });
|
|
10272
|
-
const commandChecks = runMachineCommand(
|
|
10275
|
+
const commandChecks = runMachineCommand(requestedMachineId, buildDoctorCommand());
|
|
10273
10276
|
const details = parseKeyValueOutput(commandChecks.stdout);
|
|
10274
|
-
const machineInManifest = manifest.machines.find((machine) => machine.id ===
|
|
10277
|
+
const machineInManifest = manifest.machines.find((machine) => machine.id === requestedMachineId);
|
|
10278
|
+
const diagnosticMachine = machineInManifest ? redactManifestForDiagnostics(machineInManifest) : null;
|
|
10279
|
+
if (implicitLocalMachine && diagnosticMachine)
|
|
10280
|
+
diagnosticMachine.id = reportedMachineId;
|
|
10275
10281
|
const optionalAdapterChecks = options.includeOptionalAdapters === false ? [] : runOptionalAdapterChecks({
|
|
10276
|
-
machineId,
|
|
10282
|
+
machineId: requestedMachineId,
|
|
10277
10283
|
manifest,
|
|
10278
10284
|
manifestSource,
|
|
10279
10285
|
commandDetails: details,
|
|
@@ -10289,10 +10295,10 @@ function runDoctor(machineId = getLocalMachineId(), options = {}) {
|
|
|
10289
10295
|
},
|
|
10290
10296
|
remediation: manifestSource.warnings.length > 0 ? ["Provide a private manifest adapter or unset the private manifest ref to use the local manifest only."] : undefined
|
|
10291
10297
|
}),
|
|
10292
|
-
makeCheck2("manifest-entry", machineInManifest ? "ok" : "warn", machineInManifest ? "Machine exists in manifest" : "Machine missing from manifest",
|
|
10298
|
+
makeCheck2("manifest-entry", machineInManifest ? "ok" : "warn", machineInManifest ? "Machine exists in manifest" : "Machine missing from manifest", diagnosticMachine ? JSON.stringify(diagnosticMachine) : `No manifest entry for ${reportedMachineId}`, {
|
|
10293
10299
|
data: {
|
|
10294
10300
|
declared: Boolean(machineInManifest),
|
|
10295
|
-
machine:
|
|
10301
|
+
machine: diagnosticMachine
|
|
10296
10302
|
}
|
|
10297
10303
|
}),
|
|
10298
10304
|
makeCheck2("data-dir", details["data_dir_exists"] === "yes" ? "ok" : "warn", "Data directory check", `${redactPath(details["data_dir"] || "unknown")} ${details["data_dir_exists"] === "yes" ? "exists" : "missing"}`, {
|
|
@@ -10343,7 +10349,7 @@ function runDoctor(machineId = getLocalMachineId(), options = {}) {
|
|
|
10343
10349
|
...optionalAdapterChecks
|
|
10344
10350
|
];
|
|
10345
10351
|
return {
|
|
10346
|
-
machineId,
|
|
10352
|
+
machineId: reportedMachineId,
|
|
10347
10353
|
source: commandChecks.source,
|
|
10348
10354
|
schemaVersion: 1,
|
|
10349
10355
|
generatedAt: now.toISOString(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGrF,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE9F,eAAO,MAAM,+BAA+B,uEAAwE,CAAC;AAErH,MAAM,MAAM,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gB,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,GAAG,EAAE,IAAI,CAAC;CACX;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,oBAAoB,KAAK,WAAW,GAAG,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAElH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC1E;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,eAAe,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAuHD,wBAAgB,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,YAAY,CA6LvF"}
|
package/dist/index.js
CHANGED
|
@@ -13127,14 +13127,20 @@ function runOptionalAdapterChecks(context, adapters) {
|
|
|
13127
13127
|
}
|
|
13128
13128
|
return checks;
|
|
13129
13129
|
}
|
|
13130
|
-
function runDoctor(machineId
|
|
13130
|
+
function runDoctor(machineId, options = {}) {
|
|
13131
|
+
const implicitLocalMachine = !machineId;
|
|
13132
|
+
const requestedMachineId = machineId ?? getLocalMachineId();
|
|
13133
|
+
const reportedMachineId = implicitLocalMachine ? "local" : requestedMachineId;
|
|
13131
13134
|
const now = options.now ?? new Date;
|
|
13132
13135
|
const { manifest, info: manifestSource } = readManifestWithSource({ adapter: options.manifestAdapter ?? null });
|
|
13133
|
-
const commandChecks = runMachineCommand(
|
|
13136
|
+
const commandChecks = runMachineCommand(requestedMachineId, buildDoctorCommand());
|
|
13134
13137
|
const details = parseKeyValueOutput(commandChecks.stdout);
|
|
13135
|
-
const machineInManifest = manifest.machines.find((machine) => machine.id ===
|
|
13138
|
+
const machineInManifest = manifest.machines.find((machine) => machine.id === requestedMachineId);
|
|
13139
|
+
const diagnosticMachine = machineInManifest ? redactManifestForDiagnostics(machineInManifest) : null;
|
|
13140
|
+
if (implicitLocalMachine && diagnosticMachine)
|
|
13141
|
+
diagnosticMachine.id = reportedMachineId;
|
|
13136
13142
|
const optionalAdapterChecks = options.includeOptionalAdapters === false ? [] : runOptionalAdapterChecks({
|
|
13137
|
-
machineId,
|
|
13143
|
+
machineId: requestedMachineId,
|
|
13138
13144
|
manifest,
|
|
13139
13145
|
manifestSource,
|
|
13140
13146
|
commandDetails: details,
|
|
@@ -13150,10 +13156,10 @@ function runDoctor(machineId = getLocalMachineId(), options = {}) {
|
|
|
13150
13156
|
},
|
|
13151
13157
|
remediation: manifestSource.warnings.length > 0 ? ["Provide a private manifest adapter or unset the private manifest ref to use the local manifest only."] : undefined
|
|
13152
13158
|
}),
|
|
13153
|
-
makeCheck2("manifest-entry", machineInManifest ? "ok" : "warn", machineInManifest ? "Machine exists in manifest" : "Machine missing from manifest",
|
|
13159
|
+
makeCheck2("manifest-entry", machineInManifest ? "ok" : "warn", machineInManifest ? "Machine exists in manifest" : "Machine missing from manifest", diagnosticMachine ? JSON.stringify(diagnosticMachine) : `No manifest entry for ${reportedMachineId}`, {
|
|
13154
13160
|
data: {
|
|
13155
13161
|
declared: Boolean(machineInManifest),
|
|
13156
|
-
machine:
|
|
13162
|
+
machine: diagnosticMachine
|
|
13157
13163
|
}
|
|
13158
13164
|
}),
|
|
13159
13165
|
makeCheck2("data-dir", details["data_dir_exists"] === "yes" ? "ok" : "warn", "Data directory check", `${redactPath(details["data_dir"] || "unknown")} ${details["data_dir_exists"] === "yes" ? "exists" : "missing"}`, {
|
|
@@ -13204,7 +13210,7 @@ function runDoctor(machineId = getLocalMachineId(), options = {}) {
|
|
|
13204
13210
|
...optionalAdapterChecks
|
|
13205
13211
|
];
|
|
13206
13212
|
return {
|
|
13207
|
-
machineId,
|
|
13213
|
+
machineId: reportedMachineId,
|
|
13208
13214
|
source: commandChecks.source,
|
|
13209
13215
|
schemaVersion: 1,
|
|
13210
13216
|
generatedAt: now.toISOString(),
|
package/dist/mcp/index.js
CHANGED
|
@@ -5873,14 +5873,20 @@ function runOptionalAdapterChecks(context, adapters) {
|
|
|
5873
5873
|
}
|
|
5874
5874
|
return checks;
|
|
5875
5875
|
}
|
|
5876
|
-
function runDoctor(machineId
|
|
5876
|
+
function runDoctor(machineId, options = {}) {
|
|
5877
|
+
const implicitLocalMachine = !machineId;
|
|
5878
|
+
const requestedMachineId = machineId ?? getLocalMachineId();
|
|
5879
|
+
const reportedMachineId = implicitLocalMachine ? "local" : requestedMachineId;
|
|
5877
5880
|
const now = options.now ?? new Date;
|
|
5878
5881
|
const { manifest, info: manifestSource } = readManifestWithSource({ adapter: options.manifestAdapter ?? null });
|
|
5879
|
-
const commandChecks = runMachineCommand(
|
|
5882
|
+
const commandChecks = runMachineCommand(requestedMachineId, buildDoctorCommand());
|
|
5880
5883
|
const details = parseKeyValueOutput(commandChecks.stdout);
|
|
5881
|
-
const machineInManifest = manifest.machines.find((machine) => machine.id ===
|
|
5884
|
+
const machineInManifest = manifest.machines.find((machine) => machine.id === requestedMachineId);
|
|
5885
|
+
const diagnosticMachine = machineInManifest ? redactManifestForDiagnostics(machineInManifest) : null;
|
|
5886
|
+
if (implicitLocalMachine && diagnosticMachine)
|
|
5887
|
+
diagnosticMachine.id = reportedMachineId;
|
|
5882
5888
|
const optionalAdapterChecks = options.includeOptionalAdapters === false ? [] : runOptionalAdapterChecks({
|
|
5883
|
-
machineId,
|
|
5889
|
+
machineId: requestedMachineId,
|
|
5884
5890
|
manifest,
|
|
5885
5891
|
manifestSource,
|
|
5886
5892
|
commandDetails: details,
|
|
@@ -5896,10 +5902,10 @@ function runDoctor(machineId = getLocalMachineId(), options = {}) {
|
|
|
5896
5902
|
},
|
|
5897
5903
|
remediation: manifestSource.warnings.length > 0 ? ["Provide a private manifest adapter or unset the private manifest ref to use the local manifest only."] : undefined
|
|
5898
5904
|
}),
|
|
5899
|
-
makeCheck("manifest-entry", machineInManifest ? "ok" : "warn", machineInManifest ? "Machine exists in manifest" : "Machine missing from manifest",
|
|
5905
|
+
makeCheck("manifest-entry", machineInManifest ? "ok" : "warn", machineInManifest ? "Machine exists in manifest" : "Machine missing from manifest", diagnosticMachine ? JSON.stringify(diagnosticMachine) : `No manifest entry for ${reportedMachineId}`, {
|
|
5900
5906
|
data: {
|
|
5901
5907
|
declared: Boolean(machineInManifest),
|
|
5902
|
-
machine:
|
|
5908
|
+
machine: diagnosticMachine
|
|
5903
5909
|
}
|
|
5904
5910
|
}),
|
|
5905
5911
|
makeCheck("data-dir", details["data_dir_exists"] === "yes" ? "ok" : "warn", "Data directory check", `${redactPath(details["data_dir"] || "unknown")} ${details["data_dir_exists"] === "yes" ? "exists" : "missing"}`, {
|
|
@@ -5950,7 +5956,7 @@ function runDoctor(machineId = getLocalMachineId(), options = {}) {
|
|
|
5950
5956
|
...optionalAdapterChecks
|
|
5951
5957
|
];
|
|
5952
5958
|
return {
|
|
5953
|
-
machineId,
|
|
5959
|
+
machineId: reportedMachineId,
|
|
5954
5960
|
source: commandChecks.source,
|
|
5955
5961
|
schemaVersion: 1,
|
|
5956
5962
|
generatedAt: now.toISOString(),
|