@agentvault/claude-bridge 0.5.0 → 0.5.2

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/index.js CHANGED
@@ -233,9 +233,23 @@ var init_launchd = __esm({
233
233
  writeLauncher(this.deps, spec);
234
234
  this.deps.mkdir(dirname3(path2));
235
235
  this.deps.writeFile(path2, renderLaunchdPlist(spec));
236
- this.deps.exec("launchctl", ["bootout", `${this.domain()}/${spec.label}`]);
237
- this.deps.exec("launchctl", ["bootstrap", this.domain(), path2]);
238
- this.deps.exec("launchctl", ["kickstart", "-k", `${this.domain()}/${spec.label}`]);
236
+ const svc = `${this.domain()}/${spec.label}`;
237
+ this.deps.exec("launchctl", ["bootout", svc]);
238
+ this.waitUntilGone(svc);
239
+ let r7 = this.deps.exec("launchctl", ["bootstrap", this.domain(), path2]);
240
+ for (let i2 = 0; i2 < 5 && r7.code !== 0; i2++) {
241
+ this.deps.exec("sleep", ["0.3"]);
242
+ r7 = this.deps.exec("launchctl", ["bootstrap", this.domain(), path2]);
243
+ }
244
+ this.deps.exec("launchctl", ["kickstart", "-k", svc]);
245
+ }
246
+ // Poll `launchctl print` until the label is unloaded (non-zero), bounded to
247
+ // ~5s. Returns immediately when nothing is loaded (fresh install).
248
+ waitUntilGone(svc) {
249
+ for (let i2 = 0; i2 < 20; i2++) {
250
+ if (this.deps.exec("launchctl", ["print", svc]).code !== 0) return;
251
+ this.deps.exec("sleep", ["0.25"]);
252
+ }
239
253
  }
240
254
  uninstall(label) {
241
255
  this.deps.exec("launchctl", ["bootout", `${this.domain()}/${label}`]);
@@ -132761,7 +132775,7 @@ async function main() {
132761
132775
  "[bridge] warning: passing the invite token on the command line is visible to other local users via 'ps'. Prefer: AV_INVITE_TOKEN=\u2026 npx @agentvault/claude-bridge"
132762
132776
  );
132763
132777
  }
132764
- console.error(`[bridge] version: ${true ? "0.5.0" : "dev"}`);
132778
+ console.error(`[bridge] version: ${true ? "0.5.2" : "dev"}`);
132765
132779
  console.error(`[bridge] data dir: ${cfg.dataDir} (${cfg.dataDirSource})`);
132766
132780
  if (cfg.worker) {
132767
132781
  console.error(`[bridge] WORKER MODE \u2014 workspace: ${cfg.workspaceDir} \xB7 permissions: ${cfg.permissionMode} \xB7 enclave dir fenced`);
@@ -8,6 +8,7 @@ export declare class LaunchdBackend implements ServiceBackend {
8
8
  private plistPath;
9
9
  private domain;
10
10
  install(spec: ServiceSpec): void;
11
+ private waitUntilGone;
11
12
  uninstall(label: string): void;
12
13
  status(label: string): {
13
14
  loaded: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"launchd.d.ts","sourceRoot":"","sources":["../../src/service/launchd.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAUhE,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAkC5D;AAED,qBAAa,cAAe,YAAW,cAAc;IACvC,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,WAAW;IAErC,OAAO,CAAC,SAAS;IAGjB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAYhC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM9B,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CAI3D"}
1
+ {"version":3,"file":"launchd.d.ts","sourceRoot":"","sources":["../../src/service/launchd.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAUhE,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAkC5D;AAED,qBAAa,cAAe,YAAW,cAAc;IACvC,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,WAAW;IAErC,OAAO,CAAC,SAAS;IAGjB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IA2BhC,OAAO,CAAC,aAAa;IAOrB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM9B,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CAI3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvault/claude-bridge",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "description": "AgentVault Claude Bridge — daemon for bridging a Claude agent into secure E2E-encrypted AgentVault 1:1 direct messages and rooms.",
6
6
  "main": "dist/index.js",