capacitor-native-agent 0.9.11 → 0.9.12
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 {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-native-agent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.12",
|
|
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",
|