{"_id":"@airjelly/sdk","name":"@airjelly/sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@airjelly/sdk","version":"0.1.0","description":"Official TypeScript SDK for AirJelly Desktop — query memories, tasks, events, app usage, and daily content feeds from your Node.js app.","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --format esm --dts --target node18 --clean --minify","dev":"tsup src/index.ts --format esm --dts --target node18 --watch","test":"vitest run","test:watch":"vitest","prepublishOnly":"bun run build"},"devDependencies":{"tsup":"^8.4.0","typescript":"^5.7.0"},"engines":{"node":">=18"},"license":"UNLICENSED","homepage":"https://www.airjelly.ai","bugs":{"email":"support@airjelly.ai"},"keywords":["airjelly","sdk","api","memory","ai","context"],"_id":"@airjelly/sdk@0.1.0","gitHead":"4ed5d537223c5e3c0bf8f19dbc4e5e9ac08ca9b4","_nodeVersion":"22.13.1","_npmVersion":"11.4.1","dist":{"integrity":"sha512-KuFt5OOtGMGs5icgLILWQQgU6knTqH6gd2pZ2S4uXWa+6IW3ujM09Io1sv2q5Zn+nuthMm9Cwn17orlGwnf/yg==","shasum":"adc323749a06af60d3703d91028ed855de5e123c","tarball":"https://registry.npmjs.org/@airjelly/sdk/-/sdk-0.1.0.tgz","fileCount":4,"unpackedSize":23152,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE+NJwDd5leMQX15CeEvdKwZPD1GBrtU7FGHQ3xaKkJXAiEA6F3p2ZlDhbZbuTJXV36xMW7XcGXqQZm40/KKC8ktS94="}]},"_npmUser":{"name":"ziwen2005","email":"ziwensong.cs@gmail.com"},"directories":{},"maintainers":[{"name":"ziwen2005","email":"ziwensong.cs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.0_1776943501459_0.1164194229553761"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-23T11:25:01.364Z","0.1.0":"2026-04-23T11:25:01.601Z","modified":"2026-04-23T11:25:01.827Z"},"maintainers":[{"name":"ziwen2005","email":"ziwensong.cs@gmail.com"}],"description":"Official TypeScript SDK for AirJelly Desktop — query memories, tasks, events, app usage, and daily content feeds from your Node.js app.","homepage":"https://www.airjelly.ai","keywords":["airjelly","sdk","api","memory","ai","context"],"bugs":{"email":"support@airjelly.ai"},"license":"UNLICENSED","readme":"# @airjelly/sdk\n\n> ⚠️ Install only from the official scope: `@airjelly/sdk`. Any `airjelly-sdk` (without scope) is not published by us.\n\nOfficial TypeScript SDK for [AirJelly](https://www.airjelly.ai) — query memories, tasks, events, app usage, and daily content feeds from any Node.js process on the same machine. Everything stays on `127.0.0.1`; no data leaves your machine.\n\n## Install\n\n```bash\nnpm i @airjelly/sdk\n# or\nbun add @airjelly/sdk\n```\n\nRequires Node 18+ and the AirJelly Desktop app running.\n\n## Quick start\n\n```ts\nimport { createClient } from '@airjelly/sdk'\n\nconst client = createClient()\n\n// Check connection\nconst health = await client.healthCheck()\nconsole.log(`Connected to AirJelly v${health.version}`)\n\n// Search memories\nconst memories = await client.searchMemory('hackathon planning', { limit: 5 })\nfor (const m of memories) {\n  console.log(`- ${m.title} (${m.memory_type})`)\n}\n\n// Create a task\nconst task = await client.createTask({ title: 'Review SDK examples' })\nconsole.log(`Created ${task?.id}`)\n```\n\n## How auth works\n\nAirJelly Desktop writes `runtime.json` on startup with `{ port, token, pid, version }` (chmod 600). `createClient()` reads it automatically — no configuration needed.\n\n| Platform | Path |\n|---|---|\n| macOS | `~/Library/Application Support/AirJelly/runtime.json` |\n| Windows | `%APPDATA%\\AirJelly\\runtime.json` |\n| Linux | `$XDG_CONFIG_HOME/AirJelly/runtime.json` |\n\nManual override (tests / remote-forwarded setups):\n\n```ts\nconst client = createClient({ port: 41234, token: 'abc123...' })\n```\n\n## API overview\n\n| Domain | Methods |\n|---|---|\n| **Memory** | `searchMemory`, `listMemories`, `getMemory`, `resolveScreenshotPaths`, `getEventsByDate` |\n| **Knowledge** | `listPersons`, `getEventsForEntity` |\n| **Tasks** | `getTask`, `getTaskList`, `getOpenTasks`, `getTaskMemories`, `createTask`, `updateTask`, `completeTask`, `reopenTask`, `snoozeTask`, `archiveTask`, `unarchiveTask` |\n| **App usage** | `getDailyAppUsage`, `getAppUsageRange`, `getTopApps`, `getAppSessions`, `getAppIcons` |\n| **Reminders** | `dismissReminder`, `snoozeReminder` |\n| **Recording** | `getRecordingStatus`, `getRecordingPermissions`, `getRecordingStats`, `startRecording` ⚠️, `stopRecording` ⚠️ |\n\n> ⚠️ `startRecording` / `stopRecording` are side-effectful — they toggle AirJelly's core data collection. Call only when the user has explicitly asked for it.\n\nAll methods are typed. Discover what your AirJelly version supports:\n\n```ts\nconst caps = await client.getCapabilities()\nconsole.log(caps.apiVersion, caps.methods)\n```\n\nFor methods not yet wrapped, use the escape hatch:\n\n```ts\nconst data = await client.rpc<MyType>('methodName', [arg1, arg2])\n```\n\n## Error handling\n\n```ts\nimport { AirJellyNotRunningError, AirJellyConnectionError } from '@airjelly/sdk'\n\ntry {\n  const tasks = await client.getOpenTasks(5)\n} catch (err) {\n  if (err instanceof AirJellyNotRunningError) {\n    console.error('Start AirJelly Desktop and try again.')\n  } else {\n    throw err\n  }\n}\n```\n\nError classes: `AirJellyNotRunningError`, `AirJellyConnectionError`, `AirJellyRpcError`, `AirJellyMethodNotSupportedError`, `AirJellyApiVersionMismatchError`.\n\n## Security\n\n- Server binds to `127.0.0.1` only — never network-reachable.\n- Auth via bearer token in `runtime.json` (chmod 600), regenerated on every AirJelly restart.\n- Any local process running as your OS user can read `runtime.json`. Only install SDK wrappers from trusted sources.\n- The public API does **not** expose shell or file-system access to external clients.\n- `searchMemory` and `createTask` trigger server-side LLM / embedding calls and consume your AirJelly credits.\n\nReport security issues privately to **security@airjelly.ai**.\n\n## Support\n\nQuestions or bug reports: **support@airjelly.ai**\n\nThis package is distributed as a compiled binary. Source code is not public.\n","readmeFilename":"README.md","_rev":"1-5199ccbeecfb863d0d4b479b3c312df8"}