@abide/bridge 0.7.2 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @abide/bridge
2
2
 
3
+ ## 0.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 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))
8
+
3
9
  ## 0.7.2
4
10
 
5
11
  ### 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.3",
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/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,