Skip to content

Migrate existing plugins to capability manifest protocol#375

Merged
hotlong merged 4 commits intomainfrom
copilot/update-existing-plugins
Jan 30, 2026
Merged

Migrate existing plugins to capability manifest protocol#375
hotlong merged 4 commits intomainfrom
copilot/update-existing-plugins

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 30, 2026

Extends existing plugins with capability manifests introduced in #374 for cross-vendor interoperability and automated discovery.

Changes

  • Memory Driver (com.objectstack.driver.memory)

    • Declares partial conformance to com.objectstack.protocol.storage.v1
    • Documents 8 DriverInterface methods with implemented features (CRUD, pagination) vs unimplemented (filters, aggregations, transactions, joins)
  • Hono Server (com.objectstack.server.hono)

    • Full conformance to HTTP + REST API protocols
    • Exposes IHttpServer interface for route registration
    • Defines extension points: middleware and route for plugin composition
  • MSW Plugin (com.objectstack.plugin.msw)

    • Full conformance to mock service + REST API protocols
    • Provides ObjectStackServer testing interface
    • Declares required dependency on ObjectQL engine with protocol constraints

Example

// objectstack.config.ts
const HonoServerPlugin: ObjectStackManifest = {
  id: 'com.objectstack.server.hono',
  type: 'adapter',
  
  capabilities: {
    implements: [
      { protocol: { id: 'com.objectstack.protocol.http.v1', ... }, conformance: 'full' }
    ],
    provides: [
      { id: 'com.objectstack.server.hono.interface.http_server', methods: [...] }
    ],
    extensionPoints: [
      { id: 'com.objectstack.server.hono.extension.middleware', type: 'hook', ... }
    ]
  }
};

Naming Conventions

All IDs follow reverse domain notation:

  • Plugins: com.objectstack.{type}.{name}
  • Protocols: {domain}.protocol.{name}.v{major}
  • Interfaces: {plugin-id}.interface.{name}
  • Extension Points: {plugin-id}.extension.{name}

Backward compatible - manifests are declarative metadata, no runtime changes.

Original prompt

拉取请求: #374
按照最新的插件规范改造目前系统的现有插件


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jan 30, 2026 6:20am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…sion point IDs

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor existing plugins to follow latest plugin specifications Migrate existing plugins to capability manifest protocol Jan 30, 2026
Copilot AI requested a review from hotlong January 30, 2026 06:21
@hotlong hotlong marked this pull request as ready for review January 30, 2026 06:24
Copilot AI review requested due to automatic review settings January 30, 2026 06:24
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR is very large. Consider breaking it into smaller PRs for easier review.

@hotlong hotlong merged commit ebc4251 into main Jan 30, 2026
14 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request successfully extends three existing ObjectStack plugins with capability manifests introduced in PR #374, enabling cross-vendor interoperability and automated discovery within the plugin ecosystem. The changes are purely additive metadata declarations without any runtime modifications.

Changes:

  • Added comprehensive capability manifests to Memory Driver, Hono Server, and MSW plugins
  • Documented protocol implementations, conformance levels, provided interfaces, dependencies, and extension points
  • Updated README files to reference the new capability manifests

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/plugins/driver-memory/objectstack.config.ts Added capability manifest declaring partial conformance to storage protocol v1 with 8 DriverInterface methods documented
packages/plugins/driver-memory/README.md New comprehensive documentation with capability overview and usage examples
packages/plugins/plugin-hono-server/objectstack.config.ts Added capability manifest with full HTTP/REST API protocol conformance and extension points for middleware/routes
packages/plugins/plugin-hono-server/README.md New comprehensive documentation including API endpoints, architecture diagrams, and deployment guides
packages/plugins/plugin-msw/objectstack.config.ts Added capability manifest for mock service protocol with ObjectStackServer interface and dependency declarations
packages/plugins/plugin-msw/README.md Updated to reference capability protocol and link to manifest

type: 'action',
cardinality: 'multiple',
contract: {
input: 'MSWHandler',
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension point contract is missing the 'description' field. According to the ExtensionPointSchema in plugin-capability.zod.ts (line 255-259), the contract object can have 'input', 'output', and 'signature' fields, but only 'input' is provided here. For consistency with the 'route' extension point (lines 219-222), consider also adding either an 'output' field or a 'signature' field to fully document the handler contract.

Suggested change
input: 'MSWHandler',
input: 'MSWHandler',
output: 'void',

Copilot uses AI. Check for mistakes.
cardinality: 'multiple',
contract: {
input: 'MSWHandler',
description: 'MSW HTTP handler definition',
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'description' field is not a valid property of the contract object according to ExtensionPointSchema (packages/spec/src/system/plugin-capability.zod.ts:255-259). The contract object only supports 'input', 'output', and 'signature' fields. Either move this description to the extension point's main description field (line 254) or remove it from the contract object.

Suggested change
description: 'MSW HTTP handler definition',

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants