@ours.network/install 2.0.4 → 2.0.5
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/assets/release-lock.json +7 -7
- package/assets/release.json +3 -3
- package/assets/sources.json +4 -4
- package/lib/orchestrate.mjs +52 -0
- package/package.json +1 -1
package/assets/release-lock.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@ours.network/codex": "2.0.2",
|
|
14
14
|
"@ours.network/cowork": "2.0.2",
|
|
15
15
|
"@ours.network/daemon": "5.1.0",
|
|
16
|
-
"@ours.network/fleet": "2.2.
|
|
16
|
+
"@ours.network/fleet": "2.2.5",
|
|
17
17
|
"@ours.network/mcp": "2.0.2",
|
|
18
18
|
"@ours.network/messenger-server": "2.0.2",
|
|
19
19
|
"@ours.network/notifications": "1.0.1",
|
|
@@ -1046,9 +1046,9 @@
|
|
|
1046
1046
|
}
|
|
1047
1047
|
},
|
|
1048
1048
|
"node_modules/@ours.network/fleet": {
|
|
1049
|
-
"version": "2.2.
|
|
1050
|
-
"resolved": "https://registry.npmjs.org/@ours.network/fleet/-/fleet-2.2.
|
|
1051
|
-
"integrity": "sha512-
|
|
1049
|
+
"version": "2.2.5",
|
|
1050
|
+
"resolved": "https://registry.npmjs.org/@ours.network/fleet/-/fleet-2.2.5.tgz",
|
|
1051
|
+
"integrity": "sha512-11cFUc6t9QHAPIfVLLdCyngoIkIFdPaNoFaLCoJypjnmyD5Rpume2xPZ2Ul+1aLH/CqXEKCGqI97e57OE8qBmQ==",
|
|
1052
1052
|
"license": "FSL-1.1-Apache-2.0",
|
|
1053
1053
|
"dependencies": {
|
|
1054
1054
|
"@agentclientprotocol/sdk": "^1.3.0",
|
|
@@ -1854,9 +1854,9 @@
|
|
|
1854
1854
|
}
|
|
1855
1855
|
},
|
|
1856
1856
|
"node_modules/express-rate-limit": {
|
|
1857
|
-
"version": "8.7.
|
|
1858
|
-
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.7.
|
|
1859
|
-
"integrity": "sha512-
|
|
1857
|
+
"version": "8.7.2",
|
|
1858
|
+
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.7.2.tgz",
|
|
1859
|
+
"integrity": "sha512-U1ScocxDD9WI09LaBVypvNkOtNR5yWAmZLkuKJdAzIchA4YKFYF6GT5IKER7epG58oXtjvGlV0/6ii0F83EyZg==",
|
|
1860
1860
|
"license": "MIT",
|
|
1861
1861
|
"dependencies": {
|
|
1862
1862
|
"debug": "^4.4.3",
|
package/assets/release.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"channel": "stable",
|
|
4
|
-
"installerVersion": "2.0.
|
|
4
|
+
"installerVersion": "2.0.5",
|
|
5
5
|
"packages": {
|
|
6
6
|
"@ours.network/sdk": {
|
|
7
7
|
"version": "5.1.0",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"integrity": "sha512-4AUpWQd13m53EinmxF6Q2OO9xfkZ5+UrKwTvlnq3LaLCnPz/AfchzaHkAWDAq9ZeIMZHpsgaJ0FptS+ToFXzbg=="
|
|
29
29
|
},
|
|
30
30
|
"@ours.network/fleet": {
|
|
31
|
-
"version": "2.2.
|
|
32
|
-
"integrity": "sha512-
|
|
31
|
+
"version": "2.2.5",
|
|
32
|
+
"integrity": "sha512-11cFUc6t9QHAPIfVLLdCyngoIkIFdPaNoFaLCoJypjnmyD5Rpume2xPZ2Ul+1aLH/CqXEKCGqI97e57OE8qBmQ=="
|
|
33
33
|
},
|
|
34
34
|
"@ours.network/mcp": {
|
|
35
35
|
"version": "2.0.2",
|
package/assets/sources.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"release": {
|
|
3
3
|
"schema": 1,
|
|
4
4
|
"channel": "stable",
|
|
5
|
-
"installerVersion": "2.0.
|
|
5
|
+
"installerVersion": "2.0.5",
|
|
6
6
|
"packages": {
|
|
7
7
|
"@ours.network/sdk": {
|
|
8
8
|
"version": "5.1.0",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"integrity": "sha512-4AUpWQd13m53EinmxF6Q2OO9xfkZ5+UrKwTvlnq3LaLCnPz/AfchzaHkAWDAq9ZeIMZHpsgaJ0FptS+ToFXzbg=="
|
|
30
30
|
},
|
|
31
31
|
"@ours.network/fleet": {
|
|
32
|
-
"version": "2.2.
|
|
33
|
-
"integrity": "sha512-
|
|
32
|
+
"version": "2.2.5",
|
|
33
|
+
"integrity": "sha512-11cFUc6t9QHAPIfVLLdCyngoIkIFdPaNoFaLCoJypjnmyD5Rpume2xPZ2Ul+1aLH/CqXEKCGqI97e57OE8qBmQ=="
|
|
34
34
|
},
|
|
35
35
|
"@ours.network/mcp": {
|
|
36
36
|
"version": "2.0.2",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
},
|
|
88
88
|
"@ours.network/fleet": {
|
|
89
89
|
"type": "npm",
|
|
90
|
-
"version": "2.2.
|
|
90
|
+
"version": "2.2.5"
|
|
91
91
|
},
|
|
92
92
|
"@ours.network/mcp": {
|
|
93
93
|
"type": "npm",
|
package/lib/orchestrate.mjs
CHANGED
|
@@ -1070,6 +1070,56 @@ export async function runFleetManagedCliSetup(args, effects, plan, target) {
|
|
|
1070
1070
|
return { state: declared.every(role => good.includes(role.setup.state)) ? 'prepared' : 'attention', report };
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
|
+
/**
|
|
1074
|
+
* Fleet's `init` only adds missing role defaults; installed copies stay
|
|
1075
|
+
* byte-identical. Adopting a newer packaged default is Fleet's own
|
|
1076
|
+
* `migrate-role-defaults`, which changes only files that exactly match a known
|
|
1077
|
+
* packaged revision and preserves every customized one. Ask the installed
|
|
1078
|
+
* Fleet for its zero-write plan first; apply it only when it replaces or adds
|
|
1079
|
+
* defaults without removing any, because a removal is left for the operator to
|
|
1080
|
+
* review. Nothing is started or restarted, and a failure never fails the run.
|
|
1081
|
+
*/
|
|
1082
|
+
export async function runFleetRoleDefaultMigration(args, effects, plan, target) {
|
|
1083
|
+
const fleet = args.acquiredFleet || plan.init[0];
|
|
1084
|
+
const env = target.mode === 'host-profile' ? profileEnv(target) : daemonEnv(target.stateDir, target.port);
|
|
1085
|
+
const shown = `${fleet === plan.init[0] ? fleet : shellQuote(fleet)} migrate-role-defaults --configuration ${shellQuote(plan.configPath)}`;
|
|
1086
|
+
const migrate = async write => {
|
|
1087
|
+
const result = await effects.run(fleet, ['migrate-role-defaults', '--configuration', plan.configPath, ...(write ? ['--write'] : [])], { env });
|
|
1088
|
+
const lines = (result.stdout ?? '').split('\n');
|
|
1089
|
+
// Fleet's first line states what it did; anything else is not a plan this installer can trust.
|
|
1090
|
+
if (lines[0] !== (write ? 'Applied packaged role-default migration.' : 'Dry run only; no files were changed.')) throw new Error('unrecognised report');
|
|
1091
|
+
const listed = prefix => lines.filter(line => line.startsWith(prefix)).map(line => line.slice(prefix.length));
|
|
1092
|
+
return { removals: listed('Remove '), replacements: listed('Replace '), additions: listed('Add '),
|
|
1093
|
+
preserved: listed('Preserve customized '), backup: listed('Recovery backup: ')[0] ?? null };
|
|
1094
|
+
};
|
|
1095
|
+
let dry;
|
|
1096
|
+
try { dry = await migrate(false); } catch (error) {
|
|
1097
|
+
effects.out(warn(`Fleet role defaults were not checked (${installerFailure(error)}); existing role files are unchanged. Review with: ${shown}`));
|
|
1098
|
+
return { state: 'failed' };
|
|
1099
|
+
}
|
|
1100
|
+
if (!dry.removals.length && !dry.replacements.length && !dry.additions.length) {
|
|
1101
|
+
effects.out(ok(`Fleet role defaults are current${dry.preserved.length ? `; ${dry.preserved.length} customized file(s) left unchanged` : ''}.`));
|
|
1102
|
+
return { state: 'current', preserved: dry.preserved };
|
|
1103
|
+
}
|
|
1104
|
+
if (dry.removals.length) {
|
|
1105
|
+
effects.out(warn('Newer Fleet role defaults are available, but adopting them removes files, so nothing was changed:'));
|
|
1106
|
+
for (const path of dry.removals) effects.out(info(` remove ${path}`));
|
|
1107
|
+
effects.out(info(`Review the plan with: ${shown} — then apply it with --write.`));
|
|
1108
|
+
return { state: 'attention', plan: dry };
|
|
1109
|
+
}
|
|
1110
|
+
let applied;
|
|
1111
|
+
try { applied = await migrate(true); } catch (error) {
|
|
1112
|
+
effects.out(warn(`Fleet role-default migration failed (${installerFailure(error)}). Inspect any staging or recovery path named in that error before retrying: ${shown}`));
|
|
1113
|
+
return { state: 'failed' };
|
|
1114
|
+
}
|
|
1115
|
+
for (const path of applied.replacements) effects.out(ok(`Updated unmodified Fleet default ${path}.`));
|
|
1116
|
+
for (const path of applied.additions) effects.out(ok(`Added Fleet default ${path}.`));
|
|
1117
|
+
for (const path of applied.preserved) effects.out(info(`Kept customized ${path} unchanged.`));
|
|
1118
|
+
if (applied.backup) effects.out(info(`Previous Fleet configuration kept at ${applied.backup}.`));
|
|
1119
|
+
effects.out(info('Agents already running keep their current instructions until their next session; existing task members keep the role they were launched with.'));
|
|
1120
|
+
return { state: 'migrated', ...applied };
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1073
1123
|
export const FLEET_SERVICE_REFRESH_CAPABILITY = 'service.refresh-v1';
|
|
1074
1124
|
|
|
1075
1125
|
/** Order matters only for the supervisor: it stops and resumes agents, so it goes last. */
|
|
@@ -1203,6 +1253,7 @@ export async function runFleetPhase(args, effects, { target, isDefaultStateDir }
|
|
|
1203
1253
|
// A retained configuration means Fleet was set up before, so its service
|
|
1204
1254
|
// definitions may pin the release this run just replaced.
|
|
1205
1255
|
if (!args.dryRun && effects.readText(plan.configPath) !== null) {
|
|
1256
|
+
await runFleetRoleDefaultMigration(args, effects, plan, target);
|
|
1206
1257
|
await runFleetManagedCliSetup(args, effects, plan, target);
|
|
1207
1258
|
await runFleetServiceRefresh(args, effects, plan, target);
|
|
1208
1259
|
}
|
|
@@ -1231,6 +1282,7 @@ export async function runFleetPhase(args, effects, { target, isDefaultStateDir }
|
|
|
1231
1282
|
return { key: 'fleet', label: plan.label, state: 'failed', note: 'Fleet configuration was not published' };
|
|
1232
1283
|
}
|
|
1233
1284
|
effects.out(ok('ours-fleet installed and initialized; no fleet roles were started.'));
|
|
1285
|
+
if (!args.dryRun) await runFleetRoleDefaultMigration(args, effects, plan, target);
|
|
1234
1286
|
if (!args.dryRun) await runFleetManagedCliSetup(args, effects, plan, target);
|
|
1235
1287
|
if (!args.dryRun) await runFleetServiceRefresh(args, effects, plan, target);
|
|
1236
1288
|
if (plan.instruction) effects.out(info(plan.instruction));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ours.network/install",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The all-in-one ours.network installer: one shared daemon, MCP, cowork, Telegram, Fleet initialization, harness plugins, Human identity, progress UI, and guided next steps.",
|
|
6
6
|
"type": "module",
|