@ouro.bot/cli 0.1.0-alpha.80 → 0.1.0-alpha.82

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 CHANGED
@@ -1,6 +1,18 @@
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.82",
6
+ "changes": [
7
+ "Fix: Wire default implementations for CLI update flow. `ouro up` now actually checks the npm registry for newer versions, installs them, and re-execs. Previously the update check deps were declared but never wired in createDefaultOuroCliDeps. Also wires rollback and versions command defaults."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.81",
12
+ "changes": [
13
+ "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."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.80",
6
18
  "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,43 @@ 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 */
1371
+ /* v8 ignore start -- CLI version management defaults: integration code @preserve */
1372
+ checkForCliUpdate: async () => {
1373
+ const { checkForUpdate } = await Promise.resolve().then(() => __importStar(require("./update-checker")));
1374
+ return checkForUpdate((0, bundle_manifest_1.getPackageVersion)(), {
1375
+ fetchRegistryJson: async () => {
1376
+ const res = await fetch("https://registry.npmjs.org/@ouro.bot/cli");
1377
+ return res.json();
1378
+ },
1379
+ distTag: "alpha",
1380
+ });
1381
+ },
1382
+ installCliVersion: async (version) => { (0, ouro_version_manager_1.installVersion)(version, {}); },
1383
+ activateCliVersion: (version) => { (0, ouro_version_manager_1.activateVersion)(version, {}); },
1384
+ getCurrentCliVersion: () => (0, ouro_version_manager_1.getCurrentVersion)({}),
1385
+ getPreviousCliVersion: () => (0, ouro_version_manager_1.getPreviousVersion)({}),
1386
+ listCliVersions: () => (0, ouro_version_manager_1.listInstalledVersions)({}),
1387
+ reExecFromNewVersion: (reArgs) => {
1388
+ const entry = path.join((0, ouro_version_manager_1.getOuroCliHome)(), "CurrentVersion", "node_modules", "@ouro.bot", "cli", "dist", "heart", "daemon", "ouro-entry.js");
1389
+ require("child_process").execFileSync("node", [entry, ...reArgs], { stdio: "inherit" });
1390
+ process.exit(0);
1391
+ },
1392
+ /* v8 ignore stop */
1355
1393
  syncGlobalOuroBotWrapper: ouro_bot_global_installer_1.syncGlobalOuroBotWrapper,
1356
1394
  ensureSkillManagement: skill_management_installer_1.ensureSkillManagement,
1357
1395
  ensureDaemonBootPersistence: defaultEnsureDaemonBootPersistence,
@@ -1461,6 +1499,23 @@ async function performSystemSetup(deps) {
1461
1499
  });
1462
1500
  }
1463
1501
  }
1502
+ // Self-healing: ensure current version is installed in ~/.ouro-cli/ layout.
1503
+ // Handles the case where the wrapper exists but CurrentVersion is missing
1504
+ // (e.g., first run after migration from old npx wrapper).
1505
+ if (deps.ensureCurrentVersionInstalled) {
1506
+ try {
1507
+ deps.ensureCurrentVersionInstalled();
1508
+ }
1509
+ catch (error) {
1510
+ (0, runtime_1.emitNervesEvent)({
1511
+ level: "warn",
1512
+ component: "daemon",
1513
+ event: "daemon.system_setup_version_install_error",
1514
+ message: "failed to ensure current version installed",
1515
+ meta: { error: error instanceof Error ? error.message : /* v8 ignore next -- defensive @preserve */ String(error) },
1516
+ });
1517
+ }
1518
+ }
1464
1519
  if (deps.syncGlobalOuroBotWrapper) {
1465
1520
  try {
1466
1521
  await Promise.resolve(deps.syncGlobalOuroBotWrapper());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.80",
3
+ "version": "0.1.0-alpha.82",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",