@ours.network/install 2.2.2 → 2.2.3

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.
@@ -1,38 +1,38 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "channel": "stable",
4
- "installerVersion": "2.2.2",
5
- "commit": "9eeaf517da32e3bc7a566425603e7fa99b82a4b5",
4
+ "installerVersion": "2.2.3",
5
+ "commit": "d3ed4181be262c4e0572facc4c26d5365b090c0a",
6
6
  "platform": "linux/amd64",
7
7
  "variants": {
8
8
  "server": {
9
- "policySha256": "53ca6ce29b215aa43f1be0a52cec7ca24b7b9de6fc95199c4524922c7aa24951",
9
+ "policySha256": "0b12956a6941b6fab215689011260ea92ae7b194fd49a45751c3b1f932aad5fe",
10
10
  "runtime": {
11
11
  "repository": "docker.io/adaptframework/ours-runtime",
12
- "index": "sha256:88b5c5a16d19d5d293bf2678474c303e0b2d252cf55701a6e862fa44dac83c21",
13
- "manifest": "sha256:a56fee31b6465e3ea2eab8fd860d6f462a97fe3ac6ddecbb9e20531719524d1e",
14
- "config": "sha256:47f3ab488b8054b09088488b4cecf40e8ba33c2fe27aaa800759b33f63e2fa41"
12
+ "index": "sha256:897b90a212c4a26a4cfaf9681b1affec3bf86eeedca31e38569ce9f63a48751f",
13
+ "manifest": "sha256:ed00852701d795a45e034ccc17a9219a8d373ab574d1eeac060cfdfae5678269",
14
+ "config": "sha256:047e86066dc3d8f985443b140c79fadd633ef8d6ee6df83014f4325eb8438590"
15
15
  },
16
16
  "maintenance": {
17
17
  "repository": "docker.io/adaptframework/ours-maintenance",
18
- "index": "sha256:3248273845f3c7edd61563a1804721a95000f4a2a97af177021271748cf867ca",
19
- "manifest": "sha256:4fa0f00d9966cc617cecb2eecbdbe2e4f86145999c4bd5e81d91a0608eaea8e6",
20
- "config": "sha256:57fd051b7642b12be265ffcd3669c7a2cb5f65f67caf4c64e7ff19418d4b080a"
18
+ "index": "sha256:e1b0ee72900f2aeeb9c5d453f6eef2fbc0079fdb9ba93896431bceee34362226",
19
+ "manifest": "sha256:f4fff6e4cc72daa460ca78c6af6678b236b4afd234e807c6fb214e7985eb6cb6",
20
+ "config": "sha256:44c9e4089633ff38b966a229972c46782104146053ffa63a6f9b381685773026"
21
21
  }
22
22
  },
23
23
  "daemon": {
24
- "policySha256": "bb6373331716a2fa2d0d097f3afe9b8593b43f070612a982a122331fe1d5ee99",
24
+ "policySha256": "15dbd020be72992d2ca2fd1f9601beff4a5c71af83a89359cba007aa3851ef84",
25
25
  "runtime": {
26
26
  "repository": "docker.io/adaptframework/ours-runtime",
27
- "index": "sha256:50d07cb9db7184e10e51387c19f5f96ca31f03590eada78fe6b5676f4e974c8e",
28
- "manifest": "sha256:2bad902bc65f5806e1f8de57414aed99616cfc6eb653a88044adedb84be9fa91",
29
- "config": "sha256:904fdf9cabcf63c406ce101353a0fd92104b79d7623badcf4e580d3e7cdc809d"
27
+ "index": "sha256:dd04732f34365f964bc9aae5e99cd69d702b77e4004e2d11414ee048a9314c50",
28
+ "manifest": "sha256:c13c2eaa8ba092f330d8e0df252a3a81ec015639c43468921634fed13f586782",
29
+ "config": "sha256:f0a3305b7ae1c154fc4c25d5b23551febddea5d1b2d8071211b5b55e38b0a2e7"
30
30
  },
31
31
  "maintenance": {
32
32
  "repository": "docker.io/adaptframework/ours-maintenance",
33
- "index": "sha256:2f3a29656db56b53528db90fe4faf6d384e528ee1bc27facee741b8bd6505a16",
34
- "manifest": "sha256:154acdba94e65c2c4fc3a709e494a2992be51a715f88a049e78600611c8a7868",
35
- "config": "sha256:c471beac206ebc5891776cc36cbd980382d4e77939ca1eaa4b05063adf1d8674"
33
+ "index": "sha256:d2f9df7d6ae70ff3b436b99736162d99c0d4e1fab3af150af61b10be720f2c1e",
34
+ "manifest": "sha256:5e580452ae9ee986370b192d2acdb978b98c5ed1021eb0cab473803f68ba9a60",
35
+ "config": "sha256:0571f4f9576f51930646943ed1933f661f0dec71430514ff946bb67fef29f151"
36
36
  }
37
37
  }
38
38
  }
