f440e5b52d
CI / test (pull_request) Successful in 43s
Adds `./session-cursor` — a shared, session-keyed durable since_id cursor store, beside `inbox-uploads`/`targets`, so every /activity-polling TS adapter (channel today; hermes-ts / codex-ts next) uses one implementation of the polling-cursor contract instead of re-implementing (and re-bugging) it inline. Why session-namespaced: a host can run more than one adapter session (two `claude` invocations both loading the plugin). The platform is fully concurrent — register/heartbeat are workspace-keyed last-writer-wins and /activity is read-only with a client-driven since_id (molecule-core registry.go / activity.go) — so the ONLY thing that races is a *shared* cursor file. Keying the file by session removes that race: - primary (no key) -> cursor.json (survives restarts; resumes) - secondary (key) -> cursor.<key>.json (independent; pruned when gone) Surface: `CursorStore` (load/get/has/set/delete/entries/save/unlink, atomic temp+rename, 0600), `cursorFileName(sessionKey?)`, `parseSessionKey`, `pruneOrphanCursors(stateDir, isAlive)`. Logging-agnostic: load() swallows corruption (optional onLoadError hook) and save() throws — the adapter owns its phrasing and fatal-vs-recoverable policy. Additive: new subpath export only; existing 1.3.x consumers unaffected. Context: molecule-mcp-claude-channel#26 (secondary) / internal#726. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.1 KiB
JSON
43 lines
1.1 KiB
JSON
{
|
|
"name": "@molecule-ai/mcp-server",
|
|
"version": "1.4.0",
|
|
"description": "MCP server for Molecule AI Agent Team \u2014 manage workspaces, agents, and skills from any AI coding tool",
|
|
"type": "module",
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./external-workspace-tools": "./dist/external_workspace_tools.js",
|
|
"./inbox-uploads": "./dist/inbox-uploads.js",
|
|
"./session-cursor": "./dist/session-cursor.js",
|
|
"./targets": "./dist/targets.js"
|
|
},
|
|
"types": "./dist/index.d.ts",
|
|
"bin": {
|
|
"molecule-mcp": "./dist/index.js"
|
|
},
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"start": "node dist/index.js",
|
|
"test": "jest"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
"pino": "^9.6.0",
|
|
"pino-pretty": "^13.0.0",
|
|
"zod": "^3.23.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/jest": "^30.0.0",
|
|
"@types/node": "^20.0.0",
|
|
"jest": "^30.3.0",
|
|
"ts-jest": "^29.4.9",
|
|
"typescript": "^5.5.0"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://git.moleculesai.app/api/packages/molecule-ai/npm/"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://git.moleculesai.app/molecule-ai/molecule-mcp-server.git"
|
|
}
|
|
}
|