@drisp/cli 0.7.2 → 0.7.4
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/{WorkflowInstallWizard-K3DWPLYZ.js → WorkflowInstallWizard-AJYDKFDL.js} +2 -2
- package/dist/{chunk-Q4I2HYJ5.js → chunk-F6XUMTMC.js} +2 -2
- package/dist/{chunk-2CJ6YKTL.js → chunk-TSIMXPJN.js} +2 -2
- package/dist/{chunk-DAQU2MPK.js → chunk-XG7B4OOC.js} +44 -6
- package/dist/cli.js +28 -7
- package/dist/dashboard-daemon.js +3 -3
- package/dist/runner.js +3 -3
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
installWorkflowPlugins,
|
|
9
9
|
resolveWorkflow,
|
|
10
10
|
writeGlobalConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TSIMXPJN.js";
|
|
12
12
|
import "./chunk-G3PMV62Z.js";
|
|
13
13
|
|
|
14
14
|
// src/setup/steps/WorkflowInstallWizard.tsx
|
|
@@ -93,4 +93,4 @@ function WorkflowInstallWizard({ source, onDone }) {
|
|
|
93
93
|
export {
|
|
94
94
|
WorkflowInstallWizard as default
|
|
95
95
|
};
|
|
96
|
-
//# sourceMappingURL=WorkflowInstallWizard-
|
|
96
|
+
//# sourceMappingURL=WorkflowInstallWizard-AJYDKFDL.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runMachineRunners
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XG7B4OOC.js";
|
|
4
4
|
|
|
5
5
|
// src/app/entry/runnerDaemon.ts
|
|
6
6
|
if (process.argv.includes("--help")) {
|
|
@@ -13,4 +13,4 @@ if (process.argv.includes("--help")) {
|
|
|
13
13
|
process.exitCode = 1;
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-F6XUMTMC.js.map
|
|
@@ -21281,7 +21281,7 @@ var GATES = [
|
|
|
21281
21281
|
];
|
|
21282
21282
|
|
|
21283
21283
|
// src/core/workflows/builtins/orchestrator/workflow.md
|
|
21284
|
-
var workflow_default = '# Orchestrator: plan and run a Build\n\nYou plan and run a Drisp Build of one Plan: the open issues of one Linear project. The Run\'s prompt names the\nLinear project, the Plan key and the project folder, which is your working directory. You never write code here:\neach issue is built by its own child Run, which `drisp build tick` starts.\n\nThe Runner sets these for you:\n\n- `DRISP_RUN_ARTIFACTS`: this Run\'s artifact directory. Files you write there are shown to the member.\n- `DRISP_RUN_ID`, `DRISP_RUNNER_ID`, `DRISP_RUN_TOKEN`, `DRISP_HUB_URL`: this Run, its Runner and its right to start\n child Runs; `drisp build` reads them itself.\n\n## 1. Read Linear (first Turn)\n\nWith the `linear` MCP server, read the project and every issue in it, then write\n`$DRISP_RUN_ARTIFACTS/input/plan-input.json` (create the `input` directory) in exactly this shape. Every issue carries\nevery field, empty when it has none. `readAt` is the output of\n`node -e "console.log(new Date().toISOString())"` run just before you read Linear; never write a time yourself:\n\n```json\n{\n "version": 1,\n "readAt": "<the command\'s output, e.g. 2026-10-11T09:30:00.000Z>",\n "project": {\n "id": "<the project\'s `uuid`, not its `id`>",\n "name": "<the project\'s `name`>",\n "slugId": "<the last `-`-separated part of the project\'s `url`>"\n },\n "issues": [\n {\n "id": "<the issue\'s `uuid`, not its `id`>",\n "identifier": "<the issue\'s `id`, e.g. DRI-12>",\n "title": "<the issue\'s `title`>",\n "url": "<the issue\'s `url`>",\n "branchName": "<the issue\'s `gitBranchName`, or null>",\n "state": {\n "type": "<the issue\'s `statusType`: backlog|unstarted|started|completed|canceled|triage>",\n "name": "<the issue\'s `status`>"\n },\n "labels": ["<each of the issue\'s `labels`>"],\n "parentId": "<the parent issue\'s `uuid`, or null>",\n "blockedBy": ["<the `uuid` of each issue in `relations.blockedBy`>"],\n "prioritySortOrder": 0\n }\n ]\n}\n```\n\nLinear\'s MCP names fields differently from this file, and the difference matters: the app finds each issue\'s row by\nits UUID, so a plan that carries identifiers shows no Build state on any row.\n\n- The MCP\'s `id` is the readable identifier (`DRI-12`, or `P-DRI-7` for a project); the UUID is in `uuid`. Every\n `id`, `parentId` and `blockedBy` value in `plan-input.json` is a UUID (`7f7b03f7-accf-46b2-98fb-abadfed76594`).\n- An issue\'s `parentId` and `relations.blockedBy` from the MCP name issues by identifier. Look each one up: use the\n `uuid` of the project\'s issue with that identifier, or `get_issue` it when it is outside the project.\n- Read relations with `get_issue` and `includeRelations: true`; read the project\'s issues with `list_issues` and\n `fields` including `uuid`.\n- The project\'s `url` ends in its `slugId` (`\u2026/project/build-sandbox-b7640301cd64` \u2192 `b7640301cd64`).\n\n`drisp build plan` rejects a plan with an identifier where a UUID belongs and names the field to fix.\n\nInclude every issue of the project, done and canceled ones too: the plan decides what to skip. Then run:\n\n```sh\ndrisp build plan --input "$DRISP_RUN_ARTIFACTS/input/plan-input.json"\n```\n\nIt prints one JSON object. Act on its `status`.\n\n## 2. `needs_fills`\n\n`fills` lists issues that need a `fill.json` (`identifier`, `title`, `url`, `path`) and `templateVersion` is the value\neach fill must carry. For each listed issue: read it through `linear` (description, acceptance criteria, comments) and\nthe repo\'s ADRs and CONTEXT files it touches, then write its `fill.json` at `path`:\n\n```json\n{\n "version": 1,\n "templateVersion": "<templateVersion, copied exactly>",\n "areas": ["macos|web|cli|hub|protocol|docs", "\u2026"],\n "qa": "none|web|macos",\n "sizeClass": "S|M|L",\n "instructions": "<what the child needs beyond the issue>",\n "ownWork": true\n}\n```\n\n- `areas`: the parts of the repo the change touches, each once.\n- `qa`: `web` when the change shows in a web page, `macos` when it shows in the macOS app, else `none`.\n- `sizeClass`: `S` for a change of a file or two, `M` for a feature across a few modules, `L` for a large or risky\n change.\n- `instructions` (at most 6000 characters): start with one short paragraph saying what to build, then restate the\n acceptance criteria, name the ADRs it touches and the parts of the codebase involved. Plain prose and `-` lists\n only: no headings, code fences or HTML comments (`drisp build plan` rejects them).\n- `ownWork`: `false` only for an issue with sub-issues whose own description asks for nothing beyond them, such as\n a PRD above its slices; the plan then skips it and waits for its sub-issues instead. Otherwise `true`.\n\nThen run `drisp build plan` again with the same `--input` path.\n\n## 3. `planned` or `failed`\n\nOn `planned` the Build plan is written and shown to the member, who decides whether to start it: end the Turn with\n`<!-- AWAITING_APPROVAL -->` as the Journal\'s last line. On `failed` the reason is shown instead: end with\n`<!-- WORKFLOW_COMPLETE -->`.\n\n## 4. Every later wake: tick\n\nYou are woken when the member answers the approval question and whenever one of your child Runs closes or parks.\nEach time: read Linear again into `$DRISP_RUN_ARTIFACTS/input/plan-input.json` as in step 1 (with a new `readAt`),\nthen run:\n\n```sh\ndrisp build tick --input "$DRISP_RUN_ARTIFACTS/input/plan-input.json"\n```\n\nIt prints one JSON object. Act on its `action`, and repeat until an action ends the Turn:\n\n- `refresh_input`: read Linear into the input again (a newer `readAt`) and tick again.\n- `repair`: for each of `issues`, read it in Linear first and skip an issue Linear now shows Done or Canceled (its\n child got there first); otherwise move it to Done and post its `comment` verbatim through `linear`. Then read\n Linear into the input again and tick again.\n- `rebase`: for each of `items`, in its `worktree`: `git rebase origin/main`, resolve the conflicts, then\n `git push --force-with-lease origin <branch>` (the item\'s `branch`) if the branch is on the remote. Never push any\n other branch. If a rebase cannot be resolved, `git rebase --abort`.\n Then read Linear into the input again and tick again, adding `--rebase-failed <identifier>` for each that failed.\n- `wait`: end the Turn with `<!-- WAITING_ON_CHILDREN -->` as the Journal\'s last line.\n- `park`: end the Turn with `<!-- NEEDS_HUMAN: <message> -->` as the Journal\'s last line, copying `message`\n verbatim.\n- `complete`: end the Turn with `<!-- WORKFLOW_COMPLETE -->` as the Journal\'s last line.\n\n## Rules\n\n- Never start, cancel or edit Runs, Workflows, worktrees or branches except as an action says; `drisp build` does\n what is needed.\n- Never write to Linear except a `repair`; never open a pull request.\n- Write only `plan-input.json` and the `fill.json` files `drisp build plan` asks for. Never write `answer.json`.\n';
|
|
21284
|
+
var workflow_default = '# Orchestrator: plan and run a Build\n\nYou plan and run a Drisp Build of one Plan: the open issues of one Linear project. The Run\'s prompt names the\nLinear project, the Plan key and the project folder, which is your working directory. You never write code here:\neach issue is built by its own child Run, which `drisp build tick` starts.\n\nThe Runner sets these for you:\n\n- `DRISP_RUN_ARTIFACTS`: this Run\'s artifact directory. Files you write there are shown to the member.\n- `DRISP_RUN_ID`, `DRISP_RUNNER_ID`, `DRISP_RUN_TOKEN`, `DRISP_HUB_URL`: this Run, its Runner and its right to start\n child Runs; `drisp build` reads them itself.\n\n## 1. Read Linear (first Turn)\n\nWith the `linear` MCP server, read the project and every issue in it, then write\n`$DRISP_RUN_ARTIFACTS/input/plan-input.json` (create the `input` directory) in exactly this shape. Every issue carries\nevery field, empty when it has none. `readAt` is the output of\n`node -e "console.log(new Date().toISOString())"` run just before you read Linear; never write a time yourself:\n\n```json\n{\n "version": 1,\n "readAt": "<the command\'s output, e.g. 2026-10-11T09:30:00.000Z>",\n "project": {\n "id": "<the project\'s `uuid`, not its `id`>",\n "name": "<the project\'s `name`>",\n "slugId": "<the last `-`-separated part of the project\'s `url`>"\n },\n "issues": [\n {\n "id": "<the issue\'s `uuid`, not its `id`>",\n "identifier": "<the issue\'s `id`, e.g. DRI-12>",\n "title": "<the issue\'s `title`>",\n "url": "<the issue\'s `url`>",\n "branchName": "<the issue\'s `gitBranchName`, or null>",\n "state": {\n "type": "<the issue\'s `statusType`: backlog|unstarted|started|completed|canceled|triage>",\n "name": "<the issue\'s `status`>"\n },\n "labels": ["<each of the issue\'s `labels`>"],\n "parentId": "<the parent issue\'s `uuid`, or null>",\n "blockedBy": ["<the `uuid` of each issue in `relations.blockedBy`>"],\n "prioritySortOrder": 0\n }\n ]\n}\n```\n\nLinear\'s MCP names fields differently from this file, and the difference matters: the app finds each issue\'s row by\nits UUID, so a plan that carries identifiers shows no Build state on any row.\n\n- The MCP\'s `id` is the readable identifier (`DRI-12`, or `P-DRI-7` for a project); the UUID is in `uuid`. Every\n `id`, `parentId` and `blockedBy` value in `plan-input.json` is a UUID (`7f7b03f7-accf-46b2-98fb-abadfed76594`).\n- An issue\'s `parentId` and `relations.blockedBy` from the MCP name issues by identifier. Look each one up: use the\n `uuid` of the project\'s issue with that identifier, or `get_issue` it when it is outside the project.\n- Read relations with `get_issue` and `includeRelations: true`; read the project\'s issues with `list_issues` and\n `fields` including `uuid`.\n- The project\'s `url` ends in its `slugId` (`\u2026/project/build-sandbox-b7640301cd64` \u2192 `b7640301cd64`).\n\n`drisp build plan` rejects a plan with an identifier where a UUID belongs and names the field to fix.\n\nInclude every issue of the project, done and canceled ones too: the plan decides what to skip. Then run:\n\n```sh\ndrisp build plan --input "$DRISP_RUN_ARTIFACTS/input/plan-input.json"\n```\n\nIt prints one JSON object. Act on its `status`.\n\n## 2. `needs_fills`\n\n`fills` lists issues that need a `fill.json` (`identifier`, `title`, `url`, `path`) and `templateVersion` is the value\neach fill must carry. For each listed issue: read it through `linear` (description, acceptance criteria, comments) and\nthe repo\'s ADRs and CONTEXT files it touches, then write its `fill.json` at `path`:\n\n```json\n{\n "version": 1,\n "templateVersion": "<templateVersion, copied exactly>",\n "areas": ["macos|web|cli|hub|protocol|docs", "\u2026"],\n "qa": "none|web|macos",\n "sizeClass": "S|M|L",\n "instructions": "<what the child needs beyond the issue>",\n "ownWork": true\n}\n```\n\n- `areas`: the parts of the repo the change touches, each once.\n- `qa`: `web` when the change shows in a web page, `macos` when it shows in the macOS app, else `none`.\n- `sizeClass`: `S` for a change of a file or two, `M` for a feature across a few modules, `L` for a large or risky\n change.\n- `instructions` (at most 6000 characters): start with one short paragraph saying what to build, then restate the\n acceptance criteria, name the ADRs it touches and the parts of the codebase involved. Plain prose and `-` lists\n only: no headings, code fences or HTML comments (`drisp build plan` rejects them).\n- `ownWork`: `false` only for an issue with sub-issues whose own description asks for nothing beyond them, such as\n a PRD above its slices; the plan then skips it and waits for its sub-issues instead. Otherwise `true`.\n\nThen run `drisp build plan` again with the same `--input` path.\n\n## 3. `planned` or `failed`\n\nOn `planned` the Build plan is written and shown to the member, who decides whether to start it: end the Turn with\n`<!-- AWAITING_APPROVAL -->` as the Journal\'s last line. On `failed` the reason is shown instead: end with\n`<!-- WORKFLOW_COMPLETE -->`.\n\n## 4. Every later wake: tick\n\nYou are woken when the member answers the approval question (with Start, or with words of their own before it) and whenever one of your child Runs closes or parks.\nEach time: read Linear again into `$DRISP_RUN_ARTIFACTS/input/plan-input.json` as in step 1 (with a new `readAt`),\nthen run:\n\n```sh\ndrisp build tick --input "$DRISP_RUN_ARTIFACTS/input/plan-input.json"\n```\n\nIt prints one JSON object. Act on its `action`, and repeat until an action ends the Turn:\n\n- `refresh_input`: read Linear into the input again (a newer `readAt`) and tick again.\n- `replan`: the member wrote words before starting, and `guidance` lists every round of them, oldest first. Plan again\n with them as the member\'s wishes: read the issues they concern (and the repo) as in step 2, rewrite the `fill.json`\n of each issue the guidance changes (`instructions`, `areas`, `qa`, `sizeClass`, or `ownWork` to leave an issue out),\n and run `drisp build plan` again with the same `--input` path. Then end as in step 3: with\n `<!-- AWAITING_APPROVAL -->` on `planned`, `<!-- WORKFLOW_COMPLETE -->` on `failed`. Write nothing but those\n `fill.json` files.\n- `repair`: for each of `issues`, read it in Linear first and skip an issue Linear now shows Done or Canceled (its\n child got there first); otherwise move it to Done and post its `comment` verbatim through `linear`. Then read\n Linear into the input again and tick again.\n- `rebase`: for each of `items`, in its `worktree`: `git rebase origin/main`, resolve the conflicts, then\n `git push --force-with-lease origin <branch>` (the item\'s `branch`) if the branch is on the remote. Never push any\n other branch. If a rebase cannot be resolved, `git rebase --abort`.\n Then read Linear into the input again and tick again, adding `--rebase-failed <identifier>` for each that failed.\n- `wait`: end the Turn with `<!-- WAITING_ON_CHILDREN -->` as the Journal\'s last line.\n- `park`: end the Turn with `<!-- NEEDS_HUMAN: <message> -->` as the Journal\'s last line, copying `message`\n verbatim.\n- `complete`: end the Turn with `<!-- WORKFLOW_COMPLETE -->` as the Journal\'s last line.\n\n## Rules\n\n- Never start, cancel or edit Runs, Workflows, worktrees or branches except as an action says; `drisp build` does\n what is needed.\n- Never write to Linear except a `repair`; never open a pull request.\n- Write only `plan-input.json` and the `fill.json` files `drisp build plan` asks for. Never write `answer.json`.\n';
|
|
21285
21285
|
|
|
21286
21286
|
// src/core/workflows/builtins/orchestrator/index.ts
|
|
21287
21287
|
var ORCHESTRATOR_WORKFLOW_NAME = "orchestrator";
|
|
@@ -24251,4 +24251,4 @@ export {
|
|
|
24251
24251
|
compileWorkflowPlan,
|
|
24252
24252
|
collectMcpServersWithOptions
|
|
24253
24253
|
};
|
|
24254
|
-
//# sourceMappingURL=chunk-
|
|
24254
|
+
//# sourceMappingURL=chunk-TSIMXPJN.js.map
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
verifyRendered,
|
|
56
56
|
wakesFreshAfterHandover,
|
|
57
57
|
workflowRegistryDir
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-TSIMXPJN.js";
|
|
59
59
|
import {
|
|
60
60
|
__commonJS,
|
|
61
61
|
__toESM
|
|
@@ -13066,6 +13066,26 @@ var AssignmentRejectedReasonSchema = external_exports.enum([
|
|
|
13066
13066
|
"workspace_invalid"
|
|
13067
13067
|
]);
|
|
13068
13068
|
|
|
13069
|
+
// ../../packages/protocol/src/budget.ts
|
|
13070
|
+
var SIZE_CLASS_CAPS = {
|
|
13071
|
+
S: 3e6,
|
|
13072
|
+
M: 6e6,
|
|
13073
|
+
L: 12e6
|
|
13074
|
+
};
|
|
13075
|
+
var SIZE_CLASS_FORECASTS = {
|
|
13076
|
+
S: 15e4,
|
|
13077
|
+
M: 4e5,
|
|
13078
|
+
L: 12e5
|
|
13079
|
+
};
|
|
13080
|
+
function classOfCap(declaredCap) {
|
|
13081
|
+
if (declaredCap <= SIZE_CLASS_CAPS.S) return "S";
|
|
13082
|
+
if (declaredCap <= SIZE_CLASS_CAPS.M) return "M";
|
|
13083
|
+
return "L";
|
|
13084
|
+
}
|
|
13085
|
+
function attemptCost(attempt) {
|
|
13086
|
+
return attempt.closed ? SIZE_CLASS_FORECASTS[classOfCap(attempt.tokenCap)] : attempt.tokenCap;
|
|
13087
|
+
}
|
|
13088
|
+
|
|
13069
13089
|
// ../../packages/protocol/src/v2.ts
|
|
13070
13090
|
var protocolVersion = { major: 2, minor: 2 };
|
|
13071
13091
|
var conversationContinuationCapability = "conversation_continuation";
|
|
@@ -14873,7 +14893,7 @@ async function restoreCheckpoint(store, input) {
|
|
|
14873
14893
|
|
|
14874
14894
|
// ../../modules/runtime/src/software-version.ts
|
|
14875
14895
|
import "fs";
|
|
14876
|
-
var runnerSoftwareVersion = true ? "0.7.
|
|
14896
|
+
var runnerSoftwareVersion = true ? "0.7.4" : JSON.parse(readFileSync2(new URL("../../../apps/cli/package.json", import.meta.url), "utf8")).version;
|
|
14877
14897
|
|
|
14878
14898
|
// ../../modules/runtime/src/connection.ts
|
|
14879
14899
|
var RunnerDisconnectedError = class extends Error {
|
|
@@ -20398,8 +20418,20 @@ import { readFileSync as readFileSync3, realpathSync as realpathSync3 } from "fs
|
|
|
20398
20418
|
import { join as join6, relative as relative3 } from "path";
|
|
20399
20419
|
|
|
20400
20420
|
// src/core/build/answer.ts
|
|
20421
|
+
var GUIDANCE_ROUNDS = 10;
|
|
20422
|
+
function approvalAnswer(value) {
|
|
20423
|
+
if (typeof value === "string")
|
|
20424
|
+
return value.trim() === "" ? { kind: "none" } : { kind: "guidance", guidance: value.trim() };
|
|
20425
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).length === 1 && value.choice === "start")
|
|
20426
|
+
return { kind: "start" };
|
|
20427
|
+
return { kind: "none" };
|
|
20428
|
+
}
|
|
20401
20429
|
function isStartAnswer(value) {
|
|
20402
|
-
return
|
|
20430
|
+
return approvalAnswer(value).kind === "start";
|
|
20431
|
+
}
|
|
20432
|
+
function mergeGuidance(earlier, guidance) {
|
|
20433
|
+
const rounds = earlier.at(-1) === guidance ? earlier : [...earlier, guidance];
|
|
20434
|
+
return rounds.slice(-GUIDANCE_ROUNDS);
|
|
20403
20435
|
}
|
|
20404
20436
|
|
|
20405
20437
|
// src/core/build/planner.ts
|
|
@@ -21383,6 +21415,8 @@ function createWorkflowExecutor(dependencies = {}) {
|
|
|
21383
21415
|
record(APPROVAL_ANSWERED, { answer: continuation.answer, plan: pending2.plan });
|
|
21384
21416
|
}
|
|
21385
21417
|
}
|
|
21418
|
+
const guidedPlan = continuation?.kind === "resume" && continuation.guidance?.trim() && pendingApproval(store, grant.runId) ? continuation.guidance : void 0;
|
|
21419
|
+
if (guidedPlan !== void 0) writeFileSync4(join8(artifacts, "answer.json"), JSON.stringify(guidedPlan));
|
|
21386
21420
|
let storedAnswer2;
|
|
21387
21421
|
if (continuation?.kind === "answer") {
|
|
21388
21422
|
const answer = permissionAnswerSchema.safeParse(continuation.answer);
|
|
@@ -21396,7 +21430,9 @@ function createWorkflowExecutor(dependencies = {}) {
|
|
|
21396
21430
|
};
|
|
21397
21431
|
}
|
|
21398
21432
|
}
|
|
21399
|
-
let prompt2 =
|
|
21433
|
+
let prompt2 = guidedPlan !== void 0 ? `The member wrote this before starting the Build, to change the plan:
|
|
21434
|
+
${guidedPlan}
|
|
21435
|
+
Run \`drisp build tick\` as in your later-wake instructions and act on its action.` : continuation?.kind === "resume" ? continuation.guidance ?? "Continue the parked workflow." : continuation?.kind === "answer" ? `Human answer to the parked interruption:
|
|
21400
21436
|
${JSON.stringify(continuation.answer)}` : grant.spec.prompt;
|
|
21401
21437
|
const displayText2 = continuation?.kind === "resume" ? continuation.guidance : continuation?.kind === "answer" ? typeof continuation.answer === "string" ? continuation.answer : JSON.stringify(continuation.answer) : grant.spec.prompt;
|
|
21402
21438
|
if (grant.previousRun) {
|
|
@@ -21863,6 +21899,7 @@ export {
|
|
|
21863
21899
|
RUN_EXIT_CODE,
|
|
21864
21900
|
localAnswerDecision,
|
|
21865
21901
|
runExec,
|
|
21902
|
+
attemptCost,
|
|
21866
21903
|
repositoryBindingSchema,
|
|
21867
21904
|
commandSchema,
|
|
21868
21905
|
historyRecordSchema,
|
|
@@ -21893,7 +21930,8 @@ export {
|
|
|
21893
21930
|
commitBuildFiles,
|
|
21894
21931
|
lastCommitTouching,
|
|
21895
21932
|
repoLayoutAt,
|
|
21896
|
-
|
|
21933
|
+
approvalAnswer,
|
|
21934
|
+
mergeGuidance,
|
|
21897
21935
|
planBuild,
|
|
21898
21936
|
finalizePlan,
|
|
21899
21937
|
fallbackBranch,
|
|
@@ -21918,4 +21956,4 @@ export {
|
|
|
21918
21956
|
runMachineRunners,
|
|
21919
21957
|
writeIdentityOnce
|
|
21920
21958
|
};
|
|
21921
|
-
//# sourceMappingURL=chunk-
|
|
21959
|
+
//# sourceMappingURL=chunk-XG7B4OOC.js.map
|
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,9 @@ import {
|
|
|
8
8
|
PORTABLE_PROVIDER_ENV_VARS,
|
|
9
9
|
RUN_EXIT_CODE,
|
|
10
10
|
ServiceNotEnabledError,
|
|
11
|
+
approvalAnswer,
|
|
11
12
|
attachRuntimeEventLoop,
|
|
13
|
+
attemptCost,
|
|
12
14
|
behindMain,
|
|
13
15
|
bootstrapRuntimeConfig,
|
|
14
16
|
buildApiKeyHelperSettings,
|
|
@@ -70,7 +72,6 @@ import {
|
|
|
70
72
|
isCommandPrefix,
|
|
71
73
|
isGitHubRepository,
|
|
72
74
|
isScopedPermissionsRequest,
|
|
73
|
-
isStartAnswer,
|
|
74
75
|
lastCommitTouching,
|
|
75
76
|
listAwaitingAttentionRuns,
|
|
76
77
|
listHarnessAdapters,
|
|
@@ -82,6 +83,7 @@ import {
|
|
|
82
83
|
machineInstallationId,
|
|
83
84
|
makeSkippedProbe,
|
|
84
85
|
mergeFeedItems,
|
|
86
|
+
mergeGuidance,
|
|
85
87
|
messageGlyphs,
|
|
86
88
|
overriddenIdentityPath,
|
|
87
89
|
parseFrontmatter,
|
|
@@ -138,7 +140,7 @@ import {
|
|
|
138
140
|
visualPositionToOffset,
|
|
139
141
|
wrapText,
|
|
140
142
|
writeIdentityOnce
|
|
141
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-XG7B4OOC.js";
|
|
142
144
|
import {
|
|
143
145
|
generateId as generateId2
|
|
144
146
|
} from "./chunk-PQIB66SG.js";
|
|
@@ -196,7 +198,7 @@ import {
|
|
|
196
198
|
workflowRegistryDir,
|
|
197
199
|
writeGlobalConfig,
|
|
198
200
|
writeProjectConfig
|
|
199
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-TSIMXPJN.js";
|
|
200
202
|
import {
|
|
201
203
|
__toESM
|
|
202
204
|
} from "./chunk-G3PMV62Z.js";
|
|
@@ -14360,7 +14362,13 @@ function assessTick(facts) {
|
|
|
14360
14362
|
}).length;
|
|
14361
14363
|
const queue = [];
|
|
14362
14364
|
if (!parkReason) {
|
|
14363
|
-
let capped = Object.values(state.attempts).flat().reduce(
|
|
14365
|
+
let capped = Object.values(state.attempts).flat().reduce(
|
|
14366
|
+
(sum, attempt) => sum + attemptCost({
|
|
14367
|
+
tokenCap: attempt.tokenCap,
|
|
14368
|
+
closed: views.get(attempt.runId)?.closed === true
|
|
14369
|
+
}),
|
|
14370
|
+
0
|
|
14371
|
+
);
|
|
14364
14372
|
for (const entry of entries) {
|
|
14365
14373
|
if (status.get(entry.id) !== "ready") continue;
|
|
14366
14374
|
if (capped + entry.tokenCap > facts.limits.tokenBudget) {
|
|
@@ -14411,6 +14419,16 @@ var notStarted = () => ({
|
|
|
14411
14419
|
action: "complete",
|
|
14412
14420
|
message: BUILD_STRINGS.notStarted
|
|
14413
14421
|
});
|
|
14422
|
+
var guidanceFile = (artifacts) => path7.join(artifacts, "input", "guidance.json");
|
|
14423
|
+
function replan(artifacts, guidance) {
|
|
14424
|
+
const earlier = readJson(guidanceFile(artifacts));
|
|
14425
|
+
const rounds = mergeGuidance(
|
|
14426
|
+
Array.isArray(earlier) ? earlier.filter((round) => typeof round === "string") : [],
|
|
14427
|
+
guidance
|
|
14428
|
+
);
|
|
14429
|
+
writeFile(guidanceFile(artifacts), json(rounds));
|
|
14430
|
+
return { action: "replan", guidance: rounds };
|
|
14431
|
+
}
|
|
14414
14432
|
function pushBranch(worktree, branch) {
|
|
14415
14433
|
git(worktree, ["push", "--quiet", "origin", `${branch}:${branch}`]);
|
|
14416
14434
|
}
|
|
@@ -14479,8 +14497,11 @@ async function runBuildTick(deps) {
|
|
|
14479
14497
|
if (parsedState.success && parsedState.data.orchestratorRunId === orchestratorRunId) {
|
|
14480
14498
|
stored = parsedState.data;
|
|
14481
14499
|
} else {
|
|
14482
|
-
|
|
14483
|
-
|
|
14500
|
+
const answer = approvalAnswer(
|
|
14501
|
+
readJson(path7.join(artifacts, "answer.json"))
|
|
14502
|
+
);
|
|
14503
|
+
if (answer.kind === "guidance") return replan(artifacts, answer.guidance);
|
|
14504
|
+
if (answer.kind !== "start") return notStarted();
|
|
14484
14505
|
stored = {
|
|
14485
14506
|
version: 1,
|
|
14486
14507
|
orchestratorRunId,
|
|
@@ -15939,7 +15960,7 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
|
|
|
15939
15960
|
await exitWith(1);
|
|
15940
15961
|
return;
|
|
15941
15962
|
}
|
|
15942
|
-
const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-
|
|
15963
|
+
const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-AJYDKFDL.js");
|
|
15943
15964
|
const { waitUntilExit } = render(
|
|
15944
15965
|
/* @__PURE__ */ jsx24(
|
|
15945
15966
|
WorkflowInstallWizard,
|
package/dist/dashboard-daemon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-F6XUMTMC.js";
|
|
2
|
+
import "./chunk-XG7B4OOC.js";
|
|
3
3
|
import "./chunk-PQIB66SG.js";
|
|
4
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-TSIMXPJN.js";
|
|
5
5
|
import "./chunk-G3PMV62Z.js";
|
|
6
6
|
//# sourceMappingURL=dashboard-daemon.js.map
|
package/dist/runner.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-F6XUMTMC.js";
|
|
2
|
+
import "./chunk-XG7B4OOC.js";
|
|
3
3
|
import "./chunk-PQIB66SG.js";
|
|
4
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-TSIMXPJN.js";
|
|
5
5
|
import "./chunk-G3PMV62Z.js";
|
|
6
6
|
//# sourceMappingURL=runner.js.map
|