@openclaw/facetime 2026.10.10-beta.5 → 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.
- package/dist/.setup/{setup-DMPG615Z.mjs → setup-ByISvnBj.mjs} +55 -107
- package/dist/.source-module-urls/38481bccca5fbb406e50ac928748f9f04f5a6cf5623980901b3cebc6ee82dfb6.json +1 -1
- package/dist/doctor-contract-api.js +6 -12
- package/dist/index.js +12 -28
- package/dist/runtime-api.js +245 -380
- package/docs/phase1-verification.md +1 -1
- package/index.ts +13 -20
- package/node_modules/typebox/build/format/duration.d.mts +2 -2
- package/node_modules/typebox/build/format/duration.mjs +2 -2
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_email.mjs +1 -0
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
- package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
- package/node_modules/typebox/build/format/ipv4.mjs +2 -2
- package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
- package/node_modules/typebox/build/format/ipv6.mjs +1 -1
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/schema/build.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
- package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
- package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
- package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
- package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
- package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
- package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
- package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
- package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
- package/node_modules/typebox/build/system/memory/create.mjs +18 -13
- package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
- package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
- package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
- package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
- package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
- package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
- package/node_modules/typebox/build/system/memory/update.mjs +43 -16
- package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
- package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
- package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
- package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
- package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
- package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +1 -1
- package/package.json +5 -6
- package/scripts/inject-helper-terminal.sh +1 -1
- package/scripts/inject-helper.sh +3 -7
- package/scripts/install-driver.sh +1 -1
- package/src/audio-pump.ts +5 -13
- package/src/command-output.ts +3 -0
- package/src/driver-setup.ts +15 -23
- package/src/helper-results.ts +31 -37
- package/src/helper-rpc.ts +55 -68
- package/src/helper-supervisor.ts +20 -28
- package/src/outbound-call.ts +2 -13
- package/src/plugin-paths.ts +13 -23
- package/src/preflight.ts +10 -33
- package/src/runtime-call-control.ts +11 -23
- package/src/runtime-call-events.ts +10 -7
- package/src/runtime-carrier-process.ts +1 -5
- package/src/runtime-helper-results.ts +5 -38
- package/src/runtime-state.ts +178 -10
- package/src/runtime-status.ts +2 -3
- package/src/runtime.ts +5 -7
- package/src/setup.ts +58 -69
- package/src/talk-consult-controller.ts +1 -19
- package/src/talk-driver.ts +31 -25
- package/src/talk-events-summary.ts +8 -19
- package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
- package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
- package/src/call-lifecycle.ts +0 -171
- package/src/runtime-lifecycle.ts +0 -17
- package/src/talk-initial-greeting.ts +0 -42
|
@@ -5,7 +5,7 @@ import { resolve } from "node:path";
|
|
|
5
5
|
import { constants } from "node:fs";
|
|
6
6
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
7
7
|
import { homedir } from "node:os";
|
|
8
|
-
|
|
8
|
+
// extensions/facetime/src/config.ts
|
|
9
9
|
const DEFAULT_INSTRUCTIONS = ["You are the realtime voice surface for the configured OpenClaw agent during a private 1:1 FaceTime call.", "Keep replies concise, natural, and useful for a hands-free voice conversation."].join(" ");
|
|
10
10
|
function resolveRealtimeVoiceAgentConsultToolPolicy(value) {
|
|
11
11
|
if (value === void 0) return "owner";
|
|
@@ -49,8 +49,7 @@ function validateFaceTimeConfig(config) {
|
|
|
49
49
|
errors
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
//#region extensions/facetime/src/driver-setup.ts
|
|
52
|
+
// extensions/facetime/src/driver-setup.ts
|
|
54
53
|
function readDriverStatus(output) {
|
|
55
54
|
const status = output.trim();
|
|
56
55
|
if (status === "current" || status === "invalid" || status === "missing" || status === "outdated") return status;
|
|
@@ -66,42 +65,33 @@ async function inspectFaceTimeDriver(params) {
|
|
|
66
65
|
if (result.code !== 0) throw new Error(result.stderr || result.stdout || `driver status exited ${result.code}`);
|
|
67
66
|
return readDriverStatus(result.stdout);
|
|
68
67
|
}
|
|
69
|
-
async function
|
|
70
|
-
if (await inspectFaceTimeDriver(params) === "current") return {
|
|
71
|
-
changed: false,
|
|
72
|
-
status: "current"
|
|
73
|
-
};
|
|
68
|
+
async function runDriverSetup(params, action) {
|
|
74
69
|
const script = resolve(params.pluginRoot, "scripts", "install-driver.sh");
|
|
75
70
|
const result = await params.runCommandWithTimeout([
|
|
76
71
|
"/bin/sh",
|
|
77
72
|
script,
|
|
78
|
-
|
|
73
|
+
`--${action}`
|
|
79
74
|
], {
|
|
80
75
|
killProcessTree: true,
|
|
81
76
|
...params.signal ? { signal: params.signal } : {}
|
|
82
77
|
});
|
|
83
|
-
if (result.code !== 0) throw new Error(`FaceTime audio driver installation failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
|
|
84
|
-
|
|
85
|
-
|
|
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");
|
|
86
86
|
return {
|
|
87
87
|
changed: true,
|
|
88
|
-
status:
|
|
88
|
+
status: "current"
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
async function uninstallFaceTimeDriver(params) {
|
|
92
|
-
|
|
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}`}`);
|
|
92
|
+
await runDriverSetup(params, "uninstall");
|
|
102
93
|
}
|
|
103
|
-
|
|
104
|
-
//#region extensions/facetime/src/plugin-paths.ts
|
|
94
|
+
// extensions/facetime/src/plugin-paths.ts
|
|
105
95
|
const NATIVE_PROTOCOL = "NATIVE_PROTOCOL_VERSION=1";
|
|
106
96
|
const NATIVE_DIRS = ["/opt/homebrew/opt/openclaw-facetime/libexec", "/usr/local/opt/openclaw-facetime/libexec"];
|
|
107
97
|
const INSTALL_COMMAND = "brew install openclaw/tap/openclaw-facetime";
|
|
@@ -118,12 +108,7 @@ async function resolveNativeInstall() {
|
|
|
118
108
|
const buildIdFile = resolve(directory, "FaceTimeHelper.build-id");
|
|
119
109
|
const protocolFile = resolve(directory, "native-protocol.env");
|
|
120
110
|
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
|
-
]);
|
|
111
|
+
await Promise.all([access(capture, constants.X_OK), access(helper, constants.R_OK)]);
|
|
127
112
|
const [buildId, protocol] = await Promise.all([readFile(buildIdFile, "utf8").then((value) => value.trim()), readFile(protocolFile, "utf8").then((value) => value.trim())]);
|
|
128
113
|
if (!/^[\da-f]{64}$/u.test(buildId) || protocol !== NATIVE_PROTOCOL) continue;
|
|
129
114
|
return {
|
|
@@ -146,7 +131,7 @@ async function inspectFaceTimeArtifacts() {
|
|
|
146
131
|
return false;
|
|
147
132
|
}
|
|
148
133
|
};
|
|
149
|
-
const
|
|
134
|
+
const helperTempDir = resolve(homedir(), "Library", "Containers", "com.apple.FaceTime", "Data", "tmp");
|
|
150
135
|
const countHelpers = async (directory) => {
|
|
151
136
|
try {
|
|
152
137
|
return (await readdir(directory)).filter((name) => name.startsWith("FaceTimeHelper") && name.endsWith(".dylib")).length;
|
|
@@ -159,7 +144,7 @@ async function inspectFaceTimeArtifacts() {
|
|
|
159
144
|
readable(resolveHelperDylib(), constants.R_OK),
|
|
160
145
|
readable(resolveHelperStateFile("helper-ipc-key"), constants.R_OK),
|
|
161
146
|
readable(resolveHelperStateFile("helper-build.sha256"), constants.R_OK),
|
|
162
|
-
|
|
147
|
+
countHelpers(helperTempDir),
|
|
163
148
|
readable(resolve(homedir(), "Library", "Caches", "OpenClaw", "FaceTime", "driver", "OpenClawBridge.driver"), constants.R_OK)
|
|
164
149
|
]);
|
|
165
150
|
return {
|
|
@@ -183,98 +168,69 @@ async function ensureHelperArtifacts(params) {
|
|
|
183
168
|
"--if-needed"
|
|
184
169
|
], { timeoutMs: 12e4 });
|
|
185
170
|
if (result.code !== 0) throw new Error(`FaceTime native helper staging failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
|
|
186
|
-
|
|
187
|
-
await access(dylib, constants.R_OK);
|
|
171
|
+
await access(resolveHelperDylib(), constants.R_OK);
|
|
188
172
|
const ipcKey = (await readFile(resolveHelperStateFile("helper-ipc-key"), "utf8")).trim();
|
|
189
173
|
const stagedBuildId = (await readFile(resolveHelperStateFile("helper-build.sha256"), "utf8")).trim();
|
|
190
174
|
if (!/^[\da-f]{64}$/u.test(ipcKey)) throw new Error("FaceTime helper produced an invalid IPC authentication key");
|
|
191
175
|
if (stagedBuildId !== installation.buildId) throw new Error("Staged FaceTime helper does not match the installed native package");
|
|
192
176
|
return {
|
|
193
177
|
buildId: installation.buildId,
|
|
194
|
-
dylib,
|
|
195
178
|
ipcKey
|
|
196
179
|
};
|
|
197
180
|
}
|
|
198
|
-
|
|
199
|
-
|
|
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
|
+
}
|
|
185
|
+
// extensions/facetime/src/setup.ts
|
|
200
186
|
const XCODE_APP = "/Applications/Xcode.app";
|
|
201
187
|
const XCODE_CLANG = `${XCODE_APP}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang`;
|
|
202
188
|
const XCODE_MACOS_SDK = `${XCODE_APP}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`;
|
|
203
|
-
|
|
204
|
-
|
|
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": {
|
|
189
|
+
function commandAction(label, command) {
|
|
190
|
+
return {
|
|
215
191
|
kind: "command",
|
|
216
|
-
label
|
|
217
|
-
command
|
|
218
|
-
}
|
|
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"),
|
|
219
207
|
"disable-sip-debugging": {
|
|
220
208
|
kind: "recovery",
|
|
221
209
|
label: "Disable SIP debugging restrictions from macOS Recovery, then reboot and rerun setup",
|
|
222
210
|
command: "csrutil enable --without debug",
|
|
223
211
|
settingsPath: "macOS Recovery > Utilities > Terminal"
|
|
224
212
|
},
|
|
225
|
-
"verify-sip-status":
|
|
226
|
-
|
|
227
|
-
|
|
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
|
-
},
|
|
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"),
|
|
240
216
|
"wait-for-helper": {
|
|
241
217
|
kind: "automatic",
|
|
242
218
|
label: "Wait for automatic helper injection to finish"
|
|
243
219
|
},
|
|
244
220
|
"restart-call-apps": {
|
|
245
221
|
kind: "manual-test",
|
|
246
|
-
label: "Quit and reopen FaceTime
|
|
222
|
+
label: "Quit and reopen FaceTime, then let OpenClaw reinject the helper"
|
|
247
223
|
},
|
|
248
224
|
"install-driver": {
|
|
249
225
|
kind: "gateway",
|
|
250
226
|
label: "Install or update the paired FaceTime audio driver",
|
|
251
227
|
gatewayMethod: "facetime.installDriver"
|
|
252
228
|
},
|
|
253
|
-
"select-physical-output":
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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
|
-
},
|
|
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"),
|
|
278
234
|
"live-outbound-test": {
|
|
279
235
|
kind: "manual-test",
|
|
280
236
|
label: "Place one outbound FaceTime audio call with facetime.dial",
|
|
@@ -284,11 +240,7 @@ const SETUP_ACTIONS = {
|
|
|
284
240
|
kind: "manual-test",
|
|
285
241
|
label: "Run one inbound and one outbound FaceTime audio call"
|
|
286
242
|
},
|
|
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
|
-
}
|
|
243
|
+
"review-live-voicemail": settingsAction("Review Live Voicemail if inbound audio calls are screened", "Phone > Settings > Live Voicemail")
|
|
292
244
|
};
|
|
293
245
|
const PRECHECK_ACTIONS = {
|
|
294
246
|
"capture-binary": "install-native-package",
|
|
@@ -298,9 +250,6 @@ const PRECHECK_ACTIONS = {
|
|
|
298
250
|
"process-tap": "grant-system-audio",
|
|
299
251
|
"realtime-provider": "configure-realtime-provider"
|
|
300
252
|
};
|
|
301
|
-
function firstLine(value) {
|
|
302
|
-
return typeof value === "string" ? value.trim().split(/\r?\n/u)[0] || void 0 : void 0;
|
|
303
|
-
}
|
|
304
253
|
function addPreflightCheck(checks, check) {
|
|
305
254
|
if (check.id === "call-app-running") return;
|
|
306
255
|
const actionId = PRECHECK_ACTIONS[check.id];
|
|
@@ -427,7 +376,7 @@ async function runFaceTimeSetup(params) {
|
|
|
427
376
|
label: "Developer tools access",
|
|
428
377
|
status: developerSecurityEnabled ? "ready" : "action-required",
|
|
429
378
|
required: true,
|
|
430
|
-
message: developerSecurityEnabled ? developerSecurity.message : "Developer tools access is disabled; helper injection cannot attach to FaceTime
|
|
379
|
+
message: developerSecurityEnabled ? developerSecurity.message : "Developer tools access is disabled; helper injection cannot attach to FaceTime",
|
|
431
380
|
...!developerSecurityEnabled ? { actionId: "enable-developer-tools" } : {}
|
|
432
381
|
});
|
|
433
382
|
const sip = await checkCommand(params.runCommandWithTimeout, ["/usr/bin/csrutil", "status"], (stdout) => stdout.trim());
|
|
@@ -439,7 +388,7 @@ async function runFaceTimeSetup(params) {
|
|
|
439
388
|
label: "System Integrity Protection debugging restrictions",
|
|
440
389
|
status: debuggingRestrictionsDisabled ? "ready" : "action-required",
|
|
441
390
|
required: true,
|
|
442
|
-
message: debuggingRestrictionsDisabled ? "SIP permits debugger attachment to FaceTime
|
|
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",
|
|
443
392
|
...!debuggingRestrictionsDisabled ? { actionId: sipActionId } : {}
|
|
444
393
|
});
|
|
445
394
|
checks.push({
|
|
@@ -473,7 +422,7 @@ async function runFaceTimeSetup(params) {
|
|
|
473
422
|
id: `helper-${target.target.toLowerCase()}`,
|
|
474
423
|
label: `${target.target} helper`,
|
|
475
424
|
status,
|
|
476
|
-
required:
|
|
425
|
+
required: true,
|
|
477
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",
|
|
478
427
|
...status === "repairing" ? { actionId: "wait-for-helper" } : status === "action-required" ? { actionId: "restart-call-apps" } : {}
|
|
479
428
|
});
|
|
@@ -531,5 +480,4 @@ async function runFaceTimeSetup(params) {
|
|
|
531
480
|
actions: [...new Set(checks.flatMap((check) => check.actionId ? [check.actionId] : []))].map((id) => Object.assign({ id }, SETUP_ACTIONS[id]))
|
|
532
481
|
};
|
|
533
482
|
}
|
|
534
|
-
|
|
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 };
|
|
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-
|
|
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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,8 +24,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
-
|
|
28
|
-
//#region packages/normalization-core/src/record-coerce.ts
|
|
27
|
+
// packages/normalization-core/src/record-coerce.ts
|
|
29
28
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
30
29
|
function isRecord(value) {
|
|
31
30
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -34,8 +33,7 @@ function isRecord(value) {
|
|
|
34
33
|
function asNullableRecord(value) {
|
|
35
34
|
return isRecord(value) ? value : null;
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
//#region src/config/channel-config-normalization.ts
|
|
36
|
+
// src/config/channel-config-normalization.ts
|
|
39
37
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
40
38
|
function normalizeChannelAccounts(params) {
|
|
41
39
|
const rawAccounts = asNullableRecord(params.entry.accounts);
|
|
@@ -111,8 +109,7 @@ function normalizeChannelConfigEntries(params) {
|
|
|
111
109
|
changes
|
|
112
110
|
};
|
|
113
111
|
}
|
|
114
|
-
|
|
115
|
-
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
112
|
+
// src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
116
113
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
117
114
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
118
115
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -182,13 +179,11 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
182
179
|
}
|
|
183
180
|
};
|
|
184
181
|
}
|
|
185
|
-
|
|
186
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
182
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
187
183
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
188
184
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
189
185
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
190
|
-
|
|
191
|
-
//#region extensions/facetime/doctor-contract-api.ts
|
|
186
|
+
// extensions/facetime/doctor-contract-api.ts
|
|
192
187
|
const CONFIG_PATH = [
|
|
193
188
|
"plugins",
|
|
194
189
|
"entries",
|
|
@@ -269,5 +264,4 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
269
264
|
changes
|
|
270
265
|
};
|
|
271
266
|
}
|
|
272
|
-
//#endregion
|
|
273
267
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
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,21 +6,7 @@ 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
|
-
|
|
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
|
-
//#region extensions/facetime/src/static-status.ts
|
|
9
|
+
// 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) }))]);
|
|
26
12
|
return {
|
|
@@ -34,8 +20,7 @@ async function inspectFaceTimeStaticStatus(params) {
|
|
|
34
20
|
note: "Static inspection only; helper, carrier, model media, and remote audibility were not activated or tested."
|
|
35
21
|
};
|
|
36
22
|
}
|
|
37
|
-
|
|
38
|
-
//#region extensions/facetime/src/tool.ts
|
|
23
|
+
// extensions/facetime/src/tool.ts
|
|
39
24
|
const FaceTimeCallToolSchema = Type.Object({
|
|
40
25
|
action: stringEnum([
|
|
41
26
|
"get_status",
|
|
@@ -158,15 +143,12 @@ function createFaceTimeCallTool(params) {
|
|
|
158
143
|
}
|
|
159
144
|
};
|
|
160
145
|
}
|
|
161
|
-
|
|
162
|
-
//#region extensions/facetime/index.ts
|
|
146
|
+
// extensions/facetime/index.ts
|
|
163
147
|
const faceTimePlugin = definePluginEntry({
|
|
164
148
|
id: "facetime",
|
|
165
149
|
name: "FaceTime",
|
|
166
150
|
description: "Experimental private FaceTime realtime voice carrier for OpenClaw agents",
|
|
167
|
-
configSchema: { parse
|
|
168
|
-
return resolveFaceTimeConfig(value);
|
|
169
|
-
} },
|
|
151
|
+
configSchema: { parse: resolveFaceTimeConfig },
|
|
170
152
|
register(api) {
|
|
171
153
|
const config = resolveFaceTimeConfig(api.pluginConfig);
|
|
172
154
|
const validation = validateFaceTimeConfig(config);
|
|
@@ -201,9 +183,12 @@ const faceTimePlugin = definePluginEntry({
|
|
|
201
183
|
runCommandWithTimeout: api.runtime.system.runCommandWithTimeout
|
|
202
184
|
});
|
|
203
185
|
};
|
|
204
|
-
const stopRuntime =
|
|
205
|
-
|
|
206
|
-
|
|
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
|
+
};
|
|
207
192
|
api.registerTool(() => createFaceTimeCallTool({
|
|
208
193
|
ensureRuntime,
|
|
209
194
|
getStatus
|
|
@@ -276,7 +261,7 @@ const faceTimePlugin = definePluginEntry({
|
|
|
276
261
|
});
|
|
277
262
|
return {
|
|
278
263
|
ok: true,
|
|
279
|
-
guidance: "Quit and reopen FaceTime
|
|
264
|
+
guidance: "Quit and reopen FaceTime before re-enabling this plugin."
|
|
280
265
|
};
|
|
281
266
|
} finally {
|
|
282
267
|
uninstalling = false;
|
|
@@ -304,5 +289,4 @@ const faceTimePlugin = definePluginEntry({
|
|
|
304
289
|
});
|
|
305
290
|
}
|
|
306
291
|
});
|
|
307
|
-
//#endregion
|
|
308
292
|
export { faceTimePlugin as default };
|