delimit-cli 3.6.6 → 3.6.8

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.
@@ -98,13 +98,32 @@ async function main() {
98
98
  fs.copyFileSync(serverSource, path.join(DELIMIT_HOME, 'server', 'mcp-server.py'));
99
99
  }
100
100
 
101
- // Install Python deps
101
+ // Install Python deps into isolated venv with pinned versions
102
102
  log(` ${dim(' Installing Python dependencies...')}`);
103
+ const venvDir = path.join(DELIMIT_HOME, 'venv');
104
+ const reqFile = path.join(DELIMIT_HOME, 'server', 'requirements.txt');
103
105
  try {
104
- execSync(`${python} -m pip install --quiet fastmcp pyyaml pydantic packaging 2>/dev/null`, { stdio: 'pipe' });
105
- log(` ${green('✓')} Python dependencies installed`);
106
+ if (!fs.existsSync(venvDir)) {
107
+ execSync(`${python} -m venv "${venvDir}"`, { stdio: 'pipe' });
108
+ }
109
+ const venvPython = path.join(venvDir, 'bin', 'python');
110
+ const venvPythonWin = path.join(venvDir, 'Scripts', 'python.exe');
111
+ const venvPy = fs.existsSync(venvPython) ? venvPython : venvPythonWin;
112
+ if (fs.existsSync(reqFile)) {
113
+ execSync(`"${venvPy}" -m pip install --quiet -r "${reqFile}" 2>/dev/null`, { stdio: 'pipe' });
114
+ } else {
115
+ execSync(`"${venvPy}" -m pip install --quiet fastmcp==3.1.0 pyyaml==6.0.3 pydantic==2.12.5 packaging==26.0 2>/dev/null`, { stdio: 'pipe' });
116
+ }
117
+ python = venvPy; // Use venv python for MCP config
118
+ log(` ${green('✓')} Python dependencies installed (isolated venv)`);
106
119
  } catch {
107
- log(` ${yellow('!')} pip install failed — run manually: pip install fastmcp pyyaml pydantic packaging`);
120
+ log(` ${yellow('!')} venv install failed — trying global pip`);
121
+ try {
122
+ execSync(`${python} -m pip install --quiet fastmcp==3.1.0 pyyaml==6.0.3 pydantic==2.12.5 packaging==26.0 2>/dev/null`, { stdio: 'pipe' });
123
+ log(` ${green('✓')} Python dependencies installed (global)`);
124
+ } catch {
125
+ log(` ${yellow('!')} pip install failed — run manually: pip install fastmcp pyyaml pydantic packaging`);
126
+ }
108
127
  }
109
128
 
110
129
  // Step 3: Configure Claude Code MCP
@@ -84,7 +84,7 @@ def build(app: str, git_ref: Optional[str] = None) -> Dict[str, Any]:
84
84
  dockerfile = Path.cwd() / "Dockerfile"
85
85
  if not dockerfile.exists():
86
86
  # Check app-specific paths
87
- for candidate in [Path(f"/home/delimit/{app}/Dockerfile"), Path(f"./{app}/Dockerfile")]:
87
+ for candidate in [Path.home() / app / "Dockerfile", Path(f"./{app}/Dockerfile")]:
88
88
  if candidate.exists():
89
89
  dockerfile = candidate
90
90
  break
@@ -3,6 +3,7 @@ Bridge to delimit-generator MCP server.
3
3
  Tier 3 Extended — code generation and project scaffolding.
4
4
  """
5
5
 
6
+ import os
6
7
  import sys
7
8
  import logging
8
9
  from pathlib import Path
@@ -10,7 +11,7 @@ from typing import Any, Dict, List, Optional
10
11
 
11
12
  logger = logging.getLogger("delimit.ai.generate_bridge")
12
13
 
13
- GEN_PACKAGE = Path("/home/delimit/.delimit_suite/packages/delimit-generator")
14
+ GEN_PACKAGE = Path(os.environ.get("DELIMIT_HOME", Path.home() / ".delimit")) / "server" / "packages" / "delimit-generator"
14
15
 
15
16
 
16
17
  def _ensure_gen_path():
@@ -3,6 +3,7 @@ Bridge to delimit-intel (wireintel) MCP server.
3
3
  Tier 3 Extended — data intelligence and versioned datasets.
4
4
  """
5
5
 
