@ours.network/install 2.2.0 → 2.2.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/README.md CHANGED
@@ -104,11 +104,11 @@ This permanent command contains no tunnel credentials or enrollment expiry. `--s
104
104
 
105
105
  After Fleet configuration, and again on update, the installer asks the exact Fleet it installed to run `ours-fleet managed-cli setup`. Fleet owns that policy; this step writes no Codex rule or Claude setting itself, and starts no agent session and no model. It runs only when the installed Fleet declares the `managed-cli.setup-v1` capability; the Fleet release this installer pins does. With an earlier Fleet (a retained or development installation) it is skipped (and `--fleet-task-workflow` reports that it was not applied), and it never fails an installation: an unsupported combination is printed with Fleet's reason and left exactly as sandboxed as before.
106
106
 
107
- ### Optional terminal session sharing
107
+ ### Terminal sessions
108
108
 
109
- Add `--native-sessions-human-cid <Human-root-CID>` to client/all setup with the Fleet and Claude Code and/or Codex integrations. This explicitly permits visible terminal history, browser input and peer-mail wake. Interactive setup offers the same choice; declining leaves native settings unchanged. General unattended installation does not grant this permission.
109
+ Client/all setup automatically connects terminal sessions when Claude Code and/or Codex are selected, including unattended setup. Fleet is installed as the terminal-session component without requiring its persistent-agent wizard. The installer reads the Human identity from the saved workspace profile; it does not ask for a CID or an extra permission. Terminal sessions provide visible history, browser input and peer-mail wake. A missing or ambiguous Human identity produces an actionable setup error.
110
110
 
111
- Setup uses the installed Fleet's participation commands and local native plugin. It merges participation hooks while retaining Ours identity hooks and other settings. Existing Claude sessions need a plugin reload. For Codex, start its App Server with `codex app-server daemon start` before setup; setup never starts a daemon after a failed readiness check. Linux setup installs the user service `ours-fleet-native-codex.service` with `Restart=no`. Errors stop the watcher; inspect `journalctl --user -u ours-fleet-native-codex.service`, correct the reported problem and start it manually. Automatic service setup for other platforms is not provided.
111
+ Setup uses the installed Fleet's participation commands and local native plugin. It merges participation hooks while retaining Ours identity hooks and other settings. Existing Claude sessions need a plugin reload. For Codex, setup starts its App Server once with `codex app-server daemon start`. A start failure is reported directly; setup does not retry. Linux setup installs the user service `ours-fleet-native-codex.service` with `Restart=no`. Errors stop the watcher; inspect `journalctl --user -u ours-fleet-native-codex.service`, correct the reported problem and start it manually. Automatic service setup for other platforms is not provided.
112
112
 
113
113
  Inspect sessions with `ours-fleet participation ls --json`. Revoke access with `ours-fleet participation disable`; stop discovery with `systemctl --user disable --now ours-fleet-native-codex.service`. Existing identity creation and retirement remain owned by the native Ours hooks.
114
114
 
@@ -1,38 +1,38 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "channel": "stable",
4
- "installerVersion": "2.2.0",
5
- "commit": "948a3e8ee2cc8abe9dffade75b9fd51efada97cf",
4
+ "installerVersion": "2.2.1",
5
+ "commit": "ed01bb606a9c7860c75249d6e688de9e857e2a6a",
6
6
  "platform": "linux/amd64",
7
7
  "variants": {
8
8
  "server": {
9
- "policySha256": "33d1f02fe927d107044b720011de40dda5a5e112c3383f4ed762145c7550910d",
9
+ "policySha256": "e8859809ca5ad4e767962bd1cadcba7e3a2399a99cf5bf81d85370630aef6473",
10
10
  "runtime": {
11
11
  "repository": "docker.io/adaptframework/ours-runtime",
12
- "index": "sha256:8d2b7a628fda24b75ea7aa2735e3f21b6ea7dee90c3ed9631841b6f3d779ade8",
13
- "manifest": "sha256:338048207126b881521121115988a36a490f353f83e189845300598da694d8c4",
14
- "config": "sha256:905387906d36b2c5dadf1af1eaffbd7d044264c2988373c2b19ecfe8c726e0cb"
12
+ "index": "sha256:89b602cd365ed082065c62ff8ef77bed9445d724a84e739e5991b0f7622847b5",
13
+ "manifest": "sha256:08cac75b18f694452500215b5e0e4b7958eeab874fb6fc37ebb8a6aadadb3cf7",
14
+ "config": "sha256:78fbaf74acbdb25d58cb685cf142b0cfa1ae5d49c6e0c490ac9ef7f86f8bc73c"
15
15
  },
16
16
  "maintenance": {
17
17
  "repository": "docker.io/adaptframework/ours-maintenance",
18
- "index": "sha256:de9905d20d378e6efb1f45ca7225c2166417419f252a1d86d2fc418b65b6dbe7",
19
- "manifest": "sha256:95afd069387ded2f69ef905a55e1e5505a49276cad5092b3493fbf2946a3715e",
20
- "config": "sha256:13638e6df9a62196e74066484719e1e4f3c05d9b4e32182490661093ef60c76b"
18
+ "index": "sha256:d5c245ac858bc6921e8fa103219f1d655440bb8248d998e2b3beb7bdba5bba9b",
19
+ "manifest": "sha256:1783e913e2edc9db69b2937a3a187cb7e181e052d58249315b8944ac9ff53d2b",
20
+ "config": "sha256:e594fa5f9d110f7bb719aee8a242288ba93d0d43f86ec1f4be1b04e1761eb573"
21
21
  }
22
22
  },
23
23
  "daemon": {
24
- "policySha256": "fc96abb671799a66c0e1bae24d1512f4dfe5f5d2c243612c74fdfe2bc392c9e5",
24
+ "policySha256": "73adab783b20fcb4d37ba7cbc176bec9ba8ba7556c732c78b48c6baeb25e0e8a",
25
25
  "runtime": {
26
26
  "repository": "docker.io/adaptframework/ours-runtime",
27
- "index": "sha256:c176abc60075103aa07d6e2ae1b012352b8773be202cf75478c2a8e05c3c0c13",
28
- "manifest": "sha256:970f7eca22c8efd3883a2d080f66ffad58108cdff9c473050ec90b0bebc30fc8",
29
- "config": "sha256:72ba1587d201a1b1558b7291e78a678912560f919d3f630a5539ea2e11c8985f"
27
+ "index": "sha256:7467716fcf79c28d9cbe5aaad62639d5b714462b9d87e40939e029d9eb5c3e5f",
28
+ "manifest": "sha256:1e972c676f607922184318d6ae9dd9ab6d49a40ba8fd82c3df10e5aee1929460",
29
+ "config": "sha256:b12e5295b1e6e63d427384c2857d40c9988c2f77ce98e7e5485503551dadc73a"
30
30
  },
31
31
  "maintenance": {
32
32
  "repository": "docker.io/adaptframework/ours-maintenance",
33
- "index": "sha256:9ac33d7cca0a77594b0c0c5d73305e479295eb9b48624a9c70f1a3134709886f",
34
- "manifest": "sha256:e7cda7ca12988a709457193c6079527406c11659ac753f9a7082d39bdc51ab81",
35
- "config": "sha256:9cb09f6b56ff324cbf92230d7997efe270443eff3bffbc17bd795963c8aabb47"
33
+ "index": "sha256:f0e155a196d231a02ffa7fe253eff4d101272a3e0ef9810cb203bad6fa394f73",
34
+ "manifest": "sha256:e648ea4ab4f24afd54df700104c79ed6bae113febc7be12d6497582bc578a9c9",
35
+ "config": "sha256:f51a1ac603e84d8cf71473815b29a7be50115a1ee15c3c4bb4b5b84a7cc8a753"
36
36
  }
37
37
  }
38
38
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "channel": "stable",
4
- "installerVersion": "2.2.0",
4
+ "installerVersion": "2.2.1",
5
5
  "packages": {
6
6
  "@ours.network/sdk": {
7
7
  "version": "6.1.0",
@@ -2,7 +2,7 @@
2
2
  "release": {
3
3
  "schema": 1,
4
4
  "channel": "stable",
5
- "installerVersion": "2.2.0",
5
+ "installerVersion": "2.2.1",
6
6
  "packages": {
7
7
  "@ours.network/sdk": {
8
8
  "version": "6.1.0",
package/lib/effects.mjs CHANGED
@@ -1414,7 +1414,7 @@ export function networkEffects(effects) {
1414
1414
  // Every client installation includes the native CLI and its SDK dependency.
1415
1415
  const selected = clientPackageNames(integrations);
1416
1416
  const packages = selectSourcePackages(manifest, 'client', selected);
1417
- const selectionKey = JSON.stringify([hostCliOnly ? 'host-cli-private-v1' : 'host-cli-v1', configPath, ...(hostCliOnly ? [manifest] : []), ...(refresh ? [manifest, integrations] : [])]);
1417
+ const selectionKey = JSON.stringify([hostCliOnly ? 'host-cli-private-v1' : 'host-cli-v1', configPath, selected, ...(hostCliOnly ? [manifest] : []), ...(refresh ? [manifest, integrations] : [])]);
1418
1418
  const root = join(home, '.ours-client-install', createHash('sha256').update(selectionKey).digest('hex').slice(0, 16));
1419
1419
  const hasGit = Object.values(packages).some(selection => selection.source);
1420
1420
  await effects.run('npm', ['--version']);
@@ -1455,7 +1455,7 @@ export function networkEffects(effects) {
1455
1455
  writePrivateNew(join(root, '.packages-ready'), 'ready\n');
1456
1456
  }
1457
1457
  verifyReleaseGraph(root, manifest, { requiredPackages: Object.keys(packages) });
1458
- if (integrations.includes('fleet') && (gatewayServerUrl || readHostProfileFile(configPath)?.serverUrl)) {
1458
+ if (selected.includes('fleet') && (gatewayServerUrl || readHostProfileFile(configPath)?.serverUrl)) {
1459
1459
  let info;
1460
1460
  try { info = JSON.parse(readFileSync(join(root, 'node_modules/@ours.network/fleet/dist/build-info.json'), 'utf8')); } catch {}
1461
1461
  if (!Array.isArray(info?.capabilities) || !info.capabilities.includes('cowork.http-management-v1'))
@@ -1465,7 +1465,7 @@ export function networkEffects(effects) {
1465
1465
  const cliPolicy = hostCliOnly ? null : hostCliPolicy(manifest);
1466
1466
  // Local acquisition alone does not publish native commands. Use the user's
1467
1467
  // configured npm prefix and retained dependency closure, including on retry.
1468
- for (const name of integrations.filter(name => name === 'fleet' || name === 'codex')) {
1468
+ for (const name of selected.filter(name => name === 'fleet' || name === 'codex')) {
1469
1469
  await effects.run('npm', ['install', '--global', '--install-links=false', '--offline', '--ignore-scripts', '--no-audit', '--no-fund', join(root, 'node_modules', '@ours.network', name)]);
1470
1470
  }
1471
1471
  let cliBin = join(root, 'node_modules/.bin/ours');
@@ -1481,7 +1481,7 @@ export function networkEffects(effects) {
1481
1481
  await publishClientCli(effects, join(root, 'node_modules', '@ours.network/cli'), { policy: manifest, isolated: hostCliOnly });
1482
1482
  }
1483
1483
  const localPackages = Object.fromEntries(integrations.filter(n => n !== 'fleet').map(name => [name, join(root, 'node_modules', '@ours.network', name)]));
1484
- return { localPackages, packages: {}, cliBin, fleetBin: integrations.includes('fleet') ? join(root, 'node_modules/.bin/ours-fleet') : null };
1484
+ return { localPackages, packages: {}, cliBin, fleetBin: selected.includes('fleet') ? join(root, 'node_modules/.bin/ours-fleet') : null };
1485
1485
  },
1486
1486
  /** Capability tokens the given Fleet executable reports for itself; [] when it reports none. */
1487
1487
  async fleetCapabilities(fleetBin, env = null) {
@@ -36,24 +36,24 @@ export function nativeCodexUnit({ fleetEntry, profile, env = {} }) {
36
36
  + `ExecStart=${unitQuote(process.execPath).replaceAll('$', () => '$$')} ${unitQuote(fleetEntry).replaceAll('$', () => '$$')} participation serve-codex\nRestart=no\n[Install]\nWantedBy=default.target\n`;
37
37
  }
38
38
 
39
- // Called only for a complete client installation. A general --yes never grants
40
- // access to native conversations: unattended use needs the explicit CID option.
41
- export async function setupNativeSessions(command, effects, { fleetBin, configPath, integrations }) {
39
+ // Called after a complete client installation. Resolve the Human from the same
40
+ // installed profile; users never need to find or enter an internal CID.
41
+ export async function setupNativeSessions(command, effects, { fleetBin, cliBin, configPath, integrations }) {
42
42
  const selected = integrations.filter(name => name === 'claude-code' || name === 'codex');
43
- if (!selected.length) {
44
- if (command.nativeSessionsHumanCid) throw new Error('Terminal sharing was requested, but no Claude Code or Codex integration was selected.');
45
- return { state: 'skipped' };
46
- }
47
- let humanCid = command.nativeSessionsHumanCid;
48
- if (!humanCid && !command.nonInteractive && effects.interactive) {
49
- if (await effects.ask('Show terminal sessions in Ours, share their visible history and allow browser messages and peer-mail wake?', false))
50
- humanCid = (await effects.askLine('Human root CID to authorize: ', '')).trim();
51
- }
52
- if (!humanCid) {
53
- effects.out(info('Terminal session sharing settings were left unchanged. To configure sharing, add --native-sessions-human-cid <Human-root-CID> to your client setup command.'));
54
- return { state: 'skipped' };
43
+ if (!selected.length) return { state: 'skipped' };
44
+ let identities;
45
+ try {
46
+ const result = await effects.run(cliBin, ['identity', 'list', '--json'], { env: { OURS_CONFIG: configPath } });
47
+ if (result.code !== undefined && result.code !== 0) throw new Error('identity lookup failed');
48
+ identities = JSON.parse(result.stdout);
49
+ } catch (error) {
50
+ throw new Error(`Cannot read the Human identity for terminal sessions from ${configPath}: ${installerFailure(error)}. Check the saved workspace connection and complete workspace setup, then run the installer again.`);
55
51
  }
56
- if (!/^[0-9a-f]{64}$/i.test(humanCid)) throw new Error('Native session setup requires a 64-character hexadecimal Human root CID.');
52
+ if (!Array.isArray(identities)) throw new Error('The saved workspace returned an invalid identity list. Check the workspace connection, then run the installer again.');
53
+ const roots = identities.filter(row => row?.kind === 'root');
54
+ if (roots.length !== 1 || typeof roots[0].cid !== 'string' || !/^[0-9a-f]{64}$/i.test(roots[0].cid))
55
+ throw new Error(`Terminal sessions require one Human identity in the saved workspace; found ${roots.length}. Complete Human identity setup for this workspace, then run the installer again.`);
56
+ const humanCid = roots[0].cid;
57
57
  const fleetEntry = effects.realpath(fleetBin);
58
58
  if (!fleetEntry || !isAbsolute(fleetEntry)) throw new Error('Cannot locate the installed Fleet executable for native session setup.');
59
59
  const env = { OURS_CONFIG: configPath };
@@ -64,10 +64,10 @@ export async function setupNativeSessions(command, effects, { fleetBin, configPa
64
64
  if (codex) {
65
65
  if (effects.platform.platform !== 'linux') throw new Error('Automatic Codex discovery service setup currently supports Linux. Run ours-fleet participation serve-codex manually on this platform.');
66
66
  await effects.run('systemctl', ['--user', 'show-environment']);
67
- // This is intentional setup, not recovery. An absent daemon needs the
68
- // operator's explicit start; an arbitrary failed probe never starts one.
69
- try { await effects.run('codex', ['app-server', 'daemon', 'version'], { timeout: 10_000 }); }
70
- catch (error) { throw new Error(`Codex App Server is not ready: ${installerFailure(error)}. Start it with codex app-server daemon start, then repeat setup.`); }
67
+ // Starting the selected App Server is an installation action, not a
68
+ // response to a failed health check. Execute once; surface any failure.
69
+ try { await effects.run('codex', ['app-server', 'daemon', 'start'], { timeout: 30_000 }); }
70
+ catch (error) { throw new Error(`Could not start the Codex App Server: ${installerFailure(error)}. Check codex app-server daemon start, then run the installer again.`); }
71
71
  unitPath = join(effects.home, '.config/systemd/user', NATIVE_CODEX_SERVICE);
72
72
  const previous = effects.readText(unitPath);
73
73
  if (previous !== null && (!previous.startsWith(marker + '\n') || !previous.includes(`# Profile: ${configPath}\n`)))
