mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-24 00:31:10 +00:00
* feat(gateway): stream node.invoke progress with idle timeouts and cancel * feat(node-host): opt-in approval-gated claude cli agent run command * feat(agents): run node-placed claude-cli turns through streaming node invoke * feat(anthropic): continue claude catalog sessions on advertising nodes * docs(nodes): document paired-node claude agent runs and continuation * chore(plugin-sdk): admit spawn-invocation helper into surface budget * fix(nodes): harden streaming invoke and node run policy from review findings * test(node-host): prove multi-token tool-policy argv fails closed * fix(nodes): allowlist cancel event for apps and break node-host type cycle * chore(protocol): regenerate Swift gateway models for node invoke progress * chore(node-host): drop test-only export surface flagged by deadcode ratchet * style(node-host): merge invoke-types imports * refactor(nodes): split node agent run modules to satisfy the LOC ratchet * chore(protocol): regenerate android gateway models and sync export baseline * chore(plugin-sdk): admit spawn-invocation helper and inherited deprecated drift into surface budget * chore(plugin-sdk): tolerate inherited agent-core deprecated export * fix(anthropic): drop node param parser orphaned by upstream catalog split * ci: sync unused-export baseline with healed main * test(agents): adopt renamed cli backend prepare helper * style(node-host): format claude run spawn invocation * ci: retrigger checks * chore(plugin-sdk): pin surface budgets to healed-base counts * fix(protocol): restore untyped lazy validators after upstream style change
87 lines
2.3 KiB
TypeScript
87 lines
2.3 KiB
TypeScript
/** Shared node-host request, result, event, and approval-bin provider contracts. */
|
|
import type { SkillBinTrustEntry, SystemRunApprovalPlan } from "../infra/exec-approvals.js";
|
|
|
|
/**
|
|
* Shared request/result/event types for node-host command execution.
|
|
*
|
|
* These contracts are consumed by Gateway invoke handling, approval planning,
|
|
* and node-host event emission.
|
|
*/
|
|
/** Gateway invoke frame delivered to node-host command handlers. */
|
|
export type NodeInvokeRequestPayload = {
|
|
id: string;
|
|
nodeId: string;
|
|
command: string;
|
|
paramsJSON?: string | null;
|
|
timeoutMs?: number | null;
|
|
idempotencyKey?: string | null;
|
|
};
|
|
|
|
/** Input payload for a node-host system.run invocation. */
|
|
export type SystemRunParams = {
|
|
command: string[];
|
|
rawCommand?: string | null;
|
|
systemRunPlan?: SystemRunApprovalPlan | null;
|
|
cwd?: string | null;
|
|
env?: Record<string, string>;
|
|
timeoutMs?: number | null;
|
|
needsScreenRecording?: boolean | null;
|
|
agentId?: string | null;
|
|
sessionKey?: string | null;
|
|
approved?: boolean | null;
|
|
approvalDecision?: string | null;
|
|
approvalSource?: string | null;
|
|
runId?: string | null;
|
|
suppressNotifyOnExit?: boolean | null;
|
|
};
|
|
|
|
/** Captured process result returned by system.run execution. */
|
|
export type RunResult = {
|
|
exitCode?: number;
|
|
timedOut: boolean;
|
|
noOutputTimedOut?: boolean;
|
|
success: boolean;
|
|
stdout: string;
|
|
stderr: string;
|
|
error?: string | null;
|
|
truncated: boolean;
|
|
};
|
|
|
|
/** Gateway event payload emitted for exec lifecycle notifications. */
|
|
export type ExecEventPayload = {
|
|
sessionKey: string;
|
|
runId: string;
|
|
host: string;
|
|
command?: string;
|
|
exitCode?: number;
|
|
timedOut?: boolean;
|
|
success?: boolean;
|
|
output?: string;
|
|
reason?: string;
|
|
suppressNotifyOnExit?: boolean;
|
|
};
|
|
|
|
/** Normalized exec result fields used when building finished events. */
|
|
export type ExecFinishedResult = {
|
|
stdout?: string;
|
|
stderr?: string;
|
|
error?: string | null;
|
|
exitCode?: number | null;
|
|
timedOut?: boolean;
|
|
success?: boolean;
|
|
};
|
|
|
|
/** Inputs required to emit an exec finished event. */
|
|
export type ExecFinishedEventParams = {
|
|
sessionKey: string;
|
|
runId: string;
|
|
commandText: string;
|
|
result: ExecFinishedResult;
|
|
suppressNotifyOnExit?: boolean;
|
|
};
|
|
|
|
/** Provider for trusted skill-bin entries used during approval checks. */
|
|
export type SkillBinsProvider = {
|
|
current(force?: boolean): Promise<SkillBinTrustEntry[]>;
|
|
};
|