All authors

Claude Skills by iii-hq
github.com/iii-hq621 skills9 installs1,728 views
- Referenceworker.shutdown() ``` --- Gracefully shut down the client, releasing all resources. Cancels any pending reconnection attempts, rejects all in-flight invocations with an error, closes the WebSocket connection, and stops the background event-loop thread. After this call the instance must not be reused. **Signature** ```python async () -> None ``` ```python worker = register_worker('ws://localhost:49134') await worker.shutdown_async() ``` --- Invoke a remote function. The routing behavior and r...Votes: 0GitHub stars: 18,978
- Reference{/* AUTO-GENERATED FILE. Do not edit. Regenerate with docs/next/scripts/generate-api-docs.mts. */} {/* AI: any skill-check (vale/AI) text fixes belong in the source doc-comments under sdk/packages/rust/iii/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}Votes: 0GitHub stars: 18,978
- NextSolutions to errors you may hit while running the iii engine and workers.Votes: 0GitHub stars: 18,978
- Incremental Adoption<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/incremental-adoption/overview.mdx. -->Votes: 0GitHub stars: 18,978
- LinklyChapter 5 pushed a live trickle of events to observers. This chapter **moves a large amount of data at once**: a CSV of links, sent to one function as a **stream**. A stream is a value in a call's payload. The call carries a small reference, and the SDK sends the bytes over a separate pipe while the function reads them, so the file never has to fit in one JSON message. You'll give this its own `bulk-importer` worker so the `link` worker stays focused on single links.Votes: 0GitHub stars: 18,978
- Linklybase_image: docker.io/iiidev/python:latest scripts: install: python3 -m venv .venv && .venv/bin/pip install -r requirements.txt start: >- grep -q '^[^#[:space:]]' src/main.py || { echo 'analytics: src/main.py is still fully commented; uncomment its Ch. 4 block, then restart the analytics container' >&2; exit 1; }; exec .venv/bin/python -u src/main.py ``` The scaffold ships `analytics/src/main.py` with this code commented out: uncomment its Ch. 4 block (or replace the file with the code below)...Votes: 0GitHub stars: 18,978
- Linklyscripts: build: iii call sandbox::build worker=link run: iii call sandbox::start worker=link sandbox-libkrun: worker: package://api.workers.iii.dev/sandbox-libkrun version: "0.5.0" ``` The `engine:` section is where the engine can be configured, this is useful for when starting a compose project and the engine with `iii compose --up`. `containers` store one entry for each worker. Workers can exist as remote packages or local paths. For example `http` comes from a remote package, while `link` ...Votes: 0GitHub stars: 18,978
- LinklyIn this chapter the browser becomes a worker. It connects to the engine over WebSocket, calls `link::create` directly (no REST API Gateway), observes the live click feed from Chapter 5 to update a counter, and registers a `user::confirm_destructive_op` function the server calls when a delete needs a human's go-ahead.Votes: 0GitHub stars: 18,978
- LinklyEvery cross-worker call flows through the engine, so the engine traces and logs the whole system end to end. In this chapter you open the console to see that, then, if you want, read the same data directly from the engine.Votes: 0GitHub stars: 18,978
- LinklyThis tutorial builds **Linkly**, a link shortener, one worker at a time. You start with a single function that turns `/s/abc` into a redirect, and finish with a multi-tenant link platform that has durable execution, storage, analytics, a live click stream, bulk imports, and permission gated untrusted browser workers that have all the same functionality and observability as the base system. Each chapter adds one capability by adding a worker to your existing system. The point is not the link s...Votes: 0GitHub stars: 18,978
- Linkly- database scripts: build: iii call sandbox::build worker=link run: iii call sandbox::start worker=link database: worker: package://database version: "latest" config_name: database working_dir: . config_override: databases: primary: pool: acquire_timeout_ms: 5000 idle_timeout_ms: 30000 max: 10 url: sqlite:./data/iii.db ``` {/* TODO: Improve this doc once we can add workers w/ config in compose. Move users to compose::add. */} <Note> For simplicity and ease of configuration we've pre-included ...Votes: 0GitHub stars: 18,978
- LinklyReal-time delivery means pushing data to whoever is listening the moment it changes, like a live click counter on a dashboard. On iii that is what observing a function does: `worker.observe(a, b)` runs `b` each time `a` runs. A live click feed is a function that runs once per click, and anyone who wants to hear about clicks observes it, the same way you observed `http::on-request` and `queue::on-message` in earlier chapters. You'll give the feed to a dedicated `click-streamer` worker so the `...Votes: 0GitHub stars: 18,978
- Understanding Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/understanding-iii/compose.mdx. -->Votes: 0GitHub stars: 18,978
- Understanding IiiUnix gave processes a single interface. React gave components a single interface. iii gives every category of software (queues, schedulers, agents, frontends, sandboxes, business logic, etc.) a single interface: the **Function**. There is one primitive and two operators. You **call** a Function to run it now, or you **observe** a Function so that another Function runs when it runs. **Workers** host Functions, and the **Engine** routes between them. Once you have a mental model for that one pr...Votes: 0GitHub stars: 18,978
- Understanding Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/understanding-iii/namespaces.mdx. -->Votes: 0GitHub stars: 18,978
- Upgrading<Warning title="Deprecated"> `iii-stream` is deprecated (iii-stream) and will be removed in an upcoming release. `pubsub` is deprecated (pubsub) and will be removed in an upcoming release. Behavior is unchanged for now. This page is the migration guide. </Warning> Use this page to move each `iii-stream` and `pubsub` use case to primitives every SDK ships: observable functions your workers host, explicit storage with queries, channels, and the durable queue. The sections below also list why bo...Votes: 0GitHub stars: 18,978
- Upgradingtrigger.unregister() ``` **After (0.25)** ```python observer = worker.observe( {"function_id": "timer::on-tick", "args": {"every_ms": 60000}, "deliver": "input"}, "reports::refresh", {"metadata": {"team": "reports"}}, ) observer.dispose() ``` </Tab> <Tab title="Rust"> **Before (0.24)** ```rust use iii_sdk::protocol::RegisterTriggerInput; use serde_json::json; let trigger = worker.register_trigger( RegisterTriggerInput::new("timer", "reports::refresh", json!({ "every_ms": 60_000 })) .with_meta...Votes: 0GitHub stars: 18,978
- Upgrading<Warning> 0.23 also removes engine-managed project workers and the `iii worker` / `worker::*` lifecycle surface. Complete [Move workers from config.yaml to Compose](./workers-to-compose) before starting an existing project. </Warning> 0.23.x adds namespaces as a routing dimension. Workers that declare no namespace land in `default` and behave exactly as before, so most projects upgrade with no code change. The one hard break is durable queue naming on the RabbitMQ adapter. Apply the steps bel...Votes: 0GitHub stars: 18,978
- Upgradingengine: url: ws://127.0.0.1:49134 registration_namespace_grace_ms: 5000 workers: configuration: adapter: name: fs config: directory: ./config iii-worker-manager: host: 127.0.0.1 port: 49134 iii-http-functions: {} iii-stream: host: 127.0.0.1 port: 3112 iii-sandbox: auto_install: true ``` `engine.url` defaults to `ws://127.0.0.1:49134`. Compose writes the engine-only representation to `<project-dir>/.iii/compose/<daemon-namespace>/engine-config.yaml` by default. When `III_COMPOSE_STATE_DIR` is ...Votes: 0GitHub stars: 18,978
- Using IiiAsk the installed binary for its exact command and flag surface: ```bash iii --help iii <subcommand> --help ``` The generated [CLI reference](../cli-reference/index) publishes the same surface.Votes: 0GitHub stars: 18,978
- Using Iiiiii compose iii compose --up ``` The daemon is a worker named `compose`, so every project operation is a [function call](./functions#call-a-function) to `compose::*`. `iii compose --up` is about the same as running `iii`, `iii compose`, and `iii call compose::up` separately. Run `iii` and `iii compose` separately when the engine needs its own lifecycle. See [The daemon and its processes](../understanding-iii/compose#the-daemon-and-its-processes). ```bash iii compose --up --namespace dev -f wo...Votes: 0GitHub stars: 18,978
- Using Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/using-iii/configuration.mdx. -->Votes: 0GitHub stars: 18,978
- Using IiiAsk the installed binary for its exact command and flag surface: ```bash iii --help iii <subcommand> --help ``` The generated [CLI reference](../cli-reference/index) publishes the same surface.Votes: 0GitHub stars: 18,978
- Using Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/using-iii/engine.mdx. -->Votes: 0GitHub stars: 18,978
- Using Iii}) ``` </Tab> <Tab title="Rust"> ```rust use iii_sdk::CallAction; use iii_sdk::protocol::CallRequest; use serde_json::json; let result = worker .call(CallRequest { function_id: "math::add".into(), payload: json!({ "a": 2, "b": 3 }), action: None, // action: Some(CallAction::Void), // fire-and-forget // action: Some(CallAction::Enqueue { queue: "math".to_string() }), // route through queue timeout_ms: None, } // .namespace("default"), // target a specific names...Votes: 0GitHub stars: 18,978
- Using IiiEvery worker has an effective namespace. A worker uses `default` when you do not set one. Use a non-default namespace when multiple tenants or projects must use the same worker name or function id on one engine.Votes: 0GitHub stars: 18,978
- Using Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/using-iii/workers-registry.mdx. -->Votes: 0GitHub stars: 18,978
- Using Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/using-iii/workers-registry.mdx. -->Votes: 0GitHub stars: 18,978
- Using Iiiengine: workers: configuration: {} containers: state: worker: package://api.workers.iii.dev/state version: "0.22.2" config_name: state api: worker: path://./workers/api start_after: [state] scripts: run: pnpm start ``` Registry packages require an explicit version. `path://` workers use `scripts.run` from the Compose file or `scripts.start` from their `iii.worker.yaml` manifest. Start a project and keep its daemon in the foreground: ```bash iii compose build --file worker-compose.yaml iii com...Votes: 0GitHub stars: 18,978
- configurationSchema-validated, reactive registry for named configuration entries — the runtime configuration surface used by engine and Compose workers.Votes: 0GitHub stars: 18,978
- iiiHow iii works and the iii-sdk surface for authoring workers that register, call, and observe functions. Teaches the ordered way to gain a capability before writing code — (1) check functions already registered in the engine, (2) search the public registry via iii-directory, (3) build a worker. Single self-contained skill — meant for system-prompt injection; do not re-fetch.Votes: 0GitHub stars: 18,978
- iii-observabilityOpenTelemetry-backed tracing, structured logs, metrics with rollups, alerts, sampling, and baggage for the engine — emit and query telemetry through `engine::*` functions and react to logs and spans by observing `observability::on-log` and `observability::on-span`.Votes: 0GitHub stars: 18,978
- iii-streamDurable real-time streams with a CRUD function surface plus engine-hosted sources called on item changes and WebSocket subscriber lifecycle — reach for it to build live backends without polling. iii-stream is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streamsVotes: 0GitHub stars: 18,978
- iii-worker-managerWebSocket listener that SDK workers connect to. Use to expose the engine to trusted (internal) and untrusted (RBAC-protected) workers, gate function and observer registration, and audit or transform every invocation through a middleware function. Mounts channel WebSocket endpoints on every listener.Votes: 0GitHub stars: 18,978
- Iii Architecture PatternsUse when composing iii primitives into backend architectures: durable workflows, reactive backends, observer side effects, agentic pipelines, event-driven CQRS, effect pipelines, and event-transform-action automation.Votes: 0GitHub stars: 18,978
- Iii Core PrimitivesUse when registering iii functions, calling them (call with sync, void, or enqueue), observing functions and event sources, creating workers, inspecting the live worker registry, installing registry workers, or streaming data between functions across TypeScript, Python, and Rust.Votes: 0GitHub stars: 18,978
- Iii Engine ConfigConfigure a managed iii engine through worker-compose.yaml or a directly supervised engine through config.yaml. Use for engine ports, RBAC via the rbac-proxy worker, observer limits, streams, sandboxes, and configuration storage.Votes: 0GitHub stars: 18,978
- Iii Error HandlingHandle iii engine and SDK errors across Node, Python, Rust, and browser workers. Use when interpreting error codes, retryability, RBAC denial, timeouts, handler failures, or SDK-specific exception surfaces.Votes: 0GitHub stars: 18,978
- Iii Getting StartedInstall the iii engine, set up your first worker, and get a working backend running. Use when a user wants to start a new iii project, install the SDK, or needs help with initial setup and configuration.Votes: 0GitHub stars: 18,978
- Iii Sdk ReferenceUse when working with iii SDK APIs across Node.js, browser, Python, Rust, or Go: package installation, worker initialization, function registration, calling functions, observers and observer hooks, local dispatch, streams, logging, OpenTelemetry, and language-specific caveats.Votes: 0GitHub stars: 18,978
- PresentationTurn a tech-spec directory into an interactive, marketing-grade web presentation — built so engineers understand the design, the reader is convinced of the why, and the result is shareable in public. Use when someone wants a spec turned into a deck.Votes: 0GitHub stars: 18,978
- Cli Reference{/* AUTO-GENERATED FILE, DO NOT EDIT. Generated from the clap CLI definitions by the hidden `gen-cli-docs` subcommand. Regenerate with `scripts/generate-cli-docs.sh`. */} Reference for the `iii` binary and the `iii console` runtime it dispatches to. Running `iii` with no subcommand starts the engine. The same information is available from the binaries themselves via `iii --help` and `iii <subcommand> --help`. For a guided overview, see [CLI](../using-iii/cli).Votes: 0GitHub stars: 18,978
- Creating Workers```Votes: 0GitHub stars: 18,978
- LinklyWhere a stream is for a live trickle of events, a **channel** is for **moving a large amount of data at once**: a direct streaming pipe between two endpoints, rather than one request and response. Channels are bidirectional (each end has both a reader and a writer), but here you'll stream in one direction, uploading a CSV of links. You'll give this its own `bulk-importer` worker so the `link` worker stays focused on single links.Votes: 0GitHub stars: 18,978
- Linklyvalue: queue_configs: clicks: type: standard max_retries: 5 concurrency: 5 adapter: name: builtin ``` <Note> Queue names are references to the queue and do not place any restrictions on what can be put into a given queue. </Note> You already wrote `link::record_click` in Chapter 3, where `http::redirect` triggers it directly. Nothing about that function needs to change to make it queuable. You only change how it's triggered with a `TriggerAction`. **First import `TriggerAction`** into `link/s...Votes: 0GitHub stars: 18,978
- Linklyengine: workers: {} containers: http: worker: package://api.workers.iii.dev/http version: "0.21.3" config_name: http state: worker: package://api.workers.iii.dev/state version: "0.22.2" config_name: state config_override: adapter: name: kv config: store_method: in_memory ``` The `engine:` section makes this Compose invocation own the engine. Project workers belong only under `containers:`. `state` uses an in-memory store by default, so every restart starts clean. That's what we want for this ...Votes: 0GitHub stars: 18,978
- Linklyiii-worker-manager: host: 127.0.0.1 port: 49134 iii-worker-manager#browser: host: 127.0.0.1 port: 3110 rbac: auth_function_id: auth::browser expose_functions: - match("link::create") - match("link::request_delete") - match("stream::*") ``` Restart the project so Compose can materialize the changed engine configuration: ```bash iii compose --up --namespace linkly --file worker-compose.yaml ``` `expose_functions` is an allowlist of which functions a browser session can call. `auth_function_id` ...Votes: 0GitHub stars: 18,978
- LinklyObservability in iii isn't something you bolt onto each service. Every cross-worker call already flows through the engine, so the engine can trace and log the whole system end to end. In this chapter you open the console to see that, then, if you want, read the same data directly from the engine.Votes: 0GitHub stars: 18,978
- LinklyThis tutorial builds **Linkly**, a link shortener, one worker at a time. You start with a single function that turns `/s/abc` into a redirect, and finish with a multi-tenant link platform that has durable execution, storage, analytics, a live click stream, bulk imports, and a browser worker on the same bus. Each chapter adds one capability by adding a worker to your existing system. The point is not the link shortener itself, but the pattern: a real system on iii is a set of small workers tha...Votes: 0GitHub stars: 18,978
- LinklyLinkly's links live in `state`, which you set to in-memory back in Chapter 1. Restart the engine and everything is gone. In this chapter you add a `database` worker (SQLite) that holds the durable record of links and a timestamped row for every click on a short code. `state` stays in the picture as a fast read cache in front of the database. <Info> `state` can also persist on its own (`store_method: file_based` with a `file_path`). This chapter uses a dedicated `database` worker instead, whic...Votes: 0GitHub stars: 18,978