# astrid-runtime/sdk-js

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/astrid-runtime-sdk-js).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

8,088 stars · 37 forks · TypeScript · Apache-2.0

## Links

- GitHub: https://github.com/astrid-runtime/sdk-js
- Homepage: https://github.com/astrid-runtime/astrid
- awesome-repositories: https://awesome-repositories.com/repository/astrid-runtime-sdk-js.md

## Description

This is the TypeScript SDK for writing capsules that run on the Astrid runtime. It offers a typed JavaScript and TypeScript API for authoring sandboxed extensions, with modules for files, networking, processes, storage, messaging, web requests, and identity. These modules target the same host contract as the native Rust toolkit, so the runtime handles capsules from either toolkit the same way.

Capsule behavior is declared with decorators on classes and methods. They mark tools, commands, hooks, interceptors, and the entry points that run on install, upgrade, and startup. A build pipeline type-checks the source, bundles it into a single module, and converts it into a portable WebAssembly component. That component is then packed with its manifest and interface definitions into a compressed archive. Message, tool-call, and stream-event types are generated from one shared contract file, so both sides of an exchange use identical definitions.

The host-facing surface covers outbound HTTP requests, TCP and UDP sockets, DNS lookups, and request-reply messaging with unique ids and timeouts. It also covers persistent background processes that can be reconnected by saved id, streamed file access through handles, and versioned key-value storage with migrations, compare-and-swap updates, and paginated key listing. Smaller utilities include timers and a monotonic clock, optional environment variable lookup, secure random bytes, and publishing messages as a principal.

The repository is a multi-package TypeScript codebase. Every package extends one shared compiler configuration with strict type checking, declaration output, and source maps.

## Tags

### Development Tools & Productivity

