@ericsanchezok/synergy-sdk 2.2.1 → 2.3.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.
@@ -397,6 +397,38 @@ export class Agenda extends HeyApiClient {
397
397
  });
398
398
  }
399
399
  }
400
+ export class Files extends HeyApiClient {
401
+ /**
402
+ * Restore session files
403
+ *
404
+ * Explicitly restore files from session patch data. Message rollback never calls this automatically.
405
+ */
406
+ restore(parameters, options) {
407
+ const params = buildClientParams([parameters], [
408
+ {
409
+ args: [
410
+ { in: "path", key: "sessionID" },
411
+ { in: "query", key: "directory" },
412
+ { in: "query", key: "scopeID" },
413
+ { in: "body", key: "rollbackID" },
414
+ { in: "body", key: "messageID" },
415
+ { in: "body", key: "partID" },
416
+ { in: "body", key: "files" },
417
+ ],
418
+ },
419
+ ]);
420
+ return (options?.client ?? this.client).post({
421
+ url: "/session/{sessionID}/files/restore",
422
+ ...options,
423
+ ...params,
424
+ headers: {
425
+ "Content-Type": "application/json",
426
+ ...options?.headers,
427
+ ...params.headers,
428
+ },
429
+ });
430
+ }
431
+ }
400
432
  export class Export extends HeyApiClient {
401
433
  /**
402
434
  * Estimate session export size
@@ -769,6 +801,10 @@ export class Session extends HeyApiClient {
769
801
  { in: "query", key: "directory" },
770
802
  { in: "query", key: "scopeID" },
771
803
  { in: "body", key: "messageID" },
804
+ { in: "body", key: "position" },
805
+ { in: "body", key: "workspace" },
806
+ { in: "body", key: "title" },
807
+ { in: "body", key: "controlProfile" },
772
808
  ],
773
809
  },
774
810
  ]);
@@ -804,6 +840,107 @@ export class Session extends HeyApiClient {
804
840
  ...params,
805
841
  });
806
842
  }
843
+ /**
844
+ * List session inbox items
845
+ *
846
+ * Get active queued user messages and agent updates for a session.
847
+ */
848
+ inbox(parameters, options) {
849
+ const params = buildClientParams([parameters], [
850
+ {
851
+ args: [
852
+ { in: "path", key: "sessionID" },
853
+ { in: "query", key: "directory" },
854
+ { in: "query", key: "scopeID" },
855
+ ],
856
+ },
857
+ ]);
858
+ return (options?.client ?? this.client).get({
859
+ url: "/session/{sessionID}/inbox",
860
+ ...options,
861
+ ...params,
862
+ });
863
+ }
864
+ /**
865
+ * Submit session input
866
+ *
867
+ * Submit user input to a session. If the session is running, the input is queued in the session inbox; otherwise a new turn starts immediately.
868
+ */
869
+ input(parameters, options) {
870
+ const params = buildClientParams([parameters], [
871
+ {
872
+ args: [
873
+ { in: "path", key: "sessionID" },
874
+ { in: "query", key: "directory" },
875
+ { in: "query", key: "scopeID" },
876
+ { in: "body", key: "messageID" },
877
+ { in: "body", key: "model" },
878
+ { in: "body", key: "agent" },
879
+ { in: "body", key: "noReply" },
880
+ { in: "body", key: "metadata" },
881
+ { in: "body", key: "summary" },
882
+ { in: "body", key: "tools" },
883
+ { in: "body", key: "system" },
884
+ { in: "body", key: "variant" },
885
+ { in: "body", key: "parts" },
886
+ ],
887
+ },
888
+ ]);
889
+ return (options?.client ?? this.client).post({
890
+ url: "/session/{sessionID}/input",
891
+ ...options,
892
+ ...params,
893
+ headers: {
894
+ "Content-Type": "application/json",
895
+ ...options?.headers,
896
+ ...params.headers,
897
+ },
898
+ });
899
+ }
900
+ /**
901
+ * Guide current run with inbox item
902
+ *
903
+ * Promote a queued user message so it is added before the next model request in the current run.
904
+ */
905
+ inboxGuide(parameters, options) {
906
+ const params = buildClientParams([parameters], [
907
+ {
908
+ args: [
909
+ { in: "path", key: "sessionID" },
910
+ { in: "path", key: "itemID" },
911
+ { in: "query", key: "directory" },
912
+ { in: "query", key: "scopeID" },
913
+ ],
914
+ },
915
+ ]);
916
+ return (options?.client ?? this.client).post({
917
+ url: "/session/{sessionID}/inbox/{itemID}/guide",
918
+ ...options,
919
+ ...params,
920
+ });
921
+ }
922
+ /**
923
+ * Remove inbox item
924
+ *
925
+ * Remove a queued user message from the session inbox.
926
+ */
927
+ inboxRemove(parameters, options) {
928
+ const params = buildClientParams([parameters], [
929
+ {
930
+ args: [
931
+ { in: "path", key: "sessionID" },
932
+ { in: "path", key: "itemID" },
933
+ { in: "query", key: "directory" },
934
+ { in: "query", key: "scopeID" },
935
+ ],
936
+ },
937
+ ]);
938
+ return (options?.client ?? this.client).delete({
939
+ url: "/session/{sessionID}/inbox/{itemID}",
940
+ ...options,
941
+ ...params,
942
+ });
943
+ }
807
944
  /**
808
945
  * Summarize session
809
946
  *
@@ -846,6 +983,7 @@ export class Session extends HeyApiClient {
846
983
  { in: "query", key: "directory" },
847
984
  { in: "query", key: "scopeID" },
848
985
  { in: "query", key: "limit" },
986
+ { in: "query", key: "raw" },
849
987
  ],
850
988
  },
851
989
  ]);
@@ -1033,24 +1171,23 @@ export class Session extends HeyApiClient {
1033
1171
  });
1034
1172
  }
1035
1173
  /**
1036
- * Revert message
1174
+ * Rollback session history
1037
1175
  *
1038
- * Revert a specific message in a session, undoing its effects and restoring the previous state.
1176
+ * Hide the latest user turn(s) from effective message history without modifying local files.
1039
1177
  */
1040
- revert(parameters, options) {
1178
+ rollback(parameters, options) {
1041
1179
  const params = buildClientParams([parameters], [
1042
1180
  {
1043
1181
  args: [
1044
1182
  { in: "path", key: "sessionID" },
1045
1183
  { in: "query", key: "directory" },
1046
1184
  { in: "query", key: "scopeID" },
1047
- { in: "body", key: "messageID" },
1048
- { in: "body", key: "partID" },
1185
+ { in: "body", key: "numTurns" },
1049
1186
  ],
1050
1187
  },
1051
1188
  ]);
1052
1189
  return (options?.client ?? this.client).post({
1053
- url: "/session/{sessionID}/revert",
1190
+ url: "/session/{sessionID}/rollback",
1054
1191
  ...options,
1055
1192
  ...params,
1056
1193
  headers: {
@@ -1061,11 +1198,11 @@ export class Session extends HeyApiClient {
1061
1198
  });
1062
1199
  }
1063
1200
  /**
1064
- * Restore reverted messages
1201
+ * Restore rolled-back session history
1065
1202
  *
1066
- * Restore all previously reverted messages in a session.
1203
+ * Restore the latest rollback when no new user or assistant turn has been added after it.
1067
1204
  */
1068
- unrevert(parameters, options) {
1205
+ unrollback(parameters, options) {
1069
1206
  const params = buildClientParams([parameters], [
1070
1207
  {
1071
1208
  args: [
@@ -1076,7 +1213,7 @@ export class Session extends HeyApiClient {
1076
1213
  },
1077
1214
  ]);
1078
1215
  return (options?.client ?? this.client).post({
1079
- url: "/session/{sessionID}/unrevert",
1216
+ url: "/session/{sessionID}/unrollback",
1080
1217
  ...options,
1081
1218
  ...params,
1082
1219
  });
@@ -1108,6 +1245,7 @@ export class Session extends HeyApiClient {
1108
1245
  },
1109
1246
  });
1110
1247
  }
1248
+ files = new Files({ client: this.client });
1111
1249
  export = new Export({ client: this.client });
1112
1250
  }
1113
1251
  export class Nav extends HeyApiClient {
@@ -1180,7 +1318,50 @@ export class Global extends HeyApiClient {
1180
1318
  session = new Session({ client: this.client });
1181
1319
  nav = new Nav({ client: this.client });
1182
1320
  }
1321
+ export class Diagnostics extends HeyApiClient {
1322
+ /**
1323
+ * Get local diagnostics summary
1324
+ *
1325
+ * Get a readonly local diagnostics summary for the Synergy server.
1326
+ */
1327
+ summary(options) {
1328
+ return (options?.client ?? this.client).get({
1329
+ url: "/global/diagnostics",
1330
+ ...options,
1331
+ });
1332
+ }
1333
+ }
1334
+ export class Observability extends HeyApiClient {
1335
+ diagnostics = new Diagnostics({ client: this.client });
1336
+ }
1183
1337
  export class Credentials extends HeyApiClient {
1338
+ /**
1339
+ * Import provider credentials
1340
+ *
1341
+ * Import credentials from a local provider-specific credential source.
1342
+ */
1343
+ importCredentials(parameters, options) {
1344
+ const params = buildClientParams([parameters], [
1345
+ {
1346
+ args: [
1347
+ { in: "path", key: "providerID" },
1348
+ { in: "query", key: "directory" },
1349
+ { in: "query", key: "scopeID" },
1350
+ { in: "body", key: "method" },
1351
+ ],
1352
+ },
1353
+ ]);
1354
+ return (options?.client ?? this.client).post({
1355
+ url: "/provider/{providerID}/import",
1356
+ ...options,
1357
+ ...params,
1358
+ headers: {
1359
+ "Content-Type": "application/json",
1360
+ ...options?.headers,
1361
+ ...params.headers,
1362
+ },
1363
+ });
1364
+ }
1184
1365
  /**
1185
1366
  * Check local credential status
1186
1367
  *
@@ -2174,6 +2355,27 @@ export class Domain extends HeyApiClient {
2174
2355
  },
2175
2356
  });
2176
2357
  }
2358
+ /**
2359
+ * Open config domain file
2360
+ *
2361
+ * Materialize and open one canonical global config domain file with the operating system default.
2362
+ */
2363
+ open(parameters, options) {
2364
+ const params = buildClientParams([parameters], [
2365
+ {
2366
+ args: [
2367
+ { in: "path", key: "domain" },
2368
+ { in: "query", key: "directory" },
2369
+ { in: "query", key: "scopeID" },
2370
+ ],
2371
+ },
2372
+ ]);
2373
+ return (options?.client ?? this.client).post({
2374
+ url: "/config/domains/{domain}/open",
2375
+ ...options,
2376
+ ...params,
2377
+ });
2378
+ }
2177
2379
  }
2178
2380
  export class Import extends HeyApiClient {
2179
2381
  /**
@@ -2851,6 +3053,49 @@ export class Command extends HeyApiClient {
2851
3053
  });
2852
3054
  }
2853
3055
  }
3056
+ export class Usage extends HeyApiClient {
3057
+ /**
3058
+ * List provider account usage
3059
+ *
3060
+ * Retrieve account usage snapshots for connected providers that expose usage information.
3061
+ */
3062
+ list(parameters, options) {
3063
+ const params = buildClientParams([parameters], [
3064
+ {
3065
+ args: [
3066
+ { in: "query", key: "directory" },
3067
+ { in: "query", key: "scopeID" },
3068
+ ],
3069
+ },
3070
+ ]);
3071
+ return (options?.client ?? this.client).get({
3072
+ url: "/provider/usage",
3073
+ ...options,
3074
+ ...params,
3075
+ });
3076
+ }
3077
+ /**
3078
+ * Get provider account usage
3079
+ *
3080
+ * Retrieve account usage and quota windows for a provider.
3081
+ */
3082
+ get(parameters, options) {
3083
+ const params = buildClientParams([parameters], [
3084
+ {
3085
+ args: [
3086
+ { in: "path", key: "providerID" },
3087
+ { in: "query", key: "directory" },
3088
+ { in: "query", key: "scopeID" },
3089
+ ],
3090
+ },
3091
+ ]);
3092
+ return (options?.client ?? this.client).get({
3093
+ url: "/provider/{providerID}/usage",
3094
+ ...options,
3095
+ ...params,
3096
+ });
3097
+ }
3098
+ }
2854
3099
  export class Oauth extends HeyApiClient {
2855
3100
  /**
2856
3101
  * OAuth authorize
@@ -2949,7 +3194,9 @@ export class Provider extends HeyApiClient {
2949
3194
  ...params,
2950
3195
  });
2951
3196
  }
3197
+ usage = new Usage({ client: this.client });
2952
3198
  oauth = new Oauth({ client: this.client });
3199
+ credentials = new Credentials({ client: this.client });
2953
3200
  }
2954
3201
  export class Skill extends HeyApiClient {
2955
3202
  /**
@@ -3228,7 +3475,7 @@ export class Experience extends HeyApiClient {
3228
3475
  },
3229
3476
  ]);
3230
3477
  return (options?.client ?? this.client).post({
3231
- url: "/engram/experience/search",
3478
+ url: "/library/experience/search",
3232
3479
  ...options,
3233
3480
  ...params,
3234
3481
  headers: {
@@ -3258,7 +3505,7 @@ export class Experience extends HeyApiClient {
3258
3505
  },
3259
3506
  ]);
3260
3507
  return (options?.client ?? this.client).get({
3261
- url: "/engram/experience/page",
3508
+ url: "/library/experience/page",
3262
3509
  ...options,
3263
3510
  ...params,
3264
3511
  });
@@ -3279,7 +3526,7 @@ export class Experience extends HeyApiClient {
3279
3526
  },
3280
3527
  ]);
3281
3528
  return (options?.client ?? this.client).delete({
3282
- url: "/engram/experience/{id}",
3529
+ url: "/library/experience/{id}",
3283
3530
  ...options,
3284
3531
  ...params,
3285
3532
  });
@@ -3300,7 +3547,7 @@ export class Experience extends HeyApiClient {
3300
3547
  },
3301
3548
  ]);
3302
3549
  return (options?.client ?? this.client).get({
3303
- url: "/engram/experience/{id}",
3550
+ url: "/library/experience/{id}",
3304
3551
  ...options,
3305
3552
  ...params,
3306
3553
  });
@@ -3323,7 +3570,7 @@ export class Experience extends HeyApiClient {
3323
3570
  },
3324
3571
  ]);
3325
3572
  return (options?.client ?? this.client).put({
3326
- url: "/engram/experience/{id}/reward",
3573
+ url: "/library/experience/{id}/reward",
3327
3574
  ...options,
3328
3575
  ...params,
3329
3576
  headers: {
@@ -3348,17 +3595,17 @@ export class Experience extends HeyApiClient {
3348
3595
  },
3349
3596
  ]);
3350
3597
  return (options?.client ?? this.client).get({
3351
- url: "/engram/experience",
3598
+ url: "/library/experience",
3352
3599
  ...options,
3353
3600
  ...params,
3354
3601
  });
3355
3602
  }
3356
3603
  }
3357
- export class Engram extends HeyApiClient {
3604
+ export class Library extends HeyApiClient {
3358
3605
  /**
3359
- * Get engram stats
3606
+ * Get library stats
3360
3607
  *
3361
- * Get statistics about the engram database. By default returns a summary with counts and DB size. Use ?recompute=true to force a full analytics recompute and return the extended snapshot.
3608
+ * Get statistics about the library database. By default returns a summary with counts and DB size. Use ?recompute=true to force a full analytics recompute and return the extended snapshot.
3362
3609
  */
3363
3610
  stats(parameters, options) {
3364
3611
  const params = buildClientParams([parameters], [
@@ -3371,7 +3618,7 @@ export class Engram extends HeyApiClient {
3371
3618
  },
3372
3619
  ]);
3373
3620
  return (options?.client ?? this.client).get({
3374
- url: "/engram/stats",
3621
+ url: "/library/stats",
3375
3622
  ...options,
3376
3623
  ...params,
3377
3624
  });
@@ -3395,7 +3642,7 @@ export class Engram extends HeyApiClient {
3395
3642
  },
3396
3643
  ]);
3397
3644
  return (options?.client ?? this.client).post({
3398
- url: "/engram/search",
3645
+ url: "/library/search",
3399
3646
  ...options,
3400
3647
  ...params,
3401
3648
  headers: {
@@ -3431,7 +3678,7 @@ export class Engram extends HeyApiClient {
3431
3678
  },
3432
3679
  ]);
3433
3680
  return (options?.client ?? this.client).post({
3434
- url: "/engram/reset",
3681
+ url: "/library/reset",
3435
3682
  ...options,
3436
3683
  ...params,
3437
3684
  headers: {
@@ -3457,7 +3704,7 @@ export class Engram extends HeyApiClient {
3457
3704
  },
3458
3705
  ]);
3459
3706
  return (options?.client ?? this.client).delete({
3460
- url: "/engram/{id}",
3707
+ url: "/library/{id}",
3461
3708
  ...options,
3462
3709
  ...params,
3463
3710
  });
@@ -3478,7 +3725,7 @@ export class Engram extends HeyApiClient {
3478
3725
  },
3479
3726
  ]);
3480
3727
  return (options?.client ?? this.client).get({
3481
- url: "/engram/{id}",
3728
+ url: "/library/{id}",
3482
3729
  ...options,
3483
3730
  ...params,
3484
3731
  });
@@ -3500,7 +3747,7 @@ export class Engram extends HeyApiClient {
3500
3747
  },
3501
3748
  ]);
3502
3749
  return (options?.client ?? this.client).get({
3503
- url: "/engram",
3750
+ url: "/library",
3504
3751
  ...options,
3505
3752
  ...params,
3506
3753
  });
@@ -5158,6 +5405,7 @@ export class SynergyClient extends HeyApiClient {
5158
5405
  SynergyClient.__registry.set(this, args?.key);
5159
5406
  }
5160
5407
  global = new Global({ client: this.client });
5408
+ observability = new Observability({ client: this.client });
5161
5409
  holos = new Holos({ client: this.client });
5162
5410
  agenda = new Agenda({ client: this.client });
5163
5411
  scope = new Scope({ client: this.client });
@@ -5180,7 +5428,7 @@ export class SynergyClient extends HeyApiClient {
5180
5428
  skill = new Skill({ client: this.client });
5181
5429
  find = new Find({ client: this.client });
5182
5430
  file = new File({ client: this.client });
5183
- engram = new Engram({ client: this.client });
5431
+ library = new Library({ client: this.client });
5184
5432
  note = new Note({ client: this.client });
5185
5433
  blueprint = new Blueprint({ client: this.client });
5186
5434
  asset = new Asset({ client: this.client });