본문으로 건너뛰기
Skillpedia
일반 코딩19k · #10492

iii-core-primitives

하는 일

iii의 기본 구성 요소인 함수, 트리거, 워커와 각각을 등록하는 방법을 설명합니다. TypeScript, Python, Rust로 iii 시스템 코드를 작성하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓새 함수를 등록하고 여기에 트리거를 연결해야 할 때.
  • ✓한 함수가 다른 함수가 호출된 뒤에 실행되게 하고 싶을 때.
  • ✓지금 연결된 워커와 함수를 확인하고 싶을 때.

스킬 링크

https://github.com/iii-hq/iii/blob/main/skills/iii-core-primitives/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/iii-hq/iii/blob/main/skills/iii-core-primitives/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“orders::validate 함수를 TypeScript로 등록하고, 새 주문이 들어올 때마다 실행되게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 핸들러가 있는 함수를 등록하고, 이를 일정이나 큐 같은 이벤트 원천에 연결하는 방법을 보여 줍니다. 또한 다른 함수가 호출된 뒤 대상 함수를 실행하는 옵저버와, 함수를 직접 또는 백그라운드에서 호출하는 방법도 다룹니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Core Primitives

iii has three top-level primitives:

  • Function: a named unit of work such as orders::validate
  • Trigger: an event source bound to a function
  • Worker: a process that connects to the engine and executes functions

Since 0.25 every function is also observable: iii.observe(source, target) invokes target on each invocation of source that passes its filters. Observers replace trigger bindings over time; the built-in providers (http, cron, queue, state, stream, pub/sub, database) still use trigger types in 0.25, so keep registerTrigger for them. See iii-observe.

Use :: in function IDs, leading slashes in HTTP api_path, and expression for cron config.

Function Registration

Register local handlers when you control the implementation. Register HTTP-invoked functions when iii should call an existing external endpoint.

Shape Use for
registerFunction(id, handler, options?) Local worker code
registerFunction(id, HttpInvocationConfig, options?) Existing HTTP services
registerTrigger({ type, function_id, config, metadata? }) Binding a built-in event source (deprecated in 0.25, still required for providers that have not migrated)
observe({ function_id, args?, filters? }, target, options?) Running target after another function's invocations, or on an engine event (iii-observe)
trigger({ function_id, payload, action?, timeout? }) Calling any function by ID

Functions and triggers can carry metadata for ownership, discovery, and generated skills. Do not put secrets in metadata.

Workers and Registry

A worker is any process that connects to the engine and registers functions or trigger types. There are two common paths:

Task Use
Create your own worker Write SDK code that calls registerWorker, registerFunction, and registerTrigger or observe
Add an existing capability Browse https://workers.iii.dev/, then call compose::add worker=<name>
Pin a worker version compose::add worker=<name>@<version>
Declare a local worker Add worker: path://./workers/my-worker under containers:
Reproduce a project Commit the exact versions in worker-compose.yaml

The public worker registry at workers.iii.dev is for installable workers such as HTTP, state, queue, pub/sub, cron, database, shell, console, rbac-proxy, and other capability workers. (iii-sandbox and iii-observability are engine-owned and are not added through the registry.) Those workers may ship their own function-level skills; do not duplicate every capability as a top-level iii skill.

Worker Manifest

Use iii.worker.yaml when iii should start a local worker project:

name: math-worker
runtime:
  kind: python
  package_manager: pip
  entry: math_worker.py
scripts:
  install: "pip install -r requirements.txt"
  start: "python math_worker.py"

The manifest describes how to start the process. Once running, the WebSocket connection and function registrations are what make the worker part of iii.

Live Engine Registry

The engine keeps a live registry of connected workers, registered functions, triggers, and trigger types. Read it through the built-in discovery functions:

Function Returns
engine::workers::list Connected workers and metrics
engine::functions::list Registered functions
engine::triggers::list Registered triggers
engine::trigger-types::list Advertised trigger types and schemas
engine::observers::list Observers you may see (function_id, namespace, worker filters)

For topology changes, observe the engine-hosted sources engine::on-workers-changed or engine::on-functions-changed with deliver: 'input' (see iii-observe). The older engine::workers-available and engine::functions-available trigger types still fire.

Built-In Trigger Shapes

The workers behind these types have not moved to source functions in 0.25, so bind them with registerTrigger. Each call logs a one-time deprecation warning per process; it is informational and the binding works as before. For log, the engine also hosts the observability::on-log source (iii-observe).

Trigger type Registration config Handler payload
http { api_path: "/orders/:id", http_method: "POST" } { query_params, path_params, headers, path, method, body }
cron `{ expression: "0 0 9 * * *
자주 묻는 질문

옵저버란 무엇인가요?

옵저버는 다른 함수가 호출될 때마다 대상 함수를 실행하며, 원래 함수는 수정하지 않습니다.

함수 ID는 어떤 형식인가요?

orders::validate처럼 쌍점 두 개를 사용합니다.

레지스트리에서 워커를 설치할 수 있나요?

네. 이 스킬은 공개 레지스트리에서 워커를 설치하는 방법도 다룹니다.

상세 정보

작성자의 원본 설명

Use when registering iii functions, binding triggers, observing functions, selecting sync/void/enqueue invocation, creating workers, inspecting the live worker registry, installing registry workers, authoring event sources, moving channel data, or adapting external HTTP functions across TypeScript, Python, and Rust.

repo: iii-hq/iii

인기도

GitHub 스타
19k
순위
#10492
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