arkgate 2.12.0 → 3.0.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 +122 -0
- package/README.md +90 -51
- package/bin/ark-check.mjs +156 -39
- package/bin/ark-mcp.mjs +119 -6
- package/bin/ark-shared.mjs +216 -129
- package/bin/ark.mjs +134 -34
- package/bin/lib/adapter-contract.mjs +93 -0
- package/bin/lib/agent-gates.mjs +13 -0
- package/bin/lib/analysis-engine.mjs +1171 -0
- package/bin/lib/architecture-scan.mjs +84 -127
- package/bin/lib/ci-and-commands.mjs +40 -3
- package/bin/lib/codex-home.mjs +7 -0
- package/bin/lib/config-contract.mjs +331 -0
- package/bin/lib/config-warnings.mjs +7 -205
- package/bin/lib/doctor-plan.mjs +43 -16
- package/bin/lib/enforcement-profiles.mjs +97 -0
- package/bin/lib/field-install.mjs +67 -10
- package/bin/lib/gate-files.mjs +42 -3
- package/bin/lib/graph-cycles.mjs +4 -54
- package/bin/lib/hook-templates.mjs +33 -1
- package/bin/lib/host-support-matrix.mjs +83 -0
- package/bin/lib/install-migrate.mjs +99 -30
- package/bin/lib/mcp-adoption.mjs +35 -3
- package/bin/lib/open-html.mjs +75 -0
- package/bin/lib/presets.mjs +45 -4
- package/bin/lib/safety-diagnostics.mjs +36 -15
- package/bin/lib/scan-files.mjs +12 -1
- package/bin/lib/skill-install.mjs +72 -1
- package/bin/lib/source-policy.mjs +36 -0
- package/bin/lib/start-preview.mjs +271 -0
- package/bin/lib/ts-resolve.mjs +13 -3
- package/bin/lib/weakest-link.mjs +417 -0
- package/bin/lib/write-path-capabilities.mjs +186 -0
- package/bin/lib/write-path-detect.mjs +62 -99
- package/compat/nestjs.cjs +2 -0
- package/compat/nestjs.d.ts +2 -0
- package/compat/nestjs.js +1 -0
- package/compat/runtime.cjs +2 -0
- package/compat/runtime.d.ts +2 -0
- package/compat/runtime.js +1 -0
- package/dist/configContract-BxSIwVRo.d.cts +259 -0
- package/dist/configContract-BxSIwVRo.d.ts +259 -0
- package/dist/eslint/index.cjs +500 -61
- package/dist/eslint/index.d.cts +36 -20
- package/dist/eslint/index.d.ts +36 -20
- package/dist/eslint/index.js +500 -61
- package/dist/index.cjs +1349 -2741
- package/dist/index.d.cts +449 -483
- package/dist/index.d.ts +449 -483
- package/dist/index.js +1325 -2687
- package/docs/agent-guide.md +58 -34
- package/docs/ai-gates.md +79 -21
- package/docs/configuration.md +97 -0
- package/docs/enthusiast/README.md +3 -3
- package/docs/enthusiast/how-to-agent-gates.md +7 -3
- package/docs/migrate-from-ark-runtime-kernel.md +5 -3
- package/docs/package-surface.md +19 -19
- package/docs/production-hardening.md +31 -5
- package/docs/threat-model.md +65 -0
- package/docs/typescript-support.md +30 -3
- package/package.json +46 -11
- package/schemas/ark.analysis-result.schema.json +91 -0
- package/schemas/ark.config.schema.json +750 -0
- package/server.json +2 -2
- package/templates/hooks/pre-commit-ark +37 -0
- package/templates/skills/ark-architect.md +3 -2
- package/templates/skills/ark-coverage.md +2 -2
- package/templates/skills/ark-runtime.md +8 -5
- package/templates/skills/ark-upgrade.md +36 -16
- package/tests/fixtures/ts-consumer/ark.config.json +2 -0
- package/dist/eslint/index.cjs.map +0 -1
- package/dist/eslint/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/nestjs/index.cjs +0 -2498
- package/dist/nestjs/index.cjs.map +0 -1
- package/dist/nestjs/index.d.cts +0 -22
- package/dist/nestjs/index.d.ts +0 -22
- package/dist/nestjs/index.js +0 -2474
- package/dist/nestjs/index.js.map +0 -1
- package/dist/runtime/index.cjs +0 -3352
- package/dist/runtime/index.cjs.map +0 -1
- package/dist/runtime/index.d.cts +0 -2
- package/dist/runtime/index.d.ts +0 -2
- package/dist/runtime/index.js +0 -3270
- package/dist/runtime/index.js.map +0 -1
- package/dist/types-BZ17b9i5.d.cts +0 -1068
- package/dist/types-BZ17b9i5.d.ts +0 -1068
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Production Hardening
|
|
2
2
|
|
|
3
|
-
The optional runtime kernel is
|
|
4
|
-
|
|
3
|
+
The optional runtime kernel is currently **experimental**. This page is a requirements checklist
|
|
4
|
+
for teams evaluating **`@arkgate/runtime`**, not a claim that the runtime is production-ready.
|
|
5
|
+
Static ArkGate adoption does not require it. See [package-surface.md](package-surface.md).
|
|
5
6
|
|
|
6
7
|
## Durability stance (R9)
|
|
7
8
|
|
|
@@ -18,11 +19,11 @@ stores that match their durability, ordering, retention, and operational require
|
|
|
18
19
|
These defaults do not survive process restarts:
|
|
19
20
|
|
|
20
21
|
- `InMemoryAuditStore`
|
|
21
|
-
- `InMemoryOutboxStore`
|
|
22
|
+
- `InMemoryEventBuffer` (`InMemoryOutboxStore` is a deprecated compatibility alias)
|
|
22
23
|
- `InMemoryReadModelStore`
|
|
23
24
|
- `InMemoryWorkflowStore`
|
|
24
25
|
|
|
25
|
-
Use them only when losing state is acceptable. JSDoc on `
|
|
26
|
+
Use them only when losing state is acceptable. JSDoc on `EventBufferStore`, `AuditStore`,
|
|
26
27
|
`ReadModelStore`, and `WorkflowStore` restates this stance at the type level.
|
|
27
28
|
|
|
28
29
|
## Production Store Checklist
|
|
@@ -42,12 +43,37 @@ passed as the third `execute` argument, but JavaScript cannot stop an operation
|
|
|
42
43
|
ignores that signal. Production steps must pass it to network/database clients and keep
|
|
43
44
|
external effects idempotent; otherwise work may finish after the workflow was marked failed.
|
|
44
45
|
|
|
46
|
+
### Workflow retry boundary
|
|
47
|
+
|
|
48
|
+
`RetryPolicy` applies only while `step.execute` is running, including a timeout from that
|
|
49
|
+
execution. Once `execute` resolves, ArkGate marks the step completed before saving the
|
|
50
|
+
snapshot and recording `workflow.step.completed`. If either post-effect operation fails, the
|
|
51
|
+
workflow enters its failure/compensation path; it does not execute the completed step again.
|
|
52
|
+
|
|
53
|
+
The same fail-closed rule applies when the final `workflow.completed` audit record fails:
|
|
54
|
+
completed steps are compensated when handlers exist, and the workflow ends failed. Production
|
|
55
|
+
effects and compensations must therefore be idempotent, and audit/snapshot stores must be
|
|
56
|
+
operational dependencies rather than best-effort telemetry.
|
|
57
|
+
|
|
58
|
+
### Required recovery semantics (not implemented by built-ins)
|
|
59
|
+
|
|
60
|
+
| Contract | Required definition before a production claim |
|
|
61
|
+
|----------|-----------------------------------------------|
|
|
62
|
+
| Workflow recovery | Persist the last committed step and effect id; restart resumes only from that checkpoint and never assumes an in-flight effect failed or succeeded without reconciliation. |
|
|
63
|
+
| Optimistic versioning | Every snapshot write carries the previously read version; conflicting writes fail without overwriting and the caller reloads before retrying. |
|
|
64
|
+
| Dispatcher leases | A claim records owner and expiry atomically; only the owner may acknowledge it, and takeover is allowed only after expiry. |
|
|
65
|
+
| Idempotent delivery | Every message/effect has a stable idempotency key retained for the full retry window; duplicate attempts return the prior outcome without repeating the effect. |
|
|
66
|
+
| Atomic handoff | Application state and dispatch record commit in one transaction. Without this guarantee the API must be called an event buffer, not an outbox. |
|
|
67
|
+
|
|
68
|
+
The experimental package supplies none of these persistence guarantees. Fault/restart matrices
|
|
69
|
+
must cover crashes before and after every transaction, effect, checkpoint, lease, and acknowledgement.
|
|
70
|
+
|
|
45
71
|
## Interface Targets
|
|
46
72
|
|
|
47
73
|
| Concern | Interface |
|
|
48
74
|
|---------|-----------|
|
|
49
75
|
| Audit records | `AuditStore` |
|
|
50
|
-
|
|
|
76
|
+
| Non-atomic dispatch buffer | `EventBufferStore` |
|
|
51
77
|
| Projection state | `ReadModelStore` |
|
|
52
78
|
| Workflow snapshots | `WorkflowStore` |
|
|
53
79
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Threat model — ArkGate (Q9)
|
|
2
|
+
|
|
3
|
+
**Scope:** architecture write/CI gates, agent hooks/MCP, and the experimental optional runtime.
|
|
4
|
+
**Not in scope:** full org identity platforms, browser XSS in consumer apps, or npm registry
|
|
5
|
+
infrastructure beyond how this package is published.
|
|
6
|
+
|
|
7
|
+
## Assets
|
|
8
|
+
|
|
9
|
+
| Asset | Why it matters |
|
|
10
|
+
|-------|----------------|
|
|
11
|
+
| `ark.config.json` contract | Defines what agents may import; weaken it → silent architectural debt |
|
|
12
|
+
| Write hook (`arkgate-mcp --hook`) | Hard local boundary only for installed/trusted Claude/Grok hook operations |
|
|
13
|
+
| CI `ark-check --strict-merge` | Repository check for every host; merge blocking requires a required status |
|
|
14
|
+
| Baselines (`.ark-baseline.json`) | Freezes debt; abuse silences real violations |
|
|
15
|
+
| Published npm tarball + Action SHA | Supply-chain integrity of the gate itself |
|
|
16
|
+
| Experimental runtime kernel | Event/saga state; InMemory is not durable |
|
|
17
|
+
|
|
18
|
+
## Actors
|
|
19
|
+
|
|
20
|
+
- **AI agent** (Claude / Cursor / Codex / Grok) with tool write access; see the
|
|
21
|
+
[canonical host support matrix](../README.md#host-enforcement-support)
|
|
22
|
+
- **Human developer** editing files outside hooks (IDE, git apply)
|
|
23
|
+
- **CI runner** on PRs / main
|
|
24
|
+
- **Maintainer / attacker** with publish or PR privileges
|
|
25
|
+
|
|
26
|
+
## Threats (STRIDE-light)
|
|
27
|
+
|
|
28
|
+
| ID | Threat | Impact | Mitigations (shipped) |
|
|
29
|
+
|----|--------|--------|------------------------|
|
|
30
|
+
| T1 | Agent bypasses hook (direct `fs` / alternate tool) | Ungoverned code lands | CI gate; optional pre-commit (Q3); doctor writePath honesty |
|
|
31
|
+
| T2 | Human commits without agent path | Same as T1 | `templates/hooks/pre-commit-ark`; branch protection + required check (Q3 external) |
|
|
32
|
+
| T3 | CI job missing / not required | Merge green without architecture | doctor `enforcement-ci-*` gaps; `--strict-merge` profile |
|
|
33
|
+
| T4 | Config weakened (`peerIsolation: false`, empty rules) | False green | safety diagnostics; false-green adoption detector |
|
|
34
|
+
| T5 | Baseline ratcheted open | Debt reintroduced | baseline unused/stale signals; occurrence keys |
|
|
35
|
+
| T6 | Dual MCP bin / wrong root | Gate points at wrong tree | migrate-commands; Codex fail-closed temp roots |
|
|
36
|
+
| T7 | Malicious dependency in publish | Compromised gate | signed tags, npm provenance, dependency-review, CodeQL, Semgrep, `verify-package-files` |
|
|
37
|
+
| T8 | Path traversal in hooks/check | Read/write outside project | root resolution + under-root import resolve |
|
|
38
|
+
| T9 | Runtime InMemory mistaken for durable | Data loss | durability stance docs + safety InMemory production detector |
|
|
39
|
+
| T10 | Repair payload silently applied | Unexpected rewrites | repair never writes; host must re-inject; exit 2 on deny |
|
|
40
|
+
|
|
41
|
+
## Trust boundaries
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Claude/Grok host --PreToolUse--> arkgate-mcp (hard matched-write boundary)
|
|
45
|
+
Any MCP host --tool call----> arkgate-mcp (advisory validation)
|
|
46
|
+
Human IDE --disk/git-----> working tree
|
|
47
|
+
working tree --PR-----------> CI ark-check --strict-merge
|
|
48
|
+
npm publish <-- signed tag --- GitHub Release + provenance
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Residual risk (accepted)
|
|
52
|
+
|
|
53
|
+
- Branch protection is **external GitHub state** — doctor reports honestly when unavailable.
|
|
54
|
+
- Full external adoption matrix (Q4) and independent ≥95 audit (Q10) are separate exit gates.
|
|
55
|
+
- Live multi-agent loop-cost remains optional (`ARK_EVAL_LOOP_LIVE`).
|
|
56
|
+
|
|
57
|
+
## Verification hooks
|
|
58
|
+
|
|
59
|
+
| Check | Command |
|
|
60
|
+
|-------|---------|
|
|
61
|
+
| Package allowlist | `node scripts/verify-package-files.mjs` |
|
|
62
|
+
| Module budgets | `node scripts/check-module-budgets.mjs` |
|
|
63
|
+
| Security CI | `.github/workflows/security.yml` |
|
|
64
|
+
| Audit (prod deps) | `npm run security:audit` |
|
|
65
|
+
| Architecture | `npm run check:architecture` |
|
|
@@ -32,7 +32,7 @@ itself; the CLI resolves it from the **project** first, then from the environmen
|
|
|
32
32
|
## How loading works
|
|
33
33
|
|
|
34
34
|
1. Prefer `require('typescript')` from the **project** root (when it has `sys` + AST + resolve).
|
|
35
|
-
2. If missing or **not API-compatible** (TS 7.0 version-only export, or incomplete host), fall back to **ArkGate’s own** `typescript` dependency (JS-API 5.x nested under the package), then bare `import('typescript')`.
|
|
35
|
+
2. If missing or **not API-compatible** (TS 7.0 version-only export, or incomplete host), fall back to **ArkGate’s own** `typescript` dependency (JS-API 5.x nested under the package), then bare `import('typescript')`.
|
|
36
36
|
3. If nothing usable is found:
|
|
37
37
|
- `--plan` still prints **coverage honesty** (no import graph)
|
|
38
38
|
- full check exits non-zero with an install hint
|
|
@@ -49,9 +49,9 @@ ARK_DEBUG_TS=1 npx arkgate-check --plan
|
|
|
49
49
|
TypeScript 7 is the **native (Go) compiler** generation. Important for tools like ArkGate:
|
|
50
50
|
|
|
51
51
|
- **`require('typescript')` on 7.0.x** exports only `{ version, versionMajorMinor }` — not `sys`, `createSourceFile`, or `resolveModuleName`.
|
|
52
|
-
- Unstable programmatic surfaces live under `typescript/unstable/*` (sync/async API, AST). They are **not** the classic TS 5/6 host ArkGate uses today.
|
|
52
|
+
- Unstable programmatic surfaces live under `typescript/unstable/*` (sync/async API, AST). They are **not** the classic TS 5/6 host ArkGate uses today.
|
|
53
53
|
- Stable **programmatic JS API** maturity continues over the 7.x line (Microsoft: full story into **7.1+**).
|
|
54
|
-
- When the project’s TypeScript is not API-compatible, ArkGate loads its **bundled JS-API dependency** (`typescript@^5.9`, nested under the package) so the write
|
|
54
|
+
- When the project’s TypeScript is not API-compatible, ArkGate loads its **bundled JS-API dependency** (`typescript@^5.9`, nested under the package) so the host write path and CI check keep working while you try TS 7 as the project compiler.
|
|
55
55
|
- Your **tsconfig** must follow TS 6/7 defaults (see below) or `tsc` / resolve can fail independently of ArkGate.
|
|
56
56
|
|
|
57
57
|
### tsconfig defaults that surprise teams (TS 6 → 7)
|
|
@@ -131,6 +131,33 @@ node scripts/ts-compat-matrix.mjs 7.0.2
|
|
|
131
131
|
| Gate uses native Go typechecker API exclusively | Not required; future if 7.1+ exposes a stable Node API we adopt |
|
|
132
132
|
| User tsconfigs with removed options still “just work” | User must migrate tsconfig (TS6/7); Ark reports resolve/parse failures clearly |
|
|
133
133
|
|
|
134
|
+
## Static-analysis soundness envelope
|
|
135
|
+
|
|
136
|
+
ArkGate uses the TypeScript compiler API to extract dependency and ambient-capability facts. The
|
|
137
|
+
same Kernel implementation feeds the library, CLI, MCP write gate, and AICodeGate bundle.
|
|
138
|
+
|
|
139
|
+
Dependency forms enforced when their module specifier is a string literal:
|
|
140
|
+
|
|
141
|
+
- ESM `import`, `import type`, side-effect imports, and `export ... from` / `export type ... from`;
|
|
142
|
+
- TypeScript `import x = require("...")`;
|
|
143
|
+
- unshadowed CommonJS `require("...")`;
|
|
144
|
+
- dynamic `import("...")`.
|
|
145
|
+
|
|
146
|
+
Non-literal `import(expr)` and unshadowed `require(expr)` are reported as unresolved. They are
|
|
147
|
+
advisory by default, fail with `--strict-config`, and may be reviewed at file granularity through
|
|
148
|
+
`dynamicImportAllowlist`. A locally declared `require` function is not treated as CommonJS.
|
|
149
|
+
|
|
150
|
+
Forbidden capabilities are resolved with single-file TypeScript symbols. Local variables,
|
|
151
|
+
parameters, and imports shadow ambient names; aliases such as `const Clock = Date`, explicit
|
|
152
|
+
`globalThis`, static bracket access, and object destructuring remain detectable. Resolution of
|
|
153
|
+
module paths then uses the nearest tsconfig/jsconfig compiler options, including path aliases,
|
|
154
|
+
project-local packages, workspaces, and symlinked workspace entries.
|
|
155
|
+
|
|
156
|
+
ArkGate intentionally does not claim soundness for runtime-generated module names, `eval`, custom
|
|
157
|
+
loader functions, proxy-based globals, dynamically computed property keys, or aliases mutated
|
|
158
|
+
after declaration. Those constructs must remain absent from governed pure layers or be handled by
|
|
159
|
+
an explicit project policy. Every newly discovered bypass is minimized into the adversarial corpus.
|
|
160
|
+
|
|
134
161
|
## Future (7.1+ programmatic API)
|
|
135
162
|
|
|
136
163
|
When Microsoft ships a stable Node API for native TypeScript 7.1+:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkgate",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.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",
|
|
@@ -13,19 +13,23 @@
|
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./runtime": {
|
|
16
|
-
"types": "./
|
|
17
|
-
"import": "./
|
|
18
|
-
"require": "./
|
|
16
|
+
"types": "./compat/runtime.d.ts",
|
|
17
|
+
"import": "./compat/runtime.js",
|
|
18
|
+
"require": "./compat/runtime.cjs"
|
|
19
19
|
},
|
|
20
20
|
"./eslint": {
|
|
21
21
|
"types": "./dist/eslint/index.d.ts",
|
|
22
22
|
"import": "./dist/eslint/index.js",
|
|
23
23
|
"require": "./dist/eslint/index.cjs"
|
|
24
24
|
},
|
|
25
|
+
"./schema": "./schemas/ark.config.schema.json",
|
|
26
|
+
"./schema/ark.config.schema.json": "./schemas/ark.config.schema.json",
|
|
27
|
+
"./schema/analysis-result": "./schemas/ark.analysis-result.schema.json",
|
|
28
|
+
"./schema/ark.analysis-result.schema.json": "./schemas/ark.analysis-result.schema.json",
|
|
25
29
|
"./nestjs": {
|
|
26
|
-
"types": "./
|
|
27
|
-
"import": "./
|
|
28
|
-
"require": "./
|
|
30
|
+
"types": "./compat/nestjs.d.ts",
|
|
31
|
+
"import": "./compat/nestjs.js",
|
|
32
|
+
"require": "./compat/nestjs.cjs"
|
|
29
33
|
},
|
|
30
34
|
"./package.json": "./package.json"
|
|
31
35
|
},
|
|
@@ -41,7 +45,9 @@
|
|
|
41
45
|
"files": [
|
|
42
46
|
"bin",
|
|
43
47
|
"bin/lib",
|
|
48
|
+
"compat",
|
|
44
49
|
"dist",
|
|
50
|
+
"schemas",
|
|
45
51
|
"docs/agent-guide.md",
|
|
46
52
|
"docs/enthusiast",
|
|
47
53
|
"docs/demos",
|
|
@@ -51,8 +57,10 @@
|
|
|
51
57
|
"docs/ark-check-example.json",
|
|
52
58
|
"docs/assets",
|
|
53
59
|
"docs/brownfield-adoption.md",
|
|
60
|
+
"docs/configuration.md",
|
|
54
61
|
"docs/package-surface.md",
|
|
55
62
|
"docs/production-hardening.md",
|
|
63
|
+
"docs/threat-model.md",
|
|
56
64
|
"tests/fixtures/ts-consumer",
|
|
57
65
|
"templates",
|
|
58
66
|
"server.json",
|
|
@@ -62,11 +70,23 @@
|
|
|
62
70
|
"LICENSE"
|
|
63
71
|
],
|
|
64
72
|
"scripts": {
|
|
65
|
-
"build": "tsup",
|
|
73
|
+
"build": "node scripts/clean-gate-dist.mjs && tsup",
|
|
74
|
+
"build:runtime": "tsup --config packages/runtime/tsup.config.ts",
|
|
66
75
|
"dev": "tsup --watch",
|
|
67
76
|
"test": "vitest",
|
|
68
77
|
"test:run": "vitest run",
|
|
69
|
-
"test:coverage": "vitest run --coverage --coverage.reporter=text-summary --coverage.reporter=json-summary",
|
|
78
|
+
"test:coverage": "npm run build && vitest run --coverage --coverage.reporter=text-summary --coverage.reporter=json-summary",
|
|
79
|
+
"test:mutation": "npm run build && stryker run && npm run check:mutation-groups",
|
|
80
|
+
"check:mutation-groups": "node scripts/check-mutation-groups.mjs",
|
|
81
|
+
"test:property": "vitest run tests/property",
|
|
82
|
+
"test:fuzz": "npm run build && ARK_FUZZ_CAMPAIGN=pr vitest run tests/fuzz",
|
|
83
|
+
"test:fuzz:extended": "npm run build && ARK_FUZZ_CAMPAIGN=extended vitest run tests/fuzz",
|
|
84
|
+
"test:confidence": "npm run test:coverage && npm run test:mutation",
|
|
85
|
+
"test:adapter-parity": "vitest run tests/unit/adapters/adapterParity.test.ts tests/unit/eslint/parity.test.ts",
|
|
86
|
+
"test:onboarding-matrix": "for shard in library/small library/medium library/large api/small api/medium api/large frontend/small frontend/medium frontend/large monorepo/small monorepo/medium monorepo/large; do O04_SHARD=$shard npm run test:onboarding-matrix:shard; done",
|
|
87
|
+
"test:onboarding-matrix:shard": "vitest run tests/unit/static-check/o04OnboardingMatrix.test.ts",
|
|
88
|
+
"test:gate-only": "vitest run tests/unit/static-check/arkCheck.test.ts tests/unit/mcp/arkMcp.test.ts tests/unit/eslint",
|
|
89
|
+
"test:package-isolation": "node scripts/smoke-package-isolation.mjs",
|
|
70
90
|
"typecheck": "tsc --noEmit",
|
|
71
91
|
"security:audit": "npm audit --omit=dev --audit-level=high",
|
|
72
92
|
"check:architecture": "node bin/ark-check.mjs --root . --config ark.config.json --strict",
|
|
@@ -75,6 +95,8 @@
|
|
|
75
95
|
"check:layer-match": "node scripts/generate-layer-match.mjs --check",
|
|
76
96
|
"generate:cli-pure": "node scripts/generate-cli-pure.mjs",
|
|
77
97
|
"check:cli-pure": "node scripts/generate-cli-pure.mjs --check",
|
|
98
|
+
"generate:analysis-engine": "node scripts/generate-analysis-engine.mjs",
|
|
99
|
+
"check:analysis-engine": "node scripts/generate-analysis-engine.mjs --check",
|
|
78
100
|
"check:gallery-starters": "node scripts/check-gallery-starters.mjs",
|
|
79
101
|
"generate:gallery-starters": "node scripts/check-gallery-starters.mjs --write",
|
|
80
102
|
"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",
|
|
@@ -82,6 +104,15 @@
|
|
|
82
104
|
"eval:corpus": "node eval/validate-corpus.mjs",
|
|
83
105
|
"eval:comparative": "node eval/comparative-run.mjs",
|
|
84
106
|
"eval:loop-cost": "node eval/loop-cost-run.mjs",
|
|
107
|
+
"eval:adoption": "node eval/adoption-run.mjs",
|
|
108
|
+
"test:adoption-harness": "vitest run tests/unit/eval/adoptionHarness.test.ts",
|
|
109
|
+
"bench:scale": "node scripts/ark-scale-bench.mjs",
|
|
110
|
+
"test:scale-bench": "npm run build && vitest run tests/unit/scripts/arkScaleBench.test.ts",
|
|
111
|
+
"check:module-budgets": "node scripts/check-module-budgets.mjs",
|
|
112
|
+
"check:package-files": "node scripts/verify-package-files.mjs",
|
|
113
|
+
"check:release-artifacts": "node scripts/verify-release-artifacts.mjs",
|
|
114
|
+
"test:release-artifacts": "vitest run tests/unit/scripts/verifyReleaseArtifacts.test.ts",
|
|
115
|
+
"audit:beta-exit": "node scripts/beta-exit-audit.mjs",
|
|
85
116
|
"clean": "rm -rf dist",
|
|
86
117
|
"release:npm": "node scripts/release-npm.mjs",
|
|
87
118
|
"prepack": "npm run build"
|
|
@@ -90,11 +121,11 @@
|
|
|
90
121
|
"typescript": "^5.9.3"
|
|
91
122
|
},
|
|
92
123
|
"peerDependencies": {
|
|
93
|
-
"@
|
|
124
|
+
"@arkgate/runtime": ">=0.1.0-experimental.0 <1",
|
|
94
125
|
"typescript": ">=5.0.0 <8"
|
|
95
126
|
},
|
|
96
127
|
"peerDependenciesMeta": {
|
|
97
|
-
"@
|
|
128
|
+
"@arkgate/runtime": {
|
|
98
129
|
"optional": true
|
|
99
130
|
},
|
|
100
131
|
"typescript": {
|
|
@@ -102,6 +133,7 @@
|
|
|
102
133
|
}
|
|
103
134
|
},
|
|
104
135
|
"overrides": {
|
|
136
|
+
"qs": "6.15.3",
|
|
105
137
|
"vite": "6.4.3",
|
|
106
138
|
"tsup": {
|
|
107
139
|
"esbuild": "0.28.1"
|
|
@@ -112,8 +144,11 @@
|
|
|
112
144
|
},
|
|
113
145
|
"devDependencies": {
|
|
114
146
|
"@nestjs/common": "^11.1.27",
|
|
147
|
+
"@stryker-mutator/core": "^9.6.1",
|
|
148
|
+
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
115
149
|
"@types/node": "^20.14.0",
|
|
116
150
|
"@vitest/coverage-v8": "^3.2.6",
|
|
151
|
+
"fast-check": "^4.9.0",
|
|
117
152
|
"reflect-metadata": "^0.2.2",
|
|
118
153
|
"rxjs": "^7.8.2",
|
|
119
154
|
"tsup": "^8.1.0",
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unpkg.com/arkgate@2/schemas/ark.analysis-result.schema.json",
|
|
4
|
+
"title": "ArkGate analysis result",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"valid",
|
|
10
|
+
"diagnostics"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"schemaVersion": {
|
|
14
|
+
"const": "1.0"
|
|
15
|
+
},
|
|
16
|
+
"valid": {
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
},
|
|
19
|
+
"diagnostics": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": [
|
|
25
|
+
"ruleId",
|
|
26
|
+
"severity",
|
|
27
|
+
"message",
|
|
28
|
+
"location",
|
|
29
|
+
"evidence"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"ruleId": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
},
|
|
36
|
+
"severity": {
|
|
37
|
+
"enum": [
|
|
38
|
+
"error",
|
|
39
|
+
"warning"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"message": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1
|
|
45
|
+
},
|
|
46
|
+
"location": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"required": [
|
|
50
|
+
"file",
|
|
51
|
+
"line",
|
|
52
|
+
"column"
|
|
53
|
+
],
|
|
54
|
+
"properties": {
|
|
55
|
+
"file": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
},
|
|
59
|
+
"line": {
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"minimum": 1
|
|
62
|
+
},
|
|
63
|
+
"column": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 1
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"evidence": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"properties": {
|
|
73
|
+
"target": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"fromLayer": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"toLayer": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"typeOnly": {
|
|
83
|
+
"type": "boolean"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|