jeo-code 0.7.31 → 0.7.32
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/CHANGELOG.md +23 -0
- package/README.ja.md +3 -1
- package/README.ko.md +3 -1
- package/README.md +3 -1
- package/README.zh.md +3 -1
- package/package.json +3 -3
- package/scripts/install.sh +19 -0
- package/scripts/uninstall.sh +2 -2
- package/src/agent/AGENTS.md +12 -0
- package/src/agent/ast-edit-tool.ts +123 -0
- package/src/agent/ast-file-scan.ts +62 -0
- package/src/agent/ast-grep-tool.ts +107 -0
- package/src/agent/ast-match.ts +241 -0
- package/src/agent/debug-session.ts +435 -0
- package/src/agent/debug-tool.ts +89 -0
- package/src/agent/engine.ts +69 -12
- package/src/agent/goal-tool.ts +57 -0
- package/src/agent/irc-tool.ts +71 -0
- package/src/agent/job-registry.ts +163 -0
- package/src/agent/job-tool.ts +106 -0
- package/src/agent/lsp-rename-tool.ts +108 -0
- package/src/agent/lsp-tool.ts +177 -0
- package/src/agent/session.ts +27 -0
- package/src/agent/subagent-registry.ts +40 -4
- package/src/agent/subagent-tool.ts +27 -7
- package/src/agent/subagents.ts +1 -1
- package/src/agent/task-tool.ts +27 -5
- package/src/agent/tools.ts +68 -1
- package/src/agent/ts-language-service.ts +173 -0
- package/src/commands/launch/agents-slash.ts +489 -0
- package/src/commands/launch/flags.ts +27 -9
- package/src/commands/launch/model-slash.ts +290 -0
- package/src/commands/launch/session-slash.ts +305 -0
- package/src/commands/launch/slash-handlers.ts +6 -0
- package/src/commands/launch/system-slash.ts +81 -0
- package/src/commands/launch.ts +208 -749
|
@@ -9,6 +9,9 @@ import { TOOL_PROTOCOL } from "../../agent/engine";
|
|
|
9
9
|
import { taskToolProtocolLine } from "../../agent/task-tool";
|
|
10
10
|
import { TODO_TOOL_PROTOCOL_LINE } from "../../agent/todo-tool";
|
|
11
11
|
import { SUBAGENT_TOOL_PROTOCOL_LINE } from "../../agent/subagent-tool";
|
|
12
|
+
import { JOB_TOOL_PROTOCOL_LINE } from "../../agent/job-tool";
|
|
13
|
+
import { IRC_TOOL_PROTOCOL_LINE } from "../../agent/irc-tool";
|
|
14
|
+
import { GOAL_TOOL_PROTOCOL_LINE } from "../../agent/goal-tool";
|
|
12
15
|
import { hotkeysLines, contextUsageLines } from "./slash-views";
|
|
13
16
|
import { describeModel, catalogMetadata } from "../../ai";
|
|
14
17
|
import { readGlobalConfig } from "../../agent/state";
|
|
@@ -46,6 +49,9 @@ export async function handleTools(ctx: SlashContext): Promise<SlashResult> {
|
|
|
46
49
|
lines.push(` ${taskToolProtocolLine(await readGlobalConfig())}`);
|
|
47
50
|
lines.push(` ${TODO_TOOL_PROTOCOL_LINE}`);
|
|
48
51
|
lines.push(` ${SUBAGENT_TOOL_PROTOCOL_LINE}`);
|
|
52
|
+
lines.push(` ${JOB_TOOL_PROTOCOL_LINE}`);
|
|
53
|
+
lines.push(` ${IRC_TOOL_PROTOCOL_LINE}`);
|
|
54
|
+
lines.push(` ${GOAL_TOOL_PROTOCOL_LINE}`);
|
|
49
55
|
return { lines };
|
|
50
56
|
}
|
|
51
57
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System/meta slash handlers (`/theme`, `/config` + `/settings`, `/evolve`)
|
|
3
|
+
* extracted from launch.ts.
|
|
4
|
+
*
|
|
5
|
+
* These commands used to have two byte-identical implementations in
|
|
6
|
+
* launch.ts — one in the one-shot control-command block, one in the
|
|
7
|
+
* interactive REPL loop — which is exactly the kind of drift that lets a fix
|
|
8
|
+
* to one copy silently miss the other. Following the `decideWikiSlash`
|
|
9
|
+
* pattern (see wiki-slash.ts), the decision/formatting logic lives here as
|
|
10
|
+
* pure (or narrowly side-effecting) functions; each launch.ts call site just
|
|
11
|
+
* applies the persistence/live-repaint side effects appropriate to its mode.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { readGlobalConfig } from "../../agent/state";
|
|
15
|
+
import { describeModel } from "../../ai";
|
|
16
|
+
import { formatConfigPanel } from "../../tui/components/config-panel";
|
|
17
|
+
import { EVOLUTION_STAGES } from "../../tui/components/ascii-art";
|
|
18
|
+
|
|
19
|
+
/** Outcome of parsing a `/theme [name]` command line. `lines` are printed verbatim. */
|
|
20
|
+
export interface ThemeDecision {
|
|
21
|
+
kind: "list" | "unknown" | "set";
|
|
22
|
+
lines: string[];
|
|
23
|
+
themeName?: string; // present when kind === "set"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Decide what `/theme [name]` should print/do, given the known themes and
|
|
28
|
+
* active name. Pure — callers apply the persistence + optional live-repaint
|
|
29
|
+
* side effects based on `kind`.
|
|
30
|
+
*/
|
|
31
|
+
export function decideThemeSlash(
|
|
32
|
+
cmd: string,
|
|
33
|
+
themes: readonly { name: string; description: string }[],
|
|
34
|
+
activeName: string,
|
|
35
|
+
): ThemeDecision {
|
|
36
|
+
const want = cmd.substring(6).trim().toLowerCase();
|
|
37
|
+
if (!want) {
|
|
38
|
+
const lines = ["TUI themes (set with /theme <name>, persists via ~/.jeo/config.json):"];
|
|
39
|
+
for (const t of themes) lines.push(` ${t.name === activeName ? "*" : " "} ${t.name.padEnd(10)} ${t.description}`);
|
|
40
|
+
return { kind: "list", lines };
|
|
41
|
+
}
|
|
42
|
+
if (!themes.some(t => t.name === want)) {
|
|
43
|
+
return { kind: "unknown", lines: [`Unknown theme '${want}'. Known: ${themes.map(t => t.name).join(", ")}.`] };
|
|
44
|
+
}
|
|
45
|
+
return { kind: "set", lines: [`Theme set to ${want} — saved to ~/.jeo/config.json`], themeName: want };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Build the `/config` (+ `/settings`) panel lines. Read-only, no side effects. */
|
|
49
|
+
export async function buildConfigPanelLines(opts: {
|
|
50
|
+
sessionModel?: string;
|
|
51
|
+
sessionThinking?: string;
|
|
52
|
+
sessionId?: string;
|
|
53
|
+
}): Promise<string[]> {
|
|
54
|
+
const cfgNow = await readGlobalConfig();
|
|
55
|
+
const label = opts.sessionModel || cfgNow.defaultModel;
|
|
56
|
+
const { resolved, provider } = await describeModel(label);
|
|
57
|
+
const lines = ["Effective runtime config:"];
|
|
58
|
+
for (const line of formatConfigPanel({
|
|
59
|
+
model: label,
|
|
60
|
+
resolved,
|
|
61
|
+
provider,
|
|
62
|
+
thinkingLevel: opts.sessionThinking ?? cfgNow.thinkingLevel ?? "medium",
|
|
63
|
+
ollamaBaseUrl: cfgNow.ollamaBaseUrl,
|
|
64
|
+
openaiBaseUrl: cfgNow.openaiBaseUrl,
|
|
65
|
+
requestMaxRetries: cfgNow.retry?.requestMaxRetries,
|
|
66
|
+
sessionId: opts.sessionId,
|
|
67
|
+
})) lines.push(line);
|
|
68
|
+
return lines;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Run the `/evolve` ascii-art animation sequence. */
|
|
72
|
+
export async function runEvolveSimulation(
|
|
73
|
+
animateAsciiArt: (stage: (typeof EVOLUTION_STAGES)[number], opts: { delayMs: number }) => Promise<void>,
|
|
74
|
+
): Promise<void> {
|
|
75
|
+
console.log("=== Initiating Evolutionary Simulation ===");
|
|
76
|
+
for (const stage of EVOLUTION_STAGES) {
|
|
77
|
+
console.log(`\nStage: ${stage.name}`);
|
|
78
|
+
await animateAsciiArt(stage, { delayMs: 40 });
|
|
79
|
+
}
|
|
80
|
+
console.log("\n=== Evolved to Singularity! ===");
|
|
81
|
+
}
|