Summary
On astrid 0.9.4, env.tryGet(...) (→ astrid:sys/host@1.0.0 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 documented CONFIG_SOCKET_PATH control) → none
Probe log:
[strategist] config probe (upgrade): GEMINI_API_KEY unset, ASTRID_SOCKET_PATH unset
Because 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/sdk 0.1.0, @unicity-astrid/build 0.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
@run runtime instance
Part of a small batch of findings from building a non-trivial JS capsule. Related: #20 (decorator registry).
Summary
On astrid 0.9.4,
env.tryGet(...)(→astrid:sys/host@1.0.0 get-config) returnsnonefor every key from a JS capsule, in both the lifecycle and the runtime (@run) instance:[env]defaults (GEMINI_API_KEY = { type = "string", default = "…" }) →noneastrid capsule config <name> --set KEY=VALUE(stored at~/.astrid/home/<principal>/.config/env/<name>.env.json, confirmed with--show, capsule reloaded) →noneASTRID_SOCKET_PATH(the SDK's documentedCONFIG_SOCKET_PATHcontrol) →noneProbe log:
Because even the builtin
ASTRID_SOCKET_PATHis missing, this points at the hostget-configbinding 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 beEnvDefstructs — a bare string fails withexpected struct EnvDef, andtypeis required ({ type = "string" | "secret", default = "…" }both passastrid 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)@runruntime instancePart of a small batch of findings from building a non-trivial JS capsule. Related: #20 (decorator registry).