capacitor-native-agent 0.2.4 → 0.2.5

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.
@@ -109,7 +109,7 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
109
109
 
110
110
  DispatchQueue.global(qos: .userInitiated).async { [self] in
111
111
  do {
112
- try native_agent_ffi.initWorkspace(
112
+ try callInitWorkspace(
113
113
  config: InitConfig(
114
114
  dbPath: self.resolvePath(dbPath),
115
115
  workspacePath: self.resolvePath(workspacePath),
@@ -676,6 +676,14 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
676
676
  }
677
677
  }
678
678
 
679
+ // ── Helpers ──────────────────────────────────────────────────────────────────
680
+
681
+ /// Wraps the global UniFFI `initWorkspace(config:)` to avoid Swift name
682
+ /// collision with the `@objc func initWorkspace(_ call:)` instance method.
683
+ private func callInitWorkspace(config: InitConfig) throws {
684
+ try initWorkspace(config: config)
685
+ }
686
+
679
687
  // ── Event bridge ─────────────────────────────────────────────────────────────
680
688
 
681
689
  /// Bridges Rust NativeEventCallback → Capacitor notifyListeners
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-native-agent",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Native AI agent loop for Capacitor — runs LLM completions, tool execution, and cron jobs in native Rust, enabling background execution.",
5
5
  "main": "dist/esm/index.js",
6
6
  "types": "dist/esm/index.d.ts",