ebay-mcp 2.0.5 → 2.0.7
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 +18 -18
- package/build/auth/credentialSession.js +2 -2
- package/build/auth/oauth.js +6 -6
- package/build/auth/oauthHelper.js +2 -2
- package/build/auth/oauthMiddleware.js +1 -1
- package/build/auth/scopeUtils.js +1 -1
- package/build/{tools/categories/tokenManagement.js → auth/tokenManagementTools.js} +5 -5
- package/build/auth/tokenVerifier.js +2 -2
- package/build/{scripts → cli}/autoSetup.js +2 -2
- package/build/{scripts → cli}/diagnostics.js +10 -10
- package/build/{scripts → cli}/interactiveSetup.js +6 -6
- package/build/{scripts → cli}/scopeHelper.js +2 -2
- package/build/{scripts → cli}/securityChecker.js +1 -1
- package/build/{scripts → cli}/setup.js +10 -10
- package/build/{scripts → cli}/setupValidator.js +4 -4
- package/build/{scripts → cli}/setupWizard.js +1 -1
- package/build/{skills → cli/skills}/content.js +3 -3
- package/build/{skills → cli/skills}/index.js +11 -11
- package/build/{skills → cli/skills}/install.js +1 -1
- package/build/{skills → cli/skills}/registrySnapshot.js +1 -1
- package/build/{skills → cli/skills}/render.js +1 -1
- package/build/{scripts → cli}/skills.js +4 -4
- package/build/{api/account-management/account.js → ebay-apis/account/accountApi.js} +1 -1
- package/build/{schemas/account-management/account.js → ebay-apis/account/accountSchemas.js} +1 -1
- package/build/{tools/categories/account.js → ebay-apis/account/accountTools.js} +2 -2
- package/build/{api/account-management/accountV2.js → ebay-apis/account/accountV2Api.js} +1 -1
- package/build/{schemas/account-management/accountV2.js → ebay-apis/account/accountV2Schemas.js} +1 -1
- package/build/{tools/categories/accountV2.js → ebay-apis/account/accountV2Tools.js} +2 -2
- package/build/{api/analytics-and-report/analytics.js → ebay-apis/analytics/analyticsApi.js} +1 -1
- package/build/{tools/categories/analytics.js → ebay-apis/analytics/analyticsTools.js} +3 -3
- package/build/{api/other/browse.js → ebay-apis/browse/browseApi.js} +5 -5
- package/build/{api/other → ebay-apis/browse}/browseFilter.js +1 -1
- package/build/{api/other → ebay-apis/browse}/browseMappers.js +2 -2
- package/build/{tools/categories/browse.js → ebay-apis/browse/browseTools.js} +2 -2
- package/build/{api/other → ebay-apis/browse}/browseValidators.js +2 -2
- package/build/{tools/categories/communication.js → ebay-apis/communication/communicationTools.js} +5 -5
- package/build/{api/communication/feedback.js → ebay-apis/communication/feedbackApi.js} +1 -1
- package/build/{api/communication/message.js → ebay-apis/communication/messageApi.js} +1 -1
- package/build/{schemas/communication/messages.js → ebay-apis/communication/messageSchemas.js} +1 -1
- package/build/{api/communication/negotiation.js → ebay-apis/communication/negotiationApi.js} +1 -1
- package/build/{api/communication/notification.js → ebay-apis/communication/notificationApi.js} +1 -1
- package/build/{utils/communication/notification.js → ebay-apis/communication/notificationHelpers.js} +1 -1
- package/build/{api/developer/developer.js → ebay-apis/developer/developerApi.js} +2 -2
- package/build/{tools/categories/developer.js → ebay-apis/developer/developerTools.js} +4 -4
- package/build/ebay-apis/ebaySellerApi.js +175 -0
- package/build/{api/listing-management/feed.js → ebay-apis/feed/feedApi.js} +3 -3
- package/build/{api/listing-management/feedReportTasks.js → ebay-apis/feed/feedReportTasksApi.js} +3 -3
- package/build/{api/listing-management/feedRequest.js → ebay-apis/feed/feedRequestApi.js} +3 -3
- package/build/{api/listing-management/feedSchedules.js → ebay-apis/feed/feedSchedulesApi.js} +3 -3
- package/build/{api/listing-management/feedTasks.js → ebay-apis/feed/feedTasksApi.js} +3 -3
- package/build/{tools/categories/feed.js → ebay-apis/feed/feedTools.js} +5 -5
- package/build/{api/account-management/finances.js → ebay-apis/finances/financesApi.js} +3 -3
- package/build/{tools/categories/finances.js → ebay-apis/finances/financesTools.js} +3 -3
- package/build/{api/order-management/dispute.js → ebay-apis/fulfillment/disputeApi.js} +3 -3
- package/build/{api/order-management/fulfillment.js → ebay-apis/fulfillment/fulfillmentApi.js} +1 -1
- package/build/{tools/categories/fulfillment.js → ebay-apis/fulfillment/fulfillmentTools.js} +4 -4
- package/build/{schemas/fulfillment/orders.js → ebay-apis/fulfillment/ordersSchemas.js} +1 -1
- package/build/{api/listing-management/inventory.js → ebay-apis/inventory/inventoryApi.js} +3 -3
- package/build/{schemas/inventory-management/inventory.js → ebay-apis/inventory/inventorySchemas.js} +1 -1
- package/build/{tools/categories/inventory.js → ebay-apis/inventory/inventoryTools.js} +4 -4
- package/build/{api/listing-management/items.js → ebay-apis/inventory/itemsApi.js} +2 -2
- package/build/{api/listing-management/locations.js → ebay-apis/inventory/locationsApi.js} +2 -2
- package/build/{api/listing-management/media.js → ebay-apis/inventory/mediaApi.js} +5 -5
- package/build/{api/listing-management/mediaAttach.js → ebay-apis/inventory/mediaAttachApi.js} +2 -2
- package/build/{api/listing-management/mediaResources.js → ebay-apis/inventory/mediaResourcesApi.js} +4 -4
- package/build/{tools/categories/media.js → ebay-apis/inventory/mediaTools.js} +5 -5
- package/build/{api/listing-management/offerFormat.js → ebay-apis/inventory/offerFormatApi.js} +3 -3
- package/build/{api/listing-management/offers.js → ebay-apis/inventory/offersApi.js} +3 -3
- package/build/{api/order-management/logistics.js → ebay-apis/logistics/logisticsApi.js} +2 -2
- package/build/{schemas/fulfillment/logistics.js → ebay-apis/logistics/logisticsSchemas.js} +2 -2
- package/build/{tools/categories/logistics.js → ebay-apis/logistics/logisticsTools.js} +4 -4
- package/build/{api/marketing-and-promotions/ads.js → ebay-apis/marketing/adsApi.js} +2 -2
- package/build/{schemas/marketing/ads.js → ebay-apis/marketing/adsSchemas.js} +2 -2
- package/build/{api/marketing-and-promotions/campaigns.js → ebay-apis/marketing/campaignsApi.js} +2 -2
- package/build/{schemas/marketing/campaigns.js → ebay-apis/marketing/campaignsSchemas.js} +1 -1
- package/build/{api/marketing-and-promotions/marketing.js → ebay-apis/marketing/marketingApi.js} +4 -4
- package/build/ebay-apis/marketing/marketingSchemas.js +13 -0
- package/build/{tools/categories/marketing.js → ebay-apis/marketing/marketingTools.js} +2 -2
- package/build/{api/marketing-and-promotions/promotions.js → ebay-apis/marketing/promotionsApi.js} +2 -2
- package/build/{schemas/marketing/promotions.js → ebay-apis/marketing/promotionsSchemas.js} +2 -2
- package/build/{api/marketing-and-promotions/recommendation.js → ebay-apis/marketing/recommendationApi.js} +1 -1
- package/build/{api/marketing-and-promotions/reports.js → ebay-apis/marketing/reportsApi.js} +2 -2
- package/build/{schemas/marketing/reports.js → ebay-apis/marketing/reportsSchemas.js} +1 -1
- package/build/{api/listing-metadata/metadata.js → ebay-apis/metadata/metadataApi.js} +2 -2
- package/build/{api/listing-metadata/metadataShipping.js → ebay-apis/metadata/metadataShippingApi.js} +2 -2
- package/build/{schemas/metadata/shipping.js → ebay-apis/metadata/metadataShippingSchemas.js} +1 -1
- package/build/{tools/categories/metadata.js → ebay-apis/metadata/metadataTools.js} +3 -3
- package/build/{api/other/edelivery.js → ebay-apis/other/edelivery/edeliveryApi.js} +1 -1
- package/build/{api/other/identity.js → ebay-apis/other/identity/identityApi.js} +2 -2
- package/build/{utils/other/identity.js → ebay-apis/other/identity/identityHelpers.js} +2 -2
- package/build/{tools/categories/other.js → ebay-apis/other/otherTools.js} +2 -2
- package/build/{api/other/translation.js → ebay-apis/other/translation/translationApi.js} +1 -1
- package/build/{utils/other/translation.js → ebay-apis/other/translation/translationHelpers.js} +2 -2
- package/build/{api/other/vero.js → ebay-apis/other/vero/veroApi.js} +1 -1
- package/build/{utils/other/vero.js → ebay-apis/other/vero/veroHelpers.js} +2 -2
- package/build/{api/listing-management/stores.js → ebay-apis/stores/storesApi.js} +2 -2
- package/build/{tools/categories/stores.js → ebay-apis/stores/storesTools.js} +2 -2
- package/build/{api/listing-metadata/charity.js → ebay-apis/taxonomy/charityApi.js} +2 -2
- package/build/{tools/categories/charity.js → ebay-apis/taxonomy/charityTools.js} +2 -2
- package/build/{api/listing-metadata/taxonomy.js → ebay-apis/taxonomy/taxonomyApi.js} +3 -3
- package/build/{tools/categories/taxonomy.js → ebay-apis/taxonomy/taxonomyTools.js} +3 -3
- package/build/{api/trading/listingFormat.js → ebay-apis/trading/listingFormatHelpers.js} +4 -4
- package/build/{api/trading/trading.js → ebay-apis/trading/tradingApi.js} +4 -4
- package/build/{utils/trading/trading.js → ebay-apis/trading/tradingHelpers.js} +1 -1
- package/build/{tools/categories/trading.js → ebay-apis/trading/tradingTools.js} +2 -2
- package/build/{api/shared → ebay-client}/download.js +1 -1
- package/build/{api/client → ebay-client}/ebayApiClient.js +9 -9
- package/build/{api/shared → ebay-client}/location.js +1 -1
- package/build/{api/shared → ebay-client}/request.js +1 -1
- package/build/{api/client → ebay-client}/tradingApiClient.js +7 -7
- package/build/index.js +8 -8
- package/build/{tools/categories/connector.js → server/connectorTools.js} +1 -1
- package/build/{mcp → server}/httpTransport.js +5 -5
- package/build/{mcp → server}/readOnlyFilter.js +6 -0
- package/build/{mcp → server}/runtime.js +9 -9
- package/build/{mcp → server}/toolGating.js +3 -3
- package/build/{mcp → server}/uiBridge.js +3 -3
- package/build/serverHttp.js +5 -5
- package/build/{utils → shared}/apiStatusFeed.js +1 -1
- package/build/{config → shared}/credentialFile.js +1 -1
- package/build/{config → shared}/environment.js +6 -6
- package/build/{utils → shared}/http.js +2 -2
- package/build/{utils → shared}/localMedia.js +1 -1
- package/build/{utils → shared}/logger.js +2 -2
- package/build/{config → shared}/toolFamilies.js +3 -3
- package/build/{tools → tool-registry}/contracts.js +1 -1
- package/build/{tools → tool-registry}/defineTool.js +3 -3
- package/build/{tools → tool-registry}/index.js +2 -2
- package/build/{tools → tool-registry}/registry.js +1 -1
- package/build/{tools → tool-registry}/schemas.js +16 -1
- package/build/{tools/categories/index.js → tool-registry/toolCategories.js} +21 -21
- package/build/{tools → tool-registry}/ui/maps.js +2 -2
- package/build/{tools → tool-registry}/ui/viewModels.js +1 -1
- package/package.json +14 -18
- package/build/api/ebaySellerApi.js +0 -175
- package/build/schemas/marketing/marketing.js +0 -13
- package/build/scripts/buildMcpApps.js +0 -49
- package/build/scripts/devSync.js +0 -432
- package/build/scripts/specCoverage.js +0 -78
- package/build/scripts/specDownload.js +0 -42
- package/build/scripts/specRefs.js +0 -54
- package/build/scripts/specSources.js +0 -142
- package/build/scripts/specTypeNames.js +0 -23
- /package/build/{scripts → cli}/setupShared.js +0 -0
- /package/build/{skills → cli/skills}/markers.js +0 -0
- /package/build/{skills → cli/skills}/targets.js +0 -0
- /package/build/{skills → cli/skills}/types.js +0 -0
- /package/build/{schemas/analytics/analytics.js → ebay-apis/analytics/analyticsSchemas.js} +0 -0
- /package/build/{schemas/other/browse.js → ebay-apis/browse/browseSchemas.js} +0 -0
- /package/build/{api/other → ebay-apis/browse}/browseTypes.js +0 -0
- /package/build/{utils/communication/feedback.js → ebay-apis/communication/feedbackHelpers.js} +0 -0
- /package/build/{utils/communication/message.js → ebay-apis/communication/messageHelpers.js} +0 -0
- /package/build/{utils/communication/negotiation.js → ebay-apis/communication/negotiationHelpers.js} +0 -0
- /package/build/{schemas/developer/developer.js → ebay-apis/developer/developerSchemas.js} +0 -0
- /package/build/{schemas/inventory-management/feed.js → ebay-apis/feed/feedSchemas.js} +0 -0
- /package/build/{schemas/account-management/finances.js → ebay-apis/finances/financesSchemas.js} +0 -0
- /package/build/{api/order-management → ebay-apis/fulfillment}/orderIssueHelpers.js +0 -0
- /package/build/{api/listing-management/shared.js → ebay-apis/inventory/inventorySharedApi.js} +0 -0
- /package/build/{schemas/inventory-management/mediaDocuments.js → ebay-apis/inventory/mediaDocumentsSchemas.js} +0 -0
- /package/build/{schemas/inventory-management/media.js → ebay-apis/inventory/mediaSchemas.js} +0 -0
- /package/build/{schemas/marketing/common.js → ebay-apis/marketing/marketingCommonSchemas.js} +0 -0
- /package/build/{api/marketing-and-promotions/shared.js → ebay-apis/marketing/marketingSharedApi.js} +0 -0
- /package/build/{schemas/metadata/metadata.js → ebay-apis/metadata/metadataSchemas.js} +0 -0
- /package/build/{schemas/other/otherApis.js → ebay-apis/other/otherApisSchemas.js} +0 -0
- /package/build/{schemas/inventory-management/stores.js → ebay-apis/stores/storesSchemas.js} +0 -0
- /package/build/{schemas/taxonomy/categoryTree.js → ebay-apis/taxonomy/categoryTreeSchemas.js} +0 -0
- /package/build/{schemas/taxonomy/charity.js → ebay-apis/taxonomy/charitySchemas.js} +0 -0
- /package/build/{schemas/taxonomy/taxonomy.js → ebay-apis/taxonomy/taxonomySchemas.js} +0 -0
- /package/build/{api/shared → ebay-client}/auctionPricing.js +0 -0
- /package/build/{api/client → ebay-client}/ebayClientRequestError.js +0 -0
- /package/build/{api/client → ebay-client}/rateLimitTracker.js +0 -0
- /package/build/{api/client → ebay-client}/signEbayRequest.js +0 -0
- /package/build/{api/client → ebay-client}/tradingApiFailure.js +0 -0
- /package/build/{utils → shared}/cliOutput.js +0 -0
- /package/build/{utils → shared}/cliUi.js +0 -0
- /package/build/{utils → shared}/dateConverter.js +0 -0
- /package/build/{types → shared}/ebay.js +0 -0
- /package/build/{types → shared}/ebayEnums.js +0 -0
- /package/build/{utils → shared}/entryModule.js +0 -0
- /package/build/{utils → shared}/envFile.js +0 -0
- /package/build/{utils → shared}/envParser.js +0 -0
- /package/build/{utils → shared}/errors.js +0 -0
- /package/build/{types → shared}/index.js +0 -0
- /package/build/{utils → shared}/llmClientDetector.js +0 -0
- /package/build/{utils → shared}/localFeedFiles.js +0 -0
- /package/build/{utils → shared}/logRedaction.js +0 -0
- /package/build/{config → shared}/mediaAccess.js +0 -0
- /package/build/{config → shared}/oauthScopes.js +0 -0
- /package/build/{utils → shared}/objects.js +0 -0
- /package/build/{utils → shared}/schemaHelpers.js +0 -0
- /package/build/{utils → shared}/tokenUtils.js +0 -0
- /package/build/{utils → shared}/typeGuards.js +0 -0
- /package/build/{utils → shared}/version.js +0 -0
- /package/build/{utils → shared}/zodIssues.js +0 -0
- /package/build/{tools → tool-registry}/fileResult.js +0 -0
- /package/build/{tools → tool-registry}/types.js +0 -0
- /package/build/{tools → tool-registry}/ui/archetypes.js +0 -0
- /package/build/{tools → tool-registry}/ui/mapHelpers.js +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marketing API Schemas
|
|
3
|
+
*
|
|
4
|
+
* Barrel re-export of subdomain schema modules. Import from here for stable paths:
|
|
5
|
+
* `@/ebay-apis/marketing/marketingSchemas.js`
|
|
6
|
+
*
|
|
7
|
+
* Slices: common, campaigns, ads, reports, promotions.
|
|
8
|
+
*/
|
|
9
|
+
export * from './marketingCommonSchemas.js';
|
|
10
|
+
export * from './campaignsSchemas.js';
|
|
11
|
+
export * from './adsSchemas.js';
|
|
12
|
+
export * from './reportsSchemas.js';
|
|
13
|
+
export * from './promotionsSchemas.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
|
-
import * as marketingSchemas from '../../
|
|
4
|
-
import { defineTool } from '../../
|
|
3
|
+
import * as marketingSchemas from '../../ebay-apis/marketing/marketingSchemas.js';
|
|
4
|
+
import { defineTool } from '../../tool-registry/defineTool.js';
|
|
5
5
|
const emptyResponseSchema = {
|
|
6
6
|
type: 'object',
|
|
7
7
|
properties: {},
|
package/build/{api/marketing-and-promotions/promotions.js → ebay-apis/marketing/promotionsApi.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildEndpointParams, marketplaceHeader, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, } from '../../
|
|
2
|
-
import { MARKETING_BASE_PATH } from './
|
|
1
|
+
import { buildEndpointParams, marketplaceHeader, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, } from '../../ebay-client/request.js';
|
|
2
|
+
import { MARKETING_BASE_PATH } from './marketingSharedApi.js';
|
|
3
3
|
/** Marketing API — promotions methods closed over a shared client. */
|
|
4
4
|
export const createMarketingPromotionsMethods = (client) => ({
|
|
5
5
|
/**
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Zod schemas for Marketing endpoints. The barrel `marketing.ts` re-exports all slices.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import { errorSchema, amountSchema, marketingInventoryItemSchema } from './
|
|
8
|
-
import { selectionRuleSchema } from './
|
|
7
|
+
import { errorSchema, amountSchema, marketingInventoryItemSchema, } from './marketingCommonSchemas.js';
|
|
8
|
+
import { selectionRuleSchema } from './campaignsSchemas.js';
|
|
9
9
|
// ============================================================================
|
|
10
10
|
// Item Promotion (Discounts) Schemas
|
|
11
11
|
// ============================================================================
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../
|
|
1
|
+
import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
3
|
/** Recommendation API - Promoted Listings recommendation discovery. */
|
|
4
4
|
export class RecommendationApi {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildEndpointParams, requestDeleteEffect, requestGetEffect, requestPostEffect, } from '../../
|
|
2
|
-
import { MARKETING_BASE_PATH } from './
|
|
1
|
+
import { buildEndpointParams, requestDeleteEffect, requestGetEffect, requestPostEffect, } from '../../ebay-client/request.js';
|
|
2
|
+
import { MARKETING_BASE_PATH } from './marketingSharedApi.js';
|
|
3
3
|
/** Marketing API — reports methods closed over a shared client. */
|
|
4
4
|
export const createMarketingReportsMethods = (client) => ({
|
|
5
5
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Zod schemas for Marketing endpoints. The barrel `marketing.ts` re-exports all slices.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import { amountSchema, inventoryReferenceSchema } from './
|
|
7
|
+
import { amountSchema, inventoryReferenceSchema } from './marketingCommonSchemas.js';
|
|
8
8
|
// ============================================================================
|
|
9
9
|
// Reporting Schemas
|
|
10
10
|
// ============================================================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { buildEndpointParams, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, optionalStringEffect, } from '../../
|
|
1
|
+
import { buildEndpointParams, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, optionalStringEffect, } from '../../ebay-client/request.js';
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
|
-
import { createMetadataShippingMethods } from './
|
|
3
|
+
import { createMetadataShippingMethods } from './metadataShippingApi.js';
|
|
4
4
|
/**
|
|
5
5
|
* Metadata API - marketplace policies, shipping metadata, compatibility metadata, and tax
|
|
6
6
|
* jurisdictions.
|
package/build/{api/listing-metadata/metadataShipping.js → ebay-apis/metadata/metadataShippingApi.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { decodeEndpointInputEffect, requestGetEffect, } from '../../
|
|
2
|
-
import { shippingMetadataInputSchema } from '../../
|
|
1
|
+
import { decodeEndpointInputEffect, requestGetEffect, } from '../../ebay-client/request.js';
|
|
2
|
+
import { shippingMetadataInputSchema } from '../../ebay-apis/metadata/metadataShippingSchemas.js';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
const SHIPPING_MARKETPLACE_PATH = '/sell/metadata/v1/shipping/marketplace';
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { MarketplaceId } from '../../
|
|
3
|
-
import { shippingMetadataInputSchema } from '../../
|
|
4
|
-
import { defineTool } from '../../
|
|
2
|
+
import { MarketplaceId } from '../../shared/ebayEnums.js';
|
|
3
|
+
import { shippingMetadataInputSchema } from '../../ebay-apis/metadata/metadataShippingSchemas.js';
|
|
4
|
+
import { defineTool } from '../../tool-registry/defineTool.js';
|
|
5
5
|
import { Effect } from 'effect';
|
|
6
6
|
const SHIPPING_LANGUAGE_NOTE = 'Set acceptLanguage to fr-CA (EBAY_CA), fr-BE or nl-BE (EBAY_BE) to localize the metadata for the French Canada and Belgian marketplaces. Use the returned values when configuring fulfillment policies (ebay_create_fulfillment_policy).';
|
|
7
7
|
/** Marketplace-scoped metadata request with an optional category filter. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '
|
|
1
|
+
import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../../ebay-client/request.js';
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
3
|
/** eDelivery International Shipping API endpoints. */
|
|
4
4
|
export class EDeliveryApi {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EbayApiError } from '
|
|
2
|
-
import { getIdentityBaseUrl } from '
|
|
1
|
+
import { EbayApiError } from '../../../ebay-client/request.js';
|
|
2
|
+
import { getIdentityBaseUrl } from '../../../shared/environment.js';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
/** Identity API - user identity verification through the apiz host. */
|
|
5
5
|
export class IdentityApi {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Zod schemas for Identity API input validation
|
|
4
|
-
* Based on: src/
|
|
4
|
+
* Based on: src/ebay-apis/other/identity/identityApi.ts
|
|
5
5
|
* OpenAPI spec: commerce_identity_v1_oas3.json
|
|
6
|
-
* Types from: src/types/
|
|
6
|
+
* Types from: src/ebay-openapi-types/commerceIdentityV1Oas3.ts
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Schema for getUser method
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import { bundleIdInputSchema, createVeroReportInputSchema, edeliveryBodyInputSchema, edeliveryPaginationInputSchema, getActualCostsInputSchema, getAddressPreferencesInputSchema, getConsignPreferencesInputSchema, getHandoverSheetInputSchema, getLabelsInputSchema, getPackagesByLineItemIDInputSchema, getTrackingInputSchema, getUserInputSchema, getVeroReasonCodeInputSchema, getVeroReasonCodesInputSchema, getVeroReportInputSchema, getVeroReportItemsInputSchema, packageIdInputSchema, translateInputSchema, } from '../../
|
|
3
|
-
import { defineTool } from '../../
|
|
2
|
+
import { bundleIdInputSchema, createVeroReportInputSchema, edeliveryBodyInputSchema, edeliveryPaginationInputSchema, getActualCostsInputSchema, getAddressPreferencesInputSchema, getConsignPreferencesInputSchema, getHandoverSheetInputSchema, getLabelsInputSchema, getPackagesByLineItemIDInputSchema, getTrackingInputSchema, getUserInputSchema, getVeroReasonCodeInputSchema, getVeroReasonCodesInputSchema, getVeroReportInputSchema, getVeroReportItemsInputSchema, packageIdInputSchema, translateInputSchema, } from '../../ebay-apis/other/otherApisSchemas.js';
|
|
3
|
+
import { defineTool } from '../../tool-registry/defineTool.js';
|
|
4
4
|
/** Miscellaneous eBay API tools that do not fit the primary seller API categories. */
|
|
5
5
|
export const otherEntries = [
|
|
6
6
|
// Identity API
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { requestPostEffect, requireObjectEffect, } from '
|
|
1
|
+
import { requestPostEffect, requireObjectEffect, } from '../../../ebay-client/request.js';
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
3
|
/** Translation API - listing title and description translation. */
|
|
4
4
|
export class TranslationApi {
|
package/build/{utils/other/translation.js → ebay-apis/other/translation/translationHelpers.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Zod schemas for Translation API input validation
|
|
4
|
-
* Based on: src/
|
|
4
|
+
* Based on: src/ebay-apis/other/translation/translationApi.ts
|
|
5
5
|
* OpenAPI spec: commerce_translation_v1_beta_oas3.json
|
|
6
|
-
* Types from: src/types/
|
|
6
|
+
* Types from: src/ebay-openapi-types/commerceTranslationV1BetaOas3.ts
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Schema for translate method
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '
|
|
1
|
+
import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../../ebay-client/request.js';
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
3
|
/** VeRO API - Verified Rights Owner reporting and reason-code metadata. */
|
|
4
4
|
export class VeroApi {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Zod schemas for VERO API input validation
|
|
4
|
-
* Based on: src/
|
|
4
|
+
* Based on: src/ebay-apis/other/vero/veroApi.ts
|
|
5
5
|
* OpenAPI spec: commerce_vero_v1_oas3.json
|
|
6
|
-
* Types from: src/types/
|
|
6
|
+
* Types from: src/ebay-openapi-types/commerceVeroV1Oas3.ts
|
|
7
7
|
*
|
|
8
8
|
* Note: The VERO API is only available for members of the Verified Rights Owner (VeRO) Program
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { locatedResourceId } from '../../
|
|
2
|
-
import { EbayApiError, optionalStringEffect, requestGetEffect, requireObjectEffect, requireStringEffect, } from '../../
|
|
1
|
+
import { locatedResourceId } from '../../ebay-client/location.js';
|
|
2
|
+
import { EbayApiError, optionalStringEffect, requestGetEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
const STORE_PATH = '/sell/stores/v1/store';
|
|
5
5
|
const TASKS_PATH = `${STORE_PATH}/tasks`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { addStoreCategoryInputSchema, deleteStoreCategoryInputSchema, emptyStoreInputSchema, getStoreTaskInputSchema, moveStoreCategoryInputSchema, renameStoreCategoryInputSchema, } from '../../
|
|
2
|
-
import { defineTool } from '../../
|
|
1
|
+
import { addStoreCategoryInputSchema, deleteStoreCategoryInputSchema, emptyStoreInputSchema, getStoreTaskInputSchema, moveStoreCategoryInputSchema, renameStoreCategoryInputSchema, } from '../../ebay-apis/stores/storesSchemas.js';
|
|
2
|
+
import { defineTool } from '../../tool-registry/defineTool.js';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
const STORE_NOTE = 'Requires an active eBay Store subscription (sell.stores scope).';
|
|
5
5
|
const CATEGORY_TASK_NOTE = 'Asynchronous: eBay accepts the change and returns { taskId, location } from the Location header; poll ebay_get_store_task with taskId (or ebay_get_store_tasks) until the task is COMPLETED or FAILED. Only one store category change (add, rename, move, or delete) can be in flight at a time; eBay rejects a new change until the previous task finishes.';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildEndpointParams, decodeEndpointInputEffect, EndpointInputError, requestGetEffect, } from '../../
|
|
2
|
-
import { getCharityOrgInputSchema, getCharityOrgsInputSchema } from '../../
|
|
1
|
+
import { buildEndpointParams, decodeEndpointInputEffect, EndpointInputError, requestGetEffect, } from '../../ebay-client/request.js';
|
|
2
|
+
import { getCharityOrgInputSchema, getCharityOrgsInputSchema, } from '../../ebay-apis/taxonomy/charitySchemas.js';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
const BASE_PATH = '/commerce/charity/v1';
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getCharityOrgInputSchema, getCharityOrgsInputSchema } from '../../
|
|
2
|
-
import { defineTool } from '../../
|
|
1
|
+
import { getCharityOrgInputSchema, getCharityOrgsInputSchema, } from '../../ebay-apis/taxonomy/charitySchemas.js';
|
|
2
|
+
import { defineTool } from '../../tool-registry/defineTool.js';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
const CHARITY_AUTH_NOTE = 'Supports marketplaceId EBAY_US or EBAY_GB only. Uses an application (client-credentials) token, so EBAY_CLIENT_ID and EBAY_CLIENT_SECRET are enough; no user consent is needed.';
|
|
5
5
|
/** Charity API tools for finding charitable organizations supported by eBay for Charity. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { requestDownloadEffect, } from '../../
|
|
2
|
-
import { buildEndpointParams, decodeEndpointInputEffect, requestGetEffect, requireObjectEffect, requireStringEffect, } from '../../
|
|
3
|
-
import { categoryTreeIdInputSchema } from '../../
|
|
1
|
+
import { requestDownloadEffect, } from '../../ebay-client/download.js';
|
|
2
|
+
import { buildEndpointParams, decodeEndpointInputEffect, requestGetEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
|
|
3
|
+
import { categoryTreeIdInputSchema } from '../../ebay-apis/taxonomy/categoryTreeSchemas.js';
|
|
4
4
|
import { Effect } from 'effect';
|
|
5
5
|
/**
|
|
6
6
|
* fetchItemAspects streams a whole marketplace's aspect file before the inline-size check,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { categoryTreeIdInputSchema } from '../../
|
|
3
|
-
import { defineTool } from '../../
|
|
4
|
-
import { formatFileResult } from '../../
|
|
2
|
+
import { categoryTreeIdInputSchema } from '../../ebay-apis/taxonomy/categoryTreeSchemas.js';
|
|
3
|
+
import { defineTool } from '../../tool-registry/defineTool.js';
|
|
4
|
+
import { formatFileResult } from '../../tool-registry/fileResult.js';
|
|
5
5
|
import { Effect } from 'effect';
|
|
6
6
|
/** Tool input for Taxonomy API getDefaultCategoryTreeId. */
|
|
7
7
|
const getDefaultCategoryTreeIdSchema = z.object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BUY_IT_NOW_MARGIN_LABEL, meetsBuyItNowMargin } from '../../
|
|
2
|
-
import { EndpointInputError } from '../../
|
|
3
|
-
import { FormatType } from '../../
|
|
4
|
-
import { isRecord } from '../../
|
|
1
|
+
import { BUY_IT_NOW_MARGIN_LABEL, meetsBuyItNowMargin } from '../../ebay-client/auctionPricing.js';
|
|
2
|
+
import { EndpointInputError } from '../../ebay-client/request.js';
|
|
3
|
+
import { FormatType } from '../../shared/ebayEnums.js';
|
|
4
|
+
import { isRecord } from '../../shared/typeGuards.js';
|
|
5
5
|
import { Effect } from 'effect';
|
|
6
6
|
/** Trading API `ListingType` token for auctions. */
|
|
7
7
|
export const TRADING_AUCTION_LISTING_TYPE = 'Chinese';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { optionalPositiveNumberEffect, optionalStringEffect, requireObjectEffect, requireStringEffect, } from '../../
|
|
2
|
-
import { FormatType } from '../../
|
|
3
|
-
import { isRecord } from '../../
|
|
1
|
+
import { optionalPositiveNumberEffect, optionalStringEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
|
|
2
|
+
import { FormatType } from '../../shared/ebayEnums.js';
|
|
3
|
+
import { isRecord } from '../../shared/typeGuards.js';
|
|
4
4
|
import { Effect } from 'effect';
|
|
5
|
-
import { TRADING_AUCTION_LISTING_TYPE, resolveTradingFormat, tradingCallName, validateTradingEndingReasonEffect, validateTradingListingFormatEffect, } from './
|
|
5
|
+
import { TRADING_AUCTION_LISTING_TYPE, resolveTradingFormat, tradingCallName, validateTradingEndingReasonEffect, validateTradingListingFormatEffect, } from './listingFormatHelpers.js';
|
|
6
6
|
const asRecordArray = (rawField) => {
|
|
7
7
|
if (!Array.isArray(rawField)) {
|
|
8
8
|
return [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineTool } from '../../
|
|
2
|
-
import { createListingSchema, endListingSchema, getActiveListingsSchema, getListingSchema, relistItemSchema, reviseListingSchema, } from '../../
|
|
1
|
+
import { defineTool } from '../../tool-registry/defineTool.js';
|
|
2
|
+
import { createListingSchema, endListingSchema, getActiveListingsSchema, getListingSchema, relistItemSchema, reviseListingSchema, } from '../../ebay-apis/trading/tradingHelpers.js';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
4
|
const AUCTION_ITEM_RULES = 'AUCTION items take StartPrice as the opening bid, a day-count ListingDuration (Days_1/3/5/7/10; never GTC), Quantity 1, an optional ReservePrice above the opening bid, an optional BuyItNowPrice at least 30% above it, and Best Offer only without a BuyItNowPrice. FIXED_PRICE items take StartPrice as the price and ListingDuration GTC (the only fixed-price duration eBay accepts), and cannot carry ReservePrice or BuyItNowPrice. Payloads that mix the two formats are rejected before any eBay request.';
|
|
5
5
|
/** Trading API tools for fixed-price and auction listing operations. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { EbayOAuthClient } from '
|
|
2
|
-
import { clientRequestError, } from '
|
|
3
|
-
import { RateLimitTracker } from '
|
|
4
|
-
import { parseSigningPrivateKey, signEbayRequest } from '
|
|
5
|
-
import { getBaseUrl, getIdentityBaseUrl } from '
|
|
6
|
-
import { getErrorMessage } from '
|
|
7
|
-
import { httpRequestEffect, isHttpError, } from '
|
|
8
|
-
import { isRecord } from '
|
|
9
|
-
import { apiLogger, logRequest, logResponse, logErrorResponse } from '
|
|
1
|
+
import { EbayOAuthClient } from '../auth/oauth.js';
|
|
2
|
+
import { clientRequestError, } from '../ebay-client/ebayClientRequestError.js';
|
|
3
|
+
import { RateLimitTracker } from '../ebay-client/rateLimitTracker.js';
|
|
4
|
+
import { parseSigningPrivateKey, signEbayRequest } from '../ebay-client/signEbayRequest.js';
|
|
5
|
+
import { getBaseUrl, getIdentityBaseUrl } from '../shared/environment.js';
|
|
6
|
+
import { getErrorMessage } from '../shared/errors.js';
|
|
7
|
+
import { httpRequestEffect, isHttpError, } from '../shared/http.js';
|
|
8
|
+
import { isRecord } from '../shared/typeGuards.js';
|
|
9
|
+
import { apiLogger, logRequest, logResponse, logErrorResponse } from '../shared/logger.js';
|
|
10
10
|
import { Cause, Effect, Exit } from 'effect';
|
|
11
11
|
/** Bodies that must never be echoed into debug logs. */
|
|
12
12
|
const isBinaryBody = (requestBody) => requestBody instanceof FormData ||
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatZodIssues } from '
|
|
1
|
+
import { formatZodIssues } from '../shared/zodIssues.js';
|
|
2
2
|
import { Data, Effect } from 'effect';
|
|
3
3
|
/** Tagged failure returned by migrated eBay API endpoint Effects. */
|
|
4
4
|
export class EbayApiError extends Data.TaggedError('EbayApiError') {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import XmlBuilder from 'fast-xml-builder';
|
|
2
2
|
import { XMLParser } from 'fast-xml-parser';
|
|
3
|
-
import { TradingApiFailure } from '
|
|
4
|
-
import { EbayApiError } from '
|
|
5
|
-
import { getBaseUrl, getTradingSiteId } from '
|
|
6
|
-
import { getErrorMessage } from '
|
|
7
|
-
import { httpRequestEffect } from '
|
|
8
|
-
import { apiLogger } from '
|
|
9
|
-
import { isRecord } from '
|
|
3
|
+
import { TradingApiFailure } from '../ebay-client/tradingApiFailure.js';
|
|
4
|
+
import { EbayApiError } from '../ebay-client/request.js';
|
|
5
|
+
import { getBaseUrl, getTradingSiteId } from '../shared/environment.js';
|
|
6
|
+
import { getErrorMessage } from '../shared/errors.js';
|
|
7
|
+
import { httpRequestEffect } from '../shared/http.js';
|
|
8
|
+
import { apiLogger } from '../shared/logger.js';
|
|
9
|
+
import { isRecord } from '../shared/typeGuards.js';
|
|
10
10
|
import { Effect } from 'effect';
|
|
11
11
|
const COMPAT_LEVEL = '1451';
|
|
12
12
|
const TRADING_ENDPOINT_PATH = '/ws/api.dll';
|
package/build/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
-
import { validateEnvironmentConfig } from './
|
|
4
|
-
import { createEbayMcpRuntime } from './
|
|
5
|
-
import { runDiagnostics } from './
|
|
6
|
-
import { runSetup } from './
|
|
7
|
-
import { runSkillsWizard } from './
|
|
8
|
-
import { getErrorMessage } from './
|
|
9
|
-
import { serverLogger, getLogPaths, isFileLoggingEnabled } from './
|
|
10
|
-
import { getCachedUpdateNotice } from './
|
|
3
|
+
import { validateEnvironmentConfig } from './shared/environment.js';
|
|
4
|
+
import { createEbayMcpRuntime } from './server/runtime.js';
|
|
5
|
+
import { runDiagnostics } from './cli/diagnostics.js';
|
|
6
|
+
import { runSetup } from './cli/setup.js';
|
|
7
|
+
import { runSkillsWizard } from './cli/skills.js';
|
|
8
|
+
import { getErrorMessage } from './shared/errors.js';
|
|
9
|
+
import { serverLogger, getLogPaths, isFileLoggingEnabled } from './shared/logger.js';
|
|
10
|
+
import { getCachedUpdateNotice } from './shared/version.js';
|
|
11
11
|
import { Effect, Either } from 'effect';
|
|
12
12
|
import process from 'node:process';
|
|
13
13
|
const args = process.argv.slice(2);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
|
-
import { defineTool } from '
|
|
3
|
+
import { defineTool } from '../tool-registry/defineTool.js';
|
|
4
4
|
const connectorSearchInputSchema = z.object({
|
|
5
5
|
query: z.string().describe('Search query'),
|
|
6
6
|
limit: z.number().optional().describe('Maximum number of results'),
|
|
@@ -9,11 +9,11 @@ import { fileURLToPath } from 'url';
|
|
|
9
9
|
import { createBearerAuthMiddleware } from '../auth/oauthMiddleware.js';
|
|
10
10
|
import { createMetadataRouter, getProtectedResourceMetadataUrl } from '../auth/oauthMetadata.js';
|
|
11
11
|
import { TokenVerifier } from '../auth/tokenVerifier.js';
|
|
12
|
-
import { getDefaultScopes, getEbayConfig } from '../
|
|
13
|
-
import { createEbayMcpRuntime } from '../
|
|
14
|
-
import { getErrorMessage } from '../
|
|
15
|
-
import { serverLogger } from '../
|
|
16
|
-
import { getVersion } from '../
|
|
12
|
+
import { getDefaultScopes, getEbayConfig } from '../shared/environment.js';
|
|
13
|
+
import { createEbayMcpRuntime } from '../server/runtime.js';
|
|
14
|
+
import { getErrorMessage } from '../shared/errors.js';
|
|
15
|
+
import { serverLogger } from '../shared/logger.js';
|
|
16
|
+
import { getVersion } from '../shared/version.js';
|
|
17
17
|
import { Effect, Either } from 'effect';
|
|
18
18
|
const LOOPBACK_ORIGIN = /^https?:\/\/(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/;
|
|
19
19
|
const parseCorsOrigins = (value) => {
|
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
* conservative name heuristic so unannotated tools (many inventory/fulfillment
|
|
7
7
|
* endpoints) still gate correctly.
|
|
8
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* Minimal definition shape needed for read-only classification.
|
|
11
|
+
* Intentionally structural so callers can pass full {@link ToolDefinition}s
|
|
12
|
+
* without this module importing the tools tree.
|
|
13
|
+
*/
|
|
14
|
+
import process from 'node:process';
|
|
9
15
|
/**
|
|
10
16
|
* Write-oriented name segments. Matched as whole underscore-delimited tokens
|
|
11
17
|
* so substrings like `markdown` or `setup` do not false-positive.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { EbaySellerApi } from '../
|
|
3
|
-
import { getEbayConfig, mcpConfig } from '../
|
|
4
|
-
import { resolveToolGatingMode } from '../
|
|
5
|
-
import { isReadOnlyModeEnabled, isReadOnlyTool } from '../
|
|
6
|
-
import { createToolGatingController, DYNAMIC_MODE_INSTRUCTIONS, registerMetaTools, toolNamesInFamilies, } from '../
|
|
7
|
-
import { buildUiToolResult, createUiBridge } from '../
|
|
8
|
-
import { getToolEntries } from '../
|
|
9
|
-
import { getEbayErrorDetails } from '../
|
|
10
|
-
import { serverLogger, toolLogger } from '../
|
|
2
|
+
import { EbaySellerApi } from '../ebay-apis/ebaySellerApi.js';
|
|
3
|
+
import { getEbayConfig, mcpConfig } from '../shared/environment.js';
|
|
4
|
+
import { resolveToolGatingMode } from '../shared/toolFamilies.js';
|
|
5
|
+
import { isReadOnlyModeEnabled, isReadOnlyTool } from '../server/readOnlyFilter.js';
|
|
6
|
+
import { createToolGatingController, DYNAMIC_MODE_INSTRUCTIONS, registerMetaTools, toolNamesInFamilies, } from '../server/toolGating.js';
|
|
7
|
+
import { buildUiToolResult, createUiBridge } from '../server/uiBridge.js';
|
|
8
|
+
import { getToolEntries } from '../tool-registry/registry.js';
|
|
9
|
+
import { getEbayErrorDetails } from '../shared/errors.js';
|
|
10
|
+
import { serverLogger, toolLogger } from '../shared/logger.js';
|
|
11
11
|
import { Effect } from 'effect';
|
|
12
12
|
function formatToolSuccess(handlerOutput) {
|
|
13
13
|
// JSON.stringify(undefined) returns undefined (not a string), which produces an
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { TOOL_FAMILY_KEYS } from '../
|
|
3
|
-
import { toolCategories } from '../
|
|
2
|
+
import { TOOL_FAMILY_KEYS } from '../shared/toolFamilies.js';
|
|
3
|
+
import { toolCategories } from '../tool-registry/toolCategories.js';
|
|
4
4
|
/**
|
|
5
5
|
* Tool gating: the runtime half of the `EBAY_MCP_TOOLS=dynamic` feature.
|
|
6
6
|
*
|
|
@@ -12,7 +12,7 @@ import { toolCategories } from '../tools/categories/index.js';
|
|
|
12
12
|
* real input schemas and validation. This keeps advertised context proportional
|
|
13
13
|
* to what the agent actually uses instead of the full ~187-tool catalogue.
|
|
14
14
|
*
|
|
15
|
-
* The pure env parsing/validation lives in `@/
|
|
15
|
+
* The pure env parsing/validation lives in `@/shared/toolFamilies`; this
|
|
16
16
|
* module owns everything that needs the live tool registry.
|
|
17
17
|
*/
|
|
18
18
|
/** Default page size for {@link ToolGatingController.list} when `limit` is omitted. */
|
|
@@ -2,9 +2,9 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { getUiCapability, registerAppResource, RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY, } from '@modelcontextprotocol/ext-apps/server';
|
|
5
|
-
import { getUiRuntimeConfig } from '../
|
|
6
|
-
import { uiArchetypes } from '../
|
|
7
|
-
import { serverLogger } from '../
|
|
5
|
+
import { getUiRuntimeConfig } from '../shared/environment.js';
|
|
6
|
+
import { uiArchetypes } from '../tool-registry/ui/archetypes.js';
|
|
7
|
+
import { serverLogger } from '../shared/logger.js';
|
|
8
8
|
/**
|
|
9
9
|
* Decides whether interactive views should be advertised to the connected client.
|
|
10
10
|
*
|
package/build/serverHttp.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* eBay API MCP Server with HTTP Transport and OAuth 2.1 Authorization.
|
|
3
3
|
*/
|
|
4
|
-
import { validateEnvironmentConfig } from './
|
|
5
|
-
import { createHttpMcpApp, createHttpTransportConfigFromEnv, getHttpServerUrl, } from './
|
|
6
|
-
import { getErrorMessage } from './
|
|
7
|
-
import { serverLogger } from './
|
|
4
|
+
import { validateEnvironmentConfig } from './shared/environment.js';
|
|
5
|
+
import { createHttpMcpApp, createHttpTransportConfigFromEnv, getHttpServerUrl, } from './server/httpTransport.js';
|
|
6
|
+
import { getErrorMessage } from './shared/errors.js';
|
|
7
|
+
import { serverLogger } from './shared/logger.js';
|
|
8
8
|
import { Effect, Either } from 'effect';
|
|
9
9
|
import process from 'node:process';
|
|
10
|
-
import { isEntryModule } from './
|
|
10
|
+
import { isEntryModule } from './shared/entryModule.js';
|
|
11
11
|
const CONFIG = createHttpTransportConfigFromEnv(process.env);
|
|
12
12
|
function logEnvironmentValidation() {
|
|
13
13
|
const validation = validateEnvironmentConfig();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Used by the ebay_get_api_status MCP tool and optionally by the docs sync script.
|
|
4
4
|
*/
|
|
5
5
|
import { XMLParser } from 'fast-xml-parser';
|
|
6
|
-
import { getErrorMessage } from '../
|
|
6
|
+
import { getErrorMessage } from '../shared/errors.js';
|
|
7
7
|
import { httpRequestEffect, isHttpError } from './http.js';
|
|
8
8
|
import { Effect, Either } from 'effect';
|
|
9
9
|
const RSS_URL = 'https://developer.ebay.com/rss/api-status';
|
|
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
3
3
|
/**
|
|
4
4
|
* Resolve the credential `.env` file from an installed source or build module URL.
|
|
5
5
|
*
|
|
6
|
-
* @param moduleUrl - URL of a module in `src/
|
|
6
|
+
* @param moduleUrl - URL of a module in `src/shared` or `build/shared`.
|
|
7
7
|
* @returns Absolute path to the package-root credential file.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { config } from 'dotenv';
|
|
2
2
|
import { existsSync } from 'fs';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
|
-
import { CREDENTIAL_ENV_PATH } from '../
|
|
5
|
-
import { getToolGatingConfigError } from '../
|
|
6
|
-
import { getMediaAccessConfig } from '../
|
|
7
|
-
import { productionScopes, sandboxScopes } from '../
|
|
8
|
-
import { getVersion } from '../
|
|
4
|
+
import { CREDENTIAL_ENV_PATH } from '../shared/credentialFile.js';
|
|
5
|
+
import { getToolGatingConfigError } from '../shared/toolFamilies.js';
|
|
6
|
+
import { getMediaAccessConfig } from '../shared/mediaAccess.js';
|
|
7
|
+
import { productionScopes, sandboxScopes } from '../shared/oauthScopes.js';
|
|
8
|
+
import { getVersion } from '../shared/version.js';
|
|
9
9
|
import { Effect, Either } from 'effect';
|
|
10
10
|
import process from 'node:process';
|
|
11
|
-
// Load .env from the package root (two levels up from src/
|
|
11
|
+
// Load .env from the package root (two levels up from src/shared/), not process.cwd().
|
|
12
12
|
// MCP servers inherit cwd from the host (e.g. Claude Code's project dir), so
|
|
13
13
|
// process.cwd() may point to an unrelated project with a different .env.
|
|
14
14
|
config({ path: CREDENTIAL_ENV_PATH, quiet: true });
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* Keeping these in one place is the single source of truth that lets the rest of
|
|
17
17
|
* the codebase treat HTTP like the old axios calls without the dependency.
|
|
18
18
|
*/
|
|
19
|
-
import { getErrorMessage } from '../
|
|
20
|
-
import { isRecord } from '../
|
|
19
|
+
import { getErrorMessage } from '../shared/errors.js';
|
|
20
|
+
import { isRecord } from '../shared/typeGuards.js';
|
|
21
21
|
import { Cause, Data, Effect, Exit, Option } from 'effect';
|
|
22
22
|
/**
|
|
23
23
|
* Tagged failure for any non-2xx response, network failure, or timeout. Carries the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile, realpath, stat } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { MEDIA_DIRS_ENV, MEDIA_ROOT_ENV } from '../
|
|
3
|
+
import { MEDIA_DIRS_ENV, MEDIA_ROOT_ENV } from '../shared/mediaAccess.js';
|
|
4
4
|
import { Data, Effect } from 'effect';
|
|
5
5
|
import { FEED_FILE_MIME_BY_EXTENSION, feedFileProblem, MAX_FEED_FILE_BYTES, } from './localFeedFiles.js';
|
|
6
6
|
/** Tagged failure for a media reference the server refuses to read. */
|
|
@@ -2,8 +2,8 @@ import winston from 'winston';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { existsSync, mkdirSync } from 'fs';
|
|
4
4
|
import { homedir } from 'os';
|
|
5
|
-
import { getLoggingConfig } from '../
|
|
6
|
-
import { redactSecretFields, redactSecrets } from '../
|
|
5
|
+
import { getLoggingConfig } from '../shared/environment.js';
|
|
6
|
+
import { redactSecretFields, redactSecrets } from '../shared/logRedaction.js';
|
|
7
7
|
/**
|
|
8
8
|
* Log directory for eBay MCP Server
|
|
9
9
|
* Stored in user's home directory under .ebay-mcp/logs
|