(action: string | undefined, args: string[])
| 64 | state: { type: 'string' }, // `kild ls --state live|orphan|reclaimable` |
| 65 | git: { type: 'boolean', default: false }, // `kild ls --git`: pay for git/cost state |
| 66 | since: { type: 'string' }, // `kild log --since <seq>`: only messages after that cursor |
| 67 | execute: { type: 'boolean', default: false }, // `kild land --execute`: merge for real |
| 68 | task: { type: 'string' }, // `kild spawn --task <text>`: the new agent's first message |
| 69 | session: { type: 'string' }, // `kild attach|inbox|send --session <id>`: the harness session |
| 70 | timeout: { type: 'string' }, // `kild watch --timeout <seconds>`: how long to wait |
| 71 | interval: { type: 'string' }, // `kild watch --interval <seconds>`: wake latency vs load |
| 72 | }, |
| 73 | }); |
| 74 | |
| 75 | const errText = (err: unknown): string => (err instanceof Error ? err.message : String(err)); |
| 76 | |
| 77 | const json = values.json ?? false; |
| 78 | const [group, action, ...rest] = positionals; |
| 79 | const ENGINE = process.env.KILD_ENGINE ?? 'http://localhost:4517'; |
| 80 | |
| 81 | try { |
| 82 | await dispatch(); |
| 83 | process.exit(0); |
| 84 | } catch (err) { |
| 85 | console.error(`\x1b[31merror:\x1b[0m ${err instanceof Error ? err.message : err}`); |
| 86 | process.exit(1); |
| 87 | } |
| 88 |
no test coverage detected