Skip to content

Add SQL database access to the plugin SDK - #6

Closed
gabek wants to merge 0 commit into
mainfrom
gek/plugin-sql-storage
Closed

Add SQL database access to the plugin SDK#6
gabek wants to merge 0 commit into
mainfrom
gek/plugin-sql-storage

Conversation

@gabek

@gabek gabek commented Jul 30, 2026

Copy link
Copy Markdown
Member

This adds the SDK side of owncast/owncast#5084. Plugins that declare storage.sql get exec, query, and queryRow in both JavaScript and Python, backed by the host's private per-plugin SQLite database.

  • Add the JavaScript and Python wrappers, types, permission constants, and engine host imports.
  • Give owncast-plugin-test and owncast-plugin-serve a matching local SQLite implementation with the same query limits and denied statements as Owncast.
  • Add SQL support to the scenario test mocks.
  • Add paired JavaScript and Python chat-leaderboard examples that use an atomic schema setup, an ON CONFLICT upsert, a ranked query, and a single-row lookup.
  • Update the wire protocol, author guide, architecture notes, scaffolded agent guidance, all-permissions canary, and file-manager paths.

Both chat-leaderboard scenario suites pass 7/7 against the Owncast feature branch. The full JavaScript example sweep passes all 35 examples and the Python sweep passes all examples. The host runtime tests and build also pass with the local Owncast workspace.

This is a draft because the SDK workflow deliberately builds the host binaries against owncast/owncast@develop. Until #5084 merges, that dependency does not have SQLRequest, SQLQueryResult, or SQLRunner, so a standalone GOWORK=off build and the GitHub workflows are expected to fail. Once #5084 lands, I will update the Owncast pin, re-run the full suite, and mark this ready.

@gabek
gabek force-pushed the gek/plugin-sql-storage branch 2 times, most recently from 33d6787 to 486f9fc Compare July 31, 2026 02:04
@gabek gabek closed this Aug 2, 2026
@gabek
gabek force-pushed the gek/plugin-sql-storage branch from 486f9fc to 384971c Compare August 2, 2026 02:59
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.

1 participant