@burdenoff/mcp-libs 2026.1014.4 → 2026.1026.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 (829) hide show
  1. package/dist/{chunk-G76DKEPI.js → chunk-FHXCNP2U.js} +36 -4
  2. package/dist/chunk-FHXCNP2U.js.map +1 -0
  3. package/dist/{chunk-SX6IGKZH.js → chunk-S2DM4KCX.js} +3 -3
  4. package/dist/{chunk-SX6IGKZH.js.map → chunk-S2DM4KCX.js.map} +1 -1
  5. package/dist/core/auth/device-code.d.ts +50 -0
  6. package/dist/core/auth/index.d.ts +2 -0
  7. package/dist/core/auth/store.d.ts +26 -0
  8. package/dist/core/capabilities.d.ts +16 -0
  9. package/dist/core/config/store.d.ts +39 -0
  10. package/dist/core/context.d.ts +35 -0
  11. package/dist/core/errors.d.ts +15 -0
  12. package/dist/core/gql/client.d.ts +14 -0
  13. package/dist/core/index.cjs +35 -1
  14. package/dist/core/index.cjs.map +1 -1
  15. package/dist/core/index.d.ts +14 -59
  16. package/dist/core/index.js +1 -1
  17. package/dist/core/logger.d.ts +18 -0
  18. package/dist/core/module.d.ts +33 -0
  19. package/dist/core/progress.d.ts +5 -0
  20. package/dist/core/result.d.ts +29 -0
  21. package/dist/core/server.d.ts +15 -0
  22. package/dist/core/tool-governance.d.ts +14 -0
  23. package/dist/core/tool-name.d.ts +7 -0
  24. package/dist/index.cjs +19 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.ts +3 -7
  27. package/dist/index.js +1 -1
  28. package/dist/modules/adaptercloud/index.cjs.map +1 -1
  29. package/dist/modules/adaptercloud/index.d.ts +2 -7
  30. package/dist/modules/adaptercloud/index.js +1 -1
  31. package/dist/modules/adaptercloud/operations.d.ts +47 -0
  32. package/dist/modules/adaptercloud/prompts.d.ts +3 -0
  33. package/dist/modules/adaptercloud/resources.d.ts +3 -0
  34. package/dist/modules/adaptercloud/tools/adapters.d.ts +3 -0
  35. package/dist/modules/adaptercloud/tools/connections.d.ts +3 -0
  36. package/dist/modules/adaptercloud/tools/cost.d.ts +3 -0
  37. package/dist/modules/adaptercloud/tools/drift.d.ts +3 -0
  38. package/dist/modules/adaptercloud/tools/health.d.ts +3 -0
  39. package/dist/modules/adaptercloud/tools/policies.d.ts +3 -0
  40. package/dist/modules/adaptercloud/tools/resources.d.ts +3 -0
  41. package/dist/modules/adaptercloud/tools/shared.d.ts +25 -0
  42. package/dist/modules/adaptercloud/tools/sync.d.ts +3 -0
  43. package/dist/modules/adaptercloud/tools/topology.d.ts +3 -0
  44. package/dist/modules/adaptercloud/tools/violations.d.ts +3 -0
  45. package/dist/modules/artistrybase/index.cjs.map +1 -1
  46. package/dist/modules/artistrybase/index.d.ts +2 -7
  47. package/dist/modules/artistrybase/index.js +1 -1
  48. package/dist/modules/artistrybase/operations.d.ts +63 -0
  49. package/dist/modules/artistrybase/prompts.d.ts +3 -0
  50. package/dist/modules/artistrybase/resources.d.ts +3 -0
  51. package/dist/modules/artistrybase/tools/health.d.ts +3 -0
  52. package/dist/modules/artistrybase/tools/library.d.ts +3 -0
  53. package/dist/modules/artistrybase/tools/portfolio.d.ts +3 -0
  54. package/dist/modules/artistrybase/tools/production.d.ts +3 -0
  55. package/dist/modules/artistrybase/tools/review.d.ts +3 -0
  56. package/dist/modules/artistrybase/tools/shared.d.ts +14 -0
  57. package/dist/modules/assethandler/index.cjs.map +1 -1
  58. package/dist/modules/assethandler/index.d.ts +2 -7
  59. package/dist/modules/assethandler/index.js +1 -1
  60. package/dist/modules/assethandler/operations.d.ts +57 -0
  61. package/dist/modules/assethandler/prompts.d.ts +3 -0
  62. package/dist/modules/assethandler/resources.d.ts +3 -0
  63. package/dist/modules/assethandler/tools/analytics.d.ts +3 -0
  64. package/dist/modules/assethandler/tools/assets.d.ts +3 -0
  65. package/dist/modules/assethandler/tools/finance.d.ts +3 -0
  66. package/dist/modules/assethandler/tools/governance.d.ts +3 -0
  67. package/dist/modules/assethandler/tools/innovation.d.ts +3 -0
  68. package/dist/modules/assethandler/tools/service.d.ts +3 -0
  69. package/dist/modules/assethandler/tools/shared.d.ts +18 -0
  70. package/dist/modules/atheletebridge/index.cjs.map +1 -1
  71. package/dist/modules/atheletebridge/index.d.ts +2 -7
  72. package/dist/modules/atheletebridge/index.js +1 -1
  73. package/dist/modules/atheletebridge/operations.d.ts +42 -0
  74. package/dist/modules/atheletebridge/prompts.d.ts +3 -0
  75. package/dist/modules/atheletebridge/resources.d.ts +3 -0
  76. package/dist/modules/atheletebridge/tools/fixtures.d.ts +3 -0
  77. package/dist/modules/atheletebridge/tools/health.d.ts +3 -0
  78. package/dist/modules/atheletebridge/tools/programs.d.ts +3 -0
  79. package/dist/modules/atheletebridge/tools/sessions.d.ts +3 -0
  80. package/dist/modules/atheletebridge/tools/shared.d.ts +14 -0
  81. package/dist/modules/atheletebridge/tools/teams.d.ts +3 -0
  82. package/dist/modules/atheletebridge/tools/workouts.d.ts +3 -0
  83. package/dist/modules/auth/extra-tools.d.ts +3 -0
  84. package/dist/modules/auth/index.cjs +3 -1
  85. package/dist/modules/auth/index.cjs.map +1 -1
  86. package/dist/modules/auth/index.d.ts +3 -50
  87. package/dist/modules/auth/index.js +6 -4
  88. package/dist/modules/auth/index.js.map +1 -1
  89. package/dist/modules/auth/{index.d.cts → legacy-auth.d.ts} +6 -14
  90. package/dist/modules/auth/more-tools.d.ts +3 -0
  91. package/dist/modules/auth/operations.d.ts +35 -0
  92. package/dist/modules/auth/tools.d.ts +3 -0
  93. package/dist/modules/billing/index.cjs.map +1 -1
  94. package/dist/modules/billing/index.d.ts +2 -7
  95. package/dist/modules/billing/index.js +1 -1
  96. package/dist/modules/billing/operations.d.ts +17 -0
  97. package/dist/modules/billing/tools.d.ts +3 -0
  98. package/dist/modules/brainyrich/index.cjs.map +1 -1
  99. package/dist/modules/brainyrich/index.d.ts +2 -7
  100. package/dist/modules/brainyrich/index.js +1 -1
  101. package/dist/modules/brainyrich/operations.d.ts +57 -0
  102. package/dist/modules/brainyrich/prompts.d.ts +3 -0
  103. package/dist/modules/brainyrich/resources.d.ts +3 -0
  104. package/dist/modules/brainyrich/tools/accounts.d.ts +3 -0
  105. package/dist/modules/brainyrich/tools/analytics.d.ts +3 -0
  106. package/dist/modules/brainyrich/tools/goals.d.ts +3 -0
  107. package/dist/modules/brainyrich/tools/holdings.d.ts +3 -0
  108. package/dist/modules/brainyrich/tools/households.d.ts +3 -0
  109. package/dist/modules/brainyrich/tools/insights.d.ts +3 -0
  110. package/dist/modules/brainyrich/tools/modelPortfolios.d.ts +3 -0
  111. package/dist/modules/brainyrich/tools/portfolios.d.ts +3 -0
  112. package/dist/modules/brainyrich/tools/rebalance.d.ts +3 -0
  113. package/dist/modules/brainyrich/tools/shared.d.ts +16 -0
  114. package/dist/modules/brainyrich/tools/transactions.d.ts +3 -0
  115. package/dist/modules/buildmyiq/index.cjs.map +1 -1
  116. package/dist/modules/buildmyiq/index.d.ts +2 -7
  117. package/dist/modules/buildmyiq/index.js +1 -1
  118. package/dist/modules/buildmyiq/operations.d.ts +43 -0
  119. package/dist/modules/buildmyiq/prompts.d.ts +3 -0
  120. package/dist/modules/buildmyiq/resources.d.ts +3 -0
  121. package/dist/modules/buildmyiq/tools/assessments.d.ts +3 -0
  122. package/dist/modules/buildmyiq/tools/certificates.d.ts +3 -0
  123. package/dist/modules/buildmyiq/tools/cohorts.d.ts +3 -0
  124. package/dist/modules/buildmyiq/tools/courses.d.ts +3 -0
  125. package/dist/modules/buildmyiq/tools/enrollments.d.ts +3 -0
  126. package/dist/modules/buildmyiq/tools/health.d.ts +3 -0
  127. package/dist/modules/buildmyiq/tools/lessons.d.ts +3 -0
  128. package/dist/modules/buildmyiq/tools/modules.d.ts +3 -0
  129. package/dist/modules/buildmyiq/tools/shared.d.ts +14 -0
  130. package/dist/modules/buildmyiq/tools/skills.d.ts +3 -0
  131. package/dist/modules/buildmyiq/tools/submissions.d.ts +3 -0
  132. package/dist/modules/channels/index.cjs.map +1 -1
  133. package/dist/modules/channels/index.d.ts +2 -7
  134. package/dist/modules/channels/index.js +1 -1
  135. package/dist/modules/channels/operations.d.ts +12 -0
  136. package/dist/modules/channels/tools.d.ts +3 -0
  137. package/dist/modules/collabkin/index.cjs.map +1 -1
  138. package/dist/modules/collabkin/index.d.ts +2 -7
  139. package/dist/modules/collabkin/index.js +1 -1
  140. package/dist/modules/collabkin/operations.d.ts +41 -0
  141. package/dist/modules/collabkin/prompts.d.ts +3 -0
  142. package/dist/modules/collabkin/resources.d.ts +3 -0
  143. package/dist/modules/collabkin/tools/comments.d.ts +3 -0
  144. package/dist/modules/collabkin/tools/health.d.ts +3 -0
  145. package/dist/modules/collabkin/tools/memberships.d.ts +3 -0
  146. package/dist/modules/collabkin/tools/memories.d.ts +3 -0
  147. package/dist/modules/collabkin/tools/people.d.ts +3 -0
  148. package/dist/modules/collabkin/tools/relationships.d.ts +3 -0
  149. package/dist/modules/collabkin/tools/shared.d.ts +12 -0
  150. package/dist/modules/collabkin/tools/stories.d.ts +3 -0
  151. package/dist/modules/collabkin/tools/timeline.d.ts +3 -0
  152. package/dist/modules/collabkin/tools/trees.d.ts +3 -0
  153. package/dist/modules/comradecircle/index.cjs.map +1 -1
  154. package/dist/modules/comradecircle/index.d.ts +2 -7
  155. package/dist/modules/comradecircle/index.js +1 -1
  156. package/dist/modules/comradecircle/operations.d.ts +53 -0
  157. package/dist/modules/comradecircle/prompts.d.ts +3 -0
  158. package/dist/modules/comradecircle/resources.d.ts +3 -0
  159. package/dist/modules/comradecircle/tools/channels.d.ts +3 -0
  160. package/dist/modules/comradecircle/tools/circles.d.ts +3 -0
  161. package/dist/modules/comradecircle/tools/comments.d.ts +3 -0
  162. package/dist/modules/comradecircle/tools/events.d.ts +3 -0
  163. package/dist/modules/comradecircle/tools/feed.d.ts +3 -0
  164. package/dist/modules/comradecircle/tools/health.d.ts +3 -0
  165. package/dist/modules/comradecircle/tools/memberships.d.ts +3 -0
  166. package/dist/modules/comradecircle/tools/polls.d.ts +3 -0
  167. package/dist/modules/comradecircle/tools/posts.d.ts +3 -0
  168. package/dist/modules/comradecircle/tools/profiles.d.ts +3 -0
  169. package/dist/modules/comradecircle/tools/shared.d.ts +16 -0
  170. package/dist/modules/conversations/index.cjs +6 -2
  171. package/dist/modules/conversations/index.cjs.map +1 -1
  172. package/dist/modules/conversations/index.d.ts +2 -7
  173. package/dist/modules/conversations/index.js +7 -3
  174. package/dist/modules/conversations/index.js.map +1 -1
  175. package/dist/modules/conversations/operations.d.ts +50 -0
  176. package/dist/modules/conversations/tools.d.ts +3 -0
  177. package/dist/modules/coolandlovely/index.cjs.map +1 -1
  178. package/dist/modules/coolandlovely/index.d.ts +2 -7
  179. package/dist/modules/coolandlovely/index.js +1 -1
  180. package/dist/modules/coolandlovely/operations.d.ts +50 -0
  181. package/dist/modules/coolandlovely/prompts.d.ts +3 -0
  182. package/dist/modules/coolandlovely/resources.d.ts +3 -0
  183. package/dist/modules/coolandlovely/tools/brands.d.ts +3 -0
  184. package/dist/modules/coolandlovely/tools/collaborations.d.ts +3 -0
  185. package/dist/modules/coolandlovely/tools/collections.d.ts +3 -0
  186. package/dist/modules/coolandlovely/tools/health.d.ts +3 -0
  187. package/dist/modules/coolandlovely/tools/lookbooks.d.ts +3 -0
  188. package/dist/modules/coolandlovely/tools/looks.d.ts +3 -0
  189. package/dist/modules/coolandlovely/tools/profile.d.ts +3 -0
  190. package/dist/modules/coolandlovely/tools/shared.d.ts +25 -0
  191. package/dist/modules/coolandlovely/tools/style-items.d.ts +3 -0
  192. package/dist/modules/coolandlovely/tools/wardrobe.d.ts +3 -0
  193. package/dist/modules/cosmicintersection/index.cjs.map +1 -1
  194. package/dist/modules/cosmicintersection/index.d.ts +2 -7
  195. package/dist/modules/cosmicintersection/index.js +1 -1
  196. package/dist/modules/cosmicintersection/operations.d.ts +53 -0
  197. package/dist/modules/cosmicintersection/prompts.d.ts +3 -0
  198. package/dist/modules/cosmicintersection/resources.d.ts +3 -0
  199. package/dist/modules/cosmicintersection/tools/analyses.d.ts +3 -0
  200. package/dist/modules/cosmicintersection/tools/collections.d.ts +3 -0
  201. package/dist/modules/cosmicintersection/tools/datasets.d.ts +3 -0
  202. package/dist/modules/cosmicintersection/tools/grants.d.ts +3 -0
  203. package/dist/modules/cosmicintersection/tools/health.d.ts +3 -0
  204. package/dist/modules/cosmicintersection/tools/notebooks.d.ts +3 -0
  205. package/dist/modules/cosmicintersection/tools/pipelines.d.ts +3 -0
  206. package/dist/modules/cosmicintersection/tools/releases.d.ts +3 -0
  207. package/dist/modules/cosmicintersection/tools/runs.d.ts +3 -0
  208. package/dist/modules/cosmicintersection/tools/shared.d.ts +15 -0
  209. package/dist/modules/cosmicintersection/tools/sources.d.ts +3 -0
  210. package/dist/modules/crewfoundry/index.cjs.map +1 -1
  211. package/dist/modules/crewfoundry/index.d.ts +2 -7
  212. package/dist/modules/crewfoundry/index.js +1 -1
  213. package/dist/modules/crewfoundry/operations.d.ts +49 -0
  214. package/dist/modules/crewfoundry/prompts.d.ts +3 -0
  215. package/dist/modules/crewfoundry/resources.d.ts +3 -0
  216. package/dist/modules/crewfoundry/tools/attendance.d.ts +3 -0
  217. package/dist/modules/crewfoundry/tools/clients.d.ts +3 -0
  218. package/dist/modules/crewfoundry/tools/engagement.d.ts +3 -0
  219. package/dist/modules/crewfoundry/tools/learning.d.ts +3 -0
  220. package/dist/modules/crewfoundry/tools/overview.d.ts +3 -0
  221. package/dist/modules/crewfoundry/tools/people.d.ts +3 -0
  222. package/dist/modules/crewfoundry/tools/recruitment.d.ts +3 -0
  223. package/dist/modules/crewfoundry/tools/shared.d.ts +2 -0
  224. package/dist/modules/devportal/index.cjs.map +1 -1
  225. package/dist/modules/devportal/index.d.ts +2 -7
  226. package/dist/modules/devportal/index.js +1 -1
  227. package/dist/modules/devportal/operations.d.ts +26 -0
  228. package/dist/modules/devportal/tools.d.ts +3 -0
  229. package/dist/modules/ecoimpacthub/index.cjs.map +1 -1
  230. package/dist/modules/ecoimpacthub/index.d.ts +2 -7
  231. package/dist/modules/ecoimpacthub/index.js +1 -1
  232. package/dist/modules/ecoimpacthub/operations.d.ts +53 -0
  233. package/dist/modules/ecoimpacthub/prompts.d.ts +3 -0
  234. package/dist/modules/ecoimpacthub/resources.d.ts +3 -0
  235. package/dist/modules/ecoimpacthub/tools/carbon.d.ts +3 -0
  236. package/dist/modules/ecoimpacthub/tools/emissions.d.ts +3 -0
  237. package/dist/modules/ecoimpacthub/tools/habitat.d.ts +3 -0
  238. package/dist/modules/ecoimpacthub/tools/health.d.ts +3 -0
  239. package/dist/modules/ecoimpacthub/tools/measurements.d.ts +3 -0
  240. package/dist/modules/ecoimpacthub/tools/observations.d.ts +3 -0
  241. package/dist/modules/ecoimpacthub/tools/reports.d.ts +3 -0
  242. package/dist/modules/ecoimpacthub/tools/sensors.d.ts +3 -0
  243. package/dist/modules/ecoimpacthub/tools/shared.d.ts +28 -0
  244. package/dist/modules/ecoimpacthub/tools/sites.d.ts +3 -0
  245. package/dist/modules/ecoimpacthub/tools/species.d.ts +3 -0
  246. package/dist/modules/ecoimpacthub/tools/targets.d.ts +3 -0
  247. package/dist/modules/ecoimpacthub/tools/thresholds.d.ts +3 -0
  248. package/dist/modules/eventfullymanaged/index.cjs.map +1 -1
  249. package/dist/modules/eventfullymanaged/index.d.ts +2 -7
  250. package/dist/modules/eventfullymanaged/index.js +1 -1
  251. package/dist/modules/eventfullymanaged/operations.d.ts +96 -0
  252. package/dist/modules/eventfullymanaged/prompts.d.ts +3 -0
  253. package/dist/modules/eventfullymanaged/resources.d.ts +3 -0
  254. package/dist/modules/eventfullymanaged/tools/agenda.d.ts +3 -0
  255. package/dist/modules/eventfullymanaged/tools/attendees.d.ts +3 -0
  256. package/dist/modules/eventfullymanaged/tools/checkin.d.ts +3 -0
  257. package/dist/modules/eventfullymanaged/tools/content.d.ts +3 -0
  258. package/dist/modules/eventfullymanaged/tools/events.d.ts +3 -0
  259. package/dist/modules/eventfullymanaged/tools/networking.d.ts +3 -0
  260. package/dist/modules/eventfullymanaged/tools/shared.d.ts +9 -0
  261. package/dist/modules/eventfullymanaged/tools/sponsorship.d.ts +3 -0
  262. package/dist/modules/eventfullymanaged/tools/ticketing.d.ts +3 -0
  263. package/dist/modules/eventfullymanaged/tools/venues.d.ts +3 -0
  264. package/dist/modules/export/index.cjs.map +1 -1
  265. package/dist/modules/export/index.d.ts +2 -7
  266. package/dist/modules/export/index.js +1 -1
  267. package/dist/modules/export/operations.d.ts +13 -0
  268. package/dist/modules/export/tools.d.ts +3 -0
  269. package/dist/modules/files/index.cjs.map +1 -1
  270. package/dist/modules/files/index.d.ts +2 -7
  271. package/dist/modules/files/index.js +1 -1
  272. package/dist/modules/files/operations.d.ts +9 -0
  273. package/dist/modules/files/tools.d.ts +3 -0
  274. package/dist/modules/fluidgrids/index.cjs +38 -19
  275. package/dist/modules/fluidgrids/index.cjs.map +1 -1
  276. package/dist/modules/fluidgrids/index.d.ts +2 -7
  277. package/dist/modules/fluidgrids/index.js +39 -20
  278. package/dist/modules/fluidgrids/index.js.map +1 -1
  279. package/dist/modules/fluidgrids/operations.d.ts +46 -0
  280. package/dist/modules/fluidgrids/prompts.d.ts +3 -0
  281. package/dist/modules/fluidgrids/resources.d.ts +3 -0
  282. package/dist/modules/fluidgrids/tools/credentials.d.ts +3 -0
  283. package/dist/modules/fluidgrids/tools/helpers.d.ts +5 -0
  284. package/dist/modules/fluidgrids/tools/insights.d.ts +3 -0
  285. package/dist/modules/fluidgrids/tools/nodes.d.ts +3 -0
  286. package/dist/modules/fluidgrids/tools/runs.d.ts +3 -0
  287. package/dist/modules/fluidgrids/tools/scheduled-jobs.d.ts +3 -0
  288. package/dist/modules/fluidgrids/tools/webhooks.d.ts +3 -0
  289. package/dist/modules/fluidgrids/tools/workflows.d.ts +3 -0
  290. package/dist/modules/ggnomad/index.cjs.map +1 -1
  291. package/dist/modules/ggnomad/index.d.ts +2 -7
  292. package/dist/modules/ggnomad/index.js +1 -1
  293. package/dist/modules/ggnomad/operations.d.ts +29 -0
  294. package/dist/modules/ggnomad/prompts.d.ts +3 -0
  295. package/dist/modules/ggnomad/resources.d.ts +3 -0
  296. package/dist/modules/ggnomad/tools/activities.d.ts +3 -0
  297. package/dist/modules/ggnomad/tools/analytics.d.ts +3 -0
  298. package/dist/modules/ggnomad/tools/bookings.d.ts +3 -0
  299. package/dist/modules/ggnomad/tools/events.d.ts +3 -0
  300. package/dist/modules/ggnomad/tools/favorites.d.ts +3 -0
  301. package/dist/modules/ggnomad/tools/properties.d.ts +3 -0
  302. package/dist/modules/ggnomad/tools/providers.d.ts +3 -0
  303. package/dist/modules/ggnomad/tools/shared.d.ts +5 -0
  304. package/dist/modules/ggnomad/tools/tours.d.ts +3 -0
  305. package/dist/modules/ggnomad/tools/trips.d.ts +3 -0
  306. package/dist/modules/govcitizenhub/index.cjs.map +1 -1
  307. package/dist/modules/govcitizenhub/index.d.ts +2 -7
  308. package/dist/modules/govcitizenhub/index.js +1 -1
  309. package/dist/modules/govcitizenhub/operations.d.ts +43 -0
  310. package/dist/modules/govcitizenhub/prompts.d.ts +3 -0
  311. package/dist/modules/govcitizenhub/resources.d.ts +3 -0
  312. package/dist/modules/govcitizenhub/tools/agencies.d.ts +3 -0
  313. package/dist/modules/govcitizenhub/tools/applications.d.ts +3 -0
  314. package/dist/modules/govcitizenhub/tools/documents.d.ts +3 -0
  315. package/dist/modules/govcitizenhub/tools/grievances.d.ts +3 -0
  316. package/dist/modules/govcitizenhub/tools/health.d.ts +3 -0
  317. package/dist/modules/govcitizenhub/tools/notes.d.ts +3 -0
  318. package/dist/modules/govcitizenhub/tools/payments.d.ts +3 -0
  319. package/dist/modules/govcitizenhub/tools/permits.d.ts +3 -0
  320. package/dist/modules/govcitizenhub/tools/services.d.ts +3 -0
  321. package/dist/modules/govcitizenhub/tools/shared.d.ts +17 -0
  322. package/dist/modules/groups/index.cjs.map +1 -1
  323. package/dist/modules/groups/index.d.ts +2 -7
  324. package/dist/modules/groups/index.js +1 -1
  325. package/dist/modules/groups/operations.d.ts +11 -0
  326. package/dist/modules/groups/tools.d.ts +3 -0
  327. package/dist/modules/headshotmarketing/index.cjs.map +1 -1
  328. package/dist/modules/headshotmarketing/index.d.ts +2 -7
  329. package/dist/modules/headshotmarketing/index.js +1 -1
  330. package/dist/modules/headshotmarketing/operations.d.ts +206 -0
  331. package/dist/modules/headshotmarketing/prompts.d.ts +3 -0
  332. package/dist/modules/headshotmarketing/resources.d.ts +3 -0
  333. package/dist/modules/headshotmarketing/tools/ads.d.ts +3 -0
  334. package/dist/modules/headshotmarketing/tools/analytics.d.ts +3 -0
  335. package/dist/modules/headshotmarketing/tools/campaigns.d.ts +3 -0
  336. package/dist/modules/headshotmarketing/tools/contacts.d.ts +3 -0
  337. package/dist/modules/headshotmarketing/tools/content.d.ts +3 -0
  338. package/dist/modules/headshotmarketing/tools/deals.d.ts +3 -0
  339. package/dist/modules/headshotmarketing/tools/events.d.ts +3 -0
  340. package/dist/modules/headshotmarketing/tools/helpers.d.ts +6 -0
  341. package/dist/modules/headshotmarketing/tools/influencers.d.ts +3 -0
  342. package/dist/modules/headshotmarketing/tools/landing_pages.d.ts +3 -0
  343. package/dist/modules/headshotmarketing/tools/leads.d.ts +3 -0
  344. package/dist/modules/headshotmarketing/tools/seo.d.ts +3 -0
  345. package/dist/modules/headshotmarketing/tools/shared.d.ts +48 -0
  346. package/dist/modules/headshotmarketing/tools/social.d.ts +3 -0
  347. package/dist/modules/headshotmarketing/tools/workflows.d.ts +3 -0
  348. package/dist/modules/health/index.cjs.map +1 -1
  349. package/dist/modules/health/index.d.ts +2 -7
  350. package/dist/modules/health/index.js +1 -1
  351. package/dist/modules/healthybowl/index.cjs.map +1 -1
  352. package/dist/modules/healthybowl/index.d.ts +2 -7
  353. package/dist/modules/healthybowl/index.js +1 -1
  354. package/dist/modules/healthybowl/operations.d.ts +13 -0
  355. package/dist/modules/healthybowl/prompts.d.ts +3 -0
  356. package/dist/modules/healthybowl/resources.d.ts +3 -0
  357. package/dist/modules/healthybowl/tools/advisory.d.ts +3 -0
  358. package/dist/modules/healthybowl/tools/farm.d.ts +3 -0
  359. package/dist/modules/healthybowl/tools/guardrails.d.ts +3 -0
  360. package/dist/modules/healthybowl/tools/pestissue.d.ts +3 -0
  361. package/dist/modules/healthybowl/tools/shared.d.ts +4 -0
  362. package/dist/modules/hookmovies/index.cjs.map +1 -1
  363. package/dist/modules/hookmovies/index.d.ts +2 -7
  364. package/dist/modules/hookmovies/index.js +1 -1
  365. package/dist/modules/hookmovies/operations.d.ts +57 -0
  366. package/dist/modules/hookmovies/prompts.d.ts +3 -0
  367. package/dist/modules/hookmovies/resources.d.ts +3 -0
  368. package/dist/modules/hookmovies/tools/auditions.d.ts +3 -0
  369. package/dist/modules/hookmovies/tools/entitlements.d.ts +3 -0
  370. package/dist/modules/hookmovies/tools/episodes.d.ts +3 -0
  371. package/dist/modules/hookmovies/tools/health.d.ts +3 -0
  372. package/dist/modules/hookmovies/tools/lists.d.ts +3 -0
  373. package/dist/modules/hookmovies/tools/people.d.ts +3 -0
  374. package/dist/modules/hookmovies/tools/productions.d.ts +3 -0
  375. package/dist/modules/hookmovies/tools/progress.d.ts +3 -0
  376. package/dist/modules/hookmovies/tools/reviews.d.ts +3 -0
  377. package/dist/modules/hookmovies/tools/rights.d.ts +3 -0
  378. package/dist/modules/hookmovies/tools/shared.d.ts +15 -0
  379. package/dist/modules/hookmovies/tools/studios.d.ts +3 -0
  380. package/dist/modules/hookmovies/tools/titles.d.ts +3 -0
  381. package/dist/modules/housingvista/index.cjs.map +1 -1
  382. package/dist/modules/housingvista/index.d.ts +2 -7
  383. package/dist/modules/housingvista/index.js +1 -1
  384. package/dist/modules/housingvista/operations.d.ts +32 -0
  385. package/dist/modules/housingvista/prompts.d.ts +3 -0
  386. package/dist/modules/housingvista/resources.d.ts +3 -0
  387. package/dist/modules/housingvista/tools/analytics.d.ts +3 -0
  388. package/dist/modules/housingvista/tools/assets.d.ts +3 -0
  389. package/dist/modules/housingvista/tools/investments.d.ts +3 -0
  390. package/dist/modules/housingvista/tools/leasing.d.ts +3 -0
  391. package/dist/modules/housingvista/tools/market.d.ts +3 -0
  392. package/dist/modules/housingvista/tools/marketplace.d.ts +3 -0
  393. package/dist/modules/housingvista/tools/properties.d.ts +3 -0
  394. package/dist/modules/housingvista/tools/shared.d.ts +4 -0
  395. package/dist/modules/housingvista/tools/transactions.d.ts +3 -0
  396. package/dist/modules/housingvista/tools/verification.d.ts +3 -0
  397. package/dist/modules/integrations/index.cjs +3 -1
  398. package/dist/modules/integrations/index.cjs.map +1 -1
  399. package/dist/modules/integrations/index.d.ts +2 -7
  400. package/dist/modules/integrations/index.js +4 -2
  401. package/dist/modules/integrations/index.js.map +1 -1
  402. package/dist/modules/integrations/operations.d.ts +27 -0
  403. package/dist/modules/integrations/tools.d.ts +3 -0
  404. package/dist/modules/intelwatchtower/index.cjs.map +1 -1
  405. package/dist/modules/intelwatchtower/index.d.ts +2 -7
  406. package/dist/modules/intelwatchtower/index.js +1 -1
  407. package/dist/modules/intelwatchtower/operations.d.ts +48 -0
  408. package/dist/modules/intelwatchtower/prompts.d.ts +3 -0
  409. package/dist/modules/intelwatchtower/resources.d.ts +3 -0
  410. package/dist/modules/intelwatchtower/tools/alerts.d.ts +3 -0
  411. package/dist/modules/intelwatchtower/tools/cases.d.ts +3 -0
  412. package/dist/modules/intelwatchtower/tools/entities.d.ts +3 -0
  413. package/dist/modules/intelwatchtower/tools/feeds.d.ts +3 -0
  414. package/dist/modules/intelwatchtower/tools/health.d.ts +3 -0
  415. package/dist/modules/intelwatchtower/tools/indicators.d.ts +3 -0
  416. package/dist/modules/intelwatchtower/tools/missions.d.ts +3 -0
  417. package/dist/modules/intelwatchtower/tools/observations.d.ts +3 -0
  418. package/dist/modules/intelwatchtower/tools/reports.d.ts +3 -0
  419. package/dist/modules/intelwatchtower/tools/requirements.d.ts +3 -0
  420. package/dist/modules/intelwatchtower/tools/shared.d.ts +23 -0
  421. package/dist/modules/intelwatchtower/tools/sources.d.ts +3 -0
  422. package/dist/modules/intelwatchtower/tools/tasks.d.ts +3 -0
  423. package/dist/modules/kadaikodi/index.cjs.map +1 -1
  424. package/dist/modules/kadaikodi/index.d.ts +2 -7
  425. package/dist/modules/kadaikodi/index.js +1 -1
  426. package/dist/modules/kadaikodi/operations.d.ts +35 -0
  427. package/dist/modules/kadaikodi/prompts.d.ts +3 -0
  428. package/dist/modules/kadaikodi/resources.d.ts +3 -0
  429. package/dist/modules/kadaikodi/tools/analytics.d.ts +3 -0
  430. package/dist/modules/kadaikodi/tools/investments.d.ts +3 -0
  431. package/dist/modules/kadaikodi/tools/offerings.d.ts +3 -0
  432. package/dist/modules/kadaikodi/tools/orders.d.ts +3 -0
  433. package/dist/modules/kadaikodi/tools/providers.d.ts +3 -0
  434. package/dist/modules/kadaikodi/tools/reviews.d.ts +3 -0
  435. package/dist/modules/kadaikodi/tools/shared.d.ts +9 -0
  436. package/dist/modules/kadaikodi/tools/tasks.d.ts +3 -0
  437. package/dist/modules/kadaikodi/tools/workers.d.ts +3 -0
  438. package/dist/modules/labsofscience/index.cjs.map +1 -1
  439. package/dist/modules/labsofscience/index.d.ts +2 -7
  440. package/dist/modules/labsofscience/index.js +1 -1
  441. package/dist/modules/labsofscience/operations.d.ts +58 -0
  442. package/dist/modules/labsofscience/prompts.d.ts +3 -0
  443. package/dist/modules/labsofscience/resources.d.ts +3 -0
  444. package/dist/modules/labsofscience/tools/datasets.d.ts +3 -0
  445. package/dist/modules/labsofscience/tools/experiments.d.ts +3 -0
  446. package/dist/modules/labsofscience/tools/health.d.ts +3 -0
  447. package/dist/modules/labsofscience/tools/instruments.d.ts +3 -0
  448. package/dist/modules/labsofscience/tools/inventory.d.ts +3 -0
  449. package/dist/modules/labsofscience/tools/notebook.d.ts +3 -0
  450. package/dist/modules/labsofscience/tools/pipelines.d.ts +3 -0
  451. package/dist/modules/labsofscience/tools/projects.d.ts +3 -0
  452. package/dist/modules/labsofscience/tools/protocols.d.ts +3 -0
  453. package/dist/modules/labsofscience/tools/runs.d.ts +3 -0
  454. package/dist/modules/labsofscience/tools/shared.d.ts +15 -0
  455. package/dist/modules/manufacturedops/index.cjs.map +1 -1
  456. package/dist/modules/manufacturedops/index.d.ts +2 -7
  457. package/dist/modules/manufacturedops/index.js +1 -1
  458. package/dist/modules/manufacturedops/operations.d.ts +45 -0
  459. package/dist/modules/manufacturedops/prompts.d.ts +3 -0
  460. package/dist/modules/manufacturedops/resources.d.ts +3 -0
  461. package/dist/modules/manufacturedops/tools/health.d.ts +3 -0
  462. package/dist/modules/manufacturedops/tools/maintenance.d.ts +3 -0
  463. package/dist/modules/manufacturedops/tools/production.d.ts +3 -0
  464. package/dist/modules/manufacturedops/tools/quality.d.ts +3 -0
  465. package/dist/modules/manufacturedops/tools/shared.d.ts +27 -0
  466. package/dist/modules/movethewheels/index.cjs.map +1 -1
  467. package/dist/modules/movethewheels/index.d.ts +2 -7
  468. package/dist/modules/movethewheels/index.js +1 -1
  469. package/dist/modules/movethewheels/operations.d.ts +105 -0
  470. package/dist/modules/movethewheels/prompts.d.ts +3 -0
  471. package/dist/modules/movethewheels/resources.d.ts +3 -0
  472. package/dist/modules/movethewheels/tools/analytics.d.ts +3 -0
  473. package/dist/modules/movethewheels/tools/customers.d.ts +3 -0
  474. package/dist/modules/movethewheels/tools/drivers.d.ts +3 -0
  475. package/dist/modules/movethewheels/tools/inventory.d.ts +3 -0
  476. package/dist/modules/movethewheels/tools/marketplace.d.ts +3 -0
  477. package/dist/modules/movethewheels/tools/orders.d.ts +3 -0
  478. package/dist/modules/movethewheels/tools/products.d.ts +3 -0
  479. package/dist/modules/movethewheels/tools/reports.d.ts +3 -0
  480. package/dist/modules/movethewheels/tools/routes.d.ts +3 -0
  481. package/dist/modules/movethewheels/tools/shared.d.ts +14 -0
  482. package/dist/modules/movethewheels/tools/shipments.d.ts +3 -0
  483. package/dist/modules/movethewheels/tools/tracking.d.ts +3 -0
  484. package/dist/modules/movethewheels/tools/vehicles.d.ts +3 -0
  485. package/dist/modules/movethewheels/tools/warehouses.d.ts +3 -0
  486. package/dist/modules/mybodyshield/index.cjs.map +1 -1
  487. package/dist/modules/mybodyshield/index.d.ts +2 -7
  488. package/dist/modules/mybodyshield/index.js +1 -1
  489. package/dist/modules/mybodyshield/operations.d.ts +49 -0
  490. package/dist/modules/mybodyshield/prompts.d.ts +3 -0
  491. package/dist/modules/mybodyshield/resources.d.ts +3 -0
  492. package/dist/modules/mybodyshield/tools/coaching.d.ts +3 -0
  493. package/dist/modules/mybodyshield/tools/goals.d.ts +3 -0
  494. package/dist/modules/mybodyshield/tools/health.d.ts +3 -0
  495. package/dist/modules/mybodyshield/tools/meals.d.ts +3 -0
  496. package/dist/modules/mybodyshield/tools/metrics.d.ts +3 -0
  497. package/dist/modules/mybodyshield/tools/nutrition.d.ts +3 -0
  498. package/dist/modules/mybodyshield/tools/programs.d.ts +3 -0
  499. package/dist/modules/mybodyshield/tools/recovery.d.ts +3 -0
  500. package/dist/modules/mybodyshield/tools/sessions.d.ts +3 -0
  501. package/dist/modules/mybodyshield/tools/shared.d.ts +13 -0
  502. package/dist/modules/mybodyshield/tools/workouts.d.ts +3 -0
  503. package/dist/modules/notifications/index.cjs.map +1 -1
  504. package/dist/modules/notifications/index.d.ts +2 -7
  505. package/dist/modules/notifications/index.js +1 -1
  506. package/dist/modules/notifications/operations.d.ts +4 -0
  507. package/dist/modules/notifications/tools.d.ts +3 -0
  508. package/dist/modules/organizations/index.cjs.map +1 -1
  509. package/dist/modules/organizations/index.d.ts +2 -7
  510. package/dist/modules/organizations/index.js +1 -1
  511. package/dist/modules/organizations/operations.d.ts +9 -0
  512. package/dist/modules/organizations/tools.d.ts +3 -0
  513. package/dist/modules/planmagnet/destructive-gate.d.ts +4 -0
  514. package/dist/modules/planmagnet/index.cjs.map +1 -1
  515. package/dist/modules/planmagnet/index.d.ts +2 -7
  516. package/dist/modules/planmagnet/index.js +1 -1
  517. package/dist/modules/planmagnet/operations.d.ts +182 -0
  518. package/dist/modules/planmagnet/prompts.d.ts +3 -0
  519. package/dist/modules/planmagnet/resources.d.ts +3 -0
  520. package/dist/modules/planmagnet/tools/automations.d.ts +3 -0
  521. package/dist/modules/planmagnet/tools/boards.d.ts +3 -0
  522. package/dist/modules/planmagnet/tools/budgets.d.ts +3 -0
  523. package/dist/modules/planmagnet/tools/customfields.d.ts +3 -0
  524. package/dist/modules/planmagnet/tools/dependencies.d.ts +3 -0
  525. package/dist/modules/planmagnet/tools/features.d.ts +3 -0
  526. package/dist/modules/planmagnet/tools/milestones.d.ts +3 -0
  527. package/dist/modules/planmagnet/tools/projects.d.ts +3 -0
  528. package/dist/modules/planmagnet/tools/qualitygates.d.ts +3 -0
  529. package/dist/modules/planmagnet/tools/releases.d.ts +3 -0
  530. package/dist/modules/planmagnet/tools/risks.d.ts +3 -0
  531. package/dist/modules/planmagnet/tools/roadmaps.d.ts +3 -0
  532. package/dist/modules/planmagnet/tools/shared.d.ts +41 -0
  533. package/dist/modules/planmagnet/tools/sprints.d.ts +3 -0
  534. package/dist/modules/planmagnet/tools/sync.d.ts +3 -0
  535. package/dist/modules/planmagnet/tools/templates.d.ts +3 -0
  536. package/dist/modules/planmagnet/tools/timetracking.d.ts +3 -0
  537. package/dist/modules/planmagnet/tools/workitems.d.ts +3 -0
  538. package/dist/modules/products/index.cjs.map +1 -1
  539. package/dist/modules/products/index.d.ts +2 -7
  540. package/dist/modules/products/index.js +1 -1
  541. package/dist/modules/products/operations.d.ts +22 -0
  542. package/dist/modules/products/tools.d.ts +3 -0
  543. package/dist/modules/proserviceworld/index.cjs.map +1 -1
  544. package/dist/modules/proserviceworld/index.d.ts +2 -7
  545. package/dist/modules/proserviceworld/index.js +1 -1
  546. package/dist/modules/proserviceworld/operations.d.ts +33 -0
  547. package/dist/modules/proserviceworld/prompts.d.ts +3 -0
  548. package/dist/modules/proserviceworld/resources.d.ts +3 -0
  549. package/dist/modules/proserviceworld/tools/clients.d.ts +3 -0
  550. package/dist/modules/proserviceworld/tools/compliance.d.ts +3 -0
  551. package/dist/modules/proserviceworld/tools/engagements.d.ts +3 -0
  552. package/dist/modules/proserviceworld/tools/health.d.ts +3 -0
  553. package/dist/modules/proserviceworld/tools/invoices.d.ts +3 -0
  554. package/dist/modules/proserviceworld/tools/matters.d.ts +3 -0
  555. package/dist/modules/proserviceworld/tools/practice.d.ts +3 -0
  556. package/dist/modules/proserviceworld/tools/shared.d.ts +11 -0
  557. package/dist/modules/proserviceworld/tools/time.d.ts +3 -0
  558. package/dist/modules/rbac/index.cjs.map +1 -1
  559. package/dist/modules/rbac/index.d.ts +2 -7
  560. package/dist/modules/rbac/index.js +1 -1
  561. package/dist/modules/rbac/operations.d.ts +9 -0
  562. package/dist/modules/rbac/tools.d.ts +3 -0
  563. package/dist/modules/sandbox/index.cjs.map +1 -1
  564. package/dist/modules/sandbox/index.d.ts +2 -7
  565. package/dist/modules/sandbox/index.js +1 -1
  566. package/dist/modules/sandbox/tools.d.ts +3 -0
  567. package/dist/modules/scheduler/index.cjs +3 -1
  568. package/dist/modules/scheduler/index.cjs.map +1 -1
  569. package/dist/modules/scheduler/index.d.ts +2 -7
  570. package/dist/modules/scheduler/index.js +4 -2
  571. package/dist/modules/scheduler/index.js.map +1 -1
  572. package/dist/modules/scheduler/operations.d.ts +31 -0
  573. package/dist/modules/scheduler/tools.d.ts +3 -0
  574. package/dist/modules/security/index.cjs.map +1 -1
  575. package/dist/modules/security/index.d.ts +2 -7
  576. package/dist/modules/security/index.js +1 -1
  577. package/dist/modules/security/operations.d.ts +13 -0
  578. package/dist/modules/security/tools.d.ts +3 -0
  579. package/dist/modules/semanticfed/index.cjs +65 -1
  580. package/dist/modules/semanticfed/index.cjs.map +1 -1
  581. package/dist/modules/semanticfed/index.d.ts +2 -7
  582. package/dist/modules/semanticfed/index.js +66 -2
  583. package/dist/modules/semanticfed/index.js.map +1 -1
  584. package/dist/modules/semanticfed/operations.d.ts +53 -0
  585. package/dist/modules/semanticfed/prompts.d.ts +3 -0
  586. package/dist/modules/semanticfed/resources.d.ts +3 -0
  587. package/dist/modules/semanticfed/tools/connections.d.ts +3 -0
  588. package/dist/modules/semanticfed/tools/connectors.d.ts +3 -0
  589. package/dist/modules/semanticfed/tools/datasources.d.ts +3 -0
  590. package/dist/modules/semanticfed/tools/dimensions.d.ts +3 -0
  591. package/dist/modules/semanticfed/tools/entities.d.ts +3 -0
  592. package/dist/modules/semanticfed/tools/health.d.ts +3 -0
  593. package/dist/modules/semanticfed/tools/metrics.d.ts +3 -0
  594. package/dist/modules/semanticfed/tools/models.d.ts +3 -0
  595. package/dist/modules/semanticfed/tools/policies.d.ts +3 -0
  596. package/dist/modules/semanticfed/tools/queries.d.ts +3 -0
  597. package/dist/modules/semanticfed/tools/relationships.d.ts +3 -0
  598. package/dist/modules/semanticfed/tools/runs.d.ts +3 -0
  599. package/dist/modules/semanticfed/tools/shared.d.ts +14 -0
  600. package/dist/modules/store/index.cjs.map +1 -1
  601. package/dist/modules/store/index.d.ts +2 -7
  602. package/dist/modules/store/index.js +1 -1
  603. package/dist/modules/store/operations.d.ts +15 -0
  604. package/dist/modules/store/tools.d.ts +3 -0
  605. package/dist/modules/subscriberbot/index.cjs.map +1 -1
  606. package/dist/modules/subscriberbot/index.d.ts +2 -7
  607. package/dist/modules/subscriberbot/index.js +1 -1
  608. package/dist/modules/subscriberbot/operations.d.ts +53 -0
  609. package/dist/modules/subscriberbot/prompts.d.ts +3 -0
  610. package/dist/modules/subscriberbot/resources.d.ts +3 -0
  611. package/dist/modules/subscriberbot/tools/agents.d.ts +3 -0
  612. package/dist/modules/subscriberbot/tools/assets.d.ts +3 -0
  613. package/dist/modules/subscriberbot/tools/channels.d.ts +3 -0
  614. package/dist/modules/subscriberbot/tools/entitlements.d.ts +3 -0
  615. package/dist/modules/subscriberbot/tools/health.d.ts +3 -0
  616. package/dist/modules/subscriberbot/tools/inbox.d.ts +3 -0
  617. package/dist/modules/subscriberbot/tools/invoices.d.ts +3 -0
  618. package/dist/modules/subscriberbot/tools/payment-instruments.d.ts +3 -0
  619. package/dist/modules/subscriberbot/tools/plans.d.ts +3 -0
  620. package/dist/modules/subscriberbot/tools/policies.d.ts +3 -0
  621. package/dist/modules/subscriberbot/tools/providers.d.ts +3 -0
  622. package/dist/modules/subscriberbot/tools/relationships.d.ts +3 -0
  623. package/dist/modules/subscriberbot/tools/renewals.d.ts +3 -0
  624. package/dist/modules/subscriberbot/tools/shared.d.ts +21 -0
  625. package/dist/modules/subscriberbot/tools/workflows.d.ts +3 -0
  626. package/dist/modules/support/index.cjs.map +1 -1
  627. package/dist/modules/support/index.d.ts +2 -7
  628. package/dist/modules/support/index.js +1 -1
  629. package/dist/modules/support/operations.d.ts +7 -0
  630. package/dist/modules/support/tools.d.ts +3 -0
  631. package/dist/modules/tags/index.cjs.map +1 -1
  632. package/dist/modules/tags/index.d.ts +2 -7
  633. package/dist/modules/tags/index.js +1 -1
  634. package/dist/modules/tags/operations.d.ts +9 -0
  635. package/dist/modules/tags/tools.d.ts +3 -0
  636. package/dist/modules/technospam/index.cjs.map +1 -1
  637. package/dist/modules/technospam/index.d.ts +2 -7
  638. package/dist/modules/technospam/index.js +1 -1
  639. package/dist/modules/technospam/operations.d.ts +54 -0
  640. package/dist/modules/technospam/prompts.d.ts +3 -0
  641. package/dist/modules/technospam/resources.d.ts +3 -0
  642. package/dist/modules/technospam/tools/certificates.d.ts +3 -0
  643. package/dist/modules/technospam/tools/courses.d.ts +3 -0
  644. package/dist/modules/technospam/tools/enrollments.d.ts +3 -0
  645. package/dist/modules/technospam/tools/hackathons.d.ts +3 -0
  646. package/dist/modules/technospam/tools/health.d.ts +3 -0
  647. package/dist/modules/technospam/tools/lessons.d.ts +3 -0
  648. package/dist/modules/technospam/tools/mentors.d.ts +3 -0
  649. package/dist/modules/technospam/tools/problems.d.ts +3 -0
  650. package/dist/modules/technospam/tools/sessions.d.ts +3 -0
  651. package/dist/modules/technospam/tools/shared.d.ts +12 -0
  652. package/dist/modules/technospam/tools/submissions.d.ts +3 -0
  653. package/dist/modules/technospam/tools/teams.d.ts +3 -0
  654. package/dist/modules/theculturepost/index.cjs.map +1 -1
  655. package/dist/modules/theculturepost/index.d.ts +2 -7
  656. package/dist/modules/theculturepost/index.js +1 -1
  657. package/dist/modules/theculturepost/operations.d.ts +40 -0
  658. package/dist/modules/theculturepost/prompts.d.ts +3 -0
  659. package/dist/modules/theculturepost/resources.d.ts +3 -0
  660. package/dist/modules/theculturepost/tools/archive.d.ts +3 -0
  661. package/dist/modules/theculturepost/tools/citations.d.ts +3 -0
  662. package/dist/modules/theculturepost/tools/collections.d.ts +3 -0
  663. package/dist/modules/theculturepost/tools/discussions.d.ts +3 -0
  664. package/dist/modules/theculturepost/tools/oralhistories.d.ts +3 -0
  665. package/dist/modules/theculturepost/tools/replies.d.ts +3 -0
  666. package/dist/modules/theculturepost/tools/shared.d.ts +19 -0
  667. package/dist/modules/theculturepost/tools/stories.d.ts +3 -0
  668. package/dist/modules/theculturepost/tools/system.d.ts +3 -0
  669. package/dist/modules/theculturepost/tools/topics.d.ts +3 -0
  670. package/dist/modules/theglobalfuel/index.cjs.map +1 -1
  671. package/dist/modules/theglobalfuel/index.d.ts +2 -7
  672. package/dist/modules/theglobalfuel/index.js +1 -1
  673. package/dist/modules/theglobalfuel/operations.d.ts +38 -0
  674. package/dist/modules/theglobalfuel/prompts.d.ts +3 -0
  675. package/dist/modules/theglobalfuel/resources.d.ts +3 -0
  676. package/dist/modules/theglobalfuel/tools/assets.d.ts +3 -0
  677. package/dist/modules/theglobalfuel/tools/compliance.d.ts +3 -0
  678. package/dist/modules/theglobalfuel/tools/contracts.d.ts +3 -0
  679. package/dist/modules/theglobalfuel/tools/emissions.d.ts +3 -0
  680. package/dist/modules/theglobalfuel/tools/health.d.ts +3 -0
  681. package/dist/modules/theglobalfuel/tools/inventory.d.ts +3 -0
  682. package/dist/modules/theglobalfuel/tools/production.d.ts +3 -0
  683. package/dist/modules/theglobalfuel/tools/reserves.d.ts +3 -0
  684. package/dist/modules/theglobalfuel/tools/shared.d.ts +16 -0
  685. package/dist/modules/theglobalfuel/tools/shipments.d.ts +3 -0
  686. package/dist/modules/timecampus/index.cjs +3 -1
  687. package/dist/modules/timecampus/index.cjs.map +1 -1
  688. package/dist/modules/timecampus/index.d.ts +2 -7
  689. package/dist/modules/timecampus/index.js +4 -2
  690. package/dist/modules/timecampus/index.js.map +1 -1
  691. package/dist/modules/timecampus/operations.d.ts +187 -0
  692. package/dist/modules/timecampus/prompts.d.ts +3 -0
  693. package/dist/modules/timecampus/resources.d.ts +3 -0
  694. package/dist/modules/timecampus/tools/approvals.d.ts +3 -0
  695. package/dist/modules/timecampus/tools/appusage.d.ts +3 -0
  696. package/dist/modules/timecampus/tools/channels.d.ts +3 -0
  697. package/dist/modules/timecampus/tools/clientportal.d.ts +3 -0
  698. package/dist/modules/timecampus/tools/config.d.ts +3 -0
  699. package/dist/modules/timecampus/tools/email.d.ts +3 -0
  700. package/dist/modules/timecampus/tools/expenses.d.ts +3 -0
  701. package/dist/modules/timecampus/tools/focus.d.ts +3 -0
  702. package/dist/modules/timecampus/tools/location.d.ts +3 -0
  703. package/dist/modules/timecampus/tools/meetings.d.ts +3 -0
  704. package/dist/modules/timecampus/tools/pomodoro.d.ts +3 -0
  705. package/dist/modules/timecampus/tools/projects.d.ts +3 -0
  706. package/dist/modules/timecampus/tools/resourcing.d.ts +3 -0
  707. package/dist/modules/timecampus/tools/shared.d.ts +23 -0
  708. package/dist/modules/timecampus/tools/tasks.d.ts +3 -0
  709. package/dist/modules/timecampus/tools/timeentries.d.ts +3 -0
  710. package/dist/modules/timecampus/tools/workpatterns.d.ts +3 -0
  711. package/dist/modules/tours/index.cjs.map +1 -1
  712. package/dist/modules/tours/index.d.ts +2 -7
  713. package/dist/modules/tours/index.js +1 -1
  714. package/dist/modules/tours/operations.d.ts +4 -0
  715. package/dist/modules/tours/tools.d.ts +3 -0
  716. package/dist/modules/vibecontrols/index.cjs +364 -29
  717. package/dist/modules/vibecontrols/index.cjs.map +1 -1
  718. package/dist/modules/vibecontrols/index.d.ts +2 -7
  719. package/dist/modules/vibecontrols/index.js +348 -29
  720. package/dist/modules/vibecontrols/index.js.map +1 -1
  721. package/dist/modules/vibecontrols/operations.d.ts +327 -0
  722. package/dist/modules/vibecontrols/prompts.d.ts +3 -0
  723. package/dist/modules/vibecontrols/resources.d.ts +3 -0
  724. package/dist/modules/vibecontrols/tool-annotations.d.ts +3 -0
  725. package/dist/modules/vibecontrols/tools/actions.d.ts +3 -0
  726. package/dist/modules/vibecontrols/tools/agents.d.ts +3 -0
  727. package/dist/modules/vibecontrols/tools/ai-events.d.ts +3 -0
  728. package/dist/modules/vibecontrols/tools/ai-prompts.d.ts +3 -0
  729. package/dist/modules/vibecontrols/tools/analytics.d.ts +3 -0
  730. package/dist/modules/vibecontrols/tools/audit.d.ts +3 -0
  731. package/dist/modules/vibecontrols/tools/catalogs.d.ts +3 -0
  732. package/dist/modules/vibecontrols/tools/components.d.ts +3 -0
  733. package/dist/modules/vibecontrols/tools/config-ci.d.ts +3 -0
  734. package/dist/modules/vibecontrols/tools/config-gitops.d.ts +3 -0
  735. package/dist/modules/vibecontrols/tools/config-security.d.ts +3 -0
  736. package/dist/modules/vibecontrols/tools/config-settings.d.ts +3 -0
  737. package/dist/modules/vibecontrols/tools/configuration.d.ts +3 -0
  738. package/dist/modules/vibecontrols/tools/docs.d.ts +3 -0
  739. package/dist/modules/vibecontrols/tools/notes.d.ts +3 -0
  740. package/dist/modules/vibecontrols/tools/sandboxes.d.ts +3 -0
  741. package/dist/modules/vibecontrols/tools/scorecards.d.ts +3 -0
  742. package/dist/modules/vibecontrols/tools/session-sharing.d.ts +3 -0
  743. package/dist/modules/vibecontrols/tools/sessions.d.ts +3 -0
  744. package/dist/modules/vibecontrols/tools/targets.d.ts +3 -0
  745. package/dist/modules/vibecontrols/tools/templates.d.ts +3 -0
  746. package/dist/modules/vibecontrols/tools/tunnels.d.ts +3 -0
  747. package/dist/modules/vibecontrols/tools/ui-session.d.ts +3 -0
  748. package/dist/modules/vibecontrols/tools/vibedeck-share-links.d.ts +3 -0
  749. package/dist/modules/vibecontrols/tools/vibedecks.d.ts +3 -0
  750. package/dist/modules/vibecontrols/tools/vibes.d.ts +3 -0
  751. package/dist/modules/vibecontrols/tools/webhooks.d.ts +3 -0
  752. package/dist/modules/workspaces/index.cjs.map +1 -1
  753. package/dist/modules/workspaces/index.d.ts +2 -7
  754. package/dist/modules/workspaces/index.js +1 -1
  755. package/dist/modules/workspaces/operations.d.ts +14 -0
  756. package/dist/modules/workspaces/tools.d.ts +3 -0
  757. package/dist/transports/http.d.ts +14 -0
  758. package/dist/transports/index.d.ts +3 -13
  759. package/dist/transports/security.d.ts +6 -0
  760. package/dist/transports/stdio.d.ts +6 -0
  761. package/package.json +2 -2
  762. package/dist/chunk-G76DKEPI.js.map +0 -1
  763. package/dist/context-DGO4h-Pd.d.cts +0 -139
  764. package/dist/context-DGO4h-Pd.d.ts +0 -139
  765. package/dist/core/index.d.cts +0 -59
  766. package/dist/http-Wj1WM6ji.d.ts +0 -22
  767. package/dist/http-uAT9KeBa.d.cts +0 -22
  768. package/dist/index.d.cts +0 -7
  769. package/dist/module-CfnM2XHg.d.cts +0 -67
  770. package/dist/module-VpgjAf8m.d.ts +0 -67
  771. package/dist/modules/adaptercloud/index.d.cts +0 -8
  772. package/dist/modules/artistrybase/index.d.cts +0 -8
  773. package/dist/modules/assethandler/index.d.cts +0 -8
  774. package/dist/modules/atheletebridge/index.d.cts +0 -8
  775. package/dist/modules/billing/index.d.cts +0 -8
  776. package/dist/modules/brainyrich/index.d.cts +0 -8
  777. package/dist/modules/buildmyiq/index.d.cts +0 -8
  778. package/dist/modules/channels/index.d.cts +0 -8
  779. package/dist/modules/collabkin/index.d.cts +0 -8
  780. package/dist/modules/comradecircle/index.d.cts +0 -8
  781. package/dist/modules/conversations/index.d.cts +0 -8
  782. package/dist/modules/coolandlovely/index.d.cts +0 -8
  783. package/dist/modules/cosmicintersection/index.d.cts +0 -8
  784. package/dist/modules/crewfoundry/index.d.cts +0 -8
  785. package/dist/modules/devportal/index.d.cts +0 -8
  786. package/dist/modules/ecoimpacthub/index.d.cts +0 -8
  787. package/dist/modules/eventfullymanaged/index.d.cts +0 -8
  788. package/dist/modules/export/index.d.cts +0 -8
  789. package/dist/modules/files/index.d.cts +0 -8
  790. package/dist/modules/fluidgrids/index.d.cts +0 -8
  791. package/dist/modules/ggnomad/index.d.cts +0 -8
  792. package/dist/modules/govcitizenhub/index.d.cts +0 -8
  793. package/dist/modules/groups/index.d.cts +0 -8
  794. package/dist/modules/headshotmarketing/index.d.cts +0 -8
  795. package/dist/modules/health/index.d.cts +0 -8
  796. package/dist/modules/healthybowl/index.d.cts +0 -8
  797. package/dist/modules/hookmovies/index.d.cts +0 -8
  798. package/dist/modules/housingvista/index.d.cts +0 -8
  799. package/dist/modules/integrations/index.d.cts +0 -8
  800. package/dist/modules/intelwatchtower/index.d.cts +0 -8
  801. package/dist/modules/kadaikodi/index.d.cts +0 -8
  802. package/dist/modules/labsofscience/index.d.cts +0 -8
  803. package/dist/modules/manufacturedops/index.d.cts +0 -8
  804. package/dist/modules/movethewheels/index.d.cts +0 -8
  805. package/dist/modules/mybodyshield/index.d.cts +0 -8
  806. package/dist/modules/notifications/index.d.cts +0 -8
  807. package/dist/modules/organizations/index.d.cts +0 -8
  808. package/dist/modules/planmagnet/index.d.cts +0 -8
  809. package/dist/modules/products/index.d.cts +0 -8
  810. package/dist/modules/proserviceworld/index.d.cts +0 -8
  811. package/dist/modules/rbac/index.d.cts +0 -8
  812. package/dist/modules/sandbox/index.d.cts +0 -8
  813. package/dist/modules/scheduler/index.d.cts +0 -8
  814. package/dist/modules/security/index.d.cts +0 -8
  815. package/dist/modules/semanticfed/index.d.cts +0 -8
  816. package/dist/modules/store/index.d.cts +0 -8
  817. package/dist/modules/subscriberbot/index.d.cts +0 -8
  818. package/dist/modules/support/index.d.cts +0 -8
  819. package/dist/modules/tags/index.d.cts +0 -8
  820. package/dist/modules/technospam/index.d.cts +0 -8
  821. package/dist/modules/theculturepost/index.d.cts +0 -8
  822. package/dist/modules/theglobalfuel/index.d.cts +0 -8
  823. package/dist/modules/timecampus/index.d.cts +0 -8
  824. package/dist/modules/tours/index.d.cts +0 -8
  825. package/dist/modules/vibecontrols/index.d.cts +0 -8
  826. package/dist/modules/workspaces/index.d.cts +0 -8
  827. package/dist/tool-name-BFdQwYrv.d.ts +0 -63
  828. package/dist/tool-name-DzP7TA0l.d.cts +0 -63
  829. package/dist/transports/index.d.cts +0 -13
