astrid:sys get-config returns none to JS capsules for every key, including kernel builtins (0.9.4)
Summary
On astrid 0.9.4, env.tryGet(...) (→ astrid:sys/[email protected] get-config) returns none for every key from a JS capsule, in both the lifecycle and the runtime (@run) instance:
- manifest
[env]defaults (GEMINI_API_KEY = { type = "string", default = "…" }) →none - values set via
astrid capsule config <name> --set KEY=VALUE(stored at~/.astrid/home/<principal>/.config/env/<name>.env.json, confirmed with--show, capsule reloaded) →none - the kernel's own injected builtin
ASTRID_SOCKET_PATH(the SDK's documentedCONFIG_SOCKET_PATHcontrol) →none
Probe log:
[strategist] config probe (upgrade): GEMINI_API_KEY unset, ASTRID_SOCKET_PATH unsetBecause even the builtin ASTRID_SOCKET_PATH is missing, this points at the host get-config binding for JS capsules rather than at secret semantics.
Impact
JS capsules cannot be configured at all through the documented surface — including reading secrets or the socket path — which blocks any capsule that needs a runtime key or endpoint.
Schema notes discovered on the way (useful for docs)
Manifest [env] values must be EnvDef structs — a bare string fails with expected struct EnvDef, and type is required ({ type = "string" | "secret", default = "…" } both pass astrid capsule check).
Workaround we used
Bake the key into the locally-built wasm at build time (gitignored output, target/ never committed), with runtime config tried first so a fixed kernel/SDK takes over automatically.
Environment
@unicity-astrid/sdk0.1.0,@unicity-astrid/build0.1.0 (npm)- astrid 0.9.4 release binary, x86_64-unknown-linux-gnu
- Ubuntu 24.04 (WSL2), Node 22
- Config probed from both the lifecycle instance and the
@runruntime instance
Part of a small batch of findings from building a non-trivial JS capsule. Related: #20 (decorator registry).
Source: astrid-runtime/sdk-js