@cleocode/contracts 2026.5.104 → 2026.5.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/boundary.js +5 -5
  2. package/dist/boundary.js.map +1 -1
  3. package/dist/errors.d.ts +61 -0
  4. package/dist/errors.d.ts.map +1 -1
  5. package/dist/errors.js +46 -0
  6. package/dist/errors.js.map +1 -1
  7. package/dist/exit-codes.d.ts +13 -0
  8. package/dist/exit-codes.d.ts.map +1 -1
  9. package/dist/exit-codes.js +13 -0
  10. package/dist/exit-codes.js.map +1 -1
  11. package/dist/index.d.ts +5 -3
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +5 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/release/ship-e2e-smoke.d.ts +97 -0
  16. package/dist/release/ship-e2e-smoke.d.ts.map +1 -0
  17. package/dist/release/ship-e2e-smoke.js +20 -0
  18. package/dist/release/ship-e2e-smoke.js.map +1 -0
  19. package/dist/render/__tests__/envelope.test.d.ts +14 -0
  20. package/dist/render/__tests__/envelope.test.d.ts.map +1 -0
  21. package/dist/render/__tests__/envelope.test.js +178 -0
  22. package/dist/render/__tests__/envelope.test.js.map +1 -0
  23. package/dist/render/__tests__/icon.test.d.ts +2 -0
  24. package/dist/render/__tests__/icon.test.d.ts.map +1 -0
  25. package/dist/render/__tests__/icon.test.js +124 -0
  26. package/dist/render/__tests__/icon.test.js.map +1 -0
  27. package/dist/render/envelope.d.ts +103 -0
  28. package/dist/render/envelope.d.ts.map +1 -0
  29. package/dist/render/envelope.js +53 -0
  30. package/dist/render/envelope.js.map +1 -0
  31. package/dist/render/icon.d.ts +120 -0
  32. package/dist/render/icon.d.ts.map +1 -0
  33. package/dist/render/icon.js +163 -0
  34. package/dist/render/icon.js.map +1 -0
  35. package/dist/render/index.d.ts +16 -0
  36. package/dist/render/index.d.ts.map +1 -0
  37. package/dist/render/index.js +12 -0
  38. package/dist/render/index.js.map +1 -0
  39. package/dist/render/list.d.ts +77 -0
  40. package/dist/render/list.d.ts.map +1 -0
  41. package/dist/render/list.js +39 -0
  42. package/dist/render/list.js.map +1 -0
  43. package/dist/render/table.d.ts +73 -0
  44. package/dist/render/table.d.ts.map +1 -0
  45. package/dist/render/table.js +32 -0
  46. package/dist/render/table.js.map +1 -0
  47. package/dist/render/tree.d.ts +94 -0
  48. package/dist/render/tree.d.ts.map +1 -0
  49. package/dist/render/tree.js +30 -0
  50. package/dist/render/tree.js.map +1 -0
  51. package/package.json +2 -2
  52. package/src/boundary.ts +5 -5
  53. package/src/errors.ts +71 -0
  54. package/src/exit-codes.ts +13 -0
  55. package/src/index.ts +15 -1
  56. package/src/release/ship-e2e-smoke.ts +113 -0
  57. package/src/render/__tests__/envelope.test.ts +194 -0
  58. package/src/render/__tests__/icon.test.ts +138 -0
  59. package/src/render/envelope.ts +112 -0
  60. package/src/render/icon.ts +182 -0
  61. package/src/render/index.ts +40 -0
  62. package/src/render/list.ts +90 -0
  63. package/src/render/table.ts +85 -0
  64. package/src/render/tree.ts +114 -0
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Typed icon enums for the human-render contract (ADR-077).
3
+ *
4
+ * Single source of truth for the visual language used across all renderers
5
+ * (tree, table, list, badge). Each enum is emoji-first; `ascii()` returns the
6
+ * NO_COLOR-safe fallback for non-UTF-8 terminals or `NO_COLOR=1` environments.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ /**
11
+ * Status icons — agent-task lifecycle states.
12
+ *
13
+ * Emoji-first; `ascii()` returns a NO_COLOR-safe fallback.
14
+ */
15
+ export declare enum StatusIcon {
16
+ /** Task is queued and has not started. */
17
+ PENDING = "\u23F3",
18
+ /** Task is in progress. */
19
+ ACTIVE = "\uD83D\uDEA7",
20
+ /** Task completed successfully. */
21
+ DONE = "\u2705",
22
+ /** Task is blocked on a dependency or gate. */
23
+ BLOCKED = "\uD83D\uDEAA",
24
+ /** Task is archived and no longer actively tracked. */
25
+ ARCHIVED = "\uD83D\uDDC4",
26
+ /** Task was cancelled before completion. */
27
+ CANCELLED = "\u2717"
28
+ }
29
+ /**
30
+ * Task-kind icons — Saga / Epic / Task / Subtask plus ancillary kinds.
31
+ */
32
+ export declare enum KindIcon {
33
+ /** Saga — multi-release theme grouping ≥ 2 Epics. */
34
+ SAGA = "\uD83C\uDF32",
35
+ /** Epic — one releasable slice. */
36
+ EPIC = "\uD83D\uDCCB",
37
+ /** Task — one atomic PR-sized change. */
38
+ TASK = "\u2022",
39
+ /** Subtask — one commit contributing to a Task's PR. */
40
+ SUBTASK = "\u25E6",
41
+ /** Research task — investigation or audit. */
42
+ RESEARCH = "\uD83D\uDCD6",
43
+ /** Bug task — defect tracking. */
44
+ BUG = "\uD83D\uDC1B",
45
+ /** Release task — shipping work. */
46
+ RELEASE = "\uD83D\uDE80"
47
+ }
48
+ /**
49
+ * Badge icons — flags attached to tasks (empty, orphan, nested, etc).
50
+ */
51
+ export declare enum BadgeIcon {
52
+ /** Container has no children. */
53
+ EMPTY = "\uD83E\uDEA6",
54
+ /**
55
+ * Task has no parent and is unreachable from a Saga or Epic.
56
+ *
57
+ * NOTE: ADR-077 §2 originally specified `'🚪'`, identical to `StatusIcon.BLOCKED`.
58
+ * TypeScript string enums share a single runtime string so `ascii()` cannot
59
+ * disambiguate. Resolved by switching to `'👻'` (abandoned/lonely semantics).
60
+ * A follow-up ADR amendment lands in T10137 (B12).
61
+ */
62
+ ORPHAN = "\uD83D\uDC7B",
63
+ /** Task is nested deeper than the depth budget allows. */
64
+ NESTED = "\uD83D\uDD01",
65
+ /** Caution — something needs human attention. */
66
+ CAUTION = "\u26A0",
67
+ /** Recently added — surfaced for visibility. */
68
+ NEW = "\u2605"
69
+ }
70
+ /**
71
+ * Relation icons — edge semantics in tree views.
72
+ */
73
+ export declare enum RelationIcon {
74
+ /** Saga groups Epic via `task_relations.relation_type='groups'`. */
75
+ GROUPS = "\u2282",
76
+ /** Parent edge — direct hierarchical parent. */
77
+ PARENT = "\u2934",
78
+ /** Depends-on edge — A cannot start until B is done. */
79
+ DEPENDS = "\u21E8",
80
+ /** Blocks edge — A actively blocks B from progressing. */
81
+ BLOCKS = "\u2298"
82
+ }
83
+ /**
84
+ * Union of every icon enum — useful as the parameter type for helpers that
85
+ * accept any icon without caring which category it came from.
86
+ */
87
+ export type AnyIcon = StatusIcon | KindIcon | BadgeIcon | RelationIcon;
88
+ /**
89
+ * Maps an emoji icon to its NO_COLOR-safe ASCII equivalent.
90
+ *
91
+ * Used when stdout is not a UTF-8 TTY or `NO_COLOR=1` is set. Every enum
92
+ * member has an explicit ASCII fallback — the exhaustive switch ensures the
93
+ * TypeScript compiler flags any future icon added without an ASCII mapping.
94
+ *
95
+ * @param icon - Any icon from `StatusIcon`, `KindIcon`, `BadgeIcon`, or `RelationIcon`.
96
+ * @returns The ASCII-only string to render in NO_COLOR contexts.
97
+ */
98
+ export declare function ascii(icon: AnyIcon): string;
99
+ /**
100
+ * Options for {@link pickIcon}.
101
+ */
102
+ export interface PickIconOptions {
103
+ /**
104
+ * Force ASCII fallback. When omitted, falls back to `NO_COLOR=1` or
105
+ * `TERM=dumb` in `process.env`.
106
+ */
107
+ noColor?: boolean;
108
+ }
109
+ /**
110
+ * Returns the icon to render given the current environment.
111
+ *
112
+ * Honors `NO_COLOR=1` and `TERM=dumb` for ASCII fallback when `opts.noColor`
113
+ * is not provided explicitly.
114
+ *
115
+ * @param icon - The icon to render.
116
+ * @param opts - Optional override for NO_COLOR detection.
117
+ * @returns The emoji icon, or its ASCII equivalent if NO_COLOR mode is active.
118
+ */
119
+ export declare function pickIcon<I extends AnyIcon>(icon: I, opts?: PickIconOptions): string;
120
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/render/icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,oBAAY,UAAU;IACpB,0CAA0C;IAC1C,OAAO,WAAM;IACb,2BAA2B;IAC3B,MAAM,iBAAO;IACb,mCAAmC;IACnC,IAAI,WAAM;IACV,+CAA+C;IAC/C,OAAO,iBAAO;IACd,uDAAuD;IACvD,QAAQ,iBAAO;IACf,4CAA4C;IAC5C,SAAS,WAAM;CAChB;AAED;;GAEG;AACH,oBAAY,QAAQ;IAClB,qDAAqD;IACrD,IAAI,iBAAO;IACX,mCAAmC;IACnC,IAAI,iBAAO;IACX,yCAAyC;IACzC,IAAI,WAAM;IACV,wDAAwD;IACxD,OAAO,WAAM;IACb,8CAA8C;IAC9C,QAAQ,iBAAO;IACf,kCAAkC;IAClC,GAAG,iBAAO;IACV,oCAAoC;IACpC,OAAO,iBAAO;CACf;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,iCAAiC;IACjC,KAAK,iBAAO;IACZ;;;;;;;OAOG;IACH,MAAM,iBAAO;IACb,0DAA0D;IAC1D,MAAM,iBAAO;IACb,iDAAiD;IACjD,OAAO,WAAM;IACb,gDAAgD;IAChD,GAAG,WAAM;CACV;AAED;;GAEG;AACH,oBAAY,YAAY;IACtB,oEAAoE;IACpE,MAAM,WAAM;IACZ,gDAAgD;IAChD,MAAM,WAAM;IACZ,wDAAwD;IACxD,OAAO,WAAM;IACb,0DAA0D;IAC1D,MAAM,WAAM;CACb;AAED;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;AAEvE;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAmD3C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,MAAM,CAInF"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Typed icon enums for the human-render contract (ADR-077).
3
+ *
4
+ * Single source of truth for the visual language used across all renderers
5
+ * (tree, table, list, badge). Each enum is emoji-first; `ascii()` returns the
6
+ * NO_COLOR-safe fallback for non-UTF-8 terminals or `NO_COLOR=1` environments.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ /**
11
+ * Status icons — agent-task lifecycle states.
12
+ *
13
+ * Emoji-first; `ascii()` returns a NO_COLOR-safe fallback.
14
+ */
15
+ export var StatusIcon;
16
+ (function (StatusIcon) {
17
+ /** Task is queued and has not started. */
18
+ StatusIcon["PENDING"] = "\u23F3";
19
+ /** Task is in progress. */
20
+ StatusIcon["ACTIVE"] = "\uD83D\uDEA7";
21
+ /** Task completed successfully. */
22
+ StatusIcon["DONE"] = "\u2705";
23
+ /** Task is blocked on a dependency or gate. */
24
+ StatusIcon["BLOCKED"] = "\uD83D\uDEAA";
25
+ /** Task is archived and no longer actively tracked. */
26
+ StatusIcon["ARCHIVED"] = "\uD83D\uDDC4";
27
+ /** Task was cancelled before completion. */
28
+ StatusIcon["CANCELLED"] = "\u2717";
29
+ })(StatusIcon || (StatusIcon = {}));
30
+ /**
31
+ * Task-kind icons — Saga / Epic / Task / Subtask plus ancillary kinds.
32
+ */
33
+ export var KindIcon;
34
+ (function (KindIcon) {
35
+ /** Saga — multi-release theme grouping ≥ 2 Epics. */
36
+ KindIcon["SAGA"] = "\uD83C\uDF32";
37
+ /** Epic — one releasable slice. */
38
+ KindIcon["EPIC"] = "\uD83D\uDCCB";
39
+ /** Task — one atomic PR-sized change. */
40
+ KindIcon["TASK"] = "\u2022";
41
+ /** Subtask — one commit contributing to a Task's PR. */
42
+ KindIcon["SUBTASK"] = "\u25E6";
43
+ /** Research task — investigation or audit. */
44
+ KindIcon["RESEARCH"] = "\uD83D\uDCD6";
45
+ /** Bug task — defect tracking. */
46
+ KindIcon["BUG"] = "\uD83D\uDC1B";
47
+ /** Release task — shipping work. */
48
+ KindIcon["RELEASE"] = "\uD83D\uDE80";
49
+ })(KindIcon || (KindIcon = {}));
50
+ /**
51
+ * Badge icons — flags attached to tasks (empty, orphan, nested, etc).
52
+ */
53
+ export var BadgeIcon;
54
+ (function (BadgeIcon) {
55
+ /** Container has no children. */
56
+ BadgeIcon["EMPTY"] = "\uD83E\uDEA6";
57
+ /**
58
+ * Task has no parent and is unreachable from a Saga or Epic.
59
+ *
60
+ * NOTE: ADR-077 §2 originally specified `'🚪'`, identical to `StatusIcon.BLOCKED`.
61
+ * TypeScript string enums share a single runtime string so `ascii()` cannot
62
+ * disambiguate. Resolved by switching to `'👻'` (abandoned/lonely semantics).
63
+ * A follow-up ADR amendment lands in T10137 (B12).
64
+ */
65
+ BadgeIcon["ORPHAN"] = "\uD83D\uDC7B";
66
+ /** Task is nested deeper than the depth budget allows. */
67
+ BadgeIcon["NESTED"] = "\uD83D\uDD01";
68
+ /** Caution — something needs human attention. */
69
+ BadgeIcon["CAUTION"] = "\u26A0";
70
+ /** Recently added — surfaced for visibility. */
71
+ BadgeIcon["NEW"] = "\u2605";
72
+ })(BadgeIcon || (BadgeIcon = {}));
73
+ /**
74
+ * Relation icons — edge semantics in tree views.
75
+ */
76
+ export var RelationIcon;
77
+ (function (RelationIcon) {
78
+ /** Saga groups Epic via `task_relations.relation_type='groups'`. */
79
+ RelationIcon["GROUPS"] = "\u2282";
80
+ /** Parent edge — direct hierarchical parent. */
81
+ RelationIcon["PARENT"] = "\u2934";
82
+ /** Depends-on edge — A cannot start until B is done. */
83
+ RelationIcon["DEPENDS"] = "\u21E8";
84
+ /** Blocks edge — A actively blocks B from progressing. */
85
+ RelationIcon["BLOCKS"] = "\u2298";
86
+ })(RelationIcon || (RelationIcon = {}));
87
+ /**
88
+ * Maps an emoji icon to its NO_COLOR-safe ASCII equivalent.
89
+ *
90
+ * Used when stdout is not a UTF-8 TTY or `NO_COLOR=1` is set. Every enum
91
+ * member has an explicit ASCII fallback — the exhaustive switch ensures the
92
+ * TypeScript compiler flags any future icon added without an ASCII mapping.
93
+ *
94
+ * @param icon - Any icon from `StatusIcon`, `KindIcon`, `BadgeIcon`, or `RelationIcon`.
95
+ * @returns The ASCII-only string to render in NO_COLOR contexts.
96
+ */
97
+ export function ascii(icon) {
98
+ switch (icon) {
99
+ // Status
100
+ case StatusIcon.PENDING:
101
+ return '[ ]';
102
+ case StatusIcon.ACTIVE:
103
+ return '[~]';
104
+ case StatusIcon.DONE:
105
+ return '[x]';
106
+ case StatusIcon.BLOCKED:
107
+ return '[!]';
108
+ case StatusIcon.ARCHIVED:
109
+ return '[#]';
110
+ case StatusIcon.CANCELLED:
111
+ return '[-]';
112
+ // Kind
113
+ case KindIcon.SAGA:
114
+ return 'SG';
115
+ case KindIcon.EPIC:
116
+ return 'E';
117
+ case KindIcon.TASK:
118
+ return '-';
119
+ case KindIcon.SUBTASK:
120
+ return '.';
121
+ case KindIcon.RESEARCH:
122
+ return 'R';
123
+ case KindIcon.BUG:
124
+ return 'B';
125
+ case KindIcon.RELEASE:
126
+ return '>';
127
+ // Badge
128
+ case BadgeIcon.EMPTY:
129
+ return '(empty)';
130
+ case BadgeIcon.ORPHAN:
131
+ return '(orphan)';
132
+ case BadgeIcon.NESTED:
133
+ return '(nested)';
134
+ case BadgeIcon.CAUTION:
135
+ return '(!)';
136
+ case BadgeIcon.NEW:
137
+ return '(new)';
138
+ // Relation
139
+ case RelationIcon.GROUPS:
140
+ return 'in';
141
+ case RelationIcon.PARENT:
142
+ return '^';
143
+ case RelationIcon.DEPENDS:
144
+ return '->';
145
+ case RelationIcon.BLOCKS:
146
+ return '!>';
147
+ }
148
+ }
149
+ /**
150
+ * Returns the icon to render given the current environment.
151
+ *
152
+ * Honors `NO_COLOR=1` and `TERM=dumb` for ASCII fallback when `opts.noColor`
153
+ * is not provided explicitly.
154
+ *
155
+ * @param icon - The icon to render.
156
+ * @param opts - Optional override for NO_COLOR detection.
157
+ * @returns The emoji icon, or its ASCII equivalent if NO_COLOR mode is active.
158
+ */
159
+ export function pickIcon(icon, opts) {
160
+ const noColor = opts?.noColor ?? (process.env['NO_COLOR'] === '1' || process.env['TERM'] === 'dumb');
161
+ return noColor ? ascii(icon) : icon;
162
+ }
163
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/render/icon.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Barrel for the typed render contracts (Epic T10114, ADR-077).
3
+ *
4
+ * Icon enums are intentionally omitted — they ship with T10127 (B2).
5
+ *
6
+ * @epic T10114
7
+ */
8
+ export type { RenderableEnvelope, SectionResponse } from './envelope.js';
9
+ export { isGenericEnvelope, isGroupedListEnvelope, isListEnvelope, isSectionEnvelope, isSingleEnvelope, isTableEnvelope, isTreeEnvelope, } from './envelope.js';
10
+ export type { GroupedListResponse, ListGroup, ListItemStyle, ListResponse, } from './list.js';
11
+ export { isGroupedListResponse, isListResponse } from './list.js';
12
+ export type { ColumnAlign, TableColumn, TableResponse, TableSchema, } from './table.js';
13
+ export { isTableResponse } from './table.js';
14
+ export type { FlatTreeNode, RenderTreeOptions, TreeNodeKind, TreeNodeStatus, TreeResponse, } from './tree.js';
15
+ export { isTreeResponse } from './tree.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/render/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,mBAAmB,EACnB,SAAS,EACT,aAAa,EACb,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAClE,YAAY,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Barrel for the typed render contracts (Epic T10114, ADR-077).
3
+ *
4
+ * Icon enums are intentionally omitted — they ship with T10127 (B2).
5
+ *
6
+ * @epic T10114
7
+ */
8
+ export { isGenericEnvelope, isGroupedListEnvelope, isListEnvelope, isSectionEnvelope, isSingleEnvelope, isTableEnvelope, isTreeEnvelope, } from './envelope.js';
9
+ export { isGroupedListResponse, isListResponse } from './list.js';
10
+ export { isTableResponse } from './table.js';
11
+ export { isTreeResponse } from './tree.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/render/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAOlE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAQ7C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Typed render contracts — list (flat) and grouped-list.
3
+ *
4
+ * Part of the Human Render Contract (Epic T10114, ADR-077). The list shape is
5
+ * the canonical wire format for ordered or grouped sequential output —
6
+ * presenters render each item according to `renderItem` (or a default).
7
+ *
8
+ * @epic T10114
9
+ * @task T10140
10
+ */
11
+ /**
12
+ * Per-item rendering style hint for list responses.
13
+ *
14
+ * - `'text'` — render the item as a plain string (default presenter behaviour).
15
+ * - `'badge'` — render with status / category styling.
16
+ * - `'kv'` — render as a key/value pair block.
17
+ */
18
+ export type ListItemStyle = 'text' | 'badge' | 'kv';
19
+ /**
20
+ * Flat list response — items rendered in `items` order.
21
+ *
22
+ * @typeParam T — caller-defined item payload shape.
23
+ */
24
+ export interface ListResponse<T> {
25
+ /** Item payloads in render order. */
26
+ readonly items: ReadonlyArray<T>;
27
+ /**
28
+ * Total item count. May exceed `items.length` when the response is paginated
29
+ * or truncated.
30
+ */
31
+ readonly total: number;
32
+ /** Optional per-item rendering style hint. */
33
+ readonly renderItem?: ListItemStyle;
34
+ }
35
+ /**
36
+ * One labelled bucket inside a grouped list response.
37
+ *
38
+ * @typeParam T — caller-defined item payload shape.
39
+ */
40
+ export interface ListGroup<T> {
41
+ /** Stable group identifier — used for diff / equality, not display. */
42
+ readonly key: string;
43
+ /** Human-readable group label rendered above its items. */
44
+ readonly label: string;
45
+ /** Item payloads inside this group, in render order. */
46
+ readonly items: ReadonlyArray<T>;
47
+ }
48
+ /**
49
+ * Grouped list response — items split across labelled buckets.
50
+ *
51
+ * @typeParam T — caller-defined item payload shape.
52
+ */
53
+ export interface GroupedListResponse<T> {
54
+ /** Ordered list of labelled groups. */
55
+ readonly groups: ReadonlyArray<ListGroup<T>>;
56
+ /** Total item count across all groups. */
57
+ readonly total: number;
58
+ }
59
+ /**
60
+ * Runtime type guard for `ListResponse<T>`.
61
+ *
62
+ * Checks the envelope shape only — does not inspect item payloads against `T`.
63
+ *
64
+ * @param value — candidate value to inspect.
65
+ * @returns `true` iff `value` matches the `ListResponse<T>` envelope shape.
66
+ */
67
+ export declare function isListResponse<T>(value: unknown): value is ListResponse<T>;
68
+ /**
69
+ * Runtime type guard for `GroupedListResponse<T>`.
70
+ *
71
+ * Checks the envelope shape only — does not inspect item payloads against `T`.
72
+ *
73
+ * @param value — candidate value to inspect.
74
+ * @returns `true` iff `value` matches the `GroupedListResponse<T>` envelope shape.
75
+ */
76
+ export declare function isGroupedListResponse<T>(value: unknown): value is GroupedListResponse<T>;
77
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/render/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;CACrC;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAAC,CAAC,CAAC,CAI1E;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAIxF"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Typed render contracts — list (flat) and grouped-list.
3
+ *
4
+ * Part of the Human Render Contract (Epic T10114, ADR-077). The list shape is
5
+ * the canonical wire format for ordered or grouped sequential output —
6
+ * presenters render each item according to `renderItem` (or a default).
7
+ *
8
+ * @epic T10114
9
+ * @task T10140
10
+ */
11
+ /**
12
+ * Runtime type guard for `ListResponse<T>`.
13
+ *
14
+ * Checks the envelope shape only — does not inspect item payloads against `T`.
15
+ *
16
+ * @param value — candidate value to inspect.
17
+ * @returns `true` iff `value` matches the `ListResponse<T>` envelope shape.
18
+ */
19
+ export function isListResponse(value) {
20
+ if (typeof value !== 'object' || value === null)
21
+ return false;
22
+ const v = value;
23
+ return Array.isArray(v.items) && typeof v.total === 'number';
24
+ }
25
+ /**
26
+ * Runtime type guard for `GroupedListResponse<T>`.
27
+ *
28
+ * Checks the envelope shape only — does not inspect item payloads against `T`.
29
+ *
30
+ * @param value — candidate value to inspect.
31
+ * @returns `true` iff `value` matches the `GroupedListResponse<T>` envelope shape.
32
+ */
33
+ export function isGroupedListResponse(value) {
34
+ if (typeof value !== 'object' || value === null)
35
+ return false;
36
+ const v = value;
37
+ return Array.isArray(v.groups) && typeof v.total === 'number';
38
+ }
39
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/render/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAsDH;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAI,KAAc;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC;AAC/D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAI,KAAc;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC;AAChE,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Typed render contracts — table (column-schema-driven rows).
3
+ *
4
+ * Part of the Human Render Contract (Epic T10114, ADR-077). The table shape is
5
+ * the canonical wire format for tabular CLI output — presenters consume the
6
+ * schema to compute widths, headers, and per-cell formatting.
7
+ *
8
+ * @epic T10114
9
+ * @task T10139
10
+ */
11
+ /**
12
+ * Horizontal alignment hint for a column.
13
+ */
14
+ export type ColumnAlign = 'left' | 'right' | 'center';
15
+ /**
16
+ * Schema entry for a single table column.
17
+ *
18
+ * `key` MUST be a string-typed property on the row payload `T`. Presenters
19
+ * are expected to extract `row[column.key]` and pipe it through `format` when
20
+ * one is supplied.
21
+ *
22
+ * @typeParam T — caller-defined row payload shape.
23
+ */
24
+ export interface TableColumn<T> {
25
+ /** Property key on the row payload. */
26
+ readonly key: keyof T & string;
27
+ /** Display header rendered above the column. */
28
+ readonly header: string;
29
+ /** Optional alignment hint. Defaults to `'left'`. */
30
+ readonly align?: ColumnAlign;
31
+ /** Optional fixed width (character count) hint. */
32
+ readonly width?: number;
33
+ /**
34
+ * Optional per-cell formatter. Receives the raw value at `row[key]` and
35
+ * returns the display string. When absent, presenters call `String(value)`.
36
+ */
37
+ readonly format?: (value: unknown) => string;
38
+ }
39
+ /**
40
+ * Column-schema metadata that accompanies every table response.
41
+ *
42
+ * @typeParam T — caller-defined row payload shape.
43
+ */
44
+ export interface TableSchema<T> {
45
+ /** Ordered list of column descriptors. Rendering order matches this order. */
46
+ readonly columns: ReadonlyArray<TableColumn<T>>;
47
+ }
48
+ /**
49
+ * Top-level envelope returned by a table-shaped renderer.
50
+ *
51
+ * @typeParam T — caller-defined row payload shape.
52
+ */
53
+ export interface TableResponse<T> {
54
+ /** Row payloads in the order they should be rendered. */
55
+ readonly rows: ReadonlyArray<T>;
56
+ /** Column schema — drives presenter formatting. */
57
+ readonly schema: TableSchema<T>;
58
+ /**
59
+ * Total row count. May exceed `rows.length` when the response is paginated
60
+ * or truncated; presenters use this to render "showing N of M" hints.
61
+ */
62
+ readonly total: number;
63
+ }
64
+ /**
65
+ * Runtime type guard for `TableResponse<T>`.
66
+ *
67
+ * Checks the envelope shape only — does not inspect row payloads against `T`.
68
+ *
69
+ * @param value — candidate value to inspect.
70
+ * @returns `true` iff `value` matches the `TableResponse<T>` envelope shape.
71
+ */
72
+ export declare function isTableResponse<T>(value: unknown): value is TableResponse<T>;
73
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/render/table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IAC/B,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAC7B,mDAAmD;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;CACjD;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAChC,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAAC,CAAC,CAAC,CAQ5E"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Typed render contracts — table (column-schema-driven rows).
3
+ *
4
+ * Part of the Human Render Contract (Epic T10114, ADR-077). The table shape is
5
+ * the canonical wire format for tabular CLI output — presenters consume the
6
+ * schema to compute widths, headers, and per-cell formatting.
7
+ *
8
+ * @epic T10114
9
+ * @task T10139
10
+ */
11
+ /**
12
+ * Runtime type guard for `TableResponse<T>`.
13
+ *
14
+ * Checks the envelope shape only — does not inspect row payloads against `T`.
15
+ *
16
+ * @param value — candidate value to inspect.
17
+ * @returns `true` iff `value` matches the `TableResponse<T>` envelope shape.
18
+ */
19
+ export function isTableResponse(value) {
20
+ if (typeof value !== 'object' || value === null)
21
+ return false;
22
+ const v = value;
23
+ if (!Array.isArray(v.rows))
24
+ return false;
25
+ if (typeof v.total !== 'number')
26
+ return false;
27
+ const schema = v.schema;
28
+ if (typeof schema !== 'object' || schema === null)
29
+ return false;
30
+ return Array.isArray(schema.columns);
31
+ }
32
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/render/table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA2DH;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAI,KAAc;IAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACzC,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC9C,MAAM,MAAM,GAAG,CAAC,CAAC,MAA6C,CAAC;IAC/D,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAChE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Typed render contracts — tree (flattened hierarchy).
3
+ *
4
+ * Part of the Human Render Contract (Epic T10114, ADR-077). The flat-tree shape
5
+ * is the canonical wire format for hierarchical task / saga / epic listings —
6
+ * presenters re-materialise the parent/child structure from `parentId` + `depth`.
7
+ *
8
+ * @epic T10114
9
+ * @task T10138
10
+ */
11
+ /**
12
+ * Discriminator for a node's place in the task hierarchy.
13
+ *
14
+ * Matches the CLEO 4-tier task model (Saga → Epic → Task → Subtask).
15
+ */
16
+ export type TreeNodeKind = 'saga' | 'epic' | 'task' | 'subtask';
17
+ /**
18
+ * Lifecycle status of a tree node.
19
+ *
20
+ * Mirrors the canonical task status union used across CLEO.
21
+ */
22
+ export type TreeNodeStatus = 'pending' | 'in_progress' | 'done' | 'blocked' | 'cancelled' | 'archived';
23
+ /**
24
+ * One row in a flattened tree response.
25
+ *
26
+ * `parentId === null` identifies the root. `depth` is the integer distance
27
+ * from the root (root is `0`). `metadata` is the caller-defined payload —
28
+ * presenters MUST NOT assume any specific shape beyond `T`.
29
+ *
30
+ * @typeParam T — caller-defined metadata payload attached to the node.
31
+ */
32
+ export interface FlatTreeNode<T> {
33
+ /** Stable, unique identifier (typically a CLEO task ID such as `T1234`). */
34
+ readonly id: string;
35
+ /** Parent identifier, or `null` if this row is the root. */
36
+ readonly parentId: string | null;
37
+ /** Integer distance from the root (root = `0`). */
38
+ readonly depth: number;
39
+ /** Discriminator slot in the CLEO 4-tier model. */
40
+ readonly kind: TreeNodeKind;
41
+ /** Lifecycle status. */
42
+ readonly status: TreeNodeStatus;
43
+ /** Display title — short enough to render on a single line. */
44
+ readonly title: string;
45
+ /** Caller-defined metadata payload. */
46
+ readonly metadata: T;
47
+ }
48
+ /**
49
+ * Top-level envelope returned by a tree-shaped renderer.
50
+ *
51
+ * @typeParam T — caller-defined metadata payload attached to each node.
52
+ */
53
+ export interface TreeResponse<T> {
54
+ /** Flattened list of nodes in pre-order traversal. */
55
+ readonly tree: ReadonlyArray<FlatTreeNode<T>>;
56
+ /** Identifier of the root node — must match a node in `tree` with `parentId === null`. */
57
+ readonly root: string;
58
+ /** Total number of nodes — equal to `tree.length`. */
59
+ readonly totalNodes: number;
60
+ /** Maximum `depth` seen across `tree`. `0` for a single-node tree. */
61
+ readonly maxDepth: number;
62
+ }
63
+ /**
64
+ * Caller-supplied options that shape a tree response.
65
+ *
66
+ * All fields are optional. Presenters interpret unset fields as "no constraint"
67
+ * (e.g. unset `depth` means render the full tree).
68
+ */
69
+ export interface RenderTreeOptions {
70
+ /** Cap the maximum depth rendered. */
71
+ readonly depth?: number;
72
+ /** Restrict the rendered node kinds. */
73
+ readonly kinds?: ReadonlyArray<TreeNodeKind>;
74
+ /** When `true`, presenters may emit unicode icons next to each row. */
75
+ readonly icons?: boolean;
76
+ /** When set, collapse subtrees beyond this child-count threshold. */
77
+ readonly foldAt?: number;
78
+ /** When `true`, presenters MAY annotate inter-task dependencies. */
79
+ readonly withDeps?: boolean;
80
+ /** When `true`, presenters MAY annotate blocker relationships. */
81
+ readonly withBlockers?: boolean;
82
+ }
83
+ /**
84
+ * Runtime type guard for `TreeResponse<T>`.
85
+ *
86
+ * Verifies the envelope shape without inspecting node payloads — the generic
87
+ * `T` cannot be checked at runtime, so callers must layer per-node validation
88
+ * separately if they need stronger guarantees.
89
+ *
90
+ * @param value — candidate value to inspect.
91
+ * @returns `true` iff `value` matches the `TreeResponse<T>` envelope shape.
92
+ */
93
+ export declare function isTreeResponse<T>(value: unknown): value is TreeResponse<T>;
94
+ //# sourceMappingURL=tree.d.ts.map