lastlight-core 0.21.13 → 0.22.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/config/default.yaml +50 -0
- package/dist/admin/routes.js +195 -38
- package/dist/admin/routes.js.map +1 -1
- package/dist/config/config-resolve.d.ts +38 -1
- package/dist/config/config-resolve.js +41 -17
- package/dist/config/config-resolve.js.map +1 -1
- package/dist/config/config.d.ts +79 -0
- package/dist/config/config.js +73 -4
- package/dist/config/config.js.map +1 -1
- package/dist/config/repo-config.d.ts +113 -0
- package/dist/config/repo-config.js +432 -0
- package/dist/config/repo-config.js.map +1 -0
- package/dist/cron/fanout.d.ts +10 -0
- package/dist/cron/fanout.js +35 -2
- package/dist/cron/fanout.js.map +1 -1
- package/dist/cron/jobs.d.ts +12 -2
- package/dist/cron/jobs.js +31 -5
- package/dist/cron/jobs.js.map +1 -1
- package/dist/cron/repo-crons.d.ts +110 -0
- package/dist/cron/repo-crons.js +169 -0
- package/dist/cron/repo-crons.js.map +1 -0
- package/dist/engine/agent-executor.js +64 -28
- package/dist/engine/agent-executor.js.map +1 -1
- package/dist/engine/executors/orchestrator.js +39 -15
- package/dist/engine/executors/orchestrator.js.map +1 -1
- package/dist/engine/executors/shared.d.ts +9 -2
- package/dist/engine/executors/shared.js +35 -14
- package/dist/engine/executors/shared.js.map +1 -1
- package/dist/engine/github/github.d.ts +90 -0
- package/dist/engine/github/github.js +133 -0
- package/dist/engine/github/github.js.map +1 -1
- package/dist/engine/github/profiles.d.ts +45 -1
- package/dist/engine/github/profiles.js +35 -0
- package/dist/engine/github/profiles.js.map +1 -1
- package/dist/evals-api.d.ts +3 -0
- package/dist/evals-api.js +8 -0
- package/dist/evals-api.js.map +1 -1
- package/dist/index.js +45 -3
- package/dist/index.js.map +1 -1
- package/dist/sandbox/k8s/kubernetes-sandbox.d.ts +26 -1
- package/dist/sandbox/k8s/kubernetes-sandbox.js +30 -1
- package/dist/sandbox/k8s/kubernetes-sandbox.js.map +1 -1
- package/dist/sandbox/sandbox.js +51 -35
- package/dist/sandbox/sandbox.js.map +1 -1
- package/dist/workflows/handlers/post-review.d.ts +12 -8
- package/dist/workflows/handlers/post-review.js +34 -15
- package/dist/workflows/handlers/post-review.js.map +1 -1
- package/dist/workflows/resume.js +96 -4
- package/dist/workflows/resume.js.map +1 -1
- package/dist/workflows/runner.d.ts +2 -1
- package/dist/workflows/runner.js +143 -10
- package/dist/workflows/runner.js.map +1 -1
- package/dist/workflows/simple.d.ts +187 -1
- package/dist/workflows/simple.js +295 -7
- package/dist/workflows/simple.js.map +1 -1
- package/package.json +4 -4
package/dist/workflows/runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveModel, resolveVariant, getBotName } from "../config/config.js";
|
|
2
|
-
import { loadPromptTemplate, resolveSkillPaths } from "./loader.js";
|
|
2
|
+
import { createAssetResolver, getAssetLayers, getDisabledAssets, loadPromptTemplate, makeLayer, resolveSkillPaths, } from "./loader.js";
|
|
3
3
|
import { renderTemplate } from "./templates.js";
|
|
4
4
|
import { PER_TARGET_RECREATE_WORKFLOWS } from "./target-policy.js";
|
|
5
5
|
import { qaImageAvailable, SANDBOX_IMAGE_QA } from "../sandbox/images.js";
|
|
@@ -81,6 +81,69 @@ const defaultAssetLoader = {
|
|
|
81
81
|
loadPromptTemplate: (relativePath) => loadPromptTemplate(relativePath),
|
|
82
82
|
resolveSkillPaths: (names) => resolveSkillPaths(names),
|
|
83
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* The asset resolver for one run.
|
|
86
|
+
*
|
|
87
|
+
* With no repo layer this is `undefined` and every asset call goes through the
|
|
88
|
+
* module-level facade exactly as before — the no-repo path must stay
|
|
89
|
+
* bit-identical, since it is every run today.
|
|
90
|
+
*
|
|
91
|
+
* With a repo layer we build a resolver over `globals + the repo layer` and use
|
|
92
|
+
* THAT for the whole run. Not `configureWorkflowAssets` — several workflows (and
|
|
93
|
+
* a cron fan-out across every managed repo) are in flight at once, so mutating
|
|
94
|
+
* the module globals would let one run's repo layer leak into another's prompts.
|
|
95
|
+
*
|
|
96
|
+
* `agentContextAdditiveOnly` is non-negotiable for a repo layer: without it a
|
|
97
|
+
* repo could neuter the operator's `security.md` / `rules.md` for every run
|
|
98
|
+
* against itself simply by committing a file of the same name.
|
|
99
|
+
*/
|
|
100
|
+
function runAssetResolver(repoConfig) {
|
|
101
|
+
if (!repoConfig?.assetRoot)
|
|
102
|
+
return undefined;
|
|
103
|
+
try {
|
|
104
|
+
return createAssetResolver([...getAssetLayers(), makeLayer("repo", repoConfig.assetRoot)], getDisabledAssets(), { agentContextAdditiveOnly: true });
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
// Warn, drop the layer, run anyway — the repo-config failure rule. A repo
|
|
108
|
+
// whose cache dir vanished mid-run must not take the run down with it.
|
|
109
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
110
|
+
console.warn(`[repo-config] ${repoConfig.repo}: could not build the per-run asset resolver (${msg})`);
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Compose this run's agent context (the AGENTS.md body) off the per-run
|
|
116
|
+
* resolver, ONCE.
|
|
117
|
+
*
|
|
118
|
+
* This is the only path by which a target repo's `.lastlight/agent-context/*.md`
|
|
119
|
+
* reaches the agent: every downstream composition site (the orchestrator's
|
|
120
|
+
* workspace write, the kubernetes init-fetch channel) reads
|
|
121
|
+
* `ExecutorConfig.agentContext` and never re-derives the text, because the
|
|
122
|
+
* module-level loader has no knowledge of a per-run repo layer.
|
|
123
|
+
*
|
|
124
|
+
* **Security boundary.** `assets` was built with `agentContextAdditiveOnly` (see
|
|
125
|
+
* `runAssetResolver`), so a repo file whose basename an operator layer already
|
|
126
|
+
* owns — `soul.md`, `rules.md`, `security.md` — is DROPPED here rather than
|
|
127
|
+
* replacing it. Composing once, here, is what makes that structural: nothing
|
|
128
|
+
* downstream can reach the repo layer except through this value, so a repo
|
|
129
|
+
* cannot neuter the operator's rules by naming a file after one of them. The
|
|
130
|
+
* drops are recorded as resolver warnings and surfaced on the run by
|
|
131
|
+
* {@link recordAssetWarnings}.
|
|
132
|
+
*
|
|
133
|
+
* Best-effort, like the resolver itself: a read failure drops back to the
|
|
134
|
+
* operator-only context (`undefined` ⇒ the module-level facade downstream)
|
|
135
|
+
* rather than failing the run.
|
|
136
|
+
*/
|
|
137
|
+
function runAgentContext(assets, repoConfig) {
|
|
138
|
+
try {
|
|
139
|
+
return assets.loadAgentContext();
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
143
|
+
console.warn(`[repo-config] ${repoConfig?.repo ?? "?"}: could not compose the run's agent context (${msg})`);
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
84
147
|
const dockerLivenessPort = {
|
|
85
148
|
isPhaseContainerAlive: async (taskId) => {
|
|
86
149
|
const containers = await listRunningContainers();
|
|
@@ -105,7 +168,13 @@ const telemetryObservability = {
|
|
|
105
168
|
* default engine ports, the reporter/resolver collaborators, and the run-scoped
|
|
106
169
|
* {@link PhaseRunContext}, then delegates the DAG walk to `runWorkflowCore`.
|
|
107
170
|
*/
|
|
108
|
-
export async function runWorkflow(definition, ctx, config, callbacks, db, models, approvalConfig, workflowId, variants
|
|
171
|
+
export async function runWorkflow(definition, ctx, config, callbacks, db, models, approvalConfig, workflowId, variants,
|
|
172
|
+
// The target repo's `.lastlight/` layer (issue #180), resolved at dispatch.
|
|
173
|
+
// DEFAULTED rather than optional on purpose: `runWorkflow.length` is the
|
|
174
|
+
// frozen `lastlight/evals` surface (evals-contract.test.ts pins it at 9), and
|
|
175
|
+
// a parameter with a default doesn't count toward it. Existing callers are
|
|
176
|
+
// unaffected — omitting it reproduces today's behaviour exactly.
|
|
177
|
+
repoConfig = undefined) {
|
|
109
178
|
const outputs = {};
|
|
110
179
|
const { taskId } = ctx;
|
|
111
180
|
// Slack-originated runs carry an explicit `slack:` trigger id — everything
|
|
@@ -132,11 +201,29 @@ export async function runWorkflow(definition, ctx, config, callbacks, db, models
|
|
|
132
201
|
const lastPhaseKey = [...definition.phases]
|
|
133
202
|
.reverse()
|
|
134
203
|
.find((p) => (p.type ?? "agent") !== "context")?.name;
|
|
135
|
-
|
|
136
|
-
|
|
204
|
+
// Effective (base ⊕ repo) config. `simple.ts` already hands us the merged
|
|
205
|
+
// maps, but re-applying here is idempotent (the repo maps ARE the merged
|
|
206
|
+
// ones) and makes the runner correct for any caller that passes a repo layer
|
|
207
|
+
// without pre-merging — notably `resume.ts` when it grows the same wiring.
|
|
208
|
+
const effectiveModels = repoConfig?.models ?? models;
|
|
209
|
+
const effectiveVariants = repoConfig?.variants ?? variants;
|
|
210
|
+
const effectiveApproval = repoConfig?.approval ?? approvalConfig;
|
|
211
|
+
// Per-run asset stack. `assets` is undefined for every run without a repo
|
|
212
|
+
// layer, in which case the module-level functions are used unchanged.
|
|
213
|
+
const assets = runAssetResolver(repoConfig);
|
|
214
|
+
const loadPrompt = assets ? assets.loadPromptTemplate : loadPromptTemplate;
|
|
215
|
+
// The config every phase of this run executes with. Identical to the caller's
|
|
216
|
+
// unless a repo layer applies, in which case it carries this run's composed
|
|
217
|
+
// agent context (see `runAgentContext`) — the only channel through which a
|
|
218
|
+
// repo's `agent-context/*.md` reaches AGENTS.md.
|
|
219
|
+
const runConfig = assets
|
|
220
|
+
? { ...config, agentContext: runAgentContext(assets, repoConfig) }
|
|
221
|
+
: config;
|
|
222
|
+
const modelFor = (taskType) => effectiveModels ? resolveModel(effectiveModels, taskType) : undefined;
|
|
223
|
+
const variantFor = (taskType) => effectiveVariants ? resolveVariant(effectiveVariants, taskType) : undefined;
|
|
137
224
|
/** Render a prompt template with current context + outputs. */
|
|
138
225
|
const renderPrompt = (promptPath, extraCtx) => {
|
|
139
|
-
const template =
|
|
226
|
+
const template = loadPrompt(promptPath);
|
|
140
227
|
return renderTemplate(template, { ...ctx, phaseOutputs: outputs, ...(extraCtx || {}) });
|
|
141
228
|
};
|
|
142
229
|
/**
|
|
@@ -234,8 +321,13 @@ export async function runWorkflow(definition, ctx, config, callbacks, db, models
|
|
|
234
321
|
db.runs.finishRun(workflowId, "failed", { error: errorMsg });
|
|
235
322
|
}
|
|
236
323
|
};
|
|
237
|
-
/**
|
|
238
|
-
|
|
324
|
+
/**
|
|
325
|
+
* Should an approval gate with this name actually pause the workflow?
|
|
326
|
+
* Reads the EFFECTIVE map, so a repo that raised a gate for runs against
|
|
327
|
+
* itself pauses here. The repo layer is add-only (enforced in
|
|
328
|
+
* `config/repo-config.ts`), so this can never drop an operator's gate.
|
|
329
|
+
*/
|
|
330
|
+
const gateEnabled = (gateName) => !!gateName && effectiveApproval?.[gateName] === true;
|
|
239
331
|
/** Fold a workflow's final synthesized result into the checklist footer. */
|
|
240
332
|
const footer = async (markdown) => {
|
|
241
333
|
if (reporter)
|
|
@@ -256,7 +348,7 @@ export async function runWorkflow(definition, ctx, config, callbacks, db, models
|
|
|
256
348
|
const runScope = {
|
|
257
349
|
definition,
|
|
258
350
|
ctx,
|
|
259
|
-
config,
|
|
351
|
+
config: runConfig,
|
|
260
352
|
taskId,
|
|
261
353
|
triggerId,
|
|
262
354
|
githubAccess,
|
|
@@ -310,12 +402,22 @@ export async function runWorkflow(definition, ctx, config, callbacks, db, models
|
|
|
310
402
|
};
|
|
311
403
|
const ports = {
|
|
312
404
|
agent: agentPort,
|
|
313
|
-
|
|
405
|
+
// The repo's prompt/skill overrides reach the agent through this port:
|
|
406
|
+
// `resolveSkillPaths` returns HOST paths (the repo-config cache dir is just
|
|
407
|
+
// another one), which the orchestrator stages into the sandbox exactly like
|
|
408
|
+
// a built-in or overlay skill — copy for docker, tar for kubernetes. No
|
|
409
|
+
// backend needs to know a repo layer exists.
|
|
410
|
+
assets: assets
|
|
411
|
+
? {
|
|
412
|
+
loadPromptTemplate: (relativePath) => assets.loadPromptTemplate(relativePath),
|
|
413
|
+
resolveSkillPaths: (names) => assets.resolveSkillPaths(names),
|
|
414
|
+
}
|
|
415
|
+
: defaultAssetLoader,
|
|
314
416
|
liveness: dockerLivenessPort,
|
|
315
417
|
observability: telemetryObservability,
|
|
316
418
|
verdictReader: fileVerdictReader,
|
|
317
419
|
handlers: new Map([
|
|
318
|
-
["post-review", makePostReviewHandler({ ctx, config, taskId, store: db, workflowId }, phaseReporter)],
|
|
420
|
+
["post-review", makePostReviewHandler({ ctx, config: runConfig, taskId, store: db, workflowId }, phaseReporter)],
|
|
319
421
|
]),
|
|
320
422
|
};
|
|
321
423
|
try {
|
|
@@ -341,5 +443,36 @@ export async function runWorkflow(definition, ctx, config, callbacks, db, models
|
|
|
341
443
|
}
|
|
342
444
|
throw err;
|
|
343
445
|
}
|
|
446
|
+
finally {
|
|
447
|
+
// Asset-level drops are only knowable once the resolver has been exercised,
|
|
448
|
+
// so they can't ride along on the run row's `context.repoConfig` (written at
|
|
449
|
+
// creation). Record them beside it, on scratch, on every exit path —
|
|
450
|
+
// including a failed run, where "the repo's prompt override was ignored" is
|
|
451
|
+
// exactly the thing someone will want to see.
|
|
452
|
+
recordAssetWarnings(assets, repoConfig, db, workflowId);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Persist the per-run resolver's warnings (e.g. a repo `agent-context/*.md`
|
|
457
|
+
* dropped because a higher-trust layer already owns that filename) to
|
|
458
|
+
* `workflow_runs.scratch.repoConfig.assetWarnings`, next to the config-time
|
|
459
|
+
* warnings on `context.repoConfig.warnings`.
|
|
460
|
+
*
|
|
461
|
+
* Best-effort and silent when there's nothing to say — this is reporting, and a
|
|
462
|
+
* reporting failure must never surface as a run failure.
|
|
463
|
+
*/
|
|
464
|
+
function recordAssetWarnings(assets, repoConfig, db, workflowId) {
|
|
465
|
+
const warnings = assets?.warnings ?? [];
|
|
466
|
+
if (!warnings.length || !db || !workflowId)
|
|
467
|
+
return;
|
|
468
|
+
try {
|
|
469
|
+
for (const w of warnings)
|
|
470
|
+
console.warn(`[repo-config] ${repoConfig?.repo ?? "?"}: ${w.message}`);
|
|
471
|
+
db.runs.mergeScratch(workflowId, { repoConfig: { assetWarnings: [...warnings] } });
|
|
472
|
+
}
|
|
473
|
+
catch (err) {
|
|
474
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
475
|
+
console.warn(`[repo-config] Could not record asset warnings for run ${workflowId}: ${msg}`);
|
|
476
|
+
}
|
|
344
477
|
}
|
|
345
478
|
//# sourceMappingURL=runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/workflows/runner.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,cAAc,EAAwB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,YAAY,EAAwB,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAc5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,M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CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,yDAAyD,UAAU,KAAK,GAAG,EAAE,CAAC,CAAC;IAC9F,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,187 @@
|
|
|
1
1
|
import type { ExecutorConfig } from "../engine/github/profiles.js";
|
|
2
2
|
import type { StateDb, TriggerActorType } from "../state/db.js";
|
|
3
|
-
import
|
|
3
|
+
import type { DisabledConfig } from "lastlight-shared/config-types";
|
|
4
|
+
import { type ModelConfig, type RepoConfigPolicy, type VariantConfig } from "../config/config.js";
|
|
5
|
+
import type { GitHubClient } from "../engine/github/github.js";
|
|
6
|
+
import { type RepoConfigBase, type RepoConfigSources, type RepoConfigWarning, type RepoLayer } from "../config/repo-config.js";
|
|
4
7
|
import { type ApprovalGateConfig, type RunnerCallbacks, type WorkflowResult } from "./runner.js";
|
|
5
8
|
import { PER_TARGET_REUSE_WORKFLOWS, PER_TARGET_RECREATE_WORKFLOWS, PREPOPULATE_SYNTH_WORKFLOWS, PR_HEADREF_PREPOPULATE_WORKFLOWS, PR_FIX_SHAPED_WORKFLOWS } from "./target-policy.js";
|
|
9
|
+
/**
|
|
10
|
+
* A managed repo's `.lastlight/` layer, already merged onto the boot config and
|
|
11
|
+
* frozen for the duration of ONE run.
|
|
12
|
+
*
|
|
13
|
+
* Resolved once at the dispatch choke point (`resolveRepoRunConfig`, driven from
|
|
14
|
+
* `dispatchWorkflow` in src/index.ts) and then carried explicitly through the
|
|
15
|
+
* run — never installed into a module global. Up to `concurrency.maxWorkflows`
|
|
16
|
+
* runs plus a cron fan-out across every managed repo are in flight at once, so a
|
|
17
|
+
* global would race and hand repo B's model override to repo A's run.
|
|
18
|
+
*
|
|
19
|
+
* `models` / `variants` / `approval` are the EFFECTIVE maps (base ⊕ repo), not
|
|
20
|
+
* the repo's deltas, so every consumer can use them as a drop-in replacement for
|
|
21
|
+
* the boot config's maps. The deltas are recoverable from {@link sources}.
|
|
22
|
+
*/
|
|
23
|
+
export interface RunRepoConfig {
|
|
24
|
+
/** `owner/repo` the layer was read from. */
|
|
25
|
+
repo: string;
|
|
26
|
+
/** The ref the layer was read from — always the repo's default branch. */
|
|
27
|
+
defaultBranch: string;
|
|
28
|
+
/** Git tree SHA of `.lastlight/` — the content identity of these values. */
|
|
29
|
+
treeSha: string;
|
|
30
|
+
/** ISO timestamp of the last successful download of the layer. */
|
|
31
|
+
fetchedAt: string;
|
|
32
|
+
/**
|
|
33
|
+
* Absolute host path of the unpacked layer, when the repo contributed assets
|
|
34
|
+
* AND the operator allows them. Undefined otherwise — the run then keeps the
|
|
35
|
+
* module-level (built-in + overlay) asset resolver untouched.
|
|
36
|
+
*/
|
|
37
|
+
assetRoot?: string;
|
|
38
|
+
/** Asset paths the repo contributed, relative to {@link assetRoot}. */
|
|
39
|
+
assets: string[];
|
|
40
|
+
/** Effective per-task model map. */
|
|
41
|
+
models: ModelConfig;
|
|
42
|
+
/** Effective per-task reasoning-effort map. */
|
|
43
|
+
variants: VariantConfig;
|
|
44
|
+
/** Effective approval gates. Add-only: the repo can raise a gate, never clear one. */
|
|
45
|
+
approval: Record<string, boolean>;
|
|
46
|
+
/** Effective disables. `workflows` is enforced at dispatch (see below). */
|
|
47
|
+
disabled: DisabledConfig;
|
|
48
|
+
/** Per-leaf provenance — which layer won each key (`default`/`overlay`/`env`/`repo`). */
|
|
49
|
+
sources: RepoConfigSources;
|
|
50
|
+
/** Everything the layer dropped, fetching + validating. Never thrown. */
|
|
51
|
+
warnings: RepoConfigWarning[];
|
|
52
|
+
}
|
|
53
|
+
/** Options for {@link resolveRepoRunConfig}. */
|
|
54
|
+
export interface RepoRunConfigOptions {
|
|
55
|
+
/**
|
|
56
|
+
* GitHub client to fetch through. `null` means chat-only mode (no App, no
|
|
57
|
+
* PAT) — there is nothing to fetch through, so the layer is skipped entirely.
|
|
58
|
+
* Omitted means "let `fetchRepoLayer` resolve the harness client itself".
|
|
59
|
+
*/
|
|
60
|
+
client?: GitHubClient | null;
|
|
61
|
+
/** Operator bounds. Defaults to the boot config's `repoConfig` block. */
|
|
62
|
+
policy?: RepoConfigPolicy;
|
|
63
|
+
/** Config the layer merges onto. Defaults to the boot runtime config. */
|
|
64
|
+
base?: RepoConfigBase;
|
|
65
|
+
/** Cache root override, forwarded to `fetchRepoLayer` (tests). */
|
|
66
|
+
cacheRoot?: string;
|
|
67
|
+
}
|
|
68
|
+
/** Result of {@link resolveRepoRunConfig}. */
|
|
69
|
+
export interface RepoRunConfigResult {
|
|
70
|
+
/** Present only when a repo layer actually applies to this dispatch. */
|
|
71
|
+
repoConfig?: RunRepoConfig;
|
|
72
|
+
/**
|
|
73
|
+
* Set when the repo's own `disabled.workflows` refuses this workflow. The
|
|
74
|
+
* caller must abandon the dispatch — no `workflow_runs` row, no agent call.
|
|
75
|
+
*/
|
|
76
|
+
refusal?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The single repo a dispatch context names, or `undefined` for none/many.
|
|
80
|
+
*
|
|
81
|
+
* A repo layer is per-REPO, so it is only meaningful when the run acts on
|
|
82
|
+
* exactly one: a repo-less Slack explore has nothing to read, and a multi-repo
|
|
83
|
+
* context (a cron fan-out envelope that hasn't been split yet) would have to
|
|
84
|
+
* pick a winner — silently applying one repo's model override to a run that
|
|
85
|
+
* touches another is worse than applying none.
|
|
86
|
+
*/
|
|
87
|
+
export declare function soleRepoInContext(context: {
|
|
88
|
+
repo?: unknown;
|
|
89
|
+
repos?: unknown;
|
|
90
|
+
}): string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Resolve a dispatch's per-repository config layer (issue #180).
|
|
93
|
+
*
|
|
94
|
+
* Called from the `dispatchWorkflow` choke point in `src/index.ts`, right beside
|
|
95
|
+
* the unmanaged-repo guard, so every trigger path — webhook, router, cron, the
|
|
96
|
+
* direct `/api/run` + `/api/build` triggers, approval resume — gets the same
|
|
97
|
+
* answer from one place.
|
|
98
|
+
*
|
|
99
|
+
* **Never throws and never fails a run.** Every degenerate case (feature off, no
|
|
100
|
+
* repo, several repos, chat-only mode, a GitHub outage, a malformed
|
|
101
|
+
* `lastlight.yml`) returns "no layer applies" or a layer with warnings attached,
|
|
102
|
+
* and the run proceeds on the un-overridden operator config. The one refusal it
|
|
103
|
+
* CAN return is the repo's own `disabled.workflows` — the repo opting itself out
|
|
104
|
+
* of a workflow, which is a deliberate answer rather than a failure.
|
|
105
|
+
*/
|
|
106
|
+
export declare function resolveRepoRunConfig(workflowName: string, context: {
|
|
107
|
+
repo?: unknown;
|
|
108
|
+
repos?: unknown;
|
|
109
|
+
}, options?: RepoRunConfigOptions): Promise<RepoRunConfigResult>;
|
|
110
|
+
/**
|
|
111
|
+
* The JSON projection of a {@link RunRepoConfig} persisted on
|
|
112
|
+
* `workflow_runs.context.repoConfig`, so a specific run stays explainable long
|
|
113
|
+
* after the TTL cache has moved on.
|
|
114
|
+
*
|
|
115
|
+
* `applied` holds ONLY the leaves the repo actually won (provenance `repo`) —
|
|
116
|
+
* the effective full maps are already on `context.models` / `context.variants`,
|
|
117
|
+
* and a diff of the two is exactly what the dashboard wants to render.
|
|
118
|
+
*/
|
|
119
|
+
export interface RepoConfigRunRecord {
|
|
120
|
+
repo: string;
|
|
121
|
+
defaultBranch: string;
|
|
122
|
+
treeSha: string;
|
|
123
|
+
fetchedAt: string;
|
|
124
|
+
applied: {
|
|
125
|
+
models?: Record<string, string>;
|
|
126
|
+
variants?: Record<string, string>;
|
|
127
|
+
approval?: Record<string, boolean>;
|
|
128
|
+
disabled?: Partial<Record<keyof DisabledConfig, string[]>>;
|
|
129
|
+
};
|
|
130
|
+
assets: string[];
|
|
131
|
+
warnings: RepoConfigWarning[];
|
|
132
|
+
}
|
|
133
|
+
/** Project a {@link RunRepoConfig} into its persisted form. */
|
|
134
|
+
export declare function repoConfigRunRecord(cfg: RunRepoConfig): RepoConfigRunRecord;
|
|
135
|
+
/** Result of {@link restoreRepoRunConfig}. */
|
|
136
|
+
export interface RestoredRepoConfig {
|
|
137
|
+
/** The layer as the original dispatch resolved it, minus anything unrecoverable. */
|
|
138
|
+
repoConfig: RunRepoConfig;
|
|
139
|
+
/**
|
|
140
|
+
* Set when the repo's ASSET layer could not be restored (see
|
|
141
|
+
* {@link restoreRepoRunConfig}). The run still proceeds — on the operator's
|
|
142
|
+
* prompts/skills/agent-context — and the caller is expected to record this
|
|
143
|
+
* where the run is explained.
|
|
144
|
+
*/
|
|
145
|
+
warning?: RepoConfigWarning;
|
|
146
|
+
}
|
|
147
|
+
/** Options for {@link restoreRepoRunConfig}. */
|
|
148
|
+
export interface RestoreRepoRunConfigOptions {
|
|
149
|
+
/** Effective maps to re-apply the repo's leaves onto. Normally the run's own
|
|
150
|
+
* persisted `context.models` / `context.variants`; the operator's boot maps
|
|
151
|
+
* for a row written before those were stored. */
|
|
152
|
+
models?: ModelConfig;
|
|
153
|
+
variants?: VariantConfig;
|
|
154
|
+
approval?: Record<string, boolean>;
|
|
155
|
+
disabled?: DisabledConfig;
|
|
156
|
+
/** Layer lookup seam (tests). Defaults to the cache, then one conditional refetch. */
|
|
157
|
+
resolveLayer?: (repo: string) => Promise<RepoLayer | undefined>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Rebuild a {@link RunRepoConfig} from the {@link RepoConfigRunRecord} persisted
|
|
161
|
+
* on a run row — the inverse of {@link repoConfigRunRecord}, used when
|
|
162
|
+
* *continuing* a run rather than starting one (`resume.ts`).
|
|
163
|
+
*
|
|
164
|
+
* Why restore instead of re-resolving: a resume (boot orphan recovery, the
|
|
165
|
+
* dashboard's Retry, an admission promotion) is a continuation of a run that
|
|
166
|
+
* already executed phases under a specific config. Re-reading `.lastlight/` from
|
|
167
|
+
* the repo's default branch would let an edit made while the run was
|
|
168
|
+
* paused/queued/dead retarget it mid-flight — half the phases on one model, half
|
|
169
|
+
* on another. The record holds everything needed for a faithful continuation and
|
|
170
|
+
* needs no network.
|
|
171
|
+
*
|
|
172
|
+
* Two things are NOT in the record, by design:
|
|
173
|
+
* - **The unpacked asset root.** It's a cache path with its own lifetime, so it
|
|
174
|
+
* is recovered by content identity ({@link repoLayerForTree}) and dropped —
|
|
175
|
+
* with a warning — when the tree the run used is gone. Prompts/skills/agent
|
|
176
|
+
* context then come from the operator's layers: a degraded run, never a
|
|
177
|
+
* crashed one, and never a *different* repo config.
|
|
178
|
+
* - **Per-leaf provenance for the leaves the repo did NOT win.** `applied` only
|
|
179
|
+
* records the repo's own leaves, so the restored `sources` marks those `repo`
|
|
180
|
+
* and everything else `default`. Nothing on the resume path reads `sources`
|
|
181
|
+
* (it exists to build a record, which a resume never re-derives), so the
|
|
182
|
+
* approximation stays inside this type.
|
|
183
|
+
*/
|
|
184
|
+
export declare function restoreRepoRunConfig(record: RepoConfigRunRecord, options?: RestoreRepoRunConfigOptions): Promise<RestoredRepoConfig>;
|
|
6
185
|
/**
|
|
7
186
|
* Lightweight invocation request for any agent workflow. The runner handles
|
|
8
187
|
* all phase-level logic generically, so this single entry point covers
|
|
@@ -55,6 +234,13 @@ export interface SimpleWorkflowRequest {
|
|
|
55
234
|
* session.
|
|
56
235
|
*/
|
|
57
236
|
prePopulateBranch?: string;
|
|
237
|
+
/**
|
|
238
|
+
* The target repo's own `.lastlight/` layer, already merged onto the boot
|
|
239
|
+
* config by {@link resolveRepoRunConfig} at the dispatch choke point (issue
|
|
240
|
+
* #180). Absent ⇒ no layer applies and the run behaves exactly as it did
|
|
241
|
+
* before the feature existed.
|
|
242
|
+
*/
|
|
243
|
+
repoConfig?: RunRepoConfig;
|
|
58
244
|
}
|
|
59
245
|
export { PER_TARGET_REUSE_WORKFLOWS, PER_TARGET_RECREATE_WORKFLOWS, PREPOPULATE_SYNTH_WORKFLOWS, PR_HEADREF_PREPOPULATE_WORKFLOWS, PR_FIX_SHAPED_WORKFLOWS, };
|
|
60
246
|
export declare function workflowScopedTaskId(repo: string, number: number | undefined, workflowName: string, workflowId: string): string;
|