capacitor-native-agent 0.9.11 → 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.
@@ -894,6 +894,8 @@ internal object IntegrityCheckingUniffiLib {
894
894
  ): Short
895
895
  external fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_heartbeat_config(
896
896
  ): Short
897
+ external fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_mcp_tools(
898
+ ): Short
897
899
  external fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_memory_provider(
898
900
  ): Short
899
901
  external fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_notifier(
@@ -1057,6 +1059,8 @@ external fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_governance_
1057
1059
  ): Unit
1058
1060
  external fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_heartbeat_config(`ptr`: Long,`configJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
1059
1061
  ): Unit
1062
+ external fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_mcp_tools(`ptr`: Long,`toolsJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
1063
+ ): Int
1060
1064
  external fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_memory_provider(`ptr`: Long,`provider`: Long,uniffi_out_err: UniffiRustCallStatus,
1061
1065
  ): Unit
1062
1066
  external fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_notifier(`ptr`: Long,`notifier`: Long,uniffi_out_err: UniffiRustCallStatus,
@@ -1340,6 +1344,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
1340
1344
  if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_heartbeat_config() != 33968.toShort()) {
1341
1345
  throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
1342
1346
  }
1347
+ if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_mcp_tools() != 15664.toShort()) {
1348
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
1349
+ }
1343
1350
  if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_memory_provider() != 23171.toShort()) {
1344
1351
  throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
1345
1352
  }
@@ -2054,6 +2061,14 @@ public interface NativeAgentHandleInterface {
2054
2061
  */
2055
2062
  fun `setHeartbeatConfig`(`configJson`: kotlin.String)
2056
2063
 
2064
+ /**
2065
+ * Replace the FFI's MCP tool manifest. Tools registered here become
2066
+ * visible to the LLM and, when called, surface as `mcp_tool_call`
2067
+ * events that the host must answer with `respond_to_mcp_tool`.
2068
+ * Idempotent — every call replaces the prior manifest.
2069
+ */
2070
+ fun `setMcpTools`(`toolsJson`: kotlin.String): kotlin.UInt
2071
+
2057
2072
  fun `setMemoryProvider`(`provider`: MemoryProvider)
2058
2073
 
2059
2074
  fun `setNotifier`(`notifier`: NativeNotifier)
@@ -2916,6 +2931,26 @@ open class NativeAgentHandle: Disposable, AutoCloseable, NativeAgentHandleInterf
2916
2931
 
2917
2932
 
2918
2933
 
2934
+ /**
2935
+ * Replace the FFI's MCP tool manifest. Tools registered here become
2936
+ * visible to the LLM and, when called, surface as `mcp_tool_call`
2937
+ * events that the host must answer with `respond_to_mcp_tool`.
2938
+ * Idempotent — every call replaces the prior manifest.
2939
+ */
2940
+ @Throws(NativeAgentException::class)override fun `setMcpTools`(`toolsJson`: kotlin.String): kotlin.UInt {
2941
+ return FfiConverterUInt.lift(
2942
+ callWithHandle {
2943
+ uniffiRustCallWithError(NativeAgentException) { _status ->
2944
+ UniffiLib.uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_mcp_tools(
2945
+ it,
2946
+ FfiConverterString.lower(`toolsJson`),_status)
2947
+ }
2948
+ }
2949
+ )
2950
+ }
2951
+
2952
+
2953
+
2919
2954
  @Throws(NativeAgentException::class)override fun `setMemoryProvider`(`provider`: MemoryProvider)
2920
2955
  =
2921
2956
  callWithHandle {
@@ -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.11",
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",