@wrongstack/tui 0.303.0 → 0.305.1

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.
@@ -3,10 +3,17 @@
3
3
  *
4
4
  * Mirrors the WebUI's `packages/webui/src/lib/kanban-cleaner.ts` but
5
5
  * lives in the TUI package so we don't have to thread `@wrongstack/webui`
6
- * (which depends on React) into a server-side TUI pipeline. The two
7
- * implementations intentionally share the same audit-code vocabulary
8
- * (10 codes) and severity levels (`error`, `warning`) so a board audited
9
- * from either surface produces the same findings.
6
+ * (which depends on React) into a server-side TUI pipeline.
7
+ *
8
+ * The two implementations must produce the same verdicts for the same board.
9
+ * That claim used to be a comment; it is now enforced by
10
+ * `packages/cli/tests/kanban-cleaner-parity.test.ts`, which runs a shared
11
+ * corpus through both and compares the `taskId:code:severity` triples. Only
12
+ * three differences are deliberate, and all three are API shape rather than
13
+ * verdict: this file also accepts `liveAgentIdentities`, returns eight extra
14
+ * summary fields the WebUI's `KanbanCleanerAlert` fills from queue health, and
15
+ * exports `summarizeAuditHeadline` / `topAuditIssues` for the panel badge.
16
+ * Messages may differ; codes and severities may not.
10
17
  *
11
18
  * The output of `auditKanbanBoard()` feeds the TUI panel header badge so
12
19
  * users see Cleaner warnings inline — mirroring the WebUI's
@@ -14,7 +21,13 @@
14
21
  */
15
22
  import type { KanbanBoard } from '@wrongstack/kanban';
16
23
  export type KanbanAuditSeverity = 'error' | 'warning';
17
- export type KanbanAuditIssueCode = 'missing-description' | 'missing-assignee' | 'missing-due-date' | 'missing-labels' | 'missing-subtasks' | 'missing-success-criteria' | 'skipped-lifecycle-state' | 'abandoned-running-task' | 'stale-running-task' | 'stale-review';
24
+ /**
25
+ * The audit vocabulary, as a runtime value so the parity test can compare the
26
+ * two implementations' code sets instead of trusting that both type unions
27
+ * were edited together.
28
+ */
29
+ export declare const ALL_AUDIT_CODES: readonly ['abandoned-running-task', 'board-oversized', 'missing-assignee', 'missing-description', 'missing-due-date', 'missing-labels', 'missing-subtasks', 'missing-success-criteria', 'skipped-lifecycle-state', 'stale-review', 'stale-running-task'];
30
+ export type KanbanAuditIssueCode = (typeof ALL_AUDIT_CODES)[number];
18
31
  export interface KanbanAuditIssue {
19
32
  id: string;
20
33
  taskId: string;
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * /kanban — open the project kanban panel
8
8
  * /kanban create <title> — create a new board, then open the panel
9
- * /kanban add <title> [--column X] — add a task to the active board
9
+ * /kanban add <title> [--column X] [--desc <text>] — add a task to the active board (managed boards require --desc)
10
10
  * /kanban use <boardId|title|tag> — open the kanban panel on a specific board
11
11
  * /kanban boards — list every board in the project
12
12
  * /kanban health — show kanban queue health summary
@@ -19,7 +19,7 @@
19
19
  * is the text-first equivalent for when the panel is closed.
20
20
  */
21
21
  import type { SlashCommand } from '@wrongstack/core/types';
22
- import type { KanbanBoundaryAccess, KanbanBoundaryPolicy, KanbanBoundarySelectorKind, KanbanBoardSummary, KanbanQueueHealth } from '@wrongstack/kanban';
22
+ import type { KanbanBoardSummary, KanbanBoundaryAccess, KanbanBoundaryPolicy, KanbanBoundarySelectorKind, KanbanQueueHealth } from '@wrongstack/kanban';
23
23
  import { type KanbanAuditSummary } from './kanban-audit.js';
24
24
  /**
25
25
  * Result of resolving the board that an `add` operation should target.
@@ -34,6 +34,12 @@ export interface KanbanAddTarget {
34
34
  boardTitle: string;
35
35
  /** Column that the task will be placed in. Defaults to the first column. */
36
36
  columnId: string;
37
+ /**
38
+ * Whether the board enforces the managed Kanban Agent lifecycle. Managed
39
+ * boards require new cards to be created in the Backlog column and with a
40
+ * description, so callers route the user accordingly.
41
+ */
42
+ managed: boolean;
37
43
  }
