thanks-computer

module
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: MPL-2.0

README

Thanks, Computer (TxCo)

Thanks, Computer is a distributed runtime for coordinating business logic across systems, services, humans, and time.

Where an operating system coordinates processes on a single machine, TxCo coordinates operations across an event flow:

            ●  event in
            │
         ┌──┴──┐
         │flow │
         └──┬──┘
      ┌─────┼─────┐
      ▼     ▼     ▼
    ┌───┐ ┌───┐ ┌───┐
    │op │ │op │ │op │   parallel execution
    └─┬─┘ └─┬─┘ └─┬─┘
      └─────┼─────┘
         merge
           │
           ▼
          ● output

An incoming event (HTTP, email, cron, queue, webhook, etc.) enters an operation stack (OpStack).

At each step, TxCo evaluates resonators — small rules written in txcl that determine which operations should run. Matching operations execute in parallel, their outputs deep-merge into a shared event document, and the flow continues to the next step.

The model

TxCo separates three concerns:

  • Flow — when and under what conditions operations run
  • Execution — the actual code or external service being invoked
  • Merge — combining results back into the event flow

This separation makes it possible to coordinate workflows that span:

  • multiple services
  • multiple organizations
  • humans and AI systems
  • asynchronous and long-running processes

Operations stay small and composable, while the OpStack defines how they cooperate as a larger system — similar to how departments coordinate work inside an organization.

Inspiration

TxCo draws inspiration from early distributed AI systems and event-driven architectures, particularly:

These systems explored how complex behavior can emerge from many small, specialized processes operating over shared state.

License

Mozilla Public License 2.0.

Directories

