@bivy/bivy 0.15.0-staging.7 → 0.15.0-staging.8
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/linear-tasks.js +3 -3
- package/dist/server.js +4 -3
- package/package.json +1 -1
package/dist/linear-tasks.js
CHANGED
|
@@ -34,7 +34,7 @@ export function linearBranchName(identifier) {
|
|
|
34
34
|
const slug = identifier.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
35
35
|
return `bivy/linear-${slug || "issue"}`;
|
|
36
36
|
}
|
|
37
|
-
export function buildLinearTaskPrompt(issue) {
|
|
37
|
+
export function buildLinearTaskPrompt(issue, instructions) {
|
|
38
38
|
return [
|
|
39
39
|
`You are working on Linear issue ${issue.identifier}: ${issue.title}`,
|
|
40
40
|
"",
|
|
@@ -42,8 +42,8 @@ export function buildLinearTaskPrompt(issue) {
|
|
|
42
42
|
"",
|
|
43
43
|
issue.url ? `Issue: ${issue.url}` : "",
|
|
44
44
|
"",
|
|
45
|
-
"Understand the issue and surrounding codebase, implement it completely, and run the project's tests, linter, and type-checker.",
|
|
45
|
+
instructions?.trim() || "Understand the issue and surrounding codebase, implement it completely, and run the project's tests, linter, and type-checker.",
|
|
46
46
|
"",
|
|
47
|
-
`When finished, commit and push your changes and open a pull request yourself. Include a link to ${issue.identifier} in the pull request description.`,
|
|
47
|
+
instructions?.trim() ? "" : `When finished, commit and push your changes and open a pull request yourself. Include a link to ${issue.identifier} in the pull request description.`,
|
|
48
48
|
].filter((part, index, all) => part !== "" || all[index - 1] !== "").join("\n");
|
|
49
49
|
}
|
package/dist/server.js
CHANGED
|
@@ -4212,7 +4212,7 @@ async function runIssueTaskInner(cfg, issue, source, overrides = {}) {
|
|
|
4212
4212
|
try {
|
|
4213
4213
|
recordRunAuditCorrelation(record, overrides.correlation);
|
|
4214
4214
|
emit(record, "started", `Started work on ${cfg.owner}/${cfg.repo}#${issue.number}.`);
|
|
4215
|
-
await runSessionTurn(record, buildTaskPrompt(issue, nodeGithubIssuePrompt()), overrides.signal);
|
|
4215
|
+
await runSessionTurn(record, buildTaskPrompt(issue, overrides.instructions ?? nodeGithubIssuePrompt()), overrides.signal);
|
|
4216
4216
|
if (overrides.signal?.aborted)
|
|
4217
4217
|
throw overrides.signal.reason ?? new Error("Run cancelled");
|
|
4218
4218
|
emit(record, "agent_done", `Agent finished issue #${issue.number}; running deterministic checks.`);
|
|
@@ -4918,6 +4918,7 @@ async function runWorkItem(item, report, signal) {
|
|
|
4918
4918
|
sandbox: normalizeSandboxTier(item.sandbox),
|
|
4919
4919
|
approvalMode: approvalModeFrom(item.approvalMode),
|
|
4920
4920
|
onEvidence: report,
|
|
4921
|
+
instructions: item.body,
|
|
4921
4922
|
signal,
|
|
4922
4923
|
correlation: { runId: item.id, attempt: item.attempt ?? 1, machineId: identity.nodeId },
|
|
4923
4924
|
});
|
|
@@ -4938,7 +4939,7 @@ async function runWorkItem(item, report, signal) {
|
|
|
4938
4939
|
throw new Error(`Linear work item has an invalid repo "${repoSlug}"`);
|
|
4939
4940
|
// Case B: a re-dispatch the control plane correlated to an existing session
|
|
4940
4941
|
// continues it as a normal chat instead of starting cold (mirrors GitHub).
|
|
4941
|
-
if (await continueCorrelatedSession(item, buildLinearTaskPrompt(issue), report, { resumeOnMissing: item.targetKind === "existing_session", signal }))
|
|
4942
|
+
if (await continueCorrelatedSession(item, buildLinearTaskPrompt(issue, item.body), report, { resumeOnMissing: item.targetKind === "existing_session", signal }))
|
|
4942
4943
|
return;
|
|
4943
4944
|
const githubToken = await resolveGitHubToken();
|
|
4944
4945
|
if (!githubToken)
|
|
@@ -4965,7 +4966,7 @@ async function runWorkItem(item, report, signal) {
|
|
|
4965
4966
|
catch { }
|
|
4966
4967
|
}
|
|
4967
4968
|
await report({ output: { sessionId: record.id, branch }, events: [{ at: new Date().toISOString(), kind: "branch", summary: "Linear issue working branch and session created.", ref: branch, url: issue.url }] });
|
|
4968
|
-
await runSessionTurn(record, buildLinearTaskPrompt(issue), signal);
|
|
4969
|
+
await runSessionTurn(record, buildLinearTaskPrompt(issue, item.body), signal);
|
|
4969
4970
|
if (signal.aborted)
|
|
4970
4971
|
throw signal.reason ?? new Error("Run cancelled");
|
|
4971
4972
|
await branchPublish.maybePushWorktreeBranch(record);
|
package/package.json
CHANGED