@abide/bridge 0.9.3 → 0.9.5

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.9.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 0e7d1f2: the applet stays open and backgrounds the handler, so the next link is taken while a bridge runs ([`e750526`](https://github.com/briancray/abide/commit/e7505264bc090824a536246b8f36b0dae8b5505d))
8
+
9
+ ## 0.9.4
10
+
11
+ ### Patch Changes
12
+
13
+ - d28b8f4: the applet waits on the handler so its Local Network grant covers the LAN connection ([`58bc388`](https://github.com/briancray/abide/commit/58bc388abba234683332a8faec7f948b97f54c91))
14
+
3
15
  ## 0.9.3
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abide/bridge",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
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/install.ts CHANGED
@@ -118,9 +118,10 @@ function appleScriptString(text: string): string {
118
118
  return `"${text.replaceAll('\\', '\\\\').replaceAll('"', '\\"')}"`
119
119
  }
120
120
 
121
- /** The applet's source: a link opened starts the handler with it, in the background. */
121
+ /** The applet's source: a link opened starts the handler with it, in the background of an applet that stays open. */
122
122
  function appletSource(bun: string, directory: string): string {
123
123
  const handler = appleScriptString(handlerIn(directory))
124
+ // Backgrounded, so the next link is taken while a bridge runs; the applet is built stay-open, since macOS answers a LAN connection by the responsible app's Local Network grant and refuses it once the applet has quit.
124
125
  return `on open location theURL
125
126
  \tdo shell script quoted form of ${appleScriptString(bun)} & " " & quoted form of ${handler} & " " & quoted form of theURL & " > /dev/null 2>&1 &"
126
127
  end open location
@@ -205,7 +206,7 @@ async function installMac(
205
206
  const source = `${handlerDirectory(directory)}/applet.applescript`
206
207
  await Bun.write(source, appletSource(settings.bun, directory))
207
208
  await rm(app, { recursive: true, force: true })
208
- await tool(['osacompile', '-o', app, source])
209
+ await tool(['osacompile', '-s', '-o', app, source])
209
210
  const plist = `${app}/Contents/Info.plist`
210
211
  for (const [key, type, value] of [
211
212
  ['CFBundleIdentifier', '-string', IDENTIFIER],