Skip to content

astrid:sys get-config returns none to JS capsules for every key, including kernel builtins (0.9.4) #24

Description

@eren-karakus0

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions