diff --git a/runtime/binding-mcp-schema-registry/src/main/resources/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/schema/karapace-schema-registry.openapi.json b/runtime/binding-mcp-schema-registry/src/main/resources/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/schema/karapace-schema-registry.openapi.json index 88aac06273..bc58e092e0 100644 --- a/runtime/binding-mcp-schema-registry/src/main/resources/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/schema/karapace-schema-registry.openapi.json +++ b/runtime/binding-mcp-schema-registry/src/main/resources/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/schema/karapace-schema-registry.openapi.json @@ -1 +1 @@ -{"openapi":"3.0.1","info":{"title":"Schema Registry API","version":"1.0"},"servers":[{"url":"http://localhost:8080"}],"paths":{"/subjects":{"get":{"operationId":"list_subjects","description":"List all registered subjects in the schema registry.","summary":"List subjects","responses":{"200":{"description":"ok"}}}},"/subjects/{subject}/versions":{"get":{"operationId":"describe_subject","description":"List the schema version numbers registered for a subject.","summary":"List versions for a subject","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}},"post":{"operationId":"register_schema","description":"Register a new schema version under a subject.","summary":"Registered schema with id ${result.id}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string"},"schemaType":{"type":"string"}}}}}},"responses":{"200":{"description":"ok"}}}},"/subjects/{subject}/versions/{version}":{"get":{"operationId":"get_schema","description":"Retrieve a specific registered schema version for a subject.","summary":"Retrieved schema id ${result.id}, version ${result.version}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}},"delete":{"operationId":"delete_schema_version","description":"Delete a specific registered schema version for a subject.","summary":"Delete a specific schema version","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/subjects/{subject}":{"delete":{"operationId":"delete_subject","description":"Delete a subject and all its registered schema versions.","summary":"Delete a subject and all its versions","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/compatibility/subjects/{subject}/versions/{version}":{"post":{"operationId":"check_compatibility","description":"Check whether a given schema is compatible with the existing versions registered for a subject.","summary":"Compatibility check result: ${result.is_compatible}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string"},"schemaType":{"type":"string"}}}}}},"responses":{"200":{"description":"ok"}}}},"/config/{subject}":{"get":{"operationId":"get_compatibility","description":"Get the compatibility level configured for a subject.","summary":"Compatibility level is ${result.compatibilityLevel}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}},"put":{"operationId":"set_compatibility","description":"Set the compatibility level for a subject.","summary":"Compatibility level set to ${result.compatibility}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"compatibility":{"type":"string"}}}}}},"responses":{"200":{"description":"ok"}}}}}} \ No newline at end of file +{"openapi":"3.0.1","info":{"title":"Schema Registry API","version":"1.0"},"servers":[{"url":"http://localhost:8080"}],"paths":{"/subjects":{"get":{"operationId":"list_subjects","description":"List all registered subjects in the schema registry.","summary":"List subjects","responses":{"200":{"description":"ok"}}}},"/subjects/{subject}/versions":{"get":{"operationId":"describe_subject","description":"List the schema version numbers registered for a subject.","summary":"List versions for a subject","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}},"post":{"operationId":"register_schema","description":"Register a new schema version under a subject.","summary":"Registered schema with id ${result.id}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string"},"schemaType":{"type":"string"}}}}}},"responses":{"200":{"description":"ok"}}}},"/subjects/{subject}/versions/{version}":{"get":{"operationId":"get_schema","description":"Retrieve a specific registered schema version for a subject.","summary":"Retrieved schema id ${result.id}, version ${result.version}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}},"delete":{"operationId":"delete_schema_version","description":"Delete a specific registered schema version for a subject.","summary":"Delete a specific schema version","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"permanent","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"ok"}}}},"/subjects/{subject}":{"delete":{"operationId":"delete_subject","description":"Delete a subject and all its registered schema versions.","summary":"Delete a subject and all its versions","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}},{"name":"permanent","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"ok"}}}},"/compatibility/subjects/{subject}/versions/{version}":{"post":{"operationId":"check_compatibility","description":"Check whether a given schema is compatible with the existing versions registered for a subject.","summary":"Compatibility check result: ${result.is_compatible}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string"},"schemaType":{"type":"string"}}}}}},"responses":{"200":{"description":"ok"}}}},"/config/{subject}":{"get":{"operationId":"get_compatibility","description":"Get the compatibility level configured for a subject.","summary":"Compatibility level is ${result.compatibilityLevel}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}},"put":{"operationId":"set_compatibility","description":"Set the compatibility level for a subject.","summary":"Compatibility level set to ${result.compatibility}","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"compatibility":{"type":"string"}}}}}},"responses":{"200":{"description":"ok"}}}}}} \ No newline at end of file diff --git a/runtime/binding-mcp-schema-registry/src/test/java/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/stream/McpSchemaRegistryClientIT.java b/runtime/binding-mcp-schema-registry/src/test/java/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/stream/McpSchemaRegistryClientIT.java index b796939f27..22a2a62062 100644 --- a/runtime/binding-mcp-schema-registry/src/test/java/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/stream/McpSchemaRegistryClientIT.java +++ b/runtime/binding-mcp-schema-registry/src/test/java/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/stream/McpSchemaRegistryClientIT.java @@ -127,6 +127,26 @@ public void shouldCallToolDeleteSchemaVersion() throws Exception k3po.finish(); } + @Test + @Configuration("proxy.yaml") + @Specification({ + "${mcp}/delete.subject.permanent/client", + "${http}/delete.subject.permanent/server"}) + public void shouldCallToolDeleteSubjectPermanent() throws Exception + { + k3po.finish(); + } + + @Test + @Configuration("proxy.yaml") + @Specification({ + "${mcp}/delete.schema.version.permanent/client", + "${http}/delete.schema.version.permanent/server"}) + public void shouldCallToolDeleteSchemaVersionPermanent() throws Exception + { + k3po.finish(); + } + @Test @Configuration("proxy.yaml") @Specification({ diff --git a/runtime/binding-mcp-schema-registry/src/test/java/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/stream/McpSchemaRegistryProxyIT.java b/runtime/binding-mcp-schema-registry/src/test/java/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/stream/McpSchemaRegistryProxyIT.java index a1d2e86647..fac5bb7fd8 100644 --- a/runtime/binding-mcp-schema-registry/src/test/java/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/stream/McpSchemaRegistryProxyIT.java +++ b/runtime/binding-mcp-schema-registry/src/test/java/io/aklivity/zilla/runtime/binding/mcp/schema/registry/internal/stream/McpSchemaRegistryProxyIT.java @@ -125,6 +125,26 @@ public void shouldCallToolDeleteSchemaVersion() throws Exception k3po.finish(); } + @Test + @Configuration("proxy.kind.yaml") + @Specification({ + "${mcp}/delete.subject.permanent/client", + "${http}/delete.subject.permanent/server"}) + public void shouldCallToolDeleteSubjectPermanent() throws Exception + { + k3po.finish(); + } + + @Test + @Configuration("proxy.kind.yaml") + @Specification({ + "${mcp}/delete.schema.version.permanent/client", + "${http}/delete.schema.version.permanent/server"}) + public void shouldCallToolDeleteSchemaVersionPermanent() throws Exception + { + k3po.finish(); + } + @Test @Configuration("proxy.kind.yaml") @Specification({ diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.schema.version.permanent/client.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.schema.version.permanent/client.rpt new file mode 100644 index 0000000000..1482797ecc --- /dev/null +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.schema.version.permanent/client.rpt @@ -0,0 +1,39 @@ +# +# Copyright 2021-2026 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/http0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${http:beginEx() + .typeId(zilla:id("http")) + .header(":method", "DELETE") + .header(":scheme", "http") + .header(":authority", "localhost:8080") + .header(":path", "/subjects/orders-value/versions/1?permanent=true") + .build()} + +connected + +read zilla:begin.ext ${http:matchBeginEx() + .typeId(zilla:id("http")) + .header(":status", "200") + .header("content-type", "application/json") + .build()} + +read '1' +read closed + +write close diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.schema.version.permanent/server.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.schema.version.permanent/server.rpt new file mode 100644 index 0000000000..efbccb2603 --- /dev/null +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.schema.version.permanent/server.rpt @@ -0,0 +1,46 @@ +# +# Copyright 2021-2026 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +property serverAddress "zilla://streams/http0" + +accept ${serverAddress} + option zilla:window 8192 + option zilla:transmission "half-duplex" + +accepted + +read zilla:begin.ext ${http:matchBeginEx() + .typeId(zilla:id("http")) + .header(":method", "DELETE") + .header(":scheme", "http") + .header(":authority", "localhost:8080") + .header(":path", "/subjects/orders-value/versions/1?permanent=true") + .build()} + +connected + +write zilla:begin.ext ${http:beginEx() + .typeId(zilla:id("http")) + .header(":status", "200") + .header("content-type", "application/json") + .build()} +write flush + +write '1' +write flush + +write close + +read closed diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.subject.permanent/client.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.subject.permanent/client.rpt new file mode 100644 index 0000000000..25eb22ebea --- /dev/null +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.subject.permanent/client.rpt @@ -0,0 +1,39 @@ +# +# Copyright 2021-2026 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/http0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${http:beginEx() + .typeId(zilla:id("http")) + .header(":method", "DELETE") + .header(":scheme", "http") + .header(":authority", "localhost:8080") + .header(":path", "/subjects/orders-value?permanent=true") + .build()} + +connected + +read zilla:begin.ext ${http:matchBeginEx() + .typeId(zilla:id("http")) + .header(":status", "200") + .header("content-type", "application/json") + .build()} + +read '[1,2]' +read closed + +write close diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.subject.permanent/server.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.subject.permanent/server.rpt new file mode 100644 index 0000000000..4c1c8cf370 --- /dev/null +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/http/delete.subject.permanent/server.rpt @@ -0,0 +1,46 @@ +# +# Copyright 2021-2026 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +property serverAddress "zilla://streams/http0" + +accept ${serverAddress} + option zilla:window 8192 + option zilla:transmission "half-duplex" + +accepted + +read zilla:begin.ext ${http:matchBeginEx() + .typeId(zilla:id("http")) + .header(":method", "DELETE") + .header(":scheme", "http") + .header(":authority", "localhost:8080") + .header(":path", "/subjects/orders-value?permanent=true") + .build()} + +connected + +write zilla:begin.ext ${http:beginEx() + .typeId(zilla:id("http")) + .header(":status", "200") + .header("content-type", "application/json") + .build()} +write flush + +write '[1,2]' +write flush + +write close + +read closed diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.schema.version.permanent/client.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.schema.version.permanent/client.rpt new file mode 100644 index 0000000000..96d4ed083b --- /dev/null +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.schema.version.permanent/client.rpt @@ -0,0 +1,58 @@ +# +# Copyright 2021-2026 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${mcp:beginEx() + .typeId(zilla:id("mcp")) + .lifecycle() + .build() + .build()} + +connected + +read zilla:begin.ext ${mcp:matchBeginEx() + .typeId(zilla:id("mcp")) + .lifecycle() + .sessionId("5ca1ab1e-c0de-4a11-5e55-000100000000") + .build() + .build()} + +read notify LIFECYCLE_INITIALIZED + +connect await LIFECYCLE_INITIALIZED + "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${mcp:beginEx() + .typeId(zilla:id("mcp")) + .toolsCall() + .sessionId("5ca1ab1e-c0de-4a11-5e55-000100000000") + .name("delete_schema_version") + .contentLength(102) + .build() + .build()} + +connected + +write '{"name":"delete_schema_version","arguments":{"subject":"orders-value","version":"1","permanent":true}}' + +read '{"structuredContent":{"result":1},"content":[{"type":"text","text":"Delete a specific schema version"}],"isError":false}' +read closed + +write close diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.schema.version.permanent/server.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.schema.version.permanent/server.rpt new file mode 100644 index 0000000000..76b979e4e4 --- /dev/null +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.schema.version.permanent/server.rpt @@ -0,0 +1,62 @@ +# +# Copyright 2021-2026 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +property serverAddress "zilla://streams/app0" + +accept ${serverAddress} + option zilla:window 8192 + option zilla:transmission "half-duplex" + +accepted + +read zilla:begin.ext ${mcp:matchBeginEx() + .typeId(zilla:id("mcp")) + .lifecycle() + .build() + .build()} + +connected + +write zilla:begin.ext ${mcp:beginEx() + .typeId(zilla:id("mcp")) + .lifecycle() + .sessionId("5ca1ab1e-c0de-4a11-5e55-000100000000") + .build() + .build()} +write flush + +accepted + +read zilla:begin.ext ${mcp:matchBeginEx() + .typeId(zilla:id("mcp")) + .toolsCall() + .sessionId("5ca1ab1e-c0de-4a11-5e55-000100000000") + .name("delete_schema_version") + .contentLength(102) + .build() + .build()} + +connected + +read '{"name":"delete_schema_version","arguments":{"subject":"orders-value","version":"1","permanent":true}}' + +write flush + +write '{"structuredContent":{"result":1},"content":[{"type":"text","text":"Delete a specific schema version"}],"isError":false}' +write flush + +write close + +read closed diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.subject.permanent/client.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.subject.permanent/client.rpt new file mode 100644 index 0000000000..434a84bd7e --- /dev/null +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.subject.permanent/client.rpt @@ -0,0 +1,58 @@ +# +# Copyright 2021-2026 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +connect "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${mcp:beginEx() + .typeId(zilla:id("mcp")) + .lifecycle() + .build() + .build()} + +connected + +read zilla:begin.ext ${mcp:matchBeginEx() + .typeId(zilla:id("mcp")) + .lifecycle() + .sessionId("5ca1ab1e-c0de-4a11-5e55-000100000000") + .build() + .build()} + +read notify LIFECYCLE_INITIALIZED + +connect await LIFECYCLE_INITIALIZED + "zilla://streams/app0" + option zilla:window 8192 + option zilla:transmission "half-duplex" + +write zilla:begin.ext ${mcp:beginEx() + .typeId(zilla:id("mcp")) + .toolsCall() + .sessionId("5ca1ab1e-c0de-4a11-5e55-000100000000") + .name("delete_subject") + .contentLength(81) + .build() + .build()} + +connected + +write '{"name":"delete_subject","arguments":{"subject":"orders-value","permanent":true}}' + +read '{"structuredContent":{"result":[1,2]},"content":[{"type":"text","text":"Delete a subject and all its versions"}],"isError":false}' +read closed + +write close diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.subject.permanent/server.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.subject.permanent/server.rpt new file mode 100644 index 0000000000..ebcaf0f7f9 --- /dev/null +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/delete.subject.permanent/server.rpt @@ -0,0 +1,62 @@ +# +# Copyright 2021-2026 Aklivity Inc +# +# Licensed under the Aklivity Community License (the "License"); you may not use +# this file except in compliance with the License. You may obtain a copy of the +# License at +# +# https://www.aklivity.io/aklivity-community-license/ +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +property serverAddress "zilla://streams/app0" + +accept ${serverAddress} + option zilla:window 8192 + option zilla:transmission "half-duplex" + +accepted + +read zilla:begin.ext ${mcp:matchBeginEx() + .typeId(zilla:id("mcp")) + .lifecycle() + .build() + .build()} + +connected + +write zilla:begin.ext ${mcp:beginEx() + .typeId(zilla:id("mcp")) + .lifecycle() + .sessionId("5ca1ab1e-c0de-4a11-5e55-000100000000") + .build() + .build()} +write flush + +accepted + +read zilla:begin.ext ${mcp:matchBeginEx() + .typeId(zilla:id("mcp")) + .toolsCall() + .sessionId("5ca1ab1e-c0de-4a11-5e55-000100000000") + .name("delete_subject") + .contentLength(81) + .build() + .build()} + +connected + +read '{"name":"delete_subject","arguments":{"subject":"orders-value","permanent":true}}' + +write flush + +write '{"structuredContent":{"result":[1,2]},"content":[{"type":"text","text":"Delete a subject and all its versions"}],"isError":false}' +write flush + +write close + +read closed diff --git a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/tools.list/client.rpt b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/tools.list/client.rpt index 54ab8e9b8d..b67647cefd 100644 --- a/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/tools.list/client.rpt +++ b/specs/binding-mcp-schema-registry.spec/src/main/scripts/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/mcp/tools.list/client.rpt @@ -70,11 +70,12 @@ read '{"tools":[{"name":"list_subjects","title":"List Subjects","description":" '"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},' '{"name":"delete_subject","title":"Delete Subject","description":"Delete a subject and all its registered schema versions.",' '"inputSchema":{"type":"object",' - '"properties":{"subject":{"type":"string"}},"required":["subject"]},' + '"properties":{"subject":{"type":"string"},"permanent":{"type":"boolean"}},"required":["subject"]},' '"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false}},' '{"name":"delete_schema_version","title":"Delete Schema Version","description":"Delete a specific registered schema version for a subject.",' '"inputSchema":{"type":"object",' - '"properties":{"subject":{"type":"string"},"version":{"type":"string"}},"required":["subject","version"]},' + '"properties":{"subject":{"type":"string"},"version":{"type":"string"},"permanent":{"type":"boolean"}},' + '"required":["subject","version"]},' '"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false}},' '{"name":"check_compatibility","title":"Check Compatibility",' '"description":"Check whether a given schema is compatible with the existing versions registered for a subject.",' diff --git a/specs/binding-mcp-schema-registry.spec/src/test/java/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/HttpClientIT.java b/specs/binding-mcp-schema-registry.spec/src/test/java/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/HttpClientIT.java index 633f38656a..fb522f2069 100644 --- a/specs/binding-mcp-schema-registry.spec/src/test/java/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/HttpClientIT.java +++ b/specs/binding-mcp-schema-registry.spec/src/test/java/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/HttpClientIT.java @@ -96,6 +96,26 @@ public void shouldProxyDeleteSchemaVersionToHttp() throws Exception } + @Test + @Specification({ + "${http}/delete.subject.permanent/client", + "${http}/delete.subject.permanent/server"}) + public void shouldProxyDeleteSubjectPermanentToHttp() throws Exception + { + k3po.finish(); + } + + + @Test + @Specification({ + "${http}/delete.schema.version.permanent/client", + "${http}/delete.schema.version.permanent/server"}) + public void shouldProxyDeleteSchemaVersionPermanentToHttp() throws Exception + { + k3po.finish(); + } + + @Test @Specification({ "${http}/check.compatibility/client", diff --git a/specs/binding-mcp-schema-registry.spec/src/test/java/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/McpServerIT.java b/specs/binding-mcp-schema-registry.spec/src/test/java/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/McpServerIT.java index aeb5679fe9..9b00dd0e02 100644 --- a/specs/binding-mcp-schema-registry.spec/src/test/java/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/McpServerIT.java +++ b/specs/binding-mcp-schema-registry.spec/src/test/java/io/aklivity/zilla/specs/binding/mcp/schema/registry/streams/McpServerIT.java @@ -96,6 +96,26 @@ public void shouldCallToolDeleteSchemaVersion() throws Exception } + @Test + @Specification({ + "${mcp}/delete.subject.permanent/client", + "${mcp}/delete.subject.permanent/server"}) + public void shouldCallToolDeleteSubjectPermanent() throws Exception + { + k3po.finish(); + } + + + @Test + @Specification({ + "${mcp}/delete.schema.version.permanent/client", + "${mcp}/delete.schema.version.permanent/server"}) + public void shouldCallToolDeleteSchemaVersionPermanent() throws Exception + { + k3po.finish(); + } + + @Test @Specification({ "${mcp}/check.compatibility/client",