v0.6.1
Added
ipc::publish_as(topic, payload, principal)andipc::publish_json_as. SDK helpers for uplink principal propagation. Without these, an uplink that fans inbound socket messages onto the bus stamps every published event with its own (capsule-owner) principal — the kernel's Layer 5/6 enforcement preamble would then seecaller = defaultregardless of which agent the operator was impersonating via the local CLI, andastrid agent switch alice; astrid agent disable bobwould silently succeed as default. Uplink capsules (CLI proxy, future Telegram/Discord bridges) can now claim a principal other than their own at the IPC boundary. Gated host-side by anuplink: boolcapability — non-uplink capsules calling these get a clear error. (#37)
Changed
-
astrid-sdk/wit/astrid-contracts.witis now sourced fromunicity-astrid/wit. The contract types (astrid_sdk::contracts::*) were generated from a hand-maintained bundled WIT that drifted from the canonicalunicity-astrid/witrepo — 9 of 17 interfaces present, 33 of 71 records. With sdk-js coming online, having two SDKs generate types from independent WIT copies would have meant cross-SDK contract drift the moment the canonical repo added or changed a record. Now:astrid-sdk/wit/astrid-contracts.witbecomes a sync artifact, written byscripts/sync-contracts-wit.shfromcontracts/interfaces/*.wit. Samecargo packagerationale asastrid-capsule.wit: file has to physically live in the crate dir, but the submodule is authoritative.- The sync transforms the per-package canonical layout (
package astrid:context@1.0.0;etc.) into the single-package bundled layout thewit_events!macro consumes (package astrid:contracts@1.0.0;). Cross-packageuse astrid:types/types.{…};references become same-packageuse types.{…};. - New CI job step runs
scripts/sync-contracts-wit.sh --check. Drift fails CI. wit_events!now emits onepub mod <interface> { … }per WIT interface instead of flat top-level types. Required because the canonical interface set has same-named records across packages (e.g.agent::response,approval::response,elicit::response); without per-interface namespacing they collided. Type references across interfaces are emitted as fully-qualifiedsuper::<iface>::<Name>paths.- Breaking (technical): if anything was using flat
astrid_sdk::contracts::CompactRequest, it's nowastrid_sdk::contracts::context::CompactRequest. No known consumer today — capsule code hand-rolls equivalent structs and is being migrated separately. (#39)
-
astrid-sys/wit/astrid-capsule.witis now sourced fromunicity-astrid/wit. The host ABI lived as an unsynced copy in three repos (kernel, sdk-rust, sdk-js); PRunicity-astrid/wit#3madeunicity-astrid/witthe canonical home (newhost/astrid-capsule.witpath).- This repo's
contracts/submodule pointer is bumped to that commit. astrid-sys/wit/astrid-capsule.witbecomes a sync artifact maintained byscripts/sync-host-wit.sh. Can't go away entirely becauseastrid-syspublishes to crates.io andcargo packageonly bundles files inside the crate dir — but the submodule is authoritative.- New CI job
wit-syncrunsscripts/sync-host-wit.sh --checkon every push/PR. Drift betweencontracts/host/andastrid-sys/wit/fails CI. (#38)
- This repo's
Fixed
cargo publish -p astrid-sysnow works. The WIT file lived outside the crate directory (../wit/astrid-capsule.wit), whichcargo packagestrips andcargo publishrejects. WIT files moved into their respective crate dirs (astrid-sys/wit/,astrid-sdk/wit/), rootwit/directory removed,includedirective added toastrid-sys/Cargo.toml. (#36)
With many thanks from the following Astrinauts 🚀
- Joshua J. Bouw