arkgate 2.6.1 → 2.7.0
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/CHANGELOG.md +36 -0
- package/README.md +8 -3
- package/bin/ark-check.mjs +19 -993
- package/bin/ark-layer-match.mjs +148 -171
- package/bin/ark-shared.mjs +9 -159
- package/bin/lib/architecture-scan.mjs +279 -0
- package/bin/lib/ast-scan.mjs +199 -0
- package/bin/lib/baseline-key.mjs +23 -0
- package/bin/lib/config-warnings.mjs +228 -0
- package/bin/lib/graph-cycles.mjs +56 -0
- package/bin/lib/remediation.mjs +150 -0
- package/bin/lib/scan-files.mjs +69 -0
- package/bin/lib/ts-resolve.mjs +215 -0
- package/bin/lib/violations.mjs +3 -9
- package/dist/eslint/index.cjs +21 -3
- package/dist/eslint/index.cjs.map +1 -1
- package/dist/eslint/index.d.cts +5 -3
- package/dist/eslint/index.d.ts +5 -3
- package/dist/eslint/index.js +21 -3
- package/dist/eslint/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.cjs +1 -1
- package/dist/nestjs/index.cjs.map +1 -1
- package/dist/nestjs/index.d.cts +1 -1
- package/dist/nestjs/index.d.ts +1 -1
- package/dist/nestjs/index.js +1 -1
- package/dist/nestjs/index.js.map +1 -1
- package/dist/runtime/index.cjs +3080 -0
- package/dist/runtime/index.cjs.map +1 -0
- package/dist/runtime/index.d.cts +2 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +2998 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/{types-DpdVN7Lm.d.cts → types-CP3KkwZt.d.cts} +1 -1
- package/dist/{types-DpdVN7Lm.d.ts → types-CP3KkwZt.d.ts} +1 -1
- package/docs/agent-guide.md +4 -1
- package/docs/migrate-from-ark-runtime-kernel.md +4 -2
- package/docs/package-surface.md +72 -0
- package/docs/production-hardening.md +3 -0
- package/package.json +11 -1
- package/server.json +2 -2
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# ArkGate package surface policy
|
|
2
|
+
|
|
3
|
+
**Product wedge:** write gate · CI gate · co-pilot (plan / loop / skills).
|
|
4
|
+
**Not the wedge:** the optional in-process runtime kernel.
|
|
5
|
+
|
|
6
|
+
This document is the consumer contract for **what is stable** vs **what is opt-in**.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Stable surfaces (semver-supported)
|
|
11
|
+
|
|
12
|
+
| Surface | How you use it | Stability notes |
|
|
13
|
+
|---------|----------------|-----------------|
|
|
14
|
+
| **CLI** | `arkgate` / `arkgate-check` (aliases `ark` / `ark-check`) | Flags and human text may improve; **JSON output shapes** for `--json` (check, doctor, plan, coverage, recommend) are stable within a major. Additive fields OK; removals/renames are major. |
|
|
15
|
+
| **MCP tools** | `arkgate-mcp` / `ark://…` resources | Tool names and primary argument shapes are stable within a major. |
|
|
16
|
+
| **`ark.config.json`** | Layer globs, rules, include/exclude, forbiddenGlobals, intent prefixes | Schema fields documented in playbooks/examples are stable; new optional fields may appear. |
|
|
17
|
+
| **Agent skills** | `/ark-*` templates installed by `--install-agent-gates` | Skill *names* and “default flow” are stable; internal skill prose may evolve. |
|
|
18
|
+
| **ESLint subpath** | `arkgate/eslint` | Config-driven layer/import rules; loads consumer `ark.config.json`. |
|
|
19
|
+
| **GitHub Action** | `pedroknigge/arkgate` (see `action.yml`) | Inputs for running the check stay stable within a major. |
|
|
20
|
+
|
|
21
|
+
Gates need **no application code imports**. Most projects only use the CLI + MCP + config.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Opt-in surfaces
|
|
26
|
+
|
|
27
|
+
| Surface | Import path | Notes |
|
|
28
|
+
|---------|-------------|--------|
|
|
29
|
+
| **Runtime kernel** | **`arkgate/runtime`** (preferred) | Event bus, intents, policies, sagas, outbox, projections, `createArkKernel` / strict helpers. Optional. Not required for architecture enforcement. |
|
|
30
|
+
| **Root package barrel** | `arkgate` | Still re-exports the runtime kernel for **compatibility**. Prefer `arkgate/runtime` for new code. Root may be thinned in a future **major**. |
|
|
31
|
+
| **NestJS adapter** | `arkgate/nestjs` | Optional peer `@nestjs/common`. Wires a kernel into Nest DI. |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Recommended imports
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
// Preferred — opt-in runtime kernel
|
|
39
|
+
import {
|
|
40
|
+
createStrictArkKernel,
|
|
41
|
+
createStrictArkKernelFromConfig,
|
|
42
|
+
} from 'arkgate/runtime';
|
|
43
|
+
|
|
44
|
+
// Still works this major (compat; not preferred for new code)
|
|
45
|
+
import { createStrictArkKernel } from 'arkgate';
|
|
46
|
+
|
|
47
|
+
// Nest adapter
|
|
48
|
+
import { ArkModule, InjectArk } from 'arkgate/nestjs';
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
See [production-hardening.md](./production-hardening.md) for runtime operational guidance.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Explicitly unstable / internal
|
|
56
|
+
|
|
57
|
+
- `bin/lib/*` module layout and private helpers
|
|
58
|
+
- Generated `bin/ark-layer-match.mjs` (edit canonical `src/domain/layerMatch.ts` only)
|
|
59
|
+
- HTML report DOM structure (unless documented as a machine contract)
|
|
60
|
+
- Internal MCP diagnostic fields not listed in agent-guide
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Versioning summary
|
|
65
|
+
|
|
66
|
+
| Change | Version bump |
|
|
67
|
+
|--------|----------------|
|
|
68
|
+
| Break CLI JSON field, MCP tool rename, or required `ark.config` field | **major** |
|
|
69
|
+
| New optional config field, new CLI flag, additive JSON | **minor** |
|
|
70
|
+
| Bugfix with no contract change | **patch** |
|
|
71
|
+
| Prefer `arkgate/runtime` over root (docs only; root still exports) | **patch/minor** |
|
|
72
|
+
| Remove root kernel re-exports | **major** (with migration notes) |
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Production Hardening
|
|
2
2
|
|
|
3
|
+
The optional runtime kernel is imported from **`arkgate/runtime`** (preferred). See
|
|
4
|
+
[package-surface.md](package-surface.md).
|
|
5
|
+
|
|
3
6
|
Ark's built-in stores are intentionally in-memory defaults. They are appropriate for tests,
|
|
4
7
|
local development, examples, and single-process demos. Production systems should provide
|
|
5
8
|
stores that match their durability, ordering, retention, and operational requirements.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkgate",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "ArkGate — architecture co-pilot for AI TypeScript (write gate, CI gate, plan/loop)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
|
+
"./runtime": {
|
|
16
|
+
"types": "./dist/runtime/index.d.ts",
|
|
17
|
+
"import": "./dist/runtime/index.js",
|
|
18
|
+
"require": "./dist/runtime/index.cjs"
|
|
19
|
+
},
|
|
15
20
|
"./eslint": {
|
|
16
21
|
"types": "./dist/eslint/index.d.ts",
|
|
17
22
|
"import": "./dist/eslint/index.js",
|
|
@@ -46,6 +51,7 @@
|
|
|
46
51
|
"docs/ark-check-example.json",
|
|
47
52
|
"docs/assets",
|
|
48
53
|
"docs/brownfield-adoption.md",
|
|
54
|
+
"docs/package-surface.md",
|
|
49
55
|
"docs/production-hardening.md",
|
|
50
56
|
"tests/fixtures/ts-consumer",
|
|
51
57
|
"templates",
|
|
@@ -63,6 +69,10 @@
|
|
|
63
69
|
"typecheck": "tsc --noEmit",
|
|
64
70
|
"security:audit": "npm audit --omit=dev --audit-level=high",
|
|
65
71
|
"check:architecture": "node bin/ark-check.mjs --root . --config ark.config.json --strict-config",
|
|
72
|
+
"generate:layer-match": "node scripts/generate-layer-match.mjs",
|
|
73
|
+
"check:layer-match": "node scripts/generate-layer-match.mjs --check",
|
|
74
|
+
"generate:cli-pure": "node scripts/generate-cli-pure.mjs",
|
|
75
|
+
"check:cli-pure": "node scripts/generate-cli-pure.mjs --check",
|
|
66
76
|
"test:ts-compat": "node scripts/ts-compat-matrix.mjs 5.9.3 && node scripts/ts-compat-matrix.mjs 6.0.3 && node scripts/ts-compat-matrix.mjs 7.0.2",
|
|
67
77
|
"eval:agent": "node eval/run.mjs",
|
|
68
78
|
"eval:comparative": "node eval/comparative-run.mjs",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/pedroknigge/arkgate",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.7.0",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.7.0",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|