All authors

Claude Skills by iii-hq
github.com/iii-hq448 skills0 installs567 views
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- Upgradingiii --use-default-config iii project init . iii ``` See [Engine](../using-iii/engine) for the current no-config behavior.Votes: 0GitHub stars: 18,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- Docsiii is a software system that eliminates integration complexity. It organizes software into three primitives (Worker, Trigger, Function), so every capability (queues, cron, streaming, sandboxing, observability, agents, frontend UIs) can be built and composed from the same set of pieces. The rendered documentation site is the canonical reference; this directory holds the Mintlify source.Votes: 0GitHub stars: 18,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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 trigger`](../cli-reference/index#iii-trigger). Run the remaining commands from a third terminal in that same project directory: ```bash iii trigger -n dev compose::add worker=queue ``` <Note> This page covers commo...Votes: 0GitHub stars: 18,821
- 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,821
- Creating Workersworker.unregister_trigger_type( {"id": "mini-http", "description": "Routes HTTP requests to bound functions"} ) ``` </Tab> <Tab title="Rust"> ```rust // e.g. config reload disabled the HTTP listener; stop accepting new bindings // while the worker keeps serving other trigger types. worker.unregister_trigger_type("mini-http"); ``` </Tab> </Tabs> {/* TODO: Update once this inconsistency is fixed */} <Note> Node's `registerTriggerType` also returns a `TriggerTypeRef` with an `.unregister()` shor...Votes: 0GitHub stars: 18,821
- 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 ``` `auth_function_id` names a function the worker invokes once per connection to authorize the worker to connect (or reject it if authorization fails). That is covered in the next section. <Warning> `auth_function_id` resolves in the `default` name...Votes: 0GitHub stars: 18,821
- Creating Workers``` The images that ship with iii come in two variants: | Image | Contents | Use it when | | ------------------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------...Votes: 0GitHub stars: 18,821
- 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,821
- Creating Workersworkers = worker.trigger({ "function_id": "engine::workers::list", "payload": {}, })["workers"] functions = worker.trigger({ "function_id": "engine::functions::list", "payload": {"include_internal": False}, })["functions"] triggers = worker.trigger({ "function_id": "engine::triggers::list", "payload": {"include_internal": False}, })["triggers"] registered_triggers = worker.trigger({ "function_id": "engine::registered-triggers::list", "payload": {"include_internal": False}, })["registered_trig...Votes: 0GitHub stars: 18,821
- 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,821
- Docs{/* TODO (community feedback): Add a direct binary-download path alongside the curl|sh installer so users who do not want to verify a remote script with a bot, or are on Windows, have an alternative. Link to the GitHub Releases page for the engine and include PATH setup instructions per OS (especially Windows). */}Votes: 0GitHub stars: 18,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- 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,821
- NextSolutions to errors you may hit while running the iii engine and workers.Votes: 0GitHub stars: 18,821
- 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,821
- 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,821