@nebula-ai/sdk 1.4.0 → 1.5.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/dist/index.js CHANGED
@@ -289,14 +289,14 @@ var ClientResource = class {
289
289
  * @endpoint GET /v1/health
290
290
  */
291
291
  async health(options) {
292
- return this.core.request({
292
+ return (await this.core.request({
293
293
  method: "GET",
294
294
  path: "/v1/health",
295
295
  pathParams: {},
296
296
  query: void 0,
297
297
  idempotent: true,
298
298
  signal: options?.signal
299
- });
299
+ })).results;
300
300
  }
301
301
  };
302
302
  //#endregion
@@ -319,16 +319,16 @@ var CollectionsResource = class {
319
319
  * @operationId collections.create
320
320
  * @endpoint POST /v1/collections
321
321
  */
322
- async create(params, options) {
323
- return this.core.request({
322
+ async create(body, options) {
323
+ return (await this.core.request({
324
324
  method: "POST",
325
325
  path: "/v1/collections",
326
326
  pathParams: {},
327
327
  query: void 0,
328
- body: params.body,
328
+ body,
329
329
  idempotent: false,
330
330
  signal: options?.signal
331
- });
331
+ })).results;
332
332
  }
333
333
  /**
334
334
  *
@@ -344,14 +344,14 @@ var CollectionsResource = class {
344
344
  * @endpoint DELETE /v1/collections/{id}
345
345
  */
346
346
  async delete(id, options) {
347
- return this.core.request({
347
+ return (await this.core.request({
348
348
  method: "DELETE",
349
349
  path: "/v1/collections/{id}",
350
350
  pathParams: { id },
351
351
  query: void 0,
352
352
  idempotent: true,
353
353
  signal: options?.signal
354
- });
354
+ })).results;
355
355
  }
356
356
  /**
357
357
  *
@@ -399,14 +399,14 @@ var CollectionsResource = class {
399
399
  * @endpoint GET /v1/collections/{id}
400
400
  */
401
401
  async retrieve(id, options) {
402
- return this.core.request({
402
+ return (await this.core.request({
403
403
  method: "GET",
404
404
  path: "/v1/collections/{id}",
405
405
  pathParams: { id },
406
406
  query: void 0,
407
407
  idempotent: true,
408
408
  signal: options?.signal
409
- });
409
+ })).results;
410
410
  }
411
411
  /**
412
412
  *
@@ -420,14 +420,14 @@ var CollectionsResource = class {
420
420
  * @endpoint GET /v1/collections/name/{collection_name}
421
421
  */
422
422
  async retrieveByName(params, options) {
423
- return this.core.request({
423
+ return (await this.core.request({
424
424
  method: "GET",
425
425
  path: "/v1/collections/name/{collection_name}",
426
426
  pathParams: { collection_name: params.collectionName },
427
427
  query: { owner_id: params.ownerId },
428
428
  idempotent: true,
429
429
  signal: options?.signal
430
- });
430
+ })).results;
431
431
  }
432
432
  /**
433
433
  *
@@ -442,7 +442,7 @@ var CollectionsResource = class {
442
442
  * @endpoint POST /v1/collections/{id}
443
443
  */
444
444
  async update(params, options) {
445
- return this.core.request({
445
+ return (await this.core.request({
446
446
  method: "POST",
447
447
  path: "/v1/collections/{id}",
448
448
  pathParams: { id: params.id },
@@ -450,7 +450,7 @@ var CollectionsResource = class {
450
450
  body: params.body,
451
451
  idempotent: false,
452
452
  signal: options?.signal
453
- });
453
+ })).results;
454
454
  }
455
455
  };
456
456
  //#endregion
@@ -469,7 +469,7 @@ var ConnectorsResource = class {
469
469
  * @endpoint POST /v1/connectors/{provider}/connect
470
470
  */
471
471
  async connect(params, options) {
472
- return this.core.request({
472
+ return (await this.core.request({
473
473
  method: "POST",
474
474
  path: "/v1/connectors/{provider}/connect",
475
475
  pathParams: { provider: params.provider },
@@ -477,7 +477,7 @@ var ConnectorsResource = class {
477
477
  body: params.body,
478
478
  idempotent: false,
479
479
  signal: options?.signal
480
- });
480
+ })).results;
481
481
  }
482
482
  /**
483
483
  *
@@ -488,14 +488,14 @@ var ConnectorsResource = class {
488
488
  * @endpoint DELETE /v1/connectors/{connection_id}
489
489
  */
490
490
  async disconnect(params, options) {
491
- return this.core.request({
491
+ return (await this.core.request({
492
492
  method: "DELETE",
493
493
  path: "/v1/connectors/{connection_id}",
494
494
  pathParams: { connection_id: params.connectionId },
495
495
  query: { delete_memories: params.deleteMemories },
496
496
  idempotent: true,
497
497
  signal: options?.signal
498
- });
498
+ })).results;
499
499
  }
500
500
  /**
501
501
  *
@@ -506,14 +506,14 @@ var ConnectorsResource = class {
506
506
  * @endpoint GET /v1/connectors
507
507
  */
508
508
  async list(params, options) {
509
- return this.core.request({
509
+ return (await this.core.request({
510
510
  method: "GET",
511
511
  path: "/v1/connectors",
512
512
  pathParams: {},
513
513
  query: { collection_id: params.collectionId },
514
514
  idempotent: true,
515
515
  signal: options?.signal
516
- });
516
+ })).results;
517
517
  }
518
518
  /**
519
519
  *
@@ -524,14 +524,14 @@ var ConnectorsResource = class {
524
524
  * @endpoint GET /v1/connectors/providers
525
525
  */
526
526
  async listProviders(options) {
527
- return this.core.request({
527
+ return (await this.core.request({
528
528
  method: "GET",
529
529
  path: "/v1/connectors/providers",
530
530
  pathParams: {},
531
531
  query: void 0,
532
532
  idempotent: true,
533
533
  signal: options?.signal
534
- });
534
+ })).results;
535
535
  }
536
536
  /**
537
537
  *
@@ -542,14 +542,14 @@ var ConnectorsResource = class {
542
542
  * @endpoint GET /v1/connectors/{connection_id}
543
543
  */
544
544
  async retrieve(connectionId, options) {
545
- return this.core.request({
545
+ return (await this.core.request({
546
546
  method: "GET",
547
547
  path: "/v1/connectors/{connection_id}",
548
548
  pathParams: { connection_id: connectionId },
549
549
  query: void 0,
550
550
  idempotent: true,
551
551
  signal: options?.signal
552
- });
552
+ })).results;
553
553
  }
554
554
  /**
555
555
  *
@@ -560,14 +560,14 @@ var ConnectorsResource = class {
560
560
  * @endpoint POST /v1/connectors/{connection_id}/sync
561
561
  */
562
562
  async sync(connectionId, options) {
563
- return this.core.request({
563
+ return (await this.core.request({
564
564
  method: "POST",
565
565
  path: "/v1/connectors/{connection_id}/sync",
566
566
  pathParams: { connection_id: connectionId },
567
567
  query: void 0,
568
568
  idempotent: true,
569
569
  signal: options?.signal
570
- });
570
+ })).results;
571
571
  }
572
572
  };
573
573
  //#endregion
@@ -594,7 +594,7 @@ var MemoriesResource = class {
594
594
  * @endpoint POST /v1/memories/{id}/append
595
595
  */
596
596
  async append(params, options) {
597
- return this.core.request({
597
+ return (await this.core.request({
598
598
  method: "POST",
599
599
  path: "/v1/memories/{id}/append",
600
600
  pathParams: { id: params.id },
@@ -602,7 +602,7 @@ var MemoriesResource = class {
602
602
  body: params.body,
603
603
  idempotent: false,
604
604
  signal: options?.signal
605
- });
605
+ })).results;
606
606
  }
607
607
  /**
608
608
  *
@@ -620,16 +620,16 @@ var MemoriesResource = class {
620
620
  * @operationId memories.create
621
621
  * @endpoint POST /v1/memories
622
622
  */
623
- async create(params, options) {
624
- return this.core.request({
623
+ async create(body, options) {
624
+ return (await this.core.request({
625
625
  method: "POST",
626
626
  path: "/v1/memories",
627
627
  pathParams: {},
628
628
  query: void 0,
629
- body: params.body,
629
+ body,
630
630
  idempotent: false,
631
631
  signal: options?.signal
632
- });
632
+ })).results;
633
633
  }
634
634
  /**
635
635
  *
@@ -657,7 +657,7 @@ var MemoriesResource = class {
657
657
  * @endpoint POST /v1/memories/upload
658
658
  */
659
659
  async createUpload(params, options) {
660
- return this.core.request({
660
+ return (await this.core.request({
661
661
  method: "POST",
662
662
  path: "/v1/memories/upload",
663
663
  pathParams: {},
@@ -668,7 +668,7 @@ var MemoriesResource = class {
668
668
  },
669
669
  idempotent: false,
670
670
  signal: options?.signal
671
- });
671
+ })).results;
672
672
  }
673
673
  /**
674
674
  *
@@ -684,14 +684,14 @@ var MemoriesResource = class {
684
684
  * @endpoint DELETE /v1/memories/{id}
685
685
  */
686
686
  async delete(id, options) {
687
- return this.core.request({
687
+ return (await this.core.request({
688
688
  method: "DELETE",
689
689
  path: "/v1/memories/{id}",
690
690
  pathParams: { id },
691
691
  query: void 0,
692
692
  idempotent: false,
693
693
  signal: options?.signal
694
- });
694
+ })).results;
695
695
  }
696
696
  /**
697
697
  *
@@ -711,13 +711,13 @@ var MemoriesResource = class {
711
711
  * @operationId memories.deleteMany
712
712
  * @endpoint POST /v1/memories/delete
713
713
  */
714
- async deleteMany(params, options) {
714
+ async deleteMany(body, options) {
715
715
  return this.core.request({
716
716
  method: "POST",
717
717
  path: "/v1/memories/delete",
718
718
  pathParams: {},
719
719
  query: void 0,
720
- body: params.body,
720
+ body,
721
721
  idempotent: false,
722
722
  signal: options?.signal
723
723
  });
@@ -732,14 +732,14 @@ var MemoriesResource = class {
732
732
  * @endpoint DELETE /v1/memories/upload
733
733
  */
734
734
  async deleteUpload(params, options) {
735
- return this.core.request({
735
+ return (await this.core.request({
736
736
  method: "DELETE",
737
737
  path: "/v1/memories/upload",
738
738
  pathParams: {},
739
739
  query: { s3_key: params.s3Key },
740
740
  idempotent: true,
741
741
  signal: options?.signal
742
- });
742
+ })).results;
743
743
  }
744
744
  /**
745
745
  *
@@ -793,16 +793,16 @@ var MemoriesResource = class {
793
793
  * @operationId memories.recallWorkflow
794
794
  * @endpoint POST /v1/memories/workflow/recall
795
795
  */
796
- async recallWorkflow(params, options) {
797
- return this.core.request({
796
+ async recallWorkflow(body, options) {
797
+ return (await this.core.request({
798
798
  method: "POST",
799
799
  path: "/v1/memories/workflow/recall",
800
800
  pathParams: {},
801
801
  query: void 0,
802
- body: params.body,
802
+ body,
803
803
  idempotent: false,
804
804
  signal: options?.signal
805
- });
805
+ })).results;
806
806
  }
807
807
  /**
808
808
  *
@@ -820,14 +820,14 @@ var MemoriesResource = class {
820
820
  * @endpoint GET /v1/memories/{id}
821
821
  */
822
822
  async retrieve(id, options) {
823
- return this.core.request({
823
+ return (await this.core.request({
824
824
  method: "GET",
825
825
  path: "/v1/memories/{id}",
826
826
  pathParams: { id },
827
827
  query: void 0,
828
828
  idempotent: true,
829
829
  signal: options?.signal
830
- });
830
+ })).results;
831
831
  }
832
832
  /**
833
833
  *
@@ -843,16 +843,16 @@ var MemoriesResource = class {
843
843
  * @operationId memories.search
844
844
  * @endpoint POST /v1/memories/search
845
845
  */
846
- async search(params, options) {
847
- return this.core.request({
846
+ async search(body, options) {
847
+ return (await this.core.request({
848
848
  method: "POST",
849
849
  path: "/v1/memories/search",
850
850
  pathParams: {},
851
851
  query: void 0,
852
- body: params.body,
852
+ body,
853
853
  idempotent: false,
854
854
  signal: options?.signal
855
- });
855
+ })).results;
856
856
  }
857
857
  /**
858
858
  *
@@ -875,7 +875,7 @@ var MemoriesResource = class {
875
875
  * @endpoint PATCH /v1/memories/{id}
876
876
  */
877
877
  async update(params, options) {
878
- return this.core.request({
878
+ return (await this.core.request({
879
879
  method: "PATCH",
880
880
  path: "/v1/memories/{id}",
881
881
  pathParams: { id: params.id },
@@ -883,7 +883,7 @@ var MemoriesResource = class {
883
883
  body: params.body,
884
884
  idempotent: false,
885
885
  signal: options?.signal
886
- });
886
+ })).results;
887
887
  }
888
888
  };
889
889
  //#endregion
@@ -902,16 +902,16 @@ var SnapshotsResource = class {
902
902
  * @operationId snapshots.export
903
903
  * @endpoint POST /v1/device-memory/snapshot/export
904
904
  */
905
- async export(params, options) {
906
- return this.core.request({
905
+ async export(body, options) {
906
+ return (await this.core.request({
907
907
  method: "POST",
908
908
  path: "/v1/device-memory/snapshot/export",
909
909
  pathParams: {},
910
910
  query: void 0,
911
- body: params.body,
911
+ body,
912
912
  idempotent: true,
913
913
  signal: options?.signal
914
- });
914
+ })).results;
915
915
  }
916
916
  /**
917
917
  *
@@ -922,16 +922,16 @@ var SnapshotsResource = class {
922
922
  * @operationId snapshots.import
923
923
  * @endpoint POST /v1/device-memory/snapshot/import
924
924
  */
925
- async import(params, options) {
926
- return this.core.request({
925
+ async import(body, options) {
926
+ return (await this.core.request({
927
927
  method: "POST",
928
928
  path: "/v1/device-memory/snapshot/import",
929
929
  pathParams: {},
930
930
  query: void 0,
931
- body: params.body,
931
+ body,
932
932
  idempotent: false,
933
933
  signal: options?.signal
934
- });
934
+ })).results;
935
935
  }
936
936
  };
937
937
  //#endregion
@@ -953,80 +953,8 @@ var NebulaClient = class {
953
953
  }
954
954
  };
955
955
  //#endregion
956
- //#region src/lib/_dx_generated.ts
957
- /** Strip a `results` envelope at runtime; matches `Unwrapped<>`. */
958
- function unwrap$1(p) {
959
- return p.then((r) => {
960
- if (r !== null && typeof r === "object" && "results" in r) return r.results;
961
- return r;
962
- });
963
- }
964
- /**
965
- * Generated DX layer: simple unwrap/passthrough convenience methods.
966
- * Signatures are derived from the underlying resource methods so
967
- * callers see the same arg names + types in IDE hover.
968
- */
969
- var NebulaDX = class extends NebulaClient {
970
- /** Retrieve a single memory by id and return just the data. (generated from dx-extensions.yaml). */
971
- async getMemory(...args) {
972
- return unwrap$1(this.memories.retrieve(...args));
973
- }
974
- /** Update a memory by id; returns the updated record. (generated from dx-extensions.yaml). */
975
- async updateMemory(...args) {
976
- return unwrap$1(this.memories.update(...args));
977
- }
978
- /** Liveness probe with the wire envelope unwrapped. (generated from dx-extensions.yaml). */
979
- async healthCheck(...args) {
980
- return unwrap$1(this.client.health(...args));
981
- }
982
- /** unwrap → collections.create (generated from dx-extensions.yaml). */
983
- async createCollection(...args) {
984
- return unwrap$1(this.collections.create(...args));
985
- }
986
- /** unwrap → collections.retrieve (generated from dx-extensions.yaml). */
987
- async getCollection(...args) {
988
- return unwrap$1(this.collections.retrieve(...args));
989
- }
990
- /** unwrap → collections.retrieveByName (generated from dx-extensions.yaml). */
991
- async getCollectionByName(...args) {
992
- return unwrap$1(this.collections.retrieveByName(...args));
993
- }
994
- /** unwrap → collections.list (generated from dx-extensions.yaml). */
995
- async listCollections(...args) {
996
- return unwrap$1(this.collections.list(...args));
997
- }
998
- /** unwrap → collections.update (generated from dx-extensions.yaml). */
999
- async updateCollection(...args) {
1000
- return unwrap$1(this.collections.update(...args));
1001
- }
1002
- /** unwrap → connectors.listProviders (generated from dx-extensions.yaml). */
1003
- async listProviders(...args) {
1004
- return unwrap$1(this.connectors.listProviders(...args));
1005
- }
1006
- /** unwrap → connectors.retrieve (generated from dx-extensions.yaml). */
1007
- async getConnection(...args) {
1008
- return unwrap$1(this.connectors.retrieve(...args));
1009
- }
1010
- /** unwrap → connectors.sync (generated from dx-extensions.yaml). */
1011
- async triggerSync(...args) {
1012
- return unwrap$1(this.connectors.sync(...args));
1013
- }
1014
- /** unwrap → memories.createUpload (generated from dx-extensions.yaml). */
1015
- async getUploadUrl(...args) {
1016
- return unwrap$1(this.memories.createUpload(...args));
1017
- }
1018
- /** unwrap → snapshots.export (generated from dx-extensions.yaml). */
1019
- async exportSnapshot(...args) {
1020
- return unwrap$1(this.snapshots.export(...args));
1021
- }
1022
- /** unwrap → snapshots.import (generated from dx-extensions.yaml). */
1023
- async importSnapshot(...args) {
1024
- return unwrap$1(this.snapshots.import(...args));
1025
- }
1026
- };
1027
- //#endregion
1028
956
  //#region src/lib/dx.ts
1029
- var Nebula = class extends NebulaDX {
957
+ var Nebula = class extends NebulaClient {
1030
958
  constructor(options = {}) {
1031
959
  super(normalizeAuthOptions(normalizeClientOptions(options)));
1032
960
  }
@@ -1044,7 +972,7 @@ var Nebula = class extends NebulaDX {
1044
972
  }, options);
1045
973
  return memoryID;
1046
974
  }
1047
- const result = unwrapResults(await this.memories.create({ body: toMemoryCreateParams(memory) }, options));
975
+ const result = await this.memories.create(toMemoryCreateParams(memory), options);
1048
976
  if (isSnapshotResult(result)) return result.snapshot ?? result;
1049
977
  return extractID(result);
1050
978
  }
@@ -1077,30 +1005,9 @@ var Nebula = class extends NebulaDX {
1077
1005
  */
1078
1006
  async listMemories(query, options) {
1079
1007
  const normalized = typeof query === "string" || Array.isArray(query) ? { collectionIds: arrayify(query) } : query;
1080
- return unwrap(this.memories.list(normalized, options));
1008
+ return this.memories.list(normalized, options);
1081
1009
  }
1082
1010
  /**
1083
- * Memory search shortcut: unwraps `results`. (Affinity-header injection
1084
- * is a planned enhancement; currently delegates straight to the resource.)
1085
- */
1086
- async search(body, options) {
1087
- return unwrap(this.memories.search({ body }, options));
1088
- }
1089
- /**
1090
- * deleteCollection coerces the wire {success: bool} envelope into a Python-
1091
- * style boolean return.
1092
- */
1093
- async deleteCollection(id, options) {
1094
- const result = unwrapResults(await this.collections.delete(id, options));
1095
- return Boolean(result.success);
1096
- }
1097
- createCluster = this.createCollection;
1098
- getCluster = this.getCollection;
1099
- getClusterByName = this.getCollectionByName;
1100
- listClusters = this.listCollections;
1101
- updateCluster = this.updateCollection;
1102
- deleteCluster = this.deleteCollection;
1103
- /**
1104
1011
  * Positional `connectProvider(provider, collectionID, config?)` — wraps the
1105
1012
  * generated `connectors.connect({provider, body})` to build the body shape.
1106
1013
  */
@@ -1109,48 +1016,28 @@ var Nebula = class extends NebulaDX {
1109
1016
  collection_id: collectionID,
1110
1017
  ...config !== void 0 ? { config } : {}
1111
1018
  };
1112
- return unwrap(this.connectors.connect({
1019
+ return this.connectors.connect({
1113
1020
  provider,
1114
1021
  body
1115
- }, options));
1022
+ }, options);
1116
1023
  }
1117
1024
  /** Positional listConnections(collectionID) — wraps the query wrapper. */
1118
1025
  async listConnections(collectionID, options) {
1119
- return unwrap(this.connectors.list({ collectionId: collectionID }, options));
1026
+ return this.connectors.list({ collectionId: collectionID }, options);
1120
1027
  }
1121
1028
  /** Positional disconnect(connectionID, deleteMemories?). */
1122
1029
  async disconnectConnection(connectionID, deleteMemories = false, options) {
1123
- return unwrap(this.connectors.disconnect({
1030
+ return this.connectors.disconnect({
1124
1031
  connectionId: connectionID,
1125
1032
  deleteMemories
1126
- }, options));
1033
+ }, options);
1127
1034
  }
1128
1035
  /** Alias for disconnectConnection (same arg shape). */
1129
1036
  async disconnect(connectionID, deleteMemories = false, options) {
1130
- return unwrap(this.connectors.disconnect({
1037
+ return this.connectors.disconnect({
1131
1038
  connectionId: connectionID,
1132
1039
  deleteMemories
1133
- }, options));
1134
- }
1135
- /** Single-id delete; coerces 204 to boolean true. */
1136
- async deleteMemory(memoryID, options) {
1137
- await this.memories.delete(memoryID, options);
1138
- return true;
1139
- }
1140
- /** Bulk delete by ids. */
1141
- async deleteMemories(memoryIDs, options) {
1142
- return this.memories.deleteMany({ body: memoryIDs }, options);
1143
- }
1144
- /**
1145
- * Polymorphic delete: dispatches based on argument type.
1146
- * - `delete("/some/path")` -> raw HTTP DELETE (escape hatch; not implemented)
1147
- * - `delete("memory-id")` -> deleteMemory
1148
- * - `delete(["id1", "id2"])` -> deleteMemories (bulk)
1149
- */
1150
- async delete(pathOrMemoryIDs, options) {
1151
- if (Array.isArray(pathOrMemoryIDs)) return this.deleteMemories(pathOrMemoryIDs, options);
1152
- if (isRequestPath(pathOrMemoryIDs)) throw new Error(`delete("${pathOrMemoryIDs}") raw-path escape hatch is not implemented in this SDK yet`);
1153
- return this.deleteMemory(pathOrMemoryIDs, options);
1040
+ }, options);
1154
1041
  }
1155
1042
  };
1156
1043
  function normalizeAuthOptions(options) {
@@ -1162,13 +1049,13 @@ function normalizeAuthOptions(options) {
1162
1049
  return options;
1163
1050
  }
1164
1051
  function normalizeClientOptions(options) {
1165
- const { api_key: apiKeyAlias, apiKey, baseUrl: baseUrlAlias, baseURL: baseURLCapAlias, base_url: baseUrlSnakeAlias, timeout: timeoutAlias, bearerToken, bearer_token: bearerTokenAlias, accessToken, access_token: accessTokenAlias, ...rest } = options;
1052
+ const { apiKey, baseUrl: baseUrlAlias, baseURL: baseURLCapAlias, timeout: timeoutAlias, bearerToken, ...rest } = options;
1166
1053
  const restClientOptions = rest;
1167
1054
  return {
1168
1055
  ...restClientOptions,
1169
- apiKey: firstDefined(apiKey, apiKeyAlias) ?? void 0,
1170
- bearerToken: firstDefined(bearerToken, bearerTokenAlias, accessToken, accessTokenAlias) ?? void 0,
1171
- baseUrl: firstDefined(restClientOptions.baseUrl, baseUrlAlias, baseURLCapAlias, baseUrlSnakeAlias) ?? void 0,
1056
+ apiKey: apiKey ?? void 0,
1057
+ bearerToken: bearerToken ?? void 0,
1058
+ baseUrl: firstDefined(restClientOptions.baseUrl, baseUrlAlias, baseURLCapAlias) ?? void 0,
1172
1059
  timeoutMs: firstDefined(restClientOptions.timeoutMs, timeoutAlias) ?? void 0
1173
1060
  };
1174
1061
  }
@@ -1188,7 +1075,7 @@ function toMemoryCreateParams(memory) {
1188
1075
  if (collectionID !== void 0) params.collection_id = collectionID;
1189
1076
  if (content != null) if (typeof content === "string") params.raw_text = content;
1190
1077
  else params.content_parts = content;
1191
- if (params.messages != null && !params.engram_type) params.engram_type = "conversation";
1078
+ if (params.messages != null && !params.kind) params.kind = "conversation";
1192
1079
  return params;
1193
1080
  }
1194
1081
  function toMemoryAppendParams(memory) {
@@ -1214,13 +1101,6 @@ function toMemoryAppendParams(memory) {
1214
1101
  }
1215
1102
  return params;
1216
1103
  }
1217
- function unwrap(promise) {
1218
- return Promise.resolve(promise).then((response) => unwrapResults(response));
1219
- }
1220
- function unwrapResults(response) {
1221
- if (response !== null && typeof response === "object" && "results" in response) return response.results;
1222
- return response;
1223
- }
1224
1104
  function extractID(value) {
1225
1105
  if (typeof value === "object" && value !== null) {
1226
1106
  const record = value;
@@ -1235,9 +1115,6 @@ function isSnapshotResult(value) {
1235
1115
  function arrayify(value) {
1236
1116
  return Array.isArray(value) ? value : [value];
1237
1117
  }
1238
- function isRequestPath(value) {
1239
- return value.startsWith("/") || /^https?:\/\//i.test(value);
1240
- }
1241
1118
  //#endregion
1242
1119
  export { DEFAULT_RETRY, Nebula, Nebula as default, NebulaAPIError, NebulaBadRequestError, NebulaClient, NebulaConflictError, NebulaConnectionError, NebulaCore, NebulaError, NebulaForbiddenError, NebulaNotFoundError, NebulaRateLimitError, NebulaServerError, NebulaTimeoutError, NebulaUnauthorizedError, NebulaValidationError, backoffMs, errorFromResponse, isRetryableStatus, sleep };
1243
1120