{"_id":"@allstak/core","_rev":"5-321dd2699094e0e4fec884c1192ede72","name":"@allstak/core","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.1":{"name":"@allstak/core","version":"0.1.1","keywords":["allstak","observability","sdk","core"],"license":"MIT","_id":"@allstak/core@0.1.1","maintainers":[{"name":"allstak-","email":"info@allstak.io"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/allstak-io/allstak-core/issues"},"dist":{"shasum":"ebe852b35e672fafc446aaab6994278c2703a4b4","tarball":"https://registry.npmjs.org/@allstak/core/-/core-0.1.1.tgz","fileCount":9,"integrity":"sha512-fVz66OU91LDHeXv3A3+17vtzqdJbzMdlSv1b2oerrkuVZ+B76y71jnp1PaWs0mvuhCNklMxcZzscBC88jSqWDw==","signatures":[{"sig":"MEQCICxapenac5HrD5CgPnNd98olSyvPexkwdHElGdaUvn/kAiBGX1y2+T12EpcgQP1dbD/BuQo0YTR7OAM6ezYtBtbcdw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7708},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"7f0110d607b185edcd5927c6aed002aefab59d05","scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"allstak-","email":"info@allstak.io"},"deprecated":"This package is deprecated. Use @allstak/js instead.","repository":{"url":"git+https://github.com/allstak-io/allstak-core.git","type":"git"},"_npmVersion":"10.9.3","description":"AllStak core — transport, buffer, retry, event builder. Platform-agnostic foundation for @allstak-io/browser and @allstak-io/react-native.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@allstak/js":"^0.1.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.1_1776956219029_0.35775418364859424","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@allstak/core","version":"0.1.2","keywords":["allstak","observability","sdk","core"],"license":"MIT","_id":"@allstak/core@0.1.2","maintainers":[{"name":"allstak-","email":"info@allstak.io"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/allstak-io/allstak-core/issues"},"dist":{"shasum":"8a33bcd7c622c22b5f3c104c9c21663c94524881","tarball":"https://registry.npmjs.org/@allstak/core/-/core-0.1.2.tgz","fileCount":9,"integrity":"sha512-sy7gfCfwdQAoMSLnOuZzfOw5aiFA0hQJjMfqFEYUXeL5VTXEOgSDmxb4IezuGSNwMZw+R0ZAeoHTcDNP8hWc0w==","signatures":[{"sig":"MEUCIQCr5e7PD/xHuAykkLnWG1/4yMnnCrQYBYP/XVbHxGuLIgIgaLCsxVo+kNirrc01/ukJlEqvqcVQESYrlNP39orbTg8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7684},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"7f0110d607b185edcd5927c6aed002aefab59d05","scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"allstak-","email":"info@allstak.io"},"deprecated":"This package is deprecated. Use @allstak/js instead.","repository":{"url":"git+https://github.com/allstak-io/allstak-core.git","type":"git"},"_npmVersion":"10.9.3","description":"AllStak core — transport, buffer, retry, event builder. Platform-agnostic foundation for @allstak-io/browser and @allstak-io/react-native.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@allstak/js":"^0.1.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.2_1776956691576_0.8004233422333291","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@allstak/core","version":"0.1.3","keywords":["allstak","observability","sdk","core"],"license":"MIT","_id":"@allstak/core@0.1.3","maintainers":[{"name":"allstak-","email":"info@allstak.io"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/allstak-io/allstak-core/issues"},"dist":{"shasum":"f038594ceea16c4699df2e9a600413bd7c4282bb","tarball":"https://registry.npmjs.org/@allstak/core/-/core-0.1.3.tgz","fileCount":7,"integrity":"sha512-uCymrKCAimklaNKpTBd3NO96aBZ8UH+0EUAHV6qWC9aZ9Zt3INkW84vLXVndS0qXobi6C4obTqZbRbuQyA7mUA==","signatures":[{"sig":"MEYCIQCGAS19h654erVwSxepwqw3th199Yf/x9w7h7+/CPePRQIhAO2GjkpOX7fdDPB2i1XH3qxqEZhzc1CfS3GJEof3aBjp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8949},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"70239889d4f0e7b71787256a5faec4b5ddc46e5e","scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap","typecheck":"tsc --noEmit"},"_npmUser":{"name":"allstak-","email":"info@allstak.io"},"deprecated":"This package is deprecated. Use @allstak/js instead.","repository":{"url":"git+https://github.com/allstak-io/allstak-core.git","type":"git"},"_npmVersion":"10.9.3","description":"AllStak core — transport, buffer, retry, event builder. Platform-agnostic foundation for @allstak-io/browser and @allstak-io/react-native.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@allstak/js":"^0.1.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.3_1776960348832_0.9452061556135003","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-04-23T14:56:58.904Z","modified":"2026-05-11T05:38:34.148Z","0.1.1":"2026-04-23T14:56:59.171Z","0.1.2":"2026-04-23T15:04:51.721Z","0.1.3":"2026-04-23T16:05:48.991Z"},"bugs":{"url":"https://github.com/allstak-io/allstak-core/issues"},"license":"MIT","homepage":"https://allstak.sa","keywords":["allstak","observability","sdk","core"],"repository":{"url":"git+https://github.com/allstak-io/allstak-core.git","type":"git"},"description":"AllStak core — transport, buffer, retry, event builder. Platform-agnostic foundation for @allstak-io/browser and @allstak-io/react-native.","maintainers":[{"name":"allstak-","email":"info@allstak.io"}],"readme":"# @allstak/core\n\n**Shared runtime-agnostic primitive powering every AllStak JavaScript SDK.**\n\n[![npm version](https://img.shields.io/npm/v/@allstak/core.svg)](https://www.npmjs.com/package/@allstak/core)\n[![CI](https://github.com/allstak-io/allstak-core/actions/workflows/ci.yml/badge.svg)](https://github.com/allstak-io/allstak-core/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nPlatform-agnostic core for the AllStak JavaScript SDKs — re-exports init, capture, and context APIs with no DOM, React, or React Native dependencies.\n\n## Dashboard\n\nView captured events live at [app.allstak.sa](https://app.allstak.sa).\n\n![AllStak dashboard](https://app.allstak.sa/images/dashboard-preview.png)\n\n## Features\n\n- Stable public surface shared by `@allstak/browser`, `@allstak/react`, and `@allstak/react-native`\n- `AllStak.init` / `captureException` / `captureMessage` / `addBreadcrumb`\n- User and tag context helpers\n- Distributed tracing (`startSpan`, `getTraceId`)\n- Cron heartbeats and HTTP/DB capture\n- Zero browser or Node-specific code — safe for isomorphic builds\n\n## What You Get\n\nOnce integrated, every event flows to your AllStak dashboard:\n\n- **Errors** — stack traces, breadcrumbs, release + environment tags\n- **Logs** — structured logs with search and filters\n- **Traces** — distributed spans with propagated trace IDs\n- **Alerts** — email and webhook notifications on regressions\n\nMost users should install a runtime-specific SDK (`@allstak/js`, `@allstak/browser`, `@allstak/react`, `@allstak/react-native`) which depends on `@allstak/core`.\n\n## Installation\n\n```bash\nnpm install @allstak/core\n```\n\n## Quick Start\n\n> Create a project at [app.allstak.sa](https://app.allstak.sa) to get your API key.\n\n```ts\nimport { AllStak } from '@allstak/core';\n\nAllStak.init({\n  apiKey: process.env.ALLSTAK_API_KEY!,\n  environment: 'production',\n});\n\nAllStak.captureException(new Error('test: hello from allstak-core'));\n```\n\nRun the file — the test error appears in your dashboard within seconds.\n\n## Get Your API Key\n\n1. Sign up at [app.allstak.sa](https://app.allstak.sa)\n2. Create a project\n3. Copy your API key from **Project Settings → API Keys**\n4. Export it as `ALLSTAK_API_KEY` or pass it to `AllStak.init(...)`\n\n## Configuration\n\n| Option | Type | Required | Default | Description |\n|---|---|---|---|---|\n| `apiKey` | `string` | yes | — | Project API key (`ask_live_…`) |\n| `environment` | `string` | no | — | Deployment env |\n| `release` | `string` | no | — | Version or git SHA |\n| `host` | `string` | no | `https://api.allstak.sa` | Ingest host override |\n| `user` | `{ id?, email? }` | no | — | Default user context |\n| `tags` | `Record<string,string>` | no | — | Default tags |\n| `maxBreadcrumbs` | `number` | no | `50` | Ring buffer size |\n\n## Example Usage\n\nCapture an exception with context:\n\n```ts\nAllStak.captureException(new Error('checkout failed'), { cartId: 'c_9' });\n```\n\nSend a log message:\n\n```ts\nAllStak.captureMessage('Cache warmed', 'info');\n```\n\nSet user and tags:\n\n```ts\nAllStak.setUser({ id: 'u_1', email: 'dev@example.com' });\nAllStak.setTag('service', 'api');\n```\n\n## Production Endpoint\n\nProduction endpoint: `https://api.allstak.sa`. Override via `host` for self-hosted installs:\n\n```ts\nAllStak.init({ apiKey: '...', host: 'https://allstak.mycorp.com' });\n```\n\n## Links\n\n- Documentation: https://docs.allstak.sa\n- Dashboard: https://app.allstak.sa\n- Source: https://github.com/allstak-io/allstak-core\n\n## License\n\nMIT © AllStak\n","readmeFilename":"README.md"}