{"_id":"@catalystlabs/catalyst-index-sdk","_rev":"2-5eb5b4d5cd07a0c7eae22ef4f1a5d090","name":"@catalystlabs/catalyst-index-sdk","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@catalystlabs/catalyst-index-sdk","version":"0.1.0","keywords":["rag","sdk","semantic-search","fastapi","qdrant"],"author":{"name":"Catalyst Labs"},"license":"UNLICENSED","_id":"@catalystlabs/catalyst-index-sdk@0.1.0","maintainers":[{"name":"ccollier86","email":"casey@catalystpractice.com"}],"dist":{"shasum":"67627c91c3b3f47844507d216bbf5078c6bf6d38","tarball":"https://registry.npmjs.org/@catalystlabs/catalyst-index-sdk/-/catalyst-index-sdk-0.1.0.tgz","fileCount":8,"integrity":"sha512-XQuJ7m3xMGlPEDXCqbXb8CuCmXWJ8D3n1DwyBrPkylyR0X6bLuBL3JXXrXgdU1w2neazDr0LzqMmPa37wQWsVQ==","signatures":[{"sig":"MEUCIQCnYsFxGNBN6BRqpzKkD1ia0nYxRlIJTyrvqf5JZMTdqgIgAiZGDBlrZB+Ox6ojnhGn0uIlWtc2nJHWWWgrVaT98zs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":215281},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=18"},"gitHead":"d76a293603c24afcc0797140d2f41059c1e949cc","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch","lint":"biome lint .","test":"vitest","build":"bun run clean && tsup src/index.ts --format esm,cjs --dts","clean":"rimraf dist","generate":"bunx openapi-typescript $RAG_OPENAPI_URL --output src/models/generated.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ccollier86","email":"casey@catalystpractice.com"},"_npmVersion":"11.4.2","description":"Developer-friendly TypeScript client for the Catalyst RAG Server.","directories":{},"_nodeVersion":"24.4.1","dependencies":{"zod":"^3.23.8","cross-fetch":"^4.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.1.0","rimraf":"^5.0.5","vitest":"^1.6.0","typescript":"^5.5.4","@types/node":"^22.5.0","@biomejs/biome":"^1.8.1","openapi-typescript":"^7.4.2"},"_npmOperationalInternal":{"tmp":"tmp/catalyst-index-sdk_0.1.0_1759242577527_0.35312136839501607","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@catalystlabs/catalyst-index-sdk","version":"0.1.1","description":"Developer-friendly TypeScript client for the Catalyst RAG Server.","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","scripts":{"clean":"rimraf dist","build":"bun run clean && tsup src/index.ts --format esm,cjs --dts","dev":"tsup src/index.ts --format esm --dts --watch","lint":"biome lint .","test":"vitest","typecheck":"tsc --noEmit","generate":"bunx openapi-typescript $RAG_OPENAPI_URL --output src/models/generated.ts"},"keywords":["rag","sdk","semantic-search","fastapi","qdrant"],"author":{"name":"Catalyst Labs"},"license":"UNLICENSED","devDependencies":{"@biomejs/biome":"^1.8.1","@types/node":"^22.5.0","openapi-typescript":"^7.4.2","rimraf":"^5.0.5","tsup":"^8.1.0","typescript":"^5.5.4","vitest":"^1.6.0"},"dependencies":{"cross-fetch":"^4.0.0","zod":"^3.23.8"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@catalystlabs/catalyst-index-sdk@0.1.1","gitHead":"1f81d00e07b271e1b94e548557fcbb23e1c7a71c","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-9ZXIi2zpYeBr5L6ySuL3yDZskB3t6HaCDUC8lclD4cIR9nu7A37vlkFSElVUhnVpgg67jGdjoSfMEooHmzzGvw==","shasum":"6c868b15ad885b2baf4f5f543a1d6d27830c2a6b","tarball":"https://registry.npmjs.org/@catalystlabs/catalyst-index-sdk/-/catalyst-index-sdk-0.1.1.tgz","fileCount":8,"unpackedSize":215803,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEwgnH15KB6hhUUOhXPB2Sb0aPoLzbhBVrUsA0YTHQjbAiBTLBBRydIgywnNCcpeFg5dI2ZGApKkOkTH/4n77Jm/Vw=="}]},"_npmUser":{"name":"ccollier86","email":"casey@catalystpractice.com"},"directories":{},"maintainers":[{"name":"ccollier86","email":"casey@catalystpractice.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/catalyst-index-sdk_0.1.1_1759242935830_0.017413477355390228"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-30T14:29:37.396Z","modified":"2025-09-30T14:35:36.203Z","0.1.0":"2025-09-30T14:29:37.727Z","0.1.1":"2025-09-30T14:35:36.006Z"},"author":{"name":"Catalyst Labs"},"license":"UNLICENSED","keywords":["rag","sdk","semantic-search","fastapi","qdrant"],"description":"Developer-friendly TypeScript client for the Catalyst RAG Server.","maintainers":[{"name":"ccollier86","email":"casey@catalystpractice.com"}],"readme":"# Catalyst Index TypeScript SDK\n\nDeveloper experience first client for the Catalyst Index Server. Build ingestion pipelines, kick off background jobs, and render search results with rich metadata in a few lines of code.\n\n## Highlights\n\n- **One-line setup** – `new CatalystIndexClient({ baseUrl, apiKey })` returns a fully typed client ready for browser or Node/Bun.\n- **Full endpoint coverage** – projects, ingestion (sync/async/URLs/ZIP/crawl), jobs, search (single + federated), webhooks, monitors, and health.\n- **Rich metadata** – search results include page numbers, paragraph indices, headings, and chunk hashes for deep linking.\n- **Type-safe errors** – every call returns `{ ok: true, data } | { ok: false, error }` with detailed error information.\n- **DX tooling** – Built with Bun + tsup + Vitest with zero-config type generation from OpenAPI.\n\n## Quickstart\n\n```bash\nnpm install @catalystlabs/catalyst-index-sdk\n# or\nbun install @catalystlabs/catalyst-index-sdk\n```\n\n```ts\nimport { CatalystIndexClient } from '@catalystlabs/catalyst-index-sdk';\n\nconst client = new CatalystIndexClient({\n\tbaseUrl: process.env.RAG_ENDPOINT!,\n\tapiKey: process.env.RAG_API_KEY!,\n});\n\n// Create a project\nconst project = await client.projects.create({\n\tname: 'My Knowledge Base',\n\tdescription: 'Documentation and guides'\n});\n\n// Search\nconst results = await client.search.query(project.data.project_id, {\n\tquery: 'refund policy',\n\ttop_k: 10,\n\trerank: true\n});\n\nif (results.ok) {\n\tresults.data.results.forEach(result => {\n\t\tconsole.log(`${result.score.toFixed(3)} - ${result.text.slice(0, 100)}...`);\n\t});\n}\n```\n\n## Repository Layout\n\n```\n├── docs/                  # Developer guides & API reference\n├── examples/              # Runnable usage samples (Bun scripts)\n├── src/\n│   ├── client.ts          # HTTP client + middleware stack\n│   ├── config.ts          # runtime configuration + retry wiring\n│   ├── endpoints/         # Feature-specific API modules\n│   ├── helpers/           # Metadata, retry, and polling helpers\n│   ├── models/            # Typed request/response contracts\n│   └── index.ts           # Public exports\n├── package.json\n├── bun.lock\n├── tsconfig.json\n├── tsup.config.ts\n└── vitest.config.ts\n```\n\n## DX Principles\n\n- **Dead-simple ingestion** – Helpers accept `File`, `Blob`, `ArrayBuffer`, or raw strings; async ingestion returns job IDs with `jobs.poll` convenience.\n- **Typed errors** – Every call resolves to `{ ok: true, data } | { ok: false, error }` with status/code/details.\n- **Metadata aware** – Search helpers surface `source_page`, `source_paragraph_index`, headings, and chunk hashes for deep linking.\n- **Extensible fetch layer** – Provide custom `fetch`, retry policy, timeouts, or headers without rewriting the client.\n\n## Scripts (via Bun)\n\n| Command             | Description                                                  |\n| ------------------- | ------------------------------------------------------------ |\n| `bun run dev`       | Watch/rebuild the SDK during development.                    |\n| `bun run build`     | Emit ESM + CJS bundles with declaration files.               |\n| `bun run test`      | Execute Vitest unit suite.                                   |\n| `bun run lint`      | Run Biome formatting/linting.                                |\n| `bun run typecheck` | Strict TypeScript checks (`tsc --noEmit`).                   |\n| `bun run generate`  | Pull the latest OpenAPI spec into `src/models/generated.ts`. |\n\n## Getting Started Locally\n\n```bash\nbun install\nbun run build\n# optional: export RAG_OPENAPI_URL=\"https://your-server/openapi.json?key=...\"\n# bun run generate\nbun run typecheck\n# bun run test    # optional smoke tests\n```\n\nSee `docs/CONTRIBUTING.md` for coding standards and release workflow. Additional runnable samples live in `examples/` (ingestion, search, job polling).\n","readmeFilename":"README.md"}