@abide/bridge 0.7.2 → 0.7.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @abide/bridge
2
2
 
3
+ ## 0.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - e24354b: the native app finds claude on the login shell's PATH when opened from the Finder — Bun.which and Bun.spawn read the PATH the process started with, so localStands passes the current PATH and a turn's spawn hands the child the current env; the 44.77 test now starts with no claude on PATH and assigns it after, as runNative does ([`26a24cb`](https://github.com/briancray/abide/commit/26a24cbd98ebc248dce33a17fb0f5a28521247d4))
8
+
9
+ ## 0.7.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 7f82a5a: a start keeps only what was changed, the launcher seals a sign-in with its own secret, and the native bridge runs onPairing's arguments ([`3f67aa1`](https://github.com/briancray/abide/commit/3f67aa16c3f230a5fa321f5880d9720842cc3648))
14
+
3
15
  ## 0.7.2
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abide/bridge",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "type": "module",
5
5
  "description": "Connects the Claude Code on your machine to the assistant on an abide site",
6
6
  "license": "MIT",
package/src/bridge.ts CHANGED
@@ -159,7 +159,7 @@ export async function bridge(options: {
159
159
  const core = serveTurns({
160
160
  site,
161
161
  claude: options.claude ?? 'claude',
162
- claudeArgs: options.claudeArgs ?? [],
162
+ claudeArgs: () => options.claudeArgs ?? [],
163
163
  full,
164
164
  report,
165
165
  say: sayOnce,
package/src/claudeTurn.ts CHANGED
@@ -240,6 +240,9 @@ export async function claudeTurn(
240
240
  String(turn.maxTurns),
241
241
  ],
242
242
  cwd: directory,
243
+ // The environment as it is NOW: without one, bun finds `claude` on the `PATH` the process
244
+ // started with and hands the child that, where a native app assigns the login shell's after.
245
+ env: { ...Bun.env },
243
246
  stdin: 'pipe',
244
247
  stdout: 'pipe',
245
248
  stderr: 'pipe',
package/src/install.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  // MACOS hands a URL to an app as an Apple Event, never as an argument, so the app is an AppleScript
7
7
  // applet (`osacompile`, on every Mac) whose `open location` starts the handler with the link. Built
8
8
  // here, it carries no quarantine and Gatekeeper never reads it; ad-hoc signed whole after its
9
- // `Info.plist` is changed, as `abide bundle` signs its own, since an edited bundle whose signature no
9
+ // `Info.plist` is changed, as `abide native` signs its own, since an edited bundle whose signature no
10
10
  // longer matches is one macOS reads as damaged. In Application Support, not an Applications folder: it
11
11
  // is nothing to open by hand, and Launch Services finds a handler there only once it is registered.
12
12
  //
package/src/serveTurns.ts CHANGED
@@ -117,6 +117,8 @@ function permissionServer(method: string, params: unknown): unknown {
117
117
  /**
118
118
  * Serves the turns `site` sends, reporting each through `report`.
119
119
  *
120
+ * `claudeArgs` answers what each turn runs `claude` with after the protocol's own flags — the visitor's,
121
+ * or for the native app's own bridge, the app's `onPairing` arguments in the turn's request (44.78).
120
122
  * `full` gives a turn everything `claude` has, as the visitor running the native app has (44.78,
121
123
  * 44.82); otherwise the visitor's `--tools` in `claudeArgs` narrows what a turn asks for (44.29).
122
124
  * `beforeTurn` runs ahead of each turn.
@@ -124,7 +126,7 @@ function permissionServer(method: string, params: unknown): unknown {
124
126
  export function serveTurns(options: {
125
127
  site: string
126
128
  claude: string
127
- claudeArgs: string[]
129
+ claudeArgs: (turn: TurnRequest) => readonly string[]
128
130
  full: boolean
129
131
  report: (report: TurnReport) => void
130
132
  say: (line: string) => void
@@ -259,7 +261,7 @@ export function serveTurns(options: {
259
261
  try {
260
262
  await claudeTurn(turn, {
261
263
  claude: options.claude,
262
- claudeArgs: options.claudeArgs,
264
+ claudeArgs: [...options.claudeArgs(turn)],
263
265
  full: options.full,
264
266
  mcpUrl: `http://127.0.0.1:${shim.port}/${secret}/${turn.id}`,
265
267
  signal: controller.signal,