16 Commits

Author SHA1 Message Date
Alex Dunmow
81acfac025 chore(deps): bump block/ninjatpl v1.0.1 -> v1.0.2
Pick up ninjatpl perf release (pooled tag-body buffers, lexer escape
fast-path). No API change; templates/pongo builds and behaves identically.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 15:39:17 +08:00
Alex Dunmow
d94c979731 chore(templates): migrate pongo2/v6 -> block/ninjatpl v1.0.1
The legacy templates/pongo host runtime now uses the in-house ninjatpl
fork. Mechanical import/ident swap — these files only use NewSet /
TemplateLoader / Context / Must / Template, all identical in ninjatpl;
no custom filters/tags or *Error signatures involved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 12:24:27 +08:00
Alex Dunmow
62b245d24f feat(backup): shared backup archive format v3 (writer/reader/crypto) for cms + platform backups
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 08:57:31 +08:00
Alex Dunmow
c7cbf69f63 refactor(abi): shed ABI contract + ninja CLI (WO-WZ-023)
The wasm-plugin ABI contract now lives in the cms (block/cms/abi/v1 + docs) and
the ninja CLI moved to its own repo (block/cli). Core keeps abi/ as the guest
SDK until WO-WZ-027. Removes cmd/ninja, the dead orchestrator registry client
(internal/api/orchestrator), the moved docs, and the now-unused ninja/orchclient
deps from go.mod/go.sum.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 22:37:24 +08:00
Alex Dunmow
9bbc793563 test(wasmguest): reactor fixture plugin + throwaway wazero host (WO-WZ-002)
testdata/fixture is the acceptance fixture: one block, one template, one
admin page, plus the two-line reactor boilerplate main. wasmhost_test.go
compiles it with GOOS=wasip1 GOARCH=wasm -buildmode=c-shared (15.7 MiB,
the WO-WZ-012 memory-budget baseline) and drives it through wazero
exactly per wasm-abi.md: _initialize as the start function, request
bytes through bn_alloc, DESCRIBE returning a decodable manifest,
same-instance block+template renders, a panicking BlockFunc surfacing as
ABI_ERROR_CODE_INTERNAL with the instance still callable, and a
non-bn_alloc request pointer rejected as DECODE.

wazero v1.12.0 joins go.mod as a test-only dependency (approved).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 13:53:39 +08:00
Alex Dunmow
c6305d18c2 feat(ninja): theme screenshot harness (chromedp)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 17:21:43 +08:00
Alex Dunmow
e309e3d80b chore: bump templ to v0.3.1020
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 13:14:31 +08:00
Alex Dunmow
680cbe0160 chore(core): add klauspost/compress for plugin archive zstd 2026-06-03 01:19:51 +08:00
Alex Dunmow
32c6528162 feat(templates): add HTMLComponent interface and first-class pongo2 engine
Decouple TemplateFunc from templ.Component by introducing a generic
HTMLComponent interface that both templ and pongo2 satisfy via Go
structural typing. Add a complete pongo2 rendering engine in
templates/pongo/ with page templates, block templates (with BlockContext
injection and icon processing), template overrides, and email wrappers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-02 23:07:11 +08:00
Alex Dunmow
7f4bce79c9 feat(cli): ninja CLI with login, plugin init/publish/status
Cobra scaffold, credentials store, Connect client, device-flow login,
whoami/logout, plugin init (creates + adds git remote), publish (tag + push
+ registry RPC), and status (list scopes/plugins). Proto copied from
orchestrator with buf codegen for client stubs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 23:55:01 +08:00
Alex Dunmow
7ff326ef25 feat(sdk): ModFile struct, ParseModFull, and tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 22:45:26 +08:00
Alex Dunmow
a5caf2d9e7 chore(sdk): add deps for plugin.mod parser and ninja CLI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 22:44:55 +08:00
Alex Dunmow
1be5172358 chore: go mod tidy before v0.1.0 tag
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-01 09:18:19 +08:00
Alex Dunmow
71d3416304 feat: WO-PS-010 SDK HTMLBlock with MediaResolver interface
HTMLBlock uses MediaResolver interface instead of db.Queries for
media metadata enrichment. Includes shared ButtonConfig, MediaValue,
TemplateRenderer interface, and block helper utilities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-01 09:17:50 +08:00
Alex Dunmow
7c20538a4e feat: WO-PS-009 SDK plugin types
- plugin/types.go: Pool, EmailSender, JobHandlerFunc, Dependency,
  AdminPage, AIAction, MasterPageDefinition, status/source constants,
  MediaAnalyzedEvent, ModerationDecisionEvent, MediaHooksProvider,
  DirectoryExtensions
- plugin/deps.go: ServiceDeps with typed capability interfaces
  (Content, Settings, Gating, Crypto, ToolRegistry, JobRunner,
  EmbeddingService, RAGService)
- plugin/registration.go: PluginRegistration, RegisterFunc
- plugin/service.go: ConnectServiceBinding with generics, ServiceMount,
  ServiceRegistration
- plugin/provisioner.go: Provisioner interface with all config types
- plugin/css_manifest.go: CSSManifest, MergedCSSManifest, MergeCSSManifests
- plugin/version.go: ParseModVersion, CompareVersions
- plugin/topo_sort.go: TopologicalSort (Kahn's algorithm)
- plugin/block_registry.go: PluginBlockRegistry (auto-prefixing wrapper)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 22:41:52 +08:00
Alex Dunmow
99fc63ddfd feat: WO-PS-002–008 SDK type packages
- rbac/: Role type, constants, HasPermission, RoleFromString
- blocks/: BlockFunc, BlockMeta, BlockContext, context accessors, BlockRegistry interface
- templates/: TemplateFunc, meta types, TemplateRegistry interface
- auth/: Claims, PublicClaims, context extractors
- content/: Content interface, AuthorProfile/PageInfo/PostInfo types
- settings/: Settings interface, map accessor helpers
- gating/: AccessRule, AccessResult, EvaluateAccess, Gating interface
- crypto/: Crypto interface (Encrypt/Decrypt)
- render/: BlockNoteToHTML standalone renderer
- video/: ParseEmbedURL, EmbedIframeURL
- ai/: ToolDefinition, ToolResult, ToolRegistry interface

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 22:32:29 +08:00