Skip to content

Commit dc455b0

Browse files
committed
sim-cli inventory: a union of variants gets a wider type cap
The 220-char cap cut the operations apply operation_type discriminator list mid-way on the mothership's card; unions now cap at 600. Claude-Session: https://claude.ai/code/session_01HFVhPDtRZuCgupPco633w8
1 parent 7aba2c2 commit dc455b0

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

packages/sim-cli/scripts/print-command-inventory.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,16 @@ function requestShape(
231231
}
232232

233233
const MAX_BODY_TYPE_CHARS = 220
234+
const MAX_UNION_TYPE_CHARS = 600
234235

235-
/** A recursive grammar (the row predicate) expands past what a card line can carry. */
236+
/**
237+
* A recursive grammar (the row predicate) expands past what a card line can carry. A
238+
* union of variants gets more room: cutting it mid-list hid the operation vocabulary of
239+
* `operations apply` and sent an agent guessing verbs (skills run, 2026-09-02).
240+
*/
236241
function capType(label: string): string {
237-
return label.length > MAX_BODY_TYPE_CHARS ? `${label.slice(0, MAX_BODY_TYPE_CHARS)}…` : label
242+
const max = label.includes('}|{') ? MAX_UNION_TYPE_CHARS : MAX_BODY_TYPE_CHARS
243+
return label.length > max ? `${label.slice(0, max)}…` : label
238244
}
239245

240246
const program = buildProgram()

0 commit comments

Comments
 (0)