6
+ import os
6
7
  import sys
7
8
  import logging
8
9
  from pathlib import Path
@@ -10,7 +11,7 @@ from typing import Any, Dict, List, Optional
10
11
 
11
12
  logger = logging.getLogger("delimit.ai.intel_bridge")
12
13
 
13
- INTEL_PACKAGE = Path("/home/delimit/.delimit_suite/packages/wireintel")
14
+ INTEL_PACKAGE = Path(os.environ.get("DELIMIT_HOME", Path.home() / ".delimit")) / "server" / "packages" / "wireintel"
14
15
 
15
16
 
16
17
  def _ensure_intel_path():
@@ -3,6 +3,7 @@ Bridge to delimit-memory package.
3
3
  Tier 2 Platform tools — semantic memory search and store.
4
4
  """
5
5
 
6
+ import os
6
7
  import sys
7
8
  import json
8
9
  import asyncio
@@ -12,7 +13,7 @@ from typing import Any, Dict, Optional
12
13
 
13
14
  logger = logging.getLogger("delimit.ai.memory_bridge")
14
15
 
15
- MEM_PACKAGE = Path("/home/delimit/.delimit_suite/packages/delimit-memory")
16
+ MEM_PACKAGE = Path(os.environ.get("DELIMIT_HOME", Path.home() / ".delimit")) / "server" / "packages" / "delimit-memory"
16
17
 
17
18
  _server = None
18
19
 
@@ -3,6 +3,7 @@ Bridge to operational tools: releasepilot, costguard, datasteward, observability
3
3
  Governance primitives + internal OS layer.
4
4
  """
5
5
 
6
+ import os
6
7
  import sys
7
8
  import json
8
9
  import asyncio
@@ -14,7 +15,7 @@ from .async_utils import run_async
14
15
 
15
16
  logger = logging.getLogger("delimit.ai.ops_bridge")
16
17
 
17
- PACKAGES = Path("/home/delimit/.delimit_suite/packages")
18
+ PACKAGES = Path(os.environ.get("DELIMIT_HOME", Path.home() / ".delimit")) / "server" / "packages"
18
19
 
19
20
  # Add PACKAGES dir so `from shared.base_server import BaseMCPServer` resolves
20
21
  _packages = str(PACKAGES)
@@ -6,6 +6,7 @@ These do NOT re-implement OS logic. They translate requests
6
6
  and forward to the running delimit-os server via direct import.
7
7
  """
8
8
 
9
+ import os
9
10
  import sys
10
11
  import logging
11
12
  from pathlib import Path
@@ -13,7 +14,7 @@ from typing import Any, Dict, List, Optional
13
14
 
14
15
  logger = logging.getLogger("delimit.ai.os_bridge")
15
16
 
16
- OS_PACKAGE = Path("/home/delimit/.delimit_suite/packages/delimit-os")
17
+ OS_PACKAGE = Path(os.environ.get("DELIMIT_HOME", Path.home() / ".delimit")) / "server" / "packages" / "delimit-os"
17
18
 
18
19
  _NOT_INIT_MSG = (
19
20
  "Project not initialized for governance. "
@@ -15,7 +15,7 @@ from .async_utils import run_async
15
15
 
16
16
  logger = logging.getLogger("delimit.ai.repo_bridge")
17
17
 
18
- PACKAGES = Path("/home/delimit/.delimit_suite/packages")
18
+ PACKAGES = Path(os.environ.get("DELIMIT_HOME", Path.home() / ".delimit")) / "server" / "packages"
19
19
 
20
20
  # Add PACKAGES dir so `from shared.base_server import BaseMCPServer` resolves
21
21
  _packages = str(PACKAGES)
@@ -3,6 +3,7 @@ Bridge to UI tooling: designsystem, storybook, testsmith, docsweaver.
3
3
  UI/DX tools for component development and testing.
4
4
  """
5
5
 
6
+ import os
6
7
  import sys
7
8
  import json
8
9
  import asyncio
@@ -14,7 +15,7 @@ from .async_utils import run_async
14
15
 
15
16
  logger = logging.getLogger("delimit.ai.ui_bridge")
16
17
 
17
- PACKAGES = Path("/home/delimit/.delimit_suite/packages")
18
+ PACKAGES = Path(os.environ.get("DELIMIT_HOME", Path.home() / ".delimit")) / "server" / "packages"
18
19
 
