@openclaw/voice-call 2026.9.5 → 2026.9.7
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/assets/icon.png +0 -0
- package/dist/.setup/{cli-z1onSLj4.mjs → cli-D6uwMXyS.mjs} +6 -10
- package/dist/.setup/{config-72FnMWHb.mjs → config-Ds7xoZbI.mjs} +27 -30
- package/dist/.setup/{guarded-json-api-CuLkeTrl.mjs → guarded-json-api-Bqc6QS8A.mjs} +23 -17
- package/dist/.setup/{mock-CcYEAUhV.mjs → mock-ClWW6Ufu.mjs} +34 -53
- package/dist/.setup/{plivo-DWYNkAQ3.mjs → plivo-69ObrQPk.mjs} +17 -42
- package/dist/.setup/realtime-agent-context.legacy-DAEWY27o.mjs +53 -0
- package/dist/.setup/{realtime-handler-CaoetLrM.mjs → realtime-handler-BgDPcPZt.mjs} +34 -53
- package/dist/.setup/{response-generator-DB1nElLO.mjs → response-generator-BzKrJMEb.mjs} +3 -2
- package/dist/.setup/{runtime-entry-YWSSnAsH.mjs → runtime-entry-BNOQRXii.mjs} +82 -297
- package/dist/.setup/{telnyx-BY3ef4Cc.mjs → telnyx-DjFGCfy1.mjs} +19 -55
- package/dist/.setup/{twilio-DWZ4HVmF.mjs → twilio-Bp3gfmUB.mjs} +29 -78
- package/dist/.setup/{store-path-B1j1up4_.mjs → utils-B5pnM_Ij.mjs} +14 -6
- package/dist/api.js +5 -1
- package/dist/doctor-contract-api.js +187 -15
- package/dist/index.js +6 -42
- package/dist/runtime-entry.js +1 -1
- package/node_modules/typebox/build/compile/code.mjs +1 -2
- package/node_modules/typebox/build/compile/validator.mjs +5 -1
- package/node_modules/typebox/build/format/iri.mjs +16 -9
- package/node_modules/typebox/build/guard/emit.mjs +2 -2
- package/node_modules/typebox/build/guard/guard.d.mts +7 -5
- package/node_modules/typebox/build/guard/guard.mjs +14 -9
- package/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
- package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
- package/node_modules/typebox/build/schema/build.mjs +2 -3
- package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
- package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
- package/node_modules/typebox/build/schema/parse.mjs +3 -0
- package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
- package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
- package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
- package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
- package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
- package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
- package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
- package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
- package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +3 -1
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +6 -6
- package/dist/runtime-api.js +0 -6
- /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
package/assets/icon.png
CHANGED
|
Binary file
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { sleep } from "../
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import { d as cleanupTailscaleExposureRoute, f as getTailscaleSelfInfo, p as setupTailscaleExposureRoutes, u as resolveWebhookExposureStatus, v as resolveVoiceCallAgentId
|
|
5
|
-
import { b as setVoiceCallStateRuntime, d as getCallHistoryFromStore, f as loadActiveCallsFromStore, o as MAX_CALL_RECORD_EVENTS, t as resolveDefaultVoiceCallStoreDir, u as findCallInStore } from "./store-path-B1j1up4_.mjs";
|
|
1
|
+
import { sleep } from "../api.js";
|
|
2
|
+
import { l as resolveVoiceCallStreamExposurePaths, u as validateProviderConfig } from "./config-Ds7xoZbI.mjs";
|
|
3
|
+
import { d as findCallInStore, f as getCallHistoryFromStore, n as resolveDefaultVoiceCallStoreDir, p as loadActiveCallsFromStore, s as MAX_CALL_RECORD_EVENTS, t as resolveUserPath, x as setVoiceCallStateRuntime } from "./utils-B5pnM_Ij.mjs";
|
|
4
|
+
import { d as cleanupTailscaleExposureRoute, f as getTailscaleSelfInfo, p as setupTailscaleExposureRoutes, u as resolveWebhookExposureStatus, v as resolveVoiceCallAgentId } from "./runtime-entry-BNOQRXii.mjs";
|
|
6
5
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
7
6
|
import { callGatewayFromCli, isGatewayClientRequestError, isGatewayTransportError, redactSensitiveUrlLikeString } from "openclaw/plugin-sdk/gateway-runtime";
|
|
8
7
|
import { isRecord, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -240,10 +239,6 @@ function resolveContinueTimeout(config) {
|
|
|
240
239
|
function resolveVoiceCallDeadlineMs(timeoutMs, nowMs = Date.now()) {
|
|
241
240
|
return nowMs + (clampTimerTimeoutMs(timeoutMs) ?? MAX_TIMER_TIMEOUT_MS);
|
|
242
241
|
}
|
|
243
|
-
function readGatewayOperationId(payload) {
|
|
244
|
-
if (isRecord(payload) && typeof payload.operationId === "string" && payload.operationId) return payload.operationId;
|
|
245
|
-
throw new Error("voicecall gateway response missing operationId");
|
|
246
|
-
}
|
|
247
242
|
function readGatewayPollTimeoutMs(payload, fallbackTimeoutMs) {
|
|
248
243
|
if (isRecord(payload) && typeof payload.pollTimeoutMs === "number") return clampTimerTimeoutMs(payload.pollTimeoutMs) ?? fallbackTimeoutMs;
|
|
249
244
|
return fallbackTimeoutMs;
|
|
@@ -263,8 +258,9 @@ function readCompletedContinueResult(payload) {
|
|
|
263
258
|
}
|
|
264
259
|
async function pollContinueGateway(payload, fallbackTimeoutMs) {
|
|
265
260
|
if (!isRecord(payload) || typeof payload.operationId !== "string") return payload;
|
|
261
|
+
if (!payload.operationId) throw new Error("voicecall gateway response missing operationId");
|
|
266
262
|
const params = {
|
|
267
|
-
operationId:
|
|
263
|
+
operationId: payload.operationId,
|
|
268
264
|
timeoutMs: readGatewayPollTimeoutMs(payload, fallbackTimeoutMs)
|
|
269
265
|
};
|
|
270
266
|
const deadlineMs = resolveVoiceCallDeadlineMs(params.timeoutMs);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TtsConfigSchema } from "../
|
|
2
|
-
import "../api.js";
|
|
1
|
+
import { TtsConfigSchema } from "../api.js";
|
|
3
2
|
import { t as TWILIO_REGIONS } from "./twilio-region-4fkgz3UG.mjs";
|
|
4
3
|
import { normalizeAgentId, parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
5
4
|
import { REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME, REALTIME_VOICE_AGENT_CONSULT_TOOL_POLICIES, resolveRealtimeVoiceAgentConsultTools } from "openclaw/plugin-sdk/realtime-voice";
|
|
@@ -10,6 +9,21 @@ import { resolveSpeechProviderApiKey } from "openclaw/plugin-sdk/speech-core";
|
|
|
10
9
|
import { normalizeWebhookPath } from "openclaw/plugin-sdk/webhook-ingress";
|
|
11
10
|
import { z } from "zod";
|
|
12
11
|
import { MAX_TCP_PORT } from "openclaw/plugin-sdk/number-runtime";
|
|
12
|
+
//#region extensions/voice-call/src/allowlist.ts
|
|
13
|
+
/** Normalize a phone number to digits only. */
|
|
14
|
+
function normalizePhoneNumber(input) {
|
|
15
|
+
if (!input) return "";
|
|
16
|
+
return input.replace(/\D/g, "");
|
|
17
|
+
}
|
|
18
|
+
/** Return true when the normalized caller exactly matches an allowlist entry. */
|
|
19
|
+
function isAllowlistedCaller(normalizedFrom, allowFrom) {
|
|
20
|
+
if (!normalizedFrom) return false;
|
|
21
|
+
return (allowFrom ?? []).some((num) => {
|
|
22
|
+
const normalizedAllow = normalizePhoneNumber(num);
|
|
23
|
+
return normalizedAllow !== "" && normalizedAllow === normalizedFrom;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
13
27
|
//#region extensions/voice-call/src/realtime-call-control.ts
|
|
14
28
|
/** Stable provider-facing tool name for ending the current phone call. */
|
|
15
29
|
const REALTIME_VOICE_END_CALL_TOOL_NAME = "openclaw_end_call";
|
|
@@ -205,7 +219,7 @@ const RealtimeToolSchema = z.object({
|
|
|
205
219
|
required: z.array(z.string()).optional()
|
|
206
220
|
})
|
|
207
221
|
}).strict();
|
|
208
|
-
const
|
|
222
|
+
const VoiceCallProvidersConfigSchema = z.record(z.string(), z.record(z.string(), z.unknown())).default({});
|
|
209
223
|
const VoiceCallRealtimeToolPolicySchema = z.enum(REALTIME_VOICE_AGENT_CONSULT_TOOL_POLICIES);
|
|
210
224
|
const VoiceCallRealtimeConsultPolicySchema = z.enum([
|
|
211
225
|
"auto",
|
|
@@ -232,9 +246,9 @@ const VoiceCallRealtimeFastContextConfigSchema = z.object({
|
|
|
232
246
|
fallbackToConsult: false
|
|
233
247
|
});
|
|
234
248
|
const VoiceCallRealtimeAgentContextConfigSchema = z.object({
|
|
235
|
-
/**
|
|
249
|
+
/** Include configured identity and selected profile files alongside the always-on agent context. */
|
|
236
250
|
enabled: z.boolean().default(false),
|
|
237
|
-
/** Maximum number of characters
|
|
251
|
+
/** Maximum number of characters in the generated profile-file block. */
|
|
238
252
|
maxChars: z.number().int().positive().default(6e3),
|
|
239
253
|
/** Include configured agent identity fields. */
|
|
240
254
|
includeIdentity: z.boolean().default(true),
|
|
@@ -268,7 +282,6 @@ const VoiceCallRealtimeConsultThinkingLevelSchema = z.enum([
|
|
|
268
282
|
"max",
|
|
269
283
|
"ultra"
|
|
270
284
|
]);
|
|
271
|
-
const VoiceCallStreamingProvidersConfigSchema = z.record(z.string(), z.record(z.string(), z.unknown())).default({});
|
|
272
285
|
const VoiceCallRealtimeConfigSchema = z.object({
|
|
273
286
|
/** Enable realtime voice-to-voice mode. */
|
|
274
287
|
enabled: z.boolean().default(false),
|
|
@@ -293,7 +306,7 @@ const VoiceCallRealtimeConfigSchema = z.object({
|
|
|
293
306
|
/** Bounded agent persona/context injection for the fast realtime voice path. */
|
|
294
307
|
agentContext: VoiceCallRealtimeAgentContextConfigSchema,
|
|
295
308
|
/** Provider-owned raw config blobs keyed by provider id. */
|
|
296
|
-
providers:
|
|
309
|
+
providers: VoiceCallProvidersConfigSchema
|
|
297
310
|
}).strict().default({
|
|
298
311
|
enabled: false,
|
|
299
312
|
instructions: DEFAULT_VOICE_CALL_REALTIME_INSTRUCTIONS,
|
|
@@ -328,7 +341,7 @@ const VoiceCallStreamingConfigSchema = z.object({
|
|
|
328
341
|
/** WebSocket path for media stream connections */
|
|
329
342
|
streamPath: z.string().min(1).default("/voice/stream"),
|
|
330
343
|
/** Provider-owned raw config blobs keyed by provider id. */
|
|
331
|
-
providers:
|
|
344
|
+
providers: VoiceCallProvidersConfigSchema,
|
|
332
345
|
/**
|
|
333
346
|
* Close unauthenticated media stream sockets if no valid `start` frame arrives in time.
|
|
334
347
|
* Protects against pre-auth idle connection hold attacks.
|
|
@@ -431,9 +444,6 @@ const VoiceCallConfigSchema = z.object({
|
|
|
431
444
|
});
|
|
432
445
|
const TWILIO_AUTH_TOKEN_PATH = "plugins.entries.voice-call.config.twilio.authToken";
|
|
433
446
|
const DEFAULT_VOICE_CALL_CONFIG = VoiceCallConfigSchema.parse({});
|
|
434
|
-
function cloneDefaultVoiceCallConfig() {
|
|
435
|
-
return structuredClone(DEFAULT_VOICE_CALL_CONFIG);
|
|
436
|
-
}
|
|
437
447
|
function defaultRealtimeStreamPathForServePath(servePath) {
|
|
438
448
|
const normalized = normalizeWebhookPath(servePath);
|
|
439
449
|
if (normalized.endsWith("/webhook")) return `${normalized.slice(0, -8)}/stream/realtime`;
|
|
@@ -469,16 +479,13 @@ function normalizeVoiceCallTtsConfig(defaults, overrides) {
|
|
|
469
479
|
if (!defaults && !overrides) return;
|
|
470
480
|
return TtsConfigSchema.parse(mergeDeep(defaults ?? {}, overrides ?? {}));
|
|
471
481
|
}
|
|
472
|
-
function normalizePhoneRouteKey(phone) {
|
|
473
|
-
return phone?.replace(/\D/g, "") ?? "";
|
|
474
|
-
}
|
|
475
482
|
function resolveVoiceCallNumberRouteKey(config, phone) {
|
|
476
483
|
const routes = config.numbers;
|
|
477
484
|
if (!routes) return;
|
|
478
485
|
if (phone && Object.hasOwn(routes, phone)) return phone;
|
|
479
|
-
const normalizedPhone =
|
|
486
|
+
const normalizedPhone = normalizePhoneNumber(phone);
|
|
480
487
|
if (!normalizedPhone) return;
|
|
481
|
-
return Object.keys(routes).find((routeKey) =>
|
|
488
|
+
return Object.keys(routes).find((routeKey) => normalizePhoneNumber(routeKey) === normalizedPhone);
|
|
482
489
|
}
|
|
483
490
|
/** Resolve inbound-only number routing from a persisted call record. */
|
|
484
491
|
function resolveVoiceCallNumberRouteKeyForCall(call) {
|
|
@@ -517,7 +524,7 @@ function resolveTwilioAuthToken(config) {
|
|
|
517
524
|
});
|
|
518
525
|
}
|
|
519
526
|
function normalizeVoiceCallConfig(config) {
|
|
520
|
-
const defaults =
|
|
527
|
+
const defaults = structuredClone(DEFAULT_VOICE_CALL_CONFIG);
|
|
521
528
|
const serve = {
|
|
522
529
|
...defaults.serve,
|
|
523
530
|
...config.serve
|
|
@@ -595,7 +602,7 @@ function resolveVoiceCallSessionKey(params) {
|
|
|
595
602
|
});
|
|
596
603
|
const prefix = `agent:${normalizeAgentId(params.config.agentId)}:voice`;
|
|
597
604
|
if (params.config.sessionScope === "per-call") return `${prefix}:call:${params.callId}`.toLowerCase();
|
|
598
|
-
const normalizedPhone = params.phone
|
|
605
|
+
const normalizedPhone = normalizePhoneNumber(params.phone);
|
|
599
606
|
return (normalizedPhone ? `${prefix}:${normalizedPhone}` : `${prefix}:${params.callId}`).toLowerCase();
|
|
600
607
|
}
|
|
601
608
|
/** Resolve persisted or integration-provided keys into the configured agent namespace. */
|
|
@@ -613,12 +620,11 @@ function resolveVoiceCallAgentSessionKey(params) {
|
|
|
613
620
|
if (!wrappedInput) throw new Error("Voice Call session key could not be normalized");
|
|
614
621
|
normalizedScopedKey = `agent:${agentId}:${wrappedInput.rest}`;
|
|
615
622
|
}
|
|
616
|
-
|
|
623
|
+
return canonicalizeMainSessionAlias({
|
|
617
624
|
cfg: { session: params.coreSession },
|
|
618
625
|
agentId,
|
|
619
626
|
sessionKey: normalizedScopedKey
|
|
620
627
|
});
|
|
621
|
-
return canonicalMain === normalizedScopedKey ? normalizedScopedKey : canonicalMain;
|
|
622
628
|
}
|
|
623
629
|
/**
|
|
624
630
|
* Resolves the configuration by merging environment variables into missing fields.
|
|
@@ -643,18 +649,9 @@ function resolveVoiceCallConfig(config) {
|
|
|
643
649
|
resolved.plivo.authId = resolved.plivo.authId ?? resolveSpeechProviderApiKey(process.env.PLIVO_AUTH_ID);
|
|
644
650
|
resolved.plivo.authToken = resolved.plivo.authToken ?? resolveSpeechProviderApiKey(process.env.PLIVO_AUTH_TOKEN);
|
|
645
651
|
}
|
|
646
|
-
resolved.tunnel = resolved.tunnel ?? {
|
|
647
|
-
provider: "none",
|
|
648
|
-
allowNgrokFreeTierLoopbackBypass: false
|
|
649
|
-
};
|
|
650
652
|
resolved.tunnel.allowNgrokFreeTierLoopbackBypass = resolved.tunnel.allowNgrokFreeTierLoopbackBypass ?? false;
|
|
651
653
|
resolved.tunnel.ngrokAuthToken = resolved.tunnel.ngrokAuthToken ?? resolveSpeechProviderApiKey(process.env.NGROK_AUTHTOKEN);
|
|
652
654
|
resolved.tunnel.ngrokDomain = resolved.tunnel.ngrokDomain ?? resolveSpeechProviderApiKey(process.env.NGROK_DOMAIN);
|
|
653
|
-
resolved.webhookSecurity = resolved.webhookSecurity ?? {
|
|
654
|
-
allowedHosts: [],
|
|
655
|
-
trustForwardingHeaders: false,
|
|
656
|
-
trustedProxyIPs: []
|
|
657
|
-
};
|
|
658
655
|
resolved.webhookSecurity.allowedHosts = resolved.webhookSecurity.allowedHosts ?? [];
|
|
659
656
|
resolved.webhookSecurity.trustForwardingHeaders = resolved.webhookSecurity.trustForwardingHeaders ?? false;
|
|
660
657
|
resolved.webhookSecurity.trustedProxyIPs = resolved.webhookSecurity.trustedProxyIPs ?? [];
|
|
@@ -694,4 +691,4 @@ function validateProviderConfig(config) {
|
|
|
694
691
|
};
|
|
695
692
|
}
|
|
696
693
|
//#endregion
|
|
697
|
-
export { resolveVoiceCallEffectiveConfig as a, resolveVoiceCallSessionKey as c, REALTIME_VOICE_END_CALL_TOOL_NAME as d, resolveVoiceCallRealtimeTools as f, resolveVoiceCallConfig as i, resolveVoiceCallStreamExposurePaths as l, normalizeVoiceCallConfig as n, resolveVoiceCallNumberRouteKeyForCall as o, resolveTwilioAuthToken as r, resolveVoiceCallPublicPathPrefix as s, VoiceCallConfigSchema as t, validateProviderConfig as u };
|
|
694
|
+
export { resolveVoiceCallEffectiveConfig as a, resolveVoiceCallSessionKey as c, REALTIME_VOICE_END_CALL_TOOL_NAME as d, resolveVoiceCallRealtimeTools as f, resolveVoiceCallConfig as i, resolveVoiceCallStreamExposurePaths as l, normalizePhoneNumber as m, normalizeVoiceCallConfig as n, resolveVoiceCallNumberRouteKeyForCall as o, isAllowlistedCaller as p, resolveTwilioAuthToken as r, resolveVoiceCallPublicPathPrefix as s, VoiceCallConfigSchema as t, validateProviderConfig as u };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { fetchWithSsrFGuard } from "../
|
|
2
|
-
import "
|
|
3
|
-
import { l as getHeader, n as normalizeProxyIp } from "./runtime-entry-YWSSnAsH.mjs";
|
|
1
|
+
import { fetchWithSsrFGuard } from "../api.js";
|
|
2
|
+
import { l as getHeader, n as normalizeProxyIp } from "./runtime-entry-BNOQRXii.mjs";
|
|
4
3
|
import { n as reserveWebhookReplay, t as createWebhookReplayCache } from "./webhook-replay-CCQSoBNF.mjs";
|
|
5
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
6
5
|
import { isLoopbackHost } from "openclaw/plugin-sdk/gateway-runtime";
|
|
7
6
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
7
|
import crypto from "node:crypto";
|
|
9
|
-
import { redactSensitiveText, safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
10
8
|
import { isIP } from "node:net";
|
|
9
|
+
import { redactSensitiveText, safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
11
10
|
import { readResponseTextPrefix, readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
12
11
|
//#region extensions/voice-call/src/webhook-security.ts
|
|
13
12
|
const twilioReplayCache = createWebhookReplayCache();
|
|
@@ -217,24 +216,15 @@ function createTwilioReplayKey(params) {
|
|
|
217
216
|
const canonicalParams = buildCanonicalTwilioParamString(params.requestParams);
|
|
218
217
|
return `twilio:req:${sha256Hex(`${params.verificationUrl}\n${canonicalParams}\n${params.signature}`)}`;
|
|
219
218
|
}
|
|
220
|
-
function decodeBase64OrBase64Url(input) {
|
|
221
|
-
const normalized = input.replace(/-/g, "+").replace(/_/g, "/");
|
|
222
|
-
const padLen = (4 - normalized.length % 4) % 4;
|
|
223
|
-
const padded = normalized + "=".repeat(padLen);
|
|
224
|
-
return Buffer.from(padded, "base64");
|
|
225
|
-
}
|
|
226
|
-
function base64UrlEncode(buf) {
|
|
227
|
-
return buf.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
|
|
228
|
-
}
|
|
229
219
|
function importEd25519PublicKey(publicKey) {
|
|
230
220
|
const trimmed = publicKey.trim();
|
|
231
221
|
if (trimmed.startsWith("-----BEGIN")) return trimmed;
|
|
232
|
-
const decoded =
|
|
222
|
+
const decoded = Buffer.from(trimmed, "base64");
|
|
233
223
|
if (decoded.length === 32) return crypto.createPublicKey({
|
|
234
224
|
key: {
|
|
235
225
|
kty: "OKP",
|
|
236
226
|
crv: "Ed25519",
|
|
237
|
-
x:
|
|
227
|
+
x: decoded.toString("base64url")
|
|
238
228
|
},
|
|
239
229
|
format: "jwk"
|
|
240
230
|
});
|
|
@@ -277,7 +267,7 @@ function verifyTelnyxWebhook(ctx, publicKey, options) {
|
|
|
277
267
|
};
|
|
278
268
|
try {
|
|
279
269
|
const signedPayload = `${timestamp}|${ctx.rawBody}`;
|
|
280
|
-
const signatureBuffer =
|
|
270
|
+
const signatureBuffer = Buffer.from(signature, "base64");
|
|
281
271
|
const canonicalSignature = signatureBuffer.toString("base64");
|
|
282
272
|
const key = importEd25519PublicKey(publicKey);
|
|
283
273
|
if (!crypto.verify(null, Buffer.from(signedPayload), key, signatureBuffer)) return {
|
|
@@ -571,5 +561,21 @@ async function guardedJsonApiRequest(params) {
|
|
|
571
561
|
await release();
|
|
572
562
|
}
|
|
573
563
|
}
|
|
564
|
+
/** Failed carrier probes keep calls alive; an empty or missing response is terminal. */
|
|
565
|
+
async function readProviderCallStatus(request, describe) {
|
|
566
|
+
try {
|
|
567
|
+
const data = await request();
|
|
568
|
+
return data ? describe(data) : {
|
|
569
|
+
status: "not-found",
|
|
570
|
+
isTerminal: true
|
|
571
|
+
};
|
|
572
|
+
} catch {
|
|
573
|
+
return {
|
|
574
|
+
status: "error",
|
|
575
|
+
isTerminal: false,
|
|
576
|
+
isUnknown: true
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
}
|
|
574
580
|
//#endregion
|
|
575
|
-
export {
|
|
581
|
+
export { readVoiceCallProviderJsonResponse as a, verifyTelnyxWebhook as c, readProviderErrorResponseSnippet as i, verifyTwilioWebhook as l, readProviderCallStatus as n, reconstructWebhookUrl as o, cancelProviderResponseBody as r, verifyPlivoWebhook as s, guardedJsonApiRequest as t };
|
|
@@ -61,67 +61,48 @@ var MockProvider = class {
|
|
|
61
61
|
...base,
|
|
62
62
|
type: evt.type
|
|
63
63
|
};
|
|
64
|
-
case "call.speaking": {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return {
|
|
75
|
-
...base,
|
|
76
|
-
type: evt.type,
|
|
77
|
-
transcript: payload.transcript ?? ""
|
|
78
|
-
};
|
|
79
|
-
}
|
|
64
|
+
case "call.speaking": return {
|
|
65
|
+
...base,
|
|
66
|
+
type: evt.type,
|
|
67
|
+
text: evt.text ?? ""
|
|
68
|
+
};
|
|
69
|
+
case "call.assistant-speech": return {
|
|
70
|
+
...base,
|
|
71
|
+
type: evt.type,
|
|
72
|
+
transcript: evt.transcript ?? ""
|
|
73
|
+
};
|
|
80
74
|
case "call.speech": {
|
|
81
|
-
const
|
|
82
|
-
const transcript = payload.transcript ?? "";
|
|
75
|
+
const transcript = evt.transcript ?? "";
|
|
83
76
|
if (!transcript.trim()) return null;
|
|
84
77
|
return {
|
|
85
78
|
...base,
|
|
86
79
|
type: evt.type,
|
|
87
80
|
transcript,
|
|
88
|
-
isFinal:
|
|
89
|
-
confidence:
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
case "call.silence": {
|
|
93
|
-
const payload = evt;
|
|
94
|
-
return {
|
|
95
|
-
...base,
|
|
96
|
-
type: evt.type,
|
|
97
|
-
durationMs: payload.durationMs ?? 0
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
case "call.dtmf": {
|
|
101
|
-
const payload = evt;
|
|
102
|
-
return {
|
|
103
|
-
...base,
|
|
104
|
-
type: evt.type,
|
|
105
|
-
digits: payload.digits ?? ""
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
case "call.ended": {
|
|
109
|
-
const payload = evt;
|
|
110
|
-
return {
|
|
111
|
-
...base,
|
|
112
|
-
type: evt.type,
|
|
113
|
-
reason: payload.reason ?? "completed"
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
case "call.error": {
|
|
117
|
-
const payload = evt;
|
|
118
|
-
return {
|
|
119
|
-
...base,
|
|
120
|
-
type: evt.type,
|
|
121
|
-
error: payload.error ?? "unknown error",
|
|
122
|
-
retryable: payload.retryable
|
|
81
|
+
isFinal: evt.isFinal ?? true,
|
|
82
|
+
confidence: evt.confidence
|
|
123
83
|
};
|
|
124
84
|
}
|
|
85
|
+
case "call.silence": return {
|
|
86
|
+
...base,
|
|
87
|
+
type: evt.type,
|
|
88
|
+
durationMs: evt.durationMs ?? 0
|
|
89
|
+
};
|
|
90
|
+
case "call.dtmf": return {
|
|
91
|
+
...base,
|
|
92
|
+
type: evt.type,
|
|
93
|
+
digits: evt.digits ?? ""
|
|
94
|
+
};
|
|
95
|
+
case "call.ended": return {
|
|
96
|
+
...base,
|
|
97
|
+
type: evt.type,
|
|
98
|
+
reason: evt.reason ?? "completed"
|
|
99
|
+
};
|
|
100
|
+
case "call.error": return {
|
|
101
|
+
...base,
|
|
102
|
+
type: evt.type,
|
|
103
|
+
error: evt.error ?? "unknown error",
|
|
104
|
+
retryable: evt.retryable
|
|
105
|
+
};
|
|
125
106
|
default: return null;
|
|
126
107
|
}
|
|
127
108
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { l as getHeader, y as escapeXml } from "./runtime-entry-BNOQRXii.mjs";
|
|
2
|
+
import { n as readProviderCallStatus, o as reconstructWebhookUrl, s as verifyPlivoWebhook, t as guardedJsonApiRequest } from "./guarded-json-api-Bqc6QS8A.mjs";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import crypto from "node:crypto";
|
|
5
5
|
//#region extensions/voice-call/src/providers/plivo.ts
|
|
@@ -81,18 +81,14 @@ var PlivoProvider = class PlivoProvider {
|
|
|
81
81
|
}
|
|
82
82
|
parseWebhookEvent(ctx, options) {
|
|
83
83
|
const flow = normalizeOptionalString(ctx.query?.flow) ?? "";
|
|
84
|
-
const parsed =
|
|
85
|
-
if (!parsed) return {
|
|
86
|
-
events: [],
|
|
87
|
-
statusCode: 400
|
|
88
|
-
};
|
|
84
|
+
const parsed = new URLSearchParams(ctx.rawBody);
|
|
89
85
|
const callUuid = parsed.get("CallUUID") || void 0;
|
|
90
86
|
if (callUuid) {
|
|
91
87
|
const webhookBase = this.baseWebhookUrlFromCtx(ctx);
|
|
92
88
|
if (webhookBase) this.callUuidToWebhookUrl.set(callUuid, webhookBase);
|
|
93
89
|
}
|
|
94
90
|
if (flow === "xml-speak") {
|
|
95
|
-
const callId =
|
|
91
|
+
const callId = normalizeOptionalString(ctx.query?.callId);
|
|
96
92
|
const pending = callId ? this.pendingSpeakByCallId.get(callId) : void 0;
|
|
97
93
|
if (callId) this.pendingSpeakByCallId.delete(callId);
|
|
98
94
|
const actionUrl = pending?.listenAfterPlayback && callId ? this.buildActionUrl(ctx, {
|
|
@@ -111,7 +107,7 @@ var PlivoProvider = class PlivoProvider {
|
|
|
111
107
|
};
|
|
112
108
|
}
|
|
113
109
|
if (flow === "xml-listen") {
|
|
114
|
-
const callId =
|
|
110
|
+
const callId = normalizeOptionalString(ctx.query?.callId);
|
|
115
111
|
const pending = callId ? this.pendingListenByCallId.get(callId) : void 0;
|
|
116
112
|
if (callId) this.pendingListenByCallId.delete(callId);
|
|
117
113
|
const actionUrl = this.buildActionUrl(ctx, {
|
|
@@ -128,7 +124,7 @@ var PlivoProvider = class PlivoProvider {
|
|
|
128
124
|
statusCode: 200
|
|
129
125
|
};
|
|
130
126
|
}
|
|
131
|
-
const callIdFromQuery =
|
|
127
|
+
const callIdFromQuery = normalizeOptionalString(ctx.query?.callId);
|
|
132
128
|
const dedupeKey = options?.verifiedRequestKey ?? createPlivoRequestDedupeKey(ctx);
|
|
133
129
|
const event = this.normalizeEvent(parsed, callIdFromQuery, dedupeKey);
|
|
134
130
|
return {
|
|
@@ -181,7 +177,7 @@ var PlivoProvider = class PlivoProvider {
|
|
|
181
177
|
const event = {
|
|
182
178
|
...baseEvent,
|
|
183
179
|
type: "call.ended",
|
|
184
|
-
reason: callStatus
|
|
180
|
+
reason: callStatus
|
|
185
181
|
};
|
|
186
182
|
this.releaseCallState({
|
|
187
183
|
callId: baseEvent.callId || void 0,
|
|
@@ -325,32 +321,21 @@ var PlivoProvider = class PlivoProvider {
|
|
|
325
321
|
"machine",
|
|
326
322
|
"hangup"
|
|
327
323
|
]);
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
});
|
|
338
|
-
if (!data) return {
|
|
339
|
-
status: "not-found",
|
|
340
|
-
isTerminal: true
|
|
341
|
-
};
|
|
324
|
+
return readProviderCallStatus(() => guardedJsonApiRequest({
|
|
325
|
+
url: `${this.baseUrl}/Call/${input.providerCallId}/`,
|
|
326
|
+
method: "GET",
|
|
327
|
+
headers: { Authorization: `Basic ${Buffer.from(`${this.authId}:${this.authToken}`).toString("base64")}` },
|
|
328
|
+
allowNotFound: true,
|
|
329
|
+
allowedHostnames: [this.apiHost],
|
|
330
|
+
auditContext: "plivo-get-call-status",
|
|
331
|
+
errorPrefix: "Plivo get call status error"
|
|
332
|
+
}), (data) => {
|
|
342
333
|
const status = data.call_status ?? "unknown";
|
|
343
334
|
return {
|
|
344
335
|
status,
|
|
345
336
|
isTerminal: terminalStatuses.has(status)
|
|
346
337
|
};
|
|
347
|
-
}
|
|
348
|
-
return {
|
|
349
|
-
status: "error",
|
|
350
|
-
isTerminal: false,
|
|
351
|
-
isUnknown: true
|
|
352
|
-
};
|
|
353
|
-
}
|
|
338
|
+
});
|
|
354
339
|
}
|
|
355
340
|
static normalizeNumber(numberOrSip) {
|
|
356
341
|
const trimmed = numberOrSip.trim();
|
|
@@ -392,9 +377,6 @@ var PlivoProvider = class PlivoProvider {
|
|
|
392
377
|
<Wait length="300" />
|
|
393
378
|
</Response>`;
|
|
394
379
|
}
|
|
395
|
-
getCallIdFromQuery(ctx) {
|
|
396
|
-
return normalizeOptionalString(ctx.query?.callId) || void 0;
|
|
397
|
-
}
|
|
398
380
|
buildActionUrl(ctx, opts) {
|
|
399
381
|
const base = this.baseWebhookUrlFromCtx(ctx);
|
|
400
382
|
if (!base) return null;
|
|
@@ -421,13 +403,6 @@ var PlivoProvider = class PlivoProvider {
|
|
|
421
403
|
return null;
|
|
422
404
|
}
|
|
423
405
|
}
|
|
424
|
-
parseBody(rawBody) {
|
|
425
|
-
try {
|
|
426
|
-
return new URLSearchParams(rawBody);
|
|
427
|
-
} catch {
|
|
428
|
-
return null;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
406
|
static extractTranscript(params) {
|
|
432
407
|
for (const key of [
|
|
433
408
|
"Speech",
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
3
|
+
import { root } from "openclaw/plugin-sdk/security-runtime";
|
|
4
|
+
import { resolveAgentIdentity, resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
5
|
+
//#region extensions/voice-call/src/realtime-agent-context.legacy.ts
|
|
6
|
+
function limitLegacyContextText(text, maxChars) {
|
|
7
|
+
if (text.length <= maxChars) return text;
|
|
8
|
+
const truncated = `${truncateUtf16Safe(text, Math.max(0, maxChars - 32)).trimEnd()}\n[truncated]`;
|
|
9
|
+
return truncateUtf16Safe(truncated, maxChars);
|
|
10
|
+
}
|
|
11
|
+
async function buildLegacyRealtimeVoiceAgentContext(params) {
|
|
12
|
+
const { config, coreConfig, agentId } = params;
|
|
13
|
+
if (!config.enabled) return;
|
|
14
|
+
const capsule = [
|
|
15
|
+
"OpenClaw agent voice context:",
|
|
16
|
+
`- Agent id: ${agentId}`,
|
|
17
|
+
"- Use this context to match the OpenClaw agent's personality and standing preferences on fast voice turns.",
|
|
18
|
+
"- Treat this as compact context only; call openclaw_agent_consult when the caller needs the full agent brain, tools, memory, or workspace state."
|
|
19
|
+
];
|
|
20
|
+
if (config.includeIdentity) {
|
|
21
|
+
const identity = asOptionalRecord(resolveAgentIdentity(coreConfig, agentId));
|
|
22
|
+
const lines = [
|
|
23
|
+
["Name", identity?.name],
|
|
24
|
+
["Emoji", identity?.emoji],
|
|
25
|
+
["Vibe", identity?.vibe],
|
|
26
|
+
["Theme", identity?.theme],
|
|
27
|
+
["Creature/persona", identity?.creature]
|
|
28
|
+
].flatMap(([label, value]) => {
|
|
29
|
+
const text = normalizeOptionalString(value);
|
|
30
|
+
return text ? [`- ${label}: ${text}`] : [];
|
|
31
|
+
});
|
|
32
|
+
if (lines.length > 0) capsule.push(`Configured identity:\n${lines.join("\n")}`);
|
|
33
|
+
}
|
|
34
|
+
if (config.includeWorkspaceFiles) {
|
|
35
|
+
const workspace = await root(resolveAgentWorkspaceDir(coreConfig, agentId)).catch(() => null);
|
|
36
|
+
if (workspace) {
|
|
37
|
+
const sections = [];
|
|
38
|
+
let remaining = config.maxChars;
|
|
39
|
+
for (const file of config.files) {
|
|
40
|
+
if (remaining <= 0) continue;
|
|
41
|
+
const trimmed = (await workspace.readText(file).catch(() => void 0))?.trim();
|
|
42
|
+
if (!trimmed) continue;
|
|
43
|
+
const section = `### ${file}\n${limitLegacyContextText(trimmed, Math.max(0, remaining - file.length - 16))}`;
|
|
44
|
+
sections.push(section);
|
|
45
|
+
remaining -= section.length;
|
|
46
|
+
}
|
|
47
|
+
if (sections.length > 0) capsule.push(`Workspace voice context:\n${sections.join("\n\n")}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return limitLegacyContextText(capsule.join("\n\n"), config.maxChars);
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { buildLegacyRealtimeVoiceAgentContext };
|