@openclaw/facetime 2026.11.3 → 2026.11.5-beta.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.
Files changed (111) hide show
  1. package/dist/.setup/{setup-DMPG615Z.mjs → setup-D3xHzHpV.mjs} +52 -99
  2. package/dist/.source-module-urls/38481bccca5fbb406e50ac928748f9f04f5a6cf5623980901b3cebc6ee82dfb6.json +1 -0
  3. package/dist/index.js +9 -22
  4. package/dist/runtime-api.js +225 -339
  5. package/docs/phase1-verification.md +1 -1
  6. package/index.ts +13 -20
  7. package/node_modules/typebox/build/format/duration.d.mts +2 -2
  8. package/node_modules/typebox/build/format/duration.mjs +2 -2
  9. package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
  10. package/node_modules/typebox/build/format/idn_email.mjs +1 -0
  11. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
  12. package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
  13. package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
  14. package/node_modules/typebox/build/format/ipv4.mjs +2 -2
  15. package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
  16. package/node_modules/typebox/build/format/ipv6.mjs +1 -1
  17. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
  18. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  19. package/node_modules/typebox/build/schema/build.mjs +1 -0
  20. package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
  21. package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
  22. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
  23. package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
  24. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
  25. package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
  26. package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
  27. package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
  28. package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
  29. package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
  30. package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
  31. package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
  32. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
  33. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
  34. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
  35. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
  36. package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
  37. package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
  38. package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
  39. package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
  40. package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
  41. package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
  42. package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
  43. package/node_modules/typebox/build/system/memory/create.mjs +18 -13
  44. package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
  45. package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
  46. package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
  47. package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
  48. package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
  49. package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
  50. package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
  51. package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
  52. package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
  53. package/node_modules/typebox/build/system/memory/update.mjs +43 -16
  54. package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
  55. package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
  56. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
  57. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
  58. package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
  59. package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
  60. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
  61. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
  62. package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
  63. package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
  64. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
  65. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
  66. package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
  67. package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
  68. package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
  69. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  70. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
  71. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
  72. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
  73. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
  74. package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
  75. package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
  76. package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
  77. package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
  78. package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
  79. package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
  80. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
  81. package/node_modules/typebox/package.json +1 -1
  82. package/node_modules/typebox/readme.md +1 -1
  83. package/package.json +5 -6
  84. package/scripts/inject-helper-terminal.sh +1 -1
  85. package/scripts/inject-helper.sh +3 -7
  86. package/scripts/install-driver.sh +1 -1
  87. package/src/audio-pump.ts +5 -13
  88. package/src/command-output.ts +3 -0
  89. package/src/driver-setup.ts +15 -23
  90. package/src/helper-results.ts +31 -37
  91. package/src/helper-rpc.ts +55 -68
  92. package/src/helper-supervisor.ts +20 -28
  93. package/src/outbound-call.ts +2 -13
  94. package/src/plugin-paths.ts +13 -23
  95. package/src/preflight.ts +10 -33
  96. package/src/runtime-call-control.ts +11 -23
  97. package/src/runtime-call-events.ts +10 -7
  98. package/src/runtime-carrier-process.ts +1 -5
  99. package/src/runtime-helper-results.ts +5 -38
  100. package/src/runtime-state.ts +178 -10
  101. package/src/runtime-status.ts +2 -3
  102. package/src/runtime.ts +5 -7
  103. package/src/setup.ts +58 -69
  104. package/src/talk-consult-controller.ts +1 -19
  105. package/src/talk-driver.ts +31 -25
  106. package/src/talk-events-summary.ts +8 -19
  107. package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
  108. package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
  109. package/src/call-lifecycle.ts +0 -171
  110. package/src/runtime-lifecycle.ts +0 -17
  111. package/src/talk-initial-greeting.ts +0 -42
@@ -66,39 +66,31 @@ async function inspectFaceTimeDriver(params) {
66
66
  if (result.code !== 0) throw new Error(result.stderr || result.stdout || `driver status exited ${result.code}`);
67
67
  return readDriverStatus(result.stdout);
68
68
  }
