@kenkaiiii/gg-boss 4.3.96
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/LICENSE +21 -0
- package/dist/banner.d.ts +11 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/banner.js +25 -0
- package/dist/banner.js.map +1 -0
- package/dist/boot-banner.d.ts +15 -0
- package/dist/boot-banner.d.ts.map +1 -0
- package/dist/boot-banner.js +61 -0
- package/dist/boot-banner.js.map +1 -0
- package/dist/boss-footer.d.ts +16 -0
- package/dist/boss-footer.d.ts.map +1 -0
- package/dist/boss-footer.js +60 -0
- package/dist/boss-footer.js.map +1 -0
- package/dist/boss-store.d.ts +202 -0
- package/dist/boss-store.d.ts.map +1 -0
- package/dist/boss-store.js +560 -0
- package/dist/boss-store.js.map +1 -0
- package/dist/boss-system-prompt.d.ts +3 -0
- package/dist/boss-system-prompt.d.ts.map +1 -0
- package/dist/boss-system-prompt.js +52 -0
- package/dist/boss-system-prompt.js.map +1 -0
- package/dist/branding.d.ts +18 -0
- package/dist/branding.d.ts.map +1 -0
- package/dist/branding.js +33 -0
- package/dist/branding.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +163 -0
- package/dist/cli.js.map +1 -0
- package/dist/discover.d.ts +13 -0
- package/dist/discover.d.ts.map +1 -0
- package/dist/discover.js +92 -0
- package/dist/discover.js.map +1 -0
- package/dist/event-queue.d.ts +16 -0
- package/dist/event-queue.d.ts.map +1 -0
- package/dist/event-queue.js +39 -0
- package/dist/event-queue.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/link-command.d.ts +2 -0
- package/dist/link-command.d.ts.map +1 -0
- package/dist/link-command.js +120 -0
- package/dist/link-command.js.map +1 -0
- package/dist/links.d.ts +11 -0
- package/dist/links.d.ts.map +1 -0
- package/dist/links.js +22 -0
- package/dist/links.js.map +1 -0
- package/dist/orchestrator-app.d.ts +15 -0
- package/dist/orchestrator-app.d.ts.map +1 -0
- package/dist/orchestrator-app.js +248 -0
- package/dist/orchestrator-app.js.map +1 -0
- package/dist/orchestrator.d.ts +79 -0
- package/dist/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator.js +405 -0
- package/dist/orchestrator.js.map +1 -0
- package/dist/sessions.d.ts +21 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +122 -0
- package/dist/sessions.js.map +1 -0
- package/dist/slash-commands.d.ts +19 -0
- package/dist/slash-commands.d.ts.map +1 -0
- package/dist/slash-commands.js +54 -0
- package/dist/slash-commands.js.map +1 -0
- package/dist/tools.d.ts +10 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +81 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +32 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/worker.d.ts +40 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +113 -0
- package/dist/worker.js.map +1 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 KenKai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/banner.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface BossBannerProps {
|
|
3
|
+
/** Second line text (e.g. "Link projects", "Orchestrator"). */
|
|
4
|
+
subtitle: string;
|
|
5
|
+
/** Third line text (e.g. "↑↓ navigate · enter save"). */
|
|
6
|
+
hint?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Ink banner — for use inside Ink-rendered screens. */
|
|
9
|
+
export declare function BossBanner({ subtitle, hint }: BossBannerProps): React.ReactElement;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../src/banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,eAAe;IACvB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CA2BlF"}
|
package/dist/banner.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Box, Text } from "ink";
|
|
4
|
+
import { AUTHOR, BRAND, COLORS, GRADIENT, LOGO_GAP, LOGO_LINES, VERSION } from "./branding.js";
|
|
5
|
+
/** Ink banner — for use inside Ink-rendered screens. */
|
|
6
|
+
export function BossBanner({ subtitle, hint }) {
|
|
7
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [_jsxs(Box, { children: [_jsx(GradientText, { text: LOGO_LINES[0] }), _jsx(Text, { children: LOGO_GAP }), _jsx(Text, { color: COLORS.primary, bold: true, children: BRAND }), _jsxs(Text, { color: COLORS.textDim, children: [" v", VERSION] }), _jsx(Text, { color: COLORS.textDim, children: " \u00B7 By " }), _jsx(Text, { color: COLORS.text, bold: true, children: AUTHOR })] }), _jsxs(Box, { children: [_jsx(GradientText, { text: LOGO_LINES[1] }), _jsx(Text, { children: LOGO_GAP }), _jsx(Text, { color: COLORS.accent, children: subtitle })] }), _jsxs(Box, { children: [_jsx(GradientText, { text: LOGO_LINES[2] }), _jsx(Text, { children: LOGO_GAP }), _jsx(Text, { color: COLORS.textDim, children: hint ?? "" })] })] }));
|
|
8
|
+
}
|
|
9
|
+
function GradientText({ text }) {
|
|
10
|
+
const chars = [];
|
|
11
|
+
let colorIdx = 0;
|
|
12
|
+
for (let i = 0; i < text.length; i++) {
|
|
13
|
+
const ch = text[i];
|
|
14
|
+
if (ch === " ") {
|
|
15
|
+
chars.push(ch);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
const color = GRADIENT[colorIdx % GRADIENT.length];
|
|
19
|
+
chars.push(_jsx(Text, { color: color, children: ch }, i));
|
|
20
|
+
colorIdx++;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return _jsx(Text, { children: chars });
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,YAAG,IAAI,IAAI,EAAE,GAAQ,IAC5C,IACF,CACP,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,IAAI,EAAoB;IAC9C,MAAM,KAAK,GAAsB,EAAE,CAAC;IACpC,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;YACnD,KAAK,CAAC,IAAI,CACR,KAAC,IAAI,IAAS,KAAK,EAAE,KAAK,YACvB,EAAE,IADM,CAAC,CAEL,CACR,CAAC;YACF,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC;IACD,OAAO,KAAC,IAAI,cAAE,KAAK,GAAQ,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface BootBannerOptions {
|
|
2
|
+
subtitle: string;
|
|
3
|
+
bossModel: string;
|
|
4
|
+
workerModel: string;
|
|
5
|
+
}
|
|
6
|
+
/** Print the GG Boss boot banner to stdout. Clears screen first. */
|
|
7
|
+
export declare function printBootBanner(opts: BootBannerOptions): void;
|
|
8
|
+
/** Print the project list under the banner. */
|
|
9
|
+
export declare function printProjectList(projects: {
|
|
10
|
+
name: string;
|
|
11
|
+
cwd: string;
|
|
12
|
+
}[]): void;
|
|
13
|
+
export declare function printReady(workerCount: number): void;
|
|
14
|
+
export declare function printShutdown(): void;
|
|
15
|
+
//# sourceMappingURL=boot-banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boot-banner.d.ts","sourceRoot":"","sources":["../src/boot-banner.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAoB7D;AAED,+CAA+C;AAC/C,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,IAAI,CAYhF;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAiBpD;AAED,wBAAgB,aAAa,IAAI,IAAI,CAEpC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { AUTHOR, BRAND, COLORS, GRADIENT, LOGO_GAP, LOGO_LINES, VERSION, clearScreen, } from "./branding.js";
|
|
3
|
+
function gradientText(text) {
|
|
4
|
+
let result = "";
|
|
5
|
+
let colorIdx = 0;
|
|
6
|
+
for (const ch of text) {
|
|
7
|
+
if (ch === " ") {
|
|
8
|
+
result += ch;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
const color = GRADIENT[colorIdx % GRADIENT.length];
|
|
12
|
+
result += chalk.hex(color)(ch);
|
|
13
|
+
colorIdx++;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
/** Print the GG Boss boot banner to stdout. Clears screen first. */
|
|
19
|
+
export function printBootBanner(opts) {
|
|
20
|
+
clearScreen();
|
|
21
|
+
process.stdout.write("\n");
|
|
22
|
+
process.stdout.write(` ${gradientText(LOGO_LINES[0])}${LOGO_GAP}` +
|
|
23
|
+
chalk.hex(COLORS.primary).bold(BRAND) +
|
|
24
|
+
chalk.hex(COLORS.textDim)(` v${VERSION}`) +
|
|
25
|
+
chalk.hex(COLORS.textDim)(" · By ") +
|
|
26
|
+
chalk.hex(COLORS.text).bold(AUTHOR) +
|
|
27
|
+
"\n");
|
|
28
|
+
process.stdout.write(` ${gradientText(LOGO_LINES[1])}${LOGO_GAP}` + chalk.hex(COLORS.accent)(opts.subtitle) + "\n");
|
|
29
|
+
process.stdout.write(` ${gradientText(LOGO_LINES[2])}${LOGO_GAP}` +
|
|
30
|
+
chalk.hex(COLORS.textDim)(`Boss ${opts.bossModel} · Workers ${opts.workerModel}`) +
|
|
31
|
+
"\n");
|
|
32
|
+
process.stdout.write("\n");
|
|
33
|
+
}
|
|
34
|
+
/** Print the project list under the banner. */
|
|
35
|
+
export function printProjectList(projects) {
|
|
36
|
+
for (const p of projects) {
|
|
37
|
+
const home = process.env.HOME ?? "";
|
|
38
|
+
const display = home && p.cwd.startsWith(home) ? "~" + p.cwd.slice(home.length) : p.cwd;
|
|
39
|
+
process.stdout.write(" " +
|
|
40
|
+
chalk.hex(COLORS.primary)(p.name.padEnd(20)) +
|
|
41
|
+
chalk.hex(COLORS.textDim)(display) +
|
|
42
|
+
"\n");
|
|
43
|
+
}
|
|
44
|
+
process.stdout.write("\n");
|
|
45
|
+
}
|
|
46
|
+
export function printReady(workerCount) {
|
|
47
|
+
process.stdout.write(chalk.hex(COLORS.success)(" Ready. ") +
|
|
48
|
+
chalk.hex(COLORS.textDim)(`${workerCount} worker${workerCount === 1 ? "" : "s"} initialized.`) +
|
|
49
|
+
"\n");
|
|
50
|
+
process.stdout.write("\n");
|
|
51
|
+
process.stdout.write(chalk.hex(COLORS.textDim)(" :quit ") +
|
|
52
|
+
chalk.hex(COLORS.textDim)("exit") +
|
|
53
|
+
chalk.hex(COLORS.textDim)(" Ctrl+C ") +
|
|
54
|
+
chalk.hex(COLORS.textDim)("interrupt") +
|
|
55
|
+
"\n");
|
|
56
|
+
process.stdout.write("\n");
|
|
57
|
+
}
|
|
58
|
+
export function printShutdown() {
|
|
59
|
+
process.stdout.write("\n" + chalk.hex(COLORS.textDim)("Shutting down...") + "\n");
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=boot-banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boot-banner.js","sourceRoot":"","sources":["../src/boot-banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,MAAM,EACN,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,GACZ,MAAM,eAAe,CAAC;AAEvB,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,KAAK,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;QACtB,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACf,MAAM,IAAI,EAAE,CAAC;QACf,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;YAC/B,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAQD,oEAAoE;AACpE,MAAM,UAAU,eAAe,CAAC,IAAuB;IACrD,WAAW,EAAE,CAAC;IACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,KAAK,YAAY,CAAC,UAAU,CAAC,CAAC,CAAE,CAAC,GAAG,QAAQ,EAAE;QAC5C,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,K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AAM,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface BossFooterProps {
|
|
3
|
+
bossModel: string;
|
|
4
|
+
workerModel: string;
|
|
5
|
+
/** Total input tokens of the boss's last turn — drives the context bar. */
|
|
6
|
+
tokensIn: number;
|
|
7
|
+
exitPending: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Footer for gg-boss that mirrors ggcoder's Footer visual style — context bar
|
|
11
|
+
* with partial-block precision, percent, then BOTH models displayed in the
|
|
12
|
+
* same bold/coloured treatment so neither feels secondary.
|
|
13
|
+
*/
|
|
14
|
+
export declare function BossFooter({ bossModel, workerModel, tokensIn, exitPending, }: BossFooterProps): React.ReactElement;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=boss-footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boss-footer.d.ts","sourceRoot":"","sources":["../src/boss-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA8B1B,UAAU,eAAe;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,GACZ,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAgEtC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Text, Box } from "ink";
|
|
4
|
+
import { useTheme } from "@kenkaiiii/ggcoder/ui/theme";
|
|
5
|
+
import { getContextWindow } from "@kenkaiiii/ggcoder";
|
|
6
|
+
const PARTIAL_BLOCKS = [" ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"];
|
|
7
|
+
const LIGHT_SHADE = "░";
|
|
8
|
+
const SHORT_MODELS = {
|
|
9
|
+
"claude-opus-4-7": "Opus",
|
|
10
|
+
"claude-sonnet-4-6": "Sonnet",
|
|
11
|
+
"claude-haiku-4-5": "Haiku",
|
|
12
|
+
"claude-haiku-4-5-20251001": "Haiku",
|
|
13
|
+
"gpt-5.5": "GPT-5.5",
|
|
14
|
+
"gpt-5.5-pro": "GPT-5.5 Pro",
|
|
15
|
+
"gpt-5.4": "GPT-5.4",
|
|
16
|
+
"gpt-5.4-mini": "GPT-5.4 Mini",
|
|
17
|
+
"gpt-5.3-codex": "GPT-5.3 Codex",
|
|
18
|
+
};
|
|
19
|
+
function shortModel(model) {
|
|
20
|
+
return SHORT_MODELS[model] ?? model;
|
|
21
|
+
}
|
|
22
|
+
function getContextPercent(model, tokensIn) {
|
|
23
|
+
const limit = getContextWindow(model);
|
|
24
|
+
if (!limit || tokensIn === 0)
|
|
25
|
+
return 0;
|
|
26
|
+
return Math.round((tokensIn / limit) * 100);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Footer for gg-boss that mirrors ggcoder's Footer visual style — context bar
|
|
30
|
+
* with partial-block precision, percent, then BOTH models displayed in the
|
|
31
|
+
* same bold/coloured treatment so neither feels secondary.
|
|
32
|
+
*/
|
|
33
|
+
export function BossFooter({ bossModel, workerModel, tokensIn, exitPending, }) {
|
|
34
|
+
const theme = useTheme();
|
|
35
|
+
if (exitPending) {
|
|
36
|
+
return (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: theme.warning, children: "Press Ctrl+C again to exit" }) }));
|
|
37
|
+
}
|
|
38
|
+
const contextPct = getContextPercent(bossModel, tokensIn);
|
|
39
|
+
const contextColor = contextPct >= 80 ? theme.error : contextPct >= 50 ? theme.warning : theme.success;
|
|
40
|
+
const sep = _jsx(Text, { color: theme.border, children: " │ " });
|
|
41
|
+
// Context bar — same partial-block precision as ggcoder's Footer.
|
|
42
|
+
const barWidth = 8;
|
|
43
|
+
const fillFloat = Math.min((contextPct / 100) * barWidth, barWidth);
|
|
44
|
+
const barChars = [];
|
|
45
|
+
for (let i = 0; i < barWidth; i++) {
|
|
46
|
+
const cellFill = Math.max(0, Math.min(1, fillFloat - i));
|
|
47
|
+
const eighths = Math.round(cellFill * 8);
|
|
48
|
+
if (eighths === 8) {
|
|
49
|
+
barChars.push(_jsx(Text, { color: contextColor, children: PARTIAL_BLOCKS[8] }, i));
|
|
50
|
+
}
|
|
51
|
+
else if (eighths > 0) {
|
|
52
|
+
barChars.push(_jsx(Text, { color: contextColor, children: PARTIAL_BLOCKS[eighths] }, i));
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
barChars.push(_jsx(Text, { color: theme.textDim, children: LIGHT_SHADE }, i));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return (_jsxs(Box, { paddingX: 1, children: [_jsx(Box, { flexGrow: 1 }), _jsxs(Box, { flexShrink: 0, children: [_jsx(Text, { children: barChars }), _jsxs(Text, { color: contextColor, children: [" ", contextPct, "%"] }), sep, _jsx(Text, { color: theme.textDim, children: "boss " }), _jsx(Text, { color: theme.primary, bold: true, children: shortModel(bossModel) }), sep, _jsx(Text, { color: theme.textDim, children: "workers " }), _jsx(Text, { color: theme.accent, bold: true, children: shortModel(workerModel) })] })] }));
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=boss-footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boss-footer.js","sourceRoot":"","sources":["../src/boss-footer.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC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I,CACX,KAAC,IAAI,IAAS,KAAK,EAAE,KAAK,CAAC,OAAO,YAC/B,WAAW,IADH,CAAC,CAEL,CACR,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,CACL,MAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,aACd,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,GAAI,EACpB,MAAC,GAAG,IAAC,UAAU,EAAE,CAAC,aAChB,KAAC,IAAI,cAAE,QAAQ,GAAQ,EACvB,MAAC,IAAI,IAAC,KAAK,EAAE,YAAY,kBAAI,UAAU,SAAS,EAC/C,GAAG,EACJ,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,OAAO,sBAAc,EACxC,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,kBAC7B,UAAU,CAAC,SAAS,CAAC,GACjB,EACN,GAAG,EACJ,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,OAAO,yBAAiB,EAC3C,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,kBAC5B,UAAU,CAAC,WAAW,CAAC,GACnB,IACH,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { ActivityPhase, RetryInfo } from "@kenkaiiii/ggcoder/ui";
|
|
2
|
+
import type { Message, Provider } from "@kenkaiiii/gg-ai";
|
|
3
|
+
import type { WorkerStatus, WorkerTurnSummary } from "./types.js";
|
|
4
|
+
export interface UserItem {
|
|
5
|
+
kind: "user";
|
|
6
|
+
id: string;
|
|
7
|
+
text: string;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
}
|
|
10
|
+
export interface AssistantItem {
|
|
11
|
+
kind: "assistant";
|
|
12
|
+
id: string;
|
|
13
|
+
text: string;
|
|
14
|
+
durationMs: number;
|
|
15
|
+
thinking?: string;
|
|
16
|
+
thinkingMs?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ToolItem {
|
|
19
|
+
kind: "tool";
|
|
20
|
+
id: string;
|
|
21
|
+
toolCallId: string;
|
|
22
|
+
name: string;
|
|
23
|
+
args: Record<string, unknown>;
|
|
24
|
+
isError: boolean;
|
|
25
|
+
durationMs: number;
|
|
26
|
+
result: string;
|
|
27
|
+
details?: unknown;
|
|
28
|
+
}
|
|
29
|
+
export interface WorkerEventItem {
|
|
30
|
+
kind: "worker_event";
|
|
31
|
+
id: string;
|
|
32
|
+
project: string;
|
|
33
|
+
status: WorkerStatus;
|
|
34
|
+
finalText: string;
|
|
35
|
+
toolsUsed: {
|
|
36
|
+
name: string;
|
|
37
|
+
ok: boolean;
|
|
38
|
+
}[];
|
|
39
|
+
turnIndex: number;
|
|
40
|
+
timestamp: string;
|
|
41
|
+
}
|
|
42
|
+
export interface WorkerErrorItem {
|
|
43
|
+
kind: "worker_error";
|
|
44
|
+
id: string;
|
|
45
|
+
project: string;
|
|
46
|
+
message: string;
|
|
47
|
+
timestamp: string;
|
|
48
|
+
}
|
|
49
|
+
export interface InfoItem {
|
|
50
|
+
kind: "info";
|
|
51
|
+
id: string;
|
|
52
|
+
text: string;
|
|
53
|
+
level?: "info" | "warning" | "error";
|
|
54
|
+
}
|
|
55
|
+
export type HistoryItem = UserItem | AssistantItem | ToolItem | WorkerEventItem | WorkerErrorItem | InfoItem;
|
|
56
|
+
export interface StreamingTool {
|
|
57
|
+
toolCallId: string;
|
|
58
|
+
name: string;
|
|
59
|
+
args: Record<string, unknown>;
|
|
60
|
+
status: "running" | "done" | "error";
|
|
61
|
+
startedAt: number;
|
|
62
|
+
durationMs?: number;
|
|
63
|
+
result?: string;
|
|
64
|
+
details?: unknown;
|
|
65
|
+
}
|
|
66
|
+
export interface StreamingTurn {
|
|
67
|
+
text: string;
|
|
68
|
+
thinking: string;
|
|
69
|
+
thinkingMs: number;
|
|
70
|
+
tools: StreamingTool[];
|
|
71
|
+
startedAt: number;
|
|
72
|
+
thinkingStartedAt: number | null;
|
|
73
|
+
}
|
|
74
|
+
export interface CompactionSnapshot {
|
|
75
|
+
state: "running" | "done";
|
|
76
|
+
originalCount: number;
|
|
77
|
+
newCount: number;
|
|
78
|
+
tokensBefore: number;
|
|
79
|
+
tokensAfter: number;
|
|
80
|
+
}
|
|
81
|
+
export interface WorkerView {
|
|
82
|
+
name: string;
|
|
83
|
+
cwd: string;
|
|
84
|
+
status: WorkerStatus;
|
|
85
|
+
lastSummary?: WorkerTurnSummary;
|
|
86
|
+
}
|
|
87
|
+
export interface BossUiState {
|
|
88
|
+
bossProvider: Provider;
|
|
89
|
+
bossModel: string;
|
|
90
|
+
workerProvider: Provider;
|
|
91
|
+
workerModel: string;
|
|
92
|
+
/** Providers the user is logged in to — controls which models the picker offers. */
|
|
93
|
+
loggedInProviders: Provider[];
|
|
94
|
+
history: HistoryItem[];
|
|
95
|
+
/**
|
|
96
|
+
* Two-phase flush queue. Items here have already been REMOVED from the
|
|
97
|
+
* streaming live-area (so it has shrunk) but not yet committed to history.
|
|
98
|
+
* A useEffect in BossApp watches `flushGeneration` and calls
|
|
99
|
+
* `commitPendingFlush()` on the next render cycle, so Ink's log-update
|
|
100
|
+
* doesn't try to clear a tall live area AND write new Static lines in the
|
|
101
|
+
* same frame — which clips the bottom of long responses.
|
|
102
|
+
*/
|
|
103
|
+
pendingFlush: HistoryItem[];
|
|
104
|
+
flushGeneration: number;
|
|
105
|
+
streaming: StreamingTurn | null;
|
|
106
|
+
phase: "idle" | "working";
|
|
107
|
+
/** Fine-grained phase used by ActivityIndicator. */
|
|
108
|
+
activityPhase: ActivityPhase;
|
|
109
|
+
/** Most recent retry (provider overload, rate limit, etc.), null when not retrying. */
|
|
110
|
+
retryInfo: RetryInfo | null;
|
|
111
|
+
/** Live compaction status (or recent done-state) for the orchestrator's banner. */
|
|
112
|
+
compaction: CompactionSnapshot | null;
|
|
113
|
+
/** Cumulative input tokens from boss turn_end events. Drives footer context bar. */
|
|
114
|
+
bossInputTokens: number;
|
|
115
|
+
/** When the current boss turn started (for elapsed display). */
|
|
116
|
+
runStartMs: number | null;
|
|
117
|
+
workers: WorkerView[];
|
|
118
|
+
pendingUserMessages: number;
|
|
119
|
+
exitPending: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Scope pill in the input — "all" (default) or a specific worker name.
|
|
122
|
+
* Cycled with Tab; gets injected into every prompt the user sends.
|
|
123
|
+
*/
|
|
124
|
+
scope: string;
|
|
125
|
+
}
|
|
126
|
+
export declare function useBossState(): BossUiState;
|
|
127
|
+
export declare const bossStore: {
|
|
128
|
+
init(opts: {
|
|
129
|
+
bossProvider: Provider;
|
|
130
|
+
bossModel: string;
|
|
131
|
+
workerProvider: Provider;
|
|
132
|
+
workerModel: string;
|
|
133
|
+
loggedInProviders: Provider[];
|
|
134
|
+
workers: {
|
|
135
|
+
name: string;
|
|
136
|
+
cwd: string;
|
|
137
|
+
}[];
|
|
138
|
+
}): void;
|
|
139
|
+
setBossModel(provider: Provider, model: string): void;
|
|
140
|
+
setWorkerModel(provider: Provider, model: string): void;
|
|
141
|
+
setLoggedInProviders(providers: Provider[]): void;
|
|
142
|
+
appendUser(text: string): void;
|
|
143
|
+
appendInfo(text: string, level?: InfoItem["level"]): void;
|
|
144
|
+
setPendingMessages(n: number): void;
|
|
145
|
+
startStreaming(): void;
|
|
146
|
+
appendStreamText(text: string): void;
|
|
147
|
+
appendStreamThinking(text: string): void;
|
|
148
|
+
setActivityPhase(phase: ActivityPhase): void;
|
|
149
|
+
setRetryInfo(info: RetryInfo | null): void;
|
|
150
|
+
startCompaction(): void;
|
|
151
|
+
endCompaction(originalCount: number, newCount: number): void;
|
|
152
|
+
cancelCompaction(): void;
|
|
153
|
+
/** Read-only accessor for the orchestrator (which lives outside React). */
|
|
154
|
+
getInputTokens(): number;
|
|
155
|
+
setBossInputTokens(tokens: number): void;
|
|
156
|
+
startTool(toolCallId: string, name: string, args: Record<string, unknown>): void;
|
|
157
|
+
endTool(toolCallId: string, isError: boolean, durationMs: number, result: string, details?: unknown): void;
|
|
158
|
+
/**
|
|
159
|
+
* Flush any pending streaming text into the pendingFlush queue. The actual
|
|
160
|
+
* commit to history happens on the next render cycle (two-phase flush) so
|
|
161
|
+
* Ink doesn't clip long responses.
|
|
162
|
+
* Called on tool_call_start and turn_end so text/tool order is preserved.
|
|
163
|
+
*/
|
|
164
|
+
flushPendingText(): void;
|
|
165
|
+
/**
|
|
166
|
+
* Phase 2 of the two-phase flush. Move queued items into history. Called by
|
|
167
|
+
* a useEffect in BossApp when flushGeneration changes — guaranteed to run
|
|
168
|
+
* AFTER React has painted the live-area shrinkage from phase 1.
|
|
169
|
+
*/
|
|
170
|
+
commitPendingFlush(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Called when the user interrupts (ESC / Ctrl+C while running). Stops all
|
|
173
|
+
* in-flight running tools, queueing them in pendingFlush as errored "Stopped."
|
|
174
|
+
* entries — matches ggcoder's onAborted behavior so the user sees the same
|
|
175
|
+
* visual feedback for an aborted run.
|
|
176
|
+
*/
|
|
177
|
+
interruptStreaming(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Tear down the streaming session. By this point, tool_call_end and turn_end
|
|
180
|
+
* handlers have already flushed text + tools into pendingFlush in proper order.
|
|
181
|
+
* Anything left is a final text tail (no tool followed it) — also goes through
|
|
182
|
+
* the two-phase queue so it doesn't clip.
|
|
183
|
+
*/
|
|
184
|
+
finishStreaming(): void;
|
|
185
|
+
setWorkerStatus(name: string, status: WorkerStatus): void;
|
|
186
|
+
appendWorkerEvent(summary: WorkerTurnSummary): void;
|
|
187
|
+
appendWorkerError(project: string, message: string, timestamp: string): void;
|
|
188
|
+
setScope(scope: string): void;
|
|
189
|
+
/** Cycle scope through ["all", ...worker names]. Wraps around. */
|
|
190
|
+
cycleScope(): void;
|
|
191
|
+
setExitPending(pending: boolean): void;
|
|
192
|
+
reset(): void;
|
|
193
|
+
/**
|
|
194
|
+
* Rebuild the visible chat history from a persisted Message[] (boss session
|
|
195
|
+
* resume). Pairs assistant tool_use blocks with their tool_result blocks
|
|
196
|
+
* so completed tools render in scrollback as if they'd just happened.
|
|
197
|
+
*/
|
|
198
|
+
restoreHistory(messages: Message[]): void;
|
|
199
|
+
/** /clear handler: wipe history but keep workers, model info, etc. */
|
|
200
|
+
clearHistory(): void;
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=boss-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boss-store.d.ts","sourceRoot":"","sources":["../src/boss-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAEV,OAAO,EACP,QAAQ,EAIT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAiClE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB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