@deftai/directive-core 0.103.0 → 0.105.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/dist/authz/classify.js +682 -35
- package/dist/check/cached-orchestrator.d.ts +1 -1
- package/dist/check/cached-orchestrator.js +2 -2
- package/dist/check/gate-lists.d.ts +3 -2
- package/dist/check/gate-lists.js +5 -2
- package/dist/check/index.d.ts +1 -0
- package/dist/check/index.js +1 -0
- package/dist/check/named-cause.d.ts +1 -1
- package/dist/check/named-cause.js +33 -3
- package/dist/check/session-completed-ac.d.ts +39 -0
- package/dist/check/session-completed-ac.js +198 -0
- package/dist/codebase/default-extractor.d.ts +5 -0
- package/dist/codebase/default-extractor.js +7 -15
- package/dist/deposit/copy-tree.js +60 -0
- package/dist/deposit/python-free.js +26 -18
- package/dist/doctor/checks.d.ts +8 -0
- package/dist/doctor/checks.js +37 -25
- package/dist/doctor/doctor-state.d.ts +4 -0
- package/dist/doctor/doctor-state.js +7 -1
- package/dist/doctor/main.js +9 -14
- package/dist/doctor/types.d.ts +9 -0
- package/dist/fs/contained-write.d.ts +115 -1
- package/dist/fs/contained-write.js +242 -5
- package/dist/fs/mutation-ledger.d.ts +54 -0
- package/dist/fs/mutation-ledger.js +133 -0
- package/dist/fs/non-product-dirs.d.ts +79 -0
- package/dist/fs/non-product-dirs.js +96 -0
- package/dist/hooks/dispatcher.d.ts +3 -1
- package/dist/hooks/dispatcher.js +14 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/init-deposit/agent-hooks.js +17 -15
- package/dist/init-deposit/core-guard-pin-content.d.ts +7 -0
- package/dist/init-deposit/core-guard-pin-content.js +393 -0
- package/dist/init-deposit/gitignore.js +9 -0
- package/dist/init-deposit/hygiene.d.ts +47 -11
- package/dist/init-deposit/hygiene.js +172 -37
- package/dist/init-deposit/legacy-detect.js +6 -2
- package/dist/init-deposit/refresh.d.ts +21 -1
- package/dist/init-deposit/refresh.js +106 -9
- package/dist/init-deposit/scaffold.js +28 -279
- package/dist/init-deposit/slash-deposit.js +13 -7
- package/dist/init-deposit/xbrief-projections.d.ts +8 -1
- package/dist/init-deposit/xbrief-projections.js +24 -11
- package/dist/intake/clause-derivation.d.ts +74 -0
- package/dist/intake/clause-derivation.js +409 -0
- package/dist/intake/index.d.ts +1 -0
- package/dist/intake/index.js +1 -0
- package/dist/intake/issue-ingest.d.ts +3 -1
- package/dist/intake/issue-ingest.js +36 -43
- package/dist/lifecycle/completed-tracked-on-delivery.d.ts +5 -0
- package/dist/lifecycle/completed-tracked-on-delivery.js +85 -18
- package/dist/literal-acceptance/capture.d.ts +10 -0
- package/dist/literal-acceptance/capture.js +224 -75
- package/dist/literal-acceptance/evaluate.d.ts +29 -4
- package/dist/literal-acceptance/evaluate.js +70 -2
- package/dist/literal-acceptance/index.d.ts +3 -3
- package/dist/literal-acceptance/index.js +3 -3
- package/dist/literal-acceptance/safety.d.ts +41 -0
- package/dist/literal-acceptance/safety.js +126 -2
- package/dist/literal-acceptance/types.d.ts +8 -0
- package/dist/orphan-active/evaluate.d.ts +7 -1
- package/dist/orphan-active/evaluate.js +102 -23
- package/dist/platform/platform-capabilities.js +2 -3
- package/dist/policy/base-branch.d.ts +37 -0
- package/dist/policy/base-branch.js +114 -0
- package/dist/policy/branch-sync.d.ts +80 -0
- package/dist/policy/branch-sync.js +211 -0
- package/dist/policy/ceremony-dial-escalation.js +1 -0
- package/dist/policy/ceremony-dial.js +4 -14
- package/dist/policy/delivery-branch.d.ts +5 -3
- package/dist/policy/delivery-branch.js +7 -3
- package/dist/policy/file-size-thresholds.d.ts +24 -0
- package/dist/policy/file-size-thresholds.js +23 -0
- package/dist/policy/forge-outage-retry.d.ts +47 -0
- package/dist/policy/forge-outage-retry.js +157 -0
- package/dist/policy/index.d.ts +7 -0
- package/dist/policy/index.js +66 -7
- package/dist/policy/project-invariants.d.ts +50 -0
- package/dist/policy/project-invariants.js +205 -0
- package/dist/policy/sync-default.d.ts +129 -0
- package/dist/policy/sync-default.js +452 -0
- package/dist/policy/sync-max-files.d.ts +93 -0
- package/dist/policy/sync-max-files.js +192 -0
- package/dist/pr-monitor/absent-required.d.ts +11 -0
- package/dist/pr-monitor/absent-required.js +61 -0
- package/dist/pr-monitor/constants.d.ts +7 -0
- package/dist/pr-monitor/constants.js +7 -0
- package/dist/pr-monitor/index.d.ts +2 -1
- package/dist/pr-monitor/index.js +2 -1
- package/dist/pr-monitor/main.js +4 -0
- package/dist/pr-monitor/monitor.js +24 -1
- package/dist/pr-wait-mergeable/classify.js +6 -0
- package/dist/preflight/evaluate.d.ts +9 -0
- package/dist/preflight/evaluate.js +49 -1
- package/dist/preflight/index.d.ts +5 -1
- package/dist/preflight/index.js +2 -0
- package/dist/preflight/intended-placement.d.ts +62 -0
- package/dist/preflight/intended-placement.js +275 -0
- package/dist/preflight/project-invariants-gate.d.ts +29 -0
- package/dist/preflight/project-invariants-gate.js +82 -0
- package/dist/product-first-done-gate/acceptance-resolver.d.ts +128 -0
- package/dist/product-first-done-gate/acceptance-resolver.js +144 -0
- package/dist/product-first-done-gate/acceptance.d.ts +7 -4
- package/dist/product-first-done-gate/acceptance.js +79 -8
- package/dist/product-first-done-gate/empty-resolution.d.ts +5 -2
- package/dist/product-first-done-gate/empty-resolution.js +13 -2
- package/dist/product-first-done-gate/evaluate.d.ts +29 -0
- package/dist/product-first-done-gate/evaluate.js +307 -33
- package/dist/product-first-done-gate/index.d.ts +3 -1
- package/dist/product-first-done-gate/index.js +2 -1
- package/dist/release/build-dist.d.ts +101 -0
- package/dist/release/build-dist.js +428 -46
- package/dist/run-summary/emit.d.ts +50 -4
- package/dist/run-summary/emit.js +262 -26
- package/dist/run-summary/index.d.ts +3 -2
- package/dist/run-summary/index.js +2 -1
- package/dist/run-summary/session-id.d.ts +21 -0
- package/dist/run-summary/session-id.js +92 -0
- package/dist/run-summary/share.d.ts +1 -1
- package/dist/run-summary/share.js +2 -2
- package/dist/run-summary/types.d.ts +38 -6
- package/dist/run-summary/types.js +1 -0
- package/dist/scope/acceptance-activate-gate.d.ts +1 -1
- package/dist/scope/acceptance-activate-gate.js +4 -4
- package/dist/scope/acceptance-evidence.d.ts +27 -0
- package/dist/scope/acceptance-evidence.js +66 -0
- package/dist/scope/capacity-stamp.d.ts +2 -0
- package/dist/scope/capacity-stamp.js +4 -0
- package/dist/scope/delivery-evidence.d.ts +9 -3
- package/dist/scope/delivery-evidence.js +39 -27
- package/dist/scope/index.d.ts +1 -0
- package/dist/scope/index.js +1 -0
- package/dist/scope/parent-lineage.js +7 -6
- package/dist/scope/project-invariant-coverage.d.ts +54 -0
- package/dist/scope/project-invariant-coverage.js +322 -0
- package/dist/scope/transition.js +66 -4
- package/dist/scope-provenance/compare-intent.d.ts +27 -0
- package/dist/scope-provenance/compare-intent.js +233 -0
- package/dist/scope-provenance/digest.d.ts +18 -1
- package/dist/scope-provenance/digest.js +16 -11
- package/dist/scope-provenance/evaluate.d.ts +5 -1
- package/dist/scope-provenance/evaluate.js +64 -4
- package/dist/scope-provenance/extract-intent.d.ts +43 -0
- package/dist/scope-provenance/extract-intent.js +262 -0
- package/dist/scope-provenance/index.d.ts +7 -1
- package/dist/scope-provenance/index.js +7 -1
- package/dist/scope-provenance/intent-digest.d.ts +12 -0
- package/dist/scope-provenance/intent-digest.js +33 -0
- package/dist/scope-provenance/intent-evaluate.d.ts +43 -0
- package/dist/scope-provenance/intent-evaluate.js +149 -0
- package/dist/scope-provenance/json-tokenizer.d.ts +19 -0
- package/dist/scope-provenance/json-tokenizer.js +225 -0
- package/dist/scope-provenance/known-machine.d.ts +38 -0
- package/dist/scope-provenance/known-machine.js +157 -0
- package/dist/scope-provenance/mint-artifacts.d.ts +102 -0
- package/dist/scope-provenance/mint-artifacts.js +425 -0
- package/dist/session/ac-pass-banking.d.ts +4 -36
- package/dist/session/ac-pass-banking.js +30 -77
- package/dist/session/ac-pass-reuse.d.ts +53 -0
- package/dist/session/ac-pass-reuse.js +95 -0
- package/dist/session/ceremony-dial-evidence.d.ts +42 -0
- package/dist/session/ceremony-dial-evidence.js +194 -0
- package/dist/session/git.js +19 -4
- package/dist/session/index.d.ts +5 -0
- package/dist/session/index.js +5 -0
- package/dist/session/occupancy-stress-worker.d.ts +7 -0
- package/dist/session/occupancy-stress-worker.js +36 -0
- package/dist/session/occupancy.d.ts +97 -0
- package/dist/session/occupancy.js +422 -0
- package/dist/session/openclaw-soft-rebind-deposit.js +6 -6
- package/dist/session/product-state-hash.d.ts +26 -0
- package/dist/session/product-state-hash.js +683 -0
- package/dist/session/session-ready.d.ts +2 -0
- package/dist/session/session-ready.js +52 -30
- package/dist/session/session-start.d.ts +7 -0
- package/dist/session/session-start.js +88 -5
- package/dist/session/verify-ac-session-cache.d.ts +42 -0
- package/dist/session/verify-ac-session-cache.js +126 -0
- package/dist/session/verify-session-ritual.d.ts +5 -0
- package/dist/session/verify-session-ritual.js +9 -0
- package/dist/slash/openclaw-deposit.js +13 -9
- package/dist/slice/constants.d.ts +2 -2
- package/dist/slice/constants.js +2 -2
- package/dist/slice/existing.js +21 -4
- package/dist/slice/lock.d.ts +16 -1
- package/dist/slice/lock.js +137 -11
- package/dist/slice/record.d.ts +8 -5
- package/dist/slice/record.js +21 -13
- package/dist/story-ready/evaluate.d.ts +2 -0
- package/dist/story-ready/evaluate.js +13 -0
- package/dist/swarm/complete-cohort.d.ts +3 -0
- package/dist/swarm/complete-cohort.js +59 -11
- package/dist/swarm/finalize-cohort.js +33 -2
- package/dist/swarm/launch.d.ts +22 -0
- package/dist/swarm/launch.js +155 -0
- package/dist/swarm/routing-set-cli.d.ts +11 -1
- package/dist/swarm/routing-set-cli.js +13 -3
- package/dist/swarm/routing-verify.d.ts +12 -0
- package/dist/swarm/routing-verify.js +59 -20
- package/dist/swarm/routing.d.ts +14 -0
- package/dist/swarm/routing.js +53 -3
- package/dist/telemetry-coverage/evaluate.d.ts +42 -0
- package/dist/telemetry-coverage/evaluate.js +148 -0
- package/dist/telemetry-coverage/fake-trial.d.ts +45 -0
- package/dist/telemetry-coverage/fake-trial.js +204 -0
- package/dist/telemetry-coverage/index.d.ts +5 -0
- package/dist/telemetry-coverage/index.js +5 -0
- package/dist/telemetry-coverage/kinds.d.ts +19 -0
- package/dist/telemetry-coverage/kinds.js +54 -0
- package/dist/telemetry-coverage/scan-callers.d.ts +25 -0
- package/dist/telemetry-coverage/scan-callers.js +168 -0
- package/dist/triage/actions/index.js +4 -1
- package/dist/ts-check-lane/index.d.ts +3 -0
- package/dist/ts-check-lane/index.js +2 -0
- package/dist/ts-check-lane/progress-reporter.d.ts +17 -0
- package/dist/ts-check-lane/progress-reporter.js +38 -0
- package/dist/ts-check-lane/progress.d.ts +32 -0
- package/dist/ts-check-lane/progress.js +57 -0
- package/dist/ts-check-lane/run-lane.d.ts +3 -1
- package/dist/ts-check-lane/run-lane.js +8 -6
- package/dist/validate-content/validate-links.d.ts +8 -0
- package/dist/validate-content/validate-links.js +9 -15
- package/dist/value/feedback-file.js +12 -2
- package/dist/vbrief-build/index.d.ts +1 -0
- package/dist/vbrief-build/index.js +1 -0
- package/dist/vbrief-build/project-invariants-io.d.ts +16 -0
- package/dist/vbrief-build/project-invariants-io.js +41 -0
- package/dist/vbrief-reconcile/graph.js +18 -1
- package/dist/vbrief-reconcile/index.d.ts +3 -1
- package/dist/vbrief-reconcile/index.js +2 -1
- package/dist/vbrief-reconcile/origin-freshness.d.ts +44 -0
- package/dist/vbrief-reconcile/origin-freshness.js +221 -0
- package/dist/vbrief-reconcile/types.d.ts +13 -0
- package/dist/vbrief-reconcile/umbrellas.d.ts +14 -0
- package/dist/vbrief-reconcile/umbrellas.js +261 -26
- package/dist/vbrief-validate/index.d.ts +1 -1
- package/dist/vbrief-validate/index.js +1 -1
- package/dist/vbrief-validate/plan-hooks.d.ts +4 -0
- package/dist/vbrief-validate/plan-hooks.js +68 -0
- package/dist/verify-ac/evaluate.d.ts +7 -1
- package/dist/verify-ac/evaluate.js +34 -26
- package/dist/verify-ac/flag.d.ts +4 -0
- package/dist/verify-ac/flag.js +16 -0
- package/dist/verify-ac/index.d.ts +2 -2
- package/dist/verify-ac/index.js +2 -2
- package/dist/verify-source/contained-writes.js +2 -0
- package/dist/verify-source/index.d.ts +1 -0
- package/dist/verify-source/index.js +1 -0
- package/dist/verify-source/verify-stubs.d.ts +15 -1
- package/dist/verify-source/verify-stubs.js +20 -16
- package/dist/vitest-runner/win32-coverage-tmp-setup.d.ts +5 -6
- package/dist/vitest-runner/win32-coverage-tmp-setup.js +5 -6
- package/dist/xbrief-migrate/migrate-project.js +2 -5
- package/package.json +3 -3
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Captures stated acceptance.commands at intake; empty requires none_stated:true.
|
|
5
5
|
* Interoperates with #3267 plan.metadata.literal_acceptance_commands.
|
|
6
6
|
*/
|
|
7
|
-
import { type AcceptanceCommand, type PlanAcceptance } from "./types.js";
|
|
7
|
+
import { type AcceptanceCommand, type AcSourceRung, type PlanAcceptance } from "./types.js";
|
|
8
8
|
/** Validation errors for a plan.acceptance object (empty list = valid). */
|
|
9
9
|
export declare function validatePlanAcceptance(value: unknown): string[];
|
|
10
10
|
/**
|
|
@@ -15,11 +15,14 @@ export declare function readPlanAcceptance(plan: Record<string, unknown> | null
|
|
|
15
15
|
/** Attach a validated PlanAcceptance onto plan.acceptance + mirror to #3267 metadata. */
|
|
16
16
|
export declare function attachPlanAcceptance(plan: Record<string, unknown>, acceptance: PlanAcceptance): Record<string, unknown>;
|
|
17
17
|
/**
|
|
18
|
-
* Build plan.acceptance from intake capture (#3284).
|
|
19
|
-
* Stated
|
|
18
|
+
* Build plan.acceptance from intake capture (#3284 / #3396).
|
|
19
|
+
* Stated only when capture recorded a verbatim statement span.
|
|
20
20
|
* No stated commands → none_stated:true, source_rung:project_floor (until agent derives).
|
|
21
21
|
*/
|
|
22
|
-
export declare function buildAcceptanceFromIntakeCapture(capturedCommands: readonly AcceptanceCommand[]
|
|
22
|
+
export declare function buildAcceptanceFromIntakeCapture(capturedCommands: readonly AcceptanceCommand[], options?: {
|
|
23
|
+
readonly hasVerbatimStatementSpan?: boolean;
|
|
24
|
+
readonly previousRung?: AcSourceRung;
|
|
25
|
+
}): PlanAcceptance;
|
|
23
26
|
/** Stamp plan.acceptance from existing literal capture after issue ingest. */
|
|
24
27
|
export declare function stampAcceptanceFromLiteralCapture(plan: Record<string, unknown>): Record<string, unknown>;
|
|
25
28
|
//# sourceMappingURL=acceptance.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Captures stated acceptance.commands at intake; empty requires none_stated:true.
|
|
5
5
|
* Interoperates with #3267 plan.metadata.literal_acceptance_commands.
|
|
6
6
|
*/
|
|
7
|
-
import { attachLiteralAcceptanceCommands, readStoredLiteralAcceptanceCommands, } from "../literal-acceptance/index.js";
|
|
7
|
+
import { attachLiteralAcceptanceCommands, evaluateStampAcceptanceSafety, isNoopRefusalReason, isVerbatimStatementSpan, NOOP_ACCEPTANCE_REMEDIATION, readStoredLiteralAcceptanceCommands, } from "../literal-acceptance/index.js";
|
|
8
8
|
import { readAcceptanceClauses, serializeAcceptanceClauses } from "../verify-ac/clauses.js";
|
|
9
9
|
import { PLAN_ACCEPTANCE_KEY, } from "./types.js";
|
|
10
10
|
function asRecord(value) {
|
|
@@ -100,6 +100,12 @@ export function validatePlanAcceptance(value) {
|
|
|
100
100
|
errors.push("plan.acceptance: none_stated:true with source_rung:stated is contradictory " +
|
|
101
101
|
"(use source_rung:derived when commands are agent-authored under none_stated)");
|
|
102
102
|
}
|
|
103
|
+
for (const cmd of commands) {
|
|
104
|
+
const stamp = evaluateStampAcceptanceSafety({ commands: [{ command: cmd.command }] });
|
|
105
|
+
if (!stamp.ok && isNoopRefusalReason(stamp.reason)) {
|
|
106
|
+
errors.push(stamp.reason ?? NOOP_ACCEPTANCE_REMEDIATION);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
103
109
|
return errors;
|
|
104
110
|
}
|
|
105
111
|
/**
|
|
@@ -218,11 +224,11 @@ export function attachPlanAcceptance(plan, acceptance) {
|
|
|
218
224
|
return next;
|
|
219
225
|
}
|
|
220
226
|
/**
|
|
221
|
-
* Build plan.acceptance from intake capture (#3284).
|
|
222
|
-
* Stated
|
|
227
|
+
* Build plan.acceptance from intake capture (#3284 / #3396).
|
|
228
|
+
* Stated only when capture recorded a verbatim statement span.
|
|
223
229
|
* No stated commands → none_stated:true, source_rung:project_floor (until agent derives).
|
|
224
230
|
*/
|
|
225
|
-
export function buildAcceptanceFromIntakeCapture(capturedCommands) {
|
|
231
|
+
export function buildAcceptanceFromIntakeCapture(capturedCommands, options = {}) {
|
|
226
232
|
if (capturedCommands.length === 0) {
|
|
227
233
|
return {
|
|
228
234
|
commands: [],
|
|
@@ -231,17 +237,82 @@ export function buildAcceptanceFromIntakeCapture(capturedCommands) {
|
|
|
231
237
|
derived_reason: "no shell acceptance commands stated in task text; floor until agent derives AC (#3284 ladder)",
|
|
232
238
|
};
|
|
233
239
|
}
|
|
240
|
+
const stamp = evaluateStampAcceptanceSafety({
|
|
241
|
+
commands: capturedCommands.map((cmd) => ({ command: cmd.command })),
|
|
242
|
+
previousRung: options.previousRung,
|
|
243
|
+
});
|
|
244
|
+
if (!stamp.ok) {
|
|
245
|
+
throw new Error(stamp.reason ?? NOOP_ACCEPTANCE_REMEDIATION);
|
|
246
|
+
}
|
|
247
|
+
const sourceRung = options.hasVerbatimStatementSpan === true ? "stated" : "derived";
|
|
234
248
|
return {
|
|
235
249
|
commands: capturedCommands,
|
|
236
|
-
none_stated:
|
|
237
|
-
source_rung:
|
|
238
|
-
derived_reason:
|
|
250
|
+
none_stated: sourceRung !== "stated",
|
|
251
|
+
source_rung: sourceRung,
|
|
252
|
+
derived_reason: sourceRung === "stated"
|
|
253
|
+
? null
|
|
254
|
+
: "no recorded verbatim statement span; derived not stated (#3396)",
|
|
239
255
|
};
|
|
240
256
|
}
|
|
257
|
+
function rawStampCommandStrings(plan) {
|
|
258
|
+
const out = [];
|
|
259
|
+
const seen = new Set();
|
|
260
|
+
const push = (value) => {
|
|
261
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
262
|
+
const command = value.trim();
|
|
263
|
+
if (seen.has(command))
|
|
264
|
+
return;
|
|
265
|
+
seen.add(command);
|
|
266
|
+
out.push(command);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const rec = asRecord(value);
|
|
270
|
+
if (rec === null)
|
|
271
|
+
return;
|
|
272
|
+
const command = rec.command ?? rec.cmd ?? rec.shell;
|
|
273
|
+
if (isNonEmptyString(command)) {
|
|
274
|
+
const trimmed = command.trim();
|
|
275
|
+
if (seen.has(trimmed))
|
|
276
|
+
return;
|
|
277
|
+
seen.add(trimmed);
|
|
278
|
+
out.push(trimmed);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
const acceptance = asRecord(plan[PLAN_ACCEPTANCE_KEY]);
|
|
282
|
+
if (acceptance !== null && Array.isArray(acceptance.commands)) {
|
|
283
|
+
for (const entry of acceptance.commands) {
|
|
284
|
+
push(entry);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
const metadata = asRecord(plan.metadata);
|
|
288
|
+
if (metadata !== null) {
|
|
289
|
+
const explicit = metadata.literal_acceptance_commands ?? metadata.literalAcceptanceCommands;
|
|
290
|
+
if (Array.isArray(explicit)) {
|
|
291
|
+
for (const entry of explicit) {
|
|
292
|
+
push(entry);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return out;
|
|
297
|
+
}
|
|
241
298
|
/** Stamp plan.acceptance from existing literal capture after issue ingest. */
|
|
242
299
|
export function stampAcceptanceFromLiteralCapture(plan) {
|
|
300
|
+
const previous = asRecord(plan[PLAN_ACCEPTANCE_KEY]);
|
|
301
|
+
const previousRung = isAcSourceRung(previous?.source_rung) ? previous.source_rung : undefined;
|
|
302
|
+
const attempted = rawStampCommandStrings(plan);
|
|
303
|
+
const refuse = evaluateStampAcceptanceSafety({
|
|
304
|
+
commands: attempted.map((command) => ({ command })),
|
|
305
|
+
previousRung,
|
|
306
|
+
});
|
|
307
|
+
if (!refuse.ok) {
|
|
308
|
+
throw new Error(refuse.reason ?? NOOP_ACCEPTANCE_REMEDIATION);
|
|
309
|
+
}
|
|
243
310
|
const literal = readStoredLiteralAcceptanceCommands(plan);
|
|
244
|
-
const
|
|
311
|
+
const hasVerbatimStatementSpan = literal.some((cmd) => cmd.source === "task_statement" && isVerbatimStatementSpan(cmd.sourceSpan ?? null));
|
|
312
|
+
const acceptance = buildAcceptanceFromIntakeCapture(literal.map(literalToAcceptance), {
|
|
313
|
+
hasVerbatimStatementSpan,
|
|
314
|
+
previousRung,
|
|
315
|
+
});
|
|
245
316
|
// Avoid re-mirroring task_statement into verify_commands (ingest strips those).
|
|
246
317
|
const serializable = {
|
|
247
318
|
commands: acceptance.commands.map((c) => {
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
import type { PlanAcceptance } from "./types.js";
|
|
8
8
|
export declare const EMPTY_AC_OUTCOME: "soft_empty";
|
|
9
9
|
export declare const EMPTY_AC_CAUSE = "no acceptance stamped \u2014 floor is empty in this project";
|
|
10
|
-
export declare const EMPTY_AC_REMEDY = "stamp plan.acceptance (
|
|
11
|
-
export
|
|
10
|
+
export declare const EMPTY_AC_REMEDY = "stamp plan.acceptance via clause derivation (scope:activate / scope:promote runs #3323, or task issue:ingest)";
|
|
11
|
+
export declare const TRANSCRIPT_EMPTY_CAUSE = "transcript skip left zero captured commands";
|
|
12
|
+
export declare const TRANSCRIPT_EMPTY_REMEDY = "stamp real acceptance commands; suite-floor empty-pass does not apply when a transcript fence dropped prompt lines (#3511)";
|
|
13
|
+
export type VerifyAcResolution = "verified-pass" | "empty-pass" | "soft_empty" | "fail" | "config" | "skipped" | "rejected-noop";
|
|
12
14
|
/** True when this project check composition includes a suite gate (#3188). */
|
|
13
15
|
export declare function projectHasSuiteFloor(projectRoot: string): boolean;
|
|
14
16
|
export declare function isSoftEmptyAcText(text: string): boolean;
|
|
@@ -23,4 +25,5 @@ export interface EmptyAcResolutionInput {
|
|
|
23
25
|
/** Zero executable commands, no rejected/unpromoted ledger, not already classified. */
|
|
24
26
|
export declare function isEmptyAcResolution(input: EmptyAcResolutionInput): boolean;
|
|
25
27
|
export declare function formatSoftEmptyMessage(acceptance: PlanAcceptance, quiet?: boolean): string;
|
|
28
|
+
export declare function formatTranscriptEmptyMessage(acceptance: PlanAcceptance, quiet?: boolean): string;
|
|
26
29
|
//# sourceMappingURL=empty-resolution.d.ts.map
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
import { isFrameworkRepoRoot } from "../check/context.js";
|
|
8
8
|
export const EMPTY_AC_OUTCOME = "soft_empty";
|
|
9
9
|
export const EMPTY_AC_CAUSE = "no acceptance stamped — floor is empty in this project";
|
|
10
|
-
export const EMPTY_AC_REMEDY = "stamp plan.acceptance (
|
|
10
|
+
export const EMPTY_AC_REMEDY = "stamp plan.acceptance via clause derivation (scope:activate / scope:promote runs #3323, or task issue:ingest)";
|
|
11
|
+
export const TRANSCRIPT_EMPTY_CAUSE = "transcript skip left zero captured commands";
|
|
12
|
+
export const TRANSCRIPT_EMPTY_REMEDY = "stamp real acceptance commands; suite-floor empty-pass does not apply when a transcript fence dropped prompt lines (#3511)";
|
|
11
13
|
/** True when this project check composition includes a suite gate (#3188). */
|
|
12
14
|
export function projectHasSuiteFloor(projectRoot) {
|
|
13
15
|
return isFrameworkRepoRoot(projectRoot);
|
|
@@ -17,7 +19,9 @@ export function isSoftEmptyAcText(text) {
|
|
|
17
19
|
}
|
|
18
20
|
/** Zero executable commands, no rejected/unpromoted ledger, not already classified. */
|
|
19
21
|
export function isEmptyAcResolution(input) {
|
|
20
|
-
if (input.resolution === "config" ||
|
|
22
|
+
if (input.resolution === "config" ||
|
|
23
|
+
input.resolution === "skipped" ||
|
|
24
|
+
input.resolution === "rejected-noop") {
|
|
21
25
|
return false;
|
|
22
26
|
}
|
|
23
27
|
if (input.code === 2) {
|
|
@@ -35,4 +39,11 @@ export function formatSoftEmptyMessage(acceptance, quiet) {
|
|
|
35
39
|
return (`verify:ac ${EMPTY_AC_OUTCOME} (#3334) [rung=${acceptance.source_rung}]: ` +
|
|
36
40
|
`${EMPTY_AC_CAUSE}. ${EMPTY_AC_REMEDY}.`);
|
|
37
41
|
}
|
|
42
|
+
export function formatTranscriptEmptyMessage(acceptance, quiet) {
|
|
43
|
+
if (quiet) {
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
return (`verify:ac FAILED (#3511) [rung=${acceptance.source_rung}]: ` +
|
|
47
|
+
`${TRANSCRIPT_EMPTY_CAUSE}. ${TRANSCRIPT_EMPTY_REMEDY}.`);
|
|
48
|
+
}
|
|
38
49
|
//# sourceMappingURL=empty-resolution.js.map
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* floor, empty resolution is soft_empty — not a green run (#3334).
|
|
9
9
|
*/
|
|
10
10
|
import { type EvaluateLiteralAcceptanceOptions, type LiteralAcceptanceGateResult } from "../literal-acceptance/index.js";
|
|
11
|
+
import { type AcceptanceRunSummaryOutcome } from "../run-summary/index.js";
|
|
12
|
+
import { type AcServedFrom } from "../session/verify-ac-session-cache.js";
|
|
11
13
|
import { type ClauseWalkResult } from "../verify-ac/clauses.js";
|
|
12
14
|
import { type VerifyAcResolution } from "./empty-resolution.js";
|
|
13
15
|
import type { AcSourceRung, PlanAcceptance } from "./types.js";
|
|
@@ -19,6 +21,8 @@ export interface VerifyAcResult extends LiteralAcceptanceGateResult {
|
|
|
19
21
|
readonly resolvedCommandCount: number;
|
|
20
22
|
readonly clauseOutcomes?: readonly ClauseWalkResult[];
|
|
21
23
|
readonly clauseWalked?: boolean;
|
|
24
|
+
/** How the result was obtained (#3387). */
|
|
25
|
+
readonly servedFrom?: AcServedFrom;
|
|
22
26
|
}
|
|
23
27
|
export interface EvaluateVerifyAcOptions extends EvaluateLiteralAcceptanceOptions {
|
|
24
28
|
/**
|
|
@@ -62,17 +66,42 @@ export interface EvaluateVerifyAcOptions extends EvaluateLiteralAcceptanceOption
|
|
|
62
66
|
* emit after the #3285 bank checkpoint.
|
|
63
67
|
*/
|
|
64
68
|
readonly skipAcceptanceEmit?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Raw plan.acceptance as observed on the brief (#3355). Distinct from the
|
|
71
|
+
* synthesized floor: stamp only when the plan actually carries a block.
|
|
72
|
+
*/
|
|
73
|
+
readonly observedAcceptance?: unknown;
|
|
65
74
|
/**
|
|
66
75
|
* Active scope key for product-oracle check_id namespacing (#3337).
|
|
67
76
|
* Prefer plan.id; path stem when id is missing. Multi-active verify:ac
|
|
68
77
|
* under one session must not share a single global `verify:ac` check id.
|
|
69
78
|
*/
|
|
70
79
|
readonly oracleScopeKey?: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* Reuse a matching #3285 bank / same-session cache (#3387).
|
|
82
|
+
* - auto (default): cache then bank
|
|
83
|
+
* - bank: complete walk — bank only
|
|
84
|
+
* - never: always execute
|
|
85
|
+
*/
|
|
86
|
+
readonly reuseMode?: "auto" | "bank" | "never";
|
|
87
|
+
readonly sessionId?: string | null;
|
|
88
|
+
readonly productPaths?: readonly string[];
|
|
71
89
|
}
|
|
72
90
|
/**
|
|
73
91
|
* Evaluate product AC from an in-memory plan.
|
|
74
92
|
*/
|
|
75
93
|
export declare function evaluateVerifyAcFromPlan(plan: Record<string, unknown>, options?: EvaluateVerifyAcOptions): VerifyAcResult;
|
|
94
|
+
/**
|
|
95
|
+
* CLI-only early returns that never reach evaluate still emit an acceptance
|
|
96
|
+
* outcome so field streams see config-error / soft-missing (#3355).
|
|
97
|
+
*/
|
|
98
|
+
export declare function emitVerifyAcTerminalOutcome(input: {
|
|
99
|
+
readonly projectRoot: string;
|
|
100
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
101
|
+
readonly outcome: AcceptanceRunSummaryOutcome;
|
|
102
|
+
readonly sourceRung?: AcSourceRung;
|
|
103
|
+
readonly noneStated?: boolean;
|
|
104
|
+
}): void;
|
|
76
105
|
/**
|
|
77
106
|
* Evaluate from xBRIEF path.
|
|
78
107
|
*/
|