@orcha-ai/runtime-bridge 0.1.38 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,5 @@
1
- var f=["find_capabilities","describe_capability","execute_capability","inspect_result"],M=8*1024*1024;function _(s,a){if(!Array.isArray(s)||s.length!==1)throw new Error("one task-scoped Orcha MCP server is required");let o=s[0],e=new URL(o.url);if(o.name!=="orcha"||o.type!=="http"||!["http:","https:"].includes(e.protocol)||e.username||e.password||e.hash||a&&e.href!==new URL(a).href)throw new Error("Orcha MCP server does not match the trusted binding");let c=Object.fromEntries((o.headers||[]).map(({name:r,value:t})=>[r.toLowerCase(),t]));if(!String(c.authorization||"").startsWith("Bearer "))throw new Error("Orcha MCP task credentials are missing");return{url:e.href,headers:{...c,"content-type":"application/json",accept:"application/json"}}}async function g(s){let a=0,o=[];for await(let e of s){if(a+=e.length,a>M)throw new Error("MCP payload exceeds the size limit");o.push(Buffer.from(e))}return JSON.parse(Buffer.concat(o).toString("utf8"))}async function y(s,a,o){let e=await fetch(s.url,{method:"POST",headers:s.headers,body:JSON.stringify(a),redirect:"error",signal:AbortSignal.any([AbortSignal.timeout(36e5),...o?[o]:[]])});if(!e.ok)throw new Error(`Orcha MCP request failed (${e.status})`);if(e.status===202||e.status===204)return null;let c=await g(e.body);if(!c||c.jsonrpc!=="2.0"||c.id!==a.id)throw new Error("Orcha MCP response identity mismatch");return c}async function E(s,a){let o=await y(s,{jsonrpc:"2.0",id:"orcha-bind-tools",method:"tools/list"},a),e=o?.result?.tools;if(o?.error||!Array.isArray(e)||e.length!==f.length||f.some(c=>!e.some(r=>r.name===c&&r.inputSchema?.type==="object")))throw new Error("Orcha MCP did not expose its four authorized control tools");return e}var P={id:"orcha-runtime",name:"Orcha group member tools",register(s){let a=new Map,o=s.pluginConfig?.allowedOrchaMcpUrl;if(!o)throw new Error("Orcha plugin requires allowedOrchaMcpUrl");function e(r){let t=a.get(r);return t&&t.deadline<=Date.now()?(c(r,t),null):t}function c(r,t){a.get(r)===t&&(t.lifetime.abort(),clearTimeout(t.timer),a.delete(r))}s.registerHttpRoute({path:"/plugins/orcha-runtime/mcp-bindings",auth:"gateway",match:"exact",async handler(r,t){let i=(u,d)=>{t.writeHead(u,{"content-type":"application/json"}),t.end(JSON.stringify(d))};try{if(r.method==="GET"){i(200,{ready:!0});return}if(!["PUT","DELETE"].includes(r.method)){i(405,{error:"method_not_allowed"});return}let u=await g(r),{runId:d,sessionKey:l}=u;if(typeof d!="string"||!d||typeof l!="string"||!l){i(422,{error:"invalid_binding_identity"});return}let n=e(l);if(n&&n.runId!==d){i(409,{error:"session_already_bound"});return}if(r.method==="DELETE"){n&&c(l,n),i(200,{released:!0});return}let{agentCode:p,expiresAt:S,mcpServer:C}=u,h=Date.parse(S);if(typeof p!="string"||!p||!l.startsWith(`agent:${p}:`)||!Number.isFinite(h)||h<=Date.now()||h>Date.now()+24*36e5){i(422,{error:"invalid_binding_scope"});return}if(r.headers["if-match"]&&(!n||r.headers["if-match"]!==d)||n&&(n.agentCode!==p||n.deadline!==h)){i(409,{error:"original_binding_unavailable_or_changed"});return}let w=_([C],o),b=n?.lifetime||new AbortController,O=await E(w,b.signal);if(e(l)!==n){i(409,{error:"binding_changed"});return}if(n)n.upstream=w,n.tools=O;else{let m={runId:d,agentCode:p,deadline:h,upstream:w,tools:O,lifetime:b};m.timer=setTimeout(()=>c(l,m),h-Date.now()),m.timer.unref?.(),a.set(l,m)}i(200,{bound:!0})}catch{i(422,{error:"orcha_mcp_binding_failed"})}}}),s.registerTool(r=>{let t=e(r.sessionKey);return!t||r.agentId!==t.agentCode?null:t.tools.map(i=>({name:`orcha_${i.name}`,label:`Orcha ${i.name}`,description:i.description,parameters:i.inputSchema,async execute(u,d,l){if(e(r.sessionKey)!==t||r.agentId!==t.agentCode||!u)throw new Error("Orcha task binding expired or changed");let n=await y(t.upstream,{jsonrpc:"2.0",id:u,method:"tools/call",params:{name:i.name,arguments:d}},AbortSignal.any([t.lifetime.signal,...l?[l]:[]]));if(n?.error||!n?.result)throw new Error("Orcha rejected this task-scoped tool call");return{content:n.result.content,details:n.result.structuredContent,isError:n.result.isError===!0}}}))},{names:f.map(r=>`orcha_${r}`)})}};export{P as default};
1
+ import{getPluginRuntimeGatewayRequestScope as me}from"openclaw/plugin-sdk/plugin-runtime";import{isReplyPayloadTerminalContent as ge}from"openclaw/plugin-sdk/reply-payload";import{loadOutboundMediaFromUrl as we}from"openclaw/plugin-sdk/outbound-media";var k={controlTools:["find_capabilities_and_skills","describe_capability","inspect_result","execute_capability"],residentTools:["search_orcha_docs"]};var J=Object.freeze([...k.controlTools,...k.residentTools]),ie=new Set(J),se=8*1024*1024;function V(t,r){if(!Array.isArray(t)||t.length!==1)throw new Error("one task-scoped Orcha MCP server is required");let p=t[0],d=new URL(p.url);if(p.name!=="orcha"||p.type!=="http"||!["http:","https:"].includes(d.protocol)||d.username||d.password||d.hash||r&&d.href!==new URL(r).href)throw new Error("Orcha MCP server does not match the trusted binding");let u=Object.fromEntries((p.headers||[]).map(({name:f,value:h})=>[f.toLowerCase(),h]));if(!String(u.authorization||"").startsWith("Bearer "))throw new Error("Orcha MCP task credentials are missing");return{url:d.href,headers:{...u,"content-type":"application/json",accept:"application/json"}}}async function R(t){let r=0,p=[];for await(let d of t){if(r+=d.length,r>se)throw new Error("MCP payload exceeds the size limit");p.push(Buffer.from(d))}return JSON.parse(Buffer.concat(p).toString("utf8"))}async function z(t,r,p){let d=await fetch(t.url,{method:"POST",headers:t.headers,body:JSON.stringify(r),redirect:"error",signal:AbortSignal.any([AbortSignal.timeout(36e5),...p?[p]:[]])});if(!d.ok)throw new Error(`Orcha MCP request failed (${d.status})`);if(d.status===202||d.status===204)return null;let u=await R(d.body);if(!u||u.jsonrpc!=="2.0"||u.id!==r.id)throw new Error("Orcha MCP response identity mismatch");return u}async function Y(t,r){let p=await z(t,{jsonrpc:"2.0",id:"orcha-bind-tools",method:"tools/list"},r),d=p?.result?.tools;if(p?.error)throw new Error("Orcha MCP tool discovery failed");return ce(d)}function ce(t){if(!Array.isArray(t)||t.some(r=>!r||!ie.has(r.name)||r.inputSchema?.type!=="object"||typeof r.description!="string")||new Set(t.map(r=>r.name)).size!==t.length||t.length&&k.controlTools.some(r=>!t.some(p=>p.name===r)))throw new Error("Orcha MCP returned an unsupported or invalid authorized tool catalog");return t}function X(t,r){let p=u=>Array.isArray(u)?u.map(p):u&&typeof u=="object"?Object.fromEntries(Object.keys(u).sort().map(f=>[f,p(u[f])])):u,d=u=>u.map(({name:f,inputSchema:h})=>({name:f,inputSchema:h})).sort((f,h)=>f.name.localeCompare(h.name));return JSON.stringify(p(d(t)))===JSON.stringify(p(d(r)))}var F=t=>Object.assign(new Error(t),{status:409});function Z(t){let r=new Map,p=t.pluginConfig?.allowedOrchaMcpUrl;if(!p)throw new Error("Orcha plugin requires allowedOrchaMcpUrl");function d(h,l=r.get(h)){!l||r.get(h)!==l||(l.lifetime.abort(),clearTimeout(l.timer),r.delete(h))}function u(h){let l=r.get(h);return l&&l.deadline<=Date.now()?(d(h,l),null):l}async function f(h,{refresh:l=!1}={}){let{runId:c,sessionKey:g,agentCode:v,expiresAt:M,mcpServer:E}=h,S=Date.parse(M);if(typeof c!="string"||!c||typeof g!="string"||!g||typeof v!="string"||!v||!g.startsWith(`agent:${v}:`)||!Number.isFinite(S)||S<=Date.now()||S>Date.now()+24*36e5)throw new Error("invalid_binding_scope");let T=u(g);if(l&&!T||T&&(T.runId!==c||T.agentCode!==v||T.deadline!==S))throw F("original_binding_unavailable_or_changed");let N=V([E],p),D=T?.lifetime||new AbortController,e=await Y(N,D.signal);if(u(g)!==T)throw F("binding_changed");if(T){if(!X(T.tools,e))throw F("frozen_tool_catalog_changed");T.upstream=N}else{let o={runId:c,agentCode:v,deadline:S,upstream:N,tools:e,lifetime:D};o.timer=setTimeout(()=>d(g,o),S-Date.now()),o.timer.unref?.(),r.set(g,o)}}return t.registerTool(h=>{let l=u(h.sessionKey);return!l||h.agentId!==l.agentCode?null:l.tools.map(c=>({name:`orcha_${c.name}`,label:`Orcha ${c.name}`,description:c.description,parameters:c.inputSchema,async execute(g,v,M){if(u(h.sessionKey)!==l||h.agentId!==l.agentCode||!g||!l.tools.some(S=>S.name===c.name))throw new Error("Orcha task binding expired or changed");let E=await z(l.upstream,{jsonrpc:"2.0",id:g,method:"tools/call",params:{name:c.name,arguments:v}},AbortSignal.any([l.lifetime.signal,...M?[M]:[]]));if(E?.error||!E?.result)throw new Error("Orcha rejected this task-scoped tool call");return{content:E.result.content,details:E.result.structuredContent,isError:E.result.isError===!0}}}))},{names:J.map(h=>`orcha_${h}`)}),{bind:f,active:u,release:d,allowedUrl:p}}import{createHash as le}from"node:crypto";import{mkdirSync as de,readFileSync as ue,renameSync as pe,writeFileSync as he}from"node:fs";import{join as q}from"node:path";var K=t=>le("sha256").update(JSON.stringify(t)).digest("hex"),I=(t,r=409)=>Object.assign(new Error(t),{status:r,code:t}),B=t=>typeof t=="string"&&/^[1-9]\d{0,18}$/.test(t),fe=t=>new Promise(r=>setTimeout(r,t));function ee(t,r,p,d,u){let f=new Map,h=new Map,l=()=>t.config;function c(e,o=l()){let n=o?.channels?.orcha?.accounts?.[e];if(!B(e)||!n||n.enabled===!1||!n.serviceToken||!n.agentId)throw I("orcha_channel_account_unavailable",403);return{...n,accountId:e}}async function g(e,o,n,{cfg:a,signal:i,method:m="POST"}={}){let s=c(e,a),b=new URL(`/api/agent-channels${o}`,r.allowedUrl),_=n instanceof FormData,w=await fetch(b,{method:m,redirect:"error",signal:AbortSignal.any([AbortSignal.timeout(3e4),...i?[i]:[]]),headers:{authorization:`Bearer ${s.serviceToken}`,..._?{}:{"content-type":"application/json"}},...n!==void 0?{body:_?n:JSON.stringify(n)}:{}}),A=await R(w.body);if(!w.ok||A.success!==!0)throw I(`orcha_channel_request_${w.status}`,w.status);return A.data}function v(e,o="runs"){if(!/^[a-zA-Z0-9_-]{1,128}$/.test(e))throw I("invalid_record_identity",422);let n=q(t.runtime.state.resolveStateDir(),"plugins","orcha-runtime",o);return de(n,{recursive:!0,mode:448}),q(n,`${e}.json`)}function M(e,o){try{return JSON.parse(ue(v(e,o),"utf8"))}catch(n){if(n.code==="ENOENT")return null;throw n}}function E(e,o,n){let a=v(e,n),i=`${a}.pending`;he(i,JSON.stringify(o),{mode:384}),pe(i,a)}async function S(e,o=!1){let n=c(e.delivery?.bindingId),{runId:a,delivery:i}=e;if(!B(a)||!B(i.sessionId)||!B(i.taskContextId)||i.mode!=="channel"||e.agentCode!==n.agentId)throw I("invalid_channel_delivery",422);if(!Array.isArray(e.prompt)||e.prompt.some(y=>!["text","image","file"].includes(y.type)||(y.type==="text"?typeof y.text!="string":typeof y.uri!="string")))throw I("invalid_channel_prompt",422);let m=K({agentCode:e.agentCode,delivery:i,prompt:e.prompt}),s=M(a);if(s&&s.requestHash!==m)throw I("channel_delivery_conflict");if(s?.status==="completed")return s.result;if(s?.status==="failed")throw I(s.error);let b=f.get(a),_=s?.expiresAt||e.expiresAt,w=`agent:${n.agentId}:orcha:${i.bindingId}:${a}`,A=s?.hostRunId||`orcha-${a}`;if(s&&!b||e.attachOnly&&!b&&!s)throw I("RUNTIME_OPERATION_NOT_FOUND");if(b)return await r.bind({runId:a,sessionKey:w,agentCode:n.agentId,expiresAt:_,mcpServer:e.mcpServer},{refresh:!0}),o?{refreshed:!0}:b.promise;if(o)throw I("RUNTIME_OPERATION_NOT_FOUND");let C=new AbortController,P={controller:C,promise:null};return f.set(a,P),P.promise=(async()=>{await r.bind({runId:a,sessionKey:w,agentCode:n.agentId,expiresAt:_,mcpServer:e.mcpServer}),E(a,{requestHash:m,status:"running",sessionKey:w,hostRunId:A,expiresAt:_});let y=[],$=[],L=setTimeout(()=>C.abort(I("run_timeout")),Date.parse(_)-Date.now());try{let j=t.runtime.channel.reply;if(typeof j?.dispatchReplyWithBufferedBlockDispatcher!="function")throw I("OPENCLAW_CHANNEL_RUNTIME_UNAVAILABLE");let U=e.prompt.filter(O=>O.type==="text").map(O=>O.text).join(`
2
+
3
+ `),W=e.prompt.filter(O=>O.type!=="text"),re={Body:U,BodyForAgent:U,RawBody:U,From:`orcha:${i.memberId}`,To:`orcha:${i.sessionId}`,SessionKey:w,AccountId:i.bindingId,Provider:"orcha",Surface:"orcha",ChatType:"direct",OriginatingChannel:"orcha",OriginatingTo:i.sessionId,MessageSid:a,MediaUrls:W.map(O=>O.uri),MediaTypes:W.map(O=>O.mimeType||"application/octet-stream"),CommandAuthorized:!1,CommandInterpretationSuppressed:!0,WasMentioned:!0};if(await j.dispatchReplyWithBufferedBlockDispatcher({ctx:re,cfg:l(),replyOptions:{runId:A,abortSignal:C.signal,suppressTyping:!0},dispatcherOptions:{deliver:async(O,ne)=>{if(C.signal.throwIfAborted(),ne.kind==="final"&&d(O)){let oe=O.mediaUrls||(O.mediaUrl?[O.mediaUrl]:[]),x=l(),G=x?.agents?.list?.find(H=>H.id===n.agentId)?.workspace||x?.agents?.defaults?.workspace;for(let H of oe)$.push(await T(i.bindingId,i.sessionId,H,{cfg:x,signal:C.signal,mediaLocalRoots:G?[G]:void 0}));O.text&&y.push(O.text)}},onError:O=>{throw O}}}),C.signal.throwIfAborted(),!y.length&&!$.length)throw I("runtime_node_empty_result");let Q={stopReason:"end_turn",content:y.join(`
4
+
5
+ `)||"\u5DF2\u751F\u6210\u9644\u4EF6",inputParts:$,sessionId:w};return E(a,{requestHash:m,status:"completed",sessionKey:w,hostRunId:A,expiresAt:_,result:Q}),Q}catch(j){throw E(a,{requestHash:m,status:"failed",sessionKey:w,hostRunId:A,expiresAt:_,error:j.code||"channel_host_failed"}),j}finally{clearTimeout(L),r.release(w),f.delete(a)}})().catch(y=>{throw r.release(w),f.delete(a),y}),P.promise}async function T(e,o,n,a){let i=await u(n,{maxBytes:33554432,mediaAccess:a.mediaAccess,mediaReadFile:a.mediaReadFile,mediaLocalRoots:a.mediaLocalRoots});a.signal?.throwIfAborted();let m=new FormData;return m.set("sessionId",o),m.set("file",new Blob([i.buffer],{type:i.contentType||"application/octet-stream"}),i.fileName||"attachment"),(await g(e,"/files",m,{cfg:a.cfg,signal:a.signal})).inputPart}async function N(e){e.signal?.throwIfAborted();let o=e.to.replace(/^orcha:/,"");if(!B(o))throw I("invalid_conversation",422);let n=e.preparedMessageId||e.deliveryQueueId&&`${e.deliveryQueueId}:${e.deliveryPartIndex||0}`;if(!n)throw I("OPENCLAW_DURABLE_DELIVERY_ID_REQUIRED");let a=K([e.accountId,n]),i=K([o,e.text,e.mediaUrl,e.replyToId]),m=M(a,"sends");if(m&&m.requestHash!==i)throw I("channel_send_conflict");let s=h.get(a);if(s){if(s.requestHash!==i)throw I("channel_send_conflict");return s.promise}let b=(async()=>{let _=m?.payload;if(!_){let A=e.mediaUrl?[await T(e.accountId,o,e.mediaUrl,e)]:[];_={sourceMessageId:`openclaw:${a}`,sessionId:o,content:e.text||"",inputParts:A,...e.replyToId?{replyToMessageId:e.replyToId}:{}},E(a,{requestHash:i,payload:_},"sends")}return await e.onPlatformSendDispatch?.(),e.assertDirectAdapterHandoff?.(),e.signal?.throwIfAborted(),{channel:"orcha",messageId:(await g(e.accountId,"/messages",_,{cfg:e.cfg,signal:e.signal})).messageId,chatId:o}})().finally(()=>h.delete(a));return h.set(a,{requestHash:i,promise:b}),b}t.registerChannel({plugin:{id:"orcha",meta:{id:"orcha",label:"Orcha",selectionLabel:"Orcha",docsPath:"/channels/orcha",blurb:"Enterprise people and Agent conversations"},capabilities:{chatTypes:["direct","group"],media:!0},config:{listAccountIds:e=>Object.keys(e?.channels?.orcha?.accounts||{}),inspectAccount:(e,o)=>{let n=e?.channels?.orcha?.accounts?.[o];return{enabled:!!(n&&n.enabled!==!1),configured:!!(n?.serviceToken&&n?.agentId),tokenStatus:n?.serviceToken?"available":"missing"}},resolveAccount:(e,o)=>c(o,e),isEnabled:e=>e.enabled!==!1,isConfigured:e=>!!(e.serviceToken&&e.agentId)},outbound:{deliveryMode:"direct",textChunkLimit:1e5,sendText:N,sendMedia:N}}});async function D(e){let{accountId:o,grantId:n,externalInvocationId:a}=e;c(o);let i=await g(o,"/runs",{grantId:n,externalInvocationId:a,input:e.input||{}}),m=i.agentRunId;if(["completed","failed","cancelled","expired"].includes(i.status))return i;let s;do s=await g(o,`/runs/${m}/claim`,{}),s.attemptId||await fe(Math.max(1,s.retryAfterSeconds||2)*1e3);while(!s.attemptId);let b=`agent:${c(o).agentId}:orcha:${o}:${m}`,_,w=!1,A=setInterval(async()=>{if(!w){w=!0;try{let y=await g(o,`/runs/${m}/heartbeat`,{attemptId:s.attemptId});r.active(b)&&await r.bind({runId:m,sessionKey:b,agentCode:c(o).agentId,expiresAt:s.expiresAt,mcpServer:y.mcpServer},{refresh:!0})}catch(y){_=y,f.get(m)?.controller.abort(y),r.release(b)}finally{w=!1}}},Math.max(1,s.heartbeatIntervalSeconds)*1e3),C,P;try{let y;try{y=await S({runId:m,agentCode:c(o).agentId,delivery:s.delivery,prompt:[{type:"text",text:JSON.stringify({task:s.prompt,eventInput:s.input})}],mcpServer:s.mcpServer,expiresAt:s.expiresAt,attachOnly:s.recovery})}catch(L){P=L}if(_)throw _;C=P?{attemptId:s.attemptId,result:P.code||"channel_host_failed",artifacts:[],status:"failed"}:{attemptId:s.attemptId,result:y.content,artifacts:y.inputParts||[],status:"completed"};let $=await g(o,`/runs/${m}/complete`,C);if(P)throw P;return $}finally{clearInterval(A),r.release(b)}}for(let[e,o]of[["deliveries",S],["background",D]])t.registerHttpRoute({path:`/plugins/orcha-runtime/${e}`,auth:"gateway",match:"exact",async handler(n,a){try{if(!["POST","PATCH","DELETE"].includes(n.method))throw I("method_not_allowed",405);let i=await R(n);if(await p(),n.method==="DELETE"){let s=f.get(i.runId);s?.controller.abort(I("RUNTIME_OPERATION_CANCELLED")),a.writeHead(200,{"content-type":"application/json"}).end(JSON.stringify({cancelled:!!s}));return}if(n.method==="PATCH"&&e!=="deliveries")throw I("method_not_allowed",405);let m=await o(i,n.method==="PATCH");await p(),a.writeHead(200,{"content-type":"application/json"}).end(JSON.stringify(m))}catch(i){a.writableEnded||a.writeHead(i.status||500,{"content-type":"application/json"}).end(JSON.stringify({error:i.code||i.message}))}}})}function te(t,r,p){return{id:"orcha-runtime",name:"Orcha Channel and authorized tools",register(d){let u=Z(d);d.registerHttpRoute({path:"/plugins/orcha-runtime/mcp-bindings",auth:"gateway",match:"exact",async handler(f,h){let l=(c,g)=>{h.writeHead(c,{"content-type":"application/json"}),h.end(JSON.stringify(g))};try{if(f.method==="GET"){l(200,{ready:!0});return}if(!["PUT","DELETE"].includes(f.method)){l(405,{error:"method_not_allowed"});return}let c=await R(f);if(await t(),typeof c.runId!="string"||!c.runId||typeof c.sessionKey!="string"||!c.sessionKey){l(422,{error:"invalid_binding_identity"});return}let g=u.active(c.sessionKey);if(f.headers["if-match"]&&f.headers["if-match"]!==c.runId){l(409,{error:"binding_run_conflict"});return}if(g&&g.runId!==c.runId){l(409,{error:"session_already_bound"});return}f.method==="DELETE"?u.release(c.sessionKey):await u.bind(c,{refresh:!!f.headers["if-match"]}),l(200,{[f.method==="DELETE"?"released":"bound"]:!0})}catch(c){h.writableEnded||l(c.status||422,{error:c.message})}}}),ee(d,u,t,r,p)}}}var ke=te(async()=>{await me()?.revalidate?.()},ge,we);export{ke as default};
@@ -1,14 +1,75 @@
1
1
  {
2
2
  "id": "orcha-runtime",
3
- "name": "Orcha group member tools",
4
- "description": "Task-scoped Orcha tools bound to trusted OpenClaw sessions",
5
- "categories": ["developer-tools"],
6
- "contracts": { "tools": ["orcha_find_capabilities", "orcha_describe_capability", "orcha_execute_capability", "orcha_inspect_result"] },
7
- "activation": { "onStartup": true },
3
+ "name": "Orcha Channel and authorized tools",
4
+ "description": "Enterprise IM Channel, proactive messages and task-scoped Orcha tools",
5
+ "categories": [
6
+ "developer-tools"
7
+ ],
8
+ "contracts": {
9
+ "tools": [
10
+ "orcha_find_capabilities_and_skills",
11
+ "orcha_describe_capability",
12
+ "orcha_inspect_result",
13
+ "orcha_execute_capability",
14
+ "orcha_search_orcha_docs"
15
+ ]
16
+ },
17
+ "activation": {
18
+ "onStartup": true
19
+ },
8
20
  "configSchema": {
9
21
  "type": "object",
10
22
  "additionalProperties": false,
11
- "required": ["allowedOrchaMcpUrl"],
12
- "properties": { "allowedOrchaMcpUrl": { "type": "string", "minLength": 1 } }
23
+ "required": [
24
+ "allowedOrchaMcpUrl"
25
+ ],
26
+ "properties": {
27
+ "allowedOrchaMcpUrl": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ }
31
+ }
32
+ },
33
+ "channels": [
34
+ "orcha"
35
+ ],
36
+ "channelConfigs": {
37
+ "orcha": {
38
+ "schema": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "accounts": {
43
+ "type": "object",
44
+ "additionalProperties": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": [
48
+ "agentId",
49
+ "serviceToken"
50
+ ],
51
+ "properties": {
52
+ "agentId": {
53
+ "type": "string",
54
+ "minLength": 1
55
+ },
56
+ "serviceToken": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "enabled": {
61
+ "type": "boolean"
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "uiHints": {
69
+ "accounts.*.serviceToken": {
70
+ "sensitive": true
71
+ }
72
+ }
73
+ }
13
74
  }
14
75
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orcha-ai/openclaw-tools",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "openclaw": { "extensions": ["./index.js"] }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orcha-ai/runtime-bridge",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Local Orcha runtime bridge for ACP-compatible agent runtimes.",