diff --git a/CLAUDE.md b/CLAUDE.md index 9a27f7a..009e835 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -`forge.lthn.ai/core/go-io` is the **mandatory I/O abstraction layer** for the CoreGO ecosystem. All data access — files, configs, journals, state — MUST go through the `io.Medium` interface. Never use raw `os`, `filepath`, or `ioutil` calls. +`dappco.re/go/core/io` is the **mandatory I/O abstraction layer** for the CoreGO ecosystem. All data access — files, configs, journals, state — MUST go through the `io.Medium` interface. Never use raw `os`, `filepath`, or `ioutil` calls. ### The Premise @@ -103,13 +103,13 @@ Sigils can be created by name via `sigil.NewSigil("hex")`, `sigil.NewSigil("sha2 Standard `io` is always aliased to avoid collision with this package: ```go goio "io" -coreerr "forge.lthn.ai/core/go-log" -coreio "forge.lthn.ai/core/go-io" // when imported from subpackages +coreerr "dappco.re/go/core/log" +coreio "dappco.re/go/core/io" // when imported from subpackages ``` ### Error Handling -All errors use `coreerr.E("pkg.Method", "description", wrappedErr)` from `forge.lthn.ai/core/go-log`. Follow this pattern in new code. +All errors use `coreerr.E("pkg.Method", "description", wrappedErr)` from `dappco.re/go/core/log`. Follow this pattern in new code. ### Compile-Time Interface Checks @@ -117,10 +117,10 @@ Backend packages use `var _ io.Medium = (*Medium)(nil)` to verify interface comp ## Dependencies -- `forge.lthn.ai/Snider/Borg` — DataNode container -- `forge.lthn.ai/core/go-log` — error handling (`coreerr.E()`) -- `forge.lthn.ai/core/go` — Core DI (workspace service only) -- `forge.lthn.ai/core/go-crypt` — PGP key generation (workspace service only) +- `forge.lthn.ai/Snider/Borg` — DataNode container (pending dappco.re migration) +- `dappco.re/go/core/log` — error handling (`coreerr.E()`) +- `dappco.re/go/core` — Core DI (workspace service only) +- `forge.lthn.ai/core/go-crypt` — PGP key generation (workspace service only, pending dappco.re migration) - `aws-sdk-go-v2` — S3 backend - `golang.org/x/crypto` — XChaCha20-Poly1305, BLAKE2, SHA-3 (sigil package) - `modernc.org/sqlite` — SQLite backends (pure Go, no CGO) diff --git a/CONSUMERS.md b/CONSUMERS.md new file mode 100644 index 0000000..cd0c00f --- /dev/null +++ b/CONSUMERS.md @@ -0,0 +1,34 @@ +# Consumers of go-io + +These modules import `dappco.re/go/core/io`: + +- agent +- core +- config +- go-ai +- go-ansible +- go-blockchain +- go-build +- go-cache +- go-container +- go-crypt +- go-forge +- go-html +- go-infra +- go-ml +- go-mlx +- go-netops +- go-p2p +- go-process +- go-rag +- go-ratelimit +- go-scm +- gui +- ide +- lint +- mcp +- php +- ts +- LEM + +**Breaking change risk: 28 consumers.** diff --git a/datanode/client.go b/datanode/client.go index fcfe524..6a9a4a0 100644 --- a/datanode/client.go +++ b/datanode/client.go @@ -17,7 +17,7 @@ import ( "sync" "time" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" "forge.lthn.ai/Snider/Borg/pkg/datanode" ) diff --git a/go.mod b/go.mod index 6c77560..b204ef9 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module dappco.re/go/core/io go 1.26.0 require ( - dappco.re/go/core v0.4.7 + dappco.re/go/core v0.5.0 + dappco.re/go/core/log v0.1.0 forge.lthn.ai/Snider/Borg v0.3.1 forge.lthn.ai/core/go-crypt v0.1.6 - forge.lthn.ai/core/go-log v0.0.4 github.com/aws/aws-sdk-go-v2 v1.41.4 github.com/aws/aws-sdk-go-v2/service/s3 v1.97.1 github.com/stretchr/testify v1.11.1 @@ -16,6 +16,7 @@ require ( require ( forge.lthn.ai/core/go v0.3.0 // indirect + forge.lthn.ai/core/go-log v0.0.1 // indirect github.com/ProtonMail/go-crypto v1.4.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.7 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.20 // indirect diff --git a/go.sum b/go.sum index d25c96d..5ebee45 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,15 @@ -dappco.re/go/core v0.4.7 h1:KmIA/2lo6rl1NMtLrKqCWfMlUqpDZYH3q0/d10dTtGA= -dappco.re/go/core v0.4.7/go.mod h1:f2/tBZ3+3IqDrg2F5F598llv0nmb/4gJVCFzM5geE4A= +dappco.re/go/core v0.5.0 h1:P5DJoaCiK5Q+af5UiTdWqUIW4W4qYKzpgGK50thm21U= +dappco.re/go/core v0.5.0/go.mod h1:f2/tBZ3+3IqDrg2F5F598llv0nmb/4gJVCFzM5geE4A= +dappco.re/go/core/log v0.1.0 h1:pa71Vq2TD2aoEUQWFKwNcaJ3GBY8HbaNGqtE688Unyc= +dappco.re/go/core/log v0.1.0/go.mod h1:Nkqb8gsXhZAO8VLpx7B8i1iAmohhzqA20b9Zr8VUcJs= forge.lthn.ai/Snider/Borg v0.3.1 h1:gfC1ZTpLoZai07oOWJiVeQ8+qJYK8A795tgVGJHbVL8= forge.lthn.ai/Snider/Borg v0.3.1/go.mod h1:Z7DJD0yHXsxSyM7Mjl6/g4gH1NBsIz44Bf5AFlV76Wg= forge.lthn.ai/core/go v0.3.0 h1:mOG97ApMprwx9Ked62FdWVwXTGSF6JO6m0DrVpoH2Q4= forge.lthn.ai/core/go v0.3.0/go.mod h1:gE6c8h+PJ2287qNhVUJ5SOe1kopEwHEquvinstpuyJc= forge.lthn.ai/core/go-crypt v0.1.6 h1:jB7L/28S1NR+91u3GcOYuKfBLzPhhBUY1fRe6WkGVns= forge.lthn.ai/core/go-crypt v0.1.6/go.mod h1:4VZAGqxlbadhSB66sJkdj54/HSJ+bSxVgwWK5kMMYDo= -forge.lthn.ai/core/go-log v0.0.4 h1:KTuCEPgFmuM8KJfnyQ8vPOU1Jg654W74h8IJvfQMfv0= -forge.lthn.ai/core/go-log v0.0.4/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw= +forge.lthn.ai/core/go-log v0.0.1 h1:x/E6EfF9vixzqiLHQOl2KT25HyBcMc9qiBkomqVlpPg= +forge.lthn.ai/core/go-log v0.0.1/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw= github.com/ProtonMail/go-crypto v1.4.0 h1:Zq/pbM3F5DFgJiMouxEdSVY44MVoQNEKp5d5QxIQceQ= github.com/ProtonMail/go-crypto v1.4.0/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo= github.com/aws/aws-sdk-go-v2 v1.41.4 h1:10f50G7WyU02T56ox1wWXq+zTX9I1zxG46HYuG1hH/k= diff --git a/io.go b/io.go index c31592f..21d95a0 100644 --- a/io.go +++ b/io.go @@ -8,7 +8,7 @@ import ( "strings" "time" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" "dappco.re/go/core/io/local" ) diff --git a/local/client.go b/local/client.go index 22fd769..61b89eb 100644 --- a/local/client.go +++ b/local/client.go @@ -11,7 +11,7 @@ import ( "strings" "time" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // Medium is a local filesystem storage backend. diff --git a/s3/s3.go b/s3/s3.go index 86443fe..cd121de 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -15,7 +15,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3/types" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // s3API is the subset of the S3 client API used by this package. diff --git a/sigil/sigils.go b/sigil/sigils.go index 2baffff..54bfb74 100644 --- a/sigil/sigils.go +++ b/sigil/sigils.go @@ -13,7 +13,7 @@ import ( "encoding/json" "io" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" "golang.org/x/crypto/blake2b" "golang.org/x/crypto/blake2s" "golang.org/x/crypto/md4" diff --git a/sqlite/sqlite.go b/sqlite/sqlite.go index fe1642d..93aa9a2 100644 --- a/sqlite/sqlite.go +++ b/sqlite/sqlite.go @@ -11,7 +11,7 @@ import ( "strings" "time" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" _ "modernc.org/sqlite" // Pure Go SQLite driver ) diff --git a/store/medium.go b/store/medium.go index 4363ca4..31eeae7 100644 --- a/store/medium.go +++ b/store/medium.go @@ -8,7 +8,7 @@ import ( "strings" "time" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" ) // Medium wraps a Store to satisfy the io.Medium interface. diff --git a/store/store.go b/store/store.go index 7c531fb..10bdce2 100644 --- a/store/store.go +++ b/store/store.go @@ -6,7 +6,7 @@ import ( "strings" "text/template" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" _ "modernc.org/sqlite" ) diff --git a/workspace/service.go b/workspace/service.go index c1978a1..570e6d0 100644 --- a/workspace/service.go +++ b/workspace/service.go @@ -8,7 +8,7 @@ import ( "sync" core "dappco.re/go/core" - coreerr "forge.lthn.ai/core/go-log" + coreerr "dappco.re/go/core/log" "dappco.re/go/core/io" )