@burdenoff/mcp-libs 2026.704.1 → 2026.719.1

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.
Files changed (184) hide show
  1. package/dist/{chunk-WWFVD7BO.js → chunk-RHWHUY5Y.js} +3 -3
  2. package/dist/{chunk-WWFVD7BO.js.map → chunk-RHWHUY5Y.js.map} +1 -1
  3. package/dist/{chunk-H2OYWLOA.js → chunk-YOSQUY3M.js} +101 -35
  4. package/dist/chunk-YOSQUY3M.js.map +1 -0
  5. package/dist/core/index.cjs +101 -32
  6. package/dist/core/index.cjs.map +1 -1
  7. package/dist/core/index.d.cts +1 -1
  8. package/dist/core/index.d.ts +1 -1
  9. package/dist/core/index.js +1 -1
  10. package/dist/index.cjs +97 -31
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/modules/adaptercloud/index.cjs +14 -14
  16. package/dist/modules/adaptercloud/index.cjs.map +1 -1
  17. package/dist/modules/adaptercloud/index.js +1 -1
  18. package/dist/modules/artistrybase/index.cjs +14 -14
  19. package/dist/modules/artistrybase/index.cjs.map +1 -1
  20. package/dist/modules/artistrybase/index.js +1 -1
  21. package/dist/modules/assethandler/index.cjs +14 -14
  22. package/dist/modules/assethandler/index.cjs.map +1 -1
  23. package/dist/modules/assethandler/index.js +1 -1
  24. package/dist/modules/atheletebridge/index.cjs +14 -14
  25. package/dist/modules/atheletebridge/index.cjs.map +1 -1
  26. package/dist/modules/atheletebridge/index.js +1 -1
  27. package/dist/modules/auth/index.cjs +14 -14
  28. package/dist/modules/auth/index.cjs.map +1 -1
  29. package/dist/modules/auth/index.js +3 -3
  30. package/dist/modules/billing/index.cjs +14 -14
  31. package/dist/modules/billing/index.cjs.map +1 -1
  32. package/dist/modules/billing/index.js +1 -1
  33. package/dist/modules/brainyrich/index.cjs +14 -14
  34. package/dist/modules/brainyrich/index.cjs.map +1 -1
  35. package/dist/modules/brainyrich/index.js +1 -1
  36. package/dist/modules/buildmyiq/index.cjs +14 -14
  37. package/dist/modules/buildmyiq/index.cjs.map +1 -1
  38. package/dist/modules/buildmyiq/index.js +1 -1
  39. package/dist/modules/channels/index.cjs +14 -14
  40. package/dist/modules/channels/index.cjs.map +1 -1
  41. package/dist/modules/channels/index.js +1 -1
  42. package/dist/modules/collabkin/index.cjs +14 -14
  43. package/dist/modules/collabkin/index.cjs.map +1 -1
  44. package/dist/modules/collabkin/index.js +1 -1
  45. package/dist/modules/comradecircle/index.cjs +14 -14
  46. package/dist/modules/comradecircle/index.cjs.map +1 -1
  47. package/dist/modules/comradecircle/index.js +1 -1
  48. package/dist/modules/conversations/index.cjs +14 -14
  49. package/dist/modules/conversations/index.cjs.map +1 -1
  50. package/dist/modules/conversations/index.js +1 -1
  51. package/dist/modules/coolandlovely/index.cjs +14 -14
  52. package/dist/modules/coolandlovely/index.cjs.map +1 -1
  53. package/dist/modules/coolandlovely/index.js +1 -1
  54. package/dist/modules/cosmicintersection/index.cjs +14 -14
  55. package/dist/modules/cosmicintersection/index.cjs.map +1 -1
  56. package/dist/modules/cosmicintersection/index.js +1 -1
  57. package/dist/modules/crewfoundry/index.cjs +14 -14
  58. package/dist/modules/crewfoundry/index.cjs.map +1 -1
  59. package/dist/modules/crewfoundry/index.js +1 -1
  60. package/dist/modules/devportal/index.cjs +14 -14
  61. package/dist/modules/devportal/index.cjs.map +1 -1
  62. package/dist/modules/devportal/index.js +1 -1
  63. package/dist/modules/ecoimpacthub/index.cjs +14 -14
  64. package/dist/modules/ecoimpacthub/index.cjs.map +1 -1
  65. package/dist/modules/ecoimpacthub/index.js +1 -1
  66. package/dist/modules/eventfullymanaged/index.cjs +14 -14
  67. package/dist/modules/eventfullymanaged/index.cjs.map +1 -1
  68. package/dist/modules/eventfullymanaged/index.js +1 -1
  69. package/dist/modules/export/index.cjs +14 -14
  70. package/dist/modules/export/index.cjs.map +1 -1
  71. package/dist/modules/export/index.js +1 -1
  72. package/dist/modules/files/index.cjs +14 -14
  73. package/dist/modules/files/index.cjs.map +1 -1
  74. package/dist/modules/files/index.js +1 -1
  75. package/dist/modules/ggnomad/index.cjs +14 -14
  76. package/dist/modules/ggnomad/index.cjs.map +1 -1
  77. package/dist/modules/ggnomad/index.js +1 -1
  78. package/dist/modules/govcitizenhub/index.cjs +14 -14
  79. package/dist/modules/govcitizenhub/index.cjs.map +1 -1
  80. package/dist/modules/govcitizenhub/index.js +1 -1
  81. package/dist/modules/groups/index.cjs +14 -14
  82. package/dist/modules/groups/index.cjs.map +1 -1
  83. package/dist/modules/groups/index.js +1 -1
  84. package/dist/modules/headshotmarketing/index.cjs +14 -14
  85. package/dist/modules/headshotmarketing/index.cjs.map +1 -1
  86. package/dist/modules/headshotmarketing/index.js +1 -1
  87. package/dist/modules/health/index.cjs +21 -19
  88. package/dist/modules/health/index.cjs.map +1 -1
  89. package/dist/modules/health/index.js +1 -1
  90. package/dist/modules/hookmovies/index.cjs +14 -14
  91. package/dist/modules/hookmovies/index.cjs.map +1 -1
  92. package/dist/modules/hookmovies/index.js +1 -1
  93. package/dist/modules/housingvista/index.cjs +14 -14
  94. package/dist/modules/housingvista/index.cjs.map +1 -1
  95. package/dist/modules/housingvista/index.js +1 -1
  96. package/dist/modules/integrations/index.cjs +14 -14
  97. package/dist/modules/integrations/index.cjs.map +1 -1
  98. package/dist/modules/integrations/index.js +1 -1
  99. package/dist/modules/intelwatchtower/index.cjs +14 -14
  100. package/dist/modules/intelwatchtower/index.cjs.map +1 -1
  101. package/dist/modules/intelwatchtower/index.js +1 -1
  102. package/dist/modules/kadaikodi/index.cjs +14 -14
  103. package/dist/modules/kadaikodi/index.cjs.map +1 -1
  104. package/dist/modules/kadaikodi/index.js +1 -1
  105. package/dist/modules/labsofscience/index.cjs +14 -14
  106. package/dist/modules/labsofscience/index.cjs.map +1 -1
  107. package/dist/modules/labsofscience/index.js +1 -1
  108. package/dist/modules/manufacturedops/index.cjs +14 -14
  109. package/dist/modules/manufacturedops/index.cjs.map +1 -1
  110. package/dist/modules/manufacturedops/index.js +1 -1
  111. package/dist/modules/movethewheels/index.cjs +14 -14
  112. package/dist/modules/movethewheels/index.cjs.map +1 -1
  113. package/dist/modules/movethewheels/index.js +1 -1
  114. package/dist/modules/mybodyshield/index.cjs +14 -14
  115. package/dist/modules/mybodyshield/index.cjs.map +1 -1
  116. package/dist/modules/mybodyshield/index.js +1 -1
  117. package/dist/modules/notifications/index.cjs +14 -14
  118. package/dist/modules/notifications/index.cjs.map +1 -1
  119. package/dist/modules/notifications/index.js +1 -1
  120. package/dist/modules/organizations/index.cjs +14 -14
  121. package/dist/modules/organizations/index.cjs.map +1 -1
  122. package/dist/modules/organizations/index.js +1 -1
  123. package/dist/modules/planmagnet/index.cjs +14 -14
  124. package/dist/modules/planmagnet/index.cjs.map +1 -1
  125. package/dist/modules/planmagnet/index.js +1 -1
  126. package/dist/modules/products/index.cjs +14 -14
  127. package/dist/modules/products/index.cjs.map +1 -1
  128. package/dist/modules/products/index.js +1 -1
  129. package/dist/modules/proserviceworld/index.cjs +14 -14
  130. package/dist/modules/proserviceworld/index.cjs.map +1 -1
  131. package/dist/modules/proserviceworld/index.js +1 -1
  132. package/dist/modules/rbac/index.cjs +14 -14
  133. package/dist/modules/rbac/index.cjs.map +1 -1
  134. package/dist/modules/rbac/index.js +1 -1
  135. package/dist/modules/sandbox/index.cjs +14 -14
  136. package/dist/modules/sandbox/index.cjs.map +1 -1
  137. package/dist/modules/sandbox/index.js +1 -1
  138. package/dist/modules/scheduler/index.cjs +14 -14
  139. package/dist/modules/scheduler/index.cjs.map +1 -1
  140. package/dist/modules/scheduler/index.js +1 -1
  141. package/dist/modules/security/index.cjs +14 -14
  142. package/dist/modules/security/index.cjs.map +1 -1
  143. package/dist/modules/security/index.js +1 -1
  144. package/dist/modules/semanticfed/index.cjs +14 -14
  145. package/dist/modules/semanticfed/index.cjs.map +1 -1
  146. package/dist/modules/semanticfed/index.js +1 -1
  147. package/dist/modules/store/index.cjs +14 -14
  148. package/dist/modules/store/index.cjs.map +1 -1
  149. package/dist/modules/store/index.js +1 -1
  150. package/dist/modules/subscriberbot/index.cjs +14 -14
  151. package/dist/modules/subscriberbot/index.cjs.map +1 -1
  152. package/dist/modules/subscriberbot/index.js +1 -1
  153. package/dist/modules/support/index.cjs +14 -14
  154. package/dist/modules/support/index.cjs.map +1 -1
  155. package/dist/modules/support/index.js +1 -1
  156. package/dist/modules/tags/index.cjs +14 -14
  157. package/dist/modules/tags/index.cjs.map +1 -1
  158. package/dist/modules/tags/index.js +1 -1
  159. package/dist/modules/technospam/index.cjs +14 -14
  160. package/dist/modules/technospam/index.cjs.map +1 -1
  161. package/dist/modules/technospam/index.js +1 -1
  162. package/dist/modules/theculturepost/index.cjs +14 -14
  163. package/dist/modules/theculturepost/index.cjs.map +1 -1
  164. package/dist/modules/theculturepost/index.js +1 -1
  165. package/dist/modules/theglobalfuel/index.cjs +14 -14
  166. package/dist/modules/theglobalfuel/index.cjs.map +1 -1
  167. package/dist/modules/theglobalfuel/index.js +1 -1
  168. package/dist/modules/timecampus/index.cjs +21 -16
  169. package/dist/modules/timecampus/index.cjs.map +1 -1
  170. package/dist/modules/timecampus/index.js +8 -3
  171. package/dist/modules/timecampus/index.js.map +1 -1
  172. package/dist/modules/tours/index.cjs +14 -14
  173. package/dist/modules/tours/index.cjs.map +1 -1
  174. package/dist/modules/tours/index.js +1 -1
  175. package/dist/modules/vibecontrols/index.cjs +14 -14
  176. package/dist/modules/vibecontrols/index.cjs.map +1 -1
  177. package/dist/modules/vibecontrols/index.js +2 -2
  178. package/dist/modules/workspaces/index.cjs +14 -14
  179. package/dist/modules/workspaces/index.cjs.map +1 -1
  180. package/dist/modules/workspaces/index.js +1 -1
  181. package/dist/{tool-name-DlnrBsZ6.d.ts → tool-name-BaPNMZdj.d.ts} +17 -1
  182. package/dist/{tool-name-CQf_IqAj.d.cts → tool-name-Bvb36qmq.d.cts} +17 -1
  183. package/package.json +1 -1
  184. package/dist/chunk-H2OYWLOA.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/result.ts","../../../src/core/tool-name.ts","../../../src/modules/crewfoundry/operations.ts","../../../src/modules/crewfoundry/tools/shared.ts","../../../src/modules/crewfoundry/tools/people.ts","../../../src/modules/crewfoundry/tools/recruitment.ts","../../../src/modules/crewfoundry/tools/attendance.ts","../../../src/modules/crewfoundry/tools/clients.ts","../../../src/modules/crewfoundry/tools/learning.ts","../../../src/modules/crewfoundry/tools/engagement.ts","../../../src/modules/crewfoundry/tools/overview.ts","../../../src/modules/crewfoundry/resources.ts","../../../src/modules/crewfoundry/prompts.ts","../../../src/modules/crewfoundry/index.ts"],"names":["z"],"mappings":";;;;;;;;;;;AA8BO,IAAM,gBAAA,GAAN,cAA+B,KAAA,CAAM;AAAA,EACjB,KAAA;AAAA,EAEzB,WAAA,CAAY,SAAiB,KAAA,EAAiB;AAC5C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,kBAAA;AACZ,IAAA,IAAA,CAAK,KAAA,GAAQ,KAAA;AAAA,EACf;AACF,CAAA;;;ACCO,SAAS,UAAA,CAAW,MAAe,UAAA,EAAkD;AAC1F,EAAA,MAAM,MAAA,GAAqB;AAAA,IACzB,OAAA,EAAS,CAAC,EAAE,IAAA,EAAM,MAAA,EAAQ,IAAA,EAAM,IAAA,CAAK,SAAA,CAAU,IAAA,EAAM,IAAA,EAAM,CAAC,CAAA,EAAG;AAAA,GACjE;AAIA,EAAA,OAAO,MAAA;AACT;AAaO,SAAS,WAAA,CAAY,SAAiB,IAAA,EAA2B;AACtE,EAAA,MAAM,IAAA,GAAO,IAAA,GAAO,CAAA,EAAG,OAAO;;AAAA,MAAA,EAAa,IAAI,CAAA,CAAA,GAAK,OAAA;AACpD,EAAA,OAAO,EAAE,OAAA,EAAS,CAAC,EAAE,IAAA,EAAM,QAAQ,IA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AA,EAAQ,KAAK,aAAa,CAAA;AACvD,IAAA,0BAAA,CAA2B,MAAA,EAAQ,KAAK,WAAW,CAAA;AAEnD,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,OAAA,EAAQ;AAAA,EACrC;AACF,CAAA;AAEA,IAAO,mBAAA,GAAQ","file":"index.cjs","sourcesContent":["/**\n * Error classes for MCP SDK.\n *\n * Modules MUST throw these instead of throwing raw Errors. The registerTool\n * wrapper in result.ts catches and maps them to MCP-protocol-compliant\n * `{ isError: true, content: [...] }` responses.\n *\n * Throwing past the wrapper to the protocol surfaces as JSON-RPC -32603 to\n * the client and is a protocol bug.\n */\n\nexport class McpUserError extends Error {\n public readonly hint: string | undefined;\n\n constructor(message: string, opts?: { hint?: string }) {\n super(message);\n this.name = 'McpUserError';\n this.hint = opts?.hint;\n }\n}\n\nexport class McpAuthError extends McpUserError {\n constructor(message: string, opts?: { hint?: string }) {\n super(message, {\n hint: opts?.hint ?? 'Run the auth_login tool to authenticate.',\n });\n this.name = 'McpAuthError';\n }\n}\n\nexport class McpInternalError extends Error {\n public override readonly cause: unknown;\n\n constructor(message: string, cause?: unknown) {\n super(message);\n this.name = 'McpInternalError';\n this.cause = cause;\n }\n}\n","/**\n * MCP tool result helpers + central handler.\n *\n * Modules NEVER call server.registerTool directly — they use registerTool()\n * from this module so the central try/catch wraps the handler and:\n * - maps thrown McpUserError / McpAuthError / McpInternalError to\n * MCP-protocol-compliant `{ isError: true, content: [...] }` shapes\n * - threads `_meta.progressToken` into ctx.progress for long ops\n * - emits a structured log line on every error\n * - never leaks `cause` from McpInternalError to the client\n *\n * This is the analog of cli-sdk's createProgram() central error handler.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { ZodRawShape } from 'zod';\nimport type { McpContext } from './context.js';\nimport { McpAuthError, McpInternalError, McpUserError } from './errors.js';\n\nexport interface ToolTextContent {\n type: 'text';\n text: string;\n [k: string]: unknown;\n}\n\nexport interface ToolResult {\n content: ToolTextContent[];\n isError?: boolean;\n structuredContent?: Record<string, unknown>;\n [k: string]: unknown;\n}\n\nexport interface ToolMeta {\n progressToken?: string | number;\n}\n\n/**\n * Build a successful tool result with JSON content (pretty-printed).\n */\nexport function jsonResult(data: unknown, structured?: Record<string, unknown>): ToolResult {\n const result: ToolResult = {\n content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],\n };\n if (structured !== undefined) {\n result.structuredContent = structured;\n }\n return result;\n}\n\n/**\n * Build a successful tool result with plain text content.\n */\nexport function textResult(text: string): ToolResult {\n return { content: [{ type: 'text', text }] };\n}\n\n/**\n * Build an error tool result. Honors MCP's `{ isError: true, content }` shape.\n * Optional hint is appended on a new line so the LLM can react.\n */\nexport function errorResult(message: string, hint?: string): ToolResult {\n const text = hint ? `${message}\\n\\nHint: ${hint}` : message;\n return { content: [{ type: 'text', text }], isError: true };\n}\n\nexport interface ToolMetadata {\n title: string;\n description: string;\n inputSchema?: ZodRawShape;\n}\n\nexport type ToolHandler<TArgs = Record<string, unknown>> = (\n args: TArgs,\n ctx: McpContext,\n meta: ToolMeta,\n) => Promise<unknown>;\n\n/**\n * Register a tool with the central error wrapper.\n *\n * The handler returns a plain value or void. The wrapper:\n * - wraps non-undefined returns in jsonResult()\n * - if the value already looks like a ToolResult (has `content`), passes through\n * - catches McpAuthError / McpUserError / McpInternalError / generic Error\n * - logs every error via ctx.logger.error\n */\nexport function registerTool<TArgs extends Record<string, unknown>>(\n server: McpServer,\n ctx: McpContext,\n name: string,\n metadata: ToolMetadata,\n handler: ToolHandler<TArgs>,\n): void {\n const sdkConfig = {\n title: metadata.title,\n description: metadata.description,\n ...(metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {}),\n };\n\n // The MCP SDK's registerTool signature is `(name, config, handler)`. The\n // handler arity depends on whether inputSchema is present (1-arg without,\n // 2-arg with). We accept a unified handler shape and dispatch at runtime.\n // The SDK's typing is strict and conditional on the inputSchema generic;\n // bypass with a cast since runtime acceptance is unconditional.\n const wrapped = async (...callbackArgs: unknown[]): Promise<ToolResult> => {\n const hasArgs = callbackArgs.length === 2;\n const args = (hasArgs ? callbackArgs[0] : {}) as TArgs;\n const extra = (hasArgs ? callbackArgs[1] : callbackArgs[0]) as\n | { _meta?: { progressToken?: string | number } }\n | undefined;\n\n const progressToken = extra?._meta?.progressToken;\n const meta: ToolMeta = progressToken !== undefined ? { progressToken } : {};\n\n try {\n const result = await handler(args, ctx, meta);\n if (isToolResult(result)) return result;\n if (result === undefined) return textResult('OK');\n return jsonResult(result);\n } catch (error) {\n return mapErrorToResult(error, ctx, name);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (server as any).registerTool(name, sdkConfig, wrapped);\n}\n\nfunction isToolResult(value: unknown): value is ToolResult {\n return (\n !!value &&\n typeof value === 'object' &&\n 'content' in value &&\n Array.isArray((value as ToolResult).content)\n );\n}\n\nfunction mapErrorToResult(error: unknown, ctx: McpContext, toolName: string): ToolResult {\n if (error instanceof McpAuthError) {\n ctx.logger.warn(`${toolName}: auth required`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpUserError) {\n ctx.logger.info(`${toolName}: user error`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpInternalError) {\n ctx.logger.error(`${toolName}: internal error`, {\n message: error.message,\n cause: stringifyCause(error.cause),\n });\n return errorResult(`Internal error in ${toolName}.`);\n }\n const message = error instanceof Error ? error.message : String(error);\n ctx.logger.error(`${toolName}: unhandled error`, { message });\n return errorResult(`${toolName}: ${message}`);\n}\n\nfunction stringifyCause(cause: unknown): string | undefined {\n if (cause === undefined || cause === null) return undefined;\n if (cause instanceof Error) return cause.message;\n try {\n return JSON.stringify(cause);\n } catch {\n return String(cause);\n }\n}\n","/**\n * Tool / resource / prompt naming helpers.\n *\n * Mandatory product prefix avoids collisions when Claude Desktop runs\n * multiple MCP servers concurrently (typical setup is ~6).\n *\n * Tool names are capped at 63 characters — Claude Desktop pre-1.x\n * truncated at 64 in some versions.\n */\n\nimport { McpInternalError } from './errors.js';\n\nconst MAX_TOOL_NAME_LENGTH = 63;\n\nfunction assertSafeName(name: string, kind: 'tool' | 'resource' | 'prompt'): string {\n if (kind === 'tool' && name.length > MAX_TOOL_NAME_LENGTH) {\n throw new McpInternalError(\n `Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`,\n );\n }\n return name;\n}\n\n/**\n * Build a tool name. Format: `<productName>_<...parts>` (snake_case).\n * Example: mcpToolName('vibecontrols', 'vibes', 'list') -> 'vibecontrols_vibes_list'\n */\nexport function mcpToolName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpToolName: productName is required');\n }\n const name = [productName, ...parts].filter(Boolean).join('_');\n return assertSafeName(name, 'tool');\n}\n\n/**\n * Build a resource URI. Format: `<productName>://<...parts>`.\n * Example: mcpResourceUri('vibecontrols', 'schema') -> 'vibecontrols://schema'\n */\nexport function mcpResourceUri(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpResourceUri: productName is required');\n }\n return `${productName}://${parts.filter(Boolean).join('/')}`;\n}\n\n/**\n * Build a prompt name. Format: `<productName>-<...parts>` (kebab-case).\n * Example: mcpPromptName('vibecontrols', 'setup') -> 'vibecontrols-setup'\n */\nexport function mcpPromptName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpPromptName: productName is required');\n }\n return [productName, ...parts].filter(Boolean).join('-');\n}\n\nexport const TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;\n","/**\n * Centralized GraphQL operations for the Crewfoundry MCP module.\n *\n * Crewfoundry is the workforce / HR / crew-operations platform (future-products\n * ecosystem). Backend subgraph:\n * ~/products/wspace/crewfoundry/wspace-crewfoundry-svc/ (Hive service name\n * `crewfoundry`).\n *\n * All operations run against the WORKSPACE gateway. Workspace scoping is carried\n * by the gateway headers (x-workspace-id / X-Workspace-Authorization) issued by\n * the auth module — Crewfoundry inputs do NOT carry a workspaceId.\n *\n * The backend exposes a SINGLE read entrypoint, `crewfoundryBootstrap`, that\n * returns every collection. Per-entity \"list\" operations therefore select only\n * the one collection they need from that bootstrap query (real field selection —\n * the backend resolves only the requested field). Mutations carry the real\n * server-side root names (create / update / remove / mark notifications), some\n * of which are inconsistently prefixed — every one is called by its REAL name\n * here.\n *\n * Uses template-string interpolation (not gql tagged fragments) to match the\n * canonical vibecontrols / kadaikodi modules' operations files.\n */\n\n// ---------------------------------------------------------------------------\n// Field fragments (mirror the backend object types)\n// ---------------------------------------------------------------------------\n\nexport const EMPLOYEE_FIELDS = `\n id firstName lastName email phone position department location type status\n salary performanceScore startDate managerId avatar workspaceId\n`;\n\nexport const DEPARTMENT_FIELDS = `\n id name headId headName employeeCount budget location status workspaceId\n`;\n\nexport const TEAM_FIELDS = `\n id name description department leadId leadName memberCount members\n projectCount status createdAt workspaceId\n`;\n\nexport const CANDIDATE_FIELDS = `\n id firstName lastName email phone position experience currentCompany source\n status rating appliedDate resumeUrl skills notes workspaceId\n`;\n\nexport const JOB_POSTING_FIELDS = `\n id title department location type experienceLevel description requirements\n benefits salaryMin salaryMax status applicants postedDate deadline workspaceId\n`;\n\nexport const INTERVIEW_FIELDS = `\n id candidateId candidateName position interviewerName type date time status\n rating feedback workspaceId\n`;\n\nexport const LEAVE_REQUEST_FIELDS = `\n id employeeId employeeName department type startDate endDate days reason\n status approverName workspaceId\n`;\n\nexport const TIME_ENTRY_FIELDS = `\n id employeeId employeeName date clockIn clockOut totalHours overtime project\n status workspaceId\n`;\n\nexport const PAYROLL_FIELDS = `\n id employeeId employeeName department period grossPay deductions netPay status\n payDate paymentMethod workspaceId\n`;\n\nexport const CLIENT_FIELDS = `\n id name industry contactPerson email phone status projects revenue since\n workspaceId\n`;\n\nexport const INVOICE_FIELDS = `\n id number clientName amount status issueDate dueDate items workspaceId\n`;\n\nexport const PROJECT_FIELDS = `\n id name description status priority progress budget spent startDate endDate\n managerId managerName teamId teamName tasks completedTasks workspaceId\n`;\n\nexport const VENDOR_FIELDS = `\n id name category contactPerson email phone status rating contractValue\n workspaceId\n`;\n\nexport const COURSE_FIELDS = `\n id title description category level instructor duration modules enrolled\n completed rating skills status thumbnail workspaceId\n`;\n\nexport const LEARNING_PATH_FIELDS = `\n id title description level duration courses enrolled completionRate workspaceId\n`;\n\nexport const ANNOUNCEMENT_FIELDS = `\n id title content author authorRole category priority isPinned tags viewCount\n createdAt workspaceId\n`;\n\nexport const NOTIFICATION_FIELDS = `\n id title message type category read actionUrl createdAt workspaceId\n`;\n\nexport const MARKETPLACE_SERVICE_FIELDS = `\n id title description category provider price priceType rating reviews\n deliveryTime skills status workspaceId\n`;\n\n// ---------------------------------------------------------------------------\n// Bootstrap-scoped list operations (single backend query `crewfoundryBootstrap`)\n// ---------------------------------------------------------------------------\n\nexport const LIST_EMPLOYEES = `\n query CrewfoundryListEmployees {\n crewfoundryBootstrap { employees { ${EMPLOYEE_FIELDS} } }\n }\n`;\n\nexport const LIST_DEPARTMENTS = `\n query CrewfoundryListDepartments {\n crewfoundryBootstrap { departments { ${DEPARTMENT_FIELDS} } }\n }\n`;\n\nexport const LIST_TEAMS = `\n query CrewfoundryListTeams {\n crewfoundryBootstrap { teams { ${TEAM_FIELDS} } }\n }\n`;\n\nexport const LIST_CANDIDATES = `\n query CrewfoundryListCandidates {\n crewfoundryBootstrap { candidates { ${CANDIDATE_FIELDS} } }\n }\n`;\n\nexport const LIST_JOB_POSTINGS = `\n query CrewfoundryListJobPostings {\n crewfoundryBootstrap { jobPostings { ${JOB_POSTING_FIELDS} } }\n }\n`;\n\nexport const LIST_INTERVIEWS = `\n query CrewfoundryListInterviews {\n crewfoundryBootstrap { interviews { ${INTERVIEW_FIELDS} } }\n }\n`;\n\nexport const LIST_LEAVE_REQUESTS = `\n query CrewfoundryListLeaveRequests {\n crewfoundryBootstrap { leaveRequests { ${LEAVE_REQUEST_FIELDS} } }\n }\n`;\n\nexport const LIST_TIME_ENTRIES = `\n query CrewfoundryListTimeEntries {\n crewfoundryBootstrap { timeEntries { ${TIME_ENTRY_FIELDS} } }\n }\n`;\n\nexport const LIST_PAYROLL_RECORDS = `\n query CrewfoundryListPayrollRecords {\n crewfoundryBootstrap { payrollRecords { ${PAYROLL_FIELDS} } }\n }\n`;\n\nexport const LIST_CLIENTS = `\n query CrewfoundryListClients {\n crewfoundryBootstrap { clients { ${CLIENT_FIELDS} } }\n }\n`;\n\nexport const LIST_INVOICES = `\n query CrewfoundryListInvoices {\n crewfoundryBootstrap { invoices { ${INVOICE_FIELDS} } }\n }\n`;\n\nexport const LIST_PROJECTS = `\n query CrewfoundryListProjects {\n crewfoundryBootstrap { projects { ${PROJECT_FIELDS} } }\n }\n`;\n\nexport const LIST_VENDORS = `\n query CrewfoundryListVendors {\n crewfoundryBootstrap { vendors { ${VENDOR_FIELDS} } }\n }\n`;\n\nexport const LIST_COURSES = `\n query CrewfoundryListCourses {\n crewfoundryBootstrap { courses { ${COURSE_FIELDS} } }\n }\n`;\n\nexport const LIST_LEARNING_PATHS = `\n query CrewfoundryListLearningPaths {\n crewfoundryBootstrap { learningPaths { ${LEARNING_PATH_FIELDS} } }\n }\n`;\n\nexport const LIST_ANNOUNCEMENTS = `\n query CrewfoundryListAnnouncements {\n crewfoundryBootstrap { announcements { ${ANNOUNCEMENT_FIELDS} } }\n }\n`;\n\nexport const LIST_NOTIFICATIONS = `\n query CrewfoundryListNotifications {\n crewfoundryBootstrap { notifications { ${NOTIFICATION_FIELDS} } }\n }\n`;\n\nexport const LIST_MARKETPLACE_SERVICES = `\n query CrewfoundryListMarketplaceServices {\n crewfoundryBootstrap { marketplaceServices { ${MARKETPLACE_SERVICE_FIELDS} } }\n }\n`;\n\nexport const BOOTSTRAP_OVERVIEW = `\n query CrewfoundryOverview {\n crewfoundryBootstrap {\n employees { ${EMPLOYEE_FIELDS} }\n departments { ${DEPARTMENT_FIELDS} }\n teams { ${TEAM_FIELDS} }\n candidates { ${CANDIDATE_FIELDS} }\n jobPostings { ${JOB_POSTING_FIELDS} }\n interviews { ${INTERVIEW_FIELDS} }\n leaveRequests { ${LEAVE_REQUEST_FIELDS} }\n timeEntries { ${TIME_ENTRY_FIELDS} }\n payrollRecords { ${PAYROLL_FIELDS} }\n clients { ${CLIENT_FIELDS} }\n invoices { ${INVOICE_FIELDS} }\n projects { ${PROJECT_FIELDS} }\n vendors { ${VENDOR_FIELDS} }\n courses { ${COURSE_FIELDS} }\n learningPaths { ${LEARNING_PATH_FIELDS} }\n announcements { ${ANNOUNCEMENT_FIELDS} }\n notifications { ${NOTIFICATION_FIELDS} }\n marketplaceServices { ${MARKETPLACE_SERVICE_FIELDS} }\n }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Employee mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_EMPLOYEE = `\n mutation CrewfoundryCreateEmployee($input: CreateCrewEmployeeInput!) {\n createCrewEmployee(input: $input) { ${EMPLOYEE_FIELDS} }\n }\n`;\n\nexport const UPDATE_EMPLOYEE = `\n mutation CrewfoundryUpdateEmployee($id: ID!, $input: UpdateCrewEmployeeInput!) {\n updateCrewEmployee(id: $id, input: $input) { ${EMPLOYEE_FIELDS} }\n }\n`;\n\nexport const REMOVE_EMPLOYEE = `\n mutation CrewfoundryRemoveEmployee($id: ID!) {\n removeCrewEmployee(id: $id)\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Candidate mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_CANDIDATE = `\n mutation CrewfoundryCreateCandidate($input: CreateCrewCandidateInput!) {\n createCrewCandidate(input: $input) { ${CANDIDATE_FIELDS} }\n }\n`;\n\nexport const UPDATE_CANDIDATE = `\n mutation CrewfoundryUpdateCandidate($id: ID!, $input: UpdateCrewCandidateInput!) {\n updateCrewCandidate(id: $id, input: $input) { ${CANDIDATE_FIELDS} }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Job-posting mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_JOB_POSTING = `\n mutation CrewfoundryCreateJobPosting($input: CreateCrewJobPostingInput!) {\n createCrewJobPosting(input: $input) { ${JOB_POSTING_FIELDS} }\n }\n`;\n\nexport const UPDATE_JOB_POSTING = `\n mutation CrewfoundryUpdateJobPosting($id: ID!, $input: UpdateCrewJobPostingInput!) {\n updateCrewJobPosting(id: $id, input: $input) { ${JOB_POSTING_FIELDS} }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Leave-request mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_LEAVE_REQUEST = `\n mutation CrewfoundryCreateLeaveRequest($input: CreateCrewLeaveRequestInput!) {\n createCrewLeaveRequest(input: $input) { ${LEAVE_REQUEST_FIELDS} }\n }\n`;\n\nexport const UPDATE_LEAVE_REQUEST = `\n mutation CrewfoundryUpdateLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) {\n updateCrewLeaveRequest(id: $id, input: $input) { ${LEAVE_REQUEST_FIELDS} }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Announcement + notification mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_ANNOUNCEMENT = `\n mutation CrewfoundryCreateAnnouncement($input: CreateCrewAnnouncementInput!) {\n createCrewAnnouncement(input: $input) { ${ANNOUNCEMENT_FIELDS} }\n }\n`;\n\nexport const MARK_NOTIFICATION_READ = `\n mutation CrewfoundryMarkNotificationRead($id: ID!) {\n markCrewNotificationRead(id: $id)\n }\n`;\n\nexport const MARK_ALL_NOTIFICATIONS_READ = `\n mutation CrewfoundryMarkAllNotificationsRead {\n markAllCrewNotificationsRead\n }\n`;\n","/**\n * Shared zod schemas for the Crewfoundry tool surface.\n *\n * The Crewfoundry backend models status/type/category/priority as free-form\n * `String` (no GraphQL enums), so this module does NOT mirror enums the way\n * kadaikodi does — it exposes them as described strings instead. What IS shared\n * across the create/update tool files are the `DateTime` scalar inputs, modelled\n * here as an ISO-8601 string so Claude Desktop grounds tool calls consistently.\n */\n\nimport { z } from 'zod';\n\n/** ISO-8601 datetime string for `DateTime` scalar inputs. */\nexport const IsoDateTime = z\n .string()\n .describe('ISO-8601 datetime, e.g. \"2026-06-26T09:00:00.000Z\"');\n","/**\n * Crewfoundry people tools — the core workforce directory.\n *\n * Surface (6): employees_{list,create,update,remove}, departments_list, teams_list.\n * Lists read the single `crewfoundryBootstrap` query (selecting only the needed\n * collection); employee writes map to the real createCrewEmployee /\n * updateCrewEmployee / removeCrewEmployee mutations.\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\nimport { IsoDateTime } from './shared.js';\n\nexport function registerPeopleTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'employees_list')),\n {\n title: 'List Employees',\n description: 'List all employees in the bound workspace (from the crewfoundry bootstrap).',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { employees: Array<Record<string, unknown>> };\n }>(ops.LIST_EMPLOYEES, {});\n return jsonResult(data.crewfoundryBootstrap.employees);\n } catch (error) {\n ctx.logger.error('crewfoundry employees_list failed', { error: String(error) });\n return errorResult(\n `Failed to list employees: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'employees_create')),\n {\n title: 'Create Employee',\n description: 'Add a new employee to the workspace directory.',\n inputSchema: {\n firstName: z.string().min(1).describe('First name'),\n lastName: z.string().min(1).describe('Last name'),\n email: z.string().min(1).describe('Work email'),\n phone: z.string().min(1).describe('Contact phone'),\n position: z.string().min(1).describe('Job title / position'),\n department: z.string().min(1).describe('Department name'),\n location: z.string().min(1).describe('Work location'),\n type: z.string().min(1).describe('Employment type, e.g. \"full-time\" / \"contract\"'),\n status: z.string().min(1).describe('Employment status, e.g. \"active\" / \"on-leave\"'),\n salary: z.number().describe('Annual/period salary'),\n performanceScore: z.number().describe('Performance score (e.g. 0–5 or 0–100)'),\n startDate: IsoDateTime.describe('Start date (ISO-8601)'),\n managerId: z.string().optional().describe('Manager employee ID'),\n avatar: z.string().optional().describe('Avatar image URL'),\n },\n },\n async ({\n firstName,\n lastName,\n email,\n phone,\n position,\n department,\n location,\n type,\n status,\n salary,\n performanceScore,\n startDate,\n managerId,\n avatar,\n }) => {\n try {\n const input: Record<string, unknown> = {\n firstName,\n lastName,\n email,\n phone,\n position,\n department,\n location,\n type,\n status,\n salary,\n performanceScore,\n startDate,\n };\n if (managerId !== undefined) input.managerId = managerId;\n if (avatar !== undefined) input.avatar = avatar;\n\n const data = await ctx.gql.workspace.request<{\n createCrewEmployee: Record<string, unknown>;\n }>(ops.CREATE_EMPLOYEE, { input });\n return jsonResult(data.createCrewEmployee);\n } catch (error) {\n ctx.logger.error('crewfoundry employees_create failed', { error: String(error) });\n return errorResult(\n `Failed to create employee: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'employees_update')),\n {\n title: 'Update Employee',\n description: 'Update an employee. At least one mutable field must be provided.',\n inputSchema: {\n id: z.string().describe('Employee ID'),\n firstName: z.string().optional().describe('Updated first name'),\n lastName: z.string().optional().describe('Updated last name'),\n email: z.string().optional().describe('Updated email'),\n phone: z.string().optional().describe('Updated phone'),\n position: z.string().optional().describe('Updated position'),\n department: z.string().optional().describe('Updated department'),\n location: z.string().optional().describe('Updated location'),\n type: z.string().optional().describe('Updated employment type'),\n status: z.string().optional().describe('Updated employment status'),\n salary: z.number().optional().describe('Updated salary'),\n performanceScore: z.number().optional().describe('Updated performance score'),\n startDate: IsoDateTime.optional().describe('Updated start date (ISO-8601)'),\n managerId: z.string().optional().describe('Updated manager employee ID'),\n avatar: z.string().optional().describe('Updated avatar URL'),\n },\n },\n async ({\n id,\n firstName,\n lastName,\n email,\n phone,\n position,\n department,\n location,\n type,\n status,\n salary,\n performanceScore,\n startDate,\n managerId,\n avatar,\n }) => {\n try {\n const input: Record<string, unknown> = {};\n if (firstName !== undefined) input.firstName = firstName;\n if (lastName !== undefined) input.lastName = lastName;\n if (email !== undefined) input.email = email;\n if (phone !== undefined) input.phone = phone;\n if (position !== undefined) input.position = position;\n if (department !== undefined) input.department = department;\n if (location !== undefined) input.location = location;\n if (type !== undefined) input.type = type;\n if (status !== undefined) input.status = status;\n if (salary !== undefined) input.salary = salary;\n if (performanceScore !== undefined) input.performanceScore = performanceScore;\n if (startDate !== undefined) input.startDate = startDate;\n if (managerId !== undefined) input.managerId = managerId;\n if (avatar !== undefined) input.avatar = avatar;\n\n if (Object.keys(input).length === 0) {\n return errorResult('No updates specified — provide at least one mutable field');\n }\n\n const data = await ctx.gql.workspace.request<{\n updateCrewEmployee: Record<string, unknown>;\n }>(ops.UPDATE_EMPLOYEE, { id, input });\n return jsonResult(data.updateCrewEmployee);\n } catch (error) {\n ctx.logger.error('crewfoundry employees_update failed', { error: String(error) });\n return errorResult(\n `Failed to update employee: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'employees_remove')),\n {\n title: 'Remove Employee',\n description: 'Remove (offboard) an employee from the workspace directory.',\n inputSchema: { id: z.string().describe('Employee ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ removeCrewEmployee: boolean }>(\n ops.REMOVE_EMPLOYEE,\n { id },\n );\n return jsonResult({ ok: data.removeCrewEmployee, id });\n } catch (error) {\n ctx.logger.error('crewfoundry employees_remove failed', { error: String(error) });\n return errorResult(\n `Failed to remove employee: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'departments_list')),\n {\n title: 'List Departments',\n description: 'List all departments in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { departments: Array<Record<string, unknown>> };\n }>(ops.LIST_DEPARTMENTS, {});\n return jsonResult(data.crewfoundryBootstrap.departments);\n } catch (error) {\n ctx.logger.error('crewfoundry departments_list failed', { error: String(error) });\n return errorResult(\n `Failed to list departments: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'teams_list')),\n {\n title: 'List Teams',\n description: 'List all teams in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { teams: Array<Record<string, unknown>> };\n }>(ops.LIST_TEAMS, {});\n return jsonResult(data.crewfoundryBootstrap.teams);\n } catch (error) {\n ctx.logger.error('crewfoundry teams_list failed', { error: String(error) });\n return errorResult(\n `Failed to list teams: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry recruitment tools — applicant tracking + hiring pipeline.\n *\n * Surface (7): candidates_{list,create,update}, job_postings_{list,create,update},\n * interviews_list. Lists read the `crewfoundryBootstrap` query; writes map to the\n * real createCrewCandidate / updateCrewCandidate / createCrewJobPosting /\n * updateCrewJobPosting mutations. Interviews are read-only (no backend mutation).\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\nimport { IsoDateTime } from './shared.js';\n\nexport function registerRecruitmentTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // ── Candidates ────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'candidates_list')),\n {\n title: 'List Candidates',\n description: 'List all recruitment candidates in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { candidates: Array<Record<string, unknown>> };\n }>(ops.LIST_CANDIDATES, {});\n return jsonResult(data.crewfoundryBootstrap.candidates);\n } catch (error) {\n ctx.logger.error('crewfoundry candidates_list failed', { error: String(error) });\n return errorResult(\n `Failed to list candidates: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'candidates_create')),\n {\n title: 'Create Candidate',\n description: 'Add a new recruitment candidate to the pipeline.',\n inputSchema: {\n firstName: z.string().min(1).describe('First name'),\n lastName: z.string().min(1).describe('Last name'),\n email: z.string().min(1).describe('Candidate email'),\n phone: z.string().min(1).describe('Candidate phone'),\n position: z.string().min(1).describe('Position applied for'),\n experience: z.number().int().describe('Years of experience'),\n rating: z.number().describe('Recruiter rating (e.g. 0–5)'),\n source: z.string().min(1).describe('Sourcing channel, e.g. \"referral\" / \"linkedin\"'),\n status: z.string().min(1).describe('Pipeline status, e.g. \"applied\" / \"screening\"'),\n skills: z.array(z.string()).describe('Skill tags'),\n appliedDate: IsoDateTime.describe('Applied date (ISO-8601)'),\n currentCompany: z.string().optional().describe('Current employer'),\n resumeUrl: z.string().optional().describe('Resume URL'),\n notes: z.string().optional().describe('Recruiter notes'),\n },\n },\n async ({\n firstName,\n lastName,\n email,\n phone,\n position,\n experience,\n rating,\n source,\n status,\n skills,\n appliedDate,\n currentCompany,\n resumeUrl,\n notes,\n }) => {\n try {\n const input: Record<string, unknown> = {\n firstName,\n lastName,\n email,\n phone,\n position,\n experience,\n rating,\n source,\n status,\n skills,\n appliedDate,\n };\n if (currentCompany !== undefined) input.currentCompany = currentCompany;\n if (resumeUrl !== undefined) input.resumeUrl = resumeUrl;\n if (notes !== undefined) input.notes = notes;\n\n const data = await ctx.gql.workspace.request<{\n createCrewCandidate: Record<string, unknown>;\n }>(ops.CREATE_CANDIDATE, { input });\n return jsonResult(data.createCrewCandidate);\n } catch (error) {\n ctx.logger.error('crewfoundry candidates_create failed', { error: String(error) });\n return errorResult(\n `Failed to create candidate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'candidates_update')),\n {\n title: 'Update Candidate',\n description: 'Update a candidate. At least one mutable field must be provided.',\n inputSchema: {\n id: z.string().describe('Candidate ID'),\n firstName: z.string().optional().describe('Updated first name'),\n lastName: z.string().optional().describe('Updated last name'),\n email: z.string().optional().describe('Updated email'),\n phone: z.string().optional().describe('Updated phone'),\n position: z.string().optional().describe('Updated position'),\n experience: z.number().int().optional().describe('Updated years of experience'),\n rating: z.number().optional().describe('Updated rating'),\n source: z.string().optional().describe('Updated sourcing channel'),\n status: z.string().optional().describe('Updated pipeline status'),\n skills: z.array(z.string()).optional().describe('Updated skill tags'),\n appliedDate: IsoDateTime.optional().describe('Updated applied date (ISO-8601)'),\n currentCompany: z.string().optional().describe('Updated current employer'),\n resumeUrl: z.string().optional().describe('Updated resume URL'),\n notes: z.string().optional().describe('Updated recruiter notes'),\n },\n },\n async ({\n id,\n firstName,\n lastName,\n email,\n phone,\n position,\n experience,\n rating,\n source,\n status,\n skills,\n appliedDate,\n currentCompany,\n resumeUrl,\n notes,\n }) => {\n try {\n const input: Record<string, unknown> = {};\n if (firstName !== undefined) input.firstName = firstName;\n if (lastName !== undefined) input.lastName = lastName;\n if (email !== undefined) input.email = email;\n if (phone !== undefined) input.phone = phone;\n if (position !== undefined) input.position = position;\n if (experience !== undefined) input.experience = experience;\n if (rating !== undefined) input.rating = rating;\n if (source !== undefined) input.source = source;\n if (status !== undefined) input.status = status;\n if (skills !== undefined) input.skills = skills;\n if (appliedDate !== undefined) input.appliedDate = appliedDate;\n if (currentCompany !== undefined) input.currentCompany = currentCompany;\n if (resumeUrl !== undefined) input.resumeUrl = resumeUrl;\n if (notes !== undefined) input.notes = notes;\n\n if (Object.keys(input).length === 0) {\n return errorResult('No updates specified — provide at least one mutable field');\n }\n\n const data = await ctx.gql.workspace.request<{\n updateCrewCandidate: Record<string, unknown>;\n }>(ops.UPDATE_CANDIDATE, { id, input });\n return jsonResult(data.updateCrewCandidate);\n } catch (error) {\n ctx.logger.error('crewfoundry candidates_update failed', { error: String(error) });\n return errorResult(\n `Failed to update candidate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Job postings ──────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'job_postings_list')),\n {\n title: 'List Job Postings',\n description: 'List all job postings in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { jobPostings: Array<Record<string, unknown>> };\n }>(ops.LIST_JOB_POSTINGS, {});\n return jsonResult(data.crewfoundryBootstrap.jobPostings);\n } catch (error) {\n ctx.logger.error('crewfoundry job_postings_list failed', { error: String(error) });\n return errorResult(\n `Failed to list job postings: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'job_postings_create')),\n {\n title: 'Create Job Posting',\n description: 'Open a new job posting / requisition.',\n inputSchema: {\n title: z.string().min(1).describe('Job title'),\n department: z.string().min(1).describe('Department'),\n location: z.string().min(1).describe('Work location'),\n type: z.string().min(1).describe('Employment type, e.g. \"full-time\"'),\n experienceLevel: z.string().min(1).describe('Experience level, e.g. \"senior\"'),\n description: z.string().min(1).describe('Role description'),\n requirements: z.array(z.string()).describe('Requirement bullet points'),\n benefits: z.array(z.string()).describe('Benefit bullet points'),\n salaryMin: z.number().describe('Minimum salary'),\n salaryMax: z.number().describe('Maximum salary'),\n status: z.string().min(1).describe('Posting status, e.g. \"open\" / \"closed\"'),\n applicants: z.number().int().describe('Current applicant count'),\n postedDate: IsoDateTime.describe('Posted date (ISO-8601)'),\n deadline: IsoDateTime.optional().describe('Application deadline (ISO-8601)'),\n },\n },\n async ({\n title,\n department,\n location,\n type,\n experienceLevel,\n description,\n requirements,\n benefits,\n salaryMin,\n salaryMax,\n status,\n applicants,\n postedDate,\n deadline,\n }) => {\n try {\n const input: Record<string, unknown> = {\n title,\n department,\n location,\n type,\n experienceLevel,\n description,\n requirements,\n benefits,\n salaryMin,\n salaryMax,\n status,\n applicants,\n postedDate,\n };\n if (deadline !== undefined) input.deadline = deadline;\n\n const data = await ctx.gql.workspace.request<{\n createCrewJobPosting: Record<string, unknown>;\n }>(ops.CREATE_JOB_POSTING, { input });\n return jsonResult(data.createCrewJobPosting);\n } catch (error) {\n ctx.logger.error('crewfoundry job_postings_create failed', { error: String(error) });\n return errorResult(\n `Failed to create job posting: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'job_postings_update')),\n {\n title: 'Update Job Posting',\n description: 'Update a job posting. At least one mutable field must be provided.',\n inputSchema: {\n id: z.string().describe('Job posting ID'),\n title: z.string().optional().describe('Updated title'),\n department: z.string().optional().describe('Updated department'),\n location: z.string().optional().describe('Updated location'),\n type: z.string().optional().describe('Updated employment type'),\n experienceLevel: z.string().optional().describe('Updated experience level'),\n description: z.string().optional().describe('Updated description'),\n requirements: z.array(z.string()).optional().describe('Updated requirements'),\n benefits: z.array(z.string()).optional().describe('Updated benefits'),\n salaryMin: z.number().optional().describe('Updated minimum salary'),\n salaryMax: z.number().optional().describe('Updated maximum salary'),\n status: z.string().optional().describe('Updated status'),\n applicants: z.number().int().optional().describe('Updated applicant count'),\n postedDate: IsoDateTime.optional().describe('Updated posted date (ISO-8601)'),\n deadline: IsoDateTime.optional().describe('Updated deadline (ISO-8601)'),\n },\n },\n async ({\n id,\n title,\n department,\n location,\n type,\n experienceLevel,\n description,\n requirements,\n benefits,\n salaryMin,\n salaryMax,\n status,\n applicants,\n postedDate,\n deadline,\n }) => {\n try {\n const input: Record<string, unknown> = {};\n if (title !== undefined) input.title = title;\n if (department !== undefined) input.department = department;\n if (location !== undefined) input.location = location;\n if (type !== undefined) input.type = type;\n if (experienceLevel !== undefined) input.experienceLevel = experienceLevel;\n if (description !== undefined) input.description = description;\n if (requirements !== undefined) input.requirements = requirements;\n if (benefits !== undefined) input.benefits = benefits;\n if (salaryMin !== undefined) input.salaryMin = salaryMin;\n if (salaryMax !== undefined) input.salaryMax = salaryMax;\n if (status !== undefined) input.status = status;\n if (applicants !== undefined) input.applicants = applicants;\n if (postedDate !== undefined) input.postedDate = postedDate;\n if (deadline !== undefined) input.deadline = deadline;\n\n if (Object.keys(input).length === 0) {\n return errorResult('No updates specified — provide at least one mutable field');\n }\n\n const data = await ctx.gql.workspace.request<{\n updateCrewJobPosting: Record<string, unknown>;\n }>(ops.UPDATE_JOB_POSTING, { id, input });\n return jsonResult(data.updateCrewJobPosting);\n } catch (error) {\n ctx.logger.error('crewfoundry job_postings_update failed', { error: String(error) });\n return errorResult(\n `Failed to update job posting: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Interviews (read-only) ────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'interviews_list')),\n {\n title: 'List Interviews',\n description: 'List all scheduled interviews in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { interviews: Array<Record<string, unknown>> };\n }>(ops.LIST_INTERVIEWS, {});\n return jsonResult(data.crewfoundryBootstrap.interviews);\n } catch (error) {\n ctx.logger.error('crewfoundry interviews_list failed', { error: String(error) });\n return errorResult(\n `Failed to list interviews: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry attendance tools — leave, time tracking, payroll.\n *\n * Surface (5): leave_requests_{list,create,update}, time_entries_list, payroll_list.\n * Lists read the `crewfoundryBootstrap` query; leave-request writes map to the\n * real createCrewLeaveRequest / updateCrewLeaveRequest mutations. Time entries and\n * payroll records are read-only (no backend mutation).\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\nimport { IsoDateTime } from './shared.js';\n\nexport function registerAttendanceTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // ── Leave requests ────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'leave_requests_list')),\n {\n title: 'List Leave Requests',\n description: 'List all leave requests in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { leaveRequests: Array<Record<string, unknown>> };\n }>(ops.LIST_LEAVE_REQUESTS, {});\n return jsonResult(data.crewfoundryBootstrap.leaveRequests);\n } catch (error) {\n ctx.logger.error('crewfoundry leave_requests_list failed', { error: String(error) });\n return errorResult(\n `Failed to list leave requests: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'leave_requests_create')),\n {\n title: 'Create Leave Request',\n description: 'File a new leave request for an employee.',\n inputSchema: {\n employeeId: z.string().min(1).describe('Employee ID'),\n employeeName: z.string().min(1).describe('Employee display name'),\n department: z.string().min(1).describe('Department'),\n type: z.string().min(1).describe('Leave type, e.g. \"annual\" / \"sick\"'),\n startDate: IsoDateTime.describe('Leave start date (ISO-8601)'),\n endDate: IsoDateTime.describe('Leave end date (ISO-8601)'),\n days: z.number().int().describe('Number of leave days'),\n reason: z.string().min(1).describe('Reason for leave'),\n status: z.string().min(1).describe('Status, e.g. \"pending\" / \"approved\"'),\n approverName: z.string().optional().describe('Approver display name'),\n },\n },\n async ({\n employeeId,\n employeeName,\n department,\n type,\n startDate,\n endDate,\n days,\n reason,\n status,\n approverName,\n }) => {\n try {\n const input: Record<string, unknown> = {\n employeeId,\n employeeName,\n department,\n type,\n startDate,\n endDate,\n days,\n reason,\n status,\n };\n if (approverName !== undefined) input.approverName = approverName;\n\n const data = await ctx.gql.workspace.request<{\n createCrewLeaveRequest: Record<string, unknown>;\n }>(ops.CREATE_LEAVE_REQUEST, { input });\n return jsonResult(data.createCrewLeaveRequest);\n } catch (error) {\n ctx.logger.error('crewfoundry leave_requests_create failed', { error: String(error) });\n return errorResult(\n `Failed to create leave request: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'leave_requests_update')),\n {\n title: 'Update Leave Request',\n description:\n 'Update a leave request (e.g. approve/reject by setting status + approverName). At least one mutable field must be provided.',\n inputSchema: {\n id: z.string().describe('Leave request ID'),\n employeeId: z.string().optional().describe('Updated employee ID'),\n employeeName: z.string().optional().describe('Updated employee name'),\n department: z.string().optional().describe('Updated department'),\n type: z.string().optional().describe('Updated leave type'),\n startDate: IsoDateTime.optional().describe('Updated start date (ISO-8601)'),\n endDate: IsoDateTime.optional().describe('Updated end date (ISO-8601)'),\n days: z.number().int().optional().describe('Updated number of days'),\n reason: z.string().optional().describe('Updated reason'),\n status: z.string().optional().describe('Updated status, e.g. \"approved\" / \"rejected\"'),\n approverName: z.string().optional().describe('Updated approver name'),\n },\n },\n async ({\n id,\n employeeId,\n employeeName,\n department,\n type,\n startDate,\n endDate,\n days,\n reason,\n status,\n approverName,\n }) => {\n try {\n const input: Record<string, unknown> = {};\n if (employeeId !== undefined) input.employeeId = employeeId;\n if (employeeName !== undefined) input.employeeName = employeeName;\n if (department !== undefined) input.department = department;\n if (type !== undefined) input.type = type;\n if (startDate !== undefined) input.startDate = startDate;\n if (endDate !== undefined) input.endDate = endDate;\n if (days !== undefined) input.days = days;\n if (reason !== undefined) input.reason = reason;\n if (status !== undefined) input.status = status;\n if (approverName !== undefined) input.approverName = approverName;\n\n if (Object.keys(input).length === 0) {\n return errorResult('No updates specified — provide at least one mutable field');\n }\n\n const data = await ctx.gql.workspace.request<{\n updateCrewLeaveRequest: Record<string, unknown>;\n }>(ops.UPDATE_LEAVE_REQUEST, { id, input });\n return jsonResult(data.updateCrewLeaveRequest);\n } catch (error) {\n ctx.logger.error('crewfoundry leave_requests_update failed', { error: String(error) });\n return errorResult(\n `Failed to update leave request: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Time entries (read-only) ──────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'time_entries_list')),\n {\n title: 'List Time Entries',\n description: 'List all clock-in/clock-out time entries in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { timeEntries: Array<Record<string, unknown>> };\n }>(ops.LIST_TIME_ENTRIES, {});\n return jsonResult(data.crewfoundryBootstrap.timeEntries);\n } catch (error) {\n ctx.logger.error('crewfoundry time_entries_list failed', { error: String(error) });\n return errorResult(\n `Failed to list time entries: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Payroll (read-only) ───────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'payroll_list')),\n {\n title: 'List Payroll Records',\n description: 'List all payroll records in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { payrollRecords: Array<Record<string, unknown>> };\n }>(ops.LIST_PAYROLL_RECORDS, {});\n return jsonResult(data.crewfoundryBootstrap.payrollRecords);\n } catch (error) {\n ctx.logger.error('crewfoundry payroll_list failed', { error: String(error) });\n return errorResult(\n `Failed to list payroll records: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry client / delivery tools — the agency-side surface.\n *\n * Surface (5): clients_list, invoices_list, projects_list, vendors_list,\n * marketplace_services_list. All read-only — the backend exposes these\n * collections through `crewfoundryBootstrap` with no per-entity mutation.\n */\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\n\nexport function registerClientTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'clients_list')),\n {\n title: 'List Clients',\n description: 'List all clients in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { clients: Array<Record<string, unknown>> };\n }>(ops.LIST_CLIENTS, {});\n return jsonResult(data.crewfoundryBootstrap.clients);\n } catch (error) {\n ctx.logger.error('crewfoundry clients_list failed', { error: String(error) });\n return errorResult(\n `Failed to list clients: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'invoices_list')),\n {\n title: 'List Invoices',\n description: 'List all invoices in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { invoices: Array<Record<string, unknown>> };\n }>(ops.LIST_INVOICES, {});\n return jsonResult(data.crewfoundryBootstrap.invoices);\n } catch (error) {\n ctx.logger.error('crewfoundry invoices_list failed', { error: String(error) });\n return errorResult(\n `Failed to list invoices: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'projects_list')),\n {\n title: 'List Projects',\n description: 'List all projects in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { projects: Array<Record<string, unknown>> };\n }>(ops.LIST_PROJECTS, {});\n return jsonResult(data.crewfoundryBootstrap.projects);\n } catch (error) {\n ctx.logger.error('crewfoundry projects_list failed', { error: String(error) });\n return errorResult(\n `Failed to list projects: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'vendors_list')),\n {\n title: 'List Vendors',\n description: 'List all vendors in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { vendors: Array<Record<string, unknown>> };\n }>(ops.LIST_VENDORS, {});\n return jsonResult(data.crewfoundryBootstrap.vendors);\n } catch (error) {\n ctx.logger.error('crewfoundry vendors_list failed', { error: String(error) });\n return errorResult(\n `Failed to list vendors: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'marketplace_services_list')),\n {\n title: 'List Marketplace Services',\n description: 'List all marketplace services offered in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { marketplaceServices: Array<Record<string, unknown>> };\n }>(ops.LIST_MARKETPLACE_SERVICES, {});\n return jsonResult(data.crewfoundryBootstrap.marketplaceServices);\n } catch (error) {\n ctx.logger.error('crewfoundry marketplace_services_list failed', { error: String(error) });\n return errorResult(\n `Failed to list marketplace services: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry learning & development tools.\n *\n * Surface (2): courses_list, learning_paths_list. Both read-only — the backend\n * exposes courses and learning paths through `crewfoundryBootstrap` with no\n * per-entity mutation.\n */\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\n\nexport function registerLearningTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'courses_list')),\n {\n title: 'List Courses',\n description: 'List all learning courses in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { courses: Array<Record<string, unknown>> };\n }>(ops.LIST_COURSES, {});\n return jsonResult(data.crewfoundryBootstrap.courses);\n } catch (error) {\n ctx.logger.error('crewfoundry courses_list failed', { error: String(error) });\n return errorResult(\n `Failed to list courses: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'learning_paths_list')),\n {\n title: 'List Learning Paths',\n description: 'List all learning paths in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { learningPaths: Array<Record<string, unknown>> };\n }>(ops.LIST_LEARNING_PATHS, {});\n return jsonResult(data.crewfoundryBootstrap.learningPaths);\n } catch (error) {\n ctx.logger.error('crewfoundry learning_paths_list failed', { error: String(error) });\n return errorResult(\n `Failed to list learning paths: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry engagement tools — announcements + notifications.\n *\n * Surface (5): announcements_{list,create}, crewalerts_{list,mark_read,mark_all_read}.\n * Lists read the `crewfoundryBootstrap` query; writes map to the real\n * createCrewAnnouncement / markCrewNotificationRead / markAllCrewNotificationsRead\n * mutations (the notification mutations return Boolean, not the entity).\n *\n * Note: the MCP tool prefix is `crewalerts_*` (not `notifications_*`) to avoid\n * colliding with the generic `notifications` module's tool names when both are\n * mounted in a shell. The GraphQL operations/types are unchanged.\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\nimport { IsoDateTime } from './shared.js';\n\nexport function registerEngagementTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // ── Announcements ─────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'announcements_list')),\n {\n title: 'List Announcements',\n description: 'List all crew announcements in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { announcements: Array<Record<string, unknown>> };\n }>(ops.LIST_ANNOUNCEMENTS, {});\n return jsonResult(data.crewfoundryBootstrap.announcements);\n } catch (error) {\n ctx.logger.error('crewfoundry announcements_list failed', { error: String(error) });\n return errorResult(\n `Failed to list announcements: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'announcements_create')),\n {\n title: 'Create Announcement',\n description: 'Publish a new crew announcement.',\n inputSchema: {\n title: z.string().min(1).describe('Announcement title'),\n content: z.string().min(1).describe('Announcement body'),\n author: z.string().min(1).describe('Author display name'),\n authorRole: z.string().min(1).describe('Author role / title'),\n category: z.string().min(1).describe('Category, e.g. \"policy\" / \"event\"'),\n priority: z.string().min(1).describe('Priority, e.g. \"low\" / \"high\"'),\n isPinned: z.boolean().describe('Whether the announcement is pinned'),\n tags: z.array(z.string()).describe('Tag labels'),\n viewCount: z.number().int().describe('Initial view count (typically 0)'),\n createdAt: IsoDateTime.describe('Creation timestamp (ISO-8601)'),\n },\n },\n async ({\n title,\n content,\n author,\n authorRole,\n category,\n priority,\n isPinned,\n tags,\n viewCount,\n createdAt,\n }) => {\n try {\n const input: Record<string, unknown> = {\n title,\n content,\n author,\n authorRole,\n category,\n priority,\n isPinned,\n tags,\n viewCount,\n createdAt,\n };\n const data = await ctx.gql.workspace.request<{\n createCrewAnnouncement: Record<string, unknown>;\n }>(ops.CREATE_ANNOUNCEMENT, { input });\n return jsonResult(data.createCrewAnnouncement);\n } catch (error) {\n ctx.logger.error('crewfoundry announcements_create failed', { error: String(error) });\n return errorResult(\n `Failed to create announcement: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Notifications ─────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'crewalerts_list')),\n {\n title: 'List Notifications',\n description: 'List all notifications in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { notifications: Array<Record<string, unknown>> };\n }>(ops.LIST_NOTIFICATIONS, {});\n return jsonResult(data.crewfoundryBootstrap.notifications);\n } catch (error) {\n ctx.logger.error('crewfoundry crewalerts_list failed', { error: String(error) });\n return errorResult(\n `Failed to list notifications: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'crewalerts_mark_read')),\n {\n title: 'Mark Notification Read',\n description: 'Mark a single notification as read.',\n inputSchema: { id: z.string().describe('Notification ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ markCrewNotificationRead: boolean }>(\n ops.MARK_NOTIFICATION_READ,\n { id },\n );\n return jsonResult({ ok: data.markCrewNotificationRead, id });\n } catch (error) {\n ctx.logger.error('crewfoundry crewalerts_mark_read failed', { error: String(error) });\n return errorResult(\n `Failed to mark notification read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'crewalerts_mark_all_read')),\n {\n title: 'Mark All Notifications Read',\n description: 'Mark every notification in the bound workspace as read.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{ markAllCrewNotificationsRead: boolean }>(\n ops.MARK_ALL_NOTIFICATIONS_READ,\n {},\n );\n return jsonResult({ ok: data.markAllCrewNotificationsRead });\n } catch (error) {\n ctx.logger.error('crewfoundry crewalerts_mark_all_read failed', {\n error: String(error),\n });\n return errorResult(\n `Failed to mark all notifications read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry overview tool — the single-call workspace snapshot.\n *\n * Surface (1): overview. Maps to the `crewfoundryBootstrap` query, returning\n * every collection in one shot (employees, departments, teams, candidates,\n * job postings, interviews, leave requests, time entries, payroll, clients,\n * invoices, projects, vendors, courses, learning paths, announcements,\n * notifications, marketplace services). This is the crewfoundry analog of the\n * kadaikodi analytics/dashboard tools — there is no dedicated analytics query.\n */\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\n\nexport function registerOverviewTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'overview')),\n {\n title: 'Crewfoundry Overview',\n description:\n 'Single-call snapshot of the bound workspace — every crewfoundry collection (people, recruitment, attendance, clients/delivery, learning, engagement) in one response.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: Record<string, unknown>;\n }>(ops.BOOTSTRAP_OVERVIEW, {});\n return jsonResult(data.crewfoundryBootstrap);\n } catch (error) {\n ctx.logger.error('crewfoundry overview failed', { error: String(error) });\n return errorResult(\n `Failed to get crewfoundry overview: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResourceUri, type McpContext } from '../../core/index.js';\nimport { BOOTSTRAP_OVERVIEW, LIST_EMPLOYEES, LIST_ANNOUNCEMENTS } from './operations.js';\n\n/**\n * Read-only Crewfoundry MCP resources. URIs are product-prefixed via\n * mcpResourceUri so they don't collide when multiple MCP servers run side by\n * side. Each is tracked at function entry so the shell manifest reflects what\n * was registered even though registration is imperative.\n */\nexport function registerCrewfoundryResources(\n server: McpServer,\n ctx: McpContext,\n track: (uri: string) => string,\n): void {\n const schemaUri = track(mcpResourceUri(ctx.productName, 'schema'));\n const overviewUri = track(mcpResourceUri(ctx.productName, 'overview'));\n const employeesUri = track(mcpResourceUri(ctx.productName, 'employees'));\n const announcementsUri = track(mcpResourceUri(ctx.productName, 'announcements'));\n\n // <product>://schema — domain overview\n server.registerResource(\n 'crewfoundry-schema',\n schemaUri,\n {\n title: 'Crewfoundry Domain Schema',\n description:\n 'Overview of the Crewfoundry workforce/HR domain — entities and the per-entity tool surface.',\n mimeType: 'text/plain',\n },\n async () => {\n ctx.logger.debug(`Resource ${schemaUri} requested`);\n const schema = `# Crewfoundry Domain (Overview)\n\nWorkforce / HR / crew-operations platform.\n\n## Read model\nAll collections are served by a single \\`crewfoundryBootstrap\\` query; each list\ntool selects only the collection it needs from it. The \\`overview\\` tool returns\nthe whole bootstrap in one call.\n\n## Entities\n- CrewEmployee — workforce directory (create/update/remove)\n- CrewDepartment, CrewTeam — org structure (read-only)\n- CrewCandidate — recruitment pipeline (create/update)\n- CrewJobPosting — open requisitions (create/update)\n- CrewInterview — scheduled interviews (read-only)\n- CrewLeaveRequest — time-off requests (create/update)\n- CrewTimeEntry — clock-in/out entries (read-only)\n- CrewPayrollRecord — payroll runs (read-only)\n- CrewClient, CrewInvoice, CrewProject, CrewVendor, CrewMarketplaceService — delivery side (read-only)\n- CrewCourse, CrewLearningPath — learning & development (read-only)\n- CrewAnnouncement — internal announcements (create)\n- CrewNotification — user notifications (mark read / mark all read)\n\n## Tool groups\npeople, recruitment, attendance, clients, learning, engagement, overview.\nAll run against the WORKSPACE gateway (workspace-scoped).\n`;\n return {\n contents: [{ uri: schemaUri, text: schema, mimeType: 'text/plain' }],\n };\n },\n );\n\n // <product>://overview — full bootstrap snapshot\n server.registerResource(\n 'crewfoundry-overview',\n overviewUri,\n {\n title: 'Crewfoundry Workspace Snapshot',\n description:\n 'Live single-call snapshot of every crewfoundry collection in the bound workspace.',\n mimeType: 'application/json',\n },\n async () => {\n ctx.logger.debug(`Resource ${overviewUri} requested`);\n try {\n const data = await ctx.gql.workspace.request<{ crewfoundryBootstrap: unknown }>(\n BOOTSTRAP_OVERVIEW,\n {},\n );\n return {\n contents: [\n {\n uri: overviewUri,\n text: JSON.stringify(data.crewfoundryBootstrap, null, 2),\n mimeType: 'application/json',\n },\n ],\n };\n } catch (error) {\n return {\n contents: [\n {\n uri: overviewUri,\n text: JSON.stringify({\n error: error instanceof Error ? error.message : String(error),\n }),\n mimeType: 'application/json',\n },\n ],\n };\n }\n },\n );\n\n // <product>://employees — employee directory\n server.registerResource(\n 'crewfoundry-employees',\n employeesUri,\n {\n title: 'Crewfoundry Employee Directory',\n description: 'The employee directory in the bound workspace.',\n mimeType: 'application/json',\n },\n async () => {\n ctx.logger.debug(`Resource ${employeesUri} requested`);\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { employees: unknown };\n }>(LIST_EMPLOYEES, {});\n return {\n contents: [\n {\n uri: employeesUri,\n text: JSON.stringify(data.crewfoundryBootstrap.employees, null, 2),\n mimeType: 'application/json',\n },\n ],\n };\n } catch (error) {\n return {\n contents: [\n {\n uri: employeesUri,\n text: JSON.stringify({\n error: error instanceof Error ? error.message : String(error),\n }),\n mimeType: 'application/json',\n },\n ],\n };\n }\n },\n );\n\n // <product>://announcements — announcements feed\n server.registerResource(\n 'crewfoundry-announcements',\n announcementsUri,\n {\n title: 'Crewfoundry Announcements',\n description: 'The crew announcements feed in the bound workspace.',\n mimeType: 'application/json',\n },\n async () => {\n ctx.logger.debug(`Resource ${announcementsUri} requested`);\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { announcements: unknown };\n }>(LIST_ANNOUNCEMENTS, {});\n return {\n contents: [\n {\n uri: announcementsUri,\n text: JSON.stringify(data.crewfoundryBootstrap.announcements, null, 2),\n mimeType: 'application/json',\n },\n ],\n };\n } catch (error) {\n return {\n contents: [\n {\n uri: announcementsUri,\n text: JSON.stringify({\n error: error instanceof Error ? error.message : String(error),\n }),\n mimeType: 'application/json',\n },\n ],\n };\n }\n },\n );\n}\n","import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpPromptName, type McpContext } from '../../core/index.js';\n\n/**\n * Crewfoundry MCP prompts — guided multi-step workflows. Names are\n * product-prefixed via mcpPromptName and tracked at function entry.\n */\nexport function registerCrewfoundryPrompts(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n const p = ctx.productName;\n const onboardingName = track(mcpPromptName(p, 'employee-onboarding'));\n const opsName = track(mcpPromptName(p, 'hr-ops'));\n\n // <product>-employee-onboarding — bring a new hire online\n server.registerPrompt(\n onboardingName,\n {\n title: 'Employee Onboarding',\n description:\n 'Guide for onboarding a new Crewfoundry employee end to end: confirm the department/team, create the employee record, and announce the hire.',\n argsSchema: {\n name: z.string().optional().describe('New hire full name'),\n department: z.string().optional().describe('Target department'),\n },\n },\n ({ name, department }) => {\n ctx.logger.debug(`Prompt ${onboardingName} called`, { name, department });\n const nameNote = name ? `Use the name \"${name}\".` : 'Ask the user for the new hire name.';\n const deptNote = department\n ? `Place them in the \"${department}\" department.`\n : `First list departments with ${p}_departments_list and pick one.`;\n return {\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: `Help me onboard a new Crewfoundry employee.\n\n1. **Confirm Org**: ${deptNote} Optionally check teams with ${p}_teams_list.\n2. **Create Employee**: Use ${p}_employees_create. ${nameNote} Set position, location, type (e.g. full-time), status=active, salary, performanceScore, and startDate (ISO-8601). Set managerId if known.\n3. **Verify**: Use ${p}_employees_list to confirm the new record.\n4. **(Optional) Announce**: Use ${p}_announcements_create to welcome the hire (category=\"people\", priority=\"normal\").\n\nShow results at each step and confirm before announcing.`,\n },\n },\n ],\n };\n },\n );\n\n // <product>-hr-ops — daily HR operations\n server.registerPrompt(\n opsName,\n {\n title: 'HR Operations',\n description:\n 'Daily HR operations workflow: triage leave requests, review the hiring pipeline, check payroll/time, and clear notifications.',\n argsSchema: {\n department: z.string().optional().describe('Department to focus on'),\n },\n },\n ({ department }) => {\n ctx.logger.debug(`Prompt ${opsName} called`, { department });\n const deptNote = department\n ? `Focus on the \"${department}\" department.`\n : 'Cover the whole workspace.';\n return {\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: `Run daily Crewfoundry HR operations. ${deptNote}\n\n1. **Snapshot**: Use ${p}_overview for a one-call read of the workspace.\n2. **Leave Queue**: Use ${p}_leave_requests_list to find pending requests; approve/reject with ${p}_leave_requests_update (set status + approverName).\n3. **Hiring Pipeline**: Use ${p}_candidates_list and ${p}_job_postings_list; check upcoming ${p}_interviews_list. Advance candidates with ${p}_candidates_update.\n4. **Time & Payroll**: Use ${p}_time_entries_list and ${p}_payroll_list to spot anomalies.\n5. **Notifications**: Use ${p}_crewalerts_list; clear them with ${p}_crewalerts_mark_read or ${p}_crewalerts_mark_all_read.\n\nSummarize what needs attention after each step.`,\n },\n },\n ],\n };\n },\n );\n}\n","/**\n * Crewfoundry module — domain module for the future-products ecosystem program.\n *\n * Covers every collection of wspace-crewfoundry-svc grouped into per-domain\n * sub-APIs: people (employees/departments/teams), recruitment\n * (candidates/job-postings/interviews), attendance (leave/time/payroll),\n * clients (clients/invoices/projects/vendors/marketplace), learning\n * (courses/learning-paths), engagement (announcements/notifications), and a\n * single-call overview. Mirrors the kadaikodi module's structure\n * (tools/<group>.ts + resources.ts + prompts.ts) and the canonical tags\n * module's typing discipline.\n *\n * Backend: ~/products/wspace/crewfoundry/wspace-crewfoundry-svc/\n * (Hive service name `crewfoundry`). All operations run against the WORKSPACE\n * gateway. The backend exposes a single `crewfoundryBootstrap` read query plus\n * a focused set of CRUD mutations — there is no health probe or analytics query.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerPeopleTools } from './tools/people.js';\nimport { registerRecruitmentTools } from './tools/recruitment.js';\nimport { registerAttendanceTools } from './tools/attendance.js';\nimport { registerClientTools } from './tools/clients.js';\nimport { registerLearningTools } from './tools/learning.js';\nimport { registerEngagementTools } from './tools/engagement.js';\nimport { registerOverviewTools } from './tools/overview.js';\nimport { registerCrewfoundryResources } from './resources.js';\nimport { registerCrewfoundryPrompts } from './prompts.js';\n\nconst crewfoundryModule: McpModule = {\n id: 'crewfoundry',\n version: '0.0.1',\n displayName: 'Crewfoundry',\n dependsOn: ['auth'],\n capabilities: { tools: {}, resources: {}, prompts: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const resources: string[] = [];\n const prompts: string[] = [];\n\n const trackTool = (n: string): string => {\n tools.push(n);\n return n;\n };\n const trackResource = (uri: string): string => {\n resources.push(uri);\n return uri;\n };\n const trackPrompt = (n: string): string => {\n prompts.push(n);\n return n;\n };\n\n registerPeopleTools(server, ctx, trackTool);\n registerRecruitmentTools(server, ctx, trackTool);\n registerAttendanceTools(server, ctx, trackTool);\n registerClientTools(server, ctx, trackTool);\n registerLearningTools(server, ctx, trackTool);\n registerEngagementTools(server, ctx, trackTool);\n registerOverviewTools(server, ctx, trackTool);\n\n registerCrewfoundryResources(server, ctx, trackResource);\n registerCrewfoundryPrompts(server, ctx, trackPrompt);\n\n return { tools, resources, prompts };\n },\n};\n\nexport default crewfoundryModule;\n"]}
1
+ {"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/crewfoundry/operations.ts","../../../src/modules/crewfoundry/tools/shared.ts","../../../src/modules/crewfoundry/tools/people.ts","../../../src/modules/crewfoundry/tools/recruitment.ts","../../../src/modules/crewfoundry/tools/attendance.ts","../../../src/modules/crewfoundry/tools/clients.ts","../../../src/modules/crewfoundry/tools/learning.ts","../../../src/modules/crewfoundry/tools/engagement.ts","../../../src/modules/crewfoundry/tools/overview.ts","../../../src/modules/crewfoundry/resources.ts","../../../src/modules/crewfoundry/prompts.ts","../../../src/modules/crewfoundry/index.ts"],"names":["z"],"mappings":";;;;;;;;;;;AA8BO,IAAM,gBAAA,GAAN,cAA+B,KAAA,CAAM;AAAA,EACjB,KAAA;AAAA,EAEzB,WAAA,CAAY,SAAiB,KAAA,EAAiB;AAC5C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,kBAAA;AACZ,IAAA,IAAA,CAAK,KAAA,GAAQ,KAAA;AAAA,EACf;AACF,CAAA;;;AC1BA,IAAM,oBAAA,GAAuB,EAAA;AAE7B,SAAS,cAAA,CAAe,MAAc,IAAA,EAA8C;AAClF,EAAA,IAAuB,IAAA,CAAK,MAAA,GAAS,oBAAA,EAAsB;AACzD,IAAA,MAAM,IAAI,gBAAA;AAAA,MACR,CAAA,WAAA,EAAc,IAAI,CAAA,UAAA,EAAa,oBAAoB,CAAA,8CAAA;AAAA,KACrD;AAAA,EACF;AACA,EAAA,OAAO,IAAA;AACT;AAMO,SAAS,WAAA,CAAY,gBAAwB,KAAA,EAAyB;AAC3E,EAAA,IAA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AAwB,MAAA,EAAQ,KAAK,SAAS,CAAA;AAC9C,IAAA,qBAAA,CAAsB,MAAA,EAAQ,KAAK,SAAS,CAAA;AAE5C,IAAA,4BAAA,CAA6B,MAAA,EAAQ,KAAK,aAAa,CAAA;AACvD,IAAA,0BAAA,CAA2B,MAAA,EAAQ,KAAK,WAAW,CAAA;AAEnD,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,OAAA,EAAQ;AAAA,EACrC;AACF,CAAA;AAEA,IAAO,mBAAA,GAAQ","file":"index.cjs","sourcesContent":["/**\n * Error classes for MCP SDK.\n *\n * Modules MUST throw these instead of throwing raw Errors. The registerTool\n * wrapper in result.ts catches and maps them to MCP-protocol-compliant\n * `{ isError: true, content: [...] }` responses.\n *\n * Throwing past the wrapper to the protocol surfaces as JSON-RPC -32603 to\n * the client and is a protocol bug.\n */\n\nexport class McpUserError extends Error {\n public readonly hint: string | undefined;\n\n constructor(message: string, opts?: { hint?: string }) {\n super(message);\n this.name = 'McpUserError';\n this.hint = opts?.hint;\n }\n}\n\nexport class McpAuthError extends McpUserError {\n constructor(message: string, opts?: { hint?: string }) {\n super(message, {\n hint: opts?.hint ?? 'Run the auth_login tool to authenticate.',\n });\n this.name = 'McpAuthError';\n }\n}\n\nexport class McpInternalError extends Error {\n public override readonly cause: unknown;\n\n constructor(message: string, cause?: unknown) {\n super(message);\n this.name = 'McpInternalError';\n this.cause = cause;\n }\n}\n","/**\n * Tool / resource / prompt naming helpers.\n *\n * Mandatory product prefix avoids collisions when Claude Desktop runs\n * multiple MCP servers concurrently (typical setup is ~6).\n *\n * Tool names are capped at 63 characters — Claude Desktop pre-1.x\n * truncated at 64 in some versions.\n */\n\nimport { McpInternalError } from './errors.js';\n\nconst MAX_TOOL_NAME_LENGTH = 63;\n\nfunction assertSafeName(name: string, kind: 'tool' | 'resource' | 'prompt'): string {\n if (kind === 'tool' && name.length > MAX_TOOL_NAME_LENGTH) {\n throw new McpInternalError(\n `Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`,\n );\n }\n return name;\n}\n\n/**\n * Build a tool name. Format: `<productName>_<...parts>` (snake_case).\n * Example: mcpToolName('vibecontrols', 'vibes', 'list') -> 'vibecontrols_vibes_list'\n */\nexport function mcpToolName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpToolName: productName is required');\n }\n const name = [productName, ...parts].filter(Boolean).join('_');\n return assertSafeName(name, 'tool');\n}\n\n/**\n * Build a resource URI. Format: `<productName>://<...parts>`.\n * Example: mcpResourceUri('vibecontrols', 'schema') -> 'vibecontrols://schema'\n */\nexport function mcpResourceUri(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpResourceUri: productName is required');\n }\n return `${productName}://${parts.filter(Boolean).join('/')}`;\n}\n\n/**\n * Build a prompt name. Format: `<productName>-<...parts>` (kebab-case).\n * Example: mcpPromptName('vibecontrols', 'setup') -> 'vibecontrols-setup'\n */\nexport function mcpPromptName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpPromptName: productName is required');\n }\n return [productName, ...parts].filter(Boolean).join('-');\n}\n\nexport const TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;\n\n/**\n * Name-based hint heuristics for MCP `annotations` (readOnlyHint /\n * destructiveHint). Used by tool-governance.ts to auto-fill annotations for\n * the fleet of product modules that call `server.registerTool` directly\n * (bypassing the `registerTool()` core helper) and so never set them\n * explicitly today (BOFF-3903). Deliberately conservative — matched against\n * whole `_`-delimited segments so e.g. `timeentries_delete` and\n * `pomodoro_delete_goal` match, but a hypothetical `undeletable_check`\n * would not.\n *\n * A module can always override the inference by passing an explicit\n * `annotations` object to `registerTool()` / `server.registerTool()`.\n */\nconst DESTRUCTIVE_NAME_SEGMENT = /(?:^|_)delete(?:_|$)/i;\nconst READ_ONLY_NAME_SEGMENT = /(?:^|_)(?:list|get|search|check|read|count|stats|by_date)(?:_|$)/i;\n\n/** True when a tool name looks destructive (irreversibly deletes data) by naming convention. */\nexport function inferDestructiveHint(toolName: string): boolean {\n return DESTRUCTIVE_NAME_SEGMENT.test(toolName);\n}\n\n/**\n * True when a tool name looks read-only by naming convention. Never true for\n * a name that also looks destructive (a tool can't be both).\n */\nexport function inferReadOnlyHint(toolName: string): boolean {\n return !inferDestructiveHint(toolName) && READ_ONLY_NAME_SEGMENT.test(toolName);\n}\n","/**\n * MCP tool result helpers + central handler.\n *\n * Modules NEVER call server.registerTool directly — they use registerTool()\n * from this module so the central try/catch wraps the handler and:\n * - maps thrown McpUserError / McpAuthError / McpInternalError to\n * MCP-protocol-compliant `{ isError: true, content: [...] }` shapes\n * - threads `_meta.progressToken` into ctx.progress for long ops\n * - emits a structured log line on every error\n * - never leaks `cause` from McpInternalError to the client\n *\n * This is the analog of cli-sdk's createProgram() central error handler.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { ZodRawShape } from 'zod';\nimport type { McpContext } from './context.js';\nimport { McpAuthError, McpInternalError, McpUserError } from './errors.js';\nimport type { ToolAnnotations } from './tool-governance.js';\n\nexport interface ToolTextContent {\n type: 'text';\n text: string;\n [k: string]: unknown;\n}\n\nexport interface ToolResult {\n content: ToolTextContent[];\n isError?: boolean;\n structuredContent?: Record<string, unknown>;\n [k: string]: unknown;\n}\n\nexport interface ToolMeta {\n progressToken?: string | number;\n}\n\n/**\n * Build a successful tool result with JSON content (pretty-printed).\n */\nexport function jsonResult(data: unknown, structured?: Record<string, unknown>): ToolResult {\n const result: ToolResult = {\n content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],\n };\n if (structured !== undefined) {\n result.structuredContent = structured;\n }\n return result;\n}\n\n/**\n * Build a successful tool result with plain text content.\n */\nexport function textResult(text: string): ToolResult {\n return { content: [{ type: 'text', text }] };\n}\n\n/**\n * Build an error tool result. Honors MCP's `{ isError: true, content }` shape.\n * Optional hint is appended on a new line so the LLM can react.\n */\nexport function errorResult(message: string, hint?: string): ToolResult {\n const text = hint ? `${message}\\n\\nHint: ${hint}` : message;\n return { content: [{ type: 'text', text }], isError: true };\n}\n\nexport interface ToolMetadata {\n title: string;\n description: string;\n inputSchema?: ZodRawShape;\n /**\n * Explicit MCP annotations (readOnlyHint / destructiveHint / ...). Optional\n * — when omitted, `wrapServerWithToolGovernance` (applied centrally in\n * `createMcpServer`) infers them from the tool name. Set this to override\n * the inference for a tool whose name doesn't match the naming convention.\n */\n annotations?: ToolAnnotations;\n}\n\nexport type ToolHandler<TArgs = Record<string, unknown>> = (\n args: TArgs,\n ctx: McpContext,\n meta: ToolMeta,\n) => Promise<unknown>;\n\n/**\n * Register a tool with the central error wrapper.\n *\n * The handler returns a plain value or void. The wrapper:\n * - wraps non-undefined returns in jsonResult()\n * - if the value already looks like a ToolResult (has `content`), passes through\n * - catches McpAuthError / McpUserError / McpInternalError / generic Error\n * - logs every error via ctx.logger.error\n */\nexport function registerTool<TArgs extends Record<string, unknown>>(\n server: McpServer,\n ctx: McpContext,\n name: string,\n metadata: ToolMetadata,\n handler: ToolHandler<TArgs>,\n): void {\n const sdkConfig = {\n title: metadata.title,\n description: metadata.description,\n ...(metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {}),\n ...(metadata.annotations ? { annotations: metadata.annotations } : {}),\n };\n\n // The MCP SDK's registerTool signature is `(name, config, handler)`. The\n // handler arity depends on whether inputSchema is present (1-arg without,\n // 2-arg with). We accept a unified handler shape and dispatch at runtime.\n // The SDK's typing is strict and conditional on the inputSchema generic;\n // bypass with a cast since runtime acceptance is unconditional.\n const wrapped = async (...callbackArgs: unknown[]): Promise<ToolResult> => {\n const hasArgs = callbackArgs.length === 2;\n const args = (hasArgs ? callbackArgs[0] : {}) as TArgs;\n const extra = (hasArgs ? callbackArgs[1] : callbackArgs[0]) as\n | { _meta?: { progressToken?: string | number } }\n | undefined;\n\n const progressToken = extra?._meta?.progressToken;\n const meta: ToolMeta = progressToken !== undefined ? { progressToken } : {};\n\n try {\n const result = await handler(args, ctx, meta);\n if (isToolResult(result)) return result;\n if (result === undefined) return textResult('OK');\n return jsonResult(result);\n } catch (error) {\n return mapErrorToResult(error, ctx, name);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (server as any).registerTool(name, sdkConfig, wrapped);\n}\n\nfunction isToolResult(value: unknown): value is ToolResult {\n return (\n !!value &&\n typeof value === 'object' &&\n 'content' in value &&\n Array.isArray((value as ToolResult).content)\n );\n}\n\nfunction mapErrorToResult(error: unknown, ctx: McpContext, toolName: string): ToolResult {\n if (error instanceof McpAuthError) {\n ctx.logger.warn(`${toolName}: auth required`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpUserError) {\n ctx.logger.info(`${toolName}: user error`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpInternalError) {\n ctx.logger.error(`${toolName}: internal error`, {\n message: error.message,\n cause: stringifyCause(error.cause),\n });\n return errorResult(`Internal error in ${toolName}.`);\n }\n const message = error instanceof Error ? error.message : String(error);\n ctx.logger.error(`${toolName}: unhandled error`, { message });\n return errorResult(`${toolName}: ${message}`);\n}\n\nfunction stringifyCause(cause: unknown): string | undefined {\n if (cause === undefined || cause === null) return undefined;\n if (cause instanceof Error) return cause.message;\n try {\n return JSON.stringify(cause);\n } catch {\n return String(cause);\n }\n}\n","/**\n * Centralized GraphQL operations for the Crewfoundry MCP module.\n *\n * Crewfoundry is the workforce / HR / crew-operations platform (future-products\n * ecosystem). Backend subgraph:\n * ~/products/wspace/crewfoundry/wspace-crewfoundry-svc/ (Hive service name\n * `crewfoundry`).\n *\n * All operations run against the WORKSPACE gateway. Workspace scoping is carried\n * by the gateway headers (x-workspace-id / X-Workspace-Authorization) issued by\n * the auth module — Crewfoundry inputs do NOT carry a workspaceId.\n *\n * The backend exposes a SINGLE read entrypoint, `crewfoundryBootstrap`, that\n * returns every collection. Per-entity \"list\" operations therefore select only\n * the one collection they need from that bootstrap query (real field selection —\n * the backend resolves only the requested field). Mutations carry the real\n * server-side root names (create / update / remove / mark notifications), some\n * of which are inconsistently prefixed — every one is called by its REAL name\n * here.\n *\n * Uses template-string interpolation (not gql tagged fragments) to match the\n * canonical vibecontrols / kadaikodi modules' operations files.\n */\n\n// ---------------------------------------------------------------------------\n// Field fragments (mirror the backend object types)\n// ---------------------------------------------------------------------------\n\nexport const EMPLOYEE_FIELDS = `\n id firstName lastName email phone position department location type status\n salary performanceScore startDate managerId avatar workspaceId\n`;\n\nexport const DEPARTMENT_FIELDS = `\n id name headId headName employeeCount budget location status workspaceId\n`;\n\nexport const TEAM_FIELDS = `\n id name description department leadId leadName memberCount members\n projectCount status createdAt workspaceId\n`;\n\nexport const CANDIDATE_FIELDS = `\n id firstName lastName email phone position experience currentCompany source\n status rating appliedDate resumeUrl skills notes workspaceId\n`;\n\nexport const JOB_POSTING_FIELDS = `\n id title department location type experienceLevel description requirements\n benefits salaryMin salaryMax status applicants postedDate deadline workspaceId\n`;\n\nexport const INTERVIEW_FIELDS = `\n id candidateId candidateName position interviewerName type date time status\n rating feedback workspaceId\n`;\n\nexport const LEAVE_REQUEST_FIELDS = `\n id employeeId employeeName department type startDate endDate days reason\n status approverName workspaceId\n`;\n\nexport const TIME_ENTRY_FIELDS = `\n id employeeId employeeName date clockIn clockOut totalHours overtime project\n status workspaceId\n`;\n\nexport const PAYROLL_FIELDS = `\n id employeeId employeeName department period grossPay deductions netPay status\n payDate paymentMethod workspaceId\n`;\n\nexport const CLIENT_FIELDS = `\n id name industry contactPerson email phone status projects revenue since\n workspaceId\n`;\n\nexport const INVOICE_FIELDS = `\n id number clientName amount status issueDate dueDate items workspaceId\n`;\n\nexport const PROJECT_FIELDS = `\n id name description status priority progress budget spent startDate endDate\n managerId managerName teamId teamName tasks completedTasks workspaceId\n`;\n\nexport const VENDOR_FIELDS = `\n id name category contactPerson email phone status rating contractValue\n workspaceId\n`;\n\nexport const COURSE_FIELDS = `\n id title description category level instructor duration modules enrolled\n completed rating skills status thumbnail workspaceId\n`;\n\nexport const LEARNING_PATH_FIELDS = `\n id title description level duration courses enrolled completionRate workspaceId\n`;\n\nexport const ANNOUNCEMENT_FIELDS = `\n id title content author authorRole category priority isPinned tags viewCount\n createdAt workspaceId\n`;\n\nexport const NOTIFICATION_FIELDS = `\n id title message type category read actionUrl createdAt workspaceId\n`;\n\nexport const MARKETPLACE_SERVICE_FIELDS = `\n id title description category provider price priceType rating reviews\n deliveryTime skills status workspaceId\n`;\n\n// ---------------------------------------------------------------------------\n// Bootstrap-scoped list operations (single backend query `crewfoundryBootstrap`)\n// ---------------------------------------------------------------------------\n\nexport const LIST_EMPLOYEES = `\n query CrewfoundryListEmployees {\n crewfoundryBootstrap { employees { ${EMPLOYEE_FIELDS} } }\n }\n`;\n\nexport const LIST_DEPARTMENTS = `\n query CrewfoundryListDepartments {\n crewfoundryBootstrap { departments { ${DEPARTMENT_FIELDS} } }\n }\n`;\n\nexport const LIST_TEAMS = `\n query CrewfoundryListTeams {\n crewfoundryBootstrap { teams { ${TEAM_FIELDS} } }\n }\n`;\n\nexport const LIST_CANDIDATES = `\n query CrewfoundryListCandidates {\n crewfoundryBootstrap { candidates { ${CANDIDATE_FIELDS} } }\n }\n`;\n\nexport const LIST_JOB_POSTINGS = `\n query CrewfoundryListJobPostings {\n crewfoundryBootstrap { jobPostings { ${JOB_POSTING_FIELDS} } }\n }\n`;\n\nexport const LIST_INTERVIEWS = `\n query CrewfoundryListInterviews {\n crewfoundryBootstrap { interviews { ${INTERVIEW_FIELDS} } }\n }\n`;\n\nexport const LIST_LEAVE_REQUESTS = `\n query CrewfoundryListLeaveRequests {\n crewfoundryBootstrap { leaveRequests { ${LEAVE_REQUEST_FIELDS} } }\n }\n`;\n\nexport const LIST_TIME_ENTRIES = `\n query CrewfoundryListTimeEntries {\n crewfoundryBootstrap { timeEntries { ${TIME_ENTRY_FIELDS} } }\n }\n`;\n\nexport const LIST_PAYROLL_RECORDS = `\n query CrewfoundryListPayrollRecords {\n crewfoundryBootstrap { payrollRecords { ${PAYROLL_FIELDS} } }\n }\n`;\n\nexport const LIST_CLIENTS = `\n query CrewfoundryListClients {\n crewfoundryBootstrap { clients { ${CLIENT_FIELDS} } }\n }\n`;\n\nexport const LIST_INVOICES = `\n query CrewfoundryListInvoices {\n crewfoundryBootstrap { invoices { ${INVOICE_FIELDS} } }\n }\n`;\n\nexport const LIST_PROJECTS = `\n query CrewfoundryListProjects {\n crewfoundryBootstrap { projects { ${PROJECT_FIELDS} } }\n }\n`;\n\nexport const LIST_VENDORS = `\n query CrewfoundryListVendors {\n crewfoundryBootstrap { vendors { ${VENDOR_FIELDS} } }\n }\n`;\n\nexport const LIST_COURSES = `\n query CrewfoundryListCourses {\n crewfoundryBootstrap { courses { ${COURSE_FIELDS} } }\n }\n`;\n\nexport const LIST_LEARNING_PATHS = `\n query CrewfoundryListLearningPaths {\n crewfoundryBootstrap { learningPaths { ${LEARNING_PATH_FIELDS} } }\n }\n`;\n\nexport const LIST_ANNOUNCEMENTS = `\n query CrewfoundryListAnnouncements {\n crewfoundryBootstrap { announcements { ${ANNOUNCEMENT_FIELDS} } }\n }\n`;\n\nexport const LIST_NOTIFICATIONS = `\n query CrewfoundryListNotifications {\n crewfoundryBootstrap { notifications { ${NOTIFICATION_FIELDS} } }\n }\n`;\n\nexport const LIST_MARKETPLACE_SERVICES = `\n query CrewfoundryListMarketplaceServices {\n crewfoundryBootstrap { marketplaceServices { ${MARKETPLACE_SERVICE_FIELDS} } }\n }\n`;\n\nexport const BOOTSTRAP_OVERVIEW = `\n query CrewfoundryOverview {\n crewfoundryBootstrap {\n employees { ${EMPLOYEE_FIELDS} }\n departments { ${DEPARTMENT_FIELDS} }\n teams { ${TEAM_FIELDS} }\n candidates { ${CANDIDATE_FIELDS} }\n jobPostings { ${JOB_POSTING_FIELDS} }\n interviews { ${INTERVIEW_FIELDS} }\n leaveRequests { ${LEAVE_REQUEST_FIELDS} }\n timeEntries { ${TIME_ENTRY_FIELDS} }\n payrollRecords { ${PAYROLL_FIELDS} }\n clients { ${CLIENT_FIELDS} }\n invoices { ${INVOICE_FIELDS} }\n projects { ${PROJECT_FIELDS} }\n vendors { ${VENDOR_FIELDS} }\n courses { ${COURSE_FIELDS} }\n learningPaths { ${LEARNING_PATH_FIELDS} }\n announcements { ${ANNOUNCEMENT_FIELDS} }\n notifications { ${NOTIFICATION_FIELDS} }\n marketplaceServices { ${MARKETPLACE_SERVICE_FIELDS} }\n }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Employee mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_EMPLOYEE = `\n mutation CrewfoundryCreateEmployee($input: CreateCrewEmployeeInput!) {\n createCrewEmployee(input: $input) { ${EMPLOYEE_FIELDS} }\n }\n`;\n\nexport const UPDATE_EMPLOYEE = `\n mutation CrewfoundryUpdateEmployee($id: ID!, $input: UpdateCrewEmployeeInput!) {\n updateCrewEmployee(id: $id, input: $input) { ${EMPLOYEE_FIELDS} }\n }\n`;\n\nexport const REMOVE_EMPLOYEE = `\n mutation CrewfoundryRemoveEmployee($id: ID!) {\n removeCrewEmployee(id: $id)\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Candidate mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_CANDIDATE = `\n mutation CrewfoundryCreateCandidate($input: CreateCrewCandidateInput!) {\n createCrewCandidate(input: $input) { ${CANDIDATE_FIELDS} }\n }\n`;\n\nexport const UPDATE_CANDIDATE = `\n mutation CrewfoundryUpdateCandidate($id: ID!, $input: UpdateCrewCandidateInput!) {\n updateCrewCandidate(id: $id, input: $input) { ${CANDIDATE_FIELDS} }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Job-posting mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_JOB_POSTING = `\n mutation CrewfoundryCreateJobPosting($input: CreateCrewJobPostingInput!) {\n createCrewJobPosting(input: $input) { ${JOB_POSTING_FIELDS} }\n }\n`;\n\nexport const UPDATE_JOB_POSTING = `\n mutation CrewfoundryUpdateJobPosting($id: ID!, $input: UpdateCrewJobPostingInput!) {\n updateCrewJobPosting(id: $id, input: $input) { ${JOB_POSTING_FIELDS} }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Leave-request mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_LEAVE_REQUEST = `\n mutation CrewfoundryCreateLeaveRequest($input: CreateCrewLeaveRequestInput!) {\n createCrewLeaveRequest(input: $input) { ${LEAVE_REQUEST_FIELDS} }\n }\n`;\n\nexport const UPDATE_LEAVE_REQUEST = `\n mutation CrewfoundryUpdateLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) {\n updateCrewLeaveRequest(id: $id, input: $input) { ${LEAVE_REQUEST_FIELDS} }\n }\n`;\n\n// ---------------------------------------------------------------------------\n// Announcement + notification mutations\n// ---------------------------------------------------------------------------\n\nexport const CREATE_ANNOUNCEMENT = `\n mutation CrewfoundryCreateAnnouncement($input: CreateCrewAnnouncementInput!) {\n createCrewAnnouncement(input: $input) { ${ANNOUNCEMENT_FIELDS} }\n }\n`;\n\nexport const MARK_NOTIFICATION_READ = `\n mutation CrewfoundryMarkNotificationRead($id: ID!) {\n markCrewNotificationRead(id: $id)\n }\n`;\n\nexport const MARK_ALL_NOTIFICATIONS_READ = `\n mutation CrewfoundryMarkAllNotificationsRead {\n markAllCrewNotificationsRead\n }\n`;\n","/**\n * Shared zod schemas for the Crewfoundry tool surface.\n *\n * The Crewfoundry backend models status/type/category/priority as free-form\n * `String` (no GraphQL enums), so this module does NOT mirror enums the way\n * kadaikodi does — it exposes them as described strings instead. What IS shared\n * across the create/update tool files are the `DateTime` scalar inputs, modelled\n * here as an ISO-8601 string so Claude Desktop grounds tool calls consistently.\n */\n\nimport { z } from 'zod';\n\n/** ISO-8601 datetime string for `DateTime` scalar inputs. */\nexport const IsoDateTime = z\n .string()\n .describe('ISO-8601 datetime, e.g. \"2026-06-26T09:00:00.000Z\"');\n","/**\n * Crewfoundry people tools — the core workforce directory.\n *\n * Surface (6): employees_{list,create,update,remove}, departments_list, teams_list.\n * Lists read the single `crewfoundryBootstrap` query (selecting only the needed\n * collection); employee writes map to the real createCrewEmployee /\n * updateCrewEmployee / removeCrewEmployee mutations.\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\nimport { IsoDateTime } from './shared.js';\n\nexport function registerPeopleTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'employees_list')),\n {\n title: 'List Employees',\n description: 'List all employees in the bound workspace (from the crewfoundry bootstrap).',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { employees: Array<Record<string, unknown>> };\n }>(ops.LIST_EMPLOYEES, {});\n return jsonResult(data.crewfoundryBootstrap.employees);\n } catch (error) {\n ctx.logger.error('crewfoundry employees_list failed', { error: String(error) });\n return errorResult(\n `Failed to list employees: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'employees_create')),\n {\n title: 'Create Employee',\n description: 'Add a new employee to the workspace directory.',\n inputSchema: {\n firstName: z.string().min(1).describe('First name'),\n lastName: z.string().min(1).describe('Last name'),\n email: z.string().min(1).describe('Work email'),\n phone: z.string().min(1).describe('Contact phone'),\n position: z.string().min(1).describe('Job title / position'),\n department: z.string().min(1).describe('Department name'),\n location: z.string().min(1).describe('Work location'),\n type: z.string().min(1).describe('Employment type, e.g. \"full-time\" / \"contract\"'),\n status: z.string().min(1).describe('Employment status, e.g. \"active\" / \"on-leave\"'),\n salary: z.number().describe('Annual/period salary'),\n performanceScore: z.number().describe('Performance score (e.g. 0–5 or 0–100)'),\n startDate: IsoDateTime.describe('Start date (ISO-8601)'),\n managerId: z.string().optional().describe('Manager employee ID'),\n avatar: z.string().optional().describe('Avatar image URL'),\n },\n },\n async ({\n firstName,\n lastName,\n email,\n phone,\n position,\n department,\n location,\n type,\n status,\n salary,\n performanceScore,\n startDate,\n managerId,\n avatar,\n }) => {\n try {\n const input: Record<string, unknown> = {\n firstName,\n lastName,\n email,\n phone,\n position,\n department,\n location,\n type,\n status,\n salary,\n performanceScore,\n startDate,\n };\n if (managerId !== undefined) input.managerId = managerId;\n if (avatar !== undefined) input.avatar = avatar;\n\n const data = await ctx.gql.workspace.request<{\n createCrewEmployee: Record<string, unknown>;\n }>(ops.CREATE_EMPLOYEE, { input });\n return jsonResult(data.createCrewEmployee);\n } catch (error) {\n ctx.logger.error('crewfoundry employees_create failed', { error: String(error) });\n return errorResult(\n `Failed to create employee: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'employees_update')),\n {\n title: 'Update Employee',\n description: 'Update an employee. At least one mutable field must be provided.',\n inputSchema: {\n id: z.string().describe('Employee ID'),\n firstName: z.string().optional().describe('Updated first name'),\n lastName: z.string().optional().describe('Updated last name'),\n email: z.string().optional().describe('Updated email'),\n phone: z.string().optional().describe('Updated phone'),\n position: z.string().optional().describe('Updated position'),\n department: z.string().optional().describe('Updated department'),\n location: z.string().optional().describe('Updated location'),\n type: z.string().optional().describe('Updated employment type'),\n status: z.string().optional().describe('Updated employment status'),\n salary: z.number().optional().describe('Updated salary'),\n performanceScore: z.number().optional().describe('Updated performance score'),\n startDate: IsoDateTime.optional().describe('Updated start date (ISO-8601)'),\n managerId: z.string().optional().describe('Updated manager employee ID'),\n avatar: z.string().optional().describe('Updated avatar URL'),\n },\n },\n async ({\n id,\n firstName,\n lastName,\n email,\n phone,\n position,\n department,\n location,\n type,\n status,\n salary,\n performanceScore,\n startDate,\n managerId,\n avatar,\n }) => {\n try {\n const input: Record<string, unknown> = {};\n if (firstName !== undefined) input.firstName = firstName;\n if (lastName !== undefined) input.lastName = lastName;\n if (email !== undefined) input.email = email;\n if (phone !== undefined) input.phone = phone;\n if (position !== undefined) input.position = position;\n if (department !== undefined) input.department = department;\n if (location !== undefined) input.location = location;\n if (type !== undefined) input.type = type;\n if (status !== undefined) input.status = status;\n if (salary !== undefined) input.salary = salary;\n if (performanceScore !== undefined) input.performanceScore = performanceScore;\n if (startDate !== undefined) input.startDate = startDate;\n if (managerId !== undefined) input.managerId = managerId;\n if (avatar !== undefined) input.avatar = avatar;\n\n if (Object.keys(input).length === 0) {\n return errorResult('No updates specified — provide at least one mutable field');\n }\n\n const data = await ctx.gql.workspace.request<{\n updateCrewEmployee: Record<string, unknown>;\n }>(ops.UPDATE_EMPLOYEE, { id, input });\n return jsonResult(data.updateCrewEmployee);\n } catch (error) {\n ctx.logger.error('crewfoundry employees_update failed', { error: String(error) });\n return errorResult(\n `Failed to update employee: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'employees_remove')),\n {\n title: 'Remove Employee',\n description: 'Remove (offboard) an employee from the workspace directory.',\n inputSchema: { id: z.string().describe('Employee ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ removeCrewEmployee: boolean }>(\n ops.REMOVE_EMPLOYEE,\n { id },\n );\n return jsonResult({ ok: data.removeCrewEmployee, id });\n } catch (error) {\n ctx.logger.error('crewfoundry employees_remove failed', { error: String(error) });\n return errorResult(\n `Failed to remove employee: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'departments_list')),\n {\n title: 'List Departments',\n description: 'List all departments in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { departments: Array<Record<string, unknown>> };\n }>(ops.LIST_DEPARTMENTS, {});\n return jsonResult(data.crewfoundryBootstrap.departments);\n } catch (error) {\n ctx.logger.error('crewfoundry departments_list failed', { error: String(error) });\n return errorResult(\n `Failed to list departments: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'teams_list')),\n {\n title: 'List Teams',\n description: 'List all teams in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { teams: Array<Record<string, unknown>> };\n }>(ops.LIST_TEAMS, {});\n return jsonResult(data.crewfoundryBootstrap.teams);\n } catch (error) {\n ctx.logger.error('crewfoundry teams_list failed', { error: String(error) });\n return errorResult(\n `Failed to list teams: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry recruitment tools — applicant tracking + hiring pipeline.\n *\n * Surface (7): candidates_{list,create,update}, job_postings_{list,create,update},\n * interviews_list. Lists read the `crewfoundryBootstrap` query; writes map to the\n * real createCrewCandidate / updateCrewCandidate / createCrewJobPosting /\n * updateCrewJobPosting mutations. Interviews are read-only (no backend mutation).\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\nimport { IsoDateTime } from './shared.js';\n\nexport function registerRecruitmentTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // ── Candidates ────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'candidates_list')),\n {\n title: 'List Candidates',\n description: 'List all recruitment candidates in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { candidates: Array<Record<string, unknown>> };\n }>(ops.LIST_CANDIDATES, {});\n return jsonResult(data.crewfoundryBootstrap.candidates);\n } catch (error) {\n ctx.logger.error('crewfoundry candidates_list failed', { error: String(error) });\n return errorResult(\n `Failed to list candidates: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'candidates_create')),\n {\n title: 'Create Candidate',\n description: 'Add a new recruitment candidate to the pipeline.',\n inputSchema: {\n firstName: z.string().min(1).describe('First name'),\n lastName: z.string().min(1).describe('Last name'),\n email: z.string().min(1).describe('Candidate email'),\n phone: z.string().min(1).describe('Candidate phone'),\n position: z.string().min(1).describe('Position applied for'),\n experience: z.number().int().describe('Years of experience'),\n rating: z.number().describe('Recruiter rating (e.g. 0–5)'),\n source: z.string().min(1).describe('Sourcing channel, e.g. \"referral\" / \"linkedin\"'),\n status: z.string().min(1).describe('Pipeline status, e.g. \"applied\" / \"screening\"'),\n skills: z.array(z.string()).describe('Skill tags'),\n appliedDate: IsoDateTime.describe('Applied date (ISO-8601)'),\n currentCompany: z.string().optional().describe('Current employer'),\n resumeUrl: z.string().optional().describe('Resume URL'),\n notes: z.string().optional().describe('Recruiter notes'),\n },\n },\n async ({\n firstName,\n lastName,\n email,\n phone,\n position,\n experience,\n rating,\n source,\n status,\n skills,\n appliedDate,\n currentCompany,\n resumeUrl,\n notes,\n }) => {\n try {\n const input: Record<string, unknown> = {\n firstName,\n lastName,\n email,\n phone,\n position,\n experience,\n rating,\n source,\n status,\n skills,\n appliedDate,\n };\n if (currentCompany !== undefined) input.currentCompany = currentCompany;\n if (resumeUrl !== undefined) input.resumeUrl = resumeUrl;\n if (notes !== undefined) input.notes = notes;\n\n const data = await ctx.gql.workspace.request<{\n createCrewCandidate: Record<string, unknown>;\n }>(ops.CREATE_CANDIDATE, { input });\n return jsonResult(data.createCrewCandidate);\n } catch (error) {\n ctx.logger.error('crewfoundry candidates_create failed', { error: String(error) });\n return errorResult(\n `Failed to create candidate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'candidates_update')),\n {\n title: 'Update Candidate',\n description: 'Update a candidate. At least one mutable field must be provided.',\n inputSchema: {\n id: z.string().describe('Candidate ID'),\n firstName: z.string().optional().describe('Updated first name'),\n lastName: z.string().optional().describe('Updated last name'),\n email: z.string().optional().describe('Updated email'),\n phone: z.string().optional().describe('Updated phone'),\n position: z.string().optional().describe('Updated position'),\n experience: z.number().int().optional().describe('Updated years of experience'),\n rating: z.number().optional().describe('Updated rating'),\n source: z.string().optional().describe('Updated sourcing channel'),\n status: z.string().optional().describe('Updated pipeline status'),\n skills: z.array(z.string()).optional().describe('Updated skill tags'),\n appliedDate: IsoDateTime.optional().describe('Updated applied date (ISO-8601)'),\n currentCompany: z.string().optional().describe('Updated current employer'),\n resumeUrl: z.string().optional().describe('Updated resume URL'),\n notes: z.string().optional().describe('Updated recruiter notes'),\n },\n },\n async ({\n id,\n firstName,\n lastName,\n email,\n phone,\n position,\n experience,\n rating,\n source,\n status,\n skills,\n appliedDate,\n currentCompany,\n resumeUrl,\n notes,\n }) => {\n try {\n const input: Record<string, unknown> = {};\n if (firstName !== undefined) input.firstName = firstName;\n if (lastName !== undefined) input.lastName = lastName;\n if (email !== undefined) input.email = email;\n if (phone !== undefined) input.phone = phone;\n if (position !== undefined) input.position = position;\n if (experience !== undefined) input.experience = experience;\n if (rating !== undefined) input.rating = rating;\n if (source !== undefined) input.source = source;\n if (status !== undefined) input.status = status;\n if (skills !== undefined) input.skills = skills;\n if (appliedDate !== undefined) input.appliedDate = appliedDate;\n if (currentCompany !== undefined) input.currentCompany = currentCompany;\n if (resumeUrl !== undefined) input.resumeUrl = resumeUrl;\n if (notes !== undefined) input.notes = notes;\n\n if (Object.keys(input).length === 0) {\n return errorResult('No updates specified — provide at least one mutable field');\n }\n\n const data = await ctx.gql.workspace.request<{\n updateCrewCandidate: Record<string, unknown>;\n }>(ops.UPDATE_CANDIDATE, { id, input });\n return jsonResult(data.updateCrewCandidate);\n } catch (error) {\n ctx.logger.error('crewfoundry candidates_update failed', { error: String(error) });\n return errorResult(\n `Failed to update candidate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Job postings ──────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'job_postings_list')),\n {\n title: 'List Job Postings',\n description: 'List all job postings in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { jobPostings: Array<Record<string, unknown>> };\n }>(ops.LIST_JOB_POSTINGS, {});\n return jsonResult(data.crewfoundryBootstrap.jobPostings);\n } catch (error) {\n ctx.logger.error('crewfoundry job_postings_list failed', { error: String(error) });\n return errorResult(\n `Failed to list job postings: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'job_postings_create')),\n {\n title: 'Create Job Posting',\n description: 'Open a new job posting / requisition.',\n inputSchema: {\n title: z.string().min(1).describe('Job title'),\n department: z.string().min(1).describe('Department'),\n location: z.string().min(1).describe('Work location'),\n type: z.string().min(1).describe('Employment type, e.g. \"full-time\"'),\n experienceLevel: z.string().min(1).describe('Experience level, e.g. \"senior\"'),\n description: z.string().min(1).describe('Role description'),\n requirements: z.array(z.string()).describe('Requirement bullet points'),\n benefits: z.array(z.string()).describe('Benefit bullet points'),\n salaryMin: z.number().describe('Minimum salary'),\n salaryMax: z.number().describe('Maximum salary'),\n status: z.string().min(1).describe('Posting status, e.g. \"open\" / \"closed\"'),\n applicants: z.number().int().describe('Current applicant count'),\n postedDate: IsoDateTime.describe('Posted date (ISO-8601)'),\n deadline: IsoDateTime.optional().describe('Application deadline (ISO-8601)'),\n },\n },\n async ({\n title,\n department,\n location,\n type,\n experienceLevel,\n description,\n requirements,\n benefits,\n salaryMin,\n salaryMax,\n status,\n applicants,\n postedDate,\n deadline,\n }) => {\n try {\n const input: Record<string, unknown> = {\n title,\n department,\n location,\n type,\n experienceLevel,\n description,\n requirements,\n benefits,\n salaryMin,\n salaryMax,\n status,\n applicants,\n postedDate,\n };\n if (deadline !== undefined) input.deadline = deadline;\n\n const data = await ctx.gql.workspace.request<{\n createCrewJobPosting: Record<string, unknown>;\n }>(ops.CREATE_JOB_POSTING, { input });\n return jsonResult(data.createCrewJobPosting);\n } catch (error) {\n ctx.logger.error('crewfoundry job_postings_create failed', { error: String(error) });\n return errorResult(\n `Failed to create job posting: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'job_postings_update')),\n {\n title: 'Update Job Posting',\n description: 'Update a job posting. At least one mutable field must be provided.',\n inputSchema: {\n id: z.string().describe('Job posting ID'),\n title: z.string().optional().describe('Updated title'),\n department: z.string().optional().describe('Updated department'),\n location: z.string().optional().describe('Updated location'),\n type: z.string().optional().describe('Updated employment type'),\n experienceLevel: z.string().optional().describe('Updated experience level'),\n description: z.string().optional().describe('Updated description'),\n requirements: z.array(z.string()).optional().describe('Updated requirements'),\n benefits: z.array(z.string()).optional().describe('Updated benefits'),\n salaryMin: z.number().optional().describe('Updated minimum salary'),\n salaryMax: z.number().optional().describe('Updated maximum salary'),\n status: z.string().optional().describe('Updated status'),\n applicants: z.number().int().optional().describe('Updated applicant count'),\n postedDate: IsoDateTime.optional().describe('Updated posted date (ISO-8601)'),\n deadline: IsoDateTime.optional().describe('Updated deadline (ISO-8601)'),\n },\n },\n async ({\n id,\n title,\n department,\n location,\n type,\n experienceLevel,\n description,\n requirements,\n benefits,\n salaryMin,\n salaryMax,\n status,\n applicants,\n postedDate,\n deadline,\n }) => {\n try {\n const input: Record<string, unknown> = {};\n if (title !== undefined) input.title = title;\n if (department !== undefined) input.department = department;\n if (location !== undefined) input.location = location;\n if (type !== undefined) input.type = type;\n if (experienceLevel !== undefined) input.experienceLevel = experienceLevel;\n if (description !== undefined) input.description = description;\n if (requirements !== undefined) input.requirements = requirements;\n if (benefits !== undefined) input.benefits = benefits;\n if (salaryMin !== undefined) input.salaryMin = salaryMin;\n if (salaryMax !== undefined) input.salaryMax = salaryMax;\n if (status !== undefined) input.status = status;\n if (applicants !== undefined) input.applicants = applicants;\n if (postedDate !== undefined) input.postedDate = postedDate;\n if (deadline !== undefined) input.deadline = deadline;\n\n if (Object.keys(input).length === 0) {\n return errorResult('No updates specified — provide at least one mutable field');\n }\n\n const data = await ctx.gql.workspace.request<{\n updateCrewJobPosting: Record<string, unknown>;\n }>(ops.UPDATE_JOB_POSTING, { id, input });\n return jsonResult(data.updateCrewJobPosting);\n } catch (error) {\n ctx.logger.error('crewfoundry job_postings_update failed', { error: String(error) });\n return errorResult(\n `Failed to update job posting: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Interviews (read-only) ────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'interviews_list')),\n {\n title: 'List Interviews',\n description: 'List all scheduled interviews in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { interviews: Array<Record<string, unknown>> };\n }>(ops.LIST_INTERVIEWS, {});\n return jsonResult(data.crewfoundryBootstrap.interviews);\n } catch (error) {\n ctx.logger.error('crewfoundry interviews_list failed', { error: String(error) });\n return errorResult(\n `Failed to list interviews: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry attendance tools — leave, time tracking, payroll.\n *\n * Surface (5): leave_requests_{list,create,update}, time_entries_list, payroll_list.\n * Lists read the `crewfoundryBootstrap` query; leave-request writes map to the\n * real createCrewLeaveRequest / updateCrewLeaveRequest mutations. Time entries and\n * payroll records are read-only (no backend mutation).\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\nimport { IsoDateTime } from './shared.js';\n\nexport function registerAttendanceTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // ── Leave requests ────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'leave_requests_list')),\n {\n title: 'List Leave Requests',\n description: 'List all leave requests in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { leaveRequests: Array<Record<string, unknown>> };\n }>(ops.LIST_LEAVE_REQUESTS, {});\n return jsonResult(data.crewfoundryBootstrap.leaveRequests);\n } catch (error) {\n ctx.logger.error('crewfoundry leave_requests_list failed', { error: String(error) });\n return errorResult(\n `Failed to list leave requests: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'leave_requests_create')),\n {\n title: 'Create Leave Request',\n description: 'File a new leave request for an employee.',\n inputSchema: {\n employeeId: z.string().min(1).describe('Employee ID'),\n employeeName: z.string().min(1).describe('Employee display name'),\n department: z.string().min(1).describe('Department'),\n type: z.string().min(1).describe('Leave type, e.g. \"annual\" / \"sick\"'),\n startDate: IsoDateTime.describe('Leave start date (ISO-8601)'),\n endDate: IsoDateTime.describe('Leave end date (ISO-8601)'),\n days: z.number().int().describe('Number of leave days'),\n reason: z.string().min(1).describe('Reason for leave'),\n status: z.string().min(1).describe('Status, e.g. \"pending\" / \"approved\"'),\n approverName: z.string().optional().describe('Approver display name'),\n },\n },\n async ({\n employeeId,\n employeeName,\n department,\n type,\n startDate,\n endDate,\n days,\n reason,\n status,\n approverName,\n }) => {\n try {\n const input: Record<string, unknown> = {\n employeeId,\n employeeName,\n department,\n type,\n startDate,\n endDate,\n days,\n reason,\n status,\n };\n if (approverName !== undefined) input.approverName = approverName;\n\n const data = await ctx.gql.workspace.request<{\n createCrewLeaveRequest: Record<string, unknown>;\n }>(ops.CREATE_LEAVE_REQUEST, { input });\n return jsonResult(data.createCrewLeaveRequest);\n } catch (error) {\n ctx.logger.error('crewfoundry leave_requests_create failed', { error: String(error) });\n return errorResult(\n `Failed to create leave request: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'leave_requests_update')),\n {\n title: 'Update Leave Request',\n description:\n 'Update a leave request (e.g. approve/reject by setting status + approverName). At least one mutable field must be provided.',\n inputSchema: {\n id: z.string().describe('Leave request ID'),\n employeeId: z.string().optional().describe('Updated employee ID'),\n employeeName: z.string().optional().describe('Updated employee name'),\n department: z.string().optional().describe('Updated department'),\n type: z.string().optional().describe('Updated leave type'),\n startDate: IsoDateTime.optional().describe('Updated start date (ISO-8601)'),\n endDate: IsoDateTime.optional().describe('Updated end date (ISO-8601)'),\n days: z.number().int().optional().describe('Updated number of days'),\n reason: z.string().optional().describe('Updated reason'),\n status: z.string().optional().describe('Updated status, e.g. \"approved\" / \"rejected\"'),\n approverName: z.string().optional().describe('Updated approver name'),\n },\n },\n async ({\n id,\n employeeId,\n employeeName,\n department,\n type,\n startDate,\n endDate,\n days,\n reason,\n status,\n approverName,\n }) => {\n try {\n const input: Record<string, unknown> = {};\n if (employeeId !== undefined) input.employeeId = employeeId;\n if (employeeName !== undefined) input.employeeName = employeeName;\n if (department !== undefined) input.department = department;\n if (type !== undefined) input.type = type;\n if (startDate !== undefined) input.startDate = startDate;\n if (endDate !== undefined) input.endDate = endDate;\n if (days !== undefined) input.days = days;\n if (reason !== undefined) input.reason = reason;\n if (status !== undefined) input.status = status;\n if (approverName !== undefined) input.approverName = approverName;\n\n if (Object.keys(input).length === 0) {\n return errorResult('No updates specified — provide at least one mutable field');\n }\n\n const data = await ctx.gql.workspace.request<{\n updateCrewLeaveRequest: Record<string, unknown>;\n }>(ops.UPDATE_LEAVE_REQUEST, { id, input });\n return jsonResult(data.updateCrewLeaveRequest);\n } catch (error) {\n ctx.logger.error('crewfoundry leave_requests_update failed', { error: String(error) });\n return errorResult(\n `Failed to update leave request: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Time entries (read-only) ──────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'time_entries_list')),\n {\n title: 'List Time Entries',\n description: 'List all clock-in/clock-out time entries in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { timeEntries: Array<Record<string, unknown>> };\n }>(ops.LIST_TIME_ENTRIES, {});\n return jsonResult(data.crewfoundryBootstrap.timeEntries);\n } catch (error) {\n ctx.logger.error('crewfoundry time_entries_list failed', { error: String(error) });\n return errorResult(\n `Failed to list time entries: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Payroll (read-only) ───────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'payroll_list')),\n {\n title: 'List Payroll Records',\n description: 'List all payroll records in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { payrollRecords: Array<Record<string, unknown>> };\n }>(ops.LIST_PAYROLL_RECORDS, {});\n return jsonResult(data.crewfoundryBootstrap.payrollRecords);\n } catch (error) {\n ctx.logger.error('crewfoundry payroll_list failed', { error: String(error) });\n return errorResult(\n `Failed to list payroll records: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry client / delivery tools — the agency-side surface.\n *\n * Surface (5): clients_list, invoices_list, projects_list, vendors_list,\n * marketplace_services_list. All read-only — the backend exposes these\n * collections through `crewfoundryBootstrap` with no per-entity mutation.\n */\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\n\nexport function registerClientTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'clients_list')),\n {\n title: 'List Clients',\n description: 'List all clients in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { clients: Array<Record<string, unknown>> };\n }>(ops.LIST_CLIENTS, {});\n return jsonResult(data.crewfoundryBootstrap.clients);\n } catch (error) {\n ctx.logger.error('crewfoundry clients_list failed', { error: String(error) });\n return errorResult(\n `Failed to list clients: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'invoices_list')),\n {\n title: 'List Invoices',\n description: 'List all invoices in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { invoices: Array<Record<string, unknown>> };\n }>(ops.LIST_INVOICES, {});\n return jsonResult(data.crewfoundryBootstrap.invoices);\n } catch (error) {\n ctx.logger.error('crewfoundry invoices_list failed', { error: String(error) });\n return errorResult(\n `Failed to list invoices: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'projects_list')),\n {\n title: 'List Projects',\n description: 'List all projects in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { projects: Array<Record<string, unknown>> };\n }>(ops.LIST_PROJECTS, {});\n return jsonResult(data.crewfoundryBootstrap.projects);\n } catch (error) {\n ctx.logger.error('crewfoundry projects_list failed', { error: String(error) });\n return errorResult(\n `Failed to list projects: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'vendors_list')),\n {\n title: 'List Vendors',\n description: 'List all vendors in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { vendors: Array<Record<string, unknown>> };\n }>(ops.LIST_VENDORS, {});\n return jsonResult(data.crewfoundryBootstrap.vendors);\n } catch (error) {\n ctx.logger.error('crewfoundry vendors_list failed', { error: String(error) });\n return errorResult(\n `Failed to list vendors: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'marketplace_services_list')),\n {\n title: 'List Marketplace Services',\n description: 'List all marketplace services offered in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { marketplaceServices: Array<Record<string, unknown>> };\n }>(ops.LIST_MARKETPLACE_SERVICES, {});\n return jsonResult(data.crewfoundryBootstrap.marketplaceServices);\n } catch (error) {\n ctx.logger.error('crewfoundry marketplace_services_list failed', { error: String(error) });\n return errorResult(\n `Failed to list marketplace services: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry learning & development tools.\n *\n * Surface (2): courses_list, learning_paths_list. Both read-only — the backend\n * exposes courses and learning paths through `crewfoundryBootstrap` with no\n * per-entity mutation.\n */\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\n\nexport function registerLearningTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'courses_list')),\n {\n title: 'List Courses',\n description: 'List all learning courses in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { courses: Array<Record<string, unknown>> };\n }>(ops.LIST_COURSES, {});\n return jsonResult(data.crewfoundryBootstrap.courses);\n } catch (error) {\n ctx.logger.error('crewfoundry courses_list failed', { error: String(error) });\n return errorResult(\n `Failed to list courses: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'learning_paths_list')),\n {\n title: 'List Learning Paths',\n description: 'List all learning paths in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { learningPaths: Array<Record<string, unknown>> };\n }>(ops.LIST_LEARNING_PATHS, {});\n return jsonResult(data.crewfoundryBootstrap.learningPaths);\n } catch (error) {\n ctx.logger.error('crewfoundry learning_paths_list failed', { error: String(error) });\n return errorResult(\n `Failed to list learning paths: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry engagement tools — announcements + notifications.\n *\n * Surface (5): announcements_{list,create}, crewalerts_{list,mark_read,mark_all_read}.\n * Lists read the `crewfoundryBootstrap` query; writes map to the real\n * createCrewAnnouncement / markCrewNotificationRead / markAllCrewNotificationsRead\n * mutations (the notification mutations return Boolean, not the entity).\n *\n * Note: the MCP tool prefix is `crewalerts_*` (not `notifications_*`) to avoid\n * colliding with the generic `notifications` module's tool names when both are\n * mounted in a shell. The GraphQL operations/types are unchanged.\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\nimport { IsoDateTime } from './shared.js';\n\nexport function registerEngagementTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // ── Announcements ─────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'announcements_list')),\n {\n title: 'List Announcements',\n description: 'List all crew announcements in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { announcements: Array<Record<string, unknown>> };\n }>(ops.LIST_ANNOUNCEMENTS, {});\n return jsonResult(data.crewfoundryBootstrap.announcements);\n } catch (error) {\n ctx.logger.error('crewfoundry announcements_list failed', { error: String(error) });\n return errorResult(\n `Failed to list announcements: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'announcements_create')),\n {\n title: 'Create Announcement',\n description: 'Publish a new crew announcement.',\n inputSchema: {\n title: z.string().min(1).describe('Announcement title'),\n content: z.string().min(1).describe('Announcement body'),\n author: z.string().min(1).describe('Author display name'),\n authorRole: z.string().min(1).describe('Author role / title'),\n category: z.string().min(1).describe('Category, e.g. \"policy\" / \"event\"'),\n priority: z.string().min(1).describe('Priority, e.g. \"low\" / \"high\"'),\n isPinned: z.boolean().describe('Whether the announcement is pinned'),\n tags: z.array(z.string()).describe('Tag labels'),\n viewCount: z.number().int().describe('Initial view count (typically 0)'),\n createdAt: IsoDateTime.describe('Creation timestamp (ISO-8601)'),\n },\n },\n async ({\n title,\n content,\n author,\n authorRole,\n category,\n priority,\n isPinned,\n tags,\n viewCount,\n createdAt,\n }) => {\n try {\n const input: Record<string, unknown> = {\n title,\n content,\n author,\n authorRole,\n category,\n priority,\n isPinned,\n tags,\n viewCount,\n createdAt,\n };\n const data = await ctx.gql.workspace.request<{\n createCrewAnnouncement: Record<string, unknown>;\n }>(ops.CREATE_ANNOUNCEMENT, { input });\n return jsonResult(data.createCrewAnnouncement);\n } catch (error) {\n ctx.logger.error('crewfoundry announcements_create failed', { error: String(error) });\n return errorResult(\n `Failed to create announcement: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Notifications ─────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'crewalerts_list')),\n {\n title: 'List Notifications',\n description: 'List all notifications in the bound workspace.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { notifications: Array<Record<string, unknown>> };\n }>(ops.LIST_NOTIFICATIONS, {});\n return jsonResult(data.crewfoundryBootstrap.notifications);\n } catch (error) {\n ctx.logger.error('crewfoundry crewalerts_list failed', { error: String(error) });\n return errorResult(\n `Failed to list notifications: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'crewalerts_mark_read')),\n {\n title: 'Mark Notification Read',\n description: 'Mark a single notification as read.',\n inputSchema: { id: z.string().describe('Notification ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ markCrewNotificationRead: boolean }>(\n ops.MARK_NOTIFICATION_READ,\n { id },\n );\n return jsonResult({ ok: data.markCrewNotificationRead, id });\n } catch (error) {\n ctx.logger.error('crewfoundry crewalerts_mark_read failed', { error: String(error) });\n return errorResult(\n `Failed to mark notification read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'crewalerts_mark_all_read')),\n {\n title: 'Mark All Notifications Read',\n description: 'Mark every notification in the bound workspace as read.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{ markAllCrewNotificationsRead: boolean }>(\n ops.MARK_ALL_NOTIFICATIONS_READ,\n {},\n );\n return jsonResult({ ok: data.markAllCrewNotificationsRead });\n } catch (error) {\n ctx.logger.error('crewfoundry crewalerts_mark_all_read failed', {\n error: String(error),\n });\n return errorResult(\n `Failed to mark all notifications read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Crewfoundry overview tool — the single-call workspace snapshot.\n *\n * Surface (1): overview. Maps to the `crewfoundryBootstrap` query, returning\n * every collection in one shot (employees, departments, teams, candidates,\n * job postings, interviews, leave requests, time entries, payroll, clients,\n * invoices, projects, vendors, courses, learning paths, announcements,\n * notifications, marketplace services). This is the crewfoundry analog of the\n * kadaikodi analytics/dashboard tools — there is no dedicated analytics query.\n */\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../../core/index.js';\nimport * as ops from '../operations.js';\n\nexport function registerOverviewTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'overview')),\n {\n title: 'Crewfoundry Overview',\n description:\n 'Single-call snapshot of the bound workspace — every crewfoundry collection (people, recruitment, attendance, clients/delivery, learning, engagement) in one response.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: Record<string, unknown>;\n }>(ops.BOOTSTRAP_OVERVIEW, {});\n return jsonResult(data.crewfoundryBootstrap);\n } catch (error) {\n ctx.logger.error('crewfoundry overview failed', { error: String(error) });\n return errorResult(\n `Failed to get crewfoundry overview: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResourceUri, type McpContext } from '../../core/index.js';\nimport { BOOTSTRAP_OVERVIEW, LIST_EMPLOYEES, LIST_ANNOUNCEMENTS } from './operations.js';\n\n/**\n * Read-only Crewfoundry MCP resources. URIs are product-prefixed via\n * mcpResourceUri so they don't collide when multiple MCP servers run side by\n * side. Each is tracked at function entry so the shell manifest reflects what\n * was registered even though registration is imperative.\n */\nexport function registerCrewfoundryResources(\n server: McpServer,\n ctx: McpContext,\n track: (uri: string) => string,\n): void {\n const schemaUri = track(mcpResourceUri(ctx.productName, 'schema'));\n const overviewUri = track(mcpResourceUri(ctx.productName, 'overview'));\n const employeesUri = track(mcpResourceUri(ctx.productName, 'employees'));\n const announcementsUri = track(mcpResourceUri(ctx.productName, 'announcements'));\n\n // <product>://schema — domain overview\n server.registerResource(\n 'crewfoundry-schema',\n schemaUri,\n {\n title: 'Crewfoundry Domain Schema',\n description:\n 'Overview of the Crewfoundry workforce/HR domain — entities and the per-entity tool surface.',\n mimeType: 'text/plain',\n },\n async () => {\n ctx.logger.debug(`Resource ${schemaUri} requested`);\n const schema = `# Crewfoundry Domain (Overview)\n\nWorkforce / HR / crew-operations platform.\n\n## Read model\nAll collections are served by a single \\`crewfoundryBootstrap\\` query; each list\ntool selects only the collection it needs from it. The \\`overview\\` tool returns\nthe whole bootstrap in one call.\n\n## Entities\n- CrewEmployee — workforce directory (create/update/remove)\n- CrewDepartment, CrewTeam — org structure (read-only)\n- CrewCandidate — recruitment pipeline (create/update)\n- CrewJobPosting — open requisitions (create/update)\n- CrewInterview — scheduled interviews (read-only)\n- CrewLeaveRequest — time-off requests (create/update)\n- CrewTimeEntry — clock-in/out entries (read-only)\n- CrewPayrollRecord — payroll runs (read-only)\n- CrewClient, CrewInvoice, CrewProject, CrewVendor, CrewMarketplaceService — delivery side (read-only)\n- CrewCourse, CrewLearningPath — learning & development (read-only)\n- CrewAnnouncement — internal announcements (create)\n- CrewNotification — user notifications (mark read / mark all read)\n\n## Tool groups\npeople, recruitment, attendance, clients, learning, engagement, overview.\nAll run against the WORKSPACE gateway (workspace-scoped).\n`;\n return {\n contents: [{ uri: schemaUri, text: schema, mimeType: 'text/plain' }],\n };\n },\n );\n\n // <product>://overview — full bootstrap snapshot\n server.registerResource(\n 'crewfoundry-overview',\n overviewUri,\n {\n title: 'Crewfoundry Workspace Snapshot',\n description:\n 'Live single-call snapshot of every crewfoundry collection in the bound workspace.',\n mimeType: 'application/json',\n },\n async () => {\n ctx.logger.debug(`Resource ${overviewUri} requested`);\n try {\n const data = await ctx.gql.workspace.request<{ crewfoundryBootstrap: unknown }>(\n BOOTSTRAP_OVERVIEW,\n {},\n );\n return {\n contents: [\n {\n uri: overviewUri,\n text: JSON.stringify(data.crewfoundryBootstrap, null, 2),\n mimeType: 'application/json',\n },\n ],\n };\n } catch (error) {\n return {\n contents: [\n {\n uri: overviewUri,\n text: JSON.stringify({\n error: error instanceof Error ? error.message : String(error),\n }),\n mimeType: 'application/json',\n },\n ],\n };\n }\n },\n );\n\n // <product>://employees — employee directory\n server.registerResource(\n 'crewfoundry-employees',\n employeesUri,\n {\n title: 'Crewfoundry Employee Directory',\n description: 'The employee directory in the bound workspace.',\n mimeType: 'application/json',\n },\n async () => {\n ctx.logger.debug(`Resource ${employeesUri} requested`);\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { employees: unknown };\n }>(LIST_EMPLOYEES, {});\n return {\n contents: [\n {\n uri: employeesUri,\n text: JSON.stringify(data.crewfoundryBootstrap.employees, null, 2),\n mimeType: 'application/json',\n },\n ],\n };\n } catch (error) {\n return {\n contents: [\n {\n uri: employeesUri,\n text: JSON.stringify({\n error: error instanceof Error ? error.message : String(error),\n }),\n mimeType: 'application/json',\n },\n ],\n };\n }\n },\n );\n\n // <product>://announcements — announcements feed\n server.registerResource(\n 'crewfoundry-announcements',\n announcementsUri,\n {\n title: 'Crewfoundry Announcements',\n description: 'The crew announcements feed in the bound workspace.',\n mimeType: 'application/json',\n },\n async () => {\n ctx.logger.debug(`Resource ${announcementsUri} requested`);\n try {\n const data = await ctx.gql.workspace.request<{\n crewfoundryBootstrap: { announcements: unknown };\n }>(LIST_ANNOUNCEMENTS, {});\n return {\n contents: [\n {\n uri: announcementsUri,\n text: JSON.stringify(data.crewfoundryBootstrap.announcements, null, 2),\n mimeType: 'application/json',\n },\n ],\n };\n } catch (error) {\n return {\n contents: [\n {\n uri: announcementsUri,\n text: JSON.stringify({\n error: error instanceof Error ? error.message : String(error),\n }),\n mimeType: 'application/json',\n },\n ],\n };\n }\n },\n );\n}\n","import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpPromptName, type McpContext } from '../../core/index.js';\n\n/**\n * Crewfoundry MCP prompts — guided multi-step workflows. Names are\n * product-prefixed via mcpPromptName and tracked at function entry.\n */\nexport function registerCrewfoundryPrompts(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n const p = ctx.productName;\n const onboardingName = track(mcpPromptName(p, 'employee-onboarding'));\n const opsName = track(mcpPromptName(p, 'hr-ops'));\n\n // <product>-employee-onboarding — bring a new hire online\n server.registerPrompt(\n onboardingName,\n {\n title: 'Employee Onboarding',\n description:\n 'Guide for onboarding a new Crewfoundry employee end to end: confirm the department/team, create the employee record, and announce the hire.',\n argsSchema: {\n name: z.string().optional().describe('New hire full name'),\n department: z.string().optional().describe('Target department'),\n },\n },\n ({ name, department }) => {\n ctx.logger.debug(`Prompt ${onboardingName} called`, { name, department });\n const nameNote = name ? `Use the name \"${name}\".` : 'Ask the user for the new hire name.';\n const deptNote = department\n ? `Place them in the \"${department}\" department.`\n : `First list departments with ${p}_departments_list and pick one.`;\n return {\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: `Help me onboard a new Crewfoundry employee.\n\n1. **Confirm Org**: ${deptNote} Optionally check teams with ${p}_teams_list.\n2. **Create Employee**: Use ${p}_employees_create. ${nameNote} Set position, location, type (e.g. full-time), status=active, salary, performanceScore, and startDate (ISO-8601). Set managerId if known.\n3. **Verify**: Use ${p}_employees_list to confirm the new record.\n4. **(Optional) Announce**: Use ${p}_announcements_create to welcome the hire (category=\"people\", priority=\"normal\").\n\nShow results at each step and confirm before announcing.`,\n },\n },\n ],\n };\n },\n );\n\n // <product>-hr-ops — daily HR operations\n server.registerPrompt(\n opsName,\n {\n title: 'HR Operations',\n description:\n 'Daily HR operations workflow: triage leave requests, review the hiring pipeline, check payroll/time, and clear notifications.',\n argsSchema: {\n department: z.string().optional().describe('Department to focus on'),\n },\n },\n ({ department }) => {\n ctx.logger.debug(`Prompt ${opsName} called`, { department });\n const deptNote = department\n ? `Focus on the \"${department}\" department.`\n : 'Cover the whole workspace.';\n return {\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: `Run daily Crewfoundry HR operations. ${deptNote}\n\n1. **Snapshot**: Use ${p}_overview for a one-call read of the workspace.\n2. **Leave Queue**: Use ${p}_leave_requests_list to find pending requests; approve/reject with ${p}_leave_requests_update (set status + approverName).\n3. **Hiring Pipeline**: Use ${p}_candidates_list and ${p}_job_postings_list; check upcoming ${p}_interviews_list. Advance candidates with ${p}_candidates_update.\n4. **Time & Payroll**: Use ${p}_time_entries_list and ${p}_payroll_list to spot anomalies.\n5. **Notifications**: Use ${p}_crewalerts_list; clear them with ${p}_crewalerts_mark_read or ${p}_crewalerts_mark_all_read.\n\nSummarize what needs attention after each step.`,\n },\n },\n ],\n };\n },\n );\n}\n","/**\n * Crewfoundry module — domain module for the future-products ecosystem program.\n *\n * Covers every collection of wspace-crewfoundry-svc grouped into per-domain\n * sub-APIs: people (employees/departments/teams), recruitment\n * (candidates/job-postings/interviews), attendance (leave/time/payroll),\n * clients (clients/invoices/projects/vendors/marketplace), learning\n * (courses/learning-paths), engagement (announcements/notifications), and a\n * single-call overview. Mirrors the kadaikodi module's structure\n * (tools/<group>.ts + resources.ts + prompts.ts) and the canonical tags\n * module's typing discipline.\n *\n * Backend: ~/products/wspace/crewfoundry/wspace-crewfoundry-svc/\n * (Hive service name `crewfoundry`). All operations run against the WORKSPACE\n * gateway. The backend exposes a single `crewfoundryBootstrap` read query plus\n * a focused set of CRUD mutations — there is no health probe or analytics query.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerPeopleTools } from './tools/people.js';\nimport { registerRecruitmentTools } from './tools/recruitment.js';\nimport { registerAttendanceTools } from './tools/attendance.js';\nimport { registerClientTools } from './tools/clients.js';\nimport { registerLearningTools } from './tools/learning.js';\nimport { registerEngagementTools } from './tools/engagement.js';\nimport { registerOverviewTools } from './tools/overview.js';\nimport { registerCrewfoundryResources } from './resources.js';\nimport { registerCrewfoundryPrompts } from './prompts.js';\n\nconst crewfoundryModule: McpModule = {\n id: 'crewfoundry',\n version: '0.0.1',\n displayName: 'Crewfoundry',\n dependsOn: ['auth'],\n capabilities: { tools: {}, resources: {}, prompts: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const resources: string[] = [];\n const prompts: string[] = [];\n\n const trackTool = (n: string): string => {\n tools.push(n);\n return n;\n };\n const trackResource = (uri: string): string => {\n resources.push(uri);\n return uri;\n };\n const trackPrompt = (n: string): string => {\n prompts.push(n);\n return n;\n };\n\n registerPeopleTools(server, ctx, trackTool);\n registerRecruitmentTools(server, ctx, trackTool);\n registerAttendanceTools(server, ctx, trackTool);\n registerClientTools(server, ctx, trackTool);\n registerLearningTools(server, ctx, trackTool);\n registerEngagementTools(server, ctx, trackTool);\n registerOverviewTools(server, ctx, trackTool);\n\n registerCrewfoundryResources(server, ctx, trackResource);\n registerCrewfoundryPrompts(server, ctx, trackPrompt);\n\n return { tools, resources, prompts };\n },\n};\n\nexport default crewfoundryModule;\n"]}