@dzhechkov/harness-core 0.8.2 → 0.8.6
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/.dz-manifest.json +146 -58
- package/README.md +72 -2
- package/dist/cmd-usage.d.ts +148 -0
- package/dist/cmd-usage.d.ts.map +1 -0
- package/dist/cmd-usage.js +548 -0
- package/dist/cmd-usage.js.map +1 -0
- package/dist/compounding.d.ts +4 -0
- package/dist/compounding.d.ts.map +1 -1
- package/dist/compounding.js +6 -0
- package/dist/compounding.js.map +1 -1
- package/dist/contract-checklist.d.ts +123 -0
- package/dist/contract-checklist.d.ts.map +1 -0
- package/dist/contract-checklist.js +700 -0
- package/dist/contract-checklist.js.map +1 -0
- package/dist/feature-adr-checkpoints.d.ts +11 -2
- package/dist/feature-adr-checkpoints.d.ts.map +1 -1
- package/dist/feature-adr-checkpoints.js +37 -2
- package/dist/feature-adr-checkpoints.js.map +1 -1
- package/dist/feature-adr-routing.d.ts +58 -23
- package/dist/feature-adr-routing.d.ts.map +1 -1
- package/dist/feature-adr-routing.js +208 -59
- package/dist/feature-adr-routing.js.map +1 -1
- package/dist/guard.d.ts +25 -0
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +59 -1
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/loop-blobs.generated.js +8 -8
- package/dist/loop-blobs.generated.js.map +1 -1
- package/dist/loop-plan.d.ts +13 -1
- package/dist/loop-plan.d.ts.map +1 -1
- package/dist/loop-plan.js +15 -1
- package/dist/loop-plan.js.map +1 -1
- package/dist/loop-render.d.ts.map +1 -1
- package/dist/loop-render.js +51 -6
- package/dist/loop-render.js.map +1 -1
- package/dist/loop-trace.d.ts +20 -1
- package/dist/loop-trace.d.ts.map +1 -1
- package/dist/loop-trace.js +83 -1
- package/dist/loop-trace.js.map +1 -1
- package/dist/model-recommender.d.ts +8 -0
- package/dist/model-recommender.d.ts.map +1 -1
- package/dist/model-recommender.js +31 -4
- package/dist/model-recommender.js.map +1 -1
- package/dist/qe-bridge.d.ts.map +1 -1
- package/dist/qe-bridge.js +9 -0
- package/dist/qe-bridge.js.map +1 -1
- package/dist/restart-advisor.d.ts +103 -0
- package/dist/restart-advisor.d.ts.map +1 -0
- package/dist/restart-advisor.js +445 -0
- package/dist/restart-advisor.js.map +1 -0
- package/dist/slop-lint.d.ts +128 -0
- package/dist/slop-lint.d.ts.map +1 -0
- package/dist/slop-lint.js +607 -0
- package/dist/slop-lint.js.map +1 -0
- package/dist/workflow-run.d.ts.map +1 -1
- package/dist/workflow-run.js +18 -12
- package/dist/workflow-run.js.map +1 -1
- package/package.json +19 -15
- package/sbom.json +277 -57
- package/src/cmd-usage.ts +720 -0
- package/src/compounding.ts +13 -0
- package/src/contract-checklist.ts +973 -0
- package/src/deadwood-allowlist.json +80 -0
- package/src/feature-adr-checkpoints.ts +38 -2
- package/src/feature-adr-routing.ts +238 -55
- package/src/guard.ts +79 -1
- package/src/index.ts +81 -1
- package/src/loop-blobs.generated.ts +8 -8
- package/src/loop-plan.ts +36 -3
- package/src/loop-render.ts +50 -6
- package/src/loop-trace.ts +91 -2
- package/src/model-recommender.ts +35 -4
- package/src/qe-bridge.ts +9 -0
- package/src/restart-advisor.ts +579 -0
- package/src/slop-lint.ts +762 -0
- package/src/slop-markers.json +71 -0
- package/src/workflow-run.ts +18 -11
package/src/compounding.ts
CHANGED
|
@@ -173,6 +173,8 @@ export interface CompoundingFacts {
|
|
|
173
173
|
readonly nowTs: string;
|
|
174
174
|
/** The evidence logs themselves — verified as hash chains (feature event-chain, ADR-001). */
|
|
175
175
|
readonly evidenceLogs?: readonly EvidenceLogFact[];
|
|
176
|
+
/** Depth of the command-invocation corpus. `null` means no readable log, never zero-by-default. */
|
|
177
|
+
readonly cmdUsageDepthDays?: number | null;
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
// ── The report ──────────────────────────────────────────────────────
|
|
@@ -233,6 +235,8 @@ export interface InstrumentationHealth {
|
|
|
233
235
|
/** True when every provided log verifies. Vacuously true when none were provided — that is why
|
|
234
236
|
* {@link EvidenceChainHealth} carries the counts: "no logs" must not read like "all clean". */
|
|
235
237
|
readonly chainsOk: boolean;
|
|
238
|
+
/** Independent observer for deadwood's fail-open write leg; null means no readable evidence. */
|
|
239
|
+
readonly cmdUsageDepthDays: number | null;
|
|
236
240
|
}
|
|
237
241
|
|
|
238
242
|
export interface CompoundingReport {
|
|
@@ -357,6 +361,10 @@ export function assembleCompoundingReport(facts: CompoundingFacts): CompoundingR
|
|
|
357
361
|
applyLegLive: gapValid && gapMs <= APPLY_LEG_STALE_DAYS * 86_400_000,
|
|
358
362
|
chains,
|
|
359
363
|
chainsOk: chains.every((c) => c.ok),
|
|
364
|
+
cmdUsageDepthDays:
|
|
365
|
+
typeof facts.cmdUsageDepthDays === 'number' && Number.isFinite(facts.cmdUsageDepthDays)
|
|
366
|
+
? Math.max(0, facts.cmdUsageDepthDays)
|
|
367
|
+
: null,
|
|
360
368
|
};
|
|
361
369
|
|
|
362
370
|
const improvedRules = trajectory.filter((t) => t.improved).length;
|
|
@@ -405,6 +413,11 @@ export function renderCompoundingReport(r: CompoundingReport): string {
|
|
|
405
413
|
` · ${c.chained} chained · ${c.preChainPrefix} pre-chain (uncovered)`,
|
|
406
414
|
);
|
|
407
415
|
}
|
|
416
|
+
out.push(
|
|
417
|
+
` COMMAND USAGE: ${r.instrumentation.cmdUsageDepthDays === null
|
|
418
|
+
? 'INSUFFICIENT_DATA (no readable .dz/cmd-usage.jsonl)'
|
|
419
|
+
: `${Math.floor(r.instrumentation.cmdUsageDepthDays)}d history`}`,
|
|
420
|
+
);
|
|
408
421
|
if (r.instrumentation.chains.length > 0) out.push(` scope: ${EVENT_CHAIN_SCOPE}`);
|
|
409
422
|
out.push('');
|
|
410
423
|
out.push(` VERDICT: ${r.verdict}`);
|