<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
This PR adds the new `@thirdweb-dev/nebula` package. It's an OpenAPI Typescript Wrapper for the new Nebula APIs.
<!-- start pr-codex -->
---
## PR-Codex overview
This PR introduces the initial release of the `@thirdweb-dev/nebula` TypeScript SDK, providing a wrapper for the Nebula API with configuration options and client functionalities.
### Detailed summary
- Added `@thirdweb-dev/nebula` package with initial release.
- Created configuration functions: `configure`, `configureWithClient`, and `getNebulaClient`.
- Generated client and types using `@hey-api/openapi-ts`.
- Included comprehensive README with usage examples.
- Established TypeScript configuration files.
> The following files were skipped due to too many changes: `packages/nebula/src/client/types.gen.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced the Nebula TypeScript SDK as a new package, providing a client for interacting with the Nebula OpenAPI AI agent service.
- Added configuration utilities for flexible authentication and integration with existing clients.
- Exposed a comprehensive set of API methods for managing agents, conversations, models, and user data.
- Extended build scripts to include the Nebula package in relevant workspace commands.
- **Documentation**
- Added detailed README with setup instructions and usage examples for the Nebula SDK.
- **Chores**
- Added configuration and build files to support development and compilation of the new package.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
1.2 KiB
1.2 KiB
Nebula OpenAPI TypeScript wrapper
This package is a thin OpenAPI wrapper for Nebula, our AI agent service.
Configuration
import { configure } from "@thirdweb-dev/nebula";
// call this once at the startup of your application
configure({
secretKey: "<PROJECT_SECRET_KEY>",
});
You can also configure the client with a Thirdweb client instance:
import { configureWithClient } from "@thirdweb-dev/nebula";
import { twClient } from "./thirdwebClient";
// call this once at the startup of your application
configureWithClient(twClient);
Example Usage
import { getModels } from "@thirdweb-dev/nebula";
const models = await getModels();
You can also use this package on a client application (eg. NextJS) by retrieving the Nebula API client first.
import { getNebulaClient, getAgents } from "@thirdweb-dev/nebula";
// retrieve the Nebula auth token
const nebulaClient = getNebulaClient(authToken);
// pass the client inside the methods
const agentsResult = await getAgents({ client: nebulaClient });
This package was autogenerated from the Nebula openAPI spec using @hey-api/openapi-ts