| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-05-25 | 6.3 kB | |
| v0.1.0 source code.tar.gz | 2026-05-25 | 149.4 kB | |
| v0.1.0 source code.zip | 2026-05-25 | 179.4 kB | |
| Totals: 3 Items | 335.0 kB | 2 | |
First non-prerelease. 0.1.0-alpha.0 was the test version; this is the
first release intended for capsule consumers. The contract surface is
the per-domain WIT host ABI introduced alongside the merged
unicity-astrid/wit 1.0.0 packages.
Breaking
- Per-domain WIT host ABI. The monolithic
astrid:capsule@0.1.0world has been split into per-domain frozen packages at@1.0.0:astrid:fs/host,astrid:ipc/host,astrid:kv/host,astrid:net/host,astrid:http/host,astrid:sys/host,astrid:process/host,astrid:uplink/host,astrid:elicit/host,astrid:approval/host,astrid:identity/host. Foundation I/O is Astrid-owned (nowasi:iodependency) and lives inastrid:io/{error,poll,streams}@1.0.0. Guest exports are split into per-export worlds underastrid:guest@1.0.0. - Resource-backed handles. Previously-opaque
u64handles (Subscription,FileHandle,TcpStream,UnixListener,ProcessHandle,HttpStream,Pollable,InputStream,OutputStream,Error) are now Component Model resources. SDK wrappers expose them as TypeScript classes implementingSymbol.disposesousing sub = ipc.subscribe(...)releases the resource on scope exit. An explicit.close()remains available for codebases not yet on the explicit-resource-management proposal. - Typed
ErrorCodeenums per domain. Every host fn now returnsresult<T, error-code>whereerror-codeis a domain-specific variant (astrid:fs/host.error-code,astrid:net/host.error-code, …).SysErrornow carries the WIT variant tag oncode— downstream code can branchif (err.code === "quota") ...without losing the typed kind. The legacy origin classification moved toSysError.kind. fsmodule gained the full POSIX surface.openreturns aFileHandleresource withreadAt/writeAt/syncData/syncAll/stat/setLen. New top-level helpers:mkdirAll,appendFile,copy,rename,removeDirAll,canonicalize,readLink,hardLink,lstat.Statsnow exposeskind,mode,birthtimeMs,atimeMs,isSymbolicLink().netmodule split intoUnixListener/TcpListener/TcpStream/UdpSocketresources. New surface:bindTcp,udpBind,lookupHost,TcpStream.{setHopLimit, setKeepalive, setLinger, setReuseaddr, readStream, writeStream},UdpSocket.{sendTo, recvFrom, connect, send, recv}.StreamHandle/ListenerHandlesurvive as aliases for source compatibility.http.HttpStreamHandleis now a resource handle withsubscribeReadableandbodyStreamfor splice-based body forwarding.HttpMethodis now a variant tag at the WIT layer; the SDK still accepts uppercase strings.process.BackgroundProcessHandlegained the full lifecycle surface:writeStdin,closeStdin,signal,wait,waitWithOutput,osPid,subscribeExit,subscribeLogs.ProcessResult.exitCodeis nownumber | undefined(a Unix-signal kill returnsundefinedexit code and populates the newsignalfield).identitymodule returns typedPlatformLink[]directly rather than a JSON-encodedlinksJsonblob.IdentityOkResponseis removed; errors surface asSysErrorwith the WIT variant oncode.approvalmodule returns the typedApprovalDecision(one-shot / session / always / allowance-hit / denied). NewrequestDecisionsurfaces the full decision;requestcontinues to collapse to a boolean.uplink.UplinkProfileis now an enum ("chat" | "interactive" | "notify" | "bridge"); profile strings outside that set returninvalid-profilefrom the host.hooksmodule removed. Thesys::trigger-hookhost fn no longer exists in the per-domain WIT. Hook fan-out is now performed viaipc.requestResponse. Callers that previously usedhooks.trigger(json)should publish on the hook's IPC topic and await the typed response.SysError.codesemantics changed. The legacycode: "HostError" | "JsonError" | "ApiError"field moved toSysError.kind;codenow carries the typed WIT variant (e.g."capability-denied","quota","timeout").SysErrorCodeis renamed toSysErrorKind.
Added
ipc.requestResponse<Req, Resp>(requestTopic, responseNamespace, request, timeoutMs)— mirrors the Rust SDK'sastrid_sdk::ipc::request_response. Pre-subscribes to<responseNamespace>.<correlationId>before publishing, injects a UUIDv4correlation_idinto the request payload, races againsttimeoutMs, and always tears down the subscription. Rejects non-object payloads synchronously withSysError.api.ipc.publishAs(topic, payload, principal)andipc.publishJsonAs(topic, value, principal)for uplinks asserting an end-user principal. Subscribers see the principal asclaimed, notverified.ipc.IpcMessage.principalis now a typedPrincipalAttributionvariant (verified/claimed/system) rather than a barestring | undefined.kv.cas(key, expected, newValue)for atomic compare-and-swap on shared keys, andkv.listKeysPage(prefix, cursor, limit)for paginated enumeration of unbounded stores.fs.open(path, mode)+FileHandleresource for streaming / random-access I/O without buffering the whole file.net.bindTcp,net.udpBind,net.lookupHostfor outbound / inbound TCP listeners, UDP sockets, and DNS resolution.runtime.randomBytes(length)wrapping the host CSPRNG (audited viasys::random-bytes).time.sleepMs,time.sleepNs,time.monotonicNswrapping the host clock / sleep primitives.env.tryGet(key)returnsstring | undefinedso callers can distinguish "not set" from "set to empty string".
Changed
- Build orchestrator (
@unicity-astrid/build) synthesises a capsule world in<projectDir>/gen/wit/capsule.witmirroring the Rust SDK'sastrid-syssynthetic world. Capsules no longer need to declare their own world for the common case. - Contracts submodule (
unicity-astrid/wit) bumped to commit324d4ab, which introduces the Astrid-ownedastrid:io@1.0.0foundation primitives.
With many thanks from the following Astrinauts 🚀
- Joshua J. Bouw