Files
archie/internal/secret/secretextract/secretextract.go
T
sam 2b1045c0ad feat: secrets-engine registry with yaegi extension interface (archie-core-xec)
Adds internal/secret: a pluggable Engine interface (Name/Version/Resolve)
resolved through a Registry, so secrets backends (sops, Bitwarden Secrets
Manager, Vault/OpenBao) aren't hard-coded into the binary. Only the "env"
engine is compiled in; custom engines are Yaegi-interpreted .go plugins
loaded via Registry.LoadDir, mirroring internal/plugin's conventions
(secretextract provides the generated, nil-guarded symbol table for the
Yaegi/Go interface boundary).

config.Forge.TokenEnv is replaced end-to-end with config.Forge.Token
(secret.SecretRef{Engine, Key}) -- finalize() defaulting, forge token
resolution in cmd/archied/main.go, and per-identity validation that now
requires an explicit token instead of silently resolving to "". No
backwards-compat shim.

Provider.APIKeyEnv, NATSConfig.TokenEnv, and TelegramConfig.TokenEnv are
deliberately not migrated here -- they're forwarded by name to
ai-sdk/runtime and subprocess workers rather than resolved centrally,
which needs its own eager-resolve-then-inject design pass
(archie-core-xec.4). The three shipped engine plugins (sops, bws,
vault/openbao) are tracked separately as archie-core-xec.1-3.

Adversarially reviewed by a fresh agent with no implementation context;
fixed the two findings that survived (missing per-identity token
validation, underdocumented nil-wrapper Resolve edge case).
2026-07-26 14:49:32 +10:00

17 lines
797 B
Go

// Package secretextract holds the Yaegi symbol table for internal/secret,
// generated by `go generate`. Kept separate from internal/secret itself
// so the generated file can import it without a self-import cycle.
//
// IMPORTANT: Running `go generate` overwrites the generated file with
// Yaegi's default wrapper which does NOT include nil-guards on function
// fields. The `TestGeneratedWrapperHasNilGuards` test catches this if
// regeneration strips the guards. Re-apply nil-guards manually after
// regeneration until Yaegi supports generating them natively.
package secretextract
import "reflect"
//go:generate go run github.com/traefik/yaegi/cmd/yaegi extract -name secretextract github.com/samcharles93/archie-core/internal/secret
var Symbols = map[string]map[string]reflect.Value{}