@theronap/agnoclast-mcp 0.9.276 → 0.9.277
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/lib/editors/claude.mjs
CHANGED
|
@@ -10,20 +10,19 @@ import { markCommand, isManagedSubcommand } from '../managed.mjs'
|
|
|
10
10
|
/** Merge the Agnoclast MCP server into a ~/.claude.json object. Pure + idempotent: sets only OUR
|
|
11
11
|
* entry (type:'stdio'), preserves every other server. `spec` = the package@dist-tag string.
|
|
12
12
|
*
|
|
13
|
-
* ⚠ WHICH KEY:
|
|
13
|
+
* ⚠ WHICH KEY: `agnoclast`, always. ADR-0033 C2 (`migrate-key`) moves `cortex` → `agnoclast`. This
|
|
14
14
|
* used to write `cortex` unconditionally, so a re-run of setup on a migrated machine RE-CREATED a
|
|
15
15
|
* `cortex` entry beside the `agnoclast` one: two Agnoclast servers, and the new one at whatever tag
|
|
16
16
|
* setup picked — which is how Theron's machine ended up with `agnoclast`@latest and `cortex`@stable
|
|
17
|
-
* (2026-10-23).
|
|
18
|
-
* `cortex`
|
|
19
|
-
*
|
|
17
|
+
* (2026-10-23). The 10-23 fix kept an existing duplicate as "the person's call"; Theron made that
|
|
18
|
+
* call (2026-10-28): the `cortex` server must not exist. So write `agnoclast` and DELETE `cortex`,
|
|
19
|
+
* on every machine. Safe on a fresh one too: mergeClaudeSettings adds the agnoclast allow rules
|
|
20
|
+
* (MANAGED_ALLOWED_TOOLS) in the same setup run. */
|
|
20
21
|
export function mergeClaudeMcp(existing, spec, token) {
|
|
21
22
|
const cfg = existing && typeof existing === 'object' ? { ...existing } : {}
|
|
22
23
|
cfg.mcpServers = cfg.mcpServers && typeof cfg.mcpServers === 'object' ? { ...cfg.mcpServers } : {}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
cfg.mcpServers[k] = { type: 'stdio', command: 'npx', args: ['-y', spec], env: { CORTEX_TOKEN: token } }
|
|
26
|
-
}
|
|
24
|
+
delete cfg.mcpServers.cortex
|
|
25
|
+
cfg.mcpServers.agnoclast = { type: 'stdio', command: 'npx', args: ['-y', spec], env: { CORTEX_TOKEN: token } }
|
|
27
26
|
return cfg
|
|
28
27
|
}
|
|
29
28
|
|
package/lib/editors/codex.mjs
CHANGED
|
@@ -7,11 +7,11 @@ import { join } from 'node:path'
|
|
|
7
7
|
import { readJson, backupFile, ensureDir, writeJson } from './_fsutil.mjs'
|
|
8
8
|
|
|
9
9
|
/** Merge the Agnoclast MCP server into a Codex config.toml. Pure + idempotent: strips any existing
|
|
10
|
-
* [mcp_servers.
|
|
10
|
+
* [mcp_servers.agnoclast] / [mcp_servers.cortex] tables (+ their .env) (so re-runs update in place rather than
|
|
11
11
|
* duplicating — a duplicate TOML table would break Codex's parser), preserves every other table,
|
|
12
|
-
* and appends a fresh block. Only touches
|
|
12
|
+
* and appends a fresh `agnoclast` block (the legacy `cortex` one is dropped, 2026-10-28). Only touches those tables; never rewrites the user's config. */
|
|
13
13
|
export function mergeCodexToml(text, spec, token) {
|
|
14
|
-
const targets = new Set(['[mcp_servers.cortex]', '[mcp_servers.cortex.env]'])
|
|
14
|
+
const targets = new Set(['[mcp_servers.agnoclast]', '[mcp_servers.agnoclast.env]', '[mcp_servers.cortex]', '[mcp_servers.cortex.env]'])
|
|
15
15
|
const kept = []
|
|
16
16
|
let skipping = false
|
|
17
17
|
for (const line of (text || '').split('\n')) {
|
|
@@ -22,12 +22,12 @@ export function mergeCodexToml(text, spec, token) {
|
|
|
22
22
|
while (kept.length && kept[kept.length - 1].trim() === '') kept.pop() // drop trailing blanks
|
|
23
23
|
const block = [
|
|
24
24
|
'',
|
|
25
|
-
'[mcp_servers.
|
|
25
|
+
'[mcp_servers.agnoclast]',
|
|
26
26
|
'command = "npx"',
|
|
27
27
|
`args = ["-y", "${spec}"]`,
|
|
28
28
|
'startup_timeout_sec = 60', // first npx fetch can be slow; don't time out the server on cold start
|
|
29
29
|
'',
|
|
30
|
-
'[mcp_servers.
|
|
30
|
+
'[mcp_servers.agnoclast.env]',
|
|
31
31
|
`CORTEX_TOKEN = "${token}"`,
|
|
32
32
|
'',
|
|
33
33
|
]
|
package/lib/editors/cursor.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Editor adapter: Cursor. P0-b task 4 (+ review fixes).
|
|
2
|
-
// ~/.cursor/mcp.json uses the same mcpServers.
|
|
2
|
+
// ~/.cursor/mcp.json uses the same mcpServers.agnoclast shape as Claude (minus the `type` field the real
|
|
3
3
|
// Cursor config omits), so wiring Cursor is a pure JSON merge (mergeCursorMcp).
|
|
4
4
|
import { homedir } from 'node:os'
|
|
5
5
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs'
|
|
@@ -7,12 +7,13 @@ import { join } from 'node:path'
|
|
|
7
7
|
import { backupFile } from './_fsutil.mjs'
|
|
8
8
|
|
|
9
9
|
/** Merge the Agnoclast MCP server into a Cursor mcp.json object. Pure + idempotent: sets only the
|
|
10
|
-
* `cortex`
|
|
10
|
+
* `agnoclast` entry (deleting a legacy `cortex` one), preserves every other server. `spec` is the package@dist-tag STRING — the same
|
|
11
11
|
* convention claude/codex/setup.mjs use, so one install driver can pass a single spec to every adapter. */
|
|
12
12
|
export function mergeCursorMcp(existing, spec, token) {
|
|
13
13
|
const cfg = existing && typeof existing === 'object' ? { ...existing } : {}
|
|
14
14
|
cfg.mcpServers = cfg.mcpServers && typeof cfg.mcpServers === 'object' ? { ...cfg.mcpServers } : {}
|
|
15
|
-
cfg.mcpServers.cortex
|
|
15
|
+
delete cfg.mcpServers.cortex
|
|
16
|
+
cfg.mcpServers.agnoclast = { command: 'npx', args: ['-y', spec], env: { CORTEX_TOKEN: token } }
|
|
16
17
|
return cfg
|
|
17
18
|
}
|
|
18
19
|
|
package/lib/release_gate.mjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// that web/lib/engine/release.test.ts pins to the server's registry.
|
|
6
6
|
|
|
7
7
|
/** Tools any release flag gates — hidden when the server cannot be asked. Mirror of allGatedTools(). */
|
|
8
|
-
export const GATED_FALLBACK = ['attach_document', 'document_diff', 'export_page', 'find_documents', 'get_document', 'import_document_as_page', 'intake_shadow', 'list_documents', 'my_messages', 'pin_document', 'read_conversation', 'read_document', 'send_message', 'set_manager', 'upload_document_version']
|
|
8
|
+
export const GATED_FALLBACK = ['arrivals', 'attach_document', 'document_diff', 'export_page', 'file_arrival', 'find_documents', 'get_document', 'import_document_as_page', 'intake_shadow', 'list_documents', 'my_messages', 'pin_document', 'read_conversation', 'read_document', 'send_message', 'set_manager', 'upload_document_version']
|
|
9
9
|
|
|
10
10
|
export const RELEASE_FETCH_TIMEOUT_MS = 2500
|
|
11
11
|
|
package/package.json
CHANGED