@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
|
@@ -64,7 +64,10 @@ function defaultIssueIngest() {
|
|
|
64
64
|
// Delegate to the native TS intake path (#2350). The legacy Python
|
|
65
65
|
// `scripts/issue_ingest.py` shell-out was orphaned when #1933 removed the
|
|
66
66
|
// Python surface, leaving `triage:accept` raising ModuleNotFoundError.
|
|
67
|
-
const [, path] = ingestSingleForAcceptTs(issueNumber, repo, { projectRoot });
|
|
67
|
+
const [, path, msg] = ingestSingleForAcceptTs(issueNumber, repo, { projectRoot });
|
|
68
|
+
if (typeof msg === "string" && msg.includes("\n")) {
|
|
69
|
+
process.stderr.write(`${msg}\n`);
|
|
70
|
+
}
|
|
68
71
|
return path;
|
|
69
72
|
},
|
|
70
73
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export type { ProgressLineSink, ProgressTick, WriteFlushedLineOptions, } from "./progress.js";
|
|
2
|
+
export { buildTestLaneCommand, formatProgressLine, nextProgressTick, PROGRESS_BAND_PERCENT, PROGRESS_REPORTER_RELATIVE_PATH, PROGRESS_UNIT, resolveTestLaneCommand, writeFlushedLine, } from "./progress.js";
|
|
3
|
+
export { TsCheckLaneProgressReporter } from "./progress-reporter.js";
|
|
1
4
|
export type { LaneRunner, ResolvePnpmOptions, RunnerResult, RunTsLaneOptions } from "./run-lane.js";
|
|
2
5
|
export { LANE_COMMANDS, resolvePnpm, runTsLane, SKIP_NOTICE, sanitizeTsLaneEnv, } from "./run-lane.js";
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
export { buildTestLaneCommand, formatProgressLine, nextProgressTick, PROGRESS_BAND_PERCENT, PROGRESS_REPORTER_RELATIVE_PATH, PROGRESS_UNIT, resolveTestLaneCommand, writeFlushedLine, } from "./progress.js";
|
|
2
|
+
export { TsCheckLaneProgressReporter } from "./progress-reporter.js";
|
|
1
3
|
export { LANE_COMMANDS, resolvePnpm, runTsLane, SKIP_NOTICE, sanitizeTsLaneEnv, } from "./run-lane.js";
|
|
2
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vitest reporter that emits coarse flushed progress for ts:check-lane (#3470).
|
|
3
|
+
*
|
|
4
|
+
* Wired from the lane via `--reporter` so vitest.config.ts stays unchanged.
|
|
5
|
+
* Does not print test names and does not change pass/fail.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TsCheckLaneProgressReporter {
|
|
8
|
+
private total;
|
|
9
|
+
private completed;
|
|
10
|
+
private lastEmittedPercent;
|
|
11
|
+
private readonly sink?;
|
|
12
|
+
constructor(sink?: unknown);
|
|
13
|
+
onTestRunStart(specifications?: ReadonlyArray<unknown>): void;
|
|
14
|
+
onTestModuleEnd(): void;
|
|
15
|
+
}
|
|
16
|
+
export default TsCheckLaneProgressReporter;
|
|
17
|
+
//# sourceMappingURL=progress-reporter.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vitest reporter that emits coarse flushed progress for ts:check-lane (#3470).
|
|
3
|
+
*
|
|
4
|
+
* Wired from the lane via `--reporter` so vitest.config.ts stays unchanged.
|
|
5
|
+
* Does not print test names and does not change pass/fail.
|
|
6
|
+
*/
|
|
7
|
+
import { formatProgressLine, nextProgressTick, writeFlushedLine, } from "./progress.js";
|
|
8
|
+
function isLineSink(value) {
|
|
9
|
+
return (typeof value === "object" &&
|
|
10
|
+
value !== null &&
|
|
11
|
+
typeof value.write === "function");
|
|
12
|
+
}
|
|
13
|
+
export class TsCheckLaneProgressReporter {
|
|
14
|
+
total = 0;
|
|
15
|
+
completed = 0;
|
|
16
|
+
lastEmittedPercent = 0;
|
|
17
|
+
sink;
|
|
18
|
+
constructor(sink) {
|
|
19
|
+
// Vitest constructs reporters with its options object; only tests pass a sink.
|
|
20
|
+
this.sink = isLineSink(sink) ? sink : undefined;
|
|
21
|
+
}
|
|
22
|
+
onTestRunStart(specifications = []) {
|
|
23
|
+
this.total = specifications.length;
|
|
24
|
+
this.completed = 0;
|
|
25
|
+
this.lastEmittedPercent = 0;
|
|
26
|
+
}
|
|
27
|
+
onTestModuleEnd() {
|
|
28
|
+
this.completed += 1;
|
|
29
|
+
const tick = nextProgressTick(this.completed, this.total, this.lastEmittedPercent);
|
|
30
|
+
if (tick === null) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.lastEmittedPercent = tick.percent;
|
|
34
|
+
writeFlushedLine(formatProgressLine(tick), this.sink);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export default TsCheckLaneProgressReporter;
|
|
38
|
+
//# sourceMappingURL=progress-reporter.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coarse percent/count ticks for ts:check-lane (#3470).
|
|
3
|
+
*
|
|
4
|
+
* Band math is independent of vitest so tests can cover cadence and flush
|
|
5
|
+
* without running the suite.
|
|
6
|
+
*/
|
|
7
|
+
/** Relative to the repo root; wired onto `pnpm run test` from the lane. */
|
|
8
|
+
export declare const PROGRESS_REPORTER_RELATIVE_PATH = "packages/core/src/ts-check-lane/progress-reporter.ts";
|
|
9
|
+
/** One line every 20% of known files -- coarse enough for a log snapshot. */
|
|
10
|
+
export declare const PROGRESS_BAND_PERCENT = 20;
|
|
11
|
+
export declare const PROGRESS_UNIT = "files";
|
|
12
|
+
export interface ProgressTick {
|
|
13
|
+
readonly percent: number;
|
|
14
|
+
readonly completed: number;
|
|
15
|
+
readonly total: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ProgressLineSink {
|
|
18
|
+
write(chunk: string): void;
|
|
19
|
+
flush?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function nextProgressTick(completed: number, total: number, lastEmittedPercent: number, bandPercent?: number): ProgressTick | null;
|
|
22
|
+
export declare function formatProgressLine(tick: ProgressTick, unit?: string): string;
|
|
23
|
+
export interface WriteFlushedLineOptions {
|
|
24
|
+
readonly fd?: number;
|
|
25
|
+
readonly syncWrite?: (fd: number, payload: string) => void;
|
|
26
|
+
}
|
|
27
|
+
/** writeSync so a non-TTY capture sees each tick immediately (#1353). */
|
|
28
|
+
export declare function writeFlushedLine(line: string, sink?: ProgressLineSink, options?: WriteFlushedLineOptions): void;
|
|
29
|
+
export declare function buildTestLaneCommand(reporterPath?: string): readonly string[];
|
|
30
|
+
/** Attach the reporter only when the source file is present (framework checkout). */
|
|
31
|
+
export declare function resolveTestLaneCommand(projectRoot: string, exists?: (path: string) => boolean): readonly string[];
|
|
32
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coarse percent/count ticks for ts:check-lane (#3470).
|
|
3
|
+
*
|
|
4
|
+
* Band math is independent of vitest so tests can cover cadence and flush
|
|
5
|
+
* without running the suite.
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, writeSync } from "node:fs";
|
|
8
|
+
import { join } from "node:path";
|
|
9
|
+
/** Relative to the repo root; wired onto `pnpm run test` from the lane. */
|
|
10
|
+
export const PROGRESS_REPORTER_RELATIVE_PATH = "packages/core/src/ts-check-lane/progress-reporter.ts";
|
|
11
|
+
/** One line every 20% of known files -- coarse enough for a log snapshot. */
|
|
12
|
+
export const PROGRESS_BAND_PERCENT = 20;
|
|
13
|
+
export const PROGRESS_UNIT = "files";
|
|
14
|
+
export function nextProgressTick(completed, total, lastEmittedPercent, bandPercent = PROGRESS_BAND_PERCENT) {
|
|
15
|
+
if (!Number.isFinite(completed) ||
|
|
16
|
+
!Number.isFinite(total) ||
|
|
17
|
+
!Number.isFinite(lastEmittedPercent)) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
if (total <= 0 || completed <= 0 || bandPercent <= 0) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const raw = Math.min(100, Math.floor((completed / total) * 100));
|
|
24
|
+
const band = Math.floor(raw / bandPercent) * bandPercent;
|
|
25
|
+
if (band < bandPercent || band <= lastEmittedPercent) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return { percent: band, completed, total };
|
|
29
|
+
}
|
|
30
|
+
export function formatProgressLine(tick, unit = PROGRESS_UNIT) {
|
|
31
|
+
return `ts:check-lane ${tick.percent}% (${tick.completed}/${tick.total} ${unit})`;
|
|
32
|
+
}
|
|
33
|
+
/** writeSync so a non-TTY capture sees each tick immediately (#1353). */
|
|
34
|
+
export function writeFlushedLine(line, sink, options = {}) {
|
|
35
|
+
const payload = line.endsWith("\n") ? line : `${line}\n`;
|
|
36
|
+
if (sink !== undefined && typeof sink.write === "function") {
|
|
37
|
+
sink.write(payload);
|
|
38
|
+
sink.flush?.();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const syncWrite = options.syncWrite ?? writeSync;
|
|
42
|
+
syncWrite(options.fd ?? 1, payload);
|
|
43
|
+
}
|
|
44
|
+
export function buildTestLaneCommand(reporterPath = PROGRESS_REPORTER_RELATIVE_PATH) {
|
|
45
|
+
// Do not insert a standalone "--": pnpm forwards it to vitest, which then
|
|
46
|
+
// treats later --reporter flags as file filters (#3470).
|
|
47
|
+
return ["run", "test", "--reporter", reporterPath, "--reporter", "default"];
|
|
48
|
+
}
|
|
49
|
+
/** Attach the reporter only when the source file is present (framework checkout). */
|
|
50
|
+
export function resolveTestLaneCommand(projectRoot, exists = existsSync) {
|
|
51
|
+
const reporterAbs = join(projectRoot, ...PROGRESS_REPORTER_RELATIVE_PATH.split("/"));
|
|
52
|
+
if (!exists(reporterAbs)) {
|
|
53
|
+
return ["run", "test"];
|
|
54
|
+
}
|
|
55
|
+
return buildTestLaneCommand();
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* Run order is deliberate: lint (cheapest, catches the biome class first),
|
|
21
21
|
* then build, then the test suite.
|
|
22
22
|
*/
|
|
23
|
-
export declare const LANE_COMMANDS: ReadonlyArray<readonly [
|
|
23
|
+
export declare const LANE_COMMANDS: ReadonlyArray<readonly string[]>;
|
|
24
24
|
export declare const SKIP_NOTICE: string;
|
|
25
25
|
/** Result of a single lane command invocation. Mirrors a subset of SpawnSyncReturns. */
|
|
26
26
|
export interface RunnerResult {
|
|
@@ -46,6 +46,8 @@ export interface RunTsLaneOptions {
|
|
|
46
46
|
* DEFT_RELEASE_PREFLIGHT (#2618). Defaults to process.env.
|
|
47
47
|
*/
|
|
48
48
|
readonly env?: NodeJS.ProcessEnv;
|
|
49
|
+
/** Injected reporter-file probe (defaults to existsSync). */
|
|
50
|
+
readonly reporterExists?: (path: string) => boolean;
|
|
49
51
|
}
|
|
50
52
|
/** Windows command shims (.cmd/.bat) need a shell; native executables do not. */
|
|
51
53
|
export declare function shouldUseShellForCommand(command: string, platform?: NodeJS.Platform): boolean;
|
|
@@ -21,6 +21,7 @@ import { existsSync } from "node:fs";
|
|
|
21
21
|
import { posix, win32 } from "node:path";
|
|
22
22
|
import { BRANCH_GATE_BYPASS_ENV, RELEASE_PREFLIGHT_ENV } from "../release/constants.js";
|
|
23
23
|
import { resolveCoverageDebtIssue } from "../vitest-runner/coverage-debt.js";
|
|
24
|
+
import { buildTestLaneCommand, resolveTestLaneCommand } from "./progress.js";
|
|
24
25
|
/** Release Step-5 vars that must not leak into vitest via inherited pnpm env (#2434). */
|
|
25
26
|
const TS_LANE_POISON_ENV_KEYS = [BRANCH_GATE_BYPASS_ENV, RELEASE_PREFLIGHT_ENV];
|
|
26
27
|
/**
|
|
@@ -30,7 +31,7 @@ const TS_LANE_POISON_ENV_KEYS = [BRANCH_GATE_BYPASS_ENV, RELEASE_PREFLIGHT_ENV];
|
|
|
30
31
|
export const LANE_COMMANDS = [
|
|
31
32
|
["run", "lint"],
|
|
32
33
|
["run", "build"],
|
|
33
|
-
|
|
34
|
+
buildTestLaneCommand(),
|
|
34
35
|
];
|
|
35
36
|
export const SKIP_NOTICE = "[ts:check-lane] pnpm not found on PATH -- skipping the TypeScript lane " +
|
|
36
37
|
"(build/lint/test). The TS engine stays validated by the dedicated CI job. " +
|
|
@@ -107,8 +108,9 @@ export function runTsLane(projectRoot, options) {
|
|
|
107
108
|
return 0;
|
|
108
109
|
}
|
|
109
110
|
for (const command of LANE_COMMANDS) {
|
|
110
|
-
const
|
|
111
|
-
|
|
111
|
+
const resolved = command[1] === "test" ? resolveTestLaneCommand(projectRoot, options.reporterExists) : command;
|
|
112
|
+
const argv = [pnpm, ...resolved];
|
|
113
|
+
// Soft-pass via lane-private env (vitest CAC rejects unknown CLI debt tokens).
|
|
112
114
|
// vitest.config reads DEFT_TS_LANE_COVERAGE_DEBT without DEFT_RELEASE_PREFLIGHT
|
|
113
115
|
// (sanitizeTsLaneEnv strips preflight). Refs #2573 / #2618.
|
|
114
116
|
const prevDebt = process.env.DEFT_TS_LANE_COVERAGE_DEBT;
|
|
@@ -137,14 +139,14 @@ export function runTsLane(projectRoot, options) {
|
|
|
137
139
|
// (non-zero) for a signal-killed process.
|
|
138
140
|
if (code === null) {
|
|
139
141
|
if (result.error) {
|
|
140
|
-
out(`[ts:check-lane] \`pnpm ${
|
|
142
|
+
out(`[ts:check-lane] \`pnpm ${resolved.join(" ")}\` failed to start: ${result.error.message}`);
|
|
141
143
|
return 1;
|
|
142
144
|
}
|
|
143
|
-
out(`[ts:check-lane] \`pnpm ${
|
|
145
|
+
out(`[ts:check-lane] \`pnpm ${resolved.join(" ")}\` was killed by ${result.signal ?? "a signal"} before exit -- treating as failure.`);
|
|
144
146
|
return 1;
|
|
145
147
|
}
|
|
146
148
|
if (code !== 0) {
|
|
147
|
-
out(`[ts:check-lane] \`pnpm ${
|
|
149
|
+
out(`[ts:check-lane] \`pnpm ${resolved.join(" ")}\` failed (exit ${code}).`);
|
|
148
150
|
return code;
|
|
149
151
|
}
|
|
150
152
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { EvaluateResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Shared "not product source" core (#3487) plus the two directories only the
|
|
4
|
+
* link walk skips: generated planning projections and `specs/`.
|
|
5
|
+
*
|
|
6
|
+
* Walking agent worktrees during release Step 5 / `task check` is pure
|
|
7
|
+
* wall-clock waste (#2953, #1656, #3481).
|
|
8
|
+
*/
|
|
9
|
+
export declare const EXCLUDE_DIRS: Set<string>;
|
|
2
10
|
export interface BrokenLink {
|
|
3
11
|
readonly file: string;
|
|
4
12
|
readonly line: number;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join, relative, resolve, sep } from "node:path";
|
|
3
|
+
import { NON_PRODUCT_DIRS } from "../fs/non-product-dirs.js";
|
|
3
4
|
import { extractLinkTargets, shouldSkipLinkTarget } from "./link-parser.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"specs",
|
|
13
|
-
// Swarm / agent worktrees are not framework content; walking them
|
|
14
|
-
// during release Step 5 / task check is pure wall-clock waste (#2953, #1656).
|
|
15
|
-
".deft-scratch",
|
|
16
|
-
// Legacy swarm worktree root name (pre-.deft-scratch layout).
|
|
17
|
-
"swarm-worktrees",
|
|
18
|
-
]);
|
|
5
|
+
/**
|
|
6
|
+
* Shared "not product source" core (#3487) plus the two directories only the
|
|
7
|
+
* link walk skips: generated planning projections and `specs/`.
|
|
8
|
+
*
|
|
9
|
+
* Walking agent worktrees during release Step 5 / `task check` is pure
|
|
10
|
+
* wall-clock waste (#2953, #1656, #3481).
|
|
11
|
+
*/
|
|
12
|
+
export const EXCLUDE_DIRS = new Set([...NON_PRODUCT_DIRS, ".planning", "specs"]);
|
|
19
13
|
function shouldSkipPath(parts) {
|
|
20
14
|
if (parts.some((p) => EXCLUDE_DIRS.has(p)))
|
|
21
15
|
return true;
|
|
@@ -235,10 +235,17 @@ export function runFeedbackFile(options) {
|
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
+
/** Join repeated --context values; schema stays `context?: string` (#3454). */
|
|
239
|
+
const CONTEXT_JOIN = "\n";
|
|
240
|
+
function appendContextValue(collected, value) {
|
|
241
|
+
if (typeof value === "string")
|
|
242
|
+
collected.push(value);
|
|
243
|
+
}
|
|
238
244
|
/** Parse argv for feedback:file. */
|
|
239
245
|
export function parseFeedbackFileArgs(argv) {
|
|
240
246
|
const out = {};
|
|
241
247
|
const positionals = [];
|
|
248
|
+
const contextValues = [];
|
|
242
249
|
for (let i = 0; i < argv.length; i += 1) {
|
|
243
250
|
const arg = argv[i];
|
|
244
251
|
if (arg === "--confirm")
|
|
@@ -254,10 +261,10 @@ export function parseFeedbackFileArgs(argv) {
|
|
|
254
261
|
out.summary = arg.slice("--summary=".length);
|
|
255
262
|
}
|
|
256
263
|
else if (arg === "--context") {
|
|
257
|
-
|
|
264
|
+
appendContextValue(contextValues, argv[++i]);
|
|
258
265
|
}
|
|
259
266
|
else if (arg?.startsWith("--context=")) {
|
|
260
|
-
|
|
267
|
+
appendContextValue(contextValues, arg.slice("--context=".length));
|
|
261
268
|
}
|
|
262
269
|
else if (arg === "--expected") {
|
|
263
270
|
out.expected = argv[++i];
|
|
@@ -302,6 +309,9 @@ export function parseFeedbackFileArgs(argv) {
|
|
|
302
309
|
if ((out.summary === undefined || out.summary.trim().length === 0) && positionals.length > 0) {
|
|
303
310
|
out.summary = positionals.join(" ");
|
|
304
311
|
}
|
|
312
|
+
if (contextValues.length > 0) {
|
|
313
|
+
out.context = contextValues.join(CONTEXT_JOIN);
|
|
314
|
+
}
|
|
305
315
|
return out;
|
|
306
316
|
}
|
|
307
317
|
/** CLI entry for feedback:file. */
|
|
@@ -4,6 +4,7 @@ export { pythonJsonPretty } from "./json.js";
|
|
|
4
4
|
export { cmdVbriefBuild, run, usage } from "./main.js";
|
|
5
5
|
export { PARITY_SCENARIO_NAMES, renderScenarioOutput, runParityScenario, SAMPLE_PROJECT_MD, SAMPLE_ROADMAP_MD, SAMPLE_SPEC_MD, SAMPLE_SPEC_VBRIEF, } from "./parity-scenarios.js";
|
|
6
6
|
export { atomicWriteProjectDefinition, loadProjectDefinitionForMutation, projectDefinitionMutationLock, projectDefinitionPath, } from "./project-definition-io.js";
|
|
7
|
+
export { loadProjectInvariants, parseProjectInvariantsField } from "./project-invariants-io.js";
|
|
7
8
|
export { buildScopeVbriefFromReconciled, defaultStatusForFolder, folderForStatus, migrationTimestamp, planStatusMatchesFolder, } from "./routing.js";
|
|
8
9
|
export { deriveOverviewNarrative, extractTechStack, firstProseParagraph, parseRoadmapItems, resolveRepoUrl, } from "./sources.js";
|
|
9
10
|
export { createSpeckitScopeVbrief, dependenciesForItem, edgeNodes, migrateSpeckitPlan, speckitIpIndex, speckitIpSlug, } from "./speckit.js";
|
|
@@ -4,6 +4,7 @@ export { pythonJsonPretty } from "./json.js";
|
|
|
4
4
|
export { cmdVbriefBuild, run, usage } from "./main.js";
|
|
5
5
|
export { PARITY_SCENARIO_NAMES, renderScenarioOutput, runParityScenario, SAMPLE_PROJECT_MD, SAMPLE_ROADMAP_MD, SAMPLE_SPEC_MD, SAMPLE_SPEC_VBRIEF, } from "./parity-scenarios.js";
|
|
6
6
|
export { atomicWriteProjectDefinition, loadProjectDefinitionForMutation, projectDefinitionMutationLock, projectDefinitionPath, } from "./project-definition-io.js";
|
|
7
|
+
export { loadProjectInvariants, parseProjectInvariantsField } from "./project-invariants-io.js";
|
|
7
8
|
export { buildScopeVbriefFromReconciled, defaultStatusForFolder, folderForStatus, migrationTimestamp, planStatusMatchesFolder, } from "./routing.js";
|
|
8
9
|
export { deriveOverviewNarrative, extractTechStack, firstProseParagraph, parseRoadmapItems, resolveRepoUrl, } from "./sources.js";
|
|
9
10
|
export { createSpeckitScopeVbrief, dependenciesForItem, edgeNodes, migrateSpeckitPlan, speckitIpIndex, speckitIpSlug, } from "./speckit.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PROJECT-DEFINITION IO for plan.policy.projectInvariants (#3425 Story A).
|
|
3
|
+
*/
|
|
4
|
+
import { type ProjectInvariant, type ProjectInvariantsResolved } from "../policy/project-invariants.js";
|
|
5
|
+
export interface LoadedProjectInvariants {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly resolved: ProjectInvariantsResolved;
|
|
8
|
+
readonly modulePathGlobs: Readonly<Record<string, readonly string[]>>;
|
|
9
|
+
}
|
|
10
|
+
/** Read and parse projectInvariants via the PROJECT-DEFINITION IO path. */
|
|
11
|
+
export declare function loadProjectInvariants(projectRoot: string): LoadedProjectInvariants;
|
|
12
|
+
export declare function parseProjectInvariantsField(raw: unknown): {
|
|
13
|
+
readonly invariants: readonly ProjectInvariant[];
|
|
14
|
+
readonly errors: readonly string[];
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=project-invariants-io.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PROJECT-DEFINITION IO for plan.policy.projectInvariants (#3425 Story A).
|
|
3
|
+
*/
|
|
4
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
5
|
+
import { extractModulePathGlobs, parseProjectInvariants, resolveProjectInvariantsFromData, } from "../policy/project-invariants.js";
|
|
6
|
+
import { projectDefinitionPath } from "./project-definition-io.js";
|
|
7
|
+
/** Read and parse projectInvariants via the PROJECT-DEFINITION IO path. */
|
|
8
|
+
export function loadProjectInvariants(projectRoot) {
|
|
9
|
+
const path = projectDefinitionPath(projectRoot);
|
|
10
|
+
if (!existsSync(path)) {
|
|
11
|
+
return {
|
|
12
|
+
path,
|
|
13
|
+
resolved: {
|
|
14
|
+
invariants: [],
|
|
15
|
+
source: "default",
|
|
16
|
+
error: `PROJECT-DEFINITION not found at ${path}`,
|
|
17
|
+
},
|
|
18
|
+
modulePathGlobs: {},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const data = JSON.parse(readFileSync(path, "utf8"));
|
|
23
|
+
return {
|
|
24
|
+
path,
|
|
25
|
+
resolved: resolveProjectInvariantsFromData(data),
|
|
26
|
+
modulePathGlobs: extractModulePathGlobs(data),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
31
|
+
return {
|
|
32
|
+
path,
|
|
33
|
+
resolved: { invariants: [], source: "default-on-error", error: msg },
|
|
34
|
+
modulePathGlobs: {},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function parseProjectInvariantsField(raw) {
|
|
39
|
+
return parseProjectInvariants(raw);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=project-invariants-io.js.map
|
|
@@ -34,6 +34,7 @@ export function reconcileGraph(projectRoot, options = {}) {
|
|
|
34
34
|
2,
|
|
35
35
|
{
|
|
36
36
|
promoted: [],
|
|
37
|
+
promotedNotices: [],
|
|
37
38
|
deferredWip: [],
|
|
38
39
|
waiting: [],
|
|
39
40
|
cycles: [],
|
|
@@ -62,6 +63,7 @@ export function reconcileGraph(projectRoot, options = {}) {
|
|
|
62
63
|
const [cap, count] = resolveWipState(root);
|
|
63
64
|
const outcome = {
|
|
64
65
|
promoted: [],
|
|
66
|
+
promotedNotices: [],
|
|
65
67
|
deferredWip: [],
|
|
66
68
|
waiting: [],
|
|
67
69
|
cycles: [],
|
|
@@ -105,6 +107,9 @@ export function reconcileGraph(projectRoot, options = {}) {
|
|
|
105
107
|
continue;
|
|
106
108
|
}
|
|
107
109
|
outcome.promoted.push(cand.storyId);
|
|
110
|
+
if (result.message.trim().length > 0) {
|
|
111
|
+
outcome.promotedNotices?.push({ story_id: cand.storyId, message: result.message });
|
|
112
|
+
}
|
|
108
113
|
runningCount += 1;
|
|
109
114
|
}
|
|
110
115
|
return [outcome.cycles.length > 0 ? 1 : 0, { ...outcome, count: runningCount }];
|
|
@@ -114,8 +119,16 @@ export function renderGraphReport(outcome) {
|
|
|
114
119
|
const suffix = outcome.dryRun ? " (dry-run)" : "";
|
|
115
120
|
lines.push(`Promoted${suffix}:`);
|
|
116
121
|
if (outcome.promoted.length > 0) {
|
|
117
|
-
|
|
122
|
+
const notices = new Map((outcome.promotedNotices ?? []).map((n) => [n.story_id, n.message]));
|
|
123
|
+
for (const id of outcome.promoted) {
|
|
118
124
|
lines.push(`- ${id}`);
|
|
125
|
+
const notice = notices.get(id);
|
|
126
|
+
if (notice !== undefined && notice.trim().length > 0) {
|
|
127
|
+
for (const line of notice.split(/\r?\n/)) {
|
|
128
|
+
lines.push(` ${line}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
119
132
|
}
|
|
120
133
|
else {
|
|
121
134
|
lines.push("- none");
|
|
@@ -159,6 +172,10 @@ export function renderGraphReport(outcome) {
|
|
|
159
172
|
export function graphOutcomeToJson(outcome) {
|
|
160
173
|
return {
|
|
161
174
|
promoted: [...outcome.promoted],
|
|
175
|
+
promoted_notices: (outcome.promotedNotices ?? []).map((n) => ({
|
|
176
|
+
story_id: n.story_id,
|
|
177
|
+
message: n.message,
|
|
178
|
+
})),
|
|
162
179
|
deferred_wip: [...outcome.deferredWip],
|
|
163
180
|
waiting: outcome.waiting.map((w) => ({ story_id: w.story_id, unresolved: w.unresolved })),
|
|
164
181
|
cycles: [...outcome.cycles],
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export { depResolved, graphOutcomeToJson, RESOLVED_FOLDERS, reconcileGraph, renderGraphReport, } from "./graph.js";
|
|
2
2
|
export { computeDesiredLabels, labelsOutcomeToJson, MANAGED_LABELS, reconcileLabels, renderLabelsReport, SCAN_FOLDERS, ScmLabelClient, ScmLabelError, } from "./labels.js";
|
|
3
3
|
export { cmdVbriefReconcile, run, usage } from "./main.js";
|
|
4
|
+
export type { EvaluateOriginFreshnessOptions, FetchOriginUpdatedAt, GithubIssueOrigin, OriginFreshnessKind, OriginFreshnessResult, } from "./origin-freshness.js";
|
|
5
|
+
export { briefUpdatedOf, compareOriginFreshness, evaluateOriginFreshness, extractGithubIssueOrigin, extractGithubIssueOrigins, fetchGithubIssueUpdatedAt, formatOriginStaleMessage, ORIGIN_FRESHNESS_REMEDIATION, } from "./origin-freshness.js";
|
|
4
6
|
export { PARITY_SCENARIO_NAMES, renderScenarioOutput, runParityScenario, } from "./parity-scenarios.js";
|
|
5
7
|
export { pyRepr } from "./py-repr.js";
|
|
6
8
|
export { buildSpecTaskIndex, detectStatusMarker, folderFromStatus, formatReconciliationMarkdown, hasDisagreement, loadOverrides, normalizeTaskId, OVERRIDES_FILENAME, parseOverridesYaml, reconcileScopeItems, writeReconciliationReport, } from "./reconciliation.js";
|
|
7
9
|
export { allScopeIds, asStrList, candidateDepGraph, candidateFromPath, markCycles, } from "./swarm-deps.js";
|
|
8
10
|
export type { Candidate, Child, ConflictEntry, ForgeIssueState, LabelChange, LabelClient, ReconciledItem, ReconcileGraphOutcome, ReconcileLabelsOutcome, ReconcileUmbrellasOutcome, ReconciliationReport, SpecTaskEntry, UmbrellaChange, UmbrellaClient, } from "./types.js";
|
|
9
|
-
export { buildChildIndex, CHILD_REF_TYPE, CLOSED_FOLDERS, childFromData, classifyPassType, computeChildren, computeWaves, indexChildrenByIssueNumber, isChildOpen, LIFECYCLE_FOLDERS, nowIso, OPEN_FOLDERS, parseCurrentShape, reconcileBodyChecklist, reconcileUmbrellas, renderBody, renderUmbrellasReport, ScmUmbrellaClient, UmbrellaScmError, UNKNOWN_FOLDER, umbrellasOutcomeToJson, } from "./umbrellas.js";
|
|
11
|
+
export { buildChildIndex, CHILD_REF_TYPE, CLOSED_FOLDERS, childFromData, childrenFromSliceRecord, classifyPassType, computeChildren, computeWaves, formatCloseComment, indexChildrenByIssueNumber, isChildOpen, LIFECYCLE_FOLDERS, nowIso, OPEN_FOLDERS, parseCurrentShape, reconcileBodyChecklist, reconcileUmbrellas, renderBody, renderUmbrellasReport, ScmUmbrellaClient, shouldCloseOnAllChildrenMerged, UmbrellaScmError, UNKNOWN_FOLDER, umbrellasOutcomeToJson, } from "./umbrellas.js";
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { depResolved, graphOutcomeToJson, RESOLVED_FOLDERS, reconcileGraph, renderGraphReport, } from "./graph.js";
|
|
2
2
|
export { computeDesiredLabels, labelsOutcomeToJson, MANAGED_LABELS, reconcileLabels, renderLabelsReport, SCAN_FOLDERS, ScmLabelClient, ScmLabelError, } from "./labels.js";
|
|
3
3
|
export { cmdVbriefReconcile, run, usage } from "./main.js";
|
|
4
|
+
export { briefUpdatedOf, compareOriginFreshness, evaluateOriginFreshness, extractGithubIssueOrigin, extractGithubIssueOrigins, fetchGithubIssueUpdatedAt, formatOriginStaleMessage, ORIGIN_FRESHNESS_REMEDIATION, } from "./origin-freshness.js";
|
|
4
5
|
export { PARITY_SCENARIO_NAMES, renderScenarioOutput, runParityScenario, } from "./parity-scenarios.js";
|
|
5
6
|
export { pyRepr } from "./py-repr.js";
|
|
6
7
|
export { buildSpecTaskIndex, detectStatusMarker, folderFromStatus, formatReconciliationMarkdown, hasDisagreement, loadOverrides, normalizeTaskId, OVERRIDES_FILENAME, parseOverridesYaml, reconcileScopeItems, writeReconciliationReport, } from "./reconciliation.js";
|
|
7
8
|
export { allScopeIds, asStrList, candidateDepGraph, candidateFromPath, markCycles, } from "./swarm-deps.js";
|
|
8
|
-
export { buildChildIndex, CHILD_REF_TYPE, CLOSED_FOLDERS, childFromData, classifyPassType, computeChildren, computeWaves, indexChildrenByIssueNumber, isChildOpen, LIFECYCLE_FOLDERS, nowIso, OPEN_FOLDERS, parseCurrentShape, reconcileBodyChecklist, reconcileUmbrellas, renderBody, renderUmbrellasReport, ScmUmbrellaClient, UmbrellaScmError, UNKNOWN_FOLDER, umbrellasOutcomeToJson, } from "./umbrellas.js";
|
|
9
|
+
export { buildChildIndex, CHILD_REF_TYPE, CLOSED_FOLDERS, childFromData, childrenFromSliceRecord, classifyPassType, computeChildren, computeWaves, formatCloseComment, indexChildrenByIssueNumber, isChildOpen, LIFECYCLE_FOLDERS, nowIso, OPEN_FOLDERS, parseCurrentShape, reconcileBodyChecklist, reconcileUmbrellas, renderBody, renderUmbrellasReport, ScmUmbrellaClient, shouldCloseOnAllChildrenMerged, UmbrellaScmError, UNKNOWN_FOLDER, umbrellasOutcomeToJson, } from "./umbrellas.js";
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type CallOptions, type CompletedProcess } from "../scm/call.js";
|
|
2
|
+
export declare const ORIGIN_FRESHNESS_REMEDIATION = "Re-read the issue body and comments (#2143), then either refresh the brief or record intentional divergence and bump xBRIEFInfo.updated. Do not auto-write origin text onto the brief (#309 D12).";
|
|
3
|
+
export type OriginFreshnessKind = "no-origin" | "current" | "stale" | "uncomparable";
|
|
4
|
+
export interface GithubIssueOrigin {
|
|
5
|
+
readonly owner: string;
|
|
6
|
+
readonly repo: string;
|
|
7
|
+
readonly number: number;
|
|
8
|
+
readonly uri: string;
|
|
9
|
+
readonly type: string;
|
|
10
|
+
}
|
|
11
|
+
export type FetchOriginUpdatedAt = (origin: GithubIssueOrigin) => {
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
} | {
|
|
14
|
+
error: string;
|
|
15
|
+
};
|
|
16
|
+
export interface EvaluateOriginFreshnessOptions {
|
|
17
|
+
readonly fetchOriginUpdatedAt?: FetchOriginUpdatedAt;
|
|
18
|
+
readonly cwd?: string;
|
|
19
|
+
readonly skip?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type OriginFreshnessResult = {
|
|
22
|
+
readonly ok: true;
|
|
23
|
+
readonly kind: OriginFreshnessKind;
|
|
24
|
+
} | {
|
|
25
|
+
readonly ok: false;
|
|
26
|
+
readonly kind: OriginFreshnessKind;
|
|
27
|
+
readonly message: string;
|
|
28
|
+
};
|
|
29
|
+
export type ScmCallFn = (source: string, verb: string, args: readonly string[] | null, options?: CallOptions) => CompletedProcess;
|
|
30
|
+
export declare function briefUpdatedOf(payload: Record<string, unknown>): string | null;
|
|
31
|
+
export declare function extractGithubIssueOrigins(payload: Record<string, unknown>): GithubIssueOrigin[];
|
|
32
|
+
export declare function extractGithubIssueOrigin(payload: Record<string, unknown>): GithubIssueOrigin | null;
|
|
33
|
+
export declare function compareOriginFreshness(briefUpdated: string | null, originUpdatedAt: string | null): OriginFreshnessKind;
|
|
34
|
+
export declare function formatOriginStaleMessage(origin: GithubIssueOrigin, originUpdatedAt: string, briefUpdated: string | null): string;
|
|
35
|
+
export declare function fetchGithubIssueUpdatedAt(origin: GithubIssueOrigin, options?: {
|
|
36
|
+
scmCall?: ScmCallFn;
|
|
37
|
+
cwd?: string;
|
|
38
|
+
}): {
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
} | {
|
|
41
|
+
error: string;
|
|
42
|
+
};
|
|
43
|
+
export declare function evaluateOriginFreshness(payload: Record<string, unknown>, options?: EvaluateOriginFreshnessOptions): OriginFreshnessResult;
|
|
44
|
+
//# sourceMappingURL=origin-freshness.d.ts.map
|