- [Capsule Authoring SDKs](https://awesome-repositories.com/f/development-tools-productivity/capsule-authoring-sdks.md) — Provides a typed JavaScript and TypeScript toolkit for authoring capsules with filesystem, networking, messaging, storage and identity modules exposed through decorators.
- [Component Archive Packaging](https://awesome-repositories.com/f/development-tools-productivity/component-archive-packaging.md) — Packs the compiled component with its manifest and interface definitions into a single compressed archive automatically. ([source](https://github.com/astrid-runtime/sdk-js/blob/main/README.md))

### Programming Languages & Runtimes

- [TypeScript Runtime Extension SDKs](https://awesome-repositories.com/f/programming-languages-runtimes/typescript-runtime-extension-sdks.md) — Provides a typed JavaScript and TypeScript API for writing capsules that target the same host contract as the native Rust toolkit. ([source](https://github.com/astrid-runtime/sdk-js#readme))
- [Sandboxed Capsule Authoring APIs](https://awesome-repositories.com/f/programming-languages-runtimes/sandboxed-capsule-authoring-apis.md) — Offers a typed API organized by module for files, networking, messaging, storage, web requests, hooks, and identity, with decorators for tools and lifecycle handlers. ([source](https://github.com/astrid-runtime/sdk-js/blob/main/README.md))
- [WebAssembly Capsule Development](https://awesome-repositories.com/f/programming-languages-runtimes/webassembly-capsule-development.md) — Lets authors write capsule logic in TypeScript with decorators and compile it into WebAssembly components that run alongside natively built capsules.

### Software Engineering & Architecture

- [Host Service Bindings](https://awesome-repositories.com/f/software-engineering-architecture/host-service-bindings.md) — Exposes filesystem, networking, process, storage, identity, and messaging modules that map onto one host contract shared with the native toolkit. ([source](https://github.com/astrid-runtime/sdk-js#readme))
- [Sandboxed Plugin Runtimes](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/developer-authoring-interfaces/custom-module-implementations/module-functionality-extenders/plugin-extenders/sandboxed-plugin-runtimes.md) — Supports writing sandboxed extensions that run inside a host runtime and reach host resources only through a typed, controlled service surface.
- [Decorator-Based Declarations](https://awesome-repositories.com/f/software-engineering-architecture/decorator-based-declarations.md) — Uses decorators on classes and methods to declare tools, commands, hooks, interceptors, and install, upgrade, and startup entry points.
- [WebAssembly Component Models](https://awesome-repositories.com/f/software-engineering-architecture/polyglot-component-models/webassembly-component-models.md) — Runs a type checker, a bundler, and a component tool in sequence to turn source code into a loadable WebAssembly component.
- [Request-Reply Patterns](https://awesome-repositories.com/f/software-engineering-architecture/request-reply-patterns.md) — Implements request-reply messaging over asynchronous channels, using unique ids and timeouts to match each reply to its request.
- [Host Service Bindings](https://awesome-repositories.com/f/software-engineering-architecture/runtime-configuration-apis/host-service-bindings.md) — Provides typed modules for files, networking, processes, storage, and messaging that map onto one shared host interface also implemented by a native toolkit.
- [Sandboxed Plugin Runtime Clients](https://awesome-repositories.com/f/software-engineering-architecture/sandboxed-plugin-runtime-clients.md) — Ships a client-side library that sandboxed capsules use to call host services through a contract shared with the native Rust toolkit.
- [Typed Message Processing](https://awesome-repositories.com/f/software-engineering-architecture/workflow-triggers/inter-workflow-messaging/typed-message-processing.md) — Exchanges messages, tool calls, and stream events using generated shared types plus request-reply messaging with unique ids and timeouts.

### Web Development

- [Plugin Compilation to WebAssembly](https://awesome-repositories.com/f/web-development/webassembly-compilation/plugin-compilation-to-webassembly.md) — Type-checks source, bundles it into a single module, and converts it into a portable WebAssembly component through an automated pipeline. ([source](https://github.com/astrid-runtime/sdk-js/blob/main/README.md))
- [Shared Message Contracts](https://awesome-repositories.com/f/web-development/application-messaging-interfaces/shared-message-contracts.md) — Generates message, tool-call and stream-event types from one shared contract file so both sides of an exchange use identical definitions.

### Part of an Awesome List

- [WebAssembly Build Systems](https://awesome-repositories.com/f/awesome-lists/devtools/webassembly-build-systems.md) — Runs a pipeline that type-checks TypeScript, bundles it into one module and converts it into a WebAssembly component ready to load.

### Data & Databases

- [Key-Value Stores](https://awesome-repositories.com/f/data-databases/key-value-stores.md) — Provides shared key-value storage with schema-versioned migrations, atomic compare-and-swap updates, and paginated key listing. ([source](https://github.com/astrid-runtime/sdk-js/blob/main/CHANGELOG.md))

### DevOps & Infrastructure

- [Background Process Offloading](https://awesome-repositories.com/f/devops-infrastructure/workflow-run-management/asynchronous-run-launches/background-process-offloading.md) — Launches persistent background processes that outlive the caller and can be reconnected by saved id to read logs, send input, signal, or stop. ([source](https://github.com/astrid-runtime/sdk-js/blob/main/CHANGELOG.md))

### Networking & Communication

- [JSON Message Exchanges](https://awesome-repositories.com/f/networking-communication/message-passing/json-message-exchanges.md) — Generates message, tool-call, and stream-event types from one shared contract so both ends of an exchange use identical shapes. ([source](https://github.com/astrid-runtime/sdk-js#readme))
- [Outbound HTTP Requests](https://awesome-repositories.com/f/networking-communication/outbound-http-requests.md) — Sends outbound HTTP requests that return standard response objects, with request controls, response metadata, and a fluent builder. ([source](https://github.com/astrid-runtime/sdk-js/blob/main/CHANGELOG.md))
- [TCP and UDP Socket Interfaces](https://awesome-repositories.com/f/networking-communication/socket-networking/tcp-and-udp-socket-interfaces.md) — Offers outbound HTTP requests, TCP and UDP sockets, and DNS lookups so capsules can talk to remote services.

### User Interface & Experience

- [Class Decorators](https://awesome-repositories.com/f/user-interface-experience/component-utilities/ui-frameworks/rendering-models/composition-rendering-patterns/component-patterns/class-components/class-decorators.md) — Uses class and method decorators to declare tools, commands, hooks, interceptors, and install, upgrade, and startup entry points. ([source](https://github.com/astrid-runtime/sdk-js#readme))
