@ouro.bot/cli 0.1.0-alpha.80 → 0.1.0-alpha.81
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.json +6 -0
- package/dist/heart/daemon/daemon-cli.js +33 -0
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.81",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Fix: Self-healing versioned CLI layout. When `ouro up` runs via the old npx path for the first time, performSystemSetup now detects that CurrentVersion is missing and installs the current version into ~/.ouro-cli/versions/. Prevents 'ouro not installed' error after migration."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.80",
|
|
6
12
|
"changes": [
|
|
@@ -52,6 +52,7 @@ const store_file_1 = require("../../mind/friends/store-file");
|
|
|
52
52
|
const types_1 = require("../../mind/friends/types");
|
|
53
53
|
const ouro_uti_1 = require("./ouro-uti");
|
|
54
54
|
const ouro_path_installer_1 = require("./ouro-path-installer");
|
|
55
|
+
const ouro_version_manager_1 = require("./ouro-version-manager");
|
|
55
56
|
const skill_management_installer_1 = require("./skill-management-installer");
|
|
56
57
|
const hatch_flow_1 = require("./hatch-flow");
|
|
57
58
|
const specialist_orchestrator_1 = require("./specialist-orchestrator");
|
|
@@ -1352,6 +1353,21 @@ function createDefaultOuroCliDeps(socketPath = socket_client_1.DEFAULT_DAEMON_SO
|
|
|
1352
1353
|
runAuthFlow: auth_flow_1.runRuntimeAuthFlow,
|
|
1353
1354
|
registerOuroBundleType: ouro_uti_1.registerOuroBundleUti,
|
|
1354
1355
|
installOuroCommand: ouro_path_installer_1.installOuroCommand,
|
|
1356
|
+
/* v8 ignore start -- self-healing: ensures versioned layout has current version installed @preserve */
|
|
1357
|
+
ensureCurrentVersionInstalled: () => {
|
|
1358
|
+
const currentVersion = (0, ouro_version_manager_1.getCurrentVersion)({});
|
|
1359
|
+
if (currentVersion)
|
|
1360
|
+
return; // Already installed and linked
|
|
1361
|
+
const version = (0, bundle_manifest_1.getPackageVersion)();
|
|
1362
|
+
(0, ouro_version_manager_1.ensureLayout)({});
|
|
1363
|
+
const cliHome = (0, ouro_version_manager_1.getOuroCliHome)();
|
|
1364
|
+
const versionEntry = path.join(cliHome, "versions", version, "node_modules", "@ouro.bot", "cli", "dist", "heart", "daemon", "ouro-entry.js");
|
|
1365
|
+
if (!fs.existsSync(versionEntry)) {
|
|
1366
|
+
(0, ouro_version_manager_1.installVersion)(version, {});
|
|
1367
|
+
}
|
|
1368
|
+
(0, ouro_version_manager_1.activateVersion)(version, {});
|
|
1369
|
+
},
|
|
1370
|
+
/* v8 ignore stop */
|
|
1355
1371
|
syncGlobalOuroBotWrapper: ouro_bot_global_installer_1.syncGlobalOuroBotWrapper,
|
|
1356
1372
|
ensureSkillManagement: skill_management_installer_1.ensureSkillManagement,
|
|
1357
1373
|
ensureDaemonBootPersistence: defaultEnsureDaemonBootPersistence,
|
|
@@ -1461,6 +1477,23 @@ async function performSystemSetup(deps) {
|
|
|
1461
1477
|
});
|
|
1462
1478
|
}
|
|
1463
1479
|
}
|
|
1480
|
+
// Self-healing: ensure current version is installed in ~/.ouro-cli/ layout.
|
|
1481
|
+
// Handles the case where the wrapper exists but CurrentVersion is missing
|
|
1482
|
+
// (e.g., first run after migration from old npx wrapper).
|
|
1483
|
+
if (deps.ensureCurrentVersionInstalled) {
|
|
1484
|
+
try {
|
|
1485
|
+
deps.ensureCurrentVersionInstalled();
|
|
1486
|
+
}
|
|
1487
|
+
catch (error) {
|
|
1488
|
+
(0, runtime_1.emitNervesEvent)({
|
|
1489
|
+
level: "warn",
|
|
1490
|
+
component: "daemon",
|
|
1491
|
+
event: "daemon.system_setup_version_install_error",
|
|
1492
|
+
message: "failed to ensure current version installed",
|
|
1493
|
+
meta: { error: error instanceof Error ? error.message : /* v8 ignore next -- defensive @preserve */ String(error) },
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1464
1497
|
if (deps.syncGlobalOuroBotWrapper) {
|
|
1465
1498
|
try {
|
|
1466
1499
|
await Promise.resolve(deps.syncGlobalOuroBotWrapper());
|