qlogicagent 2.15.9 → 2.15.10

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.
package/dist/protocol.js CHANGED
@@ -1 +1 @@
1
- var q=["idle","running-right","running-left","waving","jumping","failed","waiting","running","review"];var Y="1.0.0",d={PARSE_ERROR:-32700,INVALID_REQUEST:-32600,METHOD_NOT_FOUND:-32601,INVALID_PARAMS:-32602,INTERNAL_ERROR:-32603,TURN_ABORTED:-32e3,TURN_TIMEOUT:-32001,LLM_ERROR:-32010,LLM_AUTH_ERROR:-32011,LLM_RATE_LIMIT:-32012,LLM_QUOTA_EXHAUSTED:-32013,LLM_MODEL_NOT_FOUND:-32014,TOOL_INVOKE_FAILED:-32020,TOOL_TIMEOUT:-32021,PROTOCOL_MISMATCH:-32030,REQUEST_DEADLINE_EXCEEDED:-32040,REQUEST_CANCELLED:-32041,REQUEST_DEDUPED:-32042,REQUEST_IDEMPOTENCY_REQUIRED:-32043},H={REQUEST:"tool.approval.request"};function P(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&t.method.length>0}function C(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&(typeof t.id=="string"||typeof t.id=="number")&&!("method"in t)}function I(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&!("id"in t)}function G(e){let t;try{t=JSON.parse(e)}catch{return null}return C(t)||P(t)||I(t)?t:null}import{randomUUID as z}from"node:crypto";var X=["settings.list","settings.get","settings.validate","provider.list","config.get","config.tunables","tools.list","todos.list","tasks.list","agents.list","agents.get","agents.processes","agents.scan","session.list","session.get","session.resolve","thread.list","project.list","files.list","files.gitStatus","instructions.list","instructions.read","skills.list","skills.stats","memory.atlas","memory.activity","memory.list","memory.read","memory.search","media.listModels","media.status","pet.status","agent.health","agent.metrics"],J=new Set(["memory.dream","memory.propose","memory.consolidate","media.stt","pet.forge","pet.asset.import","solo.start","solo.evaluate","product.plan","product.create","product.message"]),Q=["memory.","pet.","usage."],$=new Set(["memory.atlas","memory.activity","memory.list","memory.read","memory.search","memory.attachment.locate","memory.attachment.adopt","pet.status"]);function f(e){return J.has(e)?{channel:"task",mutability:"write",defaultTimeoutMs:12e4}:X.some(t=>e===t||e.startsWith(`${t}.`)||e.startsWith(t))?{channel:"query",mutability:"read",defaultTimeoutMs:1e4}:{channel:"task",mutability:"write",defaultTimeoutMs:3e4}}function h(e){return $.has(e)||f(e).mutability==="read"?!1:Q.some(t=>e.startsWith(t))}function Z(e,t={}){let r=t.now??Date.now(),o=f(e),i=t.timeoutMs??o.defaultTimeoutMs;return{requestId:t.requestId??z(),createdAt:r,deadlineAt:r+i,channel:t.channel??o.channel,idempotencyKey:t.idempotencyKey,traceId:t.traceId}}function v(e,t=Date.now()){let r=e.meta;if(!r||typeof r!="object")return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta is required."}};if(typeof r.requestId!="string"||r.requestId.length===0)return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta.requestId is required."}};if(r.channel!=="query"&&r.channel!=="task")return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta.channel must be query or task."}};if(typeof r.createdAt!="number"||!Number.isFinite(r.createdAt))return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta.createdAt is required."}};if(typeof r.deadlineAt!="number"||!Number.isFinite(r.deadlineAt))return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta.deadlineAt is required."}};if(r.deadlineAt<=t)return{ok:!1,error:{code:d.REQUEST_DEADLINE_EXCEEDED,message:"RPC request deadline has already expired."}};let o=f(e.method).channel;return r.channel!==o?{ok:!1,error:{code:d.INVALID_REQUEST,message:`RPC request channel mismatch: expected ${o}, got ${r.channel}.`}}:h(e.method)&&(typeof r.idempotencyKey!="string"||r.idempotencyKey.length===0)?{ok:!1,error:{code:d.REQUEST_IDEMPOTENCY_REQUIRED,message:`RPC method ${e.method} requires meta.idempotencyKey.`}}:{ok:!0,meta:r}}var R=class{now;active=new Map;idempotency=new Map;counters={completedRequests:0,cancelledRequests:0,deadlineExceededRequests:0,dedupedRequests:0,lateResponsesDropped:0,invalidRequests:0};constructor(t={}){this.now=t.now??(()=>Date.now())}begin(t,r){let o=v({method:t,meta:r},this.now());if(!o.ok)return this.counters.invalidRequests+=1,{status:"rejected",error:o.error};if(r.idempotencyKey){let i=this.idempotency.get(r.idempotencyKey);if(i)return this.counters.dedupedRequests+=1,i.error?{status:"deduped",error:i.error}:{status:"deduped",result:i.result}}return this.active.set(r.requestId,{method:t,meta:r,cancelled:!1,startedAt:this.now()}),{status:"started"}}cancel(t,r="cancelled"){let o=this.active.get(t);return!o||o.cancelled?!1:(o.cancelled=!0,o.cancelReason=r,this.counters.cancelledRequests+=1,!0)}expire(t){return this.active.get(t)?(this.active.delete(t),this.counters.deadlineExceededRequests+=1,!0):!1}settle(t,r,o){let i=this.active.get(t);return i?(this.active.delete(t),i.cancelled?(this.counters.lateResponsesDropped+=1,{accepted:!1,reason:"cancelled"}):i.meta.deadlineAt<=this.now()?(this.counters.deadlineExceededRequests+=1,this.counters.lateResponsesDropped+=1,{accepted:!1,reason:"deadline_exceeded"}):(this.counters.completedRequests+=1,i.meta.idempotencyKey&&this.idempotency.set(i.meta.idempotencyKey,{result:r,error:o,settledAt:this.now()}),{accepted:!0})):{accepted:!1,reason:"unknown"}}metrics(){return{activeRequests:this.active.size,...this.counters}}};var ee=["agent.health","agent.metrics","agent.cancel","session.list","session.get","session.create","session.update","session.delete","session.deleteAll","session.archive","session.moveToProject","session.getState","session.switchProject","session.getMessages","project.list","project.create","project.delete","project.rename","project.archive","project.unarchive","project.update","project.purgeAll","instructions.list","instructions.read","instructions.write","instructions.delete","files.list","files.read","files.create","files.rename","files.delete","files.gitStatus","skills.list","memory.list-files","memory.atlas","memory.activity","memory.observe","memory.propose","memory.consolidate","memory.update","memory.attachment.adopt","memory.attachment.locate"];var M=["turn.start","turn.delta","turn.end","turn.error","turn.recovery","turn.tool_call","turn.tool_result","turn.tool_blocked","turn.reasoning_delta","turn.approval_request","turn.skill_instruction","turn.ask_user","turn.media_result","turn.media_progress","turn.media_usage","turn.media_capability_check","turn.plan_update","turn.suggestions","turn.sidechain_started","turn.subagent_delta","turn.sidechain_completed","turn.task_updated","turn.todos_updated","turn.exec_progress","turn.usage_update","team.member.notification","session.info","memory.updated","skills.updated","pet.soul_ready","pet.reaction","pet.growth","pet.state","pet.confirm","pet.asset.updated","system.activity","workflow.created","workflow.updated","workflow.deleted","workflow.runStarted","workflow.runCompleted","workflow.runFailed","workflow.nodeStatus","workflow.triggerDropped","workflow.alert","workflow.approvalRequested"],k=["solo.progress","solo.agentDelta","solo.agentUsage","solo.agentDiff","solo.evaluation","product.taskStarted","product.taskOutput","product.taskCompleted","product.taskFailed","product.budgetUpdate","product.budgetWarning","product.checkpointed","product.completed","product.dagTopology","plan.interrupted"],te=[...M,...k];var re=1,oe={INITIALIZE:"initialize",SESSION_NEW:"session/new",SESSION_PROMPT:"session/prompt",SESSION_CLOSE:"session/close",SESSION_SET_CONFIG:"session/set_config_option",SESSION_SET_MODEL:"session/set_model",SESSION_SET_MODE:"session/set_mode",SESSION_LOAD:"session/load",SESSION_CANCEL:"session/cancel",SESSION_UPDATE:"session/update",SESSION_REQUEST_PERMISSION:"session/request_permission",FS_READ_TEXT_FILE:"fs/read_text_file",FS_WRITE_TEXT_FILE:"fs/write_text_file"},ne={ABORT:"x/abort",DREAM:"x/dream",AGENTS_LIST:"x/agents.list",SOLO_START:"x/solo.start",SOLO_STATUS:"x/solo.status",SOLO_SELECT:"x/solo.select",SOLO_CANCEL:"x/solo.cancel",PRODUCT_CREATE:"x/product.create",PRODUCT_PLAN:"x/product.plan",PRODUCT_CONFIRM:"x/product.confirm",PRODUCT_MESSAGE:"x/product.message",PRODUCT_RESUME:"x/product.resume",PRODUCT_PAUSE:"x/product.pause",PRODUCT_CANCEL:"x/product.cancel",PRODUCT_ROLLBACK:"x/product.rollback",PRODUCT_STATUS:"x/product.status",SOLO_SUBSCRIBE:"x/solo.subscribe",SOLO_MESSAGE:"x/solo.message",SOLO_EVALUATE:"x/solo.evaluate",SOLO_SPEC_CHAT:"x/solo.specChat",SOLO_SPEC_JUDGE:"x/solo.specJudge",WORKFLOW_CHAT:"x/workflow.chat",WORKFLOW_MATCH_INTENT:"x/workflow.matchIntent",PRODUCT_SUBSCRIBE:"x/product.subscribe"},x={USER_MESSAGE_CHUNK:"user_message_chunk",AGENT_MESSAGE_CHUNK:"agent_message_chunk",AGENT_THOUGHT_CHUNK:"agent_thought_chunk",TOOL_CALL:"tool_call",TOOL_CALL_UPDATE:"tool_call_update",PLAN:"plan",USAGE_UPDATE:"usage_update",CONFIG_OPTION_UPDATE:"config_option_update",SESSION_INFO_UPDATE:"session_info_update",AVAILABLE_COMMANDS_UPDATE:"available_commands_update",CURRENT_MODE_UPDATE:"current_mode_update"},ie={X_SKILL_INSTRUCTION:"x_skill_instruction",X_SESSION_INFO:"x_session_info",X_RELAY:"x_relay"};function O(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&"id"in t}function N(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&!("id"in t)}function w(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&"id"in t&&!("method"in t)}function se(e){let t;try{t=JSON.parse(e)}catch{return null}return w(t)||O(t)||N(t)?t:null}function ae(e){return Object.values(x).includes(e)}function pe(e){return e.startsWith("x_")}var E=["gatewayVersion","toolNamespaces","workspaceIds","installedCapabilities","enabledCapabilities","features","approvalMode","toolManifests","skillManifests","pluginManifests","mcpManifests","approvalPolicy","workspaceSummaries"];function g(e){return e?e.map(t=>({...t})):void 0}function _(e){return e?e.map(t=>({...t})):void 0}function ce(e){return e?[...e]:void 0}function D(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort((t,r)=>t.localeCompare(r))}function m(e){return{...e,toolNamespaces:[...e.toolNamespaces],workspaceIds:[...e.workspaceIds],...e.changedSections?{changedSections:[...e.changedSections]}:{},...e.installedCapabilities?{installedCapabilities:[...e.installedCapabilities]}:{},...e.enabledCapabilities?{enabledCapabilities:[...e.enabledCapabilities]}:{},...e.features?{features:[...e.features]}:{},...e.toolManifests?{toolManifests:g(e.toolManifests)}:{},...e.skillManifests?{skillManifests:g(e.skillManifests)}:{},...e.pluginManifests?{pluginManifests:g(e.pluginManifests)}:{},...e.mcpManifests?{mcpManifests:g(e.mcpManifests)}:{},...e.approvalPolicy?{approvalPolicy:{...e.approvalPolicy}}:{},...e.workspaceSummaries?{workspaceSummaries:_(e.workspaceSummaries)}:{}}}function le(e){let{previous:t,update:r}=e;return!(r.syncMode==="diff"&&t&&(!r.baseSnapshotVersion||t.snapshotVersion===r.baseSnapshotVersion))||!t?m(r):{...m(t),snapshotVersion:r.snapshotVersion,updatedAt:r.updatedAt,...r.gatewayVersion!==void 0?{gatewayVersion:r.gatewayVersion}:{},...r.syncMode?{syncMode:r.syncMode}:{},...r.baseSnapshotVersion?{baseSnapshotVersion:r.baseSnapshotVersion}:{},...r.changedSections?{changedSections:[...r.changedSections]}:{},...r.toolNamespaces?{toolNamespaces:[...r.toolNamespaces]}:{},...r.workspaceIds?{workspaceIds:[...r.workspaceIds]}:{},...r.installedCapabilities?{installedCapabilities:[...r.installedCapabilities]}:{},...r.enabledCapabilities?{enabledCapabilities:[...r.enabledCapabilities]}:{},...r.features?{features:[...r.features]}:{},...r.approvalMode?{approvalMode:r.approvalMode}:{},...r.toolManifests?{toolManifests:g(r.toolManifests)}:{},...r.skillManifests?{skillManifests:g(r.skillManifests)}:{},...r.pluginManifests?{pluginManifests:g(r.pluginManifests)}:{},...r.mcpManifests?{mcpManifests:g(r.mcpManifests)}:{},...r.approvalPolicy?{approvalPolicy:{...r.approvalPolicy}}:{},...r.workspaceSummaries?{workspaceSummaries:_(r.workspaceSummaries)}:{}}}function de(e){return D(e.map(t=>t.name.split(".")[0]??"").filter(Boolean))}function ue(e){return D(e.map(t=>t.id))}function ge(e){let{previous:t,current:r}=e;if(!t)return{...m(r),syncMode:"full"};if(t.snapshotVersion===r.snapshotVersion)return null;let o=E.filter(s=>JSON.stringify(t[s])!==JSON.stringify(r[s]));if(o.length===E.length)return{...m(r),syncMode:"full"};let i={snapshotVersion:r.snapshotVersion,updatedAt:r.updatedAt,syncMode:"diff",baseSnapshotVersion:t.snapshotVersion,changedSections:o,toolNamespaces:[...r.toolNamespaces],workspaceIds:[...r.workspaceIds]},c=i;for(let s of o){let n=r[s];if(n!==void 0)switch(s){case"toolNamespaces":case"workspaceIds":case"installedCapabilities":case"enabledCapabilities":case"features":c[s]=ce(n);break;case"approvalPolicy":c[s]={...n};break;case"workspaceSummaries":c[s]=_(n);break;case"toolManifests":case"skillManifests":case"pluginManifests":case"mcpManifests":c[s]=g(n);break;default:c[s]=n;break}}return i}var me=["web_search","web_fetch","deep_research","browser_execution"],ye=["web-intelligence","browser-execution"],fe=["discovery","read-url","multi-source-research","interactive-browser"],Ae=["stateless","render-backend","interactive-session"],Re=["stateless","stateless-single-step","stateful-session-required"],Ee=["required","conditional","none"],_e=["browser-read","browser-authenticated-read","browser-state-changing"];var Se=["read-page","read-authenticated-page","fill-form","submit-form","download-file","reuse-session"],be=["web_search","web_fetch","deep_research","blocked"],Te=["requires-interaction","requires-login-state","requires-rendered-dom","requires-persistent-session","requires-state-changing-action"],Pe=["none","same-capability-once","degrade-only"];var Ce=["prefetch","sync_turn","on_pre_compress","on_session_end","on_delegation","on_memory_write"],Ie=["turn","sidechain","compress","session-end","agent-remember","auto-extract","implicit-extract","profile-extraction","dream"],he=["observe-only","parent-write","deny"];var ve=2,a={gatewayImage:"gateway.image.desktop-slim",whisperModelTiny:"speech.whisper.model.tiny",ffmpegWin32X64:"runtime.ffmpeg.win32-x64",nodeWin32X64:"runtime.node.win32-x64",dockerDesktopWin32X64:"runtime.docker-desktop.win32-x64",dockerDesktopDarwinX64:"runtime.docker-desktop.darwin-x64",dockerDesktopDarwinArm64:"runtime.docker-desktop.darwin-arm64"},y={desktopDockerBridge:"desktop.docker-bridge",desktopEmbeddedWin32X64:"desktop.embedded.win32-x64"};function U(e){return{...e,artifacts:e.artifacts.map(t=>({...t}))}}function Me(e){return{...e,assetIds:[...e.assetIds]}}function K(){return{[y.desktopDockerBridge]:{id:y.desktopDockerBridge,title:"Desktop Docker Bridge",platform:"any",assetIds:[a.gatewayImage,a.dockerDesktopWin32X64,a.dockerDesktopDarwinX64,a.dockerDesktopDarwinArm64],description:"Docker bridge mode downloads the desktop slim gateway image on demand."},[y.desktopEmbeddedWin32X64]:{id:y.desktopEmbeddedWin32X64,title:"Desktop Embedded Win32 x64",platform:"win32-x64",assetIds:[a.nodeWin32X64,a.ffmpegWin32X64,a.whisperModelTiny],description:"Embedded desktop mode requires the bundled Node/FFmpeg runtimes and the whisper model asset."}}}function W(e,t){return e.assets[t]}function V(e,t){return e.profiles[t]}function ke(e,t){let r=V(e,t);return r?r.assetIds.map(o=>W(e,o)).filter(o=>!!o):[]}function xe(e,t){return e.assets[t.id]=U(t),F(e)}function S(e){if(!e)return;let t=e.artifacts[0];if(!(!t?.url||!t.sha256||typeof t.size!="number"))return{version:e.version,sha256:t.sha256,size:t.size,url:t.url}}function F(e){let t=S(e.assets[a.gatewayImage]),r=S(e.assets[a.whisperModelTiny]);return{...e,gateway:t,whisperModel:r}}function L(e,t){if(!(typeof e.version!="string"||typeof e.url!="string"))return{...t,version:e.version,artifacts:[{fileName:e.url.split("/").pop()||`${t.id}.bin`,url:e.url,sha256:typeof e.sha256=="string"?e.sha256:void 0,size:typeof e.size=="number"?e.size:void 0}]}}function Oe(e){let t=e&&typeof e=="object"?e:{},r={},o=t.assets&&typeof t.assets=="object"?t.assets:{};for(let[n,p]of Object.entries(o)){if(!p||typeof p!="object")continue;let u=p;!u.id||!Array.isArray(u.artifacts)||(r[n]=U(u))}if(!r[a.gatewayImage]&&t.gateway&&typeof t.gateway=="object"){let n=L(t.gateway,{id:a.gatewayImage,title:"OpenClaw Gateway Image (Desktop Slim)",kind:"container-image",delivery:"remote",platform:"any",description:"Desktop Docker mode gateway image."});n&&(r[n.id]=n)}if(!r[a.whisperModelTiny]&&t.whisperModel&&typeof t.whisperModel=="object"){let n=L(t.whisperModel,{id:a.whisperModelTiny,title:"Whisper Tiny Model",kind:"model",delivery:"remote",platform:"any",description:"Shared whisper.cpp tiny model asset for embedded desktop speech recognition."});n&&(r[n.id]=n)}let c={...K()},s=t.profiles&&typeof t.profiles=="object"?t.profiles:{};for(let[n,p]of Object.entries(s)){if(!p||typeof p!="object")continue;let u=p;!u.id||!Array.isArray(u.assetIds)||(c[n]=Me(u))}return F({schemaVersion:typeof t.schemaVersion=="number"?t.schemaVersion:2,channel:typeof t.channel=="string"?t.channel:void 0,publishedAt:typeof t.publishedAt=="string"?t.publishedAt:void 0,minElectronVersion:typeof t.minElectronVersion=="string"?t.minElectronVersion:void 0,releaseNotes:typeof t.releaseNotes=="string"?t.releaseNotes:void 0,assets:r,profiles:c})}var Ne=["pending","captured","failed","restored"],we=["file","directory","missing"],De=["metadata-only","workspace-copy","shadow-git"];var Le=["api-key","oauth","token","aws-sdk"],Ue=["rate_limit","auth","server_error","timeout","network","unknown"],Ke=["requiresOpenAiAnthropicToolPayload"];function We(e,t){return!e||typeof e!="object"||Array.isArray(e)?!1:e[t]===!0}var j="openai-codex";function A(e){let t=e.trim().toLowerCase();return t==="z.ai"||t==="z-ai"?"zai":t==="opencode-zen"?"opencode":t==="kimi-code"?"kimi-coding":t==="bedrock"||t==="aws-bedrock"?"amazon-bedrock":t==="bytedance"||t==="doubao"?"volcengine":t}function B(e){let t=A(e);return t==="volcengine-plan"?"volcengine":t==="qwen-coding"?"qwen":t==="byteplus-plan"?"byteplus":t}var Ve=B,Fe={anthropicToolSchemaMode:"native",anthropicToolChoiceMode:"native",providerFamily:"default",preserveAnthropicThinkingSignatures:!0,openAiCompatTurnValidation:!0,providerThoughtSignatureSanitization:!1,transcriptToolCallIdMode:"default",transcriptToolCallIdModelHints:[],providerThoughtSignatureModelHints:[],dropThinkingBlockModelHints:[]},je={anthropic:{providerFamily:"anthropic"},"amazon-bedrock":{providerFamily:"anthropic"},"kimi-coding":{anthropicToolSchemaMode:"openai-functions",anthropicToolChoiceMode:"openai-string-modes",preserveAnthropicThinkingSignatures:!1},mistral:{transcriptToolCallIdMode:"strict9",transcriptToolCallIdModelHints:["mistral","mixtral","codestral","pixtral","devstral","ministral","mistralai"]},openai:{providerFamily:"openai"},[j]:{providerFamily:"openai"},openrouter:{openAiCompatTurnValidation:!1,providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]},opencode:{openAiCompatTurnValidation:!1,providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]},kilocode:{providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]}};function b(e,t){let r=(e??"").toLowerCase();return!!r&&t.some(o=>r.includes(o))}function l(e){let t=A(e??"");return{...Fe,...je[t]}}function Be(e){return l(e).preserveAnthropicThinkingSignatures}function qe(e){let t=l(e);return t.anthropicToolSchemaMode!=="native"||t.anthropicToolChoiceMode!=="native"}function Ye(e){return l(e).anthropicToolSchemaMode==="openai-functions"}function He(e){return l(e).anthropicToolChoiceMode==="openai-string-modes"}function Ge(e){return l(e).openAiCompatTurnValidation}function ze(e){return l(e).providerFamily==="openai"}function Xe(e){return l(e).providerFamily==="anthropic"}function Je(e){return b(e.modelId,l(e.provider).dropThinkingBlockModelHints)}function Qe(e){let t=l(e.provider);return t.providerThoughtSignatureSanitization&&b(e.modelId,t.providerThoughtSignatureModelHints)}function $e(e,t){let r=l(e),o=r.transcriptToolCallIdMode;if(o==="strict9")return o;if(b(t,r.transcriptToolCallIdModelHints))return"strict9"}var T={anthropic:["ANTHROPIC_OAUTH_TOKEN","ANTHROPIC_API_KEY"],chutes:["CHUTES_OAUTH_TOKEN","CHUTES_API_KEY"],zai:["ZAI_API_KEY","Z_AI_API_KEY"],opencode:["OPENCODE_API_KEY","OPENCODE_ZEN_API_KEY"],qwen:["DASHSCOPE_API_KEY","QWEN_API_KEY"],"qwen-coding":["DASHSCOPE_API_KEY","QWEN_API_KEY"],volcengine:["VOLCANO_ENGINE_API_KEY","ARK_API_KEY","DOUBAO_API_KEY"],"volcengine-plan":["VOLCANO_ENGINE_API_KEY","ARK_API_KEY","DOUBAO_API_KEY"],byteplus:["BYTEPLUS_API_KEY"],"byteplus-plan":["BYTEPLUS_API_KEY"],"kimi-coding":["KIMI_API_KEY","KIMICODE_API_KEY"],huggingface:["HUGGINGFACE_HUB_TOKEN","HF_TOKEN"],openai:["OPENAI_API_KEY"],voyage:["VOYAGE_API_KEY"],groq:["GROQ_API_KEY"],deepgram:["DEEPGRAM_API_KEY"],cerebras:["CEREBRAS_API_KEY"],xai:["XAI_API_KEY"],openrouter:["OPENROUTER_API_KEY"],litellm:["LITELLM_API_KEY"],"vercel-ai-gateway":["AI_GATEWAY_API_KEY"],"cloudflare-ai-gateway":["CLOUDFLARE_AI_GATEWAY_API_KEY"],moonshot:["MOONSHOT_API_KEY"],minimax:["MINIMAX_API_KEY"],"minimax-cn":["MINIMAX_CN_API_KEY","MINIMAX_API_KEY"],nvidia:["NVIDIA_API_KEY"],xiaomi:["XIAOMI_API_KEY"],synthetic:["SYNTHETIC_API_KEY"],venice:["VENICE_API_KEY"],mistral:["MISTRAL_API_KEY"],together:["TOGETHER_API_KEY"],qianfan:["QIANFAN_API_KEY"],ollama:["OLLAMA_API_KEY"],vllm:["VLLM_API_KEY"],kilocode:["KILOCODE_API_KEY"]};function Ze(){return[...new Set(Object.values(T).flat())]}function et(e){let t=A(e.provider),r=e.env??process.env,o=new Set(e.appliedEnvKeys??[]),i=n=>{let p=r[n]?.trim();if(!p)return null;let u=o.has(n)?`shell env: ${n}`:`env: ${n}`;return{apiKey:p,source:u}},c=e.resolveSpecialApiKey?.(t,r,o);if(c)return c;let s=T[t];if(!s||s.length===0)return null;for(let n of s){let p=i(n);if(p)return p}return null}export{ne as ACP_EXTENDED_METHODS,ie as ACP_EXTENDED_SESSION_UPDATE_TYPES,oe as ACP_METHODS,re as ACP_PROTOCOL_VERSION,x as ACP_SESSION_UPDATE_TYPES,H as AGENT_RPC_APPROVAL_METHODS,d as AGENT_RPC_ERROR_CODES,Y as AGENT_RPC_PROTOCOL_VERSION,k as AGENT_TEAM_WS_EVENT_NAMES,M as AGENT_WS_EVENT_NAMES,te as ALL_AGENT_WS_EVENT_NAMES,E as CAPABILITY_MANIFEST_DIFF_SECTIONS,ee as GATEWAY_RPC_METHODS,R as GatewayRpcContract,Ce as MEMORY_OBSERVATION_HOOK_VALUES,Ie as MEMORY_OBSERVATION_SOURCE_VALUES,he as MEMORY_WRITE_ACCESS_VALUES,De as MUTATION_CHECKPOINT_BACKEND_VALUES,we as MUTATION_CHECKPOINT_ENTRY_KIND_VALUES,Ne as MUTATION_CHECKPOINT_PHASE_VALUES,q as PETDEX_ANIMATION_IDS,Le as PROVIDER_RUNTIME_AUTH_MODE_VALUES,Ke as PROVIDER_RUNTIME_COMPAT_FLAG_VALUES,T as PROVIDER_RUNTIME_ENV_API_KEY_CANDIDATES,j as PROVIDER_RUNTIME_OPENAI_CODEX_PROVIDER_ID,Ue as PROVIDER_RUNTIME_VAULT_ERROR_TYPE_VALUES,ve as RESOURCE_MANIFEST_SCHEMA_VERSION,a as RUNTIME_ASSET_IDS,y as RUNTIME_PROFILE_IDS,Se as WEB_ACTION_SCOPE_VALUES,Ee as WEB_APPROVAL_DEFAULT_VALUES,ye as WEB_CAPABILITY_FAMILY_VALUES,me as WEB_CAPABILITY_ID_VALUES,be as WEB_DEGRADATION_TARGET_VALUES,Te as WEB_ESCALATION_REASON_VALUES,Ae as WEB_EXECUTION_MODE_VALUES,_e as WEB_POLICY_RISK_CLASS_VALUES,Pe as WEB_RETRY_POLICY_VALUES,Re as WEB_STATEFULNESS_VALUES,fe as WEB_TASK_MODE_VALUES,Z as buildAgentRpcMeta,f as classifyGatewayRpcMethod,m as cloneCapabilityManifestSnapshot,ge as createCapabilityManifestDiffPayload,K as createDefaultRuntimeResourceProfiles,de as deriveCapabilityToolNamespaces,ue as deriveCapabilityWorkspaceIds,S as getManifestShortcutEntry,W as getRuntimeResourceAsset,V as getRuntimeResourceProfile,ke as getRuntimeResourceProfileAssets,N as isAcpJsonRpcNotification,O as isAcpJsonRpcRequest,w as isAcpJsonRpcResponse,I as isAgentRpcNotification,P as isAgentRpcRequest,C as isAgentRpcResponse,Xe as isAnthropicProviderRuntimeFamily,pe as isExtendedSessionUpdateType,ze as isOpenAiProviderRuntimeFamily,ae as isStandardSessionUpdateType,Ze as listProviderRuntimeEnvApiKeyNames,le as mergeCapabilityManifestSnapshot,A as normalizeProviderRuntimeId,B as normalizeProviderRuntimeIdForAuth,Oe as normalizeRuntimeResourceManifest,se as parseAcpMessage,G as parseAgentRpcMessage,Be as preservesProviderRuntimeAnthropicThinkingSignatures,We as readProviderRuntimeCompatFlag,v as requireGatewayRpcMeta,h as requiresIdempotencyKey,qe as requiresOpenAiCompatibleAnthropicToolPayloadForProviderRuntime,l as resolveProviderRuntimeCapabilities,et as resolveProviderRuntimeEnvApiKey,Ve as resolveProviderRuntimeKeyFamily,$e as resolveProviderRuntimeTranscriptToolCallIdMode,Je as shouldDropThinkingBlocksForProviderRuntimeModel,Qe as shouldSanitizeProviderRuntimeThoughtSignaturesForModel,Ge as supportsOpenAiCompatTurnValidationForProviderRuntime,xe as upsertRuntimeResourceAsset,Ye as usesOpenAiFunctionAnthropicToolSchemaForProviderRuntime,He as usesOpenAiStringModeAnthropicToolChoiceForProviderRuntime};
1
+ var q=["idle","running-right","running-left","waving","jumping","failed","waiting","running","review"];var Y="1.0.0",d={PARSE_ERROR:-32700,INVALID_REQUEST:-32600,METHOD_NOT_FOUND:-32601,INVALID_PARAMS:-32602,INTERNAL_ERROR:-32603,TURN_ABORTED:-32e3,TURN_TIMEOUT:-32001,LLM_ERROR:-32010,LLM_AUTH_ERROR:-32011,LLM_RATE_LIMIT:-32012,LLM_QUOTA_EXHAUSTED:-32013,LLM_MODEL_NOT_FOUND:-32014,TOOL_INVOKE_FAILED:-32020,TOOL_TIMEOUT:-32021,PROTOCOL_MISMATCH:-32030,REQUEST_DEADLINE_EXCEEDED:-32040,REQUEST_CANCELLED:-32041,REQUEST_DEDUPED:-32042,REQUEST_IDEMPOTENCY_REQUIRED:-32043},H={REQUEST:"tool.approval.request"};function P(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&t.method.length>0}function C(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&(typeof t.id=="string"||typeof t.id=="number")&&!("method"in t)}function I(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&!("id"in t)}function G(e){let t;try{t=JSON.parse(e)}catch{return null}return C(t)||P(t)||I(t)?t:null}import{randomUUID as z}from"node:crypto";var X=["settings.list","settings.get","settings.validate","provider.list","config.get","config.tunables","tools.list","todos.list","tasks.list","agents.list","agents.get","agents.processes","agents.scan","session.list","session.get","session.resolve","thread.list","project.list","files.list","files.gitStatus","instructions.list","instructions.read","skills.list","skills.stats","memory.atlas","memory.activity","memory.list","memory.read","memory.search","media.listModels","media.status","pet.status","agent.health","agent.metrics"],J=new Set(["memory.dream","memory.propose","memory.consolidate","media.stt","pet.forge","pet.asset.import","solo.start","solo.evaluate","product.plan","product.create","product.message"]),Q=["memory.","pet.","usage."],$=new Set(["memory.atlas","memory.activity","memory.list","memory.read","memory.search","memory.attachment.locate","memory.attachment.adopt","pet.status"]);function f(e){return J.has(e)?{channel:"task",mutability:"write",defaultTimeoutMs:12e4}:X.some(t=>e===t||e.startsWith(`${t}.`)||e.startsWith(t))?{channel:"query",mutability:"read",defaultTimeoutMs:1e4}:{channel:"task",mutability:"write",defaultTimeoutMs:3e4}}function h(e){return $.has(e)||f(e).mutability==="read"?!1:Q.some(t=>e.startsWith(t))}function Z(e,t={}){let r=t.now??Date.now(),o=f(e),i=t.timeoutMs??o.defaultTimeoutMs;return{requestId:t.requestId??z(),createdAt:r,deadlineAt:r+i,channel:t.channel??o.channel,idempotencyKey:t.idempotencyKey,traceId:t.traceId}}function v(e,t=Date.now()){let r=e.meta;if(!r||typeof r!="object")return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta is required."}};if(typeof r.requestId!="string"||r.requestId.length===0)return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta.requestId is required."}};if(r.channel!=="query"&&r.channel!=="task")return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta.channel must be query or task."}};if(typeof r.createdAt!="number"||!Number.isFinite(r.createdAt))return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta.createdAt is required."}};if(typeof r.deadlineAt!="number"||!Number.isFinite(r.deadlineAt))return{ok:!1,error:{code:d.INVALID_REQUEST,message:"RPC request meta.deadlineAt is required."}};if(r.deadlineAt<=t)return{ok:!1,error:{code:d.REQUEST_DEADLINE_EXCEEDED,message:"RPC request deadline has already expired."}};let o=f(e.method).channel;return r.channel!==o?{ok:!1,error:{code:d.INVALID_REQUEST,message:`RPC request channel mismatch: expected ${o}, got ${r.channel}.`}}:h(e.method)&&(typeof r.idempotencyKey!="string"||r.idempotencyKey.length===0)?{ok:!1,error:{code:d.REQUEST_IDEMPOTENCY_REQUIRED,message:`RPC method ${e.method} requires meta.idempotencyKey.`}}:{ok:!0,meta:r}}var R=class{now;active=new Map;idempotency=new Map;counters={completedRequests:0,cancelledRequests:0,deadlineExceededRequests:0,dedupedRequests:0,lateResponsesDropped:0,invalidRequests:0};constructor(t={}){this.now=t.now??(()=>Date.now())}begin(t,r){let o=v({method:t,meta:r},this.now());if(!o.ok)return this.counters.invalidRequests+=1,{status:"rejected",error:o.error};if(r.idempotencyKey){let i=this.idempotency.get(r.idempotencyKey);if(i)return this.counters.dedupedRequests+=1,i.error?{status:"deduped",error:i.error}:{status:"deduped",result:i.result}}return this.active.set(r.requestId,{method:t,meta:r,cancelled:!1,startedAt:this.now()}),{status:"started"}}cancel(t,r="cancelled"){let o=this.active.get(t);return!o||o.cancelled?!1:(o.cancelled=!0,o.cancelReason=r,this.counters.cancelledRequests+=1,!0)}expire(t){return this.active.get(t)?(this.active.delete(t),this.counters.deadlineExceededRequests+=1,!0):!1}settle(t,r,o){let i=this.active.get(t);return i?(this.active.delete(t),i.cancelled?(this.counters.lateResponsesDropped+=1,{accepted:!1,reason:"cancelled"}):i.meta.deadlineAt<=this.now()?(this.counters.deadlineExceededRequests+=1,this.counters.lateResponsesDropped+=1,{accepted:!1,reason:"deadline_exceeded"}):(this.counters.completedRequests+=1,i.meta.idempotencyKey&&this.idempotency.set(i.meta.idempotencyKey,{result:r,error:o,settledAt:this.now()}),{accepted:!0})):{accepted:!1,reason:"unknown"}}metrics(){return{activeRequests:this.active.size,...this.counters}}};var ee=["agent.health","agent.metrics","agent.cancel","session.list","session.get","session.create","session.update","session.delete","session.deleteAll","session.archive","session.moveToProject","session.getState","session.switchProject","session.getMessages","project.list","project.create","project.delete","project.rename","project.archive","project.unarchive","project.update","project.purgeAll","instructions.list","instructions.read","instructions.write","instructions.delete","files.list","files.read","files.create","files.rename","files.delete","files.gitStatus","skills.list","memory.list-files","memory.atlas","memory.activity","memory.observe","memory.propose","memory.consolidate","memory.update","memory.attachment.adopt","memory.attachment.locate"];var M=["turn.start","turn.delta","turn.end","turn.error","turn.recovery","turn.tool_call","turn.tool_result","turn.tool_blocked","turn.reasoning_delta","turn.approval_request","turn.skill_instruction","turn.ask_user","turn.media_result","turn.media_progress","turn.media_usage","turn.media_capability_check","turn.plan_update","turn.suggestions","turn.sidechain_started","turn.subagent_started","turn.subagent_delta","turn.subagent_ended","turn.sidechain_completed","turn.task_updated","turn.todos_updated","turn.exec_progress","turn.tool_use_summary","turn.lifecycle","turn.document_maintenance","turn.artifact_contract","turn.usage_update","team.member.notification","session.info","memory.updated","skills.updated","pet.soul_ready","pet.reaction","pet.growth","pet.state","pet.confirm","pet.asset.updated","system.activity","workflow.created","workflow.updated","workflow.deleted","workflow.runStarted","workflow.runCompleted","workflow.runFailed","workflow.nodeStatus","workflow.triggerDropped","workflow.alert","workflow.approvalRequested"],k=["solo.progress","solo.agentDelta","solo.agentActivity","solo.agentUsage","solo.evaluation","product.taskStarted","product.taskOutput","product.taskCompleted","product.taskFailed","product.budgetUpdate","product.budgetWarning","product.checkpointed","product.completed","product.dagTopology","plan.interrupted"],te=[...M,...k];var re=1,oe={INITIALIZE:"initialize",SESSION_NEW:"session/new",SESSION_PROMPT:"session/prompt",SESSION_CLOSE:"session/close",SESSION_SET_CONFIG:"session/set_config_option",SESSION_SET_MODEL:"session/set_model",SESSION_SET_MODE:"session/set_mode",SESSION_LOAD:"session/load",SESSION_CANCEL:"session/cancel",SESSION_UPDATE:"session/update",SESSION_REQUEST_PERMISSION:"session/request_permission",FS_READ_TEXT_FILE:"fs/read_text_file",FS_WRITE_TEXT_FILE:"fs/write_text_file"},ne={ABORT:"x/abort",DREAM:"x/dream",AGENTS_LIST:"x/agents.list",SOLO_START:"x/solo.start",SOLO_STATUS:"x/solo.status",SOLO_SELECT:"x/solo.select",SOLO_CANCEL:"x/solo.cancel",PRODUCT_CREATE:"x/product.create",PRODUCT_PLAN:"x/product.plan",PRODUCT_CONFIRM:"x/product.confirm",PRODUCT_MESSAGE:"x/product.message",PRODUCT_RESUME:"x/product.resume",PRODUCT_PAUSE:"x/product.pause",PRODUCT_CANCEL:"x/product.cancel",PRODUCT_ROLLBACK:"x/product.rollback",PRODUCT_STATUS:"x/product.status",SOLO_SUBSCRIBE:"x/solo.subscribe",SOLO_MESSAGE:"x/solo.message",SOLO_EVALUATE:"x/solo.evaluate",SOLO_SPEC_CHAT:"x/solo.specChat",SOLO_SPEC_JUDGE:"x/solo.specJudge",WORKFLOW_CHAT:"x/workflow.chat",WORKFLOW_MATCH_INTENT:"x/workflow.matchIntent",PRODUCT_SUBSCRIBE:"x/product.subscribe"},x={USER_MESSAGE_CHUNK:"user_message_chunk",AGENT_MESSAGE_CHUNK:"agent_message_chunk",AGENT_THOUGHT_CHUNK:"agent_thought_chunk",TOOL_CALL:"tool_call",TOOL_CALL_UPDATE:"tool_call_update",PLAN:"plan",USAGE_UPDATE:"usage_update",CONFIG_OPTION_UPDATE:"config_option_update",SESSION_INFO_UPDATE:"session_info_update",AVAILABLE_COMMANDS_UPDATE:"available_commands_update",CURRENT_MODE_UPDATE:"current_mode_update"},ie={X_SKILL_INSTRUCTION:"x_skill_instruction",X_SESSION_INFO:"x_session_info",X_RELAY:"x_relay"};function O(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&"id"in t}function N(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&!("id"in t)}function w(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&"id"in t&&!("method"in t)}function se(e){let t;try{t=JSON.parse(e)}catch{return null}return w(t)||O(t)||N(t)?t:null}function ae(e){return Object.values(x).includes(e)}function pe(e){return e.startsWith("x_")}var E=["gatewayVersion","toolNamespaces","workspaceIds","installedCapabilities","enabledCapabilities","features","approvalMode","toolManifests","skillManifests","pluginManifests","mcpManifests","approvalPolicy","workspaceSummaries"];function g(e){return e?e.map(t=>({...t})):void 0}function _(e){return e?e.map(t=>({...t})):void 0}function ce(e){return e?[...e]:void 0}function D(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort((t,r)=>t.localeCompare(r))}function m(e){return{...e,toolNamespaces:[...e.toolNamespaces],workspaceIds:[...e.workspaceIds],...e.changedSections?{changedSections:[...e.changedSections]}:{},...e.installedCapabilities?{installedCapabilities:[...e.installedCapabilities]}:{},...e.enabledCapabilities?{enabledCapabilities:[...e.enabledCapabilities]}:{},...e.features?{features:[...e.features]}:{},...e.toolManifests?{toolManifests:g(e.toolManifests)}:{},...e.skillManifests?{skillManifests:g(e.skillManifests)}:{},...e.pluginManifests?{pluginManifests:g(e.pluginManifests)}:{},...e.mcpManifests?{mcpManifests:g(e.mcpManifests)}:{},...e.approvalPolicy?{approvalPolicy:{...e.approvalPolicy}}:{},...e.workspaceSummaries?{workspaceSummaries:_(e.workspaceSummaries)}:{}}}function le(e){let{previous:t,update:r}=e;return!(r.syncMode==="diff"&&t&&(!r.baseSnapshotVersion||t.snapshotVersion===r.baseSnapshotVersion))||!t?m(r):{...m(t),snapshotVersion:r.snapshotVersion,updatedAt:r.updatedAt,...r.gatewayVersion!==void 0?{gatewayVersion:r.gatewayVersion}:{},...r.syncMode?{syncMode:r.syncMode}:{},...r.baseSnapshotVersion?{baseSnapshotVersion:r.baseSnapshotVersion}:{},...r.changedSections?{changedSections:[...r.changedSections]}:{},...r.toolNamespaces?{toolNamespaces:[...r.toolNamespaces]}:{},...r.workspaceIds?{workspaceIds:[...r.workspaceIds]}:{},...r.installedCapabilities?{installedCapabilities:[...r.installedCapabilities]}:{},...r.enabledCapabilities?{enabledCapabilities:[...r.enabledCapabilities]}:{},...r.features?{features:[...r.features]}:{},...r.approvalMode?{approvalMode:r.approvalMode}:{},...r.toolManifests?{toolManifests:g(r.toolManifests)}:{},...r.skillManifests?{skillManifests:g(r.skillManifests)}:{},...r.pluginManifests?{pluginManifests:g(r.pluginManifests)}:{},...r.mcpManifests?{mcpManifests:g(r.mcpManifests)}:{},...r.approvalPolicy?{approvalPolicy:{...r.approvalPolicy}}:{},...r.workspaceSummaries?{workspaceSummaries:_(r.workspaceSummaries)}:{}}}function de(e){return D(e.map(t=>t.name.split(".")[0]??"").filter(Boolean))}function ue(e){return D(e.map(t=>t.id))}function ge(e){let{previous:t,current:r}=e;if(!t)return{...m(r),syncMode:"full"};if(t.snapshotVersion===r.snapshotVersion)return null;let o=E.filter(s=>JSON.stringify(t[s])!==JSON.stringify(r[s]));if(o.length===E.length)return{...m(r),syncMode:"full"};let i={snapshotVersion:r.snapshotVersion,updatedAt:r.updatedAt,syncMode:"diff",baseSnapshotVersion:t.snapshotVersion,changedSections:o,toolNamespaces:[...r.toolNamespaces],workspaceIds:[...r.workspaceIds]},c=i;for(let s of o){let n=r[s];if(n!==void 0)switch(s){case"toolNamespaces":case"workspaceIds":case"installedCapabilities":case"enabledCapabilities":case"features":c[s]=ce(n);break;case"approvalPolicy":c[s]={...n};break;case"workspaceSummaries":c[s]=_(n);break;case"toolManifests":case"skillManifests":case"pluginManifests":case"mcpManifests":c[s]=g(n);break;default:c[s]=n;break}}return i}var me=["web_search","web_fetch","deep_research","browser_execution"],ye=["web-intelligence","browser-execution"],fe=["discovery","read-url","multi-source-research","interactive-browser"],Ae=["stateless","render-backend","interactive-session"],Re=["stateless","stateless-single-step","stateful-session-required"],Ee=["required","conditional","none"],_e=["browser-read","browser-authenticated-read","browser-state-changing"];var Se=["read-page","read-authenticated-page","fill-form","submit-form","download-file","reuse-session"],be=["web_search","web_fetch","deep_research","blocked"],Te=["requires-interaction","requires-login-state","requires-rendered-dom","requires-persistent-session","requires-state-changing-action"],Pe=["none","same-capability-once","degrade-only"];var Ce=["prefetch","sync_turn","on_pre_compress","on_session_end","on_delegation","on_memory_write"],Ie=["turn","sidechain","compress","session-end","agent-remember","auto-extract","implicit-extract","profile-extraction","dream"],he=["observe-only","parent-write","deny"];var ve=2,a={gatewayImage:"gateway.image.desktop-slim",whisperModelTiny:"speech.whisper.model.tiny",ffmpegWin32X64:"runtime.ffmpeg.win32-x64",nodeWin32X64:"runtime.node.win32-x64",dockerDesktopWin32X64:"runtime.docker-desktop.win32-x64",dockerDesktopDarwinX64:"runtime.docker-desktop.darwin-x64",dockerDesktopDarwinArm64:"runtime.docker-desktop.darwin-arm64"},y={desktopDockerBridge:"desktop.docker-bridge",desktopEmbeddedWin32X64:"desktop.embedded.win32-x64"};function U(e){return{...e,artifacts:e.artifacts.map(t=>({...t}))}}function Me(e){return{...e,assetIds:[...e.assetIds]}}function K(){return{[y.desktopDockerBridge]:{id:y.desktopDockerBridge,title:"Desktop Docker Bridge",platform:"any",assetIds:[a.gatewayImage,a.dockerDesktopWin32X64,a.dockerDesktopDarwinX64,a.dockerDesktopDarwinArm64],description:"Docker bridge mode downloads the desktop slim gateway image on demand."},[y.desktopEmbeddedWin32X64]:{id:y.desktopEmbeddedWin32X64,title:"Desktop Embedded Win32 x64",platform:"win32-x64",assetIds:[a.nodeWin32X64,a.ffmpegWin32X64,a.whisperModelTiny],description:"Embedded desktop mode requires the bundled Node/FFmpeg runtimes and the whisper model asset."}}}function W(e,t){return e.assets[t]}function V(e,t){return e.profiles[t]}function ke(e,t){let r=V(e,t);return r?r.assetIds.map(o=>W(e,o)).filter(o=>!!o):[]}function xe(e,t){return e.assets[t.id]=U(t),F(e)}function S(e){if(!e)return;let t=e.artifacts[0];if(!(!t?.url||!t.sha256||typeof t.size!="number"))return{version:e.version,sha256:t.sha256,size:t.size,url:t.url}}function F(e){let t=S(e.assets[a.gatewayImage]),r=S(e.assets[a.whisperModelTiny]);return{...e,gateway:t,whisperModel:r}}function L(e,t){if(!(typeof e.version!="string"||typeof e.url!="string"))return{...t,version:e.version,artifacts:[{fileName:e.url.split("/").pop()||`${t.id}.bin`,url:e.url,sha256:typeof e.sha256=="string"?e.sha256:void 0,size:typeof e.size=="number"?e.size:void 0}]}}function Oe(e){let t=e&&typeof e=="object"?e:{},r={},o=t.assets&&typeof t.assets=="object"?t.assets:{};for(let[n,p]of Object.entries(o)){if(!p||typeof p!="object")continue;let u=p;!u.id||!Array.isArray(u.artifacts)||(r[n]=U(u))}if(!r[a.gatewayImage]&&t.gateway&&typeof t.gateway=="object"){let n=L(t.gateway,{id:a.gatewayImage,title:"OpenClaw Gateway Image (Desktop Slim)",kind:"container-image",delivery:"remote",platform:"any",description:"Desktop Docker mode gateway image."});n&&(r[n.id]=n)}if(!r[a.whisperModelTiny]&&t.whisperModel&&typeof t.whisperModel=="object"){let n=L(t.whisperModel,{id:a.whisperModelTiny,title:"Whisper Tiny Model",kind:"model",delivery:"remote",platform:"any",description:"Shared whisper.cpp tiny model asset for embedded desktop speech recognition."});n&&(r[n.id]=n)}let c={...K()},s=t.profiles&&typeof t.profiles=="object"?t.profiles:{};for(let[n,p]of Object.entries(s)){if(!p||typeof p!="object")continue;let u=p;!u.id||!Array.isArray(u.assetIds)||(c[n]=Me(u))}return F({schemaVersion:typeof t.schemaVersion=="number"?t.schemaVersion:2,channel:typeof t.channel=="string"?t.channel:void 0,publishedAt:typeof t.publishedAt=="string"?t.publishedAt:void 0,minElectronVersion:typeof t.minElectronVersion=="string"?t.minElectronVersion:void 0,releaseNotes:typeof t.releaseNotes=="string"?t.releaseNotes:void 0,assets:r,profiles:c})}var Ne=["pending","captured","failed","restored"],we=["file","directory","missing"],De=["metadata-only","workspace-copy","shadow-git"];var Le=["api-key","oauth","token","aws-sdk"],Ue=["rate_limit","auth","server_error","timeout","network","unknown"],Ke=["requiresOpenAiAnthropicToolPayload"];function We(e,t){return!e||typeof e!="object"||Array.isArray(e)?!1:e[t]===!0}var j="openai-codex";function A(e){let t=e.trim().toLowerCase();return t==="z.ai"||t==="z-ai"?"zai":t==="opencode-zen"?"opencode":t==="kimi-code"?"kimi-coding":t==="bedrock"||t==="aws-bedrock"?"amazon-bedrock":t==="bytedance"||t==="doubao"?"volcengine":t}function B(e){let t=A(e);return t==="volcengine-plan"?"volcengine":t==="qwen-coding"?"qwen":t==="byteplus-plan"?"byteplus":t}var Ve=B,Fe={anthropicToolSchemaMode:"native",anthropicToolChoiceMode:"native",providerFamily:"default",preserveAnthropicThinkingSignatures:!0,openAiCompatTurnValidation:!0,providerThoughtSignatureSanitization:!1,transcriptToolCallIdMode:"default",transcriptToolCallIdModelHints:[],providerThoughtSignatureModelHints:[],dropThinkingBlockModelHints:[]},je={anthropic:{providerFamily:"anthropic"},"amazon-bedrock":{providerFamily:"anthropic"},"kimi-coding":{anthropicToolSchemaMode:"openai-functions",anthropicToolChoiceMode:"openai-string-modes",preserveAnthropicThinkingSignatures:!1},mistral:{transcriptToolCallIdMode:"strict9",transcriptToolCallIdModelHints:["mistral","mixtral","codestral","pixtral","devstral","ministral","mistralai"]},openai:{providerFamily:"openai"},[j]:{providerFamily:"openai"},openrouter:{openAiCompatTurnValidation:!1,providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]},opencode:{openAiCompatTurnValidation:!1,providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]},kilocode:{providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]}};function b(e,t){let r=(e??"").toLowerCase();return!!r&&t.some(o=>r.includes(o))}function l(e){let t=A(e??"");return{...Fe,...je[t]}}function Be(e){return l(e).preserveAnthropicThinkingSignatures}function qe(e){let t=l(e);return t.anthropicToolSchemaMode!=="native"||t.anthropicToolChoiceMode!=="native"}function Ye(e){return l(e).anthropicToolSchemaMode==="openai-functions"}function He(e){return l(e).anthropicToolChoiceMode==="openai-string-modes"}function Ge(e){return l(e).openAiCompatTurnValidation}function ze(e){return l(e).providerFamily==="openai"}function Xe(e){return l(e).providerFamily==="anthropic"}function Je(e){return b(e.modelId,l(e.provider).dropThinkingBlockModelHints)}function Qe(e){let t=l(e.provider);return t.providerThoughtSignatureSanitization&&b(e.modelId,t.providerThoughtSignatureModelHints)}function $e(e,t){let r=l(e),o=r.transcriptToolCallIdMode;if(o==="strict9")return o;if(b(t,r.transcriptToolCallIdModelHints))return"strict9"}var T={anthropic:["ANTHROPIC_OAUTH_TOKEN","ANTHROPIC_API_KEY"],chutes:["CHUTES_OAUTH_TOKEN","CHUTES_API_KEY"],zai:["ZAI_API_KEY","Z_AI_API_KEY"],opencode:["OPENCODE_API_KEY","OPENCODE_ZEN_API_KEY"],qwen:["DASHSCOPE_API_KEY","QWEN_API_KEY"],"qwen-coding":["DASHSCOPE_API_KEY","QWEN_API_KEY"],volcengine:["VOLCANO_ENGINE_API_KEY","ARK_API_KEY","DOUBAO_API_KEY"],"volcengine-plan":["VOLCANO_ENGINE_API_KEY","ARK_API_KEY","DOUBAO_API_KEY"],byteplus:["BYTEPLUS_API_KEY"],"byteplus-plan":["BYTEPLUS_API_KEY"],"kimi-coding":["KIMI_API_KEY","KIMICODE_API_KEY"],huggingface:["HUGGINGFACE_HUB_TOKEN","HF_TOKEN"],openai:["OPENAI_API_KEY"],voyage:["VOYAGE_API_KEY"],groq:["GROQ_API_KEY"],deepgram:["DEEPGRAM_API_KEY"],cerebras:["CEREBRAS_API_KEY"],xai:["XAI_API_KEY"],openrouter:["OPENROUTER_API_KEY"],litellm:["LITELLM_API_KEY"],"vercel-ai-gateway":["AI_GATEWAY_API_KEY"],"cloudflare-ai-gateway":["CLOUDFLARE_AI_GATEWAY_API_KEY"],moonshot:["MOONSHOT_API_KEY"],minimax:["MINIMAX_API_KEY"],"minimax-cn":["MINIMAX_CN_API_KEY","MINIMAX_API_KEY"],nvidia:["NVIDIA_API_KEY"],xiaomi:["XIAOMI_API_KEY"],synthetic:["SYNTHETIC_API_KEY"],venice:["VENICE_API_KEY"],mistral:["MISTRAL_API_KEY"],together:["TOGETHER_API_KEY"],qianfan:["QIANFAN_API_KEY"],ollama:["OLLAMA_API_KEY"],vllm:["VLLM_API_KEY"],kilocode:["KILOCODE_API_KEY"]};function Ze(){return[...new Set(Object.values(T).flat())]}function et(e){let t=A(e.provider),r=e.env??process.env,o=new Set(e.appliedEnvKeys??[]),i=n=>{let p=r[n]?.trim();if(!p)return null;let u=o.has(n)?`shell env: ${n}`:`env: ${n}`;return{apiKey:p,source:u}},c=e.resolveSpecialApiKey?.(t,r,o);if(c)return c;let s=T[t];if(!s||s.length===0)return null;for(let n of s){let p=i(n);if(p)return p}return null}export{ne as ACP_EXTENDED_METHODS,ie as ACP_EXTENDED_SESSION_UPDATE_TYPES,oe as ACP_METHODS,re as ACP_PROTOCOL_VERSION,x as ACP_SESSION_UPDATE_TYPES,H as AGENT_RPC_APPROVAL_METHODS,d as AGENT_RPC_ERROR_CODES,Y as AGENT_RPC_PROTOCOL_VERSION,k as AGENT_TEAM_WS_EVENT_NAMES,M as AGENT_WS_EVENT_NAMES,te as ALL_AGENT_WS_EVENT_NAMES,E as CAPABILITY_MANIFEST_DIFF_SECTIONS,ee as GATEWAY_RPC_METHODS,R as GatewayRpcContract,Ce as MEMORY_OBSERVATION_HOOK_VALUES,Ie as MEMORY_OBSERVATION_SOURCE_VALUES,he as MEMORY_WRITE_ACCESS_VALUES,De as MUTATION_CHECKPOINT_BACKEND_VALUES,we as MUTATION_CHECKPOINT_ENTRY_KIND_VALUES,Ne as MUTATION_CHECKPOINT_PHASE_VALUES,q as PETDEX_ANIMATION_IDS,Le as PROVIDER_RUNTIME_AUTH_MODE_VALUES,Ke as PROVIDER_RUNTIME_COMPAT_FLAG_VALUES,T as PROVIDER_RUNTIME_ENV_API_KEY_CANDIDATES,j as PROVIDER_RUNTIME_OPENAI_CODEX_PROVIDER_ID,Ue as PROVIDER_RUNTIME_VAULT_ERROR_TYPE_VALUES,ve as RESOURCE_MANIFEST_SCHEMA_VERSION,a as RUNTIME_ASSET_IDS,y as RUNTIME_PROFILE_IDS,Se as WEB_ACTION_SCOPE_VALUES,Ee as WEB_APPROVAL_DEFAULT_VALUES,ye as WEB_CAPABILITY_FAMILY_VALUES,me as WEB_CAPABILITY_ID_VALUES,be as WEB_DEGRADATION_TARGET_VALUES,Te as WEB_ESCALATION_REASON_VALUES,Ae as WEB_EXECUTION_MODE_VALUES,_e as WEB_POLICY_RISK_CLASS_VALUES,Pe as WEB_RETRY_POLICY_VALUES,Re as WEB_STATEFULNESS_VALUES,fe as WEB_TASK_MODE_VALUES,Z as buildAgentRpcMeta,f as classifyGatewayRpcMethod,m as cloneCapabilityManifestSnapshot,ge as createCapabilityManifestDiffPayload,K as createDefaultRuntimeResourceProfiles,de as deriveCapabilityToolNamespaces,ue as deriveCapabilityWorkspaceIds,S as getManifestShortcutEntry,W as getRuntimeResourceAsset,V as getRuntimeResourceProfile,ke as getRuntimeResourceProfileAssets,N as isAcpJsonRpcNotification,O as isAcpJsonRpcRequest,w as isAcpJsonRpcResponse,I as isAgentRpcNotification,P as isAgentRpcRequest,C as isAgentRpcResponse,Xe as isAnthropicProviderRuntimeFamily,pe as isExtendedSessionUpdateType,ze as isOpenAiProviderRuntimeFamily,ae as isStandardSessionUpdateType,Ze as listProviderRuntimeEnvApiKeyNames,le as mergeCapabilityManifestSnapshot,A as normalizeProviderRuntimeId,B as normalizeProviderRuntimeIdForAuth,Oe as normalizeRuntimeResourceManifest,se as parseAcpMessage,G as parseAgentRpcMessage,Be as preservesProviderRuntimeAnthropicThinkingSignatures,We as readProviderRuntimeCompatFlag,v as requireGatewayRpcMeta,h as requiresIdempotencyKey,qe as requiresOpenAiCompatibleAnthropicToolPayloadForProviderRuntime,l as resolveProviderRuntimeCapabilities,et as resolveProviderRuntimeEnvApiKey,Ve as resolveProviderRuntimeKeyFamily,$e as resolveProviderRuntimeTranscriptToolCallIdMode,Je as shouldDropThinkingBlocksForProviderRuntimeModel,Qe as shouldSanitizeProviderRuntimeThoughtSignaturesForModel,Ge as supportsOpenAiCompatTurnValidationForProviderRuntime,xe as upsertRuntimeResourceAsset,Ye as usesOpenAiFunctionAnthropicToolSchemaForProviderRuntime,He as usesOpenAiStringModeAnthropicToolChoiceForProviderRuntime};
@@ -0,0 +1,65 @@
1
+ import type { ChatMessage } from "../types.js";
2
+ export interface ArtifactContractState {
3
+ artifactRoot?: string;
4
+ rootSource?: "explicit" | "inferred";
5
+ writePaths: string[];
6
+ outOfRootWrites: Array<{
7
+ path: string;
8
+ artifactRoot: string;
9
+ toolName: string;
10
+ }>;
11
+ devServerUrls: string[];
12
+ browserVerified: boolean;
13
+ browserEvidence: string[];
14
+ }
15
+ export interface ArtifactContractEventPayload {
16
+ artifactRoot?: string;
17
+ writePaths: string[];
18
+ outOfRootWrites: Array<{
19
+ path: string;
20
+ artifactRoot: string;
21
+ toolName: string;
22
+ }>;
23
+ devServerUrls: string[];
24
+ browserVerified: boolean;
25
+ browserEvidence: string[];
26
+ requiresBrowserAcceptance: boolean;
27
+ }
28
+ export declare function createArtifactContractState(inputMessages: readonly ChatMessage[]): ArtifactContractState;
29
+ export declare function requiresBrowserAcceptance(inputMessages: readonly ChatMessage[]): boolean;
30
+ export declare function requiresResearchQualityGate(inputMessages: readonly ChatMessage[]): boolean;
31
+ export declare function hasFinalStatusContract(content: string): boolean;
32
+ export declare function hasResearchQualityGate(content: string): boolean;
33
+ export declare function toolCallWritePath(toolName: string, rawArguments: string): string | null;
34
+ export declare function resolveArtifactRootWriteBlock(params: {
35
+ state: ArtifactContractState;
36
+ inputMessages: readonly ChatMessage[];
37
+ toolName: string;
38
+ rawArguments: string;
39
+ }): {
40
+ path: string;
41
+ artifactRoot: string;
42
+ error: string;
43
+ } | null;
44
+ export declare function recordArtifactRootBlock(state: ArtifactContractState, params: {
45
+ path: string;
46
+ artifactRoot: string;
47
+ toolName: string;
48
+ }): void;
49
+ export declare function updateArtifactContractFromToolResult(params: {
50
+ state: ArtifactContractState;
51
+ inputMessages: readonly ChatMessage[];
52
+ toolName: string;
53
+ rawArguments: string;
54
+ ok: boolean;
55
+ content: string;
56
+ }): void;
57
+ export declare function artifactContractPayload(state: ArtifactContractState, inputMessages: readonly ChatMessage[]): ArtifactContractEventPayload;
58
+ export declare function applyFinalStatusContract(params: {
59
+ content: string;
60
+ inputMessages: readonly ChatMessage[];
61
+ messages: readonly ChatMessage[];
62
+ totalToolCallCount: number;
63
+ distinctToolNames: Iterable<string>;
64
+ artifactContract: ArtifactContractState;
65
+ }): string;
@@ -1,5 +1,5 @@
1
1
  import type { AgentLogger, ChatMessage, ThinkingBlock, ToolLoopTransition } from "../types.js";
