delimit-cli 4.1.33 → 4.1.35
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 +1 -0
- package/bin/delimit-cli.js +41 -4
- package/lib/cross-model-hooks.js +1 -1
- package/package.json +1 -1
- package/server.json +4 -4
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ Works across any configuration — from a single model on a budget to an enterpr
|
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
npx delimit-cli scan # Instant health grade for your API spec
|
|
34
|
+
npx delimit-cli try owner/repo # Try governance on any GitHub repo
|
|
34
35
|
npx delimit-cli pr owner/repo#123 # Review any GitHub PR for breaking changes
|
|
35
36
|
npx delimit-cli setup && source ~/.bashrc # Configure AI assistants + activate
|
|
36
37
|
```
|
package/bin/delimit-cli.js
CHANGED
|
@@ -2787,15 +2787,52 @@ print(json.dumps({'changes':[{'type':c.type.value if hasattr(c.type,'value') els
|
|
|
2787
2787
|
}
|
|
2788
2788
|
});
|
|
2789
2789
|
|
|
2790
|
-
// Try command — zero-risk demo with Markdown report artifact (LED-264)
|
|
2790
|
+
// Try command — zero-risk demo with Markdown report artifact (LED-264 + LED-424)
|
|
2791
2791
|
program
|
|
2792
|
-
.command('try')
|
|
2793
|
-
.description('Run
|
|
2794
|
-
.action(async () => {
|
|
2792
|
+
.command('try [repo]')
|
|
2793
|
+
.description('Run governance on your project, a GitHub repo, or a built-in demo')
|
|
2794
|
+
.action(async (repo) => {
|
|
2795
2795
|
const tmpDir = path.join(os.tmpdir(), `delimit-try-${Date.now()}`);
|
|
2796
2796
|
fs.mkdirSync(tmpDir, { recursive: true });
|
|
2797
2797
|
|
|
2798
2798
|
console.log(chalk.bold('\n Delimit — Try It\n'));
|
|
2799
|
+
|
|
2800
|
+
// Mode 1: Clone a GitHub repo and scan it
|
|
2801
|
+
if (repo && (repo.includes('/') || repo.startsWith('http'))) {
|
|
2802
|
+
const repoUrl = repo.startsWith('http') ? repo : `https://github.com/${repo}`;
|
|
2803
|
+
console.log(chalk.gray(` Cloning ${repoUrl}...\n`));
|
|
2804
|
+
try {
|
|
2805
|
+
execSync(`git clone --depth 1 ${repoUrl} ${tmpDir}/repo 2>&1`, { timeout: 30000 });
|
|
2806
|
+
console.log(chalk.green(' Cloned. Scanning for OpenAPI specs...\n'));
|
|
2807
|
+
execSync(`node "${path.join(__dirname, 'delimit-cli.js')}" scan ${tmpDir}/repo`, { stdio: 'inherit', timeout: 30000 });
|
|
2808
|
+
// Show governance readiness for their repo
|
|
2809
|
+
console.log(chalk.bold('\n Want to add governance to this repo?\n'));
|
|
2810
|
+
console.log(` ${chalk.green('1.')} Fork it and run ${chalk.bold('npx delimit-cli init')}`);
|
|
2811
|
+
console.log(` ${chalk.green('2.')} Add CI: ${chalk.bold('npx delimit-cli ci')}`);
|
|
2812
|
+
console.log(` ${chalk.green('3.')} Open a PR — Delimit comments with breaking changes automatically\n`);
|
|
2813
|
+
try { fs.rmSync(tmpDir, { recursive: true }); } catch {}
|
|
2814
|
+
return;
|
|
2815
|
+
} catch (err) {
|
|
2816
|
+
console.log(chalk.red(` Could not clone: ${err.message}\n`));
|
|
2817
|
+
console.log(chalk.gray(' Falling back to built-in demo...\n'));
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
// Mode 2: Use current directory if it has specs
|
|
2822
|
+
if (!repo) {
|
|
2823
|
+
const cwd = process.cwd();
|
|
2824
|
+
const localSpecs = ['openapi.yaml', 'openapi.yml', 'openapi.json', 'swagger.yaml', 'swagger.json',
|
|
2825
|
+
'api/openapi.yaml', 'api/openapi.yml', 'api/openapi.json', 'spec/api.json', 'docs/openapi.yaml'];
|
|
2826
|
+
const foundLocal = localSpecs.find(s => fs.existsSync(path.join(cwd, s)));
|
|
2827
|
+
if (foundLocal) {
|
|
2828
|
+
console.log(chalk.green(` Found ${foundLocal} in current directory. Running governance scan...\n`));
|
|
2829
|
+
execSync(`node "${path.join(__dirname, 'delimit-cli.js')}" scan ${path.join(cwd, foundLocal)}`, { stdio: 'inherit', timeout: 30000 });
|
|
2830
|
+
try { fs.rmSync(tmpDir, { recursive: true }); } catch {}
|
|
2831
|
+
return;
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
// Mode 3: Built-in demo (original behavior)
|
|
2799
2836
|
console.log(chalk.gray(' Safe mode: runs in a temp directory, nothing touches your project.\n'));
|
|
2800
2837
|
|
|
2801
2838
|
// Create sample specs (same as demo)
|
package/lib/cross-model-hooks.js
CHANGED
|
@@ -482,7 +482,7 @@ fi
|
|
|
482
482
|
if (!existingSpecLint) {
|
|
483
483
|
config.hooks.PostToolUse.push({
|
|
484
484
|
matcher: 'Edit|Write',
|
|
485
|
-
if: "path_matches('**/openapi
|
|
485
|
+
if: "path_matches('**/openapi*.yaml') || path_matches('**/openapi*.yml') || path_matches('**/openapi*.json') || path_matches('**/swagger*.yaml') || path_matches('**/swagger*.yml') || path_matches('**/swagger*.json')",
|
|
486
486
|
hooks: [{
|
|
487
487
|
type: 'command',
|
|
488
488
|
command: `${npxCmd} lint "$DELIMIT_FILE_PATH"`,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delimit-cli",
|
|
3
3
|
"mcpName": "io.github.delimit-ai/delimit-mcp-server",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.35",
|
|
5
5
|
"description": "Unify Claude Code, Codex, Cursor, and Gemini CLI with persistent context, governance, and multi-model debate.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
package/server.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.delimit-ai/delimit-mcp-server",
|
|
4
|
-
"title": "Delimit
|
|
5
|
-
"description": "
|
|
4
|
+
"title": "Delimit — API Governance for AI Coding Assistants",
|
|
5
|
+
"description": "API governance for AI coding assistants. Breaking changes, policies, cross-model context.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "https://github.com/delimit-ai/delimit-mcp-server",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "
|
|
10
|
+
"version": "4.1.34",
|
|
11
11
|
"websiteUrl": "https://delimit.ai",
|
|
12
12
|
"packages": [
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "delimit-cli",
|
|
16
|
-
"version": "
|
|
16
|
+
"version": "4.1.34",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
}
|