{"_id":"@agenite/pretty-logger","_rev":"5-ba0467966a5b8cab7efef0459e8c82ff","name":"@agenite/pretty-logger","dist-tags":{"alpha":"0.1.0-alpha.0","latest":"0.2.0"},"versions":{"0.1.0-alpha.0":{"name":"@agenite/pretty-logger","version":"0.1.0-alpha.0","keywords":["ai","generative-ai","aws","bedrock","claude","titan","llm","provider","typescript","function-calling","streaming","agenite","pretty-logger"],"license":"MIT","_id":"@agenite/pretty-logger@0.1.0-alpha.0","maintainers":[{"name":"subeshb1","email":"subeshb1@gmail.com"}],"homepage":"https://github.com/subeshb1/agenite/tree/main/packages/middlewares/pretty-logger#readme","bugs":{"url":"https://github.com/subeshb1/agenite/issues"},"dist":{"shasum":"9380c9d9cb69ad212e724f676088a9d0ad73dd43","tarball":"https://registry.npmjs.org/@agenite/pretty-logger/-/pretty-logger-0.1.0-alpha.0.tgz","fileCount":10,"integrity":"sha512-XW5bonInra2cW/LxkAmSTN8Ky2raQAFNn8mntp2S0RpVdA9ZAoov7uDqYJpbYtZwJF1cKEyG93MEyJvwVmvyKw==","signatures":[{"sig":"MEUCIExWlgrLCI4qIkLVG2lEiFF8z9W/5C2N3dRwkP0vTvg0AiEA2UJJfbOz60vTFqxPy1ZG//80gsWb7bUAxBtDSHXV4OY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":513467},"main":"./dist/index.js","type":"module","_from":"file:agenite-pretty-logger-0.1.0-alpha.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"private":false,"scripts":{"dev":"tsup --watch","lint":"eslint . --max-warnings 0","build":"tsup","check-types":"tsc --noEmit"},"_npmUser":{"name":"subeshb1","email":"subeshb1@gmail.com"},"_resolved":"/private/var/folders/6t/00njv37d2bn4hm5pmsq993zr0000gp/T/1fff5453101ea42b40d8ace9e5b43bc6/agenite-pretty-logger-0.1.0-alpha.0.tgz","_integrity":"sha512-XW5bonInra2cW/LxkAmSTN8Ky2raQAFNn8mntp2S0RpVdA9ZAoov7uDqYJpbYtZwJF1cKEyG93MEyJvwVmvyKw==","repository":{"url":"git+https://github.com/subeshb1/agenite.git","type":"git","directory":"packages/middlewares/pretty-logger"},"_npmVersion":"11.1.0","description":"A middleware to pretty print the logs for Agenite","directories":{},"_nodeVersion":"22.13.0","dependencies":{"chalk":"^4.1.2","@agenite/agent":"0.4.0-alpha.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","cli-table3":"^0.6.5","strip-ansi":"^7.1.0","typescript":"^5.8.2","@types/node":"^20.17.24","@repo/tsup-config":"0.0.3","@repo/eslint-config":"0.1.0-alpha.0","@repo/typescript-config":"0.1.0-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-logger_0.1.0-alpha.0_1742659698519_0.31897136020214734","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@agenite/pretty-logger","version":"0.1.0","keywords":["ai","generative-ai","aws","bedrock","claude","titan","llm","provider","typescript","function-calling","streaming","agenite","pretty-logger"],"license":"MIT","_id":"@agenite/pretty-logger@0.1.0","maintainers":[{"name":"subeshb1","email":"subeshb1@gmail.com"}],"homepage":"https://github.com/subeshb1/agenite/tree/main/packages/middlewares/pretty-logger#readme","bugs":{"url":"https://github.com/subeshb1/agenite/issues"},"dist":{"shasum":"3e53c2d4f28bf6ee35999eb4c74597cd3dd41680","tarball":"https://registry.npmjs.org/@agenite/pretty-logger/-/pretty-logger-0.1.0.tgz","fileCount":10,"integrity":"sha512-PN7BHGi2Co31ld9Ihq1DuJ2qVMc2j0xa6+hH4v2SwkNS50XAqgoXxbOrV4zjHql+9SAx5qNm5aXVkWw2I0cJmw==","signatures":[{"sig":"MEUCIFTJx388CX/3xxLTiqhfv5M2EIQlOtEGevc0bR1PWbFYAiEA7pRV+zAEAUUvqKiKdWvfHscndhB71h+uNHVkFqaMTe0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":513626},"main":"./dist/index.js","type":"module","_from":"file:agenite-pretty-logger-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"private":false,"scripts":{"dev":"tsup --watch","lint":"eslint . --max-warnings 0","build":"tsup","check-types":"tsc --noEmit"},"_npmUser":{"name":"subeshb1","email":"subeshb1@gmail.com"},"_resolved":"/private/var/folders/6t/00njv37d2bn4hm5pmsq993zr0000gp/T/80a03b488ec7718bb33caca4f37828aa/agenite-pretty-logger-0.1.0.tgz","_integrity":"sha512-PN7BHGi2Co31ld9Ihq1DuJ2qVMc2j0xa6+hH4v2SwkNS50XAqgoXxbOrV4zjHql+9SAx5qNm5aXVkWw2I0cJmw==","repository":{"url":"git+https://github.com/subeshb1/agenite.git","type":"git","directory":"packages/middlewares/pretty-logger"},"_npmVersion":"11.1.0","description":"A middleware to pretty print the logs for Agenite","directories":{},"_nodeVersion":"22.13.0","dependencies":{"chalk":"^4.1.2","@agenite/agent":"0.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","cli-table3":"^0.6.5","strip-ansi":"^7.1.0","typescript":"^5.8.2","@types/node":"^20.17.24","@repo/tsup-config":"0.0.3","@repo/eslint-config":"0.1.0","@repo/typescript-config":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-logger_0.1.0_1742660019883_0.18856703008115283","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agenite/pretty-logger","version":"0.1.1","keywords":["ai","generative-ai","aws","bedrock","claude","titan","llm","provider","typescript","function-calling","streaming","agenite","pretty-logger"],"license":"MIT","_id":"@agenite/pretty-logger@0.1.1","maintainers":[{"name":"subeshb1","email":"subeshb1@gmail.com"}],"homepage":"https://github.com/subeshb1/agenite/tree/main/packages/middlewares/pretty-logger#readme","bugs":{"url":"https://github.com/subeshb1/agenite/issues"},"dist":{"shasum":"3211c361a20f1d6c0bc4a690985c35ae8e2078fd","tarball":"https://registry.npmjs.org/@agenite/pretty-logger/-/pretty-logger-0.1.1.tgz","fileCount":10,"integrity":"sha512-5WAucKVvEr5T9LoWTd0j2Thp1l9D1c5NHH8p70El5ljZwXy+IG0506aQOYsdGiRXzAhnQL7PtRmZmj8JznFChA==","signatures":[{"sig":"MEYCIQDXFUuTRkMFdDNB7Y3CQhVquDtKdwFGz1uVB9JQ0MooBwIhAJqfODqZ/UogpVAZMC5/cfVesDQJBME6CYnBUklMBvat","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":513714},"main":"./dist/index.js","type":"module","_from":"file:agenite-pretty-logger-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"private":false,"scripts":{"dev":"tsup --watch","lint":"eslint . --max-warnings 0","build":"tsup","check-types":"tsc --noEmit"},"_npmUser":{"name":"subeshb1","email":"subeshb1@gmail.com"},"_resolved":"/private/var/folders/6t/00njv37d2bn4hm5pmsq993zr0000gp/T/862240bf396d48323d09288463f0b507/agenite-pretty-logger-0.1.1.tgz","_integrity":"sha512-5WAucKVvEr5T9LoWTd0j2Thp1l9D1c5NHH8p70El5ljZwXy+IG0506aQOYsdGiRXzAhnQL7PtRmZmj8JznFChA==","repository":{"url":"git+https://github.com/subeshb1/agenite.git","type":"git","directory":"packages/middlewares/pretty-logger"},"_npmVersion":"11.1.0","description":"A middleware to pretty print the logs for Agenite","directories":{},"_nodeVersion":"22.13.0","dependencies":{"chalk":"^4.1.2","@agenite/agent":"0.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","cli-table3":"^0.6.5","strip-ansi":"^7.1.0","typescript":"^5.8.2","@types/node":"^20.17.25","@repo/tsup-config":"0.0.3","@repo/eslint-config":"0.1.0","@repo/typescript-config":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-logger_0.1.1_1742744097792_0.8905388223986761","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@agenite/pretty-logger","version":"0.1.2","keywords":["ai","generative-ai","aws","bedrock","claude","titan","llm","provider","typescript","function-calling","streaming","agenite","pretty-logger"],"license":"MIT","_id":"@agenite/pretty-logger@0.1.2","maintainers":[{"name":"subeshb1","email":"subeshb1@gmail.com"}],"homepage":"https://github.com/subeshb1/agenite/tree/main/packages/middlewares/pretty-logger#readme","bugs":{"url":"https://github.com/subeshb1/agenite/issues"},"dist":{"shasum":"f2d50dac1fce96f064384317105a2b385467b93c","tarball":"https://registry.npmjs.org/@agenite/pretty-logger/-/pretty-logger-0.1.2.tgz","fileCount":10,"integrity":"sha512-kP/3yUmdL+s+xfR/AUoVuCgP4+8d3LkGjoXjqeRC4uoIuhxVWrw04nxlaM602rxYE3yQmrYD9zYQ98uGTLhOJw==","signatures":[{"sig":"MEUCIQCZqwOH4NKaOdxOXpjfI0RicGIPxT6XMMtLb+PZFmeOxAIgE5ZP8HH2xc3zKT0O53jS5BwiSGqQ0Z4UrCULOdJDHlQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":513767},"main":"./dist/index.js","type":"module","_from":"file:agenite-pretty-logger-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"private":false,"scripts":{"dev":"tsup --watch","lint":"eslint . --max-warnings 0","build":"tsup","check-types":"tsc --noEmit"},"_npmUser":{"name":"subeshb1","email":"subeshb1@gmail.com"},"_resolved":"/private/var/folders/6t/00njv37d2bn4hm5pmsq993zr0000gp/T/2b6025551ad68ec5824bbd3e34efbb66/agenite-pretty-logger-0.1.2.tgz","_integrity":"sha512-kP/3yUmdL+s+xfR/AUoVuCgP4+8d3LkGjoXjqeRC4uoIuhxVWrw04nxlaM602rxYE3yQmrYD9zYQ98uGTLhOJw==","repository":{"url":"git+https://github.com/subeshb1/agenite.git","type":"git","directory":"packages/middlewares/pretty-logger"},"_npmVersion":"11.1.0","description":"A middleware to pretty print the logs for Agenite","directories":{},"_nodeVersion":"22.13.0","dependencies":{"chalk":"^4.1.2","@agenite/agent":"0.4.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","cli-table3":"^0.6.5","strip-ansi":"^7.1.0","typescript":"^5.8.2","@types/node":"^20.17.25","@repo/tsup-config":"0.0.3","@repo/eslint-config":"0.1.0","@repo/typescript-config":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-logger_0.1.2_1743267776932_0.4898680506282327","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agenite/pretty-logger","version":"0.2.0","description":"A middleware to pretty print the logs for Agenite","private":false,"type":"module","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"dependencies":{"chalk":"^4.1.2","@agenite/agent":"0.5.0"},"devDependencies":{"@types/node":"^20.17.30","cli-table3":"^0.6.5","strip-ansi":"^7.1.0","tsup":"^8.4.0","typescript":"^5.8.3","@repo/eslint-config":"0.2.0","@repo/typescript-config":"0.1.0","@repo/tsup-config":"0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"keywords":["ai","generative-ai","aws","bedrock","claude","titan","llm","provider","typescript","function-calling","streaming","agenite","pretty-logger"],"repository":{"type":"git","url":"git+https://github.com/subeshb1/agenite.git","directory":"packages/middlewares/pretty-logger"},"homepage":"https://github.com/subeshb1/agenite/tree/main/packages/middlewares/pretty-logger#readme","bugs":{"url":"https://github.com/subeshb1/agenite/issues"},"license":"MIT","scripts":{"lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit","build":"tsup","dev":"tsup --watch"},"_id":"@agenite/pretty-logger@0.2.0","_integrity":"sha512-mxuXM9M3WwY8NV9q5paudu8xPkjV44Db/YLLXJ3QAdIIxUD9ddtEV0BeC3IgFRSjB9u8rKv5qXkJa4Gcn37muQ==","_resolved":"/private/var/folders/6t/00njv37d2bn4hm5pmsq993zr0000gp/T/f26c3628a4cd617048cb21ec9370ae27/agenite-pretty-logger-0.2.0.tgz","_from":"file:agenite-pretty-logger-0.2.0.tgz","_nodeVersion":"22.13.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-mxuXM9M3WwY8NV9q5paudu8xPkjV44Db/YLLXJ3QAdIIxUD9ddtEV0BeC3IgFRSjB9u8rKv5qXkJa4Gcn37muQ==","shasum":"884c17fb9ae6897fc9793cfea434132de4096942","tarball":"https://registry.npmjs.org/@agenite/pretty-logger/-/pretty-logger-0.2.0.tgz","fileCount":10,"unpackedSize":513948,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCANQ4ltPp7hhTQ/sBhDFKiodnCunG1IIKIOgdzUS1WowIgflfaq3N5Geh1UkD5bXv68xIVmSRzQJK2BZ1b0ZTsGFc="}]},"_npmUser":{"name":"subeshb1","email":"subeshb1@gmail.com"},"directories":{},"maintainers":[{"name":"subeshb1","email":"subeshb1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pretty-logger_0.2.0_1744351902054_0.9244011533889409"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-22T16:08:18.394Z","modified":"2025-04-11T06:11:42.466Z","0.1.0-alpha.0":"2025-03-22T16:08:18.706Z","0.1.0":"2025-03-22T16:13:40.079Z","0.1.1":"2025-03-23T15:34:58.030Z","0.1.2":"2025-03-29T17:02:57.169Z","0.2.0":"2025-04-11T06:11:42.290Z"},"bugs":{"url":"https://github.com/subeshb1/agenite/issues"},"license":"MIT","homepage":"https://github.com/subeshb1/agenite/tree/main/packages/middlewares/pretty-logger#readme","keywords":["ai","generative-ai","aws","bedrock","claude","titan","llm","provider","typescript","function-calling","streaming","agenite","pretty-logger"],"repository":{"type":"git","url":"git+https://github.com/subeshb1/agenite.git","directory":"packages/middlewares/pretty-logger"},"description":"A middleware to pretty print the logs for Agenite","maintainers":[{"name":"subeshb1","email":"subeshb1@gmail.com"}],"readme":"# @agenite/bedrock\n\nAWS Bedrock provider for Agenite, enabling seamless integration with Amazon's foundation models through the Bedrock runtime.\n\n## Features\n\n- 🚀 Easy Integration - Simple setup with AWS Bedrock\n- 🔄 Streaming Support - Real-time streaming responses\n- 🛠️ Tool Integration - Native support for function calling\n- 🎯 Model Selection - Support for multiple Bedrock models\n- 🔐 AWS Authentication - Automatic credential management\n- 🌐 Region Support - Configurable AWS regions\n\n## Installation\n\n```bash\nnpm install @agenite/bedrock\n```\n\n## Quick Start\n\n```typescript\nimport { BedrockProvider } from '@agenite/bedrock';\n\n// Initialize the provider\nconst provider = new BedrockProvider({\n  model: 'anthropic.claude-3-5-haiku-20241022-v1:0',\n  region: 'us-west-2',\n});\n\n// Generate a simple response\nconst result = await provider.generate(\n  'What are the main features of Llama 2?'\n);\nconsole.log(result);\n\n// Use streaming for real-time responses\nconst generator = provider.stream('Tell me about AWS Bedrock.');\nfor await (const chunk of generator) {\n  if (chunk.type === 'text') {\n    process.stdout.write(chunk.text);\n  }\n}\n```\n\n## Configuration\n\n### Provider Options\n\n```typescript\ninterface BedrockProviderOptions {\n  model: string; // Bedrock model ID\n  region: string; // AWS region\n  temperature?: number; // Temperature for response generation\n  maxTokens?: number; // Maximum tokens in response\n  topP?: number; // Top P sampling parameter\n}\n```\n\n### Available Models\n\n- Anthropic Claude Models:\n  - `anthropic.claude-3-5-haiku-20241022-v1:0`\n  - `anthropic.claude-3-sonnet-20240229-v1:0`\n  - `anthropic.claude-instant-v1`\n- Amazon Titan Models:\n  - `amazon.titan-text-express-v1`\n  - `amazon.titan-text-lite-v1`\n\n## Advanced Usage\n\n### Usage with Claude 3.7 thinking\n\n```typescript\nconst provider = new BedrockProvider({\n  model: `us.anthropic.claude-3-7-sonnet-20250219-v1:0`,\n  region: 'us-east-2',\n  converseCommandConfig: {\n    additionalModelRequestFields: {\n      reasoning_config: {\n        type: 'enabled',\n        budget_tokens: 1024,\n      },\n    },\n    inferenceConfig: {\n      temperature: 1,\n    },\n  },\n});\n```\n\n### Tool Integration\n\n```typescript\nimport { BedrockProvider } from '@agenite/bedrock';\nimport type { ToolDefinition } from '@agenite/llm';\n\n// Define a calculator tool\nconst calculatorTool: ToolDefinition = {\n  name: 'calculator',\n  description: 'Perform basic arithmetic operations',\n  inputSchema: {\n    type: 'object',\n    properties: {\n      operation: {\n        type: 'string',\n        enum: ['add', 'subtract', 'multiply', 'divide'],\n      },\n      a: { type: 'number' },\n      b: { type: 'number' },\n    },\n    required: ['operation', 'a', 'b'],\n  },\n};\n\n// Initialize provider with tool support\nconst provider = new BedrockProvider({\n  model: 'anthropic.claude-3-5-haiku-20241022-v1:0',\n  region: 'us-west-2',\n});\n\n// Use tool in conversation\nconst messages = [\n  {\n    role: 'user',\n    content: [{ type: 'text', text: 'What is 123 multiplied by 456?' }],\n  },\n];\n\nconst generator = provider.iterate(messages, {\n  tools: [calculatorTool],\n  stream: true,\n  systemPrompt:\n    'You are a helpful AI assistant with access to a calculator tool.',\n});\n\n// Process streaming response with tool usage\nfor await (const chunk of generator) {\n  if (chunk.type === 'text') {\n    process.stdout.write(chunk.text);\n  } else if (chunk.type === 'toolUse') {\n    console.log('Tool Use:', chunk);\n  }\n}\n```\n\n### Conversation Management\n\n```typescript\n// Maintain conversation history\nlet messages = [];\nconst result = await provider.generate(messages, {\n  systemPrompt: 'You are a helpful AI assistant.',\n});\nmessages.push(\n  { role: 'user', content: [{ type: 'text', text: 'Hello!' }] },\n  result\n);\n```\n\n## API Reference\n\n### BedrockProvider Class\n\n```typescript\nclass BedrockProvider implements LLMProvider {\n  constructor(options: BedrockProviderOptions);\n\n  generate(\n    messages: string | BaseMessage[],\n    options?: GenerateOptions\n  ): Promise<BaseMessage>;\n\n  stream(\n    messages: string | BaseMessage[],\n    options?: StreamOptions\n  ): AsyncGenerator<StreamChunk>;\n\n  iterate(\n    messages: string | BaseMessage[],\n    options?: StreamOptions\n  ): AsyncGenerator<StreamChunk>;\n}\n```\n\n### Message Types\n\n```typescript\ninterface BaseMessage {\n  role: 'user' | 'assistant' | 'system';\n  content: ContentBlock[];\n}\n\ntype ContentBlock = TextBlock | ToolUseBlock | ToolResultBlock;\n```\n\n## Examples\n\nCheck out the [examples](./examples) directory for more:\n\n- `basic-chat.ts` - Simple chat interaction\n- `tool-usage.ts` - Advanced tool integration example\n\n## AWS Setup\n\n1. Install AWS CLI and configure credentials:\n\n```bash\naws configure\n```\n\n2. Ensure your AWS account has access to Bedrock and the required models.\n\n3. Set up IAM permissions for Bedrock access:\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"bedrock:InvokeModel\",\n        \"bedrock:InvokeModelWithResponseStream\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}