Skip to content

Align external plugin trigger capability and metadata docs#317

Open
haos666 wants to merge 1 commit into
TabularisDB:mainfrom
haos666:haos666/plugin-manifest-trigger-docs
Open

Align external plugin trigger capability and metadata docs#317
haos666 wants to merge 1 commit into
TabularisDB:mainfrom
haos666:haos666/plugin-manifest-trigger-docs

Conversation

@haos666

@haos666 haos666 commented Jun 10, 2026

Copy link
Copy Markdown

Summary

Follow-up to #316.

This aligns the external plugin manifest schema and plugin guide with the current runtime model:

  • Add capabilities.triggers to plugins/manifest.schema.json
  • Add capabilities.sql_dialect to the manifest schema and document the supported splitter dialect values
  • Document trigger-related external plugin RPCs in PLUGIN_GUIDE.md
  • Update the get_columns example to use the current runtime field names: default_value and is_pk

Notes

This PR intentionally does not implement trigger RPC forwarding or splitter behavior changes for external plugins. Runtime forwarding and Oracle-like block splitting will be handled separately so this schema/docs alignment remains low-risk and reviewable.

Validation

  • python3 -m json.tool plugins/manifest.schema.json
  • pnpm run typecheck
  • pnpm run lint (passes with one existing warning in src/components/settings/LocalizationTab.tsx)

@kilo-code-bot

kilo-code-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Previously Reported Issues

File Line Issue Status
plugins/PLUGIN_GUIDE.md 821 get_triggers result field mismatch (schema vs definition) Fixed
Files Reviewed (2 files)
  • plugins/PLUGIN_GUIDE.md — previous issue resolved; get_triggers now correctly documents definition; get_columns example updated to default_value and is_pk (matching runtime); trigger RPC docs align with backend signatures
  • plugins/manifest.schema.json — schema additions for triggers and sql_dialect are correct and backward-compatible

Reviewed by kimi-k2.6-20260420 · 1,179,130 tokens

Comment thread plugins/PLUGIN_GUIDE.md Outdated
"table_name": "users",
"event": "INSERT OR UPDATE",
"timing": "AFTER",
"schema": "public"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: get_triggers result field mismatch — the runtime TriggerInfo struct uses definition (optional string), not schema.

The backend and frontend models expect { name, table_name, event, timing, definition? }. Plugin authors returning schema here will have the field ignored, and omitting definition is fine when the driver provides it via get_trigger_definition instead.

Suggested change
"schema": "public"
"definition": null

@haos666 haos666 force-pushed the haos666/plugin-manifest-trigger-docs branch from 1de4aad to 06f79a8 Compare June 11, 2026 02:29
@debba

debba commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the follow-up! Since this documents trigger RPCs and a sql_dialect capability that the host doesn't act on yet, I'd prefer to land the runtime forwarding first, so the guide never describes behavior external plugins can't actually use.

Do you plan to open a PR for the trigger RPC forwarding (and the splitter changes)? If that's coming soon, we can simply keep this one open and merge it right after that lands.

Otherwise, I'd suggest extracting the get_columns example fix (default_value / is_pk) into its own PR — that part is already accurate today and can be merged right away — while the trigger/sql_dialect schema and docs changes stay here, sequenced after the runtime implementation.

@haos666

haos666 commented Jun 12, 2026

Copy link
Copy Markdown
Author

Thanks, that sequencing makes sense to me.

I'll keep this PR open for now rather than extracting the get_columns example fix separately. My plan is to follow up with runtime PRs first, then come back to this contract/docs PR once the behavior it documents is available in the host:

  1. External plugin trigger RPC forwarding (get_triggers, get_trigger_definition, create_trigger, drop_trigger)
  2. Oracle/DM splitter behavior for sql_dialect: "oracle" (/ terminator, PL/SQL-style blocks, DM CLASS / JAVA CLASS forms, q-quoting)

That should avoid merging guide/schema text ahead of runtime support, while keeping this PR as the docs/schema alignment companion once the runtime pieces land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants