opencodekit 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +28 -4
- package/dist/template/.opencode/agent/build.md +11 -3
- package/dist/template/.opencode/agent/rush.md +11 -3
- package/dist/template/.opencode/lib/lsp/client.ts +614 -0
- package/dist/template/.opencode/lib/lsp/config.ts +98 -0
- package/dist/template/.opencode/lib/lsp/constants.ts +138 -0
- package/dist/template/.opencode/lib/lsp/types.ts +138 -0
- package/dist/template/.opencode/lib/lsp/utils.ts +190 -0
- package/dist/template/.opencode/opencode.json +55 -42
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/tool/lsp.ts +325 -0
- package/package.json +1 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { LSPServerConfig } from "./types";
|
|
2
|
+
|
|
3
|
+
export const SYMBOL_KIND_MAP: Record<number, string> = {
|
|
4
|
+
1: "File",
|
|
5
|
+
2: "Module",
|
|
6
|
+
3: "Namespace",
|
|
7
|
+
4: "Package",
|
|
8
|
+
5: "Class",
|
|
9
|
+
6: "Method",
|
|
10
|
+
7: "Property",
|
|
11
|
+
8: "Field",
|
|
12
|
+
9: "Constructor",
|
|
13
|
+
10: "Enum",
|
|
14
|
+
11: "Interface",
|
|
15
|
+
12: "Function",
|
|
16
|
+
13: "Variable",
|
|
17
|
+
14: "Constant",
|
|
18
|
+
15: "String",
|
|
19
|
+
16: "Number",
|
|
20
|
+
17: "Boolean",
|
|
21
|
+
18: "Array",
|
|
22
|
+
19: "Object",
|
|
23
|
+
20: "Key",
|
|
24
|
+
21: "Null",
|
|
25
|
+
22: "EnumMember",
|
|
26
|
+
23: "Struct",
|
|
27
|
+
24: "Event",
|
|
28
|
+
25: "Operator",
|
|
29
|
+
26: "TypeParameter",
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const SEVERITY_MAP: Record<number, string> = {
|
|
33
|
+
1: "error",
|
|
34
|
+
2: "warning",
|
|
35
|
+
3: "information",
|
|
36
|
+
4: "hint",
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const DEFAULT_MAX_REFERENCES = 200;
|
|
40
|
+
export const DEFAULT_MAX_SYMBOLS = 200;
|
|
41
|
+
export const DEFAULT_MAX_DIAGNOSTICS = 200;
|
|
42
|
+
|
|
43
|
+
// Synced with OpenCode's server.ts
|
|
44
|
+
export const BUILTIN_SERVERS: Record<string, Omit<LSPServerConfig, "id">> = {
|
|
45
|
+
typescript: {
|
|
46
|
+
command: ["typescript-language-server", "--stdio"],
|
|
47
|
+
extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"],
|
|
48
|
+
},
|
|
49
|
+
vue: {
|
|
50
|
+
command: ["vue-language-server", "--stdio"],
|
|
51
|
+
extensions: [".vue"],
|
|
52
|
+
},
|
|
53
|
+
gopls: {
|
|
54
|
+
command: ["gopls"],
|
|
55
|
+
extensions: [".go"],
|
|
56
|
+
},
|
|
57
|
+
basedpyright: {
|
|
58
|
+
command: ["basedpyright-langserver", "--stdio"],
|
|
59
|
+
extensions: [".py", ".pyi"],
|
|
60
|
+
},
|
|
61
|
+
pyright: {
|
|
62
|
+
command: ["pyright-langserver", "--stdio"],
|
|
63
|
+
extensions: [".py", ".pyi"],
|
|
64
|
+
},
|
|
65
|
+
rust: {
|
|
66
|
+
command: ["rust-analyzer"],
|
|
67
|
+
extensions: [".rs"],
|
|
68
|
+
},
|
|
69
|
+
clangd: {
|
|
70
|
+
command: ["clangd", "--background-index", "--clang-tidy"],
|
|
71
|
+
extensions: [
|
|
72
|
+
".c",
|
|
73
|
+
".cpp",
|
|
74
|
+
".cc",
|
|
75
|
+
".cxx",
|
|
76
|
+
".c++",
|
|
77
|
+
".h",
|
|
78
|
+
".hpp",
|
|
79
|
+
".hh",
|
|
80
|
+
".hxx",
|
|
81
|
+
".h++",
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
svelte: {
|
|
85
|
+
command: ["svelteserver", "--stdio"],
|
|
86
|
+
extensions: [".svelte"],
|
|
87
|
+
},
|
|
88
|
+
astro: {
|
|
89
|
+
command: ["astro-ls", "--stdio"],
|
|
90
|
+
extensions: [".astro"],
|
|
91
|
+
},
|
|
92
|
+
jdtls: {
|
|
93
|
+
command: ["jdtls"],
|
|
94
|
+
extensions: [".java"],
|
|
95
|
+
},
|
|
96
|
+
lua: {
|
|
97
|
+
command: ["lua-language-server"],
|
|
98
|
+
extensions: [".lua"],
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// Extension to language ID mapping
|
|
103
|
+
export const EXT_TO_LANG: Record<string, string> = {
|
|
104
|
+
".ts": "typescript",
|
|
105
|
+
".tsx": "typescriptreact",
|
|
106
|
+
".mts": "typescript",
|
|
107
|
+
".cts": "typescript",
|
|
108
|
+
".js": "javascript",
|
|
109
|
+
".jsx": "javascriptreact",
|
|
110
|
+
".mjs": "javascript",
|
|
111
|
+
".cjs": "javascript",
|
|
112
|
+
".json": "json",
|
|
113
|
+
".jsonc": "jsonc",
|
|
114
|
+
".py": "python",
|
|
115
|
+
".pyi": "python",
|
|
116
|
+
".go": "go",
|
|
117
|
+
".rs": "rust",
|
|
118
|
+
".c": "c",
|
|
119
|
+
".cpp": "cpp",
|
|
120
|
+
".cc": "cpp",
|
|
121
|
+
".cxx": "cpp",
|
|
122
|
+
".h": "c",
|
|
123
|
+
".hpp": "cpp",
|
|
124
|
+
".java": "java",
|
|
125
|
+
".lua": "lua",
|
|
126
|
+
".vue": "vue",
|
|
127
|
+
".svelte": "svelte",
|
|
128
|
+
".astro": "astro",
|
|
129
|
+
".html": "html",
|
|
130
|
+
".css": "css",
|
|
131
|
+
".scss": "scss",
|
|
132
|
+
".md": "markdown",
|
|
133
|
+
".yaml": "yaml",
|
|
134
|
+
".yml": "yaml",
|
|
135
|
+
".sh": "shellscript",
|
|
136
|
+
".bash": "shellscript",
|
|
137
|
+
".zsh": "shellscript",
|
|
138
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export interface LSPServerConfig {
|
|
2
|
+
id: string;
|
|
3
|
+
command: string[];
|
|
4
|
+
extensions: string[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
env?: Record<string, string>;
|
|
7
|
+
initialization?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface Position {
|
|
11
|
+
line: number;
|
|
12
|
+
character: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Range {
|
|
16
|
+
start: Position;
|
|
17
|
+
end: Position;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface Location {
|
|
21
|
+
uri: string;
|
|
22
|
+
range: Range;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface LocationLink {
|
|
26
|
+
targetUri: string;
|
|
27
|
+
targetRange: Range;
|
|
28
|
+
targetSelectionRange: Range;
|
|
29
|
+
originSelectionRange?: Range;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface SymbolInfo {
|
|
33
|
+
name: string;
|
|
34
|
+
kind: number;
|
|
35
|
+
location: Location;
|
|
36
|
+
containerName?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface DocumentSymbol {
|
|
40
|
+
name: string;
|
|
41
|
+
kind: number;
|
|
42
|
+
range: Range;
|
|
43
|
+
selectionRange: Range;
|
|
44
|
+
children?: DocumentSymbol[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface Diagnostic {
|
|
48
|
+
range: Range;
|
|
49
|
+
severity?: number;
|
|
50
|
+
code?: string | number;
|
|
51
|
+
source?: string;
|
|
52
|
+
message: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface HoverResult {
|
|
56
|
+
contents:
|
|
57
|
+
| { kind?: string; value: string }
|
|
58
|
+
| string
|
|
59
|
+
| Array<{ kind?: string; value: string } | string>;
|
|
60
|
+
range?: Range;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface TextDocumentIdentifier {
|
|
64
|
+
uri: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface VersionedTextDocumentIdentifier
|
|
68
|
+
extends TextDocumentIdentifier {
|
|
69
|
+
version: number | null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface TextEdit {
|
|
73
|
+
range: Range;
|
|
74
|
+
newText: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface TextDocumentEdit {
|
|
78
|
+
textDocument: VersionedTextDocumentIdentifier;
|
|
79
|
+
edits: TextEdit[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface CreateFile {
|
|
83
|
+
kind: "create";
|
|
84
|
+
uri: string;
|
|
85
|
+
options?: { overwrite?: boolean; ignoreIfExists?: boolean };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface RenameFile {
|
|
89
|
+
kind: "rename";
|
|
90
|
+
oldUri: string;
|
|
91
|
+
newUri: string;
|
|
92
|
+
options?: { overwrite?: boolean; ignoreIfExists?: boolean };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface DeleteFile {
|
|
96
|
+
kind: "delete";
|
|
97
|
+
uri: string;
|
|
98
|
+
options?: { recursive?: boolean; ignoreIfNotExists?: boolean };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface WorkspaceEdit {
|
|
102
|
+
changes?: { [uri: string]: TextEdit[] };
|
|
103
|
+
documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface PrepareRenameResult {
|
|
107
|
+
range: Range;
|
|
108
|
+
placeholder?: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface PrepareRenameDefaultBehavior {
|
|
112
|
+
defaultBehavior: boolean;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface Command {
|
|
116
|
+
title: string;
|
|
117
|
+
command: string;
|
|
118
|
+
arguments?: unknown[];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface CodeActionContext {
|
|
122
|
+
diagnostics: Diagnostic[];
|
|
123
|
+
only?: string[];
|
|
124
|
+
triggerKind?: CodeActionTriggerKind;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type CodeActionTriggerKind = 1 | 2;
|
|
128
|
+
|
|
129
|
+
export interface CodeAction {
|
|
130
|
+
title: string;
|
|
131
|
+
kind?: string;
|
|
132
|
+
diagnostics?: Diagnostic[];
|
|
133
|
+
isPreferred?: boolean;
|
|
134
|
+
disabled?: { reason: string };
|
|
135
|
+
edit?: WorkspaceEdit;
|
|
136
|
+
command?: Command;
|
|
137
|
+
data?: unknown;
|
|
138
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import {
|
|
2
|
+
existsSync,
|
|
3
|
+
mkdirSync,
|
|
4
|
+
readFileSync,
|
|
5
|
+
renameSync,
|
|
6
|
+
rmSync,
|
|
7
|
+
writeFileSync,
|
|
8
|
+
} from "node:fs";
|
|
9
|
+
import { dirname } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
import type {
|
|
12
|
+
CreateFile,
|
|
13
|
+
DeleteFile,
|
|
14
|
+
RenameFile,
|
|
15
|
+
TextDocumentEdit,
|
|
16
|
+
TextEdit,
|
|
17
|
+
WorkspaceEdit,
|
|
18
|
+
} from "./types";
|
|
19
|
+
|
|
20
|
+
export interface ApplyEditResult {
|
|
21
|
+
success: boolean;
|
|
22
|
+
filesModified: string[];
|
|
23
|
+
error?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function isTextDocumentEdit(
|
|
27
|
+
change: TextDocumentEdit | CreateFile | RenameFile | DeleteFile,
|
|
28
|
+
): change is TextDocumentEdit {
|
|
29
|
+
return "textDocument" in change && "edits" in change;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function isCreateFile(
|
|
33
|
+
change: TextDocumentEdit | CreateFile | RenameFile | DeleteFile,
|
|
34
|
+
): change is CreateFile {
|
|
35
|
+
return "kind" in change && change.kind === "create";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function isRenameFile(
|
|
39
|
+
change: TextDocumentEdit | CreateFile | RenameFile | DeleteFile,
|
|
40
|
+
): change is RenameFile {
|
|
41
|
+
return "kind" in change && change.kind === "rename";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function isDeleteFile(
|
|
45
|
+
change: TextDocumentEdit | CreateFile | RenameFile | DeleteFile,
|
|
46
|
+
): change is DeleteFile {
|
|
47
|
+
return "kind" in change && change.kind === "delete";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function applyTextEdits(filePath: string, edits: TextEdit[]): void {
|
|
51
|
+
const content = readFileSync(filePath, "utf-8");
|
|
52
|
+
const lines = content.split("\n");
|
|
53
|
+
|
|
54
|
+
// Sort edits in reverse order to apply from bottom to top
|
|
55
|
+
const sortedEdits = [...edits].sort((a, b) => {
|
|
56
|
+
if (b.range.start.line !== a.range.start.line) {
|
|
57
|
+
return b.range.start.line - a.range.start.line;
|
|
58
|
+
}
|
|
59
|
+
return b.range.start.character - a.range.start.character;
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
for (const edit of sortedEdits) {
|
|
63
|
+
const { start, end } = edit.range;
|
|
64
|
+
|
|
65
|
+
// Get the text before and after the edit range
|
|
66
|
+
const startLine = lines[start.line] ?? "";
|
|
67
|
+
const endLine = lines[end.line] ?? "";
|
|
68
|
+
|
|
69
|
+
const beforeEdit = startLine.slice(0, start.character);
|
|
70
|
+
const afterEdit = endLine.slice(end.character);
|
|
71
|
+
|
|
72
|
+
// Create new content for the affected lines
|
|
73
|
+
const newLines = edit.newText.split("\n");
|
|
74
|
+
|
|
75
|
+
if (newLines.length === 1) {
|
|
76
|
+
// Single line replacement
|
|
77
|
+
lines[start.line] = beforeEdit + newLines[0] + afterEdit;
|
|
78
|
+
// Remove any lines between start and end
|
|
79
|
+
if (end.line > start.line) {
|
|
80
|
+
lines.splice(start.line + 1, end.line - start.line);
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
// Multi-line replacement
|
|
84
|
+
newLines[0] = beforeEdit + newLines[0];
|
|
85
|
+
newLines[newLines.length - 1] = newLines[newLines.length - 1] + afterEdit;
|
|
86
|
+
|
|
87
|
+
// Replace the affected lines
|
|
88
|
+
lines.splice(start.line, end.line - start.line + 1, ...newLines);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
writeFileSync(filePath, lines.join("\n"));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function applyWorkspaceEdit(edit: WorkspaceEdit): ApplyEditResult {
|
|
96
|
+
const filesModified: string[] = [];
|
|
97
|
+
|
|
98
|
+
try {
|
|
99
|
+
// Handle documentChanges (newer format)
|
|
100
|
+
if (edit.documentChanges) {
|
|
101
|
+
for (const change of edit.documentChanges) {
|
|
102
|
+
if (isTextDocumentEdit(change)) {
|
|
103
|
+
const filePath = fileURLToPath(change.textDocument.uri);
|
|
104
|
+
applyTextEdits(filePath, change.edits);
|
|
105
|
+
if (!filesModified.includes(filePath)) {
|
|
106
|
+
filesModified.push(filePath);
|
|
107
|
+
}
|
|
108
|
+
} else if (isCreateFile(change)) {
|
|
109
|
+
const filePath = fileURLToPath(change.uri);
|
|
110
|
+
const dir = dirname(filePath);
|
|
111
|
+
if (!existsSync(dir)) {
|
|
112
|
+
mkdirSync(dir, { recursive: true });
|
|
113
|
+
}
|
|
114
|
+
if (!existsSync(filePath) || change.options?.overwrite) {
|
|
115
|
+
writeFileSync(filePath, "");
|
|
116
|
+
filesModified.push(filePath);
|
|
117
|
+
}
|
|
118
|
+
} else if (isRenameFile(change)) {
|
|
119
|
+
const oldPath = fileURLToPath(change.oldUri);
|
|
120
|
+
const newPath = fileURLToPath(change.newUri);
|
|
121
|
+
const newDir = dirname(newPath);
|
|
122
|
+
if (!existsSync(newDir)) {
|
|
123
|
+
mkdirSync(newDir, { recursive: true });
|
|
124
|
+
}
|
|
125
|
+
if (existsSync(oldPath)) {
|
|
126
|
+
if (!existsSync(newPath) || change.options?.overwrite) {
|
|
127
|
+
renameSync(oldPath, newPath);
|
|
128
|
+
filesModified.push(oldPath, newPath);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
} else if (isDeleteFile(change)) {
|
|
132
|
+
const filePath = fileURLToPath(change.uri);
|
|
133
|
+
if (existsSync(filePath)) {
|
|
134
|
+
rmSync(filePath, { recursive: change.options?.recursive });
|
|
135
|
+
filesModified.push(filePath);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Handle changes (older format)
|
|
142
|
+
if (edit.changes) {
|
|
143
|
+
for (const [uri, edits] of Object.entries(edit.changes)) {
|
|
144
|
+
const filePath = fileURLToPath(uri);
|
|
145
|
+
applyTextEdits(filePath, edits);
|
|
146
|
+
if (!filesModified.includes(filePath)) {
|
|
147
|
+
filesModified.push(filePath);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return { success: true, filesModified };
|
|
153
|
+
} catch (error) {
|
|
154
|
+
return {
|
|
155
|
+
success: false,
|
|
156
|
+
filesModified,
|
|
157
|
+
error: error instanceof Error ? error.message : String(error),
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function formatWorkspaceEditPreview(edit: WorkspaceEdit): string {
|
|
163
|
+
const changes: string[] = [];
|
|
164
|
+
|
|
165
|
+
if (edit.documentChanges) {
|
|
166
|
+
for (const change of edit.documentChanges) {
|
|
167
|
+
if (isTextDocumentEdit(change)) {
|
|
168
|
+
const filePath = fileURLToPath(change.textDocument.uri);
|
|
169
|
+
changes.push(`Modify: ${filePath} (${change.edits.length} edit(s))`);
|
|
170
|
+
} else if (isCreateFile(change)) {
|
|
171
|
+
changes.push(`Create: ${fileURLToPath(change.uri)}`);
|
|
172
|
+
} else if (isRenameFile(change)) {
|
|
173
|
+
changes.push(
|
|
174
|
+
`Rename: ${fileURLToPath(change.oldUri)} → ${fileURLToPath(change.newUri)}`,
|
|
175
|
+
);
|
|
176
|
+
} else if (isDeleteFile(change)) {
|
|
177
|
+
changes.push(`Delete: ${fileURLToPath(change.uri)}`);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (edit.changes) {
|
|
183
|
+
for (const [uri, edits] of Object.entries(edit.changes)) {
|
|
184
|
+
const filePath = fileURLToPath(uri);
|
|
185
|
+
changes.push(`Modify: ${filePath} (${edits.length} edit(s))`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return changes.join("\n");
|
|
190
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://opencode.ai/config.json",
|
|
3
3
|
"agent": {
|
|
4
|
-
"compaction": {
|
|
5
|
-
"model": "proxypal/gemini-3-flash-preview",
|
|
6
|
-
"prompt": "You are summarizing a coding session for context continuity.\n\n## Output Structure\n\nUse these sections:\n\n### COMPLETED\n- What was done (with file paths)\n- Bead IDs closed and why\n\n### IN PROGRESS\n- Current task and bead ID (if any)\n- Files being modified (exact paths)\n- Current todo state (preserve TodoWrite items)\n\n### NEXT\n- What needs to be done next\n- Blockers or pending decisions\n\n### CONSTRAINTS\n- User preferences that must persist\n- Rules or requirements stated by user\n- Technical decisions and rationale\n\n### PERSIST TO MEMORY\n- Gotchas discovered → suggest for project/gotchas.md\n- Commands learned → suggest for project/commands.md\n- Patterns observed → suggest for project/conventions.md\n\n## Rules\n\n- PRESERVE: Bead IDs, todo items, file paths, line numbers, user constraints\n- DROP: Failed attempts, superseded info, verbose tool outputs, exploration dead-ends\n- Be concise but complete - this summary replaces the full conversation\n- Include enough context that a new session can continue seamlessly"
|
|
7
|
-
},
|
|
8
4
|
"build": {
|
|
9
5
|
"description": "Primary development agent with full codebase access",
|
|
10
6
|
"model": "github-copilot/claude-opus-4.5"
|
|
11
7
|
},
|
|
8
|
+
"compaction": {
|
|
9
|
+
"model": "proxypal/gemini-3-flash-preview",
|
|
10
|
+
"prompt": "You are summarizing a coding session for context continuity.\n\n## Output Structure\n\nUse these sections:\n\n### COMPLETED\n- What was done (with file paths)\n- Bead IDs closed and why\n\n### IN PROGRESS\n- Current task and bead ID (if any)\n- Files being modified (exact paths)\n- Current todo state (preserve TodoWrite items)\n\n### NEXT\n- What needs to be done next\n- Blockers or pending decisions\n\n### CONSTRAINTS\n- User preferences that must persist\n- Rules or requirements stated by user\n- Technical decisions and rationale\n\n### PERSIST TO MEMORY\n- Gotchas discovered → suggest for project/gotchas.md\n- Commands learned → suggest for project/commands.md\n- Patterns observed → suggest for project/conventions.md\n\n## Rules\n\n- PRESERVE: Bead IDs, todo items, file paths, line numbers, user constraints\n- DROP: Failed attempts, superseded info, verbose tool outputs, exploration dead-ends\n- Be concise but complete - this summary replaces the full conversation\n- Include enough context that a new session can continue seamlessly"
|
|
11
|
+
},
|
|
12
12
|
"explore": {
|
|
13
13
|
"description": "Fast codebase search specialist",
|
|
14
14
|
"model": "opencode/grok-code"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"autoupdate": false,
|
|
44
44
|
"experimental": {
|
|
45
|
-
"lsp": true,
|
|
46
45
|
"batch_tool": true,
|
|
47
46
|
"chatMaxRetries": 2,
|
|
47
|
+
"lsp": true,
|
|
48
48
|
"primary_tools": [
|
|
49
49
|
"edit",
|
|
50
50
|
"write",
|
|
@@ -300,6 +300,9 @@
|
|
|
300
300
|
"name": "Gemini 3 Pro Preview"
|
|
301
301
|
},
|
|
302
302
|
"gemini-claude-opus-4-5-thinking": {
|
|
303
|
+
"interleaved": {
|
|
304
|
+
"field": "reasoning_content"
|
|
305
|
+
},
|
|
303
306
|
"limit": {
|
|
304
307
|
"context": 200000,
|
|
305
308
|
"output": 64000
|
|
@@ -307,7 +310,7 @@
|
|
|
307
310
|
"name": "Gemini Claude Opus 4 5 Thinking",
|
|
308
311
|
"options": {
|
|
309
312
|
"thinking": {
|
|
310
|
-
"
|
|
313
|
+
"budget_tokens": 32768,
|
|
311
314
|
"type": "enabled"
|
|
312
315
|
}
|
|
313
316
|
},
|
|
@@ -321,6 +324,9 @@
|
|
|
321
324
|
"name": "Gemini Claude Sonnet 4 5"
|
|
322
325
|
},
|
|
323
326
|
"gemini-claude-sonnet-4-5-thinking": {
|
|
327
|
+
"interleaved": {
|
|
328
|
+
"field": "reasoning_content"
|
|
329
|
+
},
|
|
324
330
|
"limit": {
|
|
325
331
|
"context": 200000,
|
|
326
332
|
"output": 64000
|
|
@@ -328,7 +334,7 @@
|
|
|
328
334
|
"name": "Gemini Claude Sonnet 4 5 Thinking",
|
|
329
335
|
"options": {
|
|
330
336
|
"thinking": {
|
|
331
|
-
"
|
|
337
|
+
"budget_tokens": 32768,
|
|
332
338
|
"type": "enabled"
|
|
333
339
|
}
|
|
334
340
|
},
|
|
@@ -341,11 +347,18 @@
|
|
|
341
347
|
},
|
|
342
348
|
"name": "Glm 4 6"
|
|
343
349
|
},
|
|
344
|
-
"
|
|
350
|
+
"glm-4.7": {
|
|
345
351
|
"limit": {
|
|
346
352
|
"context": 128000,
|
|
347
353
|
"output": 16384
|
|
348
354
|
},
|
|
355
|
+
"name": "Glm 4 7"
|
|
356
|
+
},
|
|
357
|
+
"gpt-5": {
|
|
358
|
+
"limit": {
|
|
359
|
+
"context": 400000,
|
|
360
|
+
"output": 32768
|
|
361
|
+
},
|
|
349
362
|
"name": "Gpt 5",
|
|
350
363
|
"options": {
|
|
351
364
|
"reasoning": {
|
|
@@ -356,8 +369,8 @@
|
|
|
356
369
|
},
|
|
357
370
|
"gpt-5-codex": {
|
|
358
371
|
"limit": {
|
|
359
|
-
"context":
|
|
360
|
-
"output":
|
|
372
|
+
"context": 400000,
|
|
373
|
+
"output": 32768
|
|
361
374
|
},
|
|
362
375
|
"name": "Gpt 5 Codex",
|
|
363
376
|
"options": {
|
|
@@ -369,8 +382,8 @@
|
|
|
369
382
|
},
|
|
370
383
|
"gpt-5-codex-mini": {
|
|
371
384
|
"limit": {
|
|
372
|
-
"context":
|
|
373
|
-
"output":
|
|
385
|
+
"context": 400000,
|
|
386
|
+
"output": 32768
|
|
374
387
|
},
|
|
375
388
|
"name": "Gpt 5 Codex Mini",
|
|
376
389
|
"options": {
|
|
@@ -382,8 +395,8 @@
|
|
|
382
395
|
},
|
|
383
396
|
"gpt-5.1": {
|
|
384
397
|
"limit": {
|
|
385
|
-
"context":
|
|
386
|
-
"output":
|
|
398
|
+
"context": 400000,
|
|
399
|
+
"output": 32768
|
|
387
400
|
},
|
|
388
401
|
"name": "Gpt 5 1",
|
|
389
402
|
"options": {
|
|
@@ -395,8 +408,8 @@
|
|
|
395
408
|
},
|
|
396
409
|
"gpt-5.1-codex": {
|
|
397
410
|
"limit": {
|
|
398
|
-
"context":
|
|
399
|
-
"output":
|
|
411
|
+
"context": 400000,
|
|
412
|
+
"output": 32768
|
|
400
413
|
},
|
|
401
414
|
"name": "Gpt 5 1 Codex",
|
|
402
415
|
"options": {
|
|
@@ -408,8 +421,8 @@
|
|
|
408
421
|
},
|
|
409
422
|
"gpt-5.1-codex-max": {
|
|
410
423
|
"limit": {
|
|
411
|
-
"context":
|
|
412
|
-
"output":
|
|
424
|
+
"context": 400000,
|
|
425
|
+
"output": 32768
|
|
413
426
|
},
|
|
414
427
|
"name": "Gpt 5 1 Codex Max",
|
|
415
428
|
"options": {
|
|
@@ -421,8 +434,8 @@
|
|
|
421
434
|
},
|
|
422
435
|
"gpt-5.1-codex-mini": {
|
|
423
436
|
"limit": {
|
|
424
|
-
"context":
|
|
425
|
-
"output":
|
|
437
|
+
"context": 400000,
|
|
438
|
+
"output": 32768
|
|
426
439
|
},
|
|
427
440
|
"name": "Gpt 5 1 Codex Mini",
|
|
428
441
|
"options": {
|
|
@@ -434,8 +447,8 @@
|
|
|
434
447
|
},
|
|
435
448
|
"gpt-5.2": {
|
|
436
449
|
"limit": {
|
|
437
|
-
"context":
|
|
438
|
-
"output":
|
|
450
|
+
"context": 400000,
|
|
451
|
+
"output": 32768
|
|
439
452
|
},
|
|
440
453
|
"name": "Gpt 5 2",
|
|
441
454
|
"options": {
|
|
@@ -447,8 +460,8 @@
|
|
|
447
460
|
},
|
|
448
461
|
"gpt-5.2-codex": {
|
|
449
462
|
"limit": {
|
|
450
|
-
"context":
|
|
451
|
-
"output":
|
|
463
|
+
"context": 400000,
|
|
464
|
+
"output": 32768
|
|
452
465
|
},
|
|
453
466
|
"name": "Gpt 5 2 Codex",
|
|
454
467
|
"options": {
|
|
@@ -467,7 +480,7 @@
|
|
|
467
480
|
}
|
|
468
481
|
},
|
|
469
482
|
"name": "ProxyPal",
|
|
470
|
-
"npm": "@ai-sdk/
|
|
483
|
+
"npm": "@ai-sdk/openai-compatible",
|
|
471
484
|
"options": {
|
|
472
485
|
"apiKey": "proxypal-local",
|
|
473
486
|
"baseURL": "http://127.0.0.1:8317/v1"
|
|
@@ -475,27 +488,29 @@
|
|
|
475
488
|
},
|
|
476
489
|
"zai-coding-plan": {
|
|
477
490
|
"models": {
|
|
478
|
-
"glm-4.
|
|
479
|
-
"
|
|
480
|
-
"name": "GLM-4.7",
|
|
481
|
-
"reasoning": true,
|
|
482
|
-
"interleaved": true,
|
|
491
|
+
"glm-4.6": {
|
|
492
|
+
"attachment": true,
|
|
483
493
|
"options": {
|
|
484
494
|
"reasoningEffort": "high",
|
|
485
|
-
"reasoningSummary": "true",
|
|
486
495
|
"temperature": 1,
|
|
487
|
-
"top_k": 40,
|
|
488
|
-
"top_p": 0.95,
|
|
489
|
-
"maxOutputTokens": 131072,
|
|
490
496
|
"thinking": {
|
|
491
497
|
"type": "enabled"
|
|
492
|
-
}
|
|
493
|
-
|
|
498
|
+
},
|
|
499
|
+
"top_k": 40,
|
|
500
|
+
"top_p": 0.95
|
|
501
|
+
},
|
|
502
|
+
"reasoning": true,
|
|
503
|
+
"temperature": true,
|
|
504
|
+
"tool_call": true
|
|
494
505
|
},
|
|
495
|
-
"glm-4.
|
|
496
|
-
"
|
|
506
|
+
"glm-4.7": {
|
|
507
|
+
"id": "glm-4.7",
|
|
508
|
+
"interleaved": true,
|
|
509
|
+
"name": "GLM-4.7",
|
|
497
510
|
"options": {
|
|
511
|
+
"maxOutputTokens": 131072,
|
|
498
512
|
"reasoningEffort": "high",
|
|
513
|
+
"reasoningSummary": "true",
|
|
499
514
|
"temperature": 1,
|
|
500
515
|
"thinking": {
|
|
501
516
|
"type": "enabled"
|
|
@@ -503,9 +518,7 @@
|
|
|
503
518
|
"top_k": 40,
|
|
504
519
|
"top_p": 0.95
|
|
505
520
|
},
|
|
506
|
-
"reasoning": true
|
|
507
|
-
"temperature": true,
|
|
508
|
-
"tool_call": true
|
|
521
|
+
"reasoning": true
|
|
509
522
|
}
|
|
510
523
|
}
|
|
511
524
|
}
|
|
@@ -535,4 +548,4 @@
|
|
|
535
548
|
".DS_Store"
|
|
536
549
|
]
|
|
537
550
|
}
|
|
538
|
-
}
|
|
551
|
+
}
|