balladeer 1.0.1 → 1.0.3
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 +75 -41
- package/dist/agent.d.ts +5 -0
- package/dist/agent.js +13 -1
- package/dist/cli.d.ts +4 -0
- package/dist/cli.js +78 -24
- package/dist/client.d.ts +2 -2
- package/dist/client.js +7 -4
- package/dist/codex-config.d.ts +7 -0
- package/dist/codex-config.js +159 -0
- package/dist/commands/affected.js +6 -6
- package/dist/commands/check-seals.js +4 -4
- package/dist/commands/discover.js +5 -4
- package/dist/commands/prepare.js +2 -1
- package/dist/commands/propose.js +5 -4
- package/dist/commands/repositories.js +1 -0
- package/dist/commands/session.js +17 -4
- package/dist/commands/setup.d.ts +8 -0
- package/dist/commands/setup.js +215 -88
- package/dist/commands/status.js +41 -18
- package/dist/commands/touch-map.js +2 -2
- package/dist/conventions.d.ts +2 -1
- package/dist/conventions.js +2 -2
- package/dist/copy.d.ts +8 -8
- package/dist/copy.js +60 -39
- package/dist/store.d.ts +3 -1
- package/dist/store.js +3 -3
- package/dist/wire.d.ts +9 -4
- package/dist/wire.js +2 -1
- package/package.json +4 -1
package/dist/conventions.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const CONVENTIONS_END = "<!-- balladeer:conventions:end -->";
|
|
|
27
27
|
* instructions marker instead. A bump here with no change to the block would
|
|
28
28
|
* rewrite twelve repositories to say exactly what they already said.
|
|
29
29
|
*/
|
|
30
|
-
export declare const CONVENTIONS_VERSION =
|
|
30
|
+
export declare const CONVENTIONS_VERSION = 17;
|
|
31
31
|
export declare function managedByLine(version: number): string;
|
|
32
32
|
/**
|
|
33
33
|
* Which version of the block a file already carries, or nothing when it carries
|
|
@@ -74,4 +74,5 @@ export type ConventionsResult = Readonly<{
|
|
|
74
74
|
export declare function writeConventions(repositoryRoot: string, options?: Readonly<{
|
|
75
75
|
version?: number;
|
|
76
76
|
body?: string;
|
|
77
|
+
file?: "CLAUDE.md" | "AGENTS.md";
|
|
77
78
|
}>): ConventionsResult;
|
package/dist/conventions.js
CHANGED
|
@@ -31,7 +31,7 @@ export const CONVENTIONS_END = "<!-- balladeer:conventions:end -->";
|
|
|
31
31
|
* instructions marker instead. A bump here with no change to the block would
|
|
32
32
|
* rewrite twelve repositories to say exactly what they already said.
|
|
33
33
|
*/
|
|
34
|
-
export const CONVENTIONS_VERSION =
|
|
34
|
+
export const CONVENTIONS_VERSION = 17;
|
|
35
35
|
/** Both spellings: the stable marker, and the versioned one version 1 wrote. */
|
|
36
36
|
const START_MARKER = /<!-- balladeer:conventions:start(?: v(\d{1,4}))? -->/g;
|
|
37
37
|
const END_MARKER = /<!-- balladeer:conventions:end -->/g;
|
|
@@ -114,7 +114,7 @@ function writeAtomically(path, contents) {
|
|
|
114
114
|
export function writeConventions(repositoryRoot, options = {}) {
|
|
115
115
|
const version = options.version ?? CONVENTIONS_VERSION;
|
|
116
116
|
const existingName = CANDIDATE_FILES.find((name) => existsSync(join(repositoryRoot, name)));
|
|
117
|
-
const name = existingName ?? "CLAUDE.md";
|
|
117
|
+
const name = options.file ?? existingName ?? "CLAUDE.md";
|
|
118
118
|
const path = join(repositoryRoot, name);
|
|
119
119
|
const block = fenced(version, options.body ?? CONVENTIONS_BLOCK);
|
|
120
120
|
let existing = "";
|
package/dist/copy.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* It describes the product's boundary, not one release's behaviour. What this
|
|
8
8
|
* release actually performs is stamped separately, outside this constant.
|
|
9
9
|
*/
|
|
10
|
-
export declare const BOUNDARY_COPY = "Balladeer never receives your code. It cannot read your repository: it holds no GitHub token,\ninstalls no GitHub App, and has no access to your files, tests, fixtures, logs, prompts, or\ntranscripts.\n\nWhat it does receive is small and bounded. From you: the text of each promise a named person on your\nteam approves, the numeric ids of your repository and its GitHub owner, and the name of its default\nbranch. From CI: GitHub's signed statement of which repository, workflow, and run is reporting, and\nfor each promise the run checked, the pass or fail outcome, the exact commit it checked, and content\nhashes of the verifier package and its output. Hashes cannot be turned back into your code or your\ntest output.\n\nThe verify job in your CI runs your tests with your checkout and has no Balladeer credential. A\nseparate publish job, with no checkout, sends only those outcomes and hashes.\n\
|
|
10
|
+
export declare const BOUNDARY_COPY = "Balladeer never receives your code. It cannot read your repository: it holds no GitHub token,\ninstalls no GitHub App, and has no access to your files, tests, fixtures, logs, prompts, or\ntranscripts.\n\nWhat it does receive is small and bounded. From you: the text of each promise a named person on your\nteam approves, the numeric ids of your repository and its GitHub owner, and the name of its default\nbranch. From CI: GitHub's signed statement of which repository, workflow, and run is reporting, and\nfor each promise the run checked, the pass or fail outcome, the exact commit it checked, and content\nhashes of the verifier package and its output. Hashes cannot be turned back into your code or your\ntest output.\n\nThe verify job in your CI runs your tests with your checkout and has no Balladeer credential. A\nseparate publish job, with no checkout, sends only those outcomes and hashes.\n\nBrowser approval creates a temporary setup session limited by that person's workspace role. A\ncontributor can connect this machine's coding agent to an already-enrolled repository and propose\npromises; an administrator can also add repositories, connect CI, and invite teammates. The session\ncannot approve, activate, rotate, revoke, or remove anything. It lasts a day, each use buys it\nanother day, and it is gone seven days after approval however much it was used. When setup connects\nan enrolled repository it also issues that machine a coding-agent credential. That connection has no\nexpiry: it lets the agent read the promises your team has approved, propose new ones, and propose\nreplacing, retiring, excepting, or reassigning one you already have; every one of those waits for a\nnamed person to decide it. It can also carry out one of those acts for you, and only this way: you\nopen a Balladeer page in your own browser, read what the act is, sign it off there, and read back\nthe one-time code that page gives you. That code covers that one act on that one thing, once, and\nBalladeer records you as the person who took it and the connection as the messenger. Without a code\nyou signed, the connection cannot approve, activate, grant, transfer, retire, or delete anything.\nYou can revoke either one at any time in Balladeer, and the setup session also ends on its own.\n\nAdding the workflow puts a check on pull requests into your default branch. That check is advisory\non Balladeer's side; whether it blocks a merge is your own branch protection.\n";
|
|
11
11
|
/**
|
|
12
12
|
* The one thing about approving that the terminal has to say.
|
|
13
13
|
*
|
|
@@ -35,7 +35,7 @@ export declare const APPROVE_IN_THE_RIGHT_WORKSPACE = "Approve it while your bro
|
|
|
35
35
|
* control plane, and a packaging test compares them: the page an agent fetches
|
|
36
36
|
* and the terminal it is reading cannot come to describe this differently.
|
|
37
37
|
*/
|
|
38
|
-
export declare const JOIN_OR_CREATE = "The pairing page joins an existing workspace or makes a new one. Somebody whose team already has\na Balladeer workspace
|
|
38
|
+
export declare const JOIN_OR_CREATE = "The pairing page joins an existing workspace or makes a new one. Somebody whose team already has\na Balladeer workspace accepts their email invitation, then runs `npx -y balladeer@latest setup --existing` in\nthe checkout they mean to use. That teammate mode never adds a repository or changes CI. After they\nsign in and approve the code, onboarding continues even when the checkout is not in the workspace.\nIf it is already enrolled, setup connects this machine's coding agent. If it is absent, the person\ncan still use Balladeer in the browser; a red warning explains that enforcement cannot be tracked\nuntil an administrator connects a repository.\n\nSomebody who is the first person from their team signs in, names a workspace, and clicks Create, and\nonly then is there anything to approve into.\n\nYou can save them the typing, and nothing else. Ask what the workspace should be called, then run\n`npx -y balladeer@latest setup --create-workspace \"<name>\"` with the name they gave you. The pairing link this\ncommand prints then carries `?create=<name>`, which pre-fills that name in the create form on the\npairing page. It fills the box and no more than that: the person signs in and clicks Create, and\nuntil they do there is no workspace. An agent never creates one, and Balladeer refuses the attempt\nwhatever it was told in conversation. Never invent the name either. A workspace is named once and\nthe whole team reads it.";
|
|
39
39
|
/**
|
|
40
40
|
* When a coding agent reads this repository's promises, and when it does not.
|
|
41
41
|
*
|
|
@@ -69,7 +69,7 @@ export declare const RETRIEVAL_SCOPE = "### Reading what is already agreed\n\nRe
|
|
|
69
69
|
* plane's `/agent` page carries the same bytes under its own constant, and a
|
|
70
70
|
* packaging test compares them.
|
|
71
71
|
*/
|
|
72
|
-
export declare const SESSION_BEHAVIORS = "### Three things to offer without being asked\n\nAt the start of any session in this repository, before you plan anything, ask list_promises for the\npromises nothing is checking yet that belong to the person you are working with: `unverified` true\nand `mine` true, which is one bounded read rather than the catalog. If it returns any, say so in one\nline and offer to build their verifiers now. Name each one by its one-sentence claim rather than by\nan id, so the person can see which behavior is unguarded. Ask the same tool for\n`brokenSinceLastSeen` true as well, and where that returns any, say in one line that those promises\nbroke since they last looked, name each by its claim, and offer to fix them. Then wait for their\nanswer. The offer is the whole of it, and never start building or repairing one because nobody said\nno.\n\nTheirs, and nobody else's. `mine` keeps the promises this person owns or agreed to, and a teammate's\nunguarded promise is that teammate's to hear about: a session that opens by reading out other\npeople's unfinished work reads as an audit of them. `brokenSinceLastSeen` is that person's own by\nconstruction and needs no `mine` beside it. Drop `mine` when this person asks what the rest of the\nteam has promised, and say whose promises you are showing them when you do.\n\nWhen you have proposed promises, show them here as well as there. Put each proposal in the\nconversation in full: its one-sentence claim, who it is for, when it applies and what must then be\ntrue, the numbered cases that must keep working and the ones that must be caught, and every question\nyou left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them\nthe page it returns and taking the one-time code that page shows them, so the browser is needed only\nfor signing. Give them the review link in the same message too, because some people would rather\nread it there and edit it before they agree.\nA promise whose meaning is agreed and which nothing is checking yet is one you can finish. When\nsomebody gives you a promise id, run `balladeer status <promise id>`, or expand it with get_promise.\nIf it comes back agreed with nothing checking it, say so in one line and offer to prepare and build\nits verifier now. Only if they say yes: `prepare_qualification` mints the one-time setup, or\n`balladeer prepare <promise id>` mints it and writes it where the sealed run reads it. You need no\nsign-off for that and there is no code to ask anybody for, because agreeing the meaning was their\nact and building the check that proves it is yours. Then build the verifier, seal it, push, and tell\nthem protection starts by itself when that run qualifies. The offer is the whole of it: never\nprepare one because nobody said no.";
|
|
72
|
+
export declare const SESSION_BEHAVIORS = "### Three things to offer without being asked\n\nAt the start of any session in this repository, before you plan anything, ask list_promises for the\npromises nothing is checking yet that belong to the person you are working with: `unverified` true\nand `mine` true, which is one bounded read rather than the catalog. If it returns any, say so in one\nline and offer to build their verifiers now. Name each one by its one-sentence claim rather than by\nan id, so the person can see which behavior is unguarded. Ask the same tool for\n`brokenSinceLastSeen` true as well, and where that returns any, say in one line that those promises\nbroke since they last looked, name each by its claim, and offer to fix them. Then wait for their\nanswer. The offer is the whole of it, and never start building or repairing one because nobody said\nno.\n\nTheirs, and nobody else's. `mine` keeps the promises this person owns or agreed to, and a teammate's\nunguarded promise is that teammate's to hear about: a session that opens by reading out other\npeople's unfinished work reads as an audit of them. `brokenSinceLastSeen` is that person's own by\nconstruction and needs no `mine` beside it. Drop `mine` when this person asks what the rest of the\nteam has promised, and say whose promises you are showing them when you do.\n\nWhen you have proposed promises, show them here as well as there. Put each proposal in the\nconversation in full: its one-sentence claim, who it is for, when it applies and what must then be\ntrue, the numbered cases that must keep working and the ones that must be caught, and every question\nyou left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them\nthe page it returns and taking the one-time code that page shows them, so the browser is needed only\nfor signing. Give them the review link in the same message too, because some people would rather\nread it there and edit it before they agree.\nA promise whose meaning is agreed and which nothing is checking yet is one you can finish. When\nsomebody gives you a promise id, run `npx -y balladeer@latest status <promise id>`, or expand it with get_promise.\nIf it comes back agreed with nothing checking it, say so in one line and offer to prepare and build\nits verifier now. Only if they say yes: `prepare_qualification` mints the one-time setup, or\n`npx -y balladeer@latest prepare <promise id>` mints it and writes it where the sealed run reads it. You need no\nsign-off for that and there is no code to ask anybody for, because agreeing the meaning was their\nact and building the check that proves it is yours. Then build the verifier, seal it, push, and tell\nthem protection starts by itself when that run qualifies. The offer is the whole of it: never\nprepare one because nobody said no.";
|
|
73
73
|
/**
|
|
74
74
|
* The capture rules that do not change: when to say nothing, what a yes is
|
|
75
75
|
* worth, and the two promises Balladeer refuses.
|
|
@@ -115,7 +115,7 @@ export declare const CAPTURE_SEAM = "### When to say nothing, and what a yes is
|
|
|
115
115
|
* initialize, and the page `/agent` serves. A packaging test holds them
|
|
116
116
|
* together.
|
|
117
117
|
*/
|
|
118
|
-
export declare const SETTLING_QUESTIONS = "### When somebody says \"tell me about\" one\n\nAn id is how a person points at something here, and every promise page and every proposal page\ncarries one. A promise id starts with prom_ and a proposal id starts with cand_: expand a promise\nwith get_promise and a proposal with get_proposal, and read neither of them out as a list of fields.\nSay in four or five sentences what it is for, who it is for, when it applies and what must then be\ntrue. Then say where it stands: a promise is agreed, and either protected or not yet checked by\nanything; a proposal is agreed by nobody and waiting on the person it names.\n\
|
|
118
|
+
export declare const SETTLING_QUESTIONS = "### When somebody says \"tell me about\" one\n\nAn id is how a person points at something here, and every promise page and every proposal page\ncarries one. A promise id starts with prom_ and a proposal id starts with cand_: expand a promise\nwith get_promise and a proposal with get_proposal, and read neither of them out as a list of fields.\nSay in four or five sentences what it is for, who it is for, when it applies and what must then be\ntrue. Then say where it stands: a promise is agreed, and either protected or not yet checked by\nanything; a proposal is agreed by nobody and waiting on the person it names.\n\nClarify ambiguity that materially changes the behavior during capture, within the existing\nquestion budget; never invent an answer.\n\nOrdinary open questions record uncertainty; they do not prevent the named owner from agreeing to\nthe behavior as written. Agreement does not answer them or add an unstated guarantee. Separate\ncatalog-conflict questions can hold agreement until the owner rules on the stated conflict. Do not\ncall a proposal unready just because it has ordinary open questions. Offer to discuss them if\nuseful; if the person wants to, take them one at a time in the order they come back. For each ordinary question,\nsay what it decides in their words rather than in the question's; give your\nrecommendation and the reason you hold it, drawn from this repository and from the promise itself; and stop there. When\nthey answer, record what they said with resolve_question, in their own words where they gave you\nany, and where their answer changes the promise, follow it with update_proposal, add_case or\nremove_case and tell them what you changed. Never invent an answer or clear uncertainty because\nthey chose to agree. None of that agrees to anything: the named owner agrees, in their own browser\nor through a sign-off you carry, and the questions they answered stay on the proposal in their name.\n\nThe same rule governs every question you leave open in the first place. A question that names a gap\nand stops is a note, and nobody can answer a note. Say what answering it decides, in the words a\ncustomer would use, and carry your own best guess with the reason behind it, so that the shortest\ntrue answer is yes. For example: \"Decides: whether a worker that is running but reconciling nothing\ncounts as an outage this promise covers. Best guess: yes, because the promise is about somebody\nhearing before a customer does, and a wedged worker is invisible to every check this repository has.\nSay yes, or tell me otherwise.\" Balladeer refuses a question filed without both halves and says\nwhich one is missing.";
|
|
119
119
|
/**
|
|
120
120
|
* What a session may spend on reading, in three sentences.
|
|
121
121
|
*
|
|
@@ -150,7 +150,7 @@ export declare const FETCH_BUDGET = "Fetch by id, and only for an id the person
|
|
|
150
150
|
* tool guidance and the control plane's `/agent` page carry the same bytes
|
|
151
151
|
* under their own constants, and a packaging test compares all three.
|
|
152
152
|
*/
|
|
153
|
-
export declare const SEALED_FILES = "### Files that are sealed, and the one reason to edit one\n\nEvery file under .continuity/promises/ is sealed. The promise that owns that directory records the\nexact bytes of each file in it, so editing one, adding one there, renaming one or deleting one\nbreaks the seal. A promise whose seal is broken stops being checked, and it stays that way until a\nnamed person qualifies it again, which is their afternoon rather than your commit. Nothing in there\nis ordinary source: keep it out of refactors, formatting runs and dependency upgrades.\n\nFind out which directories are sealed before you plan an edit, not after. balladeer status lists\nthem, and list_promises names a promise's sealed directory on its row once a verifier is bound to\nit. Then, before you push, run balladeer check-seals. It prints nothing and exits zero when your\nchange touches no seal, and names the promise, its owner and its page when your change would break\none.\n\nThe one reason to edit a sealed file is to repair a verifier that can no longer run: something it\nimports moved, or the language it is written in changed under it. Never edit one to make a failing\ncheck pass. A check going red is the promise doing its job, and the repair for that belongs in the\nbehavior it protects. A repair is not finished until the promise is sealed again with the runner\nthis repository is pinned to. get_promise_setup carries that exact seal command, and balladeer
|
|
153
|
+
export declare const SEALED_FILES = "### Files that are sealed, and the one reason to edit one\n\nEvery file under .continuity/promises/ is sealed. The promise that owns that directory records the\nexact bytes of each file in it, so editing one, adding one there, renaming one or deleting one\nbreaks the seal. A promise whose seal is broken stops being checked, and it stays that way until a\nnamed person qualifies it again, which is their afternoon rather than your commit. Nothing in there\nis ordinary source: keep it out of refactors, formatting runs and dependency upgrades.\n\nFind out which directories are sealed before you plan an edit, not after. npx -y balladeer@latest status lists\nthem, and list_promises names a promise's sealed directory on its row once a verifier is bound to\nit. Then, before you push, run npx -y balladeer@latest check-seals. It prints nothing and exits zero when your\nchange touches no seal, and names the promise, its owner and its page when your change would break\none.\n\nThe one reason to edit a sealed file is to repair a verifier that can no longer run: something it\nimports moved, or the language it is written in changed under it. Never edit one to make a failing\ncheck pass. A check going red is the promise doing its job, and the repair for that belongs in the\nbehavior it protects. A repair is not finished until the promise is sealed again with the runner\nthis repository is pinned to. get_promise_setup carries that exact seal command, and\nnpx -y balladeer@latest check-seals prints it beside any promise it names.";
|
|
154
154
|
/**
|
|
155
155
|
* Which promises a change touches, measured rather than guessed.
|
|
156
156
|
*
|
|
@@ -167,7 +167,7 @@ export declare const SEALED_FILES = "### Files that are sealed, and the one reas
|
|
|
167
167
|
* Three carriers say it, byte for byte, and a packaging test holds them
|
|
168
168
|
* together.
|
|
169
169
|
*/
|
|
170
|
-
export declare const TOUCH_MAP_GUIDANCE = "Prefer the measurement over the markers. Where this repository has a touch map, `balladeer affected\n<paths...>` answers which promises ran the files in front of you, out of what each verifier actually\nexecuted the last time `balladeer touch-map` measured it. Both commands run on this machine and\nsend Balladeer nothing, so you may name any path in the change.\n\nAn answer marked stale was measured against a verifier that has changed since, so read it as the\nlast thing anybody measured rather than as fact, and offer to run `balladeer touch-map` again.\nWhere there is no map, where it does not name your paths, or where it reports a promise it could not\nmeasure, fall back to the paths on the index rows. The map narrows which promises are worth\nfetching. It never widens what you may read: the catalog is still never enumerated, and the fetch\nbudget is unchanged.\n\nWhen a retrieval receipt asks why you read a row, the answer for one the map named is `touch`.";
|
|
170
|
+
export declare const TOUCH_MAP_GUIDANCE = "Prefer the measurement over the markers. Where this repository has a touch map, `npx -y balladeer@latest affected\n<paths...>` answers which promises ran the files in front of you, out of what each verifier actually\nexecuted the last time `npx -y balladeer@latest touch-map` measured it. Both commands run on this machine and\nsend Balladeer nothing, so you may name any path in the change.\n\nAn answer marked stale was measured against a verifier that has changed since, so read it as the\nlast thing anybody measured rather than as fact, and offer to run `npx -y balladeer@latest touch-map` again.\nWhere there is no map, where it does not name your paths, or where it reports a promise it could not\nmeasure, fall back to the paths on the index rows. The map narrows which promises are worth\nfetching. It never widens what you may read: the catalog is still never enumerated, and the fetch\nbudget is unchanged.\n\nWhen a retrieval receipt asks why you read a row, the answer for one the map named is `touch`.";
|
|
171
171
|
/**
|
|
172
172
|
* The one paragraph that turns retrieval from a thing we argue about into a
|
|
173
173
|
* thing we measure.
|
|
@@ -186,14 +186,14 @@ export declare const TOUCH_MAP_GUIDANCE = "Prefer the measurement over the marke
|
|
|
186
186
|
* Three carriers say it, byte for byte, and a packaging test holds them
|
|
187
187
|
* together.
|
|
188
188
|
*/
|
|
189
|
-
export declare const SESSION_STAMP = "Run `balladeer session` when you start work here and pass the id it prints to every promise read\nyou make, as `session`. It is the same id for the whole of one piece of work, and it costs nothing:\na read without it is answered exactly the same way.\n\
|
|
189
|
+
export declare const SESSION_STAMP = "Run `npx -y balladeer@latest session` when you start work here and pass the id it prints to every promise read\nyou make, as `session`. It is the same id for the whole of one piece of work, and it costs nothing:\na read without it is answered exactly the same way.\n\nIf local file permissions refuse that session write, no session stamp was saved. Your saved\nconnection is unchanged; this does not prove its current server authorization. Continue\nalready-authorized MCP reads, coding and explicitly requested capture without the optional\n`session` field. Do not invent an ID, add a session trailer, or record an unsaved stamp. Do not\nbroaden filesystem access or move credentials to retry this write. A missing credential or server\nauthorization refusal is different: follow that refusal. Capture still needs the person's request\nor accepted offer, and human meaning approval is unchanged.\n\nIf a session ID was saved, near the end of the work call `mark_promise_used` with the ids you actually cited\nor acted on. Naming none is a fine answer. It is the only way anybody finds out which rows were\nworth sending you, because reading a promise and then ignoring it is not the same as using it.\n\nIf a session ID was saved, write `Balladeer-Session: <the id>` into the commit message or pull-request body you produce,\nand run `npx -y balladeer@latest session --record` once the commit exists. That is what lets a check that goes red\nnext week be read back against what Balladeer told you before you started. Your commit message never\nleaves your machine: only the session id and the commit SHA are sent.";
|
|
190
190
|
/**
|
|
191
191
|
* The conventions block written between markers into this repository's agent
|
|
192
192
|
* instructions file. Fixed text, compared byte for byte by a test, because a
|
|
193
193
|
* block that drifts per run would rewrite a customer's committed file on every
|
|
194
194
|
* setup and the diff would say nothing.
|
|
195
195
|
*/
|
|
196
|
-
export declare const CONVENTIONS_BLOCK = "## Balladeer promises\n\nBefore planning work in this repository, read the promises this team has already approved through\nthe Balladeer MCP server. They are the behaviors a named person has agreed the software keeps, so\nyour plan has to hold them, not just read them.\n\n### Reading what is already agreed\n\nRetrieve by promise, and only when this session has a reason to. One repository here can hold a\nthousand agreed promises, and a plan built from whatever survived a truncated catalog read is worse\nthan a plan built from none of it, because nothing tells you which half went missing.\n\nWhen a person gives you a promise id, expand exactly that one with get_promise and stop there. Every\npromise page carries a control that copies its id, so an id is what a person hands you when they\nmean a particular promise. Ask for one rather than searching for what they meant.\n\nConsult list_promises in two situations and no others. The person asks what this repository has\npromised, in which case page the index they asked for. Or the change you are about to make touches\npaths that carry promises, in which case give those paths to list_promises: it answers with the\npromises whose scope overlaps them, closest first, and with the few that name no path and so cover\nthe whole repository. That answer is a selection rather than a page and does not continue with a\ncursor, so when the total beside it is larger than what you were handed, narrow the paths rather\nthan asking for more.\n\nWhen you do not yet know which paths you are about to touch, do not call the index at all. Work from\nids until you do, because a page you did not ask a question of is not about your change, and reading\none as though it were is how a plan quietly misses the promise it breaks.\n\nTo learn which paths those are, read `paths` on a list_promises answer you asked for\nwithout paths of your own. It is the set of\nrepository paths this repository's promises are scoped to, deduplicated and bounded, with\n`pathsTruncated` saying whether there were more than the answer carries. Compare the files you are\nabout to change against it. Nothing matching means there is nothing here to read, and saying so is a\nbetter answer than a page of promises about somewhere else.\n\nNever call get_promise_context at the start of a session. It answers the markers you give it, and\nbefore you know what you are changing there are no markers to give: what comes back is a slice of\nthe catalog chosen by nothing. Call it once the work is in front of you, with that work's markers.\n\nEvery one of these reads is bounded and none of them returns the whole catalog. Read the total\nbeside the rows and the sentence in `scope` that says what the total is a total of, and when the\ntotal is larger than what you were handed, page or narrow rather than planning as though you had\nseen everything.\n\nEach index row carries what it takes to rule that promise out without fetching it: the repository,\nthe paths it covers, its one-sentence claim, what protects it and why, and when anything last\nchecked it.\n\nPrefer the measurement over the markers. Where this repository has a touch map, `balladeer affected\n<paths...>` answers which promises ran the files in front of you, out of what each verifier actually\nexecuted the last time `balladeer touch-map` measured it. Both commands run on this machine and\nsend Balladeer nothing, so you may name any path in the change.\n\nAn answer marked stale was measured against a verifier that has changed since, so read it as the\nlast thing anybody measured rather than as fact, and offer to run `balladeer touch-map` again.\nWhere there is no map, where it does not name your paths, or where it reports a promise it could not\nmeasure, fall back to the paths on the index rows. The map narrows which promises are worth\nfetching. It never widens what you may read: the catalog is still never enumerated, and the fetch\nbudget is unchanged.\n\nWhen a retrieval receipt asks why you read a row, the answer for one the map named is `touch`.\n\nFetch by id, and only for an id the person gave you or an index row whose paths match the change in\nfront of you. Never enumerate the catalog. Never chain one fetch into the next to see the whole of\nsomething: when the rows do not settle it, narrow the filter rather than expanding another promise.\n\n### When to say nothing, and what a yes is worth\n\nMost rules are said in passing, in the middle of something else. Somebody saying one has not asked\nyou to record anything, so propose nothing and start no interview. When you do ask, it is one line\nappended to the end of the reply you were already going to give, never a message of its own, never\nasked twice about the same rule, and nothing is proposed until they say yes. A no ends it, and that\nrule is not raised again for the rest of the conversation.\n\nSilence is per conversation rather than per message. Once a conversation is one of these, you ask\nnothing for the rest of it, however good the rule sounds:\n\n- A question, or working out how something already behaves. Nothing is filed and nothing is offered.\n- A refactor. Nobody predicts a promise from a rewrite. Offer the promises this area already carries\n that nothing is checking yet, once, and then wait. Ask nothing about new ones.\n- A change to wording alone. Wording somebody may change again tomorrow is not a rule.\n- An incident, while it is still being fixed. Ask nothing at all until the fix is merged or they say\n it is done, however good tonight's failing case would be.\n- Somebody still weighing options. A decision nobody has made yet is not a rule.\n- An exploration or spike. It ends in nothing or in a plan, and its sentences sound like rules and\n are not.\n- Reading somebody else's change, while you are still reading it. Nothing is offered until they\n give a verdict.\n\nThe words to ask in, the moment to offer, and the shape a proposal takes are not in this file. The\nBalladeer server sends them at the start of every session, and its copy is the current one: read\nwhat it sent this session rather than what this file remembers.\n\n### Two promises Balladeer cannot keep\n\nA promise about speed needs three things before it is a promise at all: a number, a percentile, and\nwhere it is measured. \"The quote page answers in under one second at p95, measured in production at\npeak load\" is one Balladeer can keep. \"The quote page has to be fast\" is not. Say this, and ask for\nthe part that is missing rather than filing it:\n\n\"I can keep that once it has a number, a percentile, and a place it is measured. Without those it is\na wish, not a promise.\"\n\nBalladeer refuses one without all three and names which of them is missing. When all three are\nthere, write the measurement method into the promise, and tell them plainly that it reads agreed and\nunprotected until a test that actually measures it exists.\n\nA promise about how the team works is not something the software does, so no check can ever catch\nit. \"We must provide a low-friction capture experience\" is one of these. File nothing and say:\n\n\"That is a promise about how we work, not something the software does that a check can fail.\nBalladeer only keeps promises a check can catch. If a customer would notice something when this\nslips, say that and I will keep that instead.\"\n\nThen take the customer-visible half if they give you one, and file that instead.\n\nRun `balladeer session` when you start work here and pass the id it prints to every promise read\nyou make, as `session`. It is the same id for the whole of one piece of work, and it costs nothing:\na read without it is answered exactly the same way.\n\nNear the end of the work, call `mark_promise_used` with the ids of the promises you actually cited\nor acted on. Naming none is a fine answer. It is the only way anybody finds out which rows were\nworth sending you, because reading a promise and then ignoring it is not the same as using it.\n\nThen write `Balladeer-Session: <the id>` into the commit message or pull-request body you produce,\nand run `balladeer session --record` once the commit exists. That is what lets a check that goes red\nnext week be read back against what Balladeer told you before you started. Your commit message never\nleaves your machine: only the session id and the commit SHA are sent.\n\n### When somebody asks you to protect a behavior\n\nSomebody has asked you to protect a behavior when they say what the software must do, or must never\ndo again, and mean it as a rule rather than as this one bug. That is one promise, for the behavior\nthey named, and nothing else: if you notice others worth protecting, say so in a sentence and let\nthem choose, and file none of them. Never propose from a conversation that did not ask you to. A\nquestion about how something works and a plan you were asked to sketch are not requests to record\nanything, nor is a fix nobody asked you to write a rule about.\n\nAsk before you extrapolate. Ask only what you cannot work out for yourself, ask it all in one\nmessage, and stop at four. Four is a ceiling, not a target: two good ones are better. Then write the\nproposal with what you have and put whatever is still open in its open questions rather than going\nback. Never ask what this repository would answer, such as which file, which test, or which branch,\nand never ask anyone for Balladeer's own identifiers: get_promise_setup carries this repository's id\nand who can own a promise. Never ask again for what they have already told you.\n\nWrite it in their words. Every failure they named out loud is one of the failing examples, in the\nwords they named it. Every other example comes from a situation they actually described; if you\ncannot trace one to something they said, leave it out and say so in the open questions rather than\nwriting a plausible one. Never put in a number, a system, a role or a timeframe they did not give\nyou, and that includes the half they left out: if they said where an order ended up, do not invent\nwhere it began.\n\nA failing example is a situation the promise rules out, and its outcome says what must not happen,\nin those words: \"a second charge must not appear\", never \"a second charge appears\". Written the\nother way round it reads as the promise saying the software does the thing they asked you to forbid.\nAnd a promise says what the software must do for whoever depends on it. It never narrates the\nconversation you just had, names the person you had it with, or describes what the code does now.\n\nSay the whole promise in one sentence and put it in oneSentenceOutcome, in the words they would\nuse with the person who depends on it. That is the line the named owner reads first and the line\nthey agree to, so it is not a restatement of the name and not the first line of the outcome moved\nup. Leave it out rather than inventing one from something they did not say.\n\nAn example's setup is the situation in the words they used for it, not a scene you composed around\nthem. Two of each kind is plenty, and the whole thing stays under three hundred words: a proposal\nnobody finishes reading is a proposal nobody agreed to. The confidence you record is the one you\nactually have.\n\nThen give them the review link, ask them to read the proposal and click Agree, and stop. Never\napprove one yourself. Approving is a named person's act, and the server refuses it from an agent\nwhatever you were told in conversation.\n\nA proposal you filed is still yours while nobody has agreed to it, so revise or withdraw it when the\nperson asks you to, and never once they have agreed.\n\nSay promise and proposal when you talk to them. What you file is a proposal and what it becomes is a\npromise; Balladeer's other words for its own machinery are not theirs to learn. Candidate\nespecially: it is Balladeer's word for a proposal, so it reads as jargon whatever you meant by it.\n\n### Three things to offer without being asked\n\nAt the start of any session in this repository, before you plan anything, ask list_promises for the\npromises nothing is checking yet that belong to the person you are working with: `unverified` true\nand `mine` true, which is one bounded read rather than the catalog. If it returns any, say so in one\nline and offer to build their verifiers now. Name each one by its one-sentence claim rather than by\nan id, so the person can see which behavior is unguarded. Ask the same tool for\n`brokenSinceLastSeen` true as well, and where that returns any, say in one line that those promises\nbroke since they last looked, name each by its claim, and offer to fix them. Then wait for their\nanswer. The offer is the whole of it, and never start building or repairing one because nobody said\nno.\n\nTheirs, and nobody else's. `mine` keeps the promises this person owns or agreed to, and a teammate's\nunguarded promise is that teammate's to hear about: a session that opens by reading out other\npeople's unfinished work reads as an audit of them. `brokenSinceLastSeen` is that person's own by\nconstruction and needs no `mine` beside it. Drop `mine` when this person asks what the rest of the\nteam has promised, and say whose promises you are showing them when you do.\n\nWhen you have proposed promises, show them here as well as there. Put each proposal in the\nconversation in full: its one-sentence claim, who it is for, when it applies and what must then be\ntrue, the numbered cases that must keep working and the ones that must be caught, and every question\nyou left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them\nthe page it returns and taking the one-time code that page shows them, so the browser is needed only\nfor signing. Give them the review link in the same message too, because some people would rather\nread it there and edit it before they agree.\nA promise whose meaning is agreed and which nothing is checking yet is one you can finish. When\nsomebody gives you a promise id, run `balladeer status <promise id>`, or expand it with get_promise.\nIf it comes back agreed with nothing checking it, say so in one line and offer to prepare and build\nits verifier now. Only if they say yes: `prepare_qualification` mints the one-time setup, or\n`balladeer prepare <promise id>` mints it and writes it where the sealed run reads it. You need no\nsign-off for that and there is no code to ask anybody for, because agreeing the meaning was their\nact and building the check that proves it is yours. Then build the verifier, seal it, push, and tell\nthem protection starts by itself when that run qualifies. The offer is the whole of it: never\nprepare one because nobody said no.\n\n### When somebody says \"tell me about\" one\n\nAn id is how a person points at something here, and every promise page and every proposal page\ncarries one. A promise id starts with prom_ and a proposal id starts with cand_: expand a promise\nwith get_promise and a proposal with get_proposal, and read neither of them out as a list of fields.\nSay in four or five sentences what it is for, who it is for, when it applies and what must then be\ntrue. Then say where it stands: a promise is agreed, and either protected or not yet checked by\nanything; a proposal is agreed by nobody and waiting on the person it names.\n\nA proposal that still carries open questions is not finished, and settling them is usually why\nsomebody asked. Offer to work through them, then take them one at a time in the order they come\nback. For each one, say what it decides in their words rather than in the question's; give your\nrecommendation and the reason you hold it, drawn from this repository and from the promise itself;\nand stop there. When they answer, record what they said with resolve_question, in their own words\nwhere they gave you any, and where their answer changes the promise, follow it with update_proposal,\nadd_case or remove_case and tell them what you changed. None of that agrees to anything: the named\nowner agrees, in their own browser or through a sign-off you carry, and the questions they answered\nstay on the proposal in their name.\n\nThe same rule governs every question you leave open in the first place. A question that names a gap\nand stops is a note, and nobody can answer a note. Say what answering it decides, in the words a\ncustomer would use, and carry your own best guess with the reason behind it, so that the shortest\ntrue answer is yes. For example: \"Decides: whether a worker that is running but reconciling nothing\ncounts as an outage this promise covers. Best guess: yes, because the promise is about somebody\nhearing before a customer does, and a wedged worker is invisible to every check this repository has.\nSay yes, or tell me otherwise.\" Balladeer refuses a question filed without both halves and says\nwhich one is missing.\n\n### Files that are sealed, and the one reason to edit one\n\nEvery file under .continuity/promises/ is sealed. The promise that owns that directory records the\nexact bytes of each file in it, so editing one, adding one there, renaming one or deleting one\nbreaks the seal. A promise whose seal is broken stops being checked, and it stays that way until a\nnamed person qualifies it again, which is their afternoon rather than your commit. Nothing in there\nis ordinary source: keep it out of refactors, formatting runs and dependency upgrades.\n\nFind out which directories are sealed before you plan an edit, not after. balladeer status lists\nthem, and list_promises names a promise's sealed directory on its row once a verifier is bound to\nit. Then, before you push, run balladeer check-seals. It prints nothing and exits zero when your\nchange touches no seal, and names the promise, its owner and its page when your change would break\none.\n\nThe one reason to edit a sealed file is to repair a verifier that can no longer run: something it\nimports moved, or the language it is written in changed under it. Never edit one to make a failing\ncheck pass. A check going red is the promise doing its job, and the repair for that belongs in the\nbehavior it protects. A repair is not finished until the promise is sealed again with the runner\nthis repository is pinned to. get_promise_setup carries that exact seal command, and balladeer\ncheck-seals prints it beside any promise it names.\n\n### The rest of a promise's life\nWhen a promise is obsolete, finished, deliberately off for a while, or owned by the wrong person,\npropose the change and hand them the promise page. Deciding is theirs.\n\nYou can finish one of those acts here, and only one way. Ask for a sign-off with\nrequest_owner_signoff, give them the page it returns, and ask for the one-time code that page shows\nthem. Then call the act's own tool with that code and their own words. Never call one on your own\ninitiative, never on a general approval of some earlier act, and never ask for a code you were not\ngiven: a refusal is the person's to resolve, not yours to retry. Balladeer records them as the\nperson who acted and you as the messenger.\n\nReport the promise's state exactly as Balladeer reported it: proposed, agreed, or protected, never\none in place of another.\n\n### Where your team watches this\n\nBalladeer is a web app as well as these tools, at the address setup printed. Its catalog lists every\npromise with who owns it and whether anything is checking it, and each promise has a page of its own\nshowing what this team agreed the software must do and then every run that has checked it since,\nnewest first, with the commit each one checked. Whenever there is a link to give, give the link\nrather than a summary of it: the page says what you would have said, and it stays true after this\nconversation has ended.\n\nBalladeer also has a Slack app, which a workspace administrator installs from workspace settings.\nOnce it is installed, whoever owns a promise gets a direct message when theirs goes live and when a\nrun on the default branch breaks it. Until somebody installs it, nothing is sent anywhere, so say it\nis available rather than saying they will be told.\n\n### Questions people ask\n\nAnswer these when they come up. Where you do not know, say so and point at the address setup\nprinted: a confident wrong answer about what a vendor can see is worse than no answer.\n\nWhat it does: it holds the behaviors this team has agreed the software must keep, and reports\nwhether each one is still being kept, from this repository's own tests running in its own CI.\n\nWhat it sees: the text of each promise somebody approves, this repository's numeric ids and the name\nof its default branch, and from CI the pass or fail outcome, the commit checked, and content hashes.\nNever the code, the tests, the fixtures, the logs, the prompts, or the transcripts.\n\nWhat stopping costs: nothing that matters to their tests. The verifier package, its fixtures and the\nworkflow file are theirs, in their repository, running in their CI, and disconnecting changes none\nof them. An administrator can download everything Balladeer holds at any time from workspace\nsettings, and disconnecting hands them that same download in the response that ends access.\n\nWho can approve one: the named person who owns it, in their own browser. Not an administrator on\ntheir behalf, and never you.\n\nWhether it blocks a merge: no. The check is advisory on Balladeer's side, and their own branch\nprotection is what decides whether a failing check stops anything.\n\nWho can invite people and change setup: a workspace administrator. A contributor can read the\nworkspace and propose promises, and a viewer can read it. If somebody asks you to add a teammate,\ninvite_teammate returns the page an administrator sends the invitation from, with the address filled\nin for them to read. The tool sends nothing itself: an administrator presses Send.";
|
|
196
|
+
export declare const CONVENTIONS_BLOCK = "## Balladeer promises\n\nBefore planning work in this repository, read the promises this team has already approved through\nthe Balladeer MCP server. They are the behaviors a named person has agreed the software keeps, so\nyour plan has to hold them, not just read them.\n\n### Reading what is already agreed\n\nRetrieve by promise, and only when this session has a reason to. One repository here can hold a\nthousand agreed promises, and a plan built from whatever survived a truncated catalog read is worse\nthan a plan built from none of it, because nothing tells you which half went missing.\n\nWhen a person gives you a promise id, expand exactly that one with get_promise and stop there. Every\npromise page carries a control that copies its id, so an id is what a person hands you when they\nmean a particular promise. Ask for one rather than searching for what they meant.\n\nConsult list_promises in two situations and no others. The person asks what this repository has\npromised, in which case page the index they asked for. Or the change you are about to make touches\npaths that carry promises, in which case give those paths to list_promises: it answers with the\npromises whose scope overlaps them, closest first, and with the few that name no path and so cover\nthe whole repository. That answer is a selection rather than a page and does not continue with a\ncursor, so when the total beside it is larger than what you were handed, narrow the paths rather\nthan asking for more.\n\nWhen you do not yet know which paths you are about to touch, do not call the index at all. Work from\nids until you do, because a page you did not ask a question of is not about your change, and reading\none as though it were is how a plan quietly misses the promise it breaks.\n\nTo learn which paths those are, read `paths` on a list_promises answer you asked for\nwithout paths of your own. It is the set of\nrepository paths this repository's promises are scoped to, deduplicated and bounded, with\n`pathsTruncated` saying whether there were more than the answer carries. Compare the files you are\nabout to change against it. Nothing matching means there is nothing here to read, and saying so is a\nbetter answer than a page of promises about somewhere else.\n\nNever call get_promise_context at the start of a session. It answers the markers you give it, and\nbefore you know what you are changing there are no markers to give: what comes back is a slice of\nthe catalog chosen by nothing. Call it once the work is in front of you, with that work's markers.\n\nEvery one of these reads is bounded and none of them returns the whole catalog. Read the total\nbeside the rows and the sentence in `scope` that says what the total is a total of, and when the\ntotal is larger than what you were handed, page or narrow rather than planning as though you had\nseen everything.\n\nEach index row carries what it takes to rule that promise out without fetching it: the repository,\nthe paths it covers, its one-sentence claim, what protects it and why, and when anything last\nchecked it.\n\nPrefer the measurement over the markers. Where this repository has a touch map, `npx -y balladeer@latest affected\n<paths...>` answers which promises ran the files in front of you, out of what each verifier actually\nexecuted the last time `npx -y balladeer@latest touch-map` measured it. Both commands run on this machine and\nsend Balladeer nothing, so you may name any path in the change.\n\nAn answer marked stale was measured against a verifier that has changed since, so read it as the\nlast thing anybody measured rather than as fact, and offer to run `npx -y balladeer@latest touch-map` again.\nWhere there is no map, where it does not name your paths, or where it reports a promise it could not\nmeasure, fall back to the paths on the index rows. The map narrows which promises are worth\nfetching. It never widens what you may read: the catalog is still never enumerated, and the fetch\nbudget is unchanged.\n\nWhen a retrieval receipt asks why you read a row, the answer for one the map named is `touch`.\n\nFetch by id, and only for an id the person gave you or an index row whose paths match the change in\nfront of you. Never enumerate the catalog. Never chain one fetch into the next to see the whole of\nsomething: when the rows do not settle it, narrow the filter rather than expanding another promise.\n\n### When to say nothing, and what a yes is worth\n\nMost rules are said in passing, in the middle of something else. Somebody saying one has not asked\nyou to record anything, so propose nothing and start no interview. When you do ask, it is one line\nappended to the end of the reply you were already going to give, never a message of its own, never\nasked twice about the same rule, and nothing is proposed until they say yes. A no ends it, and that\nrule is not raised again for the rest of the conversation.\n\nSilence is per conversation rather than per message. Once a conversation is one of these, you ask\nnothing for the rest of it, however good the rule sounds:\n\n- A question, or working out how something already behaves. Nothing is filed and nothing is offered.\n- A refactor. Nobody predicts a promise from a rewrite. Offer the promises this area already carries\n that nothing is checking yet, once, and then wait. Ask nothing about new ones.\n- A change to wording alone. Wording somebody may change again tomorrow is not a rule.\n- An incident, while it is still being fixed. Ask nothing at all until the fix is merged or they say\n it is done, however good tonight's failing case would be.\n- Somebody still weighing options. A decision nobody has made yet is not a rule.\n- An exploration or spike. It ends in nothing or in a plan, and its sentences sound like rules and\n are not.\n- Reading somebody else's change, while you are still reading it. Nothing is offered until they\n give a verdict.\n\nThe words to ask in, the moment to offer, and the shape a proposal takes are not in this file. The\nBalladeer server sends them at the start of every session, and its copy is the current one: read\nwhat it sent this session rather than what this file remembers.\n\n### Two promises Balladeer cannot keep\n\nA promise about speed needs three things before it is a promise at all: a number, a percentile, and\nwhere it is measured. \"The quote page answers in under one second at p95, measured in production at\npeak load\" is one Balladeer can keep. \"The quote page has to be fast\" is not. Say this, and ask for\nthe part that is missing rather than filing it:\n\n\"I can keep that once it has a number, a percentile, and a place it is measured. Without those it is\na wish, not a promise.\"\n\nBalladeer refuses one without all three and names which of them is missing. When all three are\nthere, write the measurement method into the promise, and tell them plainly that it reads agreed and\nunprotected until a test that actually measures it exists.\n\nA promise about how the team works is not something the software does, so no check can ever catch\nit. \"We must provide a low-friction capture experience\" is one of these. File nothing and say:\n\n\"That is a promise about how we work, not something the software does that a check can fail.\nBalladeer only keeps promises a check can catch. If a customer would notice something when this\nslips, say that and I will keep that instead.\"\n\nThen take the customer-visible half if they give you one, and file that instead.\n\nRun `npx -y balladeer@latest session` when you start work here and pass the id it prints to every promise read\nyou make, as `session`. It is the same id for the whole of one piece of work, and it costs nothing:\na read without it is answered exactly the same way.\n\nIf local file permissions refuse that session write, no session stamp was saved. Your saved\nconnection is unchanged; this does not prove its current server authorization. Continue\nalready-authorized MCP reads, coding and explicitly requested capture without the optional\n`session` field. Do not invent an ID, add a session trailer, or record an unsaved stamp. Do not\nbroaden filesystem access or move credentials to retry this write. A missing credential or server\nauthorization refusal is different: follow that refusal. Capture still needs the person's request\nor accepted offer, and human meaning approval is unchanged.\n\nIf a session ID was saved, near the end of the work call `mark_promise_used` with the ids you actually cited\nor acted on. Naming none is a fine answer. It is the only way anybody finds out which rows were\nworth sending you, because reading a promise and then ignoring it is not the same as using it.\n\nIf a session ID was saved, write `Balladeer-Session: <the id>` into the commit message or pull-request body you produce,\nand run `npx -y balladeer@latest session --record` once the commit exists. That is what lets a check that goes red\nnext week be read back against what Balladeer told you before you started. Your commit message never\nleaves your machine: only the session id and the commit SHA are sent.\n\n### When somebody asks you to protect a behavior\n\nSomebody has asked you to protect a behavior when they say what the software must do, or must never\ndo again, and mean it as a rule rather than as this one bug. That is one promise, for the behavior\nthey named, and nothing else: if you notice others worth protecting, say so in a sentence and let\nthem choose, and file none of them. Never propose from a conversation that did not ask you to. A\nquestion about how something works and a plan you were asked to sketch are not requests to record\nanything, nor is a fix nobody asked you to write a rule about.\n\nAsk before you extrapolate. Ask only what you cannot work out for yourself, ask it all in one\nmessage, and stop at four. Four is a ceiling, not a target: two good ones are better. Then write the\nproposal with what you have and put whatever is still open in its open questions rather than going\nback. Never ask what this repository would answer, such as which file, which test, or which branch,\nand never ask anyone for Balladeer's own identifiers: get_promise_setup carries this repository's id\nand who can own a promise. Never ask again for what they have already told you.\n\nWrite it in their words. Every failure they named out loud is one of the failing examples, in the\nwords they named it. Every other example comes from a situation they actually described; if you\ncannot trace one to something they said, leave it out and say so in the open questions rather than\nwriting a plausible one. Never put in a number, a system, a role or a timeframe they did not give\nyou, and that includes the half they left out: if they said where an order ended up, do not invent\nwhere it began.\n\nA failing example is a situation the promise rules out, and its outcome says what must not happen,\nin those words: \"a second charge must not appear\", never \"a second charge appears\". Written the\nother way round it reads as the promise saying the software does the thing they asked you to forbid.\nAnd a promise says what the software must do for whoever depends on it. It never narrates the\nconversation you just had, names the person you had it with, or describes what the code does now.\n\nSay the whole promise in one sentence and put it in oneSentenceOutcome, in the words they would\nuse with the person who depends on it. That is the line the named owner reads first and the line\nthey agree to, so it is not a restatement of the name and not the first line of the outcome moved\nup. Leave it out rather than inventing one from something they did not say.\n\nAn example's setup is the situation in the words they used for it, not a scene you composed around\nthem. Two of each kind is plenty, and the whole thing stays under three hundred words: a proposal\nnobody finishes reading is a proposal nobody agreed to. The confidence you record is the one you\nactually have.\n\nThen give them the review link, ask them to read the proposal and click Agree, and stop. Never\napprove one yourself. Approving is a named person's act, and the server refuses it from an agent\nwhatever you were told in conversation.\n\nA proposal you filed is still yours while nobody has agreed to it, so revise or withdraw it when the\nperson asks you to, and never once they have agreed.\n\nSay promise and proposal when you talk to them. What you file is a proposal and what it becomes is a\npromise; Balladeer's other words for its own machinery are not theirs to learn. Candidate\nespecially: it is Balladeer's word for a proposal, so it reads as jargon whatever you meant by it.\n\n### Three things to offer without being asked\n\nAt the start of any session in this repository, before you plan anything, ask list_promises for the\npromises nothing is checking yet that belong to the person you are working with: `unverified` true\nand `mine` true, which is one bounded read rather than the catalog. If it returns any, say so in one\nline and offer to build their verifiers now. Name each one by its one-sentence claim rather than by\nan id, so the person can see which behavior is unguarded. Ask the same tool for\n`brokenSinceLastSeen` true as well, and where that returns any, say in one line that those promises\nbroke since they last looked, name each by its claim, and offer to fix them. Then wait for their\nanswer. The offer is the whole of it, and never start building or repairing one because nobody said\nno.\n\nTheirs, and nobody else's. `mine` keeps the promises this person owns or agreed to, and a teammate's\nunguarded promise is that teammate's to hear about: a session that opens by reading out other\npeople's unfinished work reads as an audit of them. `brokenSinceLastSeen` is that person's own by\nconstruction and needs no `mine` beside it. Drop `mine` when this person asks what the rest of the\nteam has promised, and say whose promises you are showing them when you do.\n\nWhen you have proposed promises, show them here as well as there. Put each proposal in the\nconversation in full: its one-sentence claim, who it is for, when it applies and what must then be\ntrue, the numbered cases that must keep working and the ones that must be caught, and every question\nyou left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them\nthe page it returns and taking the one-time code that page shows them, so the browser is needed only\nfor signing. Give them the review link in the same message too, because some people would rather\nread it there and edit it before they agree.\nA promise whose meaning is agreed and which nothing is checking yet is one you can finish. When\nsomebody gives you a promise id, run `npx -y balladeer@latest status <promise id>`, or expand it with get_promise.\nIf it comes back agreed with nothing checking it, say so in one line and offer to prepare and build\nits verifier now. Only if they say yes: `prepare_qualification` mints the one-time setup, or\n`npx -y balladeer@latest prepare <promise id>` mints it and writes it where the sealed run reads it. You need no\nsign-off for that and there is no code to ask anybody for, because agreeing the meaning was their\nact and building the check that proves it is yours. Then build the verifier, seal it, push, and tell\nthem protection starts by itself when that run qualifies. The offer is the whole of it: never\nprepare one because nobody said no.\n\n### When somebody says \"tell me about\" one\n\nAn id is how a person points at something here, and every promise page and every proposal page\ncarries one. A promise id starts with prom_ and a proposal id starts with cand_: expand a promise\nwith get_promise and a proposal with get_proposal, and read neither of them out as a list of fields.\nSay in four or five sentences what it is for, who it is for, when it applies and what must then be\ntrue. Then say where it stands: a promise is agreed, and either protected or not yet checked by\nanything; a proposal is agreed by nobody and waiting on the person it names.\n\nClarify ambiguity that materially changes the behavior during capture, within the existing\nquestion budget; never invent an answer.\n\nOrdinary open questions record uncertainty; they do not prevent the named owner from agreeing to\nthe behavior as written. Agreement does not answer them or add an unstated guarantee. Separate\ncatalog-conflict questions can hold agreement until the owner rules on the stated conflict. Do not\ncall a proposal unready just because it has ordinary open questions. Offer to discuss them if\nuseful; if the person wants to, take them one at a time in the order they come back. For each ordinary question,\nsay what it decides in their words rather than in the question's; give your\nrecommendation and the reason you hold it, drawn from this repository and from the promise itself; and stop there. When\nthey answer, record what they said with resolve_question, in their own words where they gave you\nany, and where their answer changes the promise, follow it with update_proposal, add_case or\nremove_case and tell them what you changed. Never invent an answer or clear uncertainty because\nthey chose to agree. None of that agrees to anything: the named owner agrees, in their own browser\nor through a sign-off you carry, and the questions they answered stay on the proposal in their name.\n\nThe same rule governs every question you leave open in the first place. A question that names a gap\nand stops is a note, and nobody can answer a note. Say what answering it decides, in the words a\ncustomer would use, and carry your own best guess with the reason behind it, so that the shortest\ntrue answer is yes. For example: \"Decides: whether a worker that is running but reconciling nothing\ncounts as an outage this promise covers. Best guess: yes, because the promise is about somebody\nhearing before a customer does, and a wedged worker is invisible to every check this repository has.\nSay yes, or tell me otherwise.\" Balladeer refuses a question filed without both halves and says\nwhich one is missing.\n\n### Files that are sealed, and the one reason to edit one\n\nEvery file under .continuity/promises/ is sealed. The promise that owns that directory records the\nexact bytes of each file in it, so editing one, adding one there, renaming one or deleting one\nbreaks the seal. A promise whose seal is broken stops being checked, and it stays that way until a\nnamed person qualifies it again, which is their afternoon rather than your commit. Nothing in there\nis ordinary source: keep it out of refactors, formatting runs and dependency upgrades.\n\nFind out which directories are sealed before you plan an edit, not after. npx -y balladeer@latest status lists\nthem, and list_promises names a promise's sealed directory on its row once a verifier is bound to\nit. Then, before you push, run npx -y balladeer@latest check-seals. It prints nothing and exits zero when your\nchange touches no seal, and names the promise, its owner and its page when your change would break\none.\n\nThe one reason to edit a sealed file is to repair a verifier that can no longer run: something it\nimports moved, or the language it is written in changed under it. Never edit one to make a failing\ncheck pass. A check going red is the promise doing its job, and the repair for that belongs in the\nbehavior it protects. A repair is not finished until the promise is sealed again with the runner\nthis repository is pinned to. get_promise_setup carries that exact seal command, and\nnpx -y balladeer@latest check-seals prints it beside any promise it names.\n\n### The rest of a promise's life\nWhen a promise is obsolete, finished, deliberately off for a while, or owned by the wrong person,\npropose the change and hand them the promise page. Deciding is theirs.\n\nYou can finish one of those acts here, and only one way. Ask for a sign-off with\nrequest_owner_signoff, give them the page it returns, and ask for the one-time code that page shows\nthem. Then call the act's own tool with that code and their own words. Never call one on your own\ninitiative, never on a general approval of some earlier act, and never ask for a code you were not\ngiven: a refusal is the person's to resolve, not yours to retry. Balladeer records them as the\nperson who acted and you as the messenger.\n\nReport the promise's state exactly as Balladeer reported it: proposed, agreed, or protected, never\none in place of another.\n\n### Where your team watches this\n\nBalladeer is a web app as well as these tools, at the address setup printed. Its catalog lists every\npromise with who owns it and whether anything is checking it, and each promise has a page of its own\nshowing what this team agreed the software must do and then every run that has checked it since,\nnewest first, with the commit each one checked. Whenever there is a link to give, give the link\nrather than a summary of it: the page says what you would have said, and it stays true after this\nconversation has ended.\n\nBalladeer also has a Slack app, which a workspace administrator installs from workspace settings.\nOnce it is installed, whoever owns a promise gets a direct message when theirs goes live and when a\nrun on the default branch breaks it. Until somebody installs it, nothing is sent anywhere, so say it\nis available rather than saying they will be told.\n\n### Questions people ask\n\nAnswer these when they come up. Where you do not know, say so and point at the address setup\nprinted: a confident wrong answer about what a vendor can see is worse than no answer.\n\nWhat it does: it holds the behaviors this team has agreed the software must keep, and reports\nwhether each one is still being kept, from this repository's own tests running in its own CI.\n\nWhat it sees: the text of each promise somebody approves, this repository's numeric ids and the name\nof its default branch, and from CI the pass or fail outcome, the commit checked, and content hashes.\nNever the code, the tests, the fixtures, the logs, the prompts, or the transcripts.\n\nWhat stopping costs: nothing that matters to their tests. The verifier package, its fixtures and the\nworkflow file are theirs, in their repository, running in their CI, and disconnecting changes none\nof them. An administrator can download everything Balladeer holds at any time from workspace\nsettings, and disconnecting hands them that same download in the response that ends access.\n\nWho can approve one: the named person who owns it, in their own browser. Not an administrator on\ntheir behalf, and never you.\n\nWhether it blocks a merge: no. The check is advisory on Balladeer's side, and their own branch\nprotection is what decides whether a failing check stops anything.\n\nWho can invite people and change setup: a workspace administrator. A contributor can read the\nworkspace and propose promises, and a viewer can read it. If somebody asks you to add a teammate,\ninvite_teammate returns the page an administrator sends the invitation from, with the address filled\nin for them to read. The tool sends nothing itself: an administrator presses Send.";
|
|
197
197
|
/**
|
|
198
198
|
* How an agent turns a repository that has just been connected into a catalog a
|
|
199
199
|
* person can read. Setup's last step prints it, and the control plane's `/agent`
|
package/dist/copy.js
CHANGED
|
@@ -21,19 +21,20 @@ test output.
|
|
|
21
21
|
The verify job in your CI runs your tests with your checkout and has no Balladeer credential. A
|
|
22
22
|
separate publish job, with no checkout, sends only those outcomes and hashes.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
Browser approval creates a temporary setup session limited by that person's workspace role. A
|
|
25
|
+
contributor can connect this machine's coding agent to an already-enrolled repository and propose
|
|
26
|
+
promises; an administrator can also add repositories, connect CI, and invite teammates. The session
|
|
27
|
+
cannot approve, activate, rotate, revoke, or remove anything. It lasts a day, each use buys it
|
|
28
|
+
another day, and it is gone seven days after approval however much it was used. When setup connects
|
|
29
|
+
an enrolled repository it also issues that machine a coding-agent credential. That connection has no
|
|
30
|
+
expiry: it lets the agent read the promises your team has approved, propose new ones, and propose
|
|
31
|
+
replacing, retiring, excepting, or reassigning one you already have; every one of those waits for a
|
|
32
|
+
named person to decide it. It can also carry out one of those acts for you, and only this way: you
|
|
33
|
+
open a Balladeer page in your own browser, read what the act is, sign it off there, and read back
|
|
34
|
+
the one-time code that page gives you. That code covers that one act on that one thing, once, and
|
|
35
|
+
Balladeer records you as the person who took it and the connection as the messenger. Without a code
|
|
36
|
+
you signed, the connection cannot approve, activate, grant, transfer, retire, or delete anything.
|
|
37
|
+
You can revoke either one at any time in Balladeer, and the setup session also ends on its own.
|
|
37
38
|
|
|
38
39
|
Adding the workflow puts a check on pull requests into your default branch. That check is advisory
|
|
39
40
|
on Balladeer's side; whether it blocks a merge is your own branch protection.
|
|
@@ -66,12 +67,18 @@ export const APPROVE_IN_THE_RIGHT_WORKSPACE = "Approve it while your browser is
|
|
|
66
67
|
* and the terminal it is reading cannot come to describe this differently.
|
|
67
68
|
*/
|
|
68
69
|
export const JOIN_OR_CREATE = `The pairing page joins an existing workspace or makes a new one. Somebody whose team already has
|
|
69
|
-
a Balladeer workspace
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
a Balladeer workspace accepts their email invitation, then runs \`npx -y balladeer@latest setup --existing\` in
|
|
71
|
+
the checkout they mean to use. That teammate mode never adds a repository or changes CI. After they
|
|
72
|
+
sign in and approve the code, onboarding continues even when the checkout is not in the workspace.
|
|
73
|
+
If it is already enrolled, setup connects this machine's coding agent. If it is absent, the person
|
|
74
|
+
can still use Balladeer in the browser; a red warning explains that enforcement cannot be tracked
|
|
75
|
+
until an administrator connects a repository.
|
|
76
|
+
|
|
77
|
+
Somebody who is the first person from their team signs in, names a workspace, and clicks Create, and
|
|
78
|
+
only then is there anything to approve into.
|
|
72
79
|
|
|
73
80
|
You can save them the typing, and nothing else. Ask what the workspace should be called, then run
|
|
74
|
-
\`balladeer setup --create-workspace "<name>"\` with the name they gave you. The pairing link this
|
|
81
|
+
\`npx -y balladeer@latest setup --create-workspace "<name>"\` with the name they gave you. The pairing link this
|
|
75
82
|
command prints then carries \`?create=<name>\`, which pre-fills that name in the create form on the
|
|
76
83
|
pairing page. It fills the box and no more than that: the person signs in and clicks Create, and
|
|
77
84
|
until they do there is no workspace. An agent never creates one, and Balladeer refuses the attempt
|
|
@@ -172,10 +179,10 @@ the page it returns and taking the one-time code that page shows them, so the br
|
|
|
172
179
|
for signing. Give them the review link in the same message too, because some people would rather
|
|
173
180
|
read it there and edit it before they agree.
|
|
174
181
|
A promise whose meaning is agreed and which nothing is checking yet is one you can finish. When
|
|
175
|
-
somebody gives you a promise id, run \`balladeer status <promise id>\`, or expand it with get_promise.
|
|
182
|
+
somebody gives you a promise id, run \`npx -y balladeer@latest status <promise id>\`, or expand it with get_promise.
|
|
176
183
|
If it comes back agreed with nothing checking it, say so in one line and offer to prepare and build
|
|
177
184
|
its verifier now. Only if they say yes: \`prepare_qualification\` mints the one-time setup, or
|
|
178
|
-
\`balladeer prepare <promise id>\` mints it and writes it where the sealed run reads it. You need no
|
|
185
|
+
\`npx -y balladeer@latest prepare <promise id>\` mints it and writes it where the sealed run reads it. You need no
|
|
179
186
|
sign-off for that and there is no code to ask anybody for, because agreeing the meaning was their
|
|
180
187
|
act and building the check that proves it is yours. Then build the verifier, seal it, push, and tell
|
|
181
188
|
them protection starts by itself when that run qualifies. The offer is the whole of it: never
|
|
@@ -282,15 +289,21 @@ Say in four or five sentences what it is for, who it is for, when it applies and
|
|
|
282
289
|
true. Then say where it stands: a promise is agreed, and either protected or not yet checked by
|
|
283
290
|
anything; a proposal is agreed by nobody and waiting on the person it names.
|
|
284
291
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
Clarify ambiguity that materially changes the behavior during capture, within the existing
|
|
293
|
+
question budget; never invent an answer.
|
|
294
|
+
|
|
295
|
+
Ordinary open questions record uncertainty; they do not prevent the named owner from agreeing to
|
|
296
|
+
the behavior as written. Agreement does not answer them or add an unstated guarantee. Separate
|
|
297
|
+
catalog-conflict questions can hold agreement until the owner rules on the stated conflict. Do not
|
|
298
|
+
call a proposal unready just because it has ordinary open questions. Offer to discuss them if
|
|
299
|
+
useful; if the person wants to, take them one at a time in the order they come back. For each ordinary question,
|
|
300
|
+
say what it decides in their words rather than in the question's; give your
|
|
301
|
+
recommendation and the reason you hold it, drawn from this repository and from the promise itself; and stop there. When
|
|
302
|
+
they answer, record what they said with resolve_question, in their own words where they gave you
|
|
303
|
+
any, and where their answer changes the promise, follow it with update_proposal, add_case or
|
|
304
|
+
remove_case and tell them what you changed. Never invent an answer or clear uncertainty because
|
|
305
|
+
they chose to agree. None of that agrees to anything: the named owner agrees, in their own browser
|
|
306
|
+
or through a sign-off you carry, and the questions they answered stay on the proposal in their name.
|
|
294
307
|
|
|
295
308
|
The same rule governs every question you leave open in the first place. A question that names a gap
|
|
296
309
|
and stops is a note, and nobody can answer a note. Say what answering it decides, in the words a
|
|
@@ -344,9 +357,9 @@ breaks the seal. A promise whose seal is broken stops being checked, and it stay
|
|
|
344
357
|
named person qualifies it again, which is their afternoon rather than your commit. Nothing in there
|
|
345
358
|
is ordinary source: keep it out of refactors, formatting runs and dependency upgrades.
|
|
346
359
|
|
|
347
|
-
Find out which directories are sealed before you plan an edit, not after. balladeer status lists
|
|
360
|
+
Find out which directories are sealed before you plan an edit, not after. npx -y balladeer@latest status lists
|
|
348
361
|
them, and list_promises names a promise's sealed directory on its row once a verifier is bound to
|
|
349
|
-
it. Then, before you push, run balladeer check-seals. It prints nothing and exits zero when your
|
|
362
|
+
it. Then, before you push, run npx -y balladeer@latest check-seals. It prints nothing and exits zero when your
|
|
350
363
|
change touches no seal, and names the promise, its owner and its page when your change would break
|
|
351
364
|
one.
|
|
352
365
|
|
|
@@ -354,8 +367,8 @@ The one reason to edit a sealed file is to repair a verifier that can no longer
|
|
|
354
367
|
imports moved, or the language it is written in changed under it. Never edit one to make a failing
|
|
355
368
|
check pass. A check going red is the promise doing its job, and the repair for that belongs in the
|
|
356
369
|
behavior it protects. A repair is not finished until the promise is sealed again with the runner
|
|
357
|
-
this repository is pinned to. get_promise_setup carries that exact seal command, and
|
|
358
|
-
check-seals prints it beside any promise it names.`;
|
|
370
|
+
this repository is pinned to. get_promise_setup carries that exact seal command, and
|
|
371
|
+
npx -y balladeer@latest check-seals prints it beside any promise it names.`;
|
|
359
372
|
/**
|
|
360
373
|
* Which promises a change touches, measured rather than guessed.
|
|
361
374
|
*
|
|
@@ -372,13 +385,13 @@ check-seals prints it beside any promise it names.`;
|
|
|
372
385
|
* Three carriers say it, byte for byte, and a packaging test holds them
|
|
373
386
|
* together.
|
|
374
387
|
*/
|
|
375
|
-
export const TOUCH_MAP_GUIDANCE = `Prefer the measurement over the markers. Where this repository has a touch map, \`balladeer affected
|
|
388
|
+
export const TOUCH_MAP_GUIDANCE = `Prefer the measurement over the markers. Where this repository has a touch map, \`npx -y balladeer@latest affected
|
|
376
389
|
<paths...>\` answers which promises ran the files in front of you, out of what each verifier actually
|
|
377
|
-
executed the last time \`balladeer touch-map\` measured it. Both commands run on this machine and
|
|
390
|
+
executed the last time \`npx -y balladeer@latest touch-map\` measured it. Both commands run on this machine and
|
|
378
391
|
send Balladeer nothing, so you may name any path in the change.
|
|
379
392
|
|
|
380
393
|
An answer marked stale was measured against a verifier that has changed since, so read it as the
|
|
381
|
-
last thing anybody measured rather than as fact, and offer to run \`balladeer touch-map\` again.
|
|
394
|
+
last thing anybody measured rather than as fact, and offer to run \`npx -y balladeer@latest touch-map\` again.
|
|
382
395
|
Where there is no map, where it does not name your paths, or where it reports a promise it could not
|
|
383
396
|
measure, fall back to the paths on the index rows. The map narrows which promises are worth
|
|
384
397
|
fetching. It never widens what you may read: the catalog is still never enumerated, and the fetch
|
|
@@ -403,16 +416,24 @@ When a retrieval receipt asks why you read a row, the answer for one the map nam
|
|
|
403
416
|
* Three carriers say it, byte for byte, and a packaging test holds them
|
|
404
417
|
* together.
|
|
405
418
|
*/
|
|
406
|
-
export const SESSION_STAMP = `Run \`balladeer session\` when you start work here and pass the id it prints to every promise read
|
|
419
|
+
export const SESSION_STAMP = `Run \`npx -y balladeer@latest session\` when you start work here and pass the id it prints to every promise read
|
|
407
420
|
you make, as \`session\`. It is the same id for the whole of one piece of work, and it costs nothing:
|
|
408
421
|
a read without it is answered exactly the same way.
|
|
409
422
|
|
|
410
|
-
|
|
423
|
+
If local file permissions refuse that session write, no session stamp was saved. Your saved
|
|
424
|
+
connection is unchanged; this does not prove its current server authorization. Continue
|
|
425
|
+
already-authorized MCP reads, coding and explicitly requested capture without the optional
|
|
426
|
+
\`session\` field. Do not invent an ID, add a session trailer, or record an unsaved stamp. Do not
|
|
427
|
+
broaden filesystem access or move credentials to retry this write. A missing credential or server
|
|
428
|
+
authorization refusal is different: follow that refusal. Capture still needs the person's request
|
|
429
|
+
or accepted offer, and human meaning approval is unchanged.
|
|
430
|
+
|
|
431
|
+
If a session ID was saved, near the end of the work call \`mark_promise_used\` with the ids you actually cited
|
|
411
432
|
or acted on. Naming none is a fine answer. It is the only way anybody finds out which rows were
|
|
412
433
|
worth sending you, because reading a promise and then ignoring it is not the same as using it.
|
|
413
434
|
|
|
414
|
-
|
|
415
|
-
and run \`balladeer session --record\` once the commit exists. That is what lets a check that goes red
|
|
435
|
+
If a session ID was saved, write \`Balladeer-Session: <the id>\` into the commit message or pull-request body you produce,
|
|
436
|
+
and run \`npx -y balladeer@latest session --record\` once the commit exists. That is what lets a check that goes red
|
|
416
437
|
next week be read back against what Balladeer told you before you started. Your commit message never
|
|
417
438
|
leaves your machine: only the session id and the commit SHA are sent.`;
|
|
418
439
|
/**
|
package/dist/store.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DelegatedScope } from "./wire.js";
|
|
2
2
|
export declare class StoreError extends Error {
|
|
3
3
|
readonly code: string;
|
|
4
|
-
constructor(code: string, message: string);
|
|
4
|
+
constructor(code: string, message: string, options?: ErrorOptions);
|
|
5
5
|
}
|
|
6
6
|
export type PendingPairing = Readonly<{
|
|
7
7
|
controlPlane: string;
|
|
@@ -11,6 +11,8 @@ export type PendingPairing = Readonly<{
|
|
|
11
11
|
verificationUri: string;
|
|
12
12
|
expiresAt: string;
|
|
13
13
|
startedAt: string;
|
|
14
|
+
/** Local pairing intent; lets an explicit workspace choice resume its own code. */
|
|
15
|
+
workspaceChoice?: string;
|
|
14
16
|
}>;
|
|
15
17
|
export type StoredSession = Readonly<{
|
|
16
18
|
controlPlane: string;
|
package/dist/store.js
CHANGED
|
@@ -5,8 +5,8 @@ import { homedir } from "node:os";
|
|
|
5
5
|
import { dirname, join, parse, resolve } from "node:path";
|
|
6
6
|
export class StoreError extends Error {
|
|
7
7
|
code;
|
|
8
|
-
constructor(code, message) {
|
|
9
|
-
super(message);
|
|
8
|
+
constructor(code, message, options) {
|
|
9
|
+
super(message, options);
|
|
10
10
|
this.name = "StoreError";
|
|
11
11
|
this.code = code;
|
|
12
12
|
}
|
|
@@ -166,7 +166,7 @@ export function writeStoreFile(fileName, contents, environment = process.env) {
|
|
|
166
166
|
}
|
|
167
167
|
if (error instanceof StoreError)
|
|
168
168
|
throw error;
|
|
169
|
-
throw new StoreError("credential_store_unwritable", `Balladeer could not write ${path}: ${error instanceof Error ? error.message : "unknown reason"}
|
|
169
|
+
throw new StoreError("credential_store_unwritable", `Balladeer could not write ${path}: ${error instanceof Error ? error.message : "unknown reason"}`, { cause: error });
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
/** Origins, not URL strings, so `https://host/../` cannot alias a stored entry. */
|
package/dist/wire.d.ts
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* runtime dependency at all: Node 22 builtins and global fetch, nothing else.
|
|
6
6
|
* A contract test compares the scope list below against the server's.
|
|
7
7
|
*/
|
|
8
|
-
export declare const CLI_VERSION = "1.0.
|
|
8
|
+
export declare const CLI_VERSION = "1.0.3";
|
|
9
|
+
export declare const CLI_INVOCATION = "npx -y balladeer@latest";
|
|
9
10
|
export declare const CLIENT_HEADER = "x-balladeer-client";
|
|
10
|
-
export declare const CLIENT_HEADER_VALUE = "balladeer/1.0.
|
|
11
|
+
export declare const CLIENT_HEADER_VALUE = "balladeer/1.0.3";
|
|
11
12
|
export declare const DEFAULT_CONTROL_PLANE = "https://envelopes.balladeer.ai";
|
|
12
13
|
export type DelegatedScope = "repository:enroll" | "agent:issue" | "ci:connect" | "workspace:invite" | "candidate:propose";
|
|
13
14
|
export declare const DELEGATED_SCOPES: readonly DelegatedScope[];
|
|
@@ -248,7 +249,7 @@ export type JsonStep = Readonly<{
|
|
|
248
249
|
scopes?: readonly DelegatedScope[];
|
|
249
250
|
}> | Readonly<{
|
|
250
251
|
step: "repository";
|
|
251
|
-
status: "added" | "already" | "blocked";
|
|
252
|
+
status: "added" | "already" | "not_connected" | "blocked";
|
|
252
253
|
repository?: string;
|
|
253
254
|
repositoryId?: string;
|
|
254
255
|
defaultBranch?: string;
|
|
@@ -313,7 +314,7 @@ export type JsonStep = Readonly<{
|
|
|
313
314
|
* moved, and the repository's own workflow file has not, so the proof is a
|
|
314
315
|
* run on the new pin that has not happened yet.
|
|
315
316
|
*/
|
|
316
|
-
status: "identity_recorded" | "connected" | "release_upgraded" | "blocked";
|
|
317
|
+
status: "identity_recorded" | "connected" | "release_upgraded" | "not_changed" | "blocked";
|
|
317
318
|
repositoryId?: string;
|
|
318
319
|
pullRequestUrl?: string;
|
|
319
320
|
validatedRunCount?: number;
|
|
@@ -323,6 +324,10 @@ export type JsonStep = Readonly<{
|
|
|
323
324
|
/** The release this repository was moved onto, on a `release_upgraded` step. */
|
|
324
325
|
attestorReleaseSha?: string;
|
|
325
326
|
reason?: string;
|
|
327
|
+
}> | Readonly<{
|
|
328
|
+
step: "warning";
|
|
329
|
+
code: "enforcement_unavailable";
|
|
330
|
+
message: string;
|
|
326
331
|
}> | Readonly<{
|
|
327
332
|
step: "promise";
|
|
328
333
|
status: "proposed" | "agreed" | "none";
|
package/dist/wire.js
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* runtime dependency at all: Node 22 builtins and global fetch, nothing else.
|
|
6
6
|
* A contract test compares the scope list below against the server's.
|
|
7
7
|
*/
|
|
8
|
-
export const CLI_VERSION = "1.0.
|
|
8
|
+
export const CLI_VERSION = "1.0.3";
|
|
9
|
+
export const CLI_INVOCATION = "npx -y balladeer@latest";
|
|
9
10
|
export const CLIENT_HEADER = "x-balladeer-client";
|
|
10
11
|
export const CLIENT_HEADER_VALUE = `balladeer/${CLI_VERSION}`;
|
|
11
12
|
export const DEFAULT_CONTROL_PLANE = "https://envelopes.balladeer.ai";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balladeer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Set up Balladeer from your terminal, or from a coding agent's.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"private": false,
|
|
@@ -26,5 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "5.9.3"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@iarna/toml": "2.2.5"
|
|
29
32
|
}
|
|
30
33
|
}
|