@openclaw/facetime 2026.10.10-beta.4 → 2026.10.10
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-C3uKLO8_.mjs} +4 -8
- package/dist/.source-module-urls/38481bccca5fbb406e50ac928748f9f04f5a6cf5623980901b3cebc6ee82dfb6.json +1 -1
- package/dist/doctor-contract-api.js +6 -12
- package/dist/index.js +5 -9
- package/dist/runtime-api.js +27 -49
- package/package.json +4 -4
- package/src/call-events.ts +4 -1
|
@@ -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;
|
|
@@ -100,8 +99,7 @@ async function uninstallFaceTimeDriver(params) {
|
|
|
100
99
|
});
|
|
101
100
|
if (result.code !== 0) throw new Error(`FaceTime uninstall failed: ${result.stderr || result.stdout || `exit ${result.code}`}`);
|
|
102
101
|
}
|
|
103
|
-
|
|
104
|
-
//#region extensions/facetime/src/plugin-paths.ts
|
|
102
|
+
// extensions/facetime/src/plugin-paths.ts
|
|
105
103
|
const NATIVE_PROTOCOL = "NATIVE_PROTOCOL_VERSION=1";
|
|
106
104
|
const NATIVE_DIRS = ["/opt/homebrew/opt/openclaw-facetime/libexec", "/usr/local/opt/openclaw-facetime/libexec"];
|
|
107
105
|
const INSTALL_COMMAND = "brew install openclaw/tap/openclaw-facetime";
|
|
@@ -195,8 +193,7 @@ async function ensureHelperArtifacts(params) {
|
|
|
195
193
|
ipcKey
|
|
196
194
|
};
|
|
197
195
|
}
|
|
198
|
-
|
|
199
|
-
//#region extensions/facetime/src/setup.ts
|
|
196
|
+
// extensions/facetime/src/setup.ts
|
|
200
197
|
const XCODE_APP = "/Applications/Xcode.app";
|
|
201
198
|
const XCODE_CLANG = `${XCODE_APP}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang`;
|
|
202
199
|
const XCODE_MACOS_SDK = `${XCODE_APP}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`;
|
|
@@ -531,5 +528,4 @@ async function runFaceTimeSetup(params) {
|
|
|
531
528
|
actions: [...new Set(checks.flatMap((check) => check.actionId ? [check.actionId] : []))].map((id) => Object.assign({ id }, SETUP_ACTIONS[id]))
|
|
532
529
|
};
|
|
533
530
|
}
|
|
534
|
-
//#endregion
|
|
535
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 };
|
|
@@ -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-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,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 inspectFaceTimeNativePackage, c as uninstallFaceTimeDriver, i as inspectFaceTimeArtifacts, l as resolveFaceTimeConfig, o as inspectFaceTimeDriver, t as runFaceTimeSetup, u as validateFaceTimeConfig } from "./.setup/setup-
|
|
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";
|
|
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,7 +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
|
-
|
|
9
|
+
// extensions/facetime/src/runtime-lifecycle.ts
|
|
10
10
|
async function stopRetainedRuntime(current, clearIfCurrent) {
|
|
11
11
|
if (!current) return;
|
|
12
12
|
let runtime;
|
|
@@ -19,8 +19,7 @@ async function stopRetainedRuntime(current, clearIfCurrent) {
|
|
|
19
19
|
await runtime.stop();
|
|
20
20
|
clearIfCurrent(current);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
//#region extensions/facetime/src/static-status.ts
|
|
22
|
+
// extensions/facetime/src/static-status.ts
|
|
24
23
|
async function inspectFaceTimeStaticStatus(params) {
|
|
25
24
|
const [artifacts, driver] = await Promise.all([inspectFaceTimeArtifacts(), inspectFaceTimeDriver(params).then((status) => ({ status }), (error) => ({ error: formatErrorMessage(error) }))]);
|
|
26
25
|
return {
|
|
@@ -34,8 +33,7 @@ async function inspectFaceTimeStaticStatus(params) {
|
|
|
34
33
|
note: "Static inspection only; helper, carrier, model media, and remote audibility were not activated or tested."
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
//#region extensions/facetime/src/tool.ts
|
|
36
|
+
// extensions/facetime/src/tool.ts
|
|
39
37
|
const FaceTimeCallToolSchema = Type.Object({
|
|
40
38
|
action: stringEnum([
|
|
41
39
|
"get_status",
|
|
@@ -158,8 +156,7 @@ function createFaceTimeCallTool(params) {
|
|
|
158
156
|
}
|
|
159
157
|
};
|
|
160
158
|
}
|
|
161
|
-
|
|
162
|
-
//#region extensions/facetime/index.ts
|
|
159
|
+
// extensions/facetime/index.ts
|
|
163
160
|
const faceTimePlugin = definePluginEntry({
|
|
164
161
|
id: "facetime",
|
|
165
162
|
name: "FaceTime",
|
|
@@ -304,5 +301,4 @@ const faceTimePlugin = definePluginEntry({
|
|
|
304
301
|
});
|
|
305
302
|
}
|
|
306
303
|
});
|
|
307
|
-
//#endregion
|
|
308
304
|
export { faceTimePlugin as default };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as resolveFaceTimeConfig, n as ensureCaptureBinary, r as ensureHelperArtifacts, s as installFaceTimeDriver, t as runFaceTimeSetup, u as validateFaceTimeConfig } from "./.setup/setup-
|
|
1
|
+
import { l as resolveFaceTimeConfig, n as ensureCaptureBinary, r as ensureHelperArtifacts, s as installFaceTimeDriver, t as runFaceTimeSetup, u as validateFaceTimeConfig } from "./.setup/setup-C3uKLO8_.mjs";
|
|
2
2
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
3
3
|
import { REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME, REALTIME_VOICE_AUDIO_FORMAT_PCM16_24KHZ, buildRealtimeVoiceAgentCancelProviderResult, buildRealtimeVoiceAgentConsultPolicyInstructions, buildRealtimeVoiceAgentConsultWorkingResponse, consultRealtimeVoiceAgent, createRealtimeVoiceBridgeSession, createTalkSessionController, getRealtimeVoiceProvider, recordRealtimeVoiceTranscript, recordTalkObservabilityEvent, resolveConfiguredRealtimeVoiceProviderAsync, resolveRealtimeVoiceAgentConsultTools, resolveRealtimeVoiceAgentConsultToolsAllow } from "openclaw/plugin-sdk/realtime-voice";
|
|
4
4
|
import { asBoolean, asFiniteNumber, asRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -15,12 +15,13 @@ import { parseAgentSessionKey, resolveAgentIdFromSessionKey } from "openclaw/plu
|
|
|
15
15
|
import { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime";
|
|
16
16
|
import { resolveRealtimeVoiceAgentContextInstructions } from "openclaw/plugin-sdk/realtime-bootstrap-context";
|
|
17
17
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
18
|
-
|
|
18
|
+
// extensions/facetime/src/call-events.ts
|
|
19
19
|
const TU_CALL_STATUS = {
|
|
20
20
|
outgoingCreated: 0,
|
|
21
21
|
active: 1,
|
|
22
22
|
outgoingRinging: 3,
|
|
23
|
-
incomingRinging: 4
|
|
23
|
+
incomingRinging: 4,
|
|
24
|
+
disconnected: 6
|
|
24
25
|
};
|
|
25
26
|
function readFiniteNumber(value) {
|
|
26
27
|
return asFiniteNumber(typeof value === "string" ? Number(value) : value);
|
|
@@ -151,13 +152,12 @@ function isOutgoingRingingCall(event) {
|
|
|
151
152
|
return (event.data.call_status === TU_CALL_STATUS.outgoingCreated || event.data.call_status === TU_CALL_STATUS.outgoingRinging) && event.data.is_outgoing === true;
|
|
152
153
|
}
|
|
153
154
|
function isEndedCall(event) {
|
|
154
|
-
return event.data.has_ended === true;
|
|
155
|
+
return event.data.has_ended === true || event.data.call_status === TU_CALL_STATUS.disconnected;
|
|
155
156
|
}
|
|
156
157
|
function isUnknownCallStatus(event) {
|
|
157
158
|
return !isIncomingRingingCall(event) && !isOutgoingRingingCall(event) && !isActiveCall(event) && !isEndedCall(event);
|
|
158
159
|
}
|
|
159
|
-
|
|
160
|
-
//#region extensions/facetime/src/call-lifecycle.ts
|
|
160
|
+
// extensions/facetime/src/call-lifecycle.ts
|
|
161
161
|
function normalizeCallIdentity(value) {
|
|
162
162
|
return value.trim().toLowerCase();
|
|
163
163
|
}
|
|
@@ -272,13 +272,11 @@ var FaceTimeCallRegistry = class {
|
|
|
272
272
|
this.#active = void 0;
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
|
-
|
|
276
|
-
//#region extensions/facetime/helper-endpoint.json
|
|
275
|
+
// extensions/facetime/helper-endpoint.json
|
|
277
276
|
var host = "127.0.0.1";
|
|
278
277
|
var basePort = 45670;
|
|
279
278
|
var maxPort = 65535;
|
|
280
|
-
|
|
281
|
-
//#region extensions/facetime/src/helper-endpoint.ts
|
|
279
|
+
// extensions/facetime/src/helper-endpoint.ts
|
|
282
280
|
function resolveFaceTimeHelperEndpoint() {
|
|
283
281
|
const uid = typeof process.getuid === "function" ? process.getuid() : 501;
|
|
284
282
|
if (host !== "127.0.0.1" || !Number.isSafeInteger(basePort) || !Number.isSafeInteger(maxPort) || basePort < 1024 || maxPort > 65535 || basePort > maxPort || !Number.isSafeInteger(uid)) throw new Error("Invalid FaceTime loopback helper endpoint contract");
|
|
@@ -287,8 +285,7 @@ function resolveFaceTimeHelperEndpoint() {
|
|
|
287
285
|
port: Math.min(Math.max(basePort + uid - 501, basePort), maxPort)
|
|
288
286
|
};
|
|
289
287
|
}
|
|
290
|
-
|
|
291
|
-
//#region extensions/facetime/src/helper-results.ts
|
|
288
|
+
// extensions/facetime/src/helper-results.ts
|
|
292
289
|
var FaceTimeHelperActionError = class extends Error {
|
|
293
290
|
constructor(message) {
|
|
294
291
|
super(message);
|
|
@@ -332,8 +329,7 @@ function projectCompleteFaceTimeAbsence(result) {
|
|
|
332
329
|
topologyGeneration: result.topologyGeneration
|
|
333
330
|
};
|
|
334
331
|
}
|
|
335
|
-
|
|
336
|
-
//#region extensions/facetime/src/helper-rpc.ts
|
|
332
|
+
// extensions/facetime/src/helper-rpc.ts
|
|
337
333
|
const FACETIME_DIAL_HELPER_BUNDLES = /* @__PURE__ */ new Set(["com.apple.FaceTime", "com.apple.FaceTime.FTConversationService"]);
|
|
338
334
|
const FACETIME_HELPER_BUNDLES = /* @__PURE__ */ new Set([
|
|
339
335
|
...FACETIME_DIAL_HELPER_BUNDLES,
|
|
@@ -726,8 +722,7 @@ var FaceTimeHelperSocketServer = class {
|
|
|
726
722
|
});
|
|
727
723
|
}
|
|
728
724
|
};
|
|
729
|
-
|
|
730
|
-
//#region extensions/facetime/src/helper-supervisor.ts
|
|
725
|
+
// extensions/facetime/src/helper-supervisor.ts
|
|
731
726
|
const TARGET_BUNDLES = {
|
|
732
727
|
FaceTime: /* @__PURE__ */ new Set(["com.apple.FaceTime", "com.apple.FaceTime.FTConversationService"]),
|
|
733
728
|
Phone: /* @__PURE__ */ new Set(["com.apple.mobilephone", "com.apple.TelephonyUtilities"])
|
|
@@ -930,8 +925,7 @@ var FaceTimeHelperSupervisor = class {
|
|
|
930
925
|
}
|
|
931
926
|
}
|
|
932
927
|
};
|
|
933
|
-
|
|
934
|
-
//#region extensions/facetime/src/outbound-call.ts
|
|
928
|
+
// extensions/facetime/src/outbound-call.ts
|
|
935
929
|
function normalizeFaceTimeOutboundIdentityEvent(value) {
|
|
936
930
|
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
937
931
|
const record = asRecord(value);
|
|
@@ -1013,8 +1007,7 @@ function retainFaceTimeDialCallUUID(pending, callUUID) {
|
|
|
1013
1007
|
function doesPendingFaceTimeDialHaveCallUUID(pending, callUUID) {
|
|
1014
1008
|
return pending.callUUID === callUUID || pending.callUUIDAliases?.has(callUUID) === true;
|
|
1015
1009
|
}
|
|
1016
|
-
|
|
1017
|
-
//#region extensions/facetime/src/pending-dial-store.ts
|
|
1010
|
+
// extensions/facetime/src/pending-dial-store.ts
|
|
1018
1011
|
const PENDING_DIAL_KEY = "active";
|
|
1019
1012
|
function decodePendingDial(value) {
|
|
1020
1013
|
if (!value || value.version !== 1 || !Number.isSafeInteger(value.ownerEpoch) || value.ownerEpoch < 1 || typeof value.dialID !== "string" || typeof value.handle !== "string" || value.mode !== "audio" && value.mode !== "video" || value.delivery !== "in-flight" && value.delivery !== "accepted" && value.delivery !== "ambiguous" && value.delivery !== "cancelling" || typeof value.requestedAt !== "string") return;
|
|
@@ -1073,8 +1066,7 @@ var PendingFaceTimeDialStore = class {
|
|
|
1073
1066
|
return this.#tail;
|
|
1074
1067
|
}
|
|
1075
1068
|
};
|
|
1076
|
-
|
|
1077
|
-
//#region extensions/facetime/src/audio-pump.ts
|
|
1069
|
+
// extensions/facetime/src/audio-pump.ts
|
|
1078
1070
|
const CAFFEINATE_COMMAND = "/usr/bin/caffeinate";
|
|
1079
1071
|
const CAPTURE_CLOSE_SAFE_FRAME = Buffer.from([
|
|
1080
1072
|
4,
|
|
@@ -1451,8 +1443,7 @@ function startFaceTimeAudioPump(params) {
|
|
|
1451
1443
|
stop
|
|
1452
1444
|
};
|
|
1453
1445
|
}
|
|
1454
|
-
|
|
1455
|
-
//#region extensions/facetime/src/talk-driver-config.ts
|
|
1446
|
+
// extensions/facetime/src/talk-driver-config.ts
|
|
1456
1447
|
const CONSULT_SYSTEM_PROMPT = [
|
|
1457
1448
|
"You are the configured OpenClaw agent receiving a delegated request from an authenticated owner in a private 1:1 FaceTime call.",
|
|
1458
1449
|
"The authenticated caller is the configured owner/user described by this agent's workspace context, including USER.md. When asked who is speaking, identify them from that workspace context without asking them to reconfirm.",
|
|
@@ -1543,8 +1534,7 @@ async function resolveFaceTimeRealtimeProvider(params) {
|
|
|
1543
1534
|
noRegisteredProviderMessage: "No realtime voice provider registered"
|
|
1544
1535
|
});
|
|
1545
1536
|
}
|
|
1546
|
-
|
|
1547
|
-
//#region extensions/facetime/src/preflight.ts
|
|
1537
|
+
// extensions/facetime/src/preflight.ts
|
|
1548
1538
|
function parseDefaultAudioDevices(raw) {
|
|
1549
1539
|
const parsed = JSON.parse(raw);
|
|
1550
1540
|
const record = asRecord(parsed);
|
|
@@ -1736,8 +1726,7 @@ async function runFaceTimePreflight(params) {
|
|
|
1736
1726
|
checks
|
|
1737
1727
|
};
|
|
1738
1728
|
}
|
|
1739
|
-
|
|
1740
|
-
//#region extensions/facetime/src/runtime-carrier-process.ts
|
|
1729
|
+
// extensions/facetime/src/runtime-carrier-process.ts
|
|
1741
1730
|
async function terminateExactCarrierProcesses(params) {
|
|
1742
1731
|
params.assertCurrent();
|
|
1743
1732
|
if (params.peers.size === 0) throw new Error("no authenticated carrier process identity is available for safe shutdown");
|
|
@@ -1784,8 +1773,7 @@ async function terminateExactCarrierProcesses(params) {
|
|
|
1784
1773
|
if (alive) throw new Error("authenticated carrier process remains alive after force termination");
|
|
1785
1774
|
}
|
|
1786
1775
|
}
|
|
1787
|
-
|
|
1788
|
-
//#region extensions/facetime/src/runtime-helper-results.ts
|
|
1776
|
+
// extensions/facetime/src/runtime-helper-results.ts
|
|
1789
1777
|
const OUTBOUND_DIAL_HELPER_BUNDLES = /* @__PURE__ */ new Set(["com.apple.FaceTime", "com.apple.FaceTime.FTConversationService"]);
|
|
1790
1778
|
function readHelperPeers(result) {
|
|
1791
1779
|
const peers = [];
|
|
@@ -1859,8 +1847,7 @@ async function reconcilePendingFaceTimeCarrier(params) {
|
|
|
1859
1847
|
if (attempt + 1 < 12) await sleep(250);
|
|
1860
1848
|
}
|
|
1861
1849
|
}
|
|
1862
|
-
|
|
1863
|
-
//#region extensions/facetime/src/talk-consult-controller.ts
|
|
1850
|
+
// extensions/facetime/src/talk-consult-controller.ts
|
|
1864
1851
|
function createFaceTimeConsultController(params) {
|
|
1865
1852
|
const pending = /* @__PURE__ */ new Map();
|
|
1866
1853
|
let hangupRequested = false;
|
|
@@ -2139,8 +2126,7 @@ function createFaceTimeConsultController(params) {
|
|
|
2139
2126
|
handleToolCall
|
|
2140
2127
|
};
|
|
2141
2128
|
}
|
|
2142
|
-
|
|
2143
|
-
//#region extensions/facetime/src/talk-initial-greeting.ts
|
|
2129
|
+
// extensions/facetime/src/talk-initial-greeting.ts
|
|
2144
2130
|
const FACETIME_INITIAL_GREETING = "Greet the caller briefly, introduce yourself using your configured identity, and ask how you can help.";
|
|
2145
2131
|
const FACETIME_GREETING_MEDIA_SETTLE_MS = 100;
|
|
2146
2132
|
function createFaceTimeInitialGreeting(params) {
|
|
@@ -2169,8 +2155,7 @@ function createFaceTimeInitialGreeting(params) {
|
|
|
2169
2155
|
}
|
|
2170
2156
|
};
|
|
2171
2157
|
}
|
|
2172
|
-
|
|
2173
|
-
//#region extensions/facetime/src/talk-driver.ts
|
|
2158
|
+
// extensions/facetime/src/talk-driver.ts
|
|
2174
2159
|
async function startFaceTimeTalkDriver(params) {
|
|
2175
2160
|
if (params.signal?.aborted) throw new Error("FaceTime talk startup aborted");
|
|
2176
2161
|
const consultAgentId = agentIdFromSessionKey(params.config.realtime.sessionKey, params.fullConfig);
|
|
@@ -2629,8 +2614,7 @@ async function startFaceTimeTalkDriver(params) {
|
|
|
2629
2614
|
close
|
|
2630
2615
|
};
|
|
2631
2616
|
}
|
|
2632
|
-
|
|
2633
|
-
//#region extensions/facetime/src/runtime-call-control.ts
|
|
2617
|
+
// extensions/facetime/src/runtime-call-control.ts
|
|
2634
2618
|
function createFaceTimeCallControl(params) {
|
|
2635
2619
|
const runCarrierActionAcrossAliases = async (request) => {
|
|
2636
2620
|
const candidates = [request.call.carrierCallUUID, ...[...request.call.carrierCallUUIDs].toReversed()].filter((candidate, index, all) => all.indexOf(candidate) === index);
|
|
@@ -2911,8 +2895,7 @@ function createFaceTimeCallControl(params) {
|
|
|
2911
2895
|
stopCall
|
|
2912
2896
|
};
|
|
2913
2897
|
}
|
|
2914
|
-
|
|
2915
|
-
//#region extensions/facetime/src/runtime-state.ts
|
|
2898
|
+
// extensions/facetime/src/runtime-state.ts
|
|
2916
2899
|
var ActiveFaceTimeCall = class extends FaceTimeCallInstance {
|
|
2917
2900
|
constructor(params) {
|
|
2918
2901
|
super(params.callUUID, params.phase);
|
|
@@ -2953,8 +2936,7 @@ function updateCallStatus(call, event) {
|
|
|
2953
2936
|
if (event.data.local_meter_level !== void 0) call.maxLocalMeterLevel = Math.max(call.maxLocalMeterLevel ?? 0, event.data.local_meter_level);
|
|
2954
2937
|
if (event.data.remote_meter_level !== void 0) call.maxRemoteMeterLevel = Math.max(call.maxRemoteMeterLevel ?? 0, event.data.remote_meter_level);
|
|
2955
2938
|
}
|
|
2956
|
-
|
|
2957
|
-
//#region extensions/facetime/src/runtime-call-events.ts
|
|
2939
|
+
// extensions/facetime/src/runtime-call-events.ts
|
|
2958
2940
|
function createFaceTimeCallEventHandler(params) {
|
|
2959
2941
|
const eventIdentities = (event) => [
|
|
2960
2942
|
event.data.call_uuid,
|
|
@@ -3203,8 +3185,7 @@ function createFaceTimeCallEventHandler(params) {
|
|
|
3203
3185
|
};
|
|
3204
3186
|
return { handleCallEvent };
|
|
3205
3187
|
}
|
|
3206
|
-
|
|
3207
|
-
//#region extensions/facetime/src/talk-events-summary.ts
|
|
3188
|
+
// extensions/facetime/src/talk-events-summary.ts
|
|
3208
3189
|
function summarizeRecentTalkEvents(events) {
|
|
3209
3190
|
return events.slice(-12).map((event) => {
|
|
3210
3191
|
const record = asRecord(event);
|
|
@@ -3221,8 +3202,7 @@ function summarizeRecentTalkEvents(events) {
|
|
|
3221
3202
|
};
|
|
3222
3203
|
});
|
|
3223
3204
|
}
|
|
3224
|
-
|
|
3225
|
-
//#region extensions/facetime/src/runtime-status.ts
|
|
3205
|
+
// extensions/facetime/src/runtime-status.ts
|
|
3226
3206
|
function buildFaceTimeRuntimeStatus(params) {
|
|
3227
3207
|
const calls = [...params.calls.values()];
|
|
3228
3208
|
return {
|
|
@@ -3282,8 +3262,7 @@ function buildFaceTimeRuntimeStatus(params) {
|
|
|
3282
3262
|
}))
|
|
3283
3263
|
};
|
|
3284
3264
|
}
|
|
3285
|
-
|
|
3286
|
-
//#region extensions/facetime/src/runtime.ts
|
|
3265
|
+
// extensions/facetime/src/runtime.ts
|
|
3287
3266
|
const OUTBOUND_RECONCILE_DELAY_MS = 1e3;
|
|
3288
3267
|
async function createFaceTimeRuntime(params) {
|
|
3289
3268
|
const config = resolveFaceTimeConfig(params.config);
|
|
@@ -3718,5 +3697,4 @@ async function createFaceTimeRuntime(params) {
|
|
|
3718
3697
|
}
|
|
3719
3698
|
};
|
|
3720
3699
|
}
|
|
3721
|
-
//#endregion
|
|
3722
3700
|
export { createFaceTimeRuntime };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/facetime",
|
|
3
|
-
"version": "2026.10.10
|
|
3
|
+
"version": "2026.10.10",
|
|
4
4
|
"description": "Experimental FaceTime realtime voice carrier for OpenClaw agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "OpenClaw contributors",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"typebox": "1.3.35"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"openclaw": ">=2026.10.10
|
|
69
|
+
"openclaw": ">=2026.10.10"
|
|
70
70
|
},
|
|
71
71
|
"peerDependenciesMeta": {
|
|
72
72
|
"openclaw": {
|
|
@@ -85,11 +85,11 @@
|
|
|
85
85
|
"allowInvalidConfigRecovery": true
|
|
86
86
|
},
|
|
87
87
|
"compat": {
|
|
88
|
-
"pluginApi": ">=2026.10.10
|
|
88
|
+
"pluginApi": ">=2026.10.10"
|
|
89
89
|
},
|
|
90
90
|
"build": {
|
|
91
91
|
"bundledDist": false,
|
|
92
|
-
"openclawVersion": "2026.10.10
|
|
92
|
+
"openclawVersion": "2026.10.10"
|
|
93
93
|
},
|
|
94
94
|
"release": {
|
|
95
95
|
"publishToClawHub": true,
|
package/src/call-events.ts
CHANGED
|
@@ -40,6 +40,7 @@ const TU_CALL_STATUS = {
|
|
|
40
40
|
active: 1,
|
|
41
41
|
outgoingRinging: 3,
|
|
42
42
|
incomingRinging: 4,
|
|
43
|
+
disconnected: 6,
|
|
43
44
|
} as const;
|
|
44
45
|
|
|
45
46
|
export type AuthenticatedFaceTimeOwner = {
|
|
@@ -256,7 +257,9 @@ export function isOutgoingRingingCall(event: FaceTimeCallStatusEvent): boolean {
|
|
|
256
257
|
}
|
|
257
258
|
|
|
258
259
|
export function isEndedCall(event: FaceTimeCallStatusEvent): boolean {
|
|
259
|
-
|
|
260
|
+
// TUCall may publish disconnected before dateEnded is populated. Waiting for
|
|
261
|
+
// that timestamp retains a dead carrier and blocks subsequent incoming calls.
|
|
262
|
+
return event.data.has_ended === true || event.data.call_status === TU_CALL_STATUS.disconnected;
|
|
260
263
|
}
|
|
261
264
|
|
|
262
265
|
export function isUnknownCallStatus(event: FaceTimeCallStatusEvent): boolean {
|