capacitor-native-agent 0.9.12 → 0.9.13

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.
@@ -10,7 +10,7 @@
10
10
  <key>HeadersPath</key>
11
11
  <string>Headers</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64</string>
13
+ <string>ios-arm64-simulator</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>libnative_agent_ffi.a</string>
16
16
  <key>SupportedArchitectures</key>
@@ -19,6 +19,8 @@
19
19
  </array>
20
20
  <key>SupportedPlatform</key>
21
21
  <string>ios</string>
22
+ <key>SupportedPlatformVariant</key>
23
+ <string>simulator</string>
22
24
  </dict>
23
25
  <dict>
24
26
  <key>BinaryPath</key>
@@ -26,7 +28,7 @@
26
28
  <key>HeadersPath</key>
27
29
  <string>Headers</string>
28
30
  <key>LibraryIdentifier</key>
29
- <string>ios-arm64-simulator</string>
31
+ <string>ios-arm64</string>
30
32
  <key>LibraryPath</key>
31
33
  <string>libnative_agent_ffi.a</string>
32
34
  <key>SupportedArchitectures</key>
@@ -35,8 +37,6 @@
35
37
  </array>
36
38
  <key>SupportedPlatform</key>
37
39
  <string>ios</string>
38
- <key>SupportedPlatformVariant</key>
39
- <string>simulator</string>
40
40
  </dict>
41
41
  </array>
42
42
  <key>CFBundlePackageType</key>
@@ -751,6 +751,14 @@ public protocol NativeAgentHandleProtocol: AnyObject, Sendable {
751
751
  */
752
752
  func setHeartbeatConfig(configJson: String) throws
753
753
 
754
+ /**
755
+ * Replace the FFI's MCP tool manifest. Tools registered here become
756
+ * visible to the LLM and, when called, surface as `mcp_tool_call`
757
+ * events that the host must answer with `respond_to_mcp_tool`.
758
+ * Idempotent — every call replaces the prior manifest.
759
+ */
760
+ func setMcpTools(toolsJson: String) throws -> UInt32
761
+
754
762
  func setMemoryProvider(provider: MemoryProvider) throws
755
763
 
756
764
  func setNotifier(notifier: NativeNotifier) throws
@@ -1365,6 +1373,21 @@ open func setHeartbeatConfig(configJson: String)throws {try rustCallWithError(
1365
1373
  FfiConverterString.lower(configJson),$0
1366
1374
  )
1367
1375
  }
1376
+ }
1377
+
1378
+ /**
1379
+ * Replace the FFI's MCP tool manifest. Tools registered here become
1380
+ * visible to the LLM and, when called, surface as `mcp_tool_call`
1381
+ * events that the host must answer with `respond_to_mcp_tool`.
1382
+ * Idempotent — every call replaces the prior manifest.
1383
+ */
1384
+ open func setMcpTools(toolsJson: String)throws -> UInt32 {
1385
+ return try FfiConverterUInt32.lift(try rustCallWithError(FfiConverterTypeNativeAgentError_lift) {
1386
+ uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_mcp_tools(
1387
+ self.uniffiCloneHandle(),
1388
+ FfiConverterString.lower(toolsJson),$0
1389
+ )
1390
+ })
1368
1391
  }
1369
1392
 
1370
1393
  open func setMemoryProvider(provider: MemoryProvider)throws {try rustCallWithError(FfiConverterTypeNativeAgentError_lift) {
@@ -3450,6 +3473,9 @@ private let initializationResult: InitializationResult = {
3450
3473
  if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_heartbeat_config() != 33968) {
3451
3474
  return InitializationResult.apiChecksumMismatch
3452
3475
  }
3476
+ if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_mcp_tools() != 15664) {
3477
+ return InitializationResult.apiChecksumMismatch
3478
+ }
3453
3479
  if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_memory_provider() != 23171) {
3454
3480
  return InitializationResult.apiChecksumMismatch
3455
3481
  }
