All authors

Claude Skills by iii-hq
github.com/iii-hq621 skills10 installs1,735 views
- 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
- 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
- LinklyThis path builds Linkly with an AI agent. You give the agent one prompt per chapter; it writes the workers, and you check the result. The goal here is to build a working link shortener service while demonstrating iii's efficiency when building systems agentically, along with its 4 core properties which we call CODE: - Composability - Observability - Discoverability - Extensibility We'll present them a bit out of order but hopefully this mnemonic helps you remember what iii is all about.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
- 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
- Linklybase_image: docker.io/iiidev/node:latest scripts: install: "npm install" start: "npm run start" ``` <Info> Compose runs the worker from `scripts.start`, but a worker can also be an ordinary service. Any process that uses a iii SDK and calls `registerWorker()` is a worker. <p> Learn more about the [`iii.worker.yaml` manifest](/creating-workers/workers#worker-manifest). </p> </Info> `link/package.json` declares the dependencies. Its `start` script uses `tsx watch`, which runs the TypeScript sou...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), binds to 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
- 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
- LinklyReal-time delivery means pushing data to whoever is listening the moment it changes, like a live click counter on a dashboard. On iii there is no special channel for this: a worker declares its own **trigger type**, and anyone who wants to hear about clicks binds a function to it, the same way you bound functions to `http` and `durable:subscriber` in earlier chapters. You'll give that job to a dedicated `click-streamer` worker so the `link` worker stays focused on links. A notification is not...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<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 already ships: worker-owned trigger types, explicit storage with queries, channels, and the durable queue. The sections below also list why both a...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 Iiiapi_key: ${ANTHROPIC_API_KEY} ``` </Warning>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<Note> The iii console is the web UI of ADE: a standalone application that connects to your running engine. It ships as a single binary, published in the registry as `ade`, that serves the UI and proxies the engine WebSocket on one port (`3113` by default). Use it to chat with agents, follow traces and logs, manage the workers in your Compose project, and edit worker configuration. For scripting or agent integration, call worker functions directly. </Note> <Warning title="The iii-console bina...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, } .namespace("default"), // target a...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 Iiidef big_order(event: dict) -> None: order = event.get("input", {}) print(f"order {order.get('id')} totals {order.get('total')}") worker.register_function("alerts::big-order", big_order) big_orders = worker.observe( {"function_id": "orders::create", "filters": {"input.total": {"$gte": 500}}}, "alerts::big-order", ) big_orders.ready() # blocks until active; use `await big_orders.ready_async()` in asyncio code ``` </Tab> <Tab title="Rust"> ```rust use iii_sdk::{Error, InitOptions, Observed, Reg...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
- Creating Workersholds: dict[str, int] = {} def tables_of(pool: psycopg.Connection, table: str | None) -> list[str]: if table is not None: return [table] rows = pool.execute( "SELECT tablename FROM pg_tables WHERE schemaname = 'public'" ).fetchall() return [row[0] for row in rows] @worker.on_observer_added("database::on-row-changed") def install(obs): db, table = obs.args["db"], obs.args.get("table") pool = pools.get(db) if pool is None: raise ObserveRejection("UNKNOWN_DB", f"no database '{db}'") for name in ...Votes: 0GitHub stars: 18,978
- Upgradingtrigger.unregister() ``` **After (0.26)** ```python observer = iii.observe( {"function_id": "cron::on-tick", "args": {"expression": "0 0 9 * * * *"}, "capture": ["input"]}, "reports::daily-summary", {"metadata": {"team": "reports"}}, ) observer.ready() # or: await observer.ready_async() observer.dispose() ``` </Tab> <Tab title="Rust"> **Before (0.25)** ```rust use iii_sdk::protocol::RegisterTriggerInput; use serde_json::json; let trigger = iii.register_trigger( RegisterTriggerInput::new( "cr...Votes: 0GitHub stars: 18,978
- Upgradingtry: return json.loads(error.read()) except ValueError: return None try: code = json.loads(error.read())["error"]["code"] except (ValueError, KeyError, TypeError): code = f"HTTP {error.code}" raise RuntimeError(f"{code}: math service request failed") from error return json.loads(body) if body else None worker.register_function( "math::multiply", multiply, description="Multiply two numbers in the math service", ) ``` </Tab> </Tabs> Rust and Go follow the same pattern: register the id with `Reg...Votes: 0GitHub stars: 18,978
- Upgradingiii 0.26 moves the VM code out of the engine. `iii-worker` and `iii-init` are gone, and so is the `iii-sandbox` worker you configured under `engine.workers`. The engine keeps `iii-sandbox` as a small router: it serves the `sandbox::*` functions and forwards every call to a sandbox adapter. The `sandbox-libkrun` worker is that adapter. It runs the VMs, it comes from the worker registry, and Compose installs it when a project needs it. Consumers keep calling `sandbox::*` in the `default` namesp...Votes: 0GitHub stars: 18,978
- iii-sandboxEphemeral microVM sandboxes for running untrusted or agent-generated code in isolation — a one-call run path, a create/exec/stop lifecycle, and a set of filesystem operations.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 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- 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``` The images that ship with iii come in two variants: | Image | Contents | Use it when | | ------------------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------...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
- 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), [Go](./sdk-go), [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 (...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/go/iii (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/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/go/iii (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
- 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() ``` --- <Warning> **Deprecated since 0.26.0.** Use `call_asy...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
- LinklyThis path builds Linkly with an AI agent. You give the agent one prompt per chapter; it writes the workers, and you check the result. The goal here is to build a working link shortener service while demonstrating iii's efficiency when building systems agentically, along with its 4 core properties which we call CODE: - Composability - Observability - Discoverability - Extensibility We'll present them a bit out of order but hopefully this mnemonic helps you remember what iii is all about.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
- 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