@drisp/cli 0.7.7 → 0.7.9
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-VVEEJW25.js → WorkflowInstallWizard-FKASDA6N.js} +2 -2
- package/dist/{chunk-HZ6GRLOM.js → chunk-FYXEDUQ6.js} +45 -8
- package/dist/{chunk-D246FR4I.js → chunk-TWOJJ2JD.js} +199 -40
- package/dist/{chunk-D5VZT7M3.js → chunk-Z5KVWWZU.js} +2 -2
- package/dist/cli.js +219 -56
- 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-FYXEDUQ6.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-FKASDA6N.js.map
|
|
@@ -21227,6 +21227,11 @@ var BUILD_STRINGS = {
|
|
|
21227
21227
|
templatePark: "Drisp was updated during this Build. Build again to re-plan.",
|
|
21228
21228
|
notStarted: "Not started",
|
|
21229
21229
|
waiting: "Waiting for child Runs.",
|
|
21230
|
+
/**
|
|
21231
|
+
* The Merge step's Sign-off when the member merges (`merge: you`, root ADR-0009): the `NEEDS_HUMAN` text a child
|
|
21232
|
+
* parks with, `{sha}` being the full head SHA it asks about. The app reads it as "Blocked · Your merge".
|
|
21233
|
+
*/
|
|
21234
|
+
mergeSignOff: "Your merge: this pull request is ready to merge at {sha}. Reply in this Thread to sign off on that commit, or say what to change.",
|
|
21230
21235
|
notAGitHubRepository: "The project folder is not a git repository with a GitHub origin.",
|
|
21231
21236
|
cycle: (identifiers) => `These issues block each other in Linear: ${identifiers.join(", ")}.`,
|
|
21232
21237
|
/** The comment the Orchestrator posts with its one Linear write, moving a merged issue to Done. */
|
|
@@ -21255,7 +21260,7 @@ var GATES = [
|
|
|
21255
21260
|
},
|
|
21256
21261
|
{
|
|
21257
21262
|
title: "Checks",
|
|
21258
|
-
passesWhen: "{install}{checks} pass",
|
|
21263
|
+
passesWhen: "{install}{checks} pass, each check run through `drisp build check <name> -- <command>` (for example `drisp build check typecheck -- make typecheck`), which records its outcome for the Build page",
|
|
21259
21264
|
cannotPass: "This issue's checks still fail after repeated fixes. Open the Thread to see the failing output."
|
|
21260
21265
|
},
|
|
21261
21266
|
{
|
|
@@ -21281,7 +21286,7 @@ var GATES = [
|
|
|
21281
21286
|
];
|
|
21282
21287
|
|
|
21283
21288
|
// 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 "description": "<full current description>",\n "acceptanceCriteria": "<acceptance criteria, empty when included in description>",\n "external": false,\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\nAlso include every referenced blocker outside the project, with `external: true`, its current status and UUID. Follow blocker relations recursively; deduplicate by UUID. Never mark a project issue external. External issues are read only and never scheduled. Preserve actual prioritySortOrder when available.\n\nOnly ready-for-agent issues without conflicting ready-for-human, needs-info, needs-triage or wontfix labels are eligible. Do not invent or change labels to make an issue eligible.\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|both",\n "profile": "implementation|documentation|investigation",\n "rationale": "<why these steps are appropriate>",\n "acceptanceEvidence": [\n "<each acceptance criterion and the evidence that demonstrates it>"\n ],\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- `profile`: implementation for behavior changes, documentation for prose-only repository changes, investigation for findings with no repository changes. Implementation defaults to TDD and two-reviewer code review; documentation and investigation omit these by default. Choose the profile from the actual deliverable, not the issue size.\n- Optional `testFirst` and `review`: `{ "enabled": true|false, "reason": "<issue-specific justification>" }`. Retain tests and review for behavioral changes; omit only when not applicable and explain why. These selections also control required skills.\n- Optional `checks`: a nonempty list of actual validation commands from the repo, using the supported npm, vitest, make or git diff command families. Read repository tooling and add the relevant test/build checks: typechecking alone does not prove behavior. If a necessary command is unsupported, state that limitation in instructions and require human attention, never claim validation passed.\n- `acceptanceEvidence`: cover every criterion, including the method and expected outcome.\n- `qa`: `both` when both interfaces change, `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`),\nincluding full descriptions, acceptance criteria, labels and external blocker status. A scope change holds the affected issue for a fresh Build and approval. Then 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';
|
|
21289
|
+
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 "description": "<full current description>",\n "acceptanceCriteria": "<acceptance criteria, empty when included in description>",\n "external": false,\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\nAlso include every referenced blocker outside the project, with `external: true`, its current status and UUID. Follow blocker relations recursively; deduplicate by UUID. Never mark a project issue external. External issues are read only and never scheduled. Preserve actual prioritySortOrder when available.\n\nOnly ready-for-agent issues without conflicting ready-for-human, needs-info, needs-triage or wontfix labels are eligible. Do not invent or change labels to make an issue eligible.\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. A `reason`, when present, says what to correct in the listed fills (fills that disagree on\n`merge`, say); fix that and keep the rest of each fill. For each listed issue: read it through `linear` (description,\nacceptance criteria, comments) and the 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|both",\n "profile": "implementation|documentation|investigation",\n "rationale": "<why these steps are appropriate>",\n "acceptanceEvidence": [\n "<each acceptance criterion and the evidence that demonstrates it>"\n ],\n "sizeClass": "S|M|L",\n "merge": "agent|you",\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- `profile`: implementation for behavior changes, documentation for prose-only repository changes, investigation for findings with no repository changes. Implementation defaults to TDD and two-reviewer code review; documentation and investigation omit these by default. Choose the profile from the actual deliverable, not the issue size.\n- Optional `testFirst` and `review`: `{ "enabled": true|false, "reason": "<issue-specific justification>" }`. Retain tests and review for behavioral changes; omit only when not applicable and explain why. These selections also control required skills.\n- Optional `checks`: a nonempty list of actual validation commands from the repo, using the supported npm, vitest, make or git diff command families. Read repository tooling and add the relevant test/build checks: typechecking alone does not prove behavior. If a necessary command is unsupported, state that limitation in instructions and require human attention, never claim validation passed.\n- `acceptanceEvidence`: cover every criterion, including the method and expected outcome.\n- `qa`: `both` when both interfaces change, `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- `merge`: who merges each pull request. `agent` (the default) unless the member\'s own words in this chat, in the\n Run\'s prompt or a guidance reply, ask to merge themselves ("ask me before merging", "I\'ll merge"): then `you`, and\n the child\'s Merge step waits for the member\'s Sign-off in its Thread. It is one choice for the whole Build: write the\n same value in every fill. It is fixed once the member presses Start: if they ask to change it after Start, tell\n them to Cancel the Build and Build again.\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`),\nincluding full descriptions, acceptance criteria, labels and external blocker status. A scope change holds the affected issue for a fresh Build and approval. Then 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`, `merge` in every fill when the\n member says who merges, 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
21290
|
|
|
21286
21291
|
// src/core/workflows/builtins/orchestrator/index.ts
|
|
21287
21292
|
var ORCHESTRATOR_WORKFLOW_NAME = "orchestrator";
|
|
@@ -21472,7 +21477,7 @@ is in \`ignored\`: it does not block the merge and its name goes in the evidence
|
|
|
21472
21477
|
empty, wait a minute and run it again. When \`failed\` is not empty, fix the change; if it still fails, the Merge gate
|
|
21473
21478
|
cannot pass. Never judge a check by its timing.
|
|
21474
21479
|
|
|
21475
|
-
Immediately before merging, verify the current revision again: {mergeVerify}. If evidence is stale, rerun the
|
|
21480
|
+
{signOff}Immediately before merging, verify the current revision again: {mergeVerify}. If evidence is stale, rerun the
|
|
21476
21481
|
selected validation steps and record fresh receipts before continuing.
|
|
21477
21482
|
|
|
21478
21483
|
Merge with \`gh pr merge --squash --delete-branch --match-head-commit <sha>\`, where \`<sha>\` is HEAD after the last
|
|
@@ -21503,6 +21508,18 @@ Evidence. Never create issues and never edit an issue's title or description.
|
|
|
21503
21508
|
|
|
21504
21509
|
When every gate has passed, end with \`<!-- WORKFLOW_COMPLETE -->\` as the Journal's last line.
|
|
21505
21510
|
`;
|
|
21511
|
+
var MERGE_SIGN_OFF = {
|
|
21512
|
+
passesWhen: "the merge gate below holds, with the member\u2019s Sign-off on HEAD",
|
|
21513
|
+
section: `Sign-off: this Build's member merges, so the merge waits for their Sign-off on the exact head commit. When
|
|
21514
|
+
everything above holds and HEAD is pushed, end the Turn with \`<!-- NEEDS_HUMAN: {signOffText} -->\` as the Journal's
|
|
21515
|
+
last line, where \`<sha>\` is the full \`git rev-parse HEAD\`. The member answers in this Thread. When their reply signs
|
|
21516
|
+
off on that commit, record it with \`{signOffCommand}\`, which refuses any SHA but HEAD; it is your attestation of
|
|
21517
|
+
their reply, so never record one they did not give. Any other reply is guidance: act on it, then ask again. A
|
|
21518
|
+
Sign-off names one commit: after a rebase or any new commit, ask again before merging.
|
|
21519
|
+
When \`gh pr merge\` fails because the branch is protected, the Merge gate cannot pass.
|
|
21520
|
+
|
|
21521
|
+
`
|
|
21522
|
+
};
|
|
21506
21523
|
var STAGE_TEMPLATE = `### {n}. {title}
|
|
21507
21524
|
|
|
21508
21525
|
Start: run \`{stepCommand}\`.
|
|
@@ -21584,6 +21601,7 @@ var RENDERER_RULES = {
|
|
|
21584
21601
|
permissions: {
|
|
21585
21602
|
edit: ["Edit(./**)"],
|
|
21586
21603
|
shell: [
|
|
21604
|
+
"drisp build check",
|
|
21587
21605
|
"drisp build checks",
|
|
21588
21606
|
"drisp build step",
|
|
21589
21607
|
"drisp build merged",
|
|
@@ -21721,11 +21739,11 @@ function selectedGates(fill) {
|
|
|
21721
21739
|
).map(
|
|
21722
21740
|
(gate) => fill.profile === "investigation" && gate.title === "Checks" ? {
|
|
21723
21741
|
...gate,
|
|
21724
|
-
passesWhen: "{install}{checks} pass
|
|
21742
|
+
passesWhen: "{install}{checks} pass, each check run through `drisp build check <name> -- <command>`; each finding is supported by a source or reproducible observation and each acceptance criterion has evidence; unresolved questions are stated explicitly"
|
|
21725
21743
|
} : fill.profile === "investigation" && gate.title === "Evidence" ? {
|
|
21726
21744
|
...gate,
|
|
21727
21745
|
passesWhen: "findings and evidence for each acceptance criterion are posted on the Linear issue, with unresolved questions explicitly stated; the issue is moved to Done only when all acceptance criteria are satisfied"
|
|
21728
|
-
} : gate
|
|
21746
|
+
} : fill.merge === "you" && gate.title === "Merge" ? { ...gate, passesWhen: MERGE_SIGN_OFF.passesWhen } : gate
|
|
21729
21747
|
);
|
|
21730
21748
|
if (!usesTestFirst(fill))
|
|
21731
21749
|
gates.splice(1, 0, {
|
|
@@ -21753,6 +21771,7 @@ var fillSlots = (template, slots) => template.replace(/\{(\w+)\}/g, (whole, key)
|
|
|
21753
21771
|
function selectionFlags(fill) {
|
|
21754
21772
|
return `${fill.profile ? ` --profile ${fill.profile}` : ""}${fill.testFirst ? ` --test-first ${fill.testFirst.enabled}` : ""}${fill.review ? ` --review ${fill.review.enabled}` : ""}`;
|
|
21755
21773
|
}
|
|
21774
|
+
var mergeFlag = (fill) => fill.merge === "you" ? " --merge you" : "";
|
|
21756
21775
|
function renderStages(fill, checks, install) {
|
|
21757
21776
|
const gates = selectedGates(fill);
|
|
21758
21777
|
return gates.map((gate, index) => {
|
|
@@ -21768,11 +21787,12 @@ function renderStages(fill, checks, install) {
|
|
|
21768
21787
|
stepCommand: command,
|
|
21769
21788
|
passesWhen
|
|
21770
21789
|
});
|
|
21790
|
+
const finish = `${command}${gate.title === "Merge" ? mergeFlag(fill) : ""}`;
|
|
21771
21791
|
return stage + (["Merge", "Evidence"].includes(gate.title) ? `
|
|
21772
21792
|
|
|
21773
21793
|
Before doing this step: run \`${command} --verify\`. Missing or stale evidence must be refreshed first.` : "") + `
|
|
21774
21794
|
|
|
21775
|
-
Finish: write the actual result and supporting paths to \`.athena/evidence/step-${index + 1}.md\`, then run \`${
|
|
21795
|
+
Finish: write the actual result and supporting paths to \`.athena/evidence/step-${index + 1}.md\`, then run \`${finish} --complete --evidence .athena/evidence/step-${index + 1}.md\`. This records an agent attestation, not independent verification.` + (gate.cannotPass ? fillSlots(CANNOT_PASS_TEMPLATE, { cannotPass: gate.cannotPass }) : NO_GATE_TEXT_TEMPLATE);
|
|
21776
21796
|
}).join("\n\n");
|
|
21777
21797
|
}
|
|
21778
21798
|
function render(fill, workflowName, layout) {
|
|
@@ -21818,6 +21838,7 @@ function render(fill, workflowName, layout) {
|
|
|
21818
21838
|
"Your Linear writes are In Progress in Explore, findings and evidence, and Done in Evidence."
|
|
21819
21839
|
);
|
|
21820
21840
|
}
|
|
21841
|
+
const mergeCommand = `drisp build step ${gateTitles(fill).indexOf("Merge") + 1} --qa ${fill.qa}${selectionFlags(fill)}`;
|
|
21821
21842
|
const workflowMd = fillSlots(template, {
|
|
21822
21843
|
identifier: parsed.identifier,
|
|
21823
21844
|
instructions: [
|
|
@@ -21830,7 +21851,11 @@ function render(fill, workflowName, layout) {
|
|
|
21830
21851
|
)
|
|
21831
21852
|
].filter(Boolean).join("\n\n"),
|
|
21832
21853
|
gates: renderStages(fill, checks, installCommand(fill, layout)),
|
|
21833
|
-
|
|
21854
|
+
signOff: fill.merge === "you" ? fillSlots(MERGE_SIGN_OFF.section, {
|
|
21855
|
+
signOffText: BUILD_STRINGS.mergeSignOff.replace("{sha}", "<sha>"),
|
|
21856
|
+
signOffCommand: `${mergeCommand} --merge you --sign-off <sha>`
|
|
21857
|
+
}) : "",
|
|
21858
|
+
mergeVerify: `\`${mergeCommand}${mergeFlag(fill)} --verify\``,
|
|
21834
21859
|
checksEvidence: checks.map((command) => `${command} \u2713`).join(" \xB7 "),
|
|
21835
21860
|
shellCommands: checksText(shellCommands(fill))
|
|
21836
21861
|
});
|
|
@@ -22422,6 +22447,15 @@ function budgetTokens(memory) {
|
|
|
22422
22447
|
if (memory.cumulativeTokens === null) return null;
|
|
22423
22448
|
return Math.max(0, memory.cumulativeTokens - (memory.usage?.cacheRead ?? 0));
|
|
22424
22449
|
}
|
|
22450
|
+
function runUsage(memory) {
|
|
22451
|
+
const counted = budgetTokens(memory);
|
|
22452
|
+
if (counted === null) return null;
|
|
22453
|
+
const whole = (tokens) => Number.isFinite(tokens) ? Math.min(Math.max(0, Math.round(tokens)), Number.MAX_SAFE_INTEGER) : 0;
|
|
22454
|
+
return {
|
|
22455
|
+
counted: whole(counted),
|
|
22456
|
+
cacheRead: whole(memory.usage?.cacheRead ?? 0)
|
|
22457
|
+
};
|
|
22458
|
+
}
|
|
22425
22459
|
function resourceInterruption(stop) {
|
|
22426
22460
|
const names2 = {
|
|
22427
22461
|
tokens: "token budget",
|
|
@@ -24282,6 +24316,8 @@ function collectMcpServersWithOptions(pluginDirs) {
|
|
|
24282
24316
|
export {
|
|
24283
24317
|
WAITING_ON_CHILDREN_STOP_REASON,
|
|
24284
24318
|
AWAITING_APPROVAL_STOP_REASON,
|
|
24319
|
+
budgetTokens,
|
|
24320
|
+
runUsage,
|
|
24285
24321
|
createSteerQueue,
|
|
24286
24322
|
DEFAULT_PERMISSION_GRACE_MS,
|
|
24287
24323
|
serializeRunMemory,
|
|
@@ -24321,6 +24357,7 @@ export {
|
|
|
24321
24357
|
DESCRIPTION_TEMPLATE,
|
|
24322
24358
|
QA_SECTIONS,
|
|
24323
24359
|
WORKFLOW_MD_TEMPLATE,
|
|
24360
|
+
MERGE_SIGN_OFF,
|
|
24324
24361
|
STAGE_TEMPLATE,
|
|
24325
24362
|
CANNOT_PASS_TEMPLATE,
|
|
24326
24363
|
NO_GATE_TEXT_TEMPLATE,
|
|
@@ -24347,4 +24384,4 @@ export {
|
|
|
24347
24384
|
compileWorkflowPlan,
|
|
24348
24385
|
collectMcpServersWithOptions
|
|
24349
24386
|
};
|
|
24350
|
-
//# sourceMappingURL=chunk-
|
|
24387
|
+
//# sourceMappingURL=chunk-FYXEDUQ6.js.map
|