@@ -13,7 +13,7 @@
13
13
  "@ours.network/codex": "2.0.6",
14
14
  "@ours.network/cowork": "2.0.4",
15
15
  "@ours.network/daemon": "6.1.0",
16
- "@ours.network/fleet": "2.4.3",
16
+ "@ours.network/fleet": "2.4.4",
17
17
  "@ours.network/mcp": "2.0.6",
18
18
  "@ours.network/messenger-server": "2.0.4",
19
19
  "@ours.network/notifications": "1.0.2",
@@ -1070,9 +1070,9 @@
1070
1070
  }
1071
1071
  },
1072
1072
  "node_modules/@ours.network/fleet": {
1073
- "version": "2.4.3",
1074
- "resolved": "https://registry.npmjs.org/@ours.network/fleet/-/fleet-2.4.3.tgz",
1075
- "integrity": "sha512-OQ2sYs1Ra33Uw9FkEI0JHZqeu10zIM5QOvSNVXhjLQrtn/UuidKGQsIKDPnQb/mBqFAom2e8qQ3YH18Qfg+vrw==",
1073
+ "version": "2.4.4",
1074
+ "resolved": "https://registry.npmjs.org/@ours.network/fleet/-/fleet-2.4.4.tgz",
1075
+ "integrity": "sha512-O20pQBtyhC9XSQjFjpV+lwuiLnUIr0/qU4NhnHm8NqVFqsupHLPVz8fGuA6FB0xwupbCng+xMVf9M8Bqlh/qHA==",
1076
1076
  "license": "FSL-1.1-Apache-2.0",
1077
1077
  "dependencies": {
1078
1078
  "@agentclientprotocol/sdk": "^1.3.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "channel": "stable",
4
- "installerVersion": "2.2.2",
4
+ "installerVersion": "2.2.3",
5
5
  "packages": {
6
6
  "@ours.network/sdk": {
7
7
  "version": "6.1.0",
@@ -28,8 +28,8 @@
28
28
  "integrity": "sha512-jqGvgzgyaYVqkROLZyzno6NzQyb6oszXATwmtukQ+ZrHVik86jQHGKvBDwa9ZvOVZEefmm+OhnQoLkXGcA/mwQ=="
29
29
  },
30
30
  "@ours.network/fleet": {
31
- "version": "2.4.3",
32
- "integrity": "sha512-OQ2sYs1Ra33Uw9FkEI0JHZqeu10zIM5QOvSNVXhjLQrtn/UuidKGQsIKDPnQb/mBqFAom2e8qQ3YH18Qfg+vrw=="
31
+ "version": "2.4.4",
32
+ "integrity": "sha512-O20pQBtyhC9XSQjFjpV+lwuiLnUIr0/qU4NhnHm8NqVFqsupHLPVz8fGuA6FB0xwupbCng+xMVf9M8Bqlh/qHA=="
33
33
  },
34
34
  "@ours.network/mcp": {
35
35
  "version": "2.0.6",
@@ -2,7 +2,7 @@
2
2
  "release": {
3
3
  "schema": 1,
4
4
  "channel": "stable",
5
- "installerVersion": "2.2.2",
5
+ "installerVersion": "2.2.3",
6
6
  "packages": {
7
7
  "@ours.network/sdk": {
8
8
  "version": "6.1.0",
@@ -29,8 +29,8 @@
29
29
  "integrity": "sha512-jqGvgzgyaYVqkROLZyzno6NzQyb6oszXATwmtukQ+ZrHVik86jQHGKvBDwa9ZvOVZEefmm+OhnQoLkXGcA/mwQ=="
30
30
  },
31
31
  "@ours.network/fleet": {
32
- "version": "2.4.3",
33
- "integrity": "sha512-OQ2sYs1Ra33Uw9FkEI0JHZqeu10zIM5QOvSNVXhjLQrtn/UuidKGQsIKDPnQb/mBqFAom2e8qQ3YH18Qfg+vrw=="
32
+ "version": "2.4.4",
33
+ "integrity": "sha512-O20pQBtyhC9XSQjFjpV+lwuiLnUIr0/qU4NhnHm8NqVFqsupHLPVz8fGuA6FB0xwupbCng+xMVf9M8Bqlh/qHA=="
34
34
  },
35
35
  "@ours.network/mcp": {
36
36
  "version": "2.0.6",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "@ours.network/fleet": {
89
89
  "type": "npm",
90
- "version": "2.4.3"
90
+ "version": "2.4.4"
91
91
  },
92
92
  "@ours.network/mcp": {
93
93
  "type": "npm",
@@ -36,6 +36,32 @@ export function nativeCodexUnit({ fleetEntry, profile, env = {} }) {
36
36
  + `ExecStart=${unitQuote(process.execPath).replaceAll('$', () => '$$')} ${unitQuote(fleetEntry).replaceAll('$', () => '$$')} participation serve-codex\nRestart=on-failure\nRestartSec=5\n[Install]\nWantedBy=default.target\n`;
37
37
  }
38
38
 
39
+ // Claude Code records a local marketplace by its directory and refuses to add the same name from
40
+ // another one. Every release installs Fleet in a new directory, so an earlier registration of Fleet's
41
+ // marketplace (or its pre-2.4.4 name) is replaced, but only one this installer made: a Fleet contrib
42
+ // directory under ~/.ours-client-install. Any other registration of that name is left alone.
43
+ export const LEGACY_NATIVE_MARKETPLACES = ['ours-fleet-experiment'];
44
+ export async function staleNativeMarketplaces(effects, contrib) {
45
+ let name;
46
+ try { name = JSON.parse(effects.readText(join(contrib, '.claude-plugin', 'marketplace.json')) ?? 'null')?.name; } catch {}
47
+ if (typeof name !== 'string' || !name) throw new Error(`The installed Fleet has no readable Claude marketplace at ${contrib}. Re-run the installer to repair the Fleet installation.`);
48
+ let listed;
49
+ try { listed = JSON.parse((await effects.run('claude', ['plugin', 'marketplace', 'list', '--json'], { timeout: 30_000 })).stdout); }
50
+ catch (error) { throw new Error(`Could not list Claude Code plugin marketplaces: ${installerFailure(error)}. Check that claude runs, then run the installer again.`); }
51
+ if (!Array.isArray(listed)) throw new Error('Claude Code returned an invalid marketplace list. Check that claude runs, then run the installer again.');
52
+ const installs = join(effects.home, '.ours-client-install') + '/';
53
+ const stale = [];
54
+ for (const row of listed) {
55
+ if (row?.name !== name && !LEGACY_NATIVE_MARKETPLACES.includes(row?.name)) continue;
56
+ const path = row.source === 'directory' && typeof row.path === 'string' ? row.path : null;
57
+ if (path === contrib && row.name === name) continue;
58
+ if (!path?.startsWith(installs) || !path.endsWith('/node_modules/@ours.network/fleet/contrib'))
59
+ throw new Error(`Claude Code already has a marketplace named "${row.name}" from ${path ?? row.source ?? 'another source'}, which this installer did not create; it was retained. Remove it with claude plugin marketplace remove ${row.name}, then run the installer again.`);
60
+ stale.push(row.name);
61
+ }
62
+ return { name, stale };
63
+ }
64
+
39
65
  // Called after a complete client installation. Resolve the Human from the same
40
66
  // installed profile; users never need to find or enter an internal CID.
41
67
  export async function setupNativeSessions(command, effects, { fleetBin, cliBin, configPath, integrations }) {
@@ -75,19 +101,23 @@ export async function setupNativeSessions(command, effects, { fleetBin, cliBin,
75
101
  const serviceEnv = Object.fromEntries(['PATH', 'CODEX_HOME', 'OURS_MCP_CONFIG'].filter(key => effects.env[key]).map(key => [key, effects.env[key]]));
76
102
  unit = nativeCodexUnit({ fleetEntry, profile: configPath, env: serviceEnv });
77
103
  }
78
- let settingsPath, generatedHooks;
104
+ let settingsPath, generatedHooks, contrib, marketplace;
79
105
  if (claude) {
80
106
  settingsPath = join(effects.env.CLAUDE_CONFIG_DIR || join(effects.home, '.claude'), 'settings.json');
81
107
  const existing = effects.readText(settingsPath);
82
108
  generatedHooks = JSON.parse((await cli(['participation', 'hooks', 'claude'])).stdout);
83
109
  mergeNativeHooks(existing === null ? {} : JSON.parse(existing), generatedHooks);
110
+ contrib = join(dirname(dirname(fleetEntry)), 'contrib');
111
+ marketplace = await staleNativeMarketplaces(effects, contrib);
84
112
  }
85
113
  // Fleet validates the selected root through the existing daemon. It owns the
86
114
  // participation grant; the installer does not create an identity.
87
115
  await cli(['participation', 'enable', '--human-cid', humanCid, '--authorize-registration-and-wake', ...(codex ? ['--codex'] : [])]);
88
116
  try {
89
117
  if (claude) {
90
- await effects.run('claude', ['plugin', 'install', 'ours-fleet-native', '--marketplace', join(dirname(dirname(fleetEntry)), 'contrib'), '--scope', 'user', '--json']);
118
+ // Removing a marketplace also uninstalls its plugin; the install below adds both back from this release.
119
+ for (const name of marketplace.stale) await effects.run('claude', ['plugin', 'marketplace', 'remove', name, '--json']);
120
+ await effects.run('claude', ['plugin', 'install', 'ours-fleet-native', '--marketplace', contrib, '--scope', 'user', '--json']);
91
121
  // Plugin installation updates enabledPlugins in this same file. Merge into
92
122
  // its current contents so that the newly installed plugin stays enabled.
93
123
  const installed = effects.readText(settingsPath);
@@ -305,7 +305,7 @@ export function planRemoval(found, { home }) {
305
305
  const claude = found.claude;
306
306
  if (claude?.marketplace && !ownedMarketplace(claude.marketplace.path)) kept.push({ group: 'apps', label: `Claude Code marketplace "${CLAUDE_MARKETPLACE}"`, reason: `it points to ${claude.marketplace.path}, which this installer did not create` });
307
307
  else if (claude) {
308
- if (claude.nativePlugin) apps.push({ id: 'claude-native-plugin', group: 'apps', label: 'Fleet terminal plugin in Claude Code', type: 'command', command: ['claude', 'plugin', 'uninstall', 'ours-fleet-native@ours-fleet-experiment', '--scope', 'user'] });
308
+ if (claude.nativePlugin) apps.push({ id: 'claude-native-plugin', group: 'apps', label: 'Fleet terminal plugin in Claude Code', type: 'command', command: ['claude', 'plugin', 'uninstall', claude.nativePlugin, '--scope', 'user'] });
309
309
  if (claude.plugin) apps.push({ id: 'claude-plugin', group: 'apps', label: 'Ours plugin in Claude Code', type: 'command', command: ['claude', 'plugin', 'uninstall', CLAUDE_PLUGIN, '--scope', 'user'] });
310
310
  if (claude.marketplace) apps.push({ id: 'claude-marketplace', group: 'apps', label: 'Ours plugin source in Claude Code', type: 'command', command: ['claude', 'plugin', 'marketplace', 'remove', CLAUDE_MARKETPLACE], after: ['claude-plugin'] });
311
311
  if (claude.settingsEntries?.length) apps.push({ id: 'claude-settings', group: 'apps', label: `Ours entries in ${claude.settingsPath}`, type: 'claude-settings', path: claude.settingsPath, entries: claude.settingsEntries, after: ['claude-plugin', 'claude-marketplace'] });
package/lib/removal.mjs CHANGED
@@ -189,8 +189,10 @@ export async function discoverFootprint(effects, { stateDirs = [], journal = nul
189
189
  }
190
190
  }
191
191
  }
192
- if (nativeHooks && settings?.enabledPlugins && Object.hasOwn(settings.enabledPlugins, 'ours-fleet-native@ours-fleet-experiment'))
193
- settingsEntries.push(['enabledPlugins', 'ours-fleet-native@ours-fleet-experiment']);
192
+ // Fleet's terminal plugin, under its current marketplace name and the pre-2.4.4 one.
193
+ const nativePluginIds = ['ours-fleet-native@ours-fleet', 'ours-fleet-native@ours-fleet-experiment'];
194
+ if (nativeHooks && settings?.enabledPlugins)
195
+ for (const id of nativePluginIds) if (Object.hasOwn(settings.enabledPlugins, id)) settingsEntries.push(['enabledPlugins', id]);
194
196
  const settingsMarketplacePath = settings?.extraKnownMarketplaces?.[CLAUDE_MARKETPLACE]?.source?.path ?? null;
195
197
  let claude = null;
196
198
  try {
@@ -201,7 +203,7 @@ export async function discoverFootprint(effects, { stateDirs = [], journal = nul
201
203
  // Claude Code keeps its copy of the plugin after uninstalling it.
202
204
  const cache = effects.stat(join(home, '.claude', 'plugins', 'cache', 'ours-network'))?.type === 'dir' ? join(home, '.claude', 'plugins', 'cache', 'ours-network') : null;
203
205
  if (plugin || market || settingsEntries.length || cache) {
204
- claude = { plugin: Boolean(plugin), nativePlugin: nativeHooks && plugins.some(p => p?.id === 'ours-fleet-native@ours-fleet-experiment'), marketplace: market || settingsMarketplacePath ? { path: market?.path ?? market?.installLocation ?? settingsMarketplacePath } : null, settingsPath: claudeSettingsPath, settingsEntries, cache };
206
+ claude = { plugin: Boolean(plugin), nativePlugin: nativeHooks ? plugins.find(p => nativePluginIds.includes(p?.id))?.id ?? null : null, marketplace: market || settingsMarketplacePath ? { path: market?.path ?? market?.installLocation ?? settingsMarketplacePath } : null, settingsPath: claudeSettingsPath, settingsEntries, cache };
205
207
  }
206
208
  } catch {
207
209
  if (settingsEntries.length || effects.stat(join(home, '.claude/plugins/cache/ours-network')))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/install",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
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",