usebeeline 0.0.98 → 0.0.99

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.
Files changed (2) hide show
  1. package/dist/usebeeline.mjs +16 -17
  2. package/package.json +1 -1
@@ -18373,8 +18373,7 @@ Follow these steps in order. Do not skip or reorder them.
18373
18373
 
18374
18374
  ## 8. Gate and verdict
18375
18375
 
18376
- - The merge gate is open only when \`pr_checks_status\` reports checks=passed, held=false, approvalPending=false.
18377
- - Green \`gh pr checks\` alone never opens the gate.
18376
+ - Review the exact green head named in your reviewer instruction. If the head moved, do not approve it.
18378
18377
  - Always use this exact verdict shape:
18379
18378
 
18380
18379
  \`objective quoted:\`
@@ -18388,11 +18387,9 @@ Follow these steps in order. Do not skip or reorder them.
18388
18387
 
18389
18388
  Then take exactly one action:
18390
18389
 
18391
- - FAIL: reply \`@author\` with the confirmed findings; do not merge.
18392
- - PASS with pending checks: reply \`approved pending checks <reviewed sha>\` and stop.
18393
- - PASS with unknown checks: report the \`pr_checks_status\` reason to the Room and stop; do not retry.
18394
- - PASS with the gate open and your yolo on: run \`gh pr merge --squash --match-head-commit <reviewed sha> N\`.
18395
- - PASS with the gate open and your yolo off: reply \`approved <reviewed sha>\` and stop.
18390
+ - FAIL: reply \`@author\` with the confirmed findings to fix.
18391
+ - PASS: call \`approve_merge\` with the reviewed head SHA, then reply \`@author approved <reviewed sha>, merge\`.
18392
+ - Never merge the pull request yourself.
18396
18393
  `;
18397
18394
  }
18398
18395
 
