@cohesivity/init 0.6.3 → 0.6.4
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 +28 -5
- package/bin/cli.js +39 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Portable directories are staged and atomically replaced.
|
|
|
24
24
|
| Codex | `codex plugin marketplace add <verified-local-marketplace>`, then `codex plugin add cohesivity@cohesivity` |
|
|
25
25
|
| Gemini | `gemini extensions install <verified-local-gemini-root> --consent` |
|
|
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 | `
|
|
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
29
|
|
|
30
30
|
Detection is additive rather than first-match-wins. A Claude home does not stop
|
|
@@ -70,22 +70,22 @@ The manifest schema is:
|
|
|
70
70
|
```json
|
|
71
71
|
{
|
|
72
72
|
"schema_version": 1,
|
|
73
|
-
"version": "2.1.
|
|
73
|
+
"version": "2.1.4",
|
|
74
74
|
"packages": [
|
|
75
75
|
{
|
|
76
76
|
"client": "portable",
|
|
77
77
|
"immutable_url": "https://immutable.example/portable.tar.gz",
|
|
78
78
|
"size": 1234,
|
|
79
79
|
"sha256": "64 lowercase hexadecimal characters",
|
|
80
|
-
"archive": "cohesivity-portable-2.1.
|
|
80
|
+
"archive": "cohesivity-portable-2.1.4.tar.gz"
|
|
81
81
|
}
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
The installer maps Claude to `claude`; Cursor
|
|
86
|
+
The installer maps Claude and OpenClaw to `claude`; Cursor and Hermes to
|
|
87
87
|
`portable`; Codex to `codex`; Gemini to `gemini`; and Antigravity to
|
|
88
|
-
`antigravity`. The 2.1.
|
|
88
|
+
`antigravity`. The 2.1.4 manifest also carries the direct `openai` package,
|
|
89
89
|
which this marketplace-based Codex installer does not select. Extraction
|
|
90
90
|
rejects absolute paths, traversal, links, duplicate paths, special files,
|
|
91
91
|
malformed headers, oversized content, and archives without an end marker.
|
|
@@ -154,6 +154,29 @@ server-issued, and not derived from hardware or user data. Delete
|
|
|
154
154
|
| `--base <url>` | API base for tenant bootstrap (default `https://cohesivity.ai`) |
|
|
155
155
|
| `-h`, `--help` | show command help and the exact package version |
|
|
156
156
|
|
|
157
|
+
## 0.6.4 durable native marketplaces
|
|
158
|
+
|
|
159
|
+
Version 0.6.4 copies each verified native-client package to
|
|
160
|
+
`${XDG_DATA_HOME:-~/.local/share}/cohesivity/plugin-packages/<client>` before
|
|
161
|
+
invoking Claude, Codex, Gemini, Antigravity, or OpenClaw. Those clients may
|
|
162
|
+
retain the source path in their marketplace or extension configuration, so the
|
|
163
|
+
installer never points them at extraction directories it deletes on exit.
|
|
164
|
+
It pins Cohesivity plugin 2.1.4 and accepts Gemini's native workspace trust
|
|
165
|
+
prompt only for the extension-install child process without writing a global
|
|
166
|
+
trust override.
|
|
167
|
+
|
|
168
|
+
OpenClaw receives the verified Claude marketplace bundle through its documented
|
|
169
|
+
marketplace adapter, which preserves the `cohesivity` identity and projects the
|
|
170
|
+
skill and local MCP server. The installer also saves the remote server through
|
|
171
|
+
`openclaw mcp set` with Streamable HTTP and OAuth, without starting login.
|
|
172
|
+
|
|
173
|
+
Hermes qualifies portable MCP server names from the discovered install
|
|
174
|
+
identity. On restart, copy the exact qualified remote name Hermes reports into
|
|
175
|
+
a native `mcp_servers` owner override that repeats the Cohesivity URL and sets
|
|
176
|
+
`auth: oauth`, then run `hermes mcp login <qualified-server-name>`. Do not use
|
|
177
|
+
the unqualified package name; Hermes owner config replaces rather than augments
|
|
178
|
+
the portable entry.
|
|
179
|
+
|
|
157
180
|
## 0.6.3 MCP release metadata
|
|
158
181
|
|
|
159
182
|
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.
|
|
47
|
+
const PKG_VERSION = '0.6.4';
|
|
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/
|
|
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: '
|
|
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'),
|
|
@@ -226,7 +228,7 @@ function detectClients() {
|
|
|
226
228
|
id: 'antigravity', name: 'Antigravity', bin: bins.antigravity,
|
|
227
229
|
detected: Boolean(bins.antigravity || hasAny(POSITIVE_ANTIGRAVITY_HOMES) || harnessIs('agy', 'antigravity')), 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.
|
|
231
|
+
{ id: 'openclaw', name: 'OpenClaw', bin: bins.openclaw, detected: Boolean(bins.openclaw || existsSync(join(HOME, '.openclaw')) || harnessIs('openclaw')), artifact: ARTIFACT_KEYS.claude },
|
|
230
232
|
{ id: 'hermes', name: 'Hermes', bin: bins.hermes, detected: Boolean(bins.hermes || existsSync(join(HOME, '.hermes')) || harnessIs('hermes')), artifact: ARTIFACT_KEYS.portable },
|
|
231
233
|
].filter((client) => client.detected);
|
|
232
234
|
}
|
|
@@ -507,10 +509,15 @@ function resolveInside(root, path) {
|
|
|
507
509
|
async function installForClient(client, artifact) {
|
|
508
510
|
if (!artifact) throw new Error(`verified ${client.artifact} artifact is unavailable`);
|
|
509
511
|
const root = artifact.root;
|
|
512
|
+
const nativeSource = ['claude', 'codex', 'gemini', 'openclaw'].includes(client.id)
|
|
513
|
+
|| (client.id === 'antigravity' && client.bin)
|
|
514
|
+
? join(DURABLE_PLUGIN_ROOT, client.id)
|
|
515
|
+
: root;
|
|
516
|
+
if (nativeSource !== root) installDirectoryAtomically(root, nativeSource);
|
|
510
517
|
switch (client.id) {
|
|
511
518
|
case 'claude':
|
|
512
519
|
requireClientCli(client);
|
|
513
|
-
runNative(client.bin, ['plugin', 'marketplace', 'add',
|
|
520
|
+
runNative(client.bin, ['plugin', 'marketplace', 'add', nativeSource, '--scope', 'user']);
|
|
514
521
|
runNative(client.bin, ['plugin', 'install', 'cohesivity@cohesivity', '--scope', 'user']);
|
|
515
522
|
break;
|
|
516
523
|
case 'cursor':
|
|
@@ -518,23 +525,31 @@ async function installForClient(client, artifact) {
|
|
|
518
525
|
break;
|
|
519
526
|
case 'codex':
|
|
520
527
|
requireClientCli(client);
|
|
521
|
-
runNative(client.bin, ['plugin', 'marketplace', 'add',
|
|
528
|
+
runNative(client.bin, ['plugin', 'marketplace', 'add', nativeSource]);
|
|
522
529
|
runNative(client.bin, ['plugin', 'add', 'cohesivity@cohesivity']);
|
|
523
530
|
break;
|
|
524
531
|
case 'gemini':
|
|
525
532
|
requireClientCli(client);
|
|
526
|
-
runNative(client.bin, ['extensions', 'install',
|
|
533
|
+
runNative(client.bin, ['extensions', 'install', nativeSource, '--consent'], {
|
|
534
|
+
...process.env,
|
|
535
|
+
GEMINI_CLI_TRUST_WORKSPACE: 'true',
|
|
536
|
+
});
|
|
527
537
|
break;
|
|
528
538
|
case 'antigravity':
|
|
529
|
-
if (client.bin) runNative(client.bin, ['plugin', 'install',
|
|
539
|
+
if (client.bin) runNative(client.bin, ['plugin', 'install', nativeSource]);
|
|
530
540
|
else if (hasAny(POSITIVE_ANTIGRAVITY_HOMES)) {
|
|
531
541
|
installDirectoryAtomically(root, join(HOME, '.gemini', 'config', 'plugins', 'cohesivity'));
|
|
532
542
|
} else throw new Error('Antigravity CLI is not on PATH and no positive Antigravity home was found');
|
|
533
543
|
break;
|
|
534
544
|
case 'openclaw':
|
|
535
545
|
requireClientCli(client);
|
|
536
|
-
runNative(client.bin, ['plugins', 'install',
|
|
546
|
+
runNative(client.bin, ['plugins', 'install', 'cohesivity', '--marketplace', nativeSource, '--force']);
|
|
537
547
|
runNative(client.bin, ['plugins', 'enable', 'cohesivity']);
|
|
548
|
+
runNative(client.bin, ['mcp', 'set', 'cohesivity', JSON.stringify({
|
|
549
|
+
url: MCP_URL,
|
|
550
|
+
transport: 'streamable-http',
|
|
551
|
+
auth: 'oauth',
|
|
552
|
+
})]);
|
|
538
553
|
break;
|
|
539
554
|
case 'hermes':
|
|
540
555
|
installDirectoryAtomically(root, join(HOME, '.hermes', 'plugins', 'cohesivity'));
|
|
@@ -550,8 +565,8 @@ function requireClientCli(client) {
|
|
|
550
565
|
if (!client.bin) throw new Error('client state exists but its native CLI is not on PATH');
|
|
551
566
|
}
|
|
552
567
|
|
|
553
|
-
function runNative(command, args) {
|
|
554
|
-
const result = spawnSync(command, args, { cwd: CWD, encoding: 'utf8', env
|
|
568
|
+
function runNative(command, args, env = process.env) {
|
|
569
|
+
const result = spawnSync(command, args, { cwd: CWD, encoding: 'utf8', env, shell: false, timeout: 120000 });
|
|
555
570
|
if (result.error) throw new Error(`${formatCommand(command, args)} failed (${result.error.message})`);
|
|
556
571
|
if (result.status !== 0) {
|
|
557
572
|
const detail = String(result.stderr || result.stdout || '').trim().replace(/\s+/g, ' ').slice(0, 300);
|
|
@@ -612,23 +627,30 @@ function describeDryRunPluginDelivery(clients) {
|
|
|
612
627
|
}
|
|
613
628
|
for (const client of clients) {
|
|
614
629
|
const root = `<verified:${client.artifact}>`;
|
|
630
|
+
const nativeRoot = displayPath(join(DURABLE_PLUGIN_ROOT, client.id));
|
|
615
631
|
if (client.id === 'claude') {
|
|
616
|
-
act(`
|
|
632
|
+
act(`atomically replace ${nativeRoot} from ${root}`);
|
|
633
|
+
act(`run ${formatCommand(client.bin || 'claude', ['plugin', 'marketplace', 'add', nativeRoot, '--scope', 'user'])}`);
|
|
617
634
|
act(`run ${formatCommand(client.bin || 'claude', ['plugin', 'install', 'cohesivity@cohesivity', '--scope', 'user'])}`);
|
|
618
635
|
} else if (client.id === 'cursor') {
|
|
619
636
|
act(`atomically replace ${displayPath(join(HOME, '.cursor', 'plugins', 'local', 'cohesivity'))} from ${root}`);
|
|
620
637
|
} else if (client.id === 'codex') {
|
|
621
|
-
act(`
|
|
638
|
+
act(`atomically replace ${nativeRoot} from ${root}`);
|
|
639
|
+
act(`run ${formatCommand(client.bin || 'codex', ['plugin', 'marketplace', 'add', nativeRoot])}`);
|
|
622
640
|
act(`run ${formatCommand(client.bin || 'codex', ['plugin', 'add', 'cohesivity@cohesivity'])}`);
|
|
623
641
|
} else if (client.id === 'gemini') {
|
|
624
|
-
act(`
|
|
642
|
+
act(`atomically replace ${nativeRoot} from ${root}`);
|
|
643
|
+
act(`run ${formatCommand(client.bin || 'gemini', ['extensions', 'install', nativeRoot, '--consent'])}`);
|
|
625
644
|
} else if (client.id === 'antigravity' && client.bin) {
|
|
626
|
-
act(`
|
|
645
|
+
act(`atomically replace ${nativeRoot} from ${root}`);
|
|
646
|
+
act(`run ${formatCommand(client.bin, ['plugin', 'install', nativeRoot])}`);
|
|
627
647
|
} else if (client.id === 'antigravity') {
|
|
628
648
|
act(`atomically replace ${displayPath(join(HOME, '.gemini', 'config', 'plugins', 'cohesivity'))} from ${root}`);
|
|
629
649
|
} else if (client.id === 'openclaw') {
|
|
630
|
-
act(`
|
|
650
|
+
act(`atomically replace ${nativeRoot} from ${root}`);
|
|
651
|
+
act(`run ${formatCommand(client.bin || 'openclaw', ['plugins', 'install', 'cohesivity', '--marketplace', nativeRoot, '--force'])}`);
|
|
631
652
|
act(`run ${formatCommand(client.bin || 'openclaw', ['plugins', 'enable', 'cohesivity'])}`);
|
|
653
|
+
act(`run ${formatCommand(client.bin || 'openclaw', ['mcp', 'set', 'cohesivity', JSON.stringify({ url: MCP_URL, transport: 'streamable-http', auth: 'oauth' })])}`);
|
|
632
654
|
} else if (client.id === 'hermes') {
|
|
633
655
|
act(`atomically replace ${displayPath(join(HOME, '.hermes', 'plugins', 'cohesivity'))} from ${root}`);
|
|
634
656
|
act(`run ${formatCommand(client.bin || 'hermes', ['plugins', 'enable', 'cohesivity'])}`);
|
|
@@ -648,7 +670,7 @@ function printClientInstructions(clients, adapters) {
|
|
|
648
670
|
gemini: 'Gemini: restart the CLI, then run /mcp auth cohesivity if authentication is required.',
|
|
649
671
|
antigravity: 'Antigravity: restart, open /mcp (or Installed MCP Servers), and authenticate Cohesivity.',
|
|
650
672
|
openclaw: 'OpenClaw: restart the Gateway if it did not auto-restart, then run openclaw mcp login cohesivity.',
|
|
651
|
-
hermes: 'Hermes: restart,
|
|
673
|
+
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.',
|
|
652
674
|
}[client.id];
|
|
653
675
|
console.log(` - ${instruction}`);
|
|
654
676
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cohesivity/init",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
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": {
|