arkgate 2.4.0 → 2.5.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 +20 -0
- package/README.md +2 -1
- package/dist/eslint/index.cjs +258 -23
- package/dist/eslint/index.cjs.map +1 -1
- package/dist/eslint/index.d.cts +38 -1
- package/dist/eslint/index.d.ts +38 -1
- package/dist/eslint/index.js +240 -22
- 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 +1 -1
- package/dist/index.d.ts +1 -1
- 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.js +1 -1
- package/dist/nestjs/index.js.map +1 -1
- package/docs/agent-guide.md +4 -3
- package/docs/ai-gates.md +15 -29
- package/package.json +1 -1
- package/server.json +2 -2
package/docs/agent-guide.md
CHANGED
|
@@ -338,7 +338,7 @@ layers, unclassified included files, unmatched layer patterns, duplicate layers,
|
|
|
338
338
|
that reference unknown layers. These are advisory by default. Use `--strict-config` once a
|
|
339
339
|
project is ready to fail CI on coverage gaps.
|
|
340
340
|
|
|
341
|
-
Use the optional ESLint plugin for fast local feedback:
|
|
341
|
+
Use the optional ESLint plugin for fast local feedback aligned with CI:
|
|
342
342
|
|
|
343
343
|
```js
|
|
344
344
|
import ark from 'arkgate/eslint';
|
|
@@ -348,8 +348,9 @@ export default [
|
|
|
348
348
|
];
|
|
349
349
|
```
|
|
350
350
|
|
|
351
|
-
Rules: `ark/no-domain-infra-imports
|
|
352
|
-
`ark/
|
|
351
|
+
Rules: `ark/no-domain-infra-imports` (layer edges from `ark.config.json`, same semantics as
|
|
352
|
+
`arkgate-check`), `ark/no-forbidden-globals` (per-layer `forbiddenGlobals`),
|
|
353
|
+
`ark/no-raw-event-publish`, and `ark/require-publish-source`. See [ai-gates.md](ai-gates.md).
|
|
353
354
|
|
|
354
355
|
## Runtime Observability
|
|
355
356
|
|
package/docs/ai-gates.md
CHANGED
|
@@ -283,47 +283,33 @@ If your runtime can run a shell command before file writes and pass the tool pay
|
|
|
283
283
|
- Grok payloads also get `{ "decision": "deny", "reason": "…" }` on stdout when blocked
|
|
284
284
|
- plumbing problems (no stdin, non-source files, files outside `--root`) never block
|
|
285
285
|
|
|
286
|
-
## ESLint (editor feedback)
|
|
286
|
+
## ESLint (editor feedback) — same contract as CI
|
|
287
287
|
|
|
288
|
-
For in-editor red squiggles
|
|
289
|
-
|
|
288
|
+
For in-editor red squiggles that match **`arkgate-check`**, add the ESLint plugin.
|
|
289
|
+
Layer imports and purity globals are driven by **`ark.config.json`** (walk-up from the
|
|
290
|
+
linted file): same layer globs, specificity, `exclude`, and `rules[]` edges as the CI gate.
|
|
290
291
|
|
|
291
292
|
```js
|
|
292
293
|
// eslint.config.js (flat config)
|
|
293
294
|
import ark from 'arkgate/eslint';
|
|
294
295
|
|
|
295
296
|
export default [
|
|
296
|
-
ark.configs.recommended,
|
|
297
|
+
ark.configs.recommended,
|
|
298
|
+
// no-domain-infra-imports → config-driven layer edges (type-only + value)
|
|
299
|
+
// no-forbidden-globals → layer.forbiddenGlobals from ark.config.json
|
|
300
|
+
// no-raw-event-publish + require-publish-source → runtime event hygiene
|
|
297
301
|
];
|
|
298
302
|
```
|
|
299
303
|
|
|
300
|
-
|
|
301
|
-
`fetch`, `Date.now`, `Math.random`, …). That rule is only correct when scoped to your
|
|
302
|
-
domain directories — a global block would flag legitimate infrastructure code. Add it
|
|
303
|
-
as its own block with a `files` glob matching your `DomainModel` layer:
|
|
304
|
-
|
|
305
|
-
```js
|
|
306
|
-
import ark from 'arkgate/eslint';
|
|
304
|
+
**Parity notes (2.5+):**
|
|
307
305
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
plugins: { ark },
|
|
313
|
-
rules: {
|
|
314
|
-
'ark/no-forbidden-globals': [
|
|
315
|
-
'error',
|
|
316
|
-
{ globals: ['fetch', 'process', 'Date.now', 'Math.random'] }, // match ark.config.json
|
|
317
|
-
],
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
];
|
|
321
|
-
```
|
|
306
|
+
- Relative imports are resolved to on-disk TS/JS targets; package bare imports are left to CI/TS.
|
|
307
|
+
- Type-only and value forbidden edges both error (same pass/fail as `arkgate-check`).
|
|
308
|
+
- `no-forbidden-globals` only applies when the file’s layer declares `forbiddenGlobals` (or you pass a `globals` option). Layers without a purity list are not inventively restricted.
|
|
309
|
+
- Without `ark.config.json`, `no-domain-infra-imports` falls back to a domain→infra path heuristic.
|
|
322
310
|
|
|
323
|
-
Rule ids are `ark/<kebab-name>`.
|
|
324
|
-
|
|
325
|
-
`ark-check` agree. All four rules are exported individually too (`ark.rules`) if you
|
|
326
|
-
prefer to wire them by hand.
|
|
311
|
+
Rule ids are `ark/<kebab-name>`. Individual rules are also on `ark.rules` if you wire them by hand.
|
|
312
|
+
Prefer keeping editor + CI on the same `ark.config.json` — do not maintain a parallel globals list unless you intentionally override.
|
|
327
313
|
|
|
328
314
|
## CI backstop
|
|
329
315
|
|
package/package.json
CHANGED
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.5.0",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.5.0",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|