balladeer 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
File without changes
@@ -21,7 +21,7 @@ import { StoreError, assertStoreWritable, credentialsPath, dropPendingPairing, f
21
21
  import { CLI_VERSION, DELEGATED_SCOPES, } from "../wire.js";
22
22
  import { explainText } from "./explain.js";
23
23
  import { probeAgentConnection } from "./mcp.js";
24
- const REFUSAL_SENTENCE = "It may not agree to what a promise means, agree a change to what a promise means, grant an exception, transfer ownership, supersede, retire, or offboard anything.";
24
+ const REFUSAL_SENTENCE = "It may not agree to what a promise means, agree a change to what a promise means, transfer ownership, supersede, retire, or offboard anything.";
25
25
  const MAX_WAIT_MS = 10 * 60 * 1000;
26
26
  const AGENT_WAIT_MS = 90 * 1000;
27
27
  /** The bound the control plane's own name check holds, refused here so a name
@@ -2027,7 +2027,7 @@ var require_toml = __commonJS({
2027
2027
  });
2028
2028
 
2029
2029
  // src/wire.ts
2030
- var CLI_VERSION = "1.0.12";
2030
+ var CLI_VERSION = "1.0.13";
2031
2031
  var CLIENT_HEADER = "x-balladeer-client";
2032
2032
  var CLIENT_HEADER_VALUE = `balladeer/${CLI_VERSION}`;
2033
2033
  var DEFAULT_CONTROL_PLANE = "https://envelopes.balladeer.ai";
@@ -94,8 +94,15 @@ function claudeConnector(home, controlPlane, now) {
94
94
  },
95
95
  ];
96
96
  }
97
+ // This product's own hook runs `guidance --hook claude|codex --event ...`,
98
+ // whether by npx, by a checkout path, or by the installed command's absolute
99
+ // path (1.0.11 and later). The July client's hook ran nothing of the kind, so
100
+ // that shape is the line: a hook that names it is ours and is never "earlier".
101
+ // Found on 22 September 2026: the installed-path form was being removed as
102
+ // the older client on every setup run, leaving the laptop with no hook.
97
103
  const isEarlierHook = (command) => typeof command === "string" &&
98
104
  /balladeer/i.test(command) &&
105
+ !/\bguidance --hook (?:claude|codex)\b/.test(command) &&
99
106
  !/balladeer@(?:latest|\d+\.\d+\.\d+)\b/.test(command) &&
100
107
  !/\bpackages[/\\]cli[/\\]dist[/\\]cli\.js\b/.test(command);
101
108
  function claudeSettings(home, now) {
@@ -15,6 +15,8 @@
15
15
  * shape, never by trust in the name.
16
16
  */
17
17
  export declare const USER_SCOPE_OWNER = "Balladeer current guidance (user scope, loader 1)";
18
+ /** Every tool of the server named `balladeer`, in Claude Code's permission rule form. */
19
+ export declare const USER_SCOPE_ALLOW_RULE = "mcp__balladeer__*";
18
20
  export type UserScopeHost = "claude" | "codex";
19
21
  export type UserScopeWrite = Readonly<{
20
22
  host: UserScopeHost;
@@ -22,6 +22,8 @@ import { writeJsonAtomically } from "./mcp-config.js";
22
22
  */
23
23
  export const USER_SCOPE_OWNER = "Balladeer current guidance (user scope, loader 1)";
24
24
  const CLAUDE_EVENTS = ["SessionStart", "UserPromptSubmit", "SubagentStart"];
25
+ /** Every tool of the server named `balladeer`, in Claude Code's permission rule form. */
26
+ export const USER_SCOPE_ALLOW_RULE = "mcp__balladeer__*";
25
27
  /**
26
28
  * The command a host runs to reach Balladeer, with no repository named: the
27
29
  * directory decides.
@@ -192,6 +194,24 @@ export function mergeClaudeUserHooks(home, published, installed) {
192
194
  hooks[event] = [...rows.filter((row) => !own.includes(row)), expected];
193
195
  changed = true;
194
196
  }
197
+ // Claude Code asks the person before every call to a server's tools unless
198
+ // a rule allows them. Without one, each read the guidance asks for costs a
199
+ // click, and a session that says no once hears no offer at all (measured
200
+ // 23 September 2026). The rule names this server's tools and nothing else;
201
+ // a deny rule the person wrote for them is theirs and is left to win.
202
+ const permissions = root.permissions && typeof root.permissions === "object" && !Array.isArray(root.permissions)
203
+ ? { ...root.permissions }
204
+ : {};
205
+ const allow = permissions.allow === undefined ? [] : permissions.allow;
206
+ if (!Array.isArray(allow))
207
+ return { host, path, status: "refused", reason: "permissions.allow is not a list" };
208
+ const deny = Array.isArray(permissions.deny) ? permissions.deny : [];
209
+ const denied = deny.some((rule) => typeof rule === "string" && /^mcp__balladeer(__|$)/.test(rule));
210
+ if (!denied && !allow.some((rule) => rule === USER_SCOPE_ALLOW_RULE)) {
211
+ permissions.allow = [...allow, USER_SCOPE_ALLOW_RULE];
212
+ root.permissions = permissions;
213
+ changed = true;
214
+ }
195
215
  if (!changed)
196
216
  return { host, path, status: "current" };
197
217
  root.hooks = hooks;
package/dist/wire.d.ts CHANGED
@@ -5,10 +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.12";
8
+ export declare const CLI_VERSION = "1.0.13";
9
9
  export declare const CLI_INVOCATION = "npx -y balladeer@latest";
10
10
  export declare const CLIENT_HEADER = "x-balladeer-client";
11
- export declare const CLIENT_HEADER_VALUE = "balladeer/1.0.12";
11
+ export declare const CLIENT_HEADER_VALUE = "balladeer/1.0.13";
12
12
  export declare const DEFAULT_CONTROL_PLANE = "https://envelopes.balladeer.ai";
13
13
  export type DelegatedScope = "repository:enroll" | "agent:issue" | "ci:connect" | "workspace:invite" | "candidate:propose";
14
14
  export declare const DELEGATED_SCOPES: readonly DelegatedScope[];
package/dist/wire.js CHANGED
@@ -5,7 +5,7 @@
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.12";
8
+ export const CLI_VERSION = "1.0.13";
9
9
  export const CLI_INVOCATION = "npx -y balladeer@latest";
10
10
  export const CLIENT_HEADER = "x-balladeer-client";
11
11
  export const CLIENT_HEADER_VALUE = `balladeer/${CLI_VERSION}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balladeer",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
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,