zelio-cli 0.0.0-stage → 0.1.0-beta.1
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/README.md +178 -2
- package/dist/attachments.js +121 -0
- package/dist/attachments.js.map +1 -0
- package/dist/cli.js +469 -0
- package/dist/cli.js.map +1 -0
- package/dist/cloud/board.js +311 -0
- package/dist/cloud/board.js.map +1 -0
- package/dist/cloud/command.js +260 -0
- package/dist/cloud/command.js.map +1 -0
- package/dist/cloud/config.js +132 -0
- package/dist/cloud/config.js.map +1 -0
- package/dist/cloud/credentials.js +134 -0
- package/dist/cloud/credentials.js.map +1 -0
- package/dist/cloud/login.js +165 -0
- package/dist/cloud/login.js.map +1 -0
- package/dist/cloud/pair.js +110 -0
- package/dist/cloud/pair.js.map +1 -0
- package/dist/cloud/pkce.js +16 -0
- package/dist/cloud/pkce.js.map +1 -0
- package/dist/cloud/push-nudge.js +63 -0
- package/dist/cloud/push-nudge.js.map +1 -0
- package/dist/cloud/relay.js +129 -0
- package/dist/cloud/relay.js.map +1 -0
- package/dist/cloud/token.js +66 -0
- package/dist/cloud/token.js.map +1 -0
- package/dist/cloud/tunnel.js +410 -0
- package/dist/cloud/tunnel.js.map +1 -0
- package/dist/db/db.js +1614 -0
- package/dist/db/db.js.map +1 -0
- package/dist/db/lifecycle.js +133 -0
- package/dist/db/lifecycle.js.map +1 -0
- package/dist/limits.js +35 -0
- package/dist/limits.js.map +1 -0
- package/dist/metrics.js +30 -0
- package/dist/metrics.js.map +1 -0
- package/dist/orchestrator/claude-session.js +208 -0
- package/dist/orchestrator/claude-session.js.map +1 -0
- package/dist/orchestrator/codex-session.js +326 -0
- package/dist/orchestrator/codex-session.js.map +1 -0
- package/dist/orchestrator/contract.js +181 -0
- package/dist/orchestrator/contract.js.map +1 -0
- package/dist/orchestrator/explore.js +176 -0
- package/dist/orchestrator/explore.js.map +1 -0
- package/dist/orchestrator/new-task-prompt.js +51 -0
- package/dist/orchestrator/new-task-prompt.js.map +1 -0
- package/dist/orchestrator/pi-session.js +228 -0
- package/dist/orchestrator/pi-session.js.map +1 -0
- package/dist/orchestrator/prompt.js +110 -0
- package/dist/orchestrator/prompt.js.map +1 -0
- package/dist/orchestrator/research.js +178 -0
- package/dist/orchestrator/research.js.map +1 -0
- package/dist/orchestrator/runtime.js +1054 -0
- package/dist/orchestrator/runtime.js.map +1 -0
- package/dist/orchestrator/session.js +2 -0
- package/dist/orchestrator/session.js.map +1 -0
- package/dist/orchestrator/types.js +2 -0
- package/dist/orchestrator/types.js.map +1 -0
- package/dist/orchestrator/web.js +276 -0
- package/dist/orchestrator/web.js.map +1 -0
- package/dist/repo/index.js +188 -0
- package/dist/repo/index.js.map +1 -0
- package/dist/repo/instructions.js +52 -0
- package/dist/repo/instructions.js.map +1 -0
- package/dist/repo/linked-boards.js +252 -0
- package/dist/repo/linked-boards.js.map +1 -0
- package/dist/run/actions.js +233 -0
- package/dist/run/actions.js.map +1 -0
- package/dist/run/bash-guard.js +183 -0
- package/dist/run/bash-guard.js.map +1 -0
- package/dist/run/claude-runtime.js +242 -0
- package/dist/run/claude-runtime.js.map +1 -0
- package/dist/run/claude-stream.js +306 -0
- package/dist/run/claude-stream.js.map +1 -0
- package/dist/run/codex-client.js +200 -0
- package/dist/run/codex-client.js.map +1 -0
- package/dist/run/codex-runtime.js +366 -0
- package/dist/run/codex-runtime.js.map +1 -0
- package/dist/run/context.js +87 -0
- package/dist/run/context.js.map +1 -0
- package/dist/run/diff.js +196 -0
- package/dist/run/diff.js.map +1 -0
- package/dist/run/evidence.js +48 -0
- package/dist/run/evidence.js.map +1 -0
- package/dist/run/finish.js +393 -0
- package/dist/run/finish.js.map +1 -0
- package/dist/run/harness-runtime.js +28 -0
- package/dist/run/harness-runtime.js.map +1 -0
- package/dist/run/harnesses.js +273 -0
- package/dist/run/harnesses.js.map +1 -0
- package/dist/run/issue.js +79 -0
- package/dist/run/issue.js.map +1 -0
- package/dist/run/keep-awake.js +58 -0
- package/dist/run/keep-awake.js.map +1 -0
- package/dist/run/lead.js +200 -0
- package/dist/run/lead.js.map +1 -0
- package/dist/run/manager.js +1709 -0
- package/dist/run/manager.js.map +1 -0
- package/dist/run/mentions.js +35 -0
- package/dist/run/mentions.js.map +1 -0
- package/dist/run/merge-watch.js +394 -0
- package/dist/run/merge-watch.js.map +1 -0
- package/dist/run/models.js +88 -0
- package/dist/run/models.js.map +1 -0
- package/dist/run/phases.js +23 -0
- package/dist/run/phases.js.map +1 -0
- package/dist/run/pi-rpc.js +412 -0
- package/dist/run/pi-rpc.js.map +1 -0
- package/dist/run/pr-merge.js +121 -0
- package/dist/run/pr-merge.js.map +1 -0
- package/dist/run/profiles.js +43 -0
- package/dist/run/profiles.js.map +1 -0
- package/dist/run/prompt.js +345 -0
- package/dist/run/prompt.js.map +1 -0
- package/dist/run/pull-request.js +23 -0
- package/dist/run/pull-request.js.map +1 -0
- package/dist/run/result-tool.js +93 -0
- package/dist/run/result-tool.js.map +1 -0
- package/dist/run/result.js +113 -0
- package/dist/run/result.js.map +1 -0
- package/dist/run/retro.js +346 -0
- package/dist/run/retro.js.map +1 -0
- package/dist/run/settings.js +25 -0
- package/dist/run/settings.js.map +1 -0
- package/dist/run/thinking.js +41 -0
- package/dist/run/thinking.js.map +1 -0
- package/dist/run/types.js +2 -0
- package/dist/run/types.js.map +1 -0
- package/dist/run/workflow.js +266 -0
- package/dist/run/workflow.js.map +1 -0
- package/dist/run/worktree.js +354 -0
- package/dist/run/worktree.js.map +1 -0
- package/dist/server/app.js +2503 -0
- package/dist/server/app.js.map +1 -0
- package/dist/server/auth.js +93 -0
- package/dist/server/auth.js.map +1 -0
- package/dist/server/demo.js +96 -0
- package/dist/server/demo.js.map +1 -0
- package/dist/server/idempotency.js +104 -0
- package/dist/server/idempotency.js.map +1 -0
- package/dist/server/port.js +36 -0
- package/dist/server/port.js.map +1 -0
- package/dist/server/principal.js +90 -0
- package/dist/server/principal.js.map +1 -0
- package/dist/server/terminal.js +285 -0
- package/dist/server/terminal.js.map +1 -0
- package/dist/setup/components.js +98 -0
- package/dist/setup/components.js.map +1 -0
- package/dist/setup/config.js +102 -0
- package/dist/setup/config.js.map +1 -0
- package/dist/setup/ink-ui.js +188 -0
- package/dist/setup/ink-ui.js.map +1 -0
- package/dist/setup/onboarding.js +183 -0
- package/dist/setup/onboarding.js.map +1 -0
- package/dist/setup/run.js +70 -0
- package/dist/setup/run.js.map +1 -0
- package/dist/ticket-cli.js +116 -0
- package/dist/ticket-cli.js.map +1 -0
- package/dist/voice/index.js +69 -0
- package/dist/voice/index.js.map +1 -0
- package/dist/voice/moonshine.js +247 -0
- package/dist/voice/moonshine.js.map +1 -0
- package/dist/voice/wav.js +54 -0
- package/dist/voice/wav.js.map +1 -0
- package/dist/voice/whisper.js +491 -0
- package/dist/voice/whisper.js.map +1 -0
- package/dist/web/assets/index-ChuS3qKc.js +254 -0
- package/dist/web/assets/index-DR6WkmzI.css +1 -0
- package/dist/web/icons/apple-touch-icon.png +0 -0
- package/dist/web/icons/icon-192.png +0 -0
- package/dist/web/icons/icon-512.png +0 -0
- package/dist/web/icons/maskable-512.png +0 -0
- package/dist/web/index.html +21 -0
- package/dist/web/manifest.webmanifest +30 -0
- package/dist/web/sw.js +183 -0
- package/package.json +96 -4
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pi's thinking levels. The names are pi's, not the provider's: a model maps
|
|
3
|
+
* them to whatever reasoning effort it actually supports, and pi clamps an
|
|
4
|
+
* unsupported level upward. DeepSeek Flash, for example, has no `medium`, so
|
|
5
|
+
* `medium` silently becomes `high` there.
|
|
6
|
+
*/
|
|
7
|
+
export const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
8
|
+
export function parseThinkingLevel(value) {
|
|
9
|
+
if (value === null || value === undefined)
|
|
10
|
+
return undefined;
|
|
11
|
+
const level = value.trim().toLowerCase();
|
|
12
|
+
return THINKING_LEVELS.includes(level)
|
|
13
|
+
? level
|
|
14
|
+
: undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A configured level wins; a bad value is a startup error rather than a silent
|
|
18
|
+
* fallback, because a typo would otherwise leave the agent at a level nobody
|
|
19
|
+
* chose.
|
|
20
|
+
*/
|
|
21
|
+
export function resolveThinkingLevel(value, source, fallback) {
|
|
22
|
+
if (!value?.trim())
|
|
23
|
+
return fallback;
|
|
24
|
+
const level = parseThinkingLevel(value);
|
|
25
|
+
if (!level) {
|
|
26
|
+
throw new Error(`${source} must be one of ${THINKING_LEVELS.join(", ")}; got "${value}"`);
|
|
27
|
+
}
|
|
28
|
+
return level;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The lower of the two levels, by position in THINKING_LEVELS. A cap cannot
|
|
32
|
+
* raise a level: a cap above the level returns the level unchanged.
|
|
33
|
+
*/
|
|
34
|
+
export function capThinking(level, cap) {
|
|
35
|
+
return THINKING_LEVELS.indexOf(level) <= THINKING_LEVELS.indexOf(cap) ? level : cap;
|
|
36
|
+
}
|
|
37
|
+
/** The argv fragment that tells pi which level to run at. */
|
|
38
|
+
export function thinkingArgs(level) {
|
|
39
|
+
return level ? ["--thinking", level] : [];
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=thinking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking.js","sourceRoot":"","sources":["../../src/run/thinking.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAU,CAAC;AAIpG,MAAM,UAAU,kBAAkB,CAAC,KAAgC;IACjE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC5D,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACzC,OAAQ,eAAqC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC3D,CAAC,CAAE,KAAuB;QAC1B,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAyB,EACzB,MAAc,EACd,QAAuB;IAEvB,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;QAAE,OAAO,QAAQ,CAAC;IACpC,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,mBAAmB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC;IAC5F,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAoB,EAAE,GAAkB;IAClE,OAAO,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACtF,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,YAAY,CAAC,KAAgC;IAC3D,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/run/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { MAX_MESSAGE_CHARS } from "../limits.js";
|
|
2
|
+
import { PUBLISHING_FAILURE_RULE } from "./prompt.js";
|
|
3
|
+
/**
|
|
4
|
+
* The stages that can carry standing instructions: the two columns a run can
|
|
5
|
+
* start from. In Progress is the developer doing the ticket; Review is the
|
|
6
|
+
* reviewer reading its pull request. Everything else on the board is a place a
|
|
7
|
+
* person moves a card, not a place an agent starts.
|
|
8
|
+
*/
|
|
9
|
+
export const WORKFLOW_STAGES = {
|
|
10
|
+
in_progress: "In Progress",
|
|
11
|
+
review: "Review",
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Whether the stage's run executes the checks list. A developer run proves its
|
|
15
|
+
* work with commands; a reviewer reads a diff and comments, so a check list on
|
|
16
|
+
* Review would be an instruction to run commands it must not run.
|
|
17
|
+
*/
|
|
18
|
+
export const STAGE_CHECKS = {
|
|
19
|
+
in_progress: true,
|
|
20
|
+
review: false,
|
|
21
|
+
};
|
|
22
|
+
export function isWorkflowStage(value) {
|
|
23
|
+
return Object.hasOwn(WORKFLOW_STAGES, value);
|
|
24
|
+
}
|
|
25
|
+
export const WORKFLOW_LIMITS = {
|
|
26
|
+
checks: 12,
|
|
27
|
+
checkLabel: 60,
|
|
28
|
+
checkCommand: 300,
|
|
29
|
+
notes: MAX_MESSAGE_CHARS,
|
|
30
|
+
askFirst: 10,
|
|
31
|
+
askLine: 300,
|
|
32
|
+
};
|
|
33
|
+
/** A fresh empty value, so a caller can edit one without touching another. */
|
|
34
|
+
export function emptyWorkflow() {
|
|
35
|
+
return { checks: [], notes: "", askFirst: [] };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Whether the person has configured anything. An empty workflow is not stored,
|
|
39
|
+
* so "using board defaults" and "saved as empty" can never disagree.
|
|
40
|
+
*/
|
|
41
|
+
export function hasWorkflow(workflow) {
|
|
42
|
+
return (workflow.checks.length > 0 || workflow.notes.trim().length > 0 || workflow.askFirst.length > 0);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* What the server accepts, in one place. The client uses the same limits, and
|
|
46
|
+
* the server still decides: a form is a convenience, never a guarantee.
|
|
47
|
+
*/
|
|
48
|
+
export function normaliseWorkflow(input) {
|
|
49
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) {
|
|
50
|
+
return { ok: false, error: "workflow must be an object" };
|
|
51
|
+
}
|
|
52
|
+
const body = input;
|
|
53
|
+
if (!Array.isArray(body.checks))
|
|
54
|
+
return { ok: false, error: "checks must be an array" };
|
|
55
|
+
if (body.checks.length > WORKFLOW_LIMITS.checks) {
|
|
56
|
+
return { ok: false, error: `at most ${WORKFLOW_LIMITS.checks} checks` };
|
|
57
|
+
}
|
|
58
|
+
const checks = [];
|
|
59
|
+
for (const raw of body.checks) {
|
|
60
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
61
|
+
return { ok: false, error: "each check needs a label and a command" };
|
|
62
|
+
}
|
|
63
|
+
const check = raw;
|
|
64
|
+
const label = typeof check.label === "string" ? check.label.trim() : "";
|
|
65
|
+
const command = typeof check.command === "string" ? check.command.trim() : "";
|
|
66
|
+
if (!label || !command) {
|
|
67
|
+
return { ok: false, error: "each check needs a label and a command" };
|
|
68
|
+
}
|
|
69
|
+
if (label.length > WORKFLOW_LIMITS.checkLabel) {
|
|
70
|
+
return { ok: false, error: `check names are limited to ${WORKFLOW_LIMITS.checkLabel}` };
|
|
71
|
+
}
|
|
72
|
+
if (command.length > WORKFLOW_LIMITS.checkCommand) {
|
|
73
|
+
return { ok: false, error: `commands are limited to ${WORKFLOW_LIMITS.checkCommand}` };
|
|
74
|
+
}
|
|
75
|
+
checks.push({ label, command });
|
|
76
|
+
}
|
|
77
|
+
if (body.notes !== undefined && typeof body.notes !== "string") {
|
|
78
|
+
return { ok: false, error: "notes must be a string" };
|
|
79
|
+
}
|
|
80
|
+
const notes = (body.notes ?? "").toString().trim();
|
|
81
|
+
if (notes.length > WORKFLOW_LIMITS.notes) {
|
|
82
|
+
return { ok: false, error: `notes are limited to ${WORKFLOW_LIMITS.notes}` };
|
|
83
|
+
}
|
|
84
|
+
if (body.askFirst !== undefined && !Array.isArray(body.askFirst)) {
|
|
85
|
+
return { ok: false, error: "askFirst must be an array" };
|
|
86
|
+
}
|
|
87
|
+
const rawAsk = Array.isArray(body.askFirst) ? body.askFirst : [];
|
|
88
|
+
if (rawAsk.length > WORKFLOW_LIMITS.askFirst) {
|
|
89
|
+
return { ok: false, error: `at most ${WORKFLOW_LIMITS.askFirst} stop-and-ask conditions` };
|
|
90
|
+
}
|
|
91
|
+
const askFirst = [];
|
|
92
|
+
for (const line of rawAsk) {
|
|
93
|
+
if (typeof line !== "string")
|
|
94
|
+
return { ok: false, error: "each condition must be a string" };
|
|
95
|
+
const text = line.trim();
|
|
96
|
+
if (!text)
|
|
97
|
+
continue;
|
|
98
|
+
if (text.length > WORKFLOW_LIMITS.askLine) {
|
|
99
|
+
return { ok: false, error: `conditions are limited to ${WORKFLOW_LIMITS.askLine}` };
|
|
100
|
+
}
|
|
101
|
+
askFirst.push(text);
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
ok: true,
|
|
105
|
+
workflow: {
|
|
106
|
+
checks,
|
|
107
|
+
notes,
|
|
108
|
+
askFirst,
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/** What a run carries in memory and shows on the card. */
|
|
113
|
+
export function workflowSummary(stage, workflow) {
|
|
114
|
+
return {
|
|
115
|
+
stage,
|
|
116
|
+
checks: workflow.checks.map((check) => ({ ...check })),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const bullets = (values) => values.map((value) => `- ${value}`).join("\n");
|
|
120
|
+
/**
|
|
121
|
+
* The section appended to the agent's system prompt.
|
|
122
|
+
*
|
|
123
|
+
* The person's text comes before the board rules on purpose: the last
|
|
124
|
+
* instruction an agent reads must be the one it cannot edit. A workflow is
|
|
125
|
+
* allowed to change how the work is done; it is never allowed to change how the
|
|
126
|
+
* ticket reports itself, where the worktree is, or who merges.
|
|
127
|
+
*/
|
|
128
|
+
const DEVELOPER_RULES = [
|
|
129
|
+
"- Use the explicit read/search tools, not `cat`, `sed`, or shell-based grep. Put independent tool calls in one turn.",
|
|
130
|
+
"- For one file, use one edit call with multiple disjoint hunks. Do not reread a file just to verify a successful edit; run checks after a coherent implementation batch, not after every edit.",
|
|
131
|
+
"- Use report_result (or the scoped zelio ticket report CLI) for final outcomes. The controller authenticates, validates evidence, records the report, and moves only this ticket. Never claim acceptance of a rejected result.",
|
|
132
|
+
"- Work only in this ticket's worktree. Never touch another checkout, and never push to `main`.",
|
|
133
|
+
`- Commit and push the ticket branch, open or update one pull request, then stop. Never merge. ${PUBLISHING_FAILURE_RULE}`,
|
|
134
|
+
"- Treat acceptance as the contract. Never replace a required behaviour with a weaker observable. Continue useful, authorized implementation and verification, including normal supporting dependency, configuration, build, and test work unless explicitly excluded. Incomplete or unverified work prohibits Review but is not by itself grounds to stop; investigate and fix ordinary failures.",
|
|
135
|
+
"- Blocked is only for a concrete obstacle preventing further safe progress that requires a human decision, unavailable external resource, or resolution of a safety/explicit-constraint conflict. Name the actual obstacle and specific unblock condition; complexity, multiple files, remaining work, ticket splitting, or requesting another run are not blockers.",
|
|
136
|
+
"- Before a destructive change, stay on the ticket branch and touch only the resource this ticket owns. If a run may be using it, stop and await it; report Blocked only if a concrete safety obstacle prevents safe progress and requires human resolution.",
|
|
137
|
+
];
|
|
138
|
+
/**
|
|
139
|
+
* A verified ticket's developer rules. The board runs the checks and publishes
|
|
140
|
+
* the result, so the agent must not be told to commit, push or report Review.
|
|
141
|
+
* Derived from DEVELOPER_RULES by each rule's text, so the shared rules cannot
|
|
142
|
+
* drift and a reordered list cannot swap one rule for another.
|
|
143
|
+
*/
|
|
144
|
+
const VERIFIED_DEVELOPER_RULES = DEVELOPER_RULES.flatMap((rule) => {
|
|
145
|
+
if (rule.startsWith("- Use report_result"))
|
|
146
|
+
return [
|
|
147
|
+
"- End your turn when the Verify commands pass. The board runs them and the workflow checks, then commits, pushes, opens the pull request and moves the ticket; never commit, push, open pull requests or report Review yourself.",
|
|
148
|
+
];
|
|
149
|
+
if (rule.startsWith("- Commit and push the ticket branch"))
|
|
150
|
+
return [];
|
|
151
|
+
if (rule.startsWith("- Blocked is only"))
|
|
152
|
+
return [
|
|
153
|
+
rule.replace("- Blocked is only", "- Use report_result only for blocked. Blocked is only"),
|
|
154
|
+
];
|
|
155
|
+
return [rule];
|
|
156
|
+
});
|
|
157
|
+
const REVIEWER_RULES = [
|
|
158
|
+
"- A reviewer reports findings, not ticket status; never move the card or submit a developer completion report.",
|
|
159
|
+
"- Read the worktree and the pull request. Never edit a file, never commit, never push, never rebase, and never touch another ticket.",
|
|
160
|
+
"- Leave one comment on the ticket timeline and stop. Never approve, never request changes, never merge.",
|
|
161
|
+
"- Do not run the checks or the test suite. Reading a diff is the job; a command that writes to the checkout is not yours to run.",
|
|
162
|
+
];
|
|
163
|
+
const ASK_INTRO = {
|
|
164
|
+
in_progress: "Ask for a human decision only when a concrete obstacle prevents further safe progress and needs a decision, unavailable external resource, or resolution of a safety/explicit-constraint conflict. Continue useful authorized work otherwise; do not stop merely because work is incomplete or complex:",
|
|
165
|
+
review: "Say it in the review comment, as a question for the person, instead of guessing, when:",
|
|
166
|
+
};
|
|
167
|
+
const NOTES_HEADING = {
|
|
168
|
+
in_progress: "### How I work",
|
|
169
|
+
review: "### How I review",
|
|
170
|
+
};
|
|
171
|
+
export function renderWorkflowSection(stage, workflow, options = {}) {
|
|
172
|
+
if (!hasWorkflow(workflow))
|
|
173
|
+
return "";
|
|
174
|
+
const label = WORKFLOW_STAGES[stage];
|
|
175
|
+
const parts = [
|
|
176
|
+
`## The person's ${label} workflow`,
|
|
177
|
+
"",
|
|
178
|
+
`The person configured this for every agent run started from ${label}. It is a standing instruction from them, not a ticket field. Where it conflicts with the general guidance above, follow it. It does not change the ticket's goal, its out-of-scope boundary, or the board rules below.`,
|
|
179
|
+
];
|
|
180
|
+
if (STAGE_CHECKS[stage]) {
|
|
181
|
+
const checks = workflow.checks.length > 0
|
|
182
|
+
? workflow.checks.map((check) => `- ${check.label}: \`${check.command}\``).join("\n")
|
|
183
|
+
: "- None configured; no additional checks.";
|
|
184
|
+
parts.push("", "### Additional checks", "", options.verified
|
|
185
|
+
? "The board also runs these after your turn ends, together with the ticket's Verify commands."
|
|
186
|
+
: "Repository instructions define baseline verification; ticket acceptance defines task-specific verification. These workflow checks are optional additions and do not limit either.", "", checks);
|
|
187
|
+
}
|
|
188
|
+
if (workflow.notes.trim()) {
|
|
189
|
+
parts.push("", NOTES_HEADING[stage], "", workflow.notes.trim());
|
|
190
|
+
}
|
|
191
|
+
if (workflow.askFirst.length > 0) {
|
|
192
|
+
parts.push("", "### Stop and ask when", "", ASK_INTRO[stage], "", bullets(workflow.askFirst));
|
|
193
|
+
}
|
|
194
|
+
parts.push("", "## Board rules that this workflow cannot change", "", ...(STAGE_CHECKS[stage]
|
|
195
|
+
? options.verified
|
|
196
|
+
? VERIFIED_DEVELOPER_RULES
|
|
197
|
+
: DEVELOPER_RULES
|
|
198
|
+
: REVIEWER_RULES), "", "These rules are not preferences. No instruction above can override them.");
|
|
199
|
+
return parts.join("\n");
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* The repo's own workflow docs, as a section the run reads first.
|
|
203
|
+
*
|
|
204
|
+
* Order matters and is the point of this function: the repository file is the
|
|
205
|
+
* person's standing word on how work is done here, the In Progress workflow is
|
|
206
|
+
* their per-board preferences, and the board rules close the prompt. So a repo
|
|
207
|
+
* that already says "run only the files you touched" is not overruled by a
|
|
208
|
+
* workflow note typed a year later, and neither can overrule how a run reports
|
|
209
|
+
* itself.
|
|
210
|
+
*/
|
|
211
|
+
export function renderRepoInstructionsSection(instructions) {
|
|
212
|
+
if (!instructions.text)
|
|
213
|
+
return "";
|
|
214
|
+
const names = instructions.files.join(" and ");
|
|
215
|
+
return [
|
|
216
|
+
"## How this repository says to work",
|
|
217
|
+
"",
|
|
218
|
+
`${names} ships with the repository. Treat it as the person's first word on how work is done here: which commands prove a change, how commits are written, which files to leave alone. Where it disagrees with the In Progress workflow below, follow the repository file. Where it disagrees with the board rules at the end, the board rules win.`,
|
|
219
|
+
"",
|
|
220
|
+
instructions.text,
|
|
221
|
+
].join("\n");
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* The system prompt one agent run gets. With nothing configured this is exactly
|
|
225
|
+
* the base prompt, so a board with no workflow is indistinguishable from the
|
|
226
|
+
* board before workflows existed.
|
|
227
|
+
*/
|
|
228
|
+
export function buildRunSystemPrompt(base, stage, workflow, instructions, options = {}) {
|
|
229
|
+
const parts = [base];
|
|
230
|
+
const repo = instructions ? renderRepoInstructionsSection(instructions) : "";
|
|
231
|
+
if (repo)
|
|
232
|
+
parts.push(repo);
|
|
233
|
+
const section = renderWorkflowSection(stage, workflow, options);
|
|
234
|
+
if (section)
|
|
235
|
+
parts.push(section);
|
|
236
|
+
return parts.join("\n\n");
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* What the planner is told before it drafts. It gets the checks and the honest
|
|
240
|
+
* constraints, not the safety doctrine: the planner is read-only, and its job
|
|
241
|
+
* is to write acceptance criteria the developer run can actually satisfy.
|
|
242
|
+
*/
|
|
243
|
+
export function renderWorkflowBrief(workflow) {
|
|
244
|
+
if (!hasWorkflow(workflow))
|
|
245
|
+
return "";
|
|
246
|
+
const checks = workflow.checks.length > 0
|
|
247
|
+
? workflow.checks.map((check) => `- ${check.label}: \`${check.command}\``).join("\n")
|
|
248
|
+
: "- None configured.";
|
|
249
|
+
const parts = [
|
|
250
|
+
'<workflow stage="In Progress">',
|
|
251
|
+
"The person configured optional additional checks for developer runs; these supplement repository baseline verification and task-specific ticket acceptance. Do not limit acceptance or verification to this list.",
|
|
252
|
+
"",
|
|
253
|
+
"Additional checks:",
|
|
254
|
+
checks.length > 0 ? checks : "- None configured; no extras.",
|
|
255
|
+
];
|
|
256
|
+
if (workflow.notes.trim()) {
|
|
257
|
+
const notes = workflow.notes.trim();
|
|
258
|
+
parts.push("", "How they work:", notes.length > 600 ? `${notes.slice(0, 599)}…` : notes);
|
|
259
|
+
}
|
|
260
|
+
if (workflow.askFirst.length > 0) {
|
|
261
|
+
parts.push("", "They stop the run and ask when:", bullets(workflow.askFirst));
|
|
262
|
+
}
|
|
263
|
+
parts.push("</workflow>");
|
|
264
|
+
return parts.join("\n");
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/run/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;CACR,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAmC;IAC1D,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;AAC/C,CAAC;AA4BD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,GAAG;IACjB,KAAK,EAAE,iBAAiB;IACxB,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,GAAG;CACJ,CAAC;AAEX,8EAA8E;AAC9E,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,QAAuB;IACjD,OAAO,CACL,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,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