@confluentinc/mcp-confluent 1.4.0 → 1.5.0
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/README.md +52 -31
- package/config.example.yaml +36 -7
- package/config.oauth.example.yaml +14 -1
- package/dist/config/env-config.d.ts +9 -3
- package/dist/config/env-config.d.ts.map +1 -1
- package/dist/config/env-config.js +15 -34
- package/dist/config/env-config.js.map +1 -1
- package/dist/config/models.d.ts +105 -13
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +49 -37
- package/dist/config/models.js.map +1 -1
- package/dist/confluent/base-client-manager.d.ts +2 -0
- package/dist/confluent/base-client-manager.d.ts.map +1 -1
- package/dist/confluent/base-client-manager.js +4 -0
- package/dist/confluent/base-client-manager.js.map +1 -1
- package/dist/confluent/client-manager.d.ts +14 -0
- package/dist/confluent/client-manager.d.ts.map +1 -1
- package/dist/confluent/oauth/auth0-config.d.ts +26 -4
- package/dist/confluent/oauth/auth0-config.d.ts.map +1 -1
- package/dist/confluent/oauth/auth0-config.js +59 -19
- package/dist/confluent/oauth/auth0-config.js.map +1 -1
- package/dist/confluent/oauth/types.d.ts +1 -2
- package/dist/confluent/oauth/types.d.ts.map +1 -1
- package/dist/confluent/oauth-client-manager.d.ts +5 -2
- package/dist/confluent/oauth-client-manager.d.ts.map +1 -1
- package/dist/confluent/oauth-client-manager.js +28 -6
- package/dist/confluent/oauth-client-manager.js.map +1 -1
- package/dist/confluent/oauth-resource-resolvers.d.ts +11 -0
- package/dist/confluent/oauth-resource-resolvers.d.ts.map +1 -1
- package/dist/confluent/oauth-resource-resolvers.js +24 -0
- package/dist/confluent/oauth-resource-resolvers.js.map +1 -1
- package/dist/confluent/schema-registry-helper.d.ts +114 -7
- package/dist/confluent/schema-registry-helper.d.ts.map +1 -1
- package/dist/confluent/schema-registry-helper.js +302 -40
- package/dist/confluent/schema-registry-helper.js.map +1 -1
- package/dist/confluent/tools/base-tools.d.ts +165 -21
- package/dist/confluent/tools/base-tools.d.ts.map +1 -1
- package/dist/confluent/tools/base-tools.js +223 -20
- package/dist/confluent/tools/base-tools.js.map +1 -1
- package/dist/confluent/tools/cluster-arg-resolvers.d.ts +21 -0
- package/dist/confluent/tools/cluster-arg-resolvers.d.ts.map +1 -1
- package/dist/confluent/tools/cluster-arg-resolvers.js +45 -0
- package/dist/confluent/tools/cluster-arg-resolvers.js.map +1 -1
- package/dist/confluent/tools/connection-predicates.d.ts +70 -7
- package/dist/confluent/tools/connection-predicates.d.ts.map +1 -1
- package/dist/confluent/tools/connection-predicates.js +69 -6
- package/dist/confluent/tools/connection-predicates.js.map +1 -1
- package/dist/confluent/tools/handlers/billing/list-billing-costs-handler.js +1 -1
- package/dist/confluent/tools/handlers/billing/list-billing-costs-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/catalog/add-tags-to-topic.d.ts +1 -2
- package/dist/confluent/tools/handlers/catalog/add-tags-to-topic.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/catalog/add-tags-to-topic.js +9 -5
- package/dist/confluent/tools/handlers/catalog/add-tags-to-topic.js.map +1 -1
- package/dist/confluent/tools/handlers/catalog/create-topic-tags.d.ts +1 -2
- package/dist/confluent/tools/handlers/catalog/create-topic-tags.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/catalog/create-topic-tags.js +9 -5
- package/dist/confluent/tools/handlers/catalog/create-topic-tags.js.map +1 -1
- package/dist/confluent/tools/handlers/catalog/delete-tag.d.ts +1 -2
- package/dist/confluent/tools/handlers/catalog/delete-tag.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/catalog/delete-tag.js +9 -5
- package/dist/confluent/tools/handlers/catalog/delete-tag.js.map +1 -1
- package/dist/confluent/tools/handlers/catalog/list-tags.d.ts +2 -3
- package/dist/confluent/tools/handlers/catalog/list-tags.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/catalog/list-tags.js +14 -6
- package/dist/confluent/tools/handlers/catalog/list-tags.js.map +1 -1
- package/dist/confluent/tools/handlers/catalog/remove-tag-from-entity.d.ts +1 -2
- package/dist/confluent/tools/handlers/catalog/remove-tag-from-entity.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/catalog/remove-tag-from-entity.js +9 -5
- package/dist/confluent/tools/handlers/catalog/remove-tag-from-entity.js.map +1 -1
- package/dist/confluent/tools/handlers/clusters/list-clusters-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/clusters/list-clusters-handler.js +1 -1
- package/dist/confluent/tools/handlers/clusters/list-clusters-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/connect-tool-handler.d.ts +8 -8
- package/dist/confluent/tools/handlers/connect/connect-tool-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/connect-tool-handler.js +9 -10
- package/dist/confluent/tools/handlers/connect/connect-tool-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/create-connector-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/create-connector-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/create-connector-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/delete-connector-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/delete-connector-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/delete-connector-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-config-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-config-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/get-connector-config-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-error-recommendations-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-error-recommendations-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/get-connector-error-recommendations-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-error-summary-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-error-summary-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/get-connector-error-summary-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-logs-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-logs-handler.js +36 -11
- package/dist/confluent/tools/handlers/connect/get-connector-logs-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-offsets-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-offsets-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/get-connector-offsets-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-status-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-status-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/get-connector-status-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-tasks-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/get-connector-tasks-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/get-connector-tasks-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/list-connectors-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/list-connectors-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/list-connectors-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/pause-connector-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/pause-connector-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/pause-connector-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/restart-connector-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/restart-connector-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/restart-connector-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/resume-connector-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/resume-connector-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/resume-connector-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/connect/update-connector-config-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/connect/update-connector-config-handler.js +1 -2
- package/dist/confluent/tools/handlers/connect/update-connector-config-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/diagnostics/config-help-handler.d.ts +42 -0
- package/dist/confluent/tools/handlers/diagnostics/config-help-handler.d.ts.map +1 -0
- package/dist/confluent/tools/handlers/diagnostics/config-help-handler.js +297 -0
- package/dist/confluent/tools/handlers/diagnostics/config-help-handler.js.map +1 -0
- package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.d.ts +31 -0
- package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.d.ts.map +1 -0
- package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.js +116 -0
- package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.js.map +1 -0
- package/dist/confluent/tools/handlers/diagnostics/describe-fields.d.ts +52 -0
- package/dist/confluent/tools/handlers/diagnostics/describe-fields.d.ts.map +1 -0
- package/dist/confluent/tools/handlers/diagnostics/describe-fields.js +114 -0
- package/dist/confluent/tools/handlers/diagnostics/describe-fields.js.map +1 -0
- package/dist/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.d.ts +19 -42
- package/dist/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.js +95 -81
- package/dist/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/diagnostics/list-configured-connections-handler.d.ts +27 -0
- package/dist/confluent/tools/handlers/diagnostics/list-configured-connections-handler.d.ts.map +1 -0
- package/dist/confluent/tools/handlers/diagnostics/list-configured-connections-handler.js +93 -0
- package/dist/confluent/tools/handlers/diagnostics/list-configured-connections-handler.js.map +1 -0
- package/dist/confluent/tools/handlers/environments/list-environments-handler.js +1 -1
- package/dist/confluent/tools/handlers/environments/list-environments-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/environments/read-environment-handler.js +1 -1
- package/dist/confluent/tools/handlers/environments/read-environment-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/describe-table-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/describe-table-handler.js +24 -21
- package/dist/confluent/tools/handlers/flink/catalog/describe-table-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/get-table-info-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/get-table-info-handler.js +24 -21
- package/dist/confluent/tools/handlers/flink/catalog/get-table-info-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/list-catalogs-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/list-catalogs-handler.js +9 -7
- package/dist/confluent/tools/handlers/flink/catalog/list-catalogs-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/list-databases-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/list-databases-handler.js +14 -12
- package/dist/confluent/tools/handlers/flink/catalog/list-databases-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/list-tables-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/catalog/list-tables-handler.js +14 -12
- package/dist/confluent/tools/handlers/flink/catalog/list-tables-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/create-flink-statement-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/create-flink-statement-handler.js +27 -22
- package/dist/confluent/tools/handlers/flink/create-flink-statement-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/delete-flink-statement-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/delete-flink-statement-handler.js +20 -12
- package/dist/confluent/tools/handlers/flink/delete-flink-statement-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/diagnostics/check-health-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/diagnostics/check-health-handler.js +20 -12
- package/dist/confluent/tools/handlers/flink/diagnostics/check-health-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/diagnostics/detect-issues-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/diagnostics/detect-issues-handler.js +20 -18
- package/dist/confluent/tools/handlers/flink/diagnostics/detect-issues-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/diagnostics/query-profiler-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/diagnostics/query-profiler-handler.js +24 -22
- package/dist/confluent/tools/handlers/flink/diagnostics/query-profiler-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/flink-sql-helper.d.ts +3 -2
- package/dist/confluent/tools/handlers/flink/flink-sql-helper.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/flink-sql-helper.js +133 -57
- package/dist/confluent/tools/handlers/flink/flink-sql-helper.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/flink-tool-handler.d.ts +27 -6
- package/dist/confluent/tools/handlers/flink/flink-tool-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/flink-tool-handler.js +36 -7
- package/dist/confluent/tools/handlers/flink/flink-tool-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/get-flink-exceptions-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/get-flink-exceptions-handler.js +20 -12
- package/dist/confluent/tools/handlers/flink/get-flink-exceptions-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/flink/{read-flink-statement-handler.d.ts → get-flink-statement-results-handler.d.ts} +2 -2
- package/dist/confluent/tools/handlers/flink/get-flink-statement-results-handler.d.ts.map +1 -0
- package/dist/confluent/tools/handlers/flink/{read-flink-statement-handler.js → get-flink-statement-results-handler.js} +30 -22
- package/dist/confluent/tools/handlers/flink/get-flink-statement-results-handler.js.map +1 -0
- package/dist/confluent/tools/handlers/flink/list-compute-pools-handler.d.ts +10 -0
- package/dist/confluent/tools/handlers/flink/list-compute-pools-handler.d.ts.map +1 -0
- package/dist/confluent/tools/handlers/flink/list-compute-pools-handler.js +118 -0
- package/dist/confluent/tools/handlers/flink/list-compute-pools-handler.js.map +1 -0
- package/dist/confluent/tools/handlers/flink/list-flink-statements-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/flink/list-flink-statements-handler.js +19 -17
- package/dist/confluent/tools/handlers/flink/list-flink-statements-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/alter-topic-config.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/alter-topic-config.js +1 -1
- package/dist/confluent/tools/handlers/kafka/alter-topic-config.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/consume-kafka-messages-handler.d.ts +15 -5
- package/dist/confluent/tools/handlers/kafka/consume-kafka-messages-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/consume-kafka-messages-handler.js +54 -10
- package/dist/confluent/tools/handlers/kafka/consume-kafka-messages-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/create-topics-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/create-topics-handler.js +12 -3
- package/dist/confluent/tools/handlers/kafka/create-topics-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/delete-topics-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/delete-topics-handler.js +1 -1
- package/dist/confluent/tools/handlers/kafka/delete-topics-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/describe-consumer-group-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/describe-consumer-group-handler.js +1 -1
- package/dist/confluent/tools/handlers/kafka/describe-consumer-group-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/get-consumer-group-lag-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/get-consumer-group-lag-handler.js +1 -1
- package/dist/confluent/tools/handlers/kafka/get-consumer-group-lag-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/get-partition-offsets-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/get-partition-offsets-handler.js +1 -1
- package/dist/confluent/tools/handlers/kafka/get-partition-offsets-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/get-topic-config.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/get-topic-config.js +1 -1
- package/dist/confluent/tools/handlers/kafka/get-topic-config.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/list-consumer-groups-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/list-consumer-groups-handler.js +1 -1
- package/dist/confluent/tools/handlers/kafka/list-consumer-groups-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/list-topics-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/list-topics-handler.js +1 -1
- package/dist/confluent/tools/handlers/kafka/list-topics-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/kafka/produce-kafka-message-handler.d.ts +8 -1
- package/dist/confluent/tools/handlers/kafka/produce-kafka-message-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/kafka/produce-kafka-message-handler.js +140 -34
- package/dist/confluent/tools/handlers/kafka/produce-kafka-message-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/metrics/list-metrics-handler.d.ts +1 -2
- package/dist/confluent/tools/handlers/metrics/list-metrics-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/metrics/list-metrics-handler.js +3 -3
- package/dist/confluent/tools/handlers/metrics/list-metrics-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/metrics/query-metrics-handler.d.ts +1 -2
- package/dist/confluent/tools/handlers/metrics/query-metrics-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/metrics/query-metrics-handler.js +6 -4
- package/dist/confluent/tools/handlers/metrics/query-metrics-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/organizations/list-organizations-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/organizations/list-organizations-handler.js +2 -1
- package/dist/confluent/tools/handlers/organizations/list-organizations-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/schema/create-schema-handler.d.ts +10 -0
- package/dist/confluent/tools/handlers/schema/create-schema-handler.d.ts.map +1 -0
- package/dist/confluent/tools/handlers/schema/create-schema-handler.js +76 -0
- package/dist/confluent/tools/handlers/schema/create-schema-handler.js.map +1 -0
- package/dist/confluent/tools/handlers/schema/delete-schema-handler.js +1 -1
- package/dist/confluent/tools/handlers/schema/delete-schema-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/schema/list-schemas-handler.js +1 -1
- package/dist/confluent/tools/handlers/schema/list-schemas-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/search/search-topic-by-tag-handler.d.ts +1 -2
- package/dist/confluent/tools/handlers/search/search-topic-by-tag-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/search/search-topic-by-tag-handler.js +9 -5
- package/dist/confluent/tools/handlers/search/search-topic-by-tag-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/search/search-topics-by-name-handler.d.ts +1 -2
- package/dist/confluent/tools/handlers/search/search-topics-by-name-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/search/search-topics-by-name-handler.js +9 -5
- package/dist/confluent/tools/handlers/search/search-topics-by-name-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/create-tableflow-catalog-integration-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/create-tableflow-catalog-integration-handler.js +2 -2
- package/dist/confluent/tools/handlers/tableflow/catalog/create-tableflow-catalog-integration-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/delete-tableflow-catalog-integration-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/delete-tableflow-catalog-integration-handler.js +2 -2
- package/dist/confluent/tools/handlers/tableflow/catalog/delete-tableflow-catalog-integration-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/list-tableflow-catalog-integrations-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/list-tableflow-catalog-integrations-handler.js +2 -2
- package/dist/confluent/tools/handlers/tableflow/catalog/list-tableflow-catalog-integrations-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/read-tableflow-catalog-integration-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/read-tableflow-catalog-integration-handler.js +2 -2
- package/dist/confluent/tools/handlers/tableflow/catalog/read-tableflow-catalog-integration-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/update-tableflow-catalog-integration-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/update-tableflow-catalog-integration-handler.js +1 -1
- package/dist/confluent/tools/handlers/tableflow/catalog/update-tableflow-catalog-integration-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/list-tableflow-regions-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/list-tableflow-regions-handler.js +1 -1
- package/dist/confluent/tools/handlers/tableflow/list-tableflow-regions-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/tableflow-tool-handler.d.ts +15 -10
- package/dist/confluent/tools/handlers/tableflow/tableflow-tool-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/tableflow-tool-handler.js +17 -14
- package/dist/confluent/tools/handlers/tableflow/tableflow-tool-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/create-tableflow-topic-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/create-tableflow-topic-handler.js +2 -2
- package/dist/confluent/tools/handlers/tableflow/topic/create-tableflow-topic-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/delete-tableflow-topic-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/delete-tableflow-topic-handler.js +2 -2
- package/dist/confluent/tools/handlers/tableflow/topic/delete-tableflow-topic-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/list-tableflow-topics-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/list-tableflow-topics-handler.js +2 -2
- package/dist/confluent/tools/handlers/tableflow/topic/list-tableflow-topics-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/read-tableflow-topic-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/read-tableflow-topic-handler.js +2 -2
- package/dist/confluent/tools/handlers/tableflow/topic/read-tableflow-topic-handler.js.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/update-tableflow-topic-handler.d.ts.map +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/update-tableflow-topic-handler.js +1 -1
- package/dist/confluent/tools/handlers/tableflow/topic/update-tableflow-topic-handler.js.map +1 -1
- package/dist/confluent/tools/tool-availability.d.ts +59 -28
- package/dist/confluent/tools/tool-availability.d.ts.map +1 -1
- package/dist/confluent/tools/tool-availability.js +101 -69
- package/dist/confluent/tools/tool-availability.js.map +1 -1
- package/dist/confluent/tools/tool-metadata-handler.d.ts +51 -0
- package/dist/confluent/tools/tool-metadata-handler.d.ts.map +1 -0
- package/dist/confluent/tools/tool-metadata-handler.js +61 -0
- package/dist/confluent/tools/tool-metadata-handler.js.map +1 -0
- package/dist/confluent/tools/tool-name.d.ts +7 -2
- package/dist/confluent/tools/tool-name.d.ts.map +1 -1
- package/dist/confluent/tools/tool-name.js +6 -1
- package/dist/confluent/tools/tool-name.js.map +1 -1
- package/dist/confluent/tools/tool-registry.d.ts.map +1 -1
- package/dist/confluent/tools/tool-registry.js +24 -2
- package/dist/confluent/tools/tool-registry.js.map +1 -1
- package/dist/env-schema.d.ts +0 -1
- package/dist/env-schema.d.ts.map +1 -1
- package/dist/env-schema.js +0 -7
- package/dist/env-schema.js.map +1 -1
- package/dist/env.d.ts +0 -1
- package/dist/env.d.ts.map +1 -1
- package/dist/index.d.ts +54 -64
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +78 -324
- package/dist/index.js.map +1 -1
- package/dist/lazy.d.ts +4 -2
- package/dist/lazy.d.ts.map +1 -1
- package/dist/lazy.js +27 -12
- package/dist/lazy.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +8 -5
- package/dist/mcp/server.js.map +1 -1
- package/dist/preflight.d.ts +33 -0
- package/dist/preflight.d.ts.map +1 -0
- package/dist/preflight.js +68 -0
- package/dist/preflight.js.map +1 -0
- package/dist/server-main.d.ts +98 -0
- package/dist/server-main.d.ts.map +1 -0
- package/dist/server-main.js +383 -0
- package/dist/server-main.js.map +1 -0
- package/dist/server-runtime.d.ts +20 -5
- package/dist/server-runtime.d.ts.map +1 -1
- package/dist/server-runtime.js +45 -28
- package/dist/server-runtime.js.map +1 -1
- package/dist/utils/quote-join-ids.d.ts +9 -0
- package/dist/utils/quote-join-ids.d.ts.map +1 -0
- package/dist/utils/quote-join-ids.js +11 -0
- package/dist/utils/quote-join-ids.js.map +1 -0
- package/package.json +32 -34
- package/dist/confluent/tools/handlers/flink/read-flink-statement-handler.d.ts.map +0 -1
- package/dist/confluent/tools/handlers/flink/read-flink-statement-handler.js.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CallToolResult } from "../../../../confluent/schema.js";
|
|
2
|
+
import { ToolCategory, ToolConfig } from "../../../../confluent/tools/base-tools.js";
|
|
3
|
+
import { ToolMetadataHandler } from "../../../../confluent/tools/tool-metadata-handler.js";
|
|
4
|
+
import { ServerRuntime } from "../../../../server-runtime.js";
|
|
5
|
+
/**
|
|
6
|
+
* Discovery tool: the per-connection counterpart to `list-configured-connections`.
|
|
7
|
+
* Given one `connectionId`, returns its non-secret config card plus which
|
|
8
|
+
* connection-routable tools are enabled on it and, for those that aren't, the
|
|
9
|
+
* reason each is gated off.
|
|
10
|
+
*
|
|
11
|
+
* The enabled/disabled split is read from each handler's
|
|
12
|
+
* {@link import("../../../../confluent/tools/base-tools.js").ToolHandler.connectionVerdicts}
|
|
13
|
+
* indexed at the requested connection — the same source `explain-disabled-tools`
|
|
14
|
+
* consumes. The read-only overlay therefore needs no special-casing here: a
|
|
15
|
+
* mutating tool on a `read_only` connection surfaces in the
|
|
16
|
+
* {@link ToolDisabledReason.ReadOnlyConnection} bucket automatically, kept
|
|
17
|
+
* distinct from the service-block-missing buckets, and the text summary renders
|
|
18
|
+
* that bucket affirmatively as the set of writes the flag suppresses.
|
|
19
|
+
*
|
|
20
|
+
* Always enabled (predicate is `alwaysEnabled`) so an operator can introspect a
|
|
21
|
+
* connection even when its config left every routable tool disabled. The
|
|
22
|
+
* connection-routability filter and the catalog thunk both come from
|
|
23
|
+
* {@link ToolMetadataHandler}.
|
|
24
|
+
*/
|
|
25
|
+
export declare class DescribeConfiguredConnectionHandler extends ToolMetadataHandler {
|
|
26
|
+
handle(runtime: ServerRuntime, toolArguments?: Record<string, unknown>): CallToolResult;
|
|
27
|
+
getToolConfig(): ToolConfig;
|
|
28
|
+
readonly category = ToolCategory.McpServerDiagnostics;
|
|
29
|
+
readonly predicate: import("../../../../confluent/tools/connection-predicates.js").ConnectionPredicate;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=describe-configured-connection-handler.d.ts.map
|
package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-configured-connection-handler.d.ts","sourceRoot":"","sources":["../../../../../src/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAEL,YAAY,EACZ,UAAU,EACX,MAAM,oCAAoC,CAAC;AAM5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA8BvD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,mCAAoC,SAAQ,mBAAmB;IAC1E,MAAM,CACJ,OAAO,EAAE,aAAa,EACtB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,cAAc;IAmDjB,aAAa,IAAI,UAAU;IAU3B,QAAQ,CAAC,QAAQ,qCAAqC;IACtD,QAAQ,CAAC,SAAS,8EAAiB;CACpC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { READ_ONLY, ToolCategory, } from "../../../../confluent/tools/base-tools.js";
|
|
2
|
+
import { alwaysEnabled, ToolDisabledReason, } from "../../../../confluent/tools/connection-predicates.js";
|
|
3
|
+
import { buildConnectionCard } from "../../../../confluent/tools/handlers/diagnostics/describe-fields.js";
|
|
4
|
+
import { ToolMetadataHandler } from "../../../../confluent/tools/tool-metadata-handler.js";
|
|
5
|
+
import { ToolName } from "../../../../confluent/tools/tool-name.js";
|
|
6
|
+
import { quoteJoinIds } from "../../../../utils/quote-join-ids.js";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
const describeConfiguredConnectionArguments = z.object({
|
|
9
|
+
connectionId: z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1, "connectionId cannot be empty")
|
|
12
|
+
.describe("The id of the configured connection to describe. One of the keys reported by 'list-configured-connections'."),
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Discovery tool: the per-connection counterpart to `list-configured-connections`.
|
|
16
|
+
* Given one `connectionId`, returns its non-secret config card plus which
|
|
17
|
+
* connection-routable tools are enabled on it and, for those that aren't, the
|
|
18
|
+
* reason each is gated off.
|
|
19
|
+
*
|
|
20
|
+
* The enabled/disabled split is read from each handler's
|
|
21
|
+
* {@link import("../../../../confluent/tools/base-tools.js").ToolHandler.connectionVerdicts}
|
|
22
|
+
* indexed at the requested connection — the same source `explain-disabled-tools`
|
|
23
|
+
* consumes. The read-only overlay therefore needs no special-casing here: a
|
|
24
|
+
* mutating tool on a `read_only` connection surfaces in the
|
|
25
|
+
* {@link ToolDisabledReason.ReadOnlyConnection} bucket automatically, kept
|
|
26
|
+
* distinct from the service-block-missing buckets, and the text summary renders
|
|
27
|
+
* that bucket affirmatively as the set of writes the flag suppresses.
|
|
28
|
+
*
|
|
29
|
+
* Always enabled (predicate is `alwaysEnabled`) so an operator can introspect a
|
|
30
|
+
* connection even when its config left every routable tool disabled. The
|
|
31
|
+
* connection-routability filter and the catalog thunk both come from
|
|
32
|
+
* {@link ToolMetadataHandler}.
|
|
33
|
+
*/
|
|
34
|
+
export class DescribeConfiguredConnectionHandler extends ToolMetadataHandler {
|
|
35
|
+
handle(runtime, toolArguments) {
|
|
36
|
+
const { connectionId } = describeConfiguredConnectionArguments.parse(toolArguments ?? {});
|
|
37
|
+
const conn = runtime.config.connections[connectionId];
|
|
38
|
+
if (conn === undefined) {
|
|
39
|
+
return this.createResponse(`Unknown connection id "${connectionId}". Configured connections: ${quoteJoinIds(runtime.config.getConnectionIds()) || "none"}.`, true);
|
|
40
|
+
}
|
|
41
|
+
const { scalars, blocks } = buildConnectionCard(conn);
|
|
42
|
+
const enabledTools = [];
|
|
43
|
+
const disabledTools = {};
|
|
44
|
+
for (const [name, handler] of this.connectionRoutableTools(runtime)) {
|
|
45
|
+
// Every configured connection has a verdict (connectionVerdicts iterates
|
|
46
|
+
// runtime.config.connections), so the lookup is always defined.
|
|
47
|
+
const verdict = handler.connectionVerdicts(runtime).get(connectionId);
|
|
48
|
+
if (verdict.enabled) {
|
|
49
|
+
enabledTools.push(name);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const bucket = disabledTools[verdict.reason] ?? [];
|
|
53
|
+
disabledTools[verdict.reason] = bucket;
|
|
54
|
+
bucket.push(name);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
enabledTools.sort((a, b) => a.localeCompare(b));
|
|
58
|
+
for (const tools of Object.values(disabledTools)) {
|
|
59
|
+
tools.sort((a, b) => a.localeCompare(b));
|
|
60
|
+
}
|
|
61
|
+
const description = {
|
|
62
|
+
connectionId,
|
|
63
|
+
...scalars,
|
|
64
|
+
readOnly: conn.read_only === true,
|
|
65
|
+
blocks,
|
|
66
|
+
enabledTools,
|
|
67
|
+
disabledTools,
|
|
68
|
+
};
|
|
69
|
+
return this.createStructuredResponse(renderCard(description, conn.type), description);
|
|
70
|
+
}
|
|
71
|
+
getToolConfig() {
|
|
72
|
+
return {
|
|
73
|
+
name: ToolName.DESCRIBE_CONFIGURED_CONNECTION,
|
|
74
|
+
description: "Describe one configured connection by id: its non-secret config (type, endpoints, resource ids — never credentials), whether it is read-only, the tools you can invoke against it, and, for tools that are unavailable on it, the config gap or policy keeping each one off. Pass the connection id from 'list-configured-connections'. Call this to learn what a specific connection supports before routing a tool call to it.",
|
|
75
|
+
inputSchema: describeConfiguredConnectionArguments.shape,
|
|
76
|
+
annotations: READ_ONLY,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
category = ToolCategory.McpServerDiagnostics;
|
|
80
|
+
predicate = alwaysEnabled;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Human-readable summary of the connection card. The structured payload is
|
|
84
|
+
* authoritative; this text is the at-a-glance view. The read-only suppressed
|
|
85
|
+
* line reads the {@link ToolDisabledReason.ReadOnlyConnection} bucket directly,
|
|
86
|
+
* so it surfaces with no enum-specific branching beyond that one key.
|
|
87
|
+
*/
|
|
88
|
+
function renderCard(card, type) {
|
|
89
|
+
const lines = [];
|
|
90
|
+
const readOnlyMarker = card.readOnly ? ", read-only" : "";
|
|
91
|
+
lines.push(`Connection "${card.connectionId}" (${type}${readOnlyMarker})`);
|
|
92
|
+
const description = card.description;
|
|
93
|
+
if (typeof description === "string") {
|
|
94
|
+
lines.push(`Description: ${description}`);
|
|
95
|
+
}
|
|
96
|
+
const blockNames = Object.keys(card.blocks).sort((a, b) => a.localeCompare(b));
|
|
97
|
+
if (blockNames.length > 0) {
|
|
98
|
+
lines.push(`Configured blocks: ${blockNames.join(", ")}`);
|
|
99
|
+
}
|
|
100
|
+
const enabledCount = card.enabledTools.length;
|
|
101
|
+
lines.push(`${enabledCount} tool${enabledCount === 1 ? "" : "s"} enabled${enabledCount > 0 ? `: ${card.enabledTools.join(", ")}` : ""}`);
|
|
102
|
+
const suppressed = card.disabledTools[ToolDisabledReason.ReadOnlyConnection];
|
|
103
|
+
if (card.readOnly && suppressed !== undefined && suppressed.length > 0) {
|
|
104
|
+
lines.push(`${suppressed.length} mutating tool${suppressed.length === 1 ? "" : "s"} suppressed by read_only: ${suppressed.join(", ")}`);
|
|
105
|
+
}
|
|
106
|
+
const disabledEntries = Object.entries(card.disabledTools).sort(([a], [b]) => a.localeCompare(b));
|
|
107
|
+
if (disabledEntries.length > 0) {
|
|
108
|
+
const disabledCount = disabledEntries.reduce((sum, [, tools]) => sum + tools.length, 0);
|
|
109
|
+
lines.push(`${disabledCount} tool${disabledCount === 1 ? "" : "s"} disabled:`);
|
|
110
|
+
for (const [reason, tools] of disabledEntries) {
|
|
111
|
+
lines.push(` ${reason} (${tools.length}): ${tools.join(", ")}`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return lines.join("\n");
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=describe-configured-connection-handler.js.map
|
package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-configured-connection-handler.js","sourceRoot":"","sources":["../../../../../src/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,YAAY,GAEb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,aAAa,EACb,kBAAkB,GACnB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EA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AC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACjC,6BAA6B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACrD,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3E,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CACnB,CAAC;IACF,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,MAAM,aAAa,GAAG,eAAe,CAAC,MAAM,CAC1C,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EACtC,CAAC,CACF,CAAC;QACF,KAAK,CAAC,IAAI,CACR,GAAG,aAAa,QAAQ,aAAa,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,YAAY,CACnE,CAAC;QACF,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,eAAe,EAAE,CAAC;YAC9C,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,KAAK,KAAK,CAAC,MAAM,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ConfluentCloudDirectConfig, ConnectionConfig, DirectConnectionConfig, FlinkDirectConfig, KafkaDirectConfig, OAuthConnectionConfig, SchemaRegistryDirectConfig, TableflowDirectConfig, TelemetryDirectConfig } from "../../../../config/models.js";
|
|
2
|
+
/**
|
|
3
|
+
* How the `describe-configured-connection` card treats one connection-config
|
|
4
|
+
* field. The visibility maps below are keyed `Record<keyof T, FieldVisibility>`
|
|
5
|
+
* over each connection arm and service block, so adding a config field fails
|
|
6
|
+
* `tsc --noEmit` (which runs in the pre-push hook and CI) until it is
|
|
7
|
+
* classified here — a new knob can never ship without a deliberate
|
|
8
|
+
* surface/withhold decision, and a secret-leak audit stays a single-file review.
|
|
9
|
+
*
|
|
10
|
+
* - `public` — non-secret scalar; surfaced in the card.
|
|
11
|
+
* - `secret` — credential material (`auth` blocks); never surfaced. Audit these.
|
|
12
|
+
* - `withheld` — non-secret but deliberately not surfaced: either a structured /
|
|
13
|
+
* opaque value (`extra_properties`) or one the card surfaces by other means
|
|
14
|
+
* (`read_only`, echoed as the coerced top-level `readOnly` boolean instead).
|
|
15
|
+
* - `block` — a nested service block; surfaced via its own map in
|
|
16
|
+
* {@link SERVICE_BLOCK_VISIBILITY}. Only appears at the connection level.
|
|
17
|
+
*/
|
|
18
|
+
export type FieldVisibility = "public" | "secret" | "withheld" | "block";
|
|
19
|
+
export declare const KAFKA_FIELD_VISIBILITY: Readonly<Record<keyof KafkaDirectConfig, FieldVisibility>>;
|
|
20
|
+
export declare const SCHEMA_REGISTRY_FIELD_VISIBILITY: Readonly<Record<keyof SchemaRegistryDirectConfig, FieldVisibility>>;
|
|
21
|
+
export declare const CONFLUENT_CLOUD_FIELD_VISIBILITY: Readonly<Record<keyof ConfluentCloudDirectConfig, FieldVisibility>>;
|
|
22
|
+
export declare const TABLEFLOW_FIELD_VISIBILITY: Readonly<Record<keyof TableflowDirectConfig, FieldVisibility>>;
|
|
23
|
+
export declare const TELEMETRY_FIELD_VISIBILITY: Readonly<Record<keyof TelemetryDirectConfig, FieldVisibility>>;
|
|
24
|
+
export declare const FLINK_FIELD_VISIBILITY: Readonly<Record<keyof FlinkDirectConfig, FieldVisibility>>;
|
|
25
|
+
export declare const DIRECT_CONNECTION_FIELD_VISIBILITY: Readonly<Record<keyof DirectConnectionConfig, FieldVisibility>>;
|
|
26
|
+
export declare const OAUTH_CONNECTION_FIELD_VISIBILITY: Readonly<Record<keyof OAuthConnectionConfig, FieldVisibility>>;
|
|
27
|
+
/**
|
|
28
|
+
* Field-visibility map for each direct-connection service block, keyed by the
|
|
29
|
+
* block's connection-field name. The keys are exactly the
|
|
30
|
+
* {@link DIRECT_CONNECTION_FIELD_VISIBILITY} entries classified `"block"`
|
|
31
|
+
* (pinned by the drift-catch test in `describe-fields.test.ts`).
|
|
32
|
+
*/
|
|
33
|
+
export declare const SERVICE_BLOCK_VISIBILITY: Readonly<Record<string, Readonly<Record<string, FieldVisibility>>>>;
|
|
34
|
+
/**
|
|
35
|
+
* The config-derived portion of a `describe-configured-connection` card:
|
|
36
|
+
* `scalars` holds the connection's `public` connection-level fields (e.g.
|
|
37
|
+
* `type`, `description`, and OAuth's `ccloud_env` / `kafka_debug`); `blocks`
|
|
38
|
+
* maps each present service block to its `public` fields. Secrets and
|
|
39
|
+
* `withheld` fields never appear in either.
|
|
40
|
+
*/
|
|
41
|
+
export interface ConnectionCard {
|
|
42
|
+
readonly scalars: Record<string, unknown>;
|
|
43
|
+
readonly blocks: Record<string, Record<string, unknown>>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Project a connection into its non-secret card, driven entirely by the
|
|
47
|
+
* visibility maps. OAuth connections carry no service blocks, so `blocks` is
|
|
48
|
+
* empty for them; the `public`/`secret`/`withheld`/`block` switch is the single
|
|
49
|
+
* place the surface/withhold decision is enforced at runtime.
|
|
50
|
+
*/
|
|
51
|
+
export declare function buildConnectionCard(conn: ConnectionConfig): ConnectionCard;
|
|
52
|
+
//# sourceMappingURL=describe-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-fields.d.ts","sourceRoot":"","sources":["../../../../../src/confluent/tools/handlers/diagnostics/describe-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EAC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,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC1D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,GAAG,cAAc,CAmC1E"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export const KAFKA_FIELD_VISIBILITY = {
|
|
2
|
+
bootstrap_servers: "public",
|
|
3
|
+
rest_endpoint: "public",
|
|
4
|
+
cluster_id: "public",
|
|
5
|
+
env_id: "public",
|
|
6
|
+
auth: "secret",
|
|
7
|
+
// Free-form librdkafka property bag; can carry credential-ish values, so it
|
|
8
|
+
// stays unsurfaced even though it is not inherently a secret.
|
|
9
|
+
extra_properties: "withheld",
|
|
10
|
+
};
|
|
11
|
+
export const SCHEMA_REGISTRY_FIELD_VISIBILITY = {
|
|
12
|
+
endpoint: "public",
|
|
13
|
+
auth: "secret",
|
|
14
|
+
};
|
|
15
|
+
export const CONFLUENT_CLOUD_FIELD_VISIBILITY = {
|
|
16
|
+
endpoint: "public",
|
|
17
|
+
organization_id: "public",
|
|
18
|
+
auth: "secret",
|
|
19
|
+
};
|
|
20
|
+
export const TABLEFLOW_FIELD_VISIBILITY = {
|
|
21
|
+
auth: "secret",
|
|
22
|
+
};
|
|
23
|
+
export const TELEMETRY_FIELD_VISIBILITY = {
|
|
24
|
+
endpoint: "public",
|
|
25
|
+
auth: "secret",
|
|
26
|
+
};
|
|
27
|
+
export const FLINK_FIELD_VISIBILITY = {
|
|
28
|
+
endpoint: "public",
|
|
29
|
+
environment_id: "public",
|
|
30
|
+
organization_id: "public",
|
|
31
|
+
compute_pool_id: "public",
|
|
32
|
+
catalog_name: "public",
|
|
33
|
+
database_name: "public",
|
|
34
|
+
auth: "secret",
|
|
35
|
+
};
|
|
36
|
+
export const DIRECT_CONNECTION_FIELD_VISIBILITY = {
|
|
37
|
+
type: "public",
|
|
38
|
+
description: "public",
|
|
39
|
+
// Echoed as the coerced top-level `readOnly` boolean by the handler, so the
|
|
40
|
+
// raw snake_case field is withheld from the generic scalar pass.
|
|
41
|
+
read_only: "withheld",
|
|
42
|
+
kafka: "block",
|
|
43
|
+
schema_registry: "block",
|
|
44
|
+
confluent_cloud: "block",
|
|
45
|
+
tableflow: "block",
|
|
46
|
+
telemetry: "block",
|
|
47
|
+
flink: "block",
|
|
48
|
+
};
|
|
49
|
+
export const OAUTH_CONNECTION_FIELD_VISIBILITY = {
|
|
50
|
+
type: "public",
|
|
51
|
+
description: "public",
|
|
52
|
+
read_only: "withheld",
|
|
53
|
+
ccloud_env: "public",
|
|
54
|
+
kafka_debug: "public",
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Field-visibility map for each direct-connection service block, keyed by the
|
|
58
|
+
* block's connection-field name. The keys are exactly the
|
|
59
|
+
* {@link DIRECT_CONNECTION_FIELD_VISIBILITY} entries classified `"block"`
|
|
60
|
+
* (pinned by the drift-catch test in `describe-fields.test.ts`).
|
|
61
|
+
*/
|
|
62
|
+
export const SERVICE_BLOCK_VISIBILITY = {
|
|
63
|
+
kafka: KAFKA_FIELD_VISIBILITY,
|
|
64
|
+
schema_registry: SCHEMA_REGISTRY_FIELD_VISIBILITY,
|
|
65
|
+
confluent_cloud: CONFLUENT_CLOUD_FIELD_VISIBILITY,
|
|
66
|
+
tableflow: TABLEFLOW_FIELD_VISIBILITY,
|
|
67
|
+
telemetry: TELEMETRY_FIELD_VISIBILITY,
|
|
68
|
+
flink: FLINK_FIELD_VISIBILITY,
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Project a connection into its non-secret card, driven entirely by the
|
|
72
|
+
* visibility maps. OAuth connections carry no service blocks, so `blocks` is
|
|
73
|
+
* empty for them; the `public`/`secret`/`withheld`/`block` switch is the single
|
|
74
|
+
* place the surface/withhold decision is enforced at runtime.
|
|
75
|
+
*/
|
|
76
|
+
export function buildConnectionCard(conn) {
|
|
77
|
+
const connectionMap = conn.type === "oauth"
|
|
78
|
+
? OAUTH_CONNECTION_FIELD_VISIBILITY
|
|
79
|
+
: DIRECT_CONNECTION_FIELD_VISIBILITY;
|
|
80
|
+
const fields = conn;
|
|
81
|
+
const scalars = {};
|
|
82
|
+
const blocks = {};
|
|
83
|
+
for (const [key, visibility] of Object.entries(connectionMap)) {
|
|
84
|
+
const value = fields[key];
|
|
85
|
+
switch (visibility) {
|
|
86
|
+
case "public":
|
|
87
|
+
if (value !== undefined)
|
|
88
|
+
scalars[key] = value;
|
|
89
|
+
break;
|
|
90
|
+
case "block":
|
|
91
|
+
if (value !== undefined) {
|
|
92
|
+
blocks[key] = projectBlock(SERVICE_BLOCK_VISIBILITY[key], value);
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case "secret":
|
|
96
|
+
case "withheld":
|
|
97
|
+
break;
|
|
98
|
+
default:
|
|
99
|
+
throw new Error(`Wacky -- unhandled field visibility "${visibility}" for connection field "${key}"`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return { scalars, blocks };
|
|
103
|
+
}
|
|
104
|
+
/** Project one service block to the `public` fields it actually carries. */
|
|
105
|
+
function projectBlock(blockMap, blockValue) {
|
|
106
|
+
const out = {};
|
|
107
|
+
for (const [field, visibility] of Object.entries(blockMap)) {
|
|
108
|
+
if (visibility === "public" && blockValue[field] !== undefined) {
|
|
109
|
+
out[field] = blockValue[field];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return out;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=describe-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-fields.js","sourceRoot":"","sources":["../../../../../src/confluent/tools/handlers/diagnostics/describe-fields.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAC,MAAM,sBAAsB,GAE/B;IACF,iBAAiB,EAAE,QAAQ;I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,EAAE,CAAC;AAC7B,CAAC;AAED,4EAA4E;AAC5E,SAAS,YAAY,CACnB,QAAmD,EACnD,UAAmC;IAEnC,MAAM,GAAG,GAA4B,EAAE,CAAC;IACxC,KAAK,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3D,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,SAAS,EAAE,CAAC;YAC/D,GAAG,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,55 +1,32 @@
|
|
|
1
1
|
import { CallToolResult } from "../../../../confluent/schema.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ToolCategory, ToolConfig } from "../../../../confluent/tools/base-tools.js";
|
|
3
|
+
import { ToolMetadataHandler } from "../../../../confluent/tools/tool-metadata-handler.js";
|
|
4
4
|
import { ServerRuntime } from "../../../../server-runtime.js";
|
|
5
5
|
/**
|
|
6
|
-
* Diagnostic tool that surfaces *why* tools are absent from `tools/list
|
|
6
|
+
* Diagnostic tool that surfaces *why* tools are absent from `tools/list` or
|
|
7
|
+
* unavailable on a given connection.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* `tools/list` advertises the enabled tool set but not the predicate-driven
|
|
10
|
+
* decision behind every absence. This handler returns that view, shaped around
|
|
11
|
+
* connections: one section per configured connection listing the tools
|
|
12
|
+
* disabled on it (bucketed by the missing config piece, or by functional area
|
|
13
|
+
* under `group_by="category"`). A tool enabled on one connection and disabled
|
|
14
|
+
* on another shows up in the latter's section, so the cross-connection
|
|
15
|
+
* asymmetry is readable by comparing sections. A zero-connection config
|
|
16
|
+
* collapses to a dedicated summary; a single-connection config is simply one
|
|
17
|
+
* section. Connection-independent tools are advertised everywhere and never
|
|
18
|
+
* appear in a section.
|
|
12
19
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `src/config/models.ts`), so the output is a flat list of disabled tools
|
|
16
|
-
* grouped by the missing config piece (kafka block, flink block, schema
|
|
17
|
-
* registry block, …). Tools enabled on the active connection are
|
|
18
|
-
* intentionally absent — `tools/list` already advertises them.
|
|
19
|
-
*
|
|
20
|
-
* v2 plan (when multi-connection support lands — issue #151's follow-ups):
|
|
21
|
-
* regrow output around connections. The text body becomes one block per
|
|
22
|
-
* connection (header + per-connection gaps) plus a `Cross-connection
|
|
23
|
-
* deltas` section that surfaces tools enabled on some connections but not
|
|
24
|
-
* others — the canonical "what does connection B need to reach parity with
|
|
25
|
-
* connection A?" view. The structured `_meta` shape mirrors that change;
|
|
26
|
-
* see the {@linkcode ToolGatingReport} JSDoc in `tool-availability.ts` for
|
|
27
|
-
* the exact target type.
|
|
28
|
-
*
|
|
29
|
-
* Until v2 lands, the helper accepts a multi-connection runtime without
|
|
30
|
-
* crashing, but the v1 flatten is *lossy*: a tool whose predicate is
|
|
31
|
-
* enabled on at least one configured connection is reported as enabled
|
|
32
|
-
* (and therefore omitted from `disabledGroups` entirely), and a tool
|
|
33
|
-
* disabled on multiple connections with different reasons is bucketed
|
|
34
|
-
* under the first disabled verdict its iteration produces — the
|
|
35
|
-
* cross-connection asymmetry vanishes from the output. Today's
|
|
36
|
-
* single-connection invariant means neither lossy case can fire in
|
|
37
|
-
* production; this paragraph exists so a future reader does not mistake
|
|
38
|
-
* defensive iteration for parity reporting.
|
|
20
|
+
* The structured `_meta` mirrors the rendered text; see the
|
|
21
|
+
* {@linkcode ToolGatingReport} JSDoc in `tool-availability.ts`.
|
|
39
22
|
*
|
|
40
23
|
* Always enabled (predicate is `alwaysEnabled`) so an operator can call it
|
|
41
24
|
* to diagnose a config that left every other tool disabled.
|
|
42
25
|
*
|
|
43
|
-
* The
|
|
44
|
-
*
|
|
45
|
-
* registry from a registered handler would create an ESM cycle, leaving
|
|
46
|
-
* the registry's static initializer running before this class's binding
|
|
47
|
-
* is set. The thunk is invoked at request time, after every module is
|
|
48
|
-
* fully loaded, sidestepping the cycle entirely.
|
|
26
|
+
* The tool catalog is supplied through the thunk that {@link
|
|
27
|
+
* ToolMetadataHandler} owns, for the ESM-cycle reason documented there.
|
|
49
28
|
*/
|
|
50
|
-
export declare class ExplainDisabledToolsHandler extends
|
|
51
|
-
private readonly listHandlers;
|
|
52
|
-
constructor(listHandlers: () => Iterable<readonly [ToolName, ToolHandler]>);
|
|
29
|
+
export declare class ExplainDisabledToolsHandler extends ToolMetadataHandler {
|
|
53
30
|
handle(runtime: ServerRuntime, toolArguments: Record<string, unknown> | undefined): CallToolResult;
|
|
54
31
|
getToolConfig(): ToolConfig;
|
|
55
32
|
readonly category = ToolCategory.McpServerDiagnostics;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain-disabled-tools-handler.d.ts","sourceRoot":"","sources":["../../../../../src/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"explain-disabled-tools-handler.d.ts","sourceRoot":"","sources":["../../../../../src/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAEL,YAAY,EACZ,UAAU,EACX,MAAM,oCAAoC,CAAC;AAY5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAYvD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,2BAA4B,SAAQ,mBAAmB;IAClE,MAAM,CACJ,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACjD,cAAc;IAYjB,aAAa,IAAI,UAAU;IAU3B,QAAQ,CAAC,QAAQ,qCAAqC;IACtD,QAAQ,CAAC,SAAS,8EAAiB;CACpC"}
|