/ src / constants / xml.ts
xml.ts
 1  // XML tag names used to mark skill/command metadata in messages
 2  export const COMMAND_NAME_TAG = 'command-name'
 3  export const COMMAND_MESSAGE_TAG = 'command-message'
 4  export const COMMAND_ARGS_TAG = 'command-args'
 5  
 6  // XML tag names for terminal/bash command input and output in user messages
 7  // These wrap content that represents terminal activity, not actual user prompts
 8  export const BASH_INPUT_TAG = 'bash-input'
 9  export const BASH_STDOUT_TAG = 'bash-stdout'
10  export const BASH_STDERR_TAG = 'bash-stderr'
11  export const LOCAL_COMMAND_STDOUT_TAG = 'local-command-stdout'
12  export const LOCAL_COMMAND_STDERR_TAG = 'local-command-stderr'
13  export const LOCAL_COMMAND_CAVEAT_TAG = 'local-command-caveat'
14  
15  // All terminal-related tags that indicate a message is terminal output, not a user prompt
16  export const TERMINAL_OUTPUT_TAGS = [
17    BASH_INPUT_TAG,
18    BASH_STDOUT_TAG,
19    BASH_STDERR_TAG,
20    LOCAL_COMMAND_STDOUT_TAG,
21    LOCAL_COMMAND_STDERR_TAG,
22    LOCAL_COMMAND_CAVEAT_TAG,
23  ] as const
24  
25  export const TICK_TAG = 'tick'
26  
27  // XML tag names for task notifications (background task completions)
28  export const TASK_NOTIFICATION_TAG = 'task-notification'
29  export const TASK_ID_TAG = 'task-id'
30  export const TOOL_USE_ID_TAG = 'tool-use-id'
31  export const TASK_TYPE_TAG = 'task-type'
32  export const OUTPUT_FILE_TAG = 'output-file'
33  export const STATUS_TAG = 'status'
34  export const SUMMARY_TAG = 'summary'
35  export const REASON_TAG = 'reason'
36  export const WORKTREE_TAG = 'worktree'
37  export const WORKTREE_PATH_TAG = 'worktreePath'
38  export const WORKTREE_BRANCH_TAG = 'worktreeBranch'
39  
40  // XML tag names for ultraplan mode (remote parallel planning sessions)
41  export const ULTRAPLAN_TAG = 'ultraplan'
42  
43  // XML tag name for remote /review results (teleported review session output).
44  // Remote session wraps its final review in this tag; local poller extracts it.
45  export const REMOTE_REVIEW_TAG = 'remote-review'
46  
47  // run_hunt.sh's heartbeat echoes the orchestrator's progress.json inside this
48  // tag every ~10s. Local poller parses the latest for the task-status line.
49  export const REMOTE_REVIEW_PROGRESS_TAG = 'remote-review-progress'
50  
51  // XML tag name for teammate messages (swarm inter-agent communication)
52  export const TEAMMATE_MESSAGE_TAG = 'teammate-message'
53  
54  // XML tag name for external channel messages
55  export const CHANNEL_MESSAGE_TAG = 'channel-message'
56  export const CHANNEL_TAG = 'channel'
57  
58  // XML tag name for cross-session UDS messages (another Claude session's inbox)
59  export const CROSS_SESSION_MESSAGE_TAG = 'cross-session-message'
60  
61  // XML tag wrapping the rules/format boilerplate in a fork child's first message.
62  // Lets the transcript renderer collapse the boilerplate and show only the directive.
63  export const FORK_BOILERPLATE_TAG = 'fork-boilerplate'
64  // Prefix before the directive text, stripped by the renderer. Keep in sync
65  // across buildChildMessage (generates) and UserForkBoilerplateMessage (parses).
66  export const FORK_DIRECTIVE_PREFIX = 'Your directive: '
67  
68  // Common argument patterns for slash commands that request help
69  export const COMMON_HELP_ARGS = ['help', '-h', '--help']
70  
71  // Common argument patterns for slash commands that request current state/info
72  export const COMMON_INFO_ARGS = [
73    'list',
74    'show',
75    'display',
76    'current',
77    'view',
78    'get',
79    'check',
80    'describe',
81    'print',
82    'version',
83    'about',
84    'status',
85    '?',
86  ]