delimit-cli 4.1.7 → 4.1.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.
- package/README.md +3 -258
- package/lib/cross-model-hooks.js +35 -11
- package/package.json +1 -1
- package/bin/delimit-os.sh +0 -105
- package/gateway/ai/ledger_propose.py +0 -240
- package/gateway/ai/reddit_proxy.py +0 -106
- package/gateway/ai/siem_streaming.py +0 -290
- package/gateway/ai/social_daemon.py +0 -189
- package/gateway/core/spec_health.py +0 -624
package/README.md
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
# `</>` Delimit
|
|
2
|
-
|
|
3
|
-
Stop re-explaining your codebase every session. Memory, tasks, and governance that persist across Claude Code, Codex, Cursor, and Gemini CLI.
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# `</>` Delimit\n\nStop re-explaining your codebase every session. Memory, tasks, and governance that persist across Claude Code, Codex, Cursor, and Gemini CLI.\n\n
|
|
6
2
|
---
|
|
7
3
|
|
|
8
4
|
## Think and Build
|
|
@@ -14,256 +10,5 @@ The universal command for the Delimit Swarm. When you say **"Think and Build"**,
|
|
|
14
10
|
- **"Vault"**: Manage local secrets and API keys (AES-256 encrypted).
|
|
15
11
|
|
|
16
12
|
Works across any configuration — from a single model on a budget to an enterprise swarm of 4+ models.
|
|
17
|
-
|
|
18
|
-
[
|
|
19
|
-
[](https://github.com/marketplace/actions/delimit-api-governance)
|
|
20
|
-
[](https://opensource.org/licenses/MIT)
|
|
21
|
-
[](https://glama.ai/mcp/servers/delimit-ai/delimit)
|
|
22
|
-
[](https://github.com/marketplace/actions/delimit-api-governance)
|
|
23
|
-
|
|
24
|
-
<p align="center">
|
|
25
|
-
<img src="docs/demo.gif" alt="Delimit detecting breaking API changes" width="700">
|
|
26
|
-
</p>
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Try it in 2 minutes
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npx delimit-cli scan # Instant health grade for your API spec
|
|
34
|
-
npx delimit-cli demo # See governance in action — no setup needed
|
|
35
|
-
npx delimit-cli setup # Configure your AI assistants
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
No API keys. No account. No config files.
|
|
39
|
-
|
|
40
|
-
### Pick your first win
|
|
41
|
-
|
|
42
|
-
**Protect my API** — catch breaking changes before merge:
|
|
43
|
-
```bash
|
|
44
|
-
npx delimit-cli try
|
|
45
|
-
# Creates a sample API, introduces breaking changes, shows what gets blocked.
|
|
46
|
-
# Saves a governance report to delimit-report.md
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Watch for drift** — detect spec changes without review:
|
|
50
|
-
```bash
|
|
51
|
-
npx delimit-cli init # Sets up governance + drift baseline
|
|
52
|
-
# Weekly drift checks run automatically via GitHub Action
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
**Run PR copilot** — governance gates on every pull request:
|
|
56
|
-
```yaml
|
|
57
|
-
# .github/workflows/api-governance.yml
|
|
58
|
-
- uses: delimit-ai/delimit-action@v1
|
|
59
|
-
with:
|
|
60
|
-
spec: api/openapi.yaml
|
|
61
|
-
# Posts gate status, violations, and remediation in PR comments
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## What's New in v4.1
|
|
67
|
-
|
|
68
|
-
- **TUI** -- terminal-native Ventures panel, real `delimit think` and `delimit build` commands
|
|
69
|
-
- **Security hardening** -- notify.py stubbed in npm, axios pinned against supply chain attacks
|
|
70
|
-
- **Free tier restructure** -- deliberations use Gemini Flash + GPT-4o-mini (cost: <$20/mo)
|
|
71
|
-
- **Zero-config onboarding** -- auto-detect framework, scan, and first evidence in one command
|
|
72
|
-
- **Auto-approve tools** -- `delimit setup` configures permissions for Claude Code, Codex, and Gemini CLI
|
|
73
|
-
|
|
74
|
-
### v4.0
|
|
75
|
-
|
|
76
|
-
- **Toolcard Delta Cache** -- SHA256 schema hashing, delta-only transmission, saves tokens
|
|
77
|
-
- **Session Phoenix** -- cross-model session resurrection with soul capture
|
|
78
|
-
- **Handoff Receipts** -- structured acknowledgment protocol between agents
|
|
79
|
-
- **Cross-Model Audit** -- 3 lenses (security, correctness, governance) with deterministic synthesis
|
|
80
|
-
- **4-model deliberation** -- Claude + Grok + Gemini + Codex debate until consensus
|
|
81
|
-
- **Universal Swarm Triggers** -- "Think and Build", "Keep building", "Ask Delimit"
|
|
82
|
-
- **176 MCP tools** -- governance, context, shipping, observability, orchestration, and swarm
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## GitHub Action
|
|
87
|
-
|
|
88
|
-
Zero-config -- auto-detects your OpenAPI spec:
|
|
89
|
-
|
|
90
|
-
```yaml
|
|
91
|
-
- uses: delimit-ai/delimit-action@v1
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Or with full configuration:
|
|
95
|
-
|
|
96
|
-
```yaml
|
|
97
|
-
name: API Contract Check
|
|
98
|
-
on: pull_request
|
|
99
|
-
|
|
100
|
-
jobs:
|
|
101
|
-
delimit:
|
|
102
|
-
runs-on: ubuntu-latest
|
|
103
|
-
permissions:
|
|
104
|
-
pull-requests: write
|
|
105
|
-
steps:
|
|
106
|
-
- uses: actions/checkout@v4
|
|
107
|
-
with:
|
|
108
|
-
fetch-depth: 0
|
|
109
|
-
- uses: delimit-ai/delimit-action@v1
|
|
110
|
-
with:
|
|
111
|
-
spec: api/openapi.yaml
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
That's it. Delimit auto-fetches the base branch spec, diffs it, and posts a PR comment with breaking changes, semver classification, migration guides, and governance gate results.
|
|
115
|
-
|
|
116
|
-
[View on GitHub Marketplace](https://github.com/marketplace/actions/delimit-api-governance) | [See a live demo (23 breaking changes)](https://github.com/delimit-ai/delimit-action-demo/pull/2)
|
|
117
|
-
|
|
118
|
-
### Example PR comment
|
|
119
|
-
|
|
120
|
-
> **Breaking Changes Detected**
|
|
121
|
-
>
|
|
122
|
-
> | Change | Path | Severity |
|
|
123
|
-
> |--------|------|----------|
|
|
124
|
-
> | endpoint_removed | `DELETE /pets/{petId}` | error |
|
|
125
|
-
> | type_changed | `/pets:GET:200[].id` (string -> integer) | warning |
|
|
126
|
-
> | enum_value_removed | `/pets:GET:200[].status` | warning |
|
|
127
|
-
>
|
|
128
|
-
> **Semver**: MAJOR (1.0.0 -> 2.0.0)
|
|
129
|
-
>
|
|
130
|
-
> **Migration Guide**: 3 steps to update your integration
|
|
131
|
-
>
|
|
132
|
-
> ### Governance Gates
|
|
133
|
-
> | Gate | Status | Chain |
|
|
134
|
-
> |------|--------|-------|
|
|
135
|
-
> | API Lint | Pass/Fail | lint -> semver -> gov_evaluate |
|
|
136
|
-
> | Policy Compliance | Pass/Fail | policy -> evidence_collect |
|
|
137
|
-
> | Security Audit | Pass | security_audit -> evidence_collect |
|
|
138
|
-
> | Deploy Readiness | Ready/Blocked | deploy_plan -> security_audit |
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## CLI commands
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
npx delimit-cli scan # Instant spec health grade + recommendations
|
|
146
|
-
npx delimit-cli quickstart # Clone demo project + guided walkthrough
|
|
147
|
-
npx delimit-cli try # Zero-risk demo — saves governance report
|
|
148
|
-
npx delimit-cli demo # Self-contained governance demo
|
|
149
|
-
npx delimit-cli init # Guided wizard with compliance templates
|
|
150
|
-
npx delimit-cli init --preset strict # Initialize with strict policy
|
|
151
|
-
npx delimit-cli setup # Install into all AI assistants
|
|
152
|
-
npx delimit-cli setup --dry-run # Preview changes first
|
|
153
|
-
npx delimit-cli lint api/openapi.yaml # Check for breaking changes
|
|
154
|
-
npx delimit-cli diff old.yaml new.yaml # Compare two specs
|
|
155
|
-
npx delimit-cli explain old.yaml new.yaml # Generate migration guide
|
|
156
|
-
npx delimit-cli doctor # Check setup health
|
|
157
|
-
npx delimit-cli uninstall --dry-run # Preview removal
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### What the MCP toolkit adds
|
|
161
|
-
|
|
162
|
-
When installed into your AI coding assistant, Delimit provides tools across two tiers:
|
|
163
|
-
|
|
164
|
-
#### Free (no account needed)
|
|
165
|
-
|
|
166
|
-
- **API governance** -- lint, diff, policy enforcement, semver classification
|
|
167
|
-
- **Persistent ledger** -- track tasks across sessions, shared between all AI assistants
|
|
168
|
-
- **Zero-spec extraction** -- generate OpenAPI specs from FastAPI, Express, or NestJS source
|
|
169
|
-
- **Project scan** -- auto-detect specs, frameworks, security issues, and tests
|
|
170
|
-
- **Quickstart** -- guided first-run that proves value in 60 seconds
|
|
171
|
-
|
|
172
|
-
#### Pro
|
|
173
|
-
|
|
174
|
-
- **Multi-model deliberation** -- AI models debate until they agree (free: Gemini Flash + GPT-4o-mini; BYOK: any models)
|
|
175
|
-
- **Security audit** -- dependency scanning, secret detection, SAST analysis
|
|
176
|
-
- **Test verification** -- confirms tests ran, measures coverage, generates new tests
|
|
177
|
-
- **Memory & vault** -- persistent context and encrypted secrets across sessions
|
|
178
|
-
- **Evidence collection** -- governance audit trail for compliance
|
|
179
|
-
- **Deploy pipeline** -- governed build, publish, and rollback
|
|
180
|
-
- **OS layer** -- agent identity, execution plans, approval gates
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## What It Detects
|
|
185
|
-
|
|
186
|
-
27 change types (17 breaking, 10 non-breaking) -- deterministic rules, not AI inference. Same input always produces the same result.
|
|
187
|
-
|
|
188
|
-
### Breaking Changes
|
|
189
|
-
|
|
190
|
-
| # | Change Type | Example |
|
|
191
|
-
|---|-------------|---------|
|
|
192
|
-
| 1 | `endpoint_removed` | `DELETE /users/{id}` removed entirely |
|
|
193
|
-
| 2 | `method_removed` | `PATCH /orders` no longer exists |
|
|
194
|
-
| 3 | `required_param_added` | New required header on `GET /items` |
|
|
195
|
-
| 4 | `param_removed` | `sort` query parameter removed |
|
|
196
|
-
| 5 | `response_removed` | `200 OK` response dropped |
|
|
197
|
-
| 6 | `required_field_added` | Request body now requires `tenant_id` |
|
|
198
|
-
| 7 | `field_removed` | `email` dropped from response object |
|
|
199
|
-
| 8 | `type_changed` | `id` went from `string` to `integer` |
|
|
200
|
-
| 9 | `format_changed` | `date-time` changed to `date` |
|
|
201
|
-
| 10 | `enum_value_removed` | `status: "pending"` no longer valid |
|
|
202
|
-
| 11 | `param_type_changed` | Query param `limit` changed from `integer` to `string` |
|
|
203
|
-
| 12 | `param_required_changed` | `filter` param became required |
|
|
204
|
-
| 13 | `response_type_changed` | Response `data` changed from `array` to `object` |
|
|
205
|
-
| 14 | `security_removed` | OAuth2 security scheme removed |
|
|
206
|
-
| 15 | `security_scope_removed` | `write:pets` scope removed from OAuth2 |
|
|
207
|
-
| 16 | `max_length_decreased` | `name` maxLength reduced from 255 to 100 |
|
|
208
|
-
| 17 | `min_length_increased` | `code` minLength increased from 1 to 5 |
|
|
209
|
-
|
|
210
|
-
### Non-Breaking Changes
|
|
211
|
-
|
|
212
|
-
| # | Change Type | Example |
|
|
213
|
-
|---|-------------|---------|
|
|
214
|
-
| 18 | `endpoint_added` | New `POST /webhooks` endpoint |
|
|
215
|
-
| 19 | `method_added` | `PATCH /users/{id}` method added |
|
|
216
|
-
| 20 | `optional_param_added` | Optional `format` query param added |
|
|
217
|
-
| 21 | `response_added` | `201 Created` response added |
|
|
218
|
-
| 22 | `optional_field_added` | Optional `nickname` field added to response |
|
|
219
|
-
| 23 | `enum_value_added` | `status: "archived"` value added |
|
|
220
|
-
| 24 | `description_changed` | Updated description for `/health` endpoint |
|
|
221
|
-
| 25 | `security_added` | API key security scheme added |
|
|
222
|
-
| 26 | `deprecated_added` | `GET /v1/users` marked as deprecated |
|
|
223
|
-
| 27 | `default_changed` | Default value for `page_size` changed from 10 to 20 |
|
|
224
|
-
|
|
225
|
-
---
|
|
226
|
-
|
|
227
|
-
## Policy presets
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
npx delimit-cli init --preset strict # All violations are errors
|
|
231
|
-
npx delimit-cli init --preset default # Balanced (default)
|
|
232
|
-
npx delimit-cli init --preset relaxed # All violations are warnings
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
Or write custom rules in `.delimit/policies.yml`:
|
|
236
|
-
|
|
237
|
-
```yaml
|
|
238
|
-
rules:
|
|
239
|
-
- id: freeze_v1
|
|
240
|
-
name: Freeze V1 API
|
|
241
|
-
change_types: [endpoint_removed, method_removed, field_removed]
|
|
242
|
-
severity: error
|
|
243
|
-
action: forbid
|
|
244
|
-
conditions:
|
|
245
|
-
path_pattern: "^/v1/.*"
|
|
246
|
-
message: "V1 API is frozen. Changes must be made in V2."
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## Supported formats
|
|
252
|
-
|
|
253
|
-
- OpenAPI 3.0 and 3.1
|
|
254
|
-
- Swagger 2.0
|
|
255
|
-
- YAML and JSON
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## Links
|
|
260
|
-
|
|
261
|
-
- [delimit.ai](https://delimit.ai) -- homepage
|
|
262
|
-
- [Dashboard](https://app.delimit.ai) -- governance console
|
|
263
|
-
- [Docs](https://delimit.ai/docs) -- full documentation
|
|
264
|
-
- [GitHub Action](https://github.com/marketplace/actions/delimit-api-governance) -- Marketplace listing
|
|
265
|
-
- [Quickstart](https://github.com/delimit-ai/delimit-mcp-server) -- try it in 2 minutes
|
|
266
|
-
- [npm](https://www.npmjs.com/package/delimit-cli) -- CLI package
|
|
267
|
-
- [Pricing](https://delimit.ai/pricing) -- free tier + Pro
|
|
268
|
-
|
|
269
|
-
MIT License
|
|
13
|
+
\n[](https://www.npmjs.com/package/delimit-cli)\n[](https://github.com/marketplace/actions/delimit-api-governance)\n[](https://opensource.org/licenses/MIT)\n[](https://glama.ai/mcp/servers/delimit-ai/delimit)\n[](https://github.com/marketplace/actions/delimit-api-governance)\n\n<p align="center">\n <img src="docs/demo.gif" alt="Delimit detecting breaking API changes" width="700">\n</p>\n\n---\n\n## Try it in 2 minutes\n\n```bash\nnpx delimit-cli demo # See governance in action — no setup needed\nnpx delimit-cli init # Set up governance for your project\nnpx delimit-cli setup # Configure your AI assistants\n```\n\nNo API keys. No account. No config files.\n\n### Pick your first win\n\n**Protect my API** — catch breaking changes before merge:\n```bash\nnpx delimit-cli try\n# Creates a sample API, introduces breaking changes, shows what gets blocked.\n# Saves a governance report to delimit-report.md\n```\n\n**Watch for drift** — detect spec changes without review:\n```bash\nnpx delimit-cli init # Sets up governance + drift baseline\n# Weekly drift checks run automatically via GitHub Action\n```\n\n**Run PR copilot** — governance gates on every pull request:\n```yaml\n# .github/workflows/api-governance.yml\n- uses: delimit-ai/delimit-action@v1\n with:\n spec: api/openapi.yaml\n# Posts gate status, violations, and remediation in PR comments\n```\n\n---\n\n## What's New in v4.1\n\n- **TUI** -- terminal-native Ventures panel, real `delimit think` and `delimit build` commands\n- **Security hardening** -- notify.py stubbed in npm, axios pinned against supply chain attacks\n- **Free tier restructure** -- deliberations use Gemini Flash + GPT-4o-mini (cost: <$20/mo)\n- **Zero-config onboarding** -- auto-detect framework, scan, and first evidence in one command\n- **Auto-approve tools** -- `delimit setup` configures permissions for Claude Code, Codex, and Gemini CLI\n\n### v4.0\n\n- **Toolcard Delta Cache** -- SHA256 schema hashing, delta-only transmission, saves tokens\n- **Session Phoenix** -- cross-model session resurrection with soul capture\n- **Handoff Receipts** -- structured acknowledgment protocol between agents\n- **Cross-Model Audit** -- 3 lenses (security, correctness, governance) with deterministic synthesis\n- **4-model deliberation** -- Claude + Grok + Gemini + Codex debate until consensus\n- **Universal Swarm Triggers** -- "Think and Build", "Keep building", "Ask Delimit"
|
|
14
|
+
- **176 MCP tools** -- governance, context, shipping, observability, orchestration, and swarm\n\n---\n\n## GitHub Action\n\nZero-config -- auto-detects your OpenAPI spec:\n\n```yaml\n- uses: delimit-ai/delimit-action@v1\n```\n\nOr with full configuration:\n\n```yaml\nname: API Contract Check\non: pull_request\n\njobs:\n delimit:\n runs-on: ubuntu-latest\n permissions:\n pull-requests: write\n steps:\n - uses: actions/checkout@v4\n with:\n fetch-depth: 0\n - uses: delimit-ai/delimit-action@v1\n with:\n spec: api/openapi.yaml\n```\n\nThat's it. Delimit auto-fetches the base branch spec, diffs it, and posts a PR comment with breaking changes, semver classification, migration guides, and governance gate results.\n\n[View on GitHub Marketplace](https://github.com/marketplace/actions/delimit-api-governance) | [See a live demo (23 breaking changes)](https://github.com/delimit-ai/delimit-action-demo/pull/2)\n\n### Example PR comment\n\n> **Breaking Changes Detected**\n>\n> | Change | Path | Severity |\n> |--------|------|----------|\n> | endpoint_removed | `DELETE /pets/{petId}` | error |\n> | type_changed | `/pets:GET:200[].id` (string -> integer) | warning |\n> | enum_value_removed | `/pets:GET:200[].status` | warning |\n>\n> **Semver**: MAJOR (1.0.0 -> 2.0.0)\n>\n> **Migration Guide**: 3 steps to update your integration\n>\n> ### Governance Gates\n> | Gate | Status | Chain |\n> |------|--------|-------|\n> | API Lint | Pass/Fail | lint -> semver -> gov_evaluate |\n> | Policy Compliance | Pass/Fail | policy -> evidence_collect |\n> | Security Audit | Pass | security_audit -> evidence_collect |\n> | Deploy Readiness | Ready/Blocked | deploy_plan -> security_audit |\n\n---\n\n## CLI commands\n\n```bash\nnpx delimit-cli quickstart # Clone demo project + guided walkthrough\nnpx delimit-cli try # Zero-risk demo — saves governance report\nnpx delimit-cli demo # Self-contained governance demo\nnpx delimit-cli init # Guided wizard with compliance templates\nnpx delimit-cli init --preset strict # Initialize with strict policy\nnpx delimit-cli setup # Install into all AI assistants\nnpx delimit-cli setup --dry-run # Preview changes first\nnpx delimit-cli lint api/openapi.yaml # Check for breaking changes\nnpx delimit-cli diff old.yaml new.yaml # Compare two specs\nnpx delimit-cli explain old.yaml new.yaml # Generate migration guide\nnpx delimit-cli doctor # Check setup health\nnpx delimit-cli uninstall --dry-run # Preview removal\n```\n\n### What the MCP toolkit adds\n\nWhen installed into your AI coding assistant, Delimit provides tools across two tiers:\n\n#### Free (no account needed)\n\n- **API governance** -- lint, diff, policy enforcement, semver classification\n- **Persistent ledger** -- track tasks across sessions, shared between all AI assistants\n- **Zero-spec extraction** -- generate OpenAPI specs from FastAPI, Express, or NestJS source\n- **Project scan** -- auto-detect specs, frameworks, security issues, and tests\n- **Quickstart** -- guided first-run that proves value in 60 seconds\n\n#### Pro\n\n- **Multi-model deliberation** -- AI models debate until they agree (free: Gemini Flash + GPT-4o-mini; BYOK: any models)\n- **Security audit** -- dependency scanning, secret detection, SAST analysis\n- **Test verification** -- confirms tests ran, measures coverage, generates new tests\n- **Memory & vault** -- persistent context and encrypted secrets across sessions\n- **Evidence collection** -- governance audit trail for compliance\n- **Deploy pipeline** -- governed build, publish, and rollback\n- **OS layer** -- agent identity, execution plans, approval gates\n\n---\n\n## What It Detects\n\n27 change types (17 breaking, 10 non-breaking) -- deterministic rules, not AI inference. Same input always produces the same result.\n\n### Breaking Changes\n\n| # | Change Type | Example |\n|---|-------------|---------|\n| 1 | `endpoint_removed` | `DELETE /users/{id}` removed entirely |\n| 2 | `method_removed` | `PATCH /orders` no longer exists |\n| 3 | `required_param_added` | New required header on `GET /items` |\n| 4 | `param_removed` | `sort` query parameter removed |\n| 5 | `response_removed` | `200 OK` response dropped |\n| 6 | `required_field_added` | Request body now requires `tenant_id` |\n| 7 | `field_removed` | `email` dropped from response object |\n| 8 | `type_changed` | `id` went from `string` to `integer` |\n| 9 | `format_changed` | `date-time` changed to `date` |\n| 10 | `enum_value_removed` | `status: "pending"` no longer valid |\n| 11 | `param_type_changed` | Query param `limit` changed from `integer` to `string` |\n| 12 | `param_required_changed` | `filter` param became required |\n| 13 | `response_type_changed` | Response `data` changed from `array` to `object` |\n| 14 | `security_removed` | OAuth2 security scheme removed |\n| 15 | `security_scope_removed` | `write:pets` scope removed from OAuth2 |\n| 16 | `max_length_decreased` | `name` maxLength reduced from 255 to 100 |\n| 17 | `min_length_increased` | `code` minLength increased from 1 to 5 |\n\n### Non-Breaking Changes\n\n| # | Change Type | Example |\n|---|-------------|---------|\n| 18 | `endpoint_added` | New `POST /webhooks` endpoint |\n| 19 | `method_added` | `PATCH /users/{id}` method added |\n| 20 | `optional_param_added` | Optional `format` query param added |\n| 21 | `response_added` | `201 Created` response added |\n| 22 | `optional_field_added` | Optional `nickname` field added to response |\n| 23 | `enum_value_added` | `status: "archived"` value added |\n| 24 | `description_changed` | Updated description for `/health` endpoint |\n| 25 | `security_added` | API key security scheme added |\n| 26 | `deprecated_added` | `GET /v1/users` marked as deprecated |\n| 27 | `default_changed` | Default value for `page_size` changed from 10 to 20 |\n\n---\n\n## Policy presets\n\n```bash\nnpx delimit-cli init --preset strict # All violations are errors\nnpx delimit-cli init --preset default # Balanced (default)\nnpx delimit-cli init --preset relaxed # All violations are warnings\n```\n\nOr write custom rules in `.delimit/policies.yml`:\n\n```yaml\nrules:\n - id: freeze_v1\n name: Freeze V1 API\n change_types: [endpoint_removed, method_removed, field_removed]\n severity: error\n action: forbid\n conditions:\n path_pattern: "^/v1/.*"\n message: "V1 API is frozen. Changes must be made in V2."\n```\n\n---\n\n## Supported formats\n\n- OpenAPI 3.0 and 3.1\n- Swagger 2.0\n- YAML and JSON\n\n---\n\n## Links\n\n- [delimit.ai](https://delimit.ai) -- homepage\n- [Dashboard](https://app.delimit.ai) -- governance console\n- [Docs](https://delimit.ai/docs) -- full documentation\n- [GitHub Action](https://github.com/marketplace/actions/delimit-api-governance) -- Marketplace listing\n- [Quickstart](https://github.com/delimit-ai/delimit-mcp-server) -- try it in 2 minutes\n- [npm](https://www.npmjs.com/package/delimit-cli) -- CLI package\n- [Pricing](https://delimit.ai/pricing) -- free tier + Pro\n\nMIT License
|
package/lib/cross-model-hooks.js
CHANGED
|
@@ -790,26 +790,52 @@ function getTopStrategyItem() {
|
|
|
790
790
|
*/
|
|
791
791
|
async function hookSessionStart() {
|
|
792
792
|
const config = loadHookConfig();
|
|
793
|
-
if
|
|
794
|
-
|
|
795
|
-
}
|
|
793
|
+
// Always show status — even if session_start is false in config
|
|
794
|
+
// This is the first thing a user sees. Make it count.
|
|
796
795
|
|
|
797
796
|
const lines = [];
|
|
798
|
-
lines.push('
|
|
799
|
-
|
|
797
|
+
lines.push('=== Delimit Status ===');
|
|
798
|
+
|
|
799
|
+
// Server status + tool count
|
|
800
|
+
const home = getHome();
|
|
801
|
+
const serverFile = path.join(home, '.delimit', 'server', 'ai', 'server.py');
|
|
802
|
+
if (fs.existsSync(serverFile)) {
|
|
803
|
+
try {
|
|
804
|
+
const content = fs.readFileSync(serverFile, 'utf-8');
|
|
805
|
+
const toolCount = (content.match(/@mcp\.tool\(\)/g) || []).length;
|
|
806
|
+
lines.push(`Server: ready (${toolCount} tools)`);
|
|
807
|
+
} catch {
|
|
808
|
+
lines.push('Server: ready');
|
|
809
|
+
}
|
|
810
|
+
} else {
|
|
811
|
+
lines.push('Server: not installed -- run npx delimit-cli setup');
|
|
812
|
+
}
|
|
800
813
|
|
|
801
|
-
//
|
|
814
|
+
// Governance status
|
|
802
815
|
const cwd = process.cwd();
|
|
803
816
|
const hasPolicy = fs.existsSync(path.join(cwd, 'delimit.yml'))
|
|
804
817
|
|| fs.existsSync(path.join(cwd, '.delimit.yml'))
|
|
805
818
|
|| fs.existsSync(path.join(cwd, '.delimit', 'policies.yml'));
|
|
806
819
|
|
|
807
820
|
if (hasPolicy) {
|
|
808
|
-
lines.push('
|
|
821
|
+
lines.push('Governance: active');
|
|
809
822
|
} else {
|
|
810
|
-
lines.push('
|
|
823
|
+
lines.push('Governance: not initialized -- run npx delimit-cli init');
|
|
811
824
|
}
|
|
812
825
|
|
|
826
|
+
// Last session context (prevents cross-session drift)
|
|
827
|
+
const sessionsDir = path.join(home, '.delimit', 'sessions');
|
|
828
|
+
try {
|
|
829
|
+
if (fs.existsSync(sessionsDir)) {
|
|
830
|
+
const sessions = fs.readdirSync(sessionsDir).filter(f => f.startsWith('session_')).sort().reverse();
|
|
831
|
+
if (sessions.length > 0) {
|
|
832
|
+
const latest = JSON.parse(fs.readFileSync(path.join(sessionsDir, sessions[0]), 'utf-8'));
|
|
833
|
+
const summary = (latest.summary || '').substring(0, 150);
|
|
834
|
+
if (summary) lines.push(`Last session: ${summary}`);
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
} catch {}
|
|
838
|
+
|
|
813
839
|
// Auto-update check + install
|
|
814
840
|
try {
|
|
815
841
|
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
@@ -896,9 +922,7 @@ async function hookSessionStart() {
|
|
|
896
922
|
}
|
|
897
923
|
} catch { /* not in git repo */ }
|
|
898
924
|
|
|
899
|
-
|
|
900
|
-
lines.push('[Delimit] Action required: call delimit_inbox_daemon(action="start") to enable email-based approvals');
|
|
901
|
-
|
|
925
|
+
lines.push('=== Delimit Ready ===');
|
|
902
926
|
lines.push('');
|
|
903
927
|
process.stdout.write(lines.join('\n') + '\n');
|
|
904
928
|
}
|
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.8",
|
|
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/bin/delimit-os.sh
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Delimit OS — the AI developer operating system
|
|
3
|
-
# Type 'delimit' to launch the TUI, or 'delimit <command>' for CLI tools
|
|
4
|
-
#
|
|
5
|
-
# Usage:
|
|
6
|
-
# delimit → Launch TUI (interactive terminal dashboard)
|
|
7
|
-
# delimit --quick → Quick status (non-interactive)
|
|
8
|
-
# delimit think → Trigger deliberation
|
|
9
|
-
# delimit build → Start autonomous build loop
|
|
10
|
-
# delimit ask <query> → Ask the swarm
|
|
11
|
-
# delimit lint <spec> → Lint an API spec
|
|
12
|
-
# delimit init → Initialize governance in current repo
|
|
13
|
-
# delimit setup → Configure AI assistants
|
|
14
|
-
|
|
15
|
-
set -e
|
|
16
|
-
|
|
17
|
-
DELIMIT_HOME="${DELIMIT_HOME:-$HOME/.delimit}"
|
|
18
|
-
GATEWAY="$DELIMIT_HOME/server/ai"
|
|
19
|
-
|
|
20
|
-
# If no args, launch TUI (interactive if terminal, quick if piped)
|
|
21
|
-
if [ $# -eq 0 ]; then
|
|
22
|
-
if [ -f "$GATEWAY/tui.py" ]; then
|
|
23
|
-
if [ -t 1 ] && [ -t 0 ]; then
|
|
24
|
-
cd "$DELIMIT_HOME/server" && exec python3 -m ai.tui
|
|
25
|
-
else
|
|
26
|
-
cd "$DELIMIT_HOME/server" && exec python3 -m ai.tui --quick
|
|
27
|
-
fi
|
|
28
|
-
else
|
|
29
|
-
# Fallback to npm CLI
|
|
30
|
-
exec delimit-cli "$@"
|
|
31
|
-
fi
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
# Route commands
|
|
35
|
-
case "$1" in
|
|
36
|
-
--quick|-q)
|
|
37
|
-
if [ -f "$GATEWAY/tui.py" ]; then
|
|
38
|
-
cd "$DELIMIT_HOME/server" && exec python3 -m ai.tui --quick
|
|
39
|
-
else
|
|
40
|
-
exec delimit-cli status
|
|
41
|
-
fi
|
|
42
|
-
;;
|
|
43
|
-
think|deliberate)
|
|
44
|
-
shift
|
|
45
|
-
QUESTION="${*:-What should we build next based on the current ledger and signals?}"
|
|
46
|
-
echo "[Delimit OS] Triggering deliberation..."
|
|
47
|
-
cd "$DELIMIT_HOME/server" && python3 -c "
|
|
48
|
-
from ai.deliberation import deliberate
|
|
49
|
-
import json
|
|
50
|
-
result = deliberate('''$QUESTION''', mode='dialogue', max_rounds=3)
|
|
51
|
-
if 'error' in result:
|
|
52
|
-
print(f'Error: {result[\"error\"]}')
|
|
53
|
-
elif result.get('mode') == 'single_model_reflection':
|
|
54
|
-
print(f'Model: {result.get(\"model\", \"?\")}')
|
|
55
|
-
print(f'\\nAdvocate:\\n{result.get(\"advocate\", \"\")[:500]}')
|
|
56
|
-
print(f'\\nCritic:\\n{result.get(\"critic\", \"\")[:500]}')
|
|
57
|
-
print(f'\\nSynthesis:\\n{result.get(\"synthesis\", \"\")}')
|
|
58
|
-
else:
|
|
59
|
-
print(f'Verdict: {result.get(\"final_verdict\", \"no consensus\")[:500]}')
|
|
60
|
-
print(f'Rounds: {result.get(\"rounds\", 0)}')
|
|
61
|
-
" 2>&1
|
|
62
|
-
;;
|
|
63
|
-
build|loop)
|
|
64
|
-
shift
|
|
65
|
-
echo "[Delimit OS] Starting autonomous build loop..."
|
|
66
|
-
echo "Checking ledger for next task..."
|
|
67
|
-
cd "$DELIMIT_HOME/server" && python3 -c "
|
|
68
|
-
from ai.ledger_manager import get_context
|
|
69
|
-
import json
|
|
70
|
-
result = get_context()
|
|
71
|
-
items = result.get('next_up', [])
|
|
72
|
-
if items:
|
|
73
|
-
print(f'Next up: {items[0].get(\"id\", \"?\")} [{items[0].get(\"priority\", \"?\")}] {items[0].get(\"title\", \"?\")[:60]}')
|
|
74
|
-
print(f'Total open: {result.get(\"open_items\", 0)}')
|
|
75
|
-
else:
|
|
76
|
-
print('Ledger is clear — nothing to build.')
|
|
77
|
-
" 2>&1
|
|
78
|
-
;;
|
|
79
|
-
ask)
|
|
80
|
-
shift
|
|
81
|
-
QUERY="$*"
|
|
82
|
-
if [ -z "$QUERY" ]; then
|
|
83
|
-
echo "Usage: delimit ask <question>"
|
|
84
|
-
exit 1
|
|
85
|
-
fi
|
|
86
|
-
echo "[Delimit OS] Checking context..."
|
|
87
|
-
cd "$DELIMIT_HOME/server" && python3 -c "
|
|
88
|
-
from ai.ledger_manager import get_context
|
|
89
|
-
import json
|
|
90
|
-
result = get_context()
|
|
91
|
-
print(json.dumps(result, indent=2)[:2000])
|
|
92
|
-
" 2>&1
|
|
93
|
-
;;
|
|
94
|
-
status)
|
|
95
|
-
if [ -f "$GATEWAY/tui.py" ]; then
|
|
96
|
-
cd "$GATEWAY/.." && exec python3 -m ai.tui --quick
|
|
97
|
-
else
|
|
98
|
-
exec delimit-cli status
|
|
99
|
-
fi
|
|
100
|
-
;;
|
|
101
|
-
*)
|
|
102
|
-
# Pass through to delimit-cli for all other commands
|
|
103
|
-
exec delimit-cli "$@"
|
|
104
|
-
;;
|
|
105
|
-
esac
|