archgraph-argo 0.10.50 → 0.10.52

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 CHANGED
@@ -43,11 +43,30 @@ argo-deploy
43
43
 
44
44
  Done — the ARGO toolchain, skills, and rules are deployed, and the `argo` MCP server is registered automatically in **GitHub Copilot**, **Cursor**, **OpenCode**, **DeepSeek Harness** (dsh), and **OpenClaw**.
45
45
 
46
- > Semantic (Graph RAG) queries also need **Neo4j** and a **vector engine** configured in
47
- > `~/.argo/.env`; everything else works out of the box.
46
+ ### Prerequisites and configuration
47
+
48
+ Everything works out of the box except **semantic (Graph RAG) queries**, which need:
49
+
50
+ - **Neo4j graph database** — stores the structural projection of your architecture graph. During
51
+ `argo-deploy` you configure `ARGO_NEO4J_DATABASE_URL`, `ARGO_NEO4J_DATABASE_USERNAME`, and
52
+ `ARGO_NEO4J_DATABASE_PASSWORD` in `~/.argo/.env`.
53
+ - **Embedding / vector engine** — powers semantic Graph RAG retrieval. Configure
54
+ `ARGO_EMBEDDING_BASE_URL`, `ARGO_EMBEDDING_MODEL`, `ARGO_EMBEDDING_PROVIDER`,
55
+ `ARGO_EMBEDDING_MODEL_VERSION`, `ARGO_EMBEDDING_DIMENSIONS`, plus the API key `QWEN_KEY`.
56
+
57
+ Where do the values come from? The Neo4j credentials come from the Neo4j instance you own or
58
+ provision (URI, username, password). The embedding configuration and `QWEN_KEY` come from your
59
+ embedding provider's dashboard — for example Alibaba DashScope. `argo-deploy` walks you through the
60
+ prompt (existing non-empty values in `~/.argo/.env` are kept); you can also edit the file afterwards
61
+ and re-run.
48
62
 
49
63
  ## How to use
50
64
 
65
+ **Step 0 — initialize the workspace.** In a fresh project, ask your coding agent to run `argo init`
66
+ (the `initializeWorkspace` MCP call). It creates a starter `design/KG/SystemArchitecture.json` when
67
+ missing, performs the first JSON → Neo4j sync, initializes the semantic (Graph RAG) lifecycle, and
68
+ verifies the architecture. From then on, the intent graph is the source of truth for the project.
69
+
51
70
  After installing, open your project and start a coding agent. It will:
52
71
 
53
72
  1. locate the architecture element behind the task before changing anything,
@@ -56,6 +75,15 @@ After installing, open your project and start a coding agent. It will:
56
75
 
57
76
  The intent architecture graph — modelled in **ArchiMate 3.2** — is the single source of truth.
58
77
 
78
+ ## Community
79
+
80
+ ArchGraph runs on open co-building. Join the community hub to share, browse and reuse **architecture
81
+ subgraphs** across projects, and follow the governance & contribution guides:
82
+
83
+ - **Community site** — https://argo.derekworkspacev5.com/archgraph/ (subgraph library, docs, blog)
84
+ - **graph-wiki repository** — https://github.com/derekhu0002/graph-wiki (graph-asset home: contribute
85
+ a subgraph from your project, or pull one back to reuse)
86
+
59
87
  ## License
60
88
 