@@ -1,8 +1,3 @@
1
- import { c as McpModule } from '../../module-VpgjAf8m.js';
2
- import '@modelcontextprotocol/sdk/server/mcp.js';
3
- import '../../context-DGO4h-Pd.js';
4
- import 'graphql-request';
5
-
1
+ import type { McpModule } from '../../core/index.js';
6
2
  declare const proserviceworldModule: McpModule;
7
-
8
- export { proserviceworldModule as default };
3
+ export default proserviceworldModule;
@@ -1,4 +1,4 @@
1
- import { mcpToolName, errorResult, jsonResult, mcpResourceUri, mcpPromptName } from '../../chunk-G76DKEPI.js';
1
+ import { mcpToolName, errorResult, jsonResult, mcpResourceUri, mcpPromptName } from '../../chunk-FHXCNP2U.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // src/modules/proserviceworld/operations.ts
@@ -0,0 +1,33 @@
1
+ export declare const CLIENT_FIELDS = "\n id name type status industry contactName contactEmail contactPhone address\n notes tags relationshipOwnerId workspaceId createdAt updatedAt\n";
2
+ export declare const ENGAGEMENT_FIELDS = "\n id clientId name description status feeArrangement feeAmount currency\n practiceAreaId responsiblePartnerId startDate endDate tags workspaceId\n createdAt updatedAt\n";
3
+ export declare const MATTER_FIELDS = "\n id clientId engagementId title reference description status priority\n isPrivileged leadPractitionerId practiceAreaId dueDate closedAt tags\n workspaceId createdAt updatedAt\n";
4
+ export declare const INVOICE_FIELDS = "\n id clientId engagementId number status issueDate dueDate paidAt subtotal\n taxAmount total currency lineItems notes workspaceId createdAt updatedAt\n";
5
+ export declare const TIME_ENTRY_FIELDS = "\n id matterId engagementId practitionerId date minutes rate billable narrative\n status invoiceId workspaceId createdAt updatedAt\n";
6
+ export declare const COMPLIANCE_FIELDS = "\n id type status title details subjectType subjectId reviewerId dueDate\n resolvedAt evidenceFileId workspaceId createdAt updatedAt\n";
7
+ export declare const CONFLICT_FIELDS = "\n id clientId matterId status searchedParties findings waiverReason\n clearedById resolvedAt workspaceId createdAt updatedAt\n";
8
+ export declare const PRACTICE_AREA_FIELDS = "\n id name code description isActive workspaceId createdAt updatedAt\n";
9
+ export declare const MILESTONE_FIELDS = "\n id engagementId name description status triggersInvoice triggerAmount\n dueDate completedAt workspaceId createdAt updatedAt\n";
10
+ export declare const DELIVERABLE_FIELDS = "\n id engagementId name description status version acceptanceCriteria\n acceptedAt dueDate workspaceId createdAt updatedAt\n";
11
+ export declare const GET_CLIENT = "\n query PswGetClient($id: ID!) {\n pswClient(id: $id) {\n \n id name type status industry contactName contactEmail contactPhone address\n notes tags relationshipOwnerId workspaceId createdAt updatedAt\n\n engagements { id name status feeArrangement feeAmount currency }\n matters { id title status priority }\n }\n }\n";
12
+ export declare const LIST_CLIENTS = "\n query PswListClients($pagination: PaginationInput, $status: PswClientStatus) {\n pswListClients(pagination: $pagination, status: $status) {\n items { \n id name type status industry contactName contactEmail contactPhone address\n notes tags relationshipOwnerId workspaceId createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }\n";
13
+ export declare const CREATE_CLIENT = "\n mutation PswCreateClient($input: PswCreateClientInput!) {\n pswCreateClient(input: $input) {\n \n id name type status industry contactName contactEmail contactPhone address\n notes tags relationshipOwnerId workspaceId createdAt updatedAt\n\n }\n }\n";
14
+ export declare const UPDATE_CLIENT = "\n mutation PswUpdateClient($id: ID!, $input: PswUpdateClientInput!) {\n pswUpdateClient(id: $id, input: $input) {\n \n id name type status industry contactName contactEmail contactPhone address\n notes tags relationshipOwnerId workspaceId createdAt updatedAt\n\n }\n }\n";
15
+ export declare const ARCHIVE_CLIENT = "\n mutation PswArchiveClient($id: ID!) {\n pswArchiveClient(id: $id)\n }\n";
16
+ export declare const GET_ENGAGEMENT = "\n query PswGetEngagement($id: ID!) {\n pswEngagement(id: $id) {\n \n id clientId name description status feeArrangement feeAmount currency\n practiceAreaId responsiblePartnerId startDate endDate tags workspaceId\n createdAt updatedAt\n\n client { id name status }\n milestones { \n id engagementId name description status triggersInvoice triggerAmount\n dueDate completedAt workspaceId createdAt updatedAt\n }\n deliverables { \n id engagementId name description status version acceptanceCriteria\n acceptedAt dueDate workspaceId createdAt updatedAt\n }\n }\n }\n";
17
+ export declare const LIST_ENGAGEMENTS = "\n query PswListEngagements(\n $clientId: ID\n $status: PswEngagementStatus\n $pagination: PaginationInput\n ) {\n pswListEngagements(clientId: $clientId, status: $status, pagination: $pagination) {\n items { \n id clientId name description status feeArrangement feeAmount currency\n practiceAreaId responsiblePartnerId startDate endDate tags workspaceId\n createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }\n";
18
+ export declare const CREATE_ENGAGEMENT = "\n mutation PswCreateEngagement($input: PswCreateEngagementInput!) {\n pswCreateEngagement(input: $input) {\n \n id clientId name description status feeArrangement feeAmount currency\n practiceAreaId responsiblePartnerId startDate endDate tags workspaceId\n createdAt updatedAt\n\n }\n }\n";
19
+ export declare const UPDATE_ENGAGEMENT = "\n mutation PswUpdateEngagement($id: ID!, $input: PswUpdateEngagementInput!) {\n pswUpdateEngagement(id: $id, input: $input) {\n \n id clientId name description status feeArrangement feeAmount currency\n practiceAreaId responsiblePartnerId startDate endDate tags workspaceId\n createdAt updatedAt\n\n }\n }\n";
20
+ export declare const TRANSITION_ENGAGEMENT = "\n mutation PswTransitionEngagement($id: ID!, $status: PswEngagementStatus!) {\n pswTransitionEngagement(id: $id, status: $status) {\n \n id clientId name description status feeArrangement feeAmount currency\n practiceAreaId responsiblePartnerId startDate endDate tags workspaceId\n createdAt updatedAt\n\n }\n }\n";
21
+ export declare const GET_MATTER = "\n query PswGetMatter($id: ID!) {\n pswMatter(id: $id) {\n \n id clientId engagementId title reference description status priority\n isPrivileged leadPractitionerId practiceAreaId dueDate closedAt tags\n workspaceId createdAt updatedAt\n\n client { id name status }\n }\n }\n";
22
+ export declare const LIST_MATTERS = "\n query PswListMatters(\n $clientId: ID\n $engagementId: ID\n $status: PswMatterStatus\n $pagination: PaginationInput\n ) {\n pswListMatters(\n clientId: $clientId\n engagementId: $engagementId\n status: $status\n pagination: $pagination\n ) {\n items { \n id clientId engagementId title reference description status priority\n isPrivileged leadPractitionerId practiceAreaId dueDate closedAt tags\n workspaceId createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }\n";
23
+ export declare const CREATE_MATTER = "\n mutation PswCreateMatter($input: PswCreateMatterInput!) {\n pswCreateMatter(input: $input) {\n \n id clientId engagementId title reference description status priority\n isPrivileged leadPractitionerId practiceAreaId dueDate closedAt tags\n workspaceId createdAt updatedAt\n\n }\n }\n";
24
+ export declare const UPDATE_MATTER = "\n mutation PswUpdateMatter($id: ID!, $input: PswUpdateMatterInput!) {\n pswUpdateMatter(id: $id, input: $input) {\n \n id clientId engagementId title reference description status priority\n isPrivileged leadPractitionerId practiceAreaId dueDate closedAt tags\n workspaceId createdAt updatedAt\n\n }\n }\n";
25
+ export declare const CLOSE_MATTER = "\n mutation PswCloseMatter($id: ID!) {\n pswCloseMatter(id: $id) {\n \n id clientId engagementId title reference description status priority\n isPrivileged leadPractitionerId practiceAreaId dueDate closedAt tags\n workspaceId createdAt updatedAt\n\n }\n }\n";
26
+ export declare const LIST_INVOICES = "\n query PswListInvoices(\n $clientId: ID\n $status: PswInvoiceStatus\n $pagination: PaginationInput\n ) {\n pswListInvoices(clientId: $clientId, status: $status, pagination: $pagination) {\n items { \n id clientId engagementId number status issueDate dueDate paidAt subtotal\n taxAmount total currency lineItems notes workspaceId createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }\n";
27
+ export declare const CREATE_INVOICE = "\n mutation PswCreateInvoice($input: PswCreateInvoiceInput!) {\n pswCreateInvoice(input: $input) {\n \n id clientId engagementId number status issueDate dueDate paidAt subtotal\n taxAmount total currency lineItems notes workspaceId createdAt updatedAt\n\n }\n }\n";
28
+ export declare const MARK_INVOICE_PAID = "\n mutation PswMarkInvoicePaid($id: ID!) {\n pswMarkInvoicePaid(id: $id) {\n \n id clientId engagementId number status issueDate dueDate paidAt subtotal\n taxAmount total currency lineItems notes workspaceId createdAt updatedAt\n\n }\n }\n";
29
+ export declare const LOG_TIME_ENTRY = "\n mutation PswLogTimeEntry($input: PswCreateTimeEntryInput!) {\n pswLogTimeEntry(input: $input) {\n \n id matterId engagementId practitionerId date minutes rate billable narrative\n status invoiceId workspaceId createdAt updatedAt\n\n }\n }\n";
30
+ export declare const LIST_COMPLIANCE_CHECKS = "\n query PswListComplianceChecks(\n $status: PswComplianceStatus\n $subjectId: ID\n $subjectType: String\n $pagination: PaginationInput\n ) {\n pswListComplianceChecks(\n status: $status\n subjectId: $subjectId\n subjectType: $subjectType\n pagination: $pagination\n ) {\n \n id type status title details subjectType subjectId reviewerId dueDate\n resolvedAt evidenceFileId workspaceId createdAt updatedAt\n\n }\n }\n";
31
+ export declare const LIST_CONFLICT_CHECKS = "\n query PswListConflictChecks($clientId: ID, $pagination: PaginationInput) {\n pswListConflictChecks(clientId: $clientId, pagination: $pagination) {\n \n id clientId matterId status searchedParties findings waiverReason\n clearedById resolvedAt workspaceId createdAt updatedAt\n\n }\n }\n";
32
+ export declare const LIST_PRACTICE_AREAS = "\n query PswListPracticeAreas($pagination: PaginationInput) {\n pswListPracticeAreas(pagination: $pagination) {\n \n id name code description isActive workspaceId createdAt updatedAt\n\n }\n }\n";
33
+ export declare const HEALTH = "\n query PswHealth {\n pswHealth\n }\n";
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../core/index.js';
3
+ export declare function registerProserviceworldPrompts(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../core/index.js';
3
+ export declare function registerProserviceworldResources(server: McpServer, ctx: McpContext, track: (uri: string) => string): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../../core/index.js';
3
+ export declare function registerClientTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../../core/index.js';
3
+ export declare function registerComplianceTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../../core/index.js';
3
+ export declare function registerEngagementTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../../core/index.js';
3
+ export declare function registerHealthTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../../core/index.js';
3
+ export declare function registerInvoiceTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../../core/index.js';
3
+ export declare function registerMatterTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../../core/index.js';
3
+ export declare function registerPracticeTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const ClientStatusEnum: z.ZodEnum<["ACTIVE", "ARCHIVED", "INACTIVE", "PROSPECT"]>;
3
+ export declare const ClientTypeEnum: z.ZodEnum<["INDIVIDUAL", "ORGANIZATION"]>;
4
+ export declare const EngagementStatusEnum: z.ZodEnum<["ACCEPTED", "CANCELLED", "CLOSED", "DELIVERED", "INVOICED", "IN_PROGRESS", "PROPOSAL", "REVIEW"]>;
5
+ export declare const FeeArrangementEnum: z.ZodEnum<["FIXED", "HOURLY", "RETAINER", "VALUE_BASED"]>;
6
+ export declare const MatterStatusEnum: z.ZodEnum<["ARCHIVED", "CLOSED", "ON_HOLD", "OPEN"]>;
7
+ export declare const MatterPriorityEnum: z.ZodEnum<["CRITICAL", "HIGH", "LOW", "MEDIUM"]>;
8
+ export declare const InvoiceStatusEnum: z.ZodEnum<["CANCELLED", "DRAFT", "OVERDUE", "PAID", "SENT"]>;
9
+ export declare const ComplianceStatusEnum: z.ZodEnum<["FAILED", "IN_REVIEW", "PASSED", "PENDING", "WAIVED"]>;
10
+ export declare const JsonObject: z.ZodRecord<z.ZodString, z.ZodUnknown>;
11
+ export declare const LineItems: z.ZodUnion<[z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../../core/index.js';
3
+ export declare function registerTimeTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/rbac/operations.ts","../../../src/modules/rbac/tools.ts","../../../src/modules/rbac/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,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A,GAAU,MAAA,CAAO,KAAK,CAAC,CAAA;AAAA,SACvF;AAAA,MACF;AAAA,IACF;AAAA,GACF;AACF;;;ACjWA,IAAM,UAAA,GAAwB;AAAA,EAC5B,EAAA,EAAI,MAAA;AAAA,EACJ,OAAA,EAAS,OAAA;AAAA,EACT,WAAA,EAAa,MAAA;AAAA,EACb,SAAA,EAAW,CAAC,MAAM,CAAA;AAAA,EAClB,YAAA,EAAc,EAAE,KAAA,EAAO,EAAC,EAAE;AAAA,EAE1B,QAAA,CAAS,QAAmB,GAAA,EAAqC;AAC/D,IAAA,MAAM,QAAkB,EAAC;AACzB,IAAA,MAAM,KAAA,GAAQ,CAAC,CAAA,KAAsB;AACnC,MAAA,KAAA,CAAM,KAAK,CAAC,CAAA;AACZ,MAAA,OAAO,CAAA;AAAA,IACT,CAAA;AAEA,IAAA,iBAAA,CAAkB,MAAA,EAAQ,KAAK,KAAK,CAAA;AAEpC,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,YAAA,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 } } | 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","export const LIST_ROLES = `\n query ListRoles($filter: RoleFilterInput, $pagination: PaginationInput, $scopeId: String!) {\n roles(filter: $filter, pagination: $pagination, scopeId: $scopeId) {\n id\n name\n description\n isSystem\n scopeId\n priority\n defaultPermissions {\n level\n resourceType\n }\n }\n }\n`;\n\nexport const GET_ROLE = `\n query GetRole($id: ID!) {\n role(id: $id) {\n id\n name\n description\n isSystem\n scopeId\n priority\n defaultPermissions {\n level\n resourceType\n }\n }\n }\n`;\n\nexport const CREATE_ROLE = `\n mutation CreateRole($input: CreateRoleInput!) {\n createRole(input: $input) {\n id\n name\n description\n scopeId\n }\n }\n`;\n\nexport const UPDATE_ROLE = `\n mutation UpdateRole($id: ID!, $input: UpdateRoleInput!) {\n updateRole(id: $id, input: $input) {\n id\n name\n description\n priority\n }\n }\n`;\n\nexport const DELETE_ROLE = `\n mutation DeleteRole($id: ID!, $reassignToRoleId: ID) {\n deleteRole(id: $id, reassignToRoleId: $reassignToRoleId)\n }\n`;\n\nexport const CHECK_PERMISSION = `\n query CheckPermission($input: PermissionCheckInput!) {\n checkPermission(input: $input) {\n allowed\n decisionPath\n roleName\n roleLevel\n overrideType\n }\n }\n`;\n\nexport const LIST_POLICY_REFERENCES = `\n query PolicyReferences($filter: PolicyReferenceFilterInput, $pagination: PaginationInput) {\n policyReferences(filter: $filter, pagination: $pagination) {\n id\n name\n description\n opaPackage\n resourceType\n action\n isActive\n priority\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const ATTACH_POLICY = `\n mutation AttachPolicy($roleId: ID!, $policyId: ID!) {\n attachPolicyToRole(roleId: $roleId, policyId: $policyId) {\n id\n name\n resourceType\n action\n isActive\n }\n }\n`;\n\nexport const DETACH_POLICY = `\n mutation DetachPolicy($roleId: ID!, $policyId: ID!) {\n detachPolicyFromRole(roleId: $roleId, policyId: $policyId)\n }\n`;\n","import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../core/index.js';\nimport {\n LIST_ROLES,\n GET_ROLE,\n CREATE_ROLE,\n UPDATE_ROLE,\n DELETE_ROLE,\n CHECK_PERMISSION,\n LIST_POLICY_REFERENCES,\n ATTACH_POLICY,\n DETACH_POLICY,\n} from './operations.js';\n\nconst LayerEnum = z.enum(['workspace', 'global']);\nconst ActorTypeEnum = z.enum(['USER', 'BOT', 'GROUP', 'INTEGRATION', 'DELEGATED_AGENT']);\n\ntype Layer = 'workspace' | 'global';\n\nfunction clientForLayer(ctx: McpContext, layer: Layer) {\n return layer === 'workspace' ? ctx.gql.workspace : ctx.gql.global;\n}\n\nfunction defaultScopeId(ctx: McpContext, layer: Layer): string | null {\n const auth = ctx.auth.read();\n if (!auth) return null;\n if (layer === 'workspace') return auth.workspaceId ?? null;\n return auth.organizationId ?? null;\n}\n\n// BOFF-9166 un-stub pass: 7 of the 9 tools are real here. The remaining\n// 2 (`rbac_policies_attach` / `rbac_policies_detach`) are un-stubbed in\n// this PR — they call `Mutation.attachPolicyToRole` /\n// `Mutation.detachPolicyToRole` on the chosen gateway. The rbac service\n// has never defined these mutations (policy-role attachment is implicit\n// in `createRole(input)` and `assignRoleToActor` instead), so on alpha\n// today these calls surface a real \"Cannot query field\" / \"Field X is\n// not defined\" GraphQL error from the gateway — clearer than the old\n// `[stubbed]` message and self-documenting. The mutations are queued\n// behind `rbac` service work; once added, the tools start working\n// without further MCP changes.\n\nexport function registerRbacTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_list')),\n {\n title: 'List Roles',\n description: 'List RBAC roles for a workspace or global scope.',\n inputSchema: {\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n scopeId: z.string().optional().describe('Override scope id (workspace or tenant)'),\n includeSystem: z.boolean().optional().describe('Include system roles'),\n limit: z.number().optional().describe('Page size'),\n },\n },\n async ({ layer, scopeId, includeSystem, limit }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const resolvedScope = scopeId ?? defaultScopeId(ctx, targetLayer);\n if (!resolvedScope) {\n return errorResult(\n `No ${targetLayer} scope. Pass scopeId or authenticate to a workspace/organization.`,\n );\n }\n const filter: Record<string, unknown> = {};\n if (includeSystem) filter.includeSystem = true;\n const data = await clientForLayer(ctx, targetLayer).request<{ roles: unknown }>(\n LIST_ROLES,\n {\n filter: Object.keys(filter).length ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: 0 },\n scopeId: resolvedScope,\n },\n );\n return jsonResult(data.roles);\n } catch (error) {\n ctx.logger.error('rbac_roles_list failed', { error: String(error) });\n return errorResult(\n `Failed to list roles: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_get')),\n {\n title: 'Get Role',\n description: 'Get a role by id from the workspace or global layer.',\n inputSchema: {\n id: z.string().describe('Role ID'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ id, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const data = await clientForLayer(ctx, targetLayer).request<{ role: unknown | null }>(\n GET_ROLE,\n { id },\n );\n if (!data.role) return errorResult(`Role ${id} not found`);\n return jsonResult(data.role);\n } catch (error) {\n ctx.logger.error('rbac_roles_get failed', { error: String(error) });\n return errorResult(\n `Failed to get role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_create')),\n {\n title: 'Create Role',\n description: 'Create a new RBAC role at the workspace or global layer.',\n inputSchema: {\n name: z.string().describe('Role name'),\n description: z.string().optional().describe('Role description'),\n parentId: z.string().optional().describe('Parent role id'),\n priority: z.number().optional().describe('Priority'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n scopeId: z.string().optional().describe('Override scope id'),\n scopeType: z.string().optional().describe('wspace|entity (global layer only)'),\n },\n },\n async ({ name, description, parentId, priority, layer, scopeId, scopeType }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const resolvedScope = scopeId ?? defaultScopeId(ctx, targetLayer);\n if (!resolvedScope) {\n return errorResult(\n `No ${targetLayer} scope. Pass scopeId or authenticate to a workspace/organization.`,\n );\n }\n const input: Record<string, unknown> = { name, scopeId: resolvedScope };\n if (description !== undefined) input.description = description;\n if (parentId !== undefined) input.parentId = parentId;\n if (priority !== undefined) input.priority = priority;\n if (targetLayer === 'global' && scopeType) input.scopeType = scopeType;\n const data = await clientForLayer(ctx, targetLayer).request<{ createRole: unknown }>(\n CREATE_ROLE,\n { input },\n );\n return jsonResult(data.createRole);\n } catch (error) {\n ctx.logger.error('rbac_roles_create failed', { error: String(error) });\n return errorResult(\n `Failed to create role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_update')),\n {\n title: 'Update Role',\n description: 'Update an existing role.',\n inputSchema: {\n id: z.string().describe('Role ID'),\n name: z.string().optional().describe('Updated name'),\n description: z.string().optional().describe('Updated description'),\n priority: z.number().optional().describe('Updated priority'),\n parentId: z.string().optional().describe('Updated parent role id'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ id, name, description, priority, parentId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const input: Record<string, unknown> = {};\n if (name !== undefined) input.name = name;\n if (description !== undefined) input.description = description;\n if (priority !== undefined) input.priority = priority;\n if (parentId !== undefined) input.parentId = parentId;\n if (!Object.keys(input).length) {\n return errorResult('No updates specified');\n }\n const data = await clientForLayer(ctx, targetLayer).request<{ updateRole: unknown }>(\n UPDATE_ROLE,\n { id, input },\n );\n return jsonResult(data.updateRole);\n } catch (error) {\n ctx.logger.error('rbac_roles_update failed', { error: String(error) });\n return errorResult(\n `Failed to update role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_delete')),\n {\n title: 'Delete Role',\n description: 'Delete a role, optionally reassigning actors to another role.',\n inputSchema: {\n id: z.string().describe('Role ID'),\n reassignToRoleId: z.string().optional().describe('Reassign actors to this role'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ id, reassignToRoleId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const data = await clientForLayer(ctx, targetLayer).request<{ deleteRole: unknown }>(\n DELETE_ROLE,\n { id, reassignToRoleId },\n );\n return jsonResult({ deleted: data.deleteRole, roleId: id });\n } catch (error) {\n ctx.logger.error('rbac_roles_delete failed', { error: String(error) });\n return errorResult(\n `Failed to delete role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Policies ────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_policies_list')),\n {\n title: 'List Policy References',\n description:\n 'List OPA policy references registered on the chosen gateway (workspace or global), optionally filtered by resource/action/active state. Returns an array of PolicyReference.',\n inputSchema: {\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n resourceType: z.string().optional().describe('Filter by resource type (e.g. project)'),\n action: z.string().optional().describe('Filter by action (e.g. read/write/delete)'),\n isActive: z.boolean().optional().describe('Only active/inactive policies'),\n limit: z.number().int().optional().describe('Page size (default 100)'),\n offset: z.number().int().optional().describe('Pagination offset (default 0)'),\n },\n },\n async ({ layer, resourceType, action, isActive, limit, offset }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const filter: Record<string, unknown> = {};\n if (resourceType !== undefined) filter.resourceType = resourceType;\n if (action !== undefined) filter.action = action;\n if (isActive !== undefined) filter.isActive = isActive;\n const data = await clientForLayer(ctx, targetLayer).request<{\n policyReferences: unknown[];\n }>(LIST_POLICY_REFERENCES, {\n filter: Object.keys(filter).length ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: offset ?? 0 },\n });\n return jsonResult(data.policyReferences);\n } catch (error) {\n ctx.logger.error('rbac_policies_list failed', { error: String(error) });\n return errorResult(\n `Failed to list policy references: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_policies_attach')),\n {\n title: 'Attach Policy To Role',\n description:\n 'Attach an OPA policy reference to a role on the chosen gateway. Returns the attached PolicyReference.',\n inputSchema: {\n roleId: z.string().describe('Role ID'),\n policyId: z.string().describe('PolicyReference ID'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ roleId, policyId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const data = await clientForLayer(ctx, targetLayer).request<{\n attachPolicyToRole: unknown;\n }>(ATTACH_POLICY, { roleId, policyId });\n return jsonResult(data.attachPolicyToRole);\n } catch (error) {\n ctx.logger.error('rbac_policies_attach failed', { error: String(error) });\n return errorResult(\n `Failed to attach policy: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_policies_detach')),\n {\n title: 'Detach Policy From Role',\n description:\n 'Detach an OPA policy reference from a role on the chosen gateway. Returns { detached: boolean, roleId, policyId }.',\n inputSchema: {\n roleId: z.string().describe('Role ID'),\n policyId: z.string().describe('PolicyReference ID'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ roleId, policyId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const data = await clientForLayer(ctx, targetLayer).request<{\n detachPolicyFromRole: boolean;\n }>(DETACH_POLICY, { roleId, policyId });\n return jsonResult({ detached: data.detachPolicyFromRole, roleId, policyId });\n } catch (error) {\n ctx.logger.error('rbac_policies_detach failed', { error: String(error) });\n return errorResult(\n `Failed to detach policy: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_check')),\n {\n title: 'Check Permission',\n description: 'Check whether an actor has permission for an action on a resource.',\n inputSchema: {\n actorId: z.string().describe('Actor id (user/app/service/super_admin)'),\n action: z.string().describe('Action like read/write/delete'),\n resourceType: z.string().describe('Resource type like project/task'),\n actorType: ActorTypeEnum.optional().describe('Actor type (default: USER)'),\n resourceId: z.string().optional().describe('Specific resource id (optional)'),\n scopeId: z.string().optional().describe('Scope id (workspaceId or tenantId)'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ actorId, action, resourceType, actorType, resourceId, scopeId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const resolvedScope = scopeId ?? defaultScopeId(ctx, targetLayer);\n if (!resolvedScope) {\n return errorResult(\n `No ${targetLayer} scope. Pass scopeId or authenticate to a workspace/organization.`,\n );\n }\n const input: Record<string, unknown> = {\n actorId,\n actorType: actorType ?? 'USER',\n action,\n resourceType,\n scopeId: resolvedScope,\n };\n if (resourceId !== undefined) input.resourceId = resourceId;\n const data = await clientForLayer(ctx, targetLayer).request<{ checkPermission: unknown }>(\n CHECK_PERMISSION,\n { input },\n );\n return jsonResult(data.checkPermission);\n } catch (error) {\n ctx.logger.error('rbac_check failed', { error: String(error) });\n return errorResult(\n `Failed to check permission: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * RBAC module — role-based access control across workspace + global layers.\n *\n * Tools:\n * <product>_rbac_roles_{list,get,create,update,delete}\n * <product>_rbac_check\n *\n * Backend: ~/products/wspace/rbac/wspace-rbac-svc/, ~/products/global/rbac/global-rbac-svc/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerRbacTools } from './tools.js';\n\nconst rbacModule: McpModule = {\n id: 'rbac',\n version: '0.0.1',\n displayName: 'RBAC',\n dependsOn: ['auth'],\n capabilities: { tools: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const track = (n: string): string => {\n tools.push(n);\n return n;\n };\n\n registerRbacTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default rbacModule;\n"]}
1
+ {"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/rbac/operations.ts","../../../src/modules/rbac/tools.ts","../../../src/modules/rbac/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,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,MAAM,IAAI,iBAAiB,sCAAsC,CAAA;AAAA,EACnE;AACA,EAAA,MAAM,IAAA,GAAO,CAAC,WAAA,EAAa,GAAG,KAAK,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAC7D,EAAA,OAAO,cAAA,CAAe,IAAY,CAAA;AACpC;;;ACOO,SAAS,UAAA,CAAW,MAAe,UAAA,EAAkD;AAC1F,EAAA,MAAM,MAAA,GAAqB;AAAA,IACzB,OAAA,EAAS,CAAC,EAAE,IAAA,EAAM,MAAA,EAAQ,IAAA,EAA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M,cAAA,CAAe,GAAA,EAAK,WAAW,CAAA,CAAE,OAAA;AAAA,UAClD,gBAAA;AAAA,UACA,EAAE,KAAA;AAAM,SACV;AACA,QAAA,OAAO,UAAA,CAAW,KAAK,eAAe,CAAA;AAAA,MACxC,SAAS,KAAA,EAAO;AACd,QAAA,GAAA,CAAI,MAAA,CAAO,MAAM,mBAAA,EAAqB,EAAE,OAAO,MAAA,CAAO,KAAK,GAAG,CAAA;AAC9D,QAAA,OAAO,WAAA;AAAA,UACL,+BAA+B,KAAA,YAAiB,KAAA,GAAQ,MAAM,OAAA,GAAU,MAAA,CAAO,KAAK,CAAC,CAAA;AAAA,SACvF;AAAA,MACF;AAAA,IACF;AAAA,GACF;AACF;;;ACjWA,IAAM,UAAA,GAAwB;AAAA,EAC5B,EAAA,EAAI,MAAA;AAAA,EACJ,OAAA,EAAS,OAAA;AAAA,EACT,WAAA,EAAa,MAAA;AAAA,EACb,SAAA,EAAW,CAAC,MAAM,CAAA;AAAA,EAClB,YAAA,EAAc,EAAE,KAAA,EAAO,EAAC,EAAE;AAAA,EAE1B,QAAA,CAAS,QAAmB,GAAA,EAAqC;AAC/D,IAAA,MAAM,QAAkB,EAAC;AACzB,IAAA,MAAM,KAAA,GAAQ,CAAC,CAAA,KAAsB;AACnC,MAAA,KAAA,CAAM,KAAK,CAAC,CAAA;AACZ,MAAA,OAAO,CAAA;AAAA,IACT,CAAA;AAEA,IAAA,iBAAA,CAAkB,MAAA,EAAQ,KAAK,KAAK,CAAA;AAEpC,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,YAAA,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 * The destructive verb set covers more than `delete`: stopping, killing or\n * terminating a running process, revoking or rotating a credential/share,\n * resetting settings and removing/purging/uninstalling are all actions an\n * MCP client must not auto-run without the user's intent (VC/FG parity G57 —\n * e.g. `vibecontrols_sessions_kill`, `vibecontrols_tunnels_rotate_credentials`\n * were previously reported as non-destructive).\n *\n * A module can always override the inference by passing an explicit\n * `annotations` object to `registerTool()` / `server.registerTool()` — do\n * that for the rare verb match that is harmless (e.g. a typing indicator's\n * `typing_stop`).\n */\nexport const DESTRUCTIVE_NAME_VERBS = [\n 'delete',\n 'destroy',\n 'erase',\n 'kill',\n 'purge',\n 'remove',\n 'reset',\n 'revoke',\n 'rotate',\n 'stop',\n 'terminate',\n 'uninstall',\n 'wipe',\n] as const;\nconst DESTRUCTIVE_NAME_SEGMENT = new RegExp(\n `(?:^|_)(?:${DESTRUCTIVE_NAME_VERBS.join('|')})(?:_|$)`,\n 'i',\n);\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 } } | 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","export const LIST_ROLES = `\n query ListRoles($filter: RoleFilterInput, $pagination: PaginationInput, $scopeId: String!) {\n roles(filter: $filter, pagination: $pagination, scopeId: $scopeId) {\n id\n name\n description\n isSystem\n scopeId\n priority\n defaultPermissions {\n level\n resourceType\n }\n }\n }\n`;\n\nexport const GET_ROLE = `\n query GetRole($id: ID!) {\n role(id: $id) {\n id\n name\n description\n isSystem\n scopeId\n priority\n defaultPermissions {\n level\n resourceType\n }\n }\n }\n`;\n\nexport const CREATE_ROLE = `\n mutation CreateRole($input: CreateRoleInput!) {\n createRole(input: $input) {\n id\n name\n description\n scopeId\n }\n }\n`;\n\nexport const UPDATE_ROLE = `\n mutation UpdateRole($id: ID!, $input: UpdateRoleInput!) {\n updateRole(id: $id, input: $input) {\n id\n name\n description\n priority\n }\n }\n`;\n\nexport const DELETE_ROLE = `\n mutation DeleteRole($id: ID!, $reassignToRoleId: ID) {\n deleteRole(id: $id, reassignToRoleId: $reassignToRoleId)\n }\n`;\n\nexport const CHECK_PERMISSION = `\n query CheckPermission($input: PermissionCheckInput!) {\n checkPermission(input: $input) {\n allowed\n decisionPath\n roleName\n roleLevel\n overrideType\n }\n }\n`;\n\nexport const LIST_POLICY_REFERENCES = `\n query PolicyReferences($filter: PolicyReferenceFilterInput, $pagination: PaginationInput) {\n policyReferences(filter: $filter, pagination: $pagination) {\n id\n name\n description\n opaPackage\n resourceType\n action\n isActive\n priority\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const ATTACH_POLICY = `\n mutation AttachPolicy($roleId: ID!, $policyId: ID!) {\n attachPolicyToRole(roleId: $roleId, policyId: $policyId) {\n id\n name\n resourceType\n action\n isActive\n }\n }\n`;\n\nexport const DETACH_POLICY = `\n mutation DetachPolicy($roleId: ID!, $policyId: ID!) {\n detachPolicyFromRole(roleId: $roleId, policyId: $policyId)\n }\n`;\n","import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../core/index.js';\nimport {\n LIST_ROLES,\n GET_ROLE,\n CREATE_ROLE,\n UPDATE_ROLE,\n DELETE_ROLE,\n CHECK_PERMISSION,\n LIST_POLICY_REFERENCES,\n ATTACH_POLICY,\n DETACH_POLICY,\n} from './operations.js';\n\nconst LayerEnum = z.enum(['workspace', 'global']);\nconst ActorTypeEnum = z.enum(['USER', 'BOT', 'GROUP', 'INTEGRATION', 'DELEGATED_AGENT']);\n\ntype Layer = 'workspace' | 'global';\n\nfunction clientForLayer(ctx: McpContext, layer: Layer) {\n return layer === 'workspace' ? ctx.gql.workspace : ctx.gql.global;\n}\n\nfunction defaultScopeId(ctx: McpContext, layer: Layer): string | null {\n const auth = ctx.auth.read();\n if (!auth) return null;\n if (layer === 'workspace') return auth.workspaceId ?? null;\n return auth.organizationId ?? null;\n}\n\n// BOFF-9166 un-stub pass: 7 of the 9 tools are real here. The remaining\n// 2 (`rbac_policies_attach` / `rbac_policies_detach`) are un-stubbed in\n// this PR — they call `Mutation.attachPolicyToRole` /\n// `Mutation.detachPolicyToRole` on the chosen gateway. The rbac service\n// has never defined these mutations (policy-role attachment is implicit\n// in `createRole(input)` and `assignRoleToActor` instead), so on alpha\n// today these calls surface a real \"Cannot query field\" / \"Field X is\n// not defined\" GraphQL error from the gateway — clearer than the old\n// `[stubbed]` message and self-documenting. The mutations are queued\n// behind `rbac` service work; once added, the tools start working\n// without further MCP changes.\n\nexport function registerRbacTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_list')),\n {\n title: 'List Roles',\n description: 'List RBAC roles for a workspace or global scope.',\n inputSchema: {\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n scopeId: z.string().optional().describe('Override scope id (workspace or tenant)'),\n includeSystem: z.boolean().optional().describe('Include system roles'),\n limit: z.number().optional().describe('Page size'),\n },\n },\n async ({ layer, scopeId, includeSystem, limit }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const resolvedScope = scopeId ?? defaultScopeId(ctx, targetLayer);\n if (!resolvedScope) {\n return errorResult(\n `No ${targetLayer} scope. Pass scopeId or authenticate to a workspace/organization.`,\n );\n }\n const filter: Record<string, unknown> = {};\n if (includeSystem) filter.includeSystem = true;\n const data = await clientForLayer(ctx, targetLayer).request<{ roles: unknown }>(\n LIST_ROLES,\n {\n filter: Object.keys(filter).length ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: 0 },\n scopeId: resolvedScope,\n },\n );\n return jsonResult(data.roles);\n } catch (error) {\n ctx.logger.error('rbac_roles_list failed', { error: String(error) });\n return errorResult(\n `Failed to list roles: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_get')),\n {\n title: 'Get Role',\n description: 'Get a role by id from the workspace or global layer.',\n inputSchema: {\n id: z.string().describe('Role ID'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ id, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const data = await clientForLayer(ctx, targetLayer).request<{ role: unknown | null }>(\n GET_ROLE,\n { id },\n );\n if (!data.role) return errorResult(`Role ${id} not found`);\n return jsonResult(data.role);\n } catch (error) {\n ctx.logger.error('rbac_roles_get failed', { error: String(error) });\n return errorResult(\n `Failed to get role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_create')),\n {\n title: 'Create Role',\n description: 'Create a new RBAC role at the workspace or global layer.',\n inputSchema: {\n name: z.string().describe('Role name'),\n description: z.string().optional().describe('Role description'),\n parentId: z.string().optional().describe('Parent role id'),\n priority: z.number().optional().describe('Priority'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n scopeId: z.string().optional().describe('Override scope id'),\n scopeType: z.string().optional().describe('wspace|entity (global layer only)'),\n },\n },\n async ({ name, description, parentId, priority, layer, scopeId, scopeType }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const resolvedScope = scopeId ?? defaultScopeId(ctx, targetLayer);\n if (!resolvedScope) {\n return errorResult(\n `No ${targetLayer} scope. Pass scopeId or authenticate to a workspace/organization.`,\n );\n }\n const input: Record<string, unknown> = { name, scopeId: resolvedScope };\n if (description !== undefined) input.description = description;\n if (parentId !== undefined) input.parentId = parentId;\n if (priority !== undefined) input.priority = priority;\n if (targetLayer === 'global' && scopeType) input.scopeType = scopeType;\n const data = await clientForLayer(ctx, targetLayer).request<{ createRole: unknown }>(\n CREATE_ROLE,\n { input },\n );\n return jsonResult(data.createRole);\n } catch (error) {\n ctx.logger.error('rbac_roles_create failed', { error: String(error) });\n return errorResult(\n `Failed to create role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_update')),\n {\n title: 'Update Role',\n description: 'Update an existing role.',\n inputSchema: {\n id: z.string().describe('Role ID'),\n name: z.string().optional().describe('Updated name'),\n description: z.string().optional().describe('Updated description'),\n priority: z.number().optional().describe('Updated priority'),\n parentId: z.string().optional().describe('Updated parent role id'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ id, name, description, priority, parentId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const input: Record<string, unknown> = {};\n if (name !== undefined) input.name = name;\n if (description !== undefined) input.description = description;\n if (priority !== undefined) input.priority = priority;\n if (parentId !== undefined) input.parentId = parentId;\n if (!Object.keys(input).length) {\n return errorResult('No updates specified');\n }\n const data = await clientForLayer(ctx, targetLayer).request<{ updateRole: unknown }>(\n UPDATE_ROLE,\n { id, input },\n );\n return jsonResult(data.updateRole);\n } catch (error) {\n ctx.logger.error('rbac_roles_update failed', { error: String(error) });\n return errorResult(\n `Failed to update role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_roles_delete')),\n {\n title: 'Delete Role',\n description: 'Delete a role, optionally reassigning actors to another role.',\n inputSchema: {\n id: z.string().describe('Role ID'),\n reassignToRoleId: z.string().optional().describe('Reassign actors to this role'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ id, reassignToRoleId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const data = await clientForLayer(ctx, targetLayer).request<{ deleteRole: unknown }>(\n DELETE_ROLE,\n { id, reassignToRoleId },\n );\n return jsonResult({ deleted: data.deleteRole, roleId: id });\n } catch (error) {\n ctx.logger.error('rbac_roles_delete failed', { error: String(error) });\n return errorResult(\n `Failed to delete role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Policies ────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_policies_list')),\n {\n title: 'List Policy References',\n description:\n 'List OPA policy references registered on the chosen gateway (workspace or global), optionally filtered by resource/action/active state. Returns an array of PolicyReference.',\n inputSchema: {\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n resourceType: z.string().optional().describe('Filter by resource type (e.g. project)'),\n action: z.string().optional().describe('Filter by action (e.g. read/write/delete)'),\n isActive: z.boolean().optional().describe('Only active/inactive policies'),\n limit: z.number().int().optional().describe('Page size (default 100)'),\n offset: z.number().int().optional().describe('Pagination offset (default 0)'),\n },\n },\n async ({ layer, resourceType, action, isActive, limit, offset }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const filter: Record<string, unknown> = {};\n if (resourceType !== undefined) filter.resourceType = resourceType;\n if (action !== undefined) filter.action = action;\n if (isActive !== undefined) filter.isActive = isActive;\n const data = await clientForLayer(ctx, targetLayer).request<{\n policyReferences: unknown[];\n }>(LIST_POLICY_REFERENCES, {\n filter: Object.keys(filter).length ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: offset ?? 0 },\n });\n return jsonResult(data.policyReferences);\n } catch (error) {\n ctx.logger.error('rbac_policies_list failed', { error: String(error) });\n return errorResult(\n `Failed to list policy references: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_policies_attach')),\n {\n title: 'Attach Policy To Role',\n description:\n 'Attach an OPA policy reference to a role on the chosen gateway. Returns the attached PolicyReference.',\n inputSchema: {\n roleId: z.string().describe('Role ID'),\n policyId: z.string().describe('PolicyReference ID'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ roleId, policyId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const data = await clientForLayer(ctx, targetLayer).request<{\n attachPolicyToRole: unknown;\n }>(ATTACH_POLICY, { roleId, policyId });\n return jsonResult(data.attachPolicyToRole);\n } catch (error) {\n ctx.logger.error('rbac_policies_attach failed', { error: String(error) });\n return errorResult(\n `Failed to attach policy: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_policies_detach')),\n {\n title: 'Detach Policy From Role',\n description:\n 'Detach an OPA policy reference from a role on the chosen gateway. Returns { detached: boolean, roleId, policyId }.',\n inputSchema: {\n roleId: z.string().describe('Role ID'),\n policyId: z.string().describe('PolicyReference ID'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ roleId, policyId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const data = await clientForLayer(ctx, targetLayer).request<{\n detachPolicyFromRole: boolean;\n }>(DETACH_POLICY, { roleId, policyId });\n return jsonResult({ detached: data.detachPolicyFromRole, roleId, policyId });\n } catch (error) {\n ctx.logger.error('rbac_policies_detach failed', { error: String(error) });\n return errorResult(\n `Failed to detach policy: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'rbac_check')),\n {\n title: 'Check Permission',\n description: 'Check whether an actor has permission for an action on a resource.',\n inputSchema: {\n actorId: z.string().describe('Actor id (user/app/service/super_admin)'),\n action: z.string().describe('Action like read/write/delete'),\n resourceType: z.string().describe('Resource type like project/task'),\n actorType: ActorTypeEnum.optional().describe('Actor type (default: USER)'),\n resourceId: z.string().optional().describe('Specific resource id (optional)'),\n scopeId: z.string().optional().describe('Scope id (workspaceId or tenantId)'),\n layer: LayerEnum.optional().describe('workspace or global (default: workspace)'),\n },\n },\n async ({ actorId, action, resourceType, actorType, resourceId, scopeId, layer }) => {\n try {\n const targetLayer: Layer = layer ?? 'workspace';\n const resolvedScope = scopeId ?? defaultScopeId(ctx, targetLayer);\n if (!resolvedScope) {\n return errorResult(\n `No ${targetLayer} scope. Pass scopeId or authenticate to a workspace/organization.`,\n );\n }\n const input: Record<string, unknown> = {\n actorId,\n actorType: actorType ?? 'USER',\n action,\n resourceType,\n scopeId: resolvedScope,\n };\n if (resourceId !== undefined) input.resourceId = resourceId;\n const data = await clientForLayer(ctx, targetLayer).request<{ checkPermission: unknown }>(\n CHECK_PERMISSION,\n { input },\n );\n return jsonResult(data.checkPermission);\n } catch (error) {\n ctx.logger.error('rbac_check failed', { error: String(error) });\n return errorResult(\n `Failed to check permission: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * RBAC module — role-based access control across workspace + global layers.\n *\n * Tools:\n * <product>_rbac_roles_{list,get,create,update,delete}\n * <product>_rbac_check\n *\n * Backend: ~/products/wspace/rbac/wspace-rbac-svc/, ~/products/global/rbac/global-rbac-svc/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerRbacTools } from './tools.js';\n\nconst rbacModule: McpModule = {\n id: 'rbac',\n version: '0.0.1',\n displayName: 'RBAC',\n dependsOn: ['auth'],\n capabilities: { tools: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const track = (n: string): string => {\n tools.push(n);\n return n;\n };\n\n registerRbacTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default rbacModule;\n"]}
@@ -1,8 +1,3 @@
1
- import { c as McpModule } from '../../module-VpgjAf8m.js';
2
- import '@modelcontextprotocol/sdk/server/mcp.js';
3
- import '../../context-DGO4h-Pd.js';
4
- import 'graphql-request';
5
-
1
+ import type { McpModule } from '../../core/index.js';
6
2
  declare const rbacModule: McpModule;
7
-
8
- export { rbacModule as default };
3
+ export default rbacModule;
@@ -1,4 +1,4 @@
1
- import { mcpToolName, errorResult, jsonResult } from '../../chunk-G76DKEPI.js';
1
+ import { mcpToolName, errorResult, jsonResult } from '../../chunk-FHXCNP2U.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // src/modules/rbac/operations.ts
@@ -0,0 +1,9 @@
1
+ export declare const LIST_ROLES = "\n query ListRoles($filter: RoleFilterInput, $pagination: PaginationInput, $scopeId: String!) {\n roles(filter: $filter, pagination: $pagination, scopeId: $scopeId) {\n id\n name\n description\n isSystem\n scopeId\n priority\n defaultPermissions {\n level\n resourceType\n }\n }\n }\n";
2
+ export declare const GET_ROLE = "\n query GetRole($id: ID!) {\n role(id: $id) {\n id\n name\n description\n isSystem\n scopeId\n priority\n defaultPermissions {\n level\n resourceType\n }\n }\n }\n";
3
+ export declare const CREATE_ROLE = "\n mutation CreateRole($input: CreateRoleInput!) {\n createRole(input: $input) {\n id\n name\n description\n scopeId\n }\n }\n";
4
+ export declare const UPDATE_ROLE = "\n mutation UpdateRole($id: ID!, $input: UpdateRoleInput!) {\n updateRole(id: $id, input: $input) {\n id\n name\n description\n priority\n }\n }\n";
5
+ export declare const DELETE_ROLE = "\n mutation DeleteRole($id: ID!, $reassignToRoleId: ID) {\n deleteRole(id: $id, reassignToRoleId: $reassignToRoleId)\n }\n";
6
+ export declare const CHECK_PERMISSION = "\n query CheckPermission($input: PermissionCheckInput!) {\n checkPermission(input: $input) {\n allowed\n decisionPath\n roleName\n roleLevel\n overrideType\n }\n }\n";
7
+ export declare const LIST_POLICY_REFERENCES = "\n query PolicyReferences($filter: PolicyReferenceFilterInput, $pagination: PaginationInput) {\n policyReferences(filter: $filter, pagination: $pagination) {\n id\n name\n description\n opaPackage\n resourceType\n action\n isActive\n priority\n createdAt\n updatedAt\n }\n }\n";
8
+ export declare const ATTACH_POLICY = "\n mutation AttachPolicy($roleId: ID!, $policyId: ID!) {\n attachPolicyToRole(roleId: $roleId, policyId: $policyId) {\n id\n name\n resourceType\n action\n isActive\n }\n }\n";
9
+ export declare const DETACH_POLICY = "\n mutation DetachPolicy($roleId: ID!, $policyId: ID!) {\n detachPolicyFromRole(roleId: $roleId, policyId: $policyId)\n }\n";
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../core/index.js';
3
+ export declare function registerRbacTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/sandbox/tools.ts","../../../src/modules/sandbox/index.ts"],"names":[],"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,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,MAAM,IAAI,iBAAiB,sCAAsC,CAAA;AAAA,EACnE;AACA,EAAA,MAAM,IAAA,GAAO,CAAC,WAAA,EAAa,GAAG,KAAK,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAC7D,EAAA,OAAO,cAAA,CAAe,IAAY,CAAA;AACpC;;;AC4BO,SAAS,WAAA,CAAY,SAAiB,IAAA,EAA2B;AACtE,EAAA,MAAM,IAAA,GAAO,IAAA,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AAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,eAAA,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 } } | 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","import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { errorResult, mcpToolName, type McpContext } from '../../core/index.js';\n\ntype StubInputSchema = Record<string, z.ZodTypeAny>;\nfunction stubbedTool(\n server: McpServer,\n toolName: string,\n title: string,\n description: string,\n featureNote: string,\n inputSchema: StubInputSchema,\n altSuggestions: string[],\n): void {\n server.registerTool(\n toolName,\n {\n title,\n description: `${description} [STUB]`,\n inputSchema,\n },\n async () =>\n errorResult(\n `[stubbed] ${featureNote} Use ${altSuggestions.join(', ')} instead. The tool remains registered so callers receive a meaningful response instead of a schema-validation error.`,\n ),\n );\n}\n\nexport function registerSandboxTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // BOFF-8196: the entire sandbox module (33 tools) requires a\n // `$context: ContextInput!` argument that the MCP never supplies.\n // `Query.sandboxes` is gone from the live alpha gateway. Stub\n // every tool so callers get a clean \"[stubbed]\" error and the\n // per-call wiring is in place for the day the sandbox service\n // re-exposes the surface (or accepts the workspace token-derived\n // context without an explicit `$context` arg).\n const featureNote =\n 'Live alpha requires `$context: ContextInput!` on every sandbox call (33 tools), and `Query.sandboxes` is gone from the gateway. The MCP never supplied the `$context` arg.';\n const alts = [\n 'the next alpha release that derives the sandbox context from the workspace token',\n 'the SDK sandbox API (which the MCP will mirror once it lands)',\n ];\n\n // Mirror the original 33 tool names from the prior module surface.\n const tools: Array<[string, string, string]> = [\n ['sandbox_list', 'List Sandboxes', 'List sandboxes in the active workspace.'],\n ['sandbox_get', 'Get Sandbox', 'Get a sandbox by ID.'],\n ['sandbox_create', 'Create Sandbox', 'Create a new sandbox.'],\n ['sandbox_delete', 'Delete Sandbox', 'Delete a sandbox.'],\n ['sandbox_start', 'Start Sandbox', 'Start a sandbox.'],\n ['sandbox_stop', 'Stop Sandbox', 'Stop a sandbox.'],\n ['sandbox_extend', 'Extend Sandbox TTL', \"Extend a sandbox's TTL.\"],\n ['sandbox_check', 'Check Sandbox Health', 'Run a health check on a sandbox.'],\n ['sandbox_export_create', 'Create Sandbox Export', 'Create a sandbox export job.'],\n ['sandbox_export_check', 'Check Export Job', 'Check the status of a sandbox export.'],\n ['sandbox_export_get', 'Get Sandbox Export', 'Get details of a sandbox export job.'],\n ['sandbox_export_list', 'List Sandbox Exports', 'List sandbox export jobs.'],\n [\n 'sandbox_export_get_artifact_bytes',\n 'Get Export Artifact Bytes',\n 'Fetch bytes of a sandbox export artifact.',\n ],\n ['sandbox_templates_list', 'List Sandbox Templates', 'List sandbox templates.'],\n ['sandbox_templates_get', 'Get Sandbox Template', 'Get a sandbox template by ID.'],\n ['sandbox_templates_create', 'Create Sandbox Template', 'Create a new sandbox template.'],\n ['sandbox_templates_update', 'Update Sandbox Template', 'Update a sandbox template.'],\n ['sandbox_templates_delete', 'Delete Sandbox Template', 'Delete a sandbox template.'],\n ['sandbox_tags_list', 'List Sandbox Tags', 'List tags on a sandbox.'],\n ['sandbox_tags_get', 'Get Sandbox Tag', 'Get a sandbox tag.'],\n ['sandbox_tags_create', 'Create Sandbox Tag', 'Create a tag on a sandbox.'],\n ['sandbox_tags_attach', 'Attach Tag to Sandbox', 'Attach an existing tag to a sandbox.'],\n ['sandbox_tags_detach', 'Detach Tag from Sandbox', 'Detach a tag from a sandbox.'],\n ['sandbox_tags_replace', 'Replace Sandbox Tags', 'Replace the tag set on a sandbox.'],\n [\n 'sandbox_admin_list_all',\n 'List All Sandboxes (Admin)',\n 'List all sandboxes across workspaces (admin).',\n ],\n ['sandbox_admin_nodes_list', 'List Sandbox Nodes (Admin)', 'List sandbox node fleet (admin).'],\n ['sandbox_admin_active', 'List Active Sandboxes (Admin)', 'List active sandboxes (admin).'],\n [\n 'sandbox_admin_activity',\n 'List Recent Sandbox Activity (Admin)',\n 'Recent activity across sandboxes (admin).',\n ],\n ['sandbox_admin_stats', 'Sandbox Fleet Stats (Admin)', 'Aggregate sandbox fleet stats.'],\n ['sandbox_admin_logs', 'Sandbox Fleet Logs (Admin)', 'Sandbox fleet logs (admin).'],\n ['sandbox_admin_config_get', 'Get Sandbox Config (Admin)', 'Read sandbox module config.'],\n ['sandbox_admin_config_set', 'Update Sandbox Config (Admin)', 'Update sandbox module config.'],\n [\n 'sandbox_export_workspace_list',\n 'List Sandbox Exports (Workspace)',\n 'List sandbox exports in the active workspace.',\n ],\n ['sandbox_proxy_request', 'Proxy Sandbox Request', 'Proxy a request into a running sandbox.'],\n ];\n for (const [tool, title, desc] of tools) {\n stubbedTool(\n server,\n track(mcpToolName(ctx.productName, tool)),\n title,\n desc,\n featureNote,\n {},\n alts,\n );\n }\n}\n","/**\n * Sandbox module — Kubernetes-native sandbox management\n * (<product>_sandbox_{list,get,create,delete,stop,extend}).\n *\n * Backend: ~/products/wspace/sandbox/wspace-sandbox-svc/.\n * Lifted verbatim from vibecontrols-mcp/src/tools/sandboxes.ts.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerSandboxTools } from './tools.js';\n\nconst sandboxModule: McpModule = {\n id: 'sandbox',\n version: '0.0.1',\n displayName: 'Sandbox',\n capabilities: { tools: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const track = (n: string): string => {\n tools.push(n);\n return n;\n };\n\n registerSandboxTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default sandboxModule;\n"]}
1
+ {"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/sandbox/tools.ts","../../../src/modules/sandbox/index.ts"],"names":[],"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,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,MAAM,IAAI,iBAAiB,sCAAsC,CAAA;AAAA,EACnE;AACA,EAAA,MAAM,IAAA,GAAO,CAAC,WAAA,EAAa,GAAG,KAAK,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAC7D,EAAA,OAAO,cAAA,CAAe,IAAY,CAAA;AACpC;;;AC4B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A;AAEvC,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,eAAA,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 * The destructive verb set covers more than `delete`: stopping, killing or\n * terminating a running process, revoking or rotating a credential/share,\n * resetting settings and removing/purging/uninstalling are all actions an\n * MCP client must not auto-run without the user's intent (VC/FG parity G57 —\n * e.g. `vibecontrols_sessions_kill`, `vibecontrols_tunnels_rotate_credentials`\n * were previously reported as non-destructive).\n *\n * A module can always override the inference by passing an explicit\n * `annotations` object to `registerTool()` / `server.registerTool()` — do\n * that for the rare verb match that is harmless (e.g. a typing indicator's\n * `typing_stop`).\n */\nexport const DESTRUCTIVE_NAME_VERBS = [\n 'delete',\n 'destroy',\n 'erase',\n 'kill',\n 'purge',\n 'remove',\n 'reset',\n 'revoke',\n 'rotate',\n 'stop',\n 'terminate',\n 'uninstall',\n 'wipe',\n] as const;\nconst DESTRUCTIVE_NAME_SEGMENT = new RegExp(\n `(?:^|_)(?:${DESTRUCTIVE_NAME_VERBS.join('|')})(?:_|$)`,\n 'i',\n);\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 } } | 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","import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { errorResult, mcpToolName, type McpContext } from '../../core/index.js';\n\ntype StubInputSchema = Record<string, z.ZodTypeAny>;\nfunction stubbedTool(\n server: McpServer,\n toolName: string,\n title: string,\n description: string,\n featureNote: string,\n inputSchema: StubInputSchema,\n altSuggestions: string[],\n): void {\n server.registerTool(\n toolName,\n {\n title,\n description: `${description} [STUB]`,\n inputSchema,\n },\n async () =>\n errorResult(\n `[stubbed] ${featureNote} Use ${altSuggestions.join(', ')} instead. The tool remains registered so callers receive a meaningful response instead of a schema-validation error.`,\n ),\n );\n}\n\nexport function registerSandboxTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // BOFF-8196: the entire sandbox module (33 tools) requires a\n // `$context: ContextInput!` argument that the MCP never supplies.\n // `Query.sandboxes` is gone from the live alpha gateway. Stub\n // every tool so callers get a clean \"[stubbed]\" error and the\n // per-call wiring is in place for the day the sandbox service\n // re-exposes the surface (or accepts the workspace token-derived\n // context without an explicit `$context` arg).\n const featureNote =\n 'Live alpha requires `$context: ContextInput!` on every sandbox call (33 tools), and `Query.sandboxes` is gone from the gateway. The MCP never supplied the `$context` arg.';\n const alts = [\n 'the next alpha release that derives the sandbox context from the workspace token',\n 'the SDK sandbox API (which the MCP will mirror once it lands)',\n ];\n\n // Mirror the original 33 tool names from the prior module surface.\n const tools: Array<[string, string, string]> = [\n ['sandbox_list', 'List Sandboxes', 'List sandboxes in the active workspace.'],\n ['sandbox_get', 'Get Sandbox', 'Get a sandbox by ID.'],\n ['sandbox_create', 'Create Sandbox', 'Create a new sandbox.'],\n ['sandbox_delete', 'Delete Sandbox', 'Delete a sandbox.'],\n ['sandbox_start', 'Start Sandbox', 'Start a sandbox.'],\n ['sandbox_stop', 'Stop Sandbox', 'Stop a sandbox.'],\n ['sandbox_extend', 'Extend Sandbox TTL', \"Extend a sandbox's TTL.\"],\n ['sandbox_check', 'Check Sandbox Health', 'Run a health check on a sandbox.'],\n ['sandbox_export_create', 'Create Sandbox Export', 'Create a sandbox export job.'],\n ['sandbox_export_check', 'Check Export Job', 'Check the status of a sandbox export.'],\n ['sandbox_export_get', 'Get Sandbox Export', 'Get details of a sandbox export job.'],\n ['sandbox_export_list', 'List Sandbox Exports', 'List sandbox export jobs.'],\n [\n 'sandbox_export_get_artifact_bytes',\n 'Get Export Artifact Bytes',\n 'Fetch bytes of a sandbox export artifact.',\n ],\n ['sandbox_templates_list', 'List Sandbox Templates', 'List sandbox templates.'],\n ['sandbox_templates_get', 'Get Sandbox Template', 'Get a sandbox template by ID.'],\n ['sandbox_templates_create', 'Create Sandbox Template', 'Create a new sandbox template.'],\n ['sandbox_templates_update', 'Update Sandbox Template', 'Update a sandbox template.'],\n ['sandbox_templates_delete', 'Delete Sandbox Template', 'Delete a sandbox template.'],\n ['sandbox_tags_list', 'List Sandbox Tags', 'List tags on a sandbox.'],\n ['sandbox_tags_get', 'Get Sandbox Tag', 'Get a sandbox tag.'],\n ['sandbox_tags_create', 'Create Sandbox Tag', 'Create a tag on a sandbox.'],\n ['sandbox_tags_attach', 'Attach Tag to Sandbox', 'Attach an existing tag to a sandbox.'],\n ['sandbox_tags_detach', 'Detach Tag from Sandbox', 'Detach a tag from a sandbox.'],\n ['sandbox_tags_replace', 'Replace Sandbox Tags', 'Replace the tag set on a sandbox.'],\n [\n 'sandbox_admin_list_all',\n 'List All Sandboxes (Admin)',\n 'List all sandboxes across workspaces (admin).',\n ],\n ['sandbox_admin_nodes_list', 'List Sandbox Nodes (Admin)', 'List sandbox node fleet (admin).'],\n ['sandbox_admin_active', 'List Active Sandboxes (Admin)', 'List active sandboxes (admin).'],\n [\n 'sandbox_admin_activity',\n 'List Recent Sandbox Activity (Admin)',\n 'Recent activity across sandboxes (admin).',\n ],\n ['sandbox_admin_stats', 'Sandbox Fleet Stats (Admin)', 'Aggregate sandbox fleet stats.'],\n ['sandbox_admin_logs', 'Sandbox Fleet Logs (Admin)', 'Sandbox fleet logs (admin).'],\n ['sandbox_admin_config_get', 'Get Sandbox Config (Admin)', 'Read sandbox module config.'],\n ['sandbox_admin_config_set', 'Update Sandbox Config (Admin)', 'Update sandbox module config.'],\n [\n 'sandbox_export_workspace_list',\n 'List Sandbox Exports (Workspace)',\n 'List sandbox exports in the active workspace.',\n ],\n ['sandbox_proxy_request', 'Proxy Sandbox Request', 'Proxy a request into a running sandbox.'],\n ];\n for (const [tool, title, desc] of tools) {\n stubbedTool(\n server,\n track(mcpToolName(ctx.productName, tool)),\n title,\n desc,\n featureNote,\n {},\n alts,\n );\n }\n}\n","/**\n * Sandbox module — Kubernetes-native sandbox management\n * (<product>_sandbox_{list,get,create,delete,stop,extend}).\n *\n * Backend: ~/products/wspace/sandbox/wspace-sandbox-svc/.\n * Lifted verbatim from vibecontrols-mcp/src/tools/sandboxes.ts.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerSandboxTools } from './tools.js';\n\nconst sandboxModule: McpModule = {\n id: 'sandbox',\n version: '0.0.1',\n displayName: 'Sandbox',\n capabilities: { tools: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const track = (n: string): string => {\n tools.push(n);\n return n;\n };\n\n registerSandboxTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default sandboxModule;\n"]}
@@ -1,8 +1,3 @@
1
- import { c as McpModule } from '../../module-VpgjAf8m.js';
2
- import '@modelcontextprotocol/sdk/server/mcp.js';
3
- import '../../context-DGO4h-Pd.js';
4
- import 'graphql-request';
5
-
1
+ import type { McpModule } from '../../core/index.js';
6
2
  declare const sandboxModule: McpModule;
7
-
8
- export { sandboxModule as default };
3
+ export default sandboxModule;
@@ -1,4 +1,4 @@
1
- import { mcpToolName, errorResult } from '../../chunk-G76DKEPI.js';
1
+ import { mcpToolName, errorResult } from '../../chunk-FHXCNP2U.js';
2
2
 
3
3
  // src/modules/sandbox/tools.ts
4
4
  function stubbedTool(server, toolName, title, description, featureNote, inputSchema, altSuggestions) {
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { type McpContext } from '../../core/index.js';
3
+ export declare function registerSandboxTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -976,7 +976,9 @@ function registerSchedulerTools(server, ctx, track) {
976
976
  {
977
977
  title: "Untag Scheduled Job",
978
978
  description: "Remove a tag assignment from a scheduled job.",
979
- inputSchema: { entityId: zod.z.string(), tagId: zod.z.string() }
979
+ inputSchema: { entityId: zod.z.string(), tagId: zod.z.string() },
980
+ // Un-tagging is reversible (re-add the tag) — not destructive despite the `remove` verb.
981
+ annotations: { readOnlyHint: false, destructiveHint: false }
980
982
  },
981
983
  async ({ entityId, tagId }) => {
982
984
  try {