@rolexjs/mcp-server 0.12.0-dev-20260223110721 → 0.12.0-dev-20260223115627

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -98,6 +98,14 @@ var McpState = class {
98
98
  // ================================================================
99
99
  // Activation helpers
100
100
  // ================================================================
101
+ /** Reset all session state — called before rehydrating a new role. */
102
+ reset() {
103
+ this.activeRoleId = null;
104
+ this.focusedGoalId = null;
105
+ this.focusedPlanId = null;
106
+ this.encounterIds.clear();
107
+ this.experienceIds.clear();
108
+ }
101
109
  /** Rehydrate ids from an activation projection. */
102
110
  cacheFromActivation(state2) {
103
111
  this.rehydrate(state2);
@@ -196,6 +204,7 @@ server.addTool({
196
204
  if (!state.findIndividual(roleId)) {
197
205
  rolex.individual.born(void 0, roleId);
198
206
  }
207
+ state.reset();
199
208
  state.activeRoleId = roleId;
200
209
  const result = await rolex.role.activate(roleId);
201
210
  state.cacheFromActivation(result.state);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/instructions.ts","../src/render.ts","../src/state.ts"],"sourcesContent":["/**\n * @rolexjs/mcp-server — individual-level MCP tools.\n *\n * Thin wrapper around the Rolex API (which accepts string ids).\n * McpState holds session context: activeRoleId, focusedGoalId, encounter/experience ids.\n *\n * Tools:\n * activate — activate a role\n * focus — view / switch focused goal\n * want — declare a goal\n * plan — plan for focused goal\n * todo — add task to focused plan\n * finish — finish a task → encounter\n * complete — complete focused plan → encounter\n * abandon — abandon focused plan → encounter\n * reflect — encounter(s) → experience\n * realize — experience(s) → principle\n * master — experience(s) → procedure\n * forget — remove a node from the individual\n * skill — load full skill content by locator\n */\n\nimport { localPlatform } from \"@rolexjs/local-platform\";\nimport { FastMCP } from \"fastmcp\";\nimport { createRoleX, detail } from \"rolexjs\";\nimport { z } from \"zod\";\nimport { instructions } from \"./instructions.js\";\nimport { render } from \"./render.js\";\nimport { McpState } from \"./state.js\";\n\n// ========== Setup ==========\n\nconst rolex = createRoleX(localPlatform());\nconst state = new McpState(rolex);\n\n// ========== Server ==========\n\nconst server = new FastMCP({\n name: \"rolex\",\n version: \"0.11.0\",\n instructions,\n});\n\n// ========== Helpers ==========\n\nfunction fmt(process: string, label: string, result: { state: any; process: string }) {\n return render({\n process,\n name: label,\n result,\n cognitiveHint: state.cognitiveHint(process),\n });\n}\n\n// ========== Tools: Role ==========\n\nserver.addTool({\n name: \"activate\",\n description: detail(\"activate\"),\n parameters: z.object({\n roleId: z.string().describe(\"Role name to activate\"),\n }),\n execute: async ({ roleId }) => {\n if (!state.findIndividual(roleId)) {\n // Auto-born if not found\n rolex.individual.born(undefined, roleId);\n }\n state.activeRoleId = roleId;\n const result = await rolex.role.activate(roleId);\n state.cacheFromActivation(result.state);\n return fmt(\"activate\", roleId, result);\n },\n});\n\nserver.addTool({\n name: \"focus\",\n description: detail(\"focus\"),\n parameters: z.object({\n id: z.string().optional().describe(\"Goal id to switch to. Omit to view current.\"),\n }),\n execute: async ({ id }) => {\n if (id) {\n state.focusedGoalId = id;\n state.focusedPlanId = null;\n }\n const goalId = state.requireGoalId();\n const result = rolex.role.focus(goalId);\n return fmt(\"focus\", id ?? \"current goal\", result);\n },\n});\n\n// ========== Tools: Execution ==========\n\nserver.addTool({\n name: \"want\",\n description: detail(\"want\"),\n parameters: z.object({\n id: z.string().describe(\"Goal id (used for focus/reference)\"),\n goal: z.string().describe(\"Gherkin Feature source describing the goal\"),\n }),\n execute: async ({ id, goal }) => {\n const roleId = state.requireRoleId();\n const result = rolex.role.want(roleId, goal, id);\n state.focusedGoalId = id;\n state.focusedPlanId = null;\n return fmt(\"want\", id, result);\n },\n});\n\nserver.addTool({\n name: \"plan\",\n description: detail(\"plan\"),\n parameters: z.object({\n id: z.string().describe(\"Plan id — keywords from the plan content joined by hyphens\"),\n plan: z.string().describe(\"Gherkin Feature source describing the plan\"),\n }),\n execute: async ({ id, plan }) => {\n const goalId = state.requireGoalId();\n const result = rolex.role.plan(goalId, plan, id);\n state.focusedPlanId = id;\n return fmt(\"plan\", id, result);\n },\n});\n\nserver.addTool({\n name: \"todo\",\n description: detail(\"todo\"),\n parameters: z.object({\n id: z.string().describe(\"Task id (used for finish/reference)\"),\n task: z.string().describe(\"Gherkin Feature source describing the task\"),\n }),\n execute: async ({ id, task }) => {\n const planId = state.requirePlanId();\n const result = rolex.role.todo(planId, task, id);\n return fmt(\"todo\", id, result);\n },\n});\n\nserver.addTool({\n name: \"finish\",\n description: detail(\"finish\"),\n parameters: z.object({\n id: z.string().describe(\"Task id to finish\"),\n encounter: z.string().optional().describe(\"Optional Gherkin Feature describing what happened\"),\n }),\n execute: async ({ id, encounter }) => {\n const roleId = state.requireRoleId();\n const result = rolex.role.finish(id, roleId, encounter);\n const encId = result.state.id ?? id;\n state.addEncounter(encId);\n return fmt(\"finish\", id, result);\n },\n});\n\nserver.addTool({\n name: \"complete\",\n description: detail(\"complete\"),\n parameters: z.object({\n id: z.string().optional().describe(\"Plan id to complete (defaults to focused plan)\"),\n encounter: z.string().optional().describe(\"Optional Gherkin Feature describing what happened\"),\n }),\n execute: async ({ id, encounter }) => {\n const roleId = state.requireRoleId();\n const planId = id ?? state.requirePlanId();\n const result = rolex.role.complete(planId, roleId, encounter);\n const encId = result.state.id ?? planId;\n state.addEncounter(encId);\n if (state.focusedPlanId === planId) state.focusedPlanId = null;\n return fmt(\"complete\", planId, result);\n },\n});\n\nserver.addTool({\n name: \"abandon\",\n description: detail(\"abandon\"),\n parameters: z.object({\n id: z.string().optional().describe(\"Plan id to abandon (defaults to focused plan)\"),\n encounter: z.string().optional().describe(\"Optional Gherkin Feature describing what happened\"),\n }),\n execute: async ({ id, encounter }) => {\n const roleId = state.requireRoleId();\n const planId = id ?? state.requirePlanId();\n const result = rolex.role.abandon(planId, roleId, encounter);\n const encId = result.state.id ?? planId;\n state.addEncounter(encId);\n if (state.focusedPlanId === planId) state.focusedPlanId = null;\n return fmt(\"abandon\", planId, result);\n },\n});\n\n// ========== Tools: Cognition ==========\n\nserver.addTool({\n name: \"reflect\",\n description: detail(\"reflect\"),\n parameters: z.object({\n ids: z.array(z.string()).describe(\"Encounter ids to reflect on (selective consumption)\"),\n id: z\n .string()\n .describe(\"Experience id — keywords from the experience content joined by hyphens\"),\n experience: z.string().optional().describe(\"Gherkin Feature source for the experience\"),\n }),\n execute: async ({ ids, id, experience }) => {\n state.requireEncounterIds(ids);\n const roleId = state.requireRoleId();\n const result = rolex.role.reflect(ids[0], roleId, experience, id);\n state.consumeEncounters(ids);\n state.addExperience(id);\n return fmt(\"reflect\", id, result);\n },\n});\n\nserver.addTool({\n name: \"realize\",\n description: detail(\"realize\"),\n parameters: z.object({\n ids: z.array(z.string()).describe(\"Experience ids to distill into a principle\"),\n id: z.string().describe(\"Principle id — keywords from the principle content joined by hyphens\"),\n principle: z.string().optional().describe(\"Gherkin Feature source for the principle\"),\n }),\n execute: async ({ ids, id, principle }) => {\n state.requireExperienceIds(ids);\n const roleId = state.requireRoleId();\n const result = rolex.role.realize(ids[0], roleId, principle, id);\n state.consumeExperiences(ids);\n return fmt(\"realize\", id, result);\n },\n});\n\nserver.addTool({\n name: \"master\",\n description: detail(\"master\"),\n parameters: z.object({\n ids: z.array(z.string()).describe(\"Experience ids to distill into a procedure\"),\n id: z.string().describe(\"Procedure id — keywords from the procedure content joined by hyphens\"),\n procedure: z.string().optional().describe(\"Gherkin Feature source for the procedure\"),\n }),\n execute: async ({ ids, id, procedure }) => {\n state.requireExperienceIds(ids);\n const roleId = state.requireRoleId();\n const result = rolex.role.master(ids[0], roleId, procedure, id);\n state.consumeExperiences(ids);\n return fmt(\"master\", id, result);\n },\n});\n\n// ========== Tools: Knowledge management ==========\n\nserver.addTool({\n name: \"forget\",\n description: detail(\"forget\"),\n parameters: z.object({\n id: z\n .string()\n .describe(\"Id of the node to remove (principle, procedure, experience, encounter, etc.)\"),\n }),\n execute: async ({ id }) => {\n const roleId = state.requireRoleId();\n const result = await rolex.role.forget(id, roleId);\n return fmt(\"forget\", id, result);\n },\n});\n\n// ========== Tools: Skill loading ==========\n\nserver.addTool({\n name: \"skill\",\n description: detail(\"skill\"),\n parameters: z.object({\n locator: z\n .string()\n .describe(\"ResourceX locator for the skill (e.g. deepractice/role-management)\"),\n }),\n execute: async ({ locator }) => {\n const content = await rolex.role.skill(locator);\n return content;\n },\n});\n\n// ========== Start ==========\n\nserver.start({\n transportType: \"stdio\",\n});\n","/**\n * MCP server instructions — the cognitive framework for AI roles.\n *\n * Assembled from world .feature files in rolexjs descriptions.\n * Each feature describes one independent concern of the RoleX framework.\n */\nimport { world } from \"rolexjs\";\n\nexport const instructions = [\n world[\"cognitive-priority\"],\n world[\"role-identity\"],\n world.execution,\n world.cognition,\n world.memory,\n world.gherkin,\n world.communication,\n world[\"skill-system\"],\n world[\"state-origin\"],\n].join(\"\\n\\n\");\n","/**\n * Render — 3-layer output for MCP tool results.\n *\n * Layer 1: Status — what just happened (describe)\n * Layer 2: Hint — what to do next (hint)\n * Layer 3: Projection — full state tree as markdown (renderState)\n *\n * MCP and CLI share describe() + hint() + renderState() from rolexjs.\n * Relations are rendered per-node via bidirectional links — no separate layer needed.\n */\nimport type { RolexResult } from \"rolexjs\";\nimport { describe, hint, renderState } from \"rolexjs\";\n\n// ================================================================\n// Public API\n// ================================================================\n\nexport interface RenderOptions {\n /** The process that was executed. */\n process: string;\n /** Display name for the primary node. */\n name: string;\n /** Result from the Rolex API. */\n result: RolexResult;\n /** AI cognitive hint — first-person, state-aware self-direction cue. */\n cognitiveHint?: string | null;\n}\n\n/** Render a full 3-layer output string. */\nexport function render(opts: RenderOptions): string {\n const { process, name, result, cognitiveHint } = opts;\n const lines: string[] = [];\n\n // Layer 1: Status\n lines.push(describe(process, name, result.state));\n\n // Layer 2: Hint (static) + Cognitive hint (state-aware)\n lines.push(hint(process));\n if (cognitiveHint) {\n lines.push(`I → ${cognitiveHint}`);\n }\n\n // Layer 3: Projection — generic markdown rendering of the full state tree\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n return lines.join(\"\\n\");\n}\n","/**\n * McpState — stateful session for the MCP server.\n *\n * Holds what the stateless Rolex API does not:\n * - activeRoleId (which individual is \"me\")\n * - focusedGoalId / focusedPlanId (execution context)\n * - encounter / experience id sets (for selective cognition)\n *\n * Since the Rolex API now accepts string ids directly,\n * McpState only stores ids — no Structure references.\n */\nimport type { Rolex, State } from \"rolexjs\";\n\nexport class McpState {\n activeRoleId: string | null = null;\n focusedGoalId: string | null = null;\n focusedPlanId: string | null = null;\n\n private encounterIds = new Set<string>();\n private experienceIds = new Set<string>();\n\n constructor(readonly rolex: Rolex) {}\n\n // ================================================================\n // Requirements — throw if missing\n // ================================================================\n\n requireRoleId(): string {\n if (!this.activeRoleId) throw new Error(\"No active role. Call activate first.\");\n return this.activeRoleId;\n }\n\n requireGoalId(): string {\n if (!this.focusedGoalId) throw new Error(\"No focused goal. Call want first.\");\n return this.focusedGoalId;\n }\n\n requirePlanId(): string {\n if (!this.focusedPlanId) throw new Error(\"No focused plan. Call plan first.\");\n return this.focusedPlanId;\n }\n\n // ================================================================\n // Cognition registries — encounter / experience ids\n // ================================================================\n\n addEncounter(id: string) {\n this.encounterIds.add(id);\n }\n\n requireEncounterIds(ids: string[]) {\n for (const id of ids) {\n if (!this.encounterIds.has(id)) throw new Error(`Encounter not found: \"${id}\"`);\n }\n }\n\n consumeEncounters(ids: string[]) {\n for (const id of ids) {\n this.encounterIds.delete(id);\n }\n }\n\n addExperience(id: string) {\n this.experienceIds.add(id);\n }\n\n requireExperienceIds(ids: string[]) {\n for (const id of ids) {\n if (!this.experienceIds.has(id)) throw new Error(`Experience not found: \"${id}\"`);\n }\n }\n\n consumeExperiences(ids: string[]) {\n for (const id of ids) {\n this.experienceIds.delete(id);\n }\n }\n\n // ================================================================\n // Lookup\n // ================================================================\n\n findIndividual(roleId: string): boolean {\n return this.rolex.find(roleId) !== null;\n }\n\n // ================================================================\n // Activation helpers\n // ================================================================\n\n /** Rehydrate ids from an activation projection. */\n cacheFromActivation(state: State) {\n this.rehydrate(state);\n }\n\n /** Walk the state tree and collect ids into the appropriate registries. */\n private rehydrate(node: State) {\n if (node.id) {\n switch (node.name) {\n case \"goal\":\n // Set focused goal to the first one found if none set\n if (!this.focusedGoalId) this.focusedGoalId = node.id;\n break;\n case \"encounter\":\n this.encounterIds.add(node.id);\n break;\n case \"experience\":\n this.experienceIds.add(node.id);\n break;\n }\n }\n for (const child of (node as State & { children?: readonly State[] }).children ?? []) {\n this.rehydrate(child);\n }\n }\n\n // ================================================================\n // Cognitive hints — state-aware AI self-direction cues\n // ================================================================\n\n /** First-person, state-aware hint for the AI after an operation. */\n cognitiveHint(process: string): string | null {\n switch (process) {\n case \"activate\":\n if (!this.focusedGoalId)\n return \"I have no goal yet. I should call `want` to declare one, or `focus` to review existing goals.\";\n return \"I have an active goal. I should call `focus` to review progress, or `want` to declare a new goal.\";\n\n case \"focus\":\n if (!this.focusedPlanId)\n return \"I have a goal but no plan. I should call `plan` to design how to achieve it.\";\n return \"I have a plan. I should call `todo` to create tasks, or continue working.\";\n\n case \"want\":\n return \"Goal declared. I should call `plan` to design how to achieve it.\";\n\n case \"plan\":\n return \"Plan created. I should call `todo` to create concrete tasks.\";\n\n case \"todo\":\n return \"Task created. I can add more with `todo`, or start working and call `finish` when done.\";\n\n case \"finish\": {\n const encCount = this.encounterIds.size;\n if (encCount > 0 && !this.focusedGoalId)\n return `Task finished. No more goals — I have ${encCount} encounter(s) to choose from for \\`reflect\\`, or \\`want\\` a new goal.`;\n return \"Task finished. I should continue with remaining tasks, or call `complete` when the plan is done.\";\n }\n\n case \"complete\":\n case \"abandon\": {\n const encCount = this.encounterIds.size;\n if (encCount > 0)\n return `Plan closed. I have ${encCount} encounter(s) to choose from for \\`reflect\\`, or I can continue with other plans.`;\n return \"Plan closed. I can create a new `plan`, or `focus` on another goal.\";\n }\n\n case \"reflect\": {\n const expCount = this.experienceIds.size;\n if (expCount > 0)\n return `Experience gained. I can \\`realize\\` principles or \\`master\\` procedures — ${expCount} experience(s) available.`;\n return \"Experience gained. I can `realize` a principle, `master` a procedure, or continue working.\";\n }\n\n case \"realize\":\n return \"Principle added to knowledge. I should continue working.\";\n\n case \"master\":\n return \"Procedure added to knowledge. I should continue working.\";\n\n default:\n return null;\n }\n }\n}\n"],"mappings":";;;AAsBA,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AACxB,SAAS,aAAa,cAAc;AACpC,SAAS,SAAS;;;ACnBlB,SAAS,aAAa;AAEf,IAAM,eAAe;AAAA,EAC1B,MAAM,oBAAoB;AAAA,EAC1B,MAAM,eAAe;AAAA,EACrB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM,cAAc;AAAA,EACpB,MAAM,cAAc;AACtB,EAAE,KAAK,MAAM;;;ACPb,SAAS,UAAU,MAAM,mBAAmB;AAkBrC,SAAS,OAAO,MAA6B;AAClD,QAAM,EAAE,SAAS,MAAM,QAAQ,cAAc,IAAI;AACjD,QAAM,QAAkB,CAAC;AAGzB,QAAM,KAAK,SAAS,SAAS,MAAM,OAAO,KAAK,CAAC;AAGhD,QAAM,KAAK,KAAK,OAAO,CAAC;AACxB,MAAI,eAAe;AACjB,UAAM,KAAK,YAAO,aAAa,EAAE;AAAA,EACnC;AAGA,QAAM,KAAK,EAAE;AACb,QAAM,KAAK,YAAY,OAAO,KAAK,CAAC;AAEpC,SAAO,MAAM,KAAK,IAAI;AACxB;;;AClCO,IAAM,WAAN,MAAe;AAAA,EAQpB,YAAqBA,QAAc;AAAd,iBAAAA;AAAA,EAAe;AAAA,EAPpC,eAA8B;AAAA,EAC9B,gBAA+B;AAAA,EAC/B,gBAA+B;AAAA,EAEvB,eAAe,oBAAI,IAAY;AAAA,EAC/B,gBAAgB,oBAAI,IAAY;AAAA;AAAA;AAAA;AAAA,EAQxC,gBAAwB;AACtB,QAAI,CAAC,KAAK,aAAc,OA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;AAAA,IACnB,SAAS,EACN,OAAO,EACP,SAAS,oEAAoE;AAAA,EAClF,CAAC;AAAA,EACD,SAAS,OAAO,EAAE,QAAQ,MAAM;AAC9B,UAAM,UAAU,MAAM,MAAM,KAAK,MAAM,OAAO;AAC9C,WAAO;AAAA,EACT;AACF,CAAC;AAID,OAAO,MAAM;AAAA,EACX,eAAe;AACjB,CAAC;","names":["rolex","state"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/instructions.ts","../src/render.ts","../src/state.ts"],"sourcesContent":["/**\n * @rolexjs/mcp-server — individual-level MCP tools.\n *\n * Thin wrapper around the Rolex API (which accepts string ids).\n * McpState holds session context: activeRoleId, focusedGoalId, encounter/experience ids.\n *\n * Tools:\n * activate — activate a role\n * focus — view / switch focused goal\n * want — declare a goal\n * plan — plan for focused goal\n * todo — add task to focused plan\n * finish — finish a task → encounter\n * complete — complete focused plan → encounter\n * abandon — abandon focused plan → encounter\n * reflect — encounter(s) → experience\n * realize — experience(s) → principle\n * master — experience(s) → procedure\n * forget — remove a node from the individual\n * skill — load full skill content by locator\n */\n\nimport { localPlatform } from \"@rolexjs/local-platform\";\nimport { FastMCP } from \"fastmcp\";\nimport { createRoleX, detail } from \"rolexjs\";\nimport { z } from \"zod\";\nimport { instructions } from \"./instructions.js\";\nimport { render } from \"./render.js\";\nimport { McpState } from \"./state.js\";\n\n// ========== Setup ==========\n\nconst rolex = createRoleX(localPlatform());\nconst state = new McpState(rolex);\n\n// ========== Server ==========\n\nconst server = new FastMCP({\n name: \"rolex\",\n version: \"0.11.0\",\n instructions,\n});\n\n// ========== Helpers ==========\n\nfunction fmt(process: string, label: string, result: { state: any; process: string }) {\n return render({\n process,\n name: label,\n result,\n cognitiveHint: state.cognitiveHint(process),\n });\n}\n\n// ========== Tools: Role ==========\n\nserver.addTool({\n name: \"activate\",\n description: detail(\"activate\"),\n parameters: z.object({\n roleId: z.string().describe(\"Role name to activate\"),\n }),\n execute: async ({ roleId }) => {\n if (!state.findIndividual(roleId)) {\n // Auto-born if not found\n rolex.individual.born(undefined, roleId);\n }\n state.reset();\n state.activeRoleId = roleId;\n const result = await rolex.role.activate(roleId);\n state.cacheFromActivation(result.state);\n return fmt(\"activate\", roleId, result);\n },\n});\n\nserver.addTool({\n name: \"focus\",\n description: detail(\"focus\"),\n parameters: z.object({\n id: z.string().optional().describe(\"Goal id to switch to. Omit to view current.\"),\n }),\n execute: async ({ id }) => {\n if (id) {\n state.focusedGoalId = id;\n state.focusedPlanId = null;\n }\n const goalId = state.requireGoalId();\n const result = rolex.role.focus(goalId);\n return fmt(\"focus\", id ?? \"current goal\", result);\n },\n});\n\n// ========== Tools: Execution ==========\n\nserver.addTool({\n name: \"want\",\n description: detail(\"want\"),\n parameters: z.object({\n id: z.string().describe(\"Goal id (used for focus/reference)\"),\n goal: z.string().describe(\"Gherkin Feature source describing the goal\"),\n }),\n execute: async ({ id, goal }) => {\n const roleId = state.requireRoleId();\n const result = rolex.role.want(roleId, goal, id);\n state.focusedGoalId = id;\n state.focusedPlanId = null;\n return fmt(\"want\", id, result);\n },\n});\n\nserver.addTool({\n name: \"plan\",\n description: detail(\"plan\"),\n parameters: z.object({\n id: z.string().describe(\"Plan id — keywords from the plan content joined by hyphens\"),\n plan: z.string().describe(\"Gherkin Feature source describing the plan\"),\n }),\n execute: async ({ id, plan }) => {\n const goalId = state.requireGoalId();\n const result = rolex.role.plan(goalId, plan, id);\n state.focusedPlanId = id;\n return fmt(\"plan\", id, result);\n },\n});\n\nserver.addTool({\n name: \"todo\",\n description: detail(\"todo\"),\n parameters: z.object({\n id: z.string().describe(\"Task id (used for finish/reference)\"),\n task: z.string().describe(\"Gherkin Feature source describing the task\"),\n }),\n execute: async ({ id, task }) => {\n const planId = state.requirePlanId();\n const result = rolex.role.todo(planId, task, id);\n return fmt(\"todo\", id, result);\n },\n});\n\nserver.addTool({\n name: \"finish\",\n description: detail(\"finish\"),\n parameters: z.object({\n id: z.string().describe(\"Task id to finish\"),\n encounter: z.string().optional().describe(\"Optional Gherkin Feature describing what happened\"),\n }),\n execute: async ({ id, encounter }) => {\n const roleId = state.requireRoleId();\n const result = rolex.role.finish(id, roleId, encounter);\n const encId = result.state.id ?? id;\n state.addEncounter(encId);\n return fmt(\"finish\", id, result);\n },\n});\n\nserver.addTool({\n name: \"complete\",\n description: detail(\"complete\"),\n parameters: z.object({\n id: z.string().optional().describe(\"Plan id to complete (defaults to focused plan)\"),\n encounter: z.string().optional().describe(\"Optional Gherkin Feature describing what happened\"),\n }),\n execute: async ({ id, encounter }) => {\n const roleId = state.requireRoleId();\n const planId = id ?? state.requirePlanId();\n const result = rolex.role.complete(planId, roleId, encounter);\n const encId = result.state.id ?? planId;\n state.addEncounter(encId);\n if (state.focusedPlanId === planId) state.focusedPlanId = null;\n return fmt(\"complete\", planId, result);\n },\n});\n\nserver.addTool({\n name: \"abandon\",\n description: detail(\"abandon\"),\n parameters: z.object({\n id: z.string().optional().describe(\"Plan id to abandon (defaults to focused plan)\"),\n encounter: z.string().optional().describe(\"Optional Gherkin Feature describing what happened\"),\n }),\n execute: async ({ id, encounter }) => {\n const roleId = state.requireRoleId();\n const planId = id ?? state.requirePlanId();\n const result = rolex.role.abandon(planId, roleId, encounter);\n const encId = result.state.id ?? planId;\n state.addEncounter(encId);\n if (state.focusedPlanId === planId) state.focusedPlanId = null;\n return fmt(\"abandon\", planId, result);\n },\n});\n\n// ========== Tools: Cognition ==========\n\nserver.addTool({\n name: \"reflect\",\n description: detail(\"reflect\"),\n parameters: z.object({\n ids: z.array(z.string()).describe(\"Encounter ids to reflect on (selective consumption)\"),\n id: z\n .string()\n .describe(\"Experience id — keywords from the experience content joined by hyphens\"),\n experience: z.string().optional().describe(\"Gherkin Feature source for the experience\"),\n }),\n execute: async ({ ids, id, experience }) => {\n state.requireEncounterIds(ids);\n const roleId = state.requireRoleId();\n const result = rolex.role.reflect(ids[0], roleId, experience, id);\n state.consumeEncounters(ids);\n state.addExperience(id);\n return fmt(\"reflect\", id, result);\n },\n});\n\nserver.addTool({\n name: \"realize\",\n description: detail(\"realize\"),\n parameters: z.object({\n ids: z.array(z.string()).describe(\"Experience ids to distill into a principle\"),\n id: z.string().describe(\"Principle id — keywords from the principle content joined by hyphens\"),\n principle: z.string().optional().describe(\"Gherkin Feature source for the principle\"),\n }),\n execute: async ({ ids, id, principle }) => {\n state.requireExperienceIds(ids);\n const roleId = state.requireRoleId();\n const result = rolex.role.realize(ids[0], roleId, principle, id);\n state.consumeExperiences(ids);\n return fmt(\"realize\", id, result);\n },\n});\n\nserver.addTool({\n name: \"master\",\n description: detail(\"master\"),\n parameters: z.object({\n ids: z.array(z.string()).describe(\"Experience ids to distill into a procedure\"),\n id: z.string().describe(\"Procedure id — keywords from the procedure content joined by hyphens\"),\n procedure: z.string().optional().describe(\"Gherkin Feature source for the procedure\"),\n }),\n execute: async ({ ids, id, procedure }) => {\n state.requireExperienceIds(ids);\n const roleId = state.requireRoleId();\n const result = rolex.role.master(ids[0], roleId, procedure, id);\n state.consumeExperiences(ids);\n return fmt(\"master\", id, result);\n },\n});\n\n// ========== Tools: Knowledge management ==========\n\nserver.addTool({\n name: \"forget\",\n description: detail(\"forget\"),\n parameters: z.object({\n id: z\n .string()\n .describe(\"Id of the node to remove (principle, procedure, experience, encounter, etc.)\"),\n }),\n execute: async ({ id }) => {\n const roleId = state.requireRoleId();\n const result = await rolex.role.forget(id, roleId);\n return fmt(\"forget\", id, result);\n },\n});\n\n// ========== Tools: Skill loading ==========\n\nserver.addTool({\n name: \"skill\",\n description: detail(\"skill\"),\n parameters: z.object({\n locator: z\n .string()\n .describe(\"ResourceX locator for the skill (e.g. deepractice/role-management)\"),\n }),\n execute: async ({ locator }) => {\n const content = await rolex.role.skill(locator);\n return content;\n },\n});\n\n// ========== Start ==========\n\nserver.start({\n transportType: \"stdio\",\n});\n","/**\n * MCP server instructions — the cognitive framework for AI roles.\n *\n * Assembled from world .feature files in rolexjs descriptions.\n * Each feature describes one independent concern of the RoleX framework.\n */\nimport { world } from \"rolexjs\";\n\nexport const instructions = [\n world[\"cognitive-priority\"],\n world[\"role-identity\"],\n world.execution,\n world.cognition,\n world.memory,\n world.gherkin,\n world.communication,\n world[\"skill-system\"],\n world[\"state-origin\"],\n].join(\"\\n\\n\");\n","/**\n * Render — 3-layer output for MCP tool results.\n *\n * Layer 1: Status — what just happened (describe)\n * Layer 2: Hint — what to do next (hint)\n * Layer 3: Projection — full state tree as markdown (renderState)\n *\n * MCP and CLI share describe() + hint() + renderState() from rolexjs.\n * Relations are rendered per-node via bidirectional links — no separate layer needed.\n */\nimport type { RolexResult } from \"rolexjs\";\nimport { describe, hint, renderState } from \"rolexjs\";\n\n// ================================================================\n// Public API\n// ================================================================\n\nexport interface RenderOptions {\n /** The process that was executed. */\n process: string;\n /** Display name for the primary node. */\n name: string;\n /** Result from the Rolex API. */\n result: RolexResult;\n /** AI cognitive hint — first-person, state-aware self-direction cue. */\n cognitiveHint?: string | null;\n}\n\n/** Render a full 3-layer output string. */\nexport function render(opts: RenderOptions): string {\n const { process, name, result, cognitiveHint } = opts;\n const lines: string[] = [];\n\n // Layer 1: Status\n lines.push(describe(process, name, result.state));\n\n // Layer 2: Hint (static) + Cognitive hint (state-aware)\n lines.push(hint(process));\n if (cognitiveHint) {\n lines.push(`I → ${cognitiveHint}`);\n }\n\n // Layer 3: Projection — generic markdown rendering of the full state tree\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n return lines.join(\"\\n\");\n}\n","/**\n * McpState — stateful session for the MCP server.\n *\n * Holds what the stateless Rolex API does not:\n * - activeRoleId (which individual is \"me\")\n * - focusedGoalId / focusedPlanId (execution context)\n * - encounter / experience id sets (for selective cognition)\n *\n * Since the Rolex API now accepts string ids directly,\n * McpState only stores ids — no Structure references.\n */\nimport type { Rolex, State } from \"rolexjs\";\n\nexport class McpState {\n activeRoleId: string | null = null;\n focusedGoalId: string | null = null;\n focusedPlanId: string | null = null;\n\n private encounterIds = new Set<string>();\n private experienceIds = new Set<string>();\n\n constructor(readonly rolex: Rolex) {}\n\n // ================================================================\n // Requirements — throw if missing\n // ================================================================\n\n requireRoleId(): string {\n if (!this.activeRoleId) throw new Error(\"No active role. Call activate first.\");\n return this.activeRoleId;\n }\n\n requireGoalId(): string {\n if (!this.focusedGoalId) throw new Error(\"No focused goal. Call want first.\");\n return this.focusedGoalId;\n }\n\n requirePlanId(): string {\n if (!this.focusedPlanId) throw new Error(\"No focused plan. Call plan first.\");\n return this.focusedPlanId;\n }\n\n // ================================================================\n // Cognition registries — encounter / experience ids\n // ================================================================\n\n addEncounter(id: string) {\n this.encounterIds.add(id);\n }\n\n requireEncounterIds(ids: string[]) {\n for (const id of ids) {\n if (!this.encounterIds.has(id)) throw new Error(`Encounter not found: \"${id}\"`);\n }\n }\n\n consumeEncounters(ids: string[]) {\n for (const id of ids) {\n this.encounterIds.delete(id);\n }\n }\n\n addExperience(id: string) {\n this.experienceIds.add(id);\n }\n\n requireExperienceIds(ids: string[]) {\n for (const id of ids) {\n if (!this.experienceIds.has(id)) throw new Error(`Experience not found: \"${id}\"`);\n }\n }\n\n consumeExperiences(ids: string[]) {\n for (const id of ids) {\n this.experienceIds.delete(id);\n }\n }\n\n // ================================================================\n // Lookup\n // ================================================================\n\n findIndividual(roleId: string): boolean {\n return this.rolex.find(roleId) !== null;\n }\n\n // ================================================================\n // Activation helpers\n // ================================================================\n\n /** Reset all session state — called before rehydrating a new role. */\n reset() {\n this.activeRoleId = null;\n this.focusedGoalId = null;\n this.focusedPlanId = null;\n this.encounterIds.clear();\n this.experienceIds.clear();\n }\n\n /** Rehydrate ids from an activation projection. */\n cacheFromActivation(state: State) {\n this.rehydrate(state);\n }\n\n /** Walk the state tree and collect ids into the appropriate registries. */\n private rehydrate(node: State) {\n if (node.id) {\n switch (node.name) {\n case \"goal\":\n // Set focused goal to the first one found if none set\n if (!this.focusedGoalId) this.focusedGoalId = node.id;\n break;\n case \"encounter\":\n this.encounterIds.add(node.id);\n break;\n case \"experience\":\n this.experienceIds.add(node.id);\n break;\n }\n }\n for (const child of (node as State & { children?: readonly State[] }).children ?? []) {\n this.rehydrate(child);\n }\n }\n\n // ================================================================\n // Cognitive hints — state-aware AI self-direction cues\n // ================================================================\n\n /** First-person, state-aware hint for the AI after an operation. */\n cognitiveHint(process: string): string | null {\n switch (process) {\n case \"activate\":\n if (!this.focusedGoalId)\n return \"I have no goal yet. I should call `want` to declare one, or `focus` to review existing goals.\";\n return \"I have an active goal. I should call `focus` to review progress, or `want` to declare a new goal.\";\n\n case \"focus\":\n if (!this.focusedPlanId)\n return \"I have a goal but no plan. I should call `plan` to design how to achieve it.\";\n return \"I have a plan. I should call `todo` to create tasks, or continue working.\";\n\n case \"want\":\n return \"Goal declared. I should call `plan` to design how to achieve it.\";\n\n case \"plan\":\n return \"Plan created. I should call `todo` to create concrete tasks.\";\n\n case \"todo\":\n return \"Task created. I can add more with `todo`, or start working and call `finish` when done.\";\n\n case \"finish\": {\n const encCount = this.encounterIds.size;\n if (encCount > 0 && !this.focusedGoalId)\n return `Task finished. No more goals — I have ${encCount} encounter(s) to choose from for \\`reflect\\`, or \\`want\\` a new goal.`;\n return \"Task finished. I should continue with remaining tasks, or call `complete` when the plan is done.\";\n }\n\n case \"complete\":\n case \"abandon\": {\n const encCount = this.encounterIds.size;\n if (encCount > 0)\n return `Plan closed. I have ${encCount} encounter(s) to choose from for \\`reflect\\`, or I can continue with other plans.`;\n return \"Plan closed. I can create a new `plan`, or `focus` on another goal.\";\n }\n\n case \"reflect\": {\n const expCount = this.experienceIds.size;\n if (expCount > 0)\n return `Experience gained. I can \\`realize\\` principles or \\`master\\` procedures — ${expCount} experience(s) available.`;\n return \"Experience gained. I can `realize` a principle, `master` a procedure, or continue working.\";\n }\n\n case \"realize\":\n return \"Principle added to knowledge. I should continue working.\";\n\n case \"master\":\n return \"Procedure added to knowledge. I should continue working.\";\n\n default:\n return null;\n }\n }\n}\n"],"mappings":";;;AAsBA,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AACxB,SAAS,aAAa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C9B,UAAM,UAAU,MAAM,MAAM,KAAK,MAAM,OAAO;AAC9C,WAAO;AAAA,EACT;AACF,CAAC;AAID,OAAO,MAAM;AAAA,EACX,eAAe;AACjB,CAAC;","names":["rolex","state"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolexjs/mcp-server",
3
- "version": "0.12.0-dev-20260223110721",
3
+ "version": "0.12.0-dev-20260223115627",
4
4
  "description": "MCP server for Rolex — expose RDD role management as MCP tools",
5
5
  "keywords": [
6
6
  "rolex",
@@ -41,8 +41,8 @@
41
41
  "clean": "rm -rf dist"
42
42
  },
43
43
  "dependencies": {
44
- "rolexjs": "0.12.0-dev-20260223110721",
45
- "@rolexjs/local-platform": "0.12.0-dev-20260223110721",
44
+ "rolexjs": "0.12.0-dev-20260223115627",
45
+ "@rolexjs/local-platform": "0.12.0-dev-20260223115627",
46
46
  "fastmcp": "^3.0.0",
47
47
  "zod": "^3.25.0"
48
48
  },