From 35b62da2c7aa7845910f6debce466c88fa09af65 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Tue, 14 Jul 2026 19:03:33 +0800 Subject: [PATCH] fix: register desktop core capabilities --- AGENTS.md | 10 ++++++++++ schemas/capabilities.json | 10 ++++++++++ src/plugin-api.test.ts | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 3e4c7e3..337c1a2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -41,6 +41,16 @@ verstak-sdk/ ## Capability Registry (известные) ``` +verstak/core/plugin-manager/v1 +verstak/core/capability-registry/v1 +verstak/core/contribution-registry/v1 +verstak/core/permissions/v1 +verstak/core/events/v1 +verstak/core/files/v1 +verstak/core/workbench/v1 +verstak/core/notifications/v1 +verstak/core/vault/v1 +verstak/core/workspace/v1 editor.text editor.text.markdown editor.note.markdown diff --git a/schemas/capabilities.json b/schemas/capabilities.json index fd75fc8..7da9fb6 100644 --- a/schemas/capabilities.json +++ b/schemas/capabilities.json @@ -27,6 +27,16 @@ } }, "capabilities": [ + { "name": "verstak/core/plugin-manager/v1", "description": "Core plugin discovery and lifecycle management", "status": "draft" }, + { "name": "verstak/core/capability-registry/v1", "description": "Core capability registry access", "status": "draft" }, + { "name": "verstak/core/contribution-registry/v1", "description": "Core plugin contribution registry", "status": "draft" }, + { "name": "verstak/core/permissions/v1", "description": "Core plugin permission enforcement", "status": "draft" }, + { "name": "verstak/core/events/v1", "description": "Core plugin event bus", "status": "draft" }, + { "name": "verstak/core/files/v1", "description": "Core vault files API", "status": "draft" }, + { "name": "verstak/core/workbench/v1", "description": "Core Workbench resource routing", "status": "draft" }, + { "name": "verstak/core/notifications/v1", "description": "Core native notification scheduling", "status": "draft" }, + { "name": "verstak/core/vault/v1", "description": "Core vault lifecycle", "status": "draft" }, + { "name": "verstak/core/workspace/v1", "description": "Core case lifecycle", "status": "draft" }, { "name": "editor.text", "description": "Text editing capability (any format)", "status": "draft" }, { "name": "editor.text.markdown", "description": "Markdown text editing", "status": "draft" }, { "name": "editor.note.markdown", "description": "Markdown note editing (extends editor.text.markdown with note metadata)", "status": "draft" }, diff --git a/src/plugin-api.test.ts b/src/plugin-api.test.ts index cca4aa2..de203a7 100644 --- a/src/plugin-api.test.ts +++ b/src/plugin-api.test.ts @@ -140,6 +140,25 @@ describe('VerstakPluginAPI contract', () => { expect(permissionEnum).toContain('notifications.schedule'); }); + test('desktop core capabilities used by bundled plugins are declared', () => { + const capabilities = ((capabilitiesSchema as any).capabilities || []) as Array<{ name: string; status: string }>; + + for (const name of [ + 'verstak/core/plugin-manager/v1', + 'verstak/core/capability-registry/v1', + 'verstak/core/contribution-registry/v1', + 'verstak/core/permissions/v1', + 'verstak/core/events/v1', + 'verstak/core/files/v1', + 'verstak/core/workbench/v1', + 'verstak/core/notifications/v1', + 'verstak/core/vault/v1', + 'verstak/core/workspace/v1', + ]) { + expect(capabilities).toContainEqual(expect.objectContaining({ name, status: 'draft' })); + } + }); + test('file.changed schema documents watcher refresh payload', () => { const fileChanged = (vaultEventsSchema as any).events.find((event: any) => event.name === 'file.changed');