{"_id":"@chanaka_nakandala/agent-core","_rev":"5-05e6aee791efe7012934d12d7e0820bb","name":"@chanaka_nakandala/agent-core","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@chanaka_nakandala/agent-core","version":"1.0.0","keywords":["grubtech","types","integration"],"author":{"name":"Grubtech"},"license":"MIT","_id":"@chanaka_nakandala/agent-core@1.0.0","maintainers":[{"name":"chanaka_nakandala","email":"chanaka@grubtech.com"}],"homepage":"https://github.com/chanaka-nakandala/grubtech-integration-agent#readme","bugs":{"url":"https://github.com/chanaka-nakandala/grubtech-integration-agent/issues"},"dist":{"shasum":"139e43c7cfc7d7ed573546d554480686db3cea61","tarball":"https://registry.npmjs.org/@chanaka_nakandala/agent-core/-/agent-core-1.0.0.tgz","fileCount":26,"integrity":"sha512-ReBRN81uUvjR/YI2RXMXHmQQxxgrFOrMSQ19cpH6dqIBMRJZ71PWT//K9Ntlc7wjPhibEqzM2xBVvElO0cEbPA==","signatures":[{"sig":"MEYCIQClIh9UqMqdeKQ4T7f4FsyD5L1OGN0HwpYNRR15WwG0jwIhAN52xlttVFczEPXT5kluZPbbGqtSnrOOutv03Of3UUkR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10235},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"82d3895c15f393d7f24cc16cbe00035ab4d29f45","scripts":{"test":"echo \"Tests will be added in future iteration\"","build":"node ../../node_modules/typescript/lib/tsc.js","clean":"rm -rf dist"},"_npmUser":{"name":"chanaka_nakandala","email":"chanaka@grubtech.com"},"repository":{"url":"git+https://github.com/chanaka-nakandala/grubtech-integration-agent.git","type":"git","directory":"packages/agent-core"},"_npmVersion":"10.9.2","description":"Shared types and utilities for Grubtech Integration Agent","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/agent-core_1.0.0_1760100977578_0.9147450009109888","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@chanaka_nakandala/agent-core","version":"1.0.1","keywords":["grubtech","types","integration"],"author":{"name":"Grubtech"},"license":"MIT","_id":"@chanaka_nakandala/agent-core@1.0.1","maintainers":[{"name":"chanaka_nakandala","email":"chanaka@grubtech.com"}],"homepage":"https://github.com/chanaka-nakandala/grubtech-integration-agent#readme","bugs":{"url":"https://github.com/chanaka-nakandala/grubtech-integration-agent/issues"},"dist":{"shasum":"74d10e049247f779397c4d550a8be262664c55af","tarball":"https://registry.npmjs.org/@chanaka_nakandala/agent-core/-/agent-core-1.0.1.tgz","fileCount":26,"integrity":"sha512-rD3q3zGLBohF9A0Ok49v6dD06kkY6nJBWgABmnK20qnQB982NbTVjd/dR25CJyaINlWtc6GzHpZ4Lesicuj6fg==","signatures":[{"sig":"MEUCIEiGVldMtEgMdsCzaxLBmQhSaTAg+5Lt+KUcKa4WKH9+AiEA+488I+UxhRuPpQUpta+nBUS9PyDrkAuTjY22mFEHe00=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10235},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"82d3895c15f393d7f24cc16cbe00035ab4d29f45","scripts":{"test":"echo \"Tests will be added in future iteration\"","build":"node ../../node_modules/typescript/lib/tsc.js","clean":"rm -rf dist"},"_npmUser":{"name":"chanaka_nakandala","email":"chanaka@grubtech.com"},"repository":{"url":"git+https://github.com/chanaka-nakandala/grubtech-integration-agent.git","type":"git","directory":"packages/agent-core"},"_npmVersion":"10.9.2","description":"Shared types and utilities for Grubtech Integration Agent","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/agent-core_1.0.1_1760102001116_0.5182611012090579","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@chanaka_nakandala/agent-core","version":"1.0.2","description":"Shared TypeScript types and utilities used internally by Grubtech Integration Agent packages.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"node ../../node_modules/typescript/lib/tsc.js","clean":"rm -rf dist","test":"echo \"Tests will be added in future iteration\""},"keywords":["grubtech","types","integration"],"author":{"name":"Grubtech","email":"support@grubtech.io"},"license":"MIT","devDependencies":{"typescript":"^5.9.3"},"_id":"@chanaka_nakandala/agent-core@1.0.2","gitHead":"82d3895c15f393d7f24cc16cbe00035ab4d29f45","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-O11WDEOv7aZargbkqVgNXL+nmZipOv+8ZcXfyYYgqM6P5bM5xT2E8qotpYpJD7LUDZ9NqYiWErr2XxGVt2/7hA==","shasum":"1d172e6007ad3c1730fbf3c9622115cbfb2e90a8","tarball":"https://registry.npmjs.org/@chanaka_nakandala/agent-core/-/agent-core-1.0.2.tgz","fileCount":26,"unpackedSize":9941,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC128L0pqwAJxuxLwd3+oT1bBj4bTmMJzKfY3FbnnfR5QIgDC6+XFusoeMHvMaXrKDlOlvAHQ4T+ikd+T37TlPlg6Y="}]},"_npmUser":{"name":"chanaka_nakandala","email":"chanaka@grubtech.com"},"directories":{},"maintainers":[{"name":"chanaka_nakandala","email":"chanaka@grubtech.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-core_1.0.2_1760112324199_0.9824388913157451"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-10T12:56:17.433Z","modified":"2025-10-10T16:05:24.607Z","1.0.0":"2025-10-10T12:56:17.768Z","1.0.1":"2025-10-10T13:13:21.293Z","1.0.2":"2025-10-10T16:05:24.417Z"},"author":{"name":"Grubtech","email":"support@grubtech.io"},"license":"MIT","keywords":["grubtech","types","integration"],"description":"Shared TypeScript types and utilities used internally by Grubtech Integration Agent packages.","maintainers":[{"name":"chanaka_nakandala","email":"chanaka@grubtech.com"}],"readme":"# @grubtech/agent-core\n\nShared TypeScript types and utilities for Grubtech Integration Agent packages.\n\n## Overview\n\nThis package provides common types, enums, and constants used across the Grubtech Integration Agent monorepo. It's a types-only package with no runtime dependencies.\n\n## Installation\n\n```bash\nnpm install @grubtech/agent-core\n```\n\n## Exports\n\n### Types\n\n#### `CachedDocument`\nRepresents a cached documentation page:\n\n```typescript\ninterface CachedDocument {\n  url: string;\n  html: string;\n  chunks: DocumentChunk[];\n  cachedAt: Date;\n  expiresAt: Date;\n}\n```\n\n#### `DocumentChunk`\nA chunk of documentation content:\n\n```typescript\ninterface DocumentChunk {\n  chunkId: string;\n  sourceUrl: string;\n  title: string;\n  content: string;\n  relevanceScore?: number;\n  metadata?: {\n    integrationPhase?: string;\n    tags?: string[];\n  };\n}\n```\n\n#### `IntegrationContext`\nUser session context:\n\n```typescript\ninterface IntegrationContext {\n  sessionId: string;\n  integrationPhase: IntegrationPhase;\n  lastQuery: string;\n  timestamp: Date;\n}\n```\n\n### Enums\n\n#### `IntegrationPhase`\nIntegration journey stages:\n\n```typescript\nenum IntegrationPhase {\n  NOT_STARTED = 'NOT_STARTED',\n  AUTH = 'AUTH',\n  MENU_SYNC = 'MENU_SYNC',\n  ORDER_CREATION = 'ORDER_CREATION',\n  ORDER_STATUS = 'ORDER_STATUS',\n  GO_LIVE = 'GO_LIVE',\n  COMPLETED = 'COMPLETED'\n}\n```\n\n### Constants\n\n#### API URLs\n```typescript\nconst API_BASE_URL = 'https://api.grubtech.io';\nconst DOCS_BASE_URL = 'https://docs.grubtech.io';\n```\n\n#### Error Codes\n```typescript\nconst ERROR_CODES = {\n  CACHE_READ_FAILED: 'CACHE_READ_FAILED',\n  CACHE_WRITE_FAILED: 'CACHE_WRITE_FAILED',\n  SCRAPE_FAILED: 'SCRAPE_FAILED',\n  PARSE_FAILED: 'PARSE_FAILED',\n  NETWORK_ERROR: 'NETWORK_ERROR',\n  RATE_LIMIT_EXCEEDED: 'RATE_LIMIT_EXCEEDED',\n} as const;\n\ntype ErrorCode = typeof ERROR_CODES[keyof typeof ERROR_CODES];\n```\n\n## Usage\n\n```typescript\nimport {\n  type CachedDocument,\n  type DocumentChunk,\n  type IntegrationContext,\n  IntegrationPhase,\n  API_BASE_URL,\n  DOCS_BASE_URL,\n  ERROR_CODES,\n  type ErrorCode\n} from '@grubtech/agent-core';\n\n// Use types\nconst doc: CachedDocument = {\n  url: `${DOCS_BASE_URL}/docs/getting-started`,\n  html: '<html>...</html>',\n  chunks: [],\n  cachedAt: new Date(),\n  expiresAt: new Date(Date.now() + 24 * 60 * 60 * 1000)\n};\n\n// Use enums\nconst context: IntegrationContext = {\n  sessionId: 'abc123',\n  integrationPhase: IntegrationPhase.AUTH,\n  lastQuery: 'How do I authenticate?',\n  timestamp: new Date()\n};\n\n// Use error codes\nthrow new Error(ERROR_CODES.CACHE_READ_FAILED);\n```\n\n## Development\n\nBuild:\n```bash\nnpm run build\n```\n\nThe package compiles to `dist/` with TypeScript declaration files.\n\n## License\n\nMIT © Grubtech\n","readmeFilename":"README.md"}