Skip to content

Document private SQL storage for plugins - #233

Merged
gabek merged 2 commits into
owncast-docusaurusfrom
gek/plugin-sql-storage-docs
Aug 5, 2026
Merged

Document private SQL storage for plugins#233
gabek merged 2 commits into
owncast-docusaurusfrom
gek/plugin-sql-storage-docs

Conversation

@gabek

@gabek gabek commented Jul 30, 2026

Copy link
Copy Markdown
Member

This documents the public author-facing side of owncast/owncast#5084 and owncast/plugin-sdk#6.

  • Add storage.sql to the permission reference, including the per-plugin database boundary, limits, lifecycle, and backup behavior.
  • Document owncast.sql.exec, query, and queryRow with matching JavaScript and Python examples.
  • Explain SQL behavior in scenario tests and link to the paired chat-leaderboard example.

The English Docusaurus build passes with no broken links or broken anchors from these changes.

This stays draft until the Owncast runtime and SDK changes ship so the public site does not advertise an unavailable API.

Document the storage.sql permission, JavaScript and Python APIs, query limits,
security boundary, and scenario test behavior.
@gabek
gabek force-pushed the gek/plugin-sql-storage-docs branch from 3fd2385 to 06d708c Compare July 31, 2026 02:01
@gabek
gabek marked this pull request as ready for review August 5, 2026 06:34
Copilot AI lite review requested due to automatic review settings August 5, 2026 06:34
…gin-sql-storage-docs

# Conflicts:
#	docs/plugins/apis.mdx
@gabek
gabek merged commit 3822d46 into owncast-docusaurus Aug 5, 2026
@gabek
gabek deleted the gek/plugin-sql-storage-docs branch August 5, 2026 06:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the plugin documentation to describe the newly introduced private per-plugin SQL storage surface area (SQLite) and aligns filesystem storage docs with the updated on-disk layout, so plugin authors understand permissions, behavior, and testing expectations.

Changes:

  • Add storage.sql permission documentation, including per-plugin DB boundary, quotas, lifecycle, and backup behavior.
  • Document owncast.sql.exec, query, and queryRow APIs with JavaScript and Python examples plus execution/limit constraints and refused SQL.
  • Extend scenario-testing docs to explain how SQL behavior is exercised via plugin handlers/commands (no dedicated SQL assertions).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/plugins/testing.mdx Adds guidance for testing plugins that use owncast.sql.* with in-memory SQLite in scenarios/dev server.
docs/plugins/permissions.md Adds storage.sql to the permission reference and updates storage.fs path details + summary table.
docs/plugins/apis.mdx Updates owncast.fs.* storage path and adds a new owncast.sql.* API section with examples, limits, and constraints.
Suppressed comments (1)

docs/plugins/apis.mdx:447

  • Minor grammar: “commits whole” is unidiomatic and reads like a typo. Consider rephrasing to clarify that the batch commits atomically.
<Tabs groupId="plugin-lang">

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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