From 99a1e3e07dc77ce2fd2b08ab636ea1f2a0cb8600 Mon Sep 17 00:00:00 2001 From: ReaperOfVeriod Date: Sun, 25 Oct 2026 06:16:30 +0100 Subject: [PATCH] Document plugin secret binding contract --- README.md | 4 ++-- contracts/v1/plugin-secret-binding-request.json | 12 ++++++++++++ fixtures/v1/plugin-secret-binding-request.json | 4 ++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 contracts/v1/plugin-secret-binding-request.json create mode 100644 fixtures/v1/plugin-secret-binding-request.json diff --git a/README.md b/README.md index efbb010..113beb3 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ and `backup-restore-response.json` contracts; test fixtures contain no real database paths or credentials. The authenticated WebAssembly plugin lifecycle uses the manifest, install, -and installed-response contracts. Fixtures contain only synthetic package -metadata and no executable module or secret. +installed-response, and plugin-secret-binding-request contracts. Fixtures +contain only synthetic package metadata and no executable module or secret. Command simulation uses `bot-command-simulate-request.json` and `bot-command-simulate-response.json`. A sample response is the default and diff --git a/contracts/v1/plugin-secret-binding-request.json b/contracts/v1/plugin-secret-binding-request.json new file mode 100644 index 0000000..7d8027e --- /dev/null +++ b/contracts/v1/plugin-secret-binding-request.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://trixie.local/contracts/v1/plugin-secret-binding-request.json", + "title": "Plugin secret binding request", + "type": "object", + "required": ["secret_name", "approved"], + "properties": { + "secret_name": { "type": "string", "pattern": "^[A-Za-z0-9_]{1,100}$" }, + "approved": { "type": "boolean" } + }, + "additionalProperties": false +} diff --git a/fixtures/v1/plugin-secret-binding-request.json b/fixtures/v1/plugin-secret-binding-request.json new file mode 100644 index 0000000..06c358e --- /dev/null +++ b/fixtures/v1/plugin-secret-binding-request.json @@ -0,0 +1,4 @@ +{ + "secret_name": "VTS_API_TOKEN", + "approved": true +}