archgraph-argo 0.6.1 → 0.6.2

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
@@ -26,7 +26,7 @@ npm install -g archgraph-argo
26
26
  argo-deploy
27
27
  ```
28
28
 
29
- Done — the ARGO toolchain, skills, and rules are deployed, and the `argo` MCP server is registered automatically.
29
+ Done — the ARGO toolchain, skills, and rules are deployed, and the `argo` MCP server is registered automatically in **GitHub Copilot**, **Cursor**, and **OpenCode**.
30
30
 
31
31
  > Semantic (Graph RAG) queries also need **Neo4j** and a **vector engine** configured in
32
32
  > `~/.argo/.env`; everything else works out of the box.
package/install-argo.ps1 CHANGED
@@ -3,6 +3,11 @@ param(
3
3
  [string]$ArgoRoot = "$env:USERPROFILE\.argo",
4
4
  [string]$SkillsRoot = "$env:USERPROFILE\.copilot\skills",
5
5
  [string]$PromptsRoot = "$env:APPDATA\Code\User\prompts",
6
+ [string]$CursorSkillsRoot = "$env:USERPROFILE\.cursor\skills",
7
+ [string]$CursorMcpPath = "$env:USERPROFILE\.cursor\mcp.json",
8
+ [string]$OpenCodeSkillsRoot = "$env:USERPROFILE\.config\opencode\skills",
9
+ [string]$OpenCodeAgentsPath = "$env:USERPROFILE\.config\opencode\AGENTS.md",
10
+ [string]$OpenCodeConfigPath = "$env:USERPROFILE\.config\opencode\opencode.json",
6
11
  [switch]$SkipEnv,
7
12
  [switch]$SkipDeps,
8
13
  [switch]$SkipMcp,
@@ -19,6 +24,64 @@ function Copy-Tree {
19
24
  Copy-Item -Recurse -Force -Path (Join-Path $Source '*') -Destination $Destination
20
25
  }
21
26
 
27
+ function Write-McpConfig {
28
+ param(
29
+ [string]$Path,
30
+ [string]$ServersKey,
31
+ $ServerConfig
32
+ )
33
+
34
+ $root = [ordered]@{}
35
+ if (Test-Path $Path) {
36
+ try {
37
+ $existing = Get-Content $Path -Raw | ConvertFrom-Json
38
+ foreach ($p in $existing.PSObject.Properties) {
39
+ $root[$p.Name] = $p.Value
40
+ }
41
+ } catch {
42
+ # Ignore an unparseable existing file and start fresh.
43
+ }
44
+ }
45
+
46
+ $servers = [ordered]@{}
47
+ if ($root.Contains($ServersKey)) {
48
+ $serversValue = $root[$ServersKey]
49
+ if ($null -ne $serversValue) {
50
+ foreach ($p in $serversValue.PSObject.Properties) {
51
+ $servers[$p.Name] = $p.Value
52
+ }
53
+ }
54
+ }
55
+ $servers['argo'] = $ServerConfig
56
+ $root[$ServersKey] = $servers
57
+
58
+ New-Item -ItemType Directory -Force -Path (Split-Path $Path) | Out-Null
59
+ $json = $root | ConvertTo-Json -Depth 10
60
+ [System.IO.File]::WriteAllText($Path, $json, (New-Object System.Text.UTF8Encoding $false))
61
+ }
62
+
63
+ function Add-AgentsRule {
64
+ param(
65
+ [string]$AgentsPath,
66
+ [string]$RulePath
67
+ )
68
+
69
+ New-Item -ItemType Directory -Force -Path (Split-Path $AgentsPath) | Out-Null
70
+ $ruleContent = Get-Content $RulePath -Raw
71
+ $marker = 'ArchGraph ARGO Workflow Rules'
72
+
73
+ if (Test-Path $AgentsPath) {
74
+ $existing = Get-Content $AgentsPath -Raw
75
+ if ($existing -like "*$marker*") {
76
+ return
77
+ }
78
+ $combined = $existing.TrimEnd() + "`n`n" + $ruleContent
79
+ [System.IO.File]::WriteAllText($AgentsPath, $combined, (New-Object System.Text.UTF8Encoding $false))
80
+ } else {
81
+ [System.IO.File]::WriteAllText($AgentsPath, $ruleContent, (New-Object System.Text.UTF8Encoding $false))
82
+ }
83
+ }
84
+
22
85
  Write-Host '==> Deploying Argo toolchain'
23
86
 
24
87
  $schemaSrc = Join-Path $argoDir 'schema'
@@ -52,6 +115,17 @@ $depsDest = Join-Path $ArgoRoot 'package.json'
52
115
  Write-Host "[6/6] argo\package.json -> $depsDest"
53
116
  Copy-Item -Force -Path $depsSrc -Destination $depsDest
54
117
 
118
+ $cursorSkillDest = Join-Path $CursorSkillsRoot 'argo-init'
119
+ Write-Host "[7/10] argo\skills\argo-init -> $cursorSkillDest (Cursor)"
120
+ Copy-Tree -Source $skillSrc -Destination $cursorSkillDest
121
+
122
+ $openCodeSkillDest = Join-Path $OpenCodeSkillsRoot 'argo-init'
123
+ Write-Host "[8/10] argo\skills\argo-init -> $openCodeSkillDest (OpenCode)"
124
+ Copy-Tree -Source $skillSrc -Destination $openCodeSkillDest
125
+
126
+ Write-Host "[9/10] argo\rules\archgraph.instructions.md -> $OpenCodeAgentsPath (OpenCode global AGENTS.md)"
127
+ Add-AgentsRule -AgentsPath $OpenCodeAgentsPath -RulePath $ruleSrc
128
+
55
129
  if ($SkipDeps) {
56
130
  Write-Host 'Skipped dependency install (-SkipDeps).'
57
131
  } elseif (Get-Command npm -ErrorAction SilentlyContinue) {
@@ -118,35 +192,32 @@ if ($SkipEnv) {
118
192
  if ($SkipMcp) {
119
193
  Write-Host 'Skipped MCP configuration (-SkipMcp).'
120
194
  } else {
121
- Write-Host '==> Registering argo MCP server in VS Code'
122
- $mcpPath = if ($McpPath) { $McpPath } else { Join-Path $env:APPDATA 'Code\User\mcp.json' }
123
195
  $argoServer = (Join-Path $ArgoRoot 'scripts\argo-mcp-server.js').Replace('\', '/')
124
196
 
125
- $servers = [ordered]@{}
126
- if (Test-Path $mcpPath) {
127
- try {
128
- $existing = Get-Content $mcpPath -Raw | ConvertFrom-Json
129
- if ($existing.PSObject.Properties.Name -contains 'servers') {
130
- foreach ($p in $existing.servers.PSObject.Properties) {
131
- $servers[$p.Name] = $p.Value
132
- }
133
- }
134
- } catch {
135
- # Ignore an unparseable existing file and start fresh.
136
- }
137
- }
138
-
139
- $servers['argo'] = [ordered]@{
197
+ Write-Host '==> Registering argo MCP server in VS Code (GitHub Copilot)'
198
+ $mcpPath = if ($McpPath) { $McpPath } else { Join-Path $env:APPDATA 'Code\User\mcp.json' }
199
+ Write-McpConfig -Path $mcpPath -ServersKey 'servers' -ServerConfig ([ordered]@{
140
200
  type = 'stdio'
141
201
  command = 'node'
142
202
  args = @($argoServer)
143
- }
144
-
145
- $config = [ordered]@{ servers = $servers }
146
- New-Item -ItemType Directory -Force -Path (Split-Path $mcpPath) | Out-Null
147
- $json = $config | ConvertTo-Json -Depth 8
148
- [System.IO.File]::WriteAllText($mcpPath, $json, (New-Object System.Text.UTF8Encoding $false))
203
+ })
149
204
  Write-Host "argo MCP config written -> $mcpPath"
205
+
206
+ Write-Host '==> Registering argo MCP server in Cursor'
207
+ Write-McpConfig -Path $CursorMcpPath -ServersKey 'mcpServers' -ServerConfig ([ordered]@{
208
+ type = 'stdio'
209
+ command = 'node'
210
+ args = @($argoServer)
211
+ })
212
+ Write-Host "argo MCP config written -> $CursorMcpPath"
213
+
214
+ Write-Host '==> Registering argo MCP server in OpenCode'
215
+ Write-McpConfig -Path $OpenCodeConfigPath -ServersKey 'mcp' -ServerConfig ([ordered]@{
216
+ type = 'local'
217
+ command = @('node', $argoServer)
218
+ enabled = $true
219
+ })
220
+ Write-Host "argo MCP config written -> $OpenCodeConfigPath"
150
221
  }
151
222
 
152
223
  Write-Host ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archgraph-argo",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
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": {