@@ -628,6 +628,11 @@ void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_governance_provider
628
628
  void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_heartbeat_config(uint64_t ptr, RustBuffer config_json, RustCallStatus *_Nonnull out_status
629
629
  );
630
630
  #endif
631
+ #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
632
+ #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
633
+ uint32_t uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_mcp_tools(uint64_t ptr, RustBuffer tools_json, RustCallStatus *_Nonnull out_status
634
+ );
635
+ #endif
631
636
  #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
632
637
  #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
633
638
  void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_memory_provider(uint64_t ptr, uint64_t provider, RustCallStatus *_Nonnull out_status
@@ -1230,6 +1235,12 @@ uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_governanc
1230
1235
  #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_HEARTBEAT_CONFIG
1231
1236
  uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_heartbeat_config(void
1232
1237
 
1238
+ );
1239
+ #endif
1240
+ #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
1241
+ #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
1242
+ uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_mcp_tools(void
1243
+
1233
1244
  );
1234
1245
  #endif
1235
1246
  #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
@@ -751,6 +751,14 @@ public protocol NativeAgentHandleProtocol: AnyObject, Sendable {
751
751
  */
752
752
  func setHeartbeatConfig(configJson: String) throws
753
753
 
754
+ /**
755
+ * Replace the FFI's MCP tool manifest. Tools registered here become
756
+ * visible to the LLM and, when called, surface as `mcp_tool_call`
757
+ * events that the host must answer with `respond_to_mcp_tool`.
758
+ * Idempotent — every call replaces the prior manifest.
759
+ */
760
+ func setMcpTools(toolsJson: String) throws -> UInt32
761
+
754
762
  func setMemoryProvider(provider: MemoryProvider) throws
755
763
 
756
764
  func setNotifier(notifier: NativeNotifier) throws
@@ -1365,6 +1373,21 @@ open func setHeartbeatConfig(configJson: String)throws {try rustCallWithError(
1365
1373
  FfiConverterString.lower(configJson),$0
1366
1374
  )
1367
1375
  }
1376
+ }
1377
+
1378
+ /**
1379
+ * Replace the FFI's MCP tool manifest. Tools registered here become
1380
+ * visible to the LLM and, when called, surface as `mcp_tool_call`
1381
+ * events that the host must answer with `respond_to_mcp_tool`.
1382
+ * Idempotent — every call replaces the prior manifest.
1383
+ */
1384
+ open func setMcpTools(toolsJson: String)throws -> UInt32 {
1385
+ return try FfiConverterUInt32.lift(try rustCallWithError(FfiConverterTypeNativeAgentError_lift) {
1386
+ uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_mcp_tools(
1387
+ self.uniffiCloneHandle(),
1388
+ FfiConverterString.lower(toolsJson),$0
1389
+ )
1390
+ })
1368
1391
  }
1369
1392
 
1370
1393
  open func setMemoryProvider(provider: MemoryProvider)throws {try rustCallWithError(FfiConverterTypeNativeAgentError_lift) {
@@ -3450,6 +3473,9 @@ private let initializationResult: InitializationResult = {
3450
3473
  if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_heartbeat_config() != 33968) {
3451
3474
  return InitializationResult.apiChecksumMismatch
3452
3475
  }
3476
+ if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_mcp_tools() != 15664) {
3477
+ return InitializationResult.apiChecksumMismatch
3478
+ }
3453
3479
  if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_memory_provider() != 23171) {
3454
3480
  return InitializationResult.apiChecksumMismatch
3455
3481
  }
@@ -628,6 +628,11 @@ void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_governance_provider
628
628
  void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_heartbeat_config(uint64_t ptr, RustBuffer config_json, RustCallStatus *_Nonnull out_status
629
629
  );
630
630
  #endif
631
+ #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
632
+ #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
633
+ uint32_t uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_mcp_tools(uint64_t ptr, RustBuffer tools_json, RustCallStatus *_Nonnull out_status
634
+ );
635
+ #endif
631
636
  #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
632
637
  #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
633
638
  void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_memory_provider(uint64_t ptr, uint64_t provider, RustCallStatus *_Nonnull out_status
@@ -1230,6 +1235,12 @@ uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_governanc
1230
1235
  #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_HEARTBEAT_CONFIG
1231
1236
  uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_heartbeat_config(void
1232
1237
 
1238
+ );
1239
+ #endif
1240
+ #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
1241
+ #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
1242
+ uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_mcp_tools(void
1243
+
1233
1244
  );
1234
1245
  #endif
1235
1246
  #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
@@ -751,6 +751,14 @@ public protocol NativeAgentHandleProtocol: AnyObject, Sendable {
751
751
  */
752
752
  func setHeartbeatConfig(configJson: String) throws
753
753
 
754
+ /**
755
+ * Replace the FFI's MCP tool manifest. Tools registered here become
756
+ * visible to the LLM and, when called, surface as `mcp_tool_call`
757
+ * events that the host must answer with `respond_to_mcp_tool`.
758
+ * Idempotent — every call replaces the prior manifest.
759
+ */
760
+ func setMcpTools(toolsJson: String) throws -> UInt32
761
+
754
762
  func setMemoryProvider(provider: MemoryProvider) throws
755
763
 
756
764
  func setNotifier(notifier: NativeNotifier) throws
@@ -1365,6 +1373,21 @@ open func setHeartbeatConfig(configJson: String)throws {try rustCallWithError(
1365
1373
  FfiConverterString.lower(configJson),$0
1366
1374
  )
1367
1375
  }
1376
+ }
1377
+
1378
+ /**
1379
+ * Replace the FFI's MCP tool manifest. Tools registered here become
1380
+ * visible to the LLM and, when called, surface as `mcp_tool_call`
1381
+ * events that the host must answer with `respond_to_mcp_tool`.
1382
+ * Idempotent — every call replaces the prior manifest.
1383
+ */
1384
+ open func setMcpTools(toolsJson: String)throws -> UInt32 {
1385
+ return try FfiConverterUInt32.lift(try rustCallWithError(FfiConverterTypeNativeAgentError_lift) {
1386
+ uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_mcp_tools(
1387
+ self.uniffiCloneHandle(),
1388
+ FfiConverterString.lower(toolsJson),$0
1389
+ )
1390
+ })
1368
1391
  }
1369
1392
 
1370
1393
  open func setMemoryProvider(provider: MemoryProvider)throws {try rustCallWithError(FfiConverterTypeNativeAgentError_lift) {
@@ -3450,6 +3473,9 @@ private let initializationResult: InitializationResult = {
3450
3473
  if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_heartbeat_config() != 33968) {
3451
3474
  return InitializationResult.apiChecksumMismatch
3452
3475
  }
3476
+ if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_mcp_tools() != 15664) {
3477
+ return InitializationResult.apiChecksumMismatch
3478
+ }
3453
3479
  if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_memory_provider() != 23171) {
3454
3480
  return InitializationResult.apiChecksumMismatch
3455
3481
  }
@@ -628,6 +628,11 @@ void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_governance_provider
628
628
  void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_heartbeat_config(uint64_t ptr, RustBuffer config_json, RustCallStatus *_Nonnull out_status
629
629
  );
630
630
  #endif
631
+ #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
632
+ #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
633
+ uint32_t uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_mcp_tools(uint64_t ptr, RustBuffer tools_json, RustCallStatus *_Nonnull out_status
634
+ );
635
+ #endif
631
636
  #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
632
637
  #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
633
638
  void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_memory_provider(uint64_t ptr, uint64_t provider, RustCallStatus *_Nonnull out_status
@@ -1230,6 +1235,12 @@ uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_governanc
1230
1235
  #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_HEARTBEAT_CONFIG
1231
1236
  uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_heartbeat_config(void
1232
1237
 
1238
+ );
1239
+ #endif
1240
+ #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
1241
+ #define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MCP_TOOLS
1242
+ uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_mcp_tools(void
1243
+
1233
1244
  );
1234
1245
  #endif
1235
1246
  #ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_SET_MEMORY_PROVIDER
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-native-agent",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
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",