feat: carry archive UI label hard cut updates

This commit is contained in:
Mohamed Boudra
2026-03-04 10:39:28 +07:00
parent bf1cded8a1
commit 111b9d95f4
26 changed files with 408 additions and 175 deletions
-1
View File
@@ -83,7 +83,6 @@ export function createCli(): Command {
.option('--image <path>', 'Attach image(s) to the initial prompt (can be used multiple times)', collectMultiple, [])
.option('--cwd <path>', 'Working directory (default: current)')
.option('--label <key=value>', 'Add label(s) to the agent (can be used multiple times)', collectMultiple, [])
.option('--ui', 'Mark as UI agent (equivalent to --label ui=true)')
.option('--output-schema <schema>', 'Output JSON matching the provided schema file path or inline JSON schema')
.option('--json', 'Output in JSON format')
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
-1
View File
@@ -44,7 +44,6 @@ export function createAgentCommand(): Command {
.option('--mode <mode>', 'Provider-specific mode (e.g., plan, default, bypass)')
.option('--cwd <path>', 'Working directory (default: current)')
.option('--label <key=value>', 'Add label(s) to the agent (can be used multiple times)', collectMultiple, [])
.option('--ui', 'Mark as UI agent (equivalent to --label ui=true)')
.option('--output-schema <schema>', 'Output JSON matching the provided schema file path or inline JSON schema')
.option('--json', 'Output in JSON format')
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
+1 -8
View File
@@ -43,7 +43,6 @@ export interface AgentRunOptions extends CommandOptions {
image?: string[]
cwd?: string
label?: string[]
ui?: boolean
outputSchema?: string
}
@@ -265,9 +264,7 @@ export async function runRunCommand(
}
: undefined
// Build labels from --label and --ui flags
// --ui is syntactic sugar for --label ui=true
// If explicit --label ui=... is provided, it takes precedence over --ui
// Build labels from --label flags
const labels: Record<string, string> = {}
if (options.label) {
for (const labelStr of options.label) {
@@ -285,10 +282,6 @@ export async function runRunCommand(
labels[key] = value
}
}
// Add ui=true if --ui flag is set and ui label not already set
if (options.ui && !('ui' in labels)) {
labels['ui'] = 'true'
}
if (outputSchema) {
let structuredAgent: AgentSnapshotPayload | null = null