@concord-ai/concord-mcp 0.7.0 → 0.7.1
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/dist/cli/commands/setup.js +7 -0
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/install/claude-plugin.d.ts +30 -0
- package/dist/install/claude-plugin.js +82 -0
- package/dist/install/claude-plugin.js.map +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/plugin/concord-relay/.claude-plugin/plugin.json +13 -0
- package/plugin/concord-relay/hooks/hooks.json +35 -0
- package/plugin/concord-relay/monitors/monitors.json +7 -0
- package/plugin/concord-relay/scripts/watch-inbox.sh +30 -0
|
@@ -2,6 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { writeArtifacts } from '../../artifacts/index.js';
|
|
4
4
|
import { installClaudeHook } from '../../install/claude-hooks.js';
|
|
5
|
+
import { installClaudeRelayPlugin } from '../../install/claude-plugin.js';
|
|
5
6
|
import { installCodexHooks, installCodexMcpConfig } from '../../install/codex-config.js';
|
|
6
7
|
import { installConcord } from '../../install/index.js';
|
|
7
8
|
import { McpConfigParseError, installMcpConfigs } from '../../install/mcp-config.js';
|
|
@@ -31,6 +32,12 @@ export function runSetup(cwd, options = {}) {
|
|
|
31
32
|
if (options.mcp !== false) {
|
|
32
33
|
written.push(...installMcpConfigs(ctx.repoRoot));
|
|
33
34
|
written.push(installCodexMcpConfig(env));
|
|
35
|
+
// Claude Code's half of the relay. Its background monitor is the only
|
|
36
|
+
// channel that reaches an agent idle at the prompt, and a monitor can only
|
|
37
|
+
// be declared by a plugin — settings.json cannot express one.
|
|
38
|
+
const plugin = installClaudeRelayPlugin(import.meta.url, env);
|
|
39
|
+
if (plugin !== undefined)
|
|
40
|
+
written.push(plugin);
|
|
34
41
|
// Codex has no background-monitor equivalent, so hooks are the only way it
|
|
35
42
|
// can receive a message from another agent.
|
|
36
43
|
written.push(installCodexHooks(env));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/cli/commands/setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,uBAAuB,GAAG,WAAW,CAAC;AAe5C,oFAAoF;AACpF,MAAM,UAAU,oBAAoB,CAAC,QAAgB;IACnD,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACrF,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACnE,IAAI,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,CAAC;QAC9C,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO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iBAAiB,CACpB,CAAC;YACF,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;YACxC,CAAC;YACD,IAAI,OAAO,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;gBACjC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,6FAA6F,CAC9F,CAAC;YACJ,CAAC;YACD,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;gBAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,oEAAoE;oBAClE,gFAAgF;oBAChF,gEAAgE,CACnE,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,CAAC,KAAK,YAAY,mBAAmB,CAAC,EAAE,CAAC;gBAC5C,MAAM,KAAK,CAAC;YACd,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;YAC3C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Directory name the plugin is discovered under, and its invocation name. */
|
|
2
|
+
export declare const RELAY_PLUGIN_NAME = "concord-relay";
|
|
3
|
+
/**
|
|
4
|
+
* The relay plugin shipped inside this package.
|
|
5
|
+
*
|
|
6
|
+
* Walks up from the calling module rather than counting `..` segments, because
|
|
7
|
+
* the caller sits at a different depth in `src/` than in `dist/` and a
|
|
8
|
+
* hard-coded count resolves to a plausible path that simply does not exist.
|
|
9
|
+
* Returns undefined when no packaged plugin is above the caller.
|
|
10
|
+
*/
|
|
11
|
+
export declare function packagedPluginPath(moduleUrl: string): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Where Claude Code discovers plugins with no marketplace and no install step:
|
|
14
|
+
* any directory under the skills directory holding a `.claude-plugin/`
|
|
15
|
+
* manifest loads on the next session.
|
|
16
|
+
*/
|
|
17
|
+
export declare function claudeSkillsPluginPath(env?: NodeJS.ProcessEnv): string;
|
|
18
|
+
/**
|
|
19
|
+
* Link the packaged relay plugin into Claude Code's skills directory.
|
|
20
|
+
*
|
|
21
|
+
* A symlink rather than a copy, so upgrading the package upgrades the plugin —
|
|
22
|
+
* the install path does not change between versions. Returns the link path, or
|
|
23
|
+
* undefined when the plugin is not present (a source checkout that has not been
|
|
24
|
+
* packaged, for instance) so setup can carry on rather than fail.
|
|
25
|
+
*
|
|
26
|
+
* This writes outside the repository, like the Codex config installer does, and
|
|
27
|
+
* for the same reason: the plugin has to be visible to every session, not just
|
|
28
|
+
* sessions started in one project.
|
|
29
|
+
*/
|
|
30
|
+
export declare function installClaudeRelayPlugin(moduleUrl: string, env?: NodeJS.ProcessEnv): string | undefined;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { existsSync, lstatSync, mkdirSync, readlinkSync, rmSync, symlinkSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
/** Directory name the plugin is discovered under, and its invocation name. */
|
|
6
|
+
export const RELAY_PLUGIN_NAME = 'concord-relay';
|
|
7
|
+
/**
|
|
8
|
+
* The relay plugin shipped inside this package.
|
|
9
|
+
*
|
|
10
|
+
* Walks up from the calling module rather than counting `..` segments, because
|
|
11
|
+
* the caller sits at a different depth in `src/` than in `dist/` and a
|
|
12
|
+
* hard-coded count resolves to a plausible path that simply does not exist.
|
|
13
|
+
* Returns undefined when no packaged plugin is above the caller.
|
|
14
|
+
*/
|
|
15
|
+
export function packagedPluginPath(moduleUrl) {
|
|
16
|
+
let dir = dirname(fileURLToPath(moduleUrl));
|
|
17
|
+
for (let depth = 0; depth < 6; depth += 1) {
|
|
18
|
+
const candidate = join(dir, 'plugin', RELAY_PLUGIN_NAME);
|
|
19
|
+
if (existsSync(join(candidate, '.claude-plugin', 'plugin.json')))
|
|
20
|
+
return candidate;
|
|
21
|
+
const parent = dirname(dir);
|
|
22
|
+
if (parent === dir)
|
|
23
|
+
break;
|
|
24
|
+
dir = parent;
|
|
25
|
+
}
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Where Claude Code discovers plugins with no marketplace and no install step:
|
|
30
|
+
* any directory under the skills directory holding a `.claude-plugin/`
|
|
31
|
+
* manifest loads on the next session.
|
|
32
|
+
*/
|
|
33
|
+
export function claudeSkillsPluginPath(env = process.env) {
|
|
34
|
+
const configDir = env['CLAUDE_CONFIG_DIR'];
|
|
35
|
+
const base = configDir !== undefined && configDir.trim() !== ''
|
|
36
|
+
? configDir
|
|
37
|
+
: join(env['HOME'] ?? homedir(), '.claude');
|
|
38
|
+
return join(base, 'skills', RELAY_PLUGIN_NAME);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Link the packaged relay plugin into Claude Code's skills directory.
|
|
42
|
+
*
|
|
43
|
+
* A symlink rather than a copy, so upgrading the package upgrades the plugin —
|
|
44
|
+
* the install path does not change between versions. Returns the link path, or
|
|
45
|
+
* undefined when the plugin is not present (a source checkout that has not been
|
|
46
|
+
* packaged, for instance) so setup can carry on rather than fail.
|
|
47
|
+
*
|
|
48
|
+
* This writes outside the repository, like the Codex config installer does, and
|
|
49
|
+
* for the same reason: the plugin has to be visible to every session, not just
|
|
50
|
+
* sessions started in one project.
|
|
51
|
+
*/
|
|
52
|
+
export function installClaudeRelayPlugin(moduleUrl, env = process.env) {
|
|
53
|
+
const source = packagedPluginPath(moduleUrl);
|
|
54
|
+
if (source === undefined)
|
|
55
|
+
return undefined;
|
|
56
|
+
const target = claudeSkillsPluginPath(env);
|
|
57
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
58
|
+
if (existsSync(target) || isBrokenLink(target)) {
|
|
59
|
+
// Re-point a stale link (an older install path) but never clobber a real
|
|
60
|
+
// directory someone put there by hand.
|
|
61
|
+
if (!isSymlink(target))
|
|
62
|
+
return target;
|
|
63
|
+
if (readlinkSync(target) === source)
|
|
64
|
+
return target;
|
|
65
|
+
rmSync(target);
|
|
66
|
+
}
|
|
67
|
+
symlinkSync(source, target);
|
|
68
|
+
return target;
|
|
69
|
+
}
|
|
70
|
+
function isSymlink(path) {
|
|
71
|
+
try {
|
|
72
|
+
return lstatSync(path).isSymbolicLink();
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/** A symlink whose target is gone: `existsSync` follows links and says false. */
|
|
79
|
+
function isBrokenLink(path) {
|
|
80
|
+
return isSymlink(path) && !existsSync(path);
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=claude-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-plugin.js","sourceRoot":"","sources":["../../src/install/claude-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAiB;IAClD,IAAI,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,SAA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I,CAAC,SAAS,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;QACtC,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,MAAM;YAAE,OAAO,MAAM,CAAC;QACnD,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IACD,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,IAAI,CAAC;QACH,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
2
2
|
import type { Repositories } from './db/index.js';
|
|
3
3
|
import { type WorkspaceContext, type WorkspaceManager } from './workspaces/manager.js';
|
|
4
4
|
/** Concord's advertised MCP server version. */
|
|
5
|
-
export declare const SERVER_VERSION = "0.7.
|
|
5
|
+
export declare const SERVER_VERSION = "0.7.1";
|
|
6
6
|
export interface ServerOptions {
|
|
7
7
|
/** Called after any tool writes to the database (used to regenerate artifacts). */
|
|
8
8
|
onToolWrite?: (workspace: WorkspaceContext | undefined) => void;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Single source of truth for the package version, shared by the CLI and server. */
|
|
2
|
-
export declare const VERSION = "0.7.
|
|
2
|
+
export declare const VERSION = "0.7.1";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@concord-ai/concord-mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Shared work-state and task memory for coding agents: coordinate work, preserve decisions, and hand off through MCP.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
|
-
"dist"
|
|
39
|
+
"dist",
|
|
40
|
+
"plugin"
|
|
40
41
|
],
|
|
41
42
|
"scripts": {
|
|
42
43
|
"build": "tsc -p tsconfig.build.json",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "concord-relay",
|
|
3
|
+
"description": "Delivers Concord inter-agent messages into a running Claude Code session, whether it is mid-task or idle at the prompt.",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Concord",
|
|
7
|
+
"url": "https://github.com/Get-Concord-AI/concord-mcp"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/Get-Concord-AI/concord-mcp",
|
|
10
|
+
"experimental": {
|
|
11
|
+
"monitors": "./monitors/monitors.json"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Concord inter-agent message delivery",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"SessionStart": [
|
|
5
|
+
{
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "concord inbox register"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"PostToolUse": [
|
|
15
|
+
{
|
|
16
|
+
"hooks": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "concord inbox drain --format post-tool-use"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"Stop": [
|
|
25
|
+
{
|
|
26
|
+
"hooks": [
|
|
27
|
+
{
|
|
28
|
+
"type": "command",
|
|
29
|
+
"command": "concord inbox drain --format stop"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Concord relay monitor.
|
|
3
|
+
#
|
|
4
|
+
# Runs for the lifetime of an interactive session. Every line it prints becomes
|
|
5
|
+
# a notification in that session, which is the only channel that reaches an
|
|
6
|
+
# agent sitting idle at the prompt — hooks fire only when the agent is already
|
|
7
|
+
# doing something. `concord inbox drain` prints nothing on an empty inbox, so a
|
|
8
|
+
# quiet workspace stays quiet.
|
|
9
|
+
set -uo pipefail
|
|
10
|
+
|
|
11
|
+
CONCORD_BIN="${CONCORD_BIN:-concord}"
|
|
12
|
+
CONCORD_INBOX_POLL_SECONDS="${CONCORD_INBOX_POLL_SECONDS:-2}"
|
|
13
|
+
|
|
14
|
+
# Identity needs no configuration: Claude Code exports CLAUDE_CODE_SESSION_ID
|
|
15
|
+
# into this process, and `concord inbox drain` derives the agent id from it.
|
|
16
|
+
# CONCORD_AGENT_ID overrides it when a human wants to name the agents.
|
|
17
|
+
|
|
18
|
+
# Once installed, this plugin loads in every session, most of which have nothing
|
|
19
|
+
# to do with Concord. Exit immediately rather than leaving a poll loop spawning
|
|
20
|
+
# a subprocess every couple of seconds for the life of an unrelated project.
|
|
21
|
+
if ! "${CONCORD_BIN}" inbox status >/dev/null 2>&1; then
|
|
22
|
+
exit 0
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
while true; do
|
|
26
|
+
# Never let a transient failure (a locked database, a mid-write config) kill
|
|
27
|
+
# the monitor: a dead monitor silently stops delivering messages.
|
|
28
|
+
"${CONCORD_BIN}" inbox drain --format monitor 2>/dev/null || true
|
|
29
|
+
sleep "${CONCORD_INBOX_POLL_SECONDS}"
|
|
30
|
+
done
|