Files
orca/src/shared/agent-session-resume-runtime-capabilities.ts
T
Willian FelipeandNeil 150bf49cb2 feat(kiro): report Kiro agent status and list Kiro sessions in history (#26695)
* feat(kiro): report Kiro agent status through managed hooks

Kiro keeps hooks inside each agent config, so Orca installs one managed
hook per event into $KIRO_HOME/agents/*.json (locally and on SSH hosts
under the remote KIRO_HOME) and normalizes the payloads on /hook/kiro.
Pets, sidebar, notifications and mobile now see Kiro working and done.
Kiro resume is gated on a new agent-session.kiro-resume.v1 capability.

* feat(kiro): list Kiro sessions in Agent session history

Reads $KIRO_HOME/sessions/cli/<id>.json metadata plus the streamed
<id>.jsonl transcript locally, under WSL and over SSH, skips subagent
child sessions, and resumes with kiro-cli chat --tui --resume-id <id>.

* fix(kiro): report a remote agent deleted mid-install as unreadable

* fix(kiro): resume history rows by the validated session file name

* fix(kiro): preserve hook configs and restore sessions correctly

* test(kiro): use typed filesystem callbacks

* test(kiro): preserve older-peer search expectations

---------

Co-authored-by: Neil <neil@stably.ai>
2026-10-09 12:08:18 -07:00

36 lines
2.0 KiB
TypeScript

// Why: adding kimi to RESUMABLE_TUI_AGENTS grows terminal.ensureAgentSession's enum, and an
// older host answers the unknown member with invalid_argument — a code the launch fallback does
// not retry on — so clients must probe before taking the host-authority path.
export const AGENT_SESSION_CURSOR_RESUME_RUNTIME_CAPABILITY =
'agent-session.cursor-resume.v1' as const
export const AGENT_SESSION_KIMI_RESUME_RUNTIME_CAPABILITY = 'agent-session.kimi-resume.v1' as const
export const AGENT_SESSION_OPENCODE2_RESUME_RUNTIME_CAPABILITY =
'agent-session.opencode2-resume.v1' as const
export const AGENT_SESSION_MUSE_RESUME_RUNTIME_CAPABILITY = 'agent-session.muse-resume.v1' as const
export const AGENT_SESSION_DSH_RESUME_RUNTIME_CAPABILITY = 'agent-session.dsh-resume.v1' as const
export const AGENT_SESSION_KIRO_RESUME_RUNTIME_CAPABILITY = 'agent-session.kiro-resume.v1' as const
export const AGENT_SESSION_CODEBUDDY_RESUME_RUNTIME_CAPABILITY =
'agent-session.codebuddy-resume.v1' as const
export const AGENT_SESSION_QODER_CN_RESUME_RUNTIME_CAPABILITY =
'agent-session.qoder-cn-resume.v1' as const
export const AGENT_SESSION_QWEN_CODE_RESUME_RUNTIME_CAPABILITY =
'agent-session.qwen-code-resume.v1' as const
export const AGENT_SESSION_QODER_RESUME_RUNTIME_CAPABILITY =
'agent-session.qoder-resume.v1' as const
export const AGENT_SESSION_ZCODE_RESUME_RUNTIME_CAPABILITY =
'agent-session.zcode-resume.v1' as const
export const AGENT_SESSION_RESUME_RUNTIME_CAPABILITIES = [
AGENT_SESSION_KIMI_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_CURSOR_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_OPENCODE2_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_MUSE_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_DSH_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_KIRO_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_QODER_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_QODER_CN_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_QWEN_CODE_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_CODEBUDDY_RESUME_RUNTIME_CAPABILITY,
AGENT_SESSION_ZCODE_RESUME_RUNTIME_CAPABILITY
] as const