@commandable/mcp 0.0.1 → 0.0.4
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 +25 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +82 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +74 -51
- package/dist/cli/setup.js.map +1 -1
- package/dist/config/configApply.d.ts +16 -0
- package/dist/config/configApply.d.ts.map +1 -0
- package/dist/config/configApply.js +74 -0
- package/dist/config/configApply.js.map +1 -0
- package/dist/config/configLoader.d.ts +9 -0
- package/dist/config/configLoader.d.ts.map +1 -0
- package/dist/config/configLoader.js +75 -0
- package/dist/config/configLoader.js.map +1 -0
- package/dist/config/configSchema.d.ts +29 -0
- package/dist/config/configSchema.d.ts.map +1 -0
- package/dist/config/configSchema.js +17 -0
- package/dist/config/configSchema.js.map +1 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +8 -1
- package/dist/db/client.js.map +1 -1
- package/dist/db/integrationStore.d.ts.map +1 -1
- package/dist/db/integrationStore.js +3 -0
- package/dist/db/integrationStore.js.map +1 -1
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +2 -0
- package/dist/db/migrate.js.map +1 -1
- package/dist/db/schema.d.ts +36 -0
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +2 -0
- package/dist/db/schema.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/actionsFactory.js +1 -1
- package/dist/integrations/actionsFactory.js.map +1 -1
- package/dist/integrations/catalog.d.ts +3 -4
- package/dist/integrations/catalog.d.ts.map +1 -1
- package/dist/integrations/catalog.js +2 -37
- package/dist/integrations/catalog.js.map +1 -1
- package/dist/integrations/dataLoader.d.ts +2 -46
- package/dist/integrations/dataLoader.d.ts.map +1 -1
- package/dist/integrations/dataLoader.js +1 -125
- package/dist/integrations/dataLoader.js.map +1 -1
- package/dist/integrations/providerRegistry.d.ts.map +1 -1
- package/dist/integrations/providerRegistry.js +10 -6
- package/dist/integrations/providerRegistry.js.map +1 -1
- package/dist/integrations/proxy.d.ts.map +1 -1
- package/dist/integrations/proxy.js +24 -27
- package/dist/integrations/proxy.js.map +1 -1
- package/dist/mcp/auth.d.ts +18 -0
- package/dist/mcp/auth.d.ts.map +1 -0
- package/dist/mcp/auth.js +45 -0
- package/dist/mcp/auth.js.map +1 -0
- package/dist/mcp/handlers.d.ts +12 -0
- package/dist/mcp/handlers.d.ts.map +1 -0
- package/dist/mcp/handlers.js +39 -0
- package/dist/mcp/handlers.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +2 -38
- package/dist/mcp/server.js.map +1 -1
- package/dist/types.d.ts +1 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -7
- package/integration-data/README.md +0 -52
- package/integration-data/airtable/credentials.json +0 -20
- package/integration-data/airtable/credentials_hint.md +0 -4
- package/integration-data/airtable/handlers/create_record.js +0 -12
- package/integration-data/airtable/handlers/delete_record.js +0 -7
- package/integration-data/airtable/handlers/get_record.js +0 -4
- package/integration-data/airtable/handlers/get_table_schema.js +0 -6
- package/integration-data/airtable/handlers/list_bases.js +0 -4
- package/integration-data/airtable/handlers/list_records.js +0 -25
- package/integration-data/airtable/handlers/list_table_fields.js +0 -6
- package/integration-data/airtable/handlers/list_tables.js +0 -4
- package/integration-data/airtable/handlers/list_views.js +0 -6
- package/integration-data/airtable/handlers/search_records.js +0 -6
- package/integration-data/airtable/handlers/update_record.js +0 -11
- package/integration-data/airtable/manifest.json +0 -83
- package/integration-data/airtable/schemas/create_record.json +0 -12
- package/integration-data/airtable/schemas/delete_record.json +0 -11
- package/integration-data/airtable/schemas/empty.json +0 -6
- package/integration-data/airtable/schemas/get_record.json +0 -11
- package/integration-data/airtable/schemas/id_base.json +0 -9
- package/integration-data/airtable/schemas/id_base_table.json +0 -10
- package/integration-data/airtable/schemas/list_records.json +0 -26
- package/integration-data/airtable/schemas/search_records.json +0 -12
- package/integration-data/airtable/schemas/update_record.json +0 -13
- package/integration-data/github/credentials.json +0 -20
- package/integration-data/github/credentials_hint.md +0 -7
- package/integration-data/github/handlers/add_labels_to_issue.js +0 -12
- package/integration-data/github/handlers/close_issue.js +0 -5
- package/integration-data/github/handlers/comment_on_issue.js +0 -5
- package/integration-data/github/handlers/create_branch.js +0 -33
- package/integration-data/github/handlers/create_commit.js +0 -91
- package/integration-data/github/handlers/create_issue.js +0 -10
- package/integration-data/github/handlers/create_or_update_file.js +0 -21
- package/integration-data/github/handlers/create_pull_request.js +0 -16
- package/integration-data/github/handlers/create_repo.js +0 -11
- package/integration-data/github/handlers/delete_repo.js +0 -6
- package/integration-data/github/handlers/get_issue.js +0 -4
- package/integration-data/github/handlers/get_repo.js +0 -4
- package/integration-data/github/handlers/list_branches.js +0 -4
- package/integration-data/github/handlers/list_commits.js +0 -12
- package/integration-data/github/handlers/list_issues.js +0 -12
- package/integration-data/github/handlers/list_pull_requests.js +0 -8
- package/integration-data/github/handlers/list_repos_install.js +0 -4
- package/integration-data/github/handlers/list_repos_user.js +0 -4
- package/integration-data/github/handlers/merge_pull_request.js +0 -14
- package/integration-data/github/handlers/update_issue.js +0 -15
- package/integration-data/github/manifest.json +0 -26
- package/integration-data/github/schemas/add_labels_to_issue.json +0 -12
- package/integration-data/github/schemas/close_issue.json +0 -10
- package/integration-data/github/schemas/comment_on_issue.json +0 -11
- package/integration-data/github/schemas/create_branch.json +0 -12
- package/integration-data/github/schemas/create_commit.json +0 -25
- package/integration-data/github/schemas/create_issue.json +0 -13
- package/integration-data/github/schemas/create_or_update_file.json +0 -15
- package/integration-data/github/schemas/create_pull_request.json +0 -15
- package/integration-data/github/schemas/create_repo.json +0 -12
- package/integration-data/github/schemas/delete_repo.json +0 -10
- package/integration-data/github/schemas/empty.json +0 -5
- package/integration-data/github/schemas/get_issue.json +0 -10
- package/integration-data/github/schemas/get_repo.json +0 -9
- package/integration-data/github/schemas/list_commits.json +0 -12
- package/integration-data/github/schemas/list_issues.json +0 -12
- package/integration-data/github/schemas/list_pull_requests.json +0 -10
- package/integration-data/github/schemas/merge_pull_request.json +0 -14
- package/integration-data/github/schemas/owner_repo.json +0 -9
- package/integration-data/github/schemas/update_issue.json +0 -15
- package/integration-data/google-calendar/credentials.json +0 -36
- package/integration-data/google-calendar/credentials_hint.md +0 -9
- package/integration-data/google-calendar/handlers/create_event.js +0 -6
- package/integration-data/google-calendar/handlers/delete_acl.js +0 -6
- package/integration-data/google-calendar/handlers/delete_event.js +0 -7
- package/integration-data/google-calendar/handlers/freebusy_query.js +0 -4
- package/integration-data/google-calendar/handlers/get_acl.js +0 -5
- package/integration-data/google-calendar/handlers/get_calendar.js +0 -4
- package/integration-data/google-calendar/handlers/get_event.js +0 -5
- package/integration-data/google-calendar/handlers/insert_acl.js +0 -6
- package/integration-data/google-calendar/handlers/list_acl.js +0 -5
- package/integration-data/google-calendar/handlers/list_calendars.js +0 -4
- package/integration-data/google-calendar/handlers/list_colors.js +0 -4
- package/integration-data/google-calendar/handlers/list_events.js +0 -21
- package/integration-data/google-calendar/handlers/list_settings.js +0 -4
- package/integration-data/google-calendar/handlers/move_event.js +0 -6
- package/integration-data/google-calendar/handlers/patch_event.js +0 -5
- package/integration-data/google-calendar/handlers/quick_add.js +0 -6
- package/integration-data/google-calendar/handlers/update_acl.js +0 -7
- package/integration-data/google-calendar/handlers/update_event.js +0 -5
- package/integration-data/google-calendar/manifest.json +0 -26
- package/integration-data/google-calendar/schemas/create_event.json +0 -34
- package/integration-data/google-calendar/schemas/delete_acl.json +0 -9
- package/integration-data/google-calendar/schemas/empty.json +0 -1
- package/integration-data/google-calendar/schemas/freebusy_query.json +0 -13
- package/integration-data/google-calendar/schemas/get_acl.json +0 -9
- package/integration-data/google-calendar/schemas/id_calendar.json +0 -8
- package/integration-data/google-calendar/schemas/id_calendar_event.json +0 -9
- package/integration-data/google-calendar/schemas/insert_acl.json +0 -18
- package/integration-data/google-calendar/schemas/list_events.json +0 -15
- package/integration-data/google-calendar/schemas/move_event.json +0 -10
- package/integration-data/google-calendar/schemas/patch_event.json +0 -10
- package/integration-data/google-calendar/schemas/quick_add.json +0 -9
- package/integration-data/google-calendar/schemas/update_acl.json +0 -10
- package/integration-data/google-calendar/schemas/update_event.json +0 -10
- package/integration-data/google-docs/credentials.json +0 -36
- package/integration-data/google-docs/credentials_hint.md +0 -9
- package/integration-data/google-docs/handlers/append_text.js +0 -12
- package/integration-data/google-docs/handlers/batch_update.js +0 -13
- package/integration-data/google-docs/handlers/create_document.js +0 -9
- package/integration-data/google-docs/handlers/delete_first_match.js +0 -50
- package/integration-data/google-docs/handlers/get_document.js +0 -12
- package/integration-data/google-docs/handlers/get_document_structured.js +0 -6
- package/integration-data/google-docs/handlers/get_document_text.js +0 -17
- package/integration-data/google-docs/handlers/insert_inline_image_after_first_match.js +0 -41
- package/integration-data/google-docs/handlers/insert_page_break_after_first_match.js +0 -49
- package/integration-data/google-docs/handlers/insert_table_after_first_match.js +0 -49
- package/integration-data/google-docs/handlers/insert_text_after_first_match.js +0 -51
- package/integration-data/google-docs/handlers/replace_all_text.js +0 -8
- package/integration-data/google-docs/handlers/style_first_match.js +0 -42
- package/integration-data/google-docs/handlers/update_document_style.js +0 -8
- package/integration-data/google-docs/handlers/update_paragraph_style_for_first_match.js +0 -48
- package/integration-data/google-docs/manifest.json +0 -58
- package/integration-data/google-docs/schemas/append_text.json +0 -10
- package/integration-data/google-docs/schemas/apply_text_style.json +0 -13
- package/integration-data/google-docs/schemas/batch_update.json +0 -16
- package/integration-data/google-docs/schemas/create_document.json +0 -8
- package/integration-data/google-docs/schemas/delete_content_range.json +0 -11
- package/integration-data/google-docs/schemas/delete_first_match.json +0 -10
- package/integration-data/google-docs/schemas/get_document.json +0 -11
- package/integration-data/google-docs/schemas/get_document_structured.json +0 -9
- package/integration-data/google-docs/schemas/get_document_text.json +0 -9
- package/integration-data/google-docs/schemas/insert_inline_image.json +0 -12
- package/integration-data/google-docs/schemas/insert_inline_image_after_first_match.json +0 -13
- package/integration-data/google-docs/schemas/insert_page_break.json +0 -10
- package/integration-data/google-docs/schemas/insert_page_break_after_first_match.json +0 -11
- package/integration-data/google-docs/schemas/insert_table.json +0 -12
- package/integration-data/google-docs/schemas/insert_table_after_first_match.json +0 -13
- package/integration-data/google-docs/schemas/insert_text_after_first_match.json +0 -12
- package/integration-data/google-docs/schemas/insert_text_at.json +0 -11
- package/integration-data/google-docs/schemas/replace_all_text.json +0 -12
- package/integration-data/google-docs/schemas/style_first_match.json +0 -12
- package/integration-data/google-docs/schemas/update_document_style.json +0 -11
- package/integration-data/google-docs/schemas/update_paragraph_style.json +0 -13
- package/integration-data/google-docs/schemas/update_paragraph_style_for_first_match.json +0 -12
- package/integration-data/google-sheet/credentials.json +0 -36
- package/integration-data/google-sheet/credentials_hint.md +0 -9
- package/integration-data/google-sheet/handlers/append_values.js +0 -18
- package/integration-data/google-sheet/handlers/batch_clear_values.js +0 -6
- package/integration-data/google-sheet/handlers/batch_clear_values_by_data_filter.js +0 -6
- package/integration-data/google-sheet/handlers/batch_get_values.js +0 -16
- package/integration-data/google-sheet/handlers/batch_update.js +0 -14
- package/integration-data/google-sheet/handlers/batch_update_values.js +0 -16
- package/integration-data/google-sheet/handlers/batch_update_values_by_data_filter.js +0 -16
- package/integration-data/google-sheet/handlers/clear_values.js +0 -6
- package/integration-data/google-sheet/handlers/copy_to_spreadsheet.js +0 -6
- package/integration-data/google-sheet/handlers/create_spreadsheet.js +0 -5
- package/integration-data/google-sheet/handlers/get_developer_metadata.js +0 -6
- package/integration-data/google-sheet/handlers/get_spreadsheet.js +0 -12
- package/integration-data/google-sheet/handlers/get_spreadsheet_by_data_filter.js +0 -10
- package/integration-data/google-sheet/handlers/get_values.js +0 -14
- package/integration-data/google-sheet/handlers/get_values_by_data_filter.js +0 -14
- package/integration-data/google-sheet/handlers/search_developer_metadata.js +0 -7
- package/integration-data/google-sheet/handlers/update_values.js +0 -16
- package/integration-data/google-sheet/manifest.json +0 -125
- package/integration-data/google-sheet/schemas/append_values.json +0 -16
- package/integration-data/google-sheet/schemas/batch_clear_values.json +0 -10
- package/integration-data/google-sheet/schemas/batch_clear_values_by_data_filter.json +0 -10
- package/integration-data/google-sheet/schemas/batch_get_values.json +0 -13
- package/integration-data/google-sheet/schemas/batch_update.json +0 -13
- package/integration-data/google-sheet/schemas/batch_update_values.json +0 -25
- package/integration-data/google-sheet/schemas/batch_update_values_by_data_filter.json +0 -25
- package/integration-data/google-sheet/schemas/clear_values.json +0 -10
- package/integration-data/google-sheet/schemas/copy_to_spreadsheet.json +0 -11
- package/integration-data/google-sheet/schemas/create_spreadsheet.json +0 -11
- package/integration-data/google-sheet/schemas/get_developer_metadata.json +0 -10
- package/integration-data/google-sheet/schemas/get_spreadsheet.json +0 -15
- package/integration-data/google-sheet/schemas/get_spreadsheet_by_data_filter.json +0 -11
- package/integration-data/google-sheet/schemas/get_values.json +0 -13
- package/integration-data/google-sheet/schemas/get_values_by_data_filter.json +0 -17
- package/integration-data/google-sheet/schemas/search_developer_metadata.json +0 -14
- package/integration-data/google-sheet/schemas/update_values.json +0 -15
- package/integration-data/google-slides/credentials.json +0 -36
- package/integration-data/google-slides/credentials_hint.md +0 -9
- package/integration-data/google-slides/handlers/append_text_to_title_of_first_slide.js +0 -17
- package/integration-data/google-slides/handlers/batch_update.js +0 -15
- package/integration-data/google-slides/handlers/create_presentation.js +0 -8
- package/integration-data/google-slides/handlers/create_slide_after_first_match.js +0 -20
- package/integration-data/google-slides/handlers/get_page_thumbnail.js +0 -12
- package/integration-data/google-slides/handlers/get_presentation.js +0 -6
- package/integration-data/google-slides/handlers/insert_image_after_first_match.js +0 -19
- package/integration-data/google-slides/handlers/insert_shape_after_first_match.js +0 -21
- package/integration-data/google-slides/handlers/replace_text_first_match.js +0 -9
- package/integration-data/google-slides/handlers/set_background_color_for_slide_index.js +0 -15
- package/integration-data/google-slides/handlers/style_text_first_match.js +0 -48
- package/integration-data/google-slides/manifest.json +0 -41
- package/integration-data/google-slides/schemas/append_text_to_title_of_first_slide.json +0 -11
- package/integration-data/google-slides/schemas/batch_update.json +0 -13
- package/integration-data/google-slides/schemas/create_presentation.json +0 -8
- package/integration-data/google-slides/schemas/create_slide_after_first_match.json +0 -11
- package/integration-data/google-slides/schemas/get_page_thumbnail.json +0 -12
- package/integration-data/google-slides/schemas/get_presentation.json +0 -9
- package/integration-data/google-slides/schemas/insert_image_after_first_match.json +0 -13
- package/integration-data/google-slides/schemas/insert_shape_after_first_match.json +0 -13
- package/integration-data/google-slides/schemas/replace_text_first_match.json +0 -12
- package/integration-data/google-slides/schemas/set_background_color_for_slide_index.json +0 -11
- package/integration-data/google-slides/schemas/style_text_first_match.json +0 -12
- package/integration-data/new_integration_prompt.md +0 -41
- package/integration-data/notion/credentials.json +0 -21
- package/integration-data/notion/credentials_hint.md +0 -5
- package/integration-data/notion/handlers/append_block_children.js +0 -7
- package/integration-data/notion/handlers/create_comment.js +0 -10
- package/integration-data/notion/handlers/create_database.js +0 -11
- package/integration-data/notion/handlers/create_page.js +0 -13
- package/integration-data/notion/handlers/delete_block.js +0 -8
- package/integration-data/notion/handlers/get_me.js +0 -4
- package/integration-data/notion/handlers/list_block_children.js +0 -10
- package/integration-data/notion/handlers/list_comments.js +0 -14
- package/integration-data/notion/handlers/list_users.js +0 -10
- package/integration-data/notion/handlers/query_database.js +0 -10
- package/integration-data/notion/handlers/retrieve_block.js +0 -4
- package/integration-data/notion/handlers/retrieve_database.js +0 -4
- package/integration-data/notion/handlers/retrieve_page.js +0 -4
- package/integration-data/notion/handlers/retrieve_page_property_item.js +0 -10
- package/integration-data/notion/handlers/retrieve_user.js +0 -4
- package/integration-data/notion/handlers/search.js +0 -11
- package/integration-data/notion/handlers/update_block.js +0 -7
- package/integration-data/notion/handlers/update_database.js +0 -10
- package/integration-data/notion/handlers/update_page_properties.js +0 -10
- package/integration-data/notion/manifest.json +0 -139
- package/integration-data/notion/prompt.md +0 -26
- package/integration-data/notion/schemas/append_block_children.json +0 -10
- package/integration-data/notion/schemas/create_comment.json +0 -18
- package/integration-data/notion/schemas/create_database.json +0 -18
- package/integration-data/notion/schemas/create_page.json +0 -22
- package/integration-data/notion/schemas/delete_block.json +0 -9
- package/integration-data/notion/schemas/empty.json +0 -6
- package/integration-data/notion/schemas/id_block.json +0 -9
- package/integration-data/notion/schemas/id_database.json +0 -9
- package/integration-data/notion/schemas/id_page.json +0 -9
- package/integration-data/notion/schemas/id_user.json +0 -9
- package/integration-data/notion/schemas/list_block_children.json +0 -11
- package/integration-data/notion/schemas/list_comments.json +0 -15
- package/integration-data/notion/schemas/list_users.json +0 -9
- package/integration-data/notion/schemas/query_database.json +0 -13
- package/integration-data/notion/schemas/retrieve_page_property_item.json +0 -12
- package/integration-data/notion/schemas/search.json +0 -27
- package/integration-data/notion/schemas/update_block.json +0 -10
- package/integration-data/notion/schemas/update_database.json +0 -13
- package/integration-data/notion/schemas/update_page_properties.json +0 -13
- package/integration-data/trello/credentials.json +0 -26
- package/integration-data/trello/credentials_hint.md +0 -4
- package/integration-data/trello/handlers/add_checklist_to_card.js +0 -5
- package/integration-data/trello/handlers/add_member_to_card.js +0 -5
- package/integration-data/trello/handlers/archive_list.js +0 -5
- package/integration-data/trello/handlers/create_card.js +0 -13
- package/integration-data/trello/handlers/create_list.js +0 -7
- package/integration-data/trello/handlers/delete_card.js +0 -9
- package/integration-data/trello/handlers/get_board.js +0 -4
- package/integration-data/trello/handlers/get_board_cards.js +0 -4
- package/integration-data/trello/handlers/get_board_custom_fields.js +0 -4
- package/integration-data/trello/handlers/get_board_labels.js +0 -4
- package/integration-data/trello/handlers/get_board_lists.js +0 -4
- package/integration-data/trello/handlers/get_board_members.js +0 -4
- package/integration-data/trello/handlers/get_board_memberships.js +0 -4
- package/integration-data/trello/handlers/get_card.js +0 -4
- package/integration-data/trello/handlers/get_card_actions.js +0 -4
- package/integration-data/trello/handlers/get_card_attachments.js +0 -4
- package/integration-data/trello/handlers/get_card_checklists.js +0 -4
- package/integration-data/trello/handlers/get_card_custom_field_items.js +0 -4
- package/integration-data/trello/handlers/get_card_members.js +0 -4
- package/integration-data/trello/handlers/get_list.js +0 -4
- package/integration-data/trello/handlers/get_list_cards.js +0 -4
- package/integration-data/trello/handlers/get_member.js +0 -4
- package/integration-data/trello/handlers/get_member_boards.js +0 -4
- package/integration-data/trello/handlers/get_member_organizations.js +0 -4
- package/integration-data/trello/handlers/get_organization.js +0 -4
- package/integration-data/trello/handlers/get_organization_boards.js +0 -4
- package/integration-data/trello/handlers/move_card_to_list.js +0 -5
- package/integration-data/trello/handlers/remove_member_from_card.js +0 -9
- package/integration-data/trello/handlers/search.js +0 -5
- package/integration-data/trello/handlers/update_card.js +0 -19
- package/integration-data/trello/handlers/update_list.js +0 -11
- package/integration-data/trello/manifest.json +0 -231
- package/integration-data/trello/schemas/add_checklist_to_card.json +0 -10
- package/integration-data/trello/schemas/add_member_to_card.json +0 -10
- package/integration-data/trello/schemas/archive_list.json +0 -9
- package/integration-data/trello/schemas/create_card.json +0 -13
- package/integration-data/trello/schemas/create_list.json +0 -11
- package/integration-data/trello/schemas/delete_card.json +0 -9
- package/integration-data/trello/schemas/display_trello_cards.json +0 -45
- package/integration-data/trello/schemas/empty.json +0 -5
- package/integration-data/trello/schemas/get_member.json +0 -5
- package/integration-data/trello/schemas/id_board.json +0 -8
- package/integration-data/trello/schemas/id_card.json +0 -8
- package/integration-data/trello/schemas/id_list.json +0 -8
- package/integration-data/trello/schemas/id_org.json +0 -8
- package/integration-data/trello/schemas/move_card_to_list.json +0 -10
- package/integration-data/trello/schemas/remove_member_from_card.json +0 -10
- package/integration-data/trello/schemas/search.json +0 -8
- package/integration-data/trello/schemas/update_card.json +0 -16
- package/integration-data/trello/schemas/update_list.json +0 -12
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Connect your everyday apps to any AI assistant that supports the Model Context P
|
|
|
7
7
|
### 1) Run the setup wizard
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx @commandable/mcp init
|
|
10
|
+
npx -y @commandable/mcp init
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
This walks you through selecting integrations and entering API credentials. Credentials are encrypted immediately and stored locally on your machine (not in your project).
|
|
@@ -18,17 +18,38 @@ The wizard prints a JSON snippet to paste into your MCP client config.
|
|
|
18
18
|
|
|
19
19
|
For Claude Desktop, edit `~/Library/Application Support/Claude/claude_desktop_config.json` and add the `mcpServers.commandable` block.
|
|
20
20
|
|
|
21
|
+
Example:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"commandable": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["-y", "@commandable/mcp"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
21
34
|
### 3) Restart your MCP client
|
|
22
35
|
|
|
23
36
|
Restart Claude Desktop (or reload the Cursor window) so it picks up the new MCP server.
|
|
24
37
|
|
|
25
38
|
## CLI
|
|
26
39
|
|
|
27
|
-
- `npx @commandable/mcp init`: first-time setup
|
|
28
|
-
- `npx @commandable/mcp add`: add more integrations later
|
|
29
|
-
- `npx @commandable/mcp status`: show enabled integrations
|
|
40
|
+
- `npx -y @commandable/mcp init`: first-time setup
|
|
41
|
+
- `npx -y @commandable/mcp add`: add more integrations later
|
|
42
|
+
- `npx -y @commandable/mcp status`: show enabled integrations
|
|
43
|
+
- `npx -y @commandable/mcp apply [--config <file>]`: apply config-as-code idempotently (CI-friendly)
|
|
44
|
+
- `npx -y @commandable/mcp create-api-key [name]`: create an API key for authenticating to the hosted `/mcp` endpoint in server mode
|
|
45
|
+
|
|
46
|
+
Tip: in non-interactive contexts (and in MCP client configs), prefer `npx -y @commandable/mcp ...` to avoid install prompts on first run.
|
|
30
47
|
|
|
31
48
|
## Repository
|
|
32
49
|
|
|
33
50
|
Source lives in the monorepo at `commandable-mcp/packages/server`.
|
|
34
51
|
|
|
52
|
+
## Server mode (HTTP + UI)
|
|
53
|
+
|
|
54
|
+
If you want an MCP endpoint by URL (for agent frameworks) plus a management UI, run the Nuxt app (Docker deployment) from the monorepo. See the root `commandable-mcp/README.md`.
|
|
55
|
+
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAkIA,wBAAsB,IAAI,kBA4CzB"}
|
package/dist/cli/index.js
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import picocolors from 'picocolors';
|
|
2
|
+
import crypto from 'node:crypto';
|
|
2
3
|
import { IntegrationProxy } from '../integrations/proxy.js';
|
|
3
4
|
import { buildMcpToolIndex } from '../mcp/toolAdapter.js';
|
|
4
5
|
import { runStdioMcpServer } from '../mcp/server.js';
|
|
6
|
+
import { createApiKey, generateApiKey } from '../mcp/auth.js';
|
|
5
7
|
import { runAddInteractive, runInitInteractive } from './setup.js';
|
|
6
|
-
import { openLocalState } from './credentialManager.js';
|
|
8
|
+
import { getOrCreateEncryptionSecret, openLocalState } from './credentialManager.js';
|
|
7
9
|
import { listIntegrations } from '../db/integrationStore.js';
|
|
10
|
+
import { createDbFromEnv } from '../db/client.js';
|
|
11
|
+
import { ensureSchema } from '../db/migrate.js';
|
|
12
|
+
import { SqlCredentialStore } from '../db/credentialStore.js';
|
|
13
|
+
import { applyConfig } from '../config/configApply.js';
|
|
14
|
+
import { loadConfig } from '../config/configLoader.js';
|
|
8
15
|
function hasFlag(...flags) {
|
|
9
16
|
return flags.some(f => process.argv.includes(f));
|
|
10
17
|
}
|
|
18
|
+
function getFlagValue(flag) {
|
|
19
|
+
const idx = process.argv.indexOf(flag);
|
|
20
|
+
if (idx === -1)
|
|
21
|
+
return null;
|
|
22
|
+
const val = process.argv[idx + 1];
|
|
23
|
+
if (!val || val.startsWith('-'))
|
|
24
|
+
return null;
|
|
25
|
+
return val;
|
|
26
|
+
}
|
|
11
27
|
function help(exitCode = 0) {
|
|
12
28
|
const lines = [
|
|
13
29
|
'',
|
|
@@ -15,20 +31,23 @@ function help(exitCode = 0) {
|
|
|
15
31
|
'',
|
|
16
32
|
picocolors.bold('Usage'),
|
|
17
33
|
` ${picocolors.cyan('commandable-mcp init')}`,
|
|
34
|
+
` ${picocolors.cyan('commandable-mcp init')} ${picocolors.dim('--config ./commandable.config.yaml')}`,
|
|
18
35
|
` ${picocolors.cyan('commandable-mcp add')}`,
|
|
19
36
|
` ${picocolors.cyan('commandable-mcp status')}`,
|
|
20
|
-
` ${picocolors.cyan('commandable-mcp')} ${picocolors.dim('
|
|
37
|
+
` ${picocolors.cyan('commandable-mcp apply')} ${picocolors.dim('[--config ./commandable.config.yaml]')}`,
|
|
38
|
+
` ${picocolors.cyan('commandable-mcp create-api-key')} ${picocolors.dim('[name]')}`,
|
|
39
|
+
` ${picocolors.cyan('commandable-mcp')} ${picocolors.dim('(start MCP server via stdio)')}`,
|
|
21
40
|
'',
|
|
22
41
|
picocolors.bold('Notes'),
|
|
23
42
|
`- Credentials entered via the CLI are stored encrypted at ${picocolors.dim('~/.commandable/')} (override with ${picocolors.cyan('COMMANDABLE_DATA_DIR')}).`,
|
|
24
|
-
`- MCP clients (Claude Desktop, Cursor) spawn this server process automatically via: ${picocolors.cyan('npx @commandable/mcp')}`,
|
|
43
|
+
`- MCP clients (Claude Desktop, Cursor) spawn this server process automatically via: ${picocolors.cyan('npx -y @commandable/mcp')}`,
|
|
25
44
|
'',
|
|
26
45
|
];
|
|
27
46
|
console.error(lines.join('\n'));
|
|
28
47
|
process.exit(exitCode);
|
|
29
48
|
}
|
|
30
49
|
async function runStdioFromDb() {
|
|
31
|
-
const spaceId = 'local';
|
|
50
|
+
const spaceId = process.env.COMMANDABLE_SPACE_ID || 'local';
|
|
32
51
|
const { db, credentialStore } = await openLocalState();
|
|
33
52
|
const integrations = await listIntegrations(db, spaceId);
|
|
34
53
|
if (!integrations.length) {
|
|
@@ -45,12 +64,66 @@ async function runStdioFromDb() {
|
|
|
45
64
|
tools: { list: index.tools, byName: index.byName },
|
|
46
65
|
});
|
|
47
66
|
}
|
|
67
|
+
async function openEnvState() {
|
|
68
|
+
const db = createDbFromEnv();
|
|
69
|
+
await ensureSchema(db);
|
|
70
|
+
const secret = getOrCreateEncryptionSecret();
|
|
71
|
+
const credentialStore = new SqlCredentialStore(db, secret);
|
|
72
|
+
return {
|
|
73
|
+
db,
|
|
74
|
+
credentialStore,
|
|
75
|
+
close: async () => {
|
|
76
|
+
if (db.dialect === 'sqlite')
|
|
77
|
+
db.close();
|
|
78
|
+
else
|
|
79
|
+
await db.close();
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
async function runApplyHeadless() {
|
|
84
|
+
const cfgPath = getFlagValue('--config') || process.env.COMMANDABLE_CONFIG_FILE || null;
|
|
85
|
+
const { config, path } = loadConfig(cfgPath || undefined);
|
|
86
|
+
const spaceId = process.env.COMMANDABLE_SPACE_ID || config.spaceId || 'local';
|
|
87
|
+
const { db, credentialStore, close } = await openEnvState();
|
|
88
|
+
try {
|
|
89
|
+
const res = await applyConfig({ config, db, credentialStore, defaultSpaceId: spaceId });
|
|
90
|
+
console.error(`${picocolors.green('Config applied.')}`);
|
|
91
|
+
console.error(`${picocolors.dim('File:')} ${path}`);
|
|
92
|
+
console.error(`${picocolors.dim('Space:')} ${res.spaceId}`);
|
|
93
|
+
console.error(`${picocolors.dim('Integrations upserted:')} ${res.integrationsUpserted}`);
|
|
94
|
+
console.error(`${picocolors.dim('Credentials written:')} ${res.credentialsWritten}`);
|
|
95
|
+
console.error(`${picocolors.dim('Credentials unchanged:')} ${res.credentialsUnchanged}`);
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
await close();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async function runCreateApiKey() {
|
|
102
|
+
const name = process.argv[3] && !process.argv[3].startsWith('-') ? String(process.argv[3]) : 'default';
|
|
103
|
+
const rawKey = generateApiKey();
|
|
104
|
+
const id = crypto.randomUUID ? crypto.randomUUID() : crypto.randomBytes(16).toString('hex');
|
|
105
|
+
const { db, close } = await openEnvState();
|
|
106
|
+
try {
|
|
107
|
+
await createApiKey(db, { id, name, rawKey });
|
|
108
|
+
console.error(`${picocolors.green('API key created.')}`);
|
|
109
|
+
console.error(`${picocolors.dim('Name:')} ${name}`);
|
|
110
|
+
console.error(`${picocolors.dim('ID:')} ${id}`);
|
|
111
|
+
console.error(`${picocolors.dim('Key (store this now):')} ${rawKey}`);
|
|
112
|
+
}
|
|
113
|
+
finally {
|
|
114
|
+
await close();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
48
117
|
export async function main() {
|
|
49
118
|
const cmd = process.argv[2];
|
|
50
119
|
if (hasFlag('--help', '-h'))
|
|
51
120
|
help(0);
|
|
52
|
-
if (cmd === 'init')
|
|
121
|
+
if (cmd === 'init') {
|
|
122
|
+
const cfgPath = getFlagValue('--config') || process.env.COMMANDABLE_CONFIG_FILE || null;
|
|
123
|
+
if (cfgPath)
|
|
124
|
+
return await runApplyHeadless();
|
|
53
125
|
return await runInitInteractive();
|
|
126
|
+
}
|
|
54
127
|
if (cmd === 'add')
|
|
55
128
|
return await runAddInteractive();
|
|
56
129
|
if (cmd === 'status') {
|
|
@@ -70,6 +143,10 @@ export async function main() {
|
|
|
70
143
|
await close();
|
|
71
144
|
}
|
|
72
145
|
}
|
|
146
|
+
if (cmd === 'apply')
|
|
147
|
+
return await runApplyHeadless();
|
|
148
|
+
if (cmd === 'create-api-key')
|
|
149
|
+
return await runCreateApiKey();
|
|
73
150
|
if (cmd && !cmd.startsWith('-'))
|
|
74
151
|
help(1);
|
|
75
152
|
return await runStdioFromDb();
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAClE,OAAO,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;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M,KAAK,GAAG,MAAM,gBAAgB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;YACjD,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;gBAClB,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAA;gBAC5C,OAAM;YACR,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;YACtC,KAAK,MAAM,EAAE,IAAI,KAAK;gBACpB,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;YAC/B,OAAM;QACR,CAAC;gBACO,CAAC;YACP,MAAM,KAAK,EAAE,CAAA;QACf,CAAC;IACH,CAAC;IAED,IAAI,GAAG,KAAK,OAAO;QACjB,OAAO,MAAM,gBAAgB,EAAE,CAAA;IAEjC,IAAI,GAAG,KAAK,gBAAgB;QAC1B,OAAO,MAAM,eAAe,EAAE,CAAA;IAEhC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;QAC7B,IAAI,CAAC,CAAC,CAAC,CAAA;IAET,OAAO,MAAM,cAAc,EAAE,CAAA;AAC/B,CAAC"}
|
package/dist/cli/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/cli/setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/cli/setup.ts"],"names":[],"mappings":"AAkMA,wBAAsB,kBAAkB,kBAmCvC;AAED,wBAAsB,iBAAiB,kBA0CtC"}
|
package/dist/cli/setup.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
1
|
import picocolors from 'picocolors';
|
|
5
|
-
import { intro, isCancel, log, multiselect, note, outro, password, text, } from '@clack/prompts';
|
|
2
|
+
import { intro, isCancel, log, multiselect, note, outro, password, select, text, } from '@clack/prompts';
|
|
6
3
|
import { listIntegrationCatalog } from '../integrations/catalog.js';
|
|
7
|
-
import { loadIntegrationCredentialConfig } from '../integrations/dataLoader.js';
|
|
4
|
+
import { loadIntegrationCredentialConfig, loadIntegrationHint, loadIntegrationVariants } from '../integrations/dataLoader.js';
|
|
8
5
|
import { getCommandableDir, openLocalState } from './credentialManager.js';
|
|
9
6
|
import { listIntegrations, upsertIntegration } from '../db/integrationStore.js';
|
|
10
7
|
function isTruthyString(v) {
|
|
@@ -19,44 +16,35 @@ function formatIntegrationOption(type, name) {
|
|
|
19
16
|
return type;
|
|
20
17
|
return `${type} ${picocolors.dim(`(${name})`)}`;
|
|
21
18
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Prompt the user to pick a credential variant for the given integration type.
|
|
21
|
+
* If there is only one variant, auto-selects it without prompting.
|
|
22
|
+
* Returns the selected variant key, or null if the user cancelled.
|
|
23
|
+
*/
|
|
24
|
+
async function selectCredentialVariant(type) {
|
|
25
|
+
const variantsFile = loadIntegrationVariants(type);
|
|
26
|
+
if (!variantsFile)
|
|
28
27
|
return null;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
async function selectIntegrations(args) {
|
|
38
|
-
const catalog = listIntegrationCatalog();
|
|
39
|
-
const options = catalog
|
|
40
|
-
.filter(it => !args.excludeTypes?.has(it.type))
|
|
41
|
-
.filter(it => !!loadIntegrationCredentialConfig(it.type))
|
|
42
|
-
.map(it => ({ value: it.type, label: formatIntegrationOption(it.type, it.name) }))
|
|
43
|
-
.sort((a, b) => a.value.localeCompare(b.value));
|
|
44
|
-
if (!options.length) {
|
|
45
|
-
log.info('No locally-configurable integrations available yet.');
|
|
46
|
-
return [];
|
|
28
|
+
const variantKeys = Object.keys(variantsFile.variants);
|
|
29
|
+
if (variantKeys.length === 1) {
|
|
30
|
+
return variantKeys[0];
|
|
47
31
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
32
|
+
const options = variantKeys.map(key => ({
|
|
33
|
+
value: key,
|
|
34
|
+
label: variantsFile.variants[key].label,
|
|
35
|
+
hint: key === variantsFile.default ? 'recommended' : undefined,
|
|
36
|
+
}));
|
|
37
|
+
const result = await select({
|
|
38
|
+
message: `Select credential type for ${picocolors.cyan(type)}:`,
|
|
50
39
|
options,
|
|
51
|
-
|
|
40
|
+
initialValue: variantsFile.default,
|
|
52
41
|
});
|
|
53
|
-
if (isCancel(
|
|
42
|
+
if (isCancel(result))
|
|
54
43
|
return null;
|
|
55
|
-
|
|
56
|
-
return types;
|
|
44
|
+
return result;
|
|
57
45
|
}
|
|
58
|
-
async function
|
|
59
|
-
const credCfg = loadIntegrationCredentialConfig(type);
|
|
46
|
+
async function promptCredentialsForVariant(type, variantKey) {
|
|
47
|
+
const credCfg = loadIntegrationCredentialConfig(type, variantKey);
|
|
60
48
|
const schema = credCfg?.schema;
|
|
61
49
|
if (!schema || typeof schema !== 'object')
|
|
62
50
|
return {};
|
|
@@ -65,12 +53,12 @@ async function promptCredentialsForIntegration(type) {
|
|
|
65
53
|
const keys = Object.keys(props);
|
|
66
54
|
if (!keys.length)
|
|
67
55
|
return {};
|
|
68
|
-
const hint =
|
|
56
|
+
const hint = loadIntegrationHint(type, variantKey);
|
|
69
57
|
if (hint) {
|
|
70
|
-
note(hint, `${type}: setup hint`);
|
|
58
|
+
note(hint, `${type} (${variantKey}): setup hint`);
|
|
71
59
|
}
|
|
72
60
|
else {
|
|
73
|
-
log.info(picocolors.dim(`No setup hint found for ${type}.`));
|
|
61
|
+
log.info(picocolors.dim(`No setup hint found for ${type}/${variantKey}.`));
|
|
74
62
|
}
|
|
75
63
|
const creds = {};
|
|
76
64
|
for (const key of keys) {
|
|
@@ -102,17 +90,37 @@ async function promptCredentialsForIntegration(type) {
|
|
|
102
90
|
}
|
|
103
91
|
return creds;
|
|
104
92
|
}
|
|
93
|
+
async function selectIntegrations(args) {
|
|
94
|
+
const catalog = listIntegrationCatalog();
|
|
95
|
+
const options = catalog
|
|
96
|
+
.filter(it => !args.excludeTypes?.has(it.type))
|
|
97
|
+
.filter(it => !!loadIntegrationVariants(it.type))
|
|
98
|
+
.map(it => ({ value: it.type, label: formatIntegrationOption(it.type, it.name) }))
|
|
99
|
+
.sort((a, b) => a.value.localeCompare(b.value));
|
|
100
|
+
if (!options.length) {
|
|
101
|
+
log.info('No locally-configurable integrations available yet.');
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
const selected = await multiselect({
|
|
105
|
+
message: args.title,
|
|
106
|
+
options,
|
|
107
|
+
required: true,
|
|
108
|
+
});
|
|
109
|
+
if (isCancel(selected))
|
|
110
|
+
return null;
|
|
111
|
+
return selected.map(s => String(s)).filter(Boolean);
|
|
112
|
+
}
|
|
105
113
|
function makeClaudeDesktopSnippet() {
|
|
106
114
|
return {
|
|
107
115
|
mcpServers: {
|
|
108
116
|
commandable: {
|
|
109
117
|
command: 'npx',
|
|
110
|
-
args: ['@commandable/mcp'],
|
|
118
|
+
args: ['-y', '@commandable/mcp'],
|
|
111
119
|
},
|
|
112
120
|
},
|
|
113
121
|
};
|
|
114
122
|
}
|
|
115
|
-
function makeIntegrationRecord(type) {
|
|
123
|
+
function makeIntegrationRecord(type, variantKey) {
|
|
116
124
|
return {
|
|
117
125
|
spaceId: 'local',
|
|
118
126
|
id: type,
|
|
@@ -121,8 +129,23 @@ function makeIntegrationRecord(type) {
|
|
|
121
129
|
label: type,
|
|
122
130
|
connectionMethod: 'credentials',
|
|
123
131
|
credentialId: `${type}-creds`,
|
|
132
|
+
credentialVariant: variantKey,
|
|
124
133
|
};
|
|
125
134
|
}
|
|
135
|
+
async function configureIntegration(type) {
|
|
136
|
+
log.info(`Configuring ${picocolors.cyan(type)}`);
|
|
137
|
+
const variantKey = await selectCredentialVariant(type);
|
|
138
|
+
if (variantKey === null)
|
|
139
|
+
return null;
|
|
140
|
+
const variantsFile = loadIntegrationVariants(type);
|
|
141
|
+
if (variantsFile && Object.keys(variantsFile.variants).length > 1) {
|
|
142
|
+
log.info(`Using: ${picocolors.cyan(variantsFile.variants[variantKey]?.label ?? variantKey)}`);
|
|
143
|
+
}
|
|
144
|
+
const credentials = await promptCredentialsForVariant(type, variantKey);
|
|
145
|
+
if (credentials === null)
|
|
146
|
+
return null;
|
|
147
|
+
return { variantKey, credentials };
|
|
148
|
+
}
|
|
126
149
|
export async function runInitInteractive() {
|
|
127
150
|
intro('Commandable MCP');
|
|
128
151
|
const types = await selectIntegrations({
|
|
@@ -135,13 +158,13 @@ export async function runInitInteractive() {
|
|
|
135
158
|
const { db, credentialStore, close } = await openLocalState();
|
|
136
159
|
try {
|
|
137
160
|
for (const type of types) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (credentials === null) {
|
|
161
|
+
const result = await configureIntegration(type);
|
|
162
|
+
if (result === null) {
|
|
141
163
|
outro('Cancelled.');
|
|
142
164
|
return;
|
|
143
165
|
}
|
|
144
|
-
const
|
|
166
|
+
const { variantKey, credentials } = result;
|
|
167
|
+
const integration = makeIntegrationRecord(type, variantKey);
|
|
145
168
|
await credentialStore.saveCredentials('local', integration.credentialId, credentials);
|
|
146
169
|
await upsertIntegration(db, integration);
|
|
147
170
|
}
|
|
@@ -152,7 +175,7 @@ export async function runInitInteractive() {
|
|
|
152
175
|
finally {
|
|
153
176
|
await close();
|
|
154
177
|
}
|
|
155
|
-
outro('You
|
|
178
|
+
outro('You\'re all set. Restart your MCP client and try a tool call.');
|
|
156
179
|
}
|
|
157
180
|
export async function runAddInteractive() {
|
|
158
181
|
intro('Commandable MCP');
|
|
@@ -170,13 +193,13 @@ export async function runAddInteractive() {
|
|
|
170
193
|
}
|
|
171
194
|
const added = [];
|
|
172
195
|
for (const type of types) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (credentials === null) {
|
|
196
|
+
const result = await configureIntegration(type);
|
|
197
|
+
if (result === null) {
|
|
176
198
|
outro('Cancelled.');
|
|
177
199
|
return;
|
|
178
200
|
}
|
|
179
|
-
const
|
|
201
|
+
const { variantKey, credentials } = result;
|
|
202
|
+
const integration = makeIntegrationRecord(type, variantKey);
|
|
180
203
|
await credentialStore.saveCredentials('local', integration.credentialId, credentials);
|
|
181
204
|
await upsertIntegration(db, integration);
|
|
182
205
|
added.push(type);
|
package/dist/cli/setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/cli/setup.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/cli/setup.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EACL,KAAK,EACL,QAAQ,EACR,GAAG,EACH,WAAW,EACX,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,GACL,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,+BAA+B,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAC7H,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAG/E,SAAS,cAAc,CAAC,CAAU;IAChC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAA;AACrD,CAAC;AAED,SAAS,uBAAuB,CAAC,GAAW;IAC1C,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,E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AAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;;YAEtE,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAC/B,CAAC;YACO,CAAC;QACP,MAAM,KAAK,EAAE,CAAA;IACf,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DbClient } from '../db/client.js';
|
|
2
|
+
import type { SqlCredentialStore } from '../db/credentialStore.js';
|
|
3
|
+
import type { CommandableConfig } from './configSchema.js';
|
|
4
|
+
export type ApplyConfigResult = {
|
|
5
|
+
spaceId: string;
|
|
6
|
+
integrationsUpserted: number;
|
|
7
|
+
credentialsWritten: number;
|
|
8
|
+
credentialsUnchanged: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function applyConfig(params: {
|
|
11
|
+
config: CommandableConfig;
|
|
12
|
+
db: DbClient;
|
|
13
|
+
credentialStore: SqlCredentialStore;
|
|
14
|
+
defaultSpaceId?: string;
|
|
15
|
+
}): Promise<ApplyConfigResult>;
|
|
16
|
+
//# sourceMappingURL=configApply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configApply.d.ts","sourceRoot":"","sources":["../../src/config/configApply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,mBAAmB,CAAA;AAE7E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,oBAAoB,EAAE,MAAM,CAAA;IAC5B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAA;AA8CD,wBAAsB,WAAW,CAAC,MAAM,EAAE;IACxC,MAAM,EAAE,iBAAiB,CAAA;IACzB,EAAE,EAAE,QAAQ,CAAA;IACZ,eAAe,EAAE,kBAAkB,CAAA;IACnC,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAuC7B"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { upsertIntegration } from '../db/integrationStore.js';
|
|
2
|
+
function stableSort(value) {
|
|
3
|
+
if (Array.isArray(value))
|
|
4
|
+
return value.map(stableSort);
|
|
5
|
+
if (value && typeof value === 'object') {
|
|
6
|
+
const out = {};
|
|
7
|
+
for (const k of Object.keys(value).sort())
|
|
8
|
+
out[k] = stableSort(value[k]);
|
|
9
|
+
return out;
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
function stableJson(value) {
|
|
14
|
+
return JSON.stringify(stableSort(value));
|
|
15
|
+
}
|
|
16
|
+
function makeIntegrationId(it) {
|
|
17
|
+
if (it.id && it.id.trim().length)
|
|
18
|
+
return it.id.trim();
|
|
19
|
+
const ref = (it.referenceId && it.referenceId.trim().length) ? it.referenceId.trim() : it.type;
|
|
20
|
+
if (ref !== it.type)
|
|
21
|
+
return `${it.type}:${ref}`;
|
|
22
|
+
return it.type;
|
|
23
|
+
}
|
|
24
|
+
function toIntegrationData(spaceId, it) {
|
|
25
|
+
const referenceId = (it.referenceId && it.referenceId.trim().length) ? it.referenceId.trim() : it.type;
|
|
26
|
+
const label = (it.label && it.label.trim().length) ? it.label.trim() : referenceId;
|
|
27
|
+
const credentialId = (it.credentialId && it.credentialId.trim().length) ? it.credentialId.trim() : `${referenceId}-creds`;
|
|
28
|
+
return {
|
|
29
|
+
spaceId: (it.spaceId && it.spaceId.trim().length) ? it.spaceId.trim() : spaceId,
|
|
30
|
+
id: makeIntegrationId(it),
|
|
31
|
+
type: it.type,
|
|
32
|
+
referenceId,
|
|
33
|
+
label,
|
|
34
|
+
config: it.config,
|
|
35
|
+
connectionMethod: it.credentials ? 'credentials' : undefined,
|
|
36
|
+
connectionId: null,
|
|
37
|
+
credentialId: it.credentials ? credentialId : (it.credentialId ?? undefined),
|
|
38
|
+
credentialVariant: (it.credentialVariant && it.credentialVariant.trim().length) ? it.credentialVariant.trim() : undefined,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export async function applyConfig(params) {
|
|
42
|
+
const spaceId = params.config.spaceId || params.defaultSpaceId || process.env.COMMANDABLE_SPACE_ID || 'local';
|
|
43
|
+
let integrationsUpserted = 0;
|
|
44
|
+
let credentialsWritten = 0;
|
|
45
|
+
let credentialsUnchanged = 0;
|
|
46
|
+
for (const it of params.config.integrations || []) {
|
|
47
|
+
const integration = toIntegrationData(spaceId, it);
|
|
48
|
+
await upsertIntegration(params.db, integration);
|
|
49
|
+
integrationsUpserted++;
|
|
50
|
+
if (!it.credentials || !integration.credentialId)
|
|
51
|
+
continue;
|
|
52
|
+
const desired = it.credentials;
|
|
53
|
+
let existing = null;
|
|
54
|
+
try {
|
|
55
|
+
existing = await params.credentialStore.getCredentials(integration.spaceId || spaceId, integration.credentialId);
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
existing = null;
|
|
59
|
+
}
|
|
60
|
+
if (existing && stableJson(existing) === stableJson(desired)) {
|
|
61
|
+
credentialsUnchanged++;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
await params.credentialStore.saveCredentials(integration.spaceId || spaceId, integration.credentialId, desired);
|
|
65
|
+
credentialsWritten++;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
spaceId,
|
|
69
|
+
integrationsUpserted,
|
|
70
|
+
credentialsWritten,
|
|
71
|
+
credentialsUnchanged,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=configApply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configApply.js","sourceRoot":"","sources":["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QACV,CAAC;QAED,MAAM,MAAM,CAAC,eAAe,CAAC,eAAe,CAAC,WAAW,CAAC,OAAO,IAAI,OAAO,EAAE,WAAW,CAAC,YAAY,EAAE,OAAc,CAAC,CAAA;QACtH,kBAAkB,EAAE,CAAA;IACtB,CAAC;IAED,OAAO;QACL,OAAO;QACP,oBAAoB;QACpB,kBAAkB;QAClB,oBAAoB;KACrB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CommandableConfig } from './configSchema.js';
|
|
2
|
+
export declare class ConfigError extends Error {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function loadConfig(configPath?: string): {
|
|
6
|
+
path: string;
|
|
7
|
+
config: CommandableConfig;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=configLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configLoader.d.ts","sourceRoot":"","sources":["../../src/config/configLoader.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEnF,qBAAa,WAAY,SAAQ,KAAK;IAC3B,IAAI,SAAgB;CAC9B;AA2DD,wBAAgB,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAkB3F"}
|