{"_id":"@9d9/pulsemcp-core","name":"@9d9/pulsemcp-core","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@9d9/pulsemcp-core","version":"0.1.0","description":"Core utilities for PulseMCP - Model Context Protocol automation framework","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"keywords":["pulsemcp","mcp","model-context-protocol","automation","9d9"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/9d9ten/pulsemcp-core.git"},"scripts":{"build":"tsup","test":"vitest run","prepublishOnly":"npm run build"},"devDependencies":{"tsup":"^8.0.0","typescript":"^5.5.0","vitest":"^2.0.0"},"gitHead":"6c1543efef1edd2dd9b277795faca58557949b2c","_id":"@9d9/pulsemcp-core@0.1.0","bugs":{"url":"https://github.com/9d9ten/pulsemcp-core/issues"},"homepage":"https://github.com/9d9ten/pulsemcp-core#readme","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-U/9ZqwTb7gc822loCB/lOjmDto/Tclc2cgktGPSOkmsGEX1936P9500A66IOBI33vk3uzIwCti6HicjQ0B7OSw==","shasum":"45056a17e3bf9bba70bacd99262f4dd07a5d0cde","tarball":"https://registry.npmjs.org/@9d9/pulsemcp-core/-/pulsemcp-core-0.1.0.tgz","fileCount":9,"unpackedSize":31761,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHB305fovXU3/earwo+T5rxr9CjhZe7bg3IEo3j6yDNuAiEA+7QO9LfxTcTZmlkYiASCauyP82yws1/UvgvB7Wzy4a0="}]},"_npmUser":{"name":"oku.yasu","email":"Service@9d9.co.jp"},"directories":{},"maintainers":[{"name":"oku.yasu","email":"Service@9d9.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pulsemcp-core_0.1.0_1775825058256_0.22864110184422093"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-10T12:44:18.160Z","0.1.0":"2026-04-10T12:44:18.399Z","modified":"2026-04-10T12:44:18.645Z"},"maintainers":[{"name":"oku.yasu","email":"Service@9d9.co.jp"}],"description":"Core utilities for PulseMCP - Model Context Protocol automation framework","homepage":"https://github.com/9d9ten/pulsemcp-core#readme","keywords":["pulsemcp","mcp","model-context-protocol","automation","9d9"],"repository":{"type":"git","url":"git+https://github.com/9d9ten/pulsemcp-core.git"},"bugs":{"url":"https://github.com/9d9ten/pulsemcp-core/issues"},"license":"MIT","readme":"# @9d9/pulsemcp-core\n\nCore utilities for [PulseMCP](https://github.com/9d9ten) — a Model Context Protocol automation framework.\n\n## Install\n\n```bash\nnpm install @9d9/pulsemcp-core\n```\n\n## Usage\n\n```ts\nimport { ok, err, retry, withTimeout, EventEmitter, createTask, DefaultLogger } from \"@9d9/pulsemcp-core\";\n\n// Result pattern\nconst result = ok(42);\nif (result.ok) console.log(result.value);\n\n// Retry with exponential backoff\nconst data = await retry(() => fetchData(), { maxAttempts: 3 });\n\n// Timeout wrapper\nconst response = await withTimeout(fetch(url), 5000);\n\n// Event system\nconst emitter = new EventEmitter();\nemitter.on(\"task:complete\", (data) => console.log(data));\nemitter.emit(\"task:complete\", { id: \"123\" });\n```\n\n## API\n\n### Result Helpers\n- `ok(value)` — Create a success result\n- `err(code, message, details?)` — Create an error result\n\n### Async Utilities\n- `sleep(ms)` — Promise-based delay\n- `withTimeout(promise, ms)` — Reject after timeout\n- `retry(fn, opts?)` — Retry with exponential backoff\n\n### Task Management\n- `createTask(name, data?)` — Create a new task with auto-generated ID\n- `generateId(prefix?)` — Generate unique IDs\n\n### Events\n- `EventEmitter` — Simple pub/sub with `on()`, `off()`, `emit()`\n\n### Logging\n- `DefaultLogger` — Console logger with log levels (debug/info/warn/error)\n\n### Utilities\n- `validateNotNull(value, name)` — Null check with descriptive error\n- `formatDuration(ms)` — Human-readable duration string\n\n## License\n\nMIT © [9d9 LLC](https://github.com/9d9ten)\n","readmeFilename":"README.md","_rev":"1-1ab344ad0c3de4cbde45f85c761165b1"}