tickmarkr 1.80.0 → 1.83.0
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 +4 -4
- package/dist/brand.d.ts +4 -1
- package/dist/brand.js +46 -7
- package/dist/cli/commands/approve.js +53 -8
- package/dist/cli/commands/plan.js +17 -2
- package/dist/cli/commands/report.js +15 -6
- package/dist/cli/commands/ui.d.ts +1 -1
- package/dist/cli/commands/ui.js +47 -4
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/compile/collateral.d.ts +19 -0
- package/dist/compile/collateral.js +90 -0
- package/dist/compile/index.js +18 -4
- package/dist/drivers/herdr.d.ts +1 -0
- package/dist/drivers/herdr.js +19 -0
- package/dist/drivers/types.d.ts +1 -0
- package/dist/gates/acceptance.js +50 -8
- package/dist/gates/llm.js +34 -19
- package/dist/gates/review.d.ts +9 -1
- package/dist/gates/review.js +173 -7
- package/dist/gates/run-gates.d.ts +1 -0
- package/dist/gates/run-gates.js +18 -1
- package/dist/report/bundle.d.ts +6 -1
- package/dist/report/bundle.js +13 -3
- package/dist/run/daemon.d.ts +5 -0
- package/dist/run/daemon.js +188 -27
- package/dist/run/journal.d.ts +5 -0
- package/dist/run/journal.js +71 -1
- package/dist/tui/cockpit/capture.d.ts +107 -1
- package/dist/tui/cockpit/capture.js +287 -10
- package/dist/tui/cockpit/components.d.ts +15 -86
- package/dist/tui/cockpit/components.js +49 -55
- package/dist/tui/cockpit/derive.d.ts +73 -1
- package/dist/tui/cockpit/derive.js +211 -15
- package/dist/tui/cockpit/keys.d.ts +244 -0
- package/dist/tui/cockpit/keys.js +634 -0
- package/dist/tui/cockpit/layout.d.ts +162 -0
- package/dist/tui/cockpit/layout.js +229 -0
- package/dist/tui/cockpit/live.d.ts +80 -0
- package/dist/tui/cockpit/live.js +311 -0
- package/dist/tui/cockpit/run-cockpit.d.ts +65 -2
- package/dist/tui/cockpit/run-cockpit.js +705 -128
- package/dist/tui/cockpit/setup-cockpit.d.ts +149 -1
- package/dist/tui/cockpit/setup-cockpit.js +432 -56
- package/dist/tui/cockpit/views.d.ts +72 -0
- package/dist/tui/cockpit/views.js +56 -0
- package/dist/tui/cockpit/width.d.ts +105 -0
- package/dist/tui/cockpit/width.js +276 -0
- package/fixtures/speckit-sample/tasks.md +2 -2
- package/package.json +3 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
|
+
import { Journal } from "../../run/journal.js";
|
|
2
3
|
import { type TickmarkrConfig } from "../../config/config.js";
|
|
3
4
|
import { type ComponentState, type JournalRow } from "./components.js";
|
|
4
5
|
import type { DemoCaptures } from "./demo.js";
|
|
6
|
+
import { type RunKeyEvent, type SetupInteractionState, type SetupKeyBinding } from "./keys.js";
|
|
5
7
|
export type SetupCockpitData = {
|
|
6
8
|
readonly binaryVersion: string;
|
|
7
9
|
readonly harnesses: readonly {
|
|
@@ -34,8 +36,154 @@ export declare function deriveSetupCockpitData(captures: DemoCaptures, binaryVer
|
|
|
34
36
|
* describes the fleet.
|
|
35
37
|
*/
|
|
36
38
|
export declare const SETUP_DETAIL_ORDER: readonly ["detected", "consultsAndReviewers", "overlayDiff", "fleetAndGates"];
|
|
37
|
-
export declare function SetupCockpitFrame({ data, columns, rows, }: {
|
|
39
|
+
export declare function SetupCockpitFrame({ data, columns, rows, interaction, bindings, }: {
|
|
38
40
|
data: SetupCockpitData;
|
|
39
41
|
columns: number;
|
|
40
42
|
rows?: number;
|
|
43
|
+
interaction?: SetupInteractionState;
|
|
44
|
+
bindings?: readonly SetupKeyBinding[];
|
|
41
45
|
}): ReactElement;
|
|
46
|
+
/**
|
|
47
|
+
* One parked task awaiting a human decision, derived from the journal alone.
|
|
48
|
+
* The graph is never consulted: a recompile can never make a parked task read
|
|
49
|
+
* as anything but parked on this surface.
|
|
50
|
+
*/
|
|
51
|
+
export type ParkedDecision = {
|
|
52
|
+
readonly taskId: string;
|
|
53
|
+
/** The daemon-recorded park kind (task-human data.kind), never inferred prose. */
|
|
54
|
+
readonly kind: string;
|
|
55
|
+
readonly reason: string | undefined;
|
|
56
|
+
/** UTC HH:MM:SS sliced from the newest task-human event's ISO ts, or "unknown". */
|
|
57
|
+
readonly parkedAt: string;
|
|
58
|
+
/** Count of recorded task-dispatch events — never max(attempt)+1. */
|
|
59
|
+
readonly attempts: number;
|
|
60
|
+
/**
|
|
61
|
+
* The newest failed gate-result before the newest task-human, derived with
|
|
62
|
+
* the same rule the production approve command applies. It decides what the
|
|
63
|
+
* confirm inset may promise: uphold exists only when this is "review", and a
|
|
64
|
+
* gate-fail approve records this gate as satisfied.
|
|
65
|
+
*/
|
|
66
|
+
readonly failedGate: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* A park that is permanent by design: an id the spec retains only so the
|
|
69
|
+
* engagement can resume, gated so it never dispatches. Nothing releases it,
|
|
70
|
+
* so it is drawn read-only and neither verb is offered on it.
|
|
71
|
+
*/
|
|
72
|
+
readonly tombstone: boolean;
|
|
73
|
+
};
|
|
74
|
+
/** The parks a verb can release — the rows the surface draws live verbs on. */
|
|
75
|
+
export declare function actionableDecisions(decisions: readonly ParkedDecision[]): readonly ParkedDecision[];
|
|
76
|
+
/**
|
|
77
|
+
* The decisions section's rows: one per task the journal's own status replay
|
|
78
|
+
* leaves parked on a human, in the order the journal first named them. The
|
|
79
|
+
* replay is the production one (`Journal.replayStatuses`) so this surface and
|
|
80
|
+
* `tickmarkr status` can never disagree about what is parked.
|
|
81
|
+
*/
|
|
82
|
+
export declare function deriveParkedDecisions(journal: Journal): readonly ParkedDecision[];
|
|
83
|
+
/** The two decisions a parked task offers — the production command's two verbs. */
|
|
84
|
+
export type SetupDecisionVerb = "approve" | "uphold";
|
|
85
|
+
/** A decision the operator has named but not yet confirmed. */
|
|
86
|
+
export type SetupDecisionCommand = {
|
|
87
|
+
readonly verb: SetupDecisionVerb;
|
|
88
|
+
readonly taskId: string;
|
|
89
|
+
};
|
|
90
|
+
/** What the journal file gained this session — one entry per confirmed write. */
|
|
91
|
+
export type SetupDecisionWrite = {
|
|
92
|
+
readonly taskId: string;
|
|
93
|
+
readonly verb: SetupDecisionVerb;
|
|
94
|
+
/** The release marker read back from the recorded task-approved event. */
|
|
95
|
+
readonly release: string | undefined;
|
|
96
|
+
readonly by: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* The observable state of the decisions surface. Every field is drawn, so a
|
|
100
|
+
* state the surface cannot show is not expressible: the confirm inset is
|
|
101
|
+
* `confirming`, the verbatim command output is `notice`, and the pending
|
|
102
|
+
* writes region is `writes`.
|
|
103
|
+
*/
|
|
104
|
+
export type SetupDecisionsSession = {
|
|
105
|
+
readonly selection: number;
|
|
106
|
+
readonly confirming: SetupDecisionCommand | null;
|
|
107
|
+
readonly writes: readonly SetupDecisionWrite[];
|
|
108
|
+
readonly notice: string | null;
|
|
109
|
+
};
|
|
110
|
+
export declare function initialSetupDecisionsSession(): SetupDecisionsSession;
|
|
111
|
+
export type SetupDecisionsKeyResult = {
|
|
112
|
+
readonly session: SetupDecisionsSession;
|
|
113
|
+
/** Present only when the confirm key landed — the one moment a write may happen. */
|
|
114
|
+
readonly command?: SetupDecisionCommand;
|
|
115
|
+
readonly quit?: boolean;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Uphold exists only where the production command honours it: the newest
|
|
119
|
+
* failed gate before the park is the review gate. Everywhere else the key is
|
|
120
|
+
* inert and the keybar does not advertise it — the surface never promises a
|
|
121
|
+
* decision the command must refuse.
|
|
122
|
+
*/
|
|
123
|
+
export declare function upholdAvailable(decision: ParkedDecision): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* The decisions surface's whole key grammar: ↑↓ move, a approve, u uphold,
|
|
126
|
+
* y confirm, n/Esc cancel, q quit. The reducer never writes — it can only
|
|
127
|
+
* *name* a command, and only on the confirm key, so a write the operator did
|
|
128
|
+
* not predict cannot happen. a/u are inert when nothing actionable is parked,
|
|
129
|
+
* and u is inert on a park the command would refuse, matching the keybar, which
|
|
130
|
+
* then does not advertise them. Tombstone parks sit outside the grammar: the
|
|
131
|
+
* pointer never reaches one, so no key can name a decision on it.
|
|
132
|
+
*/
|
|
133
|
+
export declare function applySetupDecisionsKey(session: SetupDecisionsSession, event: RunKeyEvent, parked: readonly ParkedDecision[]): SetupDecisionsKeyResult;
|
|
134
|
+
export type SetupDecisionOutcome = {
|
|
135
|
+
readonly ok: true;
|
|
136
|
+
readonly command: SetupDecisionCommand;
|
|
137
|
+
/** The exact string the production command returned. */
|
|
138
|
+
readonly message: string;
|
|
139
|
+
readonly write: SetupDecisionWrite;
|
|
140
|
+
} | {
|
|
141
|
+
readonly ok: false;
|
|
142
|
+
readonly command: SetupDecisionCommand;
|
|
143
|
+
/** The exact string the production command threw. */
|
|
144
|
+
readonly refusal: string;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* THE write. It calls the production `approve` command — validation, fail-closed
|
|
148
|
+
* refusals and the journal append are inherited, never re-implemented — and then
|
|
149
|
+
* reads the file back so the session records the release the journal actually
|
|
150
|
+
* gained. A refusal is the command's own message, verbatim, and appends nothing.
|
|
151
|
+
*/
|
|
152
|
+
export declare function executeSetupDecision(command: SetupDecisionCommand, { cwd, runId, by }: {
|
|
153
|
+
cwd: string;
|
|
154
|
+
runId: string;
|
|
155
|
+
by: string;
|
|
156
|
+
}): Promise<SetupDecisionOutcome>;
|
|
157
|
+
/** Fold an executed command's outcome into the session the surface draws. */
|
|
158
|
+
export declare function recordSetupDecisionOutcome(session: SetupDecisionsSession, outcome: SetupDecisionOutcome): SetupDecisionsSession;
|
|
159
|
+
/**
|
|
160
|
+
* The confirm inset's lines: the task, the actor, the effect and the file,
|
|
161
|
+
* stated before the single key that can write.
|
|
162
|
+
*/
|
|
163
|
+
export declare function setupDecisionConfirmLines(command: SetupDecisionCommand, decision: ParkedDecision | undefined, actor: string, journalFile: string): readonly string[];
|
|
164
|
+
/**
|
|
165
|
+
* The decisions surface. Every row it draws — decisions, the confirm inset,
|
|
166
|
+
* the pending writes region — is measured and clipped through the width
|
|
167
|
+
* module alone (`fitCells`), so a task name carrying a ZWJ grapheme can
|
|
168
|
+
* neither overflow its row nor be cut mid-cluster. The one unclipped element
|
|
169
|
+
* is `notice`: the production command's own words, verbatim.
|
|
170
|
+
*/
|
|
171
|
+
export declare function SetupDecisionsSurface({ decisions, session, columns, actor, journalFile, }: {
|
|
172
|
+
decisions: readonly ParkedDecision[];
|
|
173
|
+
session: SetupDecisionsSession;
|
|
174
|
+
columns: number;
|
|
175
|
+
actor: string;
|
|
176
|
+
journalFile: string;
|
|
177
|
+
}): ReactElement;
|
|
178
|
+
/**
|
|
179
|
+
* The setup decisions surface on a live engagement. This is the only cockpit
|
|
180
|
+
* surface that writes, and it writes exactly one way: a confirmed approve or
|
|
181
|
+
* uphold through the production command path.
|
|
182
|
+
*/
|
|
183
|
+
export declare function runSetupDecisionsCockpit({ input, output, cwd, runId, actor, }: {
|
|
184
|
+
input: NodeJS.ReadStream;
|
|
185
|
+
output: NodeJS.WriteStream;
|
|
186
|
+
cwd: string;
|
|
187
|
+
runId: string;
|
|
188
|
+
actor?: string;
|
|
189
|
+
}): Promise<void>;
|