capacitor-native-agent 0.7.1 → 0.7.2

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.
@@ -996,7 +996,7 @@ internal interface UniffiLib : Library {
996
996
  fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_restart_mcp(`ptr`: Pointer,`toolsJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
997
997
  ): Int
998
998
  fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_resume_session(`ptr`: Pointer,`sessionKey`: RustBuffer.ByValue,`agentId`: RustBuffer.ByValue,`messagesJson`: RustBuffer.ByValue,`provider`: RustBuffer.ByValue,`model`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
999
- ): Unit
999
+ ): Byte
1000
1000
  fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_run_cron_job(`ptr`: Pointer,`jobId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
1001
1001
  ): Unit
1002
1002
  fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_seed_tool_permissions(`ptr`: Pointer,`defaultsJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
@@ -1379,7 +1379,7 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
1379
1379
  if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_restart_mcp() != 8963.toShort()) {
1380
1380
  throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
1381
1381
  }
1382
- if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_resume_session() != 34699.toShort()) {
1382
+ if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_resume_session() != 1498.toShort()) {
1383
1383
  throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
1384
1384
  }
1385
1385
  if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_run_cron_job() != 11263.toShort()) {
@@ -1947,8 +1947,10 @@ public interface NativeAgentHandleInterface {
1947
1947
 
1948
1948
  /**
1949
1949
  * Resume a session (load messages into agent context).
1950
+ * Returns `was_interrupted: true` if the session had an in-progress turn
1951
+ * that was killed (e.g. app force-close). The caller can auto-resume.
1950
1952
  */
1951
- fun `resumeSession`(`sessionKey`: kotlin.String, `agentId`: kotlin.String, `messagesJson`: kotlin.String?, `provider`: kotlin.String?, `model`: kotlin.String?)
1953
+ fun `resumeSession`(`sessionKey`: kotlin.String, `agentId`: kotlin.String, `messagesJson`: kotlin.String?, `provider`: kotlin.String?, `model`: kotlin.String?): kotlin.Boolean
1952
1954
 
1953
1955
  /**
1954
1956
  * Force-trigger a cron job.
@@ -2601,16 +2603,19 @@ open class NativeAgentHandle: Disposable, AutoCloseable, NativeAgentHandleInterf
2601
2603
 
2602
2604
  /**
2603
2605
  * Resume a session (load messages into agent context).
2606
+ * Returns `was_interrupted: true` if the session had an in-progress turn
2607
+ * that was killed (e.g. app force-close). The caller can auto-resume.
2604
2608
  */
2605
- @Throws(NativeAgentException::class)override fun `resumeSession`(`sessionKey`: kotlin.String, `agentId`: kotlin.String, `messagesJson`: kotlin.String?, `provider`: kotlin.String?, `model`: kotlin.String?)
2606
- =
2609
+ @Throws(NativeAgentException::class)override fun `resumeSession`(`sessionKey`: kotlin.String, `agentId`: kotlin.String, `messagesJson`: kotlin.String?, `provider`: kotlin.String?, `model`: kotlin.String?): kotlin.Boolean {
2610
+ return FfiConverterBoolean.lift(
2607
2611
  callWithPointer {
2608
2612
  uniffiRustCallWithError(NativeAgentException) { _status ->
2609
2613
  UniffiLib.INSTANCE.uniffi_native_agent_ffi_fn_method_nativeagenthandle_resume_session(
2610
2614
  it, FfiConverterString.lower(`sessionKey`),FfiConverterString.lower(`agentId`),FfiConverterOptionalString.lower(`messagesJson`),FfiConverterOptionalString.lower(`provider`),FfiConverterOptionalString.lower(`model`),_status)
2611
2615
  }
2612
2616
  }
2613
-
2617
+ )
2618
+ }
2614
2619
 
2615
2620
 
2616
2621
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-native-agent",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
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",