@mcoda/codali 0.1.135-codali.2 → 0.1.135-codali.29
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 +53 -0
- package/ORCHESTRATION.md +308 -2
- package/README.md +184 -7
- package/config/AGENTS.md +11 -0
- package/config/deterministic/install-python.mjs +16 -0
- package/config/deterministic/node-worker.mjs +77 -0
- package/config/deterministic/python-worker.py +222 -0
- package/config/deterministic/requirements.txt +6 -0
- package/config/docdex-tools-0.2.99.json +3977 -0
- package/config/documents/install-python.mjs +16 -0
- package/config/documents/requirements.txt +10 -0
- package/config/documents/worker.py +267 -0
- package/config/orchestration.schema.json +94 -3
- package/config/skills/planning/SKILL.md +13 -0
- package/config/terminal-long-scenarios.v1.json +3 -2
- package/dist/cli/TerminalArtifacts.d.ts +5 -0
- package/dist/cli/TerminalArtifacts.d.ts.map +1 -0
- package/dist/cli/TerminalArtifacts.js +26 -0
- package/dist/cli/TerminalCommand.d.ts.map +1 -1
- package/dist/cli/TerminalCommand.js +411 -75
- package/dist/cli/TerminalCredentials.js +2 -2
- package/dist/cli/TerminalInput.d.ts +13 -0
- package/dist/cli/TerminalInput.d.ts.map +1 -1
- package/dist/cli/TerminalInput.js +55 -7
- package/dist/cli/TerminalModels.d.ts +6 -0
- package/dist/cli/TerminalModels.d.ts.map +1 -0
- package/dist/cli/TerminalModels.js +45 -0
- package/dist/cli/TerminalPlan.d.ts +40 -0
- package/dist/cli/TerminalPlan.d.ts.map +1 -0
- package/dist/cli/TerminalPlan.js +37 -0
- package/dist/cli/ToolsCommand.d.ts.map +1 -1
- package/dist/cli/ToolsCommand.js +8 -1
- package/dist/cli/tui/TerminalCells.d.ts +6 -0
- package/dist/cli/tui/TerminalCells.d.ts.map +1 -0
- package/dist/cli/tui/TerminalCells.js +47 -0
- package/dist/cli/tui/TerminalEditor.d.ts +22 -0
- package/dist/cli/tui/TerminalEditor.d.ts.map +1 -0
- package/dist/cli/tui/TerminalEditor.js +88 -0
- package/dist/cli/tui/TerminalLogo.d.ts +6 -0
- package/dist/cli/tui/TerminalLogo.d.ts.map +1 -0
- package/dist/cli/tui/TerminalLogo.js +26 -0
- package/dist/cli/tui/TerminalMarkdown.d.ts +5 -0
- package/dist/cli/tui/TerminalMarkdown.d.ts.map +1 -0
- package/dist/cli/tui/TerminalMarkdown.js +118 -0
- package/dist/cli/tui/TerminalPresentation.d.ts +4 -0
- package/dist/cli/tui/TerminalPresentation.d.ts.map +1 -0
- package/dist/cli/tui/TerminalPresentation.js +77 -0
- package/dist/cli/tui/TerminalScreen.d.ts +50 -0
- package/dist/cli/tui/TerminalScreen.d.ts.map +1 -0
- package/dist/cli/tui/TerminalScreen.js +137 -0
- package/dist/cli/tui/TerminalSelection.d.ts +15 -0
- package/dist/cli/tui/TerminalSelection.d.ts.map +1 -0
- package/dist/cli/tui/TerminalSelection.js +38 -0
- package/dist/cli/tui/TerminalTui.d.ts +82 -0
- package/dist/cli/tui/TerminalTui.d.ts.map +1 -0
- package/dist/cli/tui/TerminalTui.js +553 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -3
- package/dist/config/OrchestrationConfig.d.ts +33 -0
- package/dist/config/OrchestrationConfig.d.ts.map +1 -1
- package/dist/config/OrchestrationConfig.js +59 -1
- package/dist/connectors/media/MediaJobStore.d.ts +2 -1
- package/dist/connectors/media/MediaJobStore.d.ts.map +1 -1
- package/dist/connectors/media/MediaJobStore.js +11 -3
- package/dist/docdex/DocdexCatalog.d.ts +12 -0
- package/dist/docdex/DocdexCatalog.d.ts.map +1 -0
- package/dist/docdex/DocdexCatalog.js +30 -0
- package/dist/docdex/DocdexClient.d.ts +8 -2
- package/dist/docdex/DocdexClient.d.ts.map +1 -1
- package/dist/docdex/DocdexClient.js +86 -11
- package/dist/docdex/ManagedDocdex.d.ts +1 -0
- package/dist/docdex/ManagedDocdex.d.ts.map +1 -1
- package/dist/docdex/ManagedDocdex.js +25 -4
- package/dist/eval/TerminalWorkflowCorpus.d.ts +1 -1
- package/dist/eval/TerminalWorkflowCorpus.d.ts.map +1 -1
- package/dist/eval/TerminalWorkflowCorpus.js +9 -6
- package/dist/eval/TrustBenchmark.d.ts +94 -0
- package/dist/eval/TrustBenchmark.d.ts.map +1 -0
- package/dist/eval/TrustBenchmark.js +199 -0
- package/dist/eval/fixtures/ContractReviewProvider.d.ts +4 -0
- package/dist/eval/fixtures/ContractReviewProvider.d.ts.map +1 -0
- package/dist/eval/fixtures/ContractReviewProvider.js +10 -0
- package/dist/eval/fixtures/MixedMediaRecoveryJourney.d.ts +6 -0
- package/dist/eval/fixtures/MixedMediaRecoveryJourney.d.ts.map +1 -0
- package/dist/eval/fixtures/MixedMediaRecoveryJourney.js +145 -0
- package/dist/eval/fixtures/TerminalRecoveryJourney.d.ts.map +1 -1
- package/dist/eval/fixtures/TerminalRecoveryJourney.js +14 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/permissions/PermissionGate.d.ts +1 -1
- package/dist/permissions/PermissionGate.d.ts.map +1 -1
- package/dist/permissions/PermissionGate.js +40 -2
- package/dist/permissions/WorkspacePermissions.d.ts +11 -0
- package/dist/permissions/WorkspacePermissions.d.ts.map +1 -0
- package/dist/permissions/WorkspacePermissions.js +42 -0
- package/dist/providers/ConfiguredModelScope.d.ts +1 -0
- package/dist/providers/ConfiguredModelScope.d.ts.map +1 -1
- package/dist/providers/ConfiguredModelScope.js +17 -1
- package/dist/providers/ConfiguredProvider.d.ts +5 -0
- package/dist/providers/ConfiguredProvider.d.ts.map +1 -1
- package/dist/providers/ConfiguredProvider.js +38 -5
- package/dist/providers/ModelServiceError.d.ts +7 -2
- package/dist/providers/ModelServiceError.d.ts.map +1 -1
- package/dist/providers/ModelServiceError.js +28 -4
- package/dist/providers/OpenAiCompatibleProvider.d.ts.map +1 -1
- package/dist/providers/OpenAiCompatibleProvider.js +9 -1
- package/dist/providers/ProviderTypes.d.ts +2 -0
- package/dist/providers/ProviderTypes.d.ts.map +1 -1
- package/dist/providers/RequestUsage.d.ts +11 -0
- package/dist/providers/RequestUsage.d.ts.map +1 -0
- package/dist/providers/RequestUsage.js +33 -0
- package/dist/runtime/CodaliRuntime.d.ts +1 -0
- package/dist/runtime/CodaliRuntime.d.ts.map +1 -1
- package/dist/runtime/CodaliRuntime.js +1 -0
- package/dist/runtime/ComputedAnswer.d.ts +13 -0
- package/dist/runtime/ComputedAnswer.d.ts.map +1 -0
- package/dist/runtime/ComputedAnswer.js +75 -0
- package/dist/runtime/ContextCompression.d.ts +22 -0
- package/dist/runtime/ContextCompression.d.ts.map +1 -0
- package/dist/runtime/ContextCompression.js +53 -0
- package/dist/runtime/InspectionBudget.d.ts +8 -0
- package/dist/runtime/InspectionBudget.d.ts.map +1 -0
- package/dist/runtime/InspectionBudget.js +25 -0
- package/dist/runtime/InteractionContract.d.ts +42 -0
- package/dist/runtime/InteractionContract.d.ts.map +1 -0
- package/dist/runtime/InteractionContract.js +50 -0
- package/dist/runtime/InteractionRouter.d.ts +71 -0
- package/dist/runtime/InteractionRouter.d.ts.map +1 -0
- package/dist/runtime/InteractionRouter.js +134 -0
- package/dist/runtime/PreparedDocdex.d.ts +4 -0
- package/dist/runtime/PreparedDocdex.d.ts.map +1 -0
- package/dist/runtime/PreparedDocdex.js +55 -0
- package/dist/runtime/PreparedMemory.d.ts +3 -0
- package/dist/runtime/PreparedMemory.d.ts.map +1 -0
- package/dist/runtime/PreparedMemory.js +30 -0
- package/dist/runtime/ReviewContract.d.ts +35 -0
- package/dist/runtime/ReviewContract.d.ts.map +1 -0
- package/dist/runtime/ReviewContract.js +132 -0
- package/dist/runtime/ReviewCoordinator.d.ts +41 -0
- package/dist/runtime/ReviewCoordinator.d.ts.map +1 -0
- package/dist/runtime/ReviewCoordinator.js +132 -0
- package/dist/runtime/ReviewSource.d.ts +3 -0
- package/dist/runtime/ReviewSource.d.ts.map +1 -1
- package/dist/runtime/ReviewSource.js +17 -1
- package/dist/runtime/Runner.d.ts.map +1 -1
- package/dist/runtime/Runner.js +6 -1
- package/dist/runtime/SessionController.d.ts +51 -1
- package/dist/runtime/SessionController.d.ts.map +1 -1
- package/dist/runtime/SessionController.js +1146 -112
- package/dist/runtime/TaskReview.d.ts +25 -0
- package/dist/runtime/TaskReview.d.ts.map +1 -0
- package/dist/runtime/TaskReview.js +109 -0
- package/dist/runtime/TaskReviewContext.d.ts +37 -0
- package/dist/runtime/TaskReviewContext.d.ts.map +1 -1
- package/dist/runtime/TaskReviewContext.js +18 -2
- package/dist/runtime/UsageReconciliation.d.ts +28 -0
- package/dist/runtime/UsageReconciliation.d.ts.map +1 -0
- package/dist/runtime/UsageReconciliation.js +68 -0
- package/dist/runtime/VerificationCommand.d.ts +2 -0
- package/dist/runtime/VerificationCommand.d.ts.map +1 -1
- package/dist/runtime/VerificationCommand.js +28 -0
- package/dist/runtime/VerificationReceiptSelection.d.ts +15 -0
- package/dist/runtime/VerificationReceiptSelection.d.ts.map +1 -0
- package/dist/runtime/VerificationReceiptSelection.js +30 -0
- package/dist/session/AtomicState.d.ts.map +1 -1
- package/dist/session/AtomicState.js +15 -1
- package/dist/session/InstructionLoader.d.ts +5 -1
- package/dist/session/InstructionLoader.d.ts.map +1 -1
- package/dist/session/InstructionLoader.js +65 -19
- package/dist/session/SessionStoragePath.d.ts.map +1 -1
- package/dist/session/SessionStoragePath.js +28 -16
- package/dist/session/SessionStore.d.ts +5 -1
- package/dist/session/SessionStore.d.ts.map +1 -1
- package/dist/session/SessionStore.js +11 -2
- package/dist/session/SkillCatalog.d.ts +33 -0
- package/dist/session/SkillCatalog.d.ts.map +1 -0
- package/dist/session/SkillCatalog.js +194 -0
- package/dist/session/WorkState.d.ts +9 -0
- package/dist/session/WorkState.d.ts.map +1 -1
- package/dist/session/WorkState.js +32 -0
- package/dist/session/WorkTypes.d.ts +8 -0
- package/dist/session/WorkTypes.d.ts.map +1 -1
- package/dist/tools/SemanticToolRetrieval.d.ts +19 -0
- package/dist/tools/SemanticToolRetrieval.d.ts.map +1 -0
- package/dist/tools/SemanticToolRetrieval.js +52 -0
- package/dist/tools/ToolRetrieval.d.ts +7 -0
- package/dist/tools/ToolRetrieval.d.ts.map +1 -0
- package/dist/tools/ToolRetrieval.js +25 -0
- package/dist/tools/browser/BrowserTool.d.ts +9 -0
- package/dist/tools/browser/BrowserTool.d.ts.map +1 -0
- package/dist/tools/browser/BrowserTool.js +152 -0
- package/dist/tools/browser/BrowserWorker.d.ts +2 -0
- package/dist/tools/browser/BrowserWorker.d.ts.map +1 -0
- package/dist/tools/browser/BrowserWorker.js +51 -0
- package/dist/tools/calculation/CalculatorTool.d.ts +5 -0
- package/dist/tools/calculation/CalculatorTool.d.ts.map +1 -0
- package/dist/tools/calculation/CalculatorTool.js +137 -0
- package/dist/tools/deterministic/DeterministicRuntime.d.ts +39 -0
- package/dist/tools/deterministic/DeterministicRuntime.d.ts.map +1 -0
- package/dist/tools/deterministic/DeterministicRuntime.js +98 -0
- package/dist/tools/deterministic/DeterministicTools.d.ts +8 -0
- package/dist/tools/deterministic/DeterministicTools.d.ts.map +1 -0
- package/dist/tools/deterministic/DeterministicTools.js +86 -0
- package/dist/tools/deterministic/node-worker.cjs +38 -0
- package/dist/tools/deterministic/python-worker.py +222 -0
- package/dist/tools/docdex/DocdexCatalogTools.d.ts +4 -0
- package/dist/tools/docdex/DocdexCatalogTools.d.ts.map +1 -0
- package/dist/tools/docdex/DocdexCatalogTools.js +58 -0
- package/dist/tools/docdex/DocdexTools.d.ts +2 -0
- package/dist/tools/docdex/DocdexTools.d.ts.map +1 -1
- package/dist/tools/docdex/DocdexTools.js +72 -105
- package/dist/tools/documents/DocumentRuntime.d.ts +12 -0
- package/dist/tools/documents/DocumentRuntime.d.ts.map +1 -0
- package/dist/tools/documents/DocumentRuntime.js +59 -0
- package/dist/tools/documents/DocumentTools.d.ts +19 -0
- package/dist/tools/documents/DocumentTools.d.ts.map +1 -0
- package/dist/tools/documents/DocumentTools.js +150 -0
- package/dist/tools/documents/worker.py +267 -0
- package/dist/tools/entities/AdesTool.d.ts +7 -0
- package/dist/tools/entities/AdesTool.d.ts.map +1 -0
- package/dist/tools/entities/AdesTool.js +59 -0
- package/dist/tools/research/TnlTool.d.ts +22 -0
- package/dist/tools/research/TnlTool.d.ts.map +1 -0
- package/dist/tools/research/TnlTool.js +246 -0
- package/dist/tools/shell/AsyncProcess.d.ts +3 -0
- package/dist/tools/shell/AsyncProcess.d.ts.map +1 -1
- package/dist/tools/shell/AsyncProcess.js +1 -1
- package/dist/tools/shell/HostToolchain.d.ts.map +1 -1
- package/dist/tools/shell/HostToolchain.js +18 -4
- package/dist/tools/shell/IsolatedExecutor.d.ts +3 -2
- package/dist/tools/shell/IsolatedExecutor.d.ts.map +1 -1
- package/dist/tools/shell/IsolatedExecutor.js +39 -5
- package/dist/tools/system/TimeTool.d.ts +4 -0
- package/dist/tools/system/TimeTool.d.ts.map +1 -0
- package/dist/tools/system/TimeTool.js +22 -0
- package/dist/tools/verification/JavaScriptVerificationTool.d.ts +47 -0
- package/dist/tools/verification/JavaScriptVerificationTool.d.ts.map +1 -0
- package/dist/tools/verification/JavaScriptVerificationTool.js +71 -0
- package/dist/tools/verification/JavaScriptVerificationWorker.d.ts +2 -0
- package/dist/tools/verification/JavaScriptVerificationWorker.d.ts.map +1 -0
- package/dist/tools/verification/JavaScriptVerificationWorker.js +91 -0
- package/dist/tools/verification/VitestTool.d.ts +3 -0
- package/dist/tools/verification/VitestTool.d.ts.map +1 -0
- package/dist/tools/verification/VitestTool.js +128 -0
- package/package.json +16 -5
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
import { emitKeypressEvents } from "node:readline";
|
|
2
|
+
import { promises as fs } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { TerminalInput } from "../TerminalInput.js";
|
|
5
|
+
import { terminalText, TerminalTextStream } from "../TerminalText.js";
|
|
6
|
+
import { terminalHelp, terminalUsage, toolActivity } from "./TerminalPresentation.js";
|
|
7
|
+
import { TerminalEditor } from "./TerminalEditor.js";
|
|
8
|
+
import { TerminalSelection, clipboardSequence } from "./TerminalSelection.js";
|
|
9
|
+
import { renderTerminalScreen } from "./TerminalScreen.js";
|
|
10
|
+
/** One terminal owner; controller events are rendered as data, never executable escape codes. */
|
|
11
|
+
export class TerminalTui {
|
|
12
|
+
constructor(options) {
|
|
13
|
+
this.options = options;
|
|
14
|
+
this.live = false;
|
|
15
|
+
this.previousRaw = false;
|
|
16
|
+
this.previousFrame = [];
|
|
17
|
+
this.stream = new TerminalTextStream();
|
|
18
|
+
this.sequence = 0;
|
|
19
|
+
this.frameRows = 12;
|
|
20
|
+
this.transcriptRows = 0;
|
|
21
|
+
this.outputBlocked = false;
|
|
22
|
+
this.resize = () => { this.selection = undefined; this.previousFrame = []; this.schedule(); };
|
|
23
|
+
this.drain = () => { this.outputBlocked = false; this.schedule(); };
|
|
24
|
+
this.onKey = (text, key) => {
|
|
25
|
+
this.selection = undefined;
|
|
26
|
+
try {
|
|
27
|
+
this.key(text, key);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
this.error(error instanceof Error ? error.message : String(error));
|
|
31
|
+
}
|
|
32
|
+
this.schedule();
|
|
33
|
+
};
|
|
34
|
+
this.editor = new TerminalEditor(options.history.filter(value => Buffer.byteLength(value) <= 262144).map(value => terminalText(value).replace(/\t/g, " ")));
|
|
35
|
+
this.state = { ...options, workspace: terminalText(options.workspace), branch: options.branch ? terminalText(options.branch) : undefined, profile: terminalText(options.profile), version: terminalText(options.version), busy: false, activity: "Ready", route: "", tokens: 0, queued: 0, draft: "", cursor: 0, blocks: [], scroll: 0, expanded: false };
|
|
36
|
+
this.closedPromise = new Promise(resolve => { this.resolveClosed = resolve; });
|
|
37
|
+
this.input = new TerminalInput({ onPaste: text => {
|
|
38
|
+
if (this.approval || this.picker || this.state.overlay)
|
|
39
|
+
return;
|
|
40
|
+
if (!this.editor.insert(terminalText(text).replace(/\t/g, " ")))
|
|
41
|
+
this.notice("Input exceeds 256 KiB");
|
|
42
|
+
this.schedule();
|
|
43
|
+
}, onRejected: text => this.notice(text), onWheel: direction => { this.selection = undefined; this.scroll(direction * -3); }, onMouse: event => {
|
|
44
|
+
if ((event.button & 3) !== 0 || !this.previousFrame.length)
|
|
45
|
+
return;
|
|
46
|
+
const point = { x: Math.max(0, Math.min((process.stdout.columns || 80) - 1, event.x)), y: Math.max(0, Math.min(this.previousFrame.length - 1, event.y)) };
|
|
47
|
+
if (!event.release && !(event.button & 32))
|
|
48
|
+
this.selection = new TerminalSelection(this.previousFrame, point);
|
|
49
|
+
else if (this.selection) {
|
|
50
|
+
this.selection.end = point;
|
|
51
|
+
if (event.release) {
|
|
52
|
+
const text = this.selection.text();
|
|
53
|
+
if (text)
|
|
54
|
+
process.stdout.write(clipboardSequence(text));
|
|
55
|
+
this.selection = undefined;
|
|
56
|
+
this.previousFrame = [];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
this.schedule();
|
|
60
|
+
}, onEscape: () => this.onKey("", { name: "escape" }) });
|
|
61
|
+
}
|
|
62
|
+
start() {
|
|
63
|
+
if (this.live)
|
|
64
|
+
return;
|
|
65
|
+
this.live = true;
|
|
66
|
+
this.previousRaw = !!process.stdin.isRaw;
|
|
67
|
+
process.stdout.write("\x1b[?1049h\x1b[?25l\x1b[?2004h\x1b[?1000h\x1b[?1002h\x1b[?1006h\x1b[2J");
|
|
68
|
+
process.stdin.setRawMode(true);
|
|
69
|
+
emitKeypressEvents(this.input);
|
|
70
|
+
this.input.on("keypress", this.onKey);
|
|
71
|
+
process.stdin.pipe(this.input);
|
|
72
|
+
process.stdin.resume();
|
|
73
|
+
process.stdout.on("resize", this.resize);
|
|
74
|
+
process.stdout.on("drain", this.drain);
|
|
75
|
+
this.draw();
|
|
76
|
+
}
|
|
77
|
+
wait() { return this.closedPromise; }
|
|
78
|
+
stop() {
|
|
79
|
+
if (!this.live) {
|
|
80
|
+
this.resolveClosed();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this.live = false;
|
|
84
|
+
if (this.timer)
|
|
85
|
+
clearTimeout(this.timer);
|
|
86
|
+
this.timer = undefined;
|
|
87
|
+
this.approval?.resolve("deny");
|
|
88
|
+
this.approval = undefined;
|
|
89
|
+
this.permissionPicker?.resolve();
|
|
90
|
+
process.stdout.off("resize", this.resize);
|
|
91
|
+
process.stdout.off("drain", this.drain);
|
|
92
|
+
process.stdin.unpipe(this.input);
|
|
93
|
+
this.input.off("keypress", this.onKey);
|
|
94
|
+
this.input.destroy();
|
|
95
|
+
process.stdin.setRawMode(this.previousRaw);
|
|
96
|
+
process.stdin.pause();
|
|
97
|
+
process.stdout.write("\x1b[0m\x1b[?1006l\x1b[?1002l\x1b[?1000l\x1b[?2004l\x1b[?25h\x1b[?1049l");
|
|
98
|
+
this.resolveClosed();
|
|
99
|
+
}
|
|
100
|
+
schedule() {
|
|
101
|
+
if (!this.live || this.timer)
|
|
102
|
+
return;
|
|
103
|
+
this.timer = setTimeout(() => { this.timer = undefined; this.draw(); }, 24);
|
|
104
|
+
}
|
|
105
|
+
draw() {
|
|
106
|
+
if (!this.live || this.outputBlocked)
|
|
107
|
+
return;
|
|
108
|
+
this.state.draft = this.editor.text;
|
|
109
|
+
this.state.cursor = this.editor.cursor;
|
|
110
|
+
this.state.suggestions = undefined;
|
|
111
|
+
if (!this.state.overlay && !this.approval && this.editor.text.startsWith("/") && !/\s/.test(this.editor.text)) {
|
|
112
|
+
this.state.suggestions = this.options.commands.filter(command => command.name.startsWith(this.editor.text)).slice(0, 5).map(command => `${command.name} ${command.description}`);
|
|
113
|
+
this.state.selectedSuggestion = 0;
|
|
114
|
+
}
|
|
115
|
+
let frame = renderTerminalScreen(this.state, process.stdout.columns || 80, process.stdout.rows || 24, process.env.NO_COLOR === undefined);
|
|
116
|
+
if (this.state.scroll > 0 && frame.transcriptRows > this.transcriptRows) {
|
|
117
|
+
this.state.scroll += frame.transcriptRows - this.transcriptRows;
|
|
118
|
+
frame = renderTerminalScreen(this.state, process.stdout.columns || 80, process.stdout.rows || 24, process.env.NO_COLOR === undefined);
|
|
119
|
+
}
|
|
120
|
+
this.frameRows = frame.viewportRows;
|
|
121
|
+
this.transcriptRows = frame.transcriptRows;
|
|
122
|
+
if (this.selection) {
|
|
123
|
+
frame.lines = this.selection.frame();
|
|
124
|
+
frame.cursor = undefined;
|
|
125
|
+
}
|
|
126
|
+
let output = "\x1b[?25l";
|
|
127
|
+
frame.lines.forEach((line, i) => { if (this.previousFrame[i] !== line)
|
|
128
|
+
output += `\x1b[${i + 1};1H\x1b[2K${line}`; });
|
|
129
|
+
if (frame.cursor)
|
|
130
|
+
output += `\x1b[${frame.cursor.row + 1};${frame.cursor.column + 1}H\x1b[?25h`;
|
|
131
|
+
this.outputBlocked = !process.stdout.write(output);
|
|
132
|
+
this.previousFrame = frame.lines;
|
|
133
|
+
}
|
|
134
|
+
append(kind, title, text) {
|
|
135
|
+
const block = { id: `ui-${++this.sequence}`, kind, title: terminalText(title), text: terminalText(text).slice(-262144) };
|
|
136
|
+
this.state.blocks.push(block);
|
|
137
|
+
while (this.state.blocks.length > 200 || (this.state.blocks.length > 1 && this.state.blocks.reduce((sum, item) => sum + item.text.length, 0) > 262144))
|
|
138
|
+
this.state.blocks.shift();
|
|
139
|
+
this.schedule();
|
|
140
|
+
return block;
|
|
141
|
+
}
|
|
142
|
+
scroll(lines) {
|
|
143
|
+
if (this.picker)
|
|
144
|
+
return;
|
|
145
|
+
if (!this.state.overlay)
|
|
146
|
+
this.state.introDismissed = true;
|
|
147
|
+
if (this.state.overlay)
|
|
148
|
+
this.state.overlay.offset = Math.max(0, this.state.overlay.offset - lines);
|
|
149
|
+
else
|
|
150
|
+
this.state.scroll = Math.max(0, Math.min(Math.max(0, this.transcriptRows - this.frameRows), this.state.scroll + lines));
|
|
151
|
+
this.schedule();
|
|
152
|
+
}
|
|
153
|
+
notice(text) { this.append("notice", "NOTICE", text); }
|
|
154
|
+
error(text) {
|
|
155
|
+
const message = text === "fetch failed" ? "Could not reach the requested service. Check your connection or service status, then try again." : text;
|
|
156
|
+
this.append("error", "NEEDS ATTENTION", message);
|
|
157
|
+
}
|
|
158
|
+
user(text) { this.state.scroll = 0; this.append("user", "YOU", text); }
|
|
159
|
+
result(text) {
|
|
160
|
+
const clean = terminalText(text);
|
|
161
|
+
if (this.assistant && this.assistant.text.trim() === clean.trim())
|
|
162
|
+
return;
|
|
163
|
+
this.assistant = this.append("assistant", "CODALI", clean);
|
|
164
|
+
}
|
|
165
|
+
show(value, title = "Details") {
|
|
166
|
+
const text = title.toLowerCase() === "help" ? terminalHelp() : title.toLowerCase() === "usage" ? terminalUsage(value) : typeof value === "string" ? value : formatInspection(value);
|
|
167
|
+
const overlay = { title: terminalText(title.slice(0, 1).toUpperCase() + title.slice(1)), lines: terminalText(text).split("\n"), offset: 0 };
|
|
168
|
+
if (this.approval)
|
|
169
|
+
this.pendingInspection = overlay;
|
|
170
|
+
else {
|
|
171
|
+
this.permissionPicker?.resolve();
|
|
172
|
+
this.picker = undefined;
|
|
173
|
+
this.state.overlay = overlay;
|
|
174
|
+
}
|
|
175
|
+
this.schedule();
|
|
176
|
+
}
|
|
177
|
+
update(status) { Object.assign(this.state, status); this.schedule(); }
|
|
178
|
+
restore(events) {
|
|
179
|
+
this.state.blocks = [];
|
|
180
|
+
this.assistant = undefined;
|
|
181
|
+
this.lastTool = undefined;
|
|
182
|
+
this.stream.reset();
|
|
183
|
+
this.state.tokens = 0;
|
|
184
|
+
this.state.route = "";
|
|
185
|
+
this.state.session = undefined;
|
|
186
|
+
for (const event of events.slice(-3000)) {
|
|
187
|
+
if (!event?.data || typeof event.type !== "string")
|
|
188
|
+
continue;
|
|
189
|
+
if (event.sessionId)
|
|
190
|
+
this.state.session = event.sessionId;
|
|
191
|
+
if (event.type === "conversation_history" && Array.isArray(event.data.messages)) {
|
|
192
|
+
this.state.blocks = [];
|
|
193
|
+
for (const message of event.data.messages) {
|
|
194
|
+
if (message.role === "user")
|
|
195
|
+
this.user(message.content);
|
|
196
|
+
else if (message.role === "assistant")
|
|
197
|
+
this.result(message.content);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
else if (event.type === "interaction_request" && typeof event.data.prompt === "string")
|
|
201
|
+
this.user(event.data.prompt);
|
|
202
|
+
else if (event.type === "session_started" && !event.data.interactionId && typeof event.data.objective === "string")
|
|
203
|
+
this.user(event.data.objective);
|
|
204
|
+
else if (event.type === "goal_amended" && !event.data.interactionId && typeof event.data.instruction === "string")
|
|
205
|
+
this.user(event.data.instruction);
|
|
206
|
+
else if (event.type === "turn_result" && typeof event.data.content === "string")
|
|
207
|
+
this.result(event.data.content);
|
|
208
|
+
else if (event.type === "turn_failed" && typeof event.data.message === "string")
|
|
209
|
+
this.error(event.data.message);
|
|
210
|
+
else if (["tool_intent", "tool_receipt", "usage", "model_route"].includes(event.type))
|
|
211
|
+
this.event(event);
|
|
212
|
+
}
|
|
213
|
+
this.state.busy = false;
|
|
214
|
+
this.state.activity = "Session resumed";
|
|
215
|
+
this.state.scroll = 0;
|
|
216
|
+
this.schedule();
|
|
217
|
+
}
|
|
218
|
+
event(event) {
|
|
219
|
+
const data = event.data;
|
|
220
|
+
if (event.sessionId)
|
|
221
|
+
this.state.session = event.sessionId;
|
|
222
|
+
if (event.type === "turn_started") {
|
|
223
|
+
this.stream.reset();
|
|
224
|
+
this.assistant = undefined;
|
|
225
|
+
this.state.busy = true;
|
|
226
|
+
this.state.activity = "Thinking";
|
|
227
|
+
}
|
|
228
|
+
else if (event.type === "token" && typeof data.content === "string") {
|
|
229
|
+
if (!this.assistant)
|
|
230
|
+
this.assistant = this.append("assistant", "CODALI", "");
|
|
231
|
+
this.assistant.text = (this.assistant.text + this.stream.write(data.content)).slice(-262144);
|
|
232
|
+
}
|
|
233
|
+
else if (event.type === "model_route") {
|
|
234
|
+
this.state.route = terminalText(`${data.modelId ?? "Model"}${data.host ? ` on ${data.host}` : ""}`);
|
|
235
|
+
this.state.activity = "Thinking";
|
|
236
|
+
}
|
|
237
|
+
else if (event.type === "interaction_progress" && typeof data.message === "string")
|
|
238
|
+
this.state.activity = terminalText(data.message);
|
|
239
|
+
else if (event.type === "model_recovery" && typeof data.message === "string") {
|
|
240
|
+
if (this.assistant) {
|
|
241
|
+
this.assistant.kind = "notice";
|
|
242
|
+
this.assistant.title = "Incomplete response · retrying";
|
|
243
|
+
}
|
|
244
|
+
this.assistant = undefined;
|
|
245
|
+
this.stream.reset();
|
|
246
|
+
this.notice(data.message);
|
|
247
|
+
this.state.activity = "Recovering incomplete model response";
|
|
248
|
+
}
|
|
249
|
+
else if (event.type === "usage") {
|
|
250
|
+
const usage = data.usage;
|
|
251
|
+
if (Number.isFinite(usage?.tokens))
|
|
252
|
+
this.state.tokens = usage.tokens;
|
|
253
|
+
}
|
|
254
|
+
else if (event.type === "tool_intent") {
|
|
255
|
+
const receipt = data.receipt;
|
|
256
|
+
this.lastTool = this.append("tool", `● ${toolActivity(receipt.tool, receipt.args)}`, receipt.args ? JSON.stringify(receipt.args, null, 2) : "Running…");
|
|
257
|
+
this.lastTool.id = receipt.id;
|
|
258
|
+
this.lastTool.summary = toolActivity(receipt.tool, receipt.args);
|
|
259
|
+
this.state.activity = terminalText(this.lastTool.summary);
|
|
260
|
+
}
|
|
261
|
+
else if (event.type === "process_output" && typeof data.content === "string") {
|
|
262
|
+
if (!this.lastTool)
|
|
263
|
+
this.lastTool = this.append("tool", "Process output", "");
|
|
264
|
+
this.lastTool.text = (this.lastTool.text + terminalText(data.content)).slice(-65536);
|
|
265
|
+
}
|
|
266
|
+
else if (event.type === "tool_receipt") {
|
|
267
|
+
const receipt = data.receipt;
|
|
268
|
+
const block = this.state.blocks.find(item => item.id === receipt.id);
|
|
269
|
+
if (block) {
|
|
270
|
+
block.title = terminalText(`${receipt.status === "success" ? "✓" : "!"} ${toolActivity(receipt.tool, receipt.args)} · ${receipt.status === "success" ? "done" : "needs attention"}`);
|
|
271
|
+
block.summary = receipt.status === "success" ? "Finished. Ctrl+O shows the details." : terminalText(receipt.error ?? receipt.output ?? "This step needs attention. Ctrl+O shows the details.").slice(0, 600);
|
|
272
|
+
if (typeof receipt.output === "string")
|
|
273
|
+
block.text = terminalText([receipt.args ? JSON.stringify(receipt.args, null, 2) : "", receipt.output].filter(Boolean).join("\n\n")).slice(-65536);
|
|
274
|
+
else if (receipt.error)
|
|
275
|
+
block.text += "\n" + terminalText(receipt.error);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
else if (event.type === "status" && typeof data.message === "string")
|
|
279
|
+
this.state.activity = terminalText(data.message);
|
|
280
|
+
else if (event.type === "turn_result" || event.type === "turn_failed") {
|
|
281
|
+
if (this.assistant)
|
|
282
|
+
this.assistant.text += this.stream.finish();
|
|
283
|
+
this.state.busy = false;
|
|
284
|
+
this.state.activity = event.type === "turn_failed" ? "Turn stopped" : data.mode && data.mode !== "execute" ? "Ready" : data.completed ? "Goal completed" : "Ready to continue";
|
|
285
|
+
}
|
|
286
|
+
this.schedule();
|
|
287
|
+
}
|
|
288
|
+
approve(title, details, signal) {
|
|
289
|
+
this.permissionPicker?.resolve();
|
|
290
|
+
this.approval?.resolve("deny");
|
|
291
|
+
this.picker = undefined;
|
|
292
|
+
return new Promise(resolve => {
|
|
293
|
+
const abort = () => finish("deny");
|
|
294
|
+
const finish = (choice) => {
|
|
295
|
+
signal?.removeEventListener("abort", abort);
|
|
296
|
+
this.approval = undefined;
|
|
297
|
+
this.state.overlay = this.pendingInspection;
|
|
298
|
+
this.pendingInspection = undefined;
|
|
299
|
+
this.schedule();
|
|
300
|
+
resolve(choice);
|
|
301
|
+
};
|
|
302
|
+
const overlay = { title: terminalText(title.slice(0, 1).toUpperCase() + title.slice(1)), lines: terminalText(details).split("\n"), offset: 0, choices: ["Allow once", "Allow for this session", "Deny"], selected: 2, hint: "↑↓ choose · Enter confirm · PgUp/PgDn inspect · Esc deny" };
|
|
303
|
+
this.approval = { resolve: finish, selected: 2, overlay };
|
|
304
|
+
this.state.overlay = overlay;
|
|
305
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
306
|
+
if (signal?.aborted)
|
|
307
|
+
abort();
|
|
308
|
+
this.schedule();
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
choosePermissions(current) {
|
|
312
|
+
if (this.approval)
|
|
313
|
+
return Promise.resolve(undefined);
|
|
314
|
+
this.permissionPicker?.resolve();
|
|
315
|
+
this.picker = undefined;
|
|
316
|
+
const profiles = ["plan", "ask", "workspace", "full"];
|
|
317
|
+
return new Promise(resolve => {
|
|
318
|
+
const overlay = { title: "Permissions for this directory", lines: [this.state.workspace, "Saved for future launches here. Full automatically approves available tools; workspace boundaries still apply."], offset: 0,
|
|
319
|
+
choices: ["Plan — read only", "Ask — approve operations individually", "Workspace — allow local writes and shell", "Full — allow all tools without prompts"], selected: profiles.indexOf(current), hint: "↑↓ choose · Enter save · Esc cancel" };
|
|
320
|
+
this.permissionPicker = { overlay, resolve: profile => {
|
|
321
|
+
this.permissionPicker = undefined;
|
|
322
|
+
if (this.state.overlay === overlay)
|
|
323
|
+
this.state.overlay = undefined;
|
|
324
|
+
this.schedule();
|
|
325
|
+
resolve(profile);
|
|
326
|
+
} };
|
|
327
|
+
this.state.overlay = overlay;
|
|
328
|
+
this.schedule();
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
pickerItems() {
|
|
332
|
+
if (!this.picker)
|
|
333
|
+
return [];
|
|
334
|
+
return this.picker.items.filter(item => item.label.toLowerCase().includes(this.picker.query.toLowerCase()));
|
|
335
|
+
}
|
|
336
|
+
showPicker() {
|
|
337
|
+
const picker = this.picker;
|
|
338
|
+
const items = this.pickerItems();
|
|
339
|
+
picker.selected = Math.max(0, Math.min(items.length - 1, picker.selected));
|
|
340
|
+
const count = Math.max(1, (process.stdout.rows || 24) - 10);
|
|
341
|
+
const offset = Math.max(0, picker.selected - count + 1);
|
|
342
|
+
this.state.overlay = { title: `${picker.kind === "command" ? "Commands" : picker.kind === "history" ? "History" : "Workspace files"} › ${picker.query}`, lines: items.length ? items.slice(offset, offset + count).map((item, i) => `${i + offset === picker.selected ? "›" : " "} ${item.label}`) : ["No matches"], offset: 0, hint: "Type to search · ↑↓ choose · Enter select · Esc close" };
|
|
343
|
+
this.schedule();
|
|
344
|
+
}
|
|
345
|
+
openPicker(kind) {
|
|
346
|
+
this.picker = { kind, query: "", selected: 0, items: kind === "command" ? this.options.commands.map(command => ({ label: `${command.name} ${command.description}`, value: command.name })) : this.editor.history.map(value => ({ label: value.replace(/\n/g, " ↵ "), value })) };
|
|
347
|
+
this.showPicker();
|
|
348
|
+
}
|
|
349
|
+
async completeFile() {
|
|
350
|
+
const draft = this.editor.text, cursor = this.editor.cursor;
|
|
351
|
+
const before = draft.slice(0, cursor);
|
|
352
|
+
const match = before.match(/(?:^|\s)@([^\n]*)$/u);
|
|
353
|
+
if (!match)
|
|
354
|
+
return;
|
|
355
|
+
const token = match[1], directory = token.endsWith("/") ? token : path.dirname(token), fragment = token.endsWith("/") ? "" : path.basename(token);
|
|
356
|
+
const relative = directory === "." ? "" : directory;
|
|
357
|
+
const root = await fs.realpath(this.options.workspace);
|
|
358
|
+
const target = await fs.realpath(path.resolve(root, relative));
|
|
359
|
+
if (target !== root && !target.startsWith(root + path.sep))
|
|
360
|
+
throw new Error("File completion is confined to this workspace");
|
|
361
|
+
const entries = await fs.readdir(target, { withFileTypes: true });
|
|
362
|
+
if (this.editor.text !== draft || this.editor.cursor !== cursor || this.approval || this.state.overlay)
|
|
363
|
+
return;
|
|
364
|
+
this.picker = { kind: "file", query: fragment, selected: 0, prefix: before.slice(0, before.length - token.length - 1), suffix: draft.slice(cursor), items: entries.filter(item => item.name !== ".git" && !item.isSymbolicLink() && !/[\x00-\x1f\x7f-\x9f\u202a-\u202e\u2066-\u2069]/.test(item.name)).slice(0, 1000).map(item => { const value = path.join(relative, item.name) + (item.isDirectory() ? "/" : ""); return { label: value, value }; }).sort((a, b) => a.label.localeCompare(b.label)) };
|
|
365
|
+
this.showPicker();
|
|
366
|
+
}
|
|
367
|
+
key(text, key) {
|
|
368
|
+
if (key.ctrl && (key.name === "c" || key.name === "z")) {
|
|
369
|
+
this.options.cancel();
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
if (this.permissionPicker) {
|
|
373
|
+
const picker = this.permissionPicker;
|
|
374
|
+
if (key.name === "escape")
|
|
375
|
+
picker.resolve();
|
|
376
|
+
else if ((process.stdout.columns || 80) < 24 || (process.stdout.rows || 24) < 10)
|
|
377
|
+
return;
|
|
378
|
+
else if (key.name === "up" || key.name === "down")
|
|
379
|
+
picker.overlay.selected = ((picker.overlay.selected ?? 0) + (key.name === "up" ? 3 : 1)) % 4;
|
|
380
|
+
else if (key.name === "return")
|
|
381
|
+
picker.resolve(["plan", "ask", "workspace", "full"][picker.overlay.selected ?? 1]);
|
|
382
|
+
else if (key.name === "pageup" || key.name === "pagedown")
|
|
383
|
+
picker.overlay.offset = Math.max(0, picker.overlay.offset + (key.name === "pageup" ? -6 : 6));
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
if (this.approval) {
|
|
387
|
+
if (key.name === "escape")
|
|
388
|
+
this.approval.resolve("deny");
|
|
389
|
+
else if ((process.stdout.columns || 80) < 24 || (process.stdout.rows || 24) < 10)
|
|
390
|
+
return;
|
|
391
|
+
else if (key.name === "up" || key.name === "down") {
|
|
392
|
+
this.approval.selected = (this.approval.selected + (key.name === "down" ? 1 : 2)) % 3;
|
|
393
|
+
this.approval.overlay.selected = this.approval.selected;
|
|
394
|
+
}
|
|
395
|
+
else if (key.name === "return")
|
|
396
|
+
this.approval.resolve(["once", "session", "deny"][this.approval.selected]);
|
|
397
|
+
else if (key.name === "pageup" || key.name === "pagedown")
|
|
398
|
+
this.approval.overlay.offset = Math.max(0, this.approval.overlay.offset + (key.name === "pageup" ? -6 : 6));
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (this.picker) {
|
|
402
|
+
if (key.name === "escape") {
|
|
403
|
+
this.picker = undefined;
|
|
404
|
+
this.state.overlay = undefined;
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
if (key.name === "up" || key.name === "down")
|
|
408
|
+
this.picker.selected += key.name === "up" ? -1 : 1;
|
|
409
|
+
else if (key.name === "backspace")
|
|
410
|
+
this.picker.query = [...this.picker.query].slice(0, -1).join("");
|
|
411
|
+
else if (key.name === "return") {
|
|
412
|
+
const selected = this.pickerItems()[this.picker.selected];
|
|
413
|
+
if (!selected)
|
|
414
|
+
return;
|
|
415
|
+
const picker = this.picker;
|
|
416
|
+
this.picker = undefined;
|
|
417
|
+
this.state.overlay = undefined;
|
|
418
|
+
if (picker.kind === "command")
|
|
419
|
+
this.options.submit(selected.value, "queue");
|
|
420
|
+
else if (picker.kind === "history")
|
|
421
|
+
this.editor.set(selected.value);
|
|
422
|
+
else {
|
|
423
|
+
const prefix = (picker.prefix ?? "") + "@" + selected.value;
|
|
424
|
+
this.editor.set(prefix + (picker.suffix ?? ""));
|
|
425
|
+
this.editor.cursor = prefix.length;
|
|
426
|
+
if (selected.value.endsWith("/"))
|
|
427
|
+
void this.completeFile().catch(error => this.error(String(error)));
|
|
428
|
+
}
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
else if (!key.ctrl && !key.meta && text && !/[\x00-\x1f\x7f]/.test(text)) {
|
|
432
|
+
this.picker.query += text;
|
|
433
|
+
this.picker.selected = 0;
|
|
434
|
+
}
|
|
435
|
+
this.showPicker();
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
if (this.state.overlay) {
|
|
439
|
+
if (key.name === "escape" || key.name === "q")
|
|
440
|
+
this.state.overlay = undefined;
|
|
441
|
+
else if (["up", "down", "pageup", "pagedown"].includes(key.name ?? ""))
|
|
442
|
+
this.state.overlay.offset = Math.max(0, this.state.overlay.offset + (["up", "pageup"].includes(key.name) ? -1 : 1) * (key.name.startsWith("page") ? 8 : 1));
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
if (key.ctrl && key.name === "end") {
|
|
446
|
+
this.state.scroll = 0;
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
if (key.ctrl && key.name === "p") {
|
|
450
|
+
this.openPicker("command");
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
if (key.ctrl && key.name === "r") {
|
|
454
|
+
this.openPicker("history");
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
if (key.ctrl && key.name === "o") {
|
|
458
|
+
this.state.expanded = !this.state.expanded;
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
if (key.ctrl && key.name === "l") {
|
|
462
|
+
this.previousFrame = [];
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
if (key.name === "escape") {
|
|
466
|
+
if (this.state.busy)
|
|
467
|
+
this.options.cancel();
|
|
468
|
+
else
|
|
469
|
+
this.editor.clear();
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
if (key.name === "pageup" || key.name === "pagedown") {
|
|
473
|
+
this.scroll((key.name === "pageup" ? 1 : -1) * Math.max(1, this.frameRows - 2));
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
if (key.ctrl && key.name === "s") {
|
|
477
|
+
const value = this.editor.submit();
|
|
478
|
+
if (value.trim())
|
|
479
|
+
this.options.submit(value, "steer");
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
if (key.name === "return") {
|
|
483
|
+
if (key.meta || key.shift)
|
|
484
|
+
this.editor.insert("\n");
|
|
485
|
+
else {
|
|
486
|
+
const value = this.editor.submit();
|
|
487
|
+
if (value.trim())
|
|
488
|
+
this.options.submit(value, "queue");
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
else if (key.ctrl && key.name === "j")
|
|
492
|
+
this.editor.insert("\n");
|
|
493
|
+
else if (key.name === "backspace")
|
|
494
|
+
this.editor.delete(true);
|
|
495
|
+
else if (key.name === "delete")
|
|
496
|
+
this.editor.delete(false);
|
|
497
|
+
else if (key.name === "left")
|
|
498
|
+
this.editor.move(-1);
|
|
499
|
+
else if (key.name === "right")
|
|
500
|
+
this.editor.move(1);
|
|
501
|
+
else if (key.name === "home" || (key.ctrl && key.name === "a"))
|
|
502
|
+
this.editor.home();
|
|
503
|
+
else if (key.name === "end" || (key.ctrl && key.name === "e"))
|
|
504
|
+
this.editor.end();
|
|
505
|
+
else if (key.ctrl && key.name === "u")
|
|
506
|
+
this.editor.clear();
|
|
507
|
+
else if (key.ctrl && key.name === "w")
|
|
508
|
+
this.editor.killWord();
|
|
509
|
+
else if (key.ctrl && key.name === "d" && !this.editor.text)
|
|
510
|
+
this.options.close();
|
|
511
|
+
else if (key.name === "up" || key.name === "down") {
|
|
512
|
+
const direction = key.name === "up" ? -1 : 1;
|
|
513
|
+
if (!this.editor.vertical(direction))
|
|
514
|
+
this.editor.previous(direction);
|
|
515
|
+
}
|
|
516
|
+
else if (key.name === "tab" && !key.shift) {
|
|
517
|
+
if (this.editor.text.startsWith("/") && !/\s/.test(this.editor.text)) {
|
|
518
|
+
const match = this.options.commands.find(command => command.name.startsWith(this.editor.text));
|
|
519
|
+
if (match)
|
|
520
|
+
this.editor.set(match.name + " ");
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
523
|
+
const value = this.editor.submit();
|
|
524
|
+
if (value.trim())
|
|
525
|
+
this.options.submit(value, "queue");
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
else if (key.name === "tab" && key.shift) {
|
|
529
|
+
const matches = this.options.commands.filter(command => command.name.startsWith(this.editor.text));
|
|
530
|
+
if (this.editor.text.startsWith("/") && matches.length)
|
|
531
|
+
this.editor.set(matches[0].name + " ");
|
|
532
|
+
else
|
|
533
|
+
void this.completeFile().catch(error => this.error(error instanceof Error ? error.message : String(error)));
|
|
534
|
+
}
|
|
535
|
+
else if (!key.ctrl && !key.meta && text && !/[\x00-\x1f\x7f]/.test(text))
|
|
536
|
+
this.editor.insert(terminalText(text));
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
export const formatInspection = (value, depth = 0) => {
|
|
540
|
+
if (value === null || value === undefined)
|
|
541
|
+
return "—";
|
|
542
|
+
if (typeof value !== "object")
|
|
543
|
+
return String(value);
|
|
544
|
+
if (Array.isArray(value))
|
|
545
|
+
return value.length ? value.map((item, index) => `${index + 1}. ${formatInspection(item, depth + 1)}`).join("\n\n") : "None";
|
|
546
|
+
const entries = Object.entries(value);
|
|
547
|
+
if (depth > 4)
|
|
548
|
+
return JSON.stringify(value);
|
|
549
|
+
return entries.map(([key, item]) => {
|
|
550
|
+
const label = key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/_/g, " ");
|
|
551
|
+
return `${label[0]?.toUpperCase() ?? ""}${label.slice(1)}: ${item && typeof item === "object" ? "\n" : ""}${formatInspection(item, depth + 1)}`;
|
|
552
|
+
}).join("\n");
|
|
553
|
+
};
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AA6FA,eAAO,MAAM,MAAM,GAAU,OAAM,MAAM,EAA0B,KAAG,OAAO,CAAC,IAAI,CAyEjF,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -12,8 +12,10 @@ import { EvalCommand } from "./cli/EvalCommand.js";
|
|
|
12
12
|
import { DatasetCommand } from "./cli/DatasetCommand.js";
|
|
13
13
|
import { ImprovementCommand } from "./cli/ImprovementCommand.js";
|
|
14
14
|
import { TerminalCommand, terminalDoctor } from "./cli/TerminalCommand.js";
|
|
15
|
-
const HELP_TEXT = "Usage: codali [chat] [prompt] [--effort low|medium|high|max] [--permissions plan|ask|workspace]\n" +
|
|
15
|
+
const HELP_TEXT = "Usage: codali [chat] [prompt] [--effort low|medium|high|max] [--permissions plan|ask|workspace|full]\n" +
|
|
16
16
|
" or: codali exec <prompt> [--json] [--config <path>]\n" +
|
|
17
|
+
" or: codali exec <prompt> --output-format jsonl --permission-profile workspace\n" +
|
|
18
|
+
" or: codali config validate --file <path>\n" +
|
|
17
19
|
" or: codali setup | login [--stdin] | logout | auth status\n" +
|
|
18
20
|
" or: codali sessions | resume <id> | inspect <id>\n" +
|
|
19
21
|
" or: codali ask \"<question>\" [--trace] [--json] [--workspace-root <path>]\n" +
|
|
@@ -108,11 +110,11 @@ export const runCli = async (argv = process.argv.slice(2)) => {
|
|
|
108
110
|
console.log(JSON.stringify(await terminalDoctor(rest.includes("--config") ? rest[rest.indexOf("--config") + 1] : undefined), null, 2));
|
|
109
111
|
return;
|
|
110
112
|
}
|
|
111
|
-
if (["chat", "exec", "setup", "login", "logout", "sessions", "resume", "status", "inspect", "checkpoint", "amend"].includes(command)) {
|
|
113
|
+
if (["chat", "exec", "config", "setup", "login", "logout", "sessions", "resume", "status", "inspect", "checkpoint", "amend"].includes(command)) {
|
|
112
114
|
await TerminalCommand.run(argv);
|
|
113
115
|
return;
|
|
114
116
|
}
|
|
115
|
-
if (["--effort", "--permissions", "--config", "--workspace-root", "--plain", "--json", "--stdin"].includes(command)) {
|
|
117
|
+
if (["--effort", "--permissions", "--permission-profile", "--output-format", "--config", "--workspace-root", "--plain", "--json", "--stdin"].includes(command)) {
|
|
116
118
|
await TerminalCommand.run(["chat", ...argv]);
|
|
117
119
|
return;
|
|
118
120
|
}
|
|
@@ -54,6 +54,34 @@ export interface TaskControlConfig {
|
|
|
54
54
|
checkpointOn: string[];
|
|
55
55
|
reviewPolicy: "risk-and-evidence";
|
|
56
56
|
}
|
|
57
|
+
export interface InteractionConfig {
|
|
58
|
+
toolExposure?: "gateway" | "native";
|
|
59
|
+
toolSelection?: "fixed" | "progressive" | "lexical" | "semantic";
|
|
60
|
+
initialTools?: string[];
|
|
61
|
+
/** Opt-in single-call answering; routed preserves the established dispatcher. */
|
|
62
|
+
strategy?: "routed" | "direct" | "native" | "cascade" | "gateway" | "adaptive";
|
|
63
|
+
routerBinding?: string;
|
|
64
|
+
answerBinding?: string;
|
|
65
|
+
promptVersion?: string;
|
|
66
|
+
routerResponseFormat?: "json" | "json_schema";
|
|
67
|
+
routerPrompt?: string;
|
|
68
|
+
answerPrompt?: string;
|
|
69
|
+
maxInputChars?: number;
|
|
70
|
+
historyChars?: number;
|
|
71
|
+
maxOutputTokens?: number;
|
|
72
|
+
maxTotalTokens?: number;
|
|
73
|
+
maxModelCalls?: number;
|
|
74
|
+
maxInspectionSteps?: number;
|
|
75
|
+
timeoutMs?: number;
|
|
76
|
+
/** Optional single bounded revision pass for answers that already needed reasoning. */
|
|
77
|
+
answerReview?: {
|
|
78
|
+
enabled: boolean;
|
|
79
|
+
binding?: string;
|
|
80
|
+
maxOutputTokens?: number;
|
|
81
|
+
};
|
|
82
|
+
/** Experimental pure arithmetic tool for reasoning turns; disabled unless explicitly enabled. */
|
|
83
|
+
calculator?: boolean;
|
|
84
|
+
}
|
|
57
85
|
export interface OrchestrationConfig {
|
|
58
86
|
schemaVersion: 1;
|
|
59
87
|
profile: string;
|
|
@@ -66,6 +94,11 @@ export interface OrchestrationConfig {
|
|
|
66
94
|
};
|
|
67
95
|
effort?: Partial<Record<EffortLevel, Partial<EffortBudget>>>;
|
|
68
96
|
taskControl?: TaskControlConfig;
|
|
97
|
+
interaction?: InteractionConfig;
|
|
98
|
+
skills?: {
|
|
99
|
+
enabled?: boolean;
|
|
100
|
+
directories?: string[];
|
|
101
|
+
};
|
|
69
102
|
docdex?: {
|
|
70
103
|
binary?: string;
|
|
71
104
|
binarySha256?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrchestrationConfig.d.ts","sourceRoot":"","sources":["../../src/config/OrchestrationConfig.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAC5D,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