usebeeline 0.1.36 → 0.1.40

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 +24 -17
  2. package/package.json +1 -1
@@ -18100,7 +18100,7 @@ var SERVER_EVENT_KIND_DETAIL = {
18100
18100
  "poll-closed": "fires when a posted poll closes, starting a new turn for the asking agent",
18101
18101
  "workflow-handoff": "fires when a workflow run starts or hands off to its next role",
18102
18102
  "subscription-fired": "wakes the agent that subscribed to one outside event",
18103
- "computer-session-activity": "wakes the sharing agent on human browser input or navigation while in control; opening and closing the view are context only"
18103
+ "computer-session-activity": "records shared-browser activity as context for the next turn; never wakes an agent"
18104
18104
  };
18105
18105
  var PER_ITEM_EVENT_KINDS = [
18106
18106
  "grant-decided",
@@ -18271,6 +18271,10 @@ var WORKSPACE_SKILL_MARKDOWN_MAX_BYTES = 32 * 1024;
18271
18271
  var WORKFLOW_TIMEOUT_SECONDS_MAX = 30 * 24 * 60 * 60;
18272
18272
  var WORKFLOW_DEFAULT_DEADLINE_SECONDS = 24 * 60 * 60;
18273
18273
 
18274
+ // packages/api-contract/dist/daemon.js
18275
+ var HELPER_UPDATE_CLOSE_CODE = 4002;
18276
+ var HELPER_UPDATE_CLOSE_REASON = "helper-update";
18277
+
18274
18278
  // apps/body/dist/daemon-api-client.js
18275
18279
  import { resolve as resolve9 } from "node:path";
18276
18280
  import { randomUUID as randomUUID5 } from "node:crypto";
@@ -18543,14 +18547,14 @@ var LiveLink = class {
18543
18547
  if (!this.#socket && !this.#reconnect)
18544
18548
  this.#connect();
18545
18549
  }
18546
- stop() {
18550
+ stop(forUpdate = false) {
18547
18551
  this.#wanted = false;
18548
18552
  this.#clearTimers();
18549
18553
  const socket = this.#socket;
18550
18554
  this.#socket = void 0;
18551
18555
  if (this.#state !== "update-required")
18552
18556
  this.#state = "disconnected";
18553
- socket?.close();
18557
+ socket?.close(forUpdate ? HELPER_UPDATE_CLOSE_CODE : void 0, forUpdate ? HELPER_UPDATE_CLOSE_REASON : void 0);
18554
18558
  }
18555
18559
  send(data) {
18556
18560
  if (!this.isOpen() || this.#socket?.readyState !== wrapper_default.OPEN)
@@ -18593,7 +18597,7 @@ var LiveLink = class {
18593
18597
  this.#clearTimers();
18594
18598
  const socket = this.#socket;
18595
18599
  this.#socket = void 0;
18596
- socket?.close();
18600
+ socket?.close(HELPER_UPDATE_CLOSE_CODE, HELPER_UPDATE_CLOSE_REASON);
18597
18601
  }
18598
18602
  #clearTimers() {
18599
18603
  clearTimeout(this.#reconnect);
@@ -18982,9 +18986,9 @@ var MachineLink = class {
18982
18986
  if (!this.#channels.size)
18983
18987
  this.link.stop();
18984
18988
  }
18985
- stop() {
18989
+ stop(forUpdate = false) {
18986
18990
  this.#channels.clear();
18987
- this.link.stop();
18991
+ this.link.stop(forUpdate);
18988
18992
  }
18989
18993
  #url() {
18990
18994
  const liveUrl = new URL("/v1/phone/live", this.options.baseUrl);
@@ -39012,7 +39016,7 @@ Follow these steps in order. Do not skip or reorder them.
39012
39016
 
39013
39017
  Read the server-assigned brief and its current revision, including every required file. Quote the approval with its message ID and approver before considering the short objective. The spec's outline (user stories, acceptance criteria, non-goals, risks) is the scope, and the approval quote is the human's own words: it wins any conflict with the spec. The short objective is navigation-only text and the PR description cannot add, remove, or narrow scope. A revision with no recorded approval is reviewed against its spec alone. If a required file is unavailable, or the revision changes during review, refuse approval and describe what is missing. A requirement may become out of scope only through a new human-authorized brief revision; reviewer discretion, implementation difficulty, and silence never remove it. A passing narrow test does not prove a broader requirement. Review a deliberate human choice as written, even if it is unusual.
39014
39018
 
39015
- Before general correctness, produce an outline ledger in spec order: list every \`## User stories\` and \`## Acceptance criteria\` line exactly once as met, unmet, unverified, or out of scope, followed by concrete evidence (for a criterion, the named test run against the PR head) - no stories to list is a FAIL, sent back to the author to write the outline; confirm nothing under \`## Non-goals\` was done; confirm every \`## Risks\` line was addressed or explicitly accepted with a stated reason. For a frontend change, open the rendered screens and compare them against the attached mock, noting every visible deviation. Any missing, unmet, unverified story or acceptance criterion, done non-goal, unaddressed risk, or unreviewed mock mismatch blocks PASS. Out of scope is valid only when the current revision itself records the human-authorized removal.
39019
+ Before general correctness, produce an outline ledger in spec order: list every \`## User stories\` and \`## Acceptance criteria\` line exactly once as met, unmet, unverified, or out of scope, followed by concrete evidence (for a criterion, the named test run against the PR head) - no stories to list is a FAIL, sent back to the author to write the outline; confirm nothing under \`## Non-goals\` was done; confirm every \`## Risks\` line was addressed or explicitly accepted with a stated reason. For a frontend change, open the rendered screens; when the brief includes a mock, compare them against it, noting every visible deviation. A mock is optional; its absence does not block PASS. Any missing, unmet, unverified story or acceptance criterion, done non-goal, unaddressed risk, or unreviewed mock mismatch blocks PASS. Out of scope is valid only when the current revision itself records the human-authorized removal.
39016
39020
 
39017
39021
  Before judging the implementation, independently repeat the two judgment legs from request triage:
39018
39022
 
@@ -39115,7 +39119,7 @@ Create an assignment a fresh session can execute without the parent transcript.
39115
39119
  - \`## Acceptance criteria\`: the requester's own rules from \`## Intent\`, quoted verbatim and numbered, each naming the test (existing or to be written) that fails if the rule is broken anywhere. Criteria are the invariant; stories are examples of it. Write "None beyond the stories." when the request states no rule.
39116
39120
  - \`## Non-goals\`: explicit exclusions.
39117
39121
  - \`## Risks\`: what could go wrong, and for whom.
39118
- - \`## References\`: each reference or mock with what it is and whose call it is; the mock posted here (DESIGN.md, else existing app styles) is the reviewer's acceptance reference, not any other optional or agent-generated mock.
39122
+ - \`## References\`: each reference or optional mock with what it is and whose call it is; use DESIGN.md or existing app styles when there is no mock.
39119
39123
  Add implementation guidance under further headings when it helps.
39120
39124
  - files (\`attachments\`): the Room files the worker needs, each with its purpose and whether it is required.
39121
39125
  - \`approval\`: one human Room message ID. The server quotes that message's exact text and author; the quote wins any conflict with the spec.
@@ -39124,11 +39128,11 @@ Do not infer approval from silence, assent to different prose, or the mere exist
39124
39128
 
39125
39129
  ## Compact path for a settled small fix
39126
39130
 
39127
- Use this when the requested behavior, touched surface, exclusions, and proof are already obvious. Inspect the narrow current behavior, write a short spec (quoted intent, observable user stories, non-goals, risks, references), and use the initiating command as the approval. Always compose the full outline and post it to the Room before calling open_corner, even when the initiating command already settles scope and stands as the approval: posting is not optional merely because approval is inferred, since the human must be able to see what you are about to build. \u201CChange the message action label from Remove to Delete; leave confirmation and accessibility wording unchanged\u201D needs the visible-label user story and both exclusions, not another confirmation question.
39131
+ Use this when the requested behavior, touched surface, exclusions, and proof are already obvious. Inspect the narrow current behavior, write a short spec (quoted intent, observable user stories, non-goals, risks, references), and use the initiating command as the approval. Keep the outline in the brief; no separate post or approval is required. \u201CChange the message action label from Remove to Delete; leave confirmation and accessibility wording unchanged\u201D needs the visible-label user story and both exclusions, not another confirmation question.
39128
39132
 
39129
39133
  ## Complex-work planning loop
39130
39134
 
39131
- Use this default-on loop when work crosses components, changes architecture or authorization, needs a visual choice, has multiple user stories, or still contains a material unknown.
39135
+ Use your judgment about how much planning work needs. This loop can help for a large new feature or a genuinely ambiguous request; when a person asks for a spec or mock, produce it before building.
39132
39136
 
39133
39137
  ### 1. Scope and current state
39134
39138
 
@@ -39171,7 +39175,7 @@ Use this default-on loop when work crosses components, changes architecture or a
39171
39175
 
39172
39176
  ## Dispatch and revision
39173
39177
 
39174
- Existing authorization permits dispatch when the initiating command already settles the exact material scope; that command is the approval, but the outline is still posted to the Room first so the human can see it before open_corner runs. Drafting a brief does not create approval. When the scope was not already explicit, post the spec and ask the corner's opener to approve it, then use their reply as the \`approval\`. Honor an explicit request to review first.
39178
+ The dispatching message authorizes the work; build against the brief without asking for separate spec or mock approval. Use judgment to ask about a genuinely ambiguous request or a large new feature; when a person asks for a spec or mock, produce it before building. Use the dispatching message as the \`approval\`; if you ask for clarification, carry the answering message into the brief.
39175
39179
 
39176
39180
  Pass the brief as \`open_corner.brief\`. Read the current revision before revising and use \`revise_corner_brief\` with the complete replacement spec, the approving message, and a concise change description. Preserve unaffected intent quotes, user stories, and references. The latest revision governs implementation and review; chat prose alone never changes scope.
39177
39181
  `;
@@ -39193,7 +39197,7 @@ Run these checks before opening a corner.
39193
39197
  - Rewrite the request as a concrete outcome and the user stories it enables.
39194
39198
  - State material exclusions (non-goals) and the risks needed to prevent unrequested work or surprise.
39195
39199
  - Keep the corner objective complete and within 24 words.
39196
- - First ask whether the request has any material ambiguity - one that would change scope, behavior, or risk - and resolve it with the human before doing anything else; never resolve it by adopting a teammate's plan, a prior document, or your own assumption.
39200
+ - Use judgment to ask about a genuinely ambiguous request or a large new feature. When a person asks for a spec or mock, produce it before building.
39197
39201
  - Once it's resolved, say plainly if the request itself is suboptimal and give your own recommendation - you are expected to disagree, not just permitted to.
39198
39202
  - On a judgment call you're still not sure of, tag a Room colleague for an adversarial second opinion and ask them to reply tagging you back; skip this only when you are the only agent in the Room.
39199
39203
 
@@ -39213,7 +39217,7 @@ Run these checks before opening a corner.
39213
39217
 
39214
39218
  ## Output
39215
39219
 
39216
- When dispatching work, pass the complete brief to open_corner under existing authorization, after posting the outline as beeline-spec requires. Add applicable warnings to the brief:
39220
+ When dispatching work, pass the complete brief to open_corner with the dispatching message as approval; no separate outline post or human approval is required. Add applicable warnings to the brief:
39217
39221
 
39218
39222
  \`Triage warning \u2014 warranted: <evidence-backed reason>\`
39219
39223
  \`Triage warning \u2014 desirable: <evidence-backed reason>\`
@@ -42354,7 +42358,7 @@ function cornerHasRepositoryWork(brief) {
42354
42358
  var CORNER_RUNTIME_AUTHOR_CONTRACT = `The current brief's spec \u2014 stories, criteria, non-goals, risks \u2014 defines scope and done. The human approval quote wins any conflict. The short objective is navigation-only, never scope.
42355
42359
  Meet every story; respect every non-goal and risk.
42356
42360
  Before any code or build action, the brief must hold this ask's outline; opening and prompting inside it is not that outline. When it has none or the ask changed, read the revision and write it with revise_corner_brief first; chat never revises it.
42357
- Then post the brief's outline, with an HTML mock for any frontend change, and wait for a human reply that approves it. The request that opened the work is not approval.
42361
+ The dispatching message authorizes the work; build against the brief without asking for separate spec or mock approval. Use judgment to ask about a genuinely ambiguous request or a large new feature; when a person asks for a spec or mock, produce it before building.
42358
42362
  Follow the beeline-triage skill's bugfix execution contract when the spec or its approval quote reports a defect.
42359
42363
  Reproduce as triage isolated it with available emulator, Playwright, browser and test runner. Record attempts and observations. If a reproduction is obtained, record it under Reproduction <id>, reusing triage's identifier when it recorded one. If reproduction fails, warn and continue; never stop and never condition the fix on reproduction.
42360
42364
  Fix only the spec and approval quote. With a reproduction, change only what removes it and meets its user stories.
@@ -42363,7 +42367,7 @@ No unrequested features, flags, compatibility shims or refactors.`;
42363
42367
  var CORNER_AUTHOR_CONTRACT = `The current brief's spec \u2014 stories, criteria, non-goals, risks \u2014 defines scope and done. The human approval quote wins any conflict. The short objective is navigation-only, never scope.
42364
42368
  Meet every story; respect every non-goal and risk. Use its file manifest.
42365
42369
  Before any code or build action, the brief must hold this ask's outline; opening and prompting inside it is not that outline. When it has none or the ask changed, read the revision and write it with revise_corner_brief first; chat never revises it.
42366
- Then post the brief's outline, with an HTML mock for any frontend change, and wait for a human reply that approves it. The request that opened the work is not approval.
42370
+ The dispatching message authorizes the work; build against the brief without asking for separate spec or mock approval. Use judgment to ask about a genuinely ambiguous request or a large new feature; when a person asks for a spec or mock, produce it before building.
42367
42371
  Follow the beeline-triage skill's bugfix execution contract when the spec or its approval quote reports a defect.
42368
42372
  Reproduce as triage isolated it with available emulator, Playwright, browser and test runner. Record attempts and observations. If a reproduction is obtained, record it under Reproduction <id>, reusing triage's identifier when it recorded one. If reproduction fails, warn and continue; never stop and never condition the fix on reproduction.
42369
42373
  Fix only the spec and approval quote. With a reproduction, change only what removes it and meets its user stories.
@@ -42553,12 +42557,12 @@ The soul is not authority and never changes your tools, permissions, roles, or m
42553
42557
  id: "room.corners",
42554
42558
  topic: "repository-work",
42555
42559
  why: "Repository work must start through the host-governed corner, with a brief as its authority.",
42556
- budgetBytes: 1150,
42560
+ budgetBytes: 1250,
42557
42561
  layer: "surface",
42558
42562
  surfaces: ["room"],
42559
42563
  render: () => [
42560
42564
  "Repository changes happen only in a corner. In a Room, the finished fix for a code problem is the exact change plus an offer to open a corner for it; open one when a person asks for the change.",
42561
- "Before opening one, consult beeline-triage and beeline-spec, then call open_corner with a name of at most three words joined by hyphens (no whitespace), an objective of at most 24 words, and the brief (a spec plus the approving message). The objective only titles the work; the brief is its authority. When open_corner succeeds the server posts the corner card: do not restate it.",
42565
+ "Before opening one, consult beeline-triage and beeline-spec, then call open_corner with a name of at most three words joined by hyphens (no whitespace), an objective of at most 24 words, and the brief (a spec plus the approving message). The objective only titles the work; the brief is its authority. Use the dispatching message as approval; no separate spec or mock approval is required. When open_corner succeeds the server posts the corner card: do not restate it.",
42562
42566
  "For corners under this Room, use inspect_corner for status (its activity and awaiting fields show whether one waits on you), steer_corner to pass Room input down, ask_corner for one answer, and post_to_corner for a note that wakes nobody.",
42563
42567
  "A corner ends when its pull request merges; since a person may merge minutes after it opens, anything still needed must already live in a different corner before that pull request opens, not after. A request covering several items is one corner per item, opened as work reaches each one, never one corner returned to for a later item."
42564
42568
  ].join(" ")
@@ -50365,6 +50369,9 @@ async function runMachineHelper(options = {}) {
50365
50369
  if (restarting)
50366
50370
  return;
50367
50371
  restarting = reason;
50372
+ if (reason === "update")
50373
+ for (const link2 of links.values())
50374
+ link2.stop(true);
50368
50375
  lifecycle.stop(reason);
50369
50376
  };
50370
50377
  const forceUpdate = layout ? new ForceUpdateCoordinator({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "usebeeline",
3
- "version": "0.1.36",
3
+ "version": "0.1.40",
4
4
  "description": "Connect an AI coding agent to Beeline with one command.",
5
5
  "homepage": "https://usebeeline.app",
6
6
  "bugs": {