All authors

Claude Skills by iii-hq
github.com/iii-hq621 skills9 installs1,728 views
- 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
- 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
- LinklyIn this chapter you will build the core of Linkly: a worker that creates short codes and resolves them back to URLs, callable first from the command line and then over HTTP. By the end you will have a working web service where `POST /links` mints a short code and `GET /s/:code` redirects to the original URL.Votes: 0GitHub stars: 18,978
- Linkly- name: iii-worker-manager config: port: 49134 - name: iii-worker-manager config: host: 127.0.0.1 port: 3110 rbac: auth_function_id: auth::browser expose_functions: - match("link::create") - match("link::request_delete") - match("stream::*") ``` `expose_functions` is an allowlist of which functions a browser session can call. `auth_function_id` names a function `iii-worker-manager` invokes on every connection to admit or reject it; you write that next.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
- Linkly`iii-stream` is for **real-time data transmission**: pushing data to a client the moment it changes, like a live feed of clicks for a dashboard. A stream is bidirectional (subscribers can send messages back as well as receive them), but here you only need to broadcast clicks outward. You'll move the live-broadcast concern into its own `click-streamer` worker so the `link` worker stays focused on links.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/engine.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: **Workers** host work, **Functions** are the work, **Triggers** are what causes the work to run, and the **Engine** routes between them. Once you have a mental model for those four pieces, everything else in iii is a variation on a theme. <Note>This page uses the [Quickstart tutorial]...Votes: 0GitHub stars: 18,978
- Upgrading``` </Tab> <Tab title="Rust"> ```rust // Before let sdk: III = /* ... */; use iii_sdk::WorkerTelemetryMeta; // After let sdk: IIIClient = /* ... */; use iii_sdk::TelemetryOptions; ``` </Tab> </Tabs>Votes: 0GitHub stars: 18,978
- Upgradingiii --use-default-config iii project init . iii ``` See [Engine](../using-iii/engine) for the current no-config behavior.Votes: 0GitHub stars: 18,978
- Using IiiFor the most current list of commands, flags, and defaults, ask the binary directly: ```bash iii --help #lists iii's flags and available subcommands iii subcommand --help #lists the specific actions each sucommand accepts ``` Each subcommand's help also provides the defaults and environment variables that affect each command. <Note> The full CLI surface, including `iii worker` and `iii console`, is also published as an automatically generated [CLI reference](../cli-reference/index)...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 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::TriggerAction; use iii_sdk::protocol::TriggerRequest; use serde_json::json; let result = worker .trigger(TriggerRequest { function_id: "math::add".into(), payload: json!({ "a": 2, "b": 3 }), action: None, // action: Some(TriggerAction::Void), // fire-and-forget // action: Some(TriggerAction::Enqueue { queue: "math".to_string() }), // route through queue timeout_ms: None, }) .await?; ``` </Tab> </Tabs> Some ...Votes: 0GitHub stars: 18,978
- Using Iiiworker.register_trigger({ "type": "http", "function_id": "math::add", "config": {"api_path": "/math/add", "http_method": "POST"}, }) ``` </Tab> <Tab title="Rust"> ```rust use iii_sdk::RegisterTriggerInput; use serde_json::json; // http worker not started worker.register_trigger(RegisterTriggerInput { trigger_type: "http".into(), function_id: "math::add".into(), config: json!({ "api_path": "/math/add", "http_method": "POST" }), metadata: None, })?; ``` </Tab> </Tabs> Start the http worker afte...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{/* TODO: Re-link worker references to https://workers.iii.dev/workers/<name> once the Worker Docs migration ships. */} {/* TODO: Add back once worker init is merged. <Note> This page covers using existing workers. For creating new workers (`iii worker init`), registering functions and triggers, and building or publishing worker images, see [Creating Workers / Workers](../creating-workers/workers). </Note> */}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 worker` and `iii console` runtimes 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 Workerslogger.debug("cache lookup", {"key": key}) logger.info("processing link", {"slug": slug}) logger.warn("retrying upstream", {"attempt": attempt}) logger.error("failed to persist", {"slug": slug, "err": str(err)}) ``` </Tab> <Tab title="Rust"> ```rust use iii_helpers::observability::Logger; use serde_json::json; let logger = Logger::new(); // each level takes a message and optional structured data logger.debug("cache lookup", Some(json!({ "key": key }))); logger.info("processing link", Some(jso...Votes: 0GitHub stars: 18,978
- Creating Workersiii trigger sandbox::run image=python lang=python code='print(2+2)' | jq -r .stdout ``` `lang` accepts `node`, `python`, `shell`, or an interpreter path. Pass `keep_sandbox=true` to leave the VM running afterwards (then stop it yourself with `sandbox::stop`).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
- Reactive CrudThis tutorial builds a real-time CRUD service with iii. You'll model your data on the iii state store, expose create/read/update/delete operations over HTTP by observing `http::on-request`, and stream live changes to connected clients. By the end you'll have a service that streams state changes to clients in real time without writing pub/sub code.Votes: 0GitHub stars: 18,978
- Using IiiThis page covers running the iii engine and its workers in a production environment. For local development, see the [Quickstart](../quickstart) and the [Engine](./engine) page.Votes: 0GitHub stars: 18,978
- Using Iii{/* TODO: Re-link worker references to https://workers.iii.dev/workers/<name> once the Worker Docs migration ships. */} {/* TODO: Add back once worker init is merged. <Note> This page covers using existing workers. For creating new workers (`iii worker init`), registering functions and triggers, and building or publishing worker images, see [Creating Workers / Workers](../creating-workers/workers). </Note> */}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. Running `iii` with no subcommand starts the engine. The same information is available from the binary itself via `iii --help` and `iii <subcommand> --help`. For a guided overview, see [CLI](../using-iii/cli).Votes: 0GitHub stars: 18,978
- Creating Workerstotal = 0 async for chunk in channel.reader: total += len(chunk) print(f"read {total} bytes") asyncio.run(main()) ``` </Tab> <Tab title="Rust"> ```rust use iii_sdk::{register_worker, Error, InitOptions}; async fn main() -> Result<(), Error> { let worker = register_worker("ws://localhost:49134", InitOptions::default()); let channel = iii_sdk::helpers::create_channel(&worker, None).await?; // Another worker holds channel.writer_ref and writes to it. let bytes = channel.reader.read_all().await?;...Votes: 0GitHub stars: 18,978
- Creating Workersasync def write(data, metadata=None): return {"ok": True, "metadata": metadata} worker.register_function("audit::write", write) ``` </Tab> <Tab title="Rust"> ```rust // Two-argument closures receive the sidecar as `Option<Value>`; // one-argument closures keep working unchanged. worker.register_function( "audit::write", RegisterFunction::new_async(|input: Value, metadata: Option<Value>| async move { Ok(serde_json::json!({ "ok": true, "metadata": metadata })) }), ); ``` </Tab> </Tabs>Votes: 0GitHub stars: 18,978
- Creating Workersiii --config config.yaml iii compose --namespace dev --engine ws://127.0.0.1:49134 ``` Run the remaining commands from a third terminal in that same project directory: ```bash iii trigger -n dev compose::add worker=http ``` <Note> This page covers the basic endpoint flow. For path patterns, methods, headers, and response handling, see the [http worker docs](https://workers.iii.dev/workers/http). The worker's server settings (port, host, CORS, timeouts) are managed at runtime through the [conf...Votes: 0GitHub stars: 18,978
- Creating Workerslogger.debug("cache lookup", {"key": key}) logger.info("processing link", {"slug": slug}) logger.warn("retrying upstream", {"attempt": attempt}) logger.error("failed to persist", {"slug": slug, "err": str(err)}) ``` </Tab> <Tab title="Rust"> ```rust use iii_helpers::observability::Logger; use serde_json::json; let logger = Logger::new(); // each level takes a message and optional structured data logger.debug("cache lookup", Some(json!({ "key": key }))); logger.info("processing link", Some(jso...Votes: 0GitHub stars: 18,978
- Creating Workersiii --config config.yaml iii compose --namespace dev --engine ws://127.0.0.1:49134 ``` `iii compose` is an intentional verbless daemon invocation, documented in the [CLI reference](../cli-reference/index#iii-compose). The `-n` used below is the short form of `--namespace` for [`iii call`](../using-iii/cli). Run the remaining commands from a third terminal in that same project directory: ```bash iii call -n dev compose::add worker=queue ``` <Note> This page covers common queue patterns. For th...Votes: 0GitHub stars: 18,978
- Creating Workersiii call sandbox::run image=python lang=python code='print(2+2)' | jq -r .stdout ``` </Tab> <Tab title="Node / TypeScript"> ```typescript import { registerWorker } from "iii-sdk"; const worker = registerWorker(); // the reply carries stdout, stderr, exit_code, timed_out, duration_ms and success const reply = await worker.call({ function_id: "sandbox::run", payload: { image: "python", lang: "python", code: "print(2+2)" }, }); console.log(reply.stdout); // 4 ``` </Tab> <Tab title="Python"> ```p...Votes: 0GitHub stars: 18,978
- Creating Workers``` </Tab> <Tab title="Rust"> ```rust let channel = worker.create_channel(None).await?; // channel.writer // channel.reader // channel.writer_ref // channel.reader_ref ``` </Tab> </Tabs> Write the payload to the local `writer` and close it when finished. The bytes flow through the engine to whichever worker holds the matching `reader`. <Tabs> <Tab title="Node / TypeScript"> ```typescript const channel = await worker.createChannel(); channel.writer.stream.end(Buffer.from("file contents")); ```...Votes: 0GitHub stars: 18,978
- Creating Workers- name: iii-worker-manager config: port: 49134 - name: iii-worker-manager config: host: 127.0.0.1 port: 3110 rbac: auth_function_id: auth::browser expose_functions: - match: "link::create" namespace: browser - match: "stream::*" namespace: browser ``` <Warning title="Deprecated"> The `stream::*` rule above exposes deprecated functions. `stream::*` is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Expose your own domain functions instead; see...Votes: 0GitHub stars: 18,978
- Creating Workers``` For a VM worker, `runtime.base_image` is the base image that `sandbox::build` starts from. A `path://` worker that sets it runs in a VM unless its container in `worker-compose.yaml` declares its own `scripts.build`. See [Compose / VM workers](../using-iii/compose#vm-workers) and [Upgrading VM workers from 0.26.x](../upgrading/explicit-vm-workers). The images that ship with iii come in two variants: | Image | Contents ...Votes: 0GitHub stars: 18,978
- Creating Workers{/* Note: move this up */} The iii registry at [workers.iii.dev](https://workers.iii.dev/) is where published workers live so other iii projects can declare them in `worker-compose.yaml` or add them with `compose::add`. Compose is a CLI and daemon subsystem, not a registry worker. Its daemon registers `compose::*`, uses `worker-compose.yaml` as the project manifest, and uses `-n` / `--namespace` to select the daemon that receives a trigger.Votes: 0GitHub stars: 18,978
- Creating Workersworkers = worker.call({ "function_id": "engine::workers::list", "payload": {}, })["workers"] functions = worker.call({ "function_id": "engine::functions::list", "payload": {"include_internal": False}, })["functions"] observers = worker.call({ "function_id": "engine::observers::list", "payload": {}, })["observers"] print(workers, functions, observers) ``` </Tab> <Tab title="Rust"> ```rust use iii_sdk::protocol::CallRequest; use iii_sdk::{InitOptions, register_worker}; use serde_json::json; asy...Votes: 0GitHub stars: 18,978
- Docs{/* <Tip> The tabs above split the site into Docs (start here), Tutorials, How-tos, Patterns, SDK & Engine Reference, and Changelog. Read this page and the Docs tab in order first. The other tabs make more sense once you have the model. </Tip> */}Votes: 0GitHub stars: 18,978
- Docs{/* TODO (community feedback): Add a direct binary-download path alongside the installers so users who do not want to verify a remote script with a bot have an alternative. Link to the GitHub Releases page for the engine and include PATH setup instructions per OS. */}Votes: 0GitHub stars: 18,978
- Creating Workers{/* Note: move this up */} The iii registry at [workers.iii.dev](https://workers.iii.dev/) is where published workers live. Other iii projects declare them in `worker-compose.yaml` or add them with `compose::add`. `worker-compose.yaml` is the Compose project manifest. It lists the workers one project runs. `iii.worker.yaml` is the manifest of one worker. See [Compose](../using-iii/compose#worker-composeyaml) for the project manifest fields.Votes: 0GitHub stars: 18,978
- PatternsWhen you want to bring an existing service (a third-party API, a library, an in-house microservice) into an iii system without rewriting it, wrap it in a thin worker that exposes the service's capabilities as iii functions. The worker translates between the existing service's interface and the iii function-call shape.Votes: 0GitHub stars: 18,978
- NextIn this tutorial you will learn how iii makes it unreasonably simple to build and extend systems. <Tip title="Install iii before proceeding"> Make sure you have installed iii before proceeding. If you haven't then visit the [Install](./install) guide first. There you can also learn how to [set up iii for agentic development](./install#start-a-project). </Tip> <Note> The Quickstart is our original tutorial. If you want a guided, agentic learning experience that can be completed in a few minute...Votes: 0GitHub stars: 18,978
- Reference{/* TODO: Re-link worker references to https://workers.iii.dev/workers/<name> once the Worker Docs migration ships. */} <Note> This page documents the wire-level protocol the engine and SDK workers exchange. Most projects use a language SDK ([Node](./sdk-node), [Python](./sdk-python), [Rust](./sdk-rust), [Browser](./sdk-browser)) and never touch the protocol directly. The shapes below are the source of truth those SDKs serialize to. </Note> <Note> Observability introspection (traces, logs, me...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/node/helpers/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}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/python/helpers/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}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/helpers/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}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/node/iii-browser/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}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/node/iii/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}Votes: 0GitHub stars: 18,978