@mcoda/mswarm 0.1.135-codali.18 → 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/README.md +5 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +5 -2
- package/dist/runtime.js.map +1 -1
- package/dist/vendor/codali/cli/TerminalCommand.d.ts.map +1 -1
- package/dist/vendor/codali/cli/TerminalCommand.js +53 -20
- package/dist/vendor/codali/cli/TerminalInput.d.ts +6 -0
- package/dist/vendor/codali/cli/TerminalInput.d.ts.map +1 -1
- package/dist/vendor/codali/cli/TerminalInput.js +3 -1
- package/dist/vendor/codali/cli/ToolsCommand.d.ts.map +1 -1
- package/dist/vendor/codali/cli/ToolsCommand.js +8 -1
- package/dist/vendor/codali/cli/tui/TerminalLogo.d.ts +6 -0
- package/dist/vendor/codali/cli/tui/TerminalLogo.d.ts.map +1 -0
- package/dist/vendor/codali/cli/tui/TerminalLogo.js +26 -0
- package/dist/vendor/codali/cli/tui/TerminalMarkdown.d.ts +5 -0
- package/dist/vendor/codali/cli/tui/TerminalMarkdown.d.ts.map +1 -0
- package/dist/vendor/codali/cli/tui/TerminalMarkdown.js +118 -0
- package/dist/vendor/codali/cli/tui/TerminalPresentation.d.ts.map +1 -1
- package/dist/vendor/codali/cli/tui/TerminalPresentation.js +12 -3
- package/dist/vendor/codali/cli/tui/TerminalScreen.d.ts +1 -0
- package/dist/vendor/codali/cli/tui/TerminalScreen.d.ts.map +1 -1
- package/dist/vendor/codali/cli/tui/TerminalScreen.js +13 -6
- package/dist/vendor/codali/cli/tui/TerminalSelection.d.ts +15 -0
- package/dist/vendor/codali/cli/tui/TerminalSelection.d.ts.map +1 -0
- package/dist/vendor/codali/cli/tui/TerminalSelection.js +38 -0
- package/dist/vendor/codali/cli/tui/TerminalTui.d.ts +4 -0
- package/dist/vendor/codali/cli/tui/TerminalTui.d.ts.map +1 -1
- package/dist/vendor/codali/cli/tui/TerminalTui.js +96 -12
- package/dist/vendor/codali/cli.js +1 -1
- package/dist/vendor/codali/config/OrchestrationConfig.d.ts +18 -0
- package/dist/vendor/codali/config/OrchestrationConfig.d.ts.map +1 -1
- package/dist/vendor/codali/config/OrchestrationConfig.js +42 -2
- package/dist/vendor/codali/docdex/DocdexCatalog.d.ts +12 -0
- package/dist/vendor/codali/docdex/DocdexCatalog.d.ts.map +1 -0
- package/dist/vendor/codali/docdex/DocdexCatalog.js +30 -0
- package/dist/vendor/codali/docdex/DocdexClient.d.ts +8 -2
- package/dist/vendor/codali/docdex/DocdexClient.d.ts.map +1 -1
- package/dist/vendor/codali/docdex/DocdexClient.js +86 -11
- package/dist/vendor/codali/docdex/ManagedDocdex.d.ts +1 -0
- package/dist/vendor/codali/docdex/ManagedDocdex.d.ts.map +1 -1
- package/dist/vendor/codali/docdex/ManagedDocdex.js +25 -4
- package/dist/vendor/codali/eval/TrustBenchmark.d.ts +94 -0
- package/dist/vendor/codali/eval/TrustBenchmark.d.ts.map +1 -0
- package/dist/vendor/codali/eval/TrustBenchmark.js +199 -0
- package/dist/vendor/codali/eval/fixtures/TerminalRecoveryJourney.d.ts.map +1 -1
- package/dist/vendor/codali/eval/fixtures/TerminalRecoveryJourney.js +10 -1
- package/dist/vendor/codali/permissions/PermissionGate.d.ts +1 -1
- package/dist/vendor/codali/permissions/PermissionGate.d.ts.map +1 -1
- package/dist/vendor/codali/permissions/PermissionGate.js +40 -2
- package/dist/vendor/codali/permissions/WorkspacePermissions.d.ts +11 -0
- package/dist/vendor/codali/permissions/WorkspacePermissions.d.ts.map +1 -0
- package/dist/vendor/codali/permissions/WorkspacePermissions.js +42 -0
- package/dist/vendor/codali/providers/ModelServiceError.js +1 -1
- package/dist/vendor/codali/providers/OpenAiCompatibleProvider.d.ts.map +1 -1
- package/dist/vendor/codali/providers/OpenAiCompatibleProvider.js +3 -1
- package/dist/vendor/codali/runtime/ComputedAnswer.d.ts +13 -0
- package/dist/vendor/codali/runtime/ComputedAnswer.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/ComputedAnswer.js +75 -0
- package/dist/vendor/codali/runtime/ContextCompression.d.ts +22 -0
- package/dist/vendor/codali/runtime/ContextCompression.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/ContextCompression.js +53 -0
- package/dist/vendor/codali/runtime/InspectionBudget.d.ts +8 -0
- package/dist/vendor/codali/runtime/InspectionBudget.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/InspectionBudget.js +25 -0
- package/dist/vendor/codali/runtime/InteractionContract.d.ts +42 -0
- package/dist/vendor/codali/runtime/InteractionContract.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/InteractionContract.js +50 -0
- package/dist/vendor/codali/runtime/InteractionRouter.d.ts +46 -5
- package/dist/vendor/codali/runtime/InteractionRouter.d.ts.map +1 -1
- package/dist/vendor/codali/runtime/InteractionRouter.js +108 -27
- package/dist/vendor/codali/runtime/PreparedDocdex.d.ts +4 -0
- package/dist/vendor/codali/runtime/PreparedDocdex.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/PreparedDocdex.js +55 -0
- package/dist/vendor/codali/runtime/SessionController.d.ts +22 -0
- package/dist/vendor/codali/runtime/SessionController.d.ts.map +1 -1
- package/dist/vendor/codali/runtime/SessionController.js +721 -61
- package/dist/vendor/codali/session/InstructionLoader.d.ts +5 -1
- package/dist/vendor/codali/session/InstructionLoader.d.ts.map +1 -1
- package/dist/vendor/codali/session/InstructionLoader.js +65 -19
- package/dist/vendor/codali/session/SkillCatalog.d.ts +33 -0
- package/dist/vendor/codali/session/SkillCatalog.d.ts.map +1 -0
- package/dist/vendor/codali/session/SkillCatalog.js +194 -0
- package/dist/vendor/codali/tools/SemanticToolRetrieval.d.ts +19 -0
- package/dist/vendor/codali/tools/SemanticToolRetrieval.d.ts.map +1 -0
- package/dist/vendor/codali/tools/SemanticToolRetrieval.js +52 -0
- package/dist/vendor/codali/tools/ToolRetrieval.d.ts +7 -0
- package/dist/vendor/codali/tools/ToolRetrieval.d.ts.map +1 -0
- package/dist/vendor/codali/tools/ToolRetrieval.js +25 -0
- package/dist/vendor/codali/tools/browser/BrowserTool.d.ts +9 -0
- package/dist/vendor/codali/tools/browser/BrowserTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/browser/BrowserTool.js +152 -0
- package/dist/vendor/codali/tools/browser/BrowserWorker.d.ts +2 -0
- package/dist/vendor/codali/tools/browser/BrowserWorker.d.ts.map +1 -0
- package/dist/vendor/codali/tools/browser/BrowserWorker.js +51 -0
- package/dist/vendor/codali/tools/calculation/CalculatorTool.d.ts +5 -0
- package/dist/vendor/codali/tools/calculation/CalculatorTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/calculation/CalculatorTool.js +137 -0
- package/dist/vendor/codali/tools/deterministic/DeterministicRuntime.d.ts +39 -0
- package/dist/vendor/codali/tools/deterministic/DeterministicRuntime.d.ts.map +1 -0
- package/dist/vendor/codali/tools/deterministic/DeterministicRuntime.js +98 -0
- package/dist/vendor/codali/tools/deterministic/DeterministicTools.d.ts +8 -0
- package/dist/vendor/codali/tools/deterministic/DeterministicTools.d.ts.map +1 -0
- package/dist/vendor/codali/tools/deterministic/DeterministicTools.js +86 -0
- package/dist/vendor/codali/tools/deterministic/node-worker.cjs +38 -0
- package/dist/vendor/codali/tools/deterministic/python-worker.py +222 -0
- package/dist/vendor/codali/tools/docdex/DocdexCatalogTools.d.ts +4 -0
- package/dist/vendor/codali/tools/docdex/DocdexCatalogTools.d.ts.map +1 -0
- package/dist/vendor/codali/tools/docdex/DocdexCatalogTools.js +58 -0
- package/dist/vendor/codali/tools/docdex/DocdexTools.d.ts +2 -0
- package/dist/vendor/codali/tools/docdex/DocdexTools.d.ts.map +1 -1
- package/dist/vendor/codali/tools/docdex/DocdexTools.js +72 -105
- package/dist/vendor/codali/tools/documents/DocumentRuntime.d.ts +12 -0
- package/dist/vendor/codali/tools/documents/DocumentRuntime.d.ts.map +1 -0
- package/dist/vendor/codali/tools/documents/DocumentRuntime.js +59 -0
- package/dist/vendor/codali/tools/documents/DocumentTools.d.ts +19 -0
- package/dist/vendor/codali/tools/documents/DocumentTools.d.ts.map +1 -0
- package/dist/vendor/codali/tools/documents/DocumentTools.js +150 -0
- package/dist/vendor/codali/tools/documents/worker.py +267 -0
- package/dist/vendor/codali/tools/entities/AdesTool.d.ts +7 -0
- package/dist/vendor/codali/tools/entities/AdesTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/entities/AdesTool.js +59 -0
- package/dist/vendor/codali/tools/research/TnlTool.d.ts +22 -0
- package/dist/vendor/codali/tools/research/TnlTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/research/TnlTool.js +246 -0
- package/dist/vendor/codali/tools/shell/HostToolchain.d.ts.map +1 -1
- package/dist/vendor/codali/tools/shell/HostToolchain.js +14 -2
- package/dist/vendor/codali/tools/shell/IsolatedExecutor.d.ts +3 -2
- package/dist/vendor/codali/tools/shell/IsolatedExecutor.d.ts.map +1 -1
- package/dist/vendor/codali/tools/shell/IsolatedExecutor.js +34 -4
- package/dist/vendor/codali/tools/system/TimeTool.d.ts +4 -0
- package/dist/vendor/codali/tools/system/TimeTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/system/TimeTool.js +22 -0
- package/dist/vendor/codali/tools/verification/JavaScriptVerificationTool.d.ts +47 -0
- package/dist/vendor/codali/tools/verification/JavaScriptVerificationTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/verification/JavaScriptVerificationTool.js +71 -0
- package/dist/vendor/codali/tools/verification/JavaScriptVerificationWorker.d.ts +2 -0
- package/dist/vendor/codali/tools/verification/JavaScriptVerificationWorker.d.ts.map +1 -0
- package/dist/vendor/codali/tools/verification/JavaScriptVerificationWorker.js +91 -0
- package/dist/vendor/codali/tools/verification/VitestTool.d.ts +3 -0
- package/dist/vendor/codali/tools/verification/VitestTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/verification/VitestTool.js +128 -0
- package/dist/vendor/config/AGENTS.md +11 -0
- package/dist/vendor/config/deterministic/install-python.mjs +16 -0
- package/dist/vendor/config/deterministic/node-worker.mjs +77 -0
- package/dist/vendor/config/deterministic/python-worker.py +222 -0
- package/dist/vendor/config/deterministic/requirements.txt +6 -0
- package/dist/vendor/config/docdex-runtime.json +21 -0
- package/dist/vendor/config/docdex-tools-0.2.99.json +3977 -0
- package/dist/vendor/config/documents/install-python.mjs +16 -0
- package/dist/vendor/config/documents/requirements.txt +10 -0
- package/dist/vendor/config/documents/worker.py +267 -0
- package/dist/vendor/config/skills/planning/SKILL.md +13 -0
- package/package.json +11 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SessionEvent } from "../../runtime/SessionController.js";
|
|
2
|
+
import type { PermissionProfile } from "../../permissions/PermissionGate.js";
|
|
2
3
|
import { TerminalEditor } from "./TerminalEditor.js";
|
|
3
4
|
import { type TerminalScreenState } from "./TerminalScreen.js";
|
|
4
5
|
export interface TuiCommand {
|
|
@@ -40,6 +41,8 @@ export declare class TerminalTui {
|
|
|
40
41
|
private transcriptRows;
|
|
41
42
|
private outputBlocked;
|
|
42
43
|
private pendingInspection?;
|
|
44
|
+
private selection?;
|
|
45
|
+
private permissionPicker?;
|
|
43
46
|
constructor(options: TerminalTuiOptions);
|
|
44
47
|
start(): void;
|
|
45
48
|
wait(): Promise<void>;
|
|
@@ -67,6 +70,7 @@ export declare class TerminalTui {
|
|
|
67
70
|
restore(events: SessionEvent[]): void;
|
|
68
71
|
event(event: SessionEvent): void;
|
|
69
72
|
approve(title: string, details: string, signal?: AbortSignal): Promise<"once" | "session" | "deny">;
|
|
73
|
+
choosePermissions(current: PermissionProfile): Promise<PermissionProfile | undefined>;
|
|
70
74
|
private pickerItems;
|
|
71
75
|
private showPicker;
|
|
72
76
|
private openPicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerminalTui.d.ts","sourceRoot":"","sources":["../../../src/cli/tui/TerminalTui.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAA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AC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IACtJ,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI;IAgBrC,KAAK,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAqChC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IAenG,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IAerF,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,UAAU;YAIJ,YAAY;IAa1B,OAAO,CAAC,KAAK,CAIX;IACF,OAAO,CAAC,GAAG;CAwEZ;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,EAAE,cAAS,KAAG,MAU5D,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { TerminalInput } from "../TerminalInput.js";
|
|
|
5
5
|
import { terminalText, TerminalTextStream } from "../TerminalText.js";
|
|
6
6
|
import { terminalHelp, terminalUsage, toolActivity } from "./TerminalPresentation.js";
|
|
7
7
|
import { TerminalEditor } from "./TerminalEditor.js";
|
|
8
|
+
import { TerminalSelection, clipboardSequence } from "./TerminalSelection.js";
|
|
8
9
|
import { renderTerminalScreen } from "./TerminalScreen.js";
|
|
9
10
|
/** One terminal owner; controller events are rendered as data, never executable escape codes. */
|
|
10
11
|
export class TerminalTui {
|
|
@@ -18,9 +19,10 @@ export class TerminalTui {
|
|
|
18
19
|
this.frameRows = 12;
|
|
19
20
|
this.transcriptRows = 0;
|
|
20
21
|
this.outputBlocked = false;
|
|
21
|
-
this.resize = () => { this.previousFrame = []; this.schedule(); };
|
|
22
|
+
this.resize = () => { this.selection = undefined; this.previousFrame = []; this.schedule(); };
|
|
22
23
|
this.drain = () => { this.outputBlocked = false; this.schedule(); };
|
|
23
24
|
this.onKey = (text, key) => {
|
|
25
|
+
this.selection = undefined;
|
|
24
26
|
try {
|
|
25
27
|
this.key(text, key);
|
|
26
28
|
}
|
|
@@ -38,14 +40,31 @@ export class TerminalTui {
|
|
|
38
40
|
if (!this.editor.insert(terminalText(text).replace(/\t/g, " ")))
|
|
39
41
|
this.notice("Input exceeds 256 KiB");
|
|
40
42
|
this.schedule();
|
|
41
|
-
}, onRejected: text => this.notice(text), onWheel: direction => this.scroll(direction * -3),
|
|
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" }) });
|
|
42
61
|
}
|
|
43
62
|
start() {
|
|
44
63
|
if (this.live)
|
|
45
64
|
return;
|
|
46
65
|
this.live = true;
|
|
47
66
|
this.previousRaw = !!process.stdin.isRaw;
|
|
48
|
-
process.stdout.write("\x1b[?1049h\x1b[?25l\x1b[?2004h\x1b[?1000h\x1b[?1006h\x1b[2J");
|
|
67
|
+
process.stdout.write("\x1b[?1049h\x1b[?25l\x1b[?2004h\x1b[?1000h\x1b[?1002h\x1b[?1006h\x1b[2J");
|
|
49
68
|
process.stdin.setRawMode(true);
|
|
50
69
|
emitKeypressEvents(this.input);
|
|
51
70
|
this.input.on("keypress", this.onKey);
|
|
@@ -67,6 +86,7 @@ export class TerminalTui {
|
|
|
67
86
|
this.timer = undefined;
|
|
68
87
|
this.approval?.resolve("deny");
|
|
69
88
|
this.approval = undefined;
|
|
89
|
+
this.permissionPicker?.resolve();
|
|
70
90
|
process.stdout.off("resize", this.resize);
|
|
71
91
|
process.stdout.off("drain", this.drain);
|
|
72
92
|
process.stdin.unpipe(this.input);
|
|
@@ -74,7 +94,7 @@ export class TerminalTui {
|
|
|
74
94
|
this.input.destroy();
|
|
75
95
|
process.stdin.setRawMode(this.previousRaw);
|
|
76
96
|
process.stdin.pause();
|
|
77
|
-
process.stdout.write("\x1b[0m\x1b[?1006l\x1b[?1000l\x1b[?2004l\x1b[?25h\x1b[?1049l");
|
|
97
|
+
process.stdout.write("\x1b[0m\x1b[?1006l\x1b[?1002l\x1b[?1000l\x1b[?2004l\x1b[?25h\x1b[?1049l");
|
|
78
98
|
this.resolveClosed();
|
|
79
99
|
}
|
|
80
100
|
schedule() {
|
|
@@ -99,6 +119,10 @@ export class TerminalTui {
|
|
|
99
119
|
}
|
|
100
120
|
this.frameRows = frame.viewportRows;
|
|
101
121
|
this.transcriptRows = frame.transcriptRows;
|
|
122
|
+
if (this.selection) {
|
|
123
|
+
frame.lines = this.selection.frame();
|
|
124
|
+
frame.cursor = undefined;
|
|
125
|
+
}
|
|
102
126
|
let output = "\x1b[?25l";
|
|
103
127
|
frame.lines.forEach((line, i) => { if (this.previousFrame[i] !== line)
|
|
104
128
|
output += `\x1b[${i + 1};1H\x1b[2K${line}`; });
|
|
@@ -118,6 +142,8 @@ export class TerminalTui {
|
|
|
118
142
|
scroll(lines) {
|
|
119
143
|
if (this.picker)
|
|
120
144
|
return;
|
|
145
|
+
if (!this.state.overlay)
|
|
146
|
+
this.state.introDismissed = true;
|
|
121
147
|
if (this.state.overlay)
|
|
122
148
|
this.state.overlay.offset = Math.max(0, this.state.overlay.offset - lines);
|
|
123
149
|
else
|
|
@@ -142,6 +168,7 @@ export class TerminalTui {
|
|
|
142
168
|
if (this.approval)
|
|
143
169
|
this.pendingInspection = overlay;
|
|
144
170
|
else {
|
|
171
|
+
this.permissionPicker?.resolve();
|
|
145
172
|
this.picker = undefined;
|
|
146
173
|
this.state.overlay = overlay;
|
|
147
174
|
}
|
|
@@ -209,6 +236,16 @@ export class TerminalTui {
|
|
|
209
236
|
}
|
|
210
237
|
else if (event.type === "interaction_progress" && typeof data.message === "string")
|
|
211
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
|
+
}
|
|
212
249
|
else if (event.type === "usage") {
|
|
213
250
|
const usage = data.usage;
|
|
214
251
|
if (Number.isFinite(usage?.tokens))
|
|
@@ -249,6 +286,7 @@ export class TerminalTui {
|
|
|
249
286
|
this.schedule();
|
|
250
287
|
}
|
|
251
288
|
approve(title, details, signal) {
|
|
289
|
+
this.permissionPicker?.resolve();
|
|
252
290
|
this.approval?.resolve("deny");
|
|
253
291
|
this.picker = undefined;
|
|
254
292
|
return new Promise(resolve => {
|
|
@@ -261,7 +299,7 @@ export class TerminalTui {
|
|
|
261
299
|
this.schedule();
|
|
262
300
|
resolve(choice);
|
|
263
301
|
};
|
|
264
|
-
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: "
|
|
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" };
|
|
265
303
|
this.approval = { resolve: finish, selected: 2, overlay };
|
|
266
304
|
this.state.overlay = overlay;
|
|
267
305
|
signal?.addEventListener("abort", abort, { once: true });
|
|
@@ -270,6 +308,26 @@ export class TerminalTui {
|
|
|
270
308
|
this.schedule();
|
|
271
309
|
});
|
|
272
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
|
+
}
|
|
273
331
|
pickerItems() {
|
|
274
332
|
if (!this.picker)
|
|
275
333
|
return [];
|
|
@@ -307,23 +365,37 @@ export class TerminalTui {
|
|
|
307
365
|
this.showPicker();
|
|
308
366
|
}
|
|
309
367
|
key(text, key) {
|
|
310
|
-
if (key.ctrl && key.name === "c") {
|
|
368
|
+
if (key.ctrl && (key.name === "c" || key.name === "z")) {
|
|
311
369
|
this.options.cancel();
|
|
312
370
|
return;
|
|
313
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
|
+
}
|
|
314
386
|
if (this.approval) {
|
|
315
387
|
if (key.name === "escape")
|
|
316
388
|
this.approval.resolve("deny");
|
|
317
389
|
else if ((process.stdout.columns || 80) < 24 || (process.stdout.rows || 24) < 10)
|
|
318
390
|
return;
|
|
319
|
-
else if (key.name === "
|
|
320
|
-
this.approval.selected = (this.approval.selected + (key.name === "
|
|
391
|
+
else if (key.name === "up" || key.name === "down") {
|
|
392
|
+
this.approval.selected = (this.approval.selected + (key.name === "down" ? 1 : 2)) % 3;
|
|
321
393
|
this.approval.overlay.selected = this.approval.selected;
|
|
322
394
|
}
|
|
323
395
|
else if (key.name === "return")
|
|
324
396
|
this.approval.resolve(["once", "session", "deny"][this.approval.selected]);
|
|
325
|
-
else if (
|
|
326
|
-
this.approval.overlay.offset = Math.max(0, this.approval.overlay.offset + (
|
|
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));
|
|
327
399
|
return;
|
|
328
400
|
}
|
|
329
401
|
if (this.picker) {
|
|
@@ -398,7 +470,7 @@ export class TerminalTui {
|
|
|
398
470
|
return;
|
|
399
471
|
}
|
|
400
472
|
if (key.name === "pageup" || key.name === "pagedown") {
|
|
401
|
-
this.
|
|
473
|
+
this.scroll((key.name === "pageup" ? 1 : -1) * Math.max(1, this.frameRows - 2));
|
|
402
474
|
return;
|
|
403
475
|
}
|
|
404
476
|
if (key.ctrl && key.name === "s") {
|
|
@@ -441,7 +513,19 @@ export class TerminalTui {
|
|
|
441
513
|
if (!this.editor.vertical(direction))
|
|
442
514
|
this.editor.previous(direction);
|
|
443
515
|
}
|
|
444
|
-
else if (key.name === "tab") {
|
|
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) {
|
|
445
529
|
const matches = this.options.commands.filter(command => command.name.startsWith(this.editor.text));
|
|
446
530
|
if (this.editor.text.startsWith("/") && matches.length)
|
|
447
531
|
this.editor.set(matches[0].name + " ");
|
|
@@ -12,7 +12,7 @@ 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
17
|
" or: codali exec <prompt> --output-format jsonl --permission-profile workspace\n" +
|
|
18
18
|
" or: codali config validate --file <path>\n" +
|
|
@@ -55,9 +55,15 @@ export interface TaskControlConfig {
|
|
|
55
55
|
reviewPolicy: "risk-and-evidence";
|
|
56
56
|
}
|
|
57
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";
|
|
58
63
|
routerBinding?: string;
|
|
59
64
|
answerBinding?: string;
|
|
60
65
|
promptVersion?: string;
|
|
66
|
+
routerResponseFormat?: "json" | "json_schema";
|
|
61
67
|
routerPrompt?: string;
|
|
62
68
|
answerPrompt?: string;
|
|
63
69
|
maxInputChars?: number;
|
|
@@ -67,6 +73,14 @@ export interface InteractionConfig {
|
|
|
67
73
|
maxModelCalls?: number;
|
|
68
74
|
maxInspectionSteps?: number;
|
|
69
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;
|
|
70
84
|
}
|
|
71
85
|
export interface OrchestrationConfig {
|
|
72
86
|
schemaVersion: 1;
|
|
@@ -81,6 +95,10 @@ export interface OrchestrationConfig {
|
|
|
81
95
|
effort?: Partial<Record<EffortLevel, Partial<EffortBudget>>>;
|
|
82
96
|
taskControl?: TaskControlConfig;
|
|
83
97
|
interaction?: InteractionConfig;
|
|
98
|
+
skills?: {
|
|
99
|
+
enabled?: boolean;
|
|
100
|
+
directories?: string[];
|
|
101
|
+
};
|
|
84
102
|
docdex?: {
|
|
85
103
|
binary?: string;
|
|
86
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,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,YAAY,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,oBAAoB,CAAC;AACnI,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAK/E,CAAC;AAEH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,QAAQ,GAAG,mBAAmB,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,cA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CAAC;AACF,eAAO,MAAM,YAAY,GAAI,QAAQ,mBAAmB,EAAE,OAAO,WAAW,KAAG,YAAyE,CAAC"}
|
|
@@ -49,7 +49,7 @@ const canonical = (v) => Array.isArray(v) ? v.map(canonical) : isRecord(v)
|
|
|
49
49
|
export const orchestrationHash = (config) => createHash("sha256").update(JSON.stringify(canonical(config))).digest("hex");
|
|
50
50
|
export const validateOrchestrationConfig = (input) => {
|
|
51
51
|
const root = object(input, "orchestration");
|
|
52
|
-
fields(root, ["schemaVersion", "profile", "providers", "models", "bindings", "routing", "effort", "taskControl", "docdex", "interaction"], "orchestration");
|
|
52
|
+
fields(root, ["schemaVersion", "profile", "providers", "models", "bindings", "routing", "effort", "taskControl", "docdex", "interaction", "skills"], "orchestration");
|
|
53
53
|
if (root.schemaVersion !== 1)
|
|
54
54
|
throw new Error("Unsupported orchestration schemaVersion");
|
|
55
55
|
nonempty(root.profile, "profile");
|
|
@@ -174,7 +174,21 @@ export const validateOrchestrationConfig = (input) => {
|
|
|
174
174
|
}
|
|
175
175
|
if (root.interaction !== undefined) {
|
|
176
176
|
const value = object(root.interaction, "interaction");
|
|
177
|
-
fields(value, ["routerBinding", "answerBinding", "promptVersion", "routerPrompt", "answerPrompt", "maxInputChars", "historyChars", "maxOutputTokens", "maxTotalTokens", "maxModelCalls", "maxInspectionSteps", "timeoutMs"], "interaction");
|
|
177
|
+
fields(value, ["strategy", "toolExposure", "toolSelection", "initialTools", "routerBinding", "answerBinding", "promptVersion", "routerPrompt", "answerPrompt", "maxInputChars", "historyChars", "maxOutputTokens", "maxTotalTokens", "maxModelCalls", "maxInspectionSteps", "timeoutMs", "answerReview", "routerResponseFormat", "calculator"], "interaction");
|
|
178
|
+
if (value.toolExposure !== undefined && (typeof value.toolExposure !== "string" || !["gateway", "native"].includes(value.toolExposure)))
|
|
179
|
+
throw new Error("interaction.toolExposure: expected gateway or native");
|
|
180
|
+
if (value.toolSelection !== undefined && (typeof value.toolSelection !== "string" || !["fixed", "progressive", "lexical", "semantic"].includes(value.toolSelection)))
|
|
181
|
+
throw new Error("interaction.toolSelection: expected fixed, progressive, lexical or semantic");
|
|
182
|
+
if (value.initialTools !== undefined) {
|
|
183
|
+
if (!["gateway", "adaptive"].includes(String(value.strategy)) || value.toolSelection !== "progressive")
|
|
184
|
+
throw new Error("interaction.initialTools: requires gateway or adaptive strategy with progressive tools");
|
|
185
|
+
if (!Array.isArray(value.initialTools) || value.initialTools.length > 16 || value.initialTools.some(name => typeof name !== "string" || !/^[a-z][a-z0-9_]{0,79}$/u.test(name)) || new Set(value.initialTools).size !== value.initialTools.length)
|
|
186
|
+
throw new Error("interaction.initialTools: expected up to 16 distinct tool names");
|
|
187
|
+
}
|
|
188
|
+
if (value.strategy !== undefined && (typeof value.strategy !== "string" || !["routed", "direct", "native", "cascade", "gateway", "adaptive"].includes(value.strategy)))
|
|
189
|
+
throw new Error("interaction.strategy: expected routed, direct, native, cascade, gateway or adaptive");
|
|
190
|
+
if (value.calculator !== undefined && typeof value.calculator !== "boolean")
|
|
191
|
+
throw new Error("interaction.calculator: expected boolean");
|
|
178
192
|
for (const key of ["routerBinding", "answerBinding"])
|
|
179
193
|
if (value[key] !== undefined) {
|
|
180
194
|
nonempty(value[key], `interaction.${key}`);
|
|
@@ -183,12 +197,38 @@ export const validateOrchestrationConfig = (input) => {
|
|
|
183
197
|
}
|
|
184
198
|
if (value.promptVersion !== undefined)
|
|
185
199
|
nonempty(value.promptVersion, "interaction.promptVersion");
|
|
200
|
+
if (value.routerResponseFormat !== undefined && !["json", "json_schema"].includes(String(value.routerResponseFormat)))
|
|
201
|
+
throw new Error("interaction.routerResponseFormat: expected json or json_schema");
|
|
186
202
|
for (const key of ["routerPrompt", "answerPrompt"])
|
|
187
203
|
if (value[key] !== undefined && (typeof value[key] !== "string" || !String(value[key]).trim() || String(value[key]).length > 16000))
|
|
188
204
|
throw new Error(`interaction.${key}: expected bounded nonempty prompt`);
|
|
189
205
|
for (const key of ["maxInputChars", "historyChars", "maxOutputTokens", "maxTotalTokens", "maxModelCalls", "maxInspectionSteps", "timeoutMs"])
|
|
190
206
|
if (value[key] !== undefined)
|
|
191
207
|
positive(value[key], `interaction.${key}`);
|
|
208
|
+
if (value.answerReview !== undefined) {
|
|
209
|
+
const review = object(value.answerReview, "interaction.answerReview");
|
|
210
|
+
fields(review, ["enabled", "binding", "maxOutputTokens"], "interaction.answerReview");
|
|
211
|
+
if (typeof review.enabled !== "boolean")
|
|
212
|
+
throw new Error("interaction.answerReview.enabled: expected boolean");
|
|
213
|
+
if (review.binding !== undefined) {
|
|
214
|
+
nonempty(review.binding, "interaction.answerReview.binding");
|
|
215
|
+
if (!hasOwn(bindings, String(review.binding)) || object(bindings[String(review.binding)], "review binding").enabled === false)
|
|
216
|
+
throw new Error("interaction.answerReview.binding: unavailable binding");
|
|
217
|
+
}
|
|
218
|
+
if (review.maxOutputTokens !== undefined) {
|
|
219
|
+
positive(review.maxOutputTokens, "interaction.answerReview.maxOutputTokens");
|
|
220
|
+
if (Number(review.maxOutputTokens) > 4096)
|
|
221
|
+
throw new Error("interaction.answerReview.maxOutputTokens: exceeds 4096");
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
if (root.skills !== undefined) {
|
|
226
|
+
const skills = object(root.skills, "skills");
|
|
227
|
+
fields(skills, ["enabled", "directories"], "skills");
|
|
228
|
+
if (skills.enabled !== undefined && typeof skills.enabled !== "boolean")
|
|
229
|
+
throw new Error("skills.enabled: expected boolean");
|
|
230
|
+
if (skills.directories !== undefined && (!Array.isArray(skills.directories) || skills.directories.length > 16 || skills.directories.some(value => typeof value !== "string" || !value.trim() || value.length > 4096 || value.includes("\0"))))
|
|
231
|
+
throw new Error("skills.directories: expected at most 16 directory paths");
|
|
192
232
|
}
|
|
193
233
|
if (root.docdex !== undefined) {
|
|
194
234
|
const d = object(root.docdex, "docdex");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ToolInputSchema } from "../tools/ToolTypes.js";
|
|
2
|
+
export interface DocdexCatalogEntry {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: ToolInputSchema;
|
|
6
|
+
}
|
|
7
|
+
export declare const docdexCatalog: DocdexCatalogEntry[];
|
|
8
|
+
export type DocdexCatalogKind = "read" | "memory" | "web" | "external" | "delegate";
|
|
9
|
+
export declare const docdexCatalogKind: (name: string) => DocdexCatalogKind | undefined;
|
|
10
|
+
export declare const docdexCatalogNames: Set<string>;
|
|
11
|
+
export declare const docdexCatalogOperation: (name: string) => string | undefined;
|
|
12
|
+
//# sourceMappingURL=DocdexCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocdexCatalog.d.ts","sourceRoot":"","sources":["../../src/docdex/DocdexCatalog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,eAAe,CAAC;CAAE;AAGxG,eAAO,MAAM,aAAa,sBAAiJ,CAAC;AAY5K,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;AACpF,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,iBAAiB,GAAG,SAOpE,CAAC;AACF,eAAO,MAAM,kBAAkB,aAAgD,CAAC;AAChF,eAAO,MAAM,sBAAsB,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,SAA+G,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
// Versioned protocol snapshot enables lazy startup and zero catalog tokens on
|
|
3
|
+
// ordinary chat. A server's advertised schema is checked before first use.
|
|
4
|
+
export const docdexCatalog = JSON.parse(readFileSync(new URL("../../config/docdex-tools-0.2.99.json", import.meta.url), "utf8")).tools;
|
|
5
|
+
const readNames = new Set(`search capabilities rerank batch_search files open tree stats repo_inspect symbols ast impact_diagnostics impact_graph dag_export
|
|
6
|
+
memory_recall conversation_search conversation_list conversation_read conversation_export diary_read wakeup kg_query kg_search_nodes kg_search_edges kg_timeline kg_search_episodes kg_neighborhood kg_entity_links kg_episode
|
|
7
|
+
llm_diagnostics personal_preferences_status personal_preferences_categories personal_preferences_retention_policies personal_preferences_list personal_preferences_read personal_preferences_search personal_preferences_reviews personal_preferences_export personal_preferences_claims personal_preferences_claim_read personal_preferences_operator_events personal_preferences_snapshots personal_preferences_snapshot_read personal_preferences_routines personal_preferences_routine_read personal_preferences_routine_explain personal_preferences_mind_map personal_preferences_playbooks
|
|
8
|
+
ai_terminal_integrations ai_terminal_detect ai_terminal_status ai_terminal_events personal_preferences_generated_skills personal_preferences_generated_skill personal_preferences_generated_skill_events personal_preferences_generated_skills_preview personal_preferences_generated_skills_render
|
|
9
|
+
clone_context clone_directive clone_explain clone_replay_dataset clone_replay_suite memory_layers memory_route get_profile`.split(/\s+/).map(name => `docdex_${name}`));
|
|
10
|
+
const memoryNames = new Set(`index memory_save memory_store conversation_import diary_write conversation_hook save_preference
|
|
11
|
+
personal_preferences_feedback personal_preferences_operator_event_record personal_preferences_generated_skill_validate`.split(/\s+/).map(name => `docdex_${name}`));
|
|
12
|
+
const externalNames = new Set(`conversation_delete conversation_redact conversation_prune kg_delete_edge kg_delete_episode kg_rebuild kg_clear
|
|
13
|
+
personal_preferences_review personal_preferences_process personal_preferences_scan personal_preferences_redact personal_preferences_delete personal_preferences_prune personal_preferences_purge personal_preferences_claim_review personal_preferences_claim_override personal_preferences_claim_forget
|
|
14
|
+
personal_preferences_operator_events_scan_artifacts personal_preferences_snapshots_rebuild personal_preferences_routines_rebuild ai_terminal_integrations_bootstrap ai_terminal_capture ai_terminal_sync_skills
|
|
15
|
+
personal_preferences_generated_skills_sync personal_preferences_generated_skills_autopilot personal_preferences_generated_skill_install personal_preferences_generated_skill_disable personal_preferences_generated_skill_rollback clone_evaluate clone_replay_evaluate`.split(/\s+/).map(name => `docdex_${name}`));
|
|
16
|
+
export const docdexCatalogKind = (name) => {
|
|
17
|
+
if (readNames.has(name))
|
|
18
|
+
return "read";
|
|
19
|
+
if (memoryNames.has(name))
|
|
20
|
+
return "memory";
|
|
21
|
+
if (externalNames.has(name))
|
|
22
|
+
return "external";
|
|
23
|
+
if (name === "docdex_web_research")
|
|
24
|
+
return "web";
|
|
25
|
+
if (name === "docdex_local_completion")
|
|
26
|
+
return "delegate";
|
|
27
|
+
return undefined; // Unknown operations never inherit a read permission.
|
|
28
|
+
};
|
|
29
|
+
export const docdexCatalogNames = new Set(docdexCatalog.map(tool => tool.name));
|
|
30
|
+
export const docdexCatalogOperation = (name) => docdexCatalogNames.has(name) && docdexCatalogKind(name) ? name.replace(/^docdex_/, "") : undefined;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { DocdexCapabilitySnapshot } from "../cognitive/Types.js";
|
|
2
|
+
import { type DocdexCatalogEntry } from "./DocdexCatalog.js";
|
|
2
3
|
export interface DocdexClientOptions {
|
|
3
4
|
/** Trusted host accounting hook; each retrieval HTTP attempt reserves before dispatch. */
|
|
4
5
|
beforeRequest?: (url: string) => void | Promise<void>;
|
|
5
6
|
signal?: () => AbortSignal | undefined;
|
|
6
7
|
timeoutMs?: number;
|
|
8
|
+
webTimeoutMs?: number;
|
|
7
9
|
localSearchOnly?: boolean;
|
|
8
10
|
baseUrl: string;
|
|
9
11
|
repoRoot?: string;
|
|
@@ -20,7 +22,7 @@ export interface DocdexClientOptions {
|
|
|
20
22
|
dagSessionId?: string;
|
|
21
23
|
}
|
|
22
24
|
export type DocdexRuntimeErrorCode = "missing_credentials" | "repo_access_denied" | "scope_denied" | "encrypted_operation_disabled" | "docdex_context_missing" | "docdex_api_key_missing" | "docdex_operation_not_allowed" | "docdex_auth_failed" | "docdex_repo_access_denied" | "docdex_unavailable";
|
|
23
|
-
export type DocdexRuntimeOperation = "health" | "initialize" | "search" | "snippet" | "open" | "symbols" | "ast" | "impact_graph" | "impact_diagnostics" | "dag_export" | "tree" | "memory_save" | "memory_recall" | "wakeup" | "diary_read" | "diary_write" | "conversation_read" | "conversation_search" | "kg_query" | "profile_read" | "profile_write" | "web_research" | "chat_context" | "rerank" | "batch_search" | "capabilities" | "stats" | "files" | "repo_inspect" | "index_rebuild" | "index_ingest" | "delegate" | "hooks_validate";
|
|
25
|
+
export type DocdexRuntimeOperation = `catalog:${string}` | "health" | "initialize" | "search" | "snippet" | "open" | "symbols" | "ast" | "impact_graph" | "impact_diagnostics" | "dag_export" | "tree" | "memory_save" | "memory_recall" | "wakeup" | "diary_read" | "diary_write" | "conversation_read" | "conversation_search" | "kg_query" | "profile_read" | "profile_write" | "web_research" | "chat_context" | "rerank" | "batch_search" | "capabilities" | "stats" | "files" | "repo_inspect" | "index_rebuild" | "index_ingest" | "delegate" | "hooks_validate";
|
|
24
26
|
export interface DocdexRuntimeErrorOptions {
|
|
25
27
|
status?: number;
|
|
26
28
|
retryable?: boolean;
|
|
@@ -173,7 +175,11 @@ export declare class DocdexClient {
|
|
|
173
175
|
chatContext(messages: DocdexChatMessage[], options?: DocdexChatContextOptions): Promise<unknown>;
|
|
174
176
|
dagExport(sessionId: string, options?: DocdexDagOptions): Promise<unknown>;
|
|
175
177
|
private ensureMcpSession;
|
|
176
|
-
callMcp<T>(method: string, params: Record<string, unknown
|
|
178
|
+
callMcp<T>(method: string, params: Record<string, unknown>, timeoutMs?: number): Promise<T>;
|
|
179
|
+
private catalogRequest?;
|
|
180
|
+
listCatalog(): Promise<DocdexCatalogEntry[]>;
|
|
181
|
+
callCatalog<T>(name: string, arguments_: Record<string, unknown>): Promise<T>;
|
|
182
|
+
private catalogRpc;
|
|
177
183
|
private normalizeMcpResult;
|
|
178
184
|
private tryParseJson;
|
|
179
185
|
private buildProjectParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocdexClient.d.ts","sourceRoot":"","sources":["../../src/docdex/DocdexClient.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,wBAAwB,EAEzB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"DocdexClient.d.ts","sourceRoot":"","sources":["../../src/docdex/DocdexClient.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,wBAAwB,EAEzB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAyC,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEpG,MAAM,WAAW,mBAAmB;IAClC,0FAA0F;IAC1F,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,yBAAyB,GAAG,MAAM,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IACnD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,sBAAsB,GAC9B,q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