From c614c967828f45114bb72c576261f4bc1f9f44f0 Mon Sep 17 00:00:00 2001 From: daxiongya Date: Mon, 23 Nov 2026 17:17:15 +0800 Subject: [PATCH 1/9] feat(provider): explain default-major takedown conflicts and document endpoint delisting - `provider deprecate` prints the live majors and the `default-major` command to run when the API answers 409 DEFAULT_MAJOR_HAS_LIVE_MAJORS; every other HTTP error body stays hidden. - xapi-provider skill: how to delist one endpoint (hidden / x-xapi-hidden, 410 EndpointDelisted, no upstream review test, restore, TIME_RENTAL may delist CREATE only) and the default-major rule (switch the default first; 410 MajorVersionDelisted for pinned calls). Co-Authored-By: Claude Opus 5.5 --- skills/xapi-provider/SKILL.md | 13 +++++++++++++ .../reference/lifecycle-management.md | 13 +++++++++++++ src/commands/provider.ts | 15 ++++++++++++++- src/tests/provider.test.ts | 17 +++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/skills/xapi-provider/SKILL.md b/skills/xapi-provider/SKILL.md index 6895502..350a8b2 100644 --- a/skills/xapi-provider/SKILL.md +++ b/skills/xapi-provider/SKILL.md @@ -114,6 +114,14 @@ npx xapi-to provider revision start npx xapi-to provider major create ``` +To delist one endpoint, set `hidden: true` on it in a working revision +(`x-xapi-hidden: true` in OpenAPI) and publish. A delist-only change does not +trigger the upstream review test. Callers then get `410 EndpointDelisted`, and +the endpoint leaves docs, Marketplace and Tools. Set it back to `false` and +publish to restore it; delete the endpoint instead only to remove it for good. +For TIME_RENTAL, delist only the CREATE endpoint: submission rejects a delisted +TERMINATE or STATUS endpoint because open rentals could no longer be stopped. + ## Marketplace content and usage Skill Update service-card content separately from the version contract: @@ -194,6 +202,11 @@ npx xapi-to provider deprecate npx xapi-to provider restore ``` +`deprecate` on the default major is refused with `409 +DEFAULT_MAJOR_HAS_LIVE_MAJORS` while another major is live: run `default-major` +to a live major first. Deprecating the only live major pauses the whole service. +A deprecated major answers `410 MajorVersionDelisted` to `X-Xapi-Version` calls. + Do not automatically retry an ambiguous rollback response. Read `versions` and `review` first. Deletion requires both `service:delete` and the explicit service name or ID: diff --git a/skills/xapi-provider/reference/lifecycle-management.md b/skills/xapi-provider/reference/lifecycle-management.md index f0cb301..0c56d5a 100644 --- a/skills/xapi-provider/reference/lifecycle-management.md +++ b/skills/xapi-provider/reference/lifecycle-management.md @@ -313,6 +313,19 @@ npx xapi-to provider deprecate npx xapi-to provider restore ``` +Deprecating a non-default major takes only that major offline; the service stays +active. Deprecating the default major pauses the whole service, so it is allowed +only when no other major is live. Otherwise the API returns `409 +DEFAULT_MAJOR_HAS_LIVE_MAJORS` with `liveMajors`; switch the default to one of +them first, then deprecate. Calls that pin a deprecated major with +`X-Xapi-Version` get `410 MajorVersionDelisted`. + +To delist a single endpoint without touching the major, set `hidden: true` on it +in a working revision and publish. The change skips the upstream review test and +the gateway answers `410 EndpointDelisted`; publishing `hidden: false` restores +it. TIME_RENTAL groups may delist CREATE only; a delisted TERMINATE or STATUS +endpoint blocks submission with `RENTAL_LIFECYCLE_DELISTED`. + Read `versions` after an ambiguous write. Delete only when the user intends to remove the service and has identified it by name or ID: diff --git a/src/commands/provider.ts b/src/commands/provider.ts index 19123ae..d0c6762 100644 --- a/src/commands/provider.ts +++ b/src/commands/provider.ts @@ -456,8 +456,21 @@ export async function provider(args: string[], flags: Record) { // Provider error bodies can echo submitted configuration or credentials. // Preserve local errors, but never print an HTTP response body verbatim. const message = error instanceof HttpError - ? `HTTP ${error.status}` + ? defaultMajorConflict(error) ?? `HTTP ${error.status}` : String(redactProvider(error instanceof Error ? error.message : 'Unknown error', [apiKey])); err('provider request failed', message); } } + +// Deprecating the default major while another major is live is refused (409). +// The body is a fixed server message plus major labels, so it is safe to show. +function defaultMajorConflict(error: HttpError): string | undefined { + const body = error.responseBody as { code?: unknown; liveMajors?: unknown } | undefined; + if (error.status !== 409 || body?.code !== 'DEFAULT_MAJOR_HAS_LIVE_MAJORS') return undefined; + const live = Array.isArray(body.liveMajors) + ? body.liveMajors.filter((v): v is string => typeof v === 'string' && /^v\d+$/.test(v)) + : []; + const target = live[0] ?? ''; + return `HTTP 409: other majors are still live (${live.join(', ') || 'unknown'}). ` + + `Switch the default first: xapi-to provider default-major ${target.replace(/^v/, '')}, then deprecate.`; +} diff --git a/src/tests/provider.test.ts b/src/tests/provider.test.ts index c3afd47..7e738c7 100644 --- a/src/tests/provider.test.ts +++ b/src/tests/provider.test.ts @@ -229,6 +229,23 @@ describe('provider command', () => { ); }); + it('explains the default-major 409 without echoing other response bodies', async () => { + requestSpy.mockRejectedValueOnce(new client.HttpError(409, 'conflict', undefined, { + code: 'DEFAULT_MAJOR_HAS_LIVE_MAJORS', + message: '默认版本是 v2,请先切换默认版本到 v1,再弃用 v2', + liveMajors: ['v1'], + })); + await expect(provider(['deprecate', 'service-1', '2'], {})).rejects.toThrow('err called'); + expect(errSpy).toHaveBeenCalledWith( + 'provider request failed', + 'HTTP 409: other majors are still live (v1). Switch the default first: xapi-to provider default-major 1, then deprecate.', + ); + + requestSpy.mockRejectedValueOnce(new client.HttpError(409, 'conflict', undefined, { code: 'OTHER', secret: 'x' })); + await expect(provider(['deprecate', 'service-1', '2'], {})).rejects.toThrow('err called'); + expect(errSpy).toHaveBeenLastCalledWith('provider request failed', 'HTTP 409'); + }); + it('links a primary skill using service:update', async () => { await provider(['skill', 'link', 'service-1', 'skill-1'], {}); From ccce81d2810b279c6f776857c20835ed14a0a1be Mon Sep 17 00:00:00 2001 From: daxiongya Date: Tue, 24 Nov 2026 14:33:36 +0800 Subject: [PATCH 2/9] docs(provider): delisted endpoints are not callable Co-Authored-By: Claude Opus 5.5 --- README.md | 5 +++-- skills/xapi-provider/reference/validation-checklist.md | 3 ++- skills/xapi/guides/blockpi.md | 7 +++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 064d1ef..e31e0d2 100644 --- a/README.md +++ b/README.md @@ -250,8 +250,9 @@ with `--default-price 0.001`, or use `--default-price 0` when free access is intended. The default fills only missing `PER_CALL` prices (including hidden operations) and preserves authored prices and billing types. Resource, token and dynamic operations need their own pricing configuration in the spec; a -per-call default cannot fill those. Hidden endpoints remain callable, so they -also need an explicit pricing choice. +per-call default cannot fill those. Delisted (`hidden`) endpoints are not +callable (the gateway returns 410), but they keep their pricing so they can be +restored, so they also need an explicit pricing choice. `provider update --revision ` reads a version configuration object, using the backend fields `description`, `baseUrl`, `baseUrls`, `authType`, `privateHeaders`, diff --git a/skills/xapi-provider/reference/validation-checklist.md b/skills/xapi-provider/reference/validation-checklist.md index 7074db0..20a30c5 100644 --- a/skills/xapi-provider/reference/validation-checklist.md +++ b/skills/xapi-provider/reference/validation-checklist.md @@ -80,7 +80,8 @@ choose the price with the user and pass `--default-price `, or add `x-xapi-billing.costPerCall` to the spec. `--default-price 0` explicitly chooses free access. The default fills only missing per-call prices, including hidden operations; it preserves explicit prices, including zero, and never changes a -billing type. Hidden operations remain callable and still need pricing. +billing type. Delisted (`hidden`) operations are not callable (the gateway +returns 410) but still need pricing, because they can be restored. `PER_RESOURCE` needs `costPerResource`, `PER_TOKEN` needs non-empty `tokenPricing` with a rate for each listed model, and `DYNAMIC` needs `dynamicRules`; configure those in the spec rather than using the per-call diff --git a/skills/xapi/guides/blockpi.md b/skills/xapi/guides/blockpi.md index 494b5d9..eeac953 100644 --- a/skills/xapi/guides/blockpi.md +++ b/skills/xapi/guides/blockpi.md @@ -135,10 +135,9 @@ or on-chain confirmation. Use a deliberately invalid, format-complete fixture for a forwarding check; do not construct a valid signed transaction to obtain 2xx. The maintained public Aptos contract has 27 operations. Raw table -`POST /v1/tables/{handle}/raw_item` is hidden pending upstream compatibility. -`hidden` controls public discovery/export and does not disable an existing -runtime route. Do not infer availability from its omission or advertise it as -supported. Its binary response type `application/x-bcs` is different from the +`POST /v1/tables/{handle}/raw_item` is delisted (`x-xapi-hidden: true`) pending +upstream compatibility: it is not listed or exported and the gateway returns +410 for it. Do not advertise it as supported. Its binary response type `application/x-bcs` is different from the signed-transaction **request** media type above. ## Generic JSON-RPC From a988bce168ff1c4f7118c587be7c3ac3291b0c82 Mon Sep 17 00:00:00 2001 From: daxiongya Date: Tue, 24 Nov 2026 15:33:08 +0800 Subject: [PATCH 3/9] docs(provider): rename endpoint hidden to delisted Co-Authored-By: Claude Opus 5.5 --- README.md | 4 ++-- skills/xapi-provider/SKILL.md | 6 ++++-- .../xapi-provider/reference/lifecycle-management.md | 11 ++++++----- .../xapi-provider/reference/validation-checklist.md | 4 ++-- skills/xapi/guides/blockpi.md | 2 +- src/commands/provider-onboarding.ts | 2 +- src/tests/provider-onboarding.test.ts | 8 ++++---- 7 files changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e31e0d2..ec0c02c 100644 --- a/README.md +++ b/README.md @@ -247,10 +247,10 @@ and structured validation errors rather than changing a version label. Missing per-call prices stop import before a write. Choose an explicit default with `--default-price 0.001`, or use `--default-price 0` when free access is -intended. The default fills only missing `PER_CALL` prices (including hidden +intended. The default fills only missing `PER_CALL` prices (including delisted operations) and preserves authored prices and billing types. Resource, token and dynamic operations need their own pricing configuration in the spec; a -per-call default cannot fill those. Delisted (`hidden`) endpoints are not +per-call default cannot fill those. Delisted (`x-xapi-delisted: true`) endpoints are not callable (the gateway returns 410), but they keep their pricing so they can be restored, so they also need an explicit pricing choice. diff --git a/skills/xapi-provider/SKILL.md b/skills/xapi-provider/SKILL.md index 350a8b2..bbbe652 100644 --- a/skills/xapi-provider/SKILL.md +++ b/skills/xapi-provider/SKILL.md @@ -114,13 +114,15 @@ npx xapi-to provider revision start npx xapi-to provider major create ``` -To delist one endpoint, set `hidden: true` on it in a working revision -(`x-xapi-hidden: true` in OpenAPI) and publish. A delist-only change does not +To delist one endpoint, set `delisted: true` on it in a working revision +(`x-xapi-delisted: true` in OpenAPI) and publish. A delist-only change does not trigger the upstream review test. Callers then get `410 EndpointDelisted`, and the endpoint leaves docs, Marketplace and Tools. Set it back to `false` and publish to restore it; delete the endpoint instead only to remove it for good. For TIME_RENTAL, delist only the CREATE endpoint: submission rejects a delisted TERMINATE or STATUS endpoint because open rentals could no longer be stopped. +The old names `hidden` / `x-xapi-hidden` are rejected with HTTP 400; use +`delisted` / `x-xapi-delisted`. ## Marketplace content and usage Skill diff --git a/skills/xapi-provider/reference/lifecycle-management.md b/skills/xapi-provider/reference/lifecycle-management.md index 0c56d5a..cad69f8 100644 --- a/skills/xapi-provider/reference/lifecycle-management.md +++ b/skills/xapi-provider/reference/lifecycle-management.md @@ -320,11 +320,12 @@ DEFAULT_MAJOR_HAS_LIVE_MAJORS` with `liveMajors`; switch the default to one of them first, then deprecate. Calls that pin a deprecated major with `X-Xapi-Version` get `410 MajorVersionDelisted`. -To delist a single endpoint without touching the major, set `hidden: true` on it -in a working revision and publish. The change skips the upstream review test and -the gateway answers `410 EndpointDelisted`; publishing `hidden: false` restores -it. TIME_RENTAL groups may delist CREATE only; a delisted TERMINATE or STATUS -endpoint blocks submission with `RENTAL_LIFECYCLE_DELISTED`. +To delist a single endpoint without touching the major, set `delisted: true` on +it (`x-xapi-delisted: true` in OpenAPI) in a working revision and publish. The +change skips the upstream review test and the gateway answers +`410 EndpointDelisted`; publishing `delisted: false` restores it. TIME_RENTAL +groups may delist CREATE only; a delisted TERMINATE or STATUS endpoint blocks +submission with `RENTAL_LIFECYCLE_DELISTED`. Read `versions` after an ambiguous write. Delete only when the user intends to remove the service and has identified it by name or ID: diff --git a/skills/xapi-provider/reference/validation-checklist.md b/skills/xapi-provider/reference/validation-checklist.md index 20a30c5..db207c4 100644 --- a/skills/xapi-provider/reference/validation-checklist.md +++ b/skills/xapi-provider/reference/validation-checklist.md @@ -78,9 +78,9 @@ Every imported operation needs an explicit price or billing configuration. For missing `PER_CALL` prices (including operations with no billing extension), choose the price with the user and pass `--default-price `, or add `x-xapi-billing.costPerCall` to the spec. `--default-price 0` explicitly chooses -free access. The default fills only missing per-call prices, including hidden +free access. The default fills only missing per-call prices, including delisted operations; it preserves explicit prices, including zero, and never changes a -billing type. Delisted (`hidden`) operations are not callable (the gateway +billing type. Delisted (`x-xapi-delisted: true`) operations are not callable (the gateway returns 410) but still need pricing, because they can be restored. `PER_RESOURCE` needs `costPerResource`, `PER_TOKEN` needs non-empty `tokenPricing` with a rate for each listed model, and `DYNAMIC` needs diff --git a/skills/xapi/guides/blockpi.md b/skills/xapi/guides/blockpi.md index eeac953..41446bf 100644 --- a/skills/xapi/guides/blockpi.md +++ b/skills/xapi/guides/blockpi.md @@ -135,7 +135,7 @@ or on-chain confirmation. Use a deliberately invalid, format-complete fixture for a forwarding check; do not construct a valid signed transaction to obtain 2xx. The maintained public Aptos contract has 27 operations. Raw table -`POST /v1/tables/{handle}/raw_item` is delisted (`x-xapi-hidden: true`) pending +`POST /v1/tables/{handle}/raw_item` is delisted (`x-xapi-delisted: true`) pending upstream compatibility: it is not listed or exported and the gateway returns 410 for it. Do not advertise it as supported. Its binary response type `application/x-bcs` is different from the signed-transaction **request** media type above. diff --git a/src/commands/provider-onboarding.ts b/src/commands/provider-onboarding.ts index 47de74a..aa7512c 100644 --- a/src/commands/provider-onboarding.ts +++ b/src/commands/provider-onboarding.ts @@ -33,7 +33,7 @@ COMMON FLAGS configuration and credential files remain JSON. Swagger 2.0 conversion and OpenAPI validation happen on the server. Missing prices require an explicit choice; --default-price affects only unpriced PER_CALL operations, including -hidden ones, and preserves existing prices and other billing types. +delisted ones, and preserves existing prices and other billing types. Merge updates to existing endpoints require their IDs. Use --mode replace to replace the endpoint list, or --allow-new-endpoints to intentionally add. Creation with endpoints starts in SANDBOX; empty services start in DRAFT. diff --git a/src/tests/provider-onboarding.test.ts b/src/tests/provider-onboarding.test.ts index c0d2d69..ce212cd 100644 --- a/src/tests/provider-onboarding.test.ts +++ b/src/tests/provider-onboarding.test.ts @@ -138,13 +138,13 @@ paths: expect(calls[1].body.openApiSpec).toEqual(swagger); }); - it('requires explicit missing-price choices and preserves authored billing, including hidden operations', async () => { + it('requires explicit missing-price choices and preserves authored billing, including delisted operations', async () => { respond = () => json({ success: true, apiService: { id: 'svc', activeVersionId: 'rev' } }); const spec = { openapi: '3.0.3', paths: { '/missing': { get: { summary: 'Missing' } }, '/typed': { post: { 'x-xapi-billing': { type: 'PER_CALL' } } }, '/empty-type': { GET: { 'x-xapi-billing': { type: '' } } }, - '/hidden': { get: { 'x-xapi-hidden': true } }, + '/delisted': { get: { 'x-xapi-delisted': true } }, '/priced': { get: { 'x-xapi-billing': { costPerCall: 0.25 } } }, '/free': { get: { 'x-xapi-billing': { type: 'PER_CALL', costPerCall: 0 } } }, '/resource': { get: { 'x-xapi-billing': { type: 'PER_RESOURCE', costPerResource: 0.03 } } }, @@ -157,10 +157,10 @@ paths: for (const price of ['0', '0.002']) { await provider(['import'], { file: path, 'default-price': price }); const paths = calls.at(-1)!.body.openApiSpec.paths; - for (const [route, method] of [['/missing', 'get'], ['/typed', 'post'], ['/hidden', 'get'], ['/empty-type', 'GET']]) { + for (const [route, method] of [['/missing', 'get'], ['/typed', 'post'], ['/delisted', 'get'], ['/empty-type', 'GET']]) { expect(paths[route!][method!]['x-xapi-billing'].costPerCall).toBe(Number(price)); } - expect(paths['/hidden'].get['x-xapi-hidden']).toBe(true); + expect(paths['/delisted'].get['x-xapi-delisted']).toBe(true); for (const route of ['/priced', '/free', '/resource', '/token']) { expect(paths[route]).toEqual(spec.paths[route as keyof typeof spec.paths]); } From 137c3e665bd3998b36206e2089c60b76add3d7a0 Mon Sep 17 00:00:00 2001 From: daxiongya Date: Tue, 24 Nov 2026 15:48:10 +0800 Subject: [PATCH 4/9] fix(provider): show the backend rename notice for legacy delist fields Old field names `hidden` / `x-xapi-hidden` are rejected with a fixed rename notice. Provider commands hid every 400 body, so agents only saw a generic error; pass that notice through (other 400 bodies stay hidden). Add a merge-patch delist example to the skill. Co-Authored-By: Claude Opus 5.5 --- skills/xapi-provider/SKILL.md | 8 ++++++++ src/commands/provider-onboarding.ts | 3 ++- src/commands/provider.ts | 4 ++-- src/provider-client.ts | 13 +++++++++++++ src/tests/provider.test.ts | 13 +++++++++++++ 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/skills/xapi-provider/SKILL.md b/skills/xapi-provider/SKILL.md index bbbe652..e26a54c 100644 --- a/skills/xapi-provider/SKILL.md +++ b/skills/xapi-provider/SKILL.md @@ -121,6 +121,14 @@ the endpoint leaves docs, Marketplace and Tools. Set it back to `false` and publish to restore it; delete the endpoint instead only to remove it for good. For TIME_RENTAL, delist only the CREATE endpoint: submission rejects a delisted TERMINATE or STATUS endpoint because open rentals could no longer be stopped. +With merge mode, the patch carries only the endpoint ID from the working +revision (`currentVersion.endpoints` after `provider get`): + +```bash +echo '{"endpoints":[{"id":"ENDPOINT_ID","delisted":true}]}' > delist.json +npx xapi-to provider update --revision --file delist.json +``` + The old names `hidden` / `x-xapi-hidden` are rejected with HTTP 400; use `delisted` / `x-xapi-delisted`. diff --git a/src/commands/provider-onboarding.ts b/src/commands/provider-onboarding.ts index aa7512c..ef18b93 100644 --- a/src/commands/provider-onboarding.ts +++ b/src/commands/provider-onboarding.ts @@ -4,7 +4,7 @@ import { getConfig, requireApiKey } from '../config.ts'; import { HttpError, isRetryableRequestError } from '../client.ts'; import { output, err, type OutputFormat } from '../format.ts'; import { waitForPoll } from '../poll-wait.ts'; -import { providerRequest, object, redactProvider, collectProviderSecrets, type ProviderObject } from '../provider-client.ts'; +import { providerRequest, object, redactProvider, collectProviderSecrets, legacyFieldNotice, type ProviderObject } from '../provider-client.ts'; export const PROVIDER_ONBOARDING_HELP = `xapi-to provider - Import and publish your API services @@ -289,6 +289,7 @@ export async function providerOnboarding(args: string[], flags: Record) { // Provider error bodies can echo submitted configuration or credentials. // Preserve local errors, but never print an HTTP response body verbatim. const message = error instanceof HttpError - ? defaultMajorConflict(error) ?? `HTTP ${error.status}` + ? defaultMajorConflict(error) ?? legacyFieldNotice(error) ?? `HTTP ${error.status}` : String(redactProvider(error instanceof Error ? error.message : 'Unknown error', [apiKey])); err('provider request failed', message); } diff --git a/src/provider-client.ts b/src/provider-client.ts index 4133a8d..8db9a61 100644 --- a/src/provider-client.ts +++ b/src/provider-client.ts @@ -78,3 +78,16 @@ export function redactProvider(value: unknown, knownSecrets: string[] = []): unk } return visit(value); } + +// The backend rejects the old endpoint field names (`hidden`, `x-xapi-hidden`) with a fixed +// rename notice. It names only the field and the spec location, never request values, so it is +// safe to print; every other 400 body stays hidden because it may echo submitted configuration. +const LEGACY_FIELD_NOTICE = /no longer supported: it was renamed to `(x-xapi-)?delisted`/; + +export function legacyFieldNotice(error: { status: number; responseBody?: unknown }): string | undefined { + if (error.status !== 400) return undefined; + const body = error.responseBody as { message?: unknown } | undefined; + const messages = Array.isArray(body?.message) ? body.message : [body?.message]; + const notice = messages.find((m): m is string => typeof m === 'string' && LEGACY_FIELD_NOTICE.test(m)); + return notice ? `HTTP 400: ${notice}` : undefined; +} diff --git a/src/tests/provider.test.ts b/src/tests/provider.test.ts index 7e738c7..e1b4c91 100644 --- a/src/tests/provider.test.ts +++ b/src/tests/provider.test.ts @@ -246,6 +246,19 @@ describe('provider command', () => { expect(errSpy).toHaveBeenLastCalledWith('provider request failed', 'HTTP 409'); }); + it('shows the backend rename notice for legacy delist field names only', async () => { + const notice = 'Field `hidden` is no longer supported: it was renamed to `delisted` (delisted = not listed, the gateway returns 410; set false to restore). Send `delisted` instead.'; + requestSpy.mockRejectedValueOnce(new client.HttpError(400, 'bad', undefined, { + statusCode: 400, error: 'Bad Request', message: ['endpoints.0.' + notice, 'name should not be empty'], + })); + await expect(provider(['deprecate', 'service-1', '2'], {})).rejects.toThrow('err called'); + expect(errSpy).toHaveBeenLastCalledWith('provider request failed', `HTTP 400: endpoints.0.${notice}`); + + requestSpy.mockRejectedValueOnce(new client.HttpError(400, 'bad', undefined, { message: ['secret-value is invalid'] })); + await expect(provider(['deprecate', 'service-1', '2'], {})).rejects.toThrow('err called'); + expect(errSpy).toHaveBeenLastCalledWith('provider request failed', 'HTTP 400'); + }); + it('links a primary skill using service:update', async () => { await provider(['skill', 'link', 'service-1', 'skill-1'], {}); From ebc34e90cdae16b55dcaf8f9134451bbad48e39f Mon Sep 17 00:00:00 2001 From: daxiongya Date: Tue, 24 Nov 2026 15:58:38 +0800 Subject: [PATCH 5/9] docs(provider): sandbox endpoints cannot be delisted individually Co-Authored-By: Claude Opus 5.5 --- skills/xapi-provider/SKILL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/skills/xapi-provider/SKILL.md b/skills/xapi-provider/SKILL.md index e26a54c..69138e6 100644 --- a/skills/xapi-provider/SKILL.md +++ b/skills/xapi-provider/SKILL.md @@ -121,6 +121,8 @@ the endpoint leaves docs, Marketplace and Tools. Set it back to `false` and publish to restore it; delete the endpoint instead only to remove it for good. For TIME_RENTAL, delist only the CREATE endpoint: submission rejects a delisted TERMINATE or STATUS endpoint because open rentals could no longer be stopped. +SANDBOX endpoints cannot be delisted one by one (submission returns +`SANDBOX_ENDPOINT_DELISTED`); deprecate the major to stop a sandbox service. With merge mode, the patch carries only the endpoint ID from the working revision (`currentVersion.endpoints` after `provider get`): From 9c88fcb7e125ccc12c5dbe5a7f19632755586a3d Mon Sep 17 00:00:00 2001 From: daxiongya Date: Tue, 24 Nov 2026 16:12:48 +0800 Subject: [PATCH 6/9] docs(provider): stop a sandbox size via offerings, not delisting Co-Authored-By: Claude Opus 5.5 --- skills/xapi-provider/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/xapi-provider/SKILL.md b/skills/xapi-provider/SKILL.md index 69138e6..7c35657 100644 --- a/skills/xapi-provider/SKILL.md +++ b/skills/xapi-provider/SKILL.md @@ -122,7 +122,7 @@ publish to restore it; delete the endpoint instead only to remove it for good. For TIME_RENTAL, delist only the CREATE endpoint: submission rejects a delisted TERMINATE or STATUS endpoint because open rentals could no longer be stopped. SANDBOX endpoints cannot be delisted one by one (submission returns -`SANDBOX_ENDPOINT_DELISTED`); deprecate the major to stop a sandbox service. +`SANDBOX_ENDPOINT_DELISTED`); remove a size from `sandboxConfig.offerings` instead. With merge mode, the patch carries only the endpoint ID from the working revision (`currentVersion.endpoints` after `provider get`): From e6dc1b022aa38445cca36fbd1fd032ff0edbba0f Mon Sep 17 00:00:00 2001 From: daxiongya Date: Tue, 24 Nov 2026 19:09:19 +0800 Subject: [PATCH 7/9] fix(provider): avoid a double period after the rename notice Co-Authored-By: Claude Opus 5.5 --- src/commands/provider-onboarding.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/provider-onboarding.ts b/src/commands/provider-onboarding.ts index ef18b93..32169f5 100644 --- a/src/commands/provider-onboarding.ts +++ b/src/commands/provider-onboarding.ts @@ -290,7 +290,7 @@ export async function providerOnboarding(args: string[], flags: Record Date: Tue, 24 Nov 2026 19:38:49 +0800 Subject: [PATCH 8/9] docs(provider): x-xapi-delisted applies only to endpoints an import creates Co-Authored-By: Claude Opus 5.5 --- skills/xapi-provider/SKILL.md | 11 +++++++---- .../xapi-provider/reference/lifecycle-management.md | 7 ++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/skills/xapi-provider/SKILL.md b/skills/xapi-provider/SKILL.md index 7c35657..0287f99 100644 --- a/skills/xapi-provider/SKILL.md +++ b/skills/xapi-provider/SKILL.md @@ -114,10 +114,13 @@ npx xapi-to provider revision start npx xapi-to provider major create ``` -To delist one endpoint, set `delisted: true` on it in a working revision -(`x-xapi-delisted: true` in OpenAPI) and publish. A delist-only change does not -trigger the upstream review test. Callers then get `410 EndpointDelisted`, and -the endpoint leaves docs, Marketplace and Tools. Set it back to `false` and +To delist one endpoint, set `delisted: true` on it in a working revision and +publish. `x-xapi-delisted: true` in OpenAPI only applies to endpoints an import +creates; re-importing keeps an existing endpoint's state, so use the patch below. +If delisting is the revision's only change, it skips the upstream review test; +other pending edits in the same working revision are still reviewed. Callers +then get `410 EndpointDelisted` (host calls and Actions), and the endpoint +leaves docs, Marketplace and Tools. Set it back to `false` and publish to restore it; delete the endpoint instead only to remove it for good. For TIME_RENTAL, delist only the CREATE endpoint: submission rejects a delisted TERMINATE or STATUS endpoint because open rentals could no longer be stopped. diff --git a/skills/xapi-provider/reference/lifecycle-management.md b/skills/xapi-provider/reference/lifecycle-management.md index cad69f8..ddbbc91 100644 --- a/skills/xapi-provider/reference/lifecycle-management.md +++ b/skills/xapi-provider/reference/lifecycle-management.md @@ -321,9 +321,10 @@ them first, then deprecate. Calls that pin a deprecated major with `X-Xapi-Version` get `410 MajorVersionDelisted`. To delist a single endpoint without touching the major, set `delisted: true` on -it (`x-xapi-delisted: true` in OpenAPI) in a working revision and publish. The -change skips the upstream review test and the gateway answers -`410 EndpointDelisted`; publishing `delisted: false` restores it. TIME_RENTAL +it in a working revision and publish (`x-xapi-delisted: true` in OpenAPI only +applies to endpoints an import creates). A delist-only revision skips the +upstream review test, and callers get `410 EndpointDelisted`; publishing +`delisted: false` restores it. TIME_RENTAL groups may delist CREATE only; a delisted TERMINATE or STATUS endpoint blocks submission with `RENTAL_LIFECYCLE_DELISTED`. From 4af06d7204a6eee64ff7539489bd7ecfd5d8b920 Mon Sep 17 00:00:00 2001 From: daxiongya Date: Fri, 27 Nov 2026 23:42:46 +0800 Subject: [PATCH 9/9] fix(skill): clarify provider delisting and path validation Kanby-Task: KANBY-140 Co-Authored-By: Claude Code --- skills/xapi-provider/reference/lifecycle-management.md | 9 +++++++-- skills/xapi-provider/reference/validation-checklist.md | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/skills/xapi-provider/reference/lifecycle-management.md b/skills/xapi-provider/reference/lifecycle-management.md index ddbbc91..b9a4712 100644 --- a/skills/xapi-provider/reference/lifecycle-management.md +++ b/skills/xapi-provider/reference/lifecycle-management.md @@ -325,8 +325,13 @@ it in a working revision and publish (`x-xapi-delisted: true` in OpenAPI only applies to endpoints an import creates). A delist-only revision skips the upstream review test, and callers get `410 EndpointDelisted`; publishing `delisted: false` restores it. TIME_RENTAL -groups may delist CREATE only; a delisted TERMINATE or STATUS endpoint blocks -submission with `RENTAL_LIFECYCLE_DELISTED`. +groups may delist CREATE only. A revision with a delisted TERMINATE or STATUS +endpoint fails submission readiness with `RENTAL_LIFECYCLE_DELISTED`. If a revision +already in review has this configuration, it cannot take traffic. Automatic +review returns it for edits. A manual approval is rejected and the reviewer can +send it back. Restore the affected routes in the editable revision and submit +again. A rollback that would activate that revision also returns +`400 RENTAL_LIFECYCLE_DELISTED`. Read `versions` after an ambiguous write. Delete only when the user intends to remove the service and has identified it by name or ID: diff --git a/skills/xapi-provider/reference/validation-checklist.md b/skills/xapi-provider/reference/validation-checklist.md index db207c4..5d70185 100644 --- a/skills/xapi-provider/reference/validation-checklist.md +++ b/skills/xapi-provider/reference/validation-checklist.md @@ -38,7 +38,10 @@ before `provider version update --replace`, and again before publication. `id` does not always mean new. Preserve the stored `endpointKey` across revisions and use the working ID when changing a path; inspect the diff for unintended additions or removals. -- Path parameters use `:name` and have matching `pathParams` descriptions. +- Use `:name` at the end of a path segment, or `{name}` before a literal + suffix (for example, `/files/{id}.json`). In OpenAPI, use `{name}`. Add a + matching `pathParams` description and use each parameter name once when + creating an endpoint or changing its path. - Billing fields match the chosen `billingType`; pre-charge estimates are realistic. No price is negative. - A `PER_TOKEN` HTTP endpoint keeps usage readable: its protocol supplies usage