dorfl 0.8.0 → 0.10.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/cli.d.ts.map +1 -1
- package/dist/cli.js +63 -25
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +82 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -2
- package/dist/config.js.map +1 -1
- package/dist/do.d.ts +16 -1
- package/dist/do.d.ts.map +1 -1
- package/dist/do.js +14 -9
- package/dist/do.js.map +1 -1
- package/dist/env-config.d.ts.map +1 -1
- package/dist/env-config.js +25 -3
- package/dist/env-config.js.map +1 -1
- package/dist/intake-trigger-template.d.ts +91 -53
- package/dist/intake-trigger-template.d.ts.map +1 -1
- package/dist/intake-trigger-template.js +213 -114
- package/dist/intake-trigger-template.js.map +1 -1
- package/dist/intake.d.ts +53 -4
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +59 -15
- package/dist/intake.js.map +1 -1
- package/dist/placement.d.ts +42 -33
- package/dist/placement.d.ts.map +1 -1
- package/dist/placement.js +20 -17
- package/dist/placement.js.map +1 -1
- package/dist/repo-config.d.ts +1 -1
- package/dist/repo-config.d.ts.map +1 -1
- package/dist/repo-config.js +35 -0
- package/dist/repo-config.js.map +1 -1
- package/dist/tasking.d.ts +46 -1
- package/dist/tasking.d.ts.map +1 -1
- package/dist/tasking.js +48 -21
- package/dist/tasking.js.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +75 -28
- package/src/config.ts +96 -9
- package/src/do.ts +30 -10
- package/src/env-config.ts +25 -3
- package/src/intake-trigger-template.ts +263 -143
- package/src/intake.ts +136 -18
- package/src/placement.ts +42 -36
- package/src/repo-config.ts +35 -0
- package/src/tasking.ts +75 -43
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,OAAO,EAAS,MAAM,WAAW,CAAC;AAmH1C,OAAO,EAAiB,KAAK,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAwCvE,OAAO,EAAgB,KAAK,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,OAAO,EAAS,MAAM,WAAW,CAAC;AAmH1C,OAAO,EAAiB,KAAK,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAwCvE,OAAO,EAAgB,KAAK,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AA+xB5E;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,OAAO,GACb,MAAM,CAoCR;AA6RD,wBAAgB,YAAY,IAAI,OAAO,CAq7GtC;AAaD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,OAAO,GACZ,MAAM,CAyBR;AA+FD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,MAAM,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBzE"}
|
package/dist/cli.js
CHANGED
|
@@ -256,11 +256,13 @@ function buildRegistrySetAdvanceTick(options) {
|
|
|
256
256
|
// The per-TRANSITION TASKING override: the `do spec:` tasking path threads
|
|
257
257
|
// `taskingIntegration ?? integration`; the build path stays on `integration`.
|
|
258
258
|
taskingIntegration: config.taskingIntegration,
|
|
259
|
-
// The TASK-PLACEMENT configured
|
|
259
|
+
// The TASK-PLACEMENT configured defaults (`do spec:` tasking output:
|
|
260
260
|
// `backlog` staged vs `ready` pool). No operator flag on this
|
|
261
|
-
// registry-driven advance context, so only the configured default
|
|
262
|
-
// threaded (the
|
|
261
|
+
// registry-driven advance context, so only the configured default rungs
|
|
262
|
+
// are threaded (trusted + the untrusted twin the tasker selects from the
|
|
263
|
+
// spec's stamp; the resolver layers the built-in floor).
|
|
263
264
|
tasksLandIn: config.tasksLandIn,
|
|
265
|
+
untrustedTasksLandIn: config.untrustedTasksLandIn,
|
|
264
266
|
prepare: config.prepare,
|
|
265
267
|
verify: config.verify,
|
|
266
268
|
// Single-job build path: gate the REBASED tip (the default) unconditionally.
|
|
@@ -449,8 +451,8 @@ function explicitSpecsLandInFromFlag(raw, flagName = '--specs-land-in') {
|
|
|
449
451
|
if (raw === undefined) {
|
|
450
452
|
return undefined;
|
|
451
453
|
}
|
|
452
|
-
if (raw !== '
|
|
453
|
-
throw new Error(`${flagName} must be '
|
|
454
|
+
if (raw !== 'proposed' && raw !== 'ready') {
|
|
455
|
+
throw new Error(`${flagName} must be 'proposed' or 'ready' (got '${raw}').`);
|
|
454
456
|
}
|
|
455
457
|
return raw;
|
|
456
458
|
}
|
|
@@ -1629,10 +1631,12 @@ export function buildProgram() {
|
|
|
1629
1631
|
explicitMerge: flagMode === 'merge',
|
|
1630
1632
|
// Per-TRANSITION TASKING override (the `do --remote spec:` tasking path).
|
|
1631
1633
|
taskingIntegration: remoteConfig.taskingIntegration,
|
|
1632
|
-
// TASK-PLACEMENT: the configured
|
|
1633
|
-
//
|
|
1634
|
-
//
|
|
1634
|
+
// TASK-PLACEMENT: the configured defaults (trusted + the untrusted twin
|
|
1635
|
+
// the tasker selects from the spec's stamp) + the EXPLICIT operator
|
|
1636
|
+
// override (`--tasks-land-in`), the top of the placement precedence —
|
|
1637
|
+
// mirrors `explicitMerge` (set only when the flag was typed).
|
|
1635
1638
|
tasksLandIn: remoteConfig.tasksLandIn,
|
|
1639
|
+
untrustedTasksLandIn: remoteConfig.untrustedTasksLandIn,
|
|
1636
1640
|
explicitTasksLandIn: explicitTasksLandInFromFlag(flags.tasksLandIn),
|
|
1637
1641
|
prepare: remoteConfig.prepare,
|
|
1638
1642
|
verify: remoteConfig.verify,
|
|
@@ -1795,12 +1799,13 @@ export function buildProgram() {
|
|
|
1795
1799
|
// `taskingIntegration ?? integration`; the task-build path stays on
|
|
1796
1800
|
// `integration`. Unset ⇒ tasking falls back to `integration` (today's behaviour).
|
|
1797
1801
|
taskingIntegration: config.taskingIntegration,
|
|
1798
|
-
// TASK-PLACEMENT (`do spec:` tasking output): the configured default
|
|
1802
|
+
// TASK-PLACEMENT (`do spec:` tasking output): the configured default rungs
|
|
1803
|
+
// (trusted + the untrusted twin the tasker selects from the spec's stamp) +
|
|
1799
1804
|
// the EXPLICIT operator override `--tasks-land-in` (top of the precedence).
|
|
1800
1805
|
// `explicitTasksLandIn` is set ONLY when the flag was typed (mirrors
|
|
1801
|
-
// `explicitMerge`)
|
|
1802
|
-
// config default.
|
|
1806
|
+
// `explicitMerge`).
|
|
1803
1807
|
tasksLandIn: config.tasksLandIn,
|
|
1808
|
+
untrustedTasksLandIn: config.untrustedTasksLandIn,
|
|
1804
1809
|
explicitTasksLandIn: explicitTasksLandInFromFlag(flags.tasksLandIn),
|
|
1805
1810
|
// In-place divergence guard override (mirrors --ignore-not-ready).
|
|
1806
1811
|
ignoreDivergedMain: flags.ignoreDivergedMain === true,
|
|
@@ -2062,9 +2067,10 @@ export function buildProgram() {
|
|
|
2062
2067
|
explicitMerge: flagMode === 'merge',
|
|
2063
2068
|
// Per-TRANSITION TASKING override (the isolated `do --remote spec:` path).
|
|
2064
2069
|
taskingIntegration: remoteConfig.taskingIntegration,
|
|
2065
|
-
// TASK-PLACEMENT: configured
|
|
2066
|
-
// (set only when typed, mirroring `explicitMerge`).
|
|
2070
|
+
// TASK-PLACEMENT: configured defaults (trusted + untrusted twin) + EXPLICIT
|
|
2071
|
+
// `--tasks-land-in` override (set only when typed, mirroring `explicitMerge`).
|
|
2067
2072
|
tasksLandIn: remoteConfig.tasksLandIn,
|
|
2073
|
+
untrustedTasksLandIn: remoteConfig.untrustedTasksLandIn,
|
|
2068
2074
|
explicitTasksLandIn: explicitTasksLandInFromFlag(flags.tasksLandIn),
|
|
2069
2075
|
prepare: remoteConfig.prepare,
|
|
2070
2076
|
verify: remoteConfig.verify,
|
|
@@ -2201,9 +2207,10 @@ export function buildProgram() {
|
|
|
2201
2207
|
// Per-TRANSITION TASKING override (the `do spec:` tasking path threads
|
|
2202
2208
|
// `taskingIntegration ?? integration`; the build path stays on `integration`).
|
|
2203
2209
|
taskingIntegration: config.taskingIntegration,
|
|
2204
|
-
// TASK-PLACEMENT: configured
|
|
2205
|
-
// (set only when typed, mirroring `explicitMerge`).
|
|
2210
|
+
// TASK-PLACEMENT: configured defaults (trusted + untrusted twin) + EXPLICIT
|
|
2211
|
+
// `--tasks-land-in` override (set only when typed, mirroring `explicitMerge`).
|
|
2206
2212
|
tasksLandIn: config.tasksLandIn,
|
|
2213
|
+
untrustedTasksLandIn: config.untrustedTasksLandIn,
|
|
2207
2214
|
explicitTasksLandIn: explicitTasksLandInFromFlag(flags.tasksLandIn),
|
|
2208
2215
|
prepare: config.prepare,
|
|
2209
2216
|
verify: config.verify,
|
|
@@ -2995,7 +3002,8 @@ export function buildProgram() {
|
|
|
2995
3002
|
.option('--merge-task', 'integrate a task outcome in merge mode (granular; overrides --merge/--propose for a task; mutually exclusive with --propose-task)')
|
|
2996
3003
|
.option('--propose-task', 'integrate a task outcome in propose mode (granular; overrides --merge/--propose for a task; mutually exclusive with --merge-task)')
|
|
2997
3004
|
.option('--origin-trust <trusted|untrusted>', "the author-trust verdict to STAMP onto the emitted spec/task (origin: issue + originTrust: <value>), so an untrusted origin survives the merge boundary and later forces the task's BUILD transition to propose. CI's intake.yml derives it from the SAME author_association case as the integration flags. UNSET (a local intake) ⇒ emitted unstamped (human/trusted) — the human running intake IS the checkpoint.")
|
|
2998
|
-
.option('--specs-land-in <where>', 'where an intake-authored spec lands: `
|
|
3005
|
+
.option('--specs-land-in <where>', 'where an intake-authored spec lands: `proposed` (staged, not auto-taskable) or `ready` (the auto-tasking pool). The EXPLICIT operator override at the top of the placement precedence (explicit flag > untrusted-origin forces staging > specsLandIn default > built-in). Resolved flag > env (DORFL_SPECS_LAND_IN) > per-repo > global > built-in.')
|
|
3006
|
+
.option('--tasks-land-in <where>', 'where an intake-authored TASK (emitted DIRECTLY from an issue) lands: `backlog` (staged, not agent-eligible) or `ready` (the agent POOL). The task twin of --specs-land-in: the EXPLICIT operator override at the top of the placement precedence (explicit flag > configured default > built-in staging; the caller selects the trusted-vs-untrusted default from the origin-trust stamp). Resolved flag > env (DORFL_TASKS_LAND_IN) > per-repo > global > built-in.')
|
|
2999
3007
|
.option('--agent-cmd <cmd>', 'command to run the decision agent')
|
|
3000
3008
|
.option('--model <id>', 'model the decision agent runs on (routing intent; resolved flag > env > per-repo > global > default)')
|
|
3001
3009
|
.option('--harness <adapter>', 'harness adapter that launches the decision agent: null (default) or pi')
|
|
@@ -3028,14 +3036,18 @@ export function buildProgram() {
|
|
|
3028
3036
|
// Resolve the PER-OUTCOME integration modes (spec US #9): `intake` decides
|
|
3029
3037
|
// the artifact TYPE at runtime, so a single --merge/--propose can't express
|
|
3030
3038
|
// a type-conditional policy. The granular flags override the aggregate; an
|
|
3031
|
-
// UNSET type falls back to the per-repo/global `
|
|
3032
|
-
// `
|
|
3033
|
-
//
|
|
3034
|
-
//
|
|
3035
|
-
//
|
|
3039
|
+
// UNSET type falls back to the per-repo/global `intakeIntegration ??
|
|
3040
|
+
// integration` (the INTAKE-DOCUMENT knob, twin of the tasking path's
|
|
3041
|
+
// `taskingIntegration ?? integration`; spec
|
|
3042
|
+
// `intake-integration-knob-and-specs-land-in-proposed-rename`). DECOUPLED
|
|
3043
|
+
// from the autonomy gates: `intake` is GATE-FREE, so autoTask/autoBuild are
|
|
3044
|
+
// NOT consulted for the document mode (the explicit invocation is its own
|
|
3045
|
+
// authorization; ADR untrusted-origin-carries-via-stamp-not-forced-staging).
|
|
3046
|
+
// `intake` owns only these KNOBS; WHICH knobs CI sets is CI's POLICY
|
|
3047
|
+
// (`runner-in-ci`), NOT here.
|
|
3036
3048
|
let modes;
|
|
3037
3049
|
try {
|
|
3038
|
-
modes = resolveIntakeIntegrationModes(flags, config.integration);
|
|
3050
|
+
modes = resolveIntakeIntegrationModes(flags, config.intakeIntegration ?? config.integration);
|
|
3039
3051
|
}
|
|
3040
3052
|
catch (err) {
|
|
3041
3053
|
console.error(`error: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -3071,6 +3083,18 @@ export function buildProgram() {
|
|
|
3071
3083
|
console.error(`error: ${err instanceof Error ? err.message : String(err)}`);
|
|
3072
3084
|
process.exit(1);
|
|
3073
3085
|
}
|
|
3086
|
+
// The OPERATOR's EXPLICIT task-placement override (`--tasks-land-in`), the
|
|
3087
|
+
// TOP of the placement precedence for a DIRECT-from-issue task emit — the
|
|
3088
|
+
// task twin of `explicitSpecsLandIn` above (reuses the same `do`-path
|
|
3089
|
+
// helper). Fails loudly on a bad value.
|
|
3090
|
+
let explicitTasksLandIn;
|
|
3091
|
+
try {
|
|
3092
|
+
explicitTasksLandIn = explicitTasksLandInFromFlag(flags.tasksLandIn);
|
|
3093
|
+
}
|
|
3094
|
+
catch (err) {
|
|
3095
|
+
console.error(`error: ${err instanceof Error ? err.message : String(err)}`);
|
|
3096
|
+
process.exit(1);
|
|
3097
|
+
}
|
|
3074
3098
|
const result = await performIntake({
|
|
3075
3099
|
issueNumber,
|
|
3076
3100
|
cwd,
|
|
@@ -3086,11 +3110,25 @@ export function buildProgram() {
|
|
|
3086
3110
|
// The origin-trust stamp the CI shell passes IN (unset ⇒ unstamped).
|
|
3087
3111
|
originTrust,
|
|
3088
3112
|
noPR: config.noPR,
|
|
3089
|
-
// SPEC-PLACEMENT: the configured
|
|
3090
|
-
//
|
|
3091
|
-
//
|
|
3113
|
+
// SPEC-PLACEMENT: the TRUSTED-side configured default (`specsLandIn`) +
|
|
3114
|
+
// the UNTRUSTED-side twin (`untrustedSpecsLandIn`, selected in
|
|
3115
|
+
// `dispatchSpec` when the stamp is untrusted) + the EXPLICIT
|
|
3116
|
+
// `--specs-land-in` override (top of the precedence). The placement
|
|
3117
|
+
// resolver no longer has an untrusted-forces-staging rung (ADR
|
|
3118
|
+
// `untrusted-origin-carries-via-stamp-not-forced-staging`); the caller
|
|
3119
|
+
// selects the trusted-vs-untrusted default from the stamp.
|
|
3092
3120
|
specsLandIn: config.specsLandIn,
|
|
3121
|
+
untrustedSpecsLandIn: config.untrustedSpecsLandIn,
|
|
3093
3122
|
explicitSpecsLandIn,
|
|
3123
|
+
// TASK-PLACEMENT (parity with the spec-placement block above; ADR
|
|
3124
|
+
// `untrusted-origin-carries-via-stamp-not-forced-staging`): the
|
|
3125
|
+
// TRUSTED-side default (`tasksLandIn`) + the UNTRUSTED-side twin
|
|
3126
|
+
// (`untrustedTasksLandIn`, selected in `dispatchTask` when the stamp is
|
|
3127
|
+
// untrusted) + the EXPLICIT `--tasks-land-in` override. Replaces the old
|
|
3128
|
+
// hardcoded `tasks-ready` path; the resolver picks backlog vs ready.
|
|
3129
|
+
tasksLandIn: config.tasksLandIn,
|
|
3130
|
+
untrustedTasksLandIn: config.untrustedTasksLandIn,
|
|
3131
|
+
explicitTasksLandIn,
|
|
3094
3132
|
harness,
|
|
3095
3133
|
agentCmd: config.agentCmd,
|
|
3096
3134
|
model: config.model,
|