@nebula-ai/sdk 1.2.2 → 1.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.
- package/CHANGELOG.md +35 -0
- package/LICENSE +4 -23
- package/README.md +305 -126
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +205 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +205 -0
- package/client.d.ts.map +1 -0
- package/client.js +505 -0
- package/client.js.map +1 -0
- package/client.mjs +501 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +13 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +13 -0
- package/index.d.ts.map +1 -0
- package/index.js +43 -0
- package/index.js.map +1 -0
- package/index.mjs +13 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +79 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +79 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/lib/dx.d.mts +96 -0
- package/lib/dx.d.mts.map +1 -0
- package/lib/dx.d.ts +96 -0
- package/lib/dx.d.ts.map +1 -0
- package/lib/dx.js +239 -0
- package/lib/dx.js.map +1 -0
- package/lib/dx.mjs +235 -0
- package/lib/dx.mjs.map +1 -0
- package/package.json +144 -58
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/collections.d.mts +289 -0
- package/resources/collections.d.mts.map +1 -0
- package/resources/collections.d.ts +289 -0
- package/resources/collections.d.ts.map +1 -0
- package/resources/collections.js +72 -0
- package/resources/collections.js.map +1 -0
- package/resources/collections.mjs +68 -0
- package/resources/collections.mjs.map +1 -0
- package/resources/connectors.d.mts +148 -0
- package/resources/connectors.d.mts.map +1 -0
- package/resources/connectors.d.ts +148 -0
- package/resources/connectors.d.ts.map +1 -0
- package/resources/connectors.js +50 -0
- package/resources/connectors.js.map +1 -0
- package/resources/connectors.mjs +46 -0
- package/resources/connectors.mjs.map +1 -0
- package/resources/index.d.mts +6 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +6 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +13 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +6 -0
- package/resources/index.mjs.map +1 -0
- package/resources/memories.d.mts +1737 -0
- package/resources/memories.d.mts.map +1 -0
- package/resources/memories.d.ts +1737 -0
- package/resources/memories.d.ts.map +1 -0
- package/resources/memories.js +157 -0
- package/resources/memories.js.map +1 -0
- package/resources/memories.mjs +153 -0
- package/resources/memories.mjs.map +1 -0
- package/resources/snapshots.d.mts +281 -0
- package/resources/snapshots.d.mts.map +1 -0
- package/resources/snapshots.d.ts +281 -0
- package/resources/snapshots.d.ts.map +1 -0
- package/resources/snapshots.js +22 -0
- package/resources/snapshots.js.map +1 -0
- package/resources/snapshots.mjs +18 -0
- package/resources/snapshots.mjs.map +1 -0
- package/resources/top-level.d.mts +14 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts +14 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +4 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +3 -0
- package/resources/top-level.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +892 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +36 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +93 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +127 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/lib/dx.ts +459 -0
- package/src/resource.ts +2 -0
- package/src/resources/collections.ts +474 -0
- package/src/resources/connectors.ts +236 -0
- package/src/resources/index.ts +56 -0
- package/src/resources/memories.ts +2409 -0
- package/src/resources/snapshots.ts +387 -0
- package/src/resources/top-level.ts +19 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/dist/index.d.mts +0 -599
- package/dist/index.d.ts +0 -599
- package/dist/index.js +0 -1345
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1330
- package/dist/index.mjs.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.3.0 (2026-04-27)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.2.2...v1.3.0](https://github.com/nebula-agi/nebula-typescript/compare/v1.2.2...v1.3.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* [codex] Clean up replayed playground memories ([2b1f57d](https://github.com/nebula-agi/nebula-typescript/commit/2b1f57d98f1e4f433a8ef6fd9d9eba5b6a55917f))
|
|
10
|
+
* [codex] Fix EngramResponse OpenAPI example ([4025791](https://github.com/nebula-agi/nebula-typescript/commit/402579144bba03ddc0266488d54d48276bef6dc5))
|
|
11
|
+
* [codex] Harden memory write validation contracts ([64a8ef8](https://github.com/nebula-agi/nebula-typescript/commit/64a8ef80de1a5ce71636b376a14fea9b1bbf765e))
|
|
12
|
+
* add nebula devex facade ([41916e2](https://github.com/nebula-agi/nebula-typescript/commit/41916e2dd50161f87c41f2096bc4209580a25e48))
|
|
13
|
+
* api: honor chunks_limit on memory listing ([d9da2aa](https://github.com/nebula-agi/nebula-typescript/commit/d9da2aa355911262bcefa1a5acdad71f12d2768d))
|
|
14
|
+
* engram: replace generated summaries with deterministic engram_context ([a3f9ec1](https://github.com/nebula-agi/nebula-typescript/commit/a3f9ec1fdee8b454e1d4ac915ae0054c8c9c1cfe))
|
|
15
|
+
* NQL overhaul v2 - clean cherry-pick baseline from [#526](https://github.com/nebula-agi/nebula-typescript/issues/526) ([cf0a59d](https://github.com/nebula-agi/nebula-typescript/commit/cf0a59db3b8bc6de2ab5fcd413ed3d8f4edce141))
|
|
16
|
+
* Remove legacy append chunk IDs from public contract ([e81eb69](https://github.com/nebula-agi/nebula-typescript/commit/e81eb69b3f738a03f4718d48257b3fee139152b6))
|
|
17
|
+
* Rename MemoryRecall response fields to adjective-uniform shape ([9041587](https://github.com/nebula-agi/nebula-typescript/commit/9041587a4e1fdd8af6247a89237bad4b1875b4f8))
|
|
18
|
+
* sdks/python: SnapshotEnvelope dataclass + typed export/import/search/add ([db8ba18](https://github.com/nebula-agi/nebula-typescript/commit/db8ba187d0eca3acd2b6296c9aac60ef9f48899e))
|
|
19
|
+
* Stabilize memory create SDK response schema ([077b653](https://github.com/nebula-agi/nebula-typescript/commit/077b653f8c2b51729b7399c153921dca8335b510))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* dx deleteMemories body precedence ([#7](https://github.com/nebula-agi/nebula-typescript/issues/7)) ([0db50e6](https://github.com/nebula-agi/nebula-typescript/commit/0db50e680625f4212e2e15f3186eb8b08a26ede7))
|
|
25
|
+
* harden DX store and delete helpers ([#6](https://github.com/nebula-agi/nebula-typescript/issues/6)) ([6682596](https://github.com/nebula-agi/nebula-typescript/commit/6682596faf42e20116796c9fb55c38abf44cb194))
|
|
26
|
+
* split MemoryInput into discriminated union, forward all append fields ([#8](https://github.com/nebula-agi/nebula-typescript/issues/8)) ([323948a](https://github.com/nebula-agi/nebula-typescript/commit/323948aecbadaed6c6f8f3bcb96af4e015db9241))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Chores
|
|
30
|
+
|
|
31
|
+
* configure new SDK language ([51c71c3](https://github.com/nebula-agi/nebula-typescript/commit/51c71c3f1f01bdc3e0eb478b8855753f15033e36))
|
|
32
|
+
* **internal:** more robust bootstrap script ([586f171](https://github.com/nebula-agi/nebula-typescript/commit/586f1714807451e24da433558e96aa872c6d9073))
|
|
33
|
+
* seed release baseline ([#5](https://github.com/nebula-agi/nebula-typescript/issues/5)) ([cb59ec4](https://github.com/nebula-agi/nebula-typescript/commit/cb59ec47ffa008da8d1154f6b5ae98ce263ae9e2))
|
|
34
|
+
* update SDK settings ([b7693b1](https://github.com/nebula-agi/nebula-typescript/commit/b7693b152c878bee241a3beb87f48c0e6fb8bf0f))
|
|
35
|
+
* update SDK settings ([8954684](https://github.com/nebula-agi/nebula-typescript/commit/8954684d19b304fca8111359b57d38f033257269))
|
package/LICENSE
CHANGED
|
@@ -1,26 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Nebula AI Inc
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
Copyright 2026 nebula
|
|
24
2
|
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
25
4
|
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
26
6
|
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,192 +1,371 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Nebula TypeScript API Library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[>)](https://npmjs.org/package/@nebula-ai/sdk) 
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This library provides convenient access to the Nebula REST API from server-side TypeScript or JavaScript.
|
|
6
|
+
|
|
7
|
+
The REST API documentation can be found on [docs.trynebula.ai](https://docs.trynebula.ai). The full API of this library can be found in [api.md](api.md).
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
It is generated with [Stainless](https://www.stainless.com/).
|
|
8
10
|
|
|
9
11
|
## Installation
|
|
10
12
|
|
|
11
|
-
```
|
|
13
|
+
```sh
|
|
12
14
|
npm install @nebula-ai/sdk
|
|
13
15
|
```
|
|
14
16
|
|
|
15
|
-
##
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
The full API of this library can be found in [api.md](api.md).
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
<!-- prettier-ignore -->
|
|
22
|
+
```js
|
|
18
23
|
import Nebula from '@nebula-ai/sdk';
|
|
19
24
|
|
|
20
|
-
// Initialize client
|
|
21
25
|
const client = new Nebula({
|
|
22
|
-
|
|
26
|
+
accessToken: process.env['NEBULA_BEARER_TOKEN'], // This is the default and can be omitted
|
|
23
27
|
});
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
const collection = await client.collections.create({
|
|
30
|
+
name: 'Example collection',
|
|
31
|
+
description: 'Memory store for my app',
|
|
28
32
|
});
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
collection_id: collection.id,
|
|
33
|
-
content: 'Machine learning is transforming healthcare',
|
|
34
|
-
metadata: { topic: 'AI', importance: 'high' }
|
|
35
|
-
});
|
|
34
|
+
console.log(collection.results);
|
|
35
|
+
```
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
const results = await client.search({
|
|
39
|
-
query: 'machine learning healthcare',
|
|
40
|
-
collection_ids: [collection.id],
|
|
41
|
-
});
|
|
37
|
+
### Request & Response types
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
|
|
40
|
+
|
|
41
|
+
<!-- prettier-ignore -->
|
|
42
|
+
```ts
|
|
43
|
+
import Nebula from '@nebula-ai/sdk';
|
|
44
|
+
|
|
45
|
+
const client = new Nebula({
|
|
46
|
+
accessToken: process.env['NEBULA_BEARER_TOKEN'], // This is the default and can be omitted
|
|
46
47
|
});
|
|
48
|
+
|
|
49
|
+
const params: Nebula.CollectionCreateParams = {
|
|
50
|
+
name: 'Example collection',
|
|
51
|
+
description: 'Memory store for my app',
|
|
52
|
+
};
|
|
53
|
+
const collection: Nebula.CollectionCreateResponse = await client.collections.create(params);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
57
|
+
|
|
58
|
+
## Handling errors
|
|
59
|
+
|
|
60
|
+
When the library is unable to connect to the API,
|
|
61
|
+
or if the API returns a non-success status code (i.e., 4xx or 5xx response),
|
|
62
|
+
a subclass of `APIError` will be thrown:
|
|
63
|
+
|
|
64
|
+
<!-- prettier-ignore -->
|
|
65
|
+
```ts
|
|
66
|
+
const collection = await client.collections
|
|
67
|
+
.create({ name: 'Example collection', description: 'Memory store for my app' })
|
|
68
|
+
.catch(async (err) => {
|
|
69
|
+
if (err instanceof Nebula.APIError) {
|
|
70
|
+
console.log(err.status); // 400
|
|
71
|
+
console.log(err.name); // BadRequestError
|
|
72
|
+
console.log(err.headers); // {server: 'nginx', ...}
|
|
73
|
+
} else {
|
|
74
|
+
throw err;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
47
77
|
```
|
|
48
78
|
|
|
49
|
-
|
|
79
|
+
Error codes are as follows:
|
|
50
80
|
|
|
51
|
-
|
|
81
|
+
| Status Code | Error Type |
|
|
82
|
+
| ----------- | -------------------------- |
|
|
83
|
+
| 400 | `BadRequestError` |
|
|
84
|
+
| 401 | `AuthenticationError` |
|
|
85
|
+
| 403 | `PermissionDeniedError` |
|
|
86
|
+
| 404 | `NotFoundError` |
|
|
87
|
+
| 422 | `UnprocessableEntityError` |
|
|
88
|
+
| 429 | `RateLimitError` |
|
|
89
|
+
| >=500 | `InternalServerError` |
|
|
90
|
+
| N/A | `APIConnectionError` |
|
|
52
91
|
|
|
53
|
-
|
|
54
|
-
// Create
|
|
55
|
-
const collection = await client.createCluster({
|
|
56
|
-
name: 'my_collection',
|
|
57
|
-
description: 'Optional description'
|
|
58
|
-
});
|
|
92
|
+
### Retries
|
|
59
93
|
|
|
60
|
-
|
|
61
|
-
|
|
94
|
+
Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
|
|
95
|
+
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
96
|
+
429 Rate Limit, and >=500 Internal errors will all be retried by default.
|
|
62
97
|
|
|
63
|
-
|
|
64
|
-
const collection = await client.getCluster(collectionId);
|
|
65
|
-
const collection = await client.getClusterByName('my_collection');
|
|
98
|
+
You can use the `maxRetries` option to configure or disable this:
|
|
66
99
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
100
|
+
<!-- prettier-ignore -->
|
|
101
|
+
```js
|
|
102
|
+
// Configure the default for all requests:
|
|
103
|
+
const client = new Nebula({
|
|
104
|
+
maxRetries: 0, // default is 2
|
|
71
105
|
});
|
|
72
106
|
|
|
73
|
-
//
|
|
74
|
-
await client.
|
|
107
|
+
// Or, configure per-request:
|
|
108
|
+
await client.collections.create({ name: 'Example collection', description: 'Memory store for my app' }, {
|
|
109
|
+
maxRetries: 5,
|
|
110
|
+
});
|
|
75
111
|
```
|
|
76
112
|
|
|
77
|
-
###
|
|
113
|
+
### Timeouts
|
|
114
|
+
|
|
115
|
+
Requests time out after 1 minute by default. You can configure this with a `timeout` option:
|
|
116
|
+
|
|
117
|
+
<!-- prettier-ignore -->
|
|
118
|
+
```ts
|
|
119
|
+
// Configure the default for all requests:
|
|
120
|
+
const client = new Nebula({
|
|
121
|
+
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
|
|
122
|
+
});
|
|
78
123
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
collection_id: collection.id,
|
|
83
|
-
content: 'Your content here',
|
|
84
|
-
metadata: { category: 'example' }
|
|
124
|
+
// Override per-request:
|
|
125
|
+
await client.collections.create({ name: 'Example collection', description: 'Memory store for my app' }, {
|
|
126
|
+
timeout: 5 * 1000,
|
|
85
127
|
});
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
On timeout, an `APIConnectionTimeoutError` is thrown.
|
|
131
|
+
|
|
132
|
+
Note that requests which time out will be [retried twice by default](#retries).
|
|
133
|
+
|
|
134
|
+
## Advanced Usage
|
|
86
135
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
136
|
+
### Accessing raw Response data (e.g., headers)
|
|
137
|
+
|
|
138
|
+
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
|
|
139
|
+
This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
|
|
140
|
+
|
|
141
|
+
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
|
|
142
|
+
Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
|
|
143
|
+
|
|
144
|
+
<!-- prettier-ignore -->
|
|
145
|
+
```ts
|
|
146
|
+
const client = new Nebula();
|
|
147
|
+
|
|
148
|
+
const response = await client.collections
|
|
149
|
+
.create({ name: 'Example collection', description: 'Memory store for my app' })
|
|
150
|
+
.asResponse();
|
|
151
|
+
console.log(response.headers.get('X-My-Header'));
|
|
152
|
+
console.log(response.statusText); // access the underlying Response object
|
|
153
|
+
|
|
154
|
+
const { data: collection, response: raw } = await client.collections
|
|
155
|
+
.create({ name: 'Example collection', description: 'Memory store for my app' })
|
|
156
|
+
.withResponse();
|
|
157
|
+
console.log(raw.headers.get('X-My-Header'));
|
|
158
|
+
console.log(collection.results);
|
|
92
159
|
```
|
|
93
160
|
|
|
94
|
-
###
|
|
161
|
+
### Logging
|
|
162
|
+
|
|
163
|
+
> [!IMPORTANT]
|
|
164
|
+
> All log messages are intended for debugging only. The format and content of log messages
|
|
165
|
+
> may change between releases.
|
|
95
166
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
167
|
+
#### Log levels
|
|
168
|
+
|
|
169
|
+
The log level can be configured in two ways:
|
|
170
|
+
|
|
171
|
+
1. Via the `NEBULA_LOG` environment variable
|
|
172
|
+
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
import Nebula from '@nebula-ai/sdk';
|
|
176
|
+
|
|
177
|
+
const client = new Nebula({
|
|
178
|
+
logLevel: 'debug', // Show all log messages
|
|
101
179
|
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Available log levels, from most to least verbose:
|
|
183
|
+
|
|
184
|
+
- `'debug'` - Show debug messages, info, warnings, and errors
|
|
185
|
+
- `'info'` - Show info messages, warnings, and errors
|
|
186
|
+
- `'warn'` - Show warnings and errors (default)
|
|
187
|
+
- `'error'` - Show only errors
|
|
188
|
+
- `'off'` - Disable all logging
|
|
189
|
+
|
|
190
|
+
At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
|
|
191
|
+
Some authentication-related headers are redacted, but sensitive data in request and response bodies
|
|
192
|
+
may still be visible.
|
|
193
|
+
|
|
194
|
+
#### Custom logger
|
|
195
|
+
|
|
196
|
+
By default, this library logs to `globalThis.console`. You can also provide a custom logger.
|
|
197
|
+
Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
|
|
102
198
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
199
|
+
When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
|
|
200
|
+
below the configured level will not be sent to your logger.
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
import Nebula from '@nebula-ai/sdk';
|
|
204
|
+
import pino from 'pino';
|
|
205
|
+
|
|
206
|
+
const logger = pino();
|
|
207
|
+
|
|
208
|
+
const client = new Nebula({
|
|
209
|
+
logger: logger.child({ name: 'Nebula' }),
|
|
210
|
+
logLevel: 'debug', // Send all messages to pino, allowing it to filter
|
|
109
211
|
});
|
|
212
|
+
```
|
|
110
213
|
|
|
111
|
-
|
|
112
|
-
|
|
214
|
+
### Making custom/undocumented requests
|
|
215
|
+
|
|
216
|
+
This library is typed for convenient access to the documented API. If you need to access undocumented
|
|
217
|
+
endpoints, params, or response properties, the library can still be used.
|
|
218
|
+
|
|
219
|
+
#### Undocumented endpoints
|
|
220
|
+
|
|
221
|
+
To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
|
|
222
|
+
Options on the client, such as retries, will be respected when making these requests.
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
await client.post('/some/path', {
|
|
226
|
+
body: { some_prop: 'foo' },
|
|
227
|
+
query: { some_query_arg: 'bar' },
|
|
228
|
+
});
|
|
113
229
|
```
|
|
114
230
|
|
|
115
|
-
|
|
231
|
+
#### Undocumented request params
|
|
232
|
+
|
|
233
|
+
To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
|
|
234
|
+
parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
|
|
235
|
+
send will be sent as-is.
|
|
116
236
|
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
237
|
+
```ts
|
|
238
|
+
client.collections.create({
|
|
239
|
+
// ...
|
|
240
|
+
// @ts-expect-error baz is not yet public
|
|
241
|
+
baz: 'undocumented option',
|
|
122
242
|
});
|
|
123
243
|
```
|
|
124
244
|
|
|
125
|
-
|
|
245
|
+
For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
|
|
246
|
+
extra param in the body.
|
|
247
|
+
|
|
248
|
+
If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
|
|
249
|
+
options.
|
|
250
|
+
|
|
251
|
+
#### Undocumented response properties
|
|
252
|
+
|
|
253
|
+
To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
|
|
254
|
+
the response object, or cast the response object to the requisite type. Like the request params, we do not
|
|
255
|
+
validate or strip extra properties from the response from the API.
|
|
256
|
+
|
|
257
|
+
### Customizing the fetch client
|
|
258
|
+
|
|
259
|
+
By default, this library expects a global `fetch` function is defined.
|
|
260
|
+
|
|
261
|
+
If you want to use a different `fetch` function, you can either polyfill the global:
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
import fetch from 'my-fetch';
|
|
265
|
+
|
|
266
|
+
globalThis.fetch = fetch;
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Or pass it to the client:
|
|
126
270
|
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
|
|
271
|
+
```ts
|
|
272
|
+
import Nebula from '@nebula-ai/sdk';
|
|
273
|
+
import fetch from 'my-fetch';
|
|
130
274
|
|
|
131
|
-
|
|
132
|
-
const result = await client.delete(['id1', 'id2', 'id3']); // Returns detailed results
|
|
275
|
+
const client = new Nebula({ fetch });
|
|
133
276
|
```
|
|
134
277
|
|
|
135
|
-
|
|
278
|
+
### Fetch options
|
|
136
279
|
|
|
137
|
-
|
|
138
|
-
// Store conversation messages
|
|
139
|
-
const conversationId = await client.storeMemory({
|
|
140
|
-
collection_id: collection.id,
|
|
141
|
-
content: 'What is machine learning?',
|
|
142
|
-
role: 'user',
|
|
143
|
-
metadata: { content_type: 'conversation' }
|
|
144
|
-
});
|
|
280
|
+
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
|
|
145
281
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
282
|
+
```ts
|
|
283
|
+
import Nebula from '@nebula-ai/sdk';
|
|
284
|
+
|
|
285
|
+
const client = new Nebula({
|
|
286
|
+
fetchOptions: {
|
|
287
|
+
// `RequestInit` options
|
|
288
|
+
},
|
|
152
289
|
});
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
#### Configuring proxies
|
|
293
|
+
|
|
294
|
+
To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
|
|
295
|
+
options to requests:
|
|
153
296
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
297
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
|
|
298
|
+
|
|
299
|
+
```ts
|
|
300
|
+
import Nebula from '@nebula-ai/sdk';
|
|
301
|
+
import * as undici from 'undici';
|
|
302
|
+
|
|
303
|
+
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
|
|
304
|
+
const client = new Nebula({
|
|
305
|
+
fetchOptions: {
|
|
306
|
+
dispatcher: proxyAgent,
|
|
307
|
+
},
|
|
158
308
|
});
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
|
|
159
312
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
313
|
+
```ts
|
|
314
|
+
import Nebula from '@nebula-ai/sdk';
|
|
315
|
+
|
|
316
|
+
const client = new Nebula({
|
|
317
|
+
fetchOptions: {
|
|
318
|
+
proxy: 'http://localhost:8888',
|
|
319
|
+
},
|
|
320
|
+
});
|
|
163
321
|
```
|
|
164
322
|
|
|
165
|
-
|
|
323
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
|
|
166
324
|
|
|
167
|
-
```
|
|
168
|
-
import Nebula
|
|
169
|
-
NebulaAuthenticationException,
|
|
170
|
-
NebulaRateLimitException,
|
|
171
|
-
NebulaValidationException
|
|
172
|
-
} from '@nebula-ai/sdk';
|
|
325
|
+
```ts
|
|
326
|
+
import Nebula from 'npm:@nebula-ai/sdk';
|
|
173
327
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
console.log('Rate limit exceeded');
|
|
181
|
-
}
|
|
182
|
-
}
|
|
328
|
+
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
|
|
329
|
+
const client = new Nebula({
|
|
330
|
+
fetchOptions: {
|
|
331
|
+
client: httpClient,
|
|
332
|
+
},
|
|
333
|
+
});
|
|
183
334
|
```
|
|
184
335
|
|
|
185
|
-
##
|
|
336
|
+
## Frequently Asked Questions
|
|
337
|
+
|
|
338
|
+
## Semantic versioning
|
|
339
|
+
|
|
340
|
+
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
341
|
+
|
|
342
|
+
1. Changes that only affect static types, without breaking runtime behavior.
|
|
343
|
+
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
|
|
344
|
+
3. Changes that we do not expect to impact the vast majority of users in practice.
|
|
345
|
+
|
|
346
|
+
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
347
|
+
|
|
348
|
+
We are keen for your feedback; please open an [issue](https://www.github.com/nebula-agi/nebula-typescript/issues) with questions, bugs, or suggestions.
|
|
349
|
+
|
|
350
|
+
## Requirements
|
|
351
|
+
|
|
352
|
+
TypeScript >= 4.9 is supported.
|
|
353
|
+
|
|
354
|
+
The following runtimes are supported:
|
|
355
|
+
|
|
356
|
+
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
|
|
357
|
+
- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
358
|
+
- Deno v1.28.0 or higher.
|
|
359
|
+
- Bun 1.0 or later.
|
|
360
|
+
- Cloudflare Workers.
|
|
361
|
+
- Vercel Edge Runtime.
|
|
362
|
+
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
|
|
363
|
+
- Nitro v2.6 or greater.
|
|
364
|
+
|
|
365
|
+
Note that React Native is not supported at this time.
|
|
186
366
|
|
|
187
|
-
|
|
188
|
-
- [API Reference](https://docs.trynebula.ai/clients/nodejs)
|
|
367
|
+
If you are interested in other runtime environments, please open or upvote an issue on GitHub.
|
|
189
368
|
|
|
190
|
-
##
|
|
369
|
+
## Contributing
|
|
191
370
|
|
|
192
|
-
|
|
371
|
+
See [the contributing documentation](./CONTRIBUTING.md).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
package/api-promise.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
package/api-promise.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("./internal/tslib.js");
|
|
4
|
+
/** @deprecated Import from ./core/api-promise instead */
|
|
5
|
+
tslib_1.__exportStar(require("./core/api-promise.js"), exports);
|
|
6
|
+
//# sourceMappingURL=api-promise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.js","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,gEAAmC"}
|
package/api-promise.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|