mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
Add read-only orca linear CLI with trusted launch-prompt pointer (V1) (#5126)
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
+40
-2
@@ -17,6 +17,38 @@ export type CommandSpec = {
|
||||
}
|
||||
|
||||
export const GLOBAL_FLAGS = ['help', 'json', 'pairing-code', 'environment']
|
||||
export const BOOLEAN_FLAGS = new Set([
|
||||
'all',
|
||||
'attachments',
|
||||
'children',
|
||||
'comments',
|
||||
'current',
|
||||
'dry-run',
|
||||
'enter',
|
||||
'focus',
|
||||
'force',
|
||||
'full',
|
||||
'help',
|
||||
'inject',
|
||||
'interrupt',
|
||||
'json',
|
||||
'messages',
|
||||
'mobile',
|
||||
'mobile-pairing',
|
||||
'no-pairing',
|
||||
'ready',
|
||||
'relations',
|
||||
'restore-window',
|
||||
'return-preamble',
|
||||
'run-hooks',
|
||||
'show-profile',
|
||||
'staged',
|
||||
'tasks',
|
||||
'text-stdin',
|
||||
'unread',
|
||||
'value-stdin',
|
||||
'wait'
|
||||
])
|
||||
|
||||
export function parseArgs(argv: string[]): ParsedArgs {
|
||||
const commandPath: string[] = []
|
||||
@@ -40,6 +72,10 @@ export function parseArgs(argv: string[]): ParsedArgs {
|
||||
}
|
||||
|
||||
const flag = assignment
|
||||
if (BOOLEAN_FLAGS.has(flag)) {
|
||||
flags.set(flag, true)
|
||||
continue
|
||||
}
|
||||
const hasNext = i + 1 < argv.length
|
||||
const next = argv[i + 1]
|
||||
if (!hasNext || next.startsWith('--')) {
|
||||
@@ -85,7 +121,8 @@ export function supportsBrowserPageFlag(commandPath: string[]): boolean {
|
||||
'computer',
|
||||
'emulator',
|
||||
'note',
|
||||
'diagnostics'
|
||||
'diagnostics',
|
||||
'linear'
|
||||
].includes(commandPath[0])
|
||||
) {
|
||||
return false
|
||||
@@ -123,7 +160,8 @@ export function isCommandGroup(commandPath: string[]): boolean {
|
||||
'emulator',
|
||||
'agent',
|
||||
'environment',
|
||||
'diagnostics'
|
||||
'diagnostics',
|
||||
'linear'
|
||||
].includes(commandPath[0])) ||
|
||||
(commandPath.length === 2 && commandPath[0] === 'agent' && commandPath[1] === 'hooks') ||
|
||||
(commandPath.length === 2 &&
|
||||
|
||||
Reference in New Issue
Block a user