bkper 5.2.0 → 5.3.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.
- package/lib/agent/extensions/bkper-ai-provider.d.ts.map +1 -1
- package/lib/agent/extensions/bkper-ai-provider.js +4 -6
- package/lib/agent/extensions/bkper-ai-provider.js.map +1 -1
- package/lib/agent/extensions/builtins.d.ts +2 -2
- package/lib/agent/extensions/builtins.d.ts.map +1 -1
- package/lib/agent/extensions/builtins.js.map +1 -1
- package/lib/agent/extensions/core-concepts-preload.d.ts +16 -4
- package/lib/agent/extensions/core-concepts-preload.d.ts.map +1 -1
- package/lib/agent/extensions/core-concepts-preload.js +78 -48
- package/lib/agent/extensions/core-concepts-preload.js.map +1 -1
- package/lib/agent/extensions/handoff-goal-editor.d.ts +1 -1
- package/lib/agent/extensions/handoff-goal-editor.d.ts.map +1 -1
- package/lib/agent/extensions/handoff-goal-editor.js +1 -1
- package/lib/agent/extensions/handoff-goal-editor.js.map +1 -1
- package/lib/agent/extensions/handoff.d.ts +1 -1
- package/lib/agent/extensions/handoff.d.ts.map +1 -1
- package/lib/agent/extensions/startup-logo.d.ts +4 -1
- package/lib/agent/extensions/startup-logo.d.ts.map +1 -1
- package/lib/agent/extensions/startup-logo.js +6 -1
- package/lib/agent/extensions/startup-logo.js.map +1 -1
- package/lib/agent/extensions/startup.d.ts +2 -2
- package/lib/agent/extensions/startup.d.ts.map +1 -1
- package/lib/agent/extensions/startup.js +21 -4
- package/lib/agent/extensions/startup.js.map +1 -1
- package/lib/agent/interactive/logo-3d.d.ts +125 -0
- package/lib/agent/interactive/logo-3d.d.ts.map +1 -0
- package/lib/agent/interactive/logo-3d.js +1187 -0
- package/lib/agent/interactive/logo-3d.js.map +1 -0
- package/lib/agent/interactive/prompt-history-search.js +1 -1
- package/lib/agent/interactive/prompt-history-search.js.map +1 -1
- package/lib/agent/interactive/prompt-history-shortcut.js +1 -1
- package/lib/agent/interactive/prompt-history-shortcut.js.map +1 -1
- package/lib/agent/pi-shared-modules.d.ts +21 -0
- package/lib/agent/pi-shared-modules.d.ts.map +1 -0
- package/lib/agent/pi-shared-modules.js +32 -0
- package/lib/agent/pi-shared-modules.js.map +1 -0
- package/lib/agent/startup-maintenance.d.ts +6 -1
- package/lib/agent/startup-maintenance.d.ts.map +1 -1
- package/lib/agent/startup-maintenance.js +9 -2
- package/lib/agent/startup-maintenance.js.map +1 -1
- package/lib/agent/system-prompt.d.ts.map +1 -1
- package/lib/agent/system-prompt.js +34 -12
- package/lib/agent/system-prompt.js.map +1 -1
- package/lib/upgrade/index.d.ts +2 -2
- package/lib/upgrade/index.d.ts.map +1 -1
- package/lib/upgrade/index.js +1 -1
- package/lib/upgrade/index.js.map +1 -1
- package/lib/upgrade/update-check.d.ts +8 -1
- package/lib/upgrade/update-check.d.ts.map +1 -1
- package/lib/upgrade/update-check.js +13 -6
- package/lib/upgrade/update-check.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { Theme } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
import type { Color, Component, TerminalColorMode, TUI, TuiMouseEvent, TuiMouseEventResult } from '@earendil-works/pi-tui';
|
|
3
|
+
/**
|
|
4
|
+
* Fullscreen 3D logo easter egg, played by clicking the header logo. The logo bitmap is built from one block per
|
|
5
|
+
* pixel. The current screen dissolves into braille dust while the model spins in the center and its blocks play a
|
|
6
|
+
* sliding puzzle. Leaving plays the same timeline backwards, so the screen reassembles.
|
|
7
|
+
*
|
|
8
|
+
* The logo lifts off the header, flies to the center, and grows; the dust spreads out from the header logo.
|
|
9
|
+
*
|
|
10
|
+
* The blocks are ray cast per braille dot. A braille cell holds 2x4 roughly square dots, so one pixel of a
|
|
11
|
+
* half-block bitmap is exactly 2x2 dots, and the header logo is drawn at its exact size when it lifts off.
|
|
12
|
+
*
|
|
13
|
+
* Adapted from Pi's 3D logo easter egg (MIT License, Copyright (c) Mario Zechner), from
|
|
14
|
+
* packages/coding-agent/src/modes/interactive/components/easter-egg-3d.ts at pi commit c450f2c0f8. Pi does not
|
|
15
|
+
* export it; if it ever does, replace this copy with the export. Changes from upstream: the model is built from any
|
|
16
|
+
* half-block pixel logo instead of the pi logo or Armin, and theme colors are resolved once into a palette because
|
|
17
|
+
* Pi's theme singleton is internal.
|
|
18
|
+
*/
|
|
19
|
+
export type Rgb = readonly [number, number, number];
|
|
20
|
+
/** Grid position of a block: column and row in the bitmap, and layer (-1, 0, 1) in depth. */
|
|
21
|
+
type Cell3 = readonly [number, number, number];
|
|
22
|
+
/** A bitmap built from one block per foreground pixel. Each is a block that the puzzle slides around. */
|
|
23
|
+
export interface Model {
|
|
24
|
+
/** Bitmap size in pixels. */
|
|
25
|
+
columns: number;
|
|
26
|
+
rows: number;
|
|
27
|
+
blocks: Array<{
|
|
28
|
+
home: Cell3;
|
|
29
|
+
color: Rgb;
|
|
30
|
+
}>;
|
|
31
|
+
/** Camera distance from the model's center, in pixels. */
|
|
32
|
+
cameraDistance: number;
|
|
33
|
+
/** Farthest distance of any block corner from the center, with blocks on the outer depth layers. */
|
|
34
|
+
radius: number;
|
|
35
|
+
/** Largest share of the screen width the spinning model covers. */
|
|
36
|
+
widthShare: number;
|
|
37
|
+
/** Number of blocks the puzzle moves per step, given a random number from 0 to 1. */
|
|
38
|
+
puzzleMoves: (random: number) => number;
|
|
39
|
+
/**
|
|
40
|
+
* Top-left cell of the model's half-block rendering on screen. The model lifts off from there and replaces it.
|
|
41
|
+
* Undefined to grow out of the center.
|
|
42
|
+
*/
|
|
43
|
+
origin: {
|
|
44
|
+
column: number;
|
|
45
|
+
row: number;
|
|
46
|
+
} | undefined;
|
|
47
|
+
}
|
|
48
|
+
/** A logo as square pixels, one character per pixel and '.' for transparent, rendered with half blocks. */
|
|
49
|
+
export interface PixelLogo {
|
|
50
|
+
pixels: readonly string[];
|
|
51
|
+
colors: Readonly<Record<string, Color>>;
|
|
52
|
+
}
|
|
53
|
+
/** Top-left cell of a logo's half-block rendering on screen. */
|
|
54
|
+
export interface LogoOrigin {
|
|
55
|
+
column: number;
|
|
56
|
+
row: number;
|
|
57
|
+
}
|
|
58
|
+
/** The 3D model of a pixel logo that lifts off its half-block rendering at `origin`. */
|
|
59
|
+
export declare function createLogoModel(logo: PixelLogo, origin: LogoOrigin): Model;
|
|
60
|
+
/** Colors the animation fades between, resolved from the terminal and theme when it starts. */
|
|
61
|
+
export interface Logo3dPalette {
|
|
62
|
+
foreground: Rgb;
|
|
63
|
+
background: Rgb;
|
|
64
|
+
/** The key and the text of the "escape to return" hint. */
|
|
65
|
+
hintKey: Rgb;
|
|
66
|
+
hintText: Rgb;
|
|
67
|
+
colorMode: TerminalColorMode;
|
|
68
|
+
}
|
|
69
|
+
/** The part of the TUI the animation drives. */
|
|
70
|
+
export type Logo3dHost = Pick<TUI, 'requestRender'> & {
|
|
71
|
+
readonly terminal: {
|
|
72
|
+
readonly rows: number;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Plays the logo lifting off its half-block rendering at `origin`. Only fullscreen mode can show it, because it
|
|
77
|
+
* dissolves the rendered screen, which is captured right away. Returns false when it cannot play.
|
|
78
|
+
*/
|
|
79
|
+
export declare function playLogo3d(tui: unknown, theme: Theme, logo: PixelLogo, origin: LogoOrigin): boolean;
|
|
80
|
+
export declare class Logo3dAnimation implements Component {
|
|
81
|
+
private readonly tui;
|
|
82
|
+
/** The screen to dissolve, as rendered lines. */
|
|
83
|
+
private readonly screen;
|
|
84
|
+
private readonly model;
|
|
85
|
+
private readonly foreground;
|
|
86
|
+
private readonly background;
|
|
87
|
+
private readonly palette;
|
|
88
|
+
private readonly onDone;
|
|
89
|
+
private readonly startTime;
|
|
90
|
+
private lastRender;
|
|
91
|
+
private timer;
|
|
92
|
+
private exit;
|
|
93
|
+
private shuffle;
|
|
94
|
+
private screenWidth;
|
|
95
|
+
private screenHeight;
|
|
96
|
+
/** Star per cell index, or undefined. */
|
|
97
|
+
private stars;
|
|
98
|
+
private cells;
|
|
99
|
+
private readonly ansiCache;
|
|
100
|
+
private readonly raster;
|
|
101
|
+
constructor(tui: Logo3dHost, screen: readonly string[], model: Model, palette: Logo3dPalette, onDone: () => void);
|
|
102
|
+
/** Play the exit animation. A second call skips it. */
|
|
103
|
+
close(): void;
|
|
104
|
+
handleInput(data: string): void;
|
|
105
|
+
handleMouse(event: TuiMouseEvent): TuiMouseEventResult;
|
|
106
|
+
invalidate(): void;
|
|
107
|
+
render(width: number): string[];
|
|
108
|
+
private elapsed;
|
|
109
|
+
private exitProgress;
|
|
110
|
+
private finish;
|
|
111
|
+
/** Each block's displacement from its place in the model at `time`, in grid units. */
|
|
112
|
+
private blockOffsets;
|
|
113
|
+
private flyProgress;
|
|
114
|
+
private starAlpha;
|
|
115
|
+
private hintAlpha;
|
|
116
|
+
private pose;
|
|
117
|
+
private hint;
|
|
118
|
+
/** A sparse, deterministic starfield: one braille dot in about STAR_DENSITY of all cells. */
|
|
119
|
+
private prepareStars;
|
|
120
|
+
private prepareCells;
|
|
121
|
+
private pack;
|
|
122
|
+
private ansi;
|
|
123
|
+
}
|
|
124
|
+
export {};
|
|
125
|
+
//# sourceMappingURL=logo-3d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-3d.d.ts","sourceRoot":"","sources":["../../../src/agent/interactive/logo-3d.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,EACR,KAAK,EACL,SAAS,EACT,iBAAiB,EACjB,GAAG,EACH,aAAa,EACb,mBAAmB,EACtB,MAAM,wBAAwB,CAAC;AAYhC;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAkDpD,6FAA6F;AAC7F,KAAK,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EA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