jeo-code 0.1.0 → 0.4.4
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.ja.md +160 -0
- package/README.ko.md +160 -0
- package/README.md +115 -297
- package/README.zh.md +160 -0
- package/package.json +11 -6
- package/scripts/install.sh +28 -28
- package/scripts/uninstall.sh +17 -15
- package/src/AGENTS.md +50 -0
- package/src/agent/AGENTS.md +49 -0
- package/src/agent/bash-fixups.ts +103 -0
- package/src/agent/compaction.ts +410 -19
- package/src/agent/config-schema.ts +119 -5
- package/src/agent/context-files.ts +314 -17
- package/src/agent/dev/AGENTS.md +36 -0
- package/src/agent/dev/advanced-analyzer.ts +12 -0
- package/src/agent/dev/evolution-bridge.ts +82 -0
- package/src/agent/dev/evolution-logger.ts +41 -0
- package/src/agent/dev/self-analysis.ts +64 -0
- package/src/agent/dev/self-improve.ts +24 -0
- package/src/agent/dev/spec-automation.ts +49 -0
- package/src/agent/engine.ts +804 -54
- package/src/agent/hooks.ts +273 -0
- package/src/agent/loop.ts +21 -1
- package/src/agent/memory.ts +201 -0
- package/src/agent/model-recency.ts +32 -0
- package/src/agent/output-minimizer.ts +108 -0
- package/src/agent/output-util.ts +64 -0
- package/src/agent/plan.ts +187 -0
- package/src/agent/seed.ts +52 -0
- package/src/agent/session.ts +235 -21
- package/src/agent/state.ts +286 -39
- package/src/agent/step-budget.ts +232 -0
- package/src/agent/subagents.ts +223 -26
- package/src/agent/task-tool.ts +272 -0
- package/src/agent/todo-tool.ts +87 -0
- package/src/agent/tokenizer.ts +117 -0
- package/src/agent/tool-registry.ts +54 -0
- package/src/agent/tools.ts +562 -103
- package/src/agent/web-search.ts +538 -0
- package/src/ai/AGENTS.md +44 -0
- package/src/ai/index.ts +1 -0
- package/src/ai/model-catalog-compat.ts +3 -1
- package/src/ai/model-catalog.ts +74 -9
- package/src/ai/model-discovery.ts +215 -17
- package/src/ai/model-manager.ts +346 -32
- package/src/ai/model-picker.ts +1 -1
- package/src/ai/model-registry.ts +4 -2
- package/src/ai/pricing.ts +84 -0
- package/src/ai/provider-registry.ts +23 -0
- package/src/ai/provider-status.ts +60 -16
- package/src/ai/providers/AGENTS.md +42 -0
- package/src/ai/providers/anthropic.ts +250 -31
- package/src/ai/providers/antigravity.ts +219 -0
- package/src/ai/providers/errors.ts +15 -1
- package/src/ai/providers/gemini.ts +196 -13
- package/src/ai/providers/ollama.ts +37 -7
- package/src/ai/providers/openai-responses.ts +173 -0
- package/src/ai/providers/openai.ts +64 -12
- package/src/ai/sse.ts +4 -1
- package/src/ai/types.ts +18 -1
- package/src/auth/AGENTS.md +41 -0
- package/src/auth/callback-server.ts +6 -1
- package/src/auth/flows/AGENTS.md +32 -0
- package/src/auth/flows/antigravity.ts +151 -0
- package/src/auth/flows/google-project.ts +190 -0
- package/src/auth/flows/google.ts +39 -18
- package/src/auth/flows/index.ts +15 -5
- package/src/auth/flows/openai.ts +2 -2
- package/src/auth/oauth.ts +8 -0
- package/src/auth/refresh.ts +44 -27
- package/src/auth/storage.ts +149 -26
- package/src/auth/types.ts +1 -1
- package/src/autopilot.ts +362 -0
- package/src/bun-imports.d.ts +4 -0
- package/src/cli/AGENTS.md +39 -0
- package/src/cli/runner.ts +148 -14
- package/src/cli.ts +13 -4
- package/src/commands/AGENTS.md +40 -0
- package/src/commands/approve.ts +62 -3
- package/src/commands/auth.ts +167 -25
- package/src/commands/chat.ts +37 -8
- package/src/commands/deep-interview.ts +633 -175
- package/src/commands/doctor.ts +84 -37
- package/src/commands/evolve-core.ts +18 -0
- package/src/commands/evolve.ts +2 -1
- package/src/commands/export.ts +176 -0
- package/src/commands/gjc.ts +52 -0
- package/src/commands/launch.ts +3549 -240
- package/src/commands/mcp.ts +3 -3
- package/src/commands/ooo-seed.ts +19 -0
- package/src/commands/ralplan.ts +253 -35
- package/src/commands/resume.ts +1 -1
- package/src/commands/session.ts +183 -0
- package/src/commands/setup-helpers.ts +10 -3
- package/src/commands/setup.ts +57 -16
- package/src/commands/skills.ts +78 -18
- package/src/commands/state.ts +198 -0
- package/src/commands/status.ts +84 -0
- package/src/commands/team.ts +340 -212
- package/src/commands/ultragoal.ts +122 -61
- package/src/commands/update.ts +244 -0
- package/src/ledger.ts +270 -0
- package/src/mcp/AGENTS.md +38 -0
- package/src/mcp/server.ts +115 -14
- package/src/mcp/tools.ts +42 -22
- package/src/md-modules.d.ts +4 -0
- package/src/prompts/AGENTS.md +41 -0
- package/src/prompts/agents/AGENTS.md +35 -0
- package/src/prompts/agents/architect.md +35 -0
- package/src/prompts/agents/critic.md +37 -0
- package/src/prompts/agents/executor.md +36 -0
- package/src/prompts/agents/planner.md +37 -0
- package/src/prompts/skills/AGENTS.md +36 -0
- package/src/prompts/skills/deep-dive/AGENTS.md +31 -0
- package/src/prompts/skills/deep-dive/SKILL.md +13 -0
- package/src/prompts/skills/deep-interview/AGENTS.md +31 -0
- package/src/prompts/skills/deep-interview/SKILL.md +12 -0
- package/src/prompts/skills/gjc/AGENTS.md +31 -0
- package/src/prompts/skills/gjc/SKILL.md +15 -0
- package/src/prompts/skills/ralplan/AGENTS.md +31 -0
- package/src/prompts/skills/ralplan/SKILL.md +11 -0
- package/src/prompts/skills/team/AGENTS.md +31 -0
- package/src/prompts/skills/team/SKILL.md +11 -0
- package/src/prompts/skills/ultragoal/AGENTS.md +31 -0
- package/src/prompts/skills/ultragoal/SKILL.md +11 -0
- package/src/skills/AGENTS.md +38 -0
- package/src/skills/catalog.ts +565 -31
- package/src/tui/AGENTS.md +43 -0
- package/src/tui/app.ts +1181 -92
- package/src/tui/components/AGENTS.md +42 -0
- package/src/tui/components/ascii-art.ts +257 -15
- package/src/tui/components/autocomplete.ts +98 -16
- package/src/tui/components/autopilot-status.ts +65 -0
- package/src/tui/components/category-index.ts +49 -0
- package/src/tui/components/code-view.ts +54 -11
- package/src/tui/components/color.ts +171 -2
- package/src/tui/components/config-panel.ts +82 -15
- package/src/tui/components/duration.ts +38 -0
- package/src/tui/components/evolution.ts +3 -3
- package/src/tui/components/footer.ts +91 -42
- package/src/tui/components/forge.ts +426 -31
- package/src/tui/components/hints.ts +54 -0
- package/src/tui/components/hud.ts +73 -0
- package/src/tui/components/index.ts +4 -0
- package/src/tui/components/input-box.ts +150 -0
- package/src/tui/components/layout.ts +11 -3
- package/src/tui/components/live-model-picker.ts +108 -0
- package/src/tui/components/markdown-table.ts +140 -0
- package/src/tui/components/markdown-text.ts +97 -0
- package/src/tui/components/meter.ts +4 -1
- package/src/tui/components/model-picker.ts +3 -2
- package/src/tui/components/provider-picker.ts +3 -2
- package/src/tui/components/section.ts +70 -0
- package/src/tui/components/select-list.ts +40 -10
- package/src/tui/components/skill-picker.ts +25 -0
- package/src/tui/components/slash.ts +244 -21
- package/src/tui/components/status.ts +272 -11
- package/src/tui/components/step-timeline.ts +218 -0
- package/src/tui/components/stream.ts +26 -9
- package/src/tui/components/themes.ts +212 -6
- package/src/tui/components/todo-card.ts +47 -0
- package/src/tui/components/tool-list.ts +58 -12
- package/src/tui/components/transcript.ts +120 -0
- package/src/tui/components/update-box.ts +31 -0
- package/src/tui/components/welcome.ts +162 -0
- package/src/tui/components/width.ts +163 -0
- package/src/tui/monitoring/AGENTS.md +31 -0
- package/src/tui/monitoring/hud-view.ts +55 -0
- package/src/tui/renderer.ts +112 -3
- package/src/tui/terminal.ts +40 -33
- package/src/util/AGENTS.md +39 -0
- package/src/util/clipboard-image.ts +118 -0
- package/src/util/env.ts +12 -0
- package/src/util/provider-error.ts +78 -0
- package/src/util/retry.ts +91 -6
- package/src/util/update-check.ts +64 -0
- package/src/commands/models.ts +0 -104
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
stepsToNextStage,
|
|
7
|
-
evolutionTrack,
|
|
8
|
-
EVOLUTION_STAGE_COUNT,
|
|
9
|
-
} from "./evolution";
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import * as os from "node:os";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { stageIndexForStep, evolutionTrack } from "./evolution";
|
|
5
|
+
import { formatCost } from "../../ai/pricing";
|
|
10
6
|
|
|
11
7
|
export interface FooterData {
|
|
12
8
|
model: string;
|
|
13
9
|
provider?: string;
|
|
10
|
+
/** Drives the evolution-stage tag only — never rendered as a `step n/m` counter
|
|
11
|
+
* (the dynamic step budget keeps extending the denominator, so the raw count
|
|
12
|
+
* carries no information — user feedback). */
|
|
14
13
|
step?: number;
|
|
15
14
|
maxSteps?: number;
|
|
16
15
|
elapsedMs?: number;
|
|
@@ -19,10 +18,43 @@ export interface FooterData {
|
|
|
19
18
|
showStage?: boolean;
|
|
20
19
|
/** Use ASCII track markers in the stage tag (default unicode). */
|
|
21
20
|
unicode?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
|
|
21
|
+
/** Colorize the stage track (default true). Set false for the mono theme. */
|
|
22
|
+
color?: boolean;
|
|
23
|
+
/** Estimated context usage in tokens, when known. */
|
|
24
|
+
contextUsedTokens?: number;
|
|
25
|
+
/** Provider/model context window in tokens, when known. */
|
|
26
|
+
contextMaxTokens?: number;
|
|
27
|
+
cwd?: string;
|
|
28
|
+
branch?: string;
|
|
29
|
+
/** Uncommitted-change count for the `⑂ branch ?N` dirty flag (gjc parity); omit/0 = clean. */
|
|
30
|
+
dirtyCount?: number;
|
|
31
|
+
/** Live USD cost for the turn (price table × usage); omit when the model has no known price. */
|
|
32
|
+
costUsd?: number;
|
|
33
|
+
autoCompact?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function formatTokens(n: number): string {
|
|
37
|
+
if (n >= 1_000_000) {
|
|
38
|
+
let formatted = (n / 1_000_000).toFixed(1);
|
|
39
|
+
if (formatted.endsWith(".0")) {
|
|
40
|
+
formatted = formatted.slice(0, -2);
|
|
41
|
+
}
|
|
42
|
+
return formatted + "M";
|
|
43
|
+
}
|
|
44
|
+
if (n >= 1000) {
|
|
45
|
+
return Math.round(n / 1000) + "k";
|
|
46
|
+
}
|
|
47
|
+
return Math.round(n).toString();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function middleTruncate(s: string, maxLen: number, unicode: boolean): string {
|
|
51
|
+
if (s.length <= maxLen) return s;
|
|
52
|
+
const ellipsis = unicode ? "…" : "...";
|
|
53
|
+
const rem = maxLen - ellipsis.length;
|
|
54
|
+
const leftLen = Math.ceil(rem / 2);
|
|
55
|
+
const rightLen = Math.floor(rem / 2);
|
|
56
|
+
const rightPart = rightLen > 0 ? s.slice(-rightLen) : "";
|
|
57
|
+
return s.slice(0, leftLen) + ellipsis + rightPart;
|
|
26
58
|
}
|
|
27
59
|
|
|
28
60
|
export function renderFooter(d: FooterData): string {
|
|
@@ -38,46 +70,58 @@ export function renderFooter(d: FooterData): string {
|
|
|
38
70
|
}
|
|
39
71
|
}
|
|
40
72
|
|
|
41
|
-
//
|
|
42
|
-
if (d.
|
|
43
|
-
|
|
44
|
-
|
|
73
|
+
// CWD & Branch
|
|
74
|
+
if (d.cwd !== undefined) {
|
|
75
|
+
let displayCwd = d.cwd;
|
|
76
|
+
const home = os.homedir();
|
|
77
|
+
if (home) {
|
|
78
|
+
if (displayCwd === home) {
|
|
79
|
+
displayCwd = "~";
|
|
80
|
+
} else if (displayCwd.startsWith(home + "/") || displayCwd.startsWith(home + "\\")) {
|
|
81
|
+
displayCwd = "~" + displayCwd.slice(home.length);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
displayCwd = middleTruncate(displayCwd, 32, unicode);
|
|
85
|
+
if (d.branch) {
|
|
86
|
+
const dirty = d.dirtyCount && d.dirtyCount > 0 ? ` ?${d.dirtyCount}` : "";
|
|
87
|
+
parts.push(`${displayCwd} (${d.branch}${dirty})`);
|
|
45
88
|
} else {
|
|
46
|
-
parts.push(
|
|
89
|
+
parts.push(displayCwd);
|
|
47
90
|
}
|
|
48
91
|
}
|
|
49
92
|
|
|
93
|
+
// No `step n/m` segment (and no step-derived eta/evo%): the dynamic step budget
|
|
94
|
+
// keeps extending the denominator, so those counters carried no information
|
|
95
|
+
// (user feedback). `step`/`maxSteps` still drive the stage tag below.
|
|
96
|
+
|
|
50
97
|
// Elapsed
|
|
51
98
|
if (d.elapsedMs !== undefined) {
|
|
52
99
|
const secs = Math.round(d.elapsedMs / 1000);
|
|
53
100
|
parts.push(`${secs}s`);
|
|
54
101
|
}
|
|
55
102
|
|
|
56
|
-
// Estimated
|
|
57
|
-
if (
|
|
58
|
-
d.
|
|
59
|
-
|
|
60
|
-
d.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (idx < EVOLUTION_STAGE_COUNT - 1) {
|
|
75
|
-
const remaining = stepsToNextStage(d.step, d.maxSteps);
|
|
76
|
-
const arrow = unicode ? "\u2192" : "->";
|
|
77
|
-
parts.push(`evo ${pct}% ${arrow} ${nextStageName(d.step, d.maxSteps)} in ${remaining}`);
|
|
103
|
+
// Estimated context usage (opt-in): cheap footer signal for context growth.
|
|
104
|
+
if (d.contextUsedTokens !== undefined) {
|
|
105
|
+
const used = Math.max(0, Math.round(d.contextUsedTokens));
|
|
106
|
+
let ctxStr = "";
|
|
107
|
+
if (d.contextMaxTokens && d.contextMaxTokens > 0) {
|
|
108
|
+
const max = Math.round(d.contextMaxTokens);
|
|
109
|
+
const pct = Math.min(999, Math.round((used / max) * 100));
|
|
110
|
+
ctxStr = `ctx ${pct}%/${formatTokens(max)}`;
|
|
111
|
+
if (d.autoCompact) {
|
|
112
|
+
ctxStr += "(auto)";
|
|
113
|
+
}
|
|
114
|
+
if (d.color !== false) {
|
|
115
|
+
if (pct >= 85) {
|
|
116
|
+
ctxStr = chalk.red(ctxStr);
|
|
117
|
+
} else if (pct >= 60) {
|
|
118
|
+
ctxStr = chalk.yellow(ctxStr);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
78
121
|
} else {
|
|
79
|
-
|
|
122
|
+
ctxStr = `ctx ~${formatTokens(used)}`;
|
|
80
123
|
}
|
|
124
|
+
parts.push(ctxStr);
|
|
81
125
|
}
|
|
82
126
|
|
|
83
127
|
// Session ID
|
|
@@ -85,10 +129,15 @@ export function renderFooter(d: FooterData): string {
|
|
|
85
129
|
parts.push(d.sessionId.slice(0, 8));
|
|
86
130
|
}
|
|
87
131
|
|
|
132
|
+
// Live turn cost (gjc parity): only when a known price produced a figure.
|
|
133
|
+
if (d.costUsd !== undefined && Number.isFinite(d.costUsd) && d.costUsd > 0) {
|
|
134
|
+
parts.push(formatCost(d.costUsd));
|
|
135
|
+
}
|
|
136
|
+
|
|
88
137
|
// Compact evolution-stage tag, e.g. "●●●○○ Tool User (Homo Habilis) [3/5]".
|
|
89
138
|
if (d.showStage !== false && d.step !== undefined && d.maxSteps !== undefined) {
|
|
90
139
|
const idx = stageIndexForStep(d.step, d.maxSteps);
|
|
91
|
-
parts.push(evolutionTrack(idx, { color:
|
|
140
|
+
parts.push(evolutionTrack(idx, { color: d.color !== false, unicode }));
|
|
92
141
|
}
|
|
93
142
|
|
|
94
143
|
return parts.join(" · ");
|