capacitor-native-agent 0.1.5 → 0.2.0
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.
- package/android/src/main/java/com/t6x/plugins/nativeagent/NativeAgentPlugin.kt +36 -1
- package/android/src/main/java/uniffi/native_agent_ffi/native_agent_ffi.kt +59 -9
- package/android/src/main/jniLibs/arm64-v8a/libnative_agent_ffi.so +0 -0
- package/dist/esm/definitions.d.ts +7 -1
- package/dist/esm/definitions.d.ts.map +1 -1
- package/dist/esm/plugin.d.ts.map +1 -1
- package/dist/esm/plugin.js +2 -0
- package/dist/esm/plugin.js.map +1 -1
- package/ios/Sources/NativeAgentPlugin/Generated/native_agent_ffi.swift +41 -9
- package/ios/Sources/NativeAgentPlugin/Generated/native_agent_ffiFFI.h +31 -9
- package/ios/Sources/NativeAgentPlugin/NativeAgentPlugin.swift +58 -11
- package/package.json +1 -1
|
@@ -36,6 +36,31 @@ class NativeAgentPlugin : Plugin() {
|
|
|
36
36
|
|
|
37
37
|
// ── Lifecycle ──────────────────────────────────────────────────────
|
|
38
38
|
|
|
39
|
+
@PluginMethod
|
|
40
|
+
fun initWorkspace(call: PluginCall) {
|
|
41
|
+
val dbPath = call.getString("dbPath")
|
|
42
|
+
?: return call.reject("dbPath is required")
|
|
43
|
+
val workspacePath = call.getString("workspacePath")
|
|
44
|
+
?: return call.reject("workspacePath is required")
|
|
45
|
+
val authProfilesPath = call.getString("authProfilesPath")
|
|
46
|
+
?: return call.reject("authProfilesPath is required")
|
|
47
|
+
|
|
48
|
+
scope.launch {
|
|
49
|
+
try {
|
|
50
|
+
uniffi.native_agent_ffi.initWorkspace(
|
|
51
|
+
InitConfig(
|
|
52
|
+
dbPath = resolvePath(dbPath),
|
|
53
|
+
workspacePath = resolvePath(workspacePath),
|
|
54
|
+
authProfilesPath = resolvePath(authProfilesPath),
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
call.resolve()
|
|
58
|
+
} catch (e: Exception) {
|
|
59
|
+
call.reject("initWorkspace failed: ${e.message}", e)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
39
64
|
@PluginMethod
|
|
40
65
|
fun initialize(call: PluginCall) {
|
|
41
66
|
val dbPath = call.getString("dbPath")
|
|
@@ -78,7 +103,7 @@ class NativeAgentPlugin : Plugin() {
|
|
|
78
103
|
sessionKey = call.getString("sessionKey") ?: return@withHandle call.reject("sessionKey is required"),
|
|
79
104
|
model = call.getString("model"),
|
|
80
105
|
provider = call.getString("provider"),
|
|
81
|
-
systemPrompt = call.getString("systemPrompt") ?:
|
|
106
|
+
systemPrompt = call.getString("systemPrompt") ?: "",
|
|
82
107
|
maxTurns = call.getInt("maxTurns")?.toUInt(),
|
|
83
108
|
allowedToolsJson = call.getString("allowedToolsJson"),
|
|
84
109
|
)
|
|
@@ -118,6 +143,16 @@ class NativeAgentPlugin : Plugin() {
|
|
|
118
143
|
call.resolve()
|
|
119
144
|
}
|
|
120
145
|
|
|
146
|
+
@PluginMethod
|
|
147
|
+
fun respondToMcpTool(call: PluginCall) = withHandle(call) { h ->
|
|
148
|
+
h.respondToMcpTool(
|
|
149
|
+
call.getString("toolCallId") ?: return@withHandle call.reject("toolCallId is required"),
|
|
150
|
+
call.getString("resultJson") ?: "null",
|
|
151
|
+
call.getBoolean("isError") ?: false,
|
|
152
|
+
)
|
|
153
|
+
call.resolve()
|
|
154
|
+
}
|
|
155
|
+
|
|
121
156
|
@PluginMethod
|
|
122
157
|
fun respondToCronApproval(call: PluginCall) = withHandle(call) { h ->
|
|
123
158
|
h.respondToCronApproval(
|
|
@@ -806,6 +806,10 @@ internal open class UniffiVTableCallbackInterfaceNativeEventCallback(
|
|
|
806
806
|
|
|
807
807
|
|
|
808
808
|
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
809
813
|
|
|
810
814
|
|
|
811
815
|
|
|
@@ -885,6 +889,8 @@ internal interface UniffiLib : Library {
|
|
|
885
889
|
): Unit
|
|
886
890
|
fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_cron_approval(`ptr`: Pointer,`requestId`: RustBuffer.ByValue,`approved`: Byte,uniffi_out_err: UniffiRustCallStatus,
|
|
887
891
|
): Unit
|
|
892
|
+
fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_mcp_tool(`ptr`: Pointer,`toolCallId`: RustBuffer.ByValue,`resultJson`: RustBuffer.ByValue,`isError`: Byte,uniffi_out_err: UniffiRustCallStatus,
|
|
893
|
+
): Unit
|
|
888
894
|
fun uniffi_native_agent_ffi_fn_method_nativeagenthandle_restart_mcp(`ptr`: Pointer,`toolsJson`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
889
895
|
): Int
|
|
890
896
|
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,
|
|
@@ -913,6 +919,8 @@ internal interface UniffiLib : Library {
|
|
|
913
919
|
): Unit
|
|
914
920
|
fun uniffi_native_agent_ffi_fn_init_callback_vtable_nativeeventcallback(`vtable`: UniffiVTableCallbackInterfaceNativeEventCallback,
|
|
915
921
|
): Unit
|
|
922
|
+
fun uniffi_native_agent_ffi_fn_func_init_workspace(`config`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
923
|
+
): Unit
|
|
916
924
|
fun ffi_native_agent_ffi_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
917
925
|
): RustBuffer.ByValue
|
|
918
926
|
fun ffi_native_agent_ffi_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus,
|
|
@@ -1025,6 +1033,8 @@ internal interface UniffiLib : Library {
|
|
|
1025
1033
|
): Unit
|
|
1026
1034
|
fun ffi_native_agent_ffi_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
|
|
1027
1035
|
): Unit
|
|
1036
|
+
fun uniffi_native_agent_ffi_checksum_func_init_workspace(
|
|
1037
|
+
): Short
|
|
1028
1038
|
fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_abort(
|
|
1029
1039
|
): Short
|
|
1030
1040
|
fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_add_cron_job(
|
|
@@ -1073,6 +1083,8 @@ internal interface UniffiLib : Library {
|
|
|
1073
1083
|
): Short
|
|
1074
1084
|
fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_cron_approval(
|
|
1075
1085
|
): Short
|
|
1086
|
+
fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_mcp_tool(
|
|
1087
|
+
): Short
|
|
1076
1088
|
fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_restart_mcp(
|
|
1077
1089
|
): Short
|
|
1078
1090
|
fun uniffi_native_agent_ffi_checksum_method_nativeagenthandle_resume_session(
|
|
@@ -1120,6 +1132,9 @@ private fun uniffiCheckContractApiVersion(lib: UniffiLib) {
|
|
|
1120
1132
|
|
|
1121
1133
|
@Suppress("UNUSED_PARAMETER")
|
|
1122
1134
|
private fun uniffiCheckApiChecksums(lib: UniffiLib) {
|
|
1135
|
+
if (lib.uniffi_native_agent_ffi_checksum_func_init_workspace() != 39423.toShort()) {
|
|
1136
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1137
|
+
}
|
|
1123
1138
|
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_abort() != 58908.toShort()) {
|
|
1124
1139
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1125
1140
|
}
|
|
@@ -1135,10 +1150,10 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
|
|
|
1135
1150
|
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_delete_auth() != 2640.toShort()) {
|
|
1136
1151
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1137
1152
|
}
|
|
1138
|
-
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_end_skill() !=
|
|
1153
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_end_skill() != 49984.toShort()) {
|
|
1139
1154
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1140
1155
|
}
|
|
1141
|
-
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_follow_up() !=
|
|
1156
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_follow_up() != 816.toShort()) {
|
|
1142
1157
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1143
1158
|
}
|
|
1144
1159
|
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_get_auth_status() != 31550.toShort()) {
|
|
@@ -1186,16 +1201,19 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
|
|
|
1186
1201
|
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_remove_skill() != 49129.toShort()) {
|
|
1187
1202
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1188
1203
|
}
|
|
1189
|
-
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_approval() !=
|
|
1204
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_approval() != 3194.toShort()) {
|
|
1205
|
+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1206
|
+
}
|
|
1207
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_cron_approval() != 851.toShort()) {
|
|
1190
1208
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1191
1209
|
}
|
|
1192
|
-
if (lib.
|
|
1210
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_mcp_tool() != 10295.toShort()) {
|
|
1193
1211
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1194
1212
|
}
|
|
1195
|
-
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_restart_mcp() !=
|
|
1213
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_restart_mcp() != 8963.toShort()) {
|
|
1196
1214
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1197
1215
|
}
|
|
1198
|
-
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_resume_session() !=
|
|
1216
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_resume_session() != 34699.toShort()) {
|
|
1199
1217
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1200
1218
|
}
|
|
1201
1219
|
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_run_cron_job() != 11263.toShort()) {
|
|
@@ -1216,13 +1234,13 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
|
|
|
1216
1234
|
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_scheduler_config() != 18609.toShort()) {
|
|
1217
1235
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1218
1236
|
}
|
|
1219
|
-
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_start_mcp() !=
|
|
1237
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_start_mcp() != 53972.toShort()) {
|
|
1220
1238
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1221
1239
|
}
|
|
1222
|
-
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_start_skill() !=
|
|
1240
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_start_skill() != 7081.toShort()) {
|
|
1223
1241
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1224
1242
|
}
|
|
1225
|
-
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_steer() !=
|
|
1243
|
+
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_steer() != 29790.toShort()) {
|
|
1226
1244
|
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
1227
1245
|
}
|
|
1228
1246
|
if (lib.uniffi_native_agent_ffi_checksum_method_nativeagenthandle_update_cron_job() != 40127.toShort()) {
|
|
@@ -1697,6 +1715,11 @@ public interface NativeAgentHandleInterface {
|
|
|
1697
1715
|
*/
|
|
1698
1716
|
fun `respondToCronApproval`(`requestId`: kotlin.String, `approved`: kotlin.Boolean)
|
|
1699
1717
|
|
|
1718
|
+
/**
|
|
1719
|
+
* Respond to a pending MCP tool call.
|
|
1720
|
+
*/
|
|
1721
|
+
fun `respondToMcpTool`(`toolCallId`: kotlin.String, `resultJson`: kotlin.String, `isError`: kotlin.Boolean)
|
|
1722
|
+
|
|
1700
1723
|
/**
|
|
1701
1724
|
* Restart MCP server with new tools.
|
|
1702
1725
|
*/
|
|
@@ -2234,6 +2257,21 @@ open class NativeAgentHandle: Disposable, AutoCloseable, NativeAgentHandleInterf
|
|
|
2234
2257
|
|
|
2235
2258
|
|
|
2236
2259
|
|
|
2260
|
+
/**
|
|
2261
|
+
* Respond to a pending MCP tool call.
|
|
2262
|
+
*/
|
|
2263
|
+
@Throws(NativeAgentException::class)override fun `respondToMcpTool`(`toolCallId`: kotlin.String, `resultJson`: kotlin.String, `isError`: kotlin.Boolean)
|
|
2264
|
+
=
|
|
2265
|
+
callWithPointer {
|
|
2266
|
+
uniffiRustCallWithError(NativeAgentException) { _status ->
|
|
2267
|
+
UniffiLib.INSTANCE.uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_mcp_tool(
|
|
2268
|
+
it, FfiConverterString.lower(`toolCallId`),FfiConverterString.lower(`resultJson`),FfiConverterBoolean.lower(`isError`),_status)
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
|
|
2237
2275
|
/**
|
|
2238
2276
|
* Restart MCP server with new tools.
|
|
2239
2277
|
*/
|
|
@@ -3025,4 +3063,16 @@ public object FfiConverterOptionalString: FfiConverterRustBuffer<kotlin.String?>
|
|
|
3025
3063
|
}
|
|
3026
3064
|
}
|
|
3027
3065
|
}
|
|
3066
|
+
/**
|
|
3067
|
+
* Standalone workspace initialization for cold-start paths.
|
|
3068
|
+
*/
|
|
3069
|
+
@Throws(NativeAgentException::class) fun `initWorkspace`(`config`: InitConfig)
|
|
3070
|
+
=
|
|
3071
|
+
uniffiRustCallWithError(NativeAgentException) { _status ->
|
|
3072
|
+
UniffiLib.INSTANCE.uniffi_native_agent_ffi_fn_func_init_workspace(
|
|
3073
|
+
FfiConverterTypeInitConfig.lower(`config`),_status)
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
|
|
3077
|
+
|
|
3028
3078
|
|
|
Binary file
|
|
@@ -137,12 +137,13 @@ export interface TokenUsage {
|
|
|
137
137
|
outputTokens: number;
|
|
138
138
|
totalTokens: number;
|
|
139
139
|
}
|
|
140
|
-
export type NativeAgentEventType = 'text_delta' | 'thinking' | 'tool_use' | 'tool_result' | 'user_message' | 'retry' | 'agent.completed' | 'agent.error' | 'approval_request' | 'wake.no_jobs' | 'wake.jobs_found' | 'max_turns_reached' | 'heartbeat.started' | 'heartbeat.completed' | 'heartbeat.skipped' | 'cron.job.started' | 'cron.job.completed' | 'cron.job.error' | 'cron.notification' | 'scheduler.status';
|
|
140
|
+
export type NativeAgentEventType = 'text_delta' | 'thinking' | 'tool_use' | 'tool_result' | 'mcp_tool_call' | 'user_message' | 'retry' | 'agent.completed' | 'agent.error' | 'approval_request' | 'wake.no_jobs' | 'wake.jobs_found' | 'max_turns_reached' | 'heartbeat.started' | 'heartbeat.completed' | 'heartbeat.skipped' | 'cron.job.started' | 'cron.job.completed' | 'cron.job.error' | 'cron.notification' | 'scheduler.status';
|
|
141
141
|
export interface NativeAgentEvent {
|
|
142
142
|
eventType: string;
|
|
143
143
|
payloadJson: string;
|
|
144
144
|
}
|
|
145
145
|
export interface NativeAgentPlugin {
|
|
146
|
+
initWorkspace(config: InitConfig): Promise<void>;
|
|
146
147
|
initialize(config: InitConfig): Promise<void>;
|
|
147
148
|
sendMessage(params: SendMessageParams): Promise<{
|
|
148
149
|
runId: string;
|
|
@@ -159,6 +160,11 @@ export interface NativeAgentPlugin {
|
|
|
159
160
|
approved: boolean;
|
|
160
161
|
reason?: string;
|
|
161
162
|
}): Promise<void>;
|
|
163
|
+
respondToMcpTool(options: {
|
|
164
|
+
toolCallId: string;
|
|
165
|
+
resultJson: string;
|
|
166
|
+
isError?: boolean;
|
|
167
|
+
}): Promise<void>;
|
|
162
168
|
getAuthToken(options: {
|
|
163
169
|
provider: string;
|
|
164
170
|
}): Promise<AuthTokenResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB,iCAAiC;IACjC,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kEAAkE;IAClE,gBAAgB,CAAC,E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EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AA6CtD,eAAO,MAAM,WAAW,mBAEtB,CAAA"}
|
package/dist/esm/plugin.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { registerPlugin, WebPlugin } from '@capacitor/core';
|
|
2
2
|
const ERR = 'NativeAgent is only available on native platforms.';
|
|
3
3
|
class NativeAgentWeb extends WebPlugin {
|
|
4
|
+
async initWorkspace() { throw this.unavailable(ERR); }
|
|
4
5
|
async initialize() { throw this.unavailable(ERR); }
|
|
5
6
|
async sendMessage() { throw this.unavailable(ERR); }
|
|
6
7
|
async followUp() { throw this.unavailable(ERR); }
|
|
7
8
|
async abort() { throw this.unavailable(ERR); }
|
|
8
9
|
async steer() { throw this.unavailable(ERR); }
|
|
9
10
|
async respondToApproval() { throw this.unavailable(ERR); }
|
|
11
|
+
async respondToMcpTool() { throw this.unavailable(ERR); }
|
|
10
12
|
async getAuthToken() { throw this.unavailable(ERR); }
|
|
11
13
|
async setAuthKey() { throw this.unavailable(ERR); }
|
|
12
14
|
async deleteAuth() { throw this.unavailable(ERR); }
|
package/dist/esm/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAI3D,MAAM,GAAG,GAAG,oDAAoD,CAAA;AAEhE,MAAM,cAAe,SAAQ,SAAS;IACpC,KAAK,CAAC,UAAU,KAAoB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IACjE,KAAK,CAAC,WAAW,KAAmB,MAAM,IAAI,CAAC,WAAW,CAA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B,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAC9D,KAAK,CAAC,WAAW,KAAoB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAClE,KAAK,CAAC,WAAW,KAAoB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAClE,KAAK,CAAC,UAAU,KAAmB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAChE,KAAK,CAAC,UAAU,KAAmB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAChE,KAAK,CAAC,QAAQ,KAAoB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAC/D,KAAK,CAAC,QAAQ,KAAmB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAC9D,KAAK,CAAC,UAAU,KAAmB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAChE,KAAK,CAAC,SAAS,KAAmB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;IAC/D,KAAK,CAAC,UAAU,KAAmB,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC;CACjE;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAoB,aAAa,EAAE;IAC1E,GAAG,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,cAAc,EAAE,CAAC;CACjD,CAAC,CAAA"}
|
|
@@ -621,6 +621,11 @@ public protocol NativeAgentHandleProtocol : AnyObject {
|
|
|
621
621
|
*/
|
|
622
622
|
func respondToCronApproval(requestId: String, approved: Bool) throws
|
|
623
623
|
|
|
624
|
+
/**
|
|
625
|
+
* Respond to a pending MCP tool call.
|
|
626
|
+
*/
|
|
627
|
+
func respondToMcpTool(toolCallId: String, resultJson: String, isError: Bool) throws
|
|
628
|
+
|
|
624
629
|
/**
|
|
625
630
|
* Restart MCP server with new tools.
|
|
626
631
|
*/
|
|
@@ -1003,6 +1008,18 @@ open func respondToCronApproval(requestId: String, approved: Bool)throws {try r
|
|
|
1003
1008
|
FfiConverterBool.lower(approved),$0
|
|
1004
1009
|
)
|
|
1005
1010
|
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* Respond to a pending MCP tool call.
|
|
1015
|
+
*/
|
|
1016
|
+
open func respondToMcpTool(toolCallId: String, resultJson: String, isError: Bool)throws {try rustCallWithError(FfiConverterTypeNativeAgentError.lift) {
|
|
1017
|
+
uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_mcp_tool(self.uniffiClonePointer(),
|
|
1018
|
+
FfiConverterString.lower(toolCallId),
|
|
1019
|
+
FfiConverterString.lower(resultJson),
|
|
1020
|
+
FfiConverterBool.lower(isError),$0
|
|
1021
|
+
)
|
|
1022
|
+
}
|
|
1006
1023
|
}
|
|
1007
1024
|
|
|
1008
1025
|
/**
|
|
@@ -1912,6 +1929,15 @@ fileprivate struct FfiConverterOptionString: FfiConverterRustBuffer {
|
|
|
1912
1929
|
}
|
|
1913
1930
|
}
|
|
1914
1931
|
}
|
|
1932
|
+
/**
|
|
1933
|
+
* Standalone workspace initialization for cold-start paths.
|
|
1934
|
+
*/
|
|
1935
|
+
public func initWorkspace(config: InitConfig)throws {try rustCallWithError(FfiConverterTypeNativeAgentError.lift) {
|
|
1936
|
+
uniffi_native_agent_ffi_fn_func_init_workspace(
|
|
1937
|
+
FfiConverterTypeInitConfig.lower(config),$0
|
|
1938
|
+
)
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1915
1941
|
|
|
1916
1942
|
private enum InitializationResult {
|
|
1917
1943
|
case ok
|
|
@@ -1928,6 +1954,9 @@ private var initializationResult: InitializationResult = {
|
|
|
1928
1954
|
if bindings_contract_version != scaffolding_contract_version {
|
|
1929
1955
|
return InitializationResult.contractVersionMismatch
|
|
1930
1956
|
}
|
|
1957
|
+
if (uniffi_native_agent_ffi_checksum_func_init_workspace() != 39423) {
|
|
1958
|
+
return InitializationResult.apiChecksumMismatch
|
|
1959
|
+
}
|
|
1931
1960
|
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_abort() != 58908) {
|
|
1932
1961
|
return InitializationResult.apiChecksumMismatch
|
|
1933
1962
|
}
|
|
@@ -1943,10 +1972,10 @@ private var initializationResult: InitializationResult = {
|
|
|
1943
1972
|
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_delete_auth() != 2640) {
|
|
1944
1973
|
return InitializationResult.apiChecksumMismatch
|
|
1945
1974
|
}
|
|
1946
|
-
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_end_skill() !=
|
|
1975
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_end_skill() != 49984) {
|
|
1947
1976
|
return InitializationResult.apiChecksumMismatch
|
|
1948
1977
|
}
|
|
1949
|
-
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_follow_up() !=
|
|
1978
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_follow_up() != 816) {
|
|
1950
1979
|
return InitializationResult.apiChecksumMismatch
|
|
1951
1980
|
}
|
|
1952
1981
|
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_get_auth_status() != 31550) {
|
|
@@ -1994,16 +2023,19 @@ private var initializationResult: InitializationResult = {
|
|
|
1994
2023
|
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_remove_skill() != 49129) {
|
|
1995
2024
|
return InitializationResult.apiChecksumMismatch
|
|
1996
2025
|
}
|
|
1997
|
-
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_approval() !=
|
|
2026
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_approval() != 3194) {
|
|
2027
|
+
return InitializationResult.apiChecksumMismatch
|
|
2028
|
+
}
|
|
2029
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_cron_approval() != 851) {
|
|
1998
2030
|
return InitializationResult.apiChecksumMismatch
|
|
1999
2031
|
}
|
|
2000
|
-
if (
|
|
2032
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_mcp_tool() != 10295) {
|
|
2001
2033
|
return InitializationResult.apiChecksumMismatch
|
|
2002
2034
|
}
|
|
2003
|
-
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_restart_mcp() !=
|
|
2035
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_restart_mcp() != 8963) {
|
|
2004
2036
|
return InitializationResult.apiChecksumMismatch
|
|
2005
2037
|
}
|
|
2006
|
-
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_resume_session() !=
|
|
2038
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_resume_session() != 34699) {
|
|
2007
2039
|
return InitializationResult.apiChecksumMismatch
|
|
2008
2040
|
}
|
|
2009
2041
|
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_run_cron_job() != 11263) {
|
|
@@ -2024,13 +2056,13 @@ private var initializationResult: InitializationResult = {
|
|
|
2024
2056
|
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_set_scheduler_config() != 18609) {
|
|
2025
2057
|
return InitializationResult.apiChecksumMismatch
|
|
2026
2058
|
}
|
|
2027
|
-
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_start_mcp() !=
|
|
2059
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_start_mcp() != 53972) {
|
|
2028
2060
|
return InitializationResult.apiChecksumMismatch
|
|
2029
2061
|
}
|
|
2030
|
-
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_start_skill() !=
|
|
2062
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_start_skill() != 7081) {
|
|
2031
2063
|
return InitializationResult.apiChecksumMismatch
|
|
2032
2064
|
}
|
|
2033
|
-
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_steer() !=
|
|
2065
|
+
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_steer() != 29790) {
|
|
2034
2066
|
return InitializationResult.apiChecksumMismatch
|
|
2035
2067
|
}
|
|
2036
2068
|
if (uniffi_native_agent_ffi_checksum_method_nativeagenthandle_update_cron_job() != 40127) {
|
|
@@ -308,12 +308,12 @@ void uniffi_native_agent_ffi_fn_method_nativeagenthandle_delete_auth(void*_Nonnu
|
|
|
308
308
|
#endif
|
|
309
309
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_END_SKILL
|
|
310
310
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_END_SKILL
|
|
311
|
-
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_end_skill(void*_Nonnull ptr, RustBuffer
|
|
311
|
+
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_end_skill(void*_Nonnull ptr, RustBuffer skill_id, RustCallStatus *_Nonnull out_status
|
|
312
312
|
);
|
|
313
313
|
#endif
|
|
314
314
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_FOLLOW_UP
|
|
315
315
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_FOLLOW_UP
|
|
316
|
-
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_follow_up(void*_Nonnull ptr, RustBuffer
|
|
316
|
+
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_follow_up(void*_Nonnull ptr, RustBuffer prompt, RustCallStatus *_Nonnull out_status
|
|
317
317
|
);
|
|
318
318
|
#endif
|
|
319
319
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_GET_AUTH_STATUS
|
|
@@ -393,22 +393,27 @@ void uniffi_native_agent_ffi_fn_method_nativeagenthandle_remove_skill(void*_Nonn
|
|
|
393
393
|
#endif
|
|
394
394
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_APPROVAL
|
|
395
395
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_APPROVAL
|
|
396
|
-
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_approval(void*_Nonnull ptr, RustBuffer
|
|
396
|
+
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_approval(void*_Nonnull ptr, RustBuffer tool_call_id, int8_t approved, RustBuffer reason, RustCallStatus *_Nonnull out_status
|
|
397
397
|
);
|
|
398
398
|
#endif
|
|
399
399
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_CRON_APPROVAL
|
|
400
400
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_CRON_APPROVAL
|
|
401
|
-
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_cron_approval(void*_Nonnull ptr, RustBuffer _request_id, int8_t
|
|
401
|
+
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_cron_approval(void*_Nonnull ptr, RustBuffer _request_id, int8_t approved, RustCallStatus *_Nonnull out_status
|
|
402
|
+
);
|
|
403
|
+
#endif
|
|
404
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_MCP_TOOL
|
|
405
|
+
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_MCP_TOOL
|
|
406
|
+
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_respond_to_mcp_tool(void*_Nonnull ptr, RustBuffer tool_call_id, RustBuffer result_json, int8_t is_error, RustCallStatus *_Nonnull out_status
|
|
402
407
|
);
|
|
403
408
|
#endif
|
|
404
409
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESTART_MCP
|
|
405
410
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESTART_MCP
|
|
406
|
-
uint32_t uniffi_native_agent_ffi_fn_method_nativeagenthandle_restart_mcp(void*_Nonnull ptr, RustBuffer
|
|
411
|
+
uint32_t uniffi_native_agent_ffi_fn_method_nativeagenthandle_restart_mcp(void*_Nonnull ptr, RustBuffer tools_json, RustCallStatus *_Nonnull out_status
|
|
407
412
|
);
|
|
408
413
|
#endif
|
|
409
414
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESUME_SESSION
|
|
410
415
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RESUME_SESSION
|
|
411
|
-
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_resume_session(void*_Nonnull ptr, RustBuffer
|
|
416
|
+
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_resume_session(void*_Nonnull ptr, RustBuffer session_key, RustBuffer agent_id, RustBuffer messages_json, RustBuffer provider, RustBuffer model, RustCallStatus *_Nonnull out_status
|
|
412
417
|
);
|
|
413
418
|
#endif
|
|
414
419
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_RUN_CRON_JOB
|
|
@@ -443,17 +448,17 @@ void uniffi_native_agent_ffi_fn_method_nativeagenthandle_set_scheduler_config(vo
|
|
|
443
448
|
#endif
|
|
444
449
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_START_MCP
|
|
445
450
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_START_MCP
|
|
446
|
-
uint32_t uniffi_native_agent_ffi_fn_method_nativeagenthandle_start_mcp(void*_Nonnull ptr, RustBuffer
|
|
451
|
+
uint32_t uniffi_native_agent_ffi_fn_method_nativeagenthandle_start_mcp(void*_Nonnull ptr, RustBuffer tools_json, RustCallStatus *_Nonnull out_status
|
|
447
452
|
);
|
|
448
453
|
#endif
|
|
449
454
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_START_SKILL
|
|
450
455
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_START_SKILL
|
|
451
|
-
RustBuffer uniffi_native_agent_ffi_fn_method_nativeagenthandle_start_skill(void*_Nonnull ptr, RustBuffer
|
|
456
|
+
RustBuffer uniffi_native_agent_ffi_fn_method_nativeagenthandle_start_skill(void*_Nonnull ptr, RustBuffer skill_id, RustBuffer config_json, RustBuffer provider, RustCallStatus *_Nonnull out_status
|
|
452
457
|
);
|
|
453
458
|
#endif
|
|
454
459
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_STEER
|
|
455
460
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_STEER
|
|
456
|
-
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_steer(void*_Nonnull ptr, RustBuffer
|
|
461
|
+
void uniffi_native_agent_ffi_fn_method_nativeagenthandle_steer(void*_Nonnull ptr, RustBuffer text, RustCallStatus *_Nonnull out_status
|
|
457
462
|
);
|
|
458
463
|
#endif
|
|
459
464
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_METHOD_NATIVEAGENTHANDLE_UPDATE_CRON_JOB
|
|
@@ -471,6 +476,11 @@ void uniffi_native_agent_ffi_fn_method_nativeagenthandle_update_skill(void*_Nonn
|
|
|
471
476
|
void uniffi_native_agent_ffi_fn_init_callback_vtable_nativeeventcallback(UniffiVTableCallbackInterfaceNativeEventCallback* _Nonnull vtable
|
|
472
477
|
);
|
|
473
478
|
#endif
|
|
479
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_FUNC_INIT_WORKSPACE
|
|
480
|
+
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_FN_FUNC_INIT_WORKSPACE
|
|
481
|
+
void uniffi_native_agent_ffi_fn_func_init_workspace(RustBuffer config, RustCallStatus *_Nonnull out_status
|
|
482
|
+
);
|
|
483
|
+
#endif
|
|
474
484
|
#ifndef UNIFFI_FFIDEF_FFI_NATIVE_AGENT_FFI_RUSTBUFFER_ALLOC
|
|
475
485
|
#define UNIFFI_FFIDEF_FFI_NATIVE_AGENT_FFI_RUSTBUFFER_ALLOC
|
|
476
486
|
RustBuffer ffi_native_agent_ffi_rustbuffer_alloc(uint64_t size, RustCallStatus *_Nonnull out_status
|
|
@@ -749,6 +759,12 @@ void ffi_native_agent_ffi_rust_future_free_void(uint64_t handle
|
|
|
749
759
|
#ifndef UNIFFI_FFIDEF_FFI_NATIVE_AGENT_FFI_RUST_FUTURE_COMPLETE_VOID
|
|
750
760
|
#define UNIFFI_FFIDEF_FFI_NATIVE_AGENT_FFI_RUST_FUTURE_COMPLETE_VOID
|
|
751
761
|
void ffi_native_agent_ffi_rust_future_complete_void(uint64_t handle, RustCallStatus *_Nonnull out_status
|
|
762
|
+
);
|
|
763
|
+
#endif
|
|
764
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_FUNC_INIT_WORKSPACE
|
|
765
|
+
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_FUNC_INIT_WORKSPACE
|
|
766
|
+
uint16_t uniffi_native_agent_ffi_checksum_func_init_workspace(void
|
|
767
|
+
|
|
752
768
|
);
|
|
753
769
|
#endif
|
|
754
770
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_ABORT
|
|
@@ -893,6 +909,12 @@ uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_ap
|
|
|
893
909
|
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_CRON_APPROVAL
|
|
894
910
|
uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_cron_approval(void
|
|
895
911
|
|
|
912
|
+
);
|
|
913
|
+
#endif
|
|
914
|
+
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_MCP_TOOL
|
|
915
|
+
#define UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_RESPOND_TO_MCP_TOOL
|
|
916
|
+
uint16_t uniffi_native_agent_ffi_checksum_method_nativeagenthandle_respond_to_mcp_tool(void
|
|
917
|
+
|
|
896
918
|
);
|
|
897
919
|
#endif
|
|
898
920
|
#ifndef UNIFFI_FFIDEF_UNIFFI_NATIVE_AGENT_FFI_CHECKSUM_METHOD_NATIVEAGENTHANDLE_RESTART_MCP
|
|
@@ -7,6 +7,7 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
7
7
|
public let jsName = "NativeAgent"
|
|
8
8
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
9
9
|
// Lifecycle
|
|
10
|
+
CAPPluginMethod(name: "initWorkspace", returnType: CAPPluginReturnPromise),
|
|
10
11
|
CAPPluginMethod(name: "initialize", returnType: CAPPluginReturnPromise),
|
|
11
12
|
// Agent
|
|
12
13
|
CAPPluginMethod(name: "sendMessage", returnType: CAPPluginReturnPromise),
|
|
@@ -15,6 +16,7 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
15
16
|
CAPPluginMethod(name: "steer", returnType: CAPPluginReturnPromise),
|
|
16
17
|
// Approval gate
|
|
17
18
|
CAPPluginMethod(name: "respondToApproval", returnType: CAPPluginReturnPromise),
|
|
19
|
+
CAPPluginMethod(name: "respondToMcpTool", returnType: CAPPluginReturnPromise),
|
|
18
20
|
CAPPluginMethod(name: "respondToCronApproval", returnType: CAPPluginReturnPromise),
|
|
19
21
|
// Auth
|
|
20
22
|
CAPPluginMethod(name: "getAuthToken", returnType: CAPPluginReturnPromise),
|
|
@@ -59,12 +61,12 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
59
61
|
// ── Helper ──────────────────────────────────────────────────────────────
|
|
60
62
|
|
|
61
63
|
/// Resolves a `files://` prefixed path to an absolute iOS path
|
|
62
|
-
/// under the app's
|
|
64
|
+
/// under the app's Library directory to match the app workspace root.
|
|
63
65
|
private func resolvePath(_ path: String) -> String {
|
|
64
66
|
if path.hasPrefix("files://") {
|
|
65
67
|
let relative = String(path.dropFirst("files://".count))
|
|
66
68
|
let base = FileManager.default
|
|
67
|
-
.urls(for: .
|
|
69
|
+
.urls(for: .libraryDirectory, in: .userDomainMask)
|
|
68
70
|
.first!
|
|
69
71
|
.path
|
|
70
72
|
let resolved = (base as NSString).appendingPathComponent(relative)
|
|
@@ -84,13 +86,43 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
84
86
|
guard let h = handle else {
|
|
85
87
|
return call.reject("NativeAgent not initialized — call initialize() first")
|
|
86
88
|
}
|
|
87
|
-
Task
|
|
89
|
+
// Use GCD instead of Task{} — Rust FFI calls use block_on() which blocks
|
|
90
|
+
// the calling thread. Swift Task{} uses a cooperative thread pool that can
|
|
91
|
+
// deadlock when threads are blocked. GCD's concurrent queue is safe for blocking.
|
|
92
|
+
DispatchQueue.global(qos: .userInitiated).async {
|
|
88
93
|
block(h)
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
// ── Lifecycle ────────────────────────────────────────────────────────────
|
|
93
98
|
|
|
99
|
+
@objc func initWorkspace(_ call: CAPPluginCall) {
|
|
100
|
+
guard let dbPath = call.getString("dbPath") else {
|
|
101
|
+
return call.reject("dbPath is required")
|
|
102
|
+
}
|
|
103
|
+
guard let workspacePath = call.getString("workspacePath") else {
|
|
104
|
+
return call.reject("workspacePath is required")
|
|
105
|
+
}
|
|
106
|
+
guard let authProfilesPath = call.getString("authProfilesPath") else {
|
|
107
|
+
return call.reject("authProfilesPath is required")
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
DispatchQueue.global(qos: .userInitiated).async { [self] in
|
|
111
|
+
do {
|
|
112
|
+
try initWorkspace(
|
|
113
|
+
config: InitConfig(
|
|
114
|
+
dbPath: self.resolvePath(dbPath),
|
|
115
|
+
workspacePath: self.resolvePath(workspacePath),
|
|
116
|
+
authProfilesPath: self.resolvePath(authProfilesPath)
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
|
+
call.resolve()
|
|
120
|
+
} catch {
|
|
121
|
+
call.reject("initWorkspace failed: \(error.localizedDescription)")
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
94
126
|
@objc func initialize(_ call: CAPPluginCall) {
|
|
95
127
|
guard let dbPath = call.getString("dbPath") else {
|
|
96
128
|
return call.reject("dbPath is required")
|
|
@@ -102,12 +134,12 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
102
134
|
return call.reject("authProfilesPath is required")
|
|
103
135
|
}
|
|
104
136
|
|
|
105
|
-
|
|
137
|
+
DispatchQueue.global(qos: .userInitiated).async { [self] in
|
|
106
138
|
do {
|
|
107
139
|
let config = InitConfig(
|
|
108
|
-
dbPath: resolvePath(dbPath),
|
|
109
|
-
workspacePath: resolvePath(workspacePath),
|
|
110
|
-
authProfilesPath: resolvePath(authProfilesPath)
|
|
140
|
+
dbPath: self.resolvePath(dbPath),
|
|
141
|
+
workspacePath: self.resolvePath(workspacePath),
|
|
142
|
+
authProfilesPath: self.resolvePath(authProfilesPath)
|
|
111
143
|
)
|
|
112
144
|
let h = try NativeAgentHandle(config: config)
|
|
113
145
|
try h.setEventCallback(callback: NativeAgentEventBridge(plugin: self))
|
|
@@ -129,9 +161,6 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
129
161
|
guard let sessionKey = call.getString("sessionKey") else {
|
|
130
162
|
return call.reject("sessionKey is required")
|
|
131
163
|
}
|
|
132
|
-
guard let systemPrompt = call.getString("systemPrompt") else {
|
|
133
|
-
return call.reject("systemPrompt is required")
|
|
134
|
-
}
|
|
135
164
|
|
|
136
165
|
do {
|
|
137
166
|
let params = SendMessageParams(
|
|
@@ -139,7 +168,7 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
139
168
|
sessionKey: sessionKey,
|
|
140
169
|
model: call.getString("model"),
|
|
141
170
|
provider: call.getString("provider"),
|
|
142
|
-
systemPrompt: systemPrompt,
|
|
171
|
+
systemPrompt: call.getString("systemPrompt") ?? "",
|
|
143
172
|
maxTurns: call.getInt("maxTurns").map { UInt32($0) },
|
|
144
173
|
allowedToolsJson: call.getString("allowedToolsJson")
|
|
145
174
|
)
|
|
@@ -204,6 +233,24 @@ public class NativeAgentPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
204
233
|
}
|
|
205
234
|
}
|
|
206
235
|
|
|
236
|
+
@objc func respondToMcpTool(_ call: CAPPluginCall) {
|
|
237
|
+
withHandle(call) { h in
|
|
238
|
+
guard let toolCallId = call.getString("toolCallId") else {
|
|
239
|
+
return call.reject("toolCallId is required")
|
|
240
|
+
}
|
|
241
|
+
do {
|
|
242
|
+
try h.respondToMcpTool(
|
|
243
|
+
toolCallId: toolCallId,
|
|
244
|
+
resultJson: call.getString("resultJson") ?? "null",
|
|
245
|
+
isError: call.getBool("isError") ?? false
|
|
246
|
+
)
|
|
247
|
+
call.resolve()
|
|
248
|
+
} catch {
|
|
249
|
+
call.reject("respondToMcpTool failed: \(error.localizedDescription)")
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
207
254
|
@objc func respondToCronApproval(_ call: CAPPluginCall) {
|
|
208
255
|
withHandle(call) { h in
|
|
209
256
|
guard let requestId = call.getString("requestId") else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-native-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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",
|