dsh-e-comet-skills 2026.11.2 → 2026.11.3
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/package.json +1 -1
- package/plugins/e-comet-skills/.codex-plugin/plugin.json +1 -1
- package/plugins/e-comet-skills/mcp/README.md +2 -1
- package/plugins/e-comet-skills/mcp/src/transport/failures/vocabulary.mjs +1 -0
- package/plugins/e-comet-skills/mcp/src/wb-client/application/job-limits.mjs +20 -3
- package/plugins/e-comet-skills/mcp/src/wb-client/application/run-buyer-job.mjs +5 -0
- package/plugins/e-comet-skills/mcp/src/wb-client/contract/check.contract.mjs +6 -3
- package/plugins/e-comet-skills/mcp/src/wb-client/contract/filters.contract.mjs +4 -4
- package/plugins/e-comet-skills/mcp/src/wb-client/domain/constants/limits.const.mjs +5 -0
- package/plugins/e-comet-skills/mcp/src/wb-client/domain/converters/descriptor-urls.converter.mjs +4 -0
- package/plugins/e-comet-skills/mcp/src/wb-client/domain/converters/filters.converter.mjs +12 -7
- package/plugins/e-comet-skills/mcp/src/wb-client/in/mcp/buyer.tool.mjs +14 -5
package/package.json
CHANGED
|
@@ -70,7 +70,8 @@ Local tools:
|
|
|
70
70
|
|
|
71
71
|
- `wb_product_card` — discovers and executes signed live product-card requests;
|
|
72
72
|
- `wb_search_by_query` — discovers and executes signed live WB search requests;
|
|
73
|
-
- `wb_check_by_query` — checks whether one article appears in search for up to 100 phrases,
|
|
73
|
+
- `wb_check_by_query` — checks whether one article appears in search for up to 100 phrases, optionally under WB search
|
|
74
|
+
filters, without reporting a position;
|
|
74
75
|
- `wb_filters_by_query` — returns the search-filter characteristics and categories, with complete value lists, for up
|
|
75
76
|
to 50 phrases, merged by filter; the connected extension must support the job type;
|
|
76
77
|
- `wb_recommendations_by_product` — discovers and executes signed recommendation-shelf requests;
|
|
@@ -2,7 +2,7 @@ import { ToolExecutionError } from '../../shared/coded-error.mjs';
|
|
|
2
2
|
import { validTimeout } from '../../shared/timeouts.mjs';
|
|
3
3
|
import { fieldOf, isBoundedText, isPositiveSafeInteger, isRecord, isUnknownArray } from '../../shared/values.mjs';
|
|
4
4
|
import { MAX_BROWSER_JOB_TEXT_LENGTH, MAX_BROWSER_JOB_URL_LENGTH } from '../../transport/mcp/limits.mjs';
|
|
5
|
-
import { MAX_FILTER_QUERIES, MAX_CHECK_PAGES_PER_QUERY, MAX_CHECK_QUERIES, MAX_CHECK_SEARCH_REQUESTS, MAX_PRODUCT_CARD_PRODUCTS, MAX_PRODUCT_CARD_REQUEST_UNITS, MAX_RECOMMENDATION_PAGES_PER_PRODUCT, MAX_RECOMMENDATION_REQUEST_UNITS, MAX_SEARCH_PAGES_PER_QUERY, MAX_SEARCH_REQUEST_UNITS, } from '../domain/constants/limits.const.mjs';
|
|
5
|
+
import { CHECK_FILTER_KEY, MAX_FILTER_QUERIES, MAX_CHECK_FILTERS, MAX_CHECK_FILTER_VALUES, MAX_CHECK_PAGES_PER_QUERY, MAX_CHECK_QUERIES, MAX_CHECK_SEARCH_REQUESTS, MAX_PRODUCT_CARD_PRODUCTS, MAX_PRODUCT_CARD_REQUEST_UNITS, MAX_RECOMMENDATION_PAGES_PER_PRODUCT, MAX_RECOMMENDATION_REQUEST_UNITS, MAX_SEARCH_PAGES_PER_QUERY, MAX_SEARCH_REQUEST_UNITS, } from '../domain/constants/limits.const.mjs';
|
|
6
6
|
import { buildCheckDescriptorUrl, buildDescriptorUrl, buildFiltersDescriptorUrl, fillTemplate, normalizeProductArticles, } from '../domain/converters/descriptor-urls.converter.mjs';
|
|
7
7
|
import { isAllowedWbUrl } from '../domain/policies/wb-url.policy.mjs';
|
|
8
8
|
// Parse boundary: a signed descriptor as the extension attested it; the checks below read it field by field.
|
|
@@ -53,6 +53,21 @@ const validUniqueQueries = (queries, maxQueries) => isUnknownArray(queries) &&
|
|
|
53
53
|
queries.length <= maxQueries &&
|
|
54
54
|
queries.every(queryText) &&
|
|
55
55
|
new Set(queries).size === queries.length;
|
|
56
|
+
const validCheckFilter = (filter) => isRecord(filter) &&
|
|
57
|
+
typeof filter.key === 'string' &&
|
|
58
|
+
CHECK_FILTER_KEY.test(filter.key) &&
|
|
59
|
+
isUnknownArray(filter.values) &&
|
|
60
|
+
filter.values.length >= 1 &&
|
|
61
|
+
filter.values.length <= MAX_CHECK_FILTER_VALUES &&
|
|
62
|
+
filter.values.every((value) => typeof value === 'number' && Number.isSafeInteger(value)) &&
|
|
63
|
+
new Set(filter.values).size === filter.values.length;
|
|
64
|
+
// Absent for an unfiltered check; otherwise 1-MAX_CHECK_FILTERS filters with distinct keys.
|
|
65
|
+
const validCheckFilters = (filters) => filters === undefined ||
|
|
66
|
+
(isUnknownArray(filters) &&
|
|
67
|
+
filters.length >= 1 &&
|
|
68
|
+
filters.length <= MAX_CHECK_FILTERS &&
|
|
69
|
+
filters.every(validCheckFilter) &&
|
|
70
|
+
new Set(filters.map(({ key }) => key)).size === filters.length);
|
|
56
71
|
const cardUrlMatchesArticle = (cardUrl, article) => {
|
|
57
72
|
try {
|
|
58
73
|
return Number(new URL(cardUrl).searchParams.get('nm')) === article;
|
|
@@ -92,7 +107,7 @@ export const validateAuthorizedJobLimits = (authorization) => {
|
|
|
92
107
|
return { jobType, job: { jobId, timeout, endpoint, params, queries } };
|
|
93
108
|
}
|
|
94
109
|
if (jobType === 'check_by_query') {
|
|
95
|
-
const { queries, article, cardUrl, endpoint, params, maxPages } = job;
|
|
110
|
+
const { queries, article, cardUrl, endpoint, params, maxPages, filters } = job;
|
|
96
111
|
if (job.type !== 'wb-check-by-query')
|
|
97
112
|
throw brokenRule('type', 'Invalid check-by-query descriptor type');
|
|
98
113
|
if (!isPositiveSafeInteger(article))
|
|
@@ -109,7 +124,9 @@ export const validateAuthorizedJobLimits = (authorization) => {
|
|
|
109
124
|
throw brokenRule('pages', `Browser check-by-query job requires exactly ${MAX_CHECK_PAGES_PER_QUERY} pages per query`);
|
|
110
125
|
if (queries.length * maxPages > MAX_CHECK_SEARCH_REQUESTS)
|
|
111
126
|
throw brokenRule('requests', `Browser check-by-query job requires at most ${MAX_CHECK_SEARCH_REQUESTS} search requests`);
|
|
112
|
-
|
|
127
|
+
if (!validCheckFilters(filters))
|
|
128
|
+
throw brokenRule('filters', `Browser check-by-query job requires 1-${MAX_CHECK_FILTERS} filters with distinct keys and 1-${MAX_CHECK_FILTER_VALUES} distinct value ids each`);
|
|
129
|
+
const checkJob = { jobId, timeout, article, cardUrl, endpoint, params, queries, maxPages, filters };
|
|
113
130
|
if (!descriptorCheckPagesAllowed(checkJob, queries))
|
|
114
131
|
throw brokenRule('assembled_url', 'Invalid browser job assembled endpoint URL');
|
|
115
132
|
return { jobType, job: checkJob };
|
|
@@ -193,6 +193,8 @@ const executeSearchJob = async ({ authorizationId, job, requestWbFetch, writer,
|
|
|
193
193
|
const executeCheckByQueryJob = async ({ authorizationId, job, requestWbFetch, writer }) => {
|
|
194
194
|
// product_id is the public tool terminology; article is retained only in the signed wire descriptor.
|
|
195
195
|
const productId = job.article;
|
|
196
|
+
// The signed search filters, echoed so the answer names the search it checked.
|
|
197
|
+
const appliedFilters = job.filters ? { filters: job.filters } : {};
|
|
196
198
|
let cardResponse;
|
|
197
199
|
try {
|
|
198
200
|
cardResponse = await requestWbFetch(job.cardUrl, job.timeout ?? REQUEST_TIMEOUT_MS, authorizationId);
|
|
@@ -206,6 +208,7 @@ const executeCheckByQueryJob = async ({ authorizationId, job, requestWbFetch, wr
|
|
|
206
208
|
status: 'failed',
|
|
207
209
|
complete: false,
|
|
208
210
|
product_id: productId,
|
|
211
|
+
...appliedFilters,
|
|
209
212
|
requestsMade: 1,
|
|
210
213
|
queries: job.queries.map((query) => ({
|
|
211
214
|
query,
|
|
@@ -229,6 +232,7 @@ const executeCheckByQueryJob = async ({ authorizationId, job, requestWbFetch, wr
|
|
|
229
232
|
complete: false,
|
|
230
233
|
product_id: productId,
|
|
231
234
|
product: cardProductIdentity(cardProduct, productId),
|
|
235
|
+
...appliedFilters,
|
|
232
236
|
requestsMade: 1,
|
|
233
237
|
queries: job.queries.map((query) => ({
|
|
234
238
|
query,
|
|
@@ -310,6 +314,7 @@ const executeCheckByQueryJob = async ({ authorizationId, job, requestWbFetch, wr
|
|
|
310
314
|
complete: successfulQueries === queries.length,
|
|
311
315
|
product_id: productId,
|
|
312
316
|
product: cardProductIdentity(cardProduct, productId),
|
|
317
|
+
...appliedFilters,
|
|
313
318
|
requestsMade: 1 + searchRequestsMade,
|
|
314
319
|
queries,
|
|
315
320
|
};
|
|
@@ -34,6 +34,7 @@ const checkSuccessSchema = object({
|
|
|
34
34
|
complete: boolean,
|
|
35
35
|
product_id: positiveInteger,
|
|
36
36
|
product: checkProductSchema,
|
|
37
|
+
filters: array(object({ key: string, values: array(integer) }, ['key', 'values'])),
|
|
37
38
|
requestsMade: positiveInteger,
|
|
38
39
|
queries: array(checkQuerySchema),
|
|
39
40
|
}, ['ok', 'status', 'jobType', 'jobId', 'resultPath', 'complete', 'product_id', 'requestsMade', 'queries']);
|
|
@@ -42,15 +43,17 @@ const checkContract = 'Check whether one Wildberries article appears in search r
|
|
|
42
43
|
localBridgeFailureGuidance +
|
|
43
44
|
buyerOutcomeGuidance +
|
|
44
45
|
rejectionAndHandoffGuidance +
|
|
45
|
-
'Authorize with job {type:"check_by_query",product_id:integer,queries:[string,...]}; send one positive product ID and 1-100 unique non-empty phrases. Page depth is fixed by the service; do not supply it. ' +
|
|
46
|
-
'
|
|
46
|
+
'Authorize with job {type:"check_by_query",product_id:integer,queries:[string,...],filters?:[{key:string,values:[integer,...]},...]}; send one positive product ID and 1-100 unique non-empty phrases. Page depth is fixed by the service; do not supply it. ' +
|
|
47
|
+
'To check under WB search filters (Цвет, Состав, категория…), add filters with keys and value ids taken from wb_filters_by_query, never guessed: 1-5 filters, each with 1-10 ids; one filter matches any of its ids, all filters must match, and they apply to every phrase. Only characteristic and category filters are accepted. ' +
|
|
48
|
+
'If wb_filters_by_query did not return the requested value with an id in this task, say the WB search filters for these phrases do not offer it, so it cannot be checked as a filter. Never check under a guessed or substitute id: WB ignores an unknown id and answers for the unfiltered search. Check without that filter only if the user agrees. ' +
|
|
49
|
+
'Read queries[] separately. For found:true, report only that the product was found for the phrase. For found:false, report only that the product was not found for the phrase. With filters[] in the answer, say the result holds under those filters, never for the unfiltered search. ' +
|
|
47
50
|
'Do not mention pagesChecked, completionReason, page limits, or brand-filtered depth unless the user explicitly asks for diagnostics. Never present pagesChecked as a page, position, rank, or search depth in ordinary unfiltered search. ' +
|
|
48
51
|
'request_failed and card_failed mean the check was incomplete; report that the check was incomplete rather than reporting the product as not found. ' +
|
|
49
52
|
'Do not claim that the product is absent from all Wildberries search results. Results are a current WB-session snapshot. ' +
|
|
50
53
|
resultPathGuidance;
|
|
51
54
|
export const contract = {
|
|
52
55
|
name: 'wb_check_by_query',
|
|
53
|
-
description: 'Check whether one WB article appears for queries. ' +
|
|
56
|
+
description: 'Check whether one WB article appears for queries, optionally under WB search filters. ' +
|
|
54
57
|
signedDiscovery('wb_check_by_query', 'check_by_query') +
|
|
55
58
|
'Never automatically repeat rate-limited work; retain partial results. found:true/false means found/not found for that phrase; request_failed or card_failed means incomplete, not not found. Never interpret pagesChecked as rank or ordinary search depth, or claim absence from all WB results. ' +
|
|
56
59
|
completeContractGuidance,
|
|
@@ -33,7 +33,7 @@ const filterSchema = object({
|
|
|
33
33
|
name: string,
|
|
34
34
|
key: string,
|
|
35
35
|
complete: boolean,
|
|
36
|
-
values: array(string),
|
|
36
|
+
values: array(object({ id: integer, name: string }, ['name'])),
|
|
37
37
|
queryCount: positiveInteger,
|
|
38
38
|
}, ['kind', 'name', 'key', 'complete', 'values', 'queryCount']);
|
|
39
39
|
const filtersSuccessSchema = object({
|
|
@@ -51,8 +51,8 @@ const filtersContract = 'Get the Wildberries search filters for 1-50 phrases: ev
|
|
|
51
51
|
buyerOutcomeGuidance +
|
|
52
52
|
rejectionAndHandoffGuidance +
|
|
53
53
|
'Authorize with job {type:"filters_by_query",queries:[string,...]}; send 1-50 unique non-empty phrases as a shopper types them. ' +
|
|
54
|
-
"Read filters[]: one entry per filter across all phrases; values are WB's
|
|
55
|
-
'Quote
|
|
54
|
+
"Read filters[]: one entry per filter across all phrases; values[] are in WB's order, the union over the phrases, each with name, WB's exact spelling, and id, which wb_check_by_query takes with the filter key to check an article under that filter; queryCount counts the phrases that show the filter, and queries[].filterKeys lists the filters of each phrase. " +
|
|
55
|
+
'Quote names verbatim when advising what to fill in a card. complete:false means WB returned only the first values of that list: say the list may be longer. ' +
|
|
56
56
|
'Per phrase, empty means WB found nothing for it; request_failed with WB_UNRELIABLE_RESPONSE means WB answered with decoy data, which was discarded; partial means some lists stayed truncated. Never present a failed phrase as one without filters. ' +
|
|
57
57
|
'Brand, seller, price, delivery and yes/no filters are not returned. Which phrase showed which value is in the result file. Results are a current WB-session snapshot. ' +
|
|
58
58
|
resultPathGuidance;
|
|
@@ -60,7 +60,7 @@ export const contract = {
|
|
|
60
60
|
name: 'wb_filters_by_query',
|
|
61
61
|
description: 'Get the WB search filters for phrases: every card characteristic with all its values, and the categories, as on the search page under «Все фильтры». ' +
|
|
62
62
|
signedDiscovery('wb_filters_by_query', 'filters_by_query') +
|
|
63
|
-
"Never automatically repeat rate-limited work; retain partial results.
|
|
63
|
+
"Never automatically repeat rate-limited work; retain partial results. Value names are WB's exact spellings; complete:false means only the first values were returned. empty means WB found nothing for the phrase; a failed phrase is not a phrase without filters. " +
|
|
64
64
|
completeContractGuidance,
|
|
65
65
|
inputSchema: liveInputSchema(),
|
|
66
66
|
outputSchema: withRunningAnswer(withOperationDiagnostic(objectUnion(...liveAggregateSchemas(filtersSuccessSchema), toolErrorSchema))),
|
|
@@ -8,6 +8,11 @@ export const SEARCH_CONCURRENCY = 4;
|
|
|
8
8
|
export const MAX_CHECK_QUERIES = 100;
|
|
9
9
|
export const MAX_CHECK_PAGES_PER_QUERY = 10;
|
|
10
10
|
export const MAX_CHECK_SEARCH_REQUESTS = 1000;
|
|
11
|
+
// A filtered check: at most this many filters, each with at most this many value ids. A key is a card characteristic
|
|
12
|
+
// (`f` + digits) or the category filter; brand, seller, price and flag filters are not accepted.
|
|
13
|
+
export const MAX_CHECK_FILTERS = 5;
|
|
14
|
+
export const MAX_CHECK_FILTER_VALUES = 10;
|
|
15
|
+
export const CHECK_FILTER_KEY = /^(?:f[0-9]{1,18}|xsubject)$/;
|
|
11
16
|
// wb_filters_by_query: one filters request and at most one full-list request per phrase. A full-list request names at most
|
|
12
17
|
// this many WB fullKey values (`ff` + at most 32 lower-case letters or digits), joined by ";".
|
|
13
18
|
export const MAX_FILTER_QUERIES = 50;
|
package/plugins/e-comet-skills/mcp/src/wb-client/domain/converters/descriptor-urls.converter.mjs
CHANGED
|
@@ -16,6 +16,10 @@ export const buildCheckDescriptorUrl = (job, query, page, brandId) => {
|
|
|
16
16
|
// Match front's checkAvailabilityForArticle flow: catalog search narrowed by the card-derived brand.
|
|
17
17
|
url.searchParams.set('resultset', 'catalog');
|
|
18
18
|
url.searchParams.set('fbrand', String(brandId));
|
|
19
|
+
// Signed search filters in the signer's order; the values of one filter widen it, as on WB (";" is written %3B). The
|
|
20
|
+
// extension rebuilds the same string; the contract's wbCheckByQueryFilters.urlFixtures pin it.
|
|
21
|
+
for (const { key, values } of job.filters ?? [])
|
|
22
|
+
url.searchParams.set(key, values.join(';'));
|
|
19
23
|
return url.toString();
|
|
20
24
|
};
|
|
21
25
|
// The extension rebuilds the same string and admits it only on exact equality; the contract's wbFiltersByQuery.urlFixtures
|
|
@@ -24,12 +24,17 @@ export const readFiltersResponse = (response) => {
|
|
|
24
24
|
return { state: 'genuine', filters: data.filters.filter(isRecord), total: numberOrUndefined(data.total) };
|
|
25
25
|
};
|
|
26
26
|
const filterKind = (key) => (CHARACTERISTIC_KEY.test(key) ? 'characteristic' : key === 'xsubject' ? 'category' : undefined);
|
|
27
|
-
const
|
|
27
|
+
const filterValues = (filter) => isUnknownArray(filter.items)
|
|
28
28
|
? filter.items.flatMap((item) => {
|
|
29
|
+
const id = fieldOf(item, 'id');
|
|
29
30
|
const name = fieldOf(item, 'name');
|
|
30
|
-
|
|
31
|
+
if (typeof name !== 'string' || !name)
|
|
32
|
+
return [];
|
|
33
|
+
return [typeof id === 'number' && Number.isSafeInteger(id) ? { id, name } : { name }];
|
|
31
34
|
})
|
|
32
35
|
: [];
|
|
36
|
+
// A value is the same across phrases by its id, or by its spelling when WB gave none.
|
|
37
|
+
const valueIdentity = ({ id, name }) => id ?? name;
|
|
33
38
|
export const keptFilters = (filters) => filters.flatMap((filter) => {
|
|
34
39
|
const key = filter.key;
|
|
35
40
|
if (typeof key !== 'string')
|
|
@@ -44,7 +49,7 @@ export const keptFilters = (filters) => filters.flatMap((filter) => {
|
|
|
44
49
|
key,
|
|
45
50
|
isTop: filter.isTop === true,
|
|
46
51
|
fullKey: typeof filter.fullKey === 'string' ? filter.fullKey : undefined,
|
|
47
|
-
values:
|
|
52
|
+
values: filterValues(filter),
|
|
48
53
|
},
|
|
49
54
|
];
|
|
50
55
|
});
|
|
@@ -66,8 +71,8 @@ export const completeFilters = (kept, fullFilters) => {
|
|
|
66
71
|
if (!isTop)
|
|
67
72
|
return { kind, name, key, complete: true, values };
|
|
68
73
|
const full = fullFilters?.find((candidate) => candidate.key === key && candidate.isTop !== true);
|
|
69
|
-
const fullValues = full ?
|
|
70
|
-
// A full list without
|
|
74
|
+
const fullValues = full ? filterValues(full) : [];
|
|
75
|
+
// A full list without readable values would replace real values with nothing; keep the first values instead.
|
|
71
76
|
if (fullValues.length === 0) {
|
|
72
77
|
missing += 1;
|
|
73
78
|
return { kind, name, key, complete: false, values };
|
|
@@ -86,8 +91,8 @@ export const mergeFilters = (phraseFilters) => {
|
|
|
86
91
|
merged.set(filter.key, { ...filter, values: [...filter.values], queryCount: 1 });
|
|
87
92
|
continue;
|
|
88
93
|
}
|
|
89
|
-
const known = new Set(current.values);
|
|
90
|
-
current.values.push(...filter.values.filter((value) => !known.has(value) && known.add(value)));
|
|
94
|
+
const known = new Set(current.values.map(valueIdentity));
|
|
95
|
+
current.values.push(...filter.values.filter((value) => !known.has(valueIdentity(value)) && known.add(valueIdentity(value))));
|
|
91
96
|
current.complete = current.complete && filter.complete;
|
|
92
97
|
current.queryCount += 1;
|
|
93
98
|
}
|
|
@@ -25,14 +25,23 @@ export const BUYER_TOOLS = [
|
|
|
25
25
|
];
|
|
26
26
|
// The authorization lease is built by this process; a wrong shape is an e-Comet defect, not the seller's.
|
|
27
27
|
const leaseInvalid = () => new ToolExecutionError('BROWSER_JOB_LEASE_INVALID', 'The local MCP received an invalid browser job authorization lease; this is an e-Comet defect. Offer to report it; do not repeat browser_job.', 'local', false);
|
|
28
|
-
// The e-Comet signer issues filters_by_query, so an extension refusing that job type
|
|
29
|
-
//
|
|
30
|
-
//
|
|
28
|
+
// The e-Comet signer issues filters_by_query and filtered check_by_query jobs, so an extension refusing that job type
|
|
29
|
+
// (invalid_job/job_type) or a check descriptor (invalid_job/descriptor_shape: its schema is strict, so `filters` is unknown to
|
|
30
|
+
// it) predates them. Without this an outdated extension reads as our defect. Older WB jobs are known to every supported
|
|
31
|
+
// extension. The refusal details are not passed on: DIAGNOSTICS.md reads invalid_job as our defect, which would contradict
|
|
32
|
+
// the update advice.
|
|
33
|
+
// ponytail: any descriptor_shape refusal of a check reads as outdated, so a broken signed check would also ask for an update
|
|
34
|
+
// (accepted residual); gate on an extension capability if that ever happens.
|
|
35
|
+
const OUTDATED_EXTENSION_REFUSALS = {
|
|
36
|
+
wb_filters_by_query: { diagnostic: 'job_type', feature: 'wb_filters_by_query' },
|
|
37
|
+
wb_check_by_query: { diagnostic: 'descriptor_shape', feature: 'search filters in wb_check_by_query' },
|
|
38
|
+
};
|
|
31
39
|
const outdatedExtensionForJobType = (toolName, error) => {
|
|
32
40
|
const rejection = browserJobRejectionDetails(error)?.browserJobRejection;
|
|
33
|
-
|
|
41
|
+
const outdated = Object.hasOwn(OUTDATED_EXTENSION_REFUSALS, toolName) ? OUTDATED_EXTENSION_REFUSALS[toolName] : undefined;
|
|
42
|
+
if (!outdated || rejection?.reason !== 'invalid_job' || rejection.diagnostic !== outdated.diagnostic)
|
|
34
43
|
return error;
|
|
35
|
-
return new ToolExecutionError('EXTENSION_UPDATE_REQUIRED', `The connected e-Comet extension does not support ${
|
|
44
|
+
return new ToolExecutionError('EXTENSION_UPDATE_REQUIRED', `The connected e-Comet extension does not support ${outdated.feature}. Update the e-Comet extension at ${EXTENSION_UPDATE_URL}, then request a new authorization and retry.`, 'extension', false, { cause: error });
|
|
36
45
|
};
|
|
37
46
|
// Scope revocation occurs before the release route's acknowledgement can suspend, so the tool can safely deliver a
|
|
38
47
|
// terminal result without letting an extension round trip delay it.
|