iii-worker-manager
यह क्या करती है
यह स्किल वह listener सेट करती है जिसके ज़रिए workers iii engine से जुड़ते हैं, और यह तय करती है कि हर कनेक्शन कौन-से functions इस्तेमाल कर सकता है। यह उन डेवलपरों के लिए है जो iii engine को दूसरे workers या नेटवर्क के लिए खोलते हैं और उन्हें एक्सेस नियंत्रण चाहिए।
कब इस्तेमाल करें
- ✓जब आप चाहते हों कि दूसरे नेटवर्क पर मौजूद workers आपके engine से सुरक्षित रूप से जुड़ें।
- ✓जब आपको यह सीमित करना हो कि जुड़ा हुआ worker कौन-से functions कॉल कर सकता है।
- ✓जब आप engine से गुज़रने वाली हर कॉल को लॉग करना या उसकी दर सीमित करना चाहते हों।
Skill का लिंक
https://github.com/iii-hq/iii/blob/main/engine/src/workers/worker/skills/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे iii engine को एक अविश्वसनीय नेटवर्क के लिए खोलिए, ऐसे एक्सेस नियमों के साथ जो हर जुड़े worker की कॉल सीमित करें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल अलग-अलग ports पर WebSocket listeners सेट करती है, हर एक के अपने एक्सेस नियमों के साथ। हर कनेक्शन के लिए एक्सेस जाँच चलती है, और एक वैकल्पिक middleware function हर कॉल को उसके लक्ष्य तक पहुँचने से पहले ऑडिट, दर-सीमा या बदल सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
iii-worker-manager
The iii-worker-manager is a mandatory engine worker that opens WebSocket listeners. The base
engine.workers.iii-worker-manager entry sets the main port (49134 by default); #instance
entries open separate listeners with their own RBAC, middleware, and registration hooks. Channels
are mounted on every listener at /ws/channels/{channel_id}.
When to Use
- Exposing the engine to an untrusted network — RBAC is mandatory, never open the engine port itself. Use the standalone
rbac-proxyworker (iii trigger compose::add worker=rbac-proxy), which applies these RBAC rules on its own port out of process. A second#instancelistener with anrbacblock and anauth_function_idis the in-engine alternative. - Restricting which functions a connected worker can invoke — combine
expose_functionsfilters (operator-side) withforbidden_functionsfromAuthResult(per-session, hard deny). - Auditing, rate-limiting, or enriching every invocation — set
middleware_function_idon the listener; the middleware decides whether to call the target and what to return. - Per-tenant or per-session namespace isolation — return
function_registration_prefixfrom the auth function so every function/trigger this session registers is transparently prefixed without the worker code knowing. - Gating dynamic registration — wire
on_function_registration_function_id,on_trigger_registration_function_id, oron_trigger_type_registration_function_idto validate or rewrite registrations.
Boundaries
- The infrastructure carve-out (
engine::channels::create,engine::workers::register,engine::log::*,engine::baggage::*) is always allowed on RBAC listeners regardless ofexpose_functions. Adding one of those IDs toforbidden_functionsdenies it but logs a warning — workers may behave unpredictably (broken setup, lost logs, missing context). - The engine port must remain internal. Only
rbac-proxyor an RBAC-protected#instancelistener may face an external network. - The middleware is not a pre-handler — it must invoke the target function itself (typically via
iii.trigger) and return its result. Returning early without invoking simply skips the call. forbidden_functionsfrom the auth result wins over bothallowed_functionsandexpose_functions. There is no way for a session to override an operator's deny list.- Registration hooks return mapped fields or throw to deny. Omitted result fields keep their original values; returning
{}is a no-op (allow as-is). - Triggers and functions registered through an RBAC session are scoped to that session and cleaned up automatically on disconnect.
Configuration
Two listeners — one internal, one external with in-engine RBAC (the rbac-proxy worker accepts the same rbac block through the configuration worker instead):
engine:
workers:
iii-worker-manager:
port: 49134
"iii-worker-manager#rbac":
host: 0.0.0.0
port: 49135
middleware_function_id: my-project::middleware
rbac:
auth_function_id: my-project::auth
on_function_registration_function_id: my-project::on-fn-reg
on_trigger_registration_function_id: my-project::on-trig-reg
on_trigger_type_registration_function_id: my-project::on-trig-type-reg
expose_functions:
- match("api::*")
- match("*::public")
- metadata:
public: true
Auth function
Receives AuthInput { headers, query_params, ip_address }, returns AuthResult. Throw to reject the connection.
import type { AuthInput, AuthResult } from '@iii-dev/helpers/worker-connection-manager'
iii.registerFunction(
'my-project::auth',
async (input: AuthInput): Promise<AuthResult> => {
const token = input.headers?.['authorization']?.replace(/^Bearer\s+/i, '')
if (!token) throw new Error('Missing credentials')
const user = await validateToken(token)
return {
allowed_functions: [],
forbidden_functions: user.role === 'readonly'
? ['api::users::delete', 'api::users::update']
: [],
allowed_trigger_types: user.role === 'admin' ? ['cron', 'webhook'] : undefined,
allow_trigger_type_registration: user.role === 'admin',
function_registration_prefix: `tenant-${user.tenant_id}`,
context: { user_id: user.id, role: user.role, tenant_id: user.tenant_id },
}
},
)
`A
अक्सर पूछे जाने वाले सवाल
क्या मुझे engine का port सीधे इंटरनेट पर खोलना चाहिए?
नहीं। अविश्वसनीय नेटवर्क के लिए एक्सेस नियम ज़रूरी हैं, और उन्हें लागू करने का अनुशंसित तरीका एक अलग proxy worker है।
क्या हर ग्राहक को अलग namespace मिल सकता है?
हाँ। एक auth function हर function और trigger में एक prefix जोड़ सकता है जिसे सत्र रजिस्टर करता है, और इससे हर tenant अलग रहता है।
middleware क्या करता है?
वह अपने listener पर हर invocation देखता है और तय करता है कि कॉल को आगे भेजा जाए या नहीं, और क्या लौटाया जाए।
जानकारी
लेखक का मूल विवरण
WebSocket listener that SDK workers connect to. Use to expose the engine to trusted (internal) and untrusted (RBAC-protected) workers, gate function and trigger registration, and audit or transform every invocation through a middleware function. Mounts channel WebSocket endpoints on every listener.
repo: iii-hq/iii
लोकप्रियता
- GitHub स्टार
- 19k
- रैंकिंग में स्थान
- #10490
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
iii-sandbox
19kआपके एजेंट को अविश्वसनीय या AI से बने कोड को एक अस्थायी, अलग-थलग virtual machine के भीतर सुरक्षित रूप से चलाने में मदद करती है, और काम खत्म होने पर उसे हटा देती है।
configuration
19kआपके एजेंट को नामित कॉन्फ़िगरेशन मानों की एक साझा रजिस्ट्री सेट करने देती है, जिसे schema से जाँचा जाता है, ताकि workers बदलावों को पढ़ सकें और उन पर प्रतिक्रिया दे सकें।
iii
19kआपके एजेंट को iii workers कैसे काम करते हैं यह सिखाती है, ताकि वह पहले मौजूदा चीज़ें जाँचकर, फिर worker बनाकर कोई क्षमता जोड़ सके।
iii-observability
19kआपके एजेंट को iii engine में tracing, संरचित logs, metrics और alerts जोड़ने में मदद करती है, OpenTelemetry इस्तेमाल करके ताकि आप देख सकें कि क्या हो रहा है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।