मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)19k · #10490

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/iii-hq/iii/blob/main/engine/src/workers/worker/skills/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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-proxy worker (iii trigger compose::add worker=rbac-proxy), which applies these RBAC rules on its own port out of process. A second #instance listener with an rbac block and an auth_function_id is the in-engine alternative.
  • Restricting which functions a connected worker can invoke — combine expose_functions filters (operator-side) with forbidden_functions from AuthResult (per-session, hard deny).
  • Auditing, rate-limiting, or enriching every invocation — set middleware_function_id on the listener; the middleware decides whether to call the target and what to return.
  • Per-tenant or per-session namespace isolation — return function_registration_prefix from 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, or on_trigger_type_registration_function_id to 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 of expose_functions. Adding one of those IDs to forbidden_functions denies it but logs a warning — workers may behave unpredictably (broken setup, lost logs, missing context).
  • The engine port must remain internal. Only rbac-proxy or an RBAC-protected #instance listener 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_functions from the auth result wins over both allowed_functions and expose_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

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

iii-sandbox

19k

आपके एजेंट को अविश्वसनीय या AI से बने कोड को एक अस्थायी, अलग-थलग virtual machine के भीतर सुरक्षित रूप से चलाने में मदद करती है, और काम खत्म होने पर उसे हटा देती है।

कोडिंगसामान्य कोडिंग

configuration

19k

आपके एजेंट को नामित कॉन्फ़िगरेशन मानों की एक साझा रजिस्ट्री सेट करने देती है, जिसे schema से जाँचा जाता है, ताकि workers बदलावों को पढ़ सकें और उन पर प्रतिक्रिया दे सकें।

कोडिंगAPI और सर्वर (backend)

iii

19k

आपके एजेंट को iii workers कैसे काम करते हैं यह सिखाती है, ताकि वह पहले मौजूदा चीज़ें जाँचकर, फिर worker बनाकर कोई क्षमता जोड़ सके।

कोडिंगसामान्य कोडिंग

iii-observability

19k

आपके एजेंट को iii engine में tracing, संरचित logs, metrics और alerts जोड़ने में मदद करती है, OpenTelemetry इस्तेमाल करके ताकि आप देख सकें कि क्या हो रहा है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

मिलती-जुलती skills