@@ -20374,6 +20371,7 @@ function beelineAgentMcpServer(config, api, context) {
20374
20371
  { name: "BEELINE_DAEMON_ROOM_ID", value: context.roomId },
20375
20372
  { name: "BEELINE_DAEMON_WORKSPACE_ID", value: context.workspaceId },
20376
20373
  ...context.cornerId ? [{ name: "BEELINE_DAEMON_CORNER_ID", value: context.cornerId }] : [],
20374
+ ...context.reviewer ? [{ name: "BEELINE_CORNER_REVIEWER", value: "1" }] : [],
20377
20375
  ...context.attachRoot ? [{ name: "BEELINE_ATTACH_ROOT", value: context.attachRoot }] : [],
20378
20376
  ...context.attachScratchRoot ? [{ name: "BEELINE_ATTACH_SCRATCH_ROOT", value: context.attachScratchRoot }] : [],
20379
20377
  ...context.grantRunner ? [
@@ -22091,7 +22089,7 @@ var TOOL_OUTPUT_MAX_BYTES = 3200;
22091
22089
  var TOOL_PATH_LIMIT = 12;
22092
22090
  function cornerMergeInstruction(yoloMode, reviewerHandle) {
22093
22091
  if (reviewerHandle)
22094
- return `Commit, push, open the pull request, reply with the PR URL and then @${reviewerHandle} please review; never merge this PR yourself. If you asked any other agent to review in this corner, do not merge until they answer.`;
22092
+ return `Commit, push, open the PR, and reply with the URL; do not merge until @${reviewerHandle} tags you with approval, then merge with gh pr merge --squash --match-head-commit <sha>.`;
22095
22093
  return yoloMode ? "Yolo is on: when the gate passes, merge this pull request with gh." : "Yolo is off: never merge; wait for explicit human approval in the app.";
22096
22094
  }
22097
22095
  function cornerReviewerInstruction(input) {
@@ -22099,7 +22097,8 @@ function cornerReviewerInstruction(input) {
22099
22097
  return void 0;
22100
22098
  const author = input.authorHandle?.replace(/^@/, "") || "author";
22101
22099
  const number = input.pullRequestNumber ?? "N";
22102
- return `Review PR #${number} with the beeline-review skill. If it fails, reply @${author} with the findings. If it passes and the gate (pr_checks_status: checks=passed, held=false, approvalPending=false) is open and YOUR yolo is on, merge with gh pr merge --squash --match-head-commit <sha you reviewed>; if your yolo is off, reply approved <sha> and stop; if checks are pending, reply approved pending checks <sha> and stop; if checks are unknown, report the tool's reason to the Room and stop instead of retrying.`;
22100
+ const headSha = input.headSha ?? "<head sha>";
22101
+ return `Checks are green on PR #${number} at ${headSha}. Review it now with the beeline-review skill against that exact head. FAIL: reply \`@${author}\` with the confirmed findings to fix. PASS: call the approve_merge tool for ${headSha}, then reply \`@${author} approved ${headSha}, merge\`. Never merge yourself. Never say you are holding or waiting for checks.`;
22103
22102
  }
22104
22103
  var CORNER_AUTHOR_CONTRACT = `The objective text is the user's ask. Keep it verbatim in your head and do not reinterpret it.
22105
22104
  Before any code, write its end-user story in one sentence: "a person who does X sees Y".
@@ -22114,7 +22113,7 @@ Under ## Demonstrated, give the command or steps that produced Y and what was ob
22114
22113
  A pull request without both sections is not deliverable and the Room's reviewer will fail it.
22115
22114
  Change only what the objective asks. No unrequested features, flags, compatibility shims, or refactors.`;
22116
22115
  var CORNER_DELIVERY_NUDGE = "Before ending this turn, inspect the repository state and finish delivering the work: commit and push the intended changes and open the pull request if one does not exist. Decide yourself whether any remaining dirty work belongs to the objective; do not discard it merely to make the worktree clean. The pull request body must carry ## Reproduced and ## Demonstrated; if they are missing, add them before ending the turn.";
22117
- var CORNER_YOLO_MERGE_NUDGE = 'Yolo is on. Check the server merge gate with pr_checks_status now and, if checks="passed", held=false, and approvalPending=false, merge this pull request with gh. If checks="unknown", report the tool reason to the Room and stop instead of retrying. Otherwise stop without merging.';
22116
+ var CORNER_YOLO_MERGE_NUDGE = 'Yolo is on. Check the server merge gate with pr_checks_status now and, if checks="passed", held=false, and approvalPending=false, merge this pull request with gh. If checks="unknown", reply in this corner with the tool reason and stop instead of retrying. Otherwise stop without merging.';
22118
22117
  function isCornerChecksTurn(trigger, restates) {
22119
22118
  return Boolean(restates) || /\b(?:passed|failed) a check\b/i.test(trigger);
22120
22119
  }
@@ -22450,8 +22449,7 @@ var MonolithCornerTurnLoop = class {
22450
22449
  reviewerHandle: configuration.reviewerHandle,
22451
22450
  agentHandle: self?.handle,
22452
22451
  authorHandle: opener?.handle,
22453
- openedByAgent: !this.options.openedBy || this.options.openedBy === this.agent.publicKey,
22454
- yoloMode: configuration.yoloMode
22452
+ openedByAgent: !this.options.openedBy || this.options.openedBy === this.agent.publicKey
22455
22453
  };
22456
22454
  let reviewerInstruction = cornerReviewerInstruction(reviewerInput);
22457
22455
  if (reviewerInstruction) {
@@ -22460,7 +22458,8 @@ var MonolithCornerTurnLoop = class {
22460
22458
  });
22461
22459
  reviewerInstruction = cornerReviewerInstruction({
22462
22460
  ...reviewerInput,
22463
- pullRequestNumber: restore.lifecycle?.pr?.number
22461
+ pullRequestNumber: restore.lifecycle?.pr?.number,
22462
+ headSha: restore.lifecycle?.pr?.headSha
22464
22463
  });
22465
22464
  }
22466
22465
  this.cornerTurnEndNudge = reviewerInstruction ?? cornerMergeInstruction(configuration.yoloMode, configuration.reviewerHandle);
@@ -22579,6 +22578,7 @@ var MonolithCornerTurnLoop = class {
22579
22578
  roomId: this.options.parentRoomId,
22580
22579
  workspaceId: this.options.workspaceId,
22581
22580
  cornerId: this.options.cornerId,
22581
+ reviewer: Boolean(reviewerInstruction),
22582
22582
  attachRoot: this.options.worktreePath,
22583
22583
  // The whole per-session overlay, not an enumerated subset: see
22584
22584
  // `monolith-room-turn.ts`'s matching comment.
@@ -22596,8 +22596,7 @@ var MonolithCornerTurnLoop = class {
22596
22596
  const identityInstructions = `Your Beeline identity is ${self?.name ?? this.agent.name}.`;
22597
22597
  const personaInstructions = [
22598
22598
  ...persona?.instructions ? [`Human-authored Workspace persona: ${persona.name}. ${persona.instructions}`] : [],
22599
- SOUL_HOUSE_RULE,
22600
- "Report milestones, blockers, and questions to the Room with report_to_room; do not narrate."
22599
+ SOUL_HOUSE_RULE
22601
22600
  ].join("\n");
22602
22601
  this.turnIdentityInstructions = harnessHonorsSessionSystemPrompt(command) ? "" : [identityInstructions, personaInstructions].filter(Boolean).join("\n\n");
22603
22602
  const opened = await this.client.sessionNew({
@@ -22611,12 +22610,12 @@ var MonolithCornerTurnLoop = class {
22611
22610
  `You are in an isolated git worktree on ${repository.featureBranch}, targeting ${repository.targetBranch}.`,
22612
22611
  `Commit and push only ${repository.featureBranch}; never force-push or write to ${repository.targetBranch}. Before pushing, rebase on origin/${repository.featureBranch}; resolve conflicts autonomously, realigning to that remote branch and redoing the objective if needed, then rerun affected tests. Open the pull request with gh.`,
22613
22612
  ...reviewerInstruction ? [reviewerInstruction] : [
22614
- configuration.reviewerHandle ? `Once the pull request exists, reply with its full URL, then @${configuration.reviewerHandle} please review, and end the turn; do not check or wait for CI.` : 'Once the pull request exists, reply only with its full URL and end the turn; do not check or wait for CI. On a later checks turn, call pr_checks_status. Merge only when checks="passed", held=false, and approvalPending=false; if checks="unknown", report the tool reason to the Room and stop instead of retrying. Only a later explicit human resume clears a hold.',
22613
+ configuration.reviewerHandle ? `Once the pull request exists, reply with its full URL and end the turn; do not tag the reviewer, check, or wait for CI.` : 'Once the pull request exists, reply only with its full URL and end the turn; do not check or wait for CI. On a later checks turn, call pr_checks_status. Merge only when checks="passed", held=false, and approvalPending=false; if checks="unknown", reply in this corner with the tool reason and stop instead of retrying. Only a later explicit human resume clears a hold.',
22615
22614
  CORNER_AUTHOR_CONTRACT,
22616
22615
  cornerMergeInstruction(configuration.yoloMode, configuration.reviewerHandle)
22617
22616
  ],
22618
22617
  "Do not tag the user when a corner turn finishes: the server posts the merge summary card and its push already cover completion. Tag a human only mid-turn, and only when you need a decision or input.",
22619
- "Never restate server check or merge notes. On a checks turn, say nothing unless you merge or push a fix, then use one short line. When approval is pending, wait for the server close request. Never merge another pull request."
22618
+ "Never restate server check or merge notes. On a checks turn, say nothing unless you merge or push a fix, then use one short line. Never merge while approvalPending is true. When approval is pending, wait for the reviewer to tag you. Never merge another pull request."
22620
22619
  ] : [
22621
22620
  "This is a chat-only corner with no repository or GitHub workflow.",
22622
22621
  "Work in this corner's writable workspace. Use write_scratch_file or ordinary tools to create files, then attach_file to send them back to the corner.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "usebeeline",
3
- "version": "0.0.98",
3
+ "version": "0.0.99",
4
4
  "description": "Connect an AI coding agent to Beeline with one command.",
5
5
  "homepage": "https://usebeeline.app",
6
6
  "bugs": {