@ouro.bot/cli 0.1.0-alpha.23 → 0.1.0-alpha.25
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,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_note": "This changelog is maintained as part of the PR/version-bump workflow.
|
|
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.25",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Runtime updates no longer downgrade your bundle-meta.json if you happen to be running a newer version than the installed CLI. Only forward updates are applied.",
|
|
8
|
+
"The 'ouro up' update summary is now a single consolidated line (e.g. 'updated 4 agents to runtime X (was Y)') instead of one line per agent."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"version": "0.1.0-alpha.24",
|
|
13
|
+
"changes": [
|
|
14
|
+
"When you run 'ouro up', you now see which agents were updated and from what version, so you know exactly what happened during startup."
|
|
15
|
+
]
|
|
16
|
+
},
|
|
4
17
|
{
|
|
5
18
|
"version": "0.1.0-alpha.23",
|
|
6
19
|
"changes": [
|
|
@@ -56,6 +56,9 @@ const specialist_prompt_1 = require("./specialist-prompt");
|
|
|
56
56
|
const specialist_tools_1 = require("./specialist-tools");
|
|
57
57
|
const runtime_metadata_1 = require("./runtime-metadata");
|
|
58
58
|
const daemon_runtime_sync_1 = require("./daemon-runtime-sync");
|
|
59
|
+
const update_hooks_1 = require("./update-hooks");
|
|
60
|
+
const bundle_meta_1 = require("./hooks/bundle-meta");
|
|
61
|
+
const bundle_manifest_1 = require("../../mind/bundle-manifest");
|
|
59
62
|
function stringField(value) {
|
|
60
63
|
return typeof value === "string" ? value : null;
|
|
61
64
|
}
|
|
@@ -1083,6 +1086,19 @@ async function runOuroCli(args, deps = createDefaultOuroCliDeps()) {
|
|
|
1083
1086
|
});
|
|
1084
1087
|
if (command.kind === "daemon.up") {
|
|
1085
1088
|
await performSystemSetup(deps);
|
|
1089
|
+
// Run update hooks before starting daemon so user sees the output
|
|
1090
|
+
(0, update_hooks_1.registerUpdateHook)(bundle_meta_1.bundleMetaHook);
|
|
1091
|
+
const bundlesRoot = (0, identity_1.getAgentBundlesRoot)();
|
|
1092
|
+
const currentVersion = (0, bundle_manifest_1.getPackageVersion)();
|
|
1093
|
+
const updateSummary = await (0, update_hooks_1.applyPendingUpdates)(bundlesRoot, currentVersion);
|
|
1094
|
+
if (updateSummary.updated.length > 0) {
|
|
1095
|
+
const agents = updateSummary.updated.map((e) => e.agent);
|
|
1096
|
+
const from = updateSummary.updated[0].from;
|
|
1097
|
+
const to = updateSummary.updated[0].to;
|
|
1098
|
+
const fromStr = from ? ` (was ${from})` : "";
|
|
1099
|
+
const count = agents.length;
|
|
1100
|
+
deps.writeStdout(`updated ${count} agent${count === 1 ? "" : "s"} to runtime ${to}${fromStr}`);
|
|
1101
|
+
}
|
|
1086
1102
|
const daemonResult = await ensureDaemonRunning(deps);
|
|
1087
1103
|
deps.writeStdout(daemonResult.message);
|
|
1088
1104
|
return daemonResult.message;
|
|
@@ -39,6 +39,7 @@ exports.clearRegisteredHooks = clearRegisteredHooks;
|
|
|
39
39
|
exports.applyPendingUpdates = applyPendingUpdates;
|
|
40
40
|
const fs = __importStar(require("fs"));
|
|
41
41
|
const path = __importStar(require("path"));
|
|
42
|
+
const semver = __importStar(require("semver"));
|
|
42
43
|
const runtime_1 = require("../../nerves/runtime");
|
|
43
44
|
const _hooks = [];
|
|
44
45
|
function registerUpdateHook(hook) {
|
|
@@ -57,6 +58,7 @@ function clearRegisteredHooks() {
|
|
|
57
58
|
_hooks.length = 0;
|
|
58
59
|
}
|
|
59
60
|
async function applyPendingUpdates(bundlesRoot, currentVersion) {
|
|
61
|
+
const summary = { updated: [] };
|
|
60
62
|
(0, runtime_1.emitNervesEvent)({
|
|
61
63
|
component: "daemon",
|
|
62
64
|
event: "daemon.apply_pending_updates_start",
|
|
@@ -64,14 +66,14 @@ async function applyPendingUpdates(bundlesRoot, currentVersion) {
|
|
|
64
66
|
meta: { bundlesRoot, currentVersion },
|
|
65
67
|
});
|
|
66
68
|
if (!fs.existsSync(bundlesRoot)) {
|
|
67
|
-
return;
|
|
69
|
+
return summary;
|
|
68
70
|
}
|
|
69
71
|
let entries;
|
|
70
72
|
try {
|
|
71
73
|
entries = fs.readdirSync(bundlesRoot, { withFileTypes: true });
|
|
72
74
|
}
|
|
73
75
|
catch {
|
|
74
|
-
return;
|
|
76
|
+
return summary;
|
|
75
77
|
}
|
|
76
78
|
for (const entry of entries) {
|
|
77
79
|
if (!entry.isDirectory() || !entry.name.endsWith(".ouro"))
|
|
@@ -87,6 +89,16 @@ async function applyPendingUpdates(bundlesRoot, currentVersion) {
|
|
|
87
89
|
if (previousVersion === currentVersion) {
|
|
88
90
|
continue;
|
|
89
91
|
}
|
|
92
|
+
// Skip downgrades — only update forward
|
|
93
|
+
if (semver.valid(previousVersion) && semver.valid(currentVersion) && semver.gte(previousVersion, currentVersion)) {
|
|
94
|
+
(0, runtime_1.emitNervesEvent)({
|
|
95
|
+
component: "daemon",
|
|
96
|
+
event: "daemon.update_hook_skip_downgrade",
|
|
97
|
+
message: "skipping downgrade",
|
|
98
|
+
meta: { agentRoot, previousVersion, currentVersion },
|
|
99
|
+
});
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
90
102
|
}
|
|
91
103
|
}
|
|
92
104
|
catch {
|
|
@@ -110,6 +122,11 @@ async function applyPendingUpdates(bundlesRoot, currentVersion) {
|
|
|
110
122
|
});
|
|
111
123
|
}
|
|
112
124
|
}
|
|
125
|
+
summary.updated.push({
|
|
126
|
+
agent: entry.name.replace(/\.ouro$/, ""),
|
|
127
|
+
from: previousVersion,
|
|
128
|
+
to: currentVersion,
|
|
129
|
+
});
|
|
113
130
|
}
|
|
114
131
|
(0, runtime_1.emitNervesEvent)({
|
|
115
132
|
component: "daemon",
|
|
@@ -117,4 +134,5 @@ async function applyPendingUpdates(bundlesRoot, currentVersion) {
|
|
|
117
134
|
message: "pending updates applied",
|
|
118
135
|
meta: { bundlesRoot },
|
|
119
136
|
});
|
|
137
|
+
return summary;
|
|
120
138
|
}
|