@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.
- package/dist/{chunk-G76DKEPI.js → chunk-FHXCNP2U.js} +36 -4
- package/dist/chunk-FHXCNP2U.js.map +1 -0
- package/dist/{chunk-SX6IGKZH.js → chunk-S2DM4KCX.js} +3 -3
- package/dist/{chunk-SX6IGKZH.js.map → chunk-S2DM4KCX.js.map} +1 -1
- package/dist/core/auth/device-code.d.ts +50 -0
- package/dist/core/auth/index.d.ts +2 -0
- package/dist/core/auth/store.d.ts +26 -0
- package/dist/core/capabilities.d.ts +16 -0
- package/dist/core/config/store.d.ts +39 -0
- package/dist/core/context.d.ts +35 -0
- package/dist/core/errors.d.ts +15 -0
- package/dist/core/gql/client.d.ts +14 -0
- package/dist/core/index.cjs +35 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +14 -59
- package/dist/core/index.js +1 -1
- package/dist/core/logger.d.ts +18 -0
- package/dist/core/module.d.ts +33 -0
- package/dist/core/progress.d.ts +5 -0
- package/dist/core/result.d.ts +29 -0
- package/dist/core/server.d.ts +15 -0
- package/dist/core/tool-governance.d.ts +14 -0
- package/dist/core/tool-name.d.ts +7 -0
- package/dist/index.cjs +19 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -7
- package/dist/index.js +1 -1
- package/dist/modules/adaptercloud/index.cjs.map +1 -1
- package/dist/modules/adaptercloud/index.d.ts +2 -7
- package/dist/modules/adaptercloud/index.js +1 -1
- package/dist/modules/adaptercloud/operations.d.ts +47 -0
- package/dist/modules/adaptercloud/prompts.d.ts +3 -0
- package/dist/modules/adaptercloud/resources.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/adapters.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/connections.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/cost.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/drift.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/health.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/policies.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/resources.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/shared.d.ts +25 -0
- package/dist/modules/adaptercloud/tools/sync.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/topology.d.ts +3 -0
- package/dist/modules/adaptercloud/tools/violations.d.ts +3 -0
- package/dist/modules/artistrybase/index.cjs.map +1 -1
- package/dist/modules/artistrybase/index.d.ts +2 -7
- package/dist/modules/artistrybase/index.js +1 -1
- package/dist/modules/artistrybase/operations.d.ts +63 -0
- package/dist/modules/artistrybase/prompts.d.ts +3 -0
- package/dist/modules/artistrybase/resources.d.ts +3 -0
- package/dist/modules/artistrybase/tools/health.d.ts +3 -0
- package/dist/modules/artistrybase/tools/library.d.ts +3 -0
- package/dist/modules/artistrybase/tools/portfolio.d.ts +3 -0
- package/dist/modules/artistrybase/tools/production.d.ts +3 -0
- package/dist/modules/artistrybase/tools/review.d.ts +3 -0
- package/dist/modules/artistrybase/tools/shared.d.ts +14 -0
- package/dist/modules/assethandler/index.cjs.map +1 -1
- package/dist/modules/assethandler/index.d.ts +2 -7
- package/dist/modules/assethandler/index.js +1 -1
- package/dist/modules/assethandler/operations.d.ts +57 -0
- package/dist/modules/assethandler/prompts.d.ts +3 -0
- package/dist/modules/assethandler/resources.d.ts +3 -0
- package/dist/modules/assethandler/tools/analytics.d.ts +3 -0
- package/dist/modules/assethandler/tools/assets.d.ts +3 -0
- package/dist/modules/assethandler/tools/finance.d.ts +3 -0
- package/dist/modules/assethandler/tools/governance.d.ts +3 -0
- package/dist/modules/assethandler/tools/innovation.d.ts +3 -0
- package/dist/modules/assethandler/tools/service.d.ts +3 -0
- package/dist/modules/assethandler/tools/shared.d.ts +18 -0
- package/dist/modules/atheletebridge/index.cjs.map +1 -1
- package/dist/modules/atheletebridge/index.d.ts +2 -7
- package/dist/modules/atheletebridge/index.js +1 -1
- package/dist/modules/atheletebridge/operations.d.ts +42 -0
- package/dist/modules/atheletebridge/prompts.d.ts +3 -0
- package/dist/modules/atheletebridge/resources.d.ts +3 -0
- package/dist/modules/atheletebridge/tools/fixtures.d.ts +3 -0
- package/dist/modules/atheletebridge/tools/health.d.ts +3 -0
- package/dist/modules/atheletebridge/tools/programs.d.ts +3 -0
- package/dist/modules/atheletebridge/tools/sessions.d.ts +3 -0
- package/dist/modules/atheletebridge/tools/shared.d.ts +14 -0
- package/dist/modules/atheletebridge/tools/teams.d.ts +3 -0
- package/dist/modules/atheletebridge/tools/workouts.d.ts +3 -0
- package/dist/modules/auth/extra-tools.d.ts +3 -0
- package/dist/modules/auth/index.cjs +3 -1
- package/dist/modules/auth/index.cjs.map +1 -1
- package/dist/modules/auth/index.d.ts +3 -50
- package/dist/modules/auth/index.js +6 -4
- package/dist/modules/auth/index.js.map +1 -1
- package/dist/modules/auth/{index.d.cts → legacy-auth.d.ts} +6 -14
- package/dist/modules/auth/more-tools.d.ts +3 -0
- package/dist/modules/auth/operations.d.ts +35 -0
- package/dist/modules/auth/tools.d.ts +3 -0
- package/dist/modules/billing/index.cjs.map +1 -1
- package/dist/modules/billing/index.d.ts +2 -7
- package/dist/modules/billing/index.js +1 -1
- package/dist/modules/billing/operations.d.ts +17 -0
- package/dist/modules/billing/tools.d.ts +3 -0
- package/dist/modules/brainyrich/index.cjs.map +1 -1
- package/dist/modules/brainyrich/index.d.ts +2 -7
- package/dist/modules/brainyrich/index.js +1 -1
- package/dist/modules/brainyrich/operations.d.ts +57 -0
- package/dist/modules/brainyrich/prompts.d.ts +3 -0
- package/dist/modules/brainyrich/resources.d.ts +3 -0
- package/dist/modules/brainyrich/tools/accounts.d.ts +3 -0
- package/dist/modules/brainyrich/tools/analytics.d.ts +3 -0
- package/dist/modules/brainyrich/tools/goals.d.ts +3 -0
- package/dist/modules/brainyrich/tools/holdings.d.ts +3 -0
- package/dist/modules/brainyrich/tools/households.d.ts +3 -0
- package/dist/modules/brainyrich/tools/insights.d.ts +3 -0
- package/dist/modules/brainyrich/tools/modelPortfolios.d.ts +3 -0
- package/dist/modules/brainyrich/tools/portfolios.d.ts +3 -0
- package/dist/modules/brainyrich/tools/rebalance.d.ts +3 -0
- package/dist/modules/brainyrich/tools/shared.d.ts +16 -0
- package/dist/modules/brainyrich/tools/transactions.d.ts +3 -0
- package/dist/modules/buildmyiq/index.cjs.map +1 -1
- package/dist/modules/buildmyiq/index.d.ts +2 -7
- package/dist/modules/buildmyiq/index.js +1 -1
- package/dist/modules/buildmyiq/operations.d.ts +43 -0
- package/dist/modules/buildmyiq/prompts.d.ts +3 -0
- package/dist/modules/buildmyiq/resources.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/assessments.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/certificates.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/cohorts.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/courses.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/enrollments.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/health.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/lessons.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/modules.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/shared.d.ts +14 -0
- package/dist/modules/buildmyiq/tools/skills.d.ts +3 -0
- package/dist/modules/buildmyiq/tools/submissions.d.ts +3 -0
- package/dist/modules/channels/index.cjs.map +1 -1
- package/dist/modules/channels/index.d.ts +2 -7
- package/dist/modules/channels/index.js +1 -1
- package/dist/modules/channels/operations.d.ts +12 -0
- package/dist/modules/channels/tools.d.ts +3 -0
- package/dist/modules/collabkin/index.cjs.map +1 -1
- package/dist/modules/collabkin/index.d.ts +2 -7
- package/dist/modules/collabkin/index.js +1 -1
- package/dist/modules/collabkin/operations.d.ts +41 -0
- package/dist/modules/collabkin/prompts.d.ts +3 -0
- package/dist/modules/collabkin/resources.d.ts +3 -0
- package/dist/modules/collabkin/tools/comments.d.ts +3 -0
- package/dist/modules/collabkin/tools/health.d.ts +3 -0
- package/dist/modules/collabkin/tools/memberships.d.ts +3 -0
- package/dist/modules/collabkin/tools/memories.d.ts +3 -0
- package/dist/modules/collabkin/tools/people.d.ts +3 -0
- package/dist/modules/collabkin/tools/relationships.d.ts +3 -0
- package/dist/modules/collabkin/tools/shared.d.ts +12 -0
- package/dist/modules/collabkin/tools/stories.d.ts +3 -0
- package/dist/modules/collabkin/tools/timeline.d.ts +3 -0
- package/dist/modules/collabkin/tools/trees.d.ts +3 -0
- package/dist/modules/comradecircle/index.cjs.map +1 -1
- package/dist/modules/comradecircle/index.d.ts +2 -7
- package/dist/modules/comradecircle/index.js +1 -1
- package/dist/modules/comradecircle/operations.d.ts +53 -0
- package/dist/modules/comradecircle/prompts.d.ts +3 -0
- package/dist/modules/comradecircle/resources.d.ts +3 -0
- package/dist/modules/comradecircle/tools/channels.d.ts +3 -0
- package/dist/modules/comradecircle/tools/circles.d.ts +3 -0
- package/dist/modules/comradecircle/tools/comments.d.ts +3 -0
- package/dist/modules/comradecircle/tools/events.d.ts +3 -0
- package/dist/modules/comradecircle/tools/feed.d.ts +3 -0
- package/dist/modules/comradecircle/tools/health.d.ts +3 -0
- package/dist/modules/comradecircle/tools/memberships.d.ts +3 -0
- package/dist/modules/comradecircle/tools/polls.d.ts +3 -0
- package/dist/modules/comradecircle/tools/posts.d.ts +3 -0
- package/dist/modules/comradecircle/tools/profiles.d.ts +3 -0
- package/dist/modules/comradecircle/tools/shared.d.ts +16 -0
- package/dist/modules/conversations/index.cjs +6 -2
- package/dist/modules/conversations/index.cjs.map +1 -1
- package/dist/modules/conversations/index.d.ts +2 -7
- package/dist/modules/conversations/index.js +7 -3
- package/dist/modules/conversations/index.js.map +1 -1
- package/dist/modules/conversations/operations.d.ts +50 -0
- package/dist/modules/conversations/tools.d.ts +3 -0
- package/dist/modules/coolandlovely/index.cjs.map +1 -1
- package/dist/modules/coolandlovely/index.d.ts +2 -7
- package/dist/modules/coolandlovely/index.js +1 -1
- package/dist/modules/coolandlovely/operations.d.ts +50 -0
- package/dist/modules/coolandlovely/prompts.d.ts +3 -0
- package/dist/modules/coolandlovely/resources.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/brands.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/collaborations.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/collections.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/health.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/lookbooks.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/looks.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/profile.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/shared.d.ts +25 -0
- package/dist/modules/coolandlovely/tools/style-items.d.ts +3 -0
- package/dist/modules/coolandlovely/tools/wardrobe.d.ts +3 -0
- package/dist/modules/cosmicintersection/index.cjs.map +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +2 -7
- package/dist/modules/cosmicintersection/index.js +1 -1
- package/dist/modules/cosmicintersection/operations.d.ts +53 -0
- package/dist/modules/cosmicintersection/prompts.d.ts +3 -0
- package/dist/modules/cosmicintersection/resources.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/analyses.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/collections.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/datasets.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/grants.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/health.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/notebooks.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/pipelines.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/releases.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/runs.d.ts +3 -0
- package/dist/modules/cosmicintersection/tools/shared.d.ts +15 -0
- package/dist/modules/cosmicintersection/tools/sources.d.ts +3 -0
- package/dist/modules/crewfoundry/index.cjs.map +1 -1
- package/dist/modules/crewfoundry/index.d.ts +2 -7
- package/dist/modules/crewfoundry/index.js +1 -1
- package/dist/modules/crewfoundry/operations.d.ts +49 -0
- package/dist/modules/crewfoundry/prompts.d.ts +3 -0
- package/dist/modules/crewfoundry/resources.d.ts +3 -0
- package/dist/modules/crewfoundry/tools/attendance.d.ts +3 -0
- package/dist/modules/crewfoundry/tools/clients.d.ts +3 -0
- package/dist/modules/crewfoundry/tools/engagement.d.ts +3 -0
- package/dist/modules/crewfoundry/tools/learning.d.ts +3 -0
- package/dist/modules/crewfoundry/tools/overview.d.ts +3 -0
- package/dist/modules/crewfoundry/tools/people.d.ts +3 -0
- package/dist/modules/crewfoundry/tools/recruitment.d.ts +3 -0
- package/dist/modules/crewfoundry/tools/shared.d.ts +2 -0
- package/dist/modules/devportal/index.cjs.map +1 -1
- package/dist/modules/devportal/index.d.ts +2 -7
- package/dist/modules/devportal/index.js +1 -1
- package/dist/modules/devportal/operations.d.ts +26 -0
- package/dist/modules/devportal/tools.d.ts +3 -0
- package/dist/modules/ecoimpacthub/index.cjs.map +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +2 -7
- package/dist/modules/ecoimpacthub/index.js +1 -1
- package/dist/modules/ecoimpacthub/operations.d.ts +53 -0
- package/dist/modules/ecoimpacthub/prompts.d.ts +3 -0
- package/dist/modules/ecoimpacthub/resources.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/carbon.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/emissions.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/habitat.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/health.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/measurements.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/observations.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/reports.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/sensors.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/shared.d.ts +28 -0
- package/dist/modules/ecoimpacthub/tools/sites.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/species.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/targets.d.ts +3 -0
- package/dist/modules/ecoimpacthub/tools/thresholds.d.ts +3 -0
- package/dist/modules/eventfullymanaged/index.cjs.map +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +2 -7
- package/dist/modules/eventfullymanaged/index.js +1 -1
- package/dist/modules/eventfullymanaged/operations.d.ts +96 -0
- package/dist/modules/eventfullymanaged/prompts.d.ts +3 -0
- package/dist/modules/eventfullymanaged/resources.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/agenda.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/attendees.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/checkin.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/content.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/events.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/networking.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/shared.d.ts +9 -0
- package/dist/modules/eventfullymanaged/tools/sponsorship.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/ticketing.d.ts +3 -0
- package/dist/modules/eventfullymanaged/tools/venues.d.ts +3 -0
- package/dist/modules/export/index.cjs.map +1 -1
- package/dist/modules/export/index.d.ts +2 -7
- package/dist/modules/export/index.js +1 -1
- package/dist/modules/export/operations.d.ts +13 -0
- package/dist/modules/export/tools.d.ts +3 -0
- package/dist/modules/files/index.cjs.map +1 -1
- package/dist/modules/files/index.d.ts +2 -7
- package/dist/modules/files/index.js +1 -1
- package/dist/modules/files/operations.d.ts +9 -0
- package/dist/modules/files/tools.d.ts +3 -0
- package/dist/modules/fluidgrids/index.cjs +38 -19
- package/dist/modules/fluidgrids/index.cjs.map +1 -1
- package/dist/modules/fluidgrids/index.d.ts +2 -7
- package/dist/modules/fluidgrids/index.js +39 -20
- package/dist/modules/fluidgrids/index.js.map +1 -1
- package/dist/modules/fluidgrids/operations.d.ts +46 -0
- package/dist/modules/fluidgrids/prompts.d.ts +3 -0
- package/dist/modules/fluidgrids/resources.d.ts +3 -0
- package/dist/modules/fluidgrids/tools/credentials.d.ts +3 -0
- package/dist/modules/fluidgrids/tools/helpers.d.ts +5 -0
- package/dist/modules/fluidgrids/tools/insights.d.ts +3 -0
- package/dist/modules/fluidgrids/tools/nodes.d.ts +3 -0
- package/dist/modules/fluidgrids/tools/runs.d.ts +3 -0
- package/dist/modules/fluidgrids/tools/scheduled-jobs.d.ts +3 -0
- package/dist/modules/fluidgrids/tools/webhooks.d.ts +3 -0
- package/dist/modules/fluidgrids/tools/workflows.d.ts +3 -0
- package/dist/modules/ggnomad/index.cjs.map +1 -1
- package/dist/modules/ggnomad/index.d.ts +2 -7
- package/dist/modules/ggnomad/index.js +1 -1
- package/dist/modules/ggnomad/operations.d.ts +29 -0
- package/dist/modules/ggnomad/prompts.d.ts +3 -0
- package/dist/modules/ggnomad/resources.d.ts +3 -0
- package/dist/modules/ggnomad/tools/activities.d.ts +3 -0
- package/dist/modules/ggnomad/tools/analytics.d.ts +3 -0
- package/dist/modules/ggnomad/tools/bookings.d.ts +3 -0
- package/dist/modules/ggnomad/tools/events.d.ts +3 -0
- package/dist/modules/ggnomad/tools/favorites.d.ts +3 -0
- package/dist/modules/ggnomad/tools/properties.d.ts +3 -0
- package/dist/modules/ggnomad/tools/providers.d.ts +3 -0
- package/dist/modules/ggnomad/tools/shared.d.ts +5 -0
- package/dist/modules/ggnomad/tools/tours.d.ts +3 -0
- package/dist/modules/ggnomad/tools/trips.d.ts +3 -0
- package/dist/modules/govcitizenhub/index.cjs.map +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +2 -7
- package/dist/modules/govcitizenhub/index.js +1 -1
- package/dist/modules/govcitizenhub/operations.d.ts +43 -0
- package/dist/modules/govcitizenhub/prompts.d.ts +3 -0
- package/dist/modules/govcitizenhub/resources.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/agencies.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/applications.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/documents.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/grievances.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/health.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/notes.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/payments.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/permits.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/services.d.ts +3 -0
- package/dist/modules/govcitizenhub/tools/shared.d.ts +17 -0
- package/dist/modules/groups/index.cjs.map +1 -1
- package/dist/modules/groups/index.d.ts +2 -7
- package/dist/modules/groups/index.js +1 -1
- package/dist/modules/groups/operations.d.ts +11 -0
- package/dist/modules/groups/tools.d.ts +3 -0
- package/dist/modules/headshotmarketing/index.cjs.map +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +2 -7
- package/dist/modules/headshotmarketing/index.js +1 -1
- package/dist/modules/headshotmarketing/operations.d.ts +206 -0
- package/dist/modules/headshotmarketing/prompts.d.ts +3 -0
- package/dist/modules/headshotmarketing/resources.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/ads.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/analytics.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/campaigns.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/contacts.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/content.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/deals.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/events.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/helpers.d.ts +6 -0
- package/dist/modules/headshotmarketing/tools/influencers.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/landing_pages.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/leads.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/seo.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/shared.d.ts +48 -0
- package/dist/modules/headshotmarketing/tools/social.d.ts +3 -0
- package/dist/modules/headshotmarketing/tools/workflows.d.ts +3 -0
- package/dist/modules/health/index.cjs.map +1 -1
- package/dist/modules/health/index.d.ts +2 -7
- package/dist/modules/health/index.js +1 -1
- package/dist/modules/healthybowl/index.cjs.map +1 -1
- package/dist/modules/healthybowl/index.d.ts +2 -7
- package/dist/modules/healthybowl/index.js +1 -1
- package/dist/modules/healthybowl/operations.d.ts +13 -0
- package/dist/modules/healthybowl/prompts.d.ts +3 -0
- package/dist/modules/healthybowl/resources.d.ts +3 -0
- package/dist/modules/healthybowl/tools/advisory.d.ts +3 -0
- package/dist/modules/healthybowl/tools/farm.d.ts +3 -0
- package/dist/modules/healthybowl/tools/guardrails.d.ts +3 -0
- package/dist/modules/healthybowl/tools/pestissue.d.ts +3 -0
- package/dist/modules/healthybowl/tools/shared.d.ts +4 -0
- package/dist/modules/hookmovies/index.cjs.map +1 -1
- package/dist/modules/hookmovies/index.d.ts +2 -7
- package/dist/modules/hookmovies/index.js +1 -1
- package/dist/modules/hookmovies/operations.d.ts +57 -0
- package/dist/modules/hookmovies/prompts.d.ts +3 -0
- package/dist/modules/hookmovies/resources.d.ts +3 -0
- package/dist/modules/hookmovies/tools/auditions.d.ts +3 -0
- package/dist/modules/hookmovies/tools/entitlements.d.ts +3 -0
- package/dist/modules/hookmovies/tools/episodes.d.ts +3 -0
- package/dist/modules/hookmovies/tools/health.d.ts +3 -0
- package/dist/modules/hookmovies/tools/lists.d.ts +3 -0
- package/dist/modules/hookmovies/tools/people.d.ts +3 -0
- package/dist/modules/hookmovies/tools/productions.d.ts +3 -0
- package/dist/modules/hookmovies/tools/progress.d.ts +3 -0
- package/dist/modules/hookmovies/tools/reviews.d.ts +3 -0
- package/dist/modules/hookmovies/tools/rights.d.ts +3 -0
- package/dist/modules/hookmovies/tools/shared.d.ts +15 -0
- package/dist/modules/hookmovies/tools/studios.d.ts +3 -0
- package/dist/modules/hookmovies/tools/titles.d.ts +3 -0
- package/dist/modules/housingvista/index.cjs.map +1 -1
- package/dist/modules/housingvista/index.d.ts +2 -7
- package/dist/modules/housingvista/index.js +1 -1
- package/dist/modules/housingvista/operations.d.ts +32 -0
- package/dist/modules/housingvista/prompts.d.ts +3 -0
- package/dist/modules/housingvista/resources.d.ts +3 -0
- package/dist/modules/housingvista/tools/analytics.d.ts +3 -0
- package/dist/modules/housingvista/tools/assets.d.ts +3 -0
- package/dist/modules/housingvista/tools/investments.d.ts +3 -0
- package/dist/modules/housingvista/tools/leasing.d.ts +3 -0
- package/dist/modules/housingvista/tools/market.d.ts +3 -0
- package/dist/modules/housingvista/tools/marketplace.d.ts +3 -0
- package/dist/modules/housingvista/tools/properties.d.ts +3 -0
- package/dist/modules/housingvista/tools/shared.d.ts +4 -0
- package/dist/modules/housingvista/tools/transactions.d.ts +3 -0
- package/dist/modules/housingvista/tools/verification.d.ts +3 -0
- package/dist/modules/integrations/index.cjs +3 -1
- package/dist/modules/integrations/index.cjs.map +1 -1
- package/dist/modules/integrations/index.d.ts +2 -7
- package/dist/modules/integrations/index.js +4 -2
- package/dist/modules/integrations/index.js.map +1 -1
- package/dist/modules/integrations/operations.d.ts +27 -0
- package/dist/modules/integrations/tools.d.ts +3 -0
- package/dist/modules/intelwatchtower/index.cjs.map +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +2 -7
- package/dist/modules/intelwatchtower/index.js +1 -1
- package/dist/modules/intelwatchtower/operations.d.ts +48 -0
- package/dist/modules/intelwatchtower/prompts.d.ts +3 -0
- package/dist/modules/intelwatchtower/resources.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/alerts.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/cases.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/entities.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/feeds.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/health.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/indicators.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/missions.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/observations.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/reports.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/requirements.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/shared.d.ts +23 -0
- package/dist/modules/intelwatchtower/tools/sources.d.ts +3 -0
- package/dist/modules/intelwatchtower/tools/tasks.d.ts +3 -0
- package/dist/modules/kadaikodi/index.cjs.map +1 -1
- package/dist/modules/kadaikodi/index.d.ts +2 -7
- package/dist/modules/kadaikodi/index.js +1 -1
- package/dist/modules/kadaikodi/operations.d.ts +35 -0
- package/dist/modules/kadaikodi/prompts.d.ts +3 -0
- package/dist/modules/kadaikodi/resources.d.ts +3 -0
- package/dist/modules/kadaikodi/tools/analytics.d.ts +3 -0
- package/dist/modules/kadaikodi/tools/investments.d.ts +3 -0
- package/dist/modules/kadaikodi/tools/offerings.d.ts +3 -0
- package/dist/modules/kadaikodi/tools/orders.d.ts +3 -0
- package/dist/modules/kadaikodi/tools/providers.d.ts +3 -0
- package/dist/modules/kadaikodi/tools/reviews.d.ts +3 -0
- package/dist/modules/kadaikodi/tools/shared.d.ts +9 -0
- package/dist/modules/kadaikodi/tools/tasks.d.ts +3 -0
- package/dist/modules/kadaikodi/tools/workers.d.ts +3 -0
- package/dist/modules/labsofscience/index.cjs.map +1 -1
- package/dist/modules/labsofscience/index.d.ts +2 -7
- package/dist/modules/labsofscience/index.js +1 -1
- package/dist/modules/labsofscience/operations.d.ts +58 -0
- package/dist/modules/labsofscience/prompts.d.ts +3 -0
- package/dist/modules/labsofscience/resources.d.ts +3 -0
- package/dist/modules/labsofscience/tools/datasets.d.ts +3 -0
- package/dist/modules/labsofscience/tools/experiments.d.ts +3 -0
- package/dist/modules/labsofscience/tools/health.d.ts +3 -0
- package/dist/modules/labsofscience/tools/instruments.d.ts +3 -0
- package/dist/modules/labsofscience/tools/inventory.d.ts +3 -0
- package/dist/modules/labsofscience/tools/notebook.d.ts +3 -0
- package/dist/modules/labsofscience/tools/pipelines.d.ts +3 -0
- package/dist/modules/labsofscience/tools/projects.d.ts +3 -0
- package/dist/modules/labsofscience/tools/protocols.d.ts +3 -0
- package/dist/modules/labsofscience/tools/runs.d.ts +3 -0
- package/dist/modules/labsofscience/tools/shared.d.ts +15 -0
- package/dist/modules/manufacturedops/index.cjs.map +1 -1
- package/dist/modules/manufacturedops/index.d.ts +2 -7
- package/dist/modules/manufacturedops/index.js +1 -1
- package/dist/modules/manufacturedops/operations.d.ts +45 -0
- package/dist/modules/manufacturedops/prompts.d.ts +3 -0
- package/dist/modules/manufacturedops/resources.d.ts +3 -0
- package/dist/modules/manufacturedops/tools/health.d.ts +3 -0
- package/dist/modules/manufacturedops/tools/maintenance.d.ts +3 -0
- package/dist/modules/manufacturedops/tools/production.d.ts +3 -0
- package/dist/modules/manufacturedops/tools/quality.d.ts +3 -0
- package/dist/modules/manufacturedops/tools/shared.d.ts +27 -0
- package/dist/modules/movethewheels/index.cjs.map +1 -1
- package/dist/modules/movethewheels/index.d.ts +2 -7
- package/dist/modules/movethewheels/index.js +1 -1
- package/dist/modules/movethewheels/operations.d.ts +105 -0
- package/dist/modules/movethewheels/prompts.d.ts +3 -0
- package/dist/modules/movethewheels/resources.d.ts +3 -0
- package/dist/modules/movethewheels/tools/analytics.d.ts +3 -0
- package/dist/modules/movethewheels/tools/customers.d.ts +3 -0
- package/dist/modules/movethewheels/tools/drivers.d.ts +3 -0
- package/dist/modules/movethewheels/tools/inventory.d.ts +3 -0
- package/dist/modules/movethewheels/tools/marketplace.d.ts +3 -0
- package/dist/modules/movethewheels/tools/orders.d.ts +3 -0
- package/dist/modules/movethewheels/tools/products.d.ts +3 -0
- package/dist/modules/movethewheels/tools/reports.d.ts +3 -0
- package/dist/modules/movethewheels/tools/routes.d.ts +3 -0
- package/dist/modules/movethewheels/tools/shared.d.ts +14 -0
- package/dist/modules/movethewheels/tools/shipments.d.ts +3 -0
- package/dist/modules/movethewheels/tools/tracking.d.ts +3 -0
- package/dist/modules/movethewheels/tools/vehicles.d.ts +3 -0
- package/dist/modules/movethewheels/tools/warehouses.d.ts +3 -0
- package/dist/modules/mybodyshield/index.cjs.map +1 -1
- package/dist/modules/mybodyshield/index.d.ts +2 -7
- package/dist/modules/mybodyshield/index.js +1 -1
- package/dist/modules/mybodyshield/operations.d.ts +49 -0
- package/dist/modules/mybodyshield/prompts.d.ts +3 -0
- package/dist/modules/mybodyshield/resources.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/coaching.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/goals.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/health.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/meals.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/metrics.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/nutrition.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/programs.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/recovery.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/sessions.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/shared.d.ts +13 -0
- package/dist/modules/mybodyshield/tools/workouts.d.ts +3 -0
- package/dist/modules/notifications/index.cjs.map +1 -1
- package/dist/modules/notifications/index.d.ts +2 -7
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/notifications/operations.d.ts +4 -0
- package/dist/modules/notifications/tools.d.ts +3 -0
- package/dist/modules/organizations/index.cjs.map +1 -1
- package/dist/modules/organizations/index.d.ts +2 -7
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/organizations/operations.d.ts +9 -0
- package/dist/modules/organizations/tools.d.ts +3 -0
- package/dist/modules/planmagnet/destructive-gate.d.ts +4 -0
- package/dist/modules/planmagnet/index.cjs.map +1 -1
- package/dist/modules/planmagnet/index.d.ts +2 -7
- package/dist/modules/planmagnet/index.js +1 -1
- package/dist/modules/planmagnet/operations.d.ts +182 -0
- package/dist/modules/planmagnet/prompts.d.ts +3 -0
- package/dist/modules/planmagnet/resources.d.ts +3 -0
- package/dist/modules/planmagnet/tools/automations.d.ts +3 -0
- package/dist/modules/planmagnet/tools/boards.d.ts +3 -0
- package/dist/modules/planmagnet/tools/budgets.d.ts +3 -0
- package/dist/modules/planmagnet/tools/customfields.d.ts +3 -0
- package/dist/modules/planmagnet/tools/dependencies.d.ts +3 -0
- package/dist/modules/planmagnet/tools/features.d.ts +3 -0
- package/dist/modules/planmagnet/tools/milestones.d.ts +3 -0
- package/dist/modules/planmagnet/tools/projects.d.ts +3 -0
- package/dist/modules/planmagnet/tools/qualitygates.d.ts +3 -0
- package/dist/modules/planmagnet/tools/releases.d.ts +3 -0
- package/dist/modules/planmagnet/tools/risks.d.ts +3 -0
- package/dist/modules/planmagnet/tools/roadmaps.d.ts +3 -0
- package/dist/modules/planmagnet/tools/shared.d.ts +41 -0
- package/dist/modules/planmagnet/tools/sprints.d.ts +3 -0
- package/dist/modules/planmagnet/tools/sync.d.ts +3 -0
- package/dist/modules/planmagnet/tools/templates.d.ts +3 -0
- package/dist/modules/planmagnet/tools/timetracking.d.ts +3 -0
- package/dist/modules/planmagnet/tools/workitems.d.ts +3 -0
- package/dist/modules/products/index.cjs.map +1 -1
- package/dist/modules/products/index.d.ts +2 -7
- package/dist/modules/products/index.js +1 -1
- package/dist/modules/products/operations.d.ts +22 -0
- package/dist/modules/products/tools.d.ts +3 -0
- package/dist/modules/proserviceworld/index.cjs.map +1 -1
- package/dist/modules/proserviceworld/index.d.ts +2 -7
- package/dist/modules/proserviceworld/index.js +1 -1
- package/dist/modules/proserviceworld/operations.d.ts +33 -0
- package/dist/modules/proserviceworld/prompts.d.ts +3 -0
- package/dist/modules/proserviceworld/resources.d.ts +3 -0
- package/dist/modules/proserviceworld/tools/clients.d.ts +3 -0
- package/dist/modules/proserviceworld/tools/compliance.d.ts +3 -0
- package/dist/modules/proserviceworld/tools/engagements.d.ts +3 -0
- package/dist/modules/proserviceworld/tools/health.d.ts +3 -0
- package/dist/modules/proserviceworld/tools/invoices.d.ts +3 -0
- package/dist/modules/proserviceworld/tools/matters.d.ts +3 -0
- package/dist/modules/proserviceworld/tools/practice.d.ts +3 -0
- package/dist/modules/proserviceworld/tools/shared.d.ts +11 -0
- package/dist/modules/proserviceworld/tools/time.d.ts +3 -0
- package/dist/modules/rbac/index.cjs.map +1 -1
- package/dist/modules/rbac/index.d.ts +2 -7
- package/dist/modules/rbac/index.js +1 -1
- package/dist/modules/rbac/operations.d.ts +9 -0
- package/dist/modules/rbac/tools.d.ts +3 -0
- package/dist/modules/sandbox/index.cjs.map +1 -1
- package/dist/modules/sandbox/index.d.ts +2 -7
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/sandbox/tools.d.ts +3 -0
- package/dist/modules/scheduler/index.cjs +3 -1
- package/dist/modules/scheduler/index.cjs.map +1 -1
- package/dist/modules/scheduler/index.d.ts +2 -7
- package/dist/modules/scheduler/index.js +4 -2
- package/dist/modules/scheduler/index.js.map +1 -1
- package/dist/modules/scheduler/operations.d.ts +31 -0
- package/dist/modules/scheduler/tools.d.ts +3 -0
- package/dist/modules/security/index.cjs.map +1 -1
- package/dist/modules/security/index.d.ts +2 -7
- package/dist/modules/security/index.js +1 -1
- package/dist/modules/security/operations.d.ts +13 -0
- package/dist/modules/security/tools.d.ts +3 -0
- package/dist/modules/semanticfed/index.cjs +65 -1
- package/dist/modules/semanticfed/index.cjs.map +1 -1
- package/dist/modules/semanticfed/index.d.ts +2 -7
- package/dist/modules/semanticfed/index.js +66 -2
- package/dist/modules/semanticfed/index.js.map +1 -1
- package/dist/modules/semanticfed/operations.d.ts +53 -0
- package/dist/modules/semanticfed/prompts.d.ts +3 -0
- package/dist/modules/semanticfed/resources.d.ts +3 -0
- package/dist/modules/semanticfed/tools/connections.d.ts +3 -0
- package/dist/modules/semanticfed/tools/connectors.d.ts +3 -0
- package/dist/modules/semanticfed/tools/datasources.d.ts +3 -0
- package/dist/modules/semanticfed/tools/dimensions.d.ts +3 -0
- package/dist/modules/semanticfed/tools/entities.d.ts +3 -0
- package/dist/modules/semanticfed/tools/health.d.ts +3 -0
- package/dist/modules/semanticfed/tools/metrics.d.ts +3 -0
- package/dist/modules/semanticfed/tools/models.d.ts +3 -0
- package/dist/modules/semanticfed/tools/policies.d.ts +3 -0
- package/dist/modules/semanticfed/tools/queries.d.ts +3 -0
- package/dist/modules/semanticfed/tools/relationships.d.ts +3 -0
- package/dist/modules/semanticfed/tools/runs.d.ts +3 -0
- package/dist/modules/semanticfed/tools/shared.d.ts +14 -0
- package/dist/modules/store/index.cjs.map +1 -1
- package/dist/modules/store/index.d.ts +2 -7
- package/dist/modules/store/index.js +1 -1
- package/dist/modules/store/operations.d.ts +15 -0
- package/dist/modules/store/tools.d.ts +3 -0
- package/dist/modules/subscriberbot/index.cjs.map +1 -1
- package/dist/modules/subscriberbot/index.d.ts +2 -7
- package/dist/modules/subscriberbot/index.js +1 -1
- package/dist/modules/subscriberbot/operations.d.ts +53 -0
- package/dist/modules/subscriberbot/prompts.d.ts +3 -0
- package/dist/modules/subscriberbot/resources.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/agents.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/assets.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/channels.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/entitlements.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/health.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/inbox.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/invoices.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/payment-instruments.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/plans.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/policies.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/providers.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/relationships.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/renewals.d.ts +3 -0
- package/dist/modules/subscriberbot/tools/shared.d.ts +21 -0
- package/dist/modules/subscriberbot/tools/workflows.d.ts +3 -0
- package/dist/modules/support/index.cjs.map +1 -1
- package/dist/modules/support/index.d.ts +2 -7
- package/dist/modules/support/index.js +1 -1
- package/dist/modules/support/operations.d.ts +7 -0
- package/dist/modules/support/tools.d.ts +3 -0
- package/dist/modules/tags/index.cjs.map +1 -1
- package/dist/modules/tags/index.d.ts +2 -7
- package/dist/modules/tags/index.js +1 -1
- package/dist/modules/tags/operations.d.ts +9 -0
- package/dist/modules/tags/tools.d.ts +3 -0
- package/dist/modules/technospam/index.cjs.map +1 -1
- package/dist/modules/technospam/index.d.ts +2 -7
- package/dist/modules/technospam/index.js +1 -1
- package/dist/modules/technospam/operations.d.ts +54 -0
- package/dist/modules/technospam/prompts.d.ts +3 -0
- package/dist/modules/technospam/resources.d.ts +3 -0
- package/dist/modules/technospam/tools/certificates.d.ts +3 -0
- package/dist/modules/technospam/tools/courses.d.ts +3 -0
- package/dist/modules/technospam/tools/enrollments.d.ts +3 -0
- package/dist/modules/technospam/tools/hackathons.d.ts +3 -0
- package/dist/modules/technospam/tools/health.d.ts +3 -0
- package/dist/modules/technospam/tools/lessons.d.ts +3 -0
- package/dist/modules/technospam/tools/mentors.d.ts +3 -0
- package/dist/modules/technospam/tools/problems.d.ts +3 -0
- package/dist/modules/technospam/tools/sessions.d.ts +3 -0
- package/dist/modules/technospam/tools/shared.d.ts +12 -0
- package/dist/modules/technospam/tools/submissions.d.ts +3 -0
- package/dist/modules/technospam/tools/teams.d.ts +3 -0
- package/dist/modules/theculturepost/index.cjs.map +1 -1
- package/dist/modules/theculturepost/index.d.ts +2 -7
- package/dist/modules/theculturepost/index.js +1 -1
- package/dist/modules/theculturepost/operations.d.ts +40 -0
- package/dist/modules/theculturepost/prompts.d.ts +3 -0
- package/dist/modules/theculturepost/resources.d.ts +3 -0
- package/dist/modules/theculturepost/tools/archive.d.ts +3 -0
- package/dist/modules/theculturepost/tools/citations.d.ts +3 -0
- package/dist/modules/theculturepost/tools/collections.d.ts +3 -0
- package/dist/modules/theculturepost/tools/discussions.d.ts +3 -0
- package/dist/modules/theculturepost/tools/oralhistories.d.ts +3 -0
- package/dist/modules/theculturepost/tools/replies.d.ts +3 -0
- package/dist/modules/theculturepost/tools/shared.d.ts +19 -0
- package/dist/modules/theculturepost/tools/stories.d.ts +3 -0
- package/dist/modules/theculturepost/tools/system.d.ts +3 -0
- package/dist/modules/theculturepost/tools/topics.d.ts +3 -0
- package/dist/modules/theglobalfuel/index.cjs.map +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +2 -7
- package/dist/modules/theglobalfuel/index.js +1 -1
- package/dist/modules/theglobalfuel/operations.d.ts +38 -0
- package/dist/modules/theglobalfuel/prompts.d.ts +3 -0
- package/dist/modules/theglobalfuel/resources.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/assets.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/compliance.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/contracts.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/emissions.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/health.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/inventory.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/production.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/reserves.d.ts +3 -0
- package/dist/modules/theglobalfuel/tools/shared.d.ts +16 -0
- package/dist/modules/theglobalfuel/tools/shipments.d.ts +3 -0
- package/dist/modules/timecampus/index.cjs +3 -1
- package/dist/modules/timecampus/index.cjs.map +1 -1
- package/dist/modules/timecampus/index.d.ts +2 -7
- package/dist/modules/timecampus/index.js +4 -2
- package/dist/modules/timecampus/index.js.map +1 -1
- package/dist/modules/timecampus/operations.d.ts +187 -0
- package/dist/modules/timecampus/prompts.d.ts +3 -0
- package/dist/modules/timecampus/resources.d.ts +3 -0
- package/dist/modules/timecampus/tools/approvals.d.ts +3 -0
- package/dist/modules/timecampus/tools/appusage.d.ts +3 -0
- package/dist/modules/timecampus/tools/channels.d.ts +3 -0
- package/dist/modules/timecampus/tools/clientportal.d.ts +3 -0
- package/dist/modules/timecampus/tools/config.d.ts +3 -0
- package/dist/modules/timecampus/tools/email.d.ts +3 -0
- package/dist/modules/timecampus/tools/expenses.d.ts +3 -0
- package/dist/modules/timecampus/tools/focus.d.ts +3 -0
- package/dist/modules/timecampus/tools/location.d.ts +3 -0
- package/dist/modules/timecampus/tools/meetings.d.ts +3 -0
- package/dist/modules/timecampus/tools/pomodoro.d.ts +3 -0
- package/dist/modules/timecampus/tools/projects.d.ts +3 -0
- package/dist/modules/timecampus/tools/resourcing.d.ts +3 -0
- package/dist/modules/timecampus/tools/shared.d.ts +23 -0
- package/dist/modules/timecampus/tools/tasks.d.ts +3 -0
- package/dist/modules/timecampus/tools/timeentries.d.ts +3 -0
- package/dist/modules/timecampus/tools/workpatterns.d.ts +3 -0
- package/dist/modules/tours/index.cjs.map +1 -1
- package/dist/modules/tours/index.d.ts +2 -7
- package/dist/modules/tours/index.js +1 -1
- package/dist/modules/tours/operations.d.ts +4 -0
- package/dist/modules/tours/tools.d.ts +3 -0
- package/dist/modules/vibecontrols/index.cjs +364 -29
- package/dist/modules/vibecontrols/index.cjs.map +1 -1
- package/dist/modules/vibecontrols/index.d.ts +2 -7
- package/dist/modules/vibecontrols/index.js +348 -29
- package/dist/modules/vibecontrols/index.js.map +1 -1
- package/dist/modules/vibecontrols/operations.d.ts +327 -0
- package/dist/modules/vibecontrols/prompts.d.ts +3 -0
- package/dist/modules/vibecontrols/resources.d.ts +3 -0
- package/dist/modules/vibecontrols/tool-annotations.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/actions.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/agents.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/ai-events.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/ai-prompts.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/analytics.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/audit.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/catalogs.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/components.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/config-ci.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/config-gitops.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/config-security.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/config-settings.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/configuration.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/docs.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/notes.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/sandboxes.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/scorecards.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/session-sharing.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/sessions.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/targets.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/templates.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/tunnels.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/ui-session.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/vibedeck-share-links.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/vibedecks.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/vibes.d.ts +3 -0
- package/dist/modules/vibecontrols/tools/webhooks.d.ts +3 -0
- package/dist/modules/workspaces/index.cjs.map +1 -1
- package/dist/modules/workspaces/index.d.ts +2 -7
- package/dist/modules/workspaces/index.js +1 -1
- package/dist/modules/workspaces/operations.d.ts +14 -0
- package/dist/modules/workspaces/tools.d.ts +3 -0
- package/dist/transports/http.d.ts +14 -0
- package/dist/transports/index.d.ts +3 -13
- package/dist/transports/security.d.ts +6 -0
- package/dist/transports/stdio.d.ts +6 -0
- package/package.json +2 -2
- package/dist/chunk-G76DKEPI.js.map +0 -1
- package/dist/context-DGO4h-Pd.d.cts +0 -139
- package/dist/context-DGO4h-Pd.d.ts +0 -139
- package/dist/core/index.d.cts +0 -59
- package/dist/http-Wj1WM6ji.d.ts +0 -22
- package/dist/http-uAT9KeBa.d.cts +0 -22
- package/dist/index.d.cts +0 -7
- package/dist/module-CfnM2XHg.d.cts +0 -67
- package/dist/module-VpgjAf8m.d.ts +0 -67
- package/dist/modules/adaptercloud/index.d.cts +0 -8
- package/dist/modules/artistrybase/index.d.cts +0 -8
- package/dist/modules/assethandler/index.d.cts +0 -8
- package/dist/modules/atheletebridge/index.d.cts +0 -8
- package/dist/modules/billing/index.d.cts +0 -8
- package/dist/modules/brainyrich/index.d.cts +0 -8
- package/dist/modules/buildmyiq/index.d.cts +0 -8
- package/dist/modules/channels/index.d.cts +0 -8
- package/dist/modules/collabkin/index.d.cts +0 -8
- package/dist/modules/comradecircle/index.d.cts +0 -8
- package/dist/modules/conversations/index.d.cts +0 -8
- package/dist/modules/coolandlovely/index.d.cts +0 -8
- package/dist/modules/cosmicintersection/index.d.cts +0 -8
- package/dist/modules/crewfoundry/index.d.cts +0 -8
- package/dist/modules/devportal/index.d.cts +0 -8
- package/dist/modules/ecoimpacthub/index.d.cts +0 -8
- package/dist/modules/eventfullymanaged/index.d.cts +0 -8
- package/dist/modules/export/index.d.cts +0 -8
- package/dist/modules/files/index.d.cts +0 -8
- package/dist/modules/fluidgrids/index.d.cts +0 -8
- package/dist/modules/ggnomad/index.d.cts +0 -8
- package/dist/modules/govcitizenhub/index.d.cts +0 -8
- package/dist/modules/groups/index.d.cts +0 -8
- package/dist/modules/headshotmarketing/index.d.cts +0 -8
- package/dist/modules/health/index.d.cts +0 -8
- package/dist/modules/healthybowl/index.d.cts +0 -8
- package/dist/modules/hookmovies/index.d.cts +0 -8
- package/dist/modules/housingvista/index.d.cts +0 -8
- package/dist/modules/integrations/index.d.cts +0 -8
- package/dist/modules/intelwatchtower/index.d.cts +0 -8
- package/dist/modules/kadaikodi/index.d.cts +0 -8
- package/dist/modules/labsofscience/index.d.cts +0 -8
- package/dist/modules/manufacturedops/index.d.cts +0 -8
- package/dist/modules/movethewheels/index.d.cts +0 -8
- package/dist/modules/mybodyshield/index.d.cts +0 -8
- package/dist/modules/notifications/index.d.cts +0 -8
- package/dist/modules/organizations/index.d.cts +0 -8
- package/dist/modules/planmagnet/index.d.cts +0 -8
- package/dist/modules/products/index.d.cts +0 -8
- package/dist/modules/proserviceworld/index.d.cts +0 -8
- package/dist/modules/rbac/index.d.cts +0 -8
- package/dist/modules/sandbox/index.d.cts +0 -8
- package/dist/modules/scheduler/index.d.cts +0 -8
- package/dist/modules/security/index.d.cts +0 -8
- package/dist/modules/semanticfed/index.d.cts +0 -8
- package/dist/modules/store/index.d.cts +0 -8
- package/dist/modules/subscriberbot/index.d.cts +0 -8
- package/dist/modules/support/index.d.cts +0 -8
- package/dist/modules/tags/index.d.cts +0 -8
- package/dist/modules/technospam/index.d.cts +0 -8
- package/dist/modules/theculturepost/index.d.cts +0 -8
- package/dist/modules/theglobalfuel/index.d.cts +0 -8
- package/dist/modules/timecampus/index.d.cts +0 -8
- package/dist/modules/tours/index.d.cts +0 -8
- package/dist/modules/vibecontrols/index.d.cts +0 -8
- package/dist/modules/workspaces/index.d.cts +0 -8
- package/dist/tool-name-BFdQwYrv.d.ts +0 -63
- package/dist/tool-name-DzP7TA0l.d.cts +0 -63
- package/dist/transports/index.d.cts +0 -13
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
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 mybodyshieldModule: McpModule;
|
|
7
|
-
|
|
8
|
-
export { mybodyshieldModule as default };
|
|
3
|
+
export default mybodyshieldModule;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mcpToolName, errorResult, jsonResult, mcpResourceUri, mcpPromptName } from '../../chunk-
|
|
1
|
+
import { mcpToolName, errorResult, jsonResult, mcpResourceUri, mcpPromptName } from '../../chunk-FHXCNP2U.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
// src/modules/mybodyshield/operations.ts
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const PAGE_INFO_FIELDS = "\n cursor hasMore\n";
|
|
2
|
+
export declare const EXERCISE_FIELDS = "\n id workoutId name instructions muscleGroup sets reps restSeconds targetWeight\n orderIndex demo { id } createdAt updatedAt workspaceId\n";
|
|
3
|
+
export declare const WORKOUT_FIELDS = "\n id programId name description type dayOfWeek weekNumber durationMin orderIndex\n createdAt updatedAt workspaceId\n";
|
|
4
|
+
export declare const PROGRAM_FIELDS = "\n id name description goalType level phase status memberId coachId daysPerWeek\n weeks startDate endDate tags createdAt updatedAt workspaceId\n";
|
|
5
|
+
export declare const SESSION_SET_FIELDS = "\n id sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt workspaceId\n";
|
|
6
|
+
export declare const SESSION_FIELDS = "\n id memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt workspaceId\n";
|
|
7
|
+
export declare const MEAL_FIELDS = "\n id name memberId planId mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt createdAt updatedAt workspaceId\n";
|
|
8
|
+
export declare const NUTRITION_PLAN_FIELDS = "\n id name memberId coachId goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt workspaceId\n";
|
|
9
|
+
export declare const DAILY_MACROS_FIELDS = "\n date calories calorieTarget proteinG proteinTarget carbsG carbsTarget\n fatG fatTarget\n";
|
|
10
|
+
export declare const GOAL_FIELDS = "\n id title description type status memberId baselineValue currentValue\n targetValue unit targetDate achievedAt createdAt updatedAt workspaceId\n";
|
|
11
|
+
export declare const BODY_METRIC_FIELDS = "\n id memberId type value unit measuredAt notes photo { id }\n createdAt updatedAt workspaceId\n";
|
|
12
|
+
export declare const RECOVERY_FIELDS = "\n id memberId metric score sleepHours notes loggedAt createdAt updatedAt workspaceId\n";
|
|
13
|
+
export declare const COACHING_FIELDS = "\n id coachId memberId status specialty shareWorkouts shareNutrition shareMetrics\n notes startedAt endedAt createdAt updatedAt workspaceId\n";
|
|
14
|
+
export declare const GET_PROGRAM = "\n query MybodyshieldGetProgram($id: ID!) {\n mybProgram(id: $id) {\n \n id name description goalType level phase status memberId coachId daysPerWeek\n weeks startDate endDate tags createdAt updatedAt workspaceId\n\n workouts {\n \n id programId name description type dayOfWeek weekNumber durationMin orderIndex\n createdAt updatedAt workspaceId\n\n exercises { \n id workoutId name instructions muscleGroup sets reps restSeconds targetWeight\n orderIndex demo { id } createdAt updatedAt workspaceId\n }\n }\n }\n }\n";
|
|
15
|
+
export declare const LIST_PROGRAMS = "\n query MybodyshieldListPrograms(\n $memberId: ID\n $status: MybProgramStatus\n $pagination: PaginationInput\n ) {\n mybListPrograms(memberId: $memberId, status: $status, pagination: $pagination) {\n items { \n id name description goalType level phase status memberId coachId daysPerWeek\n weeks startDate endDate tags createdAt updatedAt workspaceId\n }\n pageInfo { \n cursor hasMore\n }\n }\n }\n";
|
|
16
|
+
export declare const CREATE_PROGRAM = "\n mutation MybodyshieldCreateProgram($input: MybCreateProgramInput!) {\n mybCreateProgram(input: $input) { \n id name description goalType level phase status memberId coachId daysPerWeek\n weeks startDate endDate tags createdAt updatedAt workspaceId\n }\n }\n";
|
|
17
|
+
export declare const UPDATE_PROGRAM = "\n mutation MybodyshieldUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {\n mybUpdateProgram(id: $id, input: $input) { \n id name description goalType level phase status memberId coachId daysPerWeek\n weeks startDate endDate tags createdAt updatedAt workspaceId\n }\n }\n";
|
|
18
|
+
export declare const TRANSITION_PROGRAM = "\n mutation MybodyshieldTransitionProgram($id: ID!, $status: MybProgramStatus!) {\n mybTransitionProgram(id: $id, status: $status) { \n id name description goalType level phase status memberId coachId daysPerWeek\n weeks startDate endDate tags createdAt updatedAt workspaceId\n }\n }\n";
|
|
19
|
+
export declare const ARCHIVE_PROGRAM = "\n mutation MybodyshieldArchiveProgram($id: ID!) {\n mybArchiveProgram(id: $id)\n }\n";
|
|
20
|
+
export declare const LIST_PROGRAM_WORKOUTS = "\n query MybodyshieldListProgramWorkouts($programId: ID!) {\n mybProgramWorkouts(programId: $programId) {\n \n id programId name description type dayOfWeek weekNumber durationMin orderIndex\n createdAt updatedAt workspaceId\n\n exercises { \n id workoutId name instructions muscleGroup sets reps restSeconds targetWeight\n orderIndex demo { id } createdAt updatedAt workspaceId\n }\n }\n }\n";
|
|
21
|
+
export declare const ADD_WORKOUT = "\n mutation MybodyshieldAddWorkout($input: MybCreateWorkoutInput!) {\n mybAddWorkout(input: $input) { \n id programId name description type dayOfWeek weekNumber durationMin orderIndex\n createdAt updatedAt workspaceId\n }\n }\n";
|
|
22
|
+
export declare const ADD_EXERCISE = "\n mutation MybodyshieldAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { \n id workoutId name instructions muscleGroup sets reps restSeconds targetWeight\n orderIndex demo { id } createdAt updatedAt workspaceId\n }\n }\n";
|
|
23
|
+
export declare const GET_SESSION = "\n query MybodyshieldGetSession($id: ID!) {\n mybSession(id: $id) {\n \n id memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt workspaceId\n\n sets { \n id sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt workspaceId\n }\n }\n }\n";
|
|
24
|
+
export declare const LIST_SESSIONS = "\n query MybodyshieldListSessions(\n $programId: ID\n $status: MybSessionStatus\n $pagination: PaginationInput\n ) {\n mybListSessions(programId: $programId, status: $status, pagination: $pagination) {\n items {\n \n id memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt workspaceId\n\n sets { \n id sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt workspaceId\n }\n }\n pageInfo { \n cursor hasMore\n }\n }\n }\n";
|
|
25
|
+
export declare const START_SESSION = "\n mutation MybodyshieldStartSession($input: MybStartSessionInput!) {\n mybStartSession(input: $input) {\n \n id memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt workspaceId\n\n sets { \n id sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt workspaceId\n }\n }\n }\n";
|
|
26
|
+
export declare const COMPLETE_SESSION = "\n mutation MybodyshieldCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {\n mybCompleteSession(id: $id, input: $input) {\n \n id memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt workspaceId\n\n sets { \n id sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt workspaceId\n }\n }\n }\n";
|
|
27
|
+
export declare const LOG_SET = "\n mutation MybodyshieldLogSet($input: MybLogSetInput!) {\n mybLogSet(input: $input) { \n id sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt workspaceId\n }\n }\n";
|
|
28
|
+
export declare const GET_NUTRITION_PLAN = "\n query MybodyshieldGetNutritionPlan($id: ID!) {\n mybNutritionPlan(id: $id) {\n \n id name memberId coachId goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt workspaceId\n\n meals { \n id name memberId planId mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt createdAt updatedAt workspaceId\n }\n }\n }\n";
|
|
29
|
+
export declare const ACTIVE_NUTRITION_PLAN = "\n query MybodyshieldActiveNutritionPlan($memberId: ID) {\n mybActiveNutritionPlan(memberId: $memberId) {\n \n id name memberId coachId goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt workspaceId\n\n meals { \n id name memberId planId mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt createdAt updatedAt workspaceId\n }\n }\n }\n";
|
|
30
|
+
export declare const CREATE_NUTRITION_PLAN = "\n mutation MybodyshieldCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {\n mybCreateNutritionPlan(input: $input) { \n id name memberId coachId goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt workspaceId\n }\n }\n";
|
|
31
|
+
export declare const UPDATE_NUTRITION_PLAN = "\n mutation MybodyshieldUpdateNutritionPlan(\n $id: ID!\n $input: MybUpdateNutritionPlanInput!\n ) {\n mybUpdateNutritionPlan(id: $id, input: $input) { \n id name memberId coachId goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt workspaceId\n }\n }\n";
|
|
32
|
+
export declare const ACTIVATE_NUTRITION_PLAN = "\n mutation MybodyshieldActivateNutritionPlan($id: ID!) {\n mybActivateNutritionPlan(id: $id) { \n id name memberId coachId goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt workspaceId\n }\n }\n";
|
|
33
|
+
export declare const DAILY_MACROS = "\n query MybodyshieldDailyMacros($memberId: ID, $date: DateTime) {\n mybDailyMacros(memberId: $memberId, date: $date) { \n date calories calorieTarget proteinG proteinTarget carbsG carbsTarget\n fatG fatTarget\n }\n }\n";
|
|
34
|
+
export declare const LIST_MEALS = "\n query MybodyshieldListMeals(\n $planId: ID\n $mealType: MybMealType\n $pagination: PaginationInput\n ) {\n mybListMeals(planId: $planId, mealType: $mealType, pagination: $pagination) {\n items { \n id name memberId planId mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt createdAt updatedAt workspaceId\n }\n pageInfo { \n cursor hasMore\n }\n }\n }\n";
|
|
35
|
+
export declare const LOG_MEAL = "\n mutation MybodyshieldLogMeal($input: MybLogMealInput!) {\n mybLogMeal(input: $input) { \n id name memberId planId mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
36
|
+
export declare const DELETE_MEAL = "\n mutation MybodyshieldDeleteMeal($id: ID!) {\n mybDeleteMeal(id: $id)\n }\n";
|
|
37
|
+
export declare const GET_GOAL = "\n query MybodyshieldGetGoal($id: ID!) {\n mybGoal(id: $id) { \n id title description type status memberId baselineValue currentValue\n targetValue unit targetDate achievedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
38
|
+
export declare const LIST_GOALS = "\n query MybodyshieldListGoals(\n $memberId: ID\n $status: MybGoalStatus\n $pagination: PaginationInput\n ) {\n mybListGoals(memberId: $memberId, status: $status, pagination: $pagination) {\n items { \n id title description type status memberId baselineValue currentValue\n targetValue unit targetDate achievedAt createdAt updatedAt workspaceId\n }\n pageInfo { \n cursor hasMore\n }\n }\n }\n";
|
|
39
|
+
export declare const CREATE_GOAL = "\n mutation MybodyshieldCreateGoal($input: MybCreateGoalInput!) {\n mybCreateGoal(input: $input) { \n id title description type status memberId baselineValue currentValue\n targetValue unit targetDate achievedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
40
|
+
export declare const UPDATE_GOAL = "\n mutation MybodyshieldUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {\n mybUpdateGoal(id: $id, input: $input) { \n id title description type status memberId baselineValue currentValue\n targetValue unit targetDate achievedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
41
|
+
export declare const ACHIEVE_GOAL = "\n mutation MybodyshieldAchieveGoal($id: ID!) {\n mybAchieveGoal(id: $id) { \n id title description type status memberId baselineValue currentValue\n targetValue unit targetDate achievedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
42
|
+
export declare const LIST_BODY_METRICS = "\n query MybodyshieldListBodyMetrics(\n $memberId: ID\n $type: MybBodyMetricType\n $pagination: PaginationInput\n ) {\n mybListBodyMetrics(memberId: $memberId, type: $type, pagination: $pagination) {\n items { \n id memberId type value unit measuredAt notes photo { id }\n createdAt updatedAt workspaceId\n }\n pageInfo { \n cursor hasMore\n }\n }\n }\n";
|
|
43
|
+
export declare const RECORD_BODY_METRIC = "\n mutation MybodyshieldRecordBodyMetric($input: MybRecordMetricInput!) {\n mybRecordBodyMetric(input: $input) { \n id memberId type value unit measuredAt notes photo { id }\n createdAt updatedAt workspaceId\n }\n }\n";
|
|
44
|
+
export declare const LIST_RECOVERY_LOGS = "\n query MybodyshieldListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric) {\n mybListRecoveryLogs(memberId: $memberId, metric: $metric) { \n id memberId metric score sleepHours notes loggedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
45
|
+
export declare const LOG_RECOVERY = "\n mutation MybodyshieldLogRecovery($input: MybLogRecoveryInput!) {\n mybLogRecovery(input: $input) { \n id memberId metric score sleepHours notes loggedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
46
|
+
export declare const LIST_COACHING = "\n query MybodyshieldListCoaching($memberId: ID, $status: MybCoachingStatus) {\n mybListCoaching(memberId: $memberId, status: $status) { \n id coachId memberId status specialty shareWorkouts shareNutrition shareMetrics\n notes startedAt endedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
47
|
+
export declare const CREATE_COACHING = "\n mutation MybodyshieldCreateCoaching($input: MybCreateCoachingInput!) {\n mybCreateCoaching(input: $input) { \n id coachId memberId status specialty shareWorkouts shareNutrition shareMetrics\n notes startedAt endedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
48
|
+
export declare const TRANSITION_COACHING = "\n mutation MybodyshieldTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {\n mybTransitionCoaching(id: $id, status: $status) { \n id coachId memberId status specialty shareWorkouts shareNutrition shareMetrics\n notes startedAt endedAt createdAt updatedAt workspaceId\n }\n }\n";
|
|
49
|
+
export declare const HEALTH = "\n query MybodyshieldHealth {\n mybHealth\n }\n";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GoalTypeEnum: z.ZodEnum<["ENDURANCE", "GENERAL_FITNESS", "MOBILITY", "MUSCLE_GAIN", "STRENGTH", "WEIGHT_LOSS"]>;
|
|
3
|
+
export declare const GoalStatusEnum: z.ZodEnum<["ABANDONED", "ACHIEVED", "ACTIVE", "PAUSED"]>;
|
|
4
|
+
export declare const FitnessLevelEnum: z.ZodEnum<["ADVANCED", "BEGINNER", "ELITE", "INTERMEDIATE"]>;
|
|
5
|
+
export declare const ProgramPhaseEnum: z.ZodEnum<["BUILD", "DELOAD", "MAINTENANCE", "PEAK"]>;
|
|
6
|
+
export declare const ProgramStatusEnum: z.ZodEnum<["ACTIVE", "ARCHIVED", "COMPLETED", "DRAFT"]>;
|
|
7
|
+
export declare const WorkoutTypeEnum: z.ZodEnum<["CARDIO", "HIIT", "MOBILITY", "RECOVERY", "STRENGTH", "YOGA"]>;
|
|
8
|
+
export declare const MuscleGroupEnum: z.ZodEnum<["ARMS", "BACK", "CHEST", "CORE", "FULL_BODY", "LEGS", "SHOULDERS"]>;
|
|
9
|
+
export declare const SessionStatusEnum: z.ZodEnum<["COMPLETED", "IN_PROGRESS", "SCHEDULED", "SKIPPED"]>;
|
|
10
|
+
export declare const MealTypeEnum: z.ZodEnum<["BREAKFAST", "DINNER", "LUNCH", "SNACK"]>;
|
|
11
|
+
export declare const BodyMetricTypeEnum: z.ZodEnum<["ARM", "BODY_FAT", "CHEST", "HIPS", "RESTING_HEART_RATE", "THIGH", "WAIST", "WEIGHT"]>;
|
|
12
|
+
export declare const RecoveryMetricEnum: z.ZodEnum<["MOOD", "READINESS", "SLEEP", "SORENESS", "STRESS"]>;
|
|
13
|
+
export declare const CoachingStatusEnum: z.ZodEnum<["ACTIVE", "ENDED", "PAUSED", "PENDING"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/notifications/operations.ts","../../../src/modules/notifications/tools.ts","../../../src/modules/notifications/index.ts"],"names":["z"],"mappings":";;;;;;;;;;;AA8BO,IAAM,gBAAA,GAAN,cAA+B,KAAA,CAAM;AAAA,EACjB,KAAA;AAAA,EAEzB,WAA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CAAA;AAEA,IAAO,qBAAA,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_NOTIFICATIONS = `\n query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {\n notifications(filter: $filter, limit: $limit, offset: $offset) {\n items { id title message channel status isRead createdAt }\n total\n }\n }\n`;\n\nexport const MARK_NOTIFICATION_READ = `\n mutation MarkNotificationRead($id: ID!) {\n markNotificationAsRead(id: $id) {\n id isRead readAt\n }\n }\n`;\n\nexport const NOTIFICATION_PREFERENCES = `\n query NotificationPreferences($filter: NotificationPreferenceFilterInput, $limit: Int) {\n notificationPreferences(filter: $filter, limit: $limit) {\n items { id channel enabled frequency scope topicId userId }\n }\n }\n`;\n\nexport const CREATE_NOTIFICATION_PREFERENCE = `\n mutation CreateNotificationPreference($input: CreateNotificationPreferenceInput!) {\n createNotificationPreference(input: $input) {\n id channel enabled frequency\n }\n }\n`;\n","/**\n * Notifications MCP tools — notification inbox & preferences.\n * Surface mirrors cli-sdk/src/modules/notifications/commands.ts.\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../core/index.js';\nimport * as ops from './operations.js';\n\ninterface NotificationRow {\n id: string;\n title?: string;\n message?: string;\n channel?: string;\n status?: string;\n isRead?: boolean;\n createdAt?: string;\n}\n\ninterface PreferenceRow {\n id: string;\n channel: string;\n enabled: boolean;\n frequency?: string;\n scope?: string;\n topicId?: string;\n userId?: string;\n}\n\nexport function registerNotificationsTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'notifications_list')),\n {\n title: 'List Notifications',\n description: \"List the current user's notifications with optional filters.\",\n inputSchema: {\n unread: z.boolean().optional().describe('Only unread notifications'),\n channel: z.string().optional().describe('Filter by channel (will be uppercased)'),\n limit: z.number().optional().describe('Page size (default 50)'),\n },\n },\n async ({ unread, channel, limit }) => {\n try {\n const filter: Record<string, unknown> = {};\n if (unread === true) filter.isRead = false;\n if (channel !== undefined) filter.channel = channel.toUpperCase();\n const data = await ctx.gql.global.request<{\n notifications: { items: NotificationRow[]; total: number };\n }>(ops.LIST_NOTIFICATIONS, {\n filter: Object.keys(filter).length ? filter : undefined,\n limit: limit ?? 50,\n offset: 0,\n });\n return jsonResult(data.notifications);\n } catch (error) {\n ctx.logger.error('notifications_list failed', { error: String(error) });\n return errorResult(\n `Failed to list notifications: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'notifications_read')),\n {\n title: 'Mark Notification Read',\n description: 'Mark a notification as read.',\n inputSchema: { id: z.string().describe('Notification ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.global.request<{\n markNotificationAsRead: { id: string; isRead: boolean; readAt?: string };\n }>(ops.MARK_NOTIFICATION_READ, { id });\n return jsonResult(data.markNotificationAsRead);\n } catch (error) {\n ctx.logger.error('notifications_read failed', { error: String(error) });\n return errorResult(\n `Failed to mark notification read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'notifications_preferences_get')),\n {\n title: 'Get Notification Preferences',\n description: \"Show the current user's notification preferences.\",\n inputSchema: {\n user: z.string().optional().describe('Override user ID'),\n limit: z.number().optional().describe('Page size (default 100)'),\n },\n },\n async ({ user, limit }) => {\n try {\n const auth = ctx.auth.read();\n const userId = user ?? auth?.workspaceId ?? '';\n const filter: Record<string, unknown> = userId ? { userId } : {};\n const data = await ctx.gql.global.request<{\n notificationPreferences: { items: PreferenceRow[] };\n }>(ops.NOTIFICATION_PREFERENCES, {\n filter: Object.keys(filter).length ? filter : undefined,\n limit: limit ?? 100,\n });\n return jsonResult(data.notificationPreferences);\n } catch (error) {\n ctx.logger.error('notifications_preferences_get failed', { error: String(error) });\n return errorResult(\n `Failed to get notification preferences: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'notifications_preferences_set')),\n {\n title: 'Set Notification Preference',\n description: 'Create/update a notification preference.',\n inputSchema: {\n channel: z.string().describe('EMAIL|SMS|IN_APP|PUSH|WEBHOOK (will be uppercased)'),\n enabled: z.boolean().describe('Whether the channel is enabled'),\n frequency: z\n .string()\n .optional()\n .describe('IMMEDIATE|HOURLY|DAILY|WEEKLY (default IMMEDIATE)'),\n scope: z.string().optional().describe('GLOBAL|WORKSPACE|VIBE (default GLOBAL)'),\n topic: z.string().optional().describe('Topic ID'),\n user: z.string().optional().describe('Override user ID'),\n },\n },\n async ({ channel, enabled, frequency, scope, topic, user }) => {\n try {\n const auth = ctx.auth.read();\n const input: Record<string, unknown> = {\n channel: channel.toUpperCase(),\n enabled,\n frequency: (frequency ?? 'IMMEDIATE').toUpperCase(),\n scope: (scope ?? 'GLOBAL').toUpperCase(),\n };\n if (topic !== undefined) input.topicId = topic;\n const userId = user ?? auth?.workspaceId;\n if (userId !== undefined) input.userId = userId;\n const data = await ctx.gql.global.request<{\n createNotificationPreference: PreferenceRow;\n }>(ops.CREATE_NOTIFICATION_PREFERENCE, { input });\n return jsonResult(data.createNotificationPreference);\n } catch (error) {\n ctx.logger.error('notifications_preferences_set failed', { error: String(error) });\n return errorResult(\n `Failed to set notification preference: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Notifications module — notification inbox + preferences (global gateway).\n * Surface mirrors cli-sdk/src/modules/notifications/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerNotificationsTools } from './tools.js';\n\nconst notificationsModule: McpModule = {\n id: 'notifications',\n version: '0.0.1',\n displayName: 'Notifications',\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 registerNotificationsTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default notificationsModule;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/notifications/operations.ts","../../../src/modules/notifications/tools.ts","../../../src/modules/notifications/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,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AAO,MAAM,sCAAA,EAAwC,EAAE,OAAO,MAAA,CAAO,KAAK,GAAG,CAAA;AACjF,QAAA,OAAO,WAAA;AAAA,UACL,0CAA0C,KAAA,YAAiB,KAAA,GAAQ,MAAM,OAAA,GAAU,MAAA,CAAO,KAAK,CAAC,CAAA;AAAA,SAClG;AAAA,MACF;AAAA,IACF;AAAA,GACF;AACF;;;ACzJA,IAAM,mBAAA,GAAiC;AAAA,EACrC,EAAA,EAAI,eAAA;AAAA,EACJ,OAAA,EAAS,OAAA;AAAA,EACT,WAAA,EAAa,eAAA;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,0BAAA,CAA2B,MAAA,EAAQ,KAAK,KAAK,CAAA;AAE7C,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,qBAAA,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_NOTIFICATIONS = `\n query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {\n notifications(filter: $filter, limit: $limit, offset: $offset) {\n items { id title message channel status isRead createdAt }\n total\n }\n }\n`;\n\nexport const MARK_NOTIFICATION_READ = `\n mutation MarkNotificationRead($id: ID!) {\n markNotificationAsRead(id: $id) {\n id isRead readAt\n }\n }\n`;\n\nexport const NOTIFICATION_PREFERENCES = `\n query NotificationPreferences($filter: NotificationPreferenceFilterInput, $limit: Int) {\n notificationPreferences(filter: $filter, limit: $limit) {\n items { id channel enabled frequency scope topicId userId }\n }\n }\n`;\n\nexport const CREATE_NOTIFICATION_PREFERENCE = `\n mutation CreateNotificationPreference($input: CreateNotificationPreferenceInput!) {\n createNotificationPreference(input: $input) {\n id channel enabled frequency\n }\n }\n`;\n","/**\n * Notifications MCP tools — notification inbox & preferences.\n * Surface mirrors cli-sdk/src/modules/notifications/commands.ts.\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../core/index.js';\nimport * as ops from './operations.js';\n\ninterface NotificationRow {\n id: string;\n title?: string;\n message?: string;\n channel?: string;\n status?: string;\n isRead?: boolean;\n createdAt?: string;\n}\n\ninterface PreferenceRow {\n id: string;\n channel: string;\n enabled: boolean;\n frequency?: string;\n scope?: string;\n topicId?: string;\n userId?: string;\n}\n\nexport function registerNotificationsTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'notifications_list')),\n {\n title: 'List Notifications',\n description: \"List the current user's notifications with optional filters.\",\n inputSchema: {\n unread: z.boolean().optional().describe('Only unread notifications'),\n channel: z.string().optional().describe('Filter by channel (will be uppercased)'),\n limit: z.number().optional().describe('Page size (default 50)'),\n },\n },\n async ({ unread, channel, limit }) => {\n try {\n const filter: Record<string, unknown> = {};\n if (unread === true) filter.isRead = false;\n if (channel !== undefined) filter.channel = channel.toUpperCase();\n const data = await ctx.gql.global.request<{\n notifications: { items: NotificationRow[]; total: number };\n }>(ops.LIST_NOTIFICATIONS, {\n filter: Object.keys(filter).length ? filter : undefined,\n limit: limit ?? 50,\n offset: 0,\n });\n return jsonResult(data.notifications);\n } catch (error) {\n ctx.logger.error('notifications_list failed', { error: String(error) });\n return errorResult(\n `Failed to list notifications: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'notifications_read')),\n {\n title: 'Mark Notification Read',\n description: 'Mark a notification as read.',\n inputSchema: { id: z.string().describe('Notification ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.global.request<{\n markNotificationAsRead: { id: string; isRead: boolean; readAt?: string };\n }>(ops.MARK_NOTIFICATION_READ, { id });\n return jsonResult(data.markNotificationAsRead);\n } catch (error) {\n ctx.logger.error('notifications_read failed', { error: String(error) });\n return errorResult(\n `Failed to mark notification read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'notifications_preferences_get')),\n {\n title: 'Get Notification Preferences',\n description: \"Show the current user's notification preferences.\",\n inputSchema: {\n user: z.string().optional().describe('Override user ID'),\n limit: z.number().optional().describe('Page size (default 100)'),\n },\n },\n async ({ user, limit }) => {\n try {\n const auth = ctx.auth.read();\n const userId = user ?? auth?.workspaceId ?? '';\n const filter: Record<string, unknown> = userId ? { userId } : {};\n const data = await ctx.gql.global.request<{\n notificationPreferences: { items: PreferenceRow[] };\n }>(ops.NOTIFICATION_PREFERENCES, {\n filter: Object.keys(filter).length ? filter : undefined,\n limit: limit ?? 100,\n });\n return jsonResult(data.notificationPreferences);\n } catch (error) {\n ctx.logger.error('notifications_preferences_get failed', { error: String(error) });\n return errorResult(\n `Failed to get notification preferences: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'notifications_preferences_set')),\n {\n title: 'Set Notification Preference',\n description: 'Create/update a notification preference.',\n inputSchema: {\n channel: z.string().describe('EMAIL|SMS|IN_APP|PUSH|WEBHOOK (will be uppercased)'),\n enabled: z.boolean().describe('Whether the channel is enabled'),\n frequency: z\n .string()\n .optional()\n .describe('IMMEDIATE|HOURLY|DAILY|WEEKLY (default IMMEDIATE)'),\n scope: z.string().optional().describe('GLOBAL|WORKSPACE|VIBE (default GLOBAL)'),\n topic: z.string().optional().describe('Topic ID'),\n user: z.string().optional().describe('Override user ID'),\n },\n },\n async ({ channel, enabled, frequency, scope, topic, user }) => {\n try {\n const auth = ctx.auth.read();\n const input: Record<string, unknown> = {\n channel: channel.toUpperCase(),\n enabled,\n frequency: (frequency ?? 'IMMEDIATE').toUpperCase(),\n scope: (scope ?? 'GLOBAL').toUpperCase(),\n };\n if (topic !== undefined) input.topicId = topic;\n const userId = user ?? auth?.workspaceId;\n if (userId !== undefined) input.userId = userId;\n const data = await ctx.gql.global.request<{\n createNotificationPreference: PreferenceRow;\n }>(ops.CREATE_NOTIFICATION_PREFERENCE, { input });\n return jsonResult(data.createNotificationPreference);\n } catch (error) {\n ctx.logger.error('notifications_preferences_set failed', { error: String(error) });\n return errorResult(\n `Failed to set notification preference: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Notifications module — notification inbox + preferences (global gateway).\n * Surface mirrors cli-sdk/src/modules/notifications/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerNotificationsTools } from './tools.js';\n\nconst notificationsModule: McpModule = {\n id: 'notifications',\n version: '0.0.1',\n displayName: 'Notifications',\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 registerNotificationsTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default notificationsModule;\n"]}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
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 notificationsModule: McpModule;
|
|
7
|
-
|
|
8
|
-
export { notificationsModule as default };
|
|
3
|
+
export default notificationsModule;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const LIST_NOTIFICATIONS = "\n query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {\n notifications(filter: $filter, limit: $limit, offset: $offset) {\n items { id title message channel status isRead createdAt }\n total\n }\n }\n";
|
|
2
|
+
export declare const MARK_NOTIFICATION_READ = "\n mutation MarkNotificationRead($id: ID!) {\n markNotificationAsRead(id: $id) {\n id isRead readAt\n }\n }\n";
|
|
3
|
+
export declare const NOTIFICATION_PREFERENCES = "\n query NotificationPreferences($filter: NotificationPreferenceFilterInput, $limit: Int) {\n notificationPreferences(filter: $filter, limit: $limit) {\n items { id channel enabled frequency scope topicId userId }\n }\n }\n";
|
|
4
|
+
export declare const CREATE_NOTIFICATION_PREFERENCE = "\n mutation CreateNotificationPreference($input: CreateNotificationPreferenceInput!) {\n createNotificationPreference(input: $input) {\n id channel enabled frequency\n }\n }\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/organizations/operations.ts","../../../src/modules/organizations/tools.ts","../../../src/modules/organizations/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,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O,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,qBAAA,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 MY_ORGANIZATIONS = `\n query MyOrganizations($limit: Int, $offset: Int) {\n myOrganizations(limit: $limit, offset: $offset) {\n items {\n id\n name\n slug\n tenantId\n description\n status\n createdAt\n updatedAt\n }\n total\n hasMore\n }\n }\n`;\n\nexport const MY_ORGANIZATION_INVITES = `\n query MyOrganizationInvites($status: InviteStatus, $limit: Int, $offset: Int) {\n myOrganizationInvites(status: $status, limit: $limit, offset: $offset) {\n items {\n id\n organizationId\n email\n role\n status\n expiresAt\n message\n createdAt\n }\n total\n hasMore\n }\n }\n`;\n\nexport const ACCEPT_ORG_INVITE = `\n mutation AcceptOrganizationInvite($inviteId: ID!) {\n acceptOrganizationInvite(inviteId: $inviteId) {\n id\n userId\n organizationId\n role\n joinedAt\n }\n }\n`;\n\nexport const REJECT_ORG_INVITE = `\n mutation RejectOrganizationInvite($inviteId: ID!) {\n rejectOrganizationInvite(inviteId: $inviteId) {\n id\n status\n respondedAt\n }\n }\n`;\n\nexport const GET_ORG = `\n query Organization($id: ID!) {\n organization(id: $id) {\n id\n tenantId\n name\n slug\n description\n status\n memberCount\n workspaceCount\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const LIST_ORG_MEMBERS = `\n query OrganizationMembers($organizationId: String!, $limit: Int, $offset: Int) {\n organizationMembers(organizationId: $organizationId, limit: $limit, offset: $offset) {\n items {\n id\n organizationId\n userId\n role\n joinedAt\n invitedBy\n }\n total\n hasMore\n limit\n offset\n }\n }\n`;\n\nexport const INVITE_ORG_MEMBER = `\n mutation InviteOrganizationMember($input: InviteOrganizationMemberInput!) {\n inviteOrganizationMember(input: $input) {\n id\n organizationId\n email\n role\n status\n invitedBy\n expiresAt\n createdAt\n }\n }\n`;\n\nexport const REMOVE_ORG_MEMBER = `\n mutation RemoveOrganizationMember($organizationId: String!, $userId: String!) {\n removeOrganizationMember(organizationId: $organizationId, userId: $userId)\n }\n`;\n\nexport const UPDATE_ORG_MEMBER_ROLE = `\n mutation UpdateOrganizationMember(\n $organizationId: String!\n $userId: String!\n $input: UpdateOrganizationMemberInput!\n ) {\n updateOrganizationMember(\n organizationId: $organizationId\n userId: $userId\n input: $input\n ) {\n id\n organizationId\n userId\n role\n joinedAt\n invitedBy\n }\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 MY_ORGANIZATIONS,\n MY_ORGANIZATION_INVITES,\n ACCEPT_ORG_INVITE,\n REJECT_ORG_INVITE,\n GET_ORG,\n LIST_ORG_MEMBERS,\n INVITE_ORG_MEMBER,\n REMOVE_ORG_MEMBER,\n UPDATE_ORG_MEMBER_ROLE,\n} from './operations.js';\n\nconst InviteStatusEnum = z.enum(['PENDING', 'ACCEPTED', 'REJECTED', 'EXPIRED', 'REVOKED']);\n\nconst UserRoleEnum = z\n .enum(['GUEST', 'MEMBER', 'ORG_ADMIN', 'SUPER_ADMIN', 'TENANT_ADMIN', 'WORKSPACE_ADMIN'])\n .describe('Role within the organization (MEMBER is the safest default for invites)');\n\nexport function registerOrganizationsTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_list')),\n {\n title: 'List Organizations',\n description: 'List organizations the current user is a member of.',\n inputSchema: {\n limit: z.number().optional().describe('Page size'),\n offset: z.number().optional().describe('Offset for pagination'),\n },\n },\n async ({ limit, offset }) => {\n try {\n const data = await ctx.gql.global.request<{ myOrganizations: unknown }>(MY_ORGANIZATIONS, {\n limit: limit ?? 50,\n offset: offset ?? 0,\n });\n return jsonResult(data.myOrganizations);\n } catch (error) {\n ctx.logger.error('organizations_list failed', { error: String(error) });\n return errorResult(\n `Failed to list organizations: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_current')),\n {\n title: 'Current Organization',\n description: 'Return the current organization context from the auth store.',\n inputSchema: {},\n },\n async () => {\n try {\n const auth = ctx.auth.read();\n if (!auth?.organizationId) {\n return errorResult(\n 'No active organization context. Run the auth login flow to bind a tenant.',\n );\n }\n return jsonResult({\n organizationId: auth.organizationId,\n workspaceId: auth.workspaceId ?? null,\n });\n } catch (error) {\n ctx.logger.error('organizations_current failed', { error: String(error) });\n return errorResult(\n `Failed to read current organization: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_invites_list')),\n {\n title: 'List Organization Invites',\n description: 'List organization invites for the current user.',\n inputSchema: {\n status: InviteStatusEnum.optional().describe('Filter by invite status (default: PENDING)'),\n limit: z.number().optional().describe('Page size'),\n offset: z.number().optional().describe('Offset for pagination'),\n },\n },\n async ({ status, limit, offset }) => {\n try {\n const data = await ctx.gql.global.request<{ myOrganizationInvites: unknown }>(\n MY_ORGANIZATION_INVITES,\n {\n status: status ?? 'PENDING',\n limit: limit ?? 50,\n offset: offset ?? 0,\n },\n );\n return jsonResult(data.myOrganizationInvites);\n } catch (error) {\n ctx.logger.error('organizations_invites_list failed', { error: String(error) });\n return errorResult(\n `Failed to list organization invites: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_invites_accept')),\n {\n title: 'Accept Organization Invite',\n description: 'Accept a pending organization invite.',\n inputSchema: {\n invitationId: z.string().describe('Invite ID'),\n },\n },\n async ({ invitationId }) => {\n try {\n const data = await ctx.gql.global.request<{ acceptOrganizationInvite: unknown }>(\n ACCEPT_ORG_INVITE,\n { inviteId: invitationId },\n );\n return jsonResult(data.acceptOrganizationInvite);\n } catch (error) {\n ctx.logger.error('organizations_invites_accept failed', { error: String(error) });\n return errorResult(\n `Failed to accept invite: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_invites_decline')),\n {\n title: 'Decline Organization Invite',\n description: 'Decline a pending organization invite.',\n inputSchema: {\n invitationId: z.string().describe('Invite ID'),\n },\n },\n async ({ invitationId }) => {\n try {\n const data = await ctx.gql.global.request<{ rejectOrganizationInvite: unknown }>(\n REJECT_ORG_INVITE,\n { inviteId: invitationId },\n );\n return jsonResult(data.rejectOrganizationInvite);\n } catch (error) {\n ctx.logger.error('organizations_invites_decline failed', { error: String(error) });\n return errorResult(\n `Failed to decline invite: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Get ────────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_get')),\n {\n title: 'Get Organization',\n description:\n 'Fetch a single organization by ID. Returns the full organization detail (tenant, slug, status, member/workspace counts).',\n inputSchema: {\n id: z.string().describe('Organization ID'),\n },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.global.request<{ organization: unknown | null }>(GET_ORG, {\n id,\n });\n if (!data.organization) {\n return errorResult(`Organization ${id} not found`);\n }\n return jsonResult(data.organization);\n } catch (error) {\n ctx.logger.error('organizations_get failed', { error: String(error) });\n return errorResult(\n `Failed to get organization: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Members ────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_members_list')),\n {\n title: 'List Organization Members',\n description:\n 'List the members of an organization with pagination. Returns { items, total, hasMore, limit, offset }.',\n inputSchema: {\n organizationId: z.string().describe('Organization ID'),\n limit: z.number().optional().describe('Page size (default 10 on server)'),\n offset: z.number().optional().describe('Offset for pagination (default 0)'),\n },\n },\n async ({ organizationId, limit, offset }) => {\n try {\n const data = await ctx.gql.global.request<{ organizationMembers: unknown }>(\n LIST_ORG_MEMBERS,\n { organizationId, limit, offset },\n );\n return jsonResult(data.organizationMembers);\n } catch (error) {\n ctx.logger.error('organizations_members_list failed', { error: String(error) });\n return errorResult(\n `Failed to list organization members: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_members_invite')),\n {\n title: 'Invite Organization Member',\n description:\n 'Send an invitation to join an organization. The invitee receives an email-style invite with the chosen role; returns the created OrganizationInvite.',\n inputSchema: {\n organizationId: z.string().describe('Organization ID to invite the user into'),\n email: z.string().describe('Email address of the invitee'),\n role: UserRoleEnum.optional().describe('Role to grant on acceptance (defaults to MEMBER)'),\n message: z.string().optional().describe('Optional message included with the invite'),\n },\n },\n async ({ organizationId, email, role, message }) => {\n try {\n const input: Record<string, unknown> = { organizationId, email };\n if (role !== undefined) input.role = role;\n if (message !== undefined) input.message = message;\n const data = await ctx.gql.global.request<{ inviteOrganizationMember: unknown }>(\n INVITE_ORG_MEMBER,\n { input },\n );\n return jsonResult(data.inviteOrganizationMember);\n } catch (error) {\n ctx.logger.error('organizations_members_invite failed', { error: String(error) });\n return errorResult(\n `Failed to invite organization member: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_members_remove')),\n {\n title: 'Remove Organization Member',\n description:\n 'Remove a user from an organization. Returns { removed: boolean, organizationId, userId }.',\n inputSchema: {\n organizationId: z.string().describe('Organization ID'),\n userId: z.string().describe('User ID to remove from the organization'),\n },\n },\n async ({ organizationId, userId }) => {\n try {\n const data = await ctx.gql.global.request<{ removeOrganizationMember: boolean }>(\n REMOVE_ORG_MEMBER,\n { organizationId, userId },\n );\n return jsonResult({\n removed: data.removeOrganizationMember,\n organizationId,\n userId,\n });\n } catch (error) {\n ctx.logger.error('organizations_members_remove failed', { error: String(error) });\n return errorResult(\n `Failed to remove organization member: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_members_role')),\n {\n title: 'Update Organization Member Role',\n description:\n 'Update the role of an existing organization member. Returns the updated OrganizationMember.',\n inputSchema: {\n organizationId: z.string().describe('Organization ID'),\n userId: z.string().describe('User ID whose role will change'),\n role: UserRoleEnum.describe('New role for the member'),\n },\n },\n async ({ organizationId, userId, role }) => {\n try {\n const data = await ctx.gql.global.request<{ updateOrganizationMember: unknown }>(\n UPDATE_ORG_MEMBER_ROLE,\n { organizationId, userId, input: { role } },\n );\n return jsonResult(data.updateOrganizationMember);\n } catch (error) {\n ctx.logger.error('organizations_members_role failed', { error: String(error) });\n return errorResult(\n `Failed to update organization member role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Organizations module — multi-tenant org membership + invite acceptance.\n *\n * Tools:\n * <product>_organizations_{list,current}\n * <product>_organizations_invites_{list,accept,decline}\n *\n * Backend: ~/products/global/tenant/global-tenant-svc/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerOrganizationsTools } from './tools.js';\n\nconst organizationsModule: McpModule = {\n id: 'organizations',\n version: '0.0.1',\n displayName: 'Organizations',\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 registerOrganizationsTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default organizationsModule;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/organizations/operations.ts","../../../src/modules/organizations/tools.ts","../../../src/modules/organizations/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,MA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AA,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 MY_ORGANIZATIONS = `\n query MyOrganizations($limit: Int, $offset: Int) {\n myOrganizations(limit: $limit, offset: $offset) {\n items {\n id\n name\n slug\n tenantId\n description\n status\n createdAt\n updatedAt\n }\n total\n hasMore\n }\n }\n`;\n\nexport const MY_ORGANIZATION_INVITES = `\n query MyOrganizationInvites($status: InviteStatus, $limit: Int, $offset: Int) {\n myOrganizationInvites(status: $status, limit: $limit, offset: $offset) {\n items {\n id\n organizationId\n email\n role\n status\n expiresAt\n message\n createdAt\n }\n total\n hasMore\n }\n }\n`;\n\nexport const ACCEPT_ORG_INVITE = `\n mutation AcceptOrganizationInvite($inviteId: ID!) {\n acceptOrganizationInvite(inviteId: $inviteId) {\n id\n userId\n organizationId\n role\n joinedAt\n }\n }\n`;\n\nexport const REJECT_ORG_INVITE = `\n mutation RejectOrganizationInvite($inviteId: ID!) {\n rejectOrganizationInvite(inviteId: $inviteId) {\n id\n status\n respondedAt\n }\n }\n`;\n\nexport const GET_ORG = `\n query Organization($id: ID!) {\n organization(id: $id) {\n id\n tenantId\n name\n slug\n description\n status\n memberCount\n workspaceCount\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const LIST_ORG_MEMBERS = `\n query OrganizationMembers($organizationId: String!, $limit: Int, $offset: Int) {\n organizationMembers(organizationId: $organizationId, limit: $limit, offset: $offset) {\n items {\n id\n organizationId\n userId\n role\n joinedAt\n invitedBy\n }\n total\n hasMore\n limit\n offset\n }\n }\n`;\n\nexport const INVITE_ORG_MEMBER = `\n mutation InviteOrganizationMember($input: InviteOrganizationMemberInput!) {\n inviteOrganizationMember(input: $input) {\n id\n organizationId\n email\n role\n status\n invitedBy\n expiresAt\n createdAt\n }\n }\n`;\n\nexport const REMOVE_ORG_MEMBER = `\n mutation RemoveOrganizationMember($organizationId: String!, $userId: String!) {\n removeOrganizationMember(organizationId: $organizationId, userId: $userId)\n }\n`;\n\nexport const UPDATE_ORG_MEMBER_ROLE = `\n mutation UpdateOrganizationMember(\n $organizationId: String!\n $userId: String!\n $input: UpdateOrganizationMemberInput!\n ) {\n updateOrganizationMember(\n organizationId: $organizationId\n userId: $userId\n input: $input\n ) {\n id\n organizationId\n userId\n role\n joinedAt\n invitedBy\n }\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 MY_ORGANIZATIONS,\n MY_ORGANIZATION_INVITES,\n ACCEPT_ORG_INVITE,\n REJECT_ORG_INVITE,\n GET_ORG,\n LIST_ORG_MEMBERS,\n INVITE_ORG_MEMBER,\n REMOVE_ORG_MEMBER,\n UPDATE_ORG_MEMBER_ROLE,\n} from './operations.js';\n\nconst InviteStatusEnum = z.enum(['PENDING', 'ACCEPTED', 'REJECTED', 'EXPIRED', 'REVOKED']);\n\nconst UserRoleEnum = z\n .enum(['GUEST', 'MEMBER', 'ORG_ADMIN', 'SUPER_ADMIN', 'TENANT_ADMIN', 'WORKSPACE_ADMIN'])\n .describe('Role within the organization (MEMBER is the safest default for invites)');\n\nexport function registerOrganizationsTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_list')),\n {\n title: 'List Organizations',\n description: 'List organizations the current user is a member of.',\n inputSchema: {\n limit: z.number().optional().describe('Page size'),\n offset: z.number().optional().describe('Offset for pagination'),\n },\n },\n async ({ limit, offset }) => {\n try {\n const data = await ctx.gql.global.request<{ myOrganizations: unknown }>(MY_ORGANIZATIONS, {\n limit: limit ?? 50,\n offset: offset ?? 0,\n });\n return jsonResult(data.myOrganizations);\n } catch (error) {\n ctx.logger.error('organizations_list failed', { error: String(error) });\n return errorResult(\n `Failed to list organizations: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_current')),\n {\n title: 'Current Organization',\n description: 'Return the current organization context from the auth store.',\n inputSchema: {},\n },\n async () => {\n try {\n const auth = ctx.auth.read();\n if (!auth?.organizationId) {\n return errorResult(\n 'No active organization context. Run the auth login flow to bind a tenant.',\n );\n }\n return jsonResult({\n organizationId: auth.organizationId,\n workspaceId: auth.workspaceId ?? null,\n });\n } catch (error) {\n ctx.logger.error('organizations_current failed', { error: String(error) });\n return errorResult(\n `Failed to read current organization: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_invites_list')),\n {\n title: 'List Organization Invites',\n description: 'List organization invites for the current user.',\n inputSchema: {\n status: InviteStatusEnum.optional().describe('Filter by invite status (default: PENDING)'),\n limit: z.number().optional().describe('Page size'),\n offset: z.number().optional().describe('Offset for pagination'),\n },\n },\n async ({ status, limit, offset }) => {\n try {\n const data = await ctx.gql.global.request<{ myOrganizationInvites: unknown }>(\n MY_ORGANIZATION_INVITES,\n {\n status: status ?? 'PENDING',\n limit: limit ?? 50,\n offset: offset ?? 0,\n },\n );\n return jsonResult(data.myOrganizationInvites);\n } catch (error) {\n ctx.logger.error('organizations_invites_list failed', { error: String(error) });\n return errorResult(\n `Failed to list organization invites: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_invites_accept')),\n {\n title: 'Accept Organization Invite',\n description: 'Accept a pending organization invite.',\n inputSchema: {\n invitationId: z.string().describe('Invite ID'),\n },\n },\n async ({ invitationId }) => {\n try {\n const data = await ctx.gql.global.request<{ acceptOrganizationInvite: unknown }>(\n ACCEPT_ORG_INVITE,\n { inviteId: invitationId },\n );\n return jsonResult(data.acceptOrganizationInvite);\n } catch (error) {\n ctx.logger.error('organizations_invites_accept failed', { error: String(error) });\n return errorResult(\n `Failed to accept invite: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_invites_decline')),\n {\n title: 'Decline Organization Invite',\n description: 'Decline a pending organization invite.',\n inputSchema: {\n invitationId: z.string().describe('Invite ID'),\n },\n },\n async ({ invitationId }) => {\n try {\n const data = await ctx.gql.global.request<{ rejectOrganizationInvite: unknown }>(\n REJECT_ORG_INVITE,\n { inviteId: invitationId },\n );\n return jsonResult(data.rejectOrganizationInvite);\n } catch (error) {\n ctx.logger.error('organizations_invites_decline failed', { error: String(error) });\n return errorResult(\n `Failed to decline invite: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Get ────────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_get')),\n {\n title: 'Get Organization',\n description:\n 'Fetch a single organization by ID. Returns the full organization detail (tenant, slug, status, member/workspace counts).',\n inputSchema: {\n id: z.string().describe('Organization ID'),\n },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.global.request<{ organization: unknown | null }>(GET_ORG, {\n id,\n });\n if (!data.organization) {\n return errorResult(`Organization ${id} not found`);\n }\n return jsonResult(data.organization);\n } catch (error) {\n ctx.logger.error('organizations_get failed', { error: String(error) });\n return errorResult(\n `Failed to get organization: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Members ────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_members_list')),\n {\n title: 'List Organization Members',\n description:\n 'List the members of an organization with pagination. Returns { items, total, hasMore, limit, offset }.',\n inputSchema: {\n organizationId: z.string().describe('Organization ID'),\n limit: z.number().optional().describe('Page size (default 10 on server)'),\n offset: z.number().optional().describe('Offset for pagination (default 0)'),\n },\n },\n async ({ organizationId, limit, offset }) => {\n try {\n const data = await ctx.gql.global.request<{ organizationMembers: unknown }>(\n LIST_ORG_MEMBERS,\n { organizationId, limit, offset },\n );\n return jsonResult(data.organizationMembers);\n } catch (error) {\n ctx.logger.error('organizations_members_list failed', { error: String(error) });\n return errorResult(\n `Failed to list organization members: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_members_invite')),\n {\n title: 'Invite Organization Member',\n description:\n 'Send an invitation to join an organization. The invitee receives an email-style invite with the chosen role; returns the created OrganizationInvite.',\n inputSchema: {\n organizationId: z.string().describe('Organization ID to invite the user into'),\n email: z.string().describe('Email address of the invitee'),\n role: UserRoleEnum.optional().describe('Role to grant on acceptance (defaults to MEMBER)'),\n message: z.string().optional().describe('Optional message included with the invite'),\n },\n },\n async ({ organizationId, email, role, message }) => {\n try {\n const input: Record<string, unknown> = { organizationId, email };\n if (role !== undefined) input.role = role;\n if (message !== undefined) input.message = message;\n const data = await ctx.gql.global.request<{ inviteOrganizationMember: unknown }>(\n INVITE_ORG_MEMBER,\n { input },\n );\n return jsonResult(data.inviteOrganizationMember);\n } catch (error) {\n ctx.logger.error('organizations_members_invite failed', { error: String(error) });\n return errorResult(\n `Failed to invite organization member: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_members_remove')),\n {\n title: 'Remove Organization Member',\n description:\n 'Remove a user from an organization. Returns { removed: boolean, organizationId, userId }.',\n inputSchema: {\n organizationId: z.string().describe('Organization ID'),\n userId: z.string().describe('User ID to remove from the organization'),\n },\n },\n async ({ organizationId, userId }) => {\n try {\n const data = await ctx.gql.global.request<{ removeOrganizationMember: boolean }>(\n REMOVE_ORG_MEMBER,\n { organizationId, userId },\n );\n return jsonResult({\n removed: data.removeOrganizationMember,\n organizationId,\n userId,\n });\n } catch (error) {\n ctx.logger.error('organizations_members_remove failed', { error: String(error) });\n return errorResult(\n `Failed to remove organization member: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'organizations_members_role')),\n {\n title: 'Update Organization Member Role',\n description:\n 'Update the role of an existing organization member. Returns the updated OrganizationMember.',\n inputSchema: {\n organizationId: z.string().describe('Organization ID'),\n userId: z.string().describe('User ID whose role will change'),\n role: UserRoleEnum.describe('New role for the member'),\n },\n },\n async ({ organizationId, userId, role }) => {\n try {\n const data = await ctx.gql.global.request<{ updateOrganizationMember: unknown }>(\n UPDATE_ORG_MEMBER_ROLE,\n { organizationId, userId, input: { role } },\n );\n return jsonResult(data.updateOrganizationMember);\n } catch (error) {\n ctx.logger.error('organizations_members_role failed', { error: String(error) });\n return errorResult(\n `Failed to update organization member role: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Organizations module — multi-tenant org membership + invite acceptance.\n *\n * Tools:\n * <product>_organizations_{list,current}\n * <product>_organizations_invites_{list,accept,decline}\n *\n * Backend: ~/products/global/tenant/global-tenant-svc/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerOrganizationsTools } from './tools.js';\n\nconst organizationsModule: McpModule = {\n id: 'organizations',\n version: '0.0.1',\n displayName: 'Organizations',\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 registerOrganizationsTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default organizationsModule;\n"]}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
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 organizationsModule: McpModule;
|
|
7
|
-
|
|
8
|
-
export { organizationsModule as default };
|
|
3
|
+
export default organizationsModule;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const MY_ORGANIZATIONS = "\n query MyOrganizations($limit: Int, $offset: Int) {\n myOrganizations(limit: $limit, offset: $offset) {\n items {\n id\n name\n slug\n tenantId\n description\n status\n createdAt\n updatedAt\n }\n total\n hasMore\n }\n }\n";
|
|
2
|
+
export declare const MY_ORGANIZATION_INVITES = "\n query MyOrganizationInvites($status: InviteStatus, $limit: Int, $offset: Int) {\n myOrganizationInvites(status: $status, limit: $limit, offset: $offset) {\n items {\n id\n organizationId\n email\n role\n status\n expiresAt\n message\n createdAt\n }\n total\n hasMore\n }\n }\n";
|
|
3
|
+
export declare const ACCEPT_ORG_INVITE = "\n mutation AcceptOrganizationInvite($inviteId: ID!) {\n acceptOrganizationInvite(inviteId: $inviteId) {\n id\n userId\n organizationId\n role\n joinedAt\n }\n }\n";
|
|
4
|
+
export declare const REJECT_ORG_INVITE = "\n mutation RejectOrganizationInvite($inviteId: ID!) {\n rejectOrganizationInvite(inviteId: $inviteId) {\n id\n status\n respondedAt\n }\n }\n";
|
|
5
|
+
export declare const GET_ORG = "\n query Organization($id: ID!) {\n organization(id: $id) {\n id\n tenantId\n name\n slug\n description\n status\n memberCount\n workspaceCount\n createdAt\n updatedAt\n }\n }\n";
|
|
6
|
+
export declare const LIST_ORG_MEMBERS = "\n query OrganizationMembers($organizationId: String!, $limit: Int, $offset: Int) {\n organizationMembers(organizationId: $organizationId, limit: $limit, offset: $offset) {\n items {\n id\n organizationId\n userId\n role\n joinedAt\n invitedBy\n }\n total\n hasMore\n limit\n offset\n }\n }\n";
|
|
7
|
+
export declare const INVITE_ORG_MEMBER = "\n mutation InviteOrganizationMember($input: InviteOrganizationMemberInput!) {\n inviteOrganizationMember(input: $input) {\n id\n organizationId\n email\n role\n status\n invitedBy\n expiresAt\n createdAt\n }\n }\n";
|
|
8
|
+
export declare const REMOVE_ORG_MEMBER = "\n mutation RemoveOrganizationMember($organizationId: String!, $userId: String!) {\n removeOrganizationMember(organizationId: $organizationId, userId: $userId)\n }\n";
|
|
9
|
+
export declare const UPDATE_ORG_MEMBER_ROLE = "\n mutation UpdateOrganizationMember(\n $organizationId: String!\n $userId: String!\n $input: UpdateOrganizationMemberInput!\n ) {\n updateOrganizationMember(\n organizationId: $organizationId\n userId: $userId\n input: $input\n ) {\n id\n organizationId\n userId\n role\n joinedAt\n invitedBy\n }\n }\n";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export declare const DESTRUCTIVE_TOOL: RegExp;
|
|
3
|
+
export declare function confirmTokenFor(tool: string, args: Record<string, unknown>): string;
|
|
4
|
+
export declare function gateDestructiveTools(server: McpServer): McpServer;
|