mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-07 19:06:11 +00:00
34 new golden chat fixtures generated from the web pipeline, plus a machine-generated modes catalog: - Claude output: away_summary/microcompact_boundary/compact_boundary system subtypes, <task-notification> summary extraction, multi-block assistant message with an array-of-parts (text+image) tool_result - AgentEvent union completed: switch/message/error/title-changed(+dedupe)/ limit-warning(pipe text)/api-error folding/turn-duration/compact-summary/ abort-restore/unknown-type passthrough; thread-goal updated+cleared (silent) - Permission lifecycle via agentState.completedRequests: approved_for_session (mode+allowTools), denied with reason, canceled, AskUserQuestion flat answers, request_user_input nested answers (all with explicit createdAt) - Sidechain: Task tool_use with parentToolUseId-grouped subagent children - codex family: error, context_compacted, generated-image, review JSON, thread-goal messages, CodexBash call/result pair, exploration tool group - cli-output: cli-origin command block + stdout merge - agy flavor (output envelope): agy_message, agy_tool_action run_command mapping; cursor ACP plan snapshot (copilot skipped: identical codex shapes) - generator now also emits shared/fixtures/catalogs/modes.json from shared/src/modes.ts (per-flavor permission modes with labels/tones); self-conformance test covers it; README documents the catalogs contract
49 lines
2.0 KiB
TypeScript
49 lines
2.0 KiB
TypeScript
import type { FixtureCase } from '../fixtureTypes'
|
|
import { T0, wireMessage } from './support'
|
|
|
|
/**
|
|
* Cursor flavor: rides the generic codex envelope for text/reasoning/tools
|
|
* (identical wire shapes — no separate fixtures needed for those), but its
|
|
* ACP plan snapshot uses data.type === 'plan' with `entries`, which the
|
|
* pipeline maps to a dedicated completed update_plan card keyed
|
|
* 'cursor-plan-state' (vs codex's 'plan_update' → 'codex-plan-state').
|
|
* Copilot has no distinct shapes at all (same convertAgentMessage path).
|
|
*/
|
|
export const cursorCases: FixtureCase[] = [
|
|
{
|
|
name: 'cursor-plan-snapshot',
|
|
description: 'Cursor ACP plan message (data.type plan, entries[{content, status}]) becomes a completed update_plan tool-call with the stable id cursor-plan-state; input and result both carry {plan: [{step, status}], source: cursor} and later snapshots would merge into the same card.',
|
|
messages: [
|
|
wireMessage({
|
|
id: 'msg-user-741',
|
|
seq: 1,
|
|
createdAt: T0,
|
|
content: {
|
|
role: 'user',
|
|
content: { type: 'text', text: 'Fix the crash on empty sessions.' }
|
|
}
|
|
}),
|
|
wireMessage({
|
|
id: 'msg-cursor-742',
|
|
seq: 2,
|
|
createdAt: T0 + 2_900,
|
|
content: {
|
|
role: 'agent',
|
|
content: {
|
|
type: 'codex',
|
|
data: {
|
|
type: 'plan',
|
|
entries: [
|
|
{ content: 'Reproduce the crash', status: 'completed' },
|
|
{ content: 'Fix the null check in session list', status: 'in_progress' },
|
|
{ content: 'Add a regression test', status: 'pending' }
|
|
],
|
|
id: 'cursor-plan-0a1b2c'
|
|
}
|
|
}
|
|
}
|
|
})
|
|
]
|
|
}
|
|
]
|