{"_id":"@ankit-parekh-007/ngx-copilot-sdk","_rev":"2-8dbfad311dbaa65ebffdeedd88f4be46","name":"@ankit-parekh-007/ngx-copilot-sdk","dist-tags":{"beta":"0.1.0","latest":"0.1.1"},"versions":{"0.1.0":{"name":"@ankit-parekh-007/ngx-copilot-sdk","version":"0.1.0","keywords":["angular","angular-20","copilot","ai","llm","rag","retrieval-augmented-generation","tool-calling","approvals","streaming","server-sent-events","enterprise","sdk","supabase","pgvector","agent"],"author":{"url":"https://github.com/AnkitParekh007","name":"Ankit Parekh"},"license":"MIT","_id":"@ankit-parekh-007/ngx-copilot-sdk@0.1.0","maintainers":[{"name":"akki-parekh","email":"akki77parekh@gmail.com"}],"homepage":"https://github.com/AnkitParekh007/ngx-copilot-platform#readme","bugs":{"url":"https://github.com/AnkitParekh007/ngx-copilot-platform/issues"},"dist":{"shasum":"0d01b5da06dffc989b9166291d12c4034c09d854","tarball":"https://registry.npmjs.org/@ankit-parekh-007/ngx-copilot-sdk/-/ngx-copilot-sdk-0.1.0.tgz","fileCount":4,"integrity":"sha512-WyBrN2CiPoBjNt4q032FR5mGZBvg4zSJkJTHu87PObFthI3lragfkFXAoB+seQxZ11mx/sZWtleUWIaUhu6J7Q==","signatures":[{"sig":"MEQCIE0dMwExTMHXPLPccsVCmCEQNe6oEBJjMdfLXowPhpZsAiBt70/OT46+8v8DdA85C0x7YpQ6aZlu9DrQy7Sj01QWHA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":203684},"module":"fesm2022/ankit-parekh-007-ngx-copilot-sdk.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/ankit-parekh-007-ngx-copilot-sdk.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"05f72a7ed4b31a748c59f46bf675895f5f3b06fe","typings":"index.d.ts","_npmUser":{"name":"akki-parekh","email":"akki77parekh@gmail.com"},"repository":{"url":"git+https://github.com/AnkitParekh007/ngx-copilot-platform.git","type":"git","directory":"packages/sdk"},"_npmVersion":"11.9.0","description":"Angular 20 SDK for AI copilot chat, streaming responses, RAG citations, tool timelines, and approval workflows in enterprise apps.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","dependencies":{"tslib":"^2.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"rxjs":"^7.8.0","@angular/core":"^20.0.0","@angular/common":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-copilot-sdk_0.1.0_1779493801159_0.2757313579936669","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@ankit-parekh-007/ngx-copilot-sdk","version":"0.1.1","description":"Angular 20 SDK for AI copilot chat, streaming responses, RAG citations, tool timelines, and approval workflows in enterprise apps.","keywords":["angular","angular-20","copilot","ai","llm","rag","retrieval-augmented-generation","tool-calling","approvals","streaming","server-sent-events","enterprise","sdk","supabase","pgvector","agent"],"author":{"name":"Ankit Parekh","url":"https://github.com/AnkitParekh007"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/AnkitParekh007/ngx-copilot-platform.git","directory":"packages/sdk"},"bugs":{"url":"https://github.com/AnkitParekh007/ngx-copilot-platform/issues"},"homepage":"https://github.com/AnkitParekh007/ngx-copilot-platform#readme","publishConfig":{"access":"public"},"peerDependencies":{"@angular/common":"^20.0.0","@angular/core":"^20.0.0","rxjs":"^7.8.0"},"dependencies":{"tslib":"^2.6.0"},"sideEffects":false,"module":"fesm2022/ankit-parekh-007-ngx-copilot-sdk.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/ankit-parekh-007-ngx-copilot-sdk.mjs"}},"gitHead":"771c5921919fbd145eed09b15fb3c875f66810f9","_id":"@ankit-parekh-007/ngx-copilot-sdk@0.1.1","_nodeVersion":"24.15.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-uOTU/OUImOuONoTVexqMQU1eJ/K3D8SNu+vnkp5K+YiotFTyXQfHWDOkms7oO5gX8Rjn+hb1DuTqnlp4vn7PPg==","shasum":"07acfc41c81b30179104c5ddf9183d7429393888","tarball":"https://registry.npmjs.org/@ankit-parekh-007/ngx-copilot-sdk/-/ngx-copilot-sdk-0.1.1.tgz","fileCount":5,"unpackedSize":208452,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ankit-parekh-007%2fngx-copilot-sdk@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCAyzd5B/N3e41omMDusmlYZ65fdbs8L3cpTRfEsM9qgwIhANATcwtgyiY85WnjlSbUrCjx+LuSKBwFy0EL1MEDyRRU"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:962398c8-35e2-45eb-8b15-3da0faeebe21"}},"directories":{},"maintainers":[{"name":"akki-parekh","email":"akki77parekh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ngx-copilot-sdk_0.1.1_1779952865373_0.5051080666423566"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-22T23:50:00.994Z","modified":"2026-05-28T07:21:05.855Z","0.1.0":"2026-05-22T23:50:01.382Z","0.1.1":"2026-05-28T07:21:05.508Z"},"bugs":{"url":"https://github.com/AnkitParekh007/ngx-copilot-platform/issues"},"author":{"name":"Ankit Parekh","url":"https://github.com/AnkitParekh007"},"license":"MIT","homepage":"https://github.com/AnkitParekh007/ngx-copilot-platform#readme","keywords":["angular","angular-20","copilot","ai","llm","rag","retrieval-augmented-generation","tool-calling","approvals","streaming","server-sent-events","enterprise","sdk","supabase","pgvector","agent"],"repository":{"type":"git","url":"git+https://github.com/AnkitParekh007/ngx-copilot-platform.git","directory":"packages/sdk"},"description":"Angular 20 SDK for AI copilot chat, streaming responses, RAG citations, tool timelines, and approval workflows in enterprise apps.","maintainers":[{"name":"akki-parekh","email":"akki77parekh@gmail.com"}],"readme":"# ngx-copilot-platform\n\n> Angular AI copilot platform with a publishable SDK, a self-hosted RAG backend, and isolated demo/example surfaces.\n\n[![CI](https://github.com/AnkitParekh007/ngx-copilot-platform/actions/workflows/ci.yml/badge.svg)](https://github.com/AnkitParekh007/ngx-copilot-platform/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/@ankit-parekh-007/ngx-copilot-sdk.svg)](https://www.npmjs.com/package/@ankit-parekh-007/ngx-copilot-sdk)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nThis repository contains three distinct layers:\n\n- `packages/sdk`: `@ankit-parekh-007/ngx-copilot-sdk`, an Angular 20 copilot UI and adapter SDK.\n- `packages/backend`: a Next.js backend that owns auth, retrieval, ingestion, streaming, and approval boundaries.\n- `apps/*` and `examples/*`: demo, admin, and sample surfaces kept in the repo for development and documentation, but not intended to define the production deployment target.\n\n## Current status\n\n- The SDK builds and its test suite passes.\n- The backend builds, typechecks, and exposes aligned platform contracts.\n- Public API auth is standardized on `Authorization: Bearer cpk_*` for SDK/API-key clients.\n- Stubbed browser automation is disabled from the public execution path until a production executor is implemented.\n- Demo/example apps remain in the repository, but GitHub Pages deployment is manual-only and should stay separate from any public product deployment.\n- Admin API-key lifecycle endpoints are available for create, list, rotate, revoke, and metadata updates through master-key protected routes.\n- Legacy approval mutation routes have been removed; public approval resolution goes through the authenticated `/api/copilot/approvals/:id/resolve` contract only.\n\n## Platform contract\n\n| Endpoint | Method | Contract |\n|---|---|---|\n| `/api/copilot/chat` | `POST` | Returns `CopilotResponse` |\n| `/api/copilot/chat/stream` | `POST` | Accepts `CopilotRequest` JSON and returns SSE `CopilotEvent` messages |\n| `/api/copilot/rag/query` | `POST` | Returns raw `RagResult[]` |\n| `/api/copilot/tools/execute` | `POST` | Only production-enabled tools are executable; disabled tools return `501` |\n| `/api/copilot/approvals/:id/resolve` | `POST` | Resolves approval requests |\n| `/api/admin/api-keys` | `GET`, `POST` | List and create API keys with master-key auth |\n| `/api/admin/api-keys/:id` | `PATCH` | Update API-key metadata and active state |\n| `/api/admin/api-keys/:id/rotate` | `POST` | Rotate an API key and return the new plaintext key once |\n| `/api/admin/api-keys/:id/revoke` | `POST` | Revoke an API key |\n\n## Quick start\n\n### SDK-only\n\n```bash\nnpm install @ankit-parekh-007/ngx-copilot-sdk\n```\n\n```ts\nimport { provideCopilot } from '@ankit-parekh-007/ngx-copilot-sdk';\n\nexport const appConfig = {\n  providers: [provideCopilot({ defaultMode: 'ask' })],\n};\n```\n\nThe default adapter is mock-backed for local UI work. Keep that mode isolated from public product deployments.\n\n### Full stack\n\n```bash\ngit clone https://github.com/AnkitParekh007/ngx-copilot-platform.git\ncd ngx-copilot-platform\npnpm install\n\ncp packages/backend/.env.example packages/backend/.env.local\n# Fill in SUPABASE_*, OPENAI_API_KEY, optional KV_REST_*, and COPILOT_API_KEYS\n\ncorepack pnpm --filter @ngx-copilot/backend dev\ncorepack pnpm --filter example-consumer dev\n```\n\n`apps/example-consumer` now expects runtime config instead of committed keys:\n\n```ts\nwindow.__COPILOT_RUNTIME_CONFIG__ = {\n  apiUrl: 'https://your-backend-host',\n  apiKey: 'cpk_your_runtime_key',\n};\n```\n\nUse the smoke script to verify the backend contract directly:\n\n```bash\nCOPILOT_API_KEY=cpk_your_runtime_key node scripts/smoke-platform-backend.mjs\n```\n\n## Launch constraints\n\n- Do not deploy `apps/demo-app`, `apps/example-consumer`, or `examples/*` as the public product without an explicit production wrapper and runtime configuration strategy.\n- Do not expose disabled browser automation endpoints as if they were live capabilities.\n- Do not hardcode backend URLs or API keys in Angular source files.\n- Keep `CORS_ALLOWED_ORIGINS` explicit in production. Development-only localhost permissiveness is handled in middleware, not by production defaults.\n- Keep execute-mode UI hidden in public launch surfaces until a production browser executor is implemented.\n- Apply Supabase migration `002_align_copilot_modes.sql` before public launch so stored conversation modes match the runtime `ask | plan | execute | debug` contract.\n\n## Verification\n\nThese commands currently pass in the repository:\n\n```bash\ncorepack pnpm --filter @ngx-copilot/backend typecheck\ncorepack pnpm --filter @ngx-copilot/backend test\ncorepack pnpm --filter @ngx-copilot/backend build\ncorepack pnpm --filter @ankit-parekh-007/ngx-copilot-sdk test\ncorepack pnpm --filter example-consumer build\ncorepack pnpm --filter admin-ui build\n```\n\n## CI/CD\n\n| Workflow | Trigger | Purpose |\n|---|---|---|\n| `ci.yml` | Every push and PR | SDK tests, backend typecheck/tests, workspace builds |\n| `deploy-pages.yml` | Manual only | Builds and publishes the demo app intentionally |\n| `release-readiness.yml` | Manual or Release | Smokes a deployed backend using release secrets before public rollout |\n| `publish-npm.yml` | GitHub Release | Publishes `@ankit-parekh-007/ngx-copilot-sdk` |\n\n## License\n\n[MIT](./LICENSE) - Ankit Parekh\n","readmeFilename":"README.md"}