38
44
  export interface KanbanSlashDeps {
39
45
  /**
@@ -78,6 +84,7 @@ export type ParsedKanbanArgs = {
78
84
  kind: 'add';
79
85
  title: string;
80
86
  column: string | null;
87
+ description?: string | undefined;
81
88
  } | {
82
89
  kind: 'use';
83
90
  query: string;
package/dist/theme.d.ts CHANGED
@@ -10,6 +10,8 @@ export declare const pastel: Readonly<{
10
10
  readonly white: '#cdd6f4';
11
11
  readonly gray: '#7f849c';
12
12
  readonly grey: '#7f849c';
13
+ readonly grayBright: '#a6adc8';
14
+ readonly greyBright: '#a6adc8';
13
15
  readonly blackBright: '#585b70';
14
16
  readonly redBright: '#eba0ac';
15
17
  readonly greenBright: '#b8e8b0';
@@ -40,6 +42,8 @@ export declare const catppuccin: Readonly<{
40
42
  readonly white: '#cdd6f4';
41
43
  readonly gray: '#7f849c';
42
44
  readonly grey: '#7f849c';
45
+ readonly grayBright: '#a6adc8';
46
+ readonly greyBright: '#a6adc8';
43
47
  readonly blackBright: '#585b70';
44
48
  readonly redBright: '#eba0ac';
45
49
  readonly greenBright: '#b8e8b0';
@@ -55,11 +59,34 @@ export declare const catppuccin: Readonly<{
55
59
  readonly subtext0: '#a6adc8';
56
60
  readonly flamingo: '#f2cdcd';
57
61
  }>;
62
+ /** The distinct things `highlightLine` can color. */
63
+ export type SyntaxRole = 'keyword' | 'string' | 'comment' | 'commentOnWash' | 'number' | 'literal' | 'property' | 'variable' | 'command' | 'flag' | 'decorator' | 'diffAdd' | 'diffDel' | 'diffMeta';
64
+ export type SyntaxPalette = Record<SyntaxRole, string>;
58
65
  /**
59
- * Resolve a color value to its pastel equivalent. Known ANSI names map to the
60
- * {@link pastel} hex; hex/rgb strings and unknown values (e.g. Ink's `'dim'`)
61
- * pass through unchanged. `undefined` stays `undefined` so callers can spread
62
- * it without forcing a color.
66
+ * Resolve one syntax role against a palette. A preset may pin any role
67
+ * explicitly via its optional `syntax` field (e.g. a scheme whose strings are
68
+ * orange rather than green); otherwise the role borrows the token named in
69
+ * {@link SYNTAX_TOKEN}. O(1) and allocation-free — this runs once per token
70
+ * per rendered line.
71
+ */
72
+ export declare function resolveSyntaxColor(role: SyntaxRole, palette?: Theme): string;
73
+ /** Materialize the full syntax palette for a theme. Used by tests and tooling. */
74
+ export declare function resolveSyntaxPalette(palette?: Theme): SyntaxPalette;
75
+ /**
76
+ * Resolve a color value to a concrete color.
77
+ *
78
+ * Three cases, in order:
79
+ * - `syntax.<role>` resolves against the ACTIVE theme, so highlighting
80
+ * follows `/theme` (see {@link resolveSyntaxColor}).
81
+ * - A known ANSI name maps to its {@link pastel} hex. This map is frozen and
82
+ * theme-independent by design — it is the floor for the ~177 call sites
83
+ * that still pass bare names like `color="red"`.
84
+ * - Anything else (hex, rgb, Ink's `'dim'`, an unknown name) passes through.
85
+ *
86
+ * `undefined` stays `undefined` so callers can spread it without forcing a
87
+ * color. NOTE: an unknown name that reaches Ink is silently DROPPED by chalk —
88
+ * the token renders with no color at all. Never emit a name that isn't
89
+ * resolvable here.
63
90
  */
64
91
  export declare function softColor(color?: string): string | undefined;
65
92
  /**
@@ -154,6 +181,14 @@ export interface Theme {
154
181
  */
155
182
  diffAddBg: string;
156
183
  diffDelBg: string;
184
+ /**
185
+ * Per-preset syntax-highlight overrides. OPTIONAL and normally omitted —
186
+ * every role has a sensible default derived from the tokens above (see
187
+ * `SYNTAX_TOKEN`), so a preset only pins a role when its scheme genuinely
188
+ * disagrees. Example: VS Code Dark+ colors strings orange, not green, so
189
+ * `dark-plus` pins `string`.
190
+ */
191
+ syntax?: Partial<SyntaxPalette> | undefined;
157
192
  }
158
193
  export declare const theme: Theme;
159
194
  /**
@@ -126,6 +126,7 @@ export interface ToolPickerItem {
126
126
  owner: string;
127
127
  category: string;
128
128
  enabled: boolean;
129
+ exposure: 'direct' | 'lazy' | 'disabled';
129
130
  mutating: boolean;
130
131
  permission: string;
131
132
  descMode: 'extend' | 'simple';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/tui",
3
- "version": "0.303.0",
3
+ "version": "0.305.1",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack terminal UI: Ink-based interactive renderer with history, pickers, and slash menus.",
6
6
  "repository": {
@@ -29,12 +29,12 @@
29
29
  "ink": "7.1.1",
30
30
  "react": "^19.2.8",
31
31
  "string-width": "8.2.2",
32
- "@wrongstack/kanban": "0.303.0",
33
- "@wrongstack/core": "0.303.0",
34
- "@wrongstack/sdd": "0.303.0",
35
- "@wrongstack/runtime": "0.303.0",
36
- "@wrongstack/sage": "0.303.0",
37
- "@wrongstack/tools": "0.303.0"
32
+ "@wrongstack/core": "0.305.1",
33
+ "@wrongstack/runtime": "0.305.1",
34
+ "@wrongstack/kanban": "0.305.1",
35
+ "@wrongstack/sdd": "0.305.1",
36
+ "@wrongstack/sage": "0.305.1",
37
+ "@wrongstack/tools": "0.305.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@testing-library/dom": "^10.4.1",