{"_id":"@airstore/sdk","_rev":"7-e8452f96926ebde3052ed5ac803fa3c8","name":"@airstore/sdk","dist-tags":{"latest":"0.1.8"},"versions":{"0.1.0":{"name":"@airstore/sdk","version":"0.1.0","keywords":["airstore","sdk","typescript","api","virtual-filesystem"],"license":"Apache-2.0","_id":"@airstore/sdk@0.1.0","maintainers":[{"name":"lukelombardi92","email":"luke@beam.cloud"}],"dist":{"shasum":"14e13ee7651f1db0b1116b503cf13414ab8b5d56","tarball":"https://registry.npmjs.org/@airstore/sdk/-/sdk-0.1.0.tgz","fileCount":134,"integrity":"sha512-zxGzFNFmVr7Z5gQUYKEl+UM3T8qhP689xgEE/vVxwNxp0qjTnicYB7YbS3vvLaXCGLdH6AcRV+B9vJGkv8b/VQ==","signatures":[{"sig":"MEUCIQDLu6mP6HqcpEW0XqZfES9ktuoTNq3MyycIpFwf8uISbgIgGhbJjLLd5MC+22QgiH8BGBBAvlrKglKLFk73wnQrfgU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":194885},"main":"./dist/cjs/index.js","types":"./dist/types/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"2d9391ad0870637d71ca744e9d6d715660abf66d","scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run","build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.json","test:prod":"AIRSTORE_BASE_URL=https://api.airstore.ai/api/v1 vitest run","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"lukelombardi92","email":"luke@beam.cloud"},"_npmVersion":"10.8.2","description":"Official TypeScript SDK for the Airstore API","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.3.0","@types/node":"^25.2.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1770845528173_0.29696152946924603","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@airstore/sdk","version":"0.1.1","keywords":["airstore","sdk","typescript","api","virtual-filesystem"],"license":"Apache-2.0","_id":"@airstore/sdk@0.1.1","maintainers":[{"name":"lukelombardi92","email":"luke@beam.cloud"}],"dist":{"shasum":"40c2265c512653ae808d0130272c8d0e220cda11","tarball":"https://registry.npmjs.org/@airstore/sdk/-/sdk-0.1.1.tgz","fileCount":134,"integrity":"sha512-kwOSPoProUxFyzf5T3T2FuJe2n51y/Ax0DSRLoMUhZAT2lgpE9khxIDPF94I0V3QVr5Gf8OIoJea87z9BeSKxg==","signatures":[{"sig":"MEQCIFIMEBwN4AJAg1ej7bwGYMg0+EQoCiTZbIB8b5k82DaeAiBH3gLvhzDsr4K8WVom5QzBbi3twi8QaRt/pM/i06Wxbw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":195417},"main":"./dist/cjs/index.js","types":"./dist/types/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"5dbe53cc8dc1e93bc0ef59870a05ff4840dc66e1","scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run","build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.json","test:prod":"AIRSTORE_BASE_URL=https://api.airstore.ai/api/v1 vitest run","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"lukelombardi92","email":"luke@beam.cloud"},"_npmVersion":"10.8.2","description":"Official TypeScript SDK for the Airstore API","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.3.0","@types/node":"^25.2.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1770851624182_0.6855578170188221","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@airstore/sdk","version":"0.1.3","keywords":["airstore","sdk","typescript","api","virtual-filesystem"],"license":"Apache-2.0","_id":"@airstore/sdk@0.1.3","maintainers":[{"name":"lukelombardi92","email":"luke@beam.cloud"}],"dist":{"shasum":"5fdae845330a78766e8fb1bd814ac07f7c439484","tarball":"https://registry.npmjs.org/@airstore/sdk/-/sdk-0.1.3.tgz","fileCount":146,"integrity":"sha512-GkT33/STIqMw2sMwB2rV1SdHRa5Wos1MvTn6IA2FYNpFL8uSVNgRPwF4x+FDXBe75yUQ2X4yZPlxO3qe9L+7xw==","signatures":[{"sig":"MEUCIFpiHl6U+s15VAB9nxC0AUae7uQUqzFyGL0POztwI8tCAiEAymJvubVTE5EkCoI6PqZCWF0lEsw7fj+ROsAm+nTk5nY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":236881},"main":"./dist/cjs/index.js","types":"./dist/types/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"77c3961fc8e292247c302b287049ceb086681ddc","scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run","build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.json","test:prod":"AIRSTORE_BASE_URL=https://api.airstore.ai/api/v1 vitest run","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"lukelombardi92","email":"luke@beam.cloud"},"_npmVersion":"10.8.2","description":"Official TypeScript SDK for the Airstore API","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.3.0","@types/node":"^25.2.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.3_1771092692652_0.9256551362619456","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@airstore/sdk","version":"0.1.4","keywords":["airstore","sdk","typescript","api","virtual-filesystem"],"license":"Apache-2.0","_id":"@airstore/sdk@0.1.4","maintainers":[{"name":"lukelombardi92","email":"luke@beam.cloud"}],"dist":{"shasum":"265803a810b167f35bd4a5cf4685befe39c60ee4","tarball":"https://registry.npmjs.org/@airstore/sdk/-/sdk-0.1.4.tgz","fileCount":182,"integrity":"sha512-fQjq7KAlsM+xNBQRLr3fudNhxymkvCMewdNX0AfbC3cEnxANIAVcuzMSYbOjmehKYW+uUBcUOM2hOkZZ38EnIQ==","signatures":[{"sig":"MEYCIQCHZI92tTPh50DvNohaobQpvxd14+ONrLw6zTNkWpqiBgIhAKOi5GwQuX0GS56mV+aJeqy/l+EIkPKRc01/m5fdJinU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":289951},"main":"./dist/cjs/index.js","types":"./dist/types/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"98aa534c78f88d6102101927870cf82e3bf70fc5","scripts":{"lint":"npm run lint:src && npm run lint:examples","test":"vitest run","build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","lint:src":"tsc --noEmit -p tsconfig.json","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.json","test:prod":"AIRSTORE_BASE_URL=https://api.airstore.ai/api/v1 vitest run","test:watch":"vitest","lint:examples":"tsc --noEmit -p tsconfig.examples.json","prepublishOnly":"npm run clean && npm run build","smoke:agent-runs":"tsx examples/agent-runs-smoke.ts","example:agent-sandbox":"tsx examples/agent-sandbox-example.ts"},"_npmUser":{"name":"lukelombardi92","email":"luke@beam.cloud"},"_npmVersion":"10.8.2","description":"Official TypeScript SDK for the Airstore API","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","vitest":"^4.0.18","typescript":"^5.3.0","@types/node":"^25.2.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.4_1771885953877_0.8970859445751325","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@airstore/sdk","version":"0.1.6","keywords":["airstore","sdk","typescript","api","virtual-filesystem"],"license":"Apache-2.0","_id":"@airstore/sdk@0.1.6","maintainers":[{"name":"lukelombardi92","email":"luke@beam.cloud"}],"dist":{"shasum":"3bab04ddca842f9af2583406e9b907f2452c33ce","tarball":"https://registry.npmjs.org/@airstore/sdk/-/sdk-0.1.6.tgz","fileCount":212,"integrity":"sha512-Px54gP/PQRgIYRKYJ8wDUeVUo6X4XogWKkvqhqj0nQAKLT7SA95VIlIOCZ2ub/DbtmHZhE/G/2NvOnjFH9Nn4w==","signatures":[{"sig":"MEUCIDDzilWOFdm2MQhmJWs5yVfUwsMOSYleOWr6gdDmY4V9AiEAus7GT4lUufPvGQ4D7zB+yTYCUl9vn7fCuDd2DQpCtx4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":344427},"main":"./dist/cjs/index.js","types":"./dist/types/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"e24316bc7e0d297284bce07b989b09a374fc7c76","scripts":{"lint":"npm run lint:src && npm run lint:examples","test":"vitest run","build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","lint:src":"tsc --noEmit -p tsconfig.json","test:e2e":"vitest run --config vitest.e2e.config.ts","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.json","test:prod":"AIRSTORE_BASE_URL=https://api.airstore.ai/api/v1 vitest run","test:watch":"vitest","lint:examples":"tsc --noEmit -p tsconfig.examples.json","prepublishOnly":"npm run clean && npm run build","smoke:agent-runs":"tsx examples/agent-runs-smoke.ts","example:agent-sandbox":"tsx examples/agent-sandbox-example.ts"},"_npmUser":{"name":"lukelombardi92","email":"luke@beam.cloud"},"_npmVersion":"10.8.2","description":"Official TypeScript SDK for the Airstore API","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","vitest":"^4.0.18","typescript":"^5.3.0","@types/node":"^25.2.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.6_1772639578433_0.6419416302907563","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@airstore/sdk","version":"0.1.7","keywords":["airstore","sdk","typescript","api","virtual-filesystem"],"license":"Apache-2.0","_id":"@airstore/sdk@0.1.7","maintainers":[{"name":"lukelombardi92","email":"luke@beam.cloud"}],"dist":{"shasum":"9ad9807725463c87fd9edee8733a5d6197377180","tarball":"https://registry.npmjs.org/@airstore/sdk/-/sdk-0.1.7.tgz","fileCount":212,"integrity":"sha512-82IHmf2ggRtFp7jAPcShCz441h3xEzOwzLPcxwKosxFmztIqDg1U3hX8mQrREQJnTkXGaslY4tk1uLLDcSR/rA==","signatures":[{"sig":"MEYCIQDDXw2064Lu1YlwillURNPTAnfZdWX28S62aiFBMSUS1AIhAIU5deSOqFEesXQSX/c0v8wWY9GqGVOzwxH5hjvRkzIh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":400925},"main":"./dist/cjs/index.js","types":"./dist/types/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"f5400192f8b2d255ee1e0826f1954d46d6380ac2","scripts":{"lint":"npm run lint:src && npm run lint:examples","test":"vitest run","build":"npm run build:esm && npm run build:cjs","clean":"rm -rf dist","lint:src":"tsc --noEmit -p tsconfig.json","test:e2e":"vitest run --config vitest.e2e.config.ts","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.json","test:prod":"AIRSTORE_BASE_URL=https://api.airstore.ai/api/v1 vitest run","test:watch":"vitest","lint:examples":"tsc --noEmit -p tsconfig.examples.json","prepublishOnly":"npm run clean && npm run build","smoke:agent-runs":"tsx examples/agent-runs-smoke.ts","example:agent-sandbox":"tsx examples/agent-sandbox-example.ts"},"_npmUser":{"name":"lukelombardi92","email":"luke@beam.cloud"},"_npmVersion":"10.8.2","description":"Official TypeScript SDK for the Airstore API","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","vitest":"^4.0.18","typescript":"^5.3.0","@types/node":"^25.2.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.7_1773083856861_0.5961552709338331","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@airstore/sdk","version":"0.1.8","description":"Official TypeScript SDK for the Airstore API","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"engines":{"node":">=18"},"scripts":{"build":"npm run build:esm && npm run build:cjs","build:esm":"tsc -p tsconfig.json","build:cjs":"tsc -p tsconfig.cjs.json","clean":"rm -rf dist","lint":"npm run lint:src && npm run lint:examples","lint:src":"tsc --noEmit -p tsconfig.json","lint:examples":"tsc --noEmit -p tsconfig.examples.json","test":"vitest run","test:e2e":"vitest run --config vitest.e2e.config.ts","test:watch":"vitest","test:prod":"AIRSTORE_BASE_URL=https://api.airstore.ai/api/v1 vitest run","smoke:agent-runs":"tsx examples/agent-runs-smoke.ts","example:agent-sandbox":"tsx examples/agent-sandbox-example.ts","prepublishOnly":"npm run clean && npm run build"},"keywords":["airstore","sdk","typescript","api","virtual-filesystem"],"license":"Apache-2.0","devDependencies":{"@types/node":"^25.2.3","tsx":"^4.20.6","typescript":"^5.3.0","vitest":"^4.0.18"},"_id":"@airstore/sdk@0.1.8","gitHead":"aff688633263fe8ff4701b1abbeca6a6e4974e98","_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-QUpw2x1F9x7hOF5aEdrr8FjtDHuYVWftT5h25Tm42UKatSc7+jhfO7U67ub7znLimoBlsZoCo5s/yCmuWM2j1w==","shasum":"9e10a237d957e162a189d426a61dbbfc2dc011df","tarball":"https://registry.npmjs.org/@airstore/sdk/-/sdk-0.1.8.tgz","fileCount":212,"unpackedSize":405504,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQClg5uDbJzAFinG7Tir/tDwedISmDPDWndBQ4FHDFe1vwIgbYKDutOKZniWljvFrWKosJ+YMg4wBcfy2TdMhWm6lvU="}]},"_npmUser":{"name":"lukelombardi92","email":"luke@beam.cloud"},"directories":{},"maintainers":[{"name":"lukelombardi92","email":"luke@beam.cloud"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.8_1775071337681_0.35200046451271283"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-11T21:32:08.074Z","modified":"2026-04-01T19:22:17.951Z","0.1.0":"2026-02-11T21:32:08.309Z","0.1.1":"2026-02-11T23:13:44.357Z","0.1.3":"2026-02-14T18:11:32.796Z","0.1.4":"2026-02-23T22:32:34.032Z","0.1.6":"2026-03-04T15:52:58.578Z","0.1.7":"2026-03-09T19:17:37.020Z","0.1.8":"2026-04-01T19:22:17.839Z"},"license":"Apache-2.0","keywords":["airstore","sdk","typescript","api","virtual-filesystem"],"description":"Official TypeScript SDK for the Airstore API","maintainers":[{"name":"lukelombardi92","email":"luke@beam.cloud"}],"readme":"# @airstore/sdk\n\nOfficial TypeScript SDK for the [Airstore](https://airstore.ai) API. Create workspaces, connect data sources, run agents, and observe everything — all from your backend.\n\n## Installation\n\n```bash\nnpm install @airstore/sdk\n```\n\n## Quick Start\n\n```typescript\nimport Airstore from '@airstore/sdk';\n\nconst airstore = new Airstore({ apiKey: process.env.AIRSTORE_API_KEY });\n\n// Create a workspace\nconst ws = await airstore.workspaces.create({ name: 'user-123' });\n\n// Create an agent\nconst agent = await airstore.agents.create(ws.external_id, {\n  agentKey: 'support-agent',\n  name: 'Support Agent',\n  runner: 'claude_code',\n  config: { model: 'claude-sonnet-4-6' },\n});\n\n// Submit a task\nconst { task, run_id } = await airstore.tasks.create(ws.external_id, {\n  message: 'Summarize recent support tickets',\n  agentId: agent.id,\n});\n\n// Poll for logs and events\nconst batch = await airstore.tasks.streamEvents(ws.external_id, task.id);\nconsole.log(batch.logs);\n```\n\n## Configuration\n\n```typescript\nconst airstore = new Airstore({\n  apiKey: 'org_...',                // or set AIRSTORE_API_KEY env var\n  baseURL: 'https://api.airstore.ai/api/v1', // or AIRSTORE_BASE_URL\n  timeout: 30_000,                  // request timeout in ms (default: 60000)\n  maxRetries: 3,                    // retries for 429/5xx (default: 2)\n});\n```\n\n## API Reference\n\n### Agents\n\n```typescript\n// Create\nconst agent = await airstore.agents.create(wsId, {\n  agentKey: 'my-agent',\n  name: 'My Agent',\n  runner: 'claude_code',\n  config: { model: 'claude-sonnet-4-6', system_prompt: 'You are helpful.' },\n});\n\n// List\nconst agents = await airstore.agents.list(wsId);\n\n// Retrieve\nconst a = await airstore.agents.retrieve(wsId, agentId);\n\n// Update\nawait airstore.agents.update(wsId, agentId, { name: 'Renamed Agent' });\n\n// Delete (also removes bound hooks)\nawait airstore.agents.delete(wsId, agentId);\n```\n\n### Tasks\n\n```typescript\n// Create a task (returns accepted response with task + run_id)\nconst { task, run_id } = await airstore.tasks.create(wsId, {\n  message: 'Do something',\n  agentId: agent.id,\n  idempotencyKey: 'unique-key',     // optional, server generates if omitted\n  sessionId: 'session-abc',         // optional, groups related tasks\n  timeoutMs: 120_000,               // optional\n  policy: {                         // optional execution policy\n    host: 'sandbox',\n    security: 'allowlist',\n    runtimeType: 'gvisor',\n    workspaceAccess: 'rw',\n  },\n});\n\n// List with filters\nconst page = await airstore.tasks.list(wsId, {\n  state: ['running', 'idle'],\n  agentId: agent.id,\n  limit: 20,\n});\n\n// Retrieve\nconst t = await airstore.tasks.retrieve(wsId, taskId);\n\n// Cancel a running task\nawait airstore.tasks.cancel(wsId, taskId);\n\n// Archive a completed/idle task\nawait airstore.tasks.archive(wsId, taskId);\n```\n\n### Log Streaming & Events\n\n```typescript\n// Fetch logs for a task (cursor-based for incremental reads)\nconst logs = await airstore.tasks.listLogs(wsId, taskId);\n\n// Composite event stream: task/run state + logs + run events in one call\nlet logCursor = 0;\nlet eventCursor = 0;\n\nconst batch = await airstore.tasks.streamEvents(wsId, taskId, {\n  logCursor,\n  runEventCursor: eventCursor,\n});\n\n// Use next cursors for subsequent polls\nlogCursor = batch.next_log_cursor;\neventCursor = batch.next_run_event_cursor;\n```\n\n### Runs\n\n```typescript\n// List runs\nconst runs = await airstore.runs.list(wsId, { status: 'running' });\n\n// Retrieve a run\nconst run = await airstore.runs.retrieve(wsId, runId);\n\n// List snapshots (intermediate state)\nconst snapshots = await airstore.runs.listSnapshots(wsId, runId);\n\n// List execution events\nconst events = await airstore.runs.listEvents(wsId, runId);\n\n// Cancel\nawait airstore.runs.cancel(wsId, runId);\n```\n\n### Channels (Follow-Up Messages)\n\n```typescript\n// Send a new task to an agent via direct channel\nawait airstore.channels.sendDirectAgentMessage(wsId, agentId, {\n  message: 'What about the billing tickets?',\n});\n\n// Send follow-up input to an active run\nawait airstore.channels.sendDirectRunMessage(wsId, runId, {\n  message: 'Focus on the last 24 hours',\n  taskId: task.id,\n  queueMode: 'steer', // 'queue' | 'followup' | 'steer' | 'interrupt'\n});\n```\n\n### Scheduled Tasks (Cron)\n\n```typescript\n// Create a schedule\nconst schedule = await airstore.tasks.createSchedule(wsId, {\n  agentId: agent.id,\n  cronExpr: '0 9 * * 1-5',    // every weekday at 9am\n  timezone: 'America/New_York',\n  prompt: 'Summarize overnight support tickets',\n});\n\n// List schedules\nconst schedules = await airstore.tasks.listSchedules(wsId);\n\n// Update (pause, change cron, etc.)\nawait airstore.tasks.updateSchedule(wsId, schedule.external_id, {\n  active: false,\n});\n\n// Delete\nawait airstore.tasks.deleteSchedule(wsId, schedule.external_id);\n```\n\n### Hooks (File-System Triggers)\n\n```typescript\n// Create a hook on a source view folder\nconst hook = await airstore.hooks.create(wsId, {\n  path: '/sources/gmail/Recent Emails',\n  prompt: 'Triage this email and draft a reply',\n  eventTypes: ['create'],\n  agentName: 'Email Triager',\n});\n\n// List / Retrieve / Update / Delete\nconst hooks = await airstore.hooks.list(wsId);\nawait airstore.hooks.update(wsId, hookId, { active: false });\nawait airstore.hooks.delete(wsId, hookId);\n```\n\n### Workspaces\n\n```typescript\nconst ws = await airstore.workspaces.create({ name: 'my-workspace' });\nconst workspaces = await airstore.workspaces.list();\nconst ws2 = await airstore.workspaces.retrieve(wsId);\nawait airstore.workspaces.del(wsId);\n```\n\n### Connections\n\n```typescript\n// OAuth tokens\nawait airstore.connections.create(wsId, {\n  integrationType: 'gmail',\n  accessToken: '...',\n  refreshToken: '...',\n});\n\n// API key\nawait airstore.connections.create(wsId, {\n  integrationType: 'github',\n  apiKey: 'ghp_...',\n});\n\nconst connections = await airstore.connections.list(wsId);\nawait airstore.connections.del(wsId, connectionId);\n```\n\n### Source Views\n\n```typescript\n// Smart mode (LLM-inferred)\nconst view = await airstore.views.create(wsId, {\n  integration: 'gmail',\n  name: 'Important Emails',\n  guidance: 'Emails marked as important from the last month',\n});\n\n// Query mode (structured filter)\nconst view2 = await airstore.views.create(wsId, {\n  integration: 'github',\n  name: 'Open PRs',\n  filter: { repo: 'acme/api', type: 'prs', state: 'open' },\n});\n\n// Sync, update, delete\nawait airstore.views.sync(wsId, viewId);\nawait airstore.views.update(wsId, viewId, { guidance: 'Updated' });\nawait airstore.views.del(wsId, viewId);\n```\n\n### Tokens, Members, OAuth\n\n```typescript\n// Tokens (for CLI mounting)\nconst token = await airstore.tokens.create(wsId, {\n  email: 'agent@internal', name: 'vm-mount',\n});\n\n// Members\nconst member = await airstore.members.create(wsId, {\n  email: 'user@example.com', name: 'Jane', role: 'member',\n});\n\n// Interactive OAuth\nconst session = await airstore.oauth.createSession({\n  integrationType: 'gmail',\n  returnTo: 'https://myapp.com/callback',\n});\nconst completed = await airstore.oauth.poll(session.session_id);\n```\n\n### Filesystem\n\n```typescript\nconst entries = await airstore.fs.list(wsId, { path: '/' });\nconst content = await airstore.fs.read(wsId, { path: '/sources/gmail/email.txt' });\nconst tree = await airstore.fs.tree(wsId, { path: '/', maxKeys: 100 });\nconst meta = await airstore.fs.stat(wsId, '/sources/gmail/email.txt');\n```\n\n## Error Handling\n\n```typescript\nimport { NotFoundError, RateLimitError, AuthenticationError } from '@airstore/sdk';\n\ntry {\n  await airstore.workspaces.retrieve('ws_nonexistent');\n} catch (err) {\n  if (err instanceof NotFoundError) console.log('Not found');\n  if (err instanceof RateLimitError) console.log('Rate limited');\n  if (err instanceof AuthenticationError) console.log('Bad API key');\n}\n```\n\n| Class | Status | Description |\n|---|---|---|\n| `AirstoreError` | — | Base error for all SDK errors |\n| `APIError` | varies | Base for HTTP errors |\n| `AuthenticationError` | 401 | Invalid or missing API key |\n| `PermissionDeniedError` | 403 | Token lacks permission |\n| `NotFoundError` | 404 | Resource not found |\n| `ConflictError` | 409 | Conflicting operation |\n| `UnprocessableEntityError` | 422 | Validation failed |\n| `RateLimitError` | 429 | Rate limit exceeded |\n| `InternalServerError` | 5xx | Server error (retried automatically) |\n| `APIConnectionError` | — | Network failure |\n| `APIConnectionTimeoutError` | — | Request timed out |\n\n## Per-Request Options\n\nEvery method accepts an optional last argument for per-request overrides:\n\n```typescript\nawait airstore.workspaces.list({\n  timeout: 10_000,\n  maxRetries: 5,\n  signal: controller.signal,\n  headers: { 'X-Trace-Id': 'abc' },\n});\n```\n\n## Response Metadata\n\nEvery response includes a non-enumerable `lastResponse` property:\n\n```typescript\nconst ws = await airstore.workspaces.create({ name: 'test' });\nws.lastResponse.statusCode;  // 200\nws.lastResponse.requestId;   // 'req_abc123'\n```\n\n## Raw Requests\n\nFor endpoints not yet covered by the SDK:\n\n```typescript\nconst response = await airstore.rawRequest('POST', '/some/new/endpoint', {\n  body: { key: 'value' },\n});\n```\n\n## Requirements\n\n- Node.js 18+ (uses native `fetch`)\n- TypeScript 5.0+\n- Zero runtime dependencies\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}