qlogicagent 2.18.12 → 2.19.1
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/README.md +382 -382
- package/dist/agent-contract.js +1 -0
- package/dist/cli.js +1 -1
- package/dist/default-project-knowledge/INSTRUCTIONS.md +7 -7
- package/dist/default-project-knowledge/rules/project-workflow.md +6 -6
- package/dist/host-contract.js +1 -1
- package/dist/index.js +340 -340
- package/dist/protocol.js +1 -1
- package/dist/skills/builtin/desktop-screenshot/SKILL.md +62 -62
- package/dist/skills/builtin/office-doc-reading/SKILL.md +19 -19
- package/dist/types/cli/acp-extended-handlers.d.ts +6 -0
- package/dist/types/cli/handlers/agents-handler.d.ts +5 -0
- package/dist/types/host-contract/index.d.ts +2 -1
- package/dist/types/orchestration/agent-instance.d.ts +7 -3
- package/dist/types/orchestration/agent-roster.d.ts +6 -2
- package/dist/types/orchestration/delegation-coordinator.d.ts +2 -2
- package/dist/types/protocol/agent-contract.d.ts +44 -0
- package/dist/types/protocol/notifications.d.ts +1 -1
- package/dist/types/protocol/wire/acp-protocol.d.ts +3 -0
- package/dist/types/protocol/wire/agent-events.d.ts +1 -32
- package/dist/types/protocol/wire/index.d.ts +1 -1
- package/dist/types/protocol/wire/notification-payloads.d.ts +63 -0
- package/dist/types/runtime/infra/acp-detector.d.ts +2 -0
- package/dist/vendor/hatch-pet/LICENSE.txt +201 -201
- package/dist/vendor/hatch-pet/NOTICE.md +25 -25
- package/dist/vendor/hatch-pet/references/animation-rows.md +29 -29
- package/dist/vendor/hatch-pet/references/codex-pet-contract.md +35 -35
- package/dist/vendor/hatch-pet/references/qa-rubric.md +66 -66
- package/dist/vendor/hatch-pet/scripts/compose_atlas.py +169 -169
- package/dist/vendor/hatch-pet/scripts/derive_running_left_from_running_right.py +150 -150
- package/dist/vendor/hatch-pet/scripts/extract_strip_frames.py +408 -408
- package/dist/vendor/hatch-pet/scripts/inspect_frames.py +256 -256
- package/dist/vendor/hatch-pet/scripts/make_contact_sheet.py +96 -96
- package/dist/vendor/hatch-pet/scripts/prepare_pet_run.py +834 -834
- package/dist/vendor/hatch-pet/scripts/render_animation_previews.py +78 -78
- package/dist/vendor/hatch-pet/scripts/validate_atlas.py +157 -157
- package/package.json +9 -1
package/dist/protocol.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var B=["idle","running-right","running-left","waving","jumping","failed","waiting","running","review"];var Y="1.0.0",l={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},G={REQUEST:"tool.approval.request"};function T(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 k(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 _(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&!("id"in t)}function z(e){let t;try{t=JSON.parse(e)}catch{return null}return k(t)||T(t)||_(t)?t:null}import{randomUUID as X}from"node:crypto";var $=["settings.list","settings.get","settings.validate","provider.list","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."],Z=new Set(["memory.atlas","memory.activity","memory.list","memory.read","memory.search","memory.attachment.locate","memory.attachment.adopt","pet.status"]);function A(e){return J.has(e)?{channel:"task",mutability:"write",defaultTimeoutMs:12e4}:$.some(t=>e===t||e.startsWith(`${t}.`)||e.startsWith(t))?{channel:"query",mutability:"read",defaultTimeoutMs:1e4}:{channel:"task",mutability:"write",defaultTimeoutMs:3e4}}function C(e){return Z.has(e)||A(e).mutability==="read"?!1:Q.some(t=>e.startsWith(t))}function ee(e,t={}){let n=t.now??Date.now(),r=A(e),o=t.timeoutMs??r.defaultTimeoutMs;return{requestId:t.requestId??X(),createdAt:n,deadlineAt:n+o,channel:t.channel??r.channel,idempotencyKey:t.idempotencyKey,traceId:t.traceId}}function x(e,t=Date.now()){let n=e.meta;if(!n||typeof n!="object")return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta is required."}};if(typeof n.requestId!="string"||n.requestId.length===0)return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta.requestId is required."}};if(n.channel!=="query"&&n.channel!=="task")return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta.channel must be query or task."}};if(typeof n.createdAt!="number"||!Number.isFinite(n.createdAt))return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta.createdAt is required."}};if(typeof n.deadlineAt!="number"||!Number.isFinite(n.deadlineAt))return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta.deadlineAt is required."}};if(n.deadlineAt<=t)return{ok:!1,error:{code:l.REQUEST_DEADLINE_EXCEEDED,message:"RPC request deadline has already expired."}};let r=A(e.method).channel;return n.channel!==r?{ok:!1,error:{code:l.INVALID_REQUEST,message:`RPC request channel mismatch: expected ${r}, got ${n.channel}.`}}:C(e.method)&&(typeof n.idempotencyKey!="string"||n.idempotencyKey.length===0)?{ok:!1,error:{code:l.REQUEST_IDEMPOTENCY_REQUIRED,message:`RPC method ${e.method} requires meta.idempotencyKey.`}}:{ok:!0,meta:n}}var S=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,n){let r=x({method:t,meta:n},this.now());if(!r.ok)return this.counters.invalidRequests+=1,{status:"rejected",error:r.error};if(n.idempotencyKey){let o=this.idempotency.get(n.idempotencyKey);if(o)return this.counters.dedupedRequests+=1,o.error?{status:"deduped",error:o.error}:{status:"deduped",result:o.result}}return this.active.set(n.requestId,{method:t,meta:n,cancelled:!1,startedAt:this.now()}),{status:"started"}}cancel(t,n="cancelled"){let r=this.active.get(t);return!r||r.cancelled?!1:(r.cancelled=!0,r.cancelReason=n,this.counters.cancelledRequests+=1,!0)}expire(t){return this.active.get(t)?(this.active.delete(t),this.counters.deadlineExceededRequests+=1,!0):!1}settle(t,n,r){let o=this.active.get(t);return o?(this.active.delete(t),o.cancelled?(this.counters.lateResponsesDropped+=1,{accepted:!1,reason:"cancelled"}):o.meta.deadlineAt<=this.now()?(this.counters.deadlineExceededRequests+=1,this.counters.lateResponsesDropped+=1,{accepted:!1,reason:"deadline_exceeded"}):(this.counters.completedRequests+=1,o.meta.idempotencyKey&&this.idempotency.set(o.meta.idempotencyKey,{result:n,error:r,settledAt:this.now()}),{accepted:!0})):{accepted:!1,reason:"unknown"}}metrics(){return{activeRequests:this.active.size,...this.counters}}};var te=["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.move","files.copy","files.delete","files.search","files.undoOperation","files.gitStatus","turnBaseline.getSummary","turnBaseline.getFileDiff","turnBaseline.listRecent","turnBaseline.getFileBaseline","workingMaterials.get","workingMaterials.replace","workingMaterials.upsert","workingMaterials.remove","workingMaterials.reorder","skills.list","memory.list-files","memory.atlas","memory.activity","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.file_changes","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.progress","turn.tool_use_summary","turn.tool_selection_policy","turn.lifecycle","turn.document_maintenance","turn.artifact_contract","turn.usage_update","team.member.notification","session.info","session.recovery_pending","memory.updated","skills.updated","turn.memory_recall","turn.memory_written","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","workflow.approvalTimedOut"],w=["solo.progress","solo.specProgress","solo.agentDelta","solo.agentActivity","solo.agentUsage","solo.evaluation","product.taskStarted","product.taskOutput","product.members","product.agentActivity","product.taskCompleted","product.taskFailed","product.budgetUpdate","product.budgetWarning","product.checkpointed","product.completed","product.dagTopology","plan.interrupted","goal.run_state_changed","goal.phase_boundary","goal.goal_edited","goal.message_queued","goal.acceptance_updated"],ne=[...M,...w];import{createHash as bt}from"node:crypto";import{resolve as Et}from"node:path";var m={request:"x/delegate",update:"x/delegate.update",respond:"x/delegate.respond",cancel:"x/delegate.cancel"},re=["search","addText","embedText","ingestExtracted","proposeExtracted","consumePendingProposals","feedback","findRelatedEvents","synthesizeTimeline","getActivitySummary","getAllProfiles","setProfile","getAtlas","setMemoryArchived","triggerDecay","resolveConflicts"],ie=["initialize","getIndex","addToIndex","replaceInIndex","removeFromIndex","createFile","writeFile","readFile","deleteFile","listFiles","searchLocal"],oe=["getSkillSnapshot","readSkillFile","recordSkillInvocation","commitSkillMutation","applyCuratorPlan","prepareSkillInstall","finalizeSkillInstall"],se=["loadForResume","appendTranscript","updateTitle","saveState","saveTaskSummary","groupSplit"],ae=["commitTurnTelemetry","listDistillableFeedback","markFeedbackDistilled","runUploadSweep"],de=["getSnapshot","create","switch","update"],xt=1024*1024,pe=["navigate","snapshot","click","type","screenshot","console","network"];var ce=["open","recordEvent","checkpoint","get","list","delete","getCheckpoint","listCheckpoints","restoreCheckpoint"],le=["isActive","getSoul","awardXp","journeyCatchUp"],ue=["getTunables","updateTunable","clearTunable","appendDirectoryAllowRule"];var Mt=new Set(re),wt=new Set(ie),vt=new Set(ue),Ot=new Set(oe),Nt=new Set(se),Dt=new Set(ae),Ht=new Set(de),Lt=new Set(ce),Ut=new Set(le),jt=new Set(pe);var ge=1,me={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"},fe={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_REPLAY:"x/product.replay",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",GOAL_START:"x/goal.start",GOAL_STATUS:"x/goal.status",GOAL_PAUSE:"x/goal.pause",GOAL_RESUME:"x/goal.resume",GOAL_UPDATE_GOAL:"x/goal.updateGoal",GOAL_STOP:"x/goal.stop",GOAL_MESSAGE:"x/goal.message",GOAL_SUBSCRIBE:"x/goal.subscribe",GOAL_EVENTS:"x/goal.events",MENTION_DELEGATE:"x/mention.delegate",MENTION_CANCEL:"x/mention.cancel",MENTION_LIST:"x/mention.list",DELEGATE:m.request,DELEGATE_UPDATE:m.update,DELEGATE_RESPOND:m.respond,DELEGATE_CANCEL:m.cancel},v={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"},ye={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 D(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&"id"in t&&!("method"in t)}function Ae(e){let t;try{t=JSON.parse(e)}catch{return null}return D(t)||O(t)||N(t)?t:null}function Re(e){return Object.values(v).includes(e)}function Se(e){return e.startsWith("x_")}var I=["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 b(e){return e?e.map(t=>({...t})):void 0}function Ie(e){return e?[...e]:void 0}function H(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function f(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:b(e.workspaceSummaries)}:{}}}function be(e){let{previous:t,update:n}=e;return!(n.syncMode==="diff"&&t&&(!n.baseSnapshotVersion||t.snapshotVersion===n.baseSnapshotVersion))||!t?f(n):{...f(t),snapshotVersion:n.snapshotVersion,updatedAt:n.updatedAt,...n.gatewayVersion!==void 0?{gatewayVersion:n.gatewayVersion}:{},...n.syncMode?{syncMode:n.syncMode}:{},...n.baseSnapshotVersion?{baseSnapshotVersion:n.baseSnapshotVersion}:{},...n.changedSections?{changedSections:[...n.changedSections]}:{},...n.toolNamespaces?{toolNamespaces:[...n.toolNamespaces]}:{},...n.workspaceIds?{workspaceIds:[...n.workspaceIds]}:{},...n.installedCapabilities?{installedCapabilities:[...n.installedCapabilities]}:{},...n.enabledCapabilities?{enabledCapabilities:[...n.enabledCapabilities]}:{},...n.features?{features:[...n.features]}:{},...n.approvalMode?{approvalMode:n.approvalMode}:{},...n.toolManifests?{toolManifests:g(n.toolManifests)}:{},...n.skillManifests?{skillManifests:g(n.skillManifests)}:{},...n.pluginManifests?{pluginManifests:g(n.pluginManifests)}:{},...n.mcpManifests?{mcpManifests:g(n.mcpManifests)}:{},...n.approvalPolicy?{approvalPolicy:{...n.approvalPolicy}}:{},...n.workspaceSummaries?{workspaceSummaries:b(n.workspaceSummaries)}:{}}}function Pe(e){return H(e.map(t=>t.name.split(".")[0]??"").filter(Boolean))}function Ee(e){return H(e.map(t=>t.id))}function he(e){let{previous:t,current:n}=e;if(!t)return{...f(n),syncMode:"full"};if(t.snapshotVersion===n.snapshotVersion)return null;let r=I.filter(s=>JSON.stringify(t[s])!==JSON.stringify(n[s]));if(r.length===I.length)return{...f(n),syncMode:"full"};let o={snapshotVersion:n.snapshotVersion,updatedAt:n.updatedAt,syncMode:"diff",baseSnapshotVersion:t.snapshotVersion,changedSections:r,toolNamespaces:[...n.toolNamespaces],workspaceIds:[...n.workspaceIds]},p=o;for(let s of r){let i=n[s];if(i!==void 0)switch(s){case"toolNamespaces":case"workspaceIds":case"installedCapabilities":case"enabledCapabilities":case"features":p[s]=Ie(i);break;case"approvalPolicy":p[s]={...i};break;case"workspaceSummaries":p[s]=b(i);break;case"toolManifests":case"skillManifests":case"pluginManifests":case"mcpManifests":p[s]=g(i);break;default:p[s]=i;break}}return o}var Te=["web_search","web_fetch","deep_research","browser_execution"],ke=["web-intelligence","browser-execution"],_e=["discovery","read-url","multi-source-research","interactive-browser"],Ce=["stateless","render-backend","interactive-session"],xe=["stateless","stateless-single-step","stateful-session-required"],Me=["required","conditional","none"],we=["browser-read","browser-authenticated-read","browser-state-changing"];var ve=["read-page","read-authenticated-page","fill-form","submit-form","download-file","reuse-session"],Oe=["web_search","web_fetch","deep_research","blocked"],Ne=["requires-interaction","requires-login-state","requires-rendered-dom","requires-persistent-session","requires-state-changing-action"],De=["none","same-capability-once","degrade-only"];var He=["prefetch","sync_turn","on_pre_compress","on_session_end","on_delegation","on_memory_write"],Le=["turn","sidechain","compress","session-end","agent-remember","auto-extract","implicit-extract","profile-extraction","dream"],Ue=["observe-only","parent-write","deny"];var je=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 Fe(e){return{...e,assetIds:[...e.assetIds]}}function j(){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 F(e,t){return e.assets[t]}function K(e,t){return e.profiles[t]}function Ke(e,t){let n=K(e,t);return n?n.assetIds.map(r=>F(e,r)).filter(r=>!!r):[]}function We(e,t){return e.assets[t.id]=U(t),W(e)}function P(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 W(e){let t=P(e.assets[a.gatewayImage]),n=P(e.assets[a.whisperModelTiny]);return{...e,gateway:t,whisperModel:n}}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 Ve(e){let t=e&&typeof e=="object"?e:{},n={},r=t.assets&&typeof t.assets=="object"?t.assets:{};for(let[i,d]of Object.entries(r)){if(!d||typeof d!="object")continue;let u=d;!u.id||!Array.isArray(u.artifacts)||(n[i]=U(u))}if(!n[a.gatewayImage]&&t.gateway&&typeof t.gateway=="object"){let i=L(t.gateway,{id:a.gatewayImage,title:"XiaoZhiClaw Gateway Image (Desktop Slim)",kind:"container-image",delivery:"remote",platform:"any",description:"Desktop Docker mode gateway image."});i&&(n[i.id]=i)}if(!n[a.whisperModelTiny]&&t.whisperModel&&typeof t.whisperModel=="object"){let i=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."});i&&(n[i.id]=i)}let p={...j()},s=t.profiles&&typeof t.profiles=="object"?t.profiles:{};for(let[i,d]of Object.entries(s)){if(!d||typeof d!="object")continue;let u=d;!u.id||!Array.isArray(u.assetIds)||(p[i]=Fe(u))}return W({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:n,profiles:p})}var qe=["pending","captured","failed","restored"],Be=["file","directory","missing"],Ye=["metadata-only","workspace-copy","shadow-git"];var Ge=["api-key","oauth","token","aws-sdk"],ze=["rate_limit","auth","server_error","timeout","network","unknown"],Xe=["requiresOpenAiAnthropicToolPayload"];function $e(e,t){return!e||typeof e!="object"||Array.isArray(e)?!1:e[t]===!0}var V="openai-codex";function R(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 q(e){let t=R(e);return t==="volcengine-plan"?"volcengine":t==="qwen-coding"?"qwen":t==="byteplus-plan"?"byteplus":t}var Je=q,Qe={anthropicToolSchemaMode:"native",anthropicToolChoiceMode:"native",providerFamily:"default",preserveAnthropicThinkingSignatures:!0,openAiCompatTurnValidation:!0,providerThoughtSignatureSanitization:!1,transcriptToolCallIdMode:"default",transcriptToolCallIdModelHints:[],providerThoughtSignatureModelHints:[],dropThinkingBlockModelHints:[]},Ze={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"},[V]:{providerFamily:"openai"},openrouter:{openAiCompatTurnValidation:!1,providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]},opencode:{openAiCompatTurnValidation:!1,providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]},kilocode:{providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]}};function E(e,t){let n=(e??"").toLowerCase();return!!n&&t.some(r=>n.includes(r))}function c(e){let t=R(e??"");return{...Qe,...Ze[t]}}function et(e){return c(e).preserveAnthropicThinkingSignatures}function tt(e){let t=c(e);return t.anthropicToolSchemaMode!=="native"||t.anthropicToolChoiceMode!=="native"}function nt(e){return c(e).anthropicToolSchemaMode==="openai-functions"}function rt(e){return c(e).anthropicToolChoiceMode==="openai-string-modes"}function it(e){return c(e).openAiCompatTurnValidation}function ot(e){return c(e).providerFamily==="openai"}function st(e){return c(e).providerFamily==="anthropic"}function at(e){return E(e.modelId,c(e.provider).dropThinkingBlockModelHints)}function dt(e){let t=c(e.provider);return t.providerThoughtSignatureSanitization&&E(e.modelId,t.providerThoughtSignatureModelHints)}function pt(e,t){let n=c(e),r=n.transcriptToolCallIdMode;if(r==="strict9")return r;if(E(t,n.transcriptToolCallIdModelHints))return"strict9"}var h={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 ct(){return[...new Set(Object.values(h).flat())]}function lt(e){let t=R(e.provider),n=e.env??process.env,r=new Set(e.appliedEnvKeys??[]),o=i=>{let d=n[i]?.trim();if(!d)return null;let u=r.has(i)?`shell env: ${i}`:`env: ${i}`;return{apiKey:d,source:u}},p=e.resolveSpecialApiKey?.(t,n,r);if(p)return p;let s=h[t];if(!s||s.length===0)return null;for(let i of s){let d=o(i);if(d)return d}return null}export{fe as ACP_EXTENDED_METHODS,ye as ACP_EXTENDED_SESSION_UPDATE_TYPES,me as ACP_METHODS,ge as ACP_PROTOCOL_VERSION,v as ACP_SESSION_UPDATE_TYPES,G as AGENT_RPC_APPROVAL_METHODS,l as AGENT_RPC_ERROR_CODES,Y as AGENT_RPC_PROTOCOL_VERSION,w as AGENT_TEAM_WS_EVENT_NAMES,M as AGENT_WS_EVENT_NAMES,ne as ALL_AGENT_WS_EVENT_NAMES,I as CAPABILITY_MANIFEST_DIFF_SECTIONS,te as GATEWAY_RPC_METHODS,S as GatewayRpcContract,He as MEMORY_OBSERVATION_HOOK_VALUES,Le as MEMORY_OBSERVATION_SOURCE_VALUES,Ue as MEMORY_WRITE_ACCESS_VALUES,Ye as MUTATION_CHECKPOINT_BACKEND_VALUES,Be as MUTATION_CHECKPOINT_ENTRY_KIND_VALUES,qe as MUTATION_CHECKPOINT_PHASE_VALUES,B as PETDEX_ANIMATION_IDS,Ge as PROVIDER_RUNTIME_AUTH_MODE_VALUES,Xe as PROVIDER_RUNTIME_COMPAT_FLAG_VALUES,h as PROVIDER_RUNTIME_ENV_API_KEY_CANDIDATES,V as PROVIDER_RUNTIME_OPENAI_CODEX_PROVIDER_ID,ze as PROVIDER_RUNTIME_VAULT_ERROR_TYPE_VALUES,je as RESOURCE_MANIFEST_SCHEMA_VERSION,a as RUNTIME_ASSET_IDS,y as RUNTIME_PROFILE_IDS,ve as WEB_ACTION_SCOPE_VALUES,Me as WEB_APPROVAL_DEFAULT_VALUES,ke as WEB_CAPABILITY_FAMILY_VALUES,Te as WEB_CAPABILITY_ID_VALUES,Oe as WEB_DEGRADATION_TARGET_VALUES,Ne as WEB_ESCALATION_REASON_VALUES,Ce as WEB_EXECUTION_MODE_VALUES,we as WEB_POLICY_RISK_CLASS_VALUES,De as WEB_RETRY_POLICY_VALUES,xe as WEB_STATEFULNESS_VALUES,_e as WEB_TASK_MODE_VALUES,ee as buildAgentRpcMeta,A as classifyGatewayRpcMethod,f as cloneCapabilityManifestSnapshot,he as createCapabilityManifestDiffPayload,j as createDefaultRuntimeResourceProfiles,Pe as deriveCapabilityToolNamespaces,Ee as deriveCapabilityWorkspaceIds,P as getManifestShortcutEntry,F as getRuntimeResourceAsset,K as getRuntimeResourceProfile,Ke as getRuntimeResourceProfileAssets,N as isAcpJsonRpcNotification,O as isAcpJsonRpcRequest,D as isAcpJsonRpcResponse,_ as isAgentRpcNotification,T as isAgentRpcRequest,k as isAgentRpcResponse,st as isAnthropicProviderRuntimeFamily,Se as isExtendedSessionUpdateType,ot as isOpenAiProviderRuntimeFamily,Re as isStandardSessionUpdateType,ct as listProviderRuntimeEnvApiKeyNames,be as mergeCapabilityManifestSnapshot,R as normalizeProviderRuntimeId,q as normalizeProviderRuntimeIdForAuth,Ve as normalizeRuntimeResourceManifest,Ae as parseAcpMessage,z as parseAgentRpcMessage,et as preservesProviderRuntimeAnthropicThinkingSignatures,$e as readProviderRuntimeCompatFlag,x as requireGatewayRpcMeta,C as requiresIdempotencyKey,tt as requiresOpenAiCompatibleAnthropicToolPayloadForProviderRuntime,c as resolveProviderRuntimeCapabilities,lt as resolveProviderRuntimeEnvApiKey,Je as resolveProviderRuntimeKeyFamily,pt as resolveProviderRuntimeTranscriptToolCallIdMode,at as shouldDropThinkingBlocksForProviderRuntimeModel,dt as shouldSanitizeProviderRuntimeThoughtSignaturesForModel,it as supportsOpenAiCompatTurnValidationForProviderRuntime,We as upsertRuntimeResourceAsset,nt as usesOpenAiFunctionAnthropicToolSchemaForProviderRuntime,rt as usesOpenAiStringModeAnthropicToolChoiceForProviderRuntime};
|
|
1
|
+
var Y=["idle","running-right","running-left","waving","jumping","failed","waiting","running","review"];var G="1.0.0",l={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},z={REQUEST:"tool.approval.request"};function k(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 x(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&!("id"in t)}function X(e){let t;try{t=JSON.parse(e)}catch{return null}return C(t)||k(t)||x(t)?t:null}import{randomUUID as $}from"node:crypto";var J=["settings.list","settings.get","settings.validate","provider.list","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"],Q=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"]),Z=["memory.","pet.","usage."],ee=new Set(["memory.atlas","memory.activity","memory.list","memory.read","memory.search","memory.attachment.locate","memory.attachment.adopt","pet.status"]);function A(e){return Q.has(e)?{channel:"task",mutability:"write",defaultTimeoutMs:12e4}:J.some(t=>e===t||e.startsWith(`${t}.`)||e.startsWith(t))?{channel:"query",mutability:"read",defaultTimeoutMs:1e4}:{channel:"task",mutability:"write",defaultTimeoutMs:3e4}}function M(e){return ee.has(e)||A(e).mutability==="read"?!1:Z.some(t=>e.startsWith(t))}function te(e,t={}){let n=t.now??Date.now(),r=A(e),i=t.timeoutMs??r.defaultTimeoutMs;return{requestId:t.requestId??$(),createdAt:n,deadlineAt:n+i,channel:t.channel??r.channel,idempotencyKey:t.idempotencyKey,traceId:t.traceId}}function w(e,t=Date.now()){let n=e.meta;if(!n||typeof n!="object")return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta is required."}};if(typeof n.requestId!="string"||n.requestId.length===0)return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta.requestId is required."}};if(n.channel!=="query"&&n.channel!=="task")return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta.channel must be query or task."}};if(typeof n.createdAt!="number"||!Number.isFinite(n.createdAt))return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta.createdAt is required."}};if(typeof n.deadlineAt!="number"||!Number.isFinite(n.deadlineAt))return{ok:!1,error:{code:l.INVALID_REQUEST,message:"RPC request meta.deadlineAt is required."}};if(n.deadlineAt<=t)return{ok:!1,error:{code:l.REQUEST_DEADLINE_EXCEEDED,message:"RPC request deadline has already expired."}};let r=A(e.method).channel;return n.channel!==r?{ok:!1,error:{code:l.INVALID_REQUEST,message:`RPC request channel mismatch: expected ${r}, got ${n.channel}.`}}:M(e.method)&&(typeof n.idempotencyKey!="string"||n.idempotencyKey.length===0)?{ok:!1,error:{code:l.REQUEST_IDEMPOTENCY_REQUIRED,message:`RPC method ${e.method} requires meta.idempotencyKey.`}}:{ok:!0,meta:n}}var S=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,n){let r=w({method:t,meta:n},this.now());if(!r.ok)return this.counters.invalidRequests+=1,{status:"rejected",error:r.error};if(n.idempotencyKey){let i=this.idempotency.get(n.idempotencyKey);if(i)return this.counters.dedupedRequests+=1,i.error?{status:"deduped",error:i.error}:{status:"deduped",result:i.result}}return this.active.set(n.requestId,{method:t,meta:n,cancelled:!1,startedAt:this.now()}),{status:"started"}}cancel(t,n="cancelled"){let r=this.active.get(t);return!r||r.cancelled?!1:(r.cancelled=!0,r.cancelReason=n,this.counters.cancelledRequests+=1,!0)}expire(t){return this.active.get(t)?(this.active.delete(t),this.counters.deadlineExceededRequests+=1,!0):!1}settle(t,n,r){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:n,error:r,settledAt:this.now()}),{accepted:!0})):{accepted:!1,reason:"unknown"}}metrics(){return{activeRequests:this.active.size,...this.counters}}};var ne=["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.move","files.copy","files.delete","files.search","files.undoOperation","files.gitStatus","turnBaseline.getSummary","turnBaseline.getFileDiff","turnBaseline.listRecent","turnBaseline.getFileBaseline","workingMaterials.get","workingMaterials.replace","workingMaterials.upsert","workingMaterials.remove","workingMaterials.reorder","skills.list","memory.list-files","memory.atlas","memory.activity","memory.propose","memory.consolidate","memory.update","memory.attachment.adopt","memory.attachment.locate"];var I=["turn.start","turn.delta","turn.end","turn.error","turn.recovery","turn.file_changes","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.progress","turn.tool_use_summary","turn.tool_selection_policy","turn.lifecycle","turn.document_maintenance","turn.artifact_contract","turn.usage_update","team.member.notification","session.info","session.recovery_pending","memory.updated","skills.updated","turn.memory_recall","turn.memory_written","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","workflow.approvalTimedOut"],E=["solo.progress","solo.specProgress","solo.agentDelta","solo.agentActivity","solo.agentUsage","solo.evaluation","product.taskStarted","product.taskOutput","product.members","product.agentActivity","product.taskCompleted","product.taskFailed","product.budgetUpdate","product.budgetWarning","product.checkpointed","product.completed","product.dagTopology","plan.interrupted","product.planReady","product.planningDelta","product.leaderMessage","product.planFailed","product.planningAsk","goal.run_state_changed","goal.phase_boundary","goal.goal_edited","goal.message_queued","goal.acceptance_updated","goal.round_message","mention.delegate_started","mention.delegate_activity","mention.delegate_settled"],re=[...I,...E],v=re;import{createHash as Tt}from"node:crypto";import{resolve as _t}from"node:path";var m={request:"x/delegate",update:"x/delegate.update",respond:"x/delegate.respond",cancel:"x/delegate.cancel"},oe=["search","addText","embedText","ingestExtracted","proposeExtracted","consumePendingProposals","feedback","findRelatedEvents","synthesizeTimeline","getActivitySummary","getAllProfiles","setProfile","getAtlas","setMemoryArchived","triggerDecay","resolveConflicts"],ie=["initialize","getIndex","addToIndex","replaceInIndex","removeFromIndex","createFile","writeFile","readFile","deleteFile","listFiles","searchLocal"],se=["getSkillSnapshot","readSkillFile","recordSkillInvocation","commitSkillMutation","applyCuratorPlan","prepareSkillInstall","finalizeSkillInstall"],ae=["loadForResume","appendTranscript","updateTitle","saveState","saveTaskSummary","groupSplit"],de=["commitTurnTelemetry","listDistillableFeedback","markFeedbackDistilled","runUploadSweep"],pe=["getSnapshot","create","switch","update"],vt=1024*1024,ce=["navigate","snapshot","click","type","screenshot","console","network"];var le=["open","recordEvent","checkpoint","get","list","delete","getCheckpoint","listCheckpoints","restoreCheckpoint"],ue=["isActive","getSoul","awardXp","journeyCatchUp"],ge=["getTunables","updateTunable","clearTunable","appendDirectoryAllowRule"];var Ot=new Set(oe),Nt=new Set(ie),Dt=new Set(ge),Ht=new Set(se),Lt=new Set(ae),Ut=new Set(de),jt=new Set(pe),Kt=new Set(le),Ft=new Set(ue),Vt=new Set(ce);var me=1,fe={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"},ye={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_REPLAY:"x/product.replay",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",GOAL_START:"x/goal.start",GOAL_STATUS:"x/goal.status",GOAL_PAUSE:"x/goal.pause",GOAL_RESUME:"x/goal.resume",GOAL_UPDATE_GOAL:"x/goal.updateGoal",GOAL_STOP:"x/goal.stop",GOAL_MESSAGE:"x/goal.message",GOAL_SUBSCRIBE:"x/goal.subscribe",GOAL_EVENTS:"x/goal.events",MENTION_DELEGATE:"x/mention.delegate",MENTION_CANCEL:"x/mention.cancel",MENTION_LIST:"x/mention.list",DELEGATE:m.request,DELEGATE_UPDATE:m.update,DELEGATE_RESPOND:m.respond,DELEGATE_CANCEL:m.cancel},O={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"},Ae={X_SKILL_INSTRUCTION:"x_skill_instruction",X_SESSION_INFO:"x_session_info",X_RELAY:"x_relay"};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 D(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&typeof t.method=="string"&&!("id"in t)}function H(e){if(!e||typeof e!="object")return!1;let t=e;return t.jsonrpc==="2.0"&&"id"in t&&!("method"in t)}function Re(e){let t;try{t=JSON.parse(e)}catch{return null}return H(t)||N(t)||D(t)?t:null}function Se(e){return Object.values(O).includes(e)}function Ie(e){return e.startsWith("x_")}var b=["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 P(e){return e?e.map(t=>({...t})):void 0}function Ee(e){return e?[...e]:void 0}function L(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function f(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:P(e.workspaceSummaries)}:{}}}function be(e){let{previous:t,update:n}=e;return!(n.syncMode==="diff"&&t&&(!n.baseSnapshotVersion||t.snapshotVersion===n.baseSnapshotVersion))||!t?f(n):{...f(t),snapshotVersion:n.snapshotVersion,updatedAt:n.updatedAt,...n.gatewayVersion!==void 0?{gatewayVersion:n.gatewayVersion}:{},...n.syncMode?{syncMode:n.syncMode}:{},...n.baseSnapshotVersion?{baseSnapshotVersion:n.baseSnapshotVersion}:{},...n.changedSections?{changedSections:[...n.changedSections]}:{},...n.toolNamespaces?{toolNamespaces:[...n.toolNamespaces]}:{},...n.workspaceIds?{workspaceIds:[...n.workspaceIds]}:{},...n.installedCapabilities?{installedCapabilities:[...n.installedCapabilities]}:{},...n.enabledCapabilities?{enabledCapabilities:[...n.enabledCapabilities]}:{},...n.features?{features:[...n.features]}:{},...n.approvalMode?{approvalMode:n.approvalMode}:{},...n.toolManifests?{toolManifests:g(n.toolManifests)}:{},...n.skillManifests?{skillManifests:g(n.skillManifests)}:{},...n.pluginManifests?{pluginManifests:g(n.pluginManifests)}:{},...n.mcpManifests?{mcpManifests:g(n.mcpManifests)}:{},...n.approvalPolicy?{approvalPolicy:{...n.approvalPolicy}}:{},...n.workspaceSummaries?{workspaceSummaries:P(n.workspaceSummaries)}:{}}}function Pe(e){return L(e.map(t=>t.name.split(".")[0]??"").filter(Boolean))}function Te(e){return L(e.map(t=>t.id))}function he(e){let{previous:t,current:n}=e;if(!t)return{...f(n),syncMode:"full"};if(t.snapshotVersion===n.snapshotVersion)return null;let r=b.filter(s=>JSON.stringify(t[s])!==JSON.stringify(n[s]));if(r.length===b.length)return{...f(n),syncMode:"full"};let i={snapshotVersion:n.snapshotVersion,updatedAt:n.updatedAt,syncMode:"diff",baseSnapshotVersion:t.snapshotVersion,changedSections:r,toolNamespaces:[...n.toolNamespaces],workspaceIds:[...n.workspaceIds]},p=i;for(let s of r){let o=n[s];if(o!==void 0)switch(s){case"toolNamespaces":case"workspaceIds":case"installedCapabilities":case"enabledCapabilities":case"features":p[s]=Ee(o);break;case"approvalPolicy":p[s]={...o};break;case"workspaceSummaries":p[s]=P(o);break;case"toolManifests":case"skillManifests":case"pluginManifests":case"mcpManifests":p[s]=g(o);break;default:p[s]=o;break}}return i}var _e=["web_search","web_fetch","deep_research","browser_execution"],ke=["web-intelligence","browser-execution"],Ce=["discovery","read-url","multi-source-research","interactive-browser"],xe=["stateless","render-backend","interactive-session"],Me=["stateless","stateless-single-step","stateful-session-required"],we=["required","conditional","none"],ve=["browser-read","browser-authenticated-read","browser-state-changing"];var Oe=["read-page","read-authenticated-page","fill-form","submit-form","download-file","reuse-session"],Ne=["web_search","web_fetch","deep_research","blocked"],De=["requires-interaction","requires-login-state","requires-rendered-dom","requires-persistent-session","requires-state-changing-action"],He=["none","same-capability-once","degrade-only"];var Le=["prefetch","sync_turn","on_pre_compress","on_session_end","on_delegation","on_memory_write"],Ue=["turn","sidechain","compress","session-end","agent-remember","auto-extract","implicit-extract","profile-extraction","dream"],je=["observe-only","parent-write","deny"];var Ke=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 j(e){return{...e,artifacts:e.artifacts.map(t=>({...t}))}}function Fe(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 F(e,t){return e.assets[t]}function V(e,t){return e.profiles[t]}function Ve(e,t){let n=V(e,t);return n?n.assetIds.map(r=>F(e,r)).filter(r=>!!r):[]}function We(e,t){return e.assets[t.id]=j(t),W(e)}function T(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 W(e){let t=T(e.assets[a.gatewayImage]),n=T(e.assets[a.whisperModelTiny]);return{...e,gateway:t,whisperModel:n}}function U(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 qe(e){let t=e&&typeof e=="object"?e:{},n={},r=t.assets&&typeof t.assets=="object"?t.assets:{};for(let[o,d]of Object.entries(r)){if(!d||typeof d!="object")continue;let u=d;!u.id||!Array.isArray(u.artifacts)||(n[o]=j(u))}if(!n[a.gatewayImage]&&t.gateway&&typeof t.gateway=="object"){let o=U(t.gateway,{id:a.gatewayImage,title:"XiaoZhiClaw Gateway Image (Desktop Slim)",kind:"container-image",delivery:"remote",platform:"any",description:"Desktop Docker mode gateway image."});o&&(n[o.id]=o)}if(!n[a.whisperModelTiny]&&t.whisperModel&&typeof t.whisperModel=="object"){let o=U(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."});o&&(n[o.id]=o)}let p={...K()},s=t.profiles&&typeof t.profiles=="object"?t.profiles:{};for(let[o,d]of Object.entries(s)){if(!d||typeof d!="object")continue;let u=d;!u.id||!Array.isArray(u.assetIds)||(p[o]=Fe(u))}return W({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:n,profiles:p})}var Be=["pending","captured","failed","restored"],Ye=["file","directory","missing"],Ge=["metadata-only","workspace-copy","shadow-git"];var ze=["api-key","oauth","token","aws-sdk"],Xe=["rate_limit","auth","server_error","timeout","network","unknown"],$e=["requiresOpenAiAnthropicToolPayload"];function Je(e,t){return!e||typeof e!="object"||Array.isArray(e)?!1:e[t]===!0}var q="openai-codex";function R(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=R(e);return t==="volcengine-plan"?"volcengine":t==="qwen-coding"?"qwen":t==="byteplus-plan"?"byteplus":t}var Qe=B,Ze={anthropicToolSchemaMode:"native",anthropicToolChoiceMode:"native",providerFamily:"default",preserveAnthropicThinkingSignatures:!0,openAiCompatTurnValidation:!0,providerThoughtSignatureSanitization:!1,transcriptToolCallIdMode:"default",transcriptToolCallIdModelHints:[],providerThoughtSignatureModelHints:[],dropThinkingBlockModelHints:[]},et={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"},[q]:{providerFamily:"openai"},openrouter:{openAiCompatTurnValidation:!1,providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]},opencode:{openAiCompatTurnValidation:!1,providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]},kilocode:{providerThoughtSignatureSanitization:!0,providerThoughtSignatureModelHints:["gemini"]}};function h(e,t){let n=(e??"").toLowerCase();return!!n&&t.some(r=>n.includes(r))}function c(e){let t=R(e??"");return{...Ze,...et[t]}}function tt(e){return c(e).preserveAnthropicThinkingSignatures}function nt(e){let t=c(e);return t.anthropicToolSchemaMode!=="native"||t.anthropicToolChoiceMode!=="native"}function rt(e){return c(e).anthropicToolSchemaMode==="openai-functions"}function ot(e){return c(e).anthropicToolChoiceMode==="openai-string-modes"}function it(e){return c(e).openAiCompatTurnValidation}function st(e){return c(e).providerFamily==="openai"}function at(e){return c(e).providerFamily==="anthropic"}function dt(e){return h(e.modelId,c(e.provider).dropThinkingBlockModelHints)}function pt(e){let t=c(e.provider);return t.providerThoughtSignatureSanitization&&h(e.modelId,t.providerThoughtSignatureModelHints)}function ct(e,t){let n=c(e),r=n.transcriptToolCallIdMode;if(r==="strict9")return r;if(h(t,n.transcriptToolCallIdModelHints))return"strict9"}var _={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 lt(){return[...new Set(Object.values(_).flat())]}function ut(e){let t=R(e.provider),n=e.env??process.env,r=new Set(e.appliedEnvKeys??[]),i=o=>{let d=n[o]?.trim();if(!d)return null;let u=r.has(o)?`shell env: ${o}`:`env: ${o}`;return{apiKey:d,source:u}},p=e.resolveSpecialApiKey?.(t,n,r);if(p)return p;let s=_[t];if(!s||s.length===0)return null;for(let o of s){let d=i(o);if(d)return d}return null}export{ye as ACP_EXTENDED_METHODS,Ae as ACP_EXTENDED_SESSION_UPDATE_TYPES,fe as ACP_METHODS,me as ACP_PROTOCOL_VERSION,O as ACP_SESSION_UPDATE_TYPES,z as AGENT_RPC_APPROVAL_METHODS,l as AGENT_RPC_ERROR_CODES,G as AGENT_RPC_PROTOCOL_VERSION,E as AGENT_TEAM_WS_EVENT_NAMES,I as AGENT_WS_EVENT_NAMES,v as ALL_AGENT_WS_EVENT_NAMES,b as CAPABILITY_MANIFEST_DIFF_SECTIONS,ne as GATEWAY_RPC_METHODS,S as GatewayRpcContract,Le as MEMORY_OBSERVATION_HOOK_VALUES,Ue as MEMORY_OBSERVATION_SOURCE_VALUES,je as MEMORY_WRITE_ACCESS_VALUES,Ge as MUTATION_CHECKPOINT_BACKEND_VALUES,Ye as MUTATION_CHECKPOINT_ENTRY_KIND_VALUES,Be as MUTATION_CHECKPOINT_PHASE_VALUES,Y as PETDEX_ANIMATION_IDS,ze as PROVIDER_RUNTIME_AUTH_MODE_VALUES,$e as PROVIDER_RUNTIME_COMPAT_FLAG_VALUES,_ as PROVIDER_RUNTIME_ENV_API_KEY_CANDIDATES,q as PROVIDER_RUNTIME_OPENAI_CODEX_PROVIDER_ID,Xe as PROVIDER_RUNTIME_VAULT_ERROR_TYPE_VALUES,Ke as RESOURCE_MANIFEST_SCHEMA_VERSION,a as RUNTIME_ASSET_IDS,y as RUNTIME_PROFILE_IDS,Oe as WEB_ACTION_SCOPE_VALUES,we as WEB_APPROVAL_DEFAULT_VALUES,ke as WEB_CAPABILITY_FAMILY_VALUES,_e as WEB_CAPABILITY_ID_VALUES,Ne as WEB_DEGRADATION_TARGET_VALUES,De as WEB_ESCALATION_REASON_VALUES,xe as WEB_EXECUTION_MODE_VALUES,ve as WEB_POLICY_RISK_CLASS_VALUES,He as WEB_RETRY_POLICY_VALUES,Me as WEB_STATEFULNESS_VALUES,Ce as WEB_TASK_MODE_VALUES,te as buildAgentRpcMeta,A as classifyGatewayRpcMethod,f as cloneCapabilityManifestSnapshot,he as createCapabilityManifestDiffPayload,K as createDefaultRuntimeResourceProfiles,Pe as deriveCapabilityToolNamespaces,Te as deriveCapabilityWorkspaceIds,T as getManifestShortcutEntry,F as getRuntimeResourceAsset,V as getRuntimeResourceProfile,Ve as getRuntimeResourceProfileAssets,D as isAcpJsonRpcNotification,N as isAcpJsonRpcRequest,H as isAcpJsonRpcResponse,x as isAgentRpcNotification,k as isAgentRpcRequest,C as isAgentRpcResponse,at as isAnthropicProviderRuntimeFamily,Ie as isExtendedSessionUpdateType,st as isOpenAiProviderRuntimeFamily,Se as isStandardSessionUpdateType,lt as listProviderRuntimeEnvApiKeyNames,be as mergeCapabilityManifestSnapshot,R as normalizeProviderRuntimeId,B as normalizeProviderRuntimeIdForAuth,qe as normalizeRuntimeResourceManifest,Re as parseAcpMessage,X as parseAgentRpcMessage,tt as preservesProviderRuntimeAnthropicThinkingSignatures,Je as readProviderRuntimeCompatFlag,w as requireGatewayRpcMeta,M as requiresIdempotencyKey,nt as requiresOpenAiCompatibleAnthropicToolPayloadForProviderRuntime,c as resolveProviderRuntimeCapabilities,ut as resolveProviderRuntimeEnvApiKey,Qe as resolveProviderRuntimeKeyFamily,ct as resolveProviderRuntimeTranscriptToolCallIdMode,dt as shouldDropThinkingBlocksForProviderRuntimeModel,pt as shouldSanitizeProviderRuntimeThoughtSignaturesForModel,it as supportsOpenAiCompatTurnValidationForProviderRuntime,We as upsertRuntimeResourceAsset,rt as usesOpenAiFunctionAnthropicToolSchemaForProviderRuntime,ot as usesOpenAiStringModeAnthropicToolChoiceForProviderRuntime};
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: desktop-screenshot
|
|
3
|
-
description: 用户要求截屏/截图/看看我的屏幕时使用 —— 用 exec 跑系统命令截取桌面,把图片文件路径回给用户。无需专用截图工具。
|
|
4
|
-
requires: [exec, write]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Desktop Screenshot
|
|
8
|
-
|
|
9
|
-
用户要求截取桌面/屏幕时,用 exec 执行系统自带命令,**不要**说自己没有截图能力。
|
|
10
|
-
|
|
11
|
-
## 通用规则
|
|
12
|
-
|
|
13
|
-
- **输出到系统临时目录**(Windows = `$env:TEMP`;macOS/Linux = `$TMPDIR`,回退 `/tmp`)。系统会自动把临时目录里的截图桥接到工作区可代理的 `assets/` 目录并作为图片回给用户 —— 你只要把命令打印出来的那条路径原样转告用户即可,**不必**手动搬运文件,也**不要**写到工作区其它目录(那样前端反而加载不出图)。
|
|
14
|
-
- 文件名带时间戳(如 `qla-shot-20260703-142530.png`),避免覆盖。
|
|
15
|
-
|
|
16
|
-
## Windows
|
|
17
|
-
|
|
18
|
-
不要把一长串截图命令内联到 exec。改为分两步:
|
|
19
|
-
|
|
20
|
-
1. 用 **write 工具**把下面这个脚本写到工作区 `.qla-tmp/shot.ps1`(`$out` 落在系统临时目录 `$env:TEMP`):
|
|
21
|
-
|
|
22
|
-
```powershell
|
|
23
|
-
Add-Type -AssemblyName System.Windows.Forms, System.Drawing
|
|
24
|
-
$out = Join-Path $env:TEMP ("qla-shot-" + (Get-Date -Format yyyyMMdd-HHmmss) + ".png")
|
|
25
|
-
$b = [System.Windows.Forms.SystemInformation]::VirtualScreen
|
|
26
|
-
$bmp = New-Object System.Drawing.Bitmap $b.Width, $b.Height
|
|
27
|
-
$g = [System.Drawing.Graphics]::FromImage($bmp)
|
|
28
|
-
$g.CopyFromScreen($b.Left, $b.Top, 0, 0, $bmp.Size)
|
|
29
|
-
$bmp.Save($out)
|
|
30
|
-
$g.Dispose(); $bmp.Dispose()
|
|
31
|
-
Write-Output $out
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
2. 再用 exec 运行它,**显式写 `powershell.exe`**(不要假设当前 shell 是 PowerShell —— 即便是 opt-in 的 Git Bash 也能这样截图):
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .qla-tmp/shot.ps1
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
脚本会把最终 PNG 的绝对路径打印到 stdout。
|
|
41
|
-
|
|
42
|
-
## macOS
|
|
43
|
-
|
|
44
|
-
截到系统临时目录并把路径打印出来(不要固定文件名):
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
f="${TMPDIR:-/tmp}/qla-shot-$(date +%Y%m%d-%H%M%S).png"; screencapture -x "$f"; echo "$f"
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Linux
|
|
51
|
-
|
|
52
|
-
优先 grim(Wayland)或 `import -window root`(X11/ImageMagick),同样输出到系统临时目录并打印路径:
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
f="${TMPDIR:-/tmp}/qla-shot-$(date +%Y%m%d-%H%M%S).png"; grim "$f" && echo "$f"
|
|
56
|
-
# 或 X11/ImageMagick:
|
|
57
|
-
f="${TMPDIR:-/tmp}/qla-shot-$(date +%Y%m%d-%H%M%S).png"; import -window root "$f" && echo "$f"
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## 之后
|
|
61
|
-
|
|
62
|
-
把命令打印出来的那条图片路径**用反引号包成行内代码**回给用户(如 `C:\Users\…\image.png`)——前端会把工作区内的图片路径**内联渲染成图片**,反引号能避免路径里的反斜杠被 markdown 转义破坏。再一句话说明截的是什么。命令失败时报告确切错误,不要改用安装大型依赖的方案。
|
|
1
|
+
---
|
|
2
|
+
name: desktop-screenshot
|
|
3
|
+
description: 用户要求截屏/截图/看看我的屏幕时使用 —— 用 exec 跑系统命令截取桌面,把图片文件路径回给用户。无需专用截图工具。
|
|
4
|
+
requires: [exec, write]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Desktop Screenshot
|
|
8
|
+
|
|
9
|
+
用户要求截取桌面/屏幕时,用 exec 执行系统自带命令,**不要**说自己没有截图能力。
|
|
10
|
+
|
|
11
|
+
## 通用规则
|
|
12
|
+
|
|
13
|
+
- **输出到系统临时目录**(Windows = `$env:TEMP`;macOS/Linux = `$TMPDIR`,回退 `/tmp`)。系统会自动把临时目录里的截图桥接到工作区可代理的 `assets/` 目录并作为图片回给用户 —— 你只要把命令打印出来的那条路径原样转告用户即可,**不必**手动搬运文件,也**不要**写到工作区其它目录(那样前端反而加载不出图)。
|
|
14
|
+
- 文件名带时间戳(如 `qla-shot-20260703-142530.png`),避免覆盖。
|
|
15
|
+
|
|
16
|
+
## Windows
|
|
17
|
+
|
|
18
|
+
不要把一长串截图命令内联到 exec。改为分两步:
|
|
19
|
+
|
|
20
|
+
1. 用 **write 工具**把下面这个脚本写到工作区 `.qla-tmp/shot.ps1`(`$out` 落在系统临时目录 `$env:TEMP`):
|
|
21
|
+
|
|
22
|
+
```powershell
|
|
23
|
+
Add-Type -AssemblyName System.Windows.Forms, System.Drawing
|
|
24
|
+
$out = Join-Path $env:TEMP ("qla-shot-" + (Get-Date -Format yyyyMMdd-HHmmss) + ".png")
|
|
25
|
+
$b = [System.Windows.Forms.SystemInformation]::VirtualScreen
|
|
26
|
+
$bmp = New-Object System.Drawing.Bitmap $b.Width, $b.Height
|
|
27
|
+
$g = [System.Drawing.Graphics]::FromImage($bmp)
|
|
28
|
+
$g.CopyFromScreen($b.Left, $b.Top, 0, 0, $bmp.Size)
|
|
29
|
+
$bmp.Save($out)
|
|
30
|
+
$g.Dispose(); $bmp.Dispose()
|
|
31
|
+
Write-Output $out
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. 再用 exec 运行它,**显式写 `powershell.exe`**(不要假设当前 shell 是 PowerShell —— 即便是 opt-in 的 Git Bash 也能这样截图):
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .qla-tmp/shot.ps1
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
脚本会把最终 PNG 的绝对路径打印到 stdout。
|
|
41
|
+
|
|
42
|
+
## macOS
|
|
43
|
+
|
|
44
|
+
截到系统临时目录并把路径打印出来(不要固定文件名):
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
f="${TMPDIR:-/tmp}/qla-shot-$(date +%Y%m%d-%H%M%S).png"; screencapture -x "$f"; echo "$f"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Linux
|
|
51
|
+
|
|
52
|
+
优先 grim(Wayland)或 `import -window root`(X11/ImageMagick),同样输出到系统临时目录并打印路径:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
f="${TMPDIR:-/tmp}/qla-shot-$(date +%Y%m%d-%H%M%S).png"; grim "$f" && echo "$f"
|
|
56
|
+
# 或 X11/ImageMagick:
|
|
57
|
+
f="${TMPDIR:-/tmp}/qla-shot-$(date +%Y%m%d-%H%M%S).png"; import -window root "$f" && echo "$f"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 之后
|
|
61
|
+
|
|
62
|
+
把命令打印出来的那条图片路径**用反引号包成行内代码**回给用户(如 `C:\Users\…\image.png`)——前端会把工作区内的图片路径**内联渲染成图片**,反引号能避免路径里的反斜杠被 markdown 转义破坏。再一句话说明截的是什么。命令失败时报告确切错误,不要改用安装大型依赖的方案。
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: office-doc-reading
|
|
3
|
-
description: 用户上传或提到 xls/xlsx/doc/docx/ppt/pdf 等 office 文档并询问内容时使用 —— 用 exec + python 一行脚本直接读取,严禁格式转换迂回和重复装包。
|
|
4
|
-
requires: [exec, read]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Office Document Reading
|
|
8
|
-
|
|
9
|
-
read 工具无法解析二进制 office 文档(会返回结构化拒绝)。正确路径:
|
|
10
|
-
|
|
11
|
-
1. **定位本地文件**:上传清单里的 `[Uploaded file saved locally: <path>]` 即本地路径;没有则先用 search 找。
|
|
12
|
-
2. **一行脚本直读**(exec):
|
|
13
|
-
- 表格:python -c "import openpyxl;wb=openpyxl.load_workbook(r'<path>',read_only=True);ws=wb.active;[print(*[c.value for c in r],sep='\t') for r in ws.iter_rows(max_rows=30)]"
|
|
14
|
-
(.xls 老格式用 pandas.read_excel,engine 自动回退 xlrd)
|
|
15
|
-
- Word:python -c "import docx;print('\n'.join(p.text for p in docx.Document(r'<path>').paragraphs[:60]))"
|
|
16
|
-
- PDF:python -c "import pypdf;r=pypdf.PdfReader(r'<path>');print('\n'.join((p.extract_text() or '')[:2000] for p in r.pages[:5]))"
|
|
17
|
-
3. **缺依赖时**:最多补装一次对应包(如 pip install openpyxl);装完立即回到第 2 步。
|
|
18
|
-
4. **禁止**:把文档转成 XML/BOM/其他格式的迂回链;同一目标装第二轮依赖;对二进制文件重复调用 read。
|
|
19
|
-
5. 回答用户问题本身(表里有什么 → 列名 + 行数 + 前几行概要),不要倾倒全部内容。
|
|
1
|
+
---
|
|
2
|
+
name: office-doc-reading
|
|
3
|
+
description: 用户上传或提到 xls/xlsx/doc/docx/ppt/pdf 等 office 文档并询问内容时使用 —— 用 exec + python 一行脚本直接读取,严禁格式转换迂回和重复装包。
|
|
4
|
+
requires: [exec, read]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Office Document Reading
|
|
8
|
+
|
|
9
|
+
read 工具无法解析二进制 office 文档(会返回结构化拒绝)。正确路径:
|
|
10
|
+
|
|
11
|
+
1. **定位本地文件**:上传清单里的 `[Uploaded file saved locally: <path>]` 即本地路径;没有则先用 search 找。
|
|
12
|
+
2. **一行脚本直读**(exec):
|
|
13
|
+
- 表格:python -c "import openpyxl;wb=openpyxl.load_workbook(r'<path>',read_only=True);ws=wb.active;[print(*[c.value for c in r],sep='\t') for r in ws.iter_rows(max_rows=30)]"
|
|
14
|
+
(.xls 老格式用 pandas.read_excel,engine 自动回退 xlrd)
|
|
15
|
+
- Word:python -c "import docx;print('\n'.join(p.text for p in docx.Document(r'<path>').paragraphs[:60]))"
|
|
16
|
+
- PDF:python -c "import pypdf;r=pypdf.PdfReader(r'<path>');print('\n'.join((p.extract_text() or '')[:2000] for p in r.pages[:5]))"
|
|
17
|
+
3. **缺依赖时**:最多补装一次对应包(如 pip install openpyxl);装完立即回到第 2 步。
|
|
18
|
+
4. **禁止**:把文档转成 XML/BOM/其他格式的迂回链;同一目标装第二轮依赖;对二进制文件重复调用 read。
|
|
19
|
+
5. 回答用户问题本身(表里有什么 → 列名 + 行数 + 前几行概要),不要倾倒全部内容。
|
|
@@ -33,6 +33,12 @@ export declare function handleAcpDream(host: AcpExtendedHost, params: {
|
|
|
33
33
|
ok: boolean;
|
|
34
34
|
summary?: string;
|
|
35
35
|
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Resolve a plan run's cwd from its project's workspaceDir (mutates params.cwd when unset), so
|
|
38
|
+
* Solo/Product worktrees land in the user's workspace (e.g. ~/.qlogicagent/workspaces/default) —
|
|
39
|
+
* not the gateway's own process.cwd(), which polluted xiaozhiclaw-runtime/.worktrees. The
|
|
40
|
+
* rpc-registry handler did this; the x/ ACP entry (the one the gateway actually calls) didn't.
|
|
41
|
+
*/
|
|
36
42
|
export declare function handleAcpSoloStart(host: AcpExtendedHost, params: Record<string, unknown>): Promise<unknown>;
|
|
37
43
|
export declare function handleAcpSoloStatus(host: AcpExtendedHost, params: Record<string, unknown>): Promise<unknown>;
|
|
38
44
|
export declare function handleAcpSoloSelect(host: AcpExtendedHost, params: Record<string, unknown>): Promise<unknown>;
|
|
@@ -8,6 +8,11 @@ import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/in
|
|
|
8
8
|
import type { AgentConfigStore } from "../../runtime/infra/agent-config-store.js";
|
|
9
9
|
import { type AcpDetector } from "../../runtime/infra/acp-detector.js";
|
|
10
10
|
import type { DelegateBridge } from "../../orchestration/delegation-coordinator.js";
|
|
11
|
+
import type { AgentDescriptor } from "../../protocol/wire/acp-agent-management.js";
|
|
12
|
+
export declare function refreshInstalledAgentDetection(detector: AcpDetector, agentId: string): Promise<{
|
|
13
|
+
descriptor: AgentDescriptor;
|
|
14
|
+
ready: boolean;
|
|
15
|
+
}>;
|
|
11
16
|
export interface AgentsHandlerHost {
|
|
12
17
|
acpDetector: AcpDetector;
|
|
13
18
|
ensureAgentConfigStore(): Promise<AgentConfigStore>;
|
|
@@ -71,7 +71,8 @@ export type AgentInstanceState = "starting" | "ready" | "busy" | "unresponsive"
|
|
|
71
71
|
* 结构化失败归类(freeze §4 E3:失败一律结构化明示,不得降级成裸 error 串)。
|
|
72
72
|
* UNKNOWN = 无法归类时的显式兜底:禁止硬塞错误 code,也禁止因归不了类降级成裸串。
|
|
73
73
|
*/
|
|
74
|
-
export
|
|
74
|
+
export declare const LIFECYCLE_CODES: readonly ["CANCELLED", "PROCESS_EXIT", "HEARTBEAT_TIMEOUT", "TURN_TIMEOUT", "PROTOCOL_MISMATCH", "UNKNOWN"];
|
|
75
|
+
export type LifecycleCode = (typeof LIFECYCLE_CODES)[number];
|
|
75
76
|
/**
|
|
76
77
|
* 确定性派生 projectId —— host-contract leaf 内的唯一实现(project-id.ts):
|
|
77
78
|
* sha256(resolve(workspaceDir).toLowerCase()).hex[:16]。
|
|
@@ -24,14 +24,18 @@ export interface ProductCallbacks {
|
|
|
24
24
|
info(msg: string): void;
|
|
25
25
|
warn(msg: string): void;
|
|
26
26
|
};
|
|
27
|
-
onTaskStarted?: (productId: string, taskId: string, assignee: string) => void;
|
|
28
|
-
onTaskCompleted?: (productId: string, taskId: string, result: string, meta
|
|
27
|
+
onTaskStarted?: (productId: string, taskId: string, assignee: string, attempt: number) => void;
|
|
28
|
+
onTaskCompleted?: (productId: string, taskId: string, result: string, meta: {
|
|
29
|
+
attempt: number;
|
|
29
30
|
inputTokens: number;
|
|
30
31
|
outputTokens: number;
|
|
31
32
|
changedFiles: string[];
|
|
32
33
|
acceptanceUnverified?: boolean;
|
|
33
34
|
}) => void;
|
|
34
|
-
onTaskFailed?: (productId: string, taskId: string, error: string
|
|
35
|
+
onTaskFailed?: (productId: string, taskId: string, error: string, meta: {
|
|
36
|
+
attempt: number;
|
|
37
|
+
terminalState: "failed" | "cancelled";
|
|
38
|
+
}) => void;
|
|
35
39
|
onCheckpointed?: (productId: string, timestamp: string) => void;
|
|
36
40
|
onBudgetWarning?: (productId: string, usedTokens: number, maxTotalTokens: number, percentage: number) => void;
|
|
37
41
|
/** Budget hard limit hit → the run auto-paused. The 100% counterpart of onBudgetWarning (80%): the
|
|
@@ -14,7 +14,9 @@ import { type AcpDetector } from "../runtime/infra/acp-detector.js";
|
|
|
14
14
|
* The leader `qlogicagent` (小智) is ALWAYS present (universal coordinator / fallback executor) — appended
|
|
15
15
|
* if not already in the roster, so the leader always has ≥1 valid assignee even when the user's picks turn
|
|
16
16
|
* out unready (or when the pool is empty). */
|
|
17
|
-
export declare function buildAgentRoster(detector: AcpDetector, _configStore: AgentConfigStoreData | null, allowedAgents?: string[]
|
|
17
|
+
export declare function buildAgentRoster(detector: AcpDetector, _configStore: AgentConfigStoreData | null, allowedAgents?: string[], options?: {
|
|
18
|
+
injectLeader?: boolean;
|
|
19
|
+
}): AgentRosterEntry[];
|
|
18
20
|
/**
|
|
19
21
|
* User-PICKED worker ids that did NOT make it into the roster (unready: not installed / not logged in
|
|
20
22
|
* / not in the catalog). Excludes the leader (always force-included). Empty when nothing was dropped
|
|
@@ -23,7 +25,9 @@ export declare function buildAgentRoster(detector: AcpDetector, _configStore: Ag
|
|
|
23
25
|
*/
|
|
24
26
|
export declare function computeUnavailablePicks(allowedAgents: string[] | undefined, rosterIds: readonly string[]): string[];
|
|
25
27
|
/** buildAgentRoster + the diagnostics of which picked workers were dropped as unavailable. */
|
|
26
|
-
export declare function buildAgentRosterWithDiagnostics(detector: AcpDetector, configStore: AgentConfigStoreData | null, allowedAgents?: string[]
|
|
28
|
+
export declare function buildAgentRosterWithDiagnostics(detector: AcpDetector, configStore: AgentConfigStoreData | null, allowedAgents?: string[], options?: {
|
|
29
|
+
injectLeader?: boolean;
|
|
30
|
+
}): {
|
|
27
31
|
roster: AgentRosterEntry[];
|
|
28
32
|
unavailablePicks: string[];
|
|
29
33
|
};
|
|
@@ -72,10 +72,10 @@ export declare class DelegationCoordinator {
|
|
|
72
72
|
* the lifecycle (started / settled) is reported via notify(mention.*). An unready/uninstalled agent
|
|
73
73
|
* surfaces as a `failed` settle (never a thrown RPC).
|
|
74
74
|
*/
|
|
75
|
-
delegate(agentId: string, brief: string, opts
|
|
75
|
+
delegate(agentId: string, brief: string, opts: {
|
|
76
|
+
canonicalSessionId: string;
|
|
76
77
|
acceptanceCriteria?: string;
|
|
77
78
|
delegationId?: string;
|
|
78
|
-
sessionId?: string;
|
|
79
79
|
}): {
|
|
80
80
|
delegationId: string;
|
|
81
81
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { NotificationMethodMap } from "./wire/notification-payloads.js";
|
|
2
|
+
export declare const AGENT_CONTRACT_VERSION: 3;
|
|
3
|
+
export declare const AGENT_EVENT_SCHEMA_VERSION: 1;
|
|
4
|
+
export declare const AGENT_TERMINAL_STATES: readonly ["completed", "failed", "cancelled"];
|
|
5
|
+
export type TerminalState = (typeof AGENT_TERMINAL_STATES)[number];
|
|
6
|
+
export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "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.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "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", "workflow.approvalTimedOut"];
|
|
7
|
+
export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated", "goal.round_message", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
8
|
+
export declare const AGENT_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "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.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "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", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated", "goal.round_message", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
9
|
+
export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "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.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "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", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated", "goal.round_message", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
10
|
+
/** Runtime-required keys whose shape is not encoded by TypeScript after serialization. */
|
|
11
|
+
export declare const AGENT_EVENT_REQUIRED_KEYS: {
|
|
12
|
+
readonly "product.taskStarted": readonly ["productId", "taskId", "assignee", "attempt"];
|
|
13
|
+
readonly "product.taskCompleted": readonly ["productId", "taskId", "result", "attempt"];
|
|
14
|
+
readonly "product.taskFailed": readonly ["productId", "taskId", "error", "attempt", "terminalState"];
|
|
15
|
+
};
|
|
16
|
+
export type AgentWsEventName = (typeof AGENT_WS_EVENT_NAMES)[number];
|
|
17
|
+
export type AgentTeamWsEventName = (typeof AGENT_TEAM_WS_EVENT_NAMES)[number];
|
|
18
|
+
export type AgentEventName = (typeof AGENT_EVENT_NAMES)[number];
|
|
19
|
+
export type AllAgentWsEventName = AgentEventName;
|
|
20
|
+
export type AgentEventPayloadMap = {
|
|
21
|
+
[K in AgentEventName]: K extends keyof NotificationMethodMap ? NotificationMethodMap[K] : Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
export interface AgentEventEnvelope<K extends AgentEventName = AgentEventName> {
|
|
24
|
+
schemaVersion: typeof AGENT_EVENT_SCHEMA_VERSION;
|
|
25
|
+
type: K;
|
|
26
|
+
payload: AgentEventPayloadMap[K];
|
|
27
|
+
}
|
|
28
|
+
export declare const AGENT_CONTRACT_DESCRIPTOR: {
|
|
29
|
+
readonly version: 3;
|
|
30
|
+
readonly eventSchemaVersion: 1;
|
|
31
|
+
readonly eventNames: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "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.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "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", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated", "goal.round_message", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
32
|
+
readonly eventRequiredKeys: {
|
|
33
|
+
readonly "product.taskStarted": readonly ["productId", "taskId", "assignee", "attempt"];
|
|
34
|
+
readonly "product.taskCompleted": readonly ["productId", "taskId", "result", "attempt"];
|
|
35
|
+
readonly "product.taskFailed": readonly ["productId", "taskId", "error", "attempt", "terminalState"];
|
|
36
|
+
};
|
|
37
|
+
readonly terminalStates: readonly ["completed", "failed", "cancelled"];
|
|
38
|
+
};
|
|
39
|
+
export declare const AGENT_CONTRACT_HASH: "495d6c1122d9ff8da40427e0809710e6e8a1a6663a4128c1ad9865707dd63147";
|
|
40
|
+
export interface AgentContractIdentity {
|
|
41
|
+
version: typeof AGENT_CONTRACT_VERSION;
|
|
42
|
+
hash: typeof AGENT_CONTRACT_HASH;
|
|
43
|
+
}
|
|
44
|
+
export declare const AGENT_CONTRACT_IDENTITY: AgentContractIdentity;
|
|
@@ -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, ProductAgentActivityNotification, ProductBudgetUpdateNotification, ProductBudgetWarningNotification, ProductCheckpointedNotification, ProductCompletedNotification, ProductDagTopologyNotification, ProductMembersNotification, ProductPlanFailedNotification, ProductPlanningDeltaNotification, ProductPlanReadyNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductTaskOutputDeltaNotification, ProductTaskStartedNotification, ProjectArchivedNotification, ProjectCreatedNotification, ProjectDeletedNotification, ProjectRenamedNotification, ProjectSwitchedNotification, ProjectUnarchivedNotification, SessionInfoNotification, SessionRecoveryPendingNotification, SoloAgentDeltaNotification, SoloAgentUsageNotification, SoloEvaluationNotification, SoloProgressNotification, TeamMemberNotification, ToolApprovalRequestNotification, TurnAnnotationsNotification, TurnArtifactNotification, TurnAskUserNotification, TurnDeltaNotification, TurnEndNotification, TurnErrorNotification, TurnExecProgressNotification, TurnHeartbeatNotification, TurnMediaPersistedNotification, TurnMediaProgressNotification, TurnMediaResultNotification, TurnPlanUpdateNotification, TurnProgressNotification, 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, ProductAgentActivityNotification, ProductBudgetUpdateNotification, ProductBudgetWarningNotification, ProductCheckpointedNotification, ProductCompletedNotification, ProductDagTopologyNotification, ProductMembersNotification, ProductPlanFailedNotification, ProductPlanningDeltaNotification, ProductPlanReadyNotification, ProductLeaderMessageNotification, ProductPlanningAskNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductTaskOutputDeltaNotification, ProductTaskStartedNotification, ProjectArchivedNotification, ProjectCreatedNotification, ProjectDeletedNotification, ProjectRenamedNotification, ProjectSwitchedNotification, ProjectUnarchivedNotification, SessionInfoNotification, SessionRecoveryPendingNotification, SoloAgentDeltaNotification, SoloAgentUsageNotification, SoloEvaluationNotification, SoloProgressNotification, TeamMemberNotification, ToolApprovalRequestNotification, TurnAnnotationsNotification, TurnArtifactNotification, TurnAskUserNotification, TurnDeltaNotification, TurnEndNotification, TurnErrorNotification, TurnExecProgressNotification, TurnHeartbeatNotification, TurnMediaPersistedNotification, TurnMediaProgressNotification, TurnMediaResultNotification, TurnPlanUpdateNotification, TurnProgressNotification, TurnReasoningDeltaNotification, TurnRecoveryNotification, TurnSidechainCompletedNotification, TurnSidechainStartedNotification, TurnSkillInstructionNotification, TurnStartNotification, TurnSubagentDeltaNotification, TurnSuggestionsNotification, TurnTaskUpdatedNotification, TurnTodosUpdatedNotification, TurnToolBlockedNotification, TurnToolCallNotification, TurnToolResultNotification, TurnToolUseSummaryNotification, TurnUsageUpdateNotification, WireTokenUsage, GoalRoundMessageNotification, MentionDelegateStartedNotification, MentionDelegateActivityNotification, MentionDelegateSettledNotification, } from "./wire/index.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type HostRequestCapability } from "../../host-contract/index.js";
|
|
2
|
+
import type { AgentContractIdentity } from "../agent-contract.js";
|
|
2
3
|
export declare const ACP_PROTOCOL_VERSION: 1;
|
|
3
4
|
export declare const ACP_METHODS: {
|
|
4
5
|
readonly INITIALIZE: "initialize";
|
|
@@ -64,6 +65,8 @@ export type AcpExtendedMethod = (typeof ACP_EXTENDED_METHODS)[keyof typeof ACP_E
|
|
|
64
65
|
export interface AcpQlogicagentCapability {
|
|
65
66
|
/** Extension protocol version, fixed at 1 this round. */
|
|
66
67
|
version: number;
|
|
68
|
+
/** Exact shared contract identity. Missing or unequal identities fail initialization. */
|
|
69
|
+
contract?: AgentContractIdentity;
|
|
67
70
|
/** x_* session/update extended events (x_session_info / x_relay / x_skill_instruction). */
|
|
68
71
|
events?: boolean;
|
|
69
72
|
/** x/* extended RPC methods (x/solo.* / x/product.* / x/team.* etc). */
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Agent Notification Event Names — shared between Agent and Gateway.
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for which agent notifications should be
|
|
5
|
-
* relayed to WebSocket clients. Adding a new event = add ONE line here.
|
|
6
|
-
*
|
|
7
|
-
* Design: Gateway's generic relay uses this list as its whitelist.
|
|
8
|
-
* Agent's protocol/notifications.ts defines the full payload types.
|
|
9
|
-
* This file is the bridge that keeps both sides in sync with zero
|
|
10
|
-
* manual string matching.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Turn-lifecycle events relayed to the Control UI WebSocket.
|
|
14
|
-
* These are the "chat session" events that every UI client needs.
|
|
15
|
-
*/
|
|
16
|
-
export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "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.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "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", "workflow.approvalTimedOut"];
|
|
17
|
-
/**
|
|
18
|
-
* Agent Team events (Solo Mode, Product Mode, Plan lifecycle).
|
|
19
|
-
* Relayed to the UI's team/orchestration panel.
|
|
20
|
-
*/
|
|
21
|
-
export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated"];
|
|
22
|
-
/**
|
|
23
|
-
* All agent notifications that Gateway should relay to WS clients.
|
|
24
|
-
* Union of session events + team events.
|
|
25
|
-
*/
|
|
26
|
-
export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "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.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "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", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated"];
|
|
27
|
-
/** Type-level event name for session events. */
|
|
28
|
-
export type AgentWsEventName = (typeof AGENT_WS_EVENT_NAMES)[number];
|
|
29
|
-
/** Type-level event name for team events. */
|
|
30
|
-
export type AgentTeamWsEventName = (typeof AGENT_TEAM_WS_EVENT_NAMES)[number];
|
|
31
|
-
/** Type-level event name for all relayed events. */
|
|
32
|
-
export type AllAgentWsEventName = (typeof ALL_AGENT_WS_EVENT_NAMES)[number];
|
|
1
|
+
export { AGENT_TEAM_WS_EVENT_NAMES, AGENT_WS_EVENT_NAMES, ALL_AGENT_WS_EVENT_NAMES, type AgentTeamWsEventName, type AgentWsEventName, type AllAgentWsEventName, } from "../agent-contract.js";
|
|
@@ -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 ProductMembersNotification, type ProductAgentActivityNotification, type ProductTaskStartedNotification, type ProjectArchivedNotification, type ProjectCreatedNotification, type ProjectDeletedNotification, type ProjectRenamedNotification, type ProjectSwitchedNotification, type ProjectUnarchivedNotification, type SessionInfoNotification, type SessionRecoveryPendingNotification, 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 TurnProgressNotification, 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";
|
|
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 ProductMembersNotification, type ProductAgentActivityNotification, type ProductTaskStartedNotification, type ProjectArchivedNotification, type ProjectCreatedNotification, type ProjectDeletedNotification, type ProjectRenamedNotification, type ProjectSwitchedNotification, type ProjectUnarchivedNotification, type SessionInfoNotification, type SessionRecoveryPendingNotification, 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 TurnProgressNotification, 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 ProductLeaderMessageNotification, type ProductPlanningAskNotification, type GoalRoundMessageNotification, type MentionDelegateStartedNotification, type MentionDelegateActivityNotification, type MentionDelegateSettledNotification, 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";
|