source dump of claude code
at main 86 lines 3.3 kB view raw
1// XML tag names used to mark skill/command metadata in messages 2export const COMMAND_NAME_TAG = 'command-name' 3export const COMMAND_MESSAGE_TAG = 'command-message' 4export 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 8export const BASH_INPUT_TAG = 'bash-input' 9export const BASH_STDOUT_TAG = 'bash-stdout' 10export const BASH_STDERR_TAG = 'bash-stderr' 11export const LOCAL_COMMAND_STDOUT_TAG = 'local-command-stdout' 12export const LOCAL_COMMAND_STDERR_TAG = 'local-command-stderr' 13export 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 16export 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 25export const TICK_TAG = 'tick' 26 27// XML tag names for task notifications (background task completions) 28export const TASK_NOTIFICATION_TAG = 'task-notification' 29export const TASK_ID_TAG = 'task-id' 30export const TOOL_USE_ID_TAG = 'tool-use-id' 31export const TASK_TYPE_TAG = 'task-type' 32export const OUTPUT_FILE_TAG = 'output-file' 33export const STATUS_TAG = 'status' 34export const SUMMARY_TAG = 'summary' 35export const REASON_TAG = 'reason' 36export const WORKTREE_TAG = 'worktree' 37export const WORKTREE_PATH_TAG = 'worktreePath' 38export const WORKTREE_BRANCH_TAG = 'worktreeBranch' 39 40// XML tag names for ultraplan mode (remote parallel planning sessions) 41export 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. 45export 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. 49export const REMOTE_REVIEW_PROGRESS_TAG = 'remote-review-progress' 50 51// XML tag name for teammate messages (swarm inter-agent communication) 52export const TEAMMATE_MESSAGE_TAG = 'teammate-message' 53 54// XML tag name for external channel messages 55export const CHANNEL_MESSAGE_TAG = 'channel-message' 56export const CHANNEL_TAG = 'channel' 57 58// XML tag name for cross-session UDS messages (another Claude session's inbox) 59export 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. 63export 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). 66export const FORK_DIRECTIVE_PREFIX = 'Your directive: ' 67 68// Common argument patterns for slash commands that request help 69export const COMMON_HELP_ARGS = ['help', '-h', '--help'] 70 71// Common argument patterns for slash commands that request current state/info 72export 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]