{"_id":"@agentic-kit/bradie","_rev":"4-e7d1b88ad036dd6defdd3c07f2eb7441","name":"@agentic-kit/bradie","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.2":{"name":"@agentic-kit/bradie","version":"0.0.2","keywords":[],"author":{"name":"Dan Lynch","email":"pyramation@gmail.com"},"license":"SEE LICENSE IN LICENSE","_id":"@agentic-kit/bradie@0.0.2","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/hyperweb-io/agentic-kit","bugs":{"url":"https://github.com/hyperweb-io/agentic-kit/issues"},"dist":{"shasum":"a58a9032e565dac6b7529f4d55f6393c8d892f4c","tarball":"https://registry.npmjs.org/@agentic-kit/bradie/-/bradie-0.0.2.tgz","fileCount":6,"integrity":"sha512-l5mGx/5Q4yOlkjehLzJauPO38ooWOa7MSs1nJv0KkDz7Ltl1/aistVzazusEnPYClcXI7A1yirY8FPEv69zGvg==","signatures":[{"sig":"MEQCIHJoL7c161tKMbalLAjrHh/3WtrMupV3+9rAksD0Pq1lAiAxhUm+Y2Az7WCDgVDE+bgVespwmspU050/u0qBVmjIQw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14506},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"93ed791457a8bc671058efd517f7978e41563b8a","scripts":{"copy":"copyfiles -f ../../LICENSE README.md package.json dist","lint":"eslint . --fix","test":"jest","build":"npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy","clean":"rimraf dist/**","prepare":"npm run build","build:dev":"npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy","test:watch":"jest --watch"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"git+https://github.com/hyperweb-io/agentic-kit.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v22.13.1+arm64 (darwin)","description":"Bradie","directories":{},"_nodeVersion":"22.13.1","dependencies":{"cross-fetch":"^4.1.0"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bradie_0.0.2_1749431812810_0.819389961162021","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@agentic-kit/bradie","version":"0.1.0","keywords":[],"author":{"name":"Dan Lynch","email":"pyramation@gmail.com"},"license":"SEE LICENSE IN LICENSE","_id":"@agentic-kit/bradie@0.1.0","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/hyperweb-io/agentic-kit","bugs":{"url":"https://github.com/hyperweb-io/agentic-kit/issues"},"dist":{"shasum":"bef39050eb6c32291ddff8eaefb5f11be59ca912","tarball":"https://registry.npmjs.org/@agentic-kit/bradie/-/bradie-0.1.0.tgz","fileCount":6,"integrity":"sha512-RUc6Lj2J5kcH45xdIdAmPtMLH4bQA1amxxFjhIpbp4wrCItdAALpKEmP50m5rSBzrbVcfKEujjLMJ2ornQcIZA==","signatures":[{"sig":"MEQCIGJJ1ZHf6gwzRxzYIjqeswBKzbongv9fO2Oio1/VG0oDAiBzRtmoKN6LoqlRIXfpqVgzrh+PqXWIL14pxM0HXYnrXg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14506},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"429d3cbe616b763f2e1e8b2a35738b3f9a600c57","scripts":{"copy":"copyfiles -f ../../LICENSE README.md package.json dist","lint":"eslint . --fix","test":"jest","build":"npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy","clean":"rimraf dist/**","prepare":"npm run build","build:dev":"npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy","test:watch":"jest --watch"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"git+https://github.com/hyperweb-io/agentic-kit.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v22.13.1+arm64 (darwin)","description":"Bradie","directories":{},"_nodeVersion":"22.13.1","dependencies":{"cross-fetch":"^4.1.0"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bradie_0.1.0_1749433465934_0.2375708981936373","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agentic-kit/bradie","version":"0.1.1","keywords":[],"author":{"name":"Dan Lynch","email":"pyramation@gmail.com"},"license":"SEE LICENSE IN LICENSE","_id":"@agentic-kit/bradie@0.1.1","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/hyperweb-io/agentic-kit","bugs":{"url":"https://github.com/hyperweb-io/agentic-kit/issues"},"dist":{"shasum":"394e485b21fae64502317c7e117c256f1999c854","tarball":"https://registry.npmjs.org/@agentic-kit/bradie/-/bradie-0.1.1.tgz","fileCount":6,"integrity":"sha512-sVwfqwudoJ3F+ZZpucvSym1D5hffT5X0o32pSHoOXDWDDCS/F7iP3nNe+wV42BL1p/G59HfwAMu1ZGCtCoSLtA==","signatures":[{"sig":"MEYCIQCx0MP+InWrFi6/uLXQI4yKZDtJph17dK/kC3NIWQ4ihQIhALLx6L0GscOpOkndsvFzs+hyoGZobLcO70J+nwIDBLYJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16784},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"0204aa87ae43833af29965684146ff22ebf77564","scripts":{"copy":"copyfiles -f ../../LICENSE README.md package.json dist","lint":"eslint . --fix","test":"jest","build":"npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy","clean":"rimraf dist/**","prepare":"npm run build","build:dev":"npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy","subscribe":"ts-node scripts/subscribe.ts","test:watch":"jest --watch"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"git+https://github.com/hyperweb-io/agentic-kit.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v22.13.1+arm64 (darwin)","description":"Bradie","directories":{},"_nodeVersion":"22.13.1","dependencies":{"cross-fetch":"^4.1.0"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bradie_0.1.1_1749437342823_0.2691821231218374","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@agentic-kit/bradie","version":"0.1.2","author":{"name":"Dan Lynch","email":"pyramation@gmail.com"},"description":"Bradie","main":"index.js","module":"esm/index.js","types":"index.d.ts","homepage":"https://github.com/hyperweb-io/agentic-kit","license":"SEE LICENSE IN LICENSE","publishConfig":{"access":"public","directory":"dist"},"repository":{"type":"git","url":"git+https://github.com/hyperweb-io/agentic-kit.git"},"bugs":{"url":"https://github.com/hyperweb-io/agentic-kit/issues"},"scripts":{"copy":"copyfiles -f ../../LICENSE README.md package.json dist","clean":"rimraf dist/**","prepare":"npm run build","build":"npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy","build:dev":"npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy","lint":"eslint . --fix","test":"jest","test:watch":"jest --watch","init":"ts-node scripts/init.ts","chat":"ts-node scripts/chat.ts","list-projects":"ts-node scripts/list-projects.ts","get-project":"ts-node scripts/get-project.ts","project-summary":"ts-node scripts/project-summary.ts","health":"ts-node scripts/health.ts","instance-info":"ts-node scripts/instance-info.ts","subscribe":"ts-node scripts/subscribe.ts"},"dependencies":{"cross-fetch":"^4.1.0"},"keywords":[],"gitHead":"957a378bb3b08f3be63cce7b72d741f1f044ae95","_id":"@agentic-kit/bradie@0.1.2","_nodeVersion":"22.13.1","_npmVersion":"lerna/4.0.0/node@v22.13.1+arm64 (darwin)","dist":{"integrity":"sha512-t9HkaRPd9T5m537YNctjhGIqRjM+IfSb1kuv5BOp5UEKQjcnbJrX/WNQhI5n6dbgyFqJDWL8AjEOXtAHRPWBGw==","shasum":"0ba7068d6dd0a38a5c861e7fee9bde5a78e2f3b0","tarball":"https://registry.npmjs.org/@agentic-kit/bradie/-/bradie-0.1.2.tgz","fileCount":6,"unpackedSize":40549,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIB8nQYeextps91UBW2CASeW0rF5Gk8fuP3M7+m6Iha8sAiAzLdEUTra0IAD9x32g0FBvMfcxS/sBhIStJ3NM9OJLsA=="}]},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"directories":{},"maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bradie_0.1.2_1749445875816_0.7403259028207894"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-09T01:16:52.723Z","modified":"2025-06-09T05:11:16.221Z","0.0.2":"2025-06-09T01:16:53.018Z","0.1.0":"2025-06-09T01:44:26.116Z","0.1.1":"2025-06-09T02:49:02.999Z","0.1.2":"2025-06-09T05:11:16.022Z"},"bugs":{"url":"https://github.com/hyperweb-io/agentic-kit/issues"},"author":{"name":"Dan Lynch","email":"pyramation@gmail.com"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/hyperweb-io/agentic-kit","keywords":[],"repository":{"type":"git","url":"git+https://github.com/hyperweb-io/agentic-kit.git"},"description":"Bradie","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"readme":"# Bradie Client\n\nA Node.js client for the Bradie LLM service, providing project initialization, messaging, streaming responses, and log retrieval.\n\n## Installation\n\n```bash\nnpm install @agentic-kit/bradie\n# or\nyarn add @agentic-kit/bradie\n```\n\n## Usage\n\n```typescript\nimport { Bradie } from '@agentic-kit/bradie';\n\n// 1. Configure callbacks and create client\nconst client = new Bradie({\n  domain: 'http://localhost:3001',\n  onSystemMessage: (msg) => console.log('[system]', msg),\n  onAssistantReply: (msg) => console.log('[assistant]', msg),\n  onError: (err) => console.error('[error]', err),\n  onComplete: () => console.log('[complete]'),\n});\n\n// 2. Initialize a project (creates session & project IDs)\nconst { sessionId, projectId } = await client.initProject(\n  'my-project',\n  '/path/to/project'\n);\nconsole.log('Session ID:', sessionId, 'Project ID:', projectId);\n\n// 3. Send a message and get a request ID\nconst requestId = await client.sendMessage('Hello, Bradie!');\nconsole.log('Request ID:', requestId);\n\n// 4. Subscribe to streaming logs (chat messages & system events)\nawait client.subscribeToResponse(requestId);\n```\n\n### fetchOnce\n\nRetrieve the complete array of command logs for a given request:\n\n```typescript\nconst logs = await client.fetchOnce(requestId);\nconsole.log(logs);\n```\n\n### scripts folder\n\nAll helper scripts live under `scripts/` in this package. From `packages/bradie` you can run them directly with ts-node:\n\n```bash\ncd packages/bradie\nts-node scripts/init.ts --projectName <PROJECT_NAME> --projectPath <PROJECT_PATH> [--domain <domain>]\nts-node scripts/chat.ts --sessionId <SESSION_ID> --message \"<MESSAGE>\" [--domain <domain>]\nts-node scripts/list-projects.ts [--domain <domain>]\nts-node scripts/get-project.ts --projectId <PROJECT_ID> [--domain <domain>]\nts-node scripts/project-summary.ts --sessionId <SESSION_ID> [--domain <domain>]\nts-node scripts/health.ts [--domain <domain>]\nts-node scripts/instance-info.ts [--domain <domain>]\nts-node scripts/subscribe.ts --sessionId <SESSION_ID> --requestId <REQUEST_ID> [--domain <domain>]\n```\n\nOr via the npm shortcuts listed below:\n\nOr via npm:\n```bash\nnpm run init -- --projectName <PROJECT_NAME> --projectPath <PROJECT_PATH> [--domain <domain>]\nnpm run chat  -- --sessionId <SESSION_ID> --message \"<MESSAGE>\" [--domain <domain>]\nnpm run list-projects\nnpm run get-project -- --projectId <PROJECT_ID>\nnpm run project-summary -- --sessionId <SESSION_ID>\nnpm run health\nnpm run instance-info\nnpm run subscribe -- --sessionId <SESSION_ID> --requestId <REQUEST_ID>\n```\nOr via Yarn (no extra \"--\" needed):\n```bash\nyarn run init --projectName <PROJECT_NAME> --projectPath <PROJECT_PATH> [--domain <domain>]\nyarn run chat  --sessionId <SESSION_ID> --message \"<MESSAGE>\" [--domain <domain>]\nyarn run list-projects\nyarn run get-project --projectId <PROJECT_ID>\nyarn run project-summary --sessionId <SESSION_ID>\nyarn run health\nyarn run instance-info\nyarn run subscribe --sessionId <SESSION_ID> --requestId <REQUEST_ID>\n```\n\n### CLI Scripts\n\n**init**: Initialize a new project (outputs `sessionId` & `projectId`):\n```bash\nnpm run init -- --projectName <PROJECT_NAME> --projectPath <PROJECT_PATH> [--domain <domain>]\n```\n\n**chat**: Send a message (outputs `requestId`):\n```bash\nnpm run chat -- --sessionId <SESSION_ID> --message \"<MESSAGE>\" [--domain <domain>]\n```\n\n**subscribe**: Subscribe to request logs (streaming output):\n```bash\nnpm run subscribe -- --sessionId <SESSION_ID> --requestId <REQUEST_ID> [--domain <domain>]\n```\n\n**list-projects**: List all projects:\n```bash\nnpm run list-projects [--domain <domain>]\n```\n\n**get-project**: Fetch details for a project by its ID:\n```bash\nnpm run get-project -- --projectId <PROJECT_ID> [--domain <domain>]\n```\n\n**project-summary**: Fetch summary for a project session:\n```bash\nnpm run project-summary -- --sessionId <SESSION_ID> [--domain <domain>]\n```\n\n**health**: Check Bradie server health:\n```bash\nnpm run health [--domain <domain>]\n```\n\n**instance-info**: Get Bradie instance information:\n```bash\nnpm run instance-info [--domain <domain>]\n```\n\n## API Reference\n\n- `new Bradie(config: { domain: string; onSystemMessage: (msg: string) => void; onAssistantReply: (msg: string) => void; onError?: (err: Error) => void; onComplete?: () => void; })`\n- `.getInstanceId(): Promise<{ instanceId: string; port: number }>`\n- `.getInstanceInfo(): Promise<{ instance_id: string; backend_port: number; frontend_port?: number }>`\n- `.health(): Promise<any>`\n- `.initProject(projectName: string, projectPath: string): Promise<{ sessionId: string; projectId: string }>`\n- `.listProjects(): Promise<Record<string, any>>`\n- `.getProject(projectId: string): Promise<any>`\n- `.getProjectSummary(sessionId: string): Promise<any>`\n- `.getMode(): Promise<{ mode: string; projectName: string | null; projectPath: string | null }>`\n- `.getStatus(sessionId: string): Promise<any>`\n- `.postStatus(sessionId: string): Promise<any>`\n- `.recoverMessages(sessionId: string): Promise<any[]>`\n- `.getFileTree(sessionId: string, instanceId: string): Promise<any>`\n- `.readFile(sessionId: string, filePath: string): Promise<{ content: string }>`\n- `.writeFile(sessionId: string, filePath: string, content: string): Promise<{ success: boolean }>`\n- `.terminalStatus(sessionId: string): Promise<{ status: string; project_path: string }>`\n- `.sendMessage(message: string): Promise<string>`\n- `.subscribeToResponse(requestId: string, opts?: { pollInterval?: number; maxPolls?: number }): Promise<void>`\n- `.fetchOnce(requestId: string): Promise<AgentCommandLog[]>`\n- `.transcribe(sessionId: string, file: Blob | Buffer | File): Promise<{ text: string }>`\n- `.tts(text: string): Promise<Buffer>`\n- `.offlineStatus(): Promise<'available' | 'unavailable'>`\n- `.getProjectRepo(sessionId: string): Promise<{ path: string; url: string }>`\n- `.stopAgent(sessionId: string): Promise<boolean>`\n- `.resetAgent(sessionId: string): Promise<boolean>`\n- `.feedback(sessionId: string, feedback: Record<string, any>): Promise<boolean>`\n- `.feedbackMessage(sessionId: string, messageId: string, feedback: Record<string, any>): Promise<boolean>`\n\n## Contributing\n\nPlease open issues or pull requests on [GitHub](https://github.com/hyperweb-io/agentic-kit).\n\n---\n\n© Hyperweb (formerly Cosmology). See LICENSE for full licensing and disclaimer. ","readmeFilename":"README.md"}