{"_id":"@astralibx/call-log-engine","_rev":"5-5687879137fd1d60a0f3868d0b01193b","name":"@astralibx/call-log-engine","dist-tags":{"latest":"0.3.3"},"versions":{"0.2.0":{"name":"@astralibx/call-log-engine","version":"0.2.0","keywords":["call-log","pipeline","analytics","timeline","support"],"license":"MIT","_id":"@astralibx/call-log-engine@0.2.0","maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"homepage":"https://github.com/Hariprakash1997/astralib#readme","bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"dist":{"shasum":"5ef39f7a973db9ac863aab041f94daa77b8c9557","tarball":"https://registry.npmjs.org/@astralibx/call-log-engine/-/call-log-engine-0.2.0.tgz","fileCount":8,"integrity":"sha512-XbOHYykUyV4AgsfLSLVpEiAu0ZdHBii2B9pdGGM7EDAg4yHgtv7gTL1QBIQoUHWec7wTNyn+FOI7wPzdoGlp4g==","signatures":[{"sig":"MEYCIQCBIVB8BYDVbUU8iA52tovSm1BKFeoRvOOfzRNIzudYqwIhAIGxSnUcccKk15J6hio2M4jAz/vC6s0d+FfELkr2gn9h","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":658798},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"c09e61ad1f66611cab260c4df471e3cffeb87958","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"astralib","email":"1997hariprakash@gmail.com"},"repository":{"url":"git+https://github.com/Hariprakash1997/astralib.git","type":"git","directory":"packages/call-log/call-log-engine"},"_npmVersion":"10.9.4","description":"Call log engine with pipelines, timeline-based notes, contact adapters, analytics, and shared agent support","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","@astralibx/core":"^1.2.1","@astralibx/call-log-types":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"express":"^5.0.0","mongoose":"^8.12.1","typescript":"^5.8.2","@types/node":"^22.0.0","@types/express":"^5.0.0","@vitest/coverage-v8":"^3.0.0"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0","mongoose":"^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/call-log-engine_0.2.0_1774147454077_0.8394862658532642","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@astralibx/call-log-engine","version":"0.3.0","keywords":["call-log","pipeline","analytics","timeline","support"],"license":"MIT","_id":"@astralibx/call-log-engine@0.3.0","maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"homepage":"https://github.com/Hariprakash1997/astralib#readme","bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"dist":{"shasum":"02a270f6dda8e6e930ea894a5963e417d6698e03","tarball":"https://registry.npmjs.org/@astralibx/call-log-engine/-/call-log-engine-0.3.0.tgz","fileCount":8,"integrity":"sha512-f0rZ23lo3TB4TGVkCy+wpqefQ+VrPA+4jWASE1Ejz2HNM96iTJrLkGm/pYWJ+z1c/M+ek5RxPztC4Rnd8K9Nqg==","signatures":[{"sig":"MEUCIQDaa+4QS+Zo7dBdM3oroaL1R/7oX8/HbIXnjXRb5FsI/QIgeWc8RF6NNnwswkIynMjdW6e2oE5BoaHOmS2jVGt5Byk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":744277},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"aa24b21103d13c355fbf84fb143335febb4b0136","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"astralib","email":"1997hariprakash@gmail.com"},"repository":{"url":"git+https://github.com/Hariprakash1997/astralib.git","type":"git","directory":"packages/call-log/call-log-engine"},"_npmVersion":"10.9.4","description":"Call log engine with pipelines, timeline-based notes, contact adapters, analytics, and shared agent support","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","@astralibx/core":"^1.2.1","@astralibx/call-log-types":"^0.3.0"},"_hasShrinkwrap":false,"devDependencies":{"express":"^5.0.0","mongoose":"^8.12.1","typescript":"^5.8.2","@types/node":"^22.0.0","@types/express":"^5.0.0","@vitest/coverage-v8":"^3.0.0"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0","mongoose":"^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/call-log-engine_0.3.0_1774200548901_0.39887714966035515","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@astralibx/call-log-engine","version":"0.3.1","keywords":["call-log","pipeline","analytics","timeline","support"],"license":"MIT","_id":"@astralibx/call-log-engine@0.3.1","maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"homepage":"https://github.com/Hariprakash1997/astralib#readme","bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"dist":{"shasum":"44131a4f862719943c2fac0be34f9ae3acb5db7c","tarball":"https://registry.npmjs.org/@astralibx/call-log-engine/-/call-log-engine-0.3.1.tgz","fileCount":8,"integrity":"sha512-6FCh1P4K+AmN0HfO11RPp6uuRC1jmAzk3ofK6YVasO2LlbzOho8SAPlMhQaiyc3IYi+a4Xb2X8PuF4JwclxxkA==","signatures":[{"sig":"MEYCIQDC9dTe2dayDy3nXEYzTd9kOYlmv24LmqpL5FcjluBpwQIhANhvN4SxVjYk/qZCE1E05S7JpupSM2qZ4j1icGk2z3jl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":744881},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"0488f44a86c3dd1c854677012a7978c30f317df3","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"astralib","email":"1997hariprakash@gmail.com"},"repository":{"url":"git+https://github.com/Hariprakash1997/astralib.git","type":"git","directory":"packages/call-log/call-log-engine"},"_npmVersion":"10.9.4","description":"Call log engine with pipelines, timeline-based notes, contact adapters, analytics, and shared agent support","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","@astralibx/core":"^1.2.1","@astralibx/call-log-types":"^0.3.0"},"_hasShrinkwrap":false,"devDependencies":{"express":"^5.0.0","mongoose":"^8.12.1","typescript":"^5.8.2","@types/node":"^22.0.0","@types/express":"^5.0.0","@vitest/coverage-v8":"^3.0.0"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0","mongoose":"^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/call-log-engine_0.3.1_1774230935440_0.583601551081963","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@astralibx/call-log-engine","version":"0.3.2","keywords":["call-log","pipeline","analytics","timeline","support"],"license":"MIT","_id":"@astralibx/call-log-engine@0.3.2","maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"homepage":"https://github.com/Hariprakash1997/astralib#readme","bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"dist":{"shasum":"4b5bdc943f0471c3ece27b7ac330cc4d94702844","tarball":"https://registry.npmjs.org/@astralibx/call-log-engine/-/call-log-engine-0.3.2.tgz","fileCount":8,"integrity":"sha512-jzCu5gE8ygBIEzWaI2qj+AjRAuri2y9Qu1D8xJgoilnmwagEwPINWqoTnl+V3+c2+D5rYeqK5ffzX2EufabuEA==","signatures":[{"sig":"MEYCIQDURiTUmfSI6ngc/PMeKDSsNOCb8ngcOpkczFMxjcZwSgIhAP4akBTCxH6fsFxWaqsd+p525REMTTQwrrM4tiEE+krP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":745165},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"a8bd86dab2e0c1d8e788466574c2a6064b8f262d","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"astralib","email":"1997hariprakash@gmail.com"},"repository":{"url":"git+https://github.com/Hariprakash1997/astralib.git","type":"git","directory":"packages/call-log/call-log-engine"},"_npmVersion":"10.9.4","description":"Call log engine with pipelines, timeline-based notes, contact adapters, analytics, and shared agent support","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","@astralibx/core":"^1.2.1","@astralibx/call-log-types":"^0.3.0"},"_hasShrinkwrap":false,"devDependencies":{"express":"^5.0.0","mongoose":"^8.12.1","typescript":"^5.8.2","@types/node":"^22.0.0","@types/express":"^5.0.0","@vitest/coverage-v8":"^3.0.0"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0","mongoose":"^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/call-log-engine_0.3.2_1774232672001_0.30631033453739454","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@astralibx/call-log-engine","version":"0.3.3","description":"Call log engine with pipelines, timeline-based notes, contact adapters, analytics, and shared agent support","repository":{"type":"git","url":"git+https://github.com/Hariprakash1997/astralib.git","directory":"packages/call-log/call-log-engine"},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","lint":"eslint src/","clean":"rm -rf dist"},"keywords":["call-log","pipeline","analytics","timeline","support"],"license":"MIT","dependencies":{"@astralibx/call-log-types":"^0.3.0","@astralibx/core":"^1.2.1","zod":"^3.23.0"},"peerDependencies":{"express":"^4.18.0 || ^5.0.0","mongoose":"^7.0.0 || ^8.0.0"},"devDependencies":{"@types/express":"^5.0.0","@types/node":"^22.0.0","@vitest/coverage-v8":"^3.0.0","express":"^5.0.0","mongoose":"^8.12.1","typescript":"^5.8.2"},"_id":"@astralibx/call-log-engine@0.3.3","gitHead":"18ae0348539bf3644ee008d3c122bd39abff0db4","bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"homepage":"https://github.com/Hariprakash1997/astralib#readme","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-4vEcnmbVxVeY2h1IHAV5XyWS+GW86iH1tReKbwboUTh/nCRlfBvCBKsAGcb6aMFZ8zi7CTTF987yidpUmavjLg==","shasum":"fb2e1cf9966ea4910c2cfbb1f3022b7fdd4920a7","tarball":"https://registry.npmjs.org/@astralibx/call-log-engine/-/call-log-engine-0.3.3.tgz","fileCount":8,"unpackedSize":745145,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDqf6MQm1QFsdxsQ4acA+SLfZqGJgke2nlRrqL40crakAIgFVdIxc4LyjFL19bMgAM7y8ORPy2BTpbJciDbZog/U9A="}]},"_npmUser":{"name":"astralib","email":"1997hariprakash@gmail.com"},"directories":{},"maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/call-log-engine_0.3.3_1774259917161_0.5512576211623115"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-22T02:44:13.999Z","modified":"2026-03-23T09:58:37.466Z","0.2.0":"2026-03-22T02:44:14.274Z","0.3.0":"2026-03-22T17:29:09.077Z","0.3.1":"2026-03-23T01:55:35.627Z","0.3.2":"2026-03-23T02:24:32.173Z","0.3.3":"2026-03-23T09:58:37.327Z"},"bugs":{"url":"https://github.com/Hariprakash1997/astralib/issues"},"license":"MIT","homepage":"https://github.com/Hariprakash1997/astralib#readme","keywords":["call-log","pipeline","analytics","timeline","support"],"repository":{"type":"git","url":"git+https://github.com/Hariprakash1997/astralib.git","directory":"packages/call-log/call-log-engine"},"description":"Call log engine with pipelines, timeline-based notes, contact adapters, analytics, and shared agent support","maintainers":[{"name":"astralib","email":"1997hariprakash@gmail.com"}],"readme":"# @astralibx/call-log-engine\n\n[![npm version](https://img.shields.io/npm/v/@astralibx/call-log-engine.svg)](https://www.npmjs.com/package/@astralibx/call-log-engine)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nCall log engine with pipelines, timeline-based notes, contact adapters, follow-up worker, analytics, export, and shared agent support.\n\n## Install\n\n```bash\nnpm install @astralibx/call-log-engine\n```\n\n### Peer Dependencies\n\n| Package | Required |\n|---------|----------|\n| `express` | Yes |\n| `mongoose` | Yes |\n\n```bash\nnpm install express mongoose\n```\n\n## Requirements\n\nMongoDB is **mandatory** for call-log-engine. It stores pipelines, call logs (with embedded timelines), and settings.\n\nThere is no Redis dependency -- the follow-up worker polls MongoDB directly.\n\n## Quick Start\n\n```ts\nimport { createCallLogEngine } from '@astralibx/call-log-engine';\nimport mongoose from 'mongoose';\nimport express from 'express';\n\nconst app = express();\napp.use(express.json());\n\nconst connection = mongoose.createConnection('mongodb://localhost:27017/myapp');\n\nconst engine = createCallLogEngine({\n  db: { connection, collectionPrefix: '' },\n  adapters: {\n    lookupContact: async (query) => {\n      // Look up contact by phone/email/externalId\n      return null;\n    },\n    authenticateAgent: async (token) => {\n      // Verify JWT/session token, return { adminUserId, displayName } or null\n      return null;\n    },\n  },\n});\n\n// Mount REST routes\napp.use('/api/call-log', engine.routes);\n\napp.listen(3000);\n\n// Graceful shutdown -- stops the follow-up worker\nprocess.on('SIGTERM', async () => {\n  await engine.destroy();\n});\n```\n\n## Full Setup with Agent Sharing\n\nWhen running alongside `@astralibx/chat-engine`, both engines share the same agent collection by default (`chatagents`). See [Agent Sharing](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/agent-sharing.md).\n\n```ts\nconst engine = createCallLogEngine({\n  db: { connection },\n  agents: {\n    collectionName: 'chatagents',  // default -- same collection chat-engine uses\n    resolveAgent: async (agentId) => {\n      const agent = await AgentModel.findById(agentId);\n      return agent ? { agentId: agent._id.toString(), displayName: agent.name } : null;\n    },\n  },\n  adapters: {\n    lookupContact: async (query) => {\n      const contact = await ContactModel.findOne(query);\n      return contact\n        ? { externalId: contact._id.toString(), displayName: contact.name, phone: contact.phone }\n        : null;\n    },\n    addContact: async (data) => {\n      const contact = await ContactModel.create(data);\n      return { externalId: contact._id.toString(), displayName: contact.displayName };\n    },\n    authenticateAgent: async (token) => {\n      const user = await verifyJWT(token);\n      return user ? { adminUserId: user.id, displayName: user.name } : null;\n    },\n  },\n  hooks: {\n    onCallCreated: (callLog) => console.log('New call:', callLog.callLogId),\n    onStageChanged: (callLog, from, to) => console.log(`Stage: ${from} -> ${to}`),\n    onCallClosed: (callLog) => console.log('Call closed:', callLog.callLogId),\n    onFollowUpDue: async (callLog) => notifyAgent(callLog),\n    onMetric: (metric) => prometheus.observe(metric.name, metric.value, metric.labels),\n  },\n  options: {\n    maxTimelineEntries: 200,         // default\n    followUpCheckIntervalMs: 60_000, // default: 1 minute\n  },\n});\n```\n\n## Features\n\n- **Pipeline management** -- CRUD pipelines with configurable stages, default/terminal flags, and stage reordering. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n- **Call log lifecycle** -- Create, update, change stage, assign, close, reopen, soft delete calls with automatic timeline tracking. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n- **Call channels** -- Track communication channel per call (phone, whatsapp, telegram, etc.). Admin-configurable `availableChannels` in settings. Filterable in list queries. Channel distribution in analytics.\n- **Call outcomes** -- Track result of each call separate from pipeline stage (interested, not_interested, no_answer, etc.). Admin-configurable `availableOutcomes` in settings. Filterable, with outcome distribution in analytics.\n- **Follow-up flag** -- `isFollowUp` boolean distinguishes follow-up calls from fresh calls. Filterable in list queries. Follow-up ratio computed in analytics.\n- **Soft delete** -- `DELETE /:id` soft-deletes with `isDeleted` flag and `deletedAt` timestamp. Excluded from all queries and analytics by default. `includeDeleted=true` query param for audit access.\n- **Agent-scoped filtering** -- When `enableAgentScoping` is true (default), non-owner staff see only their own calls in list and analytics. Owners see everything. Based on `role` field from `authenticateAgent` adapter.\n- **Timeline** -- Append-only audit trail per call with notes, stage changes, assignments, follow-up events. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n- **Contact timeline** -- Merged cross-call timeline for a contact. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n- **Follow-up worker** -- Background worker polls for due follow-ups and fires `onFollowUpDue` hook. Starts automatically, stops via `engine.destroy()`. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/hooks.md)\n- **Analytics** -- Dashboard stats, agent stats, leaderboard, pipeline stats/funnel, team stats, daily/weekly/overall reports, channel/outcome distributions, follow-up ratio. Deleted calls excluded from all analytics. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n- **Export** -- Bulk call export, single call export, pipeline report export in JSON or CSV. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n- **Settings** -- Runtime-mutable tags, categories, priority levels, follow-up defaults, available channels, available outcomes. Settings updates use partial merge (`$set`) -- only fields you provide are updated. Calling `settings.update({ availableChannels: [...] })` will NOT overwrite other settings like `availableOutcomes` or `defaultFollowUpDays`. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n- **Bulk operations** -- Bulk stage change for multiple call logs at once. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n- **Contact adapters** -- Pluggable contact lookup and creation. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/adapters.md)\n- **Agent sharing** -- Reuse chat-engine's agent collection. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/agent-sharing.md)\n- **Lifecycle hooks** -- 6 hooks for call events, follow-ups, and metrics. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/hooks.md)\n- **Error classes** -- Typed errors with codes for every failure scenario.\n\n## Phase 2 Routes\n\n### New routes\n\n| Method | Route | Description |\n|--------|-------|-------------|\n| `DELETE` | `/calls/:id` | Soft-delete a call log (sets `isDeleted` + `deletedAt`) |\n| `GET` | `/analytics/channel-distribution` | Channel breakdown — query: `from?`, `to?` |\n| `GET` | `/analytics/outcome-distribution` | Outcome breakdown — query: `from?`, `to?` |\n| `GET` | `/analytics/follow-up-stats` | Follow-up ratio — query: `from?`, `to?` |\n\n### New query params on `GET /calls`\n\n| Param | Type | Description |\n|-------|------|-------------|\n| `channel` | `string` | Filter by communication channel |\n| `outcome` | `string` | Filter by call outcome |\n| `isFollowUp` | `boolean` | Filter follow-up calls (`true` or `false`) |\n| `includeDeleted` | `boolean` | Include soft-deleted calls in results (`true` or `false`, default `false`) |\n\n## Architecture\n\nThe library exposes an Express router from a single factory call:\n\n| Export | Purpose | Access |\n|--------|---------|--------|\n| `engine.routes` | REST API -- pipelines, calls, contacts, analytics, settings, export | Protected (via `authenticateAgent` adapter) |\n| `engine.destroy()` | Stops follow-up worker, cleans up resources | Call on shutdown |\n\nAll services are also available programmatically via the returned `engine` object: `pipelines`, `callLogs`, `lifecycle`, `timeline`, `analytics`, `pipelineAnalytics`, `settings`, `export`, `models`.\n\n## Seeding Data\n\nSchema factory functions are exported so you can seed data or run scripts without creating a full engine instance:\n\n```ts\nimport { createPipelineModel, createCallLogSettingsModel } from '@astralibx/call-log-engine';\n\nconst Pipeline = createPipelineModel(connection);\nconst Settings = createCallLogSettingsModel(connection);\n\nawait Pipeline.create({ ... });\n```\n\n## Getting Started Guide\n\n1. [Configuration](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/configuration.md) -- Set up database, agents, adapters, and options\n2. [Adapters](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/adapters.md) -- Implement contact lookup, authentication, and agent resolution\n3. [Hooks](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/hooks.md) -- Wire up notifications, analytics, and monitoring\n\nGuides: [Agent Sharing](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/agent-sharing.md)\n\nReference: [API Routes](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)\n\n## Links\n\n- [GitHub](https://github.com/Hariprakash1997/astralib/tree/main/packages/call-log/call-log-engine)\n- [call-log-types](https://github.com/Hariprakash1997/astralib/tree/main/packages/call-log/call-log-types)\n- [CHANGELOG](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/CHANGELOG.md)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}