@axplusb/kepler 1.0.10 → 2.0.2
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/package.json +5 -2
- package/pulse/app/api/benchmark/route.ts +113 -0
- package/pulse/app/api/benchmarks/route.ts +195 -0
- package/pulse/app/benchmarks/page.tsx +224 -0
- package/pulse/components/layout/bottom-nav.tsx +2 -1
- package/pulse/components/layout/sidebar.tsx +2 -1
- package/src/context/retriever.mjs +42 -4
- package/src/context/symbol-indexer.mjs +375 -0
- package/src/core/approval.mjs +154 -95
- package/src/core/backend-url.mjs +2 -2
- package/src/core/headless.mjs +5 -0
- package/src/core/risk-tier.mjs +245 -0
- package/src/core/stream-client.mjs +24 -1
- package/src/core/tool-executor.mjs +58 -5
- package/src/onboarding/preflight.mjs +292 -0
- package/src/state/orbit.mjs +263 -0
- package/src/state/verbosity.mjs +99 -0
- package/src/terminal/ansi.mjs +44 -22
- package/src/terminal/repl.mjs +487 -133
- package/src/tools/project-overview.mjs +109 -16
- package/src/ui/approval.mjs +167 -0
- package/src/ui/banner.mjs +133 -122
- package/src/ui/dock.mjs +88 -0
- package/src/ui/icons.mjs +164 -0
- package/src/ui/mission-report.mjs +264 -0
- package/src/ui/palette.mjs +189 -0
- package/src/ui/spinner.mjs +116 -0
- package/src/ui/status-bar.mjs +275 -0
- package/src/ui/sub-agent.mjs +152 -0
- package/src/ui/term.mjs +159 -0
- package/src/ui/tool-card.mjs +322 -0
- package/src/ui/tool-details.mjs +277 -0
package/src/terminal/ansi.mjs
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ANSI Terminal Renderer —
|
|
2
|
+
* ANSI Terminal Renderer — cursor control, box drawing, status bars.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Color helpers (the `c` object) now route through the semantic palette
|
|
5
|
+
* (`src/ui/palette.mjs`) so the entire CLI honors the Kepler brand and
|
|
6
|
+
* tier fallbacks (truecolor, ansi256, ansi16, none) without touching
|
|
7
|
+
* each call site. Hot-swap-friendly: external semantics like `c.red`,
|
|
8
|
+
* `c.bold`, `c.cyan` are preserved as the legacy contract; new code
|
|
9
|
+
* should prefer importing `paint` directly.
|
|
6
10
|
*/
|
|
7
11
|
|
|
12
|
+
import { paint } from '../ui/palette.mjs';
|
|
13
|
+
|
|
8
14
|
const ESC = '\x1b[';
|
|
9
15
|
const write = (s) => process.stderr.write(s);
|
|
10
16
|
|
|
@@ -27,27 +33,43 @@ export const cursor = {
|
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
// ── Colors ──
|
|
36
|
+
// Legacy color names re-mapped onto semantic palette tokens. The CLI's
|
|
37
|
+
// branding is centralized in palette.mjs; this object is preserved only
|
|
38
|
+
// so existing imports keep compiling. Internal Kepler color choices are
|
|
39
|
+
// documented next to each mapping for the next code review.
|
|
40
|
+
|
|
41
|
+
const identity = (s) => String(s ?? '');
|
|
30
42
|
|
|
31
43
|
export const c = {
|
|
32
|
-
reset:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
reset: identity, // palette already wraps with RESET
|
|
45
|
+
|
|
46
|
+
// Styles — work at every tier
|
|
47
|
+
bold: paint.bold,
|
|
48
|
+
dim: paint.dim,
|
|
49
|
+
italic: paint.italic,
|
|
50
|
+
underline: paint.underline,
|
|
51
|
+
|
|
52
|
+
// State semantics
|
|
53
|
+
red: paint.state.danger, // failure / hard error
|
|
54
|
+
green: paint.state.success, // pass / aligned
|
|
55
|
+
yellow: paint.state.warn, // soft warn / retry
|
|
56
|
+
|
|
57
|
+
// Brand semantics
|
|
58
|
+
blue: paint.brand.primary, // headers, primary brand
|
|
59
|
+
magenta: paint.brand.accent, // attention required
|
|
60
|
+
brand: paint.brand.primary, // primary brand surface
|
|
61
|
+
cyan: paint.brand.data, // code / file paths
|
|
62
|
+
cyanRegular: paint.brand.data,
|
|
63
|
+
cyanBold: (s) => paint.bold(paint.brand.data(s)),
|
|
64
|
+
|
|
65
|
+
// Text semantics
|
|
66
|
+
white: paint.text.primary, // primary text
|
|
67
|
+
gray: paint.text.dim, // hints, metadata, dim text
|
|
68
|
+
|
|
69
|
+
// Backgrounds — kept as raw ANSI; rarely used and have no palette analog
|
|
70
|
+
bgRed: (s) => `${ESC}41m${String(s ?? '')}${ESC}0m`,
|
|
71
|
+
bgGreen: (s) => `${ESC}42m${String(s ?? '')}${ESC}0m`,
|
|
72
|
+
bgCyan: (s) => `${ESC}46m${String(s ?? '')}${ESC}0m`,
|
|
51
73
|
};
|
|
52
74
|
|
|
53
75
|
// ── Box Drawing ──
|