@@ -83,7 +83,7 @@ export async function setupNativeSessions(command, effects, { fleetBin, configPa
83
83
  mergeNativeHooks(existing === null ? {} : JSON.parse(existing), generatedHooks);
84
84
  }
85
85
  // Fleet validates the selected root through the existing daemon. It owns the
86
- // grant and identity lifecycle; the installer does not create an identity.
86
+ // participation grant; the installer does not create an identity.
87
87
  await cli(['participation', 'enable', '--human-cid', humanCid, '--authorize-registration-and-wake', ...(codex ? ['--codex'] : [])]);
88
88
  try {
89
89
  if (claude) {
@@ -1762,11 +1762,11 @@ export async function runClientCommand(command, effects) {
1762
1762
  summary.push(await runFleetPhase(args, effects, { target, isDefaultStateDir: false }));
1763
1763
  }
1764
1764
  const incomplete = integrations.filter(name => !summary.some(row => row.key === name && row.state === 'installed'));
1765
- if (incomplete.length && command.nativeSessionsHumanCid)
1766
- effects.out(warn(`Terminal session setup was requested but was not run because these integrations are incomplete: ${incomplete.join(', ')}. Existing sharing settings were retained; finish those integrations, then re-run the same setup command.`));
1767
- if (!incomplete.length && integrations.includes('fleet')) {
1765
+ if (incomplete.length && integrations.some(name => ['codex', 'claude-code'].includes(name)))
1766
+ effects.out(warn(`Terminal session setup could not finish because these integrations are incomplete: ${incomplete.join(', ')}. Existing sharing settings were retained; finish those integrations, then re-run the same setup command.`));
1767
+ if (!incomplete.length && integrations.some(name => ['codex', 'claude-code'].includes(name))) {
1768
1768
  phase = 'Configure terminal session sharing';
1769
- await setupNativeSessions(command, effects, { fleetBin: exactSuite.fleetBin, configPath: imported.configPath, integrations });
1769
+ await setupNativeSessions(command, effects, { fleetBin: exactSuite.fleetBin, cliBin: exactSuite.cliBin, configPath: imported.configPath, integrations });
1770
1770
  }
1771
1771
  if (effects.env.OURS_CONFIG && resolve(effects.env.OURS_CONFIG) !== imported.configPath)
1772
1772
  effects.out(warn('This shell has an explicit OURS_CONFIG override. Unset it for new clients to use the saved default; installer did not edit your shell.'));
package/lib/plan.mjs CHANGED
@@ -477,5 +477,5 @@ export function consumerServiceState(text, service, platform) {
477
477
  }
478
478
 
479
479
  export function clientPackageNames(integrations) {
480
- return [...new Set(['sdk', 'cli', ...(integrations.some(name => ['codex', 'claude-code'].includes(name)) ? ['mcp'] : []), ...integrations])];
480
+ return [...new Set(['sdk', 'cli', ...(integrations.some(name => ['codex', 'claude-code'].includes(name)) ? ['mcp', 'fleet'] : []), ...integrations])];
481
481
  }
@@ -12,7 +12,6 @@ const valueFlags = new Map(Object.entries({
12
12
  '--container-engine': 'containerEngine', '--server-url': 'serverUrl', '--scope': 'scope', '--action': 'operation', '--mode': 'mode', '--state-dir': 'stateDir',
13
13
  '--username': 'localUsername', '--name': 'name', '--surname': 'surname', '--hostname': 'hostname',
14
14
  '--identity-name': 'identityName', '--integrations': 'integrations', '--fleet-settings': 'fleetSettingsPath', '--fleet-task-workflow': 'fleetTaskWorkflowAgents',
15
- '--native-sessions-human-cid': 'nativeSessionsHumanCid',
16
15
  '--config': 'config', '--sources': 'sources', '--port': 'port', '--cowork-port': 'coworkPort', '--messenger-port': 'messengerPort',
17
16
  }));
18
17
  const boolFlags = new Map([['--compatible', 'compatible'], ['--dry-run', 'dryRun'], ['--migrate', 'migrate'], ['--disable-fleet-agents-setup', 'disableFleetAgentsSetup']]);
@@ -38,11 +37,6 @@ export function validateSetupOptions(input, { interactive = input?.interactive =
38
37
  if (!['install', 'update'].includes(options.operation)) throw new Error('Operation must be install or update');
39
38
  const server = options.scope !== 'client';
40
39
  const client = options.scope !== 'server';
41
- if (options.nativeSessionsHumanCid !== undefined) {
42
- if (!client || !options.integrations?.includes('fleet') || !options.integrations.some(name => ['claude-code', 'codex'].includes(name)))
43
- throw new Error('--native-sessions-human-cid requires Fleet and a Claude Code or Codex integration');
44
- if (!/^[0-9a-f]{64}$/i.test(options.nativeSessionsHumanCid)) throw new Error('--native-sessions-human-cid requires a 64-character hexadecimal Human root CID');
45
- }
46
40
  const suppliedHuman = ['localUsername', 'name', 'surname'].some(key => options[key] !== undefined);
47
41
  if (suppliedHuman) {
48
42
  for (const key of ['localUsername', 'name', 'surname']) if (!nonempty(options[key])) throw new Error(`Missing human profile option: ${key}`);
package/lib/setup.mjs CHANGED
@@ -149,7 +149,6 @@ export async function executeSetupPlan(plan, effects, { server = runServerComman
149
149
  const result = await client({ role: 'client', operation: 'install', config: clientConfig,
150
150
  integrations: plan.integrations, fleetSettingsPath: plan.fleetSettingsPath, sourcePolicy: clientPolicy,
151
151
  disableFleetAgentsSetup: plan.disableFleetAgentsSetup, fleetTaskWorkflowAgents: plan.fleetTaskWorkflowAgents,
152
- nativeSessionsHumanCid: plan.nativeSessionsHumanCid,
153
152
  preset: true, nonInteractive: !plan.interactive }, effects);
154
153
  if (result !== 0) return result;
155
154
  }
package/lib/usage.mjs CHANGED
@@ -55,7 +55,6 @@ export const USAGE = `ours-install — interactive setup with optional CLI prese
55
55
  --integrations LIST codex,claude-code,fleet; use none to skip clients explicitly
56
56
  --fleet-settings PATH JSON settings for Fleet; required unless Fleet agents setup is disabled
57
57
  --fleet-task-workflow A[,B] let these Fleet agents run Fleet task commands outside their command sandbox
58
- --native-sessions-human-cid CID opt in to terminal history, browser input and peer-mail wake under this Human
59
58
  --config PATH complete connection profile for client-only setup
60
59
  --sources PATH explicit full development source policy override
61
60
  --port N public gateway port for Docker (default 3050; e.g. 4050)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/install",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
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",