minicode-ai 0.14.1 → 0.14.2
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 +1 -1
- package/cli/auto-update.ts +32 -2
- package/cli/index.ts +10 -2
- package/cli/setup.ts +8 -3
- package/cli/tui.ts +18 -15
- package/docs/OUTPUT_PROTOCOL_SPEC.md +6 -0
- package/docs/OUTPUT_RENDERING_SPEC.md +28 -4
- package/docs/README.md +2 -2
- package/docs/TERMINAL_CONTRACT.md +52 -26
- package/docs/getting-started.md +14 -12
- package/docs/glossary.md +1 -1
- package/docs/mcp-lsp.md +1 -1
- package/docs/policy-sandbox.md +7 -1
- package/docs/security-model.md +2 -2
- package/docs/security.md +7 -1
- package/docs/tools.md +4 -4
- package/docs/verify-benchmark.md +16 -0
- package/package.json +1 -3
- package/src/app/mentions.ts +4 -3
- package/src/app/session.ts +13 -9
- package/src/app/tool-layer.ts +6 -0
- package/src/constants.ts +17 -0
- package/src/lib/git-hardening.ts +27 -22
- package/src/lib/safe-open.ts +73 -19
- package/src/lib/trusted-exec.ts +7 -4
- package/src/mcp/client.ts +34 -9
- package/src/mcp/transport.ts +96 -42
- package/src/memory/files.ts +15 -4
- package/src/memory/vector.ts +5 -1
- package/src/policy/context.ts +21 -13
- package/src/policy/tool-contract.ts +4 -10
- package/src/policy/update-check.ts +83 -6
- package/src/policy/usage.ts +17 -7
- package/src/presentation/adapter.ts +64 -2
- package/src/presentation/events.ts +6 -0
- package/src/presentation/model.ts +1 -0
- package/src/presentation/projection.ts +2 -0
- package/src/presentation/reducer.ts +1 -0
- package/src/providers/anthropic.ts +52 -19
- package/src/providers/guards.ts +98 -13
- package/src/providers/responses.ts +61 -23
- package/src/providers/sse-bounds.ts +170 -0
- package/src/repo/repomap.ts +10 -11
- package/src/runtime/execution-backend.ts +7 -8
- package/src/sandbox/docker.ts +113 -9
- package/src/session/checkpoint.ts +9 -2
- package/src/session/persistence.ts +5 -2
- package/src/session/verification.ts +55 -16
- package/src/skills/loader.ts +16 -3
- package/src/tools/bash.ts +6 -3
- package/src/tools/code_run.ts +6 -5
- package/src/tools/context.ts +8 -0
- package/src/tools/delete_file.ts +2 -1
- package/src/tools/edit.ts +2 -1
- package/src/tools/git.ts +128 -54
- package/src/tools/glob.ts +2 -1
- package/src/tools/grep.ts +31 -6
- package/src/tools/lsp.ts +5 -4
- package/src/tools/mcp_call.ts +3 -1
- package/src/tools/memory.ts +175 -180
- package/src/tools/move_file.ts +2 -1
- package/src/tools/patch.ts +2 -1
- package/src/tools/read_file.ts +94 -1
- package/src/tools/read_image.ts +2 -1
- package/src/tools/task.ts +2 -1
- package/src/tools/todo.ts +4 -5
- package/src/tools/web_fetch.ts +28 -12
- package/src/tools/web_search.ts +28 -9
- package/src/tools/write_file.ts +2 -1
- package/src/ui/assistant/simple.ts +72 -3
- package/src/ui/i18n/en.ts +3 -0
- package/src/ui/i18n/id.ts +3 -0
- package/src/ui/render/width.ts +107 -79
- package/src/ui/runtime/screen.ts +49 -37
- package/src/ui/tui/app.ts +255 -205
- package/src/ui/tui/transcript.ts +39 -0
- package/CHANGELOG.md +0 -1185
- package/docs/PLAN_UIUX_V6.md +0 -209
- package/docs/changelog.md +0 -3
package/src/ui/runtime/screen.ts
CHANGED
|
@@ -54,7 +54,7 @@ export interface AltScreen {
|
|
|
54
54
|
readonly ok: boolean
|
|
55
55
|
readonly cols: number
|
|
56
56
|
readonly rows: number
|
|
57
|
-
/** Lukis
|
|
57
|
+
/** Lukis frame penuh; exception writer dipropagasikan agar owner menutup sesi. */
|
|
58
58
|
paint(lines: string[], cursor?: { row: number; col: number }): void
|
|
59
59
|
/**
|
|
60
60
|
* Lukis REGION TANPA clear: popup di atas konten pemilik layar (App TUI).
|
|
@@ -102,6 +102,14 @@ export function openAltScreen(): AltScreen {
|
|
|
102
102
|
process.stdout.write(RESET_REGION)
|
|
103
103
|
process.stdout.write(ENTER)
|
|
104
104
|
} catch {
|
|
105
|
+
// ENTER mungkin sudah terkirim sebelum writer melempar; pulihkan
|
|
106
|
+
// buffer utama sebelum menyatakan terminal tidak mampu.
|
|
107
|
+
try {
|
|
108
|
+
process.stdout.write(EXIT)
|
|
109
|
+
} catch {}
|
|
110
|
+
try {
|
|
111
|
+
process.stdout.write(RESET_REGION)
|
|
112
|
+
} catch {}
|
|
105
113
|
return nullScreen()
|
|
106
114
|
}
|
|
107
115
|
}
|
|
@@ -130,48 +138,44 @@ export function openAltScreen(): AltScreen {
|
|
|
130
138
|
},
|
|
131
139
|
paint(lines: string[], cursor?: { row: number; col: number }): void {
|
|
132
140
|
if (closed) return
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
process.stdout.write(SYNC_END)
|
|
144
|
-
} catch {}
|
|
141
|
+
process.stdout.write(SYNC_START)
|
|
142
|
+
process.stdout.write(HOME)
|
|
143
|
+
process.stdout.write(CLEAR_ALL)
|
|
144
|
+
process.stdout.write(lines.join("\r\n"))
|
|
145
|
+
if (cursor) {
|
|
146
|
+
const row = Math.max(1, Math.floor(cursor.row))
|
|
147
|
+
const col = Math.max(1, Math.floor(cursor.col))
|
|
148
|
+
process.stdout.write(`\x1b[?25l\x1b[${row};${col}H\x1b[?25h`)
|
|
149
|
+
}
|
|
150
|
+
process.stdout.write(SYNC_END)
|
|
145
151
|
},
|
|
146
152
|
paintRegion(lines: string[], topRow: number): void {
|
|
147
153
|
if (closed) return
|
|
148
154
|
// Melukis nol baris = no-op murni (bukan clear): pemanggil yang ingin
|
|
149
155
|
// menghapus memakai clearRegion() eksplisit.
|
|
150
156
|
if (!lines.length) return
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
lastRegion = h > 0 ? { top, height: h } : null
|
|
174
|
-
} catch {}
|
|
157
|
+
const top = Math.max(1, Math.floor(topRow) || 1)
|
|
158
|
+
const h = lines.length
|
|
159
|
+
// Union region lama + baru: kotak yang menyusut/bergeser (filter,
|
|
160
|
+
// notice hilang) harus menghapus sisa bingkainya sendiri — pemilik
|
|
161
|
+
// layar tak tahu geometri popup.
|
|
162
|
+
let clearTop = top
|
|
163
|
+
let clearBottom = top + Math.max(0, h - 1)
|
|
164
|
+
if (lastRegion) {
|
|
165
|
+
clearTop = Math.min(clearTop, lastRegion.top)
|
|
166
|
+
clearBottom = Math.max(clearBottom, lastRegion.top + lastRegion.height - 1)
|
|
167
|
+
}
|
|
168
|
+
let out = SYNC_START
|
|
169
|
+
for (let r = clearTop; r <= clearBottom; r++) {
|
|
170
|
+
const i = r - top
|
|
171
|
+
// Baris diasumsi satu-baris-tersanitasi dari dialogBox (tanpa \n —
|
|
172
|
+
// \n akan menggeser kursor dan merusak baris berikut; split defensif).
|
|
173
|
+
const row = i >= 0 && i < h ? ((lines[i] ?? "").split("\n")[0] ?? "") : ""
|
|
174
|
+
out += `\x1b[${r};1H\x1b[2K${row}`
|
|
175
|
+
}
|
|
176
|
+
out += SYNC_END
|
|
177
|
+
process.stdout.write(out)
|
|
178
|
+
lastRegion = h > 0 ? { top, height: h } : null
|
|
175
179
|
},
|
|
176
180
|
clearRegion(): void {
|
|
177
181
|
if (closed) return
|
|
@@ -195,6 +199,9 @@ export function openAltScreen(): AltScreen {
|
|
|
195
199
|
} catch {}
|
|
196
200
|
depth = Math.max(0, depth - 1)
|
|
197
201
|
if (depth === 0) {
|
|
202
|
+
try {
|
|
203
|
+
process.stdout.write(SYNC_END)
|
|
204
|
+
} catch {}
|
|
198
205
|
try {
|
|
199
206
|
process.stdout.write(EXIT)
|
|
200
207
|
} catch {}
|
|
@@ -218,8 +225,13 @@ export function altScreenDepth(): number {
|
|
|
218
225
|
*/
|
|
219
226
|
export function forceRestoreScreenForSignal(): void {
|
|
220
227
|
if (depth > 0) {
|
|
228
|
+
try {
|
|
229
|
+
process.stdout.write(SYNC_END)
|
|
230
|
+
} catch {}
|
|
221
231
|
try {
|
|
222
232
|
process.stdout.write(EXIT)
|
|
233
|
+
} catch {}
|
|
234
|
+
try {
|
|
223
235
|
process.stdout.write(RESET_REGION)
|
|
224
236
|
} catch {}
|
|
225
237
|
depth = 0
|