Path Synopsis
chassis
admission
Package admission holds the chassis's pre-pipeline admission gates: a per-tenant runtime-state check (a suspended or disabled tenant is denied before its stack runs), per-tenant node-local rate-limit and concurrency caps, and a process-level drain flag (signal-driven; bleeds the node out of a load balancer).
Package admission holds the chassis's pre-pipeline admission gates: a per-tenant runtime-state check (a suspended or disabled tenant is denied before its stack runs), per-tenant node-local rate-limit and concurrency caps, and a process-level drain flag (signal-driven; bleeds the node out of a load balancer).
app
Package app is the chassis entrypoint, factored out of cmd/txco so a downstream build (e.g.
Package app is the chassis entrypoint, factored out of cmd/txco so a downstream build (e.g.
artifact
Package artifact is the content-addressed artifact store: where snapshot (and future event) artifacts live.
Package artifact is the content-addressed artifact store: where snapshot (and future event) artifacts live.
artifact/filestore
Package filestore is the local-filesystem artifact backend: the built-in default, zero infrastructure, directly inspectable.
Package filestore is the local-filesystem artifact backend: the built-in default, zero infrastructure, directly inspectable.
auth
Package auth carries the request-scoped auth context plus its helpers.
Package auth carries the request-scoped auth context plus its helpers.
auth/policy
Package policy gates handlers behind capability checks.
Package policy gates handlers behind capability checks.
auth/registry
Package registry reads (and minimally mutates) the actor / actor_keys / tenants / actor_memberships tables.
Package registry reads (and minimally mutates) the actor / actor_keys / tenants / actor_memberships tables.
auth/signature
Package signature is the chassis-owned wrapper around RFC 9421 HTTP message signatures.
Package signature is the chassis-owned wrapper around RFC 9421 HTTP message signatures.
auth/throttle
Package throttle is a small per-key fixed-window rate limiter.
Package throttle is a small per-key fixed-window rate limiter.
chat
Package chat is the chassis-owned `ai://chat` exec dispatch surface.
Package chat is the chassis-owned `ai://chat` exec dispatch surface.
chat/openrouter
Package openrouter is the v1 ai://chat backend.
Package openrouter is the v1 ai://chat backend.
cli
Package cli holds the txco subcommand surface — the developer-facing rule-authoring loop.
Package cli holds the txco subcommand surface — the developer-facing rule-authoring loop.
cli/auth
Package auth implements the `txco auth …` CLI surface — keygen, dev enrollment, signed whoami, key rotation, and revocation.
Package auth implements the `txco auth …` CLI surface — keygen, dev enrollment, signed whoami, key rotation, and revocation.
cli/banner
Package banner holds the txco logo + small TTY helpers used by every subcommand's help/usage screen.
Package banner holds the txco logo + small TTY helpers used by every subcommand's help/usage screen.
cli/bundle
Package bundle walks an on-disk OPS/ tree and produces a flat list of (stack, scope, name, txcl, mock_req, mock_res) records suitable for POSTing to the admin /v1/ops/import endpoint.
Package bundle walks an on-disk OPS/ tree and produces a flat list of (stack, scope, name, txcl, mock_req, mock_res) records suitable for POSTing to the admin /v1/ops/import endpoint.
cli/client
Package client is the small HTTP client the txco CLI uses to talk to a running chassis admin server.
Package client is the small HTTP client the txco CLI uses to talk to a running chassis admin server.
cli/cloud
Package cloud implements `txco login` — cloud identity for the thanks-computer cloud, via OAuth (Authorization Code + PKCE).
Package cloud implements `txco login` — cloud identity for the thanks-computer cloud, via OAuth (Authorization Code + PKCE).
cli/dev
Package dev contains the process-spawning, health-checking, and file-watching helpers used by `txco dev`.
Package dev contains the process-spawning, health-checking, and file-watching helpers used by `txco dev`.
cli/lockfile
Package lockfile reads and writes txco.packages.lock.yaml — the repo-root, committed record of which packages produced the workspace's materialized files (workspace PROVENANCE).
Package lockfile reads and writes txco.packages.lock.yaml — the repo-root, committed record of which packages produced the workspace's materialized files (workspace PROVENANCE).
cli/manifest
Package manifest models txco.package.yaml — a TxCo package's identity, compatibility, op-resolution contract, and advisory metadata — and validates a package tree against it.
Package manifest models txco.package.yaml — a TxCo package's identity, compatibility, op-resolution contract, and advisory metadata — and validates a package tree against it.
cli/op
Package compute implements the authoring CLI for sandboxed op:// computes (wired as `txco op`).
Package compute implements the authoring CLI for sandboxed op:// computes (wired as `txco op`).
cli/oprefs
Package oprefs resolves `op://NAME` symbolic references in txcl rule bodies to concrete URLs based on a workspace's operations registry.
Package oprefs resolves `op://NAME` symbolic references in txcl rule bodies to concrete URLs based on a workspace's operations registry.
cli/sign
Package sign implements txco's native ed25519 package-signature format: a small OCI artifact, discovered by the cosign tag convention (sha256:<hex> → sha256-<hex>.sig), whose single layer is the exact signed payload bytes and whose annotations carry the ed25519 signature, key id, and public key.
Package sign implements txco's native ed25519 package-signature format: a small OCI artifact, discovered by the cosign tag convention (sha256:<hex> → sha256-<hex>.sig), whose single layer is the exact signed payload bytes and whose annotations carry the ed25519 signature, key id, and public key.
cli/signer
Package signer is the CLI-side RFC 9421 signing surface.
Package signer is the CLI-side RFC 9421 signing surface.
cli/source
Package source fetches a tree from a remote or local origin and copies it into a destination directory.
Package source fetches a tree from a remote or local origin and copies it into a destination directory.
cli/state
Package state owns the .txco/<stack>.state.json file the txco CLI writes after a `pull` and reads on `push`.
Package state owns the .txco/<stack>.state.json file the txco CLI writes after a `pull` and reads on `push`.
cli/update
Package update implements `txco update check` and `txco upgrade`: it discovers the latest release from GitHub, compares versions, detects how the running binary was installed, and (for self-managed installs) downloads + verifies + atomically replaces the binary.
Package update implements `txco update check` and `txco upgrade`: it discovers the latest release from GitHub, compares versions, detects how the running binary was installed, and (for self-managed installs) downloads + verifies + atomically replaces the binary.
compute
Package compute is the sandboxed local-compute seam.
Package compute is the sandboxed local-compute seam.
compute/identity
Package identity is a reference compute engine that echoes its input back as output.
Package identity is a reference compute engine that echoes its input back as output.
compute/javyplugin
Package javyplugin vendors the Javy QuickJS plugin used to run JS/TS nano-ops as *dynamically linked* wasm modules.
Package javyplugin vendors the Javy QuickJS plugin used to run JS/TS nano-ops as *dynamically linked* wasm modules.
compute/storeresolver
Package storeresolver resolves compute refs against the chassis content-addressed artifact.Store (the same store snapshots use).
Package storeresolver resolves compute refs against the chassis content-addressed artifact.Store (the same store snapshots use).
compute/wazero
Package wazero is the reference in-process compute engine: it runs a content-addressed WASI module on the pure-Go wazero runtime (no CGO).
Package wazero is the reference in-process compute engine: it runs a content-addressed WASI module on the pure-Go wazero runtime (no CGO).
continuation
Package continuation provides durable, immutable, event-sourced storage for suspended opstack runs ("continuations").
Package continuation provides durable, immutable, event-sourced storage for suspended opstack runs ("continuations").
continuation/filestore
Package filestore is the local-filesystem continuation backend: the bundled default, zero infrastructure, directly inspectable.
Package filestore is the local-filesystem continuation backend: the bundled default, zero infrastructure, directly inspectable.
controlapply
Package controlapply is the consume side of the control-plane contract: a background controller that polls a feed.Source for control events and applies them to the local databases so a fleet stays in sync.
Package controlapply is the consume side of the control-plane contract: a background controller that polls a feed.Source for control events and applies them to the local databases so a fleet stays in sync.
controlevent
Package controlevent defines the control-plane event contract: the notification a control plane appends and a fleet chassis consumes.
Package controlevent defines the control-plane event contract: the notification a control plane appends and a fleet chassis consumes.
controlpublish
Package controlpublish is the producer half of fleet sync: a background pump that drains the control_events_outbox table and publishes pending rows via feed.Sink.
Package controlpublish is the producer half of fleet sync: a background pump that drains the control_events_outbox table and publishes pending rows via feed.Sink.
cron
Package cron is the cron-dispatch seam.
Package cron is the cron-dispatch seam.
cron/local
Package local is the in-process cron Queue: a buffered channel feeding a fixed pool of worker goroutines.
Package local is the in-process cron Queue: a buffered channel feeding a fixed pool of worker goroutines.
demo
Package demo holds the txco demo's curriculum — the tracks, steps, and starting ops that `txco demo` seeds into a chassis at boot.
Package demo holds the txco demo's curriculum — the tracks, steps, and starting ops that `txco demo` seeds into a chassis at boot.
egress
Package egress is the outbound op-dial policy seam.
Package egress is the outbound op-dial policy seam.
egress/open
Package open registers the "open" egress policy: it allows every outbound op dial.
Package open registers the "open" egress policy: it allows every outbound op dial.
egress/private
Package private registers the "private" egress policy: it blocks outbound op dials whose resolved IP falls in loopback, private, link-local (incl.
Package private registers the "private" egress policy: it blocks outbound op dials whose resolved IP falls in loopback, private, link-local (incl.
feed
Package feed is the control-event feed seam: where a chassis reads the ordered stream of control events it must apply to stay in sync.
Package feed is the control-event feed seam: where a chassis reads the ordered stream of control events it must apply to stay in sync.
feed/filesource
Package filesource is the local-directory feed source: zero infrastructure, directly inspectable, useful for development and as a drop point a sidecar can write into.
Package filesource is the local-directory feed source: zero infrastructure, directly inspectable, useful for development and as a drop point a sidecar can write into.
feed/nop
Package nop is the disabled feed source + sink: the single-node default.
Package nop is the disabled feed source + sink: the single-node default.
hxid
Package hxid produces sortable, base58-encoded unique IDs backed by ULIDs.
Package hxid produces sortable, base58-encoded unique IDs backed by ULIDs.
jsonrpc
Package jsonrpc is an internal framing helper for JSON-RPC 2.0 requests and responses.
Package jsonrpc is an internal framing helper for JSON-RPC 2.0 requests and responses.
metrics
Package metrics wires OpenTelemetry tracing and metrics for the chassis.
Package metrics wires OpenTelemetry tracing and metrics for the chassis.
opname
Package opname is the single source of truth for what a stack name and an operation (rule) name may contain.
Package opname is the single source of truth for what a stack name and an operation (rule) name may contain.
ops
Package ops hosts chassis-core op handlers that consume the per-tenant secret store.
Package ops hosts chassis-core op handlers that consume the per-tenant secret store.
secrets
Package secrets implements the per-tenant secret store.
Package secrets implements the per-tenant secret store.
server/admin
Package admin runs the second HTTP server fronting the rule-mutation API.
Package admin runs the second HTTP server fronting the rule-mutation API.
server/admin/ui
Package ui owns the embedded admin-ui Svelte bundle and serves it over HTTP.
Package ui owns the embedded admin-ui Svelte bundle and serves it over HTTP.
server/continuation/ui
Package ui owns the embedded continuation "please wait" Svelte bundle.
Package ui owns the embedded continuation "please wait" Svelte bundle.
server/ingress
Package ingress implements the chassis's first-class router: it maps source-specific signal keys (HTTP host, TCP listener, cron job) to a `(tenant, stack)` target, before any txcl rule evaluation.
Package ingress implements the chassis's first-class router: it maps source-specific signal keys (HTTP host, TCP listener, cron job) to a `(tenant, stack)` target, before any txcl rule evaluation.
server/personality/dns
Package dns implements the chassis's authoritative-DNS head: a personality that answers DNS queries for zones explicitly delegated to this chassis, straight from an in-memory snapshot of the dns_zones/dns_records tables.
Package dns implements the chassis's authoritative-DNS head: a personality that answers DNS queries for zones explicitly delegated to this chassis, straight from an in-memory snapshot of the dns_zones/dns_records tables.
server/personality/lmtp
Package lmtp implements the chassis's LMTP head: a personality that speaks LMTP (RFC 2033) to a colocated Postfix (or any LMTP client) and turns each delivery into a normal txcl envelope.
Package lmtp implements the chassis's LMTP head: a personality that speaks LMTP (RFC 2033) to a colocated Postfix (or any LMTP client) and turns each delivery into a normal txcl envelope.
server/personality/sweep
Package sweep is the continuation-store janitor: a single periodic background pass that fails abandoned/expired runs, fails runs whose resumer crashed mid-resume, and purges long-dead runs.
Package sweep is the continuation-store janitor: a single periodic background pass that fails abandoned/expired runs, fails runs whose resumer crashed mid-resume, and purges long-dead runs.
server/static
Package static serves bundled / workspace files for the txco://static op, layered first-match-wins: a routed stack's own <workspace>/OPS/<stack>/FILES/** , the chassis-wide <workspace>/FILES/** , then the embedded chassis default (favicon.ico).
Package static serves bundled / workspace files for the txco://static op, layered first-match-wins: a routed stack's own <workspace>/OPS/<stack>/FILES/** , the chassis-wide <workspace>/FILES/** , then the embedded chassis default (favicon.ico).
snapshot
Package snapshot turns the runtime SQLite DB into a content-addressed, checksummed, model-versioned artifact and restores one SAFELY.
Package snapshot turns the runtime SQLite DB into a content-addressed, checksummed, model-versioned artifact and restores one SAFELY.
sysops
Package sysops loads trusted, chassis-local opstacks into the in-memory ops snapshot at startup.
Package sysops loads trusted, chassis-local opstacks into the in-memory ops snapshot at startup.
tenants
Package tenants owns the tenants and tenant_hostnames tables in runtime.db.
Package tenants owns the tenants and tenant_hostnames tables in runtime.db.
tls
Package tls is the chassis's bundled TLS/ACME layer: an embedded ACME client (certmagic) that obtains and renews certificates for delegated zones, solving the ACME DNS-01 challenge IN-PROCESS against the chassis's own authoritative DNS head.
Package tls is the chassis's bundled TLS/ACME layer: an embedded ACME client (certmagic) that obtains and renews certificates for delegated zones, solving the ACME DNS-01 challenge IN-PROCESS against the chassis's own authoritative DNS head.
trace
Package trace records per-request artifacts (the inbound envelope, every op execution, the final response, plus a timeline of routing events) to durable storage.
Package trace records per-request artifacts (the inbound envelope, every op execution, the final response, plus a timeline of routing events) to durable storage.
txcl/ast
Package ast defines the runtime value AST nodes shared across the txcl parser, runtime evaluator, and processor.
Package ast defines the runtime value AST nodes shared across the txcl parser, runtime evaluator, and processor.
txcl/funcs
Package funcs is the curated registry of inline txcl functions — the `&name(args...)` runtime calls that complement `txco://` ops.
Package funcs is the curated registry of inline txcl functions — the `&name(args...)` runtime calls that complement `txco://` ops.
txcl/runtime
Package runtime is the txcl value-resolution layer.
Package runtime is the txcl value-resolution layer.
usage
Package usage emits one append-only event per completed request — the raw material a future control plane aggregates into per-tenant counts, quotas, and billing.
Package usage emits one append-only event per completed request — the raw material a future control plane aggregates into per-tenant counts, quotas, and billing.
cmd
txco command
Package db exposes the SQLite schema migrations as an embedded filesystem so the chassis binary can boot anywhere without needing the repo checkout on disk.
Package db exposes the SQLite schema migrations as an embedded filesystem so the chassis binary can boot anywhere without needing the repo checkout on disk.
sdk
op
Package op embeds the @txco/op TypeScript SDK sources so the `txco op` build pipeline can resolve `import { op } from "@txco/op"` (and its subpaths) with no npm install.
Package op embeds the @txco/op TypeScript SDK sources so the `txco op` build pipeline can resolve `import { op } from "@txco/op"` (and its subpaths) with no npm install.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL