minicode-ai 0.14.1 → 0.14.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/README.md +34 -178
- package/cli/args.ts +10 -18
- package/cli/auto-update.ts +32 -2
- package/cli/commands/acp.ts +20 -27
- package/cli/commands/daemon.ts +6 -7
- package/cli/commands/exec.ts +12 -10
- package/cli/commands.ts +6 -9
- package/cli/index.ts +40 -17
- package/cli/provider-manager.ts +1 -3
- package/cli/setup.ts +174 -145
- package/cli/tui.ts +33 -38
- package/docs/CONTROL-PLANE-MAP.md +145 -0
- package/docs/OUTPUT_EVENT_MODEL.md +1 -1
- package/docs/OUTPUT_PROTOCOL_SPEC.md +8 -2
- package/docs/OUTPUT_RENDERING_SPEC.md +35 -6
- package/docs/OUTPUT_UX_RULES.md +1 -1
- package/docs/README.md +14 -102
- package/docs/SUMMARY.md +53 -0
- package/docs/TERMINAL_CONTRACT.md +136 -77
- package/docs/UI_RENDER_PIPELINE.md +204 -0
- package/docs/agents.md +5 -5
- package/docs/architecture.md +23 -12
- package/docs/choosing-mode.md +7 -7
- package/docs/cli.md +22 -29
- package/docs/concepts.md +1 -1
- package/docs/config.md +10 -5
- package/docs/contributing.md +6 -6
- package/docs/environment.md +3 -1
- package/docs/exec.md +5 -5
- package/docs/getting-started.md +14 -12
- package/docs/glossary.md +9 -7
- package/docs/mcp-lsp.md +1 -1
- package/docs/memory-sessions.md +7 -5
- package/docs/policy-sandbox.md +23 -15
- package/docs/quickstart.md +2 -2
- package/docs/repl.md +4 -3
- package/docs/security-model.md +16 -17
- package/docs/security.md +15 -30
- package/docs/skills.md +1 -1
- package/docs/tools.md +6 -6
- package/docs/verify-benchmark.md +16 -0
- package/package.json +5 -5
- package/scripts/vendor-overlays/minicode-context.patch +109 -0
- package/src/app/mentions.ts +4 -3
- package/src/app/provider-layer.ts +13 -1
- package/src/app/session.ts +229 -22
- package/src/app/tool-layer.ts +6 -0
- package/src/config.ts +30 -3
- package/src/constants.ts +19 -0
- package/src/daemon/control.ts +1 -1
- 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/server.ts +2 -3
- package/src/mcp/transport.ts +96 -42
- package/src/memory/files.ts +15 -4
- package/src/memory/vector.ts +5 -1
- package/src/policy/compaction.ts +272 -16
- package/src/policy/context-window.ts +73 -0
- package/src/policy/context.ts +76 -16
- package/src/policy/ratelimit.ts +47 -18
- package/src/policy/tool-contract.ts +4 -10
- package/src/policy/update-check.ts +83 -6
- package/src/policy/usage.ts +31 -14
- package/src/policy/work-mode.ts +1 -1
- 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 +158 -16
- package/src/providers/provision.ts +12 -3
- package/src/providers/responses.ts +61 -23
- package/src/providers/router.ts +56 -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/context-projection.ts +14 -0
- package/src/session/context-selector.ts +58 -20
- package/src/session/persistence.ts +6 -3
- package/src/session/verification.ts +55 -16
- package/src/skills/loader.ts +16 -3
- package/src/task/model.ts +21 -70
- 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 +9 -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/footer.ts +131 -66
- package/src/ui/i18n/en.ts +3 -11
- package/src/ui/i18n/id.ts +3 -11
- package/src/ui/input/input.ts +2 -3
- package/src/ui/input/prompt-engine.ts +2 -5
- package/src/ui/render/width.ts +107 -79
- package/src/ui/runtime/screen.ts +49 -37
- package/src/ui/screens/model-manager.ts +3 -10
- package/src/ui/screens/picker.ts +23 -40
- package/src/ui/screens/provider-manager.ts +12 -33
- package/src/ui/screens/wizard.ts +0 -1
- package/src/ui/tui/app.ts +265 -211
- package/src/ui/tui/transcript.ts +87 -8
- package/vendor/minicore/VENDOR.md +9 -5
- package/vendor/minicore/src/core/loop.ts +47 -12
- package/vendor/minicore/src/core/provider.ts +4 -0
- package/vendor/minicore/src/core/session.ts +14 -1
- package/CHANGELOG.md +0 -1185
- package/docs/OUTPUT_ARCHITECTURE_AUDIT.md +0 -489
- package/docs/OUTPUT_IMPLEMENTATION_PLAN.md +0 -391
- package/docs/PLAN_UIUX_V6.md +0 -209
- package/docs/changelog.md +0 -3
package/cli/tui.ts
CHANGED
|
@@ -77,7 +77,7 @@ function fmtCtx(n: number): string | undefined {
|
|
|
77
77
|
*/
|
|
78
78
|
function fmtUsageMetrics(ctx: CliSession): string | undefined {
|
|
79
79
|
const cost: number | undefined = ctx.usage.getSession().cost
|
|
80
|
-
const windowTokens: number | undefined = ctx.contextWindowTokens
|
|
80
|
+
const windowTokens: number | undefined = ctx.getContextWindowTokens?.() ?? ctx.contextWindowTokens
|
|
81
81
|
// P1.4: persentase footer = OCCUPANCY konteks saat ini, bukan total token
|
|
82
82
|
// yang sudah dibelanjakan sepanjang sesi. Memakai spend membuat footer
|
|
83
83
|
// mentok 100% setelah beberapa step meski konteks masih jauh di bawah window.
|
|
@@ -221,7 +221,7 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
221
221
|
// P1.2: dua dimensi selalu terbaca live di /status — bukan snapshot boot.
|
|
222
222
|
// [mode-architecture] /status memakai nilai PRODUK (BUILD/AUTO/ASK).
|
|
223
223
|
get workMode() {
|
|
224
|
-
return displayWorkMode(workModeControl?.getWorkMode() ?? "
|
|
224
|
+
return displayWorkMode(workModeControl?.getWorkMode() ?? "DISCUSS")
|
|
225
225
|
},
|
|
226
226
|
get permissionMode() {
|
|
227
227
|
return (permissions?.getMode() ?? mode).toUpperCase()
|
|
@@ -272,7 +272,7 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
272
272
|
// (beserta /work-mode) yang menggeser operating mode — TIDAK permission mode.
|
|
273
273
|
const cycleWorkMode = (dir: 1 | -1): void => {
|
|
274
274
|
if (!workModeControl) return // policy terinjeksi = tanpa kontrol (fail-closed)
|
|
275
|
-
const current = workModeControl.getWorkMode() ?? "
|
|
275
|
+
const current = workModeControl.getWorkMode() ?? "DISCUSS"
|
|
276
276
|
const idx = (WORK_MODE_CYCLE as readonly string[]).indexOf(current)
|
|
277
277
|
if (idx === -1) return
|
|
278
278
|
const next = WORK_MODE_CYCLE[(idx + dir + WORK_MODE_CYCLE.length) % WORK_MODE_CYCLE.length]!
|
|
@@ -290,6 +290,7 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
290
290
|
|
|
291
291
|
async function runBuiltin(
|
|
292
292
|
q: string,
|
|
293
|
+
recordOutput = true,
|
|
293
294
|
): Promise<{ lines: string[]; shouldExit: boolean; handled: boolean }> {
|
|
294
295
|
let shouldExit = false
|
|
295
296
|
let handled = false
|
|
@@ -304,15 +305,15 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
304
305
|
// Baris parsial yang sempat tercetak sebelum throw tetap tampil —
|
|
305
306
|
// tanpa ini hanya pesan error generik yang keluar (data-loss diam).
|
|
306
307
|
lines = (e as { capturedLines?: string[] }).capturedLines ?? []
|
|
307
|
-
if (lines.length) transcript.pushInfo(lines)
|
|
308
|
+
if (recordOutput && lines.length) transcript.pushInfo(lines)
|
|
308
309
|
throw e
|
|
309
310
|
}
|
|
310
311
|
return { lines, shouldExit, handled }
|
|
311
312
|
}
|
|
312
313
|
|
|
313
|
-
async function delegateBuiltin(q: string): Promise<{ quit?: boolean }> {
|
|
314
|
-
const { lines, shouldExit } = await runBuiltin(q)
|
|
315
|
-
if (lines.length) transcript.pushInfo(lines)
|
|
314
|
+
async function delegateBuiltin(q: string, recordOutput = true): Promise<{ quit?: boolean }> {
|
|
315
|
+
const { lines, shouldExit } = await runBuiltin(q, recordOutput)
|
|
316
|
+
if (recordOutput && lines.length) transcript.pushInfo(lines)
|
|
316
317
|
return shouldExit ? { quit: true } : {}
|
|
317
318
|
}
|
|
318
319
|
|
|
@@ -320,14 +321,13 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
320
321
|
* Builtin yang membuka popup: bekukan App (input dilepas + layar redup),
|
|
321
322
|
* view melukis regionnya sendiri, App repaint saat kembali. Tanpa ini
|
|
322
323
|
* byte masuk ke dua tempat (App + popup) dan frame App menimpa popup.
|
|
323
|
-
*
|
|
324
|
-
*
|
|
324
|
+
* Hasil pemilihan provider/model terlihat di footer dan daftar saat dibuka
|
|
325
|
+
* kembali; transkrip tidak mengarsipkan pilihan UI yang sudah selesai.
|
|
325
326
|
*/
|
|
326
327
|
async function popupBuiltin(q: string): Promise<{ quit?: boolean }> {
|
|
327
|
-
const before = commandCtx.currentModel
|
|
328
328
|
app.suspend()
|
|
329
329
|
try {
|
|
330
|
-
return await delegateBuiltin(q)
|
|
330
|
+
return await delegateBuiltin(q, false)
|
|
331
331
|
} catch (e) {
|
|
332
332
|
// Spawn anak gagal (terminal sudah dilepas onBeforeSpawn): hidupkan
|
|
333
333
|
// kembali atau keluar bersih — jangan biarkan TUI mati tanpa layar.
|
|
@@ -335,8 +335,6 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
335
335
|
throw e
|
|
336
336
|
} finally {
|
|
337
337
|
app.resume()
|
|
338
|
-
const after = commandCtx.currentModel
|
|
339
|
-
if (after && after !== before) transcript.pushInfo([c.muted(t("tui.modelSet", { v: after }))])
|
|
340
338
|
}
|
|
341
339
|
}
|
|
342
340
|
|
|
@@ -472,13 +470,12 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
472
470
|
} else {
|
|
473
471
|
togglePermissionMode()
|
|
474
472
|
}
|
|
475
|
-
transcript.pushInfo([c.muted(t("tui.modeLine", { m: mode.toUpperCase() }))])
|
|
476
473
|
return
|
|
477
474
|
}
|
|
478
475
|
// [mode-architecture] /work-mode = WorkMode (operating mode) SAJA.
|
|
479
476
|
// Aksi operator EKSPLISIT untuk operating mode; Tab/Shift+Tab = pintasan.
|
|
480
477
|
if (name === "work-mode") {
|
|
481
|
-
const current = workModeControl?.getWorkMode() ?? "
|
|
478
|
+
const current = workModeControl?.getWorkMode() ?? "DISCUSS"
|
|
482
479
|
const currentDisplay = displayWorkMode(current)
|
|
483
480
|
if (!args) {
|
|
484
481
|
transcript.pushInfo([c.muted(t("tui.workModeUsage", { m: currentDisplay }))])
|
|
@@ -498,7 +495,6 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
498
495
|
return
|
|
499
496
|
}
|
|
500
497
|
workModeControl.setWorkMode(next)
|
|
501
|
-
transcript.pushInfo([c.muted(t("tui.workModeLine", { m: displayWorkMode(next) }))])
|
|
502
498
|
return
|
|
503
499
|
}
|
|
504
500
|
if (name === "lang") {
|
|
@@ -518,19 +514,16 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
518
514
|
const { saveLang } = await import("../src/config.ts")
|
|
519
515
|
await saveLang(next)
|
|
520
516
|
} catch {}
|
|
521
|
-
transcript.pushInfo([c.muted(t("tui.langLine", { v: next }))])
|
|
522
517
|
return
|
|
523
518
|
}
|
|
524
519
|
if (name === "compact") {
|
|
525
520
|
const next = args === "" ? undefined : args === "on" || args === "1"
|
|
526
|
-
|
|
527
|
-
transcript.pushInfo([c.muted(t("tui.toolCall", { v: compact ? "compact" : "expanded" }))])
|
|
521
|
+
ui.setCompactMode(next)
|
|
528
522
|
return
|
|
529
523
|
}
|
|
530
524
|
if (name === "thinking") {
|
|
531
525
|
const next = args === "" ? undefined : args === "on" || args === "1"
|
|
532
|
-
|
|
533
|
-
transcript.pushInfo([c.muted(t("tui.thinkingSet", { v: vis ? "expanded" : "minimized" }))])
|
|
526
|
+
ui.setReasoningVisible(next)
|
|
534
527
|
return
|
|
535
528
|
}
|
|
536
529
|
if (name === "expand") {
|
|
@@ -571,7 +564,6 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
571
564
|
}
|
|
572
565
|
ui.setSectionMinimized("tool", next)
|
|
573
566
|
ui.setSectionMinimized("answer", next)
|
|
574
|
-
transcript.pushInfo([c.muted(t(next ? "tui.sectionsMin" : "tui.sectionsExp"))])
|
|
575
567
|
return
|
|
576
568
|
}
|
|
577
569
|
if (name === "undo") {
|
|
@@ -649,7 +641,7 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
649
641
|
mode,
|
|
650
642
|
// P12 S2.2 Slice 5 - WorkMode LIVE (bukan snapshot boot): footer
|
|
651
643
|
// mencerminkan mode aktif saat frame digambar.
|
|
652
|
-
workMode: workModeControl?.getWorkMode() ?? "
|
|
644
|
+
workMode: workModeControl?.getWorkMode() ?? "DISCUSS",
|
|
653
645
|
model: modelRef.current ?? cfg.providers[0]?.models[0] ?? t("tui.noModel"),
|
|
654
646
|
cwd: cwd ?? process.cwd(),
|
|
655
647
|
context: fmtCtx(session.contextTokens),
|
|
@@ -693,21 +685,24 @@ export async function runTui(ctx: CliSession): Promise<void> {
|
|
|
693
685
|
// Approval sebagai warga TUI: blok pertanyaan + keputusan tercatat di
|
|
694
686
|
// transkrip dan terlihat sebelum menjawab (tanpa sink = tulis langsung).
|
|
695
687
|
const { setApprovalSink } = await import("../src/ui/tui/transcript.ts")
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
688
|
+
try {
|
|
689
|
+
setApprovalSink({
|
|
690
|
+
pushBlock: (lines) => transcript.pushInfo(lines),
|
|
691
|
+
repaint: () => app.repaint(),
|
|
692
|
+
suspend: () => app.suspend(),
|
|
693
|
+
resume: () => app.resume(),
|
|
694
|
+
})
|
|
695
|
+
const res = await app.run()
|
|
696
|
+
if (!res.started) {
|
|
697
|
+
// Kegagalan startup adalah diagnostik, bukan keluaran program. App
|
|
698
|
+
// sudah menolak membuka layar dan tidak ada fallback linear yang sah.
|
|
699
|
+
process.stderr.write(`${t("tui.noTty")}\n`)
|
|
700
|
+
process.exitCode = 1
|
|
701
|
+
return
|
|
702
|
+
}
|
|
703
|
+
} finally {
|
|
704
|
+
setApprovalSink(null)
|
|
705
|
+
transcript.dispose()
|
|
708
706
|
await close()
|
|
709
|
-
return
|
|
710
707
|
}
|
|
711
|
-
transcript.dispose()
|
|
712
|
-
await close()
|
|
713
708
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Control Plane Map — kontrak context/usage/cost/budget/compaction/termination
|
|
2
|
+
|
|
3
|
+
Dokumen ini membekukan kontrak control-plane MiniCode (Phase 6, 2026-09-17).
|
|
4
|
+
Tujuannya: satu sumber kebenaran per konsep, hubungan antar-konsep eksplisit,
|
|
5
|
+
dan setiap keputusan (kompaksi, abort, termination) dapat dijelaskan.
|
|
6
|
+
|
|
7
|
+
Prinsip: **Context ≠ Cost. Cost ≠ Usage. Usage ≠ Budget. Budget ≠ Termination.
|
|
8
|
+
Compaction ≠ Retry. Tool cap ≠ Context cap.** — semua konsep berbeda dan
|
|
9
|
+
punya owner sendiri; yang disatukan di sini hanya *hubungannya*.
|
|
10
|
+
|
|
11
|
+
## 1. Empat angka konteks (dua konsep, dua ukuran)
|
|
12
|
+
|
|
13
|
+
| Konsep | Ukuran | Owner | Sumber kebenaran | Dipakai |
|
|
14
|
+
|---|---|---|---|---|
|
|
15
|
+
| Logical context | token ESTIMASI (chars/4, sadar-gambar) | Kernel loop + `Session.contextTokens` | `estimateSessionContext` (`vendor tokens.ts`) — messages+system+tools | pressure evaluation, footer, `/status` |
|
|
16
|
+
| Serialized context | chars wire (JSON/base64 +overhead) | Adapter provider | `buildRequest` per adapter | dikirim, tidak diukur tersendiri |
|
|
17
|
+
| Provider usage | token yang dilaporkan provider | `createUsageCollector` | event `provider:extension{kind:"usage"}` — **boleh hilang** | akumulasi turn/session, cost |
|
|
18
|
+
| Economic usage | USD estimated dari harga tabel | `costFor`/`findPrice` | harga × usage; `undefined` = unknown | `--budget`, `/status` |
|
|
19
|
+
|
|
20
|
+
Relationship eksplisit:
|
|
21
|
+
- `logical` ≠ `serialized` (JSON overhead, base64 +33% — konsisten undercount).
|
|
22
|
+
- `provider usage` boleh tak ada → **unknown tetap unknown, bukan zero**
|
|
23
|
+
(collector tidak pernah memalsukan angka).
|
|
24
|
+
- `economic` selalu estimasi (tabel harga basi/stale) — bukan tagihan riil.
|
|
25
|
+
|
|
26
|
+
## 2. Owner map (siapa tahu / siapa memutuskan)
|
|
27
|
+
|
|
28
|
+
| Konsep | TAHU | MEMUTUSKAN |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| Context size | Kernel loop (`contextTokens`) + `Session.contextTokens` getter (ekspos ke driver/UI) | Kernel: kompaksi + gagal-bila-critical |
|
|
31
|
+
| Compaction | Kernel (pressure + flag) | Kernel: KAPAN + fallback; LLM: ISI ringkasan |
|
|
32
|
+
| Termination | maxSteps + turn timeout (kernel), per-prompt deadline (CLI), budget (driver), abort (user) | Kernel: maxSteps/turn timeout/post-kompaksi critical; CLI: fresh wall-clock deadline per prompt including retry/verify; Driver: budget abort; User: Esc (TUI), Ctrl+C/Esc (raw prompt) |
|
|
33
|
+
| Budget | Collector (usage live) + `budgetStatus` | `budgetStatus` (terpusat, seragam TUI/one-shot/exec) + watcher abort |
|
|
34
|
+
| Backpressure | Producer caps + kernel truncate | Cap di producer (sudah benar); kernel truncate terakhir |
|
|
35
|
+
|
|
36
|
+
## 3. Compaction Contract (Phase 6 — seam kernel)
|
|
37
|
+
|
|
38
|
+
**Dua semantics terpisah, tidak lagi satu flag:**
|
|
39
|
+
|
|
40
|
+
- `compactedForBudget` — kompaksi budget-pressure (`shouldCompact(pressure)`).
|
|
41
|
+
Set saat dicoba (anti berulang tiap step O(n)). Kritis setelahnya →
|
|
42
|
+
`AgentError("budget_exceeded")` (bukan retry provider sia-sia).
|
|
43
|
+
- `compactedForRecovery` — kompaksi recovery (`force_compact_and_retry` /
|
|
44
|
+
`onLength`). Set SETELAH compact (anti loop abadi: jalur ini tidak dihitung
|
|
45
|
+
`maxProviderRetries`). Kedua kalinya → `budget_exceeded`.
|
|
46
|
+
|
|
47
|
+
**Reason event** (`context:compacted`, `reason` — nama generik kernel,
|
|
48
|
+
diselaraskan 0.9.27 saat seam dihilirkan; sebelumnya `budget:<…>`):
|
|
49
|
+
- `pressure:<pressure>` — kompaksi policy-path yang benar-benar mengurangi messages.
|
|
50
|
+
- `pressure:<pressure>:no-op` — kompaksi policy-path yang TIDAK mengurangi (tidak ada
|
|
51
|
+
yang bisa dibuang dari messages — operator harus tahu bedanya dari fixed
|
|
52
|
+
overhead: system+tool schema, yang tidak pernah terkompaksi).
|
|
53
|
+
- `recovery` — kompaksi dari recovery (`context_length_exceeded` / `length`).
|
|
54
|
+
|
|
55
|
+
**Contract wajib menjawab:**
|
|
56
|
+
- *Who requested?* — budget path (kernel, pressure ≥ 75%) atau recovery path
|
|
57
|
+
(kernel, error konteks). Manual `/compact` tak menyentuh kernel (view saja).
|
|
58
|
+
- *Why?* — reason event di atas.
|
|
59
|
+
- *What is eligible?* — hanya messages; system prompt di-cap di hulu
|
|
60
|
+
(`SYSTEM_PROMPT_MAX_CHARS` 8000), tool schema TIDAK pernah terkompaksi.
|
|
61
|
+
- *What must be preserved?* — pasangan assistant(toolCalls)→tool results tidak
|
|
62
|
+
pernah dipecah (`compact.ts`); summary LLM terpin verbatim (anti-drift).
|
|
63
|
+
- *What may be removed?* — hasil tool sukses (ditinggal `<result omitted>` di
|
|
64
|
+
mechanical; LLM menulis ringkasan fakta), reasoning, tail lama.
|
|
65
|
+
- *What if compaction fails?* — LLM gagal/timeout (10s) → fallback sync
|
|
66
|
+
mekanis; async compactor tak pernah bisa crash loop.
|
|
67
|
+
- *Can it retry?* — budget: tidak (flag); recovery: sekali per turn (flag).
|
|
68
|
+
- *Can another occur in the same turn?* — budget + recovery boleh co-exist
|
|
69
|
+
(flag terpisah); sesama kind tidak.
|
|
70
|
+
- *What does compaction itself consume?* — LLM kompaksi berbiaya; usage-nya
|
|
71
|
+
ditangkap `compactWithLlm` → callback `onUsage` → bus sesi (event usage
|
|
72
|
+
standar) — **bukan blind spot lagi** (Phase 6, E5).
|
|
73
|
+
|
|
74
|
+
## 4. Budget Contract
|
|
75
|
+
|
|
76
|
+
Status (`budgetStatus`, terpusat): `ok | over | unknown-strict`.
|
|
77
|
+
|
|
78
|
+
| Fase | Semantics |
|
|
79
|
+
|---|---|
|
|
80
|
+
| Preflight (prompt baru) | `tokens == 0` (belum ada pemakaian tercatat) → **start selalu boleh** (lockout strict tidak diminta — Phase 5 E-3c); `tokens > 0` + cost unknown → ditolak (fail-closed, F-06); cost known + over → ditolak |
|
|
81
|
+
| In-flight | `watchBudgetLimit` membaca biaya LIVE per usage event; fire-once → `ctl.abort(budgetExceededError())` — kind `budget_exceeded` dipertahankan (terbedakan dari abort user) |
|
|
82
|
+
| Post-usage | cost = estimated dari harga tabel (bukan tagihan riil); cost unknown → status `unknown-strict`, angka palsu tidak dibuat |
|
|
83
|
+
|
|
84
|
+
**Context vs budget adalah dua dimensi independen**: pressure HIGH + cost LOW
|
|
85
|
+
valid (tool result raksasa, model gratis); pressure LOW + cost HIGH valid
|
|
86
|
+
(konteks kecil, model mahal). Tidak ada asumsi `high context = high cost`.
|
|
87
|
+
|
|
88
|
+
## 5. Termination Contract
|
|
89
|
+
|
|
90
|
+
| Reason | Owner | Mekanisme |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `completed` | kernel loop | tidak ada tool call → `finalText` |
|
|
93
|
+
| `max_steps_exceeded` | kernel loop | `stepIndex >= maxSteps` |
|
|
94
|
+
| `timeout` | CLI per-prompt deadline + kernel `createTimeout` | Keduanya membawa `AgentError("timeout")`; retry wait dan provider stream menerima sinyal yang sama |
|
|
95
|
+
| `budget_exceeded` | kernel (post-kompaksi) / driver (watcher abort) | `AgentError("budget_exceeded")` — dipertahankan |
|
|
96
|
+
| `aborted` | user (Esc pada TUI; Ctrl+C/Esc pada prompt non-TUI) / `session.abort()` | sinyal tanpa kind AgentError |
|
|
97
|
+
| `provider` | kernel loop | provider error setelah retry habis |
|
|
98
|
+
| busy | kernel | `run()` saat `running` |
|
|
99
|
+
|
|
100
|
+
Deadline provider per request default 300 detik. Kegagalan provider yang dapat
|
|
101
|
+
dicoba ulang memakai paling banyak tiga retry setelah percobaan awal; backoff
|
|
102
|
+
tanpa `Retry-After` adalah 1, 2, lalu 4 detik. `Retry-After` dibatasi 30 detik.
|
|
103
|
+
Router dapat mencoba provider alternatif sebelum menunggu, kecuali model di-pin.
|
|
104
|
+
Semua penantian retry dan rate-limit dibatalkan oleh timeout/abort pemanggilan.
|
|
105
|
+
|
|
106
|
+
Satu terminal reason per sinyal (`abortError` mempertahankan kind
|
|
107
|
+
`AgentError`); pemutus lain dapat REQUEST, tidak ada competing owners —
|
|
108
|
+
`joinSignals` + `withAbort` = satu titik settle.
|
|
109
|
+
|
|
110
|
+
## 6. Producer/Backpressure hierarchy
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
producer-side cap (bash 20k, git 500k, mcp 100k, read_file paging, ...)
|
|
114
|
+
↓
|
|
115
|
+
kernel truncate (toolResultMaxTokens 4096 tok = 16.384 chars, head 70%+tail 30%)
|
|
116
|
+
↓
|
|
117
|
+
context insertion (store append — cap by truncation di atas)
|
|
118
|
+
↓
|
|
119
|
+
compaction (messages; system/schema = fixed overhead, tidak pernah terkompaksi)
|
|
120
|
+
↓
|
|
121
|
+
termination (budget_exceeded bila critical setelah kompaksi)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Aturan: **jangan double-truncate tanpa semantics** — raw output cap ≠ context
|
|
125
|
+
insertion cap ≠ stored result cap ≠ display cap. Keempatnya boleh berbeda,
|
|
126
|
+
tetapi setiap lapisan harus tahu apa yang hilang di situ (marker truncation
|
|
127
|
+
wajib). Guard `read_image` memakai angka kernel (16.184 chars) — bukan angka
|
|
128
|
+
sendiri (bug E-1 sudah ditutup).
|
|
129
|
+
|
|
130
|
+
## 7. Observability contract
|
|
131
|
+
|
|
132
|
+
Operator harus bisa membedakan (tanpa ambigu):
|
|
133
|
+
- `/status`: `Context` (window estimate, kernel) vs `Input/Output/Total`
|
|
134
|
+
(provider usage) vs `Cost` (estimated) vs `Budget` (status keputusan).
|
|
135
|
+
- Footer: angka = ukuran jendela saat ini (kernel) — bukan spend kumulatif.
|
|
136
|
+
- `context:compacted` event: reason membedakan policy-pressure/recovery/no-op.
|
|
137
|
+
|
|
138
|
+
## Proteksi (test → kontrak)
|
|
139
|
+
|
|
140
|
+
- `test/control-plane.test.ts` — compaction budget≠recovery (F-10), anti-loop,
|
|
141
|
+
contextTokens getter + konsistensi estimator, termination reason.
|
|
142
|
+
- `test/cli-help-language.test.ts` — /status membedakan Context/Usage/Budget.
|
|
143
|
+
- `test/repl-linear.test.ts` — footer membaca kernel contextTokens.
|
|
144
|
+
- `test/usage-session.test.ts` / `budget-unknown.test.ts` — budget contract.
|
|
145
|
+
- `test/pack-integrity.test.ts` — vendor hash + VENDOR.md sinkron.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** Phase 2 core state/replay contract landed; renderer/wire protocol masih target
|
|
4
4
|
**Tanggal:** 2026-09-25
|
|
5
|
-
**
|
|
5
|
+
**Kontrak aktif:** implementasi dan producer event di `src/presentation/events.ts`.
|
|
6
6
|
|
|
7
7
|
## Status implementasi
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** landed — `exec --json` memakai envelope `minicode.output.v1`, ACP memakai framing JSON-RPC + mapping semantik yang sama; legacy `type:"tool"` hanya bila lifecycle absen
|
|
4
4
|
**Tanggal:** 2026-09-25
|
|
5
|
-
**
|
|
5
|
+
**Kontrak aktif:** envelope machine di `src/presentation/projection.ts` dan consumer di `cli/commands/exec.ts` serta `cli/commands/acp.ts`.
|
|
6
6
|
|
|
7
7
|
## 1. Prinsip
|
|
8
8
|
|
|
@@ -56,6 +56,12 @@ secara default dan tidak boleh dianggap machine contract.
|
|
|
56
56
|
| SGR | boleh bila color gate | tidak perlu; `NO_COLOR` menang |
|
|
57
57
|
| raw OSC/CSI dari untrusted text | Forbidden | Forbidden |
|
|
58
58
|
|
|
59
|
+
Saat `--interactive` gagal membuka fullscreen (pipe/non-TTY atau terminal tidak
|
|
60
|
+
mampu), CLI menulis diagnostik ke stderr dan keluar nonzero tanpa fallback linear
|
|
61
|
+
dan tanpa byte UI pada stdout. Saat TUI aktif, stdout dimiliki `App` untuk frame;
|
|
62
|
+
diagnostik yang tidak transient masuk transcript/system node atau jalur diagnostic
|
|
63
|
+
yang memang diizinkan kontrak. Output machine tetap terpisah dari kedua jalur UI.
|
|
64
|
+
|
|
59
65
|
`App` adalah pemilik tunggal frame TUI. Foreign writer ke stdout tidak boleh aktif
|
|
60
66
|
saat `TuiApp` memegang layar; diagnostic stderr yang tidak transient harus masuk ke
|
|
61
67
|
transcript atau competing-ownership guard.
|
|
@@ -130,7 +136,7 @@ Semua event machine SHOULD menggunakan bentuk:
|
|
|
130
136
|
"sessionId": "s1",
|
|
131
137
|
"turnId": 1,
|
|
132
138
|
"correlationId": "call-1",
|
|
133
|
-
"source": "
|
|
139
|
+
"source": "derived",
|
|
134
140
|
"severity": "info",
|
|
135
141
|
"status": "completed",
|
|
136
142
|
"visibility": ["machine"],
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** implemented renderer boundary; canonical policy active, with streaming content transport and one ACP compatibility window.
|
|
4
4
|
**Tanggal:** 2026-09-25
|
|
5
|
-
**
|
|
5
|
+
**Kontrak aktif:** renderer TUI/linear di `src/presentation/` dan `src/ui/`.
|
|
6
6
|
|
|
7
7
|
## 1. Prinsip boundary
|
|
8
8
|
|
|
@@ -127,14 +127,19 @@ popup tidak boleh membuat listener stdin kedua.
|
|
|
127
127
|
|
|
128
128
|
### TUI semantic projection
|
|
129
129
|
|
|
130
|
-
-
|
|
130
|
+
- Prompt percakapan: satu entry user dengan source range. Input command slash tetap
|
|
131
|
+
tersedia di composer history, tetapi tidak ditambahkan sebagai pesan transkrip.
|
|
131
132
|
- Assistant stream: live buffer yang di-cap; final node dipisah dari stream.
|
|
133
|
+
- Whitespace jawaban dirapikan hanya pada layer tampilan: baris kosong tepi dibuang,
|
|
134
|
+
jeda berulang di luar code fence dirapatkan, isi fenced code tetap literal.
|
|
132
135
|
- Activity: started → running → terminal, dengan glyph + status word.
|
|
133
136
|
- Tool child: default dikelompokkan ke parent `delegate_task`; child detail tersedia
|
|
134
137
|
pada verbose/debug.
|
|
135
138
|
- Context compaction: system entry, tidak menghapus history.
|
|
136
139
|
- Summary: system node dari canonical turn summary, bukan hasil hitung ulang widget.
|
|
137
140
|
- Error: node dengan category/cause/hint; tidak hanya string merah.
|
|
141
|
+
- Pilihan provider/model dan status selesai dari popup pengelolaan tidak diarsipkan
|
|
142
|
+
ke transkrip; state aktif dibaca dari footer/manager saat ini. Error tetap terlihat.
|
|
138
143
|
|
|
139
144
|
### Selection dan clipboard
|
|
140
145
|
|
|
@@ -204,7 +209,16 @@ arbitrator untuk transient, tetapi bukan pengganti semantic routing.
|
|
|
204
209
|
|
|
205
210
|
## 9. Geometry, text, dan fallback
|
|
206
211
|
|
|
207
|
-
- `displayWidth()` menghitung terminal
|
|
212
|
+
- `displayWidth()` menghitung kolom terminal per grapheme dengan
|
|
213
|
+
`Intl.Segmenter("und", { granularity: "grapheme" })`. Karakter CJK/fullwidth
|
|
214
|
+
dihitung dua kolom; combining marks tidak menambah kolom. Cluster emoji yang
|
|
215
|
+
ditampilkan sebagai emoji (Emoji_Presentation/VS16), skin-tone, ZWJ, regional
|
|
216
|
+
indicator, dan keycap dihitung dua kolom sebagai satu unit. Kebijakan ini
|
|
217
|
+
mengikuti perilaku terminal umum; MiniCode tidak mengukur lebar glyph per
|
|
218
|
+
terminal, sehingga font/terminal yang menyimpang dapat tetap berbeda.
|
|
219
|
+
- Wrapping, truncation/chunking, transcript selection, kursor prompt, dan
|
|
220
|
+
geometri frame memakai helper lebar bersama. `truncateToWidth()` dan
|
|
221
|
+
`chunkByWidth()` tidak memecah grapheme.
|
|
208
222
|
- Sanitasi control bytes dilakukan sebelum output; SGR boleh hanya bila color gate.
|
|
209
223
|
- Resize dibaca saat paint, bukan saat event.
|
|
210
224
|
- `NO_COLOR`/legacy Windows memakai glyph ASCII atau status word.
|
|
@@ -212,7 +226,22 @@ arbitrator untuk transient, tetapi bukan pengganti semantic routing.
|
|
|
212
226
|
- TTY table boleh aligned; machine/non-TTY tidak boleh berubah makna.
|
|
213
227
|
- Copy/paste tidak bergantung pada warna.
|
|
214
228
|
|
|
215
|
-
## 10.
|
|
229
|
+
## 10. Visual system dan accessibility
|
|
230
|
+
|
|
231
|
+
`src/ui/render/theme.ts` menyediakan token semantik (`success`, `error`,
|
|
232
|
+
`warning`, `info`, `accent`, `muted`, `faint`) dengan getter runtime. Token
|
|
233
|
+
warna hanya menegaskan status dan hierarki; status penting juga memakai kata
|
|
234
|
+
atau glyph sehingga tetap dapat dibaca pada `NO_COLOR`/mono. Fallback ASCII
|
|
235
|
+
dikendalikan oleh `MINICODE_ASCII` dan capability UTF-8 Windows.
|
|
236
|
+
|
|
237
|
+
Interaksi tetap keyboard-first: PgUp/PgDn dan Home/End untuk transkrip, Esc
|
|
238
|
+
untuk membatalkan/menutup selection, Ctrl+D untuk keluar, dan popup menahan
|
|
239
|
+
fokus sampai ditutup. Tidak ada mode screen-reader terpisah karena kontrak
|
|
240
|
+
fullscreen terminal dibekukan. Navigasi keyboard dan jalur mono memiliki test;
|
|
241
|
+
screen-reader announcement, kontras fisik, dan manual assistive-technology UAT
|
|
242
|
+
belum diverifikasi. Tampilan antar terminal tetap dapat berbeda.
|
|
243
|
+
|
|
244
|
+
## 11. Parity matrix
|
|
216
245
|
|
|
217
246
|
| Semantic | TUI | Linear | Exec | ACP |
|
|
218
247
|
|---|---|---|---|---|
|
|
@@ -227,7 +256,7 @@ arbitrator untuk transient, tetapi bukan pengganti semantic routing.
|
|
|
227
256
|
Parity diuji pada semantic object sebelum snapshot string. Test output tetap diperlukan
|
|
228
257
|
untuk regressions visual dan protocol.
|
|
229
258
|
|
|
230
|
-
##
|
|
259
|
+
## 12. Migration seams
|
|
231
260
|
|
|
232
261
|
1. `PresentationAdapter` dapat tetap emit raw-compatible events.
|
|
233
262
|
2. `ProjectionBridge` aktif untuk semua surface; flag `MINICODE_PRESENTATION_V2` dihapus di Phase 8.
|
|
@@ -238,7 +267,7 @@ untuk regressions visual dan protocol.
|
|
|
238
267
|
removed from user-facing TUI. Raw EventBus remains for streaming content and
|
|
239
268
|
diagnostics/trace only.
|
|
240
269
|
|
|
241
|
-
##
|
|
270
|
+
## 13. Definition of done renderer
|
|
242
271
|
|
|
243
272
|
- Tidak ada renderer yang meng-status-kan teks.
|
|
244
273
|
- TUI/linear/exec/ACP menghasilkan semantic fields yang sama.
|
package/docs/OUTPUT_UX_RULES.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** contract grammar untuk normal/verbose/debug/machine output
|
|
4
4
|
**Tanggal:** 2026-09-25
|
|
5
|
-
**
|
|
5
|
+
**Kontrak aktif:** proyeksi output di `src/presentation/projection.ts` dan formatter di `src/ui/render/`.
|
|
6
6
|
|
|
7
7
|
## 1. North star
|
|
8
8
|
|
package/docs/README.md
CHANGED
|
@@ -1,111 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Dokumentasi MiniCode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MiniCode adalah coding agent terminal yang dibangun di atas kernel MiniCore. Jalur interaktif memakai TUI fullscreen; jalur one-shot dan otomatis menulis ke scrollback atau stream mesin sesuai kontraknya.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Mulai
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1. Ikuti [instalasi](getting-started.md). Metadata paket dan batas runtime Bun tersedia di `package.json` pada root repository.
|
|
8
|
+
2. Gunakan [quickstart](quickstart.md) untuk menyiapkan provider dan menjalankan prompt pertama.
|
|
9
|
+
3. Baca [memilih mode](choosing-mode.md) sebelum memberi agent akses tulis atau eksekusi.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## Batas yang perlu diketahui
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
- Prompt dan konteks dikirim ke provider yang Anda pilih. Server MCP dan LSP yang dikonfigurasi juga dapat menerima data atau melakukan efek eksternal.
|
|
14
|
+
- Path jail, bash guard, WorkMode, PermissionMode, dan tool access policy membatasi eksekusi; tidak menjamin bahwa keluaran model benar.
|
|
15
|
+
- Batasan dan kontrak operasional dijelaskan dalam panduan aktif di direktori ini. Laporan audit bertanggal telah dipangkas dari baseline dokumentasi.
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
## Peta dokumentasi
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
`SUMMARY.md` adalah daftar navigasi yang dibaca generator situs. Untuk referensi terbit, buka [Dokumentasi](/docs/). [Arsitektur](architecture.md) memuat peta struktur dan alur runtime.
|
|
16
20
|
|
|
17
|
-
##
|
|
21
|
+
## Pengembangan
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **Komponen inti** (`vendor/minicore`) — kernel yang dibekukan, tidak bergantung pada paket lain.
|
|
22
|
-
- **Alat-alat** — untuk membaca dan menulis file, menjalankan perintah, dan bekerja dengan kode.
|
|
23
|
-
- **Penanganan tugas** — dapat membagi pekerjaan ke agen lain yang bekerja secara terpisah.
|
|
24
|
-
- **Kebijakan keamanan** — membatasi apa yang boleh dijalankan, sehingga pekerjaan tetap terkendali.
|
|
25
|
-
- **Penyedia Kecerdasan Buatan** — terhubung ke layanan AI yang Anda pilih.
|
|
26
|
-
- **Alat bantu eksternal** — bisa terhubung ke layanan MCP dan LSP untuk fungsi tambahan.
|
|
27
|
-
- **Memori & sesi** — mencatat riwayat pekerjaan dan menyimpan ringkasan yang relevan.
|
|
28
|
-
- **Kemampuan khusus** — seperti membaca struktur kode, menyimpan dan melanjutkan sesi, serta pemeriksaan otomatis.
|
|
29
|
-
|
|
30
|
-
## Privasi & kejujuran
|
|
31
|
-
|
|
32
|
-
Beberapa hal penting yang perlu Anda tahu:
|
|
33
|
-
|
|
34
|
-
- **Tidak ada data yang dikirim tanpa sepengetahuan Anda.** Konfigurasi Anda tersimpan di komputer Anda sendiri. Token akses disimpan dengan aman dan tidak disebarkan.
|
|
35
|
-
- **Kegagalan dilaporkan apa adanya.** Jika ada masalah, Minicode akan memberitahu secara langsung, tanpa disamarkan.
|
|
36
|
-
- **Informasi kuantitatif tidak ditulis secara permanen di sini.** Jika Anda ingin tahu jumlah test, cakupan, atau jumlah alat yang tersedia, jalankan perintah `bun test`, `bun run gate:coverage`, atau lihat hasil di layanan continuous integration (CI). Informasi seperti ini bisa berubah sewaktu-waktu.
|
|
37
|
-
- **Riwayat perubahan** tercatat di `CHANGELOG.md` di direktori utama repo.
|
|
38
|
-
|
|
39
|
-
## Mulai dalam 5 menit
|
|
40
|
-
|
|
41
|
-
Yang Anda butuhkan: Bun versi 1.0 ke atas. Tidak perlu instalasi lain.
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Salin repo ke komputer Anda
|
|
45
|
-
git clone https://github.com/startupmini/minicode && cd minicode
|
|
46
|
-
|
|
47
|
-
# Pasang ketergantungan
|
|
48
|
-
bun install && bun link
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Selanjutnya, coba perintah-perintah ini untuk melihat bagaimana Minicode bekerja:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
minicode # Mulai Minicode — akan muncul panduan jika ini pertama kalinya
|
|
55
|
-
minicode "buat http server" --verbose
|
|
56
|
-
minicode auth login # OAuth device-code bila provider mendukung; lainnya via API key
|
|
57
|
-
minicode providers # Lihat daftar penyedia yang tersedia
|
|
58
|
-
minicode doctor # Cek kondisi jika ada yang tidak beres
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Untuk langkah selanjutnya — mulai dari awal sampai membuat prompt pertama yang terverifikasi — baca [Quickstart](quickstart.md). Jika Anda ingin tahu tentang instalasi di sistem operasi berbeda, atau cara memperbarui dan menghapus Minicode, baca [Instalasi](getting-started.md).
|
|
62
|
-
|
|
63
|
-
## Mulai di sini
|
|
64
|
-
|
|
65
|
-
Anda baru dan tak mau menebak urutan baca? Ikuti jalur ini (total ±15 menit):
|
|
66
|
-
|
|
67
|
-
0. **Apa Minicode?** — [Konsep & Desain](concepts.md) (3 menit): apa, kenapa, dan apa yang sengaja tidak ada.
|
|
68
|
-
1. **Install** — [Instalasi](getting-started.md) (5 menit): Bun, clone, `doctor`.
|
|
69
|
-
2. **Prompt pertama** — [Quickstart](quickstart.md) (5 menit): wizard/API key atau OAuth, prompt ter-verify pertama.
|
|
70
|
-
3. **Pilih mode** — [Memilih Mode](choosing-mode.md) (2 menit): baca, ubah, approve, atau plan.
|
|
71
|
-
4. **Workflow pertama** — [CLI](cli.md) + [TUI](repl.md): flag harian dan slash command sesuai kebutuhan.
|
|
72
|
-
|
|
73
|
-
Habis itu, baca sesuai kebutuhan lewat tabel Navigasi di bawah — tak perlu berurutan.
|
|
74
|
-
|
|
75
|
-
## Navigasi
|
|
76
|
-
|
|
77
|
-
| Anda ingin... | Baca... |
|
|
78
|
-
|---|---|
|
|
79
|
-
| Mengerti apa itu Minicode dan alasan dibaliknya | [Konsep & Desain](concepts.md) |
|
|
80
|
-
| Cara menginstall, memperbarui, atau menghapusnya | [Instalasi](getting-started.md) |
|
|
81
|
-
| Mulai dari nol sampai membuat prompt pertama yang terverifikasi | [Quickstart](quickstart.md) |
|
|
82
|
-
| Arti istilah-istilah yang dipakai di sini | [Glosarium](glossary.md) |
|
|
83
|
-
| Semua perintah CLI dan flag yang tersedia | [CLI](cli.md) |
|
|
84
|
-
| Perintah khusus di dalam Minicode dan tombol pintas | [TUI](repl.md) |
|
|
85
|
-
| Cara menjalankan Minicode tanpa interaksi (otomatis / di CI) | [Otomasi & CI](exec.md) |
|
|
86
|
-
| Cara menyimpan pengaturan dan di mana data tersimpan | [Config](config.md) |
|
|
87
|
-
| Cara menambah penyedia AI dan mengelola akses | [Config & Provider](config-providers.md) |
|
|
88
|
-
| Cara memperkirakan biaya dan membatasi pengeluaran | [Pricing & Budget](pricing-budget.md) |
|
|
89
|
-
| Semua variabel lingkungan yang tersedia | [Environment Variables](environment.md) |
|
|
90
|
-
| Cara membuat perintah khusus (skill) dan skrip terbatas | [Skills & Hooks](skills.md) |
|
|
91
|
-
| Sub-agent `delegate_task`, mode explore/plan, recovery | [Sub-Agents & Tasks](agents.md) |
|
|
92
|
-
| MCP stdio/HTTP, LSP, `mcp serve` | [MCP & LSP](mcp-lsp.md) |
|
|
93
|
-
| Memory RAG, sessions, undo/redo, recovery journal | [Memory & Sessions](memory-sessions.md) |
|
|
94
|
-
| Auto-verify, benchmark, SWE-bench Lite, harness audit | [Verify & Benchmark](verify-benchmark.md) |
|
|
95
|
-
| Permission mode, bash-guard, jail, sandbox | [Policy & Sandbox](policy-sandbox.md) |
|
|
96
|
-
| Threat model, prompt injection, supply chain | [Keamanan](security.md) |
|
|
97
|
-
| Error umum + `doctor` | [Troubleshooting](troubleshooting.md) |
|
|
98
|
-
| Peta lapisan, alur satu prompt | [Arsitektur](architecture.md) |
|
|
99
|
-
| Kontrak stdout/stderr FROZEN, invariant I1–I35 | [Kontrak Terminal](terminal.md) |
|
|
100
|
-
| Kontrak internal kontributor: terminal FROZEN, control-plane, pipeline render | [Internal & Arsitektur](TERMINAL_CONTRACT.md) (grup di sidebar) |
|
|
101
|
-
| Audit dan target arsitektur output/presentation | [Output Architecture Audit](OUTPUT_ARCHITECTURE_AUDIT.md) |
|
|
102
|
-
| Ikut kontribusi, gate, batas lapisan | [Contributing](contributing.md) |
|
|
103
|
-
| Perubahan per versi | [Changelog](changelog.md) |
|
|
104
|
-
| Arsip panduan monolit lama (baca hanya bila perlu) | `USAGE.md` (file pendamping, status legacy) |
|
|
105
|
-
|
|
106
|
-
## Konvensi dokumen ini
|
|
107
|
-
|
|
108
|
-
- Bahasa: **Indonesia**, istilah teknis tetap English (`provider`, `checkpoint`, `sandbox`).
|
|
109
|
-
- Komentar kode di repo juga Indonesia (menjelaskan *mengapa*, bukan *apa*).
|
|
110
|
-
- Setiap klaim perilaku merujuk ke `file:line` agar bisa diverifikasi dengan `read_file` + `offset`/`limit`.
|
|
111
|
-
- Encoding UTF-8 tanpa BOM. Jangan commit rahasia (API key, token OAuth).
|
|
23
|
+
Panduan contributor, gate, dan batas lapisan: [contributing.md](contributing.md). Aturan agent ada di `AGENTS.md` pada root repository. Master roadmap tetap milik pemilik repo dan tidak tersedia di checkout ini.
|
package/docs/SUMMARY.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Summary
|
|
2
|
+
|
|
3
|
+
* [Minicode — Dokumentasi](README.md)
|
|
4
|
+
|
|
5
|
+
## Memulai
|
|
6
|
+
|
|
7
|
+
* [Konsep & Desain](concepts.md)
|
|
8
|
+
* [Instalasi](getting-started.md)
|
|
9
|
+
* [Quickstart 5 menit](quickstart.md)
|
|
10
|
+
* [Glosarium](glossary.md)
|
|
11
|
+
|
|
12
|
+
## Menggunakan
|
|
13
|
+
|
|
14
|
+
* [CLI — Mode & Flags](cli.md)
|
|
15
|
+
* [Memilih Mode](choosing-mode.md)
|
|
16
|
+
* [TUI — Slash & Keyboard](repl.md)
|
|
17
|
+
* [Otomasi & CI](exec.md)
|
|
18
|
+
* [Config — File & Lokasi Data](config.md)
|
|
19
|
+
* [Config & Provider](config-providers.md)
|
|
20
|
+
* [Pricing & Budget](pricing-budget.md)
|
|
21
|
+
* [Environment Variables](environment.md)
|
|
22
|
+
* [Skills & Hooks](skills.md)
|
|
23
|
+
|
|
24
|
+
## Referensi
|
|
25
|
+
|
|
26
|
+
* [Tools](tools.md)
|
|
27
|
+
* [Sub-Agents & Tasks](agents.md)
|
|
28
|
+
* [MCP & LSP](mcp-lsp.md)
|
|
29
|
+
* [Memory & Sessions](memory-sessions.md)
|
|
30
|
+
* [Verify & Benchmark](verify-benchmark.md)
|
|
31
|
+
|
|
32
|
+
## Keamanan
|
|
33
|
+
|
|
34
|
+
* [Security Model](security-model.md)
|
|
35
|
+
* [Policy & Sandbox](policy-sandbox.md)
|
|
36
|
+
* [Keamanan](security.md)
|
|
37
|
+
* [Troubleshooting](troubleshooting.md)
|
|
38
|
+
|
|
39
|
+
## Kontribusi & Arsitektur
|
|
40
|
+
|
|
41
|
+
* [Arsitektur](architecture.md)
|
|
42
|
+
* [Kontrak Terminal](terminal.md)
|
|
43
|
+
* [Contributing](contributing.md)
|
|
44
|
+
|
|
45
|
+
## Internal & Arsitektur (untuk kontributor)
|
|
46
|
+
|
|
47
|
+
* [Terminal Contract (FROZEN) — 35 invariant, v7.7](TERMINAL_CONTRACT.md)
|
|
48
|
+
* [Output Event Model — taksonomi dan lifecycle](OUTPUT_EVENT_MODEL.md)
|
|
49
|
+
* [Output Protocol Spec — stream dan machine contract](OUTPUT_PROTOCOL_SPEC.md)
|
|
50
|
+
* [Output Rendering Spec — boundary renderer](OUTPUT_RENDERING_SPEC.md)
|
|
51
|
+
* [Output UX Rules — grammar human-facing](OUTPUT_UX_RULES.md)
|
|
52
|
+
* [Control Plane — kontrak context/budget/compaction](CONTROL-PLANE-MAP.md)
|
|
53
|
+
* [UI Render Pipeline — jalur stream ke terminal](UI_RENDER_PIPELINE.md)
|