@aiaiai-pt/martha-cli 0.16.0 → 0.16.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/CHANGELOG.md +5 -0
- package/dist/index.js +28 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to `@aiaiai-pt/martha-cli`. Format: [Keep a Changelog](https
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.16.1] — 2026-06-14
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- `martha update` now updates the **same global prefix the on-PATH `martha` came from**. It picked the package manager from the *runtime* (`process.versions.bun`), but a bun-installed CLI runs under node, so it chose `npm i -g` and updated a different prefix than the one on PATH — leaving `martha --version` on the old version (the 0.15→0.16 split-install report). Detection is now based on the install path of the running binary (bun's global lives under `~/.bun/…`), falling back to the runtime hint then npm. `--manager npm|bun` still overrides.
|
|
11
|
+
|
|
7
12
|
## [0.16.0] — 2026-06-13
|
|
8
13
|
|
|
9
14
|
### Added — #567 fluid in-conversation human approval
|
package/dist/index.js
CHANGED
|
@@ -11077,7 +11077,7 @@ import { createInterface as createInterface2 } from "node:readline";
|
|
|
11077
11077
|
init_errors();
|
|
11078
11078
|
|
|
11079
11079
|
// src/version.ts
|
|
11080
|
-
var CLI_VERSION = "0.16.
|
|
11080
|
+
var CLI_VERSION = "0.16.1";
|
|
11081
11081
|
|
|
11082
11082
|
// src/commands/sessions.ts
|
|
11083
11083
|
function relativeTime(iso) {
|
|
@@ -19006,6 +19006,8 @@ function registerSkillCommand(program2) {
|
|
|
19006
19006
|
|
|
19007
19007
|
// src/commands/update.ts
|
|
19008
19008
|
import { spawnSync } from "node:child_process";
|
|
19009
|
+
import { realpathSync } from "node:fs";
|
|
19010
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
19009
19011
|
init_errors();
|
|
19010
19012
|
var PKG = "@aiaiai-pt/martha-cli";
|
|
19011
19013
|
var LATEST_URL = "https://registry.npmjs.org/@aiaiai-pt%2Fmartha-cli/latest";
|
|
@@ -19033,6 +19035,28 @@ async function fetchLatest() {
|
|
|
19033
19035
|
return null;
|
|
19034
19036
|
}
|
|
19035
19037
|
}
|
|
19038
|
+
function managerFromInstallPath(paths) {
|
|
19039
|
+
const joined = paths.filter(Boolean).join(`
|
|
19040
|
+
`);
|
|
19041
|
+
if (!joined)
|
|
19042
|
+
return null;
|
|
19043
|
+
if (/[\\/]\.bun[\\/]/.test(joined))
|
|
19044
|
+
return "bun";
|
|
19045
|
+
if (/[\\/]node_modules[\\/]/.test(joined))
|
|
19046
|
+
return "npm";
|
|
19047
|
+
return null;
|
|
19048
|
+
}
|
|
19049
|
+
function detectManagerFromInstallPath() {
|
|
19050
|
+
const candidates = [];
|
|
19051
|
+
try {
|
|
19052
|
+
if (process.argv[1])
|
|
19053
|
+
candidates.push(realpathSync(process.argv[1]));
|
|
19054
|
+
} catch {}
|
|
19055
|
+
try {
|
|
19056
|
+
candidates.push(realpathSync(fileURLToPath2(import.meta.url)));
|
|
19057
|
+
} catch {}
|
|
19058
|
+
return managerFromInstallPath(candidates);
|
|
19059
|
+
}
|
|
19036
19060
|
function resolveManager(explicit) {
|
|
19037
19061
|
if (explicit) {
|
|
19038
19062
|
if (explicit !== "npm" && explicit !== "bun") {
|
|
@@ -19040,6 +19064,9 @@ function resolveManager(explicit) {
|
|
|
19040
19064
|
}
|
|
19041
19065
|
return explicit;
|
|
19042
19066
|
}
|
|
19067
|
+
const fromInstall = detectManagerFromInstallPath();
|
|
19068
|
+
if (fromInstall)
|
|
19069
|
+
return fromInstall;
|
|
19043
19070
|
return process.versions?.bun ? "bun" : "npm";
|
|
19044
19071
|
}
|
|
19045
19072
|
function registerUpdateCommand(program2) {
|