@getmikie/cli 1.1.123 → 1.1.124
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/bin/mikie.mjs +14 -0
- package/lib/launcher.mjs +21 -0
- package/package.json +4 -4
- package/scripts/reconcile-install.mjs +17 -0
package/bin/mikie.mjs
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
resolveDependencyPackageJson,
|
|
19
19
|
resolveNativeBinary,
|
|
20
20
|
selectPlatformPackage,
|
|
21
|
+
shouldCompleteSkippedInstall,
|
|
21
22
|
shouldReconcileInstalledClients,
|
|
22
23
|
translateArguments,
|
|
23
24
|
} from "../lib/launcher.mjs";
|
|
@@ -33,6 +34,7 @@ import {
|
|
|
33
34
|
runUpdateTransaction,
|
|
34
35
|
} from "../lib/update.mjs";
|
|
35
36
|
import {
|
|
37
|
+
completeSkippedInstall,
|
|
36
38
|
installedClientRuntimeDigests,
|
|
37
39
|
reconcileInstalledClients,
|
|
38
40
|
} from "../scripts/reconcile-install.mjs";
|
|
@@ -261,6 +263,18 @@ All commands execute the compiled Mikie native engine.`);
|
|
|
261
263
|
if (clients.status === "deferred") {
|
|
262
264
|
console.error("mikie: client repair deferred; relay startup continues. Run `mikie doctor` to inspect client registration.");
|
|
263
265
|
}
|
|
266
|
+
} else if (shouldCompleteSkippedInstall(nativeArguments)) {
|
|
267
|
+
// An invalid install fails here, once, before any client repair.
|
|
268
|
+
await resolveNativeBinary();
|
|
269
|
+
try {
|
|
270
|
+
const clients = await completeSkippedInstall({ version: packageMetadata.version });
|
|
271
|
+
if (clients.status === "deferred") {
|
|
272
|
+
console.error("mikie: client repair deferred; run `mikie doctor` to inspect client registration.");
|
|
273
|
+
}
|
|
274
|
+
} catch (error) {
|
|
275
|
+
const reason = error instanceof Error ? error.message : "unavailable";
|
|
276
|
+
console.error(`mikie: install reconciliation is incomplete (${reason}); the command continues.`);
|
|
277
|
+
}
|
|
264
278
|
}
|
|
265
279
|
const binary = await prepareNativeLaunch(await resolveNativeBinary(), nativeArguments, {
|
|
266
280
|
version: packageMetadata.version,
|
package/lib/launcher.mjs
CHANGED
|
@@ -519,6 +519,27 @@ export function shouldReconcileInstalledClients(arguments_) {
|
|
|
519
519
|
return ["serve", "run-relay", "run-codex-hook", "run-claude-hook"].includes(arguments_[0]);
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
+
/**
|
|
523
|
+
* Return whether a customer command first finishes an install whose npm
|
|
524
|
+
* postinstall never ran (npm's allow-scripts policy skips it by default).
|
|
525
|
+
* Only commands a person types: hook and internal entrypoints (for example
|
|
526
|
+
* `efficiency-hook`, run on every prompt) and read-only doctor never do.
|
|
527
|
+
*/
|
|
528
|
+
const INSTALL_COMPLETING_COMMANDS = new Set([
|
|
529
|
+
"setup",
|
|
530
|
+
"login",
|
|
531
|
+
"connect",
|
|
532
|
+
"privacy",
|
|
533
|
+
"mode",
|
|
534
|
+
"savings",
|
|
535
|
+
"activity",
|
|
536
|
+
"control",
|
|
537
|
+
]);
|
|
538
|
+
|
|
539
|
+
export function shouldCompleteSkippedInstall(arguments_) {
|
|
540
|
+
return INSTALL_COMPLETING_COMMANDS.has(arguments_[0]);
|
|
541
|
+
}
|
|
542
|
+
|
|
522
543
|
async function materializeRuntime(
|
|
523
544
|
binary,
|
|
524
545
|
{ version, runtimeRoot, executableName, cleanupHistorical, preserveSha256 },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getmikie/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.124",
|
|
4
4
|
"description": "Native Mikie relay launcher for MCP clients",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"node": ">=22"
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@getmikie/darwin-arm64": "1.1.
|
|
28
|
-
"@getmikie/linux-x64-gnu": "1.1.
|
|
29
|
-
"@getmikie/win32-x64": "1.1.
|
|
27
|
+
"@getmikie/darwin-arm64": "1.1.124",
|
|
28
|
+
"@getmikie/linux-x64-gnu": "1.1.124",
|
|
29
|
+
"@getmikie/win32-x64": "1.1.124"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public",
|
|
@@ -594,6 +594,23 @@ export async function reconcileInstalledClients({
|
|
|
594
594
|
return { status: "reconciled", finalLauncher };
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
+
/**
|
|
598
|
+
* Finish an install whose postinstall was skipped: the same client and
|
|
599
|
+
* trajectory-store reconciliation, once per installed runtime. A current
|
|
600
|
+
* marker makes this a no-op; client repair never blocks the command.
|
|
601
|
+
*/
|
|
602
|
+
export async function completeSkippedInstall({
|
|
603
|
+
version,
|
|
604
|
+
reconcileClients = reconcileInstalledClients,
|
|
605
|
+
reconcileTrajectory = reconcileInstalledTrajectory,
|
|
606
|
+
} = {}) {
|
|
607
|
+
const clients = await reconcileClients({ version, allowDeferred: true });
|
|
608
|
+
if (clients.status === "reconciled") {
|
|
609
|
+
await reconcileTrajectory();
|
|
610
|
+
}
|
|
611
|
+
return clients;
|
|
612
|
+
}
|
|
613
|
+
|
|
597
614
|
const scriptIdentity = pathIdentity(fileURLToPath(import.meta.url), process.platform);
|
|
598
615
|
const invokedIdentity = pathIdentity(process.argv[1], process.platform);
|
|
599
616
|
if (scriptIdentity !== null && scriptIdentity === invokedIdentity) {
|