{"_id":"@172ai/a2a-client","_rev":"2-0835f7813bc1c6dcd824ba905f7ddfa1","name":"@172ai/a2a-client","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@172ai/a2a-client","version":"1.0.0","keywords":["172ai","a2a","agent-to-agent","container","api-client","sdlc"],"author":{"name":"172.ai"},"license":"MIT","_id":"@172ai/a2a-client@1.0.0","maintainers":[{"name":"genel","email":"leybzon@gmail.com"}],"homepage":"https://github.com/172ai/a2a-client-js#readme","bugs":{"url":"https://github.com/172ai/a2a-client-js/issues"},"dist":{"shasum":"dd7a503f48030770aee23b759a8de845ce017d37","tarball":"https://registry.npmjs.org/@172ai/a2a-client/-/a2a-client-1.0.0.tgz","fileCount":3,"integrity":"sha512-slcTOM3HXGI7cBGo4I5MCfNNprAB4FycjzjN4VjG8WXshlWuXn88R/BNcaf4xy7GE8nxG1vV1rE5LIE+VKWHOg==","signatures":[{"sig":"MEUCIH/jeoSonMf9rZPGoGyHV9yS3u2ZsTPThnoiPVKDuK7XAiEAiLMkCg3QCZotC/a4/RX2IprW9tIvVMBg304fwJm/x3g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14190},"main":"index.js","types":"index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"4881a3d8939661fe9179c41266ced7bc24f0b232","scripts":{"test":"jest"},"_npmUser":{"name":"genel","email":"leybzon@gmail.com"},"repository":{"url":"git+https://github.com/172ai/a2a-client-js.git","type":"git"},"_npmVersion":"10.9.1","description":"Official Node.js client library for 172.ai A2A (Agent-to-Agent) communication","directories":{},"_nodeVersion":"18.18.2","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0"},"_npmOperationalInternal":{"tmp":"tmp/a2a-client_1.0.0_1763251023382_0.15368960506752827","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@172ai/a2a-client","version":"1.1.0","description":"Official Node.js client library for 172.ai A2A (Agent-to-Agent) communication","main":"index.js","types":"index.d.ts","scripts":{"test":"jest"},"keywords":["172ai","a2a","agent-to-agent","container","api-client","sdlc"],"author":{"name":"172.ai"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/172ai/a2a-client-js.git"},"dependencies":{"axios":"^1.6.0"},"devDependencies":{"jest":"^29.0.0"},"engines":{"node":">=16.0.0"},"_id":"@172ai/a2a-client@1.1.0","gitHead":"7bad0354022c73c4c69bde92b89cc291fcd8d156","bugs":{"url":"https://github.com/172ai/a2a-client-js/issues"},"homepage":"https://github.com/172ai/a2a-client-js#readme","_nodeVersion":"18.18.2","_npmVersion":"10.9.1","dist":{"integrity":"sha512-KtWM/ZucSeQeNCoIUbLe1QK0l4ATApbo6eETGRxt7/5n7J9ZfeQd28kyWnbrlP7k3lKUnh0mz1h3+5yqpo5dtA==","shasum":"30a1e1342c9f30dc15a790733c564a2e53b33061","tarball":"https://registry.npmjs.org/@172ai/a2a-client/-/a2a-client-1.1.0.tgz","fileCount":3,"unpackedSize":18906,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE4r4J6oB5PkHdOCNKA6VTncqlQAcOSg56MsLeeHaiyxAiBIoiIx+7e6Nh3ftk6i7McbUCF4q7l5LLtPzB+QyWlBfA=="}]},"_npmUser":{"name":"genel","email":"leybzon@gmail.com"},"directories":{},"maintainers":[{"name":"genel","email":"leybzon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/a2a-client_1.1.0_1763262780496_0.5905933249057802"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-15T23:57:03.291Z","modified":"2025-11-16T03:13:00.871Z","1.0.0":"2025-11-15T23:57:03.598Z","1.1.0":"2025-11-16T03:13:00.681Z"},"bugs":{"url":"https://github.com/172ai/a2a-client-js/issues"},"author":{"name":"172.ai"},"license":"MIT","homepage":"https://github.com/172ai/a2a-client-js#readme","keywords":["172ai","a2a","agent-to-agent","container","api-client","sdlc"],"repository":{"type":"git","url":"git+https://github.com/172ai/a2a-client-js.git"},"description":"Official Node.js client library for 172.ai A2A (Agent-to-Agent) communication","maintainers":[{"name":"genel","email":"leybzon@gmail.com"}],"readme":"# @172ai/a2a-client\n\nOfficial Node.js client library for 172.ai A2A (Agent-to-Agent) communication system.\n\n## Installation\n\n```bash\nnpm install @172ai/a2a-client\n```\n\n## Quick Start\n\n```javascript\nconst { A2AClient } = require('@172ai/a2a-client');\n\nconst client = new A2AClient({\n  apiKey: 'sk_your_api_key',\n  agentId: 'my-agent-v1',\n  agentType: 'code-analysis'\n});\n\n// Create container\nconst result = await client.createContainer({\n  name: 'code-analysis-' + Date.now(),\n  dockerfile: 'FROM node:18\\nCOPY . /app\\nRUN npm audit',\n  tags: ['code-analysis', 'automated']\n});\n\n// Build container\nconst buildResult = await client.buildContainer(result.id);\nconsole.log('Build initiated:', buildResult.buildLogId);\n```\n\n## Configuration\n\n### Required Parameters\n\n- `apiKey`: API key with A2A scope from 172.ai dashboard\n- `agentId`: Unique identifier for your agent instance\n- `agentType`: One of:\n  - `code-analysis` - Code quality and security analysis\n  - `testing` - Automated testing and QA\n  - `deployment` - CI/CD and orchestration\n  - `monitoring` - Observability and metrics\n  - `security` - Vulnerability scanning\n  - `documentation` - Technical documentation\n  - `integration` - API management\n  - `generic` - General purpose\n\n### Optional Parameters\n\n- `baseUrl`: API base URL (default: 'https://api.172.ai')\n- `timeout`: Request timeout in ms (default: 30000)\n\n## API Methods\n\n### Authentication\n\n```javascript\n// Test authentication\nawait client.authenticate();\n\n// Get platform capabilities\nconst capabilities = await client.getCapabilities();\n\n// Health check\nconst health = await client.healthCheck();\n```\n\n### Container Operations\n\n```javascript\n// List containers\nconst containers = await client.listContainers({ limit: 10 });\n\n// Get container\nconst container = await client.getContainer(containerId);\n\n// Create container\nconst newContainer = await client.createContainer({\n  name: 'my-container',\n  dockerfile: 'FROM alpine:latest',\n  tags: ['test'],\n  isPrivate: true\n});\n\n// Build container\nconst build = await client.buildContainer(containerId);\n\n// Update container\nawait client.updateContainer(containerId, { name: 'new-name' });\n\n// Delete container\nawait client.deleteContainer(containerId);\n```\n\n### Build Operations\n\n```javascript\n// Get build status\nconst status = await client.getBuildStatus(containerId, buildLogId);\n\n// Get build logs\nconst logs = await client.getBuildLogs(containerId, buildLogId);\n\n// List builds\nconst builds = await client.listBuilds(containerId);\n```\n\n### Container Execution\n\n```javascript\n// Get cost estimate\nconst estimate = await client.getExecutionCostEstimate(containerId, 1);\n\n// Start execution\nconst execution = await client.startExecution(containerId, { durationDays: 1 });\n\n// Get execution status\nconst status = await client.getExecutionStatus(containerId);\n\n// Stop execution\nawait client.stopExecution(containerId);\n\n// Get execution history\nconst history = await client.getExecutionHistory(containerId);\n\n// List all executions\nconst executions = await client.listExecutions();\n```\n\n### File Operations\n\n```javascript\n// Upload file\nawait client.uploadFile(\n  containerId,\n  'config.yml',\n  Buffer.from('config: value').toString('base64'),\n  'application/x-yaml'\n);\n\n// List files\nconst files = await client.listFiles(containerId, '/app');\n\n// Get file content\nconst content = await client.getFile(containerId, 'config.yml');\n```\n\n### Container Fix Operations (AI-Powered)\n\n```javascript\n// Analyze container build failures\nconst analysis = await client.analyzeContainerFailure(containerId);\nconsole.log('Issues found:', analysis.issues);\n\n// Execute full fix workflow (analyze + apply + rebuild)\nconst fixResult = await client.executeContainerFix(containerId, {\n  autoApply: true,  // Auto-apply AI-generated fixes\n  analyzeOnly: false\n});\nconsole.log('Fix applied:', fixResult.success);\n\n// Apply a specific fix\nawait client.applyContainerFix(containerId, fixId);\n\n// Get fix history\nconst history = await client.getContainerFixHistory(containerId);\n\n// Get specific fix attempt details\nconst attempt = await client.getContainerFixAttempt(containerId, fixId);\n```\n\n### Container Improvements Operations (AI-Powered)\n\n```javascript\n// Get AI improvement suggestions\nconst suggestions = await client.suggestContainerImprovements(containerId);\nconsole.log('Suggested improvements:', suggestions);\n\n// Apply an improvement\nconst applyResult = await client.applyContainerImprovement(\n  containerId,\n  modificationId\n);\n\n// Check improvement status\nconst status = await client.getImprovementStatus(containerId, modificationId);\n\n// List all applied improvements\nconst improvements = await client.listAppliedImprovements(containerId);\n```\n\n## Examples\n\nSee the [examples directory](./examples) for complete SDLC workflow examples.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}