Alex Dunmow 917eee13a2 feat: add menus, subscriptions, public users, and plugin bridge to SDK
New capability interfaces:
- menus.Menus: menu/nav access (GetMenuByName, GetMenuItems)
- subscriptions.Subscriptions: tier/plan access (GetUserTierLevel, GetTierBySlug, ListActivePlans)
- auth.PublicUsers: public user profiles (GetByUsername, GetByID)
- plugin.PluginBridge: inter-plugin service registry with typed GetServiceAs[T] helper

All added to ServiceDeps for plugin consumption.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-01 12:36:13 +08:00
2026-05-01 09:18:19 +08:00
2026-04-30 22:25:52 +08:00

BlockNinja Plugin SDK

Types, interfaces, and utilities for building BlockNinja plugins.

Package Structure

Package Purpose
plugin/ PluginRegistration, ServiceDeps, RegisterFunc
blocks/ BlockMeta, BlockFunc, BlockRegistry interface, BlockContext
blocks/builtin/ Reusable block implementations (HTMLBlock)
templates/ TemplateRegistry interface
templates/bn/ Shared templ components (head, engagement, toolbar)
auth/ Claims types, context extractors
content/ Content access interface
settings/ Settings access interface
gating/ Access gating evaluation
crypto/ Encrypt/Decrypt interface
render/ Rich text rendering utilities
video/ Video embed URL parsing
ai/ AI tool registry interface and types
rbac/ Role type definition

Usage

import "git.dev.alexdunmow.com/ninja/core/plugin"
Description
No description provided
Readme 167 KiB
Languages
Go 58.7%
templ 40.6%
Makefile 0.7%