61
89
  [Apache License 2.0](LICENSE)
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ // graph-mcp stdio bridge for hosts that dial remote MCP servers over SSE GET
5
+ // and fail on Streamable HTTP-only endpoints (CURSOR remote url entries GET
6
+ // /mcp -> 404). This bridge translates stdio JSON-RPC lines into POST
7
+ // Streamable HTTP requests against GRAPH_MCP_URL so the remote graph-mcp
8
+ // server loads as an ordinary stdio MCP server.
9
+ //
10
+ // Deployed by install-argo.ps1 to ~/.cursor/mcp-bridges/graph-mcp-stdio.js
11
+ // and registered as:
12
+ // "graph-mcp": { type: stdio, command: node,
13
+ // args: [<bridge path>],
14
+ // env: { GRAPH_MCP_URL: "https://.../mcp" } }
15
+
16
+ const readline = require('node:readline');
17
+
18
+ const endpoint = process.env.GRAPH_MCP_URL;
19
+ if (!endpoint) {
20
+ console.error('GRAPH_MCP_URL is required');
21
+ process.exit(1);
22
+ }
23
+
24
+ function emit(message) {
25
+ process.stdout.write(`${JSON.stringify(message)}\n`);
26
+ }
27
+
28
+ function parseSse(body) {
29
+ const messages = [];
30
+ // SSE frames are separated by a blank line (\r\n\r\n or \n\n).
31
+ for (const block of body.split(/\r?\n\r?\n/)) {
32
+ const data = block
33
+ .split(/\r?\n/)
34
+ .filter((line) => line.startsWith('data:'))
35
+ .map((line) => line.slice(5).trimStart())
36
+ .join('\n');
37
+ if (data) {
38
+ messages.push(JSON.parse(data));
39
+ }
40
+ }
41
+ return messages;
42
+ }
43
+
44
+ async function forward(message) {
45
+ const response = await fetch(endpoint, {
46
+ method: 'POST',
47
+ headers: {
48
+ Accept: 'application/json, text/event-stream',
49
+ 'Content-Type': 'application/json',
50
+ },
51
+ body: JSON.stringify(message),
52
+ });
53
+
54
+ if (!response.ok) {
55
+ throw new Error(`Remote MCP returned HTTP ${response.status}`);
56
+ }
57
+
58
+ // 202 Accepted means the server will stream the result over a separate SSE
59
+ // connection; there is nothing to return on this POST. Notifications
60
+ // (id === undefined) carry no response either.
61
+ if (response.status === 202 || message.id === undefined) return;
62
+
63
+ const body = await response.text();
64
+ const contentType = response.headers.get('content-type') || '';
65
+ if (contentType.includes('text/event-stream')) {
66
+ for (const item of parseSse(body)) emit(item);
67
+ return;
68
+ }
69
+ if (body.trim()) emit(JSON.parse(body));
70
+ }
71
+
72
+ const input = readline.createInterface({
73
+ input: process.stdin,
74
+ crlfDelay: Infinity,
75
+ });
76
+
77
+ input.on('line', (line) => {
78
+ if (!line.trim()) return;
79
+ let message;
80
+ try {
81
+ message = JSON.parse(line);
82
+ } catch (error) {
83
+ console.error(`Invalid JSON-RPC input: ${error.message}`);
84
+ return;
85
+ }
86
+
87
+ forward(message).catch((error) => {
88
+ if (message.id !== undefined) {
89
+ emit({
90
+ jsonrpc: '2.0',
91
+ id: message.id,
92
+ error: { code: -32000, message: error.message },
93
+ });
94
+ } else {
95
+ console.error(error.message);
96
+ }
97
+ });
98
+ });
@@ -160,7 +160,7 @@ async function ensureCanonicalSemanticLifecycle({ checkOnly, workspaceRoot, neo4
160
160
 
161
161
  try {
162
162
  const semanticLifecycle = await runCanonicalSemanticInit(
163
- systemArchitectureMcp.createDefaultCanonicalSemanticInitComposition(),
163
+ systemArchitectureMcp.createDefaultCanonicalSemanticInitComposition({ repositoryRoot: workspaceRoot }),
164
164
  {
165
165
  repositoryRoot: workspaceRoot,
166
166
  neo4j,
package/install-argo.ps1 CHANGED
@@ -5,6 +5,7 @@ param(
5
5
  [string]$PromptsRoot = "$env:APPDATA\Code\User\prompts",
6
6
  [string]$CursorSkillsRoot = "$env:USERPROFILE\.cursor\skills",
7
7
  [string]$CursorMcpPath = "$env:USERPROFILE\.cursor\mcp.json",
8
+ [string]$CursorMcpBridgesRoot = "$env:USERPROFILE\.cursor\mcp-bridges",
8
9
  [string]$OpenCodeSkillsRoot = "$env:USERPROFILE\.config\opencode\skills",
9
10
  [string]$OpenCodeAgentsPath = "$env:USERPROFILE\.config\opencode\AGENTS.md",
10
11
  [string]$OpenCodeConfigPath = "$env:USERPROFILE\.config\opencode\opencode.json",
@@ -769,6 +770,11 @@ $cursorSkillDest = Join-Path $CursorSkillsRoot 'argo-init'
769
770
  Write-Host "[7/22] argo\skills\argo-init -> $cursorSkillDest (Cursor)"
770
771
  Copy-Tree -Source $skillSrc -Destination $cursorSkillDest
771
772
 
773
+ $mcpBridgeSrc = Join-Path $argoDir 'mcp-bridges'
774
+ $mcpBridgeDest = Join-Path $CursorMcpBridgesRoot ''
775
+ Write-Host " argo\mcp-bridges -> $mcpBridgeDest (Cursor graph-mcp stdio bridge)"
776
+ Copy-Tree -Source $mcpBridgeSrc -Destination $mcpBridgeDest
777
+
772
778
  $openCodeSkillDest = Join-Path $OpenCodeSkillsRoot 'argo-init'
773
779
  Write-Host "[8/22] argo\skills\argo-init -> $openCodeSkillDest (OpenCode)"
774
780
  Copy-Tree -Source $skillSrc -Destination $openCodeSkillDest
@@ -973,9 +979,10 @@ if ($SkipMcp) {
973
979
  # graph-mcp is a Streamable HTTP remote MCP endpoint. Its config shape is
974
980
  # HOST-SPECIFIC (each host's mcp.json schema is different):
975
981
  # - OpenCode (opencode.json mcp.<name>): {type: remote, url, enabled}
976
- # - Cursor (mcp.json mcpServers.<name>): {url}official remote
977
- # entries carry no `type` (type only means "stdio" for local servers);
978
- # Cursor dials url servers over Streamable HTTP.
982
+ # - Cursor (mcp.json mcpServers.<name>): stdio bridge Cursor dials
983
+ # remote url servers over SSE GET /mcp, which the Streamable HTTP
984
+ # endpoint answers with 404, so graph-mcp is exposed as a local stdio
985
+ # bridge (graph-mcp-stdio.js) that forwards to the remote over POST.
979
986
  # - VS Code (mcp.json servers.<name>): {type: http, url}
980
987
  # - OpenClaw (openclaw.json mcp.servers.<name>): {url, transport:
981
988
  # streamable-http} — keyed by transport, not by a type alias.
@@ -986,8 +993,14 @@ if ($SkipMcp) {
986
993
  url = $GraphMcpUrl
987
994
  enabled = $true
988
995
  }
996
+ $graphMcpBridgePath = (Join-Path $CursorMcpBridgesRoot 'graph-mcp-stdio.js').Replace('\', '/')
989
997
  $graphMcpCursor = [ordered]@{
990
- url = $GraphMcpUrl
998
+ type = 'stdio'
999
+ command = 'node'
1000
+ args = @($graphMcpBridgePath)
1001
+ env = [ordered]@{
1002
+ GRAPH_MCP_URL = $GraphMcpUrl
1003
+ }
991
1004
  }
992
1005
  $graphMcpVSCode = [ordered]@{
993
1006
  type = 'http'
@@ -1015,6 +1028,7 @@ if ($SkipMcp) {
1015
1028
  args = @($argoServer)
1016
1029
  }) -ExtraServers ([ordered]@{ 'graph-mcp' = $graphMcpCursor })
1017
1030
  Write-Host "argo MCP config written -> $CursorMcpPath"
1031
+ Write-Host " graph-mcp registered as stdio bridge -> $graphMcpBridgePath"
1018
1032
 
1019
1033
  Write-Host '==> Registering argo MCP server in OpenCode'
1020
1034
  Write-McpConfig -Path $OpenCodeConfigPath -ServersKey 'mcp' -ServerConfig ([ordered]@{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archgraph-argo",
3
- "version": "0.10.50",
3
+ "version": "0.10.52",
4
4
  "description": "Deploy the ArchGraph ARGO toolchain, skills, and rules (schema, scripts, argo-init skill, global rule) with one command.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -12,6 +12,7 @@
12
12
  "argo/defaults",
13
13
  "argo/agents",
14
14
  "argo/plugins",
15
+ "argo/mcp-bridges",
15
16
  "argo/skills/argo-init",
16
17
  "argo/rules",
17
18
  "argo/package.json",