@elizaos/capacitor-bun-runtime 2.0.11-beta.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.
Files changed (61) hide show
  1. package/ElizaosCapacitorBunRuntime.podspec +54 -0
  2. package/LICENSE +21 -0
  3. package/README.md +127 -0
  4. package/dist/esm/definitions.d.ts +136 -0
  5. package/dist/esm/definitions.d.ts.map +1 -0
  6. package/dist/esm/definitions.js +14 -0
  7. package/dist/esm/definitions.js.map +1 -0
  8. package/dist/esm/index.d.ts +9 -0
  9. package/dist/esm/index.d.ts.map +1 -0
  10. package/dist/esm/index.js +11 -0
  11. package/dist/esm/index.js.map +1 -0
  12. package/dist/esm/web.d.ts +19 -0
  13. package/dist/esm/web.d.ts.map +1 -0
  14. package/dist/esm/web.js +44 -0
  15. package/dist/esm/web.js.map +1 -0
  16. package/dist/plugin.cjs.js +63 -0
  17. package/dist/plugin.cjs.js.map +1 -0
  18. package/dist/plugin.js +66 -0
  19. package/dist/plugin.js.map +1 -0
  20. package/ios/Sources/ElizaBunRuntimePlugin/BridgeInstaller.swift +94 -0
  21. package/ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntime.swift +705 -0
  22. package/ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntimePlugin.swift +1109 -0
  23. package/ios/Sources/ElizaBunRuntimePlugin/FullBunEngineHost.swift +677 -0
  24. package/ios/Sources/ElizaBunRuntimePlugin/JSContextHelpers.swift +226 -0
  25. package/ios/Sources/ElizaBunRuntimePlugin/SandboxPaths.swift +46 -0
  26. package/ios/Sources/ElizaBunRuntimePlugin/bridge/CryptoBridge.swift +238 -0
  27. package/ios/Sources/ElizaBunRuntimePlugin/bridge/ElizaSqliteVecBridge.m +28 -0
  28. package/ios/Sources/ElizaBunRuntimePlugin/bridge/FSBridge.swift +270 -0
  29. package/ios/Sources/ElizaBunRuntimePlugin/bridge/HTTPBridge.swift +153 -0
  30. package/ios/Sources/ElizaBunRuntimePlugin/bridge/HTTPServerBridge.swift +32 -0
  31. package/ios/Sources/ElizaBunRuntimePlugin/bridge/LlamaBridge.swift +233 -0
  32. package/ios/Sources/ElizaBunRuntimePlugin/bridge/LlamaBridgeImpl.swift +1863 -0
  33. package/ios/Sources/ElizaBunRuntimePlugin/bridge/LogBridge.swift +36 -0
  34. package/ios/Sources/ElizaBunRuntimePlugin/bridge/PathsBridge.swift +41 -0
  35. package/ios/Sources/ElizaBunRuntimePlugin/bridge/ProcessBridge.swift +80 -0
  36. package/ios/Sources/ElizaBunRuntimePlugin/bridge/SqliteBridge.swift +406 -0
  37. package/ios/Sources/ElizaBunRuntimePlugin/bridge/SqliteBridgeInstaller.swift +17 -0
  38. package/ios/Sources/ElizaBunRuntimePlugin/bridge/SqliteVecLoader.swift +66 -0
  39. package/ios/Sources/ElizaBunRuntimePlugin/bridge/UIBridge.swift +72 -0
  40. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlChinesePhonemizer.swift +313 -0
  41. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlConfiguration.swift +28 -0
  42. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlEngine.swift +325 -0
  43. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlHindiPhonemizer.swift +150 -0
  44. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlJapanesePhonemizer.swift +209 -0
  45. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlLatinPhonemizer.swift +374 -0
  46. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlModel.swift +87 -0
  47. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlPhonemizer.swift +679 -0
  48. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlPronunciationDicts.swift +131 -0
  49. package/ios/Sources/ElizaBunRuntimePlugin/kokoro/KokoroCoreMlSupport.swift +24 -0
  50. package/ios/Tests/llama-bridge-smoke-main.swift +92 -0
  51. package/package.json +68 -0
  52. package/src/bridge-contract.test.ts +127 -0
  53. package/src/definitions.d.ts +136 -0
  54. package/src/definitions.d.ts.map +1 -0
  55. package/src/definitions.ts +152 -0
  56. package/src/index.d.ts +9 -0
  57. package/src/index.d.ts.map +1 -0
  58. package/src/index.ts +16 -0
  59. package/src/web.d.ts +19 -0
  60. package/src/web.d.ts.map +1 -0
  61. package/src/web.ts +80 -0
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+ include_llama = %w[1 true yes on].include?(ENV.fetch('ELIZA_IOS_INCLUDE_LLAMA', '').downcase)
5
+ include_full_bun_engine = %w[1 true yes on].include?(ENV.fetch('ELIZA_IOS_FULL_BUN_ENGINE', '').downcase)
6
+ full_bun_frameworks = ['Network', 'Accelerate', 'Metal', 'MetalKit', 'MetalPerformanceShaders', 'Foundation', 'CoreML', 'NaturalLanguage']
7
+ compat_frameworks = ['JavaScriptCore', *full_bun_frameworks]
8
+ frameworks = include_full_bun_engine ? full_bun_frameworks : compat_frameworks
9
+ swift_flags = '$(inherited)'
10
+ swift_flags += ' -D ELIZA_IOS_INCLUDE_LLAMA' if include_llama
11
+ swift_flags += ' -D ELIZA_IOS_FULL_BUN_ENGINE' if include_full_bun_engine
12
+ other_ldflags = '$(inherited) -ObjC'
13
+ other_ldflags += ' -l"llama"' if include_llama
14
+ library_search_paths = '$(inherited)'
15
+ library_search_paths += ' "${PODS_XCFRAMEWORKS_BUILD_DIR}/LlamaCpp"' if include_llama
16
+ source_files = if include_full_bun_engine
17
+ [
18
+ 'ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntimePlugin.swift',
19
+ 'ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntime.swift',
20
+ 'ios/Sources/ElizaBunRuntimePlugin/FullBunEngineHost.swift',
21
+ 'ios/Sources/ElizaBunRuntimePlugin/SandboxPaths.swift',
22
+ 'ios/Sources/ElizaBunRuntimePlugin/bridge/LlamaBridgeImpl.swift',
23
+ 'ios/Sources/ElizaBunRuntimePlugin/kokoro/**/*.swift'
24
+ ]
25
+ else
26
+ 'ios/Sources/**/*.{swift,m,mm,h}'
27
+ end
28
+
29
+ Pod::Spec.new do |s|
30
+ s.name = 'ElizaosCapacitorBunRuntime'
31
+ s.version = package['version']
32
+ s.summary = package['description']
33
+ s.license = package['license'] || { :type => 'MIT' }
34
+ s.homepage = 'https://github.com/elizaOS'
35
+ s.authors = { 'elizaOS' => 'shaw@elizalabs.ai' }
36
+ s.source = { :git => 'https://github.com/elizaOS/eliza.git', :tag => s.version.to_s }
37
+ s.source_files = source_files
38
+ s.ios.deployment_target = '15.0'
39
+ s.dependency 'Capacitor'
40
+ s.dependency 'LlamaCpp' if include_llama
41
+ s.dependency 'LlamaCppCapacitor' if include_llama
42
+ s.dependency 'ElizaBunEngine' if include_full_bun_engine
43
+ s.frameworks = frameworks
44
+ s.libraries = 'c++', 'c++abi'
45
+ s.swift_version = '5.9'
46
+
47
+ s.pod_target_xcconfig = {
48
+ 'OTHER_LDFLAGS' => other_ldflags,
49
+ 'OTHER_SWIFT_FLAGS' => swift_flags,
50
+ 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
51
+ 'CLANG_CXX_LIBRARY' => 'libc++',
52
+ 'LIBRARY_SEARCH_PATHS' => library_search_paths
53
+ }
54
+ end
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shaw Walters and elizaOS Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # @elizaos/capacitor-bun-runtime
2
+
3
+ Native host package for the local agent runtime. The iOS Swift implementation
4
+ can run in two modes:
5
+
6
+ - `engine: "auto"` / `engine: "bun"`: uses the directly linked
7
+ `ElizaBunEngine.framework` from `@elizaos/bun-ios-runtime` when the app was
8
+ built with `ELIZA_IOS_FULL_BUN_ENGINE=1`. Store-distributed iOS local mode
9
+ must use `engine: "bun"` and fail closed if the framework is missing.
10
+ - `engine: "compat"`: hosts a `JSContext` compatibility bridge on a dedicated
11
+ worker thread, installs the `__ELIZA_BRIDGE__` host functions, and loads the
12
+ staged iOS agent payload from `public/agent/agent-bundle.js`. This path is
13
+ development/sideload-only.
14
+
15
+ The full Bun engine artifact is produced outside this package by the
16
+ `packages/native/bun-runtime` build harness and an `elizaos/bun` fork.
17
+
18
+ The Android implementation delegates lifecycle and RPC calls to the host app's
19
+ `ElizaAgentService` over its loopback API.
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ bun add @elizaos/capacitor-bun-runtime
25
+ ```
26
+
27
+ Capacitor 8 auto-discovers the plugin via the package metadata. Re-run
28
+ `pod install` after adding it so the `ElizaosCapacitorBunRuntime` pod links
29
+ into your iOS workspace. The pod depends on `Capacitor` and links system
30
+ frameworks including `JavaScriptCore` (compat builds only), `Network`,
31
+ `Accelerate`, `Metal`, `MetalKit`, `MetalPerformanceShaders`, `Foundation`,
32
+ `CoreML`, and `NaturalLanguage`. When `ELIZA_IOS_INCLUDE_LLAMA=1`, it also
33
+ depends on `LlamaCpp` and `LlamaCppCapacitor` for native llama.cpp symbols.
34
+
35
+ ## Bundle layout
36
+
37
+ The local iOS build stages these resources under `App/public/agent/`, which is
38
+ copied into the app bundle by Capacitor's `public` folder resource:
39
+
40
+ - `agent-bundle.js` — the Bun-targeted agent bundle from
41
+ `packages/agent/dist-mobile-ios/`. Required for the full backend path.
42
+ - `pglite.wasm`, `initdb.wasm`, `pglite.data`, `vector.tar.gz`,
43
+ `fuzzystrmatch.tar.gz` — PGlite runtime assets used by the agent bundle.
44
+ - `eliza-polyfill-prefix.js` — the polyfill prefix that maps `Bun.*` /
45
+ `node:*` onto `__ELIZA_BRIDGE__` for the compatibility JSContext path.
46
+ Optional; the runtime ships a minimal embedded fallback that just
47
+ version-checks the bridge.
48
+
49
+ ## Usage
50
+
51
+ ```ts
52
+ import { ElizaBunRuntime } from "@elizaos/capacitor-bun-runtime";
53
+
54
+ // Development/sideload only: auto-selects the full Bun engine when embedded,
55
+ // otherwise falls back to the JSContext compatibility bridge in DEBUG builds.
56
+ await ElizaBunRuntime.start({ engine: "auto" });
57
+
58
+ // Store iOS local mode: require the full Bun engine. This returns { ok: false }
59
+ // if the framework is not embedded in the app bundle.
60
+ await ElizaBunRuntime.start({
61
+ engine: "bun",
62
+ argv: ["bun", "public/agent/agent-bundle.js", "ios-bridge", "--stdio"],
63
+ });
64
+
65
+ // Round-trips a chat message through the agent's send_message handler,
66
+ // which must have been registered via bridge.ui_register_handler.
67
+ const { reply } = await ElizaBunRuntime.sendMessage({ message: "hello" });
68
+
69
+ // Generic dispatch into any handler the agent registered.
70
+ const { result } = await ElizaBunRuntime.call({
71
+ method: "http_request",
72
+ args: { method: "GET", path: "/api/health" },
73
+ });
74
+
75
+ // Check ready state, current model, throughput.
76
+ const status = await ElizaBunRuntime.getStatus();
77
+
78
+ // Tear down the runtime. Releases the JSContext or full Bun engine host.
79
+ await ElizaBunRuntime.stop();
80
+ ```
81
+
82
+ ## Bridge contract
83
+
84
+ The full-engine ABI lives in
85
+ `packages/native/bun-runtime/BRIDGE_CONTRACT.md`. The compatibility host still
86
+ implements the Swift `__ELIZA_BRIDGE__` v1 surface; breaking changes bump the
87
+ version string emitted in `globalThis.__ELIZA_BRIDGE_VERSION__`.
88
+
89
+ In production full Bun mode, the Swift host calls the directly linked
90
+ `ElizaBunEngine` ABI, starts `agent-bundle.js ios-bridge --stdio`, and forwards
91
+ React requests through `ElizaBunRuntime.call({ method: "http_request", args })`.
92
+ `packages/ui/src/api/ios-local-agent-transport.ts` uses that path first when
93
+ the native plugin is available. The JSContext compatibility host is retained
94
+ only for development/sideload builds; iOS store builds fail closed instead of
95
+ falling back to it.
96
+
97
+ ## Llama backend
98
+
99
+ `llama_*` host functions delegate to `LlamaBridgeImpl`, which links against the
100
+ same `LlamaCpp.xcframework` built by the iOS local-inference pipeline. The
101
+ xcframework build also emits the small `eliza_llama_*` C helpers needed by the
102
+ Swift direct bridge.
103
+
104
+ ## Events
105
+
106
+ The plugin emits two Capacitor events:
107
+
108
+ - `eliza:ui` — every `bridge.ui_post_message(channel, payload)` call.
109
+ Subscribe with `ElizaBunRuntime.addListener("eliza:ui", handler)`.
110
+ - `eliza:runtime-exit` — fired when the agent calls
111
+ `bridge.exit(code)`. Useful for surfacing crashes to the React shell.
112
+
113
+ ## Limitations (v1)
114
+
115
+ - Android requires the host app's `ElizaAgentService` loopback API.
116
+ - Full Bun is only used when `ElizaBunEngine.framework` is embedded. Outside
117
+ iOS store local mode, `engine: "auto"` can fall back to the compatibility
118
+ JSContext host for development/sideload builds.
119
+ - The full Bun bridge currently buffers HTTP response bodies over stdio. It is
120
+ correct for API calls, but token-by-token streaming needs a follow-up stream
121
+ envelope.
122
+ - No `worker_threads.Worker` support in the compatibility host.
123
+ - No `child_process` — sandboxed out.
124
+ - `http_serve_*` is disabled on iOS. Foreground and route traffic uses
125
+ Capacitor/engine IPC instead of a WebView-visible localhost listener.
126
+ - `bun:ffi.dlopen` is forbidden. The only FFI surface is the llama
127
+ bridge.
@@ -0,0 +1,136 @@
1
+ /**
2
+ * @elizaos/capacitor-bun-runtime — iOS embedded Bun-shape JS runtime.
3
+ *
4
+ * Hosts a JavaScriptCore JSContext on a dedicated worker thread. The native
5
+ * plugin either starts a bundled full Bun engine framework or installs the
6
+ * `__ELIZA_BRIDGE__` host functions for the compatibility JSContext path.
7
+ * The full-engine ABI lives in packages/native/bun-runtime/BRIDGE_CONTRACT.md.
8
+ *
9
+ * The plugin exposes a tiny surface to the React UI: start the runtime,
10
+ * send messages, check status, and stop it. Everything else flows over the
11
+ * `ui_post_message` / `ui_register_handler` channel inside the native side.
12
+ */
13
+ export interface StartOptions {
14
+ /**
15
+ * Runtime engine selection:
16
+ * - "auto" (default): use a bundled full Bun engine when present. The
17
+ * JSContext compatibility fallback is for development/sideload builds only;
18
+ * iOS store local mode must request "bun" and fail if the engine is missing.
19
+ * - "bun": require ElizaBunEngine.framework and fail if it is missing.
20
+ * - "compat": force the JSContext compatibility bridge for development.
21
+ */
22
+ engine?: "auto" | "bun" | "compat";
23
+ /**
24
+ * Path to the agent bundle JavaScript file. When omitted, the runtime
25
+ * loads the staged iOS agent payload from `public/agent/agent-bundle.js`
26
+ * in the main app bundle resources. Legacy JSContext development bundles
27
+ * named `agent-bundle-ios.js` are still probed for compatibility.
28
+ * Use this only for development overrides.
29
+ */
30
+ bundlePath?: string;
31
+ /**
32
+ * Optional polyfill prefix loaded before the agent bundle. When omitted,
33
+ * the runtime loads `eliza-polyfill-prefix.js` from the main app bundle
34
+ * resources, or falls back to a minimal embedded prefix.
35
+ */
36
+ polyfillPath?: string;
37
+ /**
38
+ * Initial environment variables visible to the agent via `env_get` / `env_keys`.
39
+ */
40
+ env?: Record<string, string>;
41
+ /**
42
+ * argv vector exposed to the agent via `argv()`. Defaults to
43
+ * `["bun", "public/agent/agent-bundle.js"]`.
44
+ */
45
+ argv?: string[];
46
+ }
47
+ export interface StartResult {
48
+ ok: boolean;
49
+ error?: string;
50
+ /** Version string emitted by `__ELIZA_BRIDGE_VERSION__`. */
51
+ bridgeVersion?: string;
52
+ }
53
+ export interface SendMessageOptions {
54
+ message: string;
55
+ /** Optional conversation/thread identifier passed through to the agent. */
56
+ conversationId?: string;
57
+ }
58
+ export interface SendMessageResult {
59
+ reply: string;
60
+ }
61
+ export interface GetStatusResult {
62
+ ready: boolean;
63
+ /** Active runtime engine: full Bun framework or compatibility bridge. */
64
+ engine?: "bun" | "compat";
65
+ /** Currently loaded llama model path, if any. */
66
+ model?: string;
67
+ /** Last observed generation throughput. */
68
+ tokensPerSecond?: number;
69
+ /** Bridge version string, e.g. "v1". */
70
+ bridgeVersion?: string;
71
+ }
72
+ /**
73
+ * Generic call surface for any UI handler the agent has registered via
74
+ * `bridge.ui_register_handler`. The React UI passes a method name and args;
75
+ * the native plugin dispatches into the JSContext and returns the result.
76
+ */
77
+ export interface CallOptions {
78
+ method: string;
79
+ args?: unknown;
80
+ }
81
+ export interface CallResult {
82
+ result: unknown;
83
+ }
84
+ export interface LocalTtsStatusResult {
85
+ ready: boolean;
86
+ status: "assets-ready" | "engine-ready" | "ready" | "missing" | "unavailable";
87
+ message: string;
88
+ modelId?: string;
89
+ bundleDir?: string;
90
+ }
91
+ export interface LocalTtsDiagnosticsOptions {
92
+ bundleDir?: string;
93
+ probe?: boolean;
94
+ text?: string;
95
+ }
96
+ export interface LocalTtsDiagnosticsResult {
97
+ available: boolean;
98
+ selectedBundleDir?: string;
99
+ modelId?: string;
100
+ message?: string;
101
+ [key: string]: unknown;
102
+ }
103
+ export interface SynthesizeLocalTtsOptions {
104
+ text: string;
105
+ bundleDir?: string;
106
+ speakerPresetId?: string;
107
+ voice?: string;
108
+ voiceId?: string;
109
+ maxSamples?: number;
110
+ play?: boolean;
111
+ }
112
+ export interface SynthesizeLocalTtsResult {
113
+ audioBase64?: string;
114
+ contentType: "audio/wav";
115
+ sampleRate: number;
116
+ samples: number;
117
+ durationMs: number;
118
+ modelId?: string;
119
+ played?: boolean;
120
+ }
121
+ export interface ElizaBunRuntimePlugin {
122
+ start(options: StartOptions): Promise<StartResult>;
123
+ sendMessage(options: SendMessageOptions): Promise<SendMessageResult>;
124
+ getStatus(): Promise<GetStatusResult>;
125
+ stop(): Promise<void>;
126
+ getLocalTtsStatus(): Promise<LocalTtsStatusResult>;
127
+ getLocalTtsDiagnostics(options?: LocalTtsDiagnosticsOptions): Promise<LocalTtsDiagnosticsResult>;
128
+ synthesizeLocalTts(options: SynthesizeLocalTtsOptions): Promise<SynthesizeLocalTtsResult>;
129
+ /**
130
+ * Invoke an arbitrary UI handler that the agent has registered via
131
+ * `bridge.ui_register_handler`. Useful for routing arbitrary RPC-style
132
+ * traffic from the React UI into the agent.
133
+ */
134
+ call(options: CallOptions): Promise<CallResult>;
135
+ }
136
+ //# sourceMappingURL=definitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @elizaos/capacitor-bun-runtime — iOS embedded Bun-shape JS runtime.
3
+ *
4
+ * Hosts a JavaScriptCore JSContext on a dedicated worker thread. The native
5
+ * plugin either starts a bundled full Bun engine framework or installs the
6
+ * `__ELIZA_BRIDGE__` host functions for the compatibility JSContext path.
7
+ * The full-engine ABI lives in packages/native/bun-runtime/BRIDGE_CONTRACT.md.
8
+ *
9
+ * The plugin exposes a tiny surface to the React UI: start the runtime,
10
+ * send messages, check status, and stop it. Everything else flows over the
11
+ * `ui_post_message` / `ui_register_handler` channel inside the native side.
12
+ */
13
+ export {};
14
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
@@ -0,0 +1,9 @@
1
+ import type { ElizaBunRuntimePlugin } from "./definitions";
2
+ export * from "./definitions";
3
+ /**
4
+ * The native plugin is registered under the JS name `ElizaBunRuntime`. The
5
+ * Swift class in `ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntimePlugin.swift`
6
+ * exposes the matching `jsName`.
7
+ */
8
+ export declare const ElizaBunRuntime: ElizaBunRuntimePlugin;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,cAAc,eAAe,CAAC;AAE9B;;;;GAIG;AACH,eAAO,MAAM,eAAe,uBAK3B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { registerPlugin } from "@capacitor/core";
2
+ export * from "./definitions";
3
+ /**
4
+ * The native plugin is registered under the JS name `ElizaBunRuntime`. The
5
+ * Swift class in `ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntimePlugin.swift`
6
+ * exposes the matching `jsName`.
7
+ */
8
+ export const ElizaBunRuntime = registerPlugin("ElizaBunRuntime", {
9
+ web: () => import("./web").then((m) => new m.ElizaBunRuntimeWeb()),
10
+ });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,cAAc,eAAe,CAAC;AAE9B;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAC3C,iBAAiB,EACjB;IACE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;CACnE,CACF,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { WebPlugin } from "@capacitor/core";
2
+ import type { CallOptions, CallResult, ElizaBunRuntimePlugin, GetStatusResult, LocalTtsDiagnosticsOptions, LocalTtsDiagnosticsResult, LocalTtsStatusResult, SendMessageOptions, SendMessageResult, SynthesizeLocalTtsOptions, SynthesizeLocalTtsResult, StartOptions, StartResult } from "./definitions";
3
+ /**
4
+ * Web fallback for `@elizaos/capacitor-bun-runtime`.
5
+ *
6
+ * Browser environments do not host the native runtime. This implementation
7
+ * reports an unavailable status and throws clear errors for runtime calls.
8
+ */
9
+ export declare class ElizaBunRuntimeWeb extends WebPlugin implements ElizaBunRuntimePlugin {
10
+ start(_options: StartOptions): Promise<StartResult>;
11
+ sendMessage(_options: SendMessageOptions): Promise<SendMessageResult>;
12
+ getStatus(): Promise<GetStatusResult>;
13
+ stop(): Promise<void>;
14
+ getLocalTtsStatus(): Promise<LocalTtsStatusResult>;
15
+ getLocalTtsDiagnostics(_options?: LocalTtsDiagnosticsOptions): Promise<LocalTtsDiagnosticsResult>;
16
+ synthesizeLocalTts(_options: SynthesizeLocalTtsOptions): Promise<SynthesizeLocalTtsResult>;
17
+ call(_options: CallOptions): Promise<CallResult>;
18
+ }
19
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,WAAW,EACZ,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,qBAAa,kBACX,SAAQ,SACR,YAAW,qBAAqB;IAE1B,KAAK,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IAQnD,WAAW,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAMrE,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IAIrC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,iBAAiB,IAAI,OAAO,CAAC,oBAAoB,CAAC;IASlD,sBAAsB,CAC1B,QAAQ,CAAC,EAAE,0BAA0B,GACpC,OAAO,CAAC,yBAAyB,CAAC;IAQ/B,kBAAkB,CACtB,QAAQ,EAAE,yBAAyB,GAClC,OAAO,CAAC,wBAAwB,CAAC;IAM9B,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;CAGvD"}
@@ -0,0 +1,44 @@
1
+ import { WebPlugin } from "@capacitor/core";
2
+ /**
3
+ * Web fallback for `@elizaos/capacitor-bun-runtime`.
4
+ *
5
+ * Browser environments do not host the native runtime. This implementation
6
+ * reports an unavailable status and throws clear errors for runtime calls.
7
+ */
8
+ export class ElizaBunRuntimeWeb extends WebPlugin {
9
+ async start(_options) {
10
+ return {
11
+ ok: false,
12
+ error: "ElizaBunRuntime is not available on web. Run on an iOS device or simulator.",
13
+ };
14
+ }
15
+ async sendMessage(_options) {
16
+ throw this.unavailable("ElizaBunRuntime.sendMessage is unavailable on web.");
17
+ }
18
+ async getStatus() {
19
+ return { ready: false };
20
+ }
21
+ async stop() {
22
+ return;
23
+ }
24
+ async getLocalTtsStatus() {
25
+ return {
26
+ ready: false,
27
+ status: "unavailable",
28
+ message: "ElizaBunRuntime local TTS is not available on web. Run on an iOS device or simulator.",
29
+ };
30
+ }
31
+ async getLocalTtsDiagnostics(_options) {
32
+ return {
33
+ available: false,
34
+ message: "ElizaBunRuntime local TTS diagnostics are not available on web. Run on an iOS device or simulator.",
35
+ };
36
+ }
37
+ async synthesizeLocalTts(_options) {
38
+ throw this.unavailable("ElizaBunRuntime.synthesizeLocalTts is unavailable on web.");
39
+ }
40
+ async call(_options) {
41
+ throw this.unavailable("ElizaBunRuntime.call is unavailable on web.");
42
+ }
43
+ }
44
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAiB5C;;;;;GAKG;AACH,MAAM,OAAO,kBACX,SAAQ,SAAS;IAGjB,KAAK,CAAC,KAAK,CAAC,QAAsB;QAChC,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EACH,6EAA6E;SAChF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,QAA4B;QAC5C,MAAM,IAAI,CAAC,WAAW,CACpB,oDAAoD,CACrD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO;IACT,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,aAAa;YACrB,OAAO,EACL,uFAAuF;SAC1F,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,sBAAsB,CAC1B,QAAqC;QAErC,OAAO;YACL,SAAS,EAAE,KAAK;YAChB,OAAO,EACL,oGAAoG;SACvG,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,QAAmC;QAEnC,MAAM,IAAI,CAAC,WAAW,CACpB,2DAA2D,CAC5D,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAqB;QAC9B,MAAM,IAAI,CAAC,WAAW,CAAC,6CAA6C,CAAC,CAAC;IACxE,CAAC;CACF"}
@@ -0,0 +1,63 @@
1
+ 'use strict';
2
+
3
+ var core = require('@capacitor/core');
4
+
5
+ /**
6
+ * The native plugin is registered under the JS name `ElizaBunRuntime`. The
7
+ * Swift class in `ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntimePlugin.swift`
8
+ * exposes the matching `jsName`.
9
+ */
10
+ const ElizaBunRuntime = core.registerPlugin("ElizaBunRuntime", {
11
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ElizaBunRuntimeWeb()),
12
+ });
13
+
14
+ /**
15
+ * Web fallback for `@elizaos/capacitor-bun-runtime`.
16
+ *
17
+ * Browser environments do not host the native runtime. This implementation
18
+ * reports an unavailable status and throws clear errors for runtime calls.
19
+ */
20
+ class ElizaBunRuntimeWeb extends core.WebPlugin {
21
+ async start(_options) {
22
+ return {
23
+ ok: false,
24
+ error: "ElizaBunRuntime is not available on web. Run on an iOS device or simulator.",
25
+ };
26
+ }
27
+ async sendMessage(_options) {
28
+ throw this.unavailable("ElizaBunRuntime.sendMessage is unavailable on web.");
29
+ }
30
+ async getStatus() {
31
+ return { ready: false };
32
+ }
33
+ async stop() {
34
+ return;
35
+ }
36
+ async getLocalTtsStatus() {
37
+ return {
38
+ ready: false,
39
+ status: "unavailable",
40
+ message: "ElizaBunRuntime local TTS is not available on web. Run on an iOS device or simulator.",
41
+ };
42
+ }
43
+ async getLocalTtsDiagnostics(_options) {
44
+ return {
45
+ available: false,
46
+ message: "ElizaBunRuntime local TTS diagnostics are not available on web. Run on an iOS device or simulator.",
47
+ };
48
+ }
49
+ async synthesizeLocalTts(_options) {
50
+ throw this.unavailable("ElizaBunRuntime.synthesizeLocalTts is unavailable on web.");
51
+ }
52
+ async call(_options) {
53
+ throw this.unavailable("ElizaBunRuntime.call is unavailable on web.");
54
+ }
55
+ }
56
+
57
+ var web = /*#__PURE__*/Object.freeze({
58
+ __proto__: null,
59
+ ElizaBunRuntimeWeb: ElizaBunRuntimeWeb
60
+ });
61
+
62
+ exports.ElizaBunRuntime = ElizaBunRuntime;
63
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nexport * from \"./definitions\";\n/**\n * The native plugin is registered under the JS name `ElizaBunRuntime`. The\n * Swift class in `ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntimePlugin.swift`\n * exposes the matching `jsName`.\n */\nexport const ElizaBunRuntime = registerPlugin(\"ElizaBunRuntime\", {\n web: () => import(\"./web\").then((m) => new m.ElizaBunRuntimeWeb()),\n});\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\n/**\n * Web fallback for `@elizaos/capacitor-bun-runtime`.\n *\n * Browser environments do not host the native runtime. This implementation\n * reports an unavailable status and throws clear errors for runtime calls.\n */\nexport class ElizaBunRuntimeWeb extends WebPlugin {\n async start(_options) {\n return {\n ok: false,\n error: \"ElizaBunRuntime is not available on web. Run on an iOS device or simulator.\",\n };\n }\n async sendMessage(_options) {\n throw this.unavailable(\"ElizaBunRuntime.sendMessage is unavailable on web.\");\n }\n async getStatus() {\n return { ready: false };\n }\n async stop() {\n return;\n }\n async getLocalTtsStatus() {\n return {\n ready: false,\n status: \"unavailable\",\n message: \"ElizaBunRuntime local TTS is not available on web. Run on an iOS device or simulator.\",\n };\n }\n async getLocalTtsDiagnostics(_options) {\n return {\n available: false,\n message: \"ElizaBunRuntime local TTS diagnostics are not available on web. Run on an iOS device or simulator.\",\n };\n }\n async synthesizeLocalTts(_options) {\n throw this.unavailable(\"ElizaBunRuntime.synthesizeLocalTts is unavailable on web.\");\n }\n async call(_options) {\n throw this.unavailable(\"ElizaBunRuntime.call is unavailable on web.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AACjE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACtE,CAAC;;ACRD;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,KAAK,CAAC,QAAQ,EAAE;AAC1B,QAAQ,OAAO;AACf,YAAY,EAAE,EAAE,KAAK;AACrB,YAAY,KAAK,EAAE,6EAA6E;AAChG,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,WAAW,CAAC,QAAQ,EAAE;AAChC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,oDAAoD,CAAC;AACpF,IAAI;AACJ,IAAI,MAAM,SAAS,GAAG;AACtB,QAAQ,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/B,IAAI;AACJ,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ;AACR,IAAI;AACJ,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO;AACf,YAAY,KAAK,EAAE,KAAK;AACxB,YAAY,MAAM,EAAE,aAAa;AACjC,YAAY,OAAO,EAAE,uFAAuF;AAC5G,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,sBAAsB,CAAC,QAAQ,EAAE;AAC3C,QAAQ,OAAO;AACf,YAAY,SAAS,EAAE,KAAK;AAC5B,YAAY,OAAO,EAAE,oGAAoG;AACzH,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,kBAAkB,CAAC,QAAQ,EAAE;AACvC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,2DAA2D,CAAC;AAC3F,IAAI;AACJ,IAAI,MAAM,IAAI,CAAC,QAAQ,EAAE;AACzB,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,6CAA6C,CAAC;AAC7E,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,66 @@
1
+ var capacitorBunRuntime = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ /**
5
+ * The native plugin is registered under the JS name `ElizaBunRuntime`. The
6
+ * Swift class in `ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntimePlugin.swift`
7
+ * exposes the matching `jsName`.
8
+ */
9
+ const ElizaBunRuntime = core.registerPlugin("ElizaBunRuntime", {
10
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ElizaBunRuntimeWeb()),
11
+ });
12
+
13
+ /**
14
+ * Web fallback for `@elizaos/capacitor-bun-runtime`.
15
+ *
16
+ * Browser environments do not host the native runtime. This implementation
17
+ * reports an unavailable status and throws clear errors for runtime calls.
18
+ */
19
+ class ElizaBunRuntimeWeb extends core.WebPlugin {
20
+ async start(_options) {
21
+ return {
22
+ ok: false,
23
+ error: "ElizaBunRuntime is not available on web. Run on an iOS device or simulator.",
24
+ };
25
+ }
26
+ async sendMessage(_options) {
27
+ throw this.unavailable("ElizaBunRuntime.sendMessage is unavailable on web.");
28
+ }
29
+ async getStatus() {
30
+ return { ready: false };
31
+ }
32
+ async stop() {
33
+ return;
34
+ }
35
+ async getLocalTtsStatus() {
36
+ return {
37
+ ready: false,
38
+ status: "unavailable",
39
+ message: "ElizaBunRuntime local TTS is not available on web. Run on an iOS device or simulator.",
40
+ };
41
+ }
42
+ async getLocalTtsDiagnostics(_options) {
43
+ return {
44
+ available: false,
45
+ message: "ElizaBunRuntime local TTS diagnostics are not available on web. Run on an iOS device or simulator.",
46
+ };
47
+ }
48
+ async synthesizeLocalTts(_options) {
49
+ throw this.unavailable("ElizaBunRuntime.synthesizeLocalTts is unavailable on web.");
50
+ }
51
+ async call(_options) {
52
+ throw this.unavailable("ElizaBunRuntime.call is unavailable on web.");
53
+ }
54
+ }
55
+
56
+ var web = /*#__PURE__*/Object.freeze({
57
+ __proto__: null,
58
+ ElizaBunRuntimeWeb: ElizaBunRuntimeWeb
59
+ });
60
+
61
+ exports.ElizaBunRuntime = ElizaBunRuntime;
62
+
63
+ return exports;
64
+
65
+ })({}, capacitorExports);
66
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nexport * from \"./definitions\";\n/**\n * The native plugin is registered under the JS name `ElizaBunRuntime`. The\n * Swift class in `ios/Sources/ElizaBunRuntimePlugin/ElizaBunRuntimePlugin.swift`\n * exposes the matching `jsName`.\n */\nexport const ElizaBunRuntime = registerPlugin(\"ElizaBunRuntime\", {\n web: () => import(\"./web\").then((m) => new m.ElizaBunRuntimeWeb()),\n});\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\n/**\n * Web fallback for `@elizaos/capacitor-bun-runtime`.\n *\n * Browser environments do not host the native runtime. This implementation\n * reports an unavailable status and throws clear errors for runtime calls.\n */\nexport class ElizaBunRuntimeWeb extends WebPlugin {\n async start(_options) {\n return {\n ok: false,\n error: \"ElizaBunRuntime is not available on web. Run on an iOS device or simulator.\",\n };\n }\n async sendMessage(_options) {\n throw this.unavailable(\"ElizaBunRuntime.sendMessage is unavailable on web.\");\n }\n async getStatus() {\n return { ready: false };\n }\n async stop() {\n return;\n }\n async getLocalTtsStatus() {\n return {\n ready: false,\n status: \"unavailable\",\n message: \"ElizaBunRuntime local TTS is not available on web. Run on an iOS device or simulator.\",\n };\n }\n async getLocalTtsDiagnostics(_options) {\n return {\n available: false,\n message: \"ElizaBunRuntime local TTS diagnostics are not available on web. Run on an iOS device or simulator.\",\n };\n }\n async synthesizeLocalTts(_options) {\n throw this.unavailable(\"ElizaBunRuntime.synthesizeLocalTts is unavailable on web.\");\n }\n async call(_options) {\n throw this.unavailable(\"ElizaBunRuntime.call is unavailable on web.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAEA;IACA;IACA;IACA;IACA;AACY,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IACjE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACtE,CAAC;;ICRD;IACA;IACA;IACA;IACA;IACA;IACO,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,KAAK,CAAC,QAAQ,EAAE;IAC1B,QAAQ,OAAO;IACf,YAAY,EAAE,EAAE,KAAK;IACrB,YAAY,KAAK,EAAE,6EAA6E;IAChG,SAAS;IACT,IAAI;IACJ,IAAI,MAAM,WAAW,CAAC,QAAQ,EAAE;IAChC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,oDAAoD,CAAC;IACpF,IAAI;IACJ,IAAI,MAAM,SAAS,GAAG;IACtB,QAAQ,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE;IAC/B,IAAI;IACJ,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ;IACR,IAAI;IACJ,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO;IACf,YAAY,KAAK,EAAE,KAAK;IACxB,YAAY,MAAM,EAAE,aAAa;IACjC,YAAY,OAAO,EAAE,uFAAuF;IAC5G,SAAS;IACT,IAAI;IACJ,IAAI,MAAM,sBAAsB,CAAC,QAAQ,EAAE;IAC3C,QAAQ,OAAO;IACf,YAAY,SAAS,EAAE,KAAK;IAC5B,YAAY,OAAO,EAAE,oGAAoG;IACzH,SAAS;IACT,IAAI;IACJ,IAAI,MAAM,kBAAkB,CAAC,QAAQ,EAAE;IACvC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,2DAA2D,CAAC;IAC3F,IAAI;IACJ,IAAI,MAAM,IAAI,CAAC,QAAQ,EAAE;IACzB,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,6CAA6C,CAAC;IAC7E,IAAI;IACJ;;;;;;;;;;;;;;;"}