@zenera/cli 1.1.19 → 1.1.20
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.
- package/README.md +6 -0
- package/dist/banner.d.ts +8 -0
- package/dist/banner.js +2 -0
- package/dist/commands/cache.js +1 -0
- package/dist/commands/check.js +34 -2
- package/dist/commands/index.js +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/meta.js +1 -1
- package/dist/commands/open.js +1 -1
- package/dist/main.js +8 -1
- package/dist/meta.js +19 -7
- package/dist/scaffold.d.ts +37 -0
- package/dist/scaffold.js +67 -3
- package/dist/term.d.ts +2 -0
- package/dist/term.js +25 -0
- package/dist/tui/app.js +237 -65
- package/dist/tui/theme.d.ts +10 -0
- package/dist/tui/theme.js +4 -0
- package/dist/tui/wrap.d.ts +100 -18
- package/dist/tui/wrap.js +500 -27
- package/dist/validate.js +115 -9
- package/package.json +2 -2
- package/templates/editor/.github/copilot-instructions.md +33 -8
- package/templates/editor/.github/skills/zen-cli/references/projects.md +19 -8
- package/templates/editor/.github/skills/zen-memory/SKILL.md +77 -33
- package/templates/editor/.github/skills/zen-memory/scripts/check-instructions.sh +2 -1
- package/templates/editor/.vscode/agents.schema.json +611 -0
- package/templates/editor/.vscode/extensions.json +3 -0
- package/templates/editor/.vscode/settings.json +8 -0
- package/templates/project/agents/fork-instructions.md +151 -0
- package/templates/project/agents/memory-instructions.md +120 -8
package/dist/tui/wrap.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ export declare const CHROME_ROWS = 7;
|
|
|
28
28
|
*/
|
|
29
29
|
export declare const THINKING_ROWS = 1;
|
|
30
30
|
/** How much of the frame the work in flight may take. A branch is a box now,
|
|
31
|
-
* not a row, so a fan-out of two costs
|
|
32
|
-
export declare const ACTIVITY_ROWS =
|
|
31
|
+
* not a row, so a fan-out of two costs twenty-two of these. */
|
|
32
|
+
export declare const ACTIVITY_ROWS = 24;
|
|
33
33
|
/** The width of the elapsed-time column every call row is drawn behind. */
|
|
34
34
|
export declare const TIME_COL = 5;
|
|
35
35
|
export interface Budget {
|
|
@@ -58,8 +58,18 @@ export interface Budget {
|
|
|
58
58
|
* reasoning, none otherwise — and it never takes the answer's last row.
|
|
59
59
|
*/
|
|
60
60
|
export declare function budgetOf(rows: number, activity: number, thinking: number): Budget;
|
|
61
|
-
/** The rows a branch box may spend on its own calls and
|
|
62
|
-
export declare const BRANCH_ROWS =
|
|
61
|
+
/** The rows a branch box may spend on its own calls, prose and reasoning. */
|
|
62
|
+
export declare const BRANCH_ROWS = 9;
|
|
63
|
+
/**
|
|
64
|
+
* The fewest a box is worth drawing at.
|
|
65
|
+
*
|
|
66
|
+
* One row per branch fit more of them on screen and said nothing about any of
|
|
67
|
+
* them: a box holding a single call is a label, and the reason it is a box at
|
|
68
|
+
* all is that what a branch just did and said is why it is doing this. Below
|
|
69
|
+
* six rows there is no *what it just did* — so a fork too wide to give every
|
|
70
|
+
* branch six is cut to the ones that fit and counted, which is `fitActivity`.
|
|
71
|
+
*/
|
|
72
|
+
export declare const BRANCH_MIN = 6;
|
|
63
73
|
/** Rows a branch box spends on chrome: the title rule and the closing one. */
|
|
64
74
|
export declare const BOX_CHROME = 2;
|
|
65
75
|
/**
|
|
@@ -67,18 +77,27 @@ export declare const BOX_CHROME = 2;
|
|
|
67
77
|
* activity region has to divide between them.
|
|
68
78
|
*
|
|
69
79
|
* Every branch gets the same number, because they are the same kind of thing
|
|
70
|
-
* and a fan-out is read across, not down.
|
|
71
|
-
* complete rather than on being detailed: eight branches showing one call each
|
|
72
|
-
* is a picture of the fork, eight rows of one branch is not.
|
|
80
|
+
* and a fan-out is read across, not down.
|
|
73
81
|
*/
|
|
74
82
|
export declare function branchRows(count: number, allowance: number): number;
|
|
75
83
|
/**
|
|
76
|
-
* How wide
|
|
77
|
-
*
|
|
84
|
+
* How wide *prose* is drawn. A line spanning a 200-column terminal is
|
|
85
|
+
* measurably harder to read than one that stops, which is why every demo in
|
|
78
86
|
* `examples/sdk/` puts its answer in a box of bounded width — the terminal is the
|
|
79
87
|
* page, not the paragraph.
|
|
88
|
+
*
|
|
89
|
+
* `boxWidth` is what a whole answer is drawn at; this is the floor it starts from.
|
|
80
90
|
*/
|
|
81
91
|
export declare function answerWidth(columns: number): number;
|
|
92
|
+
/**
|
|
93
|
+
* How wide the box holding `text` has to be.
|
|
94
|
+
*
|
|
95
|
+
* Prose stops at the comfort width, but a fence and a table cannot be
|
|
96
|
+
* reflowed — fold a table row and the columns stop lining up, which is the one
|
|
97
|
+
* thing the table was for — so the box grows to hold the widest of them, as far
|
|
98
|
+
* as the terminal allows and no further.
|
|
99
|
+
*/
|
|
100
|
+
export declare function boxWidth(text: string, columns: number): number;
|
|
82
101
|
/**
|
|
83
102
|
* A tool payload as a person would read it, rather than as it was serialised.
|
|
84
103
|
*
|
|
@@ -112,18 +131,81 @@ export declare function summarise(name: string, preview: string): string;
|
|
|
112
131
|
* still proof that something is happening.
|
|
113
132
|
*/
|
|
114
133
|
export declare function gistOf(text: string, width: number): string;
|
|
115
|
-
/** A run of
|
|
116
|
-
export interface
|
|
117
|
-
|
|
134
|
+
/** A run of inline text and what it is. Style rides beside the text, never in it. */
|
|
135
|
+
export interface Span {
|
|
136
|
+
text: string;
|
|
137
|
+
bold?: boolean;
|
|
138
|
+
italic?: boolean;
|
|
139
|
+
/** an inline code span, taken verbatim and never scanned again */
|
|
140
|
+
code?: boolean;
|
|
141
|
+
/** where a link points, when its own text does not say */
|
|
142
|
+
href?: string;
|
|
143
|
+
}
|
|
144
|
+
export type BlockKind = 'paragraph' | 'heading' | 'item' | 'quote' | 'code' | 'table' | 'rule';
|
|
145
|
+
/** How a table column is set, when its rule row said. */
|
|
146
|
+
export type Align = 'left' | 'right' | 'center';
|
|
147
|
+
/**
|
|
148
|
+
* One block of an answer.
|
|
149
|
+
*
|
|
150
|
+
* `lines`, `cells` and `spans` are exclusive and say how the block may be
|
|
151
|
+
* drawn: `lines` is verbatim and must be cut rather than wrapped, `cells` is a
|
|
152
|
+
* grid to be laid out by `gridOf`, `spans` is prose and the renderer may do as
|
|
153
|
+
* it likes with it.
|
|
154
|
+
*/
|
|
155
|
+
export interface Block {
|
|
156
|
+
kind: BlockKind;
|
|
157
|
+
/** `heading`: its depth, 1–6. `item`: how deep it is nested. */
|
|
158
|
+
level?: number;
|
|
118
159
|
/** the fence's info string, when it had one */
|
|
119
160
|
title?: string;
|
|
120
|
-
|
|
161
|
+
/** what a list item is drawn behind — a bullet, or the number that was written */
|
|
162
|
+
marker?: string;
|
|
163
|
+
/** `code` only, whose indentation is its meaning */
|
|
164
|
+
lines?: string[];
|
|
165
|
+
/** `table` only: every row but the rule, as cells, with their markup resolved */
|
|
166
|
+
cells?: Span[][][];
|
|
167
|
+
/** `table` only: how each column is set, and that the first row is a header */
|
|
168
|
+
align?: Align[];
|
|
169
|
+
/** every other kind, with its inline markup resolved */
|
|
170
|
+
spans?: Span[];
|
|
121
171
|
}
|
|
122
172
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
173
|
+
* The inline markup of one block, resolved.
|
|
174
|
+
*
|
|
175
|
+
* Order is the correctness argument. Code is settled first and never entered
|
|
176
|
+
* again, which is why this is a scanner and not a chain of replaces: in
|
|
177
|
+
* "use `[a](b)` syntax" the brackets are prose, and no regex over the whole
|
|
178
|
+
* string can know that. Everything else recurses on the text between its own
|
|
179
|
+
* markers, so `**bold with `code` in it**` keeps both.
|
|
180
|
+
*/
|
|
181
|
+
export declare function inlineOf(text: string, style?: Omit<Span, 'text'>, depth?: number): Span[];
|
|
182
|
+
/**
|
|
183
|
+
* An answer, as the blocks it is made of.
|
|
184
|
+
*
|
|
185
|
+
* Read top down, one line at a time, because that is the order the text
|
|
186
|
+
* arrives in and a stream must be readable before it is finished. The two
|
|
187
|
+
* verbatim kinds win over everything: a pipe inside a fence is whatever the
|
|
188
|
+
* code says it is, and a `#` inside one is a comment, not a heading.
|
|
189
|
+
*/
|
|
190
|
+
export declare function blocksOf(text: string): Block[];
|
|
191
|
+
/**
|
|
192
|
+
* A table as its rows, each one a single run of spans.
|
|
193
|
+
*
|
|
194
|
+
* Columns are laid out here and nowhere else, so the drawn table and the plain
|
|
195
|
+
* one are the same table: a cell's width is the length of its text, which is
|
|
196
|
+
* what a `Span` measures whatever styling rides beside it. Nothing a model
|
|
197
|
+
* writes in a cell can move the cell after it.
|
|
198
|
+
*/
|
|
199
|
+
export declare function gridOf(block: Block): Span[][];
|
|
200
|
+
/**
|
|
201
|
+
* A block as the row or rows it reads as, with its markers resolved rather
|
|
202
|
+
* than shown, and nothing styled.
|
|
203
|
+
*
|
|
204
|
+
* This is what a sink that cannot style gets — the pre-answer stream, and the
|
|
205
|
+
* plain box `zen meta` draws — so that the text does not visibly change shape
|
|
206
|
+
* at the moment it settles.
|
|
127
207
|
*/
|
|
128
|
-
export declare function
|
|
208
|
+
export declare function textOf(block: Block, width?: number): string;
|
|
209
|
+
/** A whole answer with its markup resolved instead of shown. Still plain text. */
|
|
210
|
+
export declare function unmarked(text: string, width?: number): string;
|
|
129
211
|
//# sourceMappingURL=wrap.d.ts.map
|