@openclaw/facetime 2026.10.10 → 2026.11.5-beta.1

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-C3uKLO8_.mjs → setup-ByISvnBj.mjs} +51 -99
  2. package/dist/.source-module-urls/38481bccca5fbb406e50ac928748f9f04f5a6cf5623980901b3cebc6ee82dfb6.json +1 -1
  3. package/dist/index.js +9 -21
  4. package/dist/runtime-api.js +225 -337
  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
@@ -65,39 +65,31 @@ async function inspectFaceTimeDriver(params) {
65
65
  if (result.code !== 0) throw new Error(result.stderr || result.stdout || `driver status exited ${result.code}`);
66
66
  return readDriverStatus(result.stdout);
67
67
  }
68
- async function installFaceTimeDriver(params) {
69
- if (await inspectFaceTimeDriver(params) === "current") return {
70
- changed: false,
71
- status: "current"
72
- };
68
+ async function runDriverSetup(params, action) {
73
69
  const script = resolve(params.pluginRoot, "scripts", "install-driver.sh");
74
70
  const result = await params.runCommandWithTimeout([
75
71
  "/bin/sh",
76
72
  script,
77
- "--ensure"
73
+ `--${action}`
78
74
  ], {
79
75
  killProcessTree: true,
80
76
  ...params.signal ? { signal: params.signal } : {}
81
77
  });
82
- if (result.code !== 0) throw new Error(`FaceTime audio driver installation failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
83
- const after = await inspectFaceTimeDriver(params);
84
- if (after !== "current") throw new Error(`FaceTime audio driver did not become current (status: ${after})`);
78
+ if (result.code !== 0) throw new Error(`FaceTime ${action === "ensure" ? "audio driver installation" : "uninstall"} failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
79
+ }
80
+ async function installFaceTimeDriver(params) {
81
+ if (await inspectFaceTimeDriver(params) === "current") return {
82
+ changed: false,
83
+ status: "current"
84
+ };
85
+ await runDriverSetup(params, "ensure");
85
86
  return {
86
87
  changed: true,
87
- status: after
88
+ status: "current"
88
89
  };
89
90
  }
90
91
  async function uninstallFaceTimeDriver(params) {
91
- const script = resolve(params.pluginRoot, "scripts", "install-driver.sh");
92
- const result = await params.runCommandWithTimeout([
93
- "/bin/sh",
94
- script,
95
- "--uninstall"
96
- ], {
97
- killProcessTree: true,
98
- ...params.signal ? { signal: params.signal } : {}
99
- });
100
- if (result.code !== 0) throw new Error(`FaceTime uninstall failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
92
+ await runDriverSetup(params, "uninstall");
101
93
  }
102
94
  // extensions/facetime/src/plugin-paths.ts
103
95
  const NATIVE_PROTOCOL = "NATIVE_PROTOCOL_VERSION=1";
@@ -116,12 +108,7 @@ async function resolveNativeInstall() {
116
108
  const buildIdFile = resolve(directory, "FaceTimeHelper.build-id");
117
109
  const protocolFile = resolve(directory, "native-protocol.env");
118
110
  try {
119
- await Promise.all([
120
- access(capture, constants.X_OK),
121
- access(helper, constants.R_OK),
122
- access(buildIdFile, constants.R_OK),
123
- access(protocolFile, constants.R_OK)
124
- ]);
111
+ await Promise.all([access(capture, constants.X_OK), access(helper, constants.R_OK)]);
125
112
  const [buildId, protocol] = await Promise.all([readFile(buildIdFile, "utf8").then((value) => value.trim()), readFile(protocolFile, "utf8").then((value) => value.trim())]);
126
113
  if (!/^[\da-f]{64}$/u.test(buildId) || protocol !== NATIVE_PROTOCOL) continue;
127
114
  return {
@@ -144,7 +131,7 @@ async function inspectFaceTimeArtifacts() {
144
131
  return false;
145
132
  }
146
133
  };
147
- const helperTempDirs = ["com.apple.FaceTime", "com.apple.mobilephone"].map((bundle) => resolve(homedir(), "Library", "Containers", bundle, "Data", "tmp"));
134
+ const helperTempDir = resolve(homedir(), "Library", "Containers", "com.apple.FaceTime", "Data", "tmp");
148
135
  const countHelpers = async (directory) => {
149
136
  try {
150
137
  return (await readdir(directory)).filter((name) => name.startsWith("FaceTimeHelper") && name.endsWith(".dylib")).length;
@@ -157,7 +144,7 @@ async function inspectFaceTimeArtifacts() {
157
144
  readable(resolveHelperDylib(), constants.R_OK),
158
145
  readable(resolveHelperStateFile("helper-ipc-key"), constants.R_OK),
159
146
  readable(resolveHelperStateFile("helper-build.sha256"), constants.R_OK),
160
- Promise.all(helperTempDirs.map(countHelpers)).then((counts) => counts.reduce((total, count) => total + count, 0)),
147
+ countHelpers(helperTempDir),
161
148
  readable(resolve(homedir(), "Library", "Caches", "OpenClaw", "FaceTime", "driver", "OpenClawBridge.driver"), constants.R_OK)
162
149
  ]);
163
150
  return {
@@ -181,97 +168,69 @@ async function ensureHelperArtifacts(params) {
181
168
  "--if-needed"
182
169
  ], { timeoutMs: 12e4 });
183
170
  if (result.code !== 0) throw new Error(`FaceTime native helper staging failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
184
- const dylib = resolveHelperDylib();
185
- await access(dylib, constants.R_OK);
171
+ await access(resolveHelperDylib(), constants.R_OK);
186
172
  const ipcKey = (await readFile(resolveHelperStateFile("helper-ipc-key"), "utf8")).trim();
187
173
  const stagedBuildId = (await readFile(resolveHelperStateFile("helper-build.sha256"), "utf8")).trim();
188
174
  if (!/^[\da-f]{64}$/u.test(ipcKey)) throw new Error("FaceTime helper produced an invalid IPC authentication key");
189
175
  if (stagedBuildId !== installation.buildId) throw new Error("Staged FaceTime helper does not match the installed native package");
190
176
  return {
191
177
  buildId: installation.buildId,
192
- dylib,
193
178
  ipcKey
194
179
  };
195
180
  }
181
+ // extensions/facetime/src/command-output.ts
182
+ function firstLine(value) {
183
+ return typeof value === "string" ? value.trim().split(/\r?\n/u)[0] || void 0 : void 0;
184
+ }
196
185
  // extensions/facetime/src/setup.ts
197
186
  const XCODE_APP = "/Applications/Xcode.app";
198
187
  const XCODE_CLANG = `${XCODE_APP}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang`;
199
188
  const XCODE_MACOS_SDK = `${XCODE_APP}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`;
200
- const SETUP_ACTIONS = {
201
- "install-native-package": {
202
- kind: "command",
203
- label: "Install or reinstall the FaceTime native package with Homebrew",
204
- 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"
205
- },
206
- "install-xcode-tools": {
207
- kind: "command",
208
- label: "Install full Xcode in /Applications",
209
- command: "open 'https://apps.apple.com/us/app/xcode/id497799835'"
210
- },
211
- "enable-developer-tools": {
189
+ function commandAction(label, command) {
190
+ return {
212
191
  kind: "command",
213
- label: "Enable developer tools access",
214
- command: "sudo /usr/sbin/DevToolsSecurity -enable"
215
- },
192
+ label,
193
+ command
194
+ };
195
+ }
196
+ function settingsAction(label, settingsPath) {
197
+ return {
198
+ kind: "system-settings",
199
+ label,
200
+ settingsPath
201
+ };
202
+ }
203
+ const SETUP_ACTIONS = {
204
+ "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"),
205
+ "install-xcode-tools": commandAction("Install full Xcode in /Applications", "open 'https://apps.apple.com/us/app/xcode/id497799835'"),
206
+ "enable-developer-tools": commandAction("Enable developer tools access", "sudo /usr/sbin/DevToolsSecurity -enable"),
216
207
  "disable-sip-debugging": {
217
208
  kind: "recovery",
218
209
  label: "Disable SIP debugging restrictions from macOS Recovery, then reboot and rerun setup",
219
210
  command: "csrutil enable --without debug",
220
211
  settingsPath: "macOS Recovery > Utilities > Terminal"
221
212
  },
222
- "verify-sip-status": {
223
- kind: "command",
224
- label: "Verify SIP status, then rerun setup",
225
- command: "/usr/bin/csrutil status"
226
- },
227
- "configure-owner-handles": {
228
- kind: "command",
229
- label: "Configure ownerHandles",
230
- command: "openclaw configure"
231
- },
232
- "restart-gateway": {
233
- kind: "command",
234
- label: "Stop the stale gateway process, then restart OpenClaw",
235
- command: "openclaw gateway restart"
236
- },
213
+ "verify-sip-status": commandAction("Verify SIP status, then rerun setup", "/usr/bin/csrutil status"),
214
+ "configure-owner-handles": commandAction("Configure ownerHandles", "openclaw configure"),
215
+ "restart-gateway": commandAction("Stop the stale gateway process, then restart OpenClaw", "openclaw gateway restart"),
237
216
  "wait-for-helper": {
238
217
  kind: "automatic",
239
218
  label: "Wait for automatic helper injection to finish"
240
219
  },
241
220
  "restart-call-apps": {
242
221
  kind: "manual-test",
243
- label: "Quit and reopen FaceTime and Phone, then let OpenClaw reinject the helper"
222
+ label: "Quit and reopen FaceTime, then let OpenClaw reinject the helper"
244
223
  },
245
224
  "install-driver": {
246
225
  kind: "gateway",
247
226
  label: "Install or update the paired FaceTime audio driver",
248
227
  gatewayMethod: "facetime.installDriver"
249
228
  },
250
- "select-physical-output": {
251
- kind: "system-settings",
252
- label: "Select MacBook Speakers or another physical output",
253
- settingsPath: "System Settings > Sound > Output"
254
- },
255
- "grant-system-audio": {
256
- kind: "system-settings",
257
- label: "Allow OpenClaw to capture FaceTime app audio",
258
- settingsPath: "System Settings > Privacy & Security > Screen & System Audio Recording"
259
- },
260
- "configure-realtime-provider": {
261
- kind: "command",
262
- label: "Configure authentication for a registered realtime voice provider",
263
- command: "openclaw configure"
264
- },
265
- "verify-focus": {
266
- kind: "system-settings",
267
- label: "Verify Focus is off or allows the expected caller",
268
- settingsPath: "Control Center > Focus"
269
- },
270
- "allow-sharing-notifications": {
271
- kind: "system-settings",
272
- label: "Allow notifications while mirroring or sharing the display",
273
- settingsPath: "System Settings > Notifications"
274
- },
229
+ "select-physical-output": settingsAction("Select MacBook Speakers or another physical output", "System Settings > Sound > Output"),
230
+ "grant-system-audio": settingsAction("Allow OpenClaw to capture FaceTime app audio", "System Settings > Privacy & Security > Screen & System Audio Recording"),
231
+ "configure-realtime-provider": commandAction("Configure authentication for a registered realtime voice provider", "openclaw configure"),
232
+ "verify-focus": settingsAction("Verify Focus is off or allows the expected caller", "Control Center > Focus"),
233
+ "allow-sharing-notifications": settingsAction("Allow notifications while mirroring or sharing the display", "System Settings > Notifications"),
275
234
  "live-outbound-test": {
276
235
  kind: "manual-test",
277
236
  label: "Place one outbound FaceTime audio call with facetime.dial",
@@ -281,11 +240,7 @@ const SETUP_ACTIONS = {
281
240
  kind: "manual-test",
282
241
  label: "Run one inbound and one outbound FaceTime audio call"
283
242
  },
284
- "review-live-voicemail": {
285
- kind: "system-settings",
286
- label: "Review Live Voicemail if inbound audio calls are screened",
287
- settingsPath: "Phone > Settings > Live Voicemail"
288
- }
243
+ "review-live-voicemail": settingsAction("Review Live Voicemail if inbound audio calls are screened", "Phone > Settings > Live Voicemail")
289
244
  };
290
245
  const PRECHECK_ACTIONS = {
291
246
  "capture-binary": "install-native-package",
@@ -295,9 +250,6 @@ const PRECHECK_ACTIONS = {
295
250
  "process-tap": "grant-system-audio",
296
251
  "realtime-provider": "configure-realtime-provider"
297
252
  };
298
- function firstLine(value) {
299
- return typeof value === "string" ? value.trim().split(/\r?\n/u)[0] || void 0 : void 0;
300
- }
301
253
  function addPreflightCheck(checks, check) {
302
254
  if (check.id === "call-app-running") return;
303
255
  const actionId = PRECHECK_ACTIONS[check.id];
@@ -424,7 +376,7 @@ async function runFaceTimeSetup(params) {
424
376
  label: "Developer tools access",
425
377
  status: developerSecurityEnabled ? "ready" : "action-required",
426
378
  required: true,
427
- message: developerSecurityEnabled ? developerSecurity.message : "Developer tools access is disabled; helper injection cannot attach to FaceTime or Phone",
379
+ message: developerSecurityEnabled ? developerSecurity.message : "Developer tools access is disabled; helper injection cannot attach to FaceTime",
428
380
  ...!developerSecurityEnabled ? { actionId: "enable-developer-tools" } : {}
429
381
  });
430
382
  const sip = await checkCommand(params.runCommandWithTimeout, ["/usr/bin/csrutil", "status"], (stdout) => stdout.trim());
@@ -436,7 +388,7 @@ async function runFaceTimeSetup(params) {
436
388
  label: "System Integrity Protection debugging restrictions",
437
389
  status: debuggingRestrictionsDisabled ? "ready" : "action-required",
438
390
  required: true,
439
- 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",
391
+ 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",
440
392
  ...!debuggingRestrictionsDisabled ? { actionId: sipActionId } : {}
441
393
  });
442
394
  checks.push({
@@ -470,7 +422,7 @@ async function runFaceTimeSetup(params) {
470
422
  id: `helper-${target.target.toLowerCase()}`,
471
423
  label: `${target.target} helper`,
472
424
  status,
473
- required: target.target === "FaceTime" || target.target === "Phone",
425
+ required: true,
474
426
  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",
475
427
  ...status === "repairing" ? { actionId: "wait-for-helper" } : status === "action-required" ? { actionId: "restart-call-apps" } : {}
476
428
  });
@@ -528,4 +480,4 @@ async function runFaceTimeSetup(params) {
528
480
  actions: [...new Set(checks.flatMap((check) => check.actionId ? [check.actionId] : []))].map((id) => Object.assign({ id }, SETUP_ACTIONS[id]))
529
481
  };
530
482
  }
531
- 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 };
483
+ 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 };
@@ -1 +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-C3uKLO8_.mjs","sha256":"9fb990ef634242a34db5065ea6631029fd23b01242783d33cf701fd19ad08f14","facadeSource":null,"sources":["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":"c7a8b2f5905715f132439189cfca5c14a3158628998594e98525ca3d0adda557","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":"e7a27b28afc7038904569742cb34ddeb9cf8fa78d4560777e40b3c3666f7c5af","facadeSource":"extensions/facetime/index.ts","sources":["extensions/facetime/index.ts","extensions/facetime/src/runtime-lifecycle.ts","extensions/facetime/src/static-status.ts","extensions/facetime/src/tool.ts"]},{"output":"runtime-api.js","sha256":"892230da0cf3d27a3a0a7ff04b62a022136a9e06c1297e4a0dda7557a5c8484f","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/call-lifecycle.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","extensions/facetime/src/talk-initial-greeting.ts"]}],"unrenderedSources":["extensions/facetime/runtime-api.ts"]}
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-ByISvnBj.mjs","sha256":"09e732d794b64a6dbcf8759386d4ff4cf65055e396f9ca80d103e1d72fe224c2","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":"c7a8b2f5905715f132439189cfca5c14a3158628998594e98525ca3d0adda557","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":"34c68c8f7c65e4136199e5e083569fec5812521076b3d5439f8b730bf499997c","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":"1df4f8342fac09b405b3f8cf6d99d84c7403e188d693eff034f870c4af99197f","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-C3uKLO8_.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-ByISvnBj.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,19 +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
- // 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
9
  // extensions/facetime/src/static-status.ts
23
10
  async function inspectFaceTimeStaticStatus(params) {
24
11
  const [artifacts, driver] = await Promise.all([inspectFaceTimeArtifacts(), inspectFaceTimeDriver(params).then((status) => ({ status }), (error) => ({ error: formatErrorMessage(error) }))]);
@@ -161,9 +148,7 @@ const faceTimePlugin = definePluginEntry({
161
148
  id: "facetime",
162
149
  name: "FaceTime",
163
150
  description: "Experimental private FaceTime realtime voice carrier for OpenClaw agents",
164
- configSchema: { parse(value) {
165
- return resolveFaceTimeConfig(value);
166
- } },
151
+ configSchema: { parse: resolveFaceTimeConfig },
167
152
  register(api) {
168
153
  const config = resolveFaceTimeConfig(api.pluginConfig);
169
154
  const validation = validateFaceTimeConfig(config);
@@ -198,9 +183,12 @@ const faceTimePlugin = definePluginEntry({
198
183
  runCommandWithTimeout: api.runtime.system.runCommandWithTimeout
199
184
  });
200
185
  };
201
- const stopRuntime = () => stopRetainedRuntime(runtimePromise, (stopped) => {
202
- if (runtimePromise === stopped) runtimePromise = void 0;
203
- });
186
+ const stopRuntime = async () => {
187
+ const current = runtimePromise;
188
+ if (!current) return;
189
+ await (await current).stop();
190
+ if (runtimePromise === current) runtimePromise = void 0;
191
+ };
204
192
  api.registerTool(() => createFaceTimeCallTool({
205
193
  ensureRuntime,
206
194
  getStatus
@@ -273,7 +261,7 @@ const faceTimePlugin = definePluginEntry({
273
261
  });
274
262
  return {
275
263
  ok: true,
276
- guidance: "Quit and reopen FaceTime and Phone before re-enabling this plugin."
264
+ guidance: "Quit and reopen FaceTime before re-enabling this plugin."
277
265
  };
278
266
  } finally {
279
267
  uninstalling = false;