@cohesivity/init 0.6.5 → 0.6.7
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 +25 -7
- package/bin/cli.js +48 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Portable directories are staged and atomically replaced.
|
|
|
25
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
27
|
| OpenClaw | install `cohesivity` through the verified Claude marketplace root, enable it, then save the remote Streamable HTTP OAuth MCP |
|
|
28
|
-
| Hermes |
|
|
28
|
+
| Hermes | install the canonical skill and local server in Hermes-owned paths, import both MCP entries through `hermes import-agent ... --overwrite --yes`, then set the two enabled flags and dormant OAuth metadata with `hermes config set` |
|
|
29
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 |
|
|
30
30
|
|
|
31
31
|
Detection is additive rather than first-match-wins. A Claude home does not stop
|
|
@@ -51,9 +51,10 @@ different boundaries: the public documentation server at
|
|
|
51
51
|
`https://cohesivity.ai/mcp` needs no login, the installed local project-bootstrap
|
|
52
52
|
server needs no login, and `https://cohesivity.ai/mcp/manage` requires OAuth for
|
|
53
53
|
account-scoped management. OpenCode users start that last flow explicitly with
|
|
54
|
-
`opencode mcp auth cohesivity`. Hermes
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
`opencode mcp auth cohesivity`. Hermes uses the exact native server name
|
|
55
|
+
`cohesivity`; `hermes mcp login cohesivity` starts its management OAuth flow.
|
|
56
|
+
The Cohesivity endpoint advertises Dynamic Client Registration, so Hermes does
|
|
57
|
+
not need a pre-registered OAuth client.
|
|
57
58
|
|
|
58
59
|
## Standalone skill only
|
|
59
60
|
|
|
@@ -81,14 +82,14 @@ The manifest schema is:
|
|
|
81
82
|
```json
|
|
82
83
|
{
|
|
83
84
|
"schema_version": 1,
|
|
84
|
-
"version": "2.1.
|
|
85
|
+
"version": "2.1.5",
|
|
85
86
|
"packages": [
|
|
86
87
|
{
|
|
87
88
|
"client": "portable",
|
|
88
89
|
"immutable_url": "https://immutable.example/portable.tar.gz",
|
|
89
90
|
"size": 1234,
|
|
90
91
|
"sha256": "64 lowercase hexadecimal characters",
|
|
91
|
-
"archive": "cohesivity-portable-2.1.
|
|
92
|
+
"archive": "cohesivity-portable-2.1.5.tar.gz"
|
|
92
93
|
}
|
|
93
94
|
]
|
|
94
95
|
}
|
|
@@ -96,7 +97,7 @@ The manifest schema is:
|
|
|
96
97
|
|
|
97
98
|
The installer maps Claude and OpenClaw to `claude`; Cursor and Hermes to
|
|
98
99
|
`portable`; Codex to `codex`; Gemini to `gemini`; and Antigravity to
|
|
99
|
-
`antigravity`. The 2.1.
|
|
100
|
+
`antigravity`. The 2.1.5 manifest also carries the direct `openai` package,
|
|
100
101
|
which this marketplace-based Codex installer does not select. Extraction
|
|
101
102
|
rejects absolute paths, traversal, links, duplicate paths, special files,
|
|
102
103
|
malformed headers, oversized content, and archives without an end marker.
|
|
@@ -165,6 +166,23 @@ server-issued, and not derived from hardware or user data. Delete
|
|
|
165
166
|
| `--base <url>` | API base for tenant bootstrap (default `https://cohesivity.ai`) |
|
|
166
167
|
| `-h`, `--help` | show command help and the exact package version |
|
|
167
168
|
|
|
169
|
+
## 0.6.7 local MCP metadata compatibility
|
|
170
|
+
|
|
171
|
+
Version 0.6.7 pins Cohesivity plugin 2.1.5. Its local MCP accepts optional
|
|
172
|
+
object-valued `params._meta` on tool calls without forwarding or reflecting it.
|
|
173
|
+
The six-tool v2 interface, confirmation behavior, client adapters, and canonical
|
|
174
|
+
skill pin are unchanged. Tool arguments remain strictly validated.
|
|
175
|
+
|
|
176
|
+
## 0.6.6 released Hermes adapter
|
|
177
|
+
|
|
178
|
+
Version 0.6.6 replaces portable-plugin enablement with surfaces shipped by the
|
|
179
|
+
immutable Hermes 0.20.0 release. It keeps plugin 2.1.4's verified local server in
|
|
180
|
+
Hermes's native MCP directory, installs the canonical skill in its skill directory,
|
|
181
|
+
and feeds the local and remote entries through Hermes's own noninteractive
|
|
182
|
+
Claude import and structural config commands. Reruns overwrite only the two
|
|
183
|
+
Cohesivity MCP names, preserve unrelated Hermes settings, verify the exact
|
|
184
|
+
persisted command/URL/auth values, and never start OAuth.
|
|
185
|
+
|
|
168
186
|
## 0.6.5 OpenCode and repeat-safe Gemini delivery
|
|
169
187
|
|
|
170
188
|
Version 0.6.5 recognizes OpenCode only from its executable, preserves the
|
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.7';
|
|
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/f1b3e82d57a2df873aa3486152d6073606f635dc/artifacts/v2.1.5/install-manifest.v1.json',
|
|
89
89
|
manifestBytes: 9610,
|
|
90
|
-
manifestSha256: '
|
|
90
|
+
manifestSha256: '3e70241b60f23af3893c98845f809cfcefe340c7c3ad452fd82fdeac0a373ece',
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
const ARTIFACT_KEYS = Object.freeze({
|
|
@@ -176,6 +176,7 @@ 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 HERMES_HOME = process.env.HERMES_HOME || join(HOME, '.hermes');
|
|
179
180
|
const DATA_HOME = process.env.XDG_DATA_HOME || join(HOME, '.local', 'share');
|
|
180
181
|
const DURABLE_PLUGIN_ROOT = join(DATA_HOME, 'cohesivity', 'plugin-packages');
|
|
181
182
|
const CANONICAL_SKILL_DIR = join(HOME, '.agents', 'skills', 'cohesivity');
|
|
@@ -554,11 +555,38 @@ async function installForClient(client, artifact) {
|
|
|
554
555
|
auth: 'oauth',
|
|
555
556
|
})]);
|
|
556
557
|
break;
|
|
557
|
-
case 'hermes':
|
|
558
|
-
installDirectoryAtomically(root, join(HOME, '.hermes', 'plugins', 'cohesivity'));
|
|
558
|
+
case 'hermes': {
|
|
559
559
|
requireClientCli(client);
|
|
560
|
-
|
|
560
|
+
const skill = join(nativeSource, 'skills', 'cohesivity');
|
|
561
|
+
const packagedServer = join(nativeSource, 'mcp', 'project-bootstrap.mjs');
|
|
562
|
+
const localServer = join(HERMES_HOME, 'mcp', 'cohesivity', 'project-bootstrap.mjs');
|
|
563
|
+
if (!existsSync(join(skill, 'SKILL.md')) || !existsSync(packagedServer)) throw new Error('verified portable artifact is missing its Hermes skill or local MCP server');
|
|
564
|
+
installDirectoryAtomically(skill, join(HERMES_HOME, 'skills', 'cohesivity'));
|
|
565
|
+
installFileAtomically(localServer, readFileSync(packagedServer, 'utf8'));
|
|
566
|
+
const importRoot = mkdtempSync(join(tmpdir(), 'cohesivity-hermes-import-'));
|
|
567
|
+
try {
|
|
568
|
+
mkdirSync(join(importRoot, '.claude'), { mode: 0o700 });
|
|
569
|
+
writeFileSync(join(importRoot, '.claude.json'), JSON.stringify({
|
|
570
|
+
mcpServers: {
|
|
571
|
+
'cohesivity-local': { command: process.execPath, args: [localServer] },
|
|
572
|
+
cohesivity: { url: MCP_URL },
|
|
573
|
+
},
|
|
574
|
+
}), { mode: 0o600 });
|
|
575
|
+
runNative(client.bin, ['import-agent', 'claude-code', '--source', join(importRoot, '.claude'), '--overwrite', '--yes']);
|
|
576
|
+
runNative(client.bin, ['config', 'set', 'mcp_servers.cohesivity-local.enabled', 'true']);
|
|
577
|
+
runNative(client.bin, ['config', 'set', 'mcp_servers.cohesivity.auth', 'oauth']);
|
|
578
|
+
runNative(client.bin, ['config', 'set', 'mcp_servers.cohesivity.enabled', 'true']);
|
|
579
|
+
const local = runNativeJson(client.bin, ['config', 'get', 'mcp_servers.cohesivity-local', '--json']);
|
|
580
|
+
const remote = runNativeJson(client.bin, ['config', 'get', 'mcp_servers.cohesivity', '--json']);
|
|
581
|
+
if (local?.command !== process.execPath || JSON.stringify(local.args) !== JSON.stringify([localServer]) || local?.enabled !== true
|
|
582
|
+
|| remote?.url !== MCP_URL || remote?.auth !== 'oauth' || remote?.enabled !== true) {
|
|
583
|
+
throw new Error('Hermes native MCP reconciliation did not persist the exact Cohesivity entries');
|
|
584
|
+
}
|
|
585
|
+
} finally {
|
|
586
|
+
rmSync(importRoot, { recursive: true, force: true });
|
|
587
|
+
}
|
|
561
588
|
break;
|
|
589
|
+
}
|
|
562
590
|
case 'opencode': {
|
|
563
591
|
requireClientCli(client);
|
|
564
592
|
const skill = join(nativeSource, 'skills', 'cohesivity', 'SKILL.md');
|
|
@@ -585,6 +613,13 @@ function runNative(command, args, env = process.env) {
|
|
|
585
613
|
const detail = String(result.stderr || result.stdout || '').trim().replace(/\s+/g, ' ').slice(0, 300);
|
|
586
614
|
throw new Error(`${formatCommand(command, args)} exited ${result.status}${detail ? `: ${detail}` : ''}`);
|
|
587
615
|
}
|
|
616
|
+
return result;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
function runNativeJson(command, args) {
|
|
620
|
+
const result = runNative(command, args);
|
|
621
|
+
try { return JSON.parse(String(result.stdout || '').trim()); }
|
|
622
|
+
catch { throw new Error(`${formatCommand(command, args)} returned invalid JSON`); }
|
|
588
623
|
}
|
|
589
624
|
|
|
590
625
|
function installDirectoryAtomically(source, destination) {
|
|
@@ -667,8 +702,12 @@ function describeDryRunPluginDelivery(clients) {
|
|
|
667
702
|
act(`run ${formatCommand(client.bin || 'openclaw', ['plugins', 'enable', 'cohesivity'])}`);
|
|
668
703
|
act(`run ${formatCommand(client.bin || 'openclaw', ['mcp', 'set', 'cohesivity', JSON.stringify({ url: MCP_URL, transport: 'streamable-http', auth: 'oauth' })])}`);
|
|
669
704
|
} else if (client.id === 'hermes') {
|
|
670
|
-
act(`atomically replace ${displayPath(join(
|
|
671
|
-
act(`
|
|
705
|
+
act(`atomically replace ${displayPath(join(HERMES_HOME, 'skills', 'cohesivity'))} from ${root}/skills/cohesivity`);
|
|
706
|
+
act(`atomically replace ${displayPath(join(HERMES_HOME, 'mcp', 'cohesivity', 'project-bootstrap.mjs'))} from ${root}/mcp/project-bootstrap.mjs`);
|
|
707
|
+
act(`run ${formatCommand(client.bin || 'hermes', ['import-agent', 'claude-code', '--source', '<generated-cohesivity-import>/.claude', '--overwrite', '--yes'])}`);
|
|
708
|
+
act(`run ${formatCommand(client.bin || 'hermes', ['config', 'set', 'mcp_servers.cohesivity-local.enabled', 'true'])}`);
|
|
709
|
+
act(`run ${formatCommand(client.bin || 'hermes', ['config', 'set', 'mcp_servers.cohesivity.auth', 'oauth'])}`);
|
|
710
|
+
act(`run ${formatCommand(client.bin || 'hermes', ['config', 'set', 'mcp_servers.cohesivity.enabled', 'true'])}`);
|
|
672
711
|
} else if (client.id === 'opencode') {
|
|
673
712
|
act(`atomically replace ${nativeRoot} from ${root}`);
|
|
674
713
|
act(`atomically install ${displayPath(join(CANONICAL_SKILL_DIR, 'SKILL.md'))} from ${nativeRoot}`);
|
|
@@ -690,7 +729,7 @@ function printClientInstructions(clients, adapters) {
|
|
|
690
729
|
gemini: 'Gemini: restart the CLI, then run /mcp auth cohesivity if authentication is required.',
|
|
691
730
|
antigravity: 'Antigravity: restart, open /mcp (or Installed MCP Servers), and authenticate Cohesivity.',
|
|
692
731
|
openclaw: 'OpenClaw: restart the Gateway if it did not auto-restart, then run openclaw mcp login cohesivity.',
|
|
693
|
-
hermes: 'Hermes: restart
|
|
732
|
+
hermes: 'Hermes: restart the client; the local bootstrap tools need no login, and hermes mcp login cohesivity starts OAuth through Dynamic Client Registration only when management tools are needed.',
|
|
694
733
|
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.',
|
|
695
734
|
}[client.id];
|
|
696
735
|
console.log(` - ${instruction}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cohesivity/init",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
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": {
|