19
20
  # Add PACKAGES dir so `from shared.base_server import BaseMCPServer` resolves
20
21
  _packages = str(PACKAGES)
@@ -3,6 +3,7 @@ Bridge to delimit-vault package.
3
3
  Tier 2 Platform tools — artifact and credential storage.
4
4
  """
5
5
 
6
+ import os
6
7
  import sys
7
8
  import json
8
9
  import asyncio
@@ -13,7 +14,7 @@ from .async_utils import run_async
13
14
 
14
15
  logger = logging.getLogger("delimit.ai.vault_bridge")
15
16
 
16
- VAULT_PACKAGE = Path("/home/delimit/.delimit_suite/packages/delimit-vault")
17
+ VAULT_PACKAGE = Path(os.environ.get("DELIMIT_HOME", Path.home() / ".delimit")) / "server" / "packages" / "delimit-vault"
17
18
 
18
19
  _server = None
19
20
 
@@ -148,7 +148,7 @@ def _call_model(model_id: str, config: Dict, prompt: str, system_prompt: str = "
148
148
  os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = creds_path
149
149
  creds, project = google.auth.default()
150
150
  creds.refresh(google.auth.transport.requests.Request())
151
- actual_url = api_url.replace("{project}", project or os.environ.get("GOOGLE_CLOUD_PROJECT", "jamsons"))
151
+ actual_url = api_url.replace("{project}", project or os.environ.get("GOOGLE_CLOUD_PROJECT", "delimit"))
152
152
  data = json.dumps({
153
153
  "contents": [{"role": "user", "parts": [{"text": f"{system_prompt}\n\n{prompt}" if system_prompt else prompt}]}],
154
154
  "generationConfig": {"maxOutputTokens": 4096, "temperature": 0.7},
@@ -1825,8 +1825,8 @@ def _resolve_venture(venture: str) -> str:
1825
1825
  if name == venture or venture in name:
1826
1826
  return info.get("path", ".")
1827
1827
  # Fallback: assume it's a directory name under common roots
1828
- for root in ["/home/delimit", "/home/jamsons/ventures", "/home"]:
1829
- candidate = Path(root) / venture
1828
+ for root in [Path.home(), Path.home() / "ventures", Path("/home")]:
1829
+ candidate = root / venture
1830
1830
  if candidate.exists():
1831
1831
  return str(candidate)
1832
1832
  return "."
@@ -1849,7 +1849,7 @@ def delimit_ledger_add(
1849
1849
 
1850
1850
  Args:
1851
1851
  title: What needs to be done.
1852
- venture: Project name or path (e.g. "delimit-gateway", "/home/delimit/delimit-gateway"). Auto-detects if empty.
1852
+ venture: Project name or path (e.g. "delimit-gateway", "~/delimit-gateway"). Auto-detects if empty.
1853
1853
  ledger: "ops" (tasks, bugs, features) or "strategy" (decisions, direction).
1854
1854
  type: task, fix, feat, strategy, consensus.
1855
1855
  priority: P0 (urgent), P1 (important), P2 (nice to have).
@@ -0,0 +1,6 @@
1
+ # Delimit MCP server dependencies — pinned for supply chain security
2
+ # Update these when upgrading deps, then re-publish npm package
3
+ fastmcp==3.1.0
4
+ pyyaml==6.0.3
5
+ pydantic==2.12.5
6
+ packaging==26.0
package/lib/api-engine.js CHANGED
@@ -17,11 +17,12 @@ const fs = require('fs');
17
17
  const os = require('os');
18
18
 
19
19
  // Gateway root — the Python engine lives here
20
- const GATEWAY_ROOT = process.env.DELIMIT_GATEWAY_ROOT || '/home/delimit/delimit-gateway';
20
+ const DELIMIT_HOME = process.env.DELIMIT_HOME || path.join(os.homedir(), '.delimit');
21
+ const GATEWAY_ROOT = process.env.DELIMIT_GATEWAY_ROOT || path.join(DELIMIT_HOME, 'gateway');
21
22
 
22
23
  // Python executable — prefer venv if available
23
24
  const PYTHON = (() => {
24
- const venvPy = '/home/delimit/.delimit_suite/venv/bin/python';
25
+ const venvPy = path.join(DELIMIT_HOME, 'venv', 'bin', 'python');
25
26
  if (fs.existsSync(venvPy)) return venvPy;
26
27
  return 'python3';
27
28
  })();
@@ -249,6 +249,7 @@ export GEMINI_GOVERNANCE_HOOK="${path.join(this.aiToolsDir, 'gemini')}"
249
249
  }
250
250
 
251
251
  generateGitHook(hookName) {
252
+ const pkgRoot = path.resolve(__dirname, '..');
252
253
  return `#!/bin/sh
253
254
  # Delimit Dynamic Governance Hook - ${hookName}
254
255
  # Auto-generated by Delimit Hooks Installer
@@ -256,16 +257,17 @@ export GEMINI_GOVERNANCE_HOOK="${path.join(this.aiToolsDir, 'gemini')}"
256
257
  # Ensure agent is running
257
258
  if ! curl -s http://127.0.0.1:7823/status > /dev/null 2>&1; then
258
259
  echo "Starting Delimit Agent..."
259
- nohup node /home/delimit/npm-delimit/lib/agent.js > /dev/null 2>&1 &
260
+ nohup node "${pkgRoot}/lib/agent.js" > /dev/null 2>&1 &
260
261
  sleep 2
261
262
  fi
262
263
 
263
264
  # Execute governance check
264
- node /home/delimit/npm-delimit/bin/delimit-cli.js hook ${hookName} "$@"
265
+ node "${pkgRoot}/bin/delimit-cli.js" hook ${hookName} "$@"
265
266
  `;
266
267
  }
267
268
 
268
269
  generateAIToolWrapper(tool, config) {
270
+ const pkgRoot = path.resolve(__dirname, '..');
269
271
  return `#!/bin/sh
270
272
  # Delimit Governance Wrapper for ${config.name}
271
273
  # Auto-generated by Delimit Hooks Installer
@@ -274,7 +276,7 @@ node /home/delimit/npm-delimit/bin/delimit-cli.js hook ${hookName} "$@"
274
276
  echo "[\$(date '+%Y-%m-%d %H:%M:%S')] ${tool} invoked with args: $*" >> ~/.delimit/audit/${tool}.log
275
277
 
276
278
  # Check governance before execution
277
- node /home/delimit/npm-delimit/bin/delimit-cli.js proxy ${tool} "$@"
279
+ node "${pkgRoot}/bin/delimit-cli.js" proxy ${tool} "$@"
278
280
 
279
281
  # If governance passes, execute the real tool
280
282
  if [ $? -eq 0 ]; then
@@ -10,6 +10,7 @@ const os = require('os');
10
10
  class PlatformAdapter {
11
11
  constructor() {
12
12
  this.HOME = os.homedir();
13
+ this.PKG_ROOT = path.resolve(__dirname, '..');
13
14
  }
14
15
 
15
16
  /**
@@ -28,7 +29,7 @@ class PlatformAdapter {
28
29
  "name": "delimit-governance",
29
30
  "description": "Governance validation skill",
30
31
  "type": "validation",
31
- "handler": "/home/delimit/npm-delimit/adapters/codex-skill.js",
32
+ "handler": path.join(this.PKG_ROOT, "adapters", "codex-skill.js"),
32
33
  "triggers": ["pre-code-generation", "pre-suggestion"],
33
34
  "enabled": true
34
35
  },
@@ -36,14 +37,14 @@ class PlatformAdapter {
36
37
  "name": "delimit-security",
37
38
  "description": "Security validation skill",
38
39
  "type": "security",
39
- "handler": "/home/delimit/npm-delimit/adapters/codex-security.js",
40
+ "handler": path.join(this.PKG_ROOT, "adapters", "codex-security.js"),
40
41
  "enabled": true
41
42
  }
42
43
  ],
43
44
  "commands": {
44
45
  "governance": {
45
46
  "description": "Check governance status",
46
- "handler": "/home/delimit/npm-delimit/bin/delimit-cli.js",
47
+ "handler": path.join(this.PKG_ROOT, "bin", "delimit-cli.js"),
47
48
  "args": ["status"]
48
49
  }
49
50
  }
@@ -79,16 +80,16 @@ extensions:
79
80
  - id: validate-code
80
81
  name: Validate Code
81
82
  trigger: before_code_generation
82
- handler: /home/delimit/npm-delimit/adapters/gemini-action.js
83
+ handler: ${path.join(this.PKG_ROOT, 'adapters', 'gemini-action.js')}
83
84
  - id: collect-evidence
84
85
  name: Collect Evidence
85
86
  trigger: after_response
86
- handler: /home/delimit/npm-delimit/adapters/gemini-evidence.js
87
+ handler: ${path.join(this.PKG_ROOT, 'adapters', 'gemini-evidence.js')}
87
88
  commands:
88
89
  - command: "@governance"
89
90
  description: Check governance status
90
91
  action: run_script
91
- script: /home/delimit/npm-delimit/bin/delimit-cli.js
92
+ script: ${path.join(this.PKG_ROOT, 'bin', 'delimit-cli.js')}
92
93
  args: ["status"]
93
94
  `;
94
95
 
@@ -119,7 +120,7 @@ extensions:
119
120
  name = "delimit-governance"
120
121
  version = "2.0.0"
121
122
  description = "Delimit Governance Plugin"
122
- entry_point = "/home/delimit/npm-delimit/adapters/xai-plugin.js"
123
+ entry_point = "${path.join(this.PKG_ROOT, 'adapters', 'xai-plugin.js')}"
123
124
 
124
125
  [plugins.hooks]
125
126
  pre_prompt = true
@@ -127,8 +128,8 @@ post_response = true
127
128
  code_validation = true
128
129
 
129
130
  [plugins.commands]
130
- governance = { cmd = "/home/delimit/npm-delimit/bin/delimit-cli.js", args = ["status"] }
131
- audit = { cmd = "/home/delimit/npm-delimit/bin/delimit-cli.js", args = ["audit"] }
131
+ governance = { cmd = "${path.join(this.PKG_ROOT, 'bin', 'delimit-cli.js')}", args = ["status"] }
132
+ audit = { cmd = "${path.join(this.PKG_ROOT, 'bin', 'delimit-cli.js')}", args = ["audit"] }
132
133
  `;
133
134
 
134
135
  // Create xAI plugins directory
@@ -172,7 +173,7 @@ audit = { cmd = "/home/delimit/npm-delimit/bin/delimit-cli.js", args = ["audit"]
172
173
  }
173
174
  }
174
175
  },
175
- "handler": "/home/delimit/npm-delimit/adapters/openai-function.js"
176
+ "handler": path.join(this.PKG_ROOT, "adapters", "openai-function.js")
176
177
  }
177
178
  }
178
179
  ],
@@ -215,7 +216,7 @@ audit = { cmd = "/home/delimit/npm-delimit/bin/delimit-cli.js", args = ["audit"]
215
216
  "id": "delimit.governance",
216
217
  "name": "Delimit Governance",
217
218
  "version": "2.0.0",
218
- "main": "/home/delimit/npm-delimit/adapters/cursor-extension.js",
219
+ "main": path.join(this.PKG_ROOT, "adapters", "cursor-extension.js"),
219
220
  "activationEvents": [
220
221
  "onCommand:delimit.checkGovernance",
221
222
  "onLanguage:javascript",
@@ -276,9 +277,9 @@ workflows:
276
277
  version: 2.0.0
277
278
  triggers:
278
279
  - event: pre_generation
279
- handler: /home/delimit/npm-delimit/adapters/windsurf-trigger.js
280
+ handler: ${path.join(this.PKG_ROOT, 'adapters', 'windsurf-trigger.js')}
280
281
  - event: post_generation
281
- handler: /home/delimit/npm-delimit/adapters/windsurf-validate.js
282
+ handler: ${path.join(this.PKG_ROOT, 'adapters', 'windsurf-validate.js')}
282
283
  automations:
283
284
  - name: validate_code
284
285
  trigger: on_code_change
@@ -289,7 +290,7 @@ workflows:
289
290
  commands:
290
291
  governance:
291
292
  description: Check governance status
292
- script: /home/delimit/npm-delimit/bin/delimit-cli.js
293
+ script: ${path.join(this.PKG_ROOT, 'bin', 'delimit-cli.js')}
293
294
  args: [status]
294
295
  `;
295
296
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delimit-cli",
3
- "version": "3.6.6",
3
+ "version": "3.6.8",
4
4
  "description": "Catch breaking API changes before they ship. GitHub Action + CLI for OpenAPI specs.",
5
5
  "main": "index.js",
6
6
  "files": [