@origintrail-official/dkg-mcp 10.0.0 → 10.0.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/README.md +2 -2
- package/dist/manifest/schema.d.ts +24 -24
- package/package.json +1 -1
- package/dist/tools/annotations.d.ts +0 -33
- package/dist/tools/annotations.d.ts.map +0 -1
- package/dist/tools/annotations.js +0 -541
- package/dist/tools/annotations.js.map +0 -1
- package/dist/tools/review.d.ts +0 -19
- package/dist/tools/review.d.ts.map +0 -1
- package/dist/tools/review.js +0 -68
- package/dist/tools/review.js.map +0 -1
- package/dist/tools/writes.d.ts +0 -27
- package/dist/tools/writes.d.ts.map +0 -1
- package/dist/tools/writes.js +0 -436
- package/dist/tools/writes.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ dkg mcp setup # one-shot: init + start + fund + r
|
|
|
21
21
|
4. Detects each MCP-aware client by its config file and writes the canonical entry. **You confirm per detected client interactively** (`Register DKG MCP with <client>? [Y/n]`) unless `--yes` is passed; non-TTY invocations (CI, piped stdin) auto-confirm so scripts don't hang. The detection set is seven clients: **Cursor** (`~/.cursor/mcp.json`), **Claude Code** (`~/.claude.json`), **Claude Desktop** (per-platform — `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows, `$XDG_CONFIG_HOME/Claude/claude_desktop_config.json` (or `~/.config/Claude/...` when XDG_CONFIG_HOME is unset) on Linux), **Windsurf** (`~/.codeium/windsurf/mcp_config.json`), **VSCode + GitHub Copilot Chat** (per-platform Code user-settings dir + `mcp.json` — note this client uses the `servers.dkg` shape, not `mcpServers.dkg`), **Cline** (deep-nested under VSCode's per-extension globalStorage at `Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`), and **Codex CLI** (`~/.codex/config.toml` — TOML format, table key `mcp_servers.dkg`). The clients receive the same canonical entry, serialized into each client's native format
|
|
22
22
|
5. Verifies the daemon is healthy
|
|
23
23
|
|
|
24
|
-
Every step short-circuits when its work is already done, so re-running on a set-up box is safe. Step-skip flags: `--no-start`, `--no-fund`, `--no-verify`, `--dry-run` (preview only), `--force` (refresh every detected client config regardless of state), `--yes` (auto-confirm per-client registrations; default false — TTY mode prompts interactively, non-TTY auto-confirms; pass `--yes` in scripts for the safer scripted-environment posture). First-init overrides: `--port <n>`, `--name <s
|
|
24
|
+
Every step short-circuits when its work is already done, so re-running on a set-up box is safe. Step-skip flags: `--no-start`, `--no-fund`, `--no-verify`, `--dry-run` (preview only), `--force` (refresh every detected client config regardless of state), `--yes` (auto-confirm per-client registrations; default false — TTY mode prompts interactively, non-TTY auto-confirms; pass `--yes` in scripts for the safer scripted-environment posture). First-init overrides: `--port <n>`, `--name <s>`, `--network <name>` (`mainnet-gnosis` default \| `mainnet-base` \| `testnet`; persisted as `config.networkConfig`; applies to a FRESH node only — an existing node keeps its current network, switch with `dkg init --network`). The bundled flow re-uses the same primitives `dkg openclaw setup` does, so the two verbs stay byte-aligned on network defaults, daemon-readiness probes, faucet retry/back-off, and manual-curl fallback.
|
|
25
25
|
|
|
26
26
|
The canonical entry written into each client's config (paths shown POSIX-style; Windows users see equivalent Windows-absolute paths):
|
|
27
27
|
|
|
@@ -287,7 +287,7 @@ Per-turn state is kept in `~/.cache/dkg-mcp/sessions/*.json`; safe to delete at
|
|
|
287
287
|
- **`tools/list` is missing tools after `dkg mcp setup`** → the client's MCP config still points at a prior install. Re-run `dkg mcp setup --force` to refresh stale entries.
|
|
288
288
|
- **Daemon unreachable** → `dkg status`; if it errors, `dkg logs` and `cat ~/.dkg/daemon.log`. Stale pid → `cat ~/.dkg/daemon.pid` and kill it, then `dkg start` again.
|
|
289
289
|
- **Port 9200 already in use** → another node is running. `dkg stop` once, or override via `dkg init` and pick a different API port.
|
|
290
|
-
- **WSL2: daemon dies when the terminal closes** → wrap in `tmux` or install as a systemd user service. See the [WSL2 section in JOIN_TESTNET.md](../../docs/setup/JOIN_TESTNET.md) for the systemd unit file.
|
|
290
|
+
- **WSL2: daemon dies when the terminal closes** → wrap in `tmux` or install as a systemd user service. See the [WSL2 section in JOIN_TESTNET.md](../../docs/archive/internal/setup/JOIN_TESTNET.md) for the systemd unit file.
|
|
291
291
|
- **WSL2: Windows-side MCP clients (Claude Desktop, Cursor, VSCode + Copilot, Cline, Windsurf)** → run `dkg mcp setup` from **PowerShell**, not from inside WSL. Setup invoked from WSL detects the Windows-side configs and writes entries into them, but the registered `command` is the Linux-side `node` binary path; Win32 clients can't spawn Linux executables, so the entries fail at MCP startup. For **Linux-side** clients (Linux Cursor, Linux Claude Code), run setup from inside WSL as normal. End-to-end Windows-side support from a WSL invocation is tracked separately (will use a `wsl.exe`-wrapper command form once shipped).
|
|
292
292
|
|
|
293
293
|
## Package layout
|
|
@@ -78,12 +78,12 @@ export declare const TemplateEntitySchema: z.ZodObject<{
|
|
|
78
78
|
text: z.ZodString;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
80
|
uri: string;
|
|
81
|
-
encodingFormat: string;
|
|
82
81
|
text: string;
|
|
82
|
+
encodingFormat: string;
|
|
83
83
|
}, {
|
|
84
84
|
uri: string;
|
|
85
|
-
encodingFormat: string;
|
|
86
85
|
text: string;
|
|
86
|
+
encodingFormat: string;
|
|
87
87
|
}>;
|
|
88
88
|
export type TemplateEntity = z.infer<typeof TemplateEntitySchema>;
|
|
89
89
|
/** The composed manifest, after dereferencing all template entities. */
|
|
@@ -103,12 +103,12 @@ export declare const ProjectManifestSchema: z.ZodObject<{
|
|
|
103
103
|
text: z.ZodString;
|
|
104
104
|
}, "strip", z.ZodTypeAny, {
|
|
105
105
|
uri: string;
|
|
106
|
-
encodingFormat: string;
|
|
107
106
|
text: string;
|
|
107
|
+
encodingFormat: string;
|
|
108
108
|
}, {
|
|
109
109
|
uri: string;
|
|
110
|
-
encodingFormat: string;
|
|
111
110
|
text: string;
|
|
111
|
+
encodingFormat: string;
|
|
112
112
|
}>>;
|
|
113
113
|
cursorHooksTemplate: z.ZodOptional<z.ZodObject<{
|
|
114
114
|
uri: z.ZodString;
|
|
@@ -116,12 +116,12 @@ export declare const ProjectManifestSchema: z.ZodObject<{
|
|
|
116
116
|
text: z.ZodString;
|
|
117
117
|
}, "strip", z.ZodTypeAny, {
|
|
118
118
|
uri: string;
|
|
119
|
-
encodingFormat: string;
|
|
120
119
|
text: string;
|
|
120
|
+
encodingFormat: string;
|
|
121
121
|
}, {
|
|
122
122
|
uri: string;
|
|
123
|
-
encodingFormat: string;
|
|
124
123
|
text: string;
|
|
124
|
+
encodingFormat: string;
|
|
125
125
|
}>>;
|
|
126
126
|
claudeHooksTemplate: z.ZodOptional<z.ZodObject<{
|
|
127
127
|
uri: z.ZodString;
|
|
@@ -129,12 +129,12 @@ export declare const ProjectManifestSchema: z.ZodObject<{
|
|
|
129
129
|
text: z.ZodString;
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
131
|
uri: string;
|
|
132
|
-
encodingFormat: string;
|
|
133
132
|
text: string;
|
|
133
|
+
encodingFormat: string;
|
|
134
134
|
}, {
|
|
135
135
|
uri: string;
|
|
136
|
-
encodingFormat: string;
|
|
137
136
|
text: string;
|
|
137
|
+
encodingFormat: string;
|
|
138
138
|
}>>;
|
|
139
139
|
configTemplate: z.ZodOptional<z.ZodObject<{
|
|
140
140
|
uri: z.ZodString;
|
|
@@ -142,12 +142,12 @@ export declare const ProjectManifestSchema: z.ZodObject<{
|
|
|
142
142
|
text: z.ZodString;
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
144
|
uri: string;
|
|
145
|
-
encodingFormat: string;
|
|
146
145
|
text: string;
|
|
146
|
+
encodingFormat: string;
|
|
147
147
|
}, {
|
|
148
148
|
uri: string;
|
|
149
|
-
encodingFormat: string;
|
|
150
149
|
text: string;
|
|
150
|
+
encodingFormat: string;
|
|
151
151
|
}>>;
|
|
152
152
|
agentsMd: z.ZodOptional<z.ZodObject<{
|
|
153
153
|
uri: z.ZodString;
|
|
@@ -155,18 +155,18 @@ export declare const ProjectManifestSchema: z.ZodObject<{
|
|
|
155
155
|
text: z.ZodString;
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
uri: string;
|
|
158
|
-
encodingFormat: string;
|
|
159
158
|
text: string;
|
|
159
|
+
encodingFormat: string;
|
|
160
160
|
}, {
|
|
161
161
|
uri: string;
|
|
162
|
-
encodingFormat: string;
|
|
163
162
|
text: string;
|
|
163
|
+
encodingFormat: string;
|
|
164
164
|
}>>;
|
|
165
165
|
}, "strip", z.ZodTypeAny, {
|
|
166
166
|
uri: string;
|
|
167
167
|
contextGraphId: string;
|
|
168
|
-
supportedTools: ("cursor" | "claude-code")[];
|
|
169
168
|
network: "testnet" | "mainnet" | "devnet";
|
|
169
|
+
supportedTools: ("cursor" | "claude-code")[];
|
|
170
170
|
title?: string | undefined;
|
|
171
171
|
requiresMcpDkgVersion?: string | undefined;
|
|
172
172
|
publishedBy?: string | undefined;
|
|
@@ -174,34 +174,34 @@ export declare const ProjectManifestSchema: z.ZodObject<{
|
|
|
174
174
|
ontologyUri?: string | undefined;
|
|
175
175
|
cursorRule?: {
|
|
176
176
|
uri: string;
|
|
177
|
-
encodingFormat: string;
|
|
178
177
|
text: string;
|
|
178
|
+
encodingFormat: string;
|
|
179
179
|
} | undefined;
|
|
180
180
|
cursorHooksTemplate?: {
|
|
181
181
|
uri: string;
|
|
182
|
-
encodingFormat: string;
|
|
183
182
|
text: string;
|
|
183
|
+
encodingFormat: string;
|
|
184
184
|
} | undefined;
|
|
185
185
|
claudeHooksTemplate?: {
|
|
186
186
|
uri: string;
|
|
187
|
-
encodingFormat: string;
|
|
188
187
|
text: string;
|
|
188
|
+
encodingFormat: string;
|
|
189
189
|
} | undefined;
|
|
190
190
|
configTemplate?: {
|
|
191
191
|
uri: string;
|
|
192
|
-
encodingFormat: string;
|
|
193
192
|
text: string;
|
|
193
|
+
encodingFormat: string;
|
|
194
194
|
} | undefined;
|
|
195
195
|
agentsMd?: {
|
|
196
196
|
uri: string;
|
|
197
|
-
encodingFormat: string;
|
|
198
197
|
text: string;
|
|
198
|
+
encodingFormat: string;
|
|
199
199
|
} | undefined;
|
|
200
200
|
}, {
|
|
201
201
|
uri: string;
|
|
202
202
|
contextGraphId: string;
|
|
203
|
-
supportedTools: ("cursor" | "claude-code")[];
|
|
204
203
|
network: "testnet" | "mainnet" | "devnet";
|
|
204
|
+
supportedTools: ("cursor" | "claude-code")[];
|
|
205
205
|
title?: string | undefined;
|
|
206
206
|
requiresMcpDkgVersion?: string | undefined;
|
|
207
207
|
publishedBy?: string | undefined;
|
|
@@ -209,28 +209,28 @@ export declare const ProjectManifestSchema: z.ZodObject<{
|
|
|
209
209
|
ontologyUri?: string | undefined;
|
|
210
210
|
cursorRule?: {
|
|
211
211
|
uri: string;
|
|
212
|
-
encodingFormat: string;
|
|
213
212
|
text: string;
|
|
213
|
+
encodingFormat: string;
|
|
214
214
|
} | undefined;
|
|
215
215
|
cursorHooksTemplate?: {
|
|
216
216
|
uri: string;
|
|
217
|
-
encodingFormat: string;
|
|
218
217
|
text: string;
|
|
218
|
+
encodingFormat: string;
|
|
219
219
|
} | undefined;
|
|
220
220
|
claudeHooksTemplate?: {
|
|
221
221
|
uri: string;
|
|
222
|
-
encodingFormat: string;
|
|
223
222
|
text: string;
|
|
223
|
+
encodingFormat: string;
|
|
224
224
|
} | undefined;
|
|
225
225
|
configTemplate?: {
|
|
226
226
|
uri: string;
|
|
227
|
-
encodingFormat: string;
|
|
228
227
|
text: string;
|
|
228
|
+
encodingFormat: string;
|
|
229
229
|
} | undefined;
|
|
230
230
|
agentsMd?: {
|
|
231
231
|
uri: string;
|
|
232
|
-
encodingFormat: string;
|
|
233
232
|
text: string;
|
|
233
|
+
encodingFormat: string;
|
|
234
234
|
} | undefined;
|
|
235
235
|
}>;
|
|
236
236
|
export type ProjectManifest = z.infer<typeof ProjectManifestSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origintrail-official/dkg-mcp",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "MCP server that exposes the local DKG daemon (projects, sub-graphs, activity, chat) to Cursor, Claude Code, and any other MCP-aware coding assistant.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Phase 7 — Agent-emitted graph annotations + project ontology.
|
|
3
|
-
*
|
|
4
|
-
* Two MCP tools:
|
|
5
|
-
*
|
|
6
|
-
* - `dkg_get_ontology` — fetches the project's ontology.ttl + agent
|
|
7
|
-
* guide markdown so the agent has the
|
|
8
|
-
* conventions in working context.
|
|
9
|
-
* - `dkg_annotate_turn` — batch-emits structured triples ABOUT a
|
|
10
|
-
* chat turn: topics, mentions, examines,
|
|
11
|
-
* proposes, concludes, asks, plus sugared
|
|
12
|
-
* writes for proposedDecisions /
|
|
13
|
-
* proposedTasks / comments / vmPublishRequests.
|
|
14
|
-
*
|
|
15
|
-
* `dkg_annotate_turn` is the main "annotate every substantive turn"
|
|
16
|
-
* surface. Its sister tool `dkg_get_ontology` keeps the agent honest
|
|
17
|
-
* about which predicates and URI patterns the project uses.
|
|
18
|
-
*/
|
|
19
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
20
|
-
import type { DkgClient } from '../client.js';
|
|
21
|
-
import type { DkgConfig } from '../config.js';
|
|
22
|
-
export declare function normaliseSlug(input: string): string;
|
|
23
|
-
/**
|
|
24
|
-
* Wrap a bare string as a URI if it doesn't already look like one.
|
|
25
|
-
*
|
|
26
|
-
* Returns null when the label slugifies to empty (blank input, pure
|
|
27
|
-
* punctuation, stopword-only) so the caller can skip the reference
|
|
28
|
-
* instead of persisting a malformed `urn:dkg:concept:` URI in the
|
|
29
|
-
* graph. See `normaliseSlug` for the slug rules.
|
|
30
|
-
*/
|
|
31
|
-
export declare function toUri(maybeUri: string, defaultType?: string): string | null;
|
|
32
|
-
export declare function registerAnnotationTools(server: McpServer, client: DkgClient, config: DkgConfig): void;
|
|
33
|
-
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../src/tools/annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA8D9C,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWnD;AAeD;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,SAAY,GAAG,MAAM,GAAG,IAAI,CAY9E;AA4CD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,GAChB,IAAI,CA6XN"}
|