2
- export type CompletionActionPolicyReason = "file_action_verification" | "explicit_required_file_verification" | "explicit_extra_file_verification" | "artifact_index_evidence_verification" | "final_marker_verification" | "multi_file_skeleton_verification";
2
+ export type CompletionActionPolicyReason = "file_action_verification" | "explicit_required_file_verification" | "explicit_extra_file_verification" | "artifact_index_evidence_verification" | "multi_file_skeleton_verification";
3
3
  export interface CompletionActionPolicyInput {
4
4
  inputMessages: readonly ChatMessage[];
5
5
  messages: unknown[];
@@ -22,14 +22,6 @@ export declare function buildExplicitRequiredFilesFailureContent(input: {
22
22
  messages: unknown[];
23
23
  reason: string;
24
24
  }): string | undefined;
25
- export declare function buildMissingFinalMarkerFailureContent(input: {
26
- inputMessages: readonly ChatMessage[];
27
- reason: string;
28
- }): string | undefined;
29
- export declare function buildVerifiedExactFinalMarkerContent(input: {
30
- inputMessages: readonly ChatMessage[];
31
- messages: unknown[];
32
- }): string | undefined;
33
25
  type CandidateToolCall = {
34
26
  id: string;
35
27
  function: {
@@ -16,6 +16,7 @@ export declare function recordToolFailureResult(input: {
16
16
  ok: boolean;
17
17
  softEmpty: boolean;
18
18
  }): void;
19
+ export declare function recordInvalidArgumentsVariantFailure(toolFailureCounts: Map<string, number>, toolName: string): void;
19
20
  export declare function newVariantFailureNudges(input: {
20
21
  toolFailureCounts: ReadonlyMap<string, number>;
21
22
  snapshot: ReadonlyMap<string, number>;
@@ -24,6 +24,8 @@ export interface ToolLoopParams {
24
24
  turnId: string;
25
25
  sessionId: string;
26
26
  messages: ChatMessage[];
27
+ /** Full registered tool surface before per-turn policy filtering. */
28
+ availableTools?: ToolDefinition[];
27
29
  tools: ToolDefinition[];
28
30
  model: string;
29
31
  apiKey: string;
@@ -57,16 +59,6 @@ export interface ToolLoopParams {
57
59
  * or the same array reference if unchanged.
58
60
  */
59
61
  refreshTools?: () => ToolDefinition[];
60
- /**
61
- * Generate a human-readable summary label for a tool batch (CC generateToolUseSummary parity).
62
- * Fire-and-forget: called after tool execution, result yielded as tool_use_summary event
63
- * when the next LLM round starts streaming. ~30 chars, git-commit-subject style.
64
- */
65
- generateToolUseSummary?: (toolCalls: Array<{
66
- name: string;
67
- arguments: string;
68
- result?: string;
69
- }>) => Promise<string | null>;
70
62
  /**
71
63
  * Post-sampling hooks -fire-and-forget after LLM response completes (CC executePostSamplingHooks parity).
72
64
  * Cannot modify messages. Used for background tasks (memory extraction, skill learning, etc.).
@@ -79,6 +79,8 @@ export interface TurnRequest {
79
79
  turnId: string;
80
80
  sessionId: string;
81
81
  messages: ChatMessage[];
82
+ /** Full registered tool surface before per-turn policy filtering. */
83
+ availableTools?: ToolDefinition[];
82
84
  tools: ToolDefinition[];
83
85
  systemPrompt?: string;
84
86
  config?: TurnConfig;
@@ -227,7 +229,31 @@ export type TurnEvent = {
227
229
  } | {
228
230
  type: "tool_use_summary";
229
231
  turnId: string;
230
- summary: string;
232
+ availableToolNames: string[];
233
+ enabledToolNames: string[];
234
+ toolCallNames: string[];
235
+ blockedToolCalls: Array<{
236
+ name: string;
237
+ reason: string;
238
+ }>;
239
+ } | {
240
+ type: "lifecycle";
241
+ turnId: string;
242
+ kind: "stage" | "reopen" | "resume" | "context_compression" | "goal_reconstruction" | "memory_drift" | "artifact_path_drift";
243
+ stage?: string;
244
+ status?: string;
245
+ detail?: string;
246
+ reconstruction?: GoalReconstructionState;
247
+ observedAt?: string;
248
+ } | {
249
+ type: "document_maintenance";
250
+ turnId: string;
251
+ checkpointId: string;
252
+ documents: MaintainedDocumentIndex[];
253
+ decisionStateTable: DecisionStateRecord[];
254
+ readCycleFindings: Array<Record<string, unknown>>;
255
+ readCycleGuard: ReadCycleGuard;
256
+ observedAt?: string;
231
257
  } | {
232
258
  type: "reasoning_delta";
233
259
  turnId: string;
@@ -264,6 +290,20 @@ export type TurnEvent = {
264
290
  language?: string;
265
291
  content?: string;
266
292
  mimeType?: string;
293
+ } | {
294
+ type: "artifact_contract";
295
+ turnId: string;
296
+ artifactRoot?: string;
297
+ writePaths: string[];
298
+ outOfRootWrites: Array<{
299
+ path: string;
300
+ artifactRoot: string;
301
+ toolName: string;
302
+ }>;
303
+ devServerUrls: string[];
304
+ browserVerified: boolean;
305
+ browserEvidence: string[];
306
+ requiresBrowserAcceptance: boolean;
267
307
  } | {
268
308
  type: "annotations";
269
309
  turnId: string;
@@ -288,6 +328,39 @@ export type TurnEvent = {
288
328
  outputPreview?: string;
289
329
  error?: string;
290
330
  };
331
+ export interface GoalReconstructionState {
332
+ goal: string;
333
+ artifactRoot: string;
334
+ decisions: string[];
335
+ defects: string[];
336
+ acceptanceCriteria: string[];
337
+ blockers: string[];
338
+ nextAction: string;
339
+ }
340
+ export interface MaintainedDocumentIndex {
341
+ name?: string;
342
+ path?: string;
343
+ indexed: true;
344
+ maintained: true;
345
+ indexVersion: string;
346
+ contentHash: string;
347
+ summary: string;
348
+ lastReviewedTurn: number;
349
+ }
350
+ export interface DecisionStateRecord {
351
+ id: string;
352
+ decision: string;
353
+ status: string;
354
+ evidence: string;
355
+ lastConfirmedTurn: number;
356
+ }
357
+ export interface ReadCycleGuard {
358
+ strategy: string;
359
+ nextReadPolicy: string;
360
+ budgetStatus: "within-budget";
361
+ maxReadsPerDocument: number;
362
+ observedReadsByPath: Record<string, number>;
363
+ }
291
364
  /**
292
365
  * ToolInvoker: request tool execution from the host process (Gateway).
293
366
  * In CLI mode this sends a JSON-RPC notification over stdio and waits for result.
@@ -9,8 +9,19 @@ export declare function resolveLlmrouterProtocolBaseUrl(agentId: string, rawBase
9
9
  export declare class AgentConfigCoordinator {
10
10
  private readonly deps;
11
11
  private store;
12
+ /** Last resolved managed text model (llmrouterModel), to detect primary-model switches. */
13
+ private lastLlmrouterModel;
12
14
  constructor(deps: AgentConfigCoordinatorDeps);
13
15
  get currentStore(): AgentConfigStore | null;
14
16
  ensureStore(): Promise<AgentConfigStore>;
15
17
  private syncKeySources;
18
+ /**
19
+ * When the managed text model (llmrouterModel) actually changes, pooled OpenAI-compat agents
20
+ * (codex/qwen/opencode) still hold the OLD OPENAI_MODEL baked at spawn. Evict the platform-model
21
+ * followers — managed (explicit「平台额度」) or auto, NOT explicit account/userKey BYO — so the next
22
+ * turn respawns on the new model. The model-switch analogue of the credential-switch eviction (Cut 6);
23
+ * busy turns settle first (handled inside evictPooledAgentsByAgentId). Runs per agents operation via
24
+ * syncKeySources, so a primary-model switch takes effect on the next message.
25
+ */
26
+ private evictModelFollowersIfChanged;
16
27
  }
@@ -29,12 +29,6 @@ export declare function handleAgentsList(this: AgentsHandlerHost, msg: AgentRpcR
29
29
  * summary + source for the confirm dialog (no secrets).
30
30
  */
31
31
  export declare function handleAgentsCatalog(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
32
- /**
33
- * Background update check (VS Code pattern): resolve latest npm versions for installed catalog agents
34
- * in PARALLEL, off the catalog hot path. The frontend calls this AFTER the (instant) catalog render
35
- * and merges the results to light up "update available" badges — never blocking the panel from
36
- * opening. Returns `{ updates: CatalogUpdateInfo[] }` (only agents with a resolved latest version).
37
- */
38
32
  export declare function handleAgentsCheckUpdates(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
39
33
  /**
40
34
  * One-click install a catalog agent by id. Runs ONLY the official command from the
@@ -42,6 +36,13 @@ export declare function handleAgentsCheckUpdates(this: AgentsHandlerHost, msg: A
42
36
  * agent.install.progress notification, then refreshes detection. Returns the outcome.
43
37
  */
44
38
  export declare function handleAgentsInstall(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
39
+ /**
40
+ * Open an OS terminal running an agent's interactive login/setup command (e.g. `kimi login`,
41
+ * `hermes acp --setup`). Lowers the barrier for own-store/oauth agents that can't be driven via
42
+ * injected credentials — the user completes the CLI's native login without leaving the app. The
43
+ * command is resolved server-side from the catalog (fixed string, no user input → no injection).
44
+ */
45
+ export declare function handleAgentsRunSetup(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
45
46
  export declare function handleAgentsConfig(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
46
47
  export declare function handleAgentsSetConfig(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
47
48
  export declare function handleAgentsGetConfig(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -19,6 +19,14 @@ export interface ProjectHandlerHost {
19
19
  }
20
20
  export declare function handleProjectCreate(this: ProjectHandlerHost, msg: AgentRpcRequest): Promise<void>;
21
21
  export declare function handleProjectList(this: ProjectHandlerHost, msg: AgentRpcRequest): void;
22
+ /**
23
+ * Reliable recursive directory removal for Windows. fs.rmSync({recursive,force}) cannot be trusted
24
+ * here: on git repos it silently leaves read-only object/pack files (and whole subtrees) behind
25
+ * without throwing. This walks bottom-up, clearing the read-only attribute (chmod) on the EPERM
26
+ * retry, which deletes git worktrees/repos cleanly. Per-entry failures (e.g. a live EBUSY lock) are
27
+ * swallowed; the caller verifies via existsSync and decides success/retry.
28
+ */
29
+ export declare function rmDirRobustSync(target: string): void;
22
30
  export declare function handleProjectDelete(this: ProjectHandlerHost, msg: AgentRpcRequest): void;
23
31
  export declare function handleProjectPurgeAll(this: ProjectHandlerHost, msg: AgentRpcRequest): void;
24
32
  export declare function handleProjectRename(this: ProjectHandlerHost, msg: AgentRpcRequest): void;
@@ -11,6 +11,8 @@ export interface TurnCoreRequest {
11
11
  turnId: string;
12
12
  sessionId: string;
13
13
  messages: ChatMessage[];
14
+ /** Full registered tool surface before per-turn policy filtering. */
15
+ availableTools?: ToolDefinition[];
14
16
  tools: ToolDefinition[];
15
17
  systemPrompt: string;
16
18
  config: TurnConfig;
@@ -28,15 +28,10 @@ export interface SoloCallbacks {
28
28
  warn(msg: string): void;
29
29
  debug?(msg: string): void;
30
30
  };
31
- onProgress?: (soloId: string, agentId: string, state: SoloAgentState, progress?: string) => void;
31
+ onProgress?: (soloId: string, agentId: string, state: SoloAgentState, progress?: string, worktreePath?: string) => void;
32
32
  onEvaluation?: (soloId: string, evaluation: SoloEvaluation) => void;
33
33
  /** Streaming text delta from a competing agent (forwarded from child process). */
34
34
  onAgentDelta?: (soloId: string, agentId: string, text: string) => void;
35
- /** File diff produced by a completed agent. */
36
- onAgentDiff?: (soloId: string, agentId: string, files: {
37
- path: string;
38
- hunks: string;
39
- }[]) => void;
40
35
  /** Token usage report after agent completes. */
41
36
  onAgentUsage?: (soloId: string, agentId: string, inputTokens: number, outputTokens: number) => void;
42
37
  /**
@@ -6,4 +6,4 @@
6
6
  * This file re-exports the wire types.
7
7
  * Internal consumers import from this file — zero churn.
8
8
  */
9
- export type { AgentSource, AgentsErrorNotification, AgentsStatusNotification, ArtifactType, MediaResultType, MemoryDecayCompletedNotification, MemoryUpdatedNotification, NotificationMethod, NotificationMethodMap, NotificationThreadItem, PermissionRuleUpdatedNotification, PlanInterruptedNotification, PongNotification, ProductBudgetUpdateNotification, ProductBudgetWarningNotification, ProductCheckpointedNotification, ProductCompletedNotification, ProductDagTopologyNotification, ProductPlanFailedNotification, ProductPlanningDeltaNotification, ProductPlanReadyNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductTaskOutputDeltaNotification, ProductTaskStartedNotification, ProjectArchivedNotification, ProjectCreatedNotification, ProjectDeletedNotification, ProjectRenamedNotification, ProjectSwitchedNotification, ProjectUnarchivedNotification, SessionInfoNotification, SoloAgentDeltaNotification, SoloAgentDiffNotification, SoloAgentUsageNotification, SoloEvaluationNotification, SoloProgressNotification, TeamMemberNotification, ToolApprovalRequestNotification, TurnAnnotationsNotification, TurnArtifactNotification, TurnAskUserNotification, TurnDeltaNotification, TurnEndNotification, TurnErrorNotification, TurnExecProgressNotification, TurnHeartbeatNotification, TurnMediaPersistedNotification, TurnMediaProgressNotification, TurnMediaResultNotification, TurnPlanUpdateNotification, TurnReasoningDeltaNotification, TurnRecoveryNotification, TurnSidechainCompletedNotification, TurnSidechainStartedNotification, TurnSkillInstructionNotification, TurnStartNotification, TurnSubagentDeltaNotification, TurnSuggestionsNotification, TurnTaskUpdatedNotification, TurnTodosUpdatedNotification, TurnToolBlockedNotification, TurnToolCallNotification, TurnToolResultNotification, TurnToolUseSummaryNotification, TurnUsageUpdateNotification, WireTokenUsage, } from "./wire/index.js";
9
+ export type { AgentSource, AgentsErrorNotification, AgentsStatusNotification, ArtifactType, MediaResultType, MemoryDecayCompletedNotification, MemoryUpdatedNotification, NotificationMethod, NotificationMethodMap, NotificationThreadItem, PermissionRuleUpdatedNotification, PlanInterruptedNotification, PongNotification, ProductBudgetUpdateNotification, ProductBudgetWarningNotification, ProductCheckpointedNotification, ProductCompletedNotification, ProductDagTopologyNotification, ProductPlanFailedNotification, ProductPlanningDeltaNotification, ProductPlanReadyNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductTaskOutputDeltaNotification, ProductTaskStartedNotification, ProjectArchivedNotification, ProjectCreatedNotification, ProjectDeletedNotification, ProjectRenamedNotification, ProjectSwitchedNotification, ProjectUnarchivedNotification, SessionInfoNotification, SoloAgentDeltaNotification, SoloAgentUsageNotification, SoloEvaluationNotification, SoloProgressNotification, TeamMemberNotification, ToolApprovalRequestNotification, TurnAnnotationsNotification, TurnArtifactNotification, TurnAskUserNotification, TurnDeltaNotification, TurnEndNotification, TurnErrorNotification, TurnExecProgressNotification, TurnHeartbeatNotification, TurnMediaPersistedNotification, TurnMediaProgressNotification, TurnMediaResultNotification, TurnPlanUpdateNotification, TurnReasoningDeltaNotification, TurnRecoveryNotification, TurnSidechainCompletedNotification, TurnSidechainStartedNotification, TurnSkillInstructionNotification, TurnStartNotification, TurnSubagentDeltaNotification, TurnSuggestionsNotification, TurnTaskUpdatedNotification, TurnTodosUpdatedNotification, TurnToolBlockedNotification, TurnToolCallNotification, TurnToolResultNotification, TurnToolUseSummaryNotification, TurnUsageUpdateNotification, WireTokenUsage, } from "./wire/index.js";
@@ -57,6 +57,19 @@ export interface AgentInstallSpec {
57
57
  verifyCmd?: string;
58
58
  /** Official docs / source URL (shown in the install confirmation). */
59
59
  docsUrl: string;
60
+ /**
61
+ * Self/host-platform agents (e.g. openclaw) whose in-place UPDATE would disrupt the running session
62
+ * (the engine bridges to a live instance). When already installed, the update runs DETACHED in the
63
+ * background instead of as a child of the engine, and takes effect on the agent's next startup.
64
+ */
65
+ deferUpdate?: boolean;
66
+ /**
67
+ * Interactive terminal login/setup command for agents that hold credentials in their OWN CLI store
68
+ * (oauth / own-setup, e.g. `kimi login`, `hermes acp --setup`). The UI exposes a "在终端登录/设置"
69
+ * button that opens an OS terminal running this, so the user never leaves the app. Resolved
70
+ * server-side (fixed catalog string, no user input) — never managed/key-routable agents.
71
+ */
72
+ setupCommand?: string;
60
73
  }
61
74
  /**
62
75
  * Extended descriptor for external agents,
@@ -13,17 +13,17 @@
13
13
  * Turn-lifecycle events relayed to the Control UI WebSocket.
14
14
  * These are the "chat session" events that every UI client needs.
15
15
  */
16
- export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_delta", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.usage_update", "team.member.notification", "session.info", "memory.updated", "skills.updated", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested"];
16
+ export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.tool_use_summary", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "memory.updated", "skills.updated", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested"];
17
17
  /**
18
18
  * Agent Team events (Solo Mode, Product Mode, Plan lifecycle).
19
19
  * Relayed to the UI's team/orchestration panel.
20
20
  */
21
- export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.agentDelta", "solo.agentUsage", "solo.agentDiff", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted"];
21
+ export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted"];
22
22
  /**
23
23
  * All agent notifications that Gateway should relay to WS clients.
24
24
  * Union of session events + team events.
25
25
  */
26
- export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_delta", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.usage_update", "team.member.notification", "session.info", "memory.updated", "skills.updated", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "solo.progress", "solo.agentDelta", "solo.agentUsage", "solo.agentDiff", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted"];
26
+ export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.tool_use_summary", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "memory.updated", "skills.updated", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "solo.progress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted"];
27
27
  /** Type-level event name for session events. */
28
28
  export type AgentWsEventName = (typeof AGENT_WS_EVENT_NAMES)[number];
29
29
  /** Type-level event name for team events. */
@@ -1108,7 +1108,9 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
1108
1108
  };
1109
1109
  };
1110
1110
  "agents.checkUpdates": {
1111
- params: undefined;
1111
+ params: {
1112
+ mirror?: string;
1113
+ } | undefined;
1112
1114
  result: {
1113
1115
  updates: unknown[];
1114
1116
  };
@@ -6,7 +6,7 @@ export { type ChatMessage, type ChatMessageRole, type LocalizedToolText, type Th
6
6
  export { type AgentCapabilities, type AgentCategory, type AgentConfig, type AgentDescriptor, type AgentProtocol, type AgentRpcMethodMap, type AgentStatus, type CustomAgentDef, type ProductInstanceDef, type ProductPhase, type ProductStatus, type ProductSummary, type ProductTaskDef, type ProductTaskStatus, type SoloAgentResult, type SoloAgentState, type SoloState, type SoloStatus, } from "./agent-methods.js";
7
7
  export type * from "./acp-agent-management.js";
8
8
  export { AGENT_TEAM_WS_EVENT_NAMES, AGENT_WS_EVENT_NAMES, ALL_AGENT_WS_EVENT_NAMES, type AgentTeamWsEventName, type AgentWsEventName, type AllAgentWsEventName, } from "./agent-events.js";
9
- export { type AgentSource, type AgentsErrorNotification, type AgentsStatusNotification, type ArtifactType, type MediaResultType, type MemoryDecayCompletedNotification, type MemoryUpdatedNotification, type NotificationMethod, type NotificationMethodMap, type NotificationThreadItem, type PermissionRuleUpdatedNotification, type PlanInterruptedNotification, type PongNotification, type ProductBudgetUpdateNotification, type ProductBudgetWarningNotification, type ProductCheckpointedNotification, type ProductCompletedNotification, type ProductDagTopologyNotification, type ProductTaskCompletedNotification, type ProductTaskFailedNotification, type ProductTaskOutputDeltaNotification, type ProductTaskStartedNotification, type ProjectArchivedNotification, type ProjectCreatedNotification, type ProjectDeletedNotification, type ProjectRenamedNotification, type ProjectSwitchedNotification, type ProjectUnarchivedNotification, type SessionInfoNotification, type SoloAgentDeltaNotification, type SoloAgentDiffNotification, type SoloAgentUsageNotification, type SoloEvaluationNotification, type SoloProgressNotification, type TeamMemberNotification, type ToolApprovalRequestNotification, type TurnAnnotationsNotification, type TurnArtifactNotification, type TurnAskUserNotification, type TurnDeltaNotification, type TurnEndNotification, type TurnErrorNotification, type TurnExecProgressNotification, type TurnHeartbeatNotification, type TurnMediaPersistedNotification, type TurnMediaProgressNotification, type TurnMediaResultNotification, type TurnPlanUpdateNotification, type TurnReasoningDeltaNotification, type TurnRecoveryNotification, type TurnSidechainCompletedNotification, type TurnSidechainStartedNotification, type TurnSkillAcquisitionNeededNotification, type TurnSkillInstructionNotification, type TurnStartNotification, type TurnSubagentDeltaNotification, type TurnSuggestionsNotification, type TurnTaskUpdatedNotification, type TurnTodosUpdatedNotification, type TurnToolBlockedNotification, type TurnToolCallNotification, type TurnToolResultNotification, type TurnToolUseSummaryNotification, type TurnUsageUpdateNotification, type WireTokenUsage, type ProductPlanReadyNotification, type ProductPlanFailedNotification, type ProductPlanningDeltaNotification, type PetSoulReadyNotification, type PetReactionNotification, type PetGrowthNotification, type PetStateNotification, type PetConfirmNotification, type WorkflowDeletedNotification, type WorkflowRecordNotification, type WorkflowRunCompletedNotification, type WorkflowRunFailedNotification, type WorkflowRunStartedNotification, } from "./notification-payloads.js";
9
+ export { type AgentSource, type AgentsErrorNotification, type AgentsStatusNotification, type ArtifactType, type MediaResultType, type MemoryDecayCompletedNotification, type MemoryUpdatedNotification, type NotificationMethod, type NotificationMethodMap, type NotificationThreadItem, type PermissionRuleUpdatedNotification, type PlanInterruptedNotification, type PongNotification, type ProductBudgetUpdateNotification, type ProductBudgetWarningNotification, type ProductCheckpointedNotification, type ProductCompletedNotification, type ProductDagTopologyNotification, type ProductTaskCompletedNotification, type ProductTaskFailedNotification, type ProductTaskOutputDeltaNotification, type ProductTaskStartedNotification, type ProjectArchivedNotification, type ProjectCreatedNotification, type ProjectDeletedNotification, type ProjectRenamedNotification, type ProjectSwitchedNotification, type ProjectUnarchivedNotification, type SessionInfoNotification, type SoloAgentDeltaNotification, type SoloAgentUsageNotification, type SoloEvaluationNotification, type SoloProgressNotification, type TeamMemberNotification, type ToolApprovalRequestNotification, type TurnAnnotationsNotification, type TurnArtifactContractNotification, type TurnArtifactNotification, type TurnAskUserNotification, type TurnDeltaNotification, type TurnEndNotification, type TurnErrorNotification, type TurnExecProgressNotification, type TurnHeartbeatNotification, type TurnMediaPersistedNotification, type TurnMediaProgressNotification, type TurnMediaResultNotification, type TurnPlanUpdateNotification, type TurnReasoningDeltaNotification, type TurnRecoveryNotification, type TurnSidechainCompletedNotification, type TurnSidechainStartedNotification, type TurnSkillAcquisitionNeededNotification, type TurnSkillInstructionNotification, type TurnStartNotification, type TurnSubagentDeltaNotification, type TurnSubagentEndedNotification, type TurnSubagentStartedNotification, type TurnSuggestionsNotification, type TurnTaskUpdatedNotification, type TurnTodosUpdatedNotification, type TurnToolBlockedNotification, type TurnToolCallNotification, type TurnToolResultNotification, type TurnToolUseSummaryNotification, type TurnUsageUpdateNotification, type WireTokenUsage, type ProductPlanReadyNotification, type ProductPlanFailedNotification, type ProductPlanningDeltaNotification, type PetSoulReadyNotification, type PetReactionNotification, type PetGrowthNotification, type PetStateNotification, type PetConfirmNotification, type WorkflowDeletedNotification, type WorkflowRecordNotification, type WorkflowRunCompletedNotification, type WorkflowRunFailedNotification, type WorkflowRunStartedNotification, } from "./notification-payloads.js";
10
10
  export { ACP_EXTENDED_METHODS, ACP_EXTENDED_SESSION_UPDATE_TYPES, ACP_METHODS, ACP_PROTOCOL_VERSION, ACP_SESSION_UPDATE_TYPES, isAcpJsonRpcNotification, isAcpJsonRpcRequest, isAcpJsonRpcResponse, isExtendedSessionUpdateType, isStandardSessionUpdateType, parseAcpMessage, type AcpAgentCapabilities, type AcpAgentMessageChunkPayload, type AcpAgentThoughtChunkPayload, type AcpConfigOptionDescriptor, type AcpConfigOptionUpdatePayload, type AcpContentBlock, type AcpEndTurnPayload, type AcpExtendedMethod, type AcpExtendedSessionUpdateType, type AcpFsReadTextFileParams, type AcpFsReadTextFileResult, type AcpFsWriteTextFileParams, type AcpFsWriteTextFileResult, type AcpHostCapabilities, type AcpInitializeParams, type AcpInitializeResult, type AcpJsonRpcError, type AcpJsonRpcMessage, type AcpJsonRpcNotification, type AcpJsonRpcRequest, type AcpJsonRpcResponse, type AcpMode, type AcpPermissionOption, type AcpPermissionRequestParams, type AcpPermissionRequestResult, type AcpPlanPayload, type AcpSessionCancelParams, type AcpSessionCloseParams, type AcpSessionMeta, type AcpSessionLoadParams, type AcpSessionModeState, type AcpSessionNewParams, type AcpSessionNewResult, type AcpSessionPromptParams, type AcpSessionPromptResult, type AcpSessionSetConfigParams, type AcpSessionUpdateNotification, type AcpSessionUpdateType, type AcpStandardMethod, type AcpStandardSessionUpdateType, type AcpStopReason, type AcpToolCallPayload, type AcpToolCallUpdatePayload, type AcpUsage, type AcpUsageUpdatePayload, type AcpXSessionInfoPayload, type AcpXSkillInstructionPayload, } from "./acp-protocol.js";
11
11
  export { type ApprovalRequiredToolContract, type ModelSelectionReason, type PendingPromptContract, type RuntimeCapabilitySummaryContract, type RuntimeSessionContract, type SessionIdentityContract, } from "./session.js";
12
12
  export { type GatewayChannelExecutionEgressContract, type GatewayChannelExecutionEgressKind, type GatewayChannelExecutionIngressBindingContract, type GatewayChannelExecutionIngressSource, } from "./channel-ingress.js";