@openclaw/facetime 2026.10.1-beta.2 → 2026.10.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.
@@ -67,7 +67,6 @@ async function inspectFaceTimeDriver(params) {
67
67
  return readDriverStatus(result.stdout);
68
68
  }
69
69
  async function installFaceTimeDriver(params) {
70
- if (params.callActive) throw new Error("Cannot install the FaceTime audio driver during an active or pending call");
71
70
  if (await inspectFaceTimeDriver(params) === "current") return {
72
71
  changed: false,
73
72
  status: "current"
@@ -112,9 +111,7 @@ function resolveHelperDylib() {
112
111
  function resolveHelperStateFile(name) {
113
112
  return resolve(homedir(), "Library", "Application Support", "OpenClaw", "FaceTime", name);
114
113
  }
115
- async function resolveNativeInstall(params) {
116
- const checkAccess = params.access ?? access;
117
- const loadFile = params.readFile ?? readFile;
114
+ async function resolveNativeInstall() {
118
115
  for (const directory of NATIVE_DIRS) {
119
116
  const capture = resolve(directory, "facetime-audio-capture");
120
117
  const helper = resolve(directory, "FaceTimeHelper.dylib");
@@ -122,31 +119,28 @@ async function resolveNativeInstall(params) {
122
119
  const protocolFile = resolve(directory, "native-protocol.env");
123
120
  try {
124
121
  await Promise.all([
125
- checkAccess(capture, constants.X_OK),
126
- checkAccess(helper, constants.R_OK),
127
- checkAccess(buildIdFile, constants.R_OK),
128
- checkAccess(protocolFile, constants.R_OK)
122
+ access(capture, constants.X_OK),
123
+ access(helper, constants.R_OK),
124
+ access(buildIdFile, constants.R_OK),
125
+ access(protocolFile, constants.R_OK)
129
126
  ]);
130
- const [buildId, protocol] = await Promise.all([loadFile(buildIdFile, "utf8").then((value) => value.trim()), loadFile(protocolFile, "utf8").then((value) => value.trim())]);
127
+ const [buildId, protocol] = await Promise.all([readFile(buildIdFile, "utf8").then((value) => value.trim()), readFile(protocolFile, "utf8").then((value) => value.trim())]);
131
128
  if (!/^[\da-f]{64}$/u.test(buildId) || protocol !== NATIVE_PROTOCOL) continue;
132
129
  return {
133
130
  buildId,
134
- capture,
135
- directory,
136
- helper
131
+ capture
137
132
  };
138
133
  } catch {}
139
134
  }
140
135
  throw new Error(`Compatible FaceTime native helpers are not installed. Run: ${INSTALL_COMMAND}`);
141
136
  }
142
- async function inspectFaceTimeNativePackage(params = {}) {
143
- return await resolveNativeInstall(params).then(() => true, () => false);
137
+ async function inspectFaceTimeNativePackage() {
138
+ return await resolveNativeInstall().then(() => true, () => false);
144
139
  }
145
- async function inspectFaceTimeArtifacts(params) {
146
- const checkAccess = params.access ?? access;
140
+ async function inspectFaceTimeArtifacts() {
147
141
  const readable = async (file, mode) => {
148
142
  try {
149
- await checkAccess(file, mode);
143
+ await access(file, mode);
150
144
  return true;
151
145
  } catch {
152
146
  return false;
@@ -161,7 +155,7 @@ async function inspectFaceTimeArtifacts(params) {
161
155
  }
162
156
  };
163
157
  const [nativeInstall, stagedHelper, helperKey, helperBuildStamp, stagedHelperDylibs, cachedDriver] = await Promise.all([
164
- inspectFaceTimeNativePackage(params),
158
+ inspectFaceTimeNativePackage(),
165
159
  readable(resolveHelperDylib(), constants.R_OK),
166
160
  readable(resolveHelperStateFile("helper-ipc-key"), constants.R_OK),
167
161
  readable(resolveHelperStateFile("helper-build.sha256"), constants.R_OK),
@@ -177,11 +171,11 @@ async function inspectFaceTimeArtifacts(params) {
177
171
  cachedDriver
178
172
  };
179
173
  }
180
- async function ensureCaptureBinary(params = {}) {
181
- return (await resolveNativeInstall(params)).capture;
174
+ async function ensureCaptureBinary() {
175
+ return (await resolveNativeInstall()).capture;
182
176
  }
183
177
  async function ensureHelperArtifacts(params) {
184
- const installation = await resolveNativeInstall(params);
178
+ const installation = await resolveNativeInstall();
185
179
  const stageScript = resolve(params.pluginRoot, "scripts", "stage-helper.sh");
186
180
  const result = await params.runCommandWithTimeout([
187
181
  "/bin/bash",
@@ -189,12 +183,10 @@ async function ensureHelperArtifacts(params) {
189
183
  "--if-needed"
190
184
  ], { timeoutMs: 12e4 });
191
185
  if (result.code !== 0) throw new Error(`FaceTime native helper staging failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
192
- const checkAccess = params.access ?? access;
193
- const loadFile = params.readFile ?? readFile;
194
186
  const dylib = resolveHelperDylib();
195
- await checkAccess(dylib, constants.R_OK);
196
- const ipcKey = (await loadFile(resolveHelperStateFile("helper-ipc-key"), "utf8")).trim();
197
- const stagedBuildId = (await loadFile(resolveHelperStateFile("helper-build.sha256"), "utf8")).trim();
187
+ await access(dylib, constants.R_OK);
188
+ const ipcKey = (await readFile(resolveHelperStateFile("helper-ipc-key"), "utf8")).trim();
189
+ const stagedBuildId = (await readFile(resolveHelperStateFile("helper-build.sha256"), "utf8")).trim();
198
190
  if (!/^[\da-f]{64}$/u.test(ipcKey)) throw new Error("FaceTime helper produced an invalid IPC authentication key");
199
191
  if (stagedBuildId !== installation.buildId) throw new Error("Staged FaceTime helper does not match the installed native package");
200
192
  return {
@@ -332,10 +324,9 @@ function hasActiveFocusAssertion(raw) {
332
324
  };
333
325
  return visit(parsed);
334
326
  }
335
- async function checkFocusMode(params) {
336
- const readAssertions = params.readAssertionsFile ?? (() => readFile(resolve(homedir(), "Library/DoNotDisturb/DB/Assertions.json"), "utf8"));
327
+ async function checkFocusMode() {
337
328
  try {
338
- const active = hasActiveFocusAssertion(await readAssertions());
329
+ const active = hasActiveFocusAssertion(await readFile(resolve(homedir(), "Library/DoNotDisturb/DB/Assertions.json"), "utf8"));
339
330
  return {
340
331
  id: "focus-mode",
341
332
  label: "Focus mode",
@@ -514,7 +505,7 @@ async function runFaceTimeSetup(params) {
514
505
  addPreflightCheck(checks, check);
515
506
  }
516
507
  }
517
- checks.push(await checkFocusMode(params));
508
+ checks.push(await checkFocusMode());
518
509
  checks.push(await checkNotificationsDuringSharing(params.runCommandWithTimeout));
519
510
  checks.push({
520
511
  id: "facetime-sign-in",
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-zO6FazjC.mjs";
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-DpCR3Ga3.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";
@@ -22,7 +22,7 @@ async function stopRetainedRuntime(current, clearIfCurrent) {
22
22
  //#endregion
23
23
  //#region extensions/facetime/src/static-status.ts
24
24
  async function inspectFaceTimeStaticStatus(params) {
25
- const [artifacts, driver] = await Promise.all([inspectFaceTimeArtifacts({}), inspectFaceTimeDriver(params).then((status) => ({ status }), (error) => ({ error: formatErrorMessage(error) }))]);
25
+ const [artifacts, driver] = await Promise.all([inspectFaceTimeArtifacts(), inspectFaceTimeDriver(params).then((status) => ({ status }), (error) => ({ error: formatErrorMessage(error) }))]);
26
26
  return {
27
27
  enabled: params.config.enabled,
28
28
  activation: "inactive",