Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .compat/core/core.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// SPDX-Licence-Identifier: EUPL-1.2

// Package core is a local compatibility bridge for sibling modules that have
// not yet moved their imports from dappco.re/go/core to dappco.re/go.
package core

import root "dappco.re/go"

type (
Action = root.Action
ActionHandler = root.ActionHandler
AtomicPointer[T any] = root.AtomicPointer[T]
Context = root.Context
Core = root.Core
CoreOption = root.CoreOption
Embed = root.Embed
Fs = root.Fs
Message = root.Message
Mutex = root.Mutex
Once = root.Once
Option = root.Option
Options = root.Options
Process = root.Process
Registry[T any] = root.Registry[T]
Result = root.Result
RWMutex = root.RWMutex
ServiceRuntime[T any] = root.ServiceRuntime[T]
Startable = root.Startable
Stoppable = root.Stoppable
Translator = root.Translator
)

var (
As = root.As
CleanPath = root.CleanPath
Concat = root.Concat
Contains = root.Contains
E = root.E
Env = root.Env
HasPrefix = root.HasPrefix
HasSuffix = root.HasSuffix
ID = root.ID
Is = root.Is
IsDigit = root.IsDigit
IsLetter = root.IsLetter
IsSpace = root.IsSpace
JSONMarshal = root.JSONMarshal
JSONMarshalString = root.JSONMarshalString
JSONUnmarshal = root.JSONUnmarshal
JSONUnmarshalString = root.JSONUnmarshalString
Join = root.Join
Lower = root.Lower
New = root.New
NewBuffer = root.NewBuffer
NewBuilder = root.NewBuilder
NewError = root.NewError
NewOptions = root.NewOptions
NewReader = root.NewReader
Path = root.Path
PathBase = root.PathBase
PathDir = root.PathDir
PathIsAbs = root.PathIsAbs
PathJoin = root.PathJoin
Print = root.Print
Println = root.Println
ReadAll = root.ReadAll
Replace = root.Replace
SHA256 = root.SHA256
Security = root.Security
Split = root.Split
SplitN = root.SplitN
Sprintf = root.Sprintf
Trim = root.Trim
TrimPrefix = root.TrimPrefix
TrimSuffix = root.TrimSuffix
Upper = root.Upper
Warn = root.Warn
WithName = root.WithName
)

func NewRegistry[T any]() *Registry[T] {
return root.NewRegistry[T]()
}

func NewServiceRuntime[T any](c *Core, opts T) *ServiceRuntime[T] {
return root.NewServiceRuntime(c, opts)
}
5 changes: 5 additions & 0 deletions .compat/core/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module dappco.re/go/core

go 1.26.2

require dappco.re/go v0.9.0
37 changes: 37 additions & 0 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Woodpecker CI pipeline.
# Server: ci.lthn.sh. Lint + sonar in parallel, both depend only on clone.
# sonar_token is admin-scoped on the Woodpecker server.

when:
- event: push
branch: [dev, main]

steps:
- name: golangci-lint
image: golangci/golangci-lint:latest-alpine
depends_on: []
environment:
GOFLAGS: -buildvcs=false
GOWORK: "off"
commands:
- golangci-lint run --timeout=5m ./...

- name: go-test
image: golang:1.26-alpine
depends_on: []
environment:
GOFLAGS: -buildvcs=false
GOWORK: "off"
CGO_ENABLED: "1"
commands:
- apk add --no-cache git build-base
- go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: sonar
image: sonarsource/sonar-scanner-cli:latest
depends_on: [go-test]
environment:
SONAR_HOST_URL: https://sonar.lthn.sh
SONAR_TOKEN:
from_secret: sonar_token
commands:
- sonar-scanner
56 changes: 56 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# go-html Agent Guide

This repository is the semantic HTML renderer for the Dappcore Go stack. It
builds composable `Node` trees, HLCRF layouts, responsive variants, grammar
imprints, Web Component code generation, a small WASM bridge, and a Gin-backed
API provider.

## Structure

The root package `dappco.re/go/html` contains the runtime renderer. `node.go`
defines the renderable primitives, `layout.go` owns HLCRF slot composition,
`responsive.go` wraps layout variants, `pipeline.go` connects rendering to the
i18n reversal grammar imprint pipeline, and `context.go` carries locale,
metadata, and translator state. `shadow.go` generates static Web Component
classes from node trees.

The `codegen/` package is the build-time Web Component generator used by
`cmd/codegen/`. The command reads slot maps as JSON and writes JavaScript or
TypeScript definitions. `cmd/wasm/` contains the browser-facing WASM entrypoint
and compatibility layout renderer. `pkg/api/` exposes the render and grammar
checks through the Core provider shape without importing the full provider
runtime.

## Local Rules

Do not edit `third_party/`, `.git/`, `.codex/`, or `BRIEF.md`. The v0.9.0
compliance audit is the source of truth for migration work:

```sh
bash /Users/snider/Code/core/go/tests/cli/v090-upgrade/audit.sh .
```

Tests and examples are file-aware. A public symbol in `foo.go` needs its
`TestFoo_<Symbol>_{Good,Bad,Ugly}` triplet in `foo_test.go` and its
`Example<Symbol>` usage in `foo_example_test.go`. Do not create AX7, versioned,
or monolithic test files.

Direct imports of banned stdlib packages such as `fmt`, `errors`, `strings`,
`path`, `os`, `log`, `encoding/json`, and `bytes` are not accepted in any Go
file. Use `dappco.re/go` wrappers directly, or keep WASM-sized local helpers
small and explicit when the runtime file intentionally avoids the Core import.

## Verification

Before handing work back, run the full repository gate:

```sh
GOWORK=off go mod tidy
GOWORK=off go vet ./...
GOWORK=off go test -count=1 ./...
gofmt -l .
bash /Users/snider/Code/core/go/tests/cli/v090-upgrade/audit.sh .
```

The audit must print `verdict: COMPLIANT` with every counter at zero. Passing
unit tests alone is not a completed compliance pass.
Loading
Loading