feat: WO-PS-001 initialize SDK repo

Initialize git.dev.alexdunmow.com/ninja/core with Go 1.26 module,
package directory structure, and README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-04-30 22:25:52 +08:00
commit 0991b791b1
19 changed files with 48 additions and 0 deletions

28
README.md Normal file
View File

@ -0,0 +1,28 @@
# 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
```go
import "git.dev.alexdunmow.com/ninja/core/plugin"
```

1
ai/doc.go Normal file
View File

@ -0,0 +1 @@
package ai

1
auth/doc.go Normal file
View File

@ -0,0 +1 @@
package auth

1
blocks/builtin/doc.go Normal file
View File

@ -0,0 +1 @@
package builtin

1
blocks/doc.go Normal file
View File

@ -0,0 +1 @@
package blocks

1
blocks/schemas/doc.go Normal file
View File

@ -0,0 +1 @@
package schemas

1
blocks/shared/doc.go Normal file
View File

@ -0,0 +1 @@
package shared

1
blocks/tags/doc.go Normal file
View File

@ -0,0 +1 @@
package tags

1
content/doc.go Normal file
View File

@ -0,0 +1 @@
package content

1
crypto/doc.go Normal file
View File

@ -0,0 +1 @@
package crypto

1
gating/doc.go Normal file
View File

@ -0,0 +1 @@
package gating

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.dev.alexdunmow.com/ninja/core
go 1.26

1
plugin/doc.go Normal file
View File

@ -0,0 +1 @@
package plugin

1
rbac/doc.go Normal file
View File

@ -0,0 +1 @@
package rbac

1
render/doc.go Normal file
View File

@ -0,0 +1 @@
package render

1
settings/doc.go Normal file
View File

@ -0,0 +1 @@
package settings

1
templates/bn/doc.go Normal file
View File

@ -0,0 +1 @@
package bn

1
templates/doc.go Normal file
View File

@ -0,0 +1 @@
package templates

1
video/doc.go Normal file
View File

@ -0,0 +1 @@
package video