openclaw-client 1.1.1 → 2.0.1
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/README.md +93 -5
- package/dist/client.d.ts +51 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +89 -14
- package/dist/types.d.ts +170 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +123 -14
- package/src/protocol.schema.json +801 -79
- package/src/types.ts +198 -17
package/src/types.ts
CHANGED
|
@@ -134,6 +134,12 @@ export interface HelloOk {
|
|
|
134
134
|
mainSessionKey: string;
|
|
135
135
|
scope?: string;
|
|
136
136
|
};
|
|
137
|
+
authMode?: 'none' | 'token' | 'password' | 'trusted-proxy';
|
|
138
|
+
updateAvailable?: {
|
|
139
|
+
currentVersion: string;
|
|
140
|
+
latestVersion: string;
|
|
141
|
+
channel: string;
|
|
142
|
+
};
|
|
137
143
|
};
|
|
138
144
|
canvasHostUrl?: string;
|
|
139
145
|
auth?: {
|
|
@@ -237,6 +243,12 @@ export interface Snapshot {
|
|
|
237
243
|
mainSessionKey: string;
|
|
238
244
|
scope?: string;
|
|
239
245
|
};
|
|
246
|
+
authMode?: 'none' | 'token' | 'password' | 'trusted-proxy';
|
|
247
|
+
updateAvailable?: {
|
|
248
|
+
currentVersion: string;
|
|
249
|
+
latestVersion: string;
|
|
250
|
+
channel: string;
|
|
251
|
+
};
|
|
240
252
|
}
|
|
241
253
|
|
|
242
254
|
export interface ErrorShape {
|
|
@@ -263,12 +275,13 @@ export interface AgentEvent {
|
|
|
263
275
|
|
|
264
276
|
export interface SendParams {
|
|
265
277
|
to: string;
|
|
266
|
-
message
|
|
278
|
+
message?: string;
|
|
267
279
|
mediaUrl?: string;
|
|
268
280
|
mediaUrls?: string[];
|
|
269
281
|
gifPlayback?: boolean;
|
|
270
282
|
channel?: string;
|
|
271
283
|
accountId?: string;
|
|
284
|
+
threadId?: string;
|
|
272
285
|
sessionKey?: string;
|
|
273
286
|
idempotencyKey: string;
|
|
274
287
|
}
|
|
@@ -293,7 +306,11 @@ export interface PollParams {
|
|
|
293
306
|
| [string, string, string, string, string, string, string, string, string, string, string]
|
|
294
307
|
| [string, string, string, string, string, string, string, string, string, string, string, string];
|
|
295
308
|
maxSelections?: number;
|
|
309
|
+
durationSeconds?: number;
|
|
296
310
|
durationHours?: number;
|
|
311
|
+
silent?: boolean;
|
|
312
|
+
isAnonymous?: boolean;
|
|
313
|
+
threadId?: string;
|
|
297
314
|
channel?: string;
|
|
298
315
|
accountId?: string;
|
|
299
316
|
idempotencyKey: string;
|
|
@@ -320,6 +337,12 @@ export interface AgentParams {
|
|
|
320
337
|
timeout?: number;
|
|
321
338
|
lane?: string;
|
|
322
339
|
extraSystemPrompt?: string;
|
|
340
|
+
inputProvenance?: {
|
|
341
|
+
kind: 'external_user' | 'inter_session' | 'internal_system';
|
|
342
|
+
sourceSessionKey?: string;
|
|
343
|
+
sourceChannel?: string;
|
|
344
|
+
sourceTool?: string;
|
|
345
|
+
};
|
|
323
346
|
idempotencyKey: string;
|
|
324
347
|
label?: string;
|
|
325
348
|
spawnedBy?: string;
|
|
@@ -423,6 +446,23 @@ export interface NodeInvokeRequestEvent {
|
|
|
423
446
|
idempotencyKey?: string;
|
|
424
447
|
}
|
|
425
448
|
|
|
449
|
+
export interface PushTestParams {
|
|
450
|
+
nodeId: string;
|
|
451
|
+
title?: string;
|
|
452
|
+
body?: string;
|
|
453
|
+
environment?: 'sandbox' | 'production';
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export interface PushTestResult {
|
|
457
|
+
ok: boolean;
|
|
458
|
+
status: number;
|
|
459
|
+
apnsId?: string;
|
|
460
|
+
reason?: string;
|
|
461
|
+
tokenSuffix: string;
|
|
462
|
+
topic: string;
|
|
463
|
+
environment: 'sandbox' | 'production';
|
|
464
|
+
}
|
|
465
|
+
|
|
426
466
|
export interface SessionsListParams {
|
|
427
467
|
limit?: number;
|
|
428
468
|
activeMinutes?: number;
|
|
@@ -469,12 +509,14 @@ export interface SessionsPatchParams {
|
|
|
469
509
|
execNode?: string | null;
|
|
470
510
|
model?: string | null;
|
|
471
511
|
spawnedBy?: string | null;
|
|
512
|
+
spawnDepth?: number | null;
|
|
472
513
|
sendPolicy?: 'allow' | 'deny' | null;
|
|
473
514
|
groupActivation?: 'mention' | 'always' | null;
|
|
474
515
|
}
|
|
475
516
|
|
|
476
517
|
export interface SessionsResetParams {
|
|
477
518
|
key: string;
|
|
519
|
+
reason?: 'new' | 'reset';
|
|
478
520
|
}
|
|
479
521
|
|
|
480
522
|
export interface SessionsDeleteParams {
|
|
@@ -487,6 +529,14 @@ export interface SessionsCompactParams {
|
|
|
487
529
|
maxLines?: number;
|
|
488
530
|
}
|
|
489
531
|
|
|
532
|
+
export interface SessionsUsageParams {
|
|
533
|
+
key?: string;
|
|
534
|
+
startDate?: string;
|
|
535
|
+
endDate?: string;
|
|
536
|
+
limit?: number;
|
|
537
|
+
includeContextWeight?: boolean;
|
|
538
|
+
}
|
|
539
|
+
|
|
490
540
|
export interface ConfigGetParams {}
|
|
491
541
|
|
|
492
542
|
export interface ConfigSetParams {
|
|
@@ -624,6 +674,35 @@ export interface TalkModeParams {
|
|
|
624
674
|
phase?: string;
|
|
625
675
|
}
|
|
626
676
|
|
|
677
|
+
export interface TalkConfigParams {
|
|
678
|
+
includeSecrets?: boolean;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export interface TalkConfigResult {
|
|
682
|
+
config: {
|
|
683
|
+
talk?: {
|
|
684
|
+
voiceId?: string;
|
|
685
|
+
voiceAliases?: {
|
|
686
|
+
/**
|
|
687
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
688
|
+
* via the `patternProperty` "^(.*)$".
|
|
689
|
+
*/
|
|
690
|
+
[k: string]: string;
|
|
691
|
+
};
|
|
692
|
+
modelId?: string;
|
|
693
|
+
outputFormat?: string;
|
|
694
|
+
apiKey?: string;
|
|
695
|
+
interruptOnSpeech?: boolean;
|
|
696
|
+
};
|
|
697
|
+
session?: {
|
|
698
|
+
mainKey?: string;
|
|
699
|
+
};
|
|
700
|
+
ui?: {
|
|
701
|
+
seamColor?: string;
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
|
|
627
706
|
export interface ChannelsStatusParams {
|
|
628
707
|
probe?: boolean;
|
|
629
708
|
timeoutMs?: number;
|
|
@@ -742,6 +821,44 @@ export interface AgentSummary {
|
|
|
742
821
|
};
|
|
743
822
|
}
|
|
744
823
|
|
|
824
|
+
export interface AgentsCreateParams {
|
|
825
|
+
name: string;
|
|
826
|
+
workspace: string;
|
|
827
|
+
emoji?: string;
|
|
828
|
+
avatar?: string;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export interface AgentsCreateResult {
|
|
832
|
+
ok: true;
|
|
833
|
+
agentId: string;
|
|
834
|
+
name: string;
|
|
835
|
+
workspace: string;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
export interface AgentsUpdateParams {
|
|
839
|
+
agentId: string;
|
|
840
|
+
name?: string;
|
|
841
|
+
workspace?: string;
|
|
842
|
+
model?: string;
|
|
843
|
+
avatar?: string;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
export interface AgentsUpdateResult {
|
|
847
|
+
ok: true;
|
|
848
|
+
agentId: string;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
export interface AgentsDeleteParams {
|
|
852
|
+
agentId: string;
|
|
853
|
+
deleteFiles?: boolean;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export interface AgentsDeleteResult {
|
|
857
|
+
ok: true;
|
|
858
|
+
agentId: string;
|
|
859
|
+
removedBindings: number;
|
|
860
|
+
}
|
|
861
|
+
|
|
745
862
|
export interface AgentsFileEntry {
|
|
746
863
|
name: string;
|
|
747
864
|
path: string;
|
|
@@ -877,6 +994,7 @@ export interface SkillsUpdateParams {
|
|
|
877
994
|
export interface CronJob {
|
|
878
995
|
id: string;
|
|
879
996
|
agentId?: string;
|
|
997
|
+
sessionKey?: string;
|
|
880
998
|
name: string;
|
|
881
999
|
description?: string;
|
|
882
1000
|
enabled: boolean;
|
|
@@ -897,6 +1015,7 @@ export interface CronJob {
|
|
|
897
1015
|
kind: 'cron';
|
|
898
1016
|
expr: string;
|
|
899
1017
|
tz?: string;
|
|
1018
|
+
staggerMs?: number;
|
|
900
1019
|
};
|
|
901
1020
|
sessionTarget: 'main' | 'isolated';
|
|
902
1021
|
wakeMode: 'next-heartbeat' | 'now';
|
|
@@ -911,13 +1030,31 @@ export interface CronJob {
|
|
|
911
1030
|
model?: string;
|
|
912
1031
|
thinking?: string;
|
|
913
1032
|
timeoutSeconds?: number;
|
|
1033
|
+
allowUnsafeExternalContent?: boolean;
|
|
1034
|
+
deliver?: boolean;
|
|
1035
|
+
channel?: string;
|
|
1036
|
+
to?: string;
|
|
1037
|
+
bestEffortDeliver?: boolean;
|
|
1038
|
+
};
|
|
1039
|
+
delivery?:
|
|
1040
|
+
| {
|
|
1041
|
+
mode: 'none';
|
|
1042
|
+
channel?: 'last' | string;
|
|
1043
|
+
bestEffort?: boolean;
|
|
1044
|
+
to?: string;
|
|
1045
|
+
}
|
|
1046
|
+
| {
|
|
1047
|
+
mode: 'announce';
|
|
1048
|
+
channel?: 'last' | string;
|
|
1049
|
+
bestEffort?: boolean;
|
|
1050
|
+
to?: string;
|
|
1051
|
+
}
|
|
1052
|
+
| {
|
|
1053
|
+
mode: 'webhook';
|
|
1054
|
+
channel?: 'last' | string;
|
|
1055
|
+
bestEffort?: boolean;
|
|
1056
|
+
to: string;
|
|
914
1057
|
};
|
|
915
|
-
delivery?: {
|
|
916
|
-
mode: 'none' | 'announce';
|
|
917
|
-
channel?: 'last' | string;
|
|
918
|
-
to?: string;
|
|
919
|
-
bestEffort?: boolean;
|
|
920
|
-
};
|
|
921
1058
|
state: {
|
|
922
1059
|
nextRunAtMs?: number;
|
|
923
1060
|
runningAtMs?: number;
|
|
@@ -925,6 +1062,7 @@ export interface CronJob {
|
|
|
925
1062
|
lastStatus?: 'ok' | 'error' | 'skipped';
|
|
926
1063
|
lastError?: string;
|
|
927
1064
|
lastDurationMs?: number;
|
|
1065
|
+
consecutiveErrors?: number;
|
|
928
1066
|
};
|
|
929
1067
|
}
|
|
930
1068
|
|
|
@@ -937,6 +1075,7 @@ export interface CronStatusParams {}
|
|
|
937
1075
|
export interface CronAddParams {
|
|
938
1076
|
name: string;
|
|
939
1077
|
agentId?: string | null;
|
|
1078
|
+
sessionKey?: string | null;
|
|
940
1079
|
description?: string;
|
|
941
1080
|
enabled?: boolean;
|
|
942
1081
|
deleteAfterRun?: boolean;
|
|
@@ -954,6 +1093,7 @@ export interface CronAddParams {
|
|
|
954
1093
|
kind: 'cron';
|
|
955
1094
|
expr: string;
|
|
956
1095
|
tz?: string;
|
|
1096
|
+
staggerMs?: number;
|
|
957
1097
|
};
|
|
958
1098
|
sessionTarget: 'main' | 'isolated';
|
|
959
1099
|
wakeMode: 'next-heartbeat' | 'now';
|
|
@@ -968,13 +1108,31 @@ export interface CronAddParams {
|
|
|
968
1108
|
model?: string;
|
|
969
1109
|
thinking?: string;
|
|
970
1110
|
timeoutSeconds?: number;
|
|
1111
|
+
allowUnsafeExternalContent?: boolean;
|
|
1112
|
+
deliver?: boolean;
|
|
1113
|
+
channel?: string;
|
|
1114
|
+
to?: string;
|
|
1115
|
+
bestEffortDeliver?: boolean;
|
|
1116
|
+
};
|
|
1117
|
+
delivery?:
|
|
1118
|
+
| {
|
|
1119
|
+
mode: 'none';
|
|
1120
|
+
channel?: 'last' | string;
|
|
1121
|
+
bestEffort?: boolean;
|
|
1122
|
+
to?: string;
|
|
1123
|
+
}
|
|
1124
|
+
| {
|
|
1125
|
+
mode: 'announce';
|
|
1126
|
+
channel?: 'last' | string;
|
|
1127
|
+
bestEffort?: boolean;
|
|
1128
|
+
to?: string;
|
|
1129
|
+
}
|
|
1130
|
+
| {
|
|
1131
|
+
mode: 'webhook';
|
|
1132
|
+
channel?: 'last' | string;
|
|
1133
|
+
bestEffort?: boolean;
|
|
1134
|
+
to: string;
|
|
971
1135
|
};
|
|
972
|
-
delivery?: {
|
|
973
|
-
mode: 'none' | 'announce';
|
|
974
|
-
channel?: 'last' | string;
|
|
975
|
-
to?: string;
|
|
976
|
-
bestEffort?: boolean;
|
|
977
|
-
};
|
|
978
1136
|
}
|
|
979
1137
|
|
|
980
1138
|
export type CronUpdateParams =
|
|
@@ -983,6 +1141,7 @@ export type CronUpdateParams =
|
|
|
983
1141
|
patch: {
|
|
984
1142
|
name?: string;
|
|
985
1143
|
agentId?: string | null;
|
|
1144
|
+
sessionKey?: string | null;
|
|
986
1145
|
description?: string;
|
|
987
1146
|
enabled?: boolean;
|
|
988
1147
|
deleteAfterRun?: boolean;
|
|
@@ -1000,6 +1159,7 @@ export type CronUpdateParams =
|
|
|
1000
1159
|
kind: 'cron';
|
|
1001
1160
|
expr: string;
|
|
1002
1161
|
tz?: string;
|
|
1162
|
+
staggerMs?: number;
|
|
1003
1163
|
};
|
|
1004
1164
|
sessionTarget?: 'main' | 'isolated';
|
|
1005
1165
|
wakeMode?: 'next-heartbeat' | 'now';
|
|
@@ -1014,12 +1174,17 @@ export type CronUpdateParams =
|
|
|
1014
1174
|
model?: string;
|
|
1015
1175
|
thinking?: string;
|
|
1016
1176
|
timeoutSeconds?: number;
|
|
1177
|
+
allowUnsafeExternalContent?: boolean;
|
|
1178
|
+
deliver?: boolean;
|
|
1179
|
+
channel?: string;
|
|
1180
|
+
to?: string;
|
|
1181
|
+
bestEffortDeliver?: boolean;
|
|
1017
1182
|
};
|
|
1018
1183
|
delivery?: {
|
|
1019
|
-
mode?: 'none' | 'announce';
|
|
1184
|
+
mode?: 'none' | 'announce' | 'webhook';
|
|
1020
1185
|
channel?: 'last' | string;
|
|
1021
|
-
to?: string;
|
|
1022
1186
|
bestEffort?: boolean;
|
|
1187
|
+
to?: string;
|
|
1023
1188
|
};
|
|
1024
1189
|
state?: {
|
|
1025
1190
|
nextRunAtMs?: number;
|
|
@@ -1028,6 +1193,7 @@ export type CronUpdateParams =
|
|
|
1028
1193
|
lastStatus?: 'ok' | 'error' | 'skipped';
|
|
1029
1194
|
lastError?: string;
|
|
1030
1195
|
lastDurationMs?: number;
|
|
1196
|
+
consecutiveErrors?: number;
|
|
1031
1197
|
};
|
|
1032
1198
|
};
|
|
1033
1199
|
}
|
|
@@ -1036,6 +1202,7 @@ export type CronUpdateParams =
|
|
|
1036
1202
|
patch: {
|
|
1037
1203
|
name?: string;
|
|
1038
1204
|
agentId?: string | null;
|
|
1205
|
+
sessionKey?: string | null;
|
|
1039
1206
|
description?: string;
|
|
1040
1207
|
enabled?: boolean;
|
|
1041
1208
|
deleteAfterRun?: boolean;
|
|
@@ -1053,6 +1220,7 @@ export type CronUpdateParams =
|
|
|
1053
1220
|
kind: 'cron';
|
|
1054
1221
|
expr: string;
|
|
1055
1222
|
tz?: string;
|
|
1223
|
+
staggerMs?: number;
|
|
1056
1224
|
};
|
|
1057
1225
|
sessionTarget?: 'main' | 'isolated';
|
|
1058
1226
|
wakeMode?: 'next-heartbeat' | 'now';
|
|
@@ -1067,12 +1235,17 @@ export type CronUpdateParams =
|
|
|
1067
1235
|
model?: string;
|
|
1068
1236
|
thinking?: string;
|
|
1069
1237
|
timeoutSeconds?: number;
|
|
1238
|
+
allowUnsafeExternalContent?: boolean;
|
|
1239
|
+
deliver?: boolean;
|
|
1240
|
+
channel?: string;
|
|
1241
|
+
to?: string;
|
|
1242
|
+
bestEffortDeliver?: boolean;
|
|
1070
1243
|
};
|
|
1071
1244
|
delivery?: {
|
|
1072
|
-
mode?: 'none' | 'announce';
|
|
1245
|
+
mode?: 'none' | 'announce' | 'webhook';
|
|
1073
1246
|
channel?: 'last' | string;
|
|
1074
|
-
to?: string;
|
|
1075
1247
|
bestEffort?: boolean;
|
|
1248
|
+
to?: string;
|
|
1076
1249
|
};
|
|
1077
1250
|
state?: {
|
|
1078
1251
|
nextRunAtMs?: number;
|
|
@@ -1081,6 +1254,7 @@ export type CronUpdateParams =
|
|
|
1081
1254
|
lastStatus?: 'ok' | 'error' | 'skipped';
|
|
1082
1255
|
lastError?: string;
|
|
1083
1256
|
lastDurationMs?: number;
|
|
1257
|
+
consecutiveErrors?: number;
|
|
1084
1258
|
};
|
|
1085
1259
|
};
|
|
1086
1260
|
};
|
|
@@ -1120,6 +1294,8 @@ export interface CronRunLogEntry {
|
|
|
1120
1294
|
status?: 'ok' | 'error' | 'skipped';
|
|
1121
1295
|
error?: string;
|
|
1122
1296
|
summary?: string;
|
|
1297
|
+
sessionId?: string;
|
|
1298
|
+
sessionKey?: string;
|
|
1123
1299
|
runAtMs?: number;
|
|
1124
1300
|
durationMs?: number;
|
|
1125
1301
|
nextRunAtMs?: number;
|
|
@@ -1268,6 +1444,7 @@ export interface ExecApprovalRequestParams {
|
|
|
1268
1444
|
resolvedPath?: string | null;
|
|
1269
1445
|
sessionKey?: string | null;
|
|
1270
1446
|
timeoutMs?: number;
|
|
1447
|
+
twoPhase?: boolean;
|
|
1271
1448
|
}
|
|
1272
1449
|
|
|
1273
1450
|
export interface ExecApprovalResolveParams {
|
|
@@ -1285,6 +1462,10 @@ export interface DevicePairRejectParams {
|
|
|
1285
1462
|
requestId: string;
|
|
1286
1463
|
}
|
|
1287
1464
|
|
|
1465
|
+
export interface DevicePairRemoveParams {
|
|
1466
|
+
deviceId: string;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1288
1469
|
export interface DeviceTokenRotateParams {
|
|
1289
1470
|
deviceId: string;
|
|
1290
1471
|
role: string;
|