69
- async function installFaceTimeDriver(params) {
70
- if (await inspectFaceTimeDriver(params) === "current") return {
71
- changed: false,
72
- status: "current"
73
- };
69
+ async function runDriverSetup(params, action) {
74
70
  const script = resolve(params.pluginRoot, "scripts", "install-driver.sh");
75
71
  const result = await params.runCommandWithTimeout([
76
72
  "/bin/sh",
77
73
  script,
78
- "--ensure"
74
+ `--${action}`
79
75
  ], {
80
76
  killProcessTree: true,
81
77
  ...params.signal ? { signal: params.signal } : {}
82
78
  });
83
- if (result.code !== 0) throw new Error(`FaceTime audio driver installation failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
84
- const after = await inspectFaceTimeDriver(params);
85
- if (after !== "current") throw new Error(`FaceTime audio driver did not become current (status: ${after})`);
79
+ if (result.code !== 0) throw new Error(`FaceTime ${action === "ensure" ? "audio driver installation" : "uninstall"} failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
80
+ }
81
+ async function installFaceTimeDriver(params) {
82
+ if (await inspectFaceTimeDriver(params) === "current") return {
83
+ changed: false,
84
+ status: "current"
85
+ };
86
+ await runDriverSetup(params, "ensure");
86
87
  return {
87
88
  changed: true,
88
- status: after
89
+ status: "current"
89
90
  };
90
91
  }
91
92
  async function uninstallFaceTimeDriver(params) {
92
- const script = resolve(params.pluginRoot, "scripts", "install-driver.sh");
93
- const result = await params.runCommandWithTimeout([
94
- "/bin/sh",
95
- script,
96
- "--uninstall"
97
- ], {
98
- killProcessTree: true,
99
- ...params.signal ? { signal: params.signal } : {}
100
- });
101
- if (result.code !== 0) throw new Error(`FaceTime uninstall failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
93
+ await runDriverSetup(params, "uninstall");
102
94
  }
103
95
  //#endregion
104
96
  //#region extensions/facetime/src/plugin-paths.ts
@@ -118,12 +110,7 @@ async function resolveNativeInstall() {
118
110
  const buildIdFile = resolve(directory, "FaceTimeHelper.build-id");
119
111
  const protocolFile = resolve(directory, "native-protocol.env");
120
112
  try {
121
- await Promise.all([
122
- access(capture, constants.X_OK),
123
- access(helper, constants.R_OK),
124
- access(buildIdFile, constants.R_OK),
125
- access(protocolFile, constants.R_OK)
126
- ]);
113
+ await Promise.all([access(capture, constants.X_OK), access(helper, constants.R_OK)]);
127
114
  const [buildId, protocol] = await Promise.all([readFile(buildIdFile, "utf8").then((value) => value.trim()), readFile(protocolFile, "utf8").then((value) => value.trim())]);
128
115
  if (!/^[\da-f]{64}$/u.test(buildId) || protocol !== NATIVE_PROTOCOL) continue;
129
116
  return {
@@ -146,7 +133,7 @@ async function inspectFaceTimeArtifacts() {
146
133
  return false;
147
134
  }
148
135
  };
149
- const helperTempDirs = ["com.apple.FaceTime", "com.apple.mobilephone"].map((bundle) => resolve(homedir(), "Library", "Containers", bundle, "Data", "tmp"));
136
+ const helperTempDir = resolve(homedir(), "Library", "Containers", "com.apple.FaceTime", "Data", "tmp");
150
137
  const countHelpers = async (directory) => {
151
138
  try {
152
139
  return (await readdir(directory)).filter((name) => name.startsWith("FaceTimeHelper") && name.endsWith(".dylib")).length;
@@ -159,7 +146,7 @@ async function inspectFaceTimeArtifacts() {
159
146
  readable(resolveHelperDylib(), constants.R_OK),
160
147
  readable(resolveHelperStateFile("helper-ipc-key"), constants.R_OK),
161
148
  readable(resolveHelperStateFile("helper-build.sha256"), constants.R_OK),
162
- Promise.all(helperTempDirs.map(countHelpers)).then((counts) => counts.reduce((total, count) => total + count, 0)),
149
+ countHelpers(helperTempDir),
163
150
  readable(resolve(homedir(), "Library", "Caches", "OpenClaw", "FaceTime", "driver", "OpenClawBridge.driver"), constants.R_OK)
164
151
  ]);
165
152
  return {
@@ -183,98 +170,71 @@ async function ensureHelperArtifacts(params) {
183
170
  "--if-needed"
184
171
  ], { timeoutMs: 12e4 });
185
172
  if (result.code !== 0) throw new Error(`FaceTime native helper staging failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
186
- const dylib = resolveHelperDylib();
187
- await access(dylib, constants.R_OK);
173
+ await access(resolveHelperDylib(), constants.R_OK);
188
174
  const ipcKey = (await readFile(resolveHelperStateFile("helper-ipc-key"), "utf8")).trim();
189
175
  const stagedBuildId = (await readFile(resolveHelperStateFile("helper-build.sha256"), "utf8")).trim();
190
176
  if (!/^[\da-f]{64}$/u.test(ipcKey)) throw new Error("FaceTime helper produced an invalid IPC authentication key");
191
177
  if (stagedBuildId !== installation.buildId) throw new Error("Staged FaceTime helper does not match the installed native package");
192
178
  return {
193
179
  buildId: installation.buildId,
194
- dylib,
195
180
  ipcKey
196
181
  };
197
182
  }
198
183
  //#endregion
184
+ //#region extensions/facetime/src/command-output.ts
185
+ function firstLine(value) {
186
+ return typeof value === "string" ? value.trim().split(/\r?\n/u)[0] || void 0 : void 0;
187
+ }
188
+ //#endregion
199
189
  //#region extensions/facetime/src/setup.ts
200
190
  const XCODE_APP = "/Applications/Xcode.app";
201
191
  const XCODE_CLANG = `${XCODE_APP}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang`;
202
192
  const XCODE_MACOS_SDK = `${XCODE_APP}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`;
203
- const SETUP_ACTIONS = {
204
- "install-native-package": {
205
- kind: "command",
206
- label: "Install or reinstall the FaceTime native package with Homebrew",
207
- command: "if brew list --versions openclaw-facetime >/dev/null 2>&1; then brew reinstall openclaw/tap/openclaw-facetime; else brew install openclaw/tap/openclaw-facetime; fi"
208
- },
209
- "install-xcode-tools": {
210
- kind: "command",
211
- label: "Install full Xcode in /Applications",
212
- command: "open 'https://apps.apple.com/us/app/xcode/id497799835'"
213
- },
214
- "enable-developer-tools": {
193
+ function commandAction(label, command) {
194
+ return {
215
195
  kind: "command",
216
- label: "Enable developer tools access",
217
- command: "sudo /usr/sbin/DevToolsSecurity -enable"
218
- },
196
+ label,
197
+ command
198
+ };
199
+ }
200
+ function settingsAction(label, settingsPath) {
201
+ return {
202
+ kind: "system-settings",
203
+ label,
204
+ settingsPath
205
+ };
206
+ }
207
+ const SETUP_ACTIONS = {
208
+ "install-native-package": commandAction("Install or reinstall the FaceTime native package with Homebrew", "if brew list --versions openclaw-facetime >/dev/null 2>&1; then brew reinstall openclaw/tap/openclaw-facetime; else brew install openclaw/tap/openclaw-facetime; fi"),
209
+ "install-xcode-tools": commandAction("Install full Xcode in /Applications", "open 'https://apps.apple.com/us/app/xcode/id497799835'"),
210
+ "enable-developer-tools": commandAction("Enable developer tools access", "sudo /usr/sbin/DevToolsSecurity -enable"),
219
211
  "disable-sip-debugging": {
220
212
  kind: "recovery",
221
213
  label: "Disable SIP debugging restrictions from macOS Recovery, then reboot and rerun setup",
222
214
  command: "csrutil enable --without debug",
223
215
  settingsPath: "macOS Recovery > Utilities > Terminal"
224
216
  },
225
- "verify-sip-status": {
226
- kind: "command",
227
- label: "Verify SIP status, then rerun setup",
228
- command: "/usr/bin/csrutil status"
229
- },
230
- "configure-owner-handles": {
231
- kind: "command",
232
- label: "Configure ownerHandles",
233
- command: "openclaw configure"
234
- },
235
- "restart-gateway": {
236
- kind: "command",
237
- label: "Stop the stale gateway process, then restart OpenClaw",
238
- command: "openclaw gateway restart"
239
- },
217
+ "verify-sip-status": commandAction("Verify SIP status, then rerun setup", "/usr/bin/csrutil status"),
218
+ "configure-owner-handles": commandAction("Configure ownerHandles", "openclaw configure"),
219
+ "restart-gateway": commandAction("Stop the stale gateway process, then restart OpenClaw", "openclaw gateway restart"),
240
220
  "wait-for-helper": {
241
221
  kind: "automatic",
242
222
  label: "Wait for automatic helper injection to finish"
243
223
  },
244
224
  "restart-call-apps": {
245
225
  kind: "manual-test",
246
- label: "Quit and reopen FaceTime and Phone, then let OpenClaw reinject the helper"
226
+ label: "Quit and reopen FaceTime, then let OpenClaw reinject the helper"
247
227
  },
248
228
  "install-driver": {
249
229
  kind: "gateway",
250
230
  label: "Install or update the paired FaceTime audio driver",
251
231
  gatewayMethod: "facetime.installDriver"
252
232
  },
253
- "select-physical-output": {
254
- kind: "system-settings",
255
- label: "Select MacBook Speakers or another physical output",
256
- settingsPath: "System Settings > Sound > Output"
257
- },
258
- "grant-system-audio": {
259
- kind: "system-settings",
260
- label: "Allow OpenClaw to capture FaceTime app audio",
261
- settingsPath: "System Settings > Privacy & Security > Screen & System Audio Recording"
262
- },
263
- "configure-realtime-provider": {
264
- kind: "command",
265
- label: "Configure authentication for a registered realtime voice provider",
266
- command: "openclaw configure"
267
- },
268
- "verify-focus": {
269
- kind: "system-settings",
270
- label: "Verify Focus is off or allows the expected caller",
271
- settingsPath: "Control Center > Focus"
272
- },
273
- "allow-sharing-notifications": {
274
- kind: "system-settings",
275
- label: "Allow notifications while mirroring or sharing the display",
276
- settingsPath: "System Settings > Notifications"
277
- },
233
+ "select-physical-output": settingsAction("Select MacBook Speakers or another physical output", "System Settings > Sound > Output"),
234
+ "grant-system-audio": settingsAction("Allow OpenClaw to capture FaceTime app audio", "System Settings > Privacy & Security > Screen & System Audio Recording"),
235
+ "configure-realtime-provider": commandAction("Configure authentication for a registered realtime voice provider", "openclaw configure"),
236
+ "verify-focus": settingsAction("Verify Focus is off or allows the expected caller", "Control Center > Focus"),
237
+ "allow-sharing-notifications": settingsAction("Allow notifications while mirroring or sharing the display", "System Settings > Notifications"),
278
238
  "live-outbound-test": {
279
239
  kind: "manual-test",
280
240
  label: "Place one outbound FaceTime audio call with facetime.dial",
@@ -284,11 +244,7 @@ const SETUP_ACTIONS = {
284
244
  kind: "manual-test",
285
245
  label: "Run one inbound and one outbound FaceTime audio call"
286
246
  },
287
- "review-live-voicemail": {
288
- kind: "system-settings",
289
- label: "Review Live Voicemail if inbound audio calls are screened",
290
- settingsPath: "Phone > Settings > Live Voicemail"
291
- }
247
+ "review-live-voicemail": settingsAction("Review Live Voicemail if inbound audio calls are screened", "Phone > Settings > Live Voicemail")
292
248
  };
293
249
  const PRECHECK_ACTIONS = {
294
250
  "capture-binary": "install-native-package",
@@ -298,9 +254,6 @@ const PRECHECK_ACTIONS = {
298
254
  "process-tap": "grant-system-audio",
299
255
  "realtime-provider": "configure-realtime-provider"
300
256
  };
301
- function firstLine(value) {
302
- return typeof value === "string" ? value.trim().split(/\r?\n/u)[0] || void 0 : void 0;
303
- }
304
257
  function addPreflightCheck(checks, check) {
305
258
  if (check.id === "call-app-running") return;
306
259
  const actionId = PRECHECK_ACTIONS[check.id];
@@ -427,7 +380,7 @@ async function runFaceTimeSetup(params) {
427
380
  label: "Developer tools access",
428
381
  status: developerSecurityEnabled ? "ready" : "action-required",
429
382
  required: true,
430
- message: developerSecurityEnabled ? developerSecurity.message : "Developer tools access is disabled; helper injection cannot attach to FaceTime or Phone",
383
+ message: developerSecurityEnabled ? developerSecurity.message : "Developer tools access is disabled; helper injection cannot attach to FaceTime",
431
384
  ...!developerSecurityEnabled ? { actionId: "enable-developer-tools" } : {}
432
385
  });
433
386
  const sip = await checkCommand(params.runCommandWithTimeout, ["/usr/bin/csrutil", "status"], (stdout) => stdout.trim());
@@ -439,7 +392,7 @@ async function runFaceTimeSetup(params) {
439
392
  label: "System Integrity Protection debugging restrictions",
440
393
  status: debuggingRestrictionsDisabled ? "ready" : "action-required",
441
394
  required: true,
442
- message: debuggingRestrictionsDisabled ? "SIP permits debugger attachment to FaceTime and Phone; a connected helper must still be verified separately" : debuggingRestrictionsEnabled ? "SIP debugging restrictions block LLDB helper injection into protected Apple apps" : "Could not verify SIP debugging restrictions; run csrutil status before changing protection settings",
395
+ message: debuggingRestrictionsDisabled ? "SIP permits debugger attachment to FaceTime; a connected helper must still be verified separately" : debuggingRestrictionsEnabled ? "SIP debugging restrictions block LLDB helper injection into protected Apple apps" : "Could not verify SIP debugging restrictions; run csrutil status before changing protection settings",
443
396
  ...!debuggingRestrictionsDisabled ? { actionId: sipActionId } : {}
444
397
  });
445
398
  checks.push({
@@ -473,7 +426,7 @@ async function runFaceTimeSetup(params) {
473
426
  id: `helper-${target.target.toLowerCase()}`,
474
427
  label: `${target.target} helper`,
475
428
  status,
476
- required: target.target === "FaceTime" || target.target === "Phone",
429
+ required: true,
477
430
  message: target.connected ? "Authenticated helper connected" : target.stale ? `Restart ${target.target} so it can load the current helper` : status === "repairing" && target.lastError ? `Automatic retry scheduled after: ${target.lastError}` : target.lastError ? target.lastError : "OpenClaw is launching the app and injecting the helper",
478
431
  ...status === "repairing" ? { actionId: "wait-for-helper" } : status === "action-required" ? { actionId: "restart-call-apps" } : {}
479
432
  });
@@ -532,4 +485,4 @@ async function runFaceTimeSetup(params) {
532
485
  };
533
486
  }
534
487
  //#endregion
535
- export { inspectFaceTimeNativePackage as a, uninstallFaceTimeDriver as c, inspectFaceTimeArtifacts as i, resolveFaceTimeConfig as l, ensureCaptureBinary as n, inspectFaceTimeDriver as o, ensureHelperArtifacts as r, installFaceTimeDriver as s, runFaceTimeSetup as t, validateFaceTimeConfig as u };
488
+ export { inspectFaceTimeArtifacts as a, installFaceTimeDriver as c, validateFaceTimeConfig as d, ensureHelperArtifacts as i, uninstallFaceTimeDriver as l, firstLine as n, inspectFaceTimeNativePackage as o, ensureCaptureBinary as r, inspectFaceTimeDriver as s, runFaceTimeSetup as t, resolveFaceTimeConfig as u };
@@ -0,0 +1 @@
1
+ {"version":3,"entries":[{"output":"doctor-contract-api.js","source":"extensions/facetime/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/facetime/index.ts"},{"output":"runtime-api.js","source":"extensions/facetime/runtime-api.ts"}],"chunks":[{"output":".setup/setup-D3xHzHpV.mjs","sha256":"519c5220611f1ec1aede889e99505965079f8cc36d04d59eacaab6eafe42c78a","facadeSource":null,"sources":["extensions/facetime/src/command-output.ts","extensions/facetime/src/config.ts","extensions/facetime/src/driver-setup.ts","extensions/facetime/src/plugin-paths.ts","extensions/facetime/src/setup.ts"]},{"output":"doctor-contract-api.js","sha256":"f96dd9cf6c57743e620691d1e4e881c3d88ceab3d439580cf69fdf058ed13694","facadeSource":"extensions/facetime/doctor-contract-api.ts","sources":["extensions/facetime/doctor-contract-api.ts","packages/normalization-core/src/record-coerce.ts","src/config/channel-config-normalization.ts","src/plugin-sdk/legacy-webhook-listener-migration.ts"]},{"output":"index.js","sha256":"d0c5056e9689bc381a58903e69e6666c99b183b0c98785e6cb5e75170821b172","facadeSource":"extensions/facetime/index.ts","sources":["extensions/facetime/index.ts","extensions/facetime/src/static-status.ts","extensions/facetime/src/tool.ts"]},{"output":"runtime-api.js","sha256":"30d2358d97ea8dc3f8cc342622d54463c20bc51b238e49e0468aaf048b00c316","facadeSource":"extensions/facetime/runtime-api.ts","sources":["extensions/facetime/helper-endpoint.json","extensions/facetime/src/audio-pump.ts","extensions/facetime/src/call-events.ts","extensions/facetime/src/helper-endpoint.ts","extensions/facetime/src/helper-results.ts","extensions/facetime/src/helper-rpc.ts","extensions/facetime/src/helper-supervisor.ts","extensions/facetime/src/outbound-call.ts","extensions/facetime/src/pending-dial-store.ts","extensions/facetime/src/preflight.ts","extensions/facetime/src/runtime-call-control.ts","extensions/facetime/src/runtime-call-events.ts","extensions/facetime/src/runtime-carrier-process.ts","extensions/facetime/src/runtime-helper-results.ts","extensions/facetime/src/runtime-state.ts","extensions/facetime/src/runtime-status.ts","extensions/facetime/src/runtime.ts","extensions/facetime/src/talk-consult-controller.ts","extensions/facetime/src/talk-driver-config.ts","extensions/facetime/src/talk-driver.ts","extensions/facetime/src/talk-events-summary.ts"]}],"unrenderedSources":["extensions/facetime/runtime-api.ts"]}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as inspectFaceTimeNativePackage, c as uninstallFaceTimeDriver, i as inspectFaceTimeArtifacts, l as resolveFaceTimeConfig, o as inspectFaceTimeDriver, t as runFaceTimeSetup, u as validateFaceTimeConfig } from "./.setup/setup-DMPG615Z.mjs";
1
+ import { a as inspectFaceTimeArtifacts, d as validateFaceTimeConfig, l as uninstallFaceTimeDriver, o as inspectFaceTimeNativePackage, s as inspectFaceTimeDriver, t as runFaceTimeSetup, u as resolveFaceTimeConfig } from "./.setup/setup-D3xHzHpV.mjs";
2
2
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
3
3
  import { ErrorCodes, errorShape } from "openclaw/plugin-sdk/gateway-runtime";
4
4
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
@@ -6,20 +6,6 @@ import { asRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-co
6
6
  import { stringEnum } from "openclaw/plugin-sdk/channel-actions";
7
7
  import { jsonResult } from "openclaw/plugin-sdk/tool-results";
8
8
  import { Type } from "typebox";
9
- //#region extensions/facetime/src/runtime-lifecycle.ts
10
- async function stopRetainedRuntime(current, clearIfCurrent) {
11
- if (!current) return;
12
- let runtime;
13
- try {
14
- runtime = await current;
15
- } catch (error) {
16
- clearIfCurrent(current);
17
- throw error;
18
- }
19
- await runtime.stop();
20
- clearIfCurrent(current);
21
- }
22
- //#endregion
23
9
  //#region extensions/facetime/src/static-status.ts
24
10
  async function inspectFaceTimeStaticStatus(params) {
25
11
  const [artifacts, driver] = await Promise.all([inspectFaceTimeArtifacts(), inspectFaceTimeDriver(params).then((status) => ({ status }), (error) => ({ error: formatErrorMessage(error) }))]);
@@ -164,9 +150,7 @@ const faceTimePlugin = definePluginEntry({
164
150
  id: "facetime",
165
151
  name: "FaceTime",
166
152
  description: "Experimental private FaceTime realtime voice carrier for OpenClaw agents",
167
- configSchema: { parse(value) {
168
- return resolveFaceTimeConfig(value);
169
- } },
153
+ configSchema: { parse: resolveFaceTimeConfig },
170
154
  register(api) {
171
155
  const config = resolveFaceTimeConfig(api.pluginConfig);
172
156
  const validation = validateFaceTimeConfig(config);
@@ -201,9 +185,12 @@ const faceTimePlugin = definePluginEntry({
201
185
  runCommandWithTimeout: api.runtime.system.runCommandWithTimeout
202
186
  });
203
187
  };
204
- const stopRuntime = () => stopRetainedRuntime(runtimePromise, (stopped) => {
205
- if (runtimePromise === stopped) runtimePromise = void 0;
206
- });
188
+ const stopRuntime = async () => {
189
+ const current = runtimePromise;
190
+ if (!current) return;
191
+ await (await current).stop();
192
+ if (runtimePromise === current) runtimePromise = void 0;
193
+ };
207
194
  api.registerTool(() => createFaceTimeCallTool({
208
195
  ensureRuntime,
209
196
  getStatus
@@ -276,7 +263,7 @@ const faceTimePlugin = definePluginEntry({
276
263
  });
277
264
  return {
278
265
  ok: true,
279
- guidance: "Quit and reopen FaceTime and Phone before re-enabling this plugin."
266
+ guidance: "Quit and reopen FaceTime before re-enabling this plugin."
280
267
  };
281
268
  } finally {
282
269
  uninstalling = false;