arkgate 3.7.0 → 3.8.1
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 +113 -1145
- package/README.md +59 -19
- package/bin/ark-check-runtime.mjs +1598 -0
- package/bin/ark-check.mjs +32 -1565
- package/bin/ark-layer-match.mjs +9 -4
- package/bin/ark-mcp-runtime.mjs +1976 -0
- package/bin/ark-mcp.mjs +84 -1495
- package/bin/ark-shared.mjs +34 -38
- package/bin/ark.mjs +33 -66
- package/bin/lib/adapter-contract.mjs +161 -9
- package/bin/lib/agent-gates.mjs +1 -0
- package/bin/lib/analysis-completeness.mjs +28 -0
- package/bin/lib/analysis-engine.mjs +8 -8
- package/bin/lib/analysis-policy.mjs +27 -0
- package/bin/lib/architecture-scan.mjs +70 -357
- package/bin/lib/auto-patch.mjs +76 -8
- package/bin/lib/ci-and-commands.mjs +1 -1
- package/bin/lib/codex-home.mjs +43 -16
- package/bin/lib/design-delta.mjs +4 -0
- package/bin/lib/doctor-advisories.mjs +4 -3
- package/bin/lib/doctor-plan.mjs +40 -41
- package/bin/lib/enforcement-state.mjs +2 -0
- package/bin/lib/github-enforcement.mjs +443 -0
- package/bin/lib/hook-templates.mjs +12 -148
- package/bin/lib/html-report-advisories.mjs +1 -1
- package/bin/lib/html-report-depth.mjs +9 -0
- package/bin/lib/html-report.mjs +5 -5
- package/bin/lib/install-migrate.mjs +83 -79
- package/bin/lib/managed-upgrade.mjs +622 -0
- package/bin/lib/mcp-adoption.mjs +3 -1
- package/bin/lib/parse-health.mjs +6 -5
- package/bin/lib/port-proof.mjs +2 -2
- package/bin/lib/prepare-change.mjs +68 -38
- package/bin/lib/prepare-write.mjs +7 -1
- package/bin/lib/resident-doctor-client.mjs +55 -0
- package/bin/lib/resident-hook.mjs +247 -0
- package/bin/lib/resolved-candidate-facts.mjs +1160 -0
- package/bin/lib/scan-files.mjs +19 -6
- package/bin/lib/snippet-analysis.mjs +119 -0
- package/bin/lib/source-policy.mjs +24 -0
- package/bin/lib/typescript-host.mjs +15 -18
- package/bin/lib/unavailable-analysis.mjs +76 -0
- package/bin/lib/upgrade-command.mjs +115 -0
- package/bin/lib/weakest-link.mjs +21 -179
- package/bin/lib/write-path-capabilities.mjs +167 -16
- package/bin/lib/write-path-detect.mjs +3 -2
- package/dist/eslint/index.cjs +3 -3
- package/dist/eslint/index.d.ts +4 -1
- package/dist/eslint/index.js +3 -3
- package/dist/index.cjs +6 -6
- package/dist/index.d.ts +1111 -151
- package/dist/index.js +7 -7
- package/docs/agent-guide.md +106 -62
- package/docs/ai-gates.md +97 -16
- package/docs/configuration.md +3 -0
- package/docs/demos/01-write-gate-self-correction.md +2 -2
- package/docs/enthusiast/README.md +10 -10
- package/docs/enthusiast/how-to-gallery-starter.md +2 -2
- package/docs/enthusiast/reference-commands.md +18 -1
- package/docs/enthusiast/tutorial-first-project.md +2 -2
- package/docs/package-surface.md +98 -12
- package/docs/typescript-support.md +108 -37
- package/package.json +32 -4
- package/schemas/ark.analysis-result.schema.json +159 -2
- package/schemas/ark.design-delta.schema.json +1 -0
- package/schemas/ark.enforcement-state.schema.json +84 -0
- package/schemas/ark.resolved-candidate-facts.schema.json +1 -0
- package/server.json +2 -2
- package/templates/skills/ark-explore.md +5 -5
- package/templates/skills/ark-fix.md +1 -1
- package/templates/skills/ark-runtime.md +15 -8
- package/templates/skills/ark-upgrade.md +122 -182
- package/bin/lib/ai-velocity.mjs +0 -293
- package/bin/lib/graph-cycles.mjs +0 -6
- package/bin/lib/safety-diagnostics.mjs +0 -284
- package/bin/lib/ts-resolve.mjs +0 -228
- package/dist/configTypes-DAPvBqK6.d.cts +0 -61
- package/dist/eslint/index.d.cts +0 -146
- package/dist/index.d.cts +0 -986
package/bin/ark-layer-match.mjs
CHANGED
|
@@ -191,7 +191,9 @@ function resolveSliceFolders(rule, layerName, layers) {
|
|
|
191
191
|
* Same-layer is always allowed (historical short-circuit).
|
|
192
192
|
* - `peerIsolation: true` + `allowed: false`: deny only when importer and importee
|
|
193
193
|
* resolve to **different** slice ids (same or cross layer). Same-slice → allow.
|
|
194
|
-
* Missing paths or unclassifiable slices → fail-
|
|
194
|
+
* Missing paths, no slice folders, or unclassifiable slices → **fail-closed**
|
|
195
|
+
* (deny): isolation is configured, so insufficient evidence must not silently
|
|
196
|
+
* allow a possible cross-slice edge.
|
|
195
197
|
*/
|
|
196
198
|
export function findDeniedEdgeRule(rules, from, to, options) {
|
|
197
199
|
for (const rule of rules ?? []) {
|
|
@@ -202,15 +204,18 @@ export function findDeniedEdgeRule(rules, from, to, options) {
|
|
|
202
204
|
if (rule.peerIsolation) {
|
|
203
205
|
const fromPath = options?.fromPath;
|
|
204
206
|
const toPath = options?.toPath;
|
|
207
|
+
// Isolation is active: without both paths we cannot prove same-slice.
|
|
205
208
|
if (!fromPath || !toPath)
|
|
206
|
-
|
|
209
|
+
return rule;
|
|
207
210
|
const folders = resolveSliceFolders(rule, from, options?.layers);
|
|
211
|
+
// Configured isolation without classifiable folders cannot allow.
|
|
208
212
|
if (folders.length === 0)
|
|
209
|
-
|
|
213
|
+
return rule;
|
|
210
214
|
const fromSlice = sliceIdForPath(fromPath, folders);
|
|
211
215
|
const toSlice = sliceIdForPath(toPath, folders);
|
|
216
|
+
// Unclassifiable either side: cannot prove same-slice → deny.
|
|
212
217
|
if (!fromSlice || !toSlice)
|
|
213
|
-
|
|
218
|
+
return rule;
|
|
214
219
|
if (fromSlice !== toSlice)
|
|
215
220
|
return rule;
|
|
216
221
|
continue; // same slice: this peerIsolation rule does not deny
|