@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 subscriberbotModule: McpModule;
|
|
7
|
-
|
|
8
|
-
export { subscriberbotModule as default };
|
|
3
|
+
export default subscriberbotModule;
|
|
@@ -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/subscriberbot/operations.ts
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const PROVIDER_FIELDS = "\n id name slug description category status industry region language\n logoFileId websiteUrl tags churnRiskScore vendorHealthScore\n workspaceId createdAt updatedAt\n";
|
|
2
|
+
export declare const PLAN_FIELDS = "\n id name description amount currency interval features isActive\n providerId workspaceId createdAt updatedAt\n";
|
|
3
|
+
export declare const ENTITLEMENT_FIELDS = "\n id name description type quota used unit isActive\n relationshipId workspaceId createdAt updatedAt\n";
|
|
4
|
+
export declare const ASSET_FIELDS = "\n id name type secretRef expiresAt relationshipId workspaceId\n createdAt updatedAt file { id }\n";
|
|
5
|
+
export declare const RENEWAL_EVENT_FIELDS = "\n id eventType detail amount currency occursAt notified\n relationshipId workspaceId createdAt updatedAt\n";
|
|
6
|
+
export declare const RELATIONSHIP_FIELDS = "\n id label kind status amount currency interval autoRenew discoverySource\n healthScore notes tags providerId planId ownerId startedAt renewsAt\n trialEndsAt cancelledAt workspaceId createdAt updatedAt\n";
|
|
7
|
+
export declare const PAYMENT_INSTRUMENT_FIELDS = "\n id label type status brand last4 expiryMonth expiryYear isDefault\n ownerId workspaceId createdAt updatedAt\n";
|
|
8
|
+
export declare const INVOICE_FIELDS = "\n id number status currency subtotal taxAmount total issueDate dueDate\n paidAt lineItems paymentInstrumentId relationshipId workspaceId\n createdAt updatedAt file { id }\n";
|
|
9
|
+
export declare const CHANNEL_FIELDS = "\n id type status address label ingestEnabled verifiedAt\n ownerId workspaceId createdAt updatedAt\n";
|
|
10
|
+
export declare const INBOX_MESSAGE_FIELDS = "\n id subject preview category categoryConfidence actionRequired isRead\n externalId receivedAt channelId relationshipId workspaceId\n createdAt updatedAt\n";
|
|
11
|
+
export declare const AGENT_FIELDS = "\n id name description kind status config lastRunAt\n ownerId workspaceId createdAt updatedAt\n";
|
|
12
|
+
export declare const POLICY_FIELDS = "\n id name description action condition isEnabled triggerCount\n lastTriggeredAt agentId workspaceId createdAt updatedAt\n";
|
|
13
|
+
export declare const WORKFLOW_FIELDS = "\n id name description status triggerEvent steps runCount lastRunAt\n workspaceId createdAt updatedAt\n";
|
|
14
|
+
export declare const GET_PROVIDER = "\n query SubscriberbotGetProvider($id: ID!) {\n subProvider(id: $id) {\n \n id name slug description category status industry region language\n logoFileId websiteUrl tags churnRiskScore vendorHealthScore\n workspaceId createdAt updatedAt\n\n plans { \n id name description amount currency interval features isActive\n providerId workspaceId createdAt updatedAt\n }\n }\n }\n";
|
|
15
|
+
export declare const LIST_PROVIDERS = "\n query SubscriberbotListProviders(\n $category: SubProviderCategory\n $status: SubProviderStatus\n $search: String\n $pagination: PaginationInput\n ) {\n subListProviders(\n category: $category\n status: $status\n search: $search\n pagination: $pagination\n ) {\n items { \n id name slug description category status industry region language\n logoFileId websiteUrl tags churnRiskScore vendorHealthScore\n workspaceId createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }\n";
|
|
16
|
+
export declare const CREATE_PROVIDER = "\n mutation SubscriberbotCreateProvider($input: SubCreateProviderInput!) {\n subCreateProvider(input: $input) {\n \n id name slug description category status industry region language\n logoFileId websiteUrl tags churnRiskScore vendorHealthScore\n workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
17
|
+
export declare const UPDATE_PROVIDER = "\n mutation SubscriberbotUpdateProvider($id: ID!, $input: SubUpdateProviderInput!) {\n subUpdateProvider(id: $id, input: $input) {\n \n id name slug description category status industry region language\n logoFileId websiteUrl tags churnRiskScore vendorHealthScore\n workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
18
|
+
export declare const ARCHIVE_PROVIDER = "\n mutation SubscriberbotArchiveProvider($id: ID!) {\n subArchiveProvider(id: $id)\n }\n";
|
|
19
|
+
export declare const LIST_PLANS = "\n query SubscriberbotListPlans($providerId: ID) {\n subListPlans(providerId: $providerId) {\n \n id name description amount currency interval features isActive\n providerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
20
|
+
export declare const CREATE_PLAN = "\n mutation SubscriberbotCreatePlan($input: SubCreatePlanInput!) {\n subCreatePlan(input: $input) {\n \n id name description amount currency interval features isActive\n providerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
21
|
+
export declare const GET_RELATIONSHIP = "\n query SubscriberbotGetRelationship($id: ID!) {\n subRelationship(id: $id) {\n \n id label kind status amount currency interval autoRenew discoverySource\n healthScore notes tags providerId planId ownerId startedAt renewsAt\n trialEndsAt cancelledAt workspaceId createdAt updatedAt\n\n provider { id name slug category status }\n plan { id name amount currency interval }\n entitlements { \n id name description type quota used unit isActive\n relationshipId workspaceId createdAt updatedAt\n }\n assets { \n id name type secretRef expiresAt relationshipId workspaceId\n createdAt updatedAt file { id }\n }\n renewalEvents { \n id eventType detail amount currency occursAt notified\n relationshipId workspaceId createdAt updatedAt\n }\n }\n }\n";
|
|
22
|
+
export declare const LIST_RELATIONSHIPS = "\n query SubscriberbotListRelationships(\n $kind: SubRelationshipKind\n $status: SubRelationshipStatus\n $ownerId: ID\n $providerId: ID\n $pagination: PaginationInput\n ) {\n subListRelationships(\n kind: $kind\n status: $status\n ownerId: $ownerId\n providerId: $providerId\n pagination: $pagination\n ) {\n items { \n id label kind status amount currency interval autoRenew discoverySource\n healthScore notes tags providerId planId ownerId startedAt renewsAt\n trialEndsAt cancelledAt workspaceId createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }\n";
|
|
23
|
+
export declare const CREATE_RELATIONSHIP = "\n mutation SubscriberbotCreateRelationship($input: SubCreateRelationshipInput!) {\n subCreateRelationship(input: $input) {\n \n id label kind status amount currency interval autoRenew discoverySource\n healthScore notes tags providerId planId ownerId startedAt renewsAt\n trialEndsAt cancelledAt workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
24
|
+
export declare const UPDATE_RELATIONSHIP = "\n mutation SubscriberbotUpdateRelationship($id: ID!, $input: SubUpdateRelationshipInput!) {\n subUpdateRelationship(id: $id, input: $input) {\n \n id label kind status amount currency interval autoRenew discoverySource\n healthScore notes tags providerId planId ownerId startedAt renewsAt\n trialEndsAt cancelledAt workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
25
|
+
export declare const CANCEL_RELATIONSHIP = "\n mutation SubscriberbotCancelRelationship($id: ID!) {\n subCancelRelationship(id: $id) {\n \n id label kind status amount currency interval autoRenew discoverySource\n healthScore notes tags providerId planId ownerId startedAt renewsAt\n trialEndsAt cancelledAt workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
26
|
+
export declare const TRANSITION_RELATIONSHIP = "\n mutation SubscriberbotTransitionRelationship($id: ID!, $status: SubRelationshipStatus!) {\n subTransitionRelationship(id: $id, status: $status) {\n \n id label kind status amount currency interval autoRenew discoverySource\n healthScore notes tags providerId planId ownerId startedAt renewsAt\n trialEndsAt cancelledAt workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
27
|
+
export declare const LIST_ENTITLEMENTS = "\n query SubscriberbotListEntitlements($relationshipId: ID!) {\n subListEntitlements(relationshipId: $relationshipId) {\n \n id name description type quota used unit isActive\n relationshipId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
28
|
+
export declare const CREATE_ENTITLEMENT = "\n mutation SubscriberbotCreateEntitlement($input: SubCreateEntitlementInput!) {\n subCreateEntitlement(input: $input) {\n \n id name description type quota used unit isActive\n relationshipId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
29
|
+
export declare const LIST_ASSETS = "\n query SubscriberbotListAssets($relationshipId: ID!) {\n subListAssets(relationshipId: $relationshipId) {\n \n id name type secretRef expiresAt relationshipId workspaceId\n createdAt updatedAt file { id }\n\n }\n }\n";
|
|
30
|
+
export declare const CREATE_ASSET = "\n mutation SubscriberbotCreateAsset($input: SubCreateAssetInput!) {\n subCreateAsset(input: $input) {\n \n id name type secretRef expiresAt relationshipId workspaceId\n createdAt updatedAt file { id }\n\n }\n }\n";
|
|
31
|
+
export declare const LIST_RENEWAL_EVENTS = "\n query SubscriberbotListRenewalEvents($relationshipId: ID, $upcomingOnly: Boolean) {\n subListRenewalEvents(relationshipId: $relationshipId, upcomingOnly: $upcomingOnly) {\n \n id eventType detail amount currency occursAt notified\n relationshipId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
32
|
+
export declare const LIST_PAYMENT_INSTRUMENTS = "\n query SubscriberbotListPaymentInstruments($ownerId: ID) {\n subListPaymentInstruments(ownerId: $ownerId) {\n \n id label type status brand last4 expiryMonth expiryYear isDefault\n ownerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
33
|
+
export declare const CREATE_PAYMENT_INSTRUMENT = "\n mutation SubscriberbotCreatePaymentInstrument($input: SubCreatePaymentInstrumentInput!) {\n subCreatePaymentInstrument(input: $input) {\n \n id label type status brand last4 expiryMonth expiryYear isDefault\n ownerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
34
|
+
export declare const REMOVE_PAYMENT_INSTRUMENT = "\n mutation SubscriberbotRemovePaymentInstrument($id: ID!) {\n subRemovePaymentInstrument(id: $id)\n }\n";
|
|
35
|
+
export declare const LIST_INVOICES = "\n query SubscriberbotListInvoices(\n $relationshipId: ID\n $status: SubInvoiceStatus\n $pagination: PaginationInput\n ) {\n subListInvoices(relationshipId: $relationshipId, status: $status, pagination: $pagination) {\n items { \n id number status currency subtotal taxAmount total issueDate dueDate\n paidAt lineItems paymentInstrumentId relationshipId workspaceId\n createdAt updatedAt file { id }\n }\n pageInfo { cursor hasMore }\n }\n }\n";
|
|
36
|
+
export declare const CREATE_INVOICE = "\n mutation SubscriberbotCreateInvoice($input: SubCreateInvoiceInput!) {\n subCreateInvoice(input: $input) {\n \n id number status currency subtotal taxAmount total issueDate dueDate\n paidAt lineItems paymentInstrumentId relationshipId workspaceId\n createdAt updatedAt file { id }\n\n }\n }\n";
|
|
37
|
+
export declare const MARK_INVOICE_PAID = "\n mutation SubscriberbotMarkInvoicePaid($id: ID!) {\n subMarkInvoicePaid(id: $id) {\n \n id number status currency subtotal taxAmount total issueDate dueDate\n paidAt lineItems paymentInstrumentId relationshipId workspaceId\n createdAt updatedAt file { id }\n\n }\n }\n";
|
|
38
|
+
export declare const LIST_CHANNELS = "\n query SubscriberbotListChannels($ownerId: ID) {\n subListChannels(ownerId: $ownerId) {\n \n id type status address label ingestEnabled verifiedAt\n ownerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
39
|
+
export declare const CREATE_CHANNEL = "\n mutation SubscriberbotCreateChannel($input: SubCreateChannelInput!) {\n subCreateChannel(input: $input) {\n \n id type status address label ingestEnabled verifiedAt\n ownerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
40
|
+
export declare const VERIFY_CHANNEL = "\n mutation SubscriberbotVerifyChannel($id: ID!) {\n subVerifyChannel(id: $id) {\n \n id type status address label ingestEnabled verifiedAt\n ownerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
41
|
+
export declare const LIST_INBOX_MESSAGES = "\n query SubscriberbotListInboxMessages(\n $category: SubMessageCategory\n $channelId: ID\n $relationshipId: ID\n $unreadOnly: Boolean\n $pagination: PaginationInput\n ) {\n subListInboxMessages(\n category: $category\n channelId: $channelId\n relationshipId: $relationshipId\n unreadOnly: $unreadOnly\n pagination: $pagination\n ) {\n items { \n id subject preview category categoryConfidence actionRequired isRead\n externalId receivedAt channelId relationshipId workspaceId\n createdAt updatedAt\n }\n pageInfo { cursor hasMore }\n }\n }\n";
|
|
42
|
+
export declare const INGEST_MESSAGE = "\n mutation SubscriberbotIngestMessage($input: SubIngestMessageInput!) {\n subIngestMessage(input: $input) {\n \n id subject preview category categoryConfidence actionRequired isRead\n externalId receivedAt channelId relationshipId workspaceId\n createdAt updatedAt\n\n }\n }\n";
|
|
43
|
+
export declare const MARK_MESSAGE_READ = "\n mutation SubscriberbotMarkMessageRead($id: ID!) {\n subMarkMessageRead(id: $id) {\n \n id subject preview category categoryConfidence actionRequired isRead\n externalId receivedAt channelId relationshipId workspaceId\n createdAt updatedAt\n\n }\n }\n";
|
|
44
|
+
export declare const GET_AGENT = "\n query SubscriberbotGetAgent($id: ID!) {\n subAgent(id: $id) {\n \n id name description kind status config lastRunAt\n ownerId workspaceId createdAt updatedAt\n\n policies { \n id name description action condition isEnabled triggerCount\n lastTriggeredAt agentId workspaceId createdAt updatedAt\n }\n }\n }\n";
|
|
45
|
+
export declare const LIST_AGENTS = "\n query SubscriberbotListAgents($kind: SubAgentKind, $ownerId: ID, $status: SubAgentStatus) {\n subListAgents(kind: $kind, ownerId: $ownerId, status: $status) {\n \n id name description kind status config lastRunAt\n ownerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
46
|
+
export declare const CREATE_AGENT = "\n mutation SubscriberbotCreateAgent($input: SubCreateAgentInput!) {\n subCreateAgent(input: $input) {\n \n id name description kind status config lastRunAt\n ownerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
47
|
+
export declare const SET_AGENT_STATUS = "\n mutation SubscriberbotSetAgentStatus($id: ID!, $status: SubAgentStatus!) {\n subSetAgentStatus(id: $id, status: $status) {\n \n id name description kind status config lastRunAt\n ownerId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
48
|
+
export declare const LIST_POLICIES = "\n query SubscriberbotListPolicies($agentId: ID) {\n subListPolicies(agentId: $agentId) {\n \n id name description action condition isEnabled triggerCount\n lastTriggeredAt agentId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
49
|
+
export declare const CREATE_POLICY = "\n mutation SubscriberbotCreatePolicy($input: SubCreatePolicyInput!) {\n subCreatePolicy(input: $input) {\n \n id name description action condition isEnabled triggerCount\n lastTriggeredAt agentId workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
50
|
+
export declare const LIST_WORKFLOWS = "\n query SubscriberbotListWorkflows($status: SubWorkflowStatus) {\n subListWorkflows(status: $status) {\n \n id name description status triggerEvent steps runCount lastRunAt\n workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
51
|
+
export declare const CREATE_WORKFLOW = "\n mutation SubscriberbotCreateWorkflow($input: SubCreateWorkflowInput!) {\n subCreateWorkflow(input: $input) {\n \n id name description status triggerEvent steps runCount lastRunAt\n workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
52
|
+
export declare const ACTIVATE_WORKFLOW = "\n mutation SubscriberbotActivateWorkflow($id: ID!) {\n subActivateWorkflow(id: $id) {\n \n id name description status triggerEvent steps runCount lastRunAt\n workspaceId createdAt updatedAt\n\n }\n }\n";
|
|
53
|
+
export declare const HEALTH = "\n query SubscriberbotHealth {\n subHealth\n }\n";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SubAgentKindEnum: z.ZodEnum<["COMPLIANCE", "CONCIERGE", "COST", "DISCOVERY", "MIGRATION", "NEGOTIATION", "NEWSLETTER", "RENEWAL", "VENDOR"]>;
|
|
3
|
+
export declare const SubAgentStatusEnum: z.ZodEnum<["AUTONOMOUS", "DISABLED", "SUGGEST_ONLY"]>;
|
|
4
|
+
export declare const SubAssetTypeEnum: z.ZodEnum<["CERTIFICATE", "CONTRACT", "CREDENTIAL", "DOMAIN", "INVOICE", "LICENSE_KEY", "RECEIPT", "WARRANTY"]>;
|
|
5
|
+
export declare const SubBillingIntervalEnum: z.ZodEnum<["DAILY", "FREE", "LIFETIME", "MONTHLY", "QUARTERLY", "USAGE_BASED", "WEEKLY", "YEARLY"]>;
|
|
6
|
+
export declare const SubChannelStatusEnum: z.ZodEnum<["DISABLED", "PENDING", "VERIFIED"]>;
|
|
7
|
+
export declare const SubChannelTypeEnum: z.ZodEnum<["DISCORD", "EMAIL", "PUSH", "SLACK", "SMS", "WEBHOOK", "WHATSAPP"]>;
|
|
8
|
+
export declare const SubDiscoverySourceEnum: z.ZodEnum<["AI_AGENT", "EMAIL_SCAN", "IMPORT", "MANUAL", "PAYMENT_SCAN", "PROVIDER_CONNECT"]>;
|
|
9
|
+
export declare const SubEntitlementTypeEnum: z.ZodEnum<["CONTENT", "DISCOUNT", "FEATURE_ACCESS", "SEAT", "SUPPORT_TIER", "USAGE_QUOTA"]>;
|
|
10
|
+
export declare const SubInvoiceStatusEnum: z.ZodEnum<["CANCELLED", "DRAFT", "FAILED", "ISSUED", "OVERDUE", "PAID", "REFUNDED"]>;
|
|
11
|
+
export declare const SubMessageCategoryEnum: z.ZodEnum<["BILLING", "MARKETING", "OTHER", "PRODUCT_UPDATE", "RENEWAL", "REQUIRED_ACTION", "SECURITY_ALERT"]>;
|
|
12
|
+
export declare const SubPaymentInstrumentStatusEnum: z.ZodEnum<["ACTIVE", "EXPIRED", "EXPIRING", "REMOVED"]>;
|
|
13
|
+
export declare const SubPaymentInstrumentTypeEnum: z.ZodEnum<["BANK_ACCOUNT", "CARD", "OTHER", "PAYPAL", "UPI", "WALLET"]>;
|
|
14
|
+
export declare const SubPolicyActionEnum: z.ZodEnum<["ALERT", "CANCEL", "CREATE_TASK", "DOWNGRADE", "PAUSE", "RENEW", "UPGRADE"]>;
|
|
15
|
+
export declare const SubProviderCategoryEnum: z.ZodEnum<["AI_SERVICE", "ASSOCIATION", "COMMUNITY", "CONTRACT", "EDUCATION", "FINANCIAL", "INSURANCE", "LICENSE", "MEMBERSHIP", "NEWSLETTER", "NEWS_DIGEST", "OTHER", "SAAS", "STREAMING", "TELECOM", "UTILITY"]>;
|
|
16
|
+
export declare const SubProviderStatusEnum: z.ZodEnum<["CLAIMED", "DEPRECATED", "UNVERIFIED", "VERIFIED"]>;
|
|
17
|
+
export declare const SubRelationshipKindEnum: z.ZodEnum<["CONTRACT", "ENROLLMENT", "LICENSE", "MEMBERSHIP", "NEWSLETTER", "RECURRING_PAYMENT", "SUBSCRIPTION", "TRIAL"]>;
|
|
18
|
+
export declare const SubRelationshipStatusEnum: z.ZodEnum<["ACTIVE", "CANCELLED", "EXPIRED", "LAPSED", "PAST_DUE", "PAUSED", "TRIAL"]>;
|
|
19
|
+
export declare const SubWorkflowStatusEnum: z.ZodEnum<["ACTIVE", "ARCHIVED", "DRAFT", "PAUSED"]>;
|
|
20
|
+
export declare const JsonObject: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
21
|
+
export declare const JsonValue: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/support/operations.ts","../../../src/modules/support/tools.ts","../../../src/modules/support/index.ts"],"names":["z"],"mappings":";;;;;;;;;;;AA8BO,IAAM,gBAAA,GAAN,cAA+B,KAAA,CAAM;AAAA,EACjB,KAAA;AAAA,EAEzB,WAAA,CAAY,SAAiB,KAAA,EAAiB;AAC5C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,kBAAA;AACZ,IAAA,IAAA,CAAK,KAAA,GAAQ,KAAA;AAAA,EACf;AACF,CAAA;;;AC1BA,IAAM,oBAAA,GAAuB,EAAA;AAE7B,SAAS,cAAA,CAAe,MAAc,IAAA,EAA8C;AAClF,EAAA,IAAuB,IAAA,CAAK,MAAA,GAAS,oBAAA,EAAsB;AACzD,IAAA,MAAM,IAAI,gBAAA;AAAA,MACR,CAAA,WAAA,EAAc,IAAI,CAAA,UAAA,EAAa,oBAAoB,CAAA,8CAAA;AAAA,KACrD;AAAA,EACF;AACA,EAAA,OAAO,IAAA;AACT;AAMO,SAAS,WAAA,CAAY,gBAAwB,KAAA,EAAyB;AAC3E,EAAA,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,MAAM,IAAI,iBAAiB,sCAAsC,CAAA;AAAA,EACnE;AACA,EAAA,MAAM,IAAA,GAAO,CAAC,WAAA,EAAa,GAAG,KAAK,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAC7D,EAAA,OAAO,cAAA,CAAe,IAAY,CAAA;AACpC;;;ACOO,SAAS,UAAA,CAAW,MAAe,UAAA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,CAAA;AAAA,IACT,CAAA;AAEA,IAAA,oBAAA,CAAqB,MAAA,EAAQ,KAAK,KAAK,CAAA;AAEvC,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,eAAA,GAAQ","file":"index.cjs","sourcesContent":["/**\n * Error classes for MCP SDK.\n *\n * Modules MUST throw these instead of throwing raw Errors. The registerTool\n * wrapper in result.ts catches and maps them to MCP-protocol-compliant\n * `{ isError: true, content: [...] }` responses.\n *\n * Throwing past the wrapper to the protocol surfaces as JSON-RPC -32603 to\n * the client and is a protocol bug.\n */\n\nexport class McpUserError extends Error {\n public readonly hint: string | undefined;\n\n constructor(message: string, opts?: { hint?: string }) {\n super(message);\n this.name = 'McpUserError';\n this.hint = opts?.hint;\n }\n}\n\nexport class McpAuthError extends McpUserError {\n constructor(message: string, opts?: { hint?: string }) {\n super(message, {\n hint: opts?.hint ?? 'Run the auth_login tool to authenticate.',\n });\n this.name = 'McpAuthError';\n }\n}\n\nexport class McpInternalError extends Error {\n public override readonly cause: unknown;\n\n constructor(message: string, cause?: unknown) {\n super(message);\n this.name = 'McpInternalError';\n this.cause = cause;\n }\n}\n","/**\n * Tool / resource / prompt naming helpers.\n *\n * Mandatory product prefix avoids collisions when Claude Desktop runs\n * multiple MCP servers concurrently (typical setup is ~6).\n *\n * Tool names are capped at 63 characters — Claude Desktop pre-1.x\n * truncated at 64 in some versions.\n */\n\nimport { McpInternalError } from './errors.js';\n\nconst MAX_TOOL_NAME_LENGTH = 63;\n\nfunction assertSafeName(name: string, kind: 'tool' | 'resource' | 'prompt'): string {\n if (kind === 'tool' && name.length > MAX_TOOL_NAME_LENGTH) {\n throw new McpInternalError(\n `Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`,\n );\n }\n return name;\n}\n\n/**\n * Build a tool name. Format: `<productName>_<...parts>` (snake_case).\n * Example: mcpToolName('vibecontrols', 'vibes', 'list') -> 'vibecontrols_vibes_list'\n */\nexport function mcpToolName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpToolName: productName is required');\n }\n const name = [productName, ...parts].filter(Boolean).join('_');\n return assertSafeName(name, 'tool');\n}\n\n/**\n * Build a resource URI. Format: `<productName>://<...parts>`.\n * Example: mcpResourceUri('vibecontrols', 'schema') -> 'vibecontrols://schema'\n */\nexport function mcpResourceUri(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpResourceUri: productName is required');\n }\n return `${productName}://${parts.filter(Boolean).join('/')}`;\n}\n\n/**\n * Build a prompt name. Format: `<productName>-<...parts>` (kebab-case).\n * Example: mcpPromptName('vibecontrols', 'setup') -> 'vibecontrols-setup'\n */\nexport function mcpPromptName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpPromptName: productName is required');\n }\n return [productName, ...parts].filter(Boolean).join('-');\n}\n\nexport const TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;\n\n/**\n * Name-based hint heuristics for MCP `annotations` (readOnlyHint /\n * destructiveHint). Used by tool-governance.ts to auto-fill annotations for\n * the fleet of product modules that call `server.registerTool` directly\n * (bypassing the `registerTool()` core helper) and so never set them\n * explicitly today (BOFF-3903). Deliberately conservative — matched against\n * whole `_`-delimited segments so e.g. `timeentries_delete` and\n * `pomodoro_delete_goal` match, but a hypothetical `undeletable_check`\n * would not.\n *\n * 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","// Live `supportTickets` on alpha takes no args and returns\n// `SupportTicketConnection { nodes { ... } }` (no `edges`, no\n// `items`, no `totalCount`, no `workspaceId` arg — workspace context\n// is taken from `x-workspace-id`). Same as PR #23's workspaces\n// endpoint behavior: the legacy `(filter, limit, offset)` shape\n// is gone.\n//\n// BOFF-8218: `closeSupportTicket(id: ID!)` on alpha requires the\n// ticket to be in `RESOLVED` state first — directly closing an open\n// ticket returns \"Ticket must be resolved before it can be closed\".\n// The MCP tool `support_tickets_close` chains a server-side\n// `resolveSupportTicket` call first, then closes. If a future alpha\n// release changes the requirement, this op chain can be simplified.\nexport const LIST_SUPPORT_TICKETS = `\n query ListSupportTickets {\n supportTickets {\n nodes { id ticketNumber subject status priority category createdAt }\n }\n }\n`;\n\nexport const GET_SUPPORT_TICKET = `\n query GetSupportTicket($id: ID!) {\n supportTicket(id: $id) {\n id ticketNumber subject description status priority category createdAt\n messages { id message createdAt isInternal }\n }\n }\n`;\n\nexport const CREATE_SUPPORT_TICKET = `\n mutation CreateSupportTicket($input: CreateSupportTicketInput!) {\n createSupportTicket(input: $input) {\n id ticketNumber status priority\n }\n }\n`;\n\nexport const CREATE_SUPPORT_MESSAGE = `\n mutation CreateSupportMessage($input: CreateSupportMessageInput!) {\n createSupportMessage(input: $input) {\n id message createdAt isInternal\n }\n }\n`;\n\n// Close a support ticket. BOFF-8218: alpha requires the ticket to be\n// in `RESOLVED` status first; the MCP tool performs the resolve step\n// before the close (see support/tools.ts) so the caller doesn't have\n// to know about the state-machine requirement.\nexport const CLOSE_SUPPORT_TICKET = `\n mutation CloseSupportTicket($id: ID!) {\n closeSupportTicket(id: $id) {\n id status closedAt\n }\n }\n`;\n\n// Pre-close state transition: resolve an open ticket. The MCP\n// `support_tickets_close` tool calls this first; exposed here for\n// callers that want to surface a \"resolved\" ticket without closing.\nexport const RESOLVE_SUPPORT_TICKET = `\n mutation ResolveSupportTicket($id: ID!) {\n resolveSupportTicket(id: $id) {\n id status resolvedAt\n }\n }\n`;\n\nexport const SEARCH_KNOWLEDGE_BASE = `\n query SearchKnowledgeBase($query: String!, $limit: Int, $offset: Int) {\n searchKnowledgeBase(query: $query, limit: $limit, offset: $offset) {\n id title slug helpfulnessScore\n }\n }\n`;\n","/**\n * Support MCP tools — support tickets + knowledge base.\n * Surface mirrors cli-sdk/src/modules/support/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 TicketRow {\n id: string;\n ticketNumber?: string;\n subject?: string;\n description?: string;\n status?: string;\n priority?: string;\n category?: string;\n createdAt?: string;\n closedAt?: string;\n}\n\ninterface KbArticle {\n id: string;\n title: string;\n slug: string;\n helpfulnessScore: number;\n}\n\nexport function registerSupportTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_list')),\n {\n title: 'List Support Tickets',\n description:\n 'List support tickets. Live `supportTickets` takes no args (workspace context from `x-workspace-id`); the legacy `(filter, limit, offset)` shape is gone and `status` / `priority` filtering is not yet exposed.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.global.request<{\n supportTickets: { nodes: TicketRow[] };\n }>(ops.LIST_SUPPORT_TICKETS);\n return jsonResult(data.supportTickets);\n } catch (error) {\n ctx.logger.error('support_tickets_list failed', { error: String(error) });\n return errorResult(\n `Failed to list support tickets: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_get')),\n {\n title: 'Get Support Ticket',\n description: 'Get a support ticket by ID, including messages.',\n inputSchema: { id: z.string().describe('Ticket ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.global.request<{ supportTicket: TicketRow | null }>(\n ops.GET_SUPPORT_TICKET,\n { id },\n );\n if (!data.supportTicket) return errorResult(`Ticket ${id} not found`);\n return jsonResult(data.supportTicket);\n } catch (error) {\n ctx.logger.error('support_tickets_get failed', { error: String(error) });\n return errorResult(\n `Failed to get support ticket: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_create')),\n {\n title: 'Create Support Ticket',\n description: 'Open a support ticket.',\n inputSchema: {\n subject: z.string().describe('Ticket subject'),\n description: z.string().describe('Ticket description'),\n priority: z.string().optional().describe('LOW|NORMAL|HIGH|URGENT (default NORMAL)'),\n category: z\n .string()\n .optional()\n .describe('TECHNICAL_SUPPORT|BILLING|FEATURE_REQUEST|OTHER (default TECHNICAL_SUPPORT)'),\n },\n },\n async ({ subject, description, priority, category }) => {\n try {\n const input: Record<string, unknown> = {\n subject,\n description,\n priority: (priority ?? 'NORMAL').toUpperCase(),\n category: (category ?? 'TECHNICAL_SUPPORT').toUpperCase(),\n };\n const data = await ctx.gql.global.request<{ createSupportTicket: TicketRow }>(\n ops.CREATE_SUPPORT_TICKET,\n { input },\n );\n return jsonResult(data.createSupportTicket);\n } catch (error) {\n ctx.logger.error('support_tickets_create failed', { error: String(error) });\n return errorResult(\n `Failed to create support ticket: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_comment')),\n {\n title: 'Add Support Ticket Comment',\n description: 'Add a comment to a support ticket.',\n inputSchema: {\n ticketId: z.string().describe('Ticket ID'),\n message: z.string().describe('Comment message'),\n internal: z.boolean().optional().describe('Internal staff-only comment (default false)'),\n },\n },\n async ({ ticketId, message, internal }) => {\n try {\n const input: Record<string, unknown> = {\n ticketId,\n message,\n isInternal: internal === true,\n };\n const data = await ctx.gql.global.request<{\n createSupportMessage: {\n id: string;\n message: string;\n createdAt: string;\n isInternal: boolean;\n };\n }>(ops.CREATE_SUPPORT_MESSAGE, { input });\n return jsonResult(data.createSupportMessage);\n } catch (error) {\n ctx.logger.error('support_tickets_comment failed', { error: String(error) });\n return errorResult(\n `Failed to add support ticket comment: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // BOFF-8218: live `closeSupportTicket` requires the ticket to be in\n // `RESOLVED` state first. To keep the user-facing surface simple\n // (one call closes a ticket), the tool first calls\n // `resolveSupportTicket(id)` (which is a no-op for already-resolved\n // tickets) and then `closeSupportTicket(id)`. If the close still\n // fails (e.g. the ticket is in a non-OPEN/RESOLVED state), the\n // tool surfaces the underlying alpha error.\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_close')),\n {\n title: 'Close Support Ticket',\n description:\n \"Close a support ticket. Live alpha requires the ticket to be RESOLVED first; the tool performs the resolve step before close, so callers don't need to track the state machine.\",\n inputSchema: { id: z.string().describe('Ticket ID') },\n },\n async ({ id }) => {\n try {\n // 1. Resolve (idempotent for already-resolved tickets; the\n // runtime error \"Ticket not in a resolvable state\" is OK\n // here because the close call will surface the real reason\n // if the ticket is in an unsupportable state).\n await ctx.gql.global\n .request<{ resolveSupportTicket: { id: string; status: string } | null }>(\n ops.RESOLVE_SUPPORT_TICKET,\n { id },\n )\n .catch(() => null);\n // 2. Close.\n const data = await ctx.gql.global.request<{ closeSupportTicket: TicketRow }>(\n ops.CLOSE_SUPPORT_TICKET,\n { id },\n );\n return jsonResult(data.closeSupportTicket);\n } catch (error) {\n ctx.logger.error('support_tickets_close failed', { error: String(error) });\n return errorResult(\n `Failed to close support ticket: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_kb_search')),\n {\n title: 'Search Knowledge Base',\n description: 'Search knowledge base articles.',\n inputSchema: {\n query: z.string().describe('Search query'),\n limit: z.number().optional().describe('Page size (default 20)'),\n },\n },\n async ({ query, limit }) => {\n try {\n const data = await ctx.gql.global.request<{ searchKnowledgeBase: KbArticle[] }>(\n ops.SEARCH_KNOWLEDGE_BASE,\n { query, limit: limit ?? 20, offset: 0 },\n );\n return jsonResult(data.searchKnowledgeBase);\n } catch (error) {\n ctx.logger.error('support_kb_search failed', { error: String(error) });\n return errorResult(\n `Failed to search knowledge base: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Support module — support tickets CRUD + comments + close + KB search.\n * Surface mirrors cli-sdk/src/modules/support/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerSupportTools } from './tools.js';\n\nconst supportModule: McpModule = {\n id: 'support',\n version: '0.0.1',\n displayName: 'Support',\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 registerSupportTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default supportModule;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/support/operations.ts","../../../src/modules/support/tools.ts","../../../src/modules/support/index.ts"],"names":["z"],"mappings":";;;;;;;;;;;AA8BO,IAAM,gBAAA,GAAN,cAA+B,KAAA,CAAM;AAAA,EACjB,KAAA;AAAA,EAEzB,WAAA,CAAY,SAAiB,KAAA,EAAiB;AAC5C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,kBAAA;AACZ,IAAA,IAAA,CAAK,KAAA,GAAQ,KAAA;AAAA,EACf;AACF,CAAA;;;AC1BA,IAAM,oBAAA,GAAuB,EAAA;AAE7B,SAAS,cAAA,CAAe,MAAc,IAAA,EAA8C;AAClF,EAAA,IAAuB,IAAA,CAAK,MAAA,GAAS,oBAAA,EAAsB;AACzD,IAAA,MAAM,IAAI,gBAAA;AAAA,MACR,CAAA,WAAA,EAAc,IAAI,CAAA,UAAA,EAAa,oBAAoB,CAAA,8CAAA;AAAA,KACrD;AAAA,EACF;AACA,EAAA,OAAO,IAAA;AACT;AAMO,SAAS,WAAA,CAAY,gBAAwB,KAAA,EAAyB;AAC3E,EAAA,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,MAAM,IAAI,iBAAiB,sCAAsC,CAAA;AAAA,EACnE;AACA,EAAA,MAAM,IAAA,GAAO,CAAC,WAAA,EAAa,GAAG,KAAK,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAC7D,EAAA,OAAO,cAAA,CAAe,IAAY,CAAA;AACpC;;;ACOO,SAAS,UAAA,CAAW,MAAe,UAAA,EAAkD;AAC1F,EAAA,MAAM,MAAA,GAAqB;AAAA,IACzB,OAAA,EAAS,CAAC,EAAE,IAAA,EAAM,MAAA,EAAQ,IAAA,EAAM,IAAA,C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AA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,eAAA,GAAQ","file":"index.cjs","sourcesContent":["/**\n * Error classes for MCP SDK.\n *\n * Modules MUST throw these instead of throwing raw Errors. The registerTool\n * wrapper in result.ts catches and maps them to MCP-protocol-compliant\n * `{ isError: true, content: [...] }` responses.\n *\n * Throwing past the wrapper to the protocol surfaces as JSON-RPC -32603 to\n * the client and is a protocol bug.\n */\n\nexport class McpUserError extends Error {\n public readonly hint: string | undefined;\n\n constructor(message: string, opts?: { hint?: string }) {\n super(message);\n this.name = 'McpUserError';\n this.hint = opts?.hint;\n }\n}\n\nexport class McpAuthError extends McpUserError {\n constructor(message: string, opts?: { hint?: string }) {\n super(message, {\n hint: opts?.hint ?? 'Run the auth_login tool to authenticate.',\n });\n this.name = 'McpAuthError';\n }\n}\n\nexport class McpInternalError extends Error {\n public override readonly cause: unknown;\n\n constructor(message: string, cause?: unknown) {\n super(message);\n this.name = 'McpInternalError';\n this.cause = cause;\n }\n}\n","/**\n * Tool / resource / prompt naming helpers.\n *\n * Mandatory product prefix avoids collisions when Claude Desktop runs\n * multiple MCP servers concurrently (typical setup is ~6).\n *\n * Tool names are capped at 63 characters — Claude Desktop pre-1.x\n * truncated at 64 in some versions.\n */\n\nimport { McpInternalError } from './errors.js';\n\nconst MAX_TOOL_NAME_LENGTH = 63;\n\nfunction assertSafeName(name: string, kind: 'tool' | 'resource' | 'prompt'): string {\n if (kind === 'tool' && name.length > MAX_TOOL_NAME_LENGTH) {\n throw new McpInternalError(\n `Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`,\n );\n }\n return name;\n}\n\n/**\n * Build a tool name. Format: `<productName>_<...parts>` (snake_case).\n * Example: mcpToolName('vibecontrols', 'vibes', 'list') -> 'vibecontrols_vibes_list'\n */\nexport function mcpToolName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpToolName: productName is required');\n }\n const name = [productName, ...parts].filter(Boolean).join('_');\n return assertSafeName(name, 'tool');\n}\n\n/**\n * Build a resource URI. Format: `<productName>://<...parts>`.\n * Example: mcpResourceUri('vibecontrols', 'schema') -> 'vibecontrols://schema'\n */\nexport function mcpResourceUri(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpResourceUri: productName is required');\n }\n return `${productName}://${parts.filter(Boolean).join('/')}`;\n}\n\n/**\n * Build a prompt name. Format: `<productName>-<...parts>` (kebab-case).\n * Example: mcpPromptName('vibecontrols', 'setup') -> 'vibecontrols-setup'\n */\nexport function mcpPromptName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpPromptName: productName is required');\n }\n return [productName, ...parts].filter(Boolean).join('-');\n}\n\nexport const TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;\n\n/**\n * Name-based hint heuristics for MCP `annotations` (readOnlyHint /\n * destructiveHint). Used by tool-governance.ts to auto-fill annotations for\n * the fleet of product modules that call `server.registerTool` directly\n * (bypassing the `registerTool()` core helper) and so never set them\n * explicitly today (BOFF-3903). Deliberately conservative — matched against\n * whole `_`-delimited segments so e.g. `timeentries_delete` and\n * `pomodoro_delete_goal` match, but a hypothetical `undeletable_check`\n * would not.\n *\n * The destructive verb set covers more than `delete`: stopping, killing or\n * terminating a running process, revoking or rotating a credential/share,\n * resetting settings and removing/purging/uninstalling are all actions an\n * MCP client must not auto-run without the user's intent (VC/FG parity G57 —\n * e.g. `vibecontrols_sessions_kill`, `vibecontrols_tunnels_rotate_credentials`\n * were previously reported as non-destructive).\n *\n * A module can always override the inference by passing an explicit\n * `annotations` object to `registerTool()` / `server.registerTool()` — do\n * that for the rare verb match that is harmless (e.g. a typing indicator's\n * `typing_stop`).\n */\nexport const DESTRUCTIVE_NAME_VERBS = [\n 'delete',\n 'destroy',\n 'erase',\n 'kill',\n 'purge',\n 'remove',\n 'reset',\n 'revoke',\n 'rotate',\n 'stop',\n 'terminate',\n 'uninstall',\n 'wipe',\n] as const;\nconst DESTRUCTIVE_NAME_SEGMENT = new RegExp(\n `(?:^|_)(?:${DESTRUCTIVE_NAME_VERBS.join('|')})(?:_|$)`,\n 'i',\n);\nconst READ_ONLY_NAME_SEGMENT = /(?:^|_)(?:list|get|search|check|read|count|stats|by_date)(?:_|$)/i;\n\n/** True when a tool name looks destructive (irreversibly deletes data) by naming convention. */\nexport function inferDestructiveHint(toolName: string): boolean {\n return DESTRUCTIVE_NAME_SEGMENT.test(toolName);\n}\n\n/**\n * True when a tool name looks read-only by naming convention. Never true for\n * a name that also looks destructive (a tool can't be both).\n */\nexport function inferReadOnlyHint(toolName: string): boolean {\n return !inferDestructiveHint(toolName) && READ_ONLY_NAME_SEGMENT.test(toolName);\n}\n","/**\n * MCP tool result helpers + central handler.\n *\n * Modules NEVER call server.registerTool directly — they use registerTool()\n * from this module so the central try/catch wraps the handler and:\n * - maps thrown McpUserError / McpAuthError / McpInternalError to\n * MCP-protocol-compliant `{ isError: true, content: [...] }` shapes\n * - threads `_meta.progressToken` into ctx.progress for long ops\n * - emits a structured log line on every error\n * - never leaks `cause` from McpInternalError to the client\n *\n * This is the analog of cli-sdk's createProgram() central error handler.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { ZodRawShape } from 'zod';\nimport type { McpContext } from './context.js';\nimport { McpAuthError, McpInternalError, McpUserError } from './errors.js';\nimport type { ToolAnnotations } from './tool-governance.js';\n\nexport interface ToolTextContent {\n type: 'text';\n text: string;\n [k: string]: unknown;\n}\n\nexport interface ToolResult {\n content: ToolTextContent[];\n isError?: boolean;\n structuredContent?: Record<string, unknown>;\n [k: string]: unknown;\n}\n\nexport interface ToolMeta {\n progressToken?: string | number;\n}\n\n/**\n * Build a successful tool result with JSON content (pretty-printed).\n */\nexport function jsonResult(data: unknown, structured?: Record<string, unknown>): ToolResult {\n const result: ToolResult = {\n content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],\n };\n if (structured !== undefined) {\n result.structuredContent = structured;\n }\n return result;\n}\n\n/**\n * Build a successful tool result with plain text content.\n */\nexport function textResult(text: string): ToolResult {\n return { content: [{ type: 'text', text }] };\n}\n\n/**\n * Build an error tool result. Honors MCP's `{ isError: true, content }` shape.\n * Optional hint is appended on a new line so the LLM can react.\n */\nexport function errorResult(message: string, hint?: string): ToolResult {\n const text = hint ? `${message}\\n\\nHint: ${hint}` : message;\n return { content: [{ type: 'text', text }], isError: true };\n}\n\nexport interface ToolMetadata {\n title: string;\n description: string;\n inputSchema?: ZodRawShape;\n /**\n * Explicit MCP annotations (readOnlyHint / destructiveHint / ...). Optional\n * — when omitted, `wrapServerWithToolGovernance` (applied centrally in\n * `createMcpServer`) infers them from the tool name. Set this to override\n * the inference for a tool whose name doesn't match the naming convention.\n */\n annotations?: ToolAnnotations;\n}\n\nexport type ToolHandler<TArgs = Record<string, unknown>> = (\n args: TArgs,\n ctx: McpContext,\n meta: ToolMeta,\n) => Promise<unknown>;\n\n/**\n * Register a tool with the central error wrapper.\n *\n * The handler returns a plain value or void. The wrapper:\n * - wraps non-undefined returns in jsonResult()\n * - if the value already looks like a ToolResult (has `content`), passes through\n * - catches McpAuthError / McpUserError / McpInternalError / generic Error\n * - logs every error via ctx.logger.error\n */\nexport function registerTool<TArgs extends Record<string, unknown>>(\n server: McpServer,\n ctx: McpContext,\n name: string,\n metadata: ToolMetadata,\n handler: ToolHandler<TArgs>,\n): void {\n const sdkConfig = {\n title: metadata.title,\n description: metadata.description,\n ...(metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {}),\n ...(metadata.annotations ? { annotations: metadata.annotations } : {}),\n };\n\n // The MCP SDK's registerTool signature is `(name, config, handler)`. The\n // handler arity depends on whether inputSchema is present (1-arg without,\n // 2-arg with). We accept a unified handler shape and dispatch at runtime.\n // The SDK's typing is strict and conditional on the inputSchema generic;\n // bypass with a cast since runtime acceptance is unconditional.\n const wrapped = async (...callbackArgs: unknown[]): Promise<ToolResult> => {\n const hasArgs = callbackArgs.length === 2;\n const args = (hasArgs ? callbackArgs[0] : {}) as TArgs;\n const extra = (hasArgs ? callbackArgs[1] : callbackArgs[0]) as\n { _meta?: { progressToken?: string | number } } | undefined;\n\n const progressToken = extra?._meta?.progressToken;\n const meta: ToolMeta = progressToken !== undefined ? { progressToken } : {};\n\n try {\n const result = await handler(args, ctx, meta);\n if (isToolResult(result)) return result;\n if (result === undefined) return textResult('OK');\n return jsonResult(result);\n } catch (error) {\n return mapErrorToResult(error, ctx, name);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (server as any).registerTool(name, sdkConfig, wrapped);\n}\n\nfunction isToolResult(value: unknown): value is ToolResult {\n return (\n !!value &&\n typeof value === 'object' &&\n 'content' in value &&\n Array.isArray((value as ToolResult).content)\n );\n}\n\nfunction mapErrorToResult(error: unknown, ctx: McpContext, toolName: string): ToolResult {\n if (error instanceof McpAuthError) {\n ctx.logger.warn(`${toolName}: auth required`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpUserError) {\n ctx.logger.info(`${toolName}: user error`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpInternalError) {\n ctx.logger.error(`${toolName}: internal error`, {\n message: error.message,\n cause: stringifyCause(error.cause),\n });\n return errorResult(`Internal error in ${toolName}.`);\n }\n const message = error instanceof Error ? error.message : String(error);\n ctx.logger.error(`${toolName}: unhandled error`, { message });\n return errorResult(`${toolName}: ${message}`);\n}\n\nfunction stringifyCause(cause: unknown): string | undefined {\n if (cause === undefined || cause === null) return undefined;\n if (cause instanceof Error) return cause.message;\n try {\n return JSON.stringify(cause);\n } catch {\n return String(cause);\n }\n}\n","// Live `supportTickets` on alpha takes no args and returns\n// `SupportTicketConnection { nodes { ... } }` (no `edges`, no\n// `items`, no `totalCount`, no `workspaceId` arg — workspace context\n// is taken from `x-workspace-id`). Same as PR #23's workspaces\n// endpoint behavior: the legacy `(filter, limit, offset)` shape\n// is gone.\n//\n// BOFF-8218: `closeSupportTicket(id: ID!)` on alpha requires the\n// ticket to be in `RESOLVED` state first — directly closing an open\n// ticket returns \"Ticket must be resolved before it can be closed\".\n// The MCP tool `support_tickets_close` chains a server-side\n// `resolveSupportTicket` call first, then closes. If a future alpha\n// release changes the requirement, this op chain can be simplified.\nexport const LIST_SUPPORT_TICKETS = `\n query ListSupportTickets {\n supportTickets {\n nodes { id ticketNumber subject status priority category createdAt }\n }\n }\n`;\n\nexport const GET_SUPPORT_TICKET = `\n query GetSupportTicket($id: ID!) {\n supportTicket(id: $id) {\n id ticketNumber subject description status priority category createdAt\n messages { id message createdAt isInternal }\n }\n }\n`;\n\nexport const CREATE_SUPPORT_TICKET = `\n mutation CreateSupportTicket($input: CreateSupportTicketInput!) {\n createSupportTicket(input: $input) {\n id ticketNumber status priority\n }\n }\n`;\n\nexport const CREATE_SUPPORT_MESSAGE = `\n mutation CreateSupportMessage($input: CreateSupportMessageInput!) {\n createSupportMessage(input: $input) {\n id message createdAt isInternal\n }\n }\n`;\n\n// Close a support ticket. BOFF-8218: alpha requires the ticket to be\n// in `RESOLVED` status first; the MCP tool performs the resolve step\n// before the close (see support/tools.ts) so the caller doesn't have\n// to know about the state-machine requirement.\nexport const CLOSE_SUPPORT_TICKET = `\n mutation CloseSupportTicket($id: ID!) {\n closeSupportTicket(id: $id) {\n id status closedAt\n }\n }\n`;\n\n// Pre-close state transition: resolve an open ticket. The MCP\n// `support_tickets_close` tool calls this first; exposed here for\n// callers that want to surface a \"resolved\" ticket without closing.\nexport const RESOLVE_SUPPORT_TICKET = `\n mutation ResolveSupportTicket($id: ID!) {\n resolveSupportTicket(id: $id) {\n id status resolvedAt\n }\n }\n`;\n\nexport const SEARCH_KNOWLEDGE_BASE = `\n query SearchKnowledgeBase($query: String!, $limit: Int, $offset: Int) {\n searchKnowledgeBase(query: $query, limit: $limit, offset: $offset) {\n id title slug helpfulnessScore\n }\n }\n`;\n","/**\n * Support MCP tools — support tickets + knowledge base.\n * Surface mirrors cli-sdk/src/modules/support/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 TicketRow {\n id: string;\n ticketNumber?: string;\n subject?: string;\n description?: string;\n status?: string;\n priority?: string;\n category?: string;\n createdAt?: string;\n closedAt?: string;\n}\n\ninterface KbArticle {\n id: string;\n title: string;\n slug: string;\n helpfulnessScore: number;\n}\n\nexport function registerSupportTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_list')),\n {\n title: 'List Support Tickets',\n description:\n 'List support tickets. Live `supportTickets` takes no args (workspace context from `x-workspace-id`); the legacy `(filter, limit, offset)` shape is gone and `status` / `priority` filtering is not yet exposed.',\n inputSchema: {},\n },\n async () => {\n try {\n const data = await ctx.gql.global.request<{\n supportTickets: { nodes: TicketRow[] };\n }>(ops.LIST_SUPPORT_TICKETS);\n return jsonResult(data.supportTickets);\n } catch (error) {\n ctx.logger.error('support_tickets_list failed', { error: String(error) });\n return errorResult(\n `Failed to list support tickets: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_get')),\n {\n title: 'Get Support Ticket',\n description: 'Get a support ticket by ID, including messages.',\n inputSchema: { id: z.string().describe('Ticket ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.global.request<{ supportTicket: TicketRow | null }>(\n ops.GET_SUPPORT_TICKET,\n { id },\n );\n if (!data.supportTicket) return errorResult(`Ticket ${id} not found`);\n return jsonResult(data.supportTicket);\n } catch (error) {\n ctx.logger.error('support_tickets_get failed', { error: String(error) });\n return errorResult(\n `Failed to get support ticket: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_create')),\n {\n title: 'Create Support Ticket',\n description: 'Open a support ticket.',\n inputSchema: {\n subject: z.string().describe('Ticket subject'),\n description: z.string().describe('Ticket description'),\n priority: z.string().optional().describe('LOW|NORMAL|HIGH|URGENT (default NORMAL)'),\n category: z\n .string()\n .optional()\n .describe('TECHNICAL_SUPPORT|BILLING|FEATURE_REQUEST|OTHER (default TECHNICAL_SUPPORT)'),\n },\n },\n async ({ subject, description, priority, category }) => {\n try {\n const input: Record<string, unknown> = {\n subject,\n description,\n priority: (priority ?? 'NORMAL').toUpperCase(),\n category: (category ?? 'TECHNICAL_SUPPORT').toUpperCase(),\n };\n const data = await ctx.gql.global.request<{ createSupportTicket: TicketRow }>(\n ops.CREATE_SUPPORT_TICKET,\n { input },\n );\n return jsonResult(data.createSupportTicket);\n } catch (error) {\n ctx.logger.error('support_tickets_create failed', { error: String(error) });\n return errorResult(\n `Failed to create support ticket: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_comment')),\n {\n title: 'Add Support Ticket Comment',\n description: 'Add a comment to a support ticket.',\n inputSchema: {\n ticketId: z.string().describe('Ticket ID'),\n message: z.string().describe('Comment message'),\n internal: z.boolean().optional().describe('Internal staff-only comment (default false)'),\n },\n },\n async ({ ticketId, message, internal }) => {\n try {\n const input: Record<string, unknown> = {\n ticketId,\n message,\n isInternal: internal === true,\n };\n const data = await ctx.gql.global.request<{\n createSupportMessage: {\n id: string;\n message: string;\n createdAt: string;\n isInternal: boolean;\n };\n }>(ops.CREATE_SUPPORT_MESSAGE, { input });\n return jsonResult(data.createSupportMessage);\n } catch (error) {\n ctx.logger.error('support_tickets_comment failed', { error: String(error) });\n return errorResult(\n `Failed to add support ticket comment: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // BOFF-8218: live `closeSupportTicket` requires the ticket to be in\n // `RESOLVED` state first. To keep the user-facing surface simple\n // (one call closes a ticket), the tool first calls\n // `resolveSupportTicket(id)` (which is a no-op for already-resolved\n // tickets) and then `closeSupportTicket(id)`. If the close still\n // fails (e.g. the ticket is in a non-OPEN/RESOLVED state), the\n // tool surfaces the underlying alpha error.\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_tickets_close')),\n {\n title: 'Close Support Ticket',\n description:\n \"Close a support ticket. Live alpha requires the ticket to be RESOLVED first; the tool performs the resolve step before close, so callers don't need to track the state machine.\",\n inputSchema: { id: z.string().describe('Ticket ID') },\n },\n async ({ id }) => {\n try {\n // 1. Resolve (idempotent for already-resolved tickets; the\n // runtime error \"Ticket not in a resolvable state\" is OK\n // here because the close call will surface the real reason\n // if the ticket is in an unsupportable state).\n await ctx.gql.global\n .request<{ resolveSupportTicket: { id: string; status: string } | null }>(\n ops.RESOLVE_SUPPORT_TICKET,\n { id },\n )\n .catch(() => null);\n // 2. Close.\n const data = await ctx.gql.global.request<{ closeSupportTicket: TicketRow }>(\n ops.CLOSE_SUPPORT_TICKET,\n { id },\n );\n return jsonResult(data.closeSupportTicket);\n } catch (error) {\n ctx.logger.error('support_tickets_close failed', { error: String(error) });\n return errorResult(\n `Failed to close support ticket: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'support_kb_search')),\n {\n title: 'Search Knowledge Base',\n description: 'Search knowledge base articles.',\n inputSchema: {\n query: z.string().describe('Search query'),\n limit: z.number().optional().describe('Page size (default 20)'),\n },\n },\n async ({ query, limit }) => {\n try {\n const data = await ctx.gql.global.request<{ searchKnowledgeBase: KbArticle[] }>(\n ops.SEARCH_KNOWLEDGE_BASE,\n { query, limit: limit ?? 20, offset: 0 },\n );\n return jsonResult(data.searchKnowledgeBase);\n } catch (error) {\n ctx.logger.error('support_kb_search failed', { error: String(error) });\n return errorResult(\n `Failed to search knowledge base: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Support module — support tickets CRUD + comments + close + KB search.\n * Surface mirrors cli-sdk/src/modules/support/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerSupportTools } from './tools.js';\n\nconst supportModule: McpModule = {\n id: 'support',\n version: '0.0.1',\n displayName: 'Support',\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 registerSupportTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default supportModule;\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 supportModule: McpModule;
|
|
7
|
-
|
|
8
|
-
export { supportModule as default };
|
|
3
|
+
export default supportModule;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const LIST_SUPPORT_TICKETS = "\n query ListSupportTickets {\n supportTickets {\n nodes { id ticketNumber subject status priority category createdAt }\n }\n }\n";
|
|
2
|
+
export declare const GET_SUPPORT_TICKET = "\n query GetSupportTicket($id: ID!) {\n supportTicket(id: $id) {\n id ticketNumber subject description status priority category createdAt\n messages { id message createdAt isInternal }\n }\n }\n";
|
|
3
|
+
export declare const CREATE_SUPPORT_TICKET = "\n mutation CreateSupportTicket($input: CreateSupportTicketInput!) {\n createSupportTicket(input: $input) {\n id ticketNumber status priority\n }\n }\n";
|
|
4
|
+
export declare const CREATE_SUPPORT_MESSAGE = "\n mutation CreateSupportMessage($input: CreateSupportMessageInput!) {\n createSupportMessage(input: $input) {\n id message createdAt isInternal\n }\n }\n";
|
|
5
|
+
export declare const CLOSE_SUPPORT_TICKET = "\n mutation CloseSupportTicket($id: ID!) {\n closeSupportTicket(id: $id) {\n id status closedAt\n }\n }\n";
|
|
6
|
+
export declare const RESOLVE_SUPPORT_TICKET = "\n mutation ResolveSupportTicket($id: ID!) {\n resolveSupportTicket(id: $id) {\n id status resolvedAt\n }\n }\n";
|
|
7
|
+
export declare const SEARCH_KNOWLEDGE_BASE = "\n query SearchKnowledgeBase($query: String!, $limit: Int, $offset: Int) {\n searchKnowledgeBase(query: $query, limit: $limit, offset: $offset) {\n id title slug helpfulnessScore\n }\n }\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/tags/tools.ts","../../../src/modules/tags/index.ts"],"names":[],"mappings":";;;;;;;;;;;AA8BO,IAAM,gBAAA,GAAN,cAA+B,KAAA,CAAM;AAAA,EACjB,KAAA;AAAA,EAEzB,WAAA,CAAY,SAAiB,KAAA,EAAiB;AAC5C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,kBAAA;AACZ,IAAA,IAAA,CAAK,KAAA,GAAQ,KAAA;AAAA,EACf;AACF,CAAA;;;AC1BA,IAAM,oBAAA,GAAuB,EAAA;AAE7B,SAAS,cAAA,CAAe,MAAc,IAAA,EAA8C;AAClF,EAAA,IAAuB,IAAA,CAAK,MAAA,GAAS,oBAAA,EAAsB;AACzD,IAAA,MAAM,IAAI,gBAAA;AAAA,MACR,CAAA,WAAA,EAAc,IAAI,CAAA,UAAA,EAAa,oBAAoB,CAAA,8CAAA;AAAA,KACrD;AAAA,EACF;AACA,EAAA,OAAO,IAAA;AACT;AAMO,SAAS,WAAA,CAAY,gBAAwB,KAAA,EAAyB;AAC3E,EAAA,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,MAAM,IAAI,iBAAiB,sCAAsC,CAAA;AAAA,EACnE;AACA,EAAA,MAAM,IAAA,GAAO,CAAC,WAAA,EAAa,GAAG,KAAK,EA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throw these instead of throwing raw Errors. The registerTool\n * wrapper in result.ts catches and maps them to MCP-protocol-compliant\n * `{ isError: true, content: [...] }` responses.\n *\n * Throwing past the wrapper to the protocol surfaces as JSON-RPC -32603 to\n * the client and is a protocol bug.\n */\n\nexport class McpUserError extends Error {\n public readonly hint: string | undefined;\n\n constructor(message: string, opts?: { hint?: string }) {\n super(message);\n this.name = 'McpUserError';\n this.hint = opts?.hint;\n }\n}\n\nexport class McpAuthError extends McpUserError {\n constructor(message: string, opts?: { hint?: string }) {\n super(message, {\n hint: opts?.hint ?? 'Run the auth_login tool to authenticate.',\n });\n this.name = 'McpAuthError';\n }\n}\n\nexport class McpInternalError extends Error {\n public override readonly cause: unknown;\n\n constructor(message: string, cause?: unknown) {\n super(message);\n this.name = 'McpInternalError';\n this.cause = cause;\n }\n}\n","/**\n * Tool / resource / prompt naming helpers.\n *\n * Mandatory product prefix avoids collisions when Claude Desktop runs\n * multiple MCP servers concurrently (typical setup is ~6).\n *\n * Tool names are capped at 63 characters — Claude Desktop pre-1.x\n * truncated at 64 in some versions.\n */\n\nimport { McpInternalError } from './errors.js';\n\nconst MAX_TOOL_NAME_LENGTH = 63;\n\nfunction assertSafeName(name: string, kind: 'tool' | 'resource' | 'prompt'): string {\n if (kind === 'tool' && name.length > MAX_TOOL_NAME_LENGTH) {\n throw new McpInternalError(\n `Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`,\n );\n }\n return name;\n}\n\n/**\n * Build a tool name. Format: `<productName>_<...parts>` (snake_case).\n * Example: mcpToolName('vibecontrols', 'vibes', 'list') -> 'vibecontrols_vibes_list'\n */\nexport function mcpToolName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpToolName: productName is required');\n }\n const name = [productName, ...parts].filter(Boolean).join('_');\n return assertSafeName(name, 'tool');\n}\n\n/**\n * Build a resource URI. Format: `<productName>://<...parts>`.\n * Example: mcpResourceUri('vibecontrols', 'schema') -> 'vibecontrols://schema'\n */\nexport function mcpResourceUri(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpResourceUri: productName is required');\n }\n return `${productName}://${parts.filter(Boolean).join('/')}`;\n}\n\n/**\n * Build a prompt name. Format: `<productName>-<...parts>` (kebab-case).\n * Example: mcpPromptName('vibecontrols', 'setup') -> 'vibecontrols-setup'\n */\nexport function mcpPromptName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpPromptName: productName is required');\n }\n return [productName, ...parts].filter(Boolean).join('-');\n}\n\nexport const TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;\n\n/**\n * Name-based hint heuristics for MCP `annotations` (readOnlyHint /\n * destructiveHint). Used by tool-governance.ts to auto-fill annotations for\n * the fleet of product modules that call `server.registerTool` directly\n * (bypassing the `registerTool()` core helper) and so never set them\n * explicitly today (BOFF-3903). Deliberately conservative — matched against\n * whole `_`-delimited segments so e.g. `timeentries_delete` and\n * `pomodoro_delete_goal` match, but a hypothetical `undeletable_check`\n * would not.\n *\n * A module can always override the inference by passing an explicit\n * `annotations` object to `registerTool()` / `server.registerTool()`.\n */\nconst DESTRUCTIVE_NAME_SEGMENT = /(?:^|_)delete(?:_|$)/i;\nconst READ_ONLY_NAME_SEGMENT = /(?:^|_)(?:list|get|search|check|read|count|stats|by_date)(?:_|$)/i;\n\n/** True when a tool name looks destructive (irreversibly deletes data) by naming convention. */\nexport function inferDestructiveHint(toolName: string): boolean {\n return DESTRUCTIVE_NAME_SEGMENT.test(toolName);\n}\n\n/**\n * True when a tool name looks read-only by naming convention. Never true for\n * a name that also looks destructive (a tool can't be both).\n */\nexport function inferReadOnlyHint(toolName: string): boolean {\n return !inferDestructiveHint(toolName) && READ_ONLY_NAME_SEGMENT.test(toolName);\n}\n","/**\n * MCP tool result helpers + central handler.\n *\n * Modules NEVER call server.registerTool directly — they use registerTool()\n * from this module so the central try/catch wraps the handler and:\n * - maps thrown McpUserError / McpAuthError / McpInternalError to\n * MCP-protocol-compliant `{ isError: true, content: [...] }` shapes\n * - threads `_meta.progressToken` into ctx.progress for long ops\n * - emits a structured log line on every error\n * - never leaks `cause` from McpInternalError to the client\n *\n * This is the analog of cli-sdk's createProgram() central error handler.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { ZodRawShape } from 'zod';\nimport type { McpContext } from './context.js';\nimport { McpAuthError, McpInternalError, McpUserError } from './errors.js';\nimport type { ToolAnnotations } from './tool-governance.js';\n\nexport interface ToolTextContent {\n type: 'text';\n text: string;\n [k: string]: unknown;\n}\n\nexport interface ToolResult {\n content: ToolTextContent[];\n isError?: boolean;\n structuredContent?: Record<string, unknown>;\n [k: string]: unknown;\n}\n\nexport interface ToolMeta {\n progressToken?: string | number;\n}\n\n/**\n * Build a successful tool result with JSON content (pretty-printed).\n */\nexport function jsonResult(data: unknown, structured?: Record<string, unknown>): ToolResult {\n const result: ToolResult = {\n content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],\n };\n if (structured !== undefined) {\n result.structuredContent = structured;\n }\n return result;\n}\n\n/**\n * Build a successful tool result with plain text content.\n */\nexport function textResult(text: string): ToolResult {\n return { content: [{ type: 'text', text }] };\n}\n\n/**\n * Build an error tool result. Honors MCP's `{ isError: true, content }` shape.\n * Optional hint is appended on a new line so the LLM can react.\n */\nexport function errorResult(message: string, hint?: string): ToolResult {\n const text = hint ? `${message}\\n\\nHint: ${hint}` : message;\n return { content: [{ type: 'text', text }], isError: true };\n}\n\nexport interface ToolMetadata {\n title: string;\n description: string;\n inputSchema?: ZodRawShape;\n /**\n * Explicit MCP annotations (readOnlyHint / destructiveHint / ...). Optional\n * — when omitted, `wrapServerWithToolGovernance` (applied centrally in\n * `createMcpServer`) infers them from the tool name. Set this to override\n * the inference for a tool whose name doesn't match the naming convention.\n */\n annotations?: ToolAnnotations;\n}\n\nexport type ToolHandler<TArgs = Record<string, unknown>> = (\n args: TArgs,\n ctx: McpContext,\n meta: ToolMeta,\n) => Promise<unknown>;\n\n/**\n * Register a tool with the central error wrapper.\n *\n * The handler returns a plain value or void. The wrapper:\n * - wraps non-undefined returns in jsonResult()\n * - if the value already looks like a ToolResult (has `content`), passes through\n * - catches McpAuthError / McpUserError / McpInternalError / generic Error\n * - logs every error via ctx.logger.error\n */\nexport function registerTool<TArgs extends Record<string, unknown>>(\n server: McpServer,\n ctx: McpContext,\n name: string,\n metadata: ToolMetadata,\n handler: ToolHandler<TArgs>,\n): void {\n const sdkConfig = {\n title: metadata.title,\n description: metadata.description,\n ...(metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {}),\n ...(metadata.annotations ? { annotations: metadata.annotations } : {}),\n };\n\n // The MCP SDK's registerTool signature is `(name, config, handler)`. The\n // handler arity depends on whether inputSchema is present (1-arg without,\n // 2-arg with). We accept a unified handler shape and dispatch at runtime.\n // The SDK's typing is strict and conditional on the inputSchema generic;\n // bypass with a cast since runtime acceptance is unconditional.\n const wrapped = async (...callbackArgs: unknown[]): Promise<ToolResult> => {\n const hasArgs = callbackArgs.length === 2;\n const args = (hasArgs ? callbackArgs[0] : {}) as TArgs;\n const extra = (hasArgs ? callbackArgs[1] : callbackArgs[0]) as\n { _meta?: { progressToken?: string | number } } | undefined;\n\n const progressToken = extra?._meta?.progressToken;\n const meta: ToolMeta = progressToken !== undefined ? { progressToken } : {};\n\n try {\n const result = await handler(args, ctx, meta);\n if (isToolResult(result)) return result;\n if (result === undefined) return textResult('OK');\n return jsonResult(result);\n } catch (error) {\n return mapErrorToResult(error, ctx, name);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (server as any).registerTool(name, sdkConfig, wrapped);\n}\n\nfunction isToolResult(value: unknown): value is ToolResult {\n return (\n !!value &&\n typeof value === 'object' &&\n 'content' in value &&\n Array.isArray((value as ToolResult).content)\n );\n}\n\nfunction mapErrorToResult(error: unknown, ctx: McpContext, toolName: string): ToolResult {\n if (error instanceof McpAuthError) {\n ctx.logger.warn(`${toolName}: auth required`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpUserError) {\n ctx.logger.info(`${toolName}: user error`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpInternalError) {\n ctx.logger.error(`${toolName}: internal error`, {\n message: error.message,\n cause: stringifyCause(error.cause),\n });\n return errorResult(`Internal error in ${toolName}.`);\n }\n const message = error instanceof Error ? error.message : String(error);\n ctx.logger.error(`${toolName}: unhandled error`, { message });\n return errorResult(`${toolName}: ${message}`);\n}\n\nfunction stringifyCause(cause: unknown): string | undefined {\n if (cause === undefined || cause === null) return undefined;\n if (cause instanceof Error) return cause.message;\n try {\n return JSON.stringify(cause);\n } catch {\n return String(cause);\n }\n}\n","import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { errorResult, mcpToolName, type McpContext } from '../../core/index.js';\n\ntype StubInputSchema = Record<string, z.ZodTypeAny>;\nfunction stubbedTool(\n server: McpServer,\n toolName: string,\n title: string,\n description: string,\n featureNote: string,\n inputSchema: StubInputSchema,\n altSuggestions: string[],\n): void {\n server.registerTool(\n toolName,\n {\n title,\n description: `${description} [STUB]`,\n inputSchema,\n },\n async () =>\n errorResult(\n `[stubbed] ${featureNote} Use ${altSuggestions.join(', ')} instead. The tool remains registered so callers receive a meaningful response instead of a schema-validation error.`,\n ),\n );\n}\n\nexport function registerTagsTools(\n server: McpServer,\n _ctx: McpContext,\n track: (n: string) => string,\n): void {\n // BOFF-8201: `Query.tags` on the live alpha gateway is fundamentally\n // broken — even a selection of just `{ name }` returns an\n // INTERNAL_SERVER_ERROR. The whole tags surface is unreachable\n // until alpha ships a fix. Stub all 9 tools so callers get a clean\n // \"[stubbed]\" error and the per-call wiring is in place for the day\n // the tags service recovers.\n const featureNote =\n 'Live alpha has `Query.tags` returning INTERNAL_SERVER_ERROR on even the simplest selection (`{ name }`). The whole tags surface is down until the service recovers.';\n const alts = [\n 'the next alpha release that restores the tags surface',\n 'the SDK tags API (which the MCP will mirror once it lands)',\n ];\n\n const tools: Array<[string, string, string]> = [\n ['tags_list', 'List Tags', 'List tags in the active workspace.'],\n ['tags_get', 'Get Tag', 'Get a tag by ID.'],\n ['tags_create', 'Create Tag', 'Create a new tag (requires `vocabularyId` on alpha).'],\n ['tags_update', 'Update Tag', 'Update an existing tag.'],\n ['tags_delete', 'Delete Tag', 'Delete a tag by ID.'],\n ['tags_analytics', 'Tag Analytics', 'Get analytics for a tag (assignment / usage counts).'],\n [\n 'tags_permissions_list',\n 'List Tag Permissions',\n 'List tag-permission grants in the workspace.',\n ],\n ['tags_permissions_grant', 'Grant Tag Permission', 'Grant a tag permission.'],\n ['tags_permissions_revoke', 'Revoke Tag Permission', 'Revoke a tag permission.'],\n ];\n for (const [tool, title, desc] of tools) {\n stubbedTool(\n server,\n track(mcpToolName(_ctx.productName, tool)),\n title,\n desc,\n featureNote,\n {},\n alts,\n );\n }\n}\n","/**\n * Tags module — CANONICAL reference module per CLAUDE.md.\n *\n * Tools: <product>_tags_{list,get,create,update,delete,analytics} +\n * <product>_tags_relations_{list,grant,revoke}.\n *\n * Backend: ~/products/wspace/tags/wspace-tags-svc/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerTagsTools } from './tools.js';\n\nconst tagsModule: McpModule = {\n id: 'tags',\n version: '0.0.1',\n displayName: 'Tags',\n dependsOn: ['auth'],\n capabilities: { tools: {} },\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 registerTagsTools(server, ctx, track);\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default tagsModule;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/core/errors.ts","../../../src/core/tool-name.ts","../../../src/core/result.ts","../../../src/modules/tags/tools.ts","../../../src/modules/tags/index.ts"],"names":[],"mappings":";;;;;;;;;;;AA8BO,I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;AAAA,MACA,WAAA;AAAA,MACA,EAAC;AAAA,MACD;AAAA,KACF;AAAA,EACF;AACF;;;AC3DA,IAAM,UAAA,GAAwB;AAAA,EAC5B,EAAA,EAAI,MAAA;AAAA,EACJ,OAAA,EAAS,OAAA;AAAA,EACT,WAAA,EAAa,MAAA;AAAA,EACb,SAAA,EAAW,CAAC,MAAM,CAAA;AAAA,EAClB,YAAA,EAAc,EAAE,KAAA,EAAO,EAAC,EAAE;AAAA,EAC1B,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;AACA,IAAA,iBAAA,CAAkB,MAAA,EAAQ,KAAK,KAAK,CAAA;AACpC,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,YAAA,GAAQ","file":"index.cjs","sourcesContent":["/**\n * Error classes for MCP SDK.\n *\n * Modules MUST throw these instead of throwing raw Errors. The registerTool\n * wrapper in result.ts catches and maps them to MCP-protocol-compliant\n * `{ isError: true, content: [...] }` responses.\n *\n * Throwing past the wrapper to the protocol surfaces as JSON-RPC -32603 to\n * the client and is a protocol bug.\n */\n\nexport class McpUserError extends Error {\n public readonly hint: string | undefined;\n\n constructor(message: string, opts?: { hint?: string }) {\n super(message);\n this.name = 'McpUserError';\n this.hint = opts?.hint;\n }\n}\n\nexport class McpAuthError extends McpUserError {\n constructor(message: string, opts?: { hint?: string }) {\n super(message, {\n hint: opts?.hint ?? 'Run the auth_login tool to authenticate.',\n });\n this.name = 'McpAuthError';\n }\n}\n\nexport class McpInternalError extends Error {\n public override readonly cause: unknown;\n\n constructor(message: string, cause?: unknown) {\n super(message);\n this.name = 'McpInternalError';\n this.cause = cause;\n }\n}\n","/**\n * Tool / resource / prompt naming helpers.\n *\n * Mandatory product prefix avoids collisions when Claude Desktop runs\n * multiple MCP servers concurrently (typical setup is ~6).\n *\n * Tool names are capped at 63 characters — Claude Desktop pre-1.x\n * truncated at 64 in some versions.\n */\n\nimport { McpInternalError } from './errors.js';\n\nconst MAX_TOOL_NAME_LENGTH = 63;\n\nfunction assertSafeName(name: string, kind: 'tool' | 'resource' | 'prompt'): string {\n if (kind === 'tool' && name.length > MAX_TOOL_NAME_LENGTH) {\n throw new McpInternalError(\n `Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`,\n );\n }\n return name;\n}\n\n/**\n * Build a tool name. Format: `<productName>_<...parts>` (snake_case).\n * Example: mcpToolName('vibecontrols', 'vibes', 'list') -> 'vibecontrols_vibes_list'\n */\nexport function mcpToolName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpToolName: productName is required');\n }\n const name = [productName, ...parts].filter(Boolean).join('_');\n return assertSafeName(name, 'tool');\n}\n\n/**\n * Build a resource URI. Format: `<productName>://<...parts>`.\n * Example: mcpResourceUri('vibecontrols', 'schema') -> 'vibecontrols://schema'\n */\nexport function mcpResourceUri(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpResourceUri: productName is required');\n }\n return `${productName}://${parts.filter(Boolean).join('/')}`;\n}\n\n/**\n * Build a prompt name. Format: `<productName>-<...parts>` (kebab-case).\n * Example: mcpPromptName('vibecontrols', 'setup') -> 'vibecontrols-setup'\n */\nexport function mcpPromptName(productName: string, ...parts: string[]): string {\n if (!productName) {\n throw new McpInternalError('mcpPromptName: productName is required');\n }\n return [productName, ...parts].filter(Boolean).join('-');\n}\n\nexport const TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;\n\n/**\n * Name-based hint heuristics for MCP `annotations` (readOnlyHint /\n * destructiveHint). Used by tool-governance.ts to auto-fill annotations for\n * the fleet of product modules that call `server.registerTool` directly\n * (bypassing the `registerTool()` core helper) and so never set them\n * explicitly today (BOFF-3903). Deliberately conservative — matched against\n * whole `_`-delimited segments so e.g. `timeentries_delete` and\n * `pomodoro_delete_goal` match, but a hypothetical `undeletable_check`\n * would not.\n *\n * The destructive verb set covers more than `delete`: stopping, killing or\n * terminating a running process, revoking or rotating a credential/share,\n * resetting settings and removing/purging/uninstalling are all actions an\n * MCP client must not auto-run without the user's intent (VC/FG parity G57 —\n * e.g. `vibecontrols_sessions_kill`, `vibecontrols_tunnels_rotate_credentials`\n * were previously reported as non-destructive).\n *\n * A module can always override the inference by passing an explicit\n * `annotations` object to `registerTool()` / `server.registerTool()` — do\n * that for the rare verb match that is harmless (e.g. a typing indicator's\n * `typing_stop`).\n */\nexport const DESTRUCTIVE_NAME_VERBS = [\n 'delete',\n 'destroy',\n 'erase',\n 'kill',\n 'purge',\n 'remove',\n 'reset',\n 'revoke',\n 'rotate',\n 'stop',\n 'terminate',\n 'uninstall',\n 'wipe',\n] as const;\nconst DESTRUCTIVE_NAME_SEGMENT = new RegExp(\n `(?:^|_)(?:${DESTRUCTIVE_NAME_VERBS.join('|')})(?:_|$)`,\n 'i',\n);\nconst READ_ONLY_NAME_SEGMENT = /(?:^|_)(?:list|get|search|check|read|count|stats|by_date)(?:_|$)/i;\n\n/** True when a tool name looks destructive (irreversibly deletes data) by naming convention. */\nexport function inferDestructiveHint(toolName: string): boolean {\n return DESTRUCTIVE_NAME_SEGMENT.test(toolName);\n}\n\n/**\n * True when a tool name looks read-only by naming convention. Never true for\n * a name that also looks destructive (a tool can't be both).\n */\nexport function inferReadOnlyHint(toolName: string): boolean {\n return !inferDestructiveHint(toolName) && READ_ONLY_NAME_SEGMENT.test(toolName);\n}\n","/**\n * MCP tool result helpers + central handler.\n *\n * Modules NEVER call server.registerTool directly — they use registerTool()\n * from this module so the central try/catch wraps the handler and:\n * - maps thrown McpUserError / McpAuthError / McpInternalError to\n * MCP-protocol-compliant `{ isError: true, content: [...] }` shapes\n * - threads `_meta.progressToken` into ctx.progress for long ops\n * - emits a structured log line on every error\n * - never leaks `cause` from McpInternalError to the client\n *\n * This is the analog of cli-sdk's createProgram() central error handler.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { ZodRawShape } from 'zod';\nimport type { McpContext } from './context.js';\nimport { McpAuthError, McpInternalError, McpUserError } from './errors.js';\nimport type { ToolAnnotations } from './tool-governance.js';\n\nexport interface ToolTextContent {\n type: 'text';\n text: string;\n [k: string]: unknown;\n}\n\nexport interface ToolResult {\n content: ToolTextContent[];\n isError?: boolean;\n structuredContent?: Record<string, unknown>;\n [k: string]: unknown;\n}\n\nexport interface ToolMeta {\n progressToken?: string | number;\n}\n\n/**\n * Build a successful tool result with JSON content (pretty-printed).\n */\nexport function jsonResult(data: unknown, structured?: Record<string, unknown>): ToolResult {\n const result: ToolResult = {\n content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],\n };\n if (structured !== undefined) {\n result.structuredContent = structured;\n }\n return result;\n}\n\n/**\n * Build a successful tool result with plain text content.\n */\nexport function textResult(text: string): ToolResult {\n return { content: [{ type: 'text', text }] };\n}\n\n/**\n * Build an error tool result. Honors MCP's `{ isError: true, content }` shape.\n * Optional hint is appended on a new line so the LLM can react.\n */\nexport function errorResult(message: string, hint?: string): ToolResult {\n const text = hint ? `${message}\\n\\nHint: ${hint}` : message;\n return { content: [{ type: 'text', text }], isError: true };\n}\n\nexport interface ToolMetadata {\n title: string;\n description: string;\n inputSchema?: ZodRawShape;\n /**\n * Explicit MCP annotations (readOnlyHint / destructiveHint / ...). Optional\n * — when omitted, `wrapServerWithToolGovernance` (applied centrally in\n * `createMcpServer`) infers them from the tool name. Set this to override\n * the inference for a tool whose name doesn't match the naming convention.\n */\n annotations?: ToolAnnotations;\n}\n\nexport type ToolHandler<TArgs = Record<string, unknown>> = (\n args: TArgs,\n ctx: McpContext,\n meta: ToolMeta,\n) => Promise<unknown>;\n\n/**\n * Register a tool with the central error wrapper.\n *\n * The handler returns a plain value or void. The wrapper:\n * - wraps non-undefined returns in jsonResult()\n * - if the value already looks like a ToolResult (has `content`), passes through\n * - catches McpAuthError / McpUserError / McpInternalError / generic Error\n * - logs every error via ctx.logger.error\n */\nexport function registerTool<TArgs extends Record<string, unknown>>(\n server: McpServer,\n ctx: McpContext,\n name: string,\n metadata: ToolMetadata,\n handler: ToolHandler<TArgs>,\n): void {\n const sdkConfig = {\n title: metadata.title,\n description: metadata.description,\n ...(metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {}),\n ...(metadata.annotations ? { annotations: metadata.annotations } : {}),\n };\n\n // The MCP SDK's registerTool signature is `(name, config, handler)`. The\n // handler arity depends on whether inputSchema is present (1-arg without,\n // 2-arg with). We accept a unified handler shape and dispatch at runtime.\n // The SDK's typing is strict and conditional on the inputSchema generic;\n // bypass with a cast since runtime acceptance is unconditional.\n const wrapped = async (...callbackArgs: unknown[]): Promise<ToolResult> => {\n const hasArgs = callbackArgs.length === 2;\n const args = (hasArgs ? callbackArgs[0] : {}) as TArgs;\n const extra = (hasArgs ? callbackArgs[1] : callbackArgs[0]) as\n { _meta?: { progressToken?: string | number } } | undefined;\n\n const progressToken = extra?._meta?.progressToken;\n const meta: ToolMeta = progressToken !== undefined ? { progressToken } : {};\n\n try {\n const result = await handler(args, ctx, meta);\n if (isToolResult(result)) return result;\n if (result === undefined) return textResult('OK');\n return jsonResult(result);\n } catch (error) {\n return mapErrorToResult(error, ctx, name);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (server as any).registerTool(name, sdkConfig, wrapped);\n}\n\nfunction isToolResult(value: unknown): value is ToolResult {\n return (\n !!value &&\n typeof value === 'object' &&\n 'content' in value &&\n Array.isArray((value as ToolResult).content)\n );\n}\n\nfunction mapErrorToResult(error: unknown, ctx: McpContext, toolName: string): ToolResult {\n if (error instanceof McpAuthError) {\n ctx.logger.warn(`${toolName}: auth required`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpUserError) {\n ctx.logger.info(`${toolName}: user error`, { message: error.message });\n return errorResult(error.message, error.hint);\n }\n if (error instanceof McpInternalError) {\n ctx.logger.error(`${toolName}: internal error`, {\n message: error.message,\n cause: stringifyCause(error.cause),\n });\n return errorResult(`Internal error in ${toolName}.`);\n }\n const message = error instanceof Error ? error.message : String(error);\n ctx.logger.error(`${toolName}: unhandled error`, { message });\n return errorResult(`${toolName}: ${message}`);\n}\n\nfunction stringifyCause(cause: unknown): string | undefined {\n if (cause === undefined || cause === null) return undefined;\n if (cause instanceof Error) return cause.message;\n try {\n return JSON.stringify(cause);\n } catch {\n return String(cause);\n }\n}\n","import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { errorResult, mcpToolName, type McpContext } from '../../core/index.js';\n\ntype StubInputSchema = Record<string, z.ZodTypeAny>;\nfunction stubbedTool(\n server: McpServer,\n toolName: string,\n title: string,\n description: string,\n featureNote: string,\n inputSchema: StubInputSchema,\n altSuggestions: string[],\n): void {\n server.registerTool(\n toolName,\n {\n title,\n description: `${description} [STUB]`,\n inputSchema,\n },\n async () =>\n errorResult(\n `[stubbed] ${featureNote} Use ${altSuggestions.join(', ')} instead. The tool remains registered so callers receive a meaningful response instead of a schema-validation error.`,\n ),\n );\n}\n\nexport function registerTagsTools(\n server: McpServer,\n _ctx: McpContext,\n track: (n: string) => string,\n): void {\n // BOFF-8201: `Query.tags` on the live alpha gateway is fundamentally\n // broken — even a selection of just `{ name }` returns an\n // INTERNAL_SERVER_ERROR. The whole tags surface is unreachable\n // until alpha ships a fix. Stub all 9 tools so callers get a clean\n // \"[stubbed]\" error and the per-call wiring is in place for the day\n // the tags service recovers.\n const featureNote =\n 'Live alpha has `Query.tags` returning INTERNAL_SERVER_ERROR on even the simplest selection (`{ name }`). The whole tags surface is down until the service recovers.';\n const alts = [\n 'the next alpha release that restores the tags surface',\n 'the SDK tags API (which the MCP will mirror once it lands)',\n ];\n\n const tools: Array<[string, string, string]> = [\n ['tags_list', 'List Tags', 'List tags in the active workspace.'],\n ['tags_get', 'Get Tag', 'Get a tag by ID.'],\n ['tags_create', 'Create Tag', 'Create a new tag (requires `vocabularyId` on alpha).'],\n ['tags_update', 'Update Tag', 'Update an existing tag.'],\n ['tags_delete', 'Delete Tag', 'Delete a tag by ID.'],\n ['tags_analytics', 'Tag Analytics', 'Get analytics for a tag (assignment / usage counts).'],\n [\n 'tags_permissions_list',\n 'List Tag Permissions',\n 'List tag-permission grants in the workspace.',\n ],\n ['tags_permissions_grant', 'Grant Tag Permission', 'Grant a tag permission.'],\n ['tags_permissions_revoke', 'Revoke Tag Permission', 'Revoke a tag permission.'],\n ];\n for (const [tool, title, desc] of tools) {\n stubbedTool(\n server,\n track(mcpToolName(_ctx.productName, tool)),\n title,\n desc,\n featureNote,\n {},\n alts,\n );\n }\n}\n","/**\n * Tags module — CANONICAL reference module per CLAUDE.md.\n *\n * Tools: <product>_tags_{list,get,create,update,delete,analytics} +\n * <product>_tags_relations_{list,grant,revoke}.\n *\n * Backend: ~/products/wspace/tags/wspace-tags-svc/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerTagsTools } from './tools.js';\n\nconst tagsModule: McpModule = {\n id: 'tags',\n version: '0.0.1',\n displayName: 'Tags',\n dependsOn: ['auth'],\n capabilities: { tools: {} },\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 registerTagsTools(server, ctx, track);\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default tagsModule;\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 tagsModule: McpModule;
|
|
7
|
-
|
|
8
|
-
export { tagsModule as default };
|
|
3
|
+
export default tagsModule;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mcpToolName, errorResult } from '../../chunk-
|
|
1
|
+
import { mcpToolName, errorResult } from '../../chunk-FHXCNP2U.js';
|
|
2
2
|
|
|
3
3
|
// src/modules/tags/tools.ts
|
|
4
4
|
function stubbedTool(server, toolName, title, description, featureNote, inputSchema, altSuggestions) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const LIST_TAGS = "\n query TagsList($filter: TagFilterInput, $pagination: TagsPaginationInput) {\n getTags(filter: $filter, pagination: $pagination) {\n items { id key label description scope displayOrder }\n total hasMore\n }\n }\n";
|
|
2
|
+
export declare const GET_TAG = "\n query GetTag($id: ID!) {\n getTag(id: $id) {\n id key label description color icon scope vocabularyId parentId\n displayOrder assignmentCount usageCount hierarchyLevel hierarchyPath\n }\n }\n";
|
|
3
|
+
export declare const CREATE_TAG = "\n mutation CreateTag($input: CreateTagInput!) {\n createTag(input: $input) {\n id key label description scope displayOrder createdAt\n }\n }\n";
|
|
4
|
+
export declare const UPDATE_TAG = "\n mutation UpdateTag($id: ID!, $input: UpdateTagInput!) {\n updateTag(id: $id, input: $input) {\n id label description color icon parentId displayOrder updatedAt\n }\n }\n";
|
|
5
|
+
export declare const DELETE_TAG = "\n mutation DeleteTag($id: ID!) {\n deleteTag(id: $id)\n }\n";
|
|
6
|
+
export declare const TAG_ANALYTICS = "\n query TagAnalytics($tagId: ID!, $startDate: DateTime!, $endDate: DateTime!) {\n getTagAnalytics(tagId: $tagId, startDate: $startDate, endDate: $endDate) {\n assignmentCount date entityTypeBreakdown uniqueUsers uniqueEntities\n }\n }\n";
|
|
7
|
+
export declare const TAG_RELATIONS = "\n query GetRelatedTags($tagId: ID!) {\n getRelatedTags(tagId: $tagId) {\n tag { id label }\n relationType\n }\n }\n";
|
|
8
|
+
export declare const CREATE_TAG_RELATION = "\n mutation CreateTagRelation($input: CreateTagRelationInput!) {\n createTagRelation(input: $input) {\n id fromTagId toTagId relationType bidirectional\n }\n }\n";
|
|
9
|
+
export declare const DELETE_TAG_RELATION = "\n mutation DeleteTagRelation($id: ID!) {\n deleteTagRelation(id: $id)\n }\n";
|