@cohesivity/init 0.6.3 → 0.6.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.
Files changed (3) hide show
  1. package/README.md +62 -11
  2. package/bin/cli.js +73 -30
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -22,15 +22,21 @@ Portable directories are staged and atomically replaced.
22
22
  | Claude | `claude plugin marketplace add <verified-local-root> --scope user`, then `claude plugin install cohesivity@cohesivity --scope user` |
23
23
  | Cursor | atomically copy the portable plugin to `~/.cursor/plugins/local/cohesivity` |
24
24
  | Codex | `codex plugin marketplace add <verified-local-marketplace>`, then `codex plugin add cohesivity@cohesivity` |
25
- | Gemini | `gemini extensions install <verified-local-gemini-root> --consent` |
25
+ | Gemini | first run: `gemini extensions install <verified-local-gemini-root> --consent`; rerun: `gemini extensions update cohesivity` |
26
26
  | Antigravity | `agy plugin install <verified-local-root>`; if `agy` is absent, atomically copy to `~/.gemini/config/plugins/cohesivity` only when an Antigravity-specific home is present |
27
- | OpenClaw | `openclaw plugins install <verified-local-portable-root> --force`, then enable `cohesivity` |
27
+ | OpenClaw | install `cohesivity` through the verified Claude marketplace root, enable it, then save the remote Streamable HTTP OAuth MCP |
28
28
  | Hermes | atomically copy to `~/.hermes/plugins/cohesivity`, then `hermes plugins enable cohesivity` |
29
+ | OpenCode | preserve the verified portable package, install its skill to `~/.agents/skills/cohesivity`, then use `opencode mcp add` for the local six-tool server and remote management server |
29
30
 
30
31
  Detection is additive rather than first-match-wins. A Claude home does not stop
31
- Cursor, Codex, Gemini, Antigravity, OpenClaw, or Hermes from also being
32
+ Cursor, Codex, Gemini, Antigravity, OpenClaw, Hermes, or OpenCode from also being
32
33
  configured. A shared `~/.gemini` directory alone is not treated as positive
33
- Antigravity detection.
34
+ Antigravity detection. Claude, Codex, Gemini, OpenClaw, Hermes, OpenCode, and
35
+ fallback adapters require their executable; stale configuration homes are not
36
+ installation evidence. Cursor's client-owned home and Antigravity's documented
37
+ product-specific homes remain positive contracts for their desktop surfaces.
38
+ The measured harness label is attribution only and never selects a delivery
39
+ adapter.
34
40
 
35
41
  Known adapters without a Cohesivity plugin package receive the canonical
36
42
  standalone skill plus the remote MCP endpoint
@@ -40,9 +46,14 @@ Copilot CLI, VS Code, Cline CLI, and Grok. It does not modify JSON, TOML, or YAM
40
46
  configuration with regular expressions.
41
47
 
42
48
  The installer never starts OAuth or opens a browser. It prints the relevant
43
- restart and authentication steps after delivery. Hermes remote MCP OAuth is
44
- qualified: automatic login works only when the endpoint supports Dynamic Client
45
- Registration; otherwise Hermes needs a pre-registered OAuth client.
49
+ restart and authentication steps after delivery. Three MCP surfaces have
50
+ different boundaries: the public documentation server at
51
+ `https://cohesivity.ai/mcp` needs no login, the installed local project-bootstrap
52
+ server needs no login, and `https://cohesivity.ai/mcp/manage` requires OAuth for
53
+ account-scoped management. OpenCode users start that last flow explicitly with
54
+ `opencode mcp auth cohesivity`. Hermes remote MCP OAuth is qualified: automatic
55
+ login works only when the endpoint supports Dynamic Client Registration;
56
+ otherwise Hermes needs a pre-registered OAuth client.
46
57
 
47
58
  ## Standalone skill only
48
59
 
@@ -70,22 +81,22 @@ The manifest schema is:
70
81
  ```json
71
82
  {
72
83
  "schema_version": 1,
73
- "version": "2.1.3",
84
+ "version": "2.1.4",
74
85
  "packages": [
75
86
  {
76
87
  "client": "portable",
77
88
  "immutable_url": "https://immutable.example/portable.tar.gz",
78
89
  "size": 1234,
79
90
  "sha256": "64 lowercase hexadecimal characters",
80
- "archive": "cohesivity-portable-2.1.3.tar.gz"
91
+ "archive": "cohesivity-portable-2.1.4.tar.gz"
81
92
  }
82
93
  ]
83
94
  }
84
95
  ```
85
96
 
86
- The installer maps Claude to `claude`; Cursor, OpenClaw, and Hermes to
97
+ The installer maps Claude and OpenClaw to `claude`; Cursor and Hermes to
87
98
  `portable`; Codex to `codex`; Gemini to `gemini`; and Antigravity to
88
- `antigravity`. The 2.1.3 manifest also carries the direct `openai` package,
99
+ `antigravity`. The 2.1.4 manifest also carries the direct `openai` package,
89
100
  which this marketplace-based Codex installer does not select. Extraction
90
101
  rejects absolute paths, traversal, links, duplicate paths, special files,
91
102
  malformed headers, oversized content, and archives without an end marker.
@@ -154,6 +165,46 @@ server-issued, and not derived from hardware or user data. Delete
154
165
  | `--base <url>` | API base for tenant bootstrap (default `https://cohesivity.ai`) |
155
166
  | `-h`, `--help` | show command help and the exact package version |
156
167
 
168
+ ## 0.6.5 OpenCode and repeat-safe Gemini delivery
169
+
170
+ Version 0.6.5 recognizes OpenCode only from its executable, preserves the
171
+ verified portable package under the Cohesivity data directory, installs the
172
+ canonical skill in OpenCode's documented global `~/.agents/skills` surface, and
173
+ uses OpenCode's native noninteractive `mcp add` commands for both the local
174
+ six-tool server and exact remote management endpoint. Reruns replace those
175
+ entries structurally through OpenCode's own JSONC-aware config writer and never
176
+ start OAuth.
177
+
178
+ Gemini now installs the extension on the first run and uses
179
+ `gemini extensions update cohesivity` once the native installed-extension
180
+ directory exists. Both child commands scope `GEMINI_CLI_TRUST_WORKSPACE=true`
181
+ to that process, so a repeat run succeeds without writing a persistent broad
182
+ workspace-trust setting. Stale client configuration homes no longer count as
183
+ installed executable-backed clients.
184
+
185
+ ## 0.6.4 durable native marketplaces
186
+
187
+ Version 0.6.4 copies each verified native-client package to
188
+ `${XDG_DATA_HOME:-~/.local/share}/cohesivity/plugin-packages/<client>` before
189
+ invoking Claude, Codex, Gemini, Antigravity, or OpenClaw. Those clients may
190
+ retain the source path in their marketplace or extension configuration, so the
191
+ installer never points them at extraction directories it deletes on exit.
192
+ It pins Cohesivity plugin 2.1.4 and accepts Gemini's native workspace trust
193
+ prompt only for the extension-install child process without writing a global
194
+ trust override.
195
+
196
+ OpenClaw receives the verified Claude marketplace bundle through its documented
197
+ marketplace adapter, which preserves the `cohesivity` identity and projects the
198
+ skill and local MCP server. The installer also saves the remote server through
199
+ `openclaw mcp set` with Streamable HTTP and OAuth, without starting login.
200
+
201
+ Hermes qualifies portable MCP server names from the discovered install
202
+ identity. On restart, copy the exact qualified remote name Hermes reports into
203
+ a native `mcp_servers` owner override that repeats the Cohesivity URL and sets
204
+ `auth: oauth`, then run `hermes mcp login <qualified-server-name>`. Do not use
205
+ the unqualified package name; Hermes owner config replaces rather than augments
206
+ the portable entry.
207
+
157
208
  ## 0.6.3 MCP release metadata
158
209
 
159
210
  Version 0.6.3 pins Cohesivity plugin 2.1.3. Its local MCP initialization,
package/bin/cli.js CHANGED
@@ -44,7 +44,7 @@ import { gunzipSync } from 'node:zlib';
44
44
  const argv = process.argv.slice(2);
45
45
  const has = (f) => argv.includes(f);
46
46
  const flag = (f) => { const i = argv.indexOf(f); return i >= 0 ? argv[i + 1] : undefined; };
47
- const PKG_VERSION = '0.6.3';
47
+ const PKG_VERSION = '0.6.5';
48
48
 
49
49
  function validateArgs() {
50
50
  const switches = new Set(['--dry-run', '--no-plugin', '--no-branding', '--help', '-h']);
@@ -85,9 +85,9 @@ const SKILL_URL = `https://raw.githubusercontent.com/cohesivity-org/cohesivity-s
85
85
  // after publishing a new two-commit artifact manifest from cohesivity-plugin.
86
86
  // Tests inject a complete pin with COHESIVITY_PLUGIN_MANIFEST_PIN.
87
87
  const PLUGIN_RELEASE = Object.freeze({
88
- manifestUrl: 'https://raw.githubusercontent.com/cohesivity-org/cohesivity-plugin/d773c73bbc140aefdbe5610b3b2d1c8143fad792/artifacts/v2.1.3/install-manifest.v1.json',
88
+ manifestUrl: 'https://raw.githubusercontent.com/cohesivity-org/cohesivity-plugin/e5d59973bb0b2f8608085e3d54b879d5d6ed1564/artifacts/v2.1.4/install-manifest.v1.json',
89
89
  manifestBytes: 9610,
90
- manifestSha256: '52642c8326edf9543eb05b52d2384fb569c11c29eec29812fe9915ed44e7e84a',
90
+ manifestSha256: '5cd548a006cab71bf482209ead27b15ed0a42ec13c69a8c8efdf051a23cf9b4b',
91
91
  });
92
92
 
93
93
  const ARTIFACT_KEYS = Object.freeze({
@@ -176,6 +176,8 @@ async function main() {
176
176
  // ── 1) detect clients and deliver verified integrations ──────────────────────
177
177
  const HOME = homedir();
178
178
  const CODEX_HOME = process.env.CODEX_HOME || join(HOME, '.codex');
179
+ const DATA_HOME = process.env.XDG_DATA_HOME || join(HOME, '.local', 'share');
180
+ const DURABLE_PLUGIN_ROOT = join(DATA_HOME, 'cohesivity', 'plugin-packages');
179
181
  const CANONICAL_SKILL_DIR = join(HOME, '.agents', 'skills', 'cohesivity');
180
182
  const POSITIVE_ANTIGRAVITY_HOMES = [
181
183
  join(HOME, '.gemini', 'antigravity'),
@@ -211,37 +213,38 @@ function detectClients() {
211
213
  antigravity: executable(['agy']),
212
214
  openclaw: executable(['openclaw']),
213
215
  hermes: executable(['hermes']),
216
+ opencode: executable(['opencode']),
214
217
  };
215
- const harnessIs = (...names) => names.includes(HARNESS);
216
218
  return [
217
- { id: 'claude', name: 'Claude', bin: bins.claude, detected: Boolean(bins.claude || existsSync(join(HOME, '.claude')) || harnessIs('claude')), artifact: ARTIFACT_KEYS.claude },
218
- { id: 'cursor', name: 'Cursor', bin: bins.cursor, detected: Boolean(bins.cursor || existsSync(join(HOME, '.cursor')) || harnessIs('cursor', 'cursor-agent')), artifact: ARTIFACT_KEYS.portable },
219
- { id: 'codex', name: 'Codex', bin: bins.codex, detected: Boolean(bins.codex || existsSync(CODEX_HOME) || harnessIs('codex')), artifact: ARTIFACT_KEYS.codex },
219
+ { id: 'claude', name: 'Claude', bin: bins.claude, detected: Boolean(bins.claude), artifact: ARTIFACT_KEYS.claude },
220
+ { id: 'cursor', name: 'Cursor', bin: bins.cursor, detected: Boolean(bins.cursor || existsSync(join(HOME, '.cursor'))), artifact: ARTIFACT_KEYS.portable },
221
+ { id: 'codex', name: 'Codex', bin: bins.codex, detected: Boolean(bins.codex), artifact: ARTIFACT_KEYS.codex },
220
222
  {
221
223
  id: 'gemini', name: 'Gemini', bin: bins.gemini,
222
- detected: Boolean(bins.gemini || hasAny([join(HOME, '.gemini', 'settings.json'), join(HOME, '.gemini', 'extensions')]) || harnessIs('gemini')),
224
+ detected: Boolean(bins.gemini),
223
225
  artifact: ARTIFACT_KEYS.gemini,
224
226
  },
225
227
  {
226
228
  id: 'antigravity', name: 'Antigravity', bin: bins.antigravity,
227
- detected: Boolean(bins.antigravity || hasAny(POSITIVE_ANTIGRAVITY_HOMES) || harnessIs('agy', 'antigravity')), artifact: ARTIFACT_KEYS.antigravity,
229
+ detected: Boolean(bins.antigravity || hasAny(POSITIVE_ANTIGRAVITY_HOMES)), artifact: ARTIFACT_KEYS.antigravity,
228
230
  },
229
- { id: 'openclaw', name: 'OpenClaw', bin: bins.openclaw, detected: Boolean(bins.openclaw || existsSync(join(HOME, '.openclaw')) || harnessIs('openclaw')), artifact: ARTIFACT_KEYS.portable },
230
- { id: 'hermes', name: 'Hermes', bin: bins.hermes, detected: Boolean(bins.hermes || existsSync(join(HOME, '.hermes')) || harnessIs('hermes')), artifact: ARTIFACT_KEYS.portable },
231
+ { id: 'openclaw', name: 'OpenClaw', bin: bins.openclaw, detected: Boolean(bins.openclaw), artifact: ARTIFACT_KEYS.claude },
232
+ { id: 'hermes', name: 'Hermes', bin: bins.hermes, detected: Boolean(bins.hermes), artifact: ARTIFACT_KEYS.portable },
233
+ { id: 'opencode', name: 'OpenCode', bin: bins.opencode, detected: Boolean(bins.opencode), artifact: ARTIFACT_KEYS.portable },
231
234
  ].filter((client) => client.detected);
232
235
  }
233
236
 
234
237
  const FALLBACK_ADAPTERS = [
235
- { id: 'copilot', name: 'GitHub Copilot CLI', homes: [join(HOME, '.copilot')], bins: ['copilot'], args: [
238
+ { id: 'copilot', name: 'GitHub Copilot CLI', bins: ['copilot'], args: [
236
239
  'mcp', 'add', '--transport', 'http', 'cohesivity', MCP_URL,
237
240
  ] },
238
- { id: 'vscode', name: 'VS Code', homes: [join(HOME, '.vscode')], bins: ['code'], args: [
241
+ { id: 'vscode', name: 'VS Code', bins: ['code'], args: [
239
242
  '--add-mcp', JSON.stringify({ name: 'cohesivity', type: 'http', url: MCP_URL }),
240
243
  ] },
241
- { id: 'cline', name: 'Cline CLI', homes: [join(HOME, '.cline')], bins: ['cline'], args: [
244
+ { id: 'cline', name: 'Cline CLI', bins: ['cline'], args: [
242
245
  'mcp', 'add', 'cohesivity', MCP_URL, '--type', 'http',
243
246
  ] },
244
- { id: 'grok', name: 'Grok', homes: [join(HOME, '.grok')], bins: ['grok'], args: [
247
+ { id: 'grok', name: 'Grok', bins: ['grok'], args: [
245
248
  'mcp', 'add', '--transport', 'http', 'cohesivity', MCP_URL,
246
249
  ] },
247
250
  ];
@@ -249,7 +252,7 @@ const FALLBACK_ADAPTERS = [
249
252
  function detectFallbackAdapters() {
250
253
  return FALLBACK_ADAPTERS.map((adapter) => {
251
254
  const bin = executable(adapter.bins);
252
- return { ...adapter, bin, detected: Boolean(bin || hasAny(adapter.homes) || adapter.bins.includes(HARNESS)) };
255
+ return { ...adapter, bin, detected: Boolean(bin) };
253
256
  }).filter((adapter) => adapter.detected);
254
257
  }
255
258
 
@@ -507,10 +510,15 @@ function resolveInside(root, path) {
507
510
  async function installForClient(client, artifact) {
508
511
  if (!artifact) throw new Error(`verified ${client.artifact} artifact is unavailable`);
509
512
  const root = artifact.root;
513
+ const nativeSource = ['claude', 'codex', 'gemini', 'openclaw', 'opencode'].includes(client.id)
514
+ || (client.id === 'antigravity' && client.bin)
515
+ ? join(DURABLE_PLUGIN_ROOT, client.id)
516
+ : root;
517
+ if (nativeSource !== root) installDirectoryAtomically(root, nativeSource);
510
518
  switch (client.id) {
511
519
  case 'claude':
512
520
  requireClientCli(client);
513
- runNative(client.bin, ['plugin', 'marketplace', 'add', root, '--scope', 'user']);
521
+ runNative(client.bin, ['plugin', 'marketplace', 'add', nativeSource, '--scope', 'user']);
514
522
  runNative(client.bin, ['plugin', 'install', 'cohesivity@cohesivity', '--scope', 'user']);
515
523
  break;
516
524
  case 'cursor':
@@ -518,29 +526,49 @@ async function installForClient(client, artifact) {
518
526
  break;
519
527
  case 'codex':
520
528
  requireClientCli(client);
521
- runNative(client.bin, ['plugin', 'marketplace', 'add', root]);
529
+ runNative(client.bin, ['plugin', 'marketplace', 'add', nativeSource]);
522
530
  runNative(client.bin, ['plugin', 'add', 'cohesivity@cohesivity']);
523
531
  break;
524
532
  case 'gemini':
525
533
  requireClientCli(client);
526
- runNative(client.bin, ['extensions', 'install', root, '--consent']);
534
+ runNative(client.bin, existsSync(join(HOME, '.gemini', 'extensions', 'cohesivity'))
535
+ ? ['extensions', 'update', 'cohesivity']
536
+ : ['extensions', 'install', nativeSource, '--consent'], {
537
+ ...process.env,
538
+ GEMINI_CLI_TRUST_WORKSPACE: 'true',
539
+ });
527
540
  break;
528
541
  case 'antigravity':
529
- if (client.bin) runNative(client.bin, ['plugin', 'install', root]);
542
+ if (client.bin) runNative(client.bin, ['plugin', 'install', nativeSource]);
530
543
  else if (hasAny(POSITIVE_ANTIGRAVITY_HOMES)) {
531
544
  installDirectoryAtomically(root, join(HOME, '.gemini', 'config', 'plugins', 'cohesivity'));
532
545
  } else throw new Error('Antigravity CLI is not on PATH and no positive Antigravity home was found');
533
546
  break;
534
547
  case 'openclaw':
535
548
  requireClientCli(client);
536
- runNative(client.bin, ['plugins', 'install', root, '--force']);
549
+ runNative(client.bin, ['plugins', 'install', 'cohesivity', '--marketplace', nativeSource, '--force']);
537
550
  runNative(client.bin, ['plugins', 'enable', 'cohesivity']);
551
+ runNative(client.bin, ['mcp', 'set', 'cohesivity', JSON.stringify({
552
+ url: MCP_URL,
553
+ transport: 'streamable-http',
554
+ auth: 'oauth',
555
+ })]);
538
556
  break;
539
557
  case 'hermes':
540
558
  installDirectoryAtomically(root, join(HOME, '.hermes', 'plugins', 'cohesivity'));
541
559
  requireClientCli(client);
542
560
  runNative(client.bin, ['plugins', 'enable', 'cohesivity']);
543
561
  break;
562
+ case 'opencode': {
563
+ requireClientCli(client);
564
+ const skill = join(nativeSource, 'skills', 'cohesivity', 'SKILL.md');
565
+ const localServer = join(nativeSource, 'mcp', 'project-bootstrap.mjs');
566
+ if (!existsSync(skill) || !existsSync(localServer)) throw new Error('verified portable artifact is missing its OpenCode skill or local MCP server');
567
+ installFileAtomically(join(CANONICAL_SKILL_DIR, 'SKILL.md'), readFileSync(skill, 'utf8'));
568
+ runNative(client.bin, ['mcp', 'add', 'cohesivity-local', '--', 'node', localServer]);
569
+ runNative(client.bin, ['mcp', 'add', 'cohesivity', '--url', MCP_URL]);
570
+ break;
571
+ }
544
572
  default:
545
573
  throw new Error(`unknown client ${client.id}`);
546
574
  }
@@ -550,8 +578,8 @@ function requireClientCli(client) {
550
578
  if (!client.bin) throw new Error('client state exists but its native CLI is not on PATH');
551
579
  }
552
580
 
553
- function runNative(command, args) {
554
- const result = spawnSync(command, args, { cwd: CWD, encoding: 'utf8', env: process.env, shell: false, timeout: 120000 });
581
+ function runNative(command, args, env = process.env) {
582
+ const result = spawnSync(command, args, { cwd: CWD, encoding: 'utf8', env, shell: false, timeout: 120000 });
555
583
  if (result.error) throw new Error(`${formatCommand(command, args)} failed (${result.error.message})`);
556
584
  if (result.status !== 0) {
557
585
  const detail = String(result.stderr || result.stdout || '').trim().replace(/\s+/g, ' ').slice(0, 300);
@@ -612,26 +640,40 @@ function describeDryRunPluginDelivery(clients) {
612
640
  }
613
641
  for (const client of clients) {
614
642
  const root = `<verified:${client.artifact}>`;
643
+ const nativeRoot = displayPath(join(DURABLE_PLUGIN_ROOT, client.id));
615
644
  if (client.id === 'claude') {
616
- act(`run ${formatCommand(client.bin || 'claude', ['plugin', 'marketplace', 'add', root, '--scope', 'user'])}`);
645
+ act(`atomically replace ${nativeRoot} from ${root}`);
646
+ act(`run ${formatCommand(client.bin || 'claude', ['plugin', 'marketplace', 'add', nativeRoot, '--scope', 'user'])}`);
617
647
  act(`run ${formatCommand(client.bin || 'claude', ['plugin', 'install', 'cohesivity@cohesivity', '--scope', 'user'])}`);
618
648
  } else if (client.id === 'cursor') {
619
649
  act(`atomically replace ${displayPath(join(HOME, '.cursor', 'plugins', 'local', 'cohesivity'))} from ${root}`);
620
650
  } else if (client.id === 'codex') {
621
- act(`run ${formatCommand(client.bin || 'codex', ['plugin', 'marketplace', 'add', root])}`);
651
+ act(`atomically replace ${nativeRoot} from ${root}`);
652
+ act(`run ${formatCommand(client.bin || 'codex', ['plugin', 'marketplace', 'add', nativeRoot])}`);
622
653
  act(`run ${formatCommand(client.bin || 'codex', ['plugin', 'add', 'cohesivity@cohesivity'])}`);
623
654
  } else if (client.id === 'gemini') {
624
- act(`run ${formatCommand(client.bin || 'gemini', ['extensions', 'install', root, '--consent'])}`);
655
+ act(`atomically replace ${nativeRoot} from ${root}`);
656
+ act(`run ${formatCommand(client.bin || 'gemini', existsSync(join(HOME, '.gemini', 'extensions', 'cohesivity'))
657
+ ? ['extensions', 'update', 'cohesivity']
658
+ : ['extensions', 'install', nativeRoot, '--consent'])}`);
625
659
  } else if (client.id === 'antigravity' && client.bin) {
626
- act(`run ${formatCommand(client.bin, ['plugin', 'install', root])}`);
660
+ act(`atomically replace ${nativeRoot} from ${root}`);
661
+ act(`run ${formatCommand(client.bin, ['plugin', 'install', nativeRoot])}`);
627
662
  } else if (client.id === 'antigravity') {
628
663
  act(`atomically replace ${displayPath(join(HOME, '.gemini', 'config', 'plugins', 'cohesivity'))} from ${root}`);
629
664
  } else if (client.id === 'openclaw') {
630
- act(`run ${formatCommand(client.bin || 'openclaw', ['plugins', 'install', root, '--force'])}`);
665
+ act(`atomically replace ${nativeRoot} from ${root}`);
666
+ act(`run ${formatCommand(client.bin || 'openclaw', ['plugins', 'install', 'cohesivity', '--marketplace', nativeRoot, '--force'])}`);
631
667
  act(`run ${formatCommand(client.bin || 'openclaw', ['plugins', 'enable', 'cohesivity'])}`);
668
+ act(`run ${formatCommand(client.bin || 'openclaw', ['mcp', 'set', 'cohesivity', JSON.stringify({ url: MCP_URL, transport: 'streamable-http', auth: 'oauth' })])}`);
632
669
  } else if (client.id === 'hermes') {
633
670
  act(`atomically replace ${displayPath(join(HOME, '.hermes', 'plugins', 'cohesivity'))} from ${root}`);
634
671
  act(`run ${formatCommand(client.bin || 'hermes', ['plugins', 'enable', 'cohesivity'])}`);
672
+ } else if (client.id === 'opencode') {
673
+ act(`atomically replace ${nativeRoot} from ${root}`);
674
+ act(`atomically install ${displayPath(join(CANONICAL_SKILL_DIR, 'SKILL.md'))} from ${nativeRoot}`);
675
+ act(`run ${formatCommand(client.bin || 'opencode', ['mcp', 'add', 'cohesivity-local', '--', 'node', join(DURABLE_PLUGIN_ROOT, 'opencode', 'mcp', 'project-bootstrap.mjs')])}`);
676
+ act(`run ${formatCommand(client.bin || 'opencode', ['mcp', 'add', 'cohesivity', '--url', MCP_URL])}`);
635
677
  }
636
678
  }
637
679
  }
@@ -648,7 +690,8 @@ function printClientInstructions(clients, adapters) {
648
690
  gemini: 'Gemini: restart the CLI, then run /mcp auth cohesivity if authentication is required.',
649
691
  antigravity: 'Antigravity: restart, open /mcp (or Installed MCP Servers), and authenticate Cohesivity.',
650
692
  openclaw: 'OpenClaw: restart the Gateway if it did not auto-restart, then run openclaw mcp login cohesivity.',
651
- hermes: 'Hermes: restart, then run hermes mcp login cohesivity from a fresh terminal. OAuth works only when the endpoint supports Dynamic Client Registration; otherwise Hermes needs a pre-registered OAuth client.',
693
+ hermes: 'Hermes: restart, copy the exact qualified remote server name Hermes reports into a native mcp_servers owner override that repeats the URL and sets auth: oauth, then run hermes mcp login <qualified-server-name>. Dynamic Client Registration must be supported; otherwise Hermes needs a pre-registered OAuth client.',
694
+ opencode: 'OpenCode: restart the client; the local bootstrap tools need no login, and opencode mcp auth cohesivity starts OAuth only when management tools are needed.',
652
695
  }[client.id];
653
696
  console.log(` - ${instruction}`);
654
697
  }
@@ -853,7 +896,7 @@ Options:
853
896
  -h, --help show this help
854
897
 
855
898
  What it does:
856
- 1. Detects Claude, Cursor, Codex, Gemini, Antigravity, OpenClaw, and Hermes
899
+ 1. Detects Claude, Cursor, Codex, Gemini, Antigravity, OpenClaw, Hermes, and OpenCode
857
900
  independently and installs each client's native or portable plugin package
858
901
  (known adapters without a plugin receive the standalone skill plus MCP)
859
902
  2. Creates or reuses a project tenant -> ./.cohesivity (gitignored)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cohesivity/init",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Set up Cohesivity in a project: install the agent skill, create a managed backend tenant, write the project config. Run with `npx @cohesivity/init`.",
5
5
  "type": "module",
6
6
  "bin": {