minicode-ai 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -0
- package/LICENSE +21 -21
- package/README.md +4 -4
- package/cli/args.ts +46 -0
- package/cli/commands/acp.ts +163 -10
- package/cli/commands/config.ts +33 -18
- package/cli/commands/daemon.ts +515 -0
- package/cli/commands/exec.ts +145 -53
- package/cli/commands/openwork.ts +986 -0
- package/cli/commands/sessions.ts +4 -1
- package/cli/commands/stats.ts +34 -4
- package/cli/commands.ts +217 -2
- package/cli/index.ts +146 -14
- package/cli/recovery-warning.ts +115 -0
- package/cli/router.ts +32 -1
- package/cli/setup.ts +2332 -171
- package/cli/tui.ts +113 -7
- package/docs/OUTPUT_ARCHITECTURE_AUDIT.md +489 -0
- package/docs/OUTPUT_EVENT_MODEL.md +289 -0
- package/docs/OUTPUT_IMPLEMENTATION_PLAN.md +391 -0
- package/docs/OUTPUT_PROTOCOL_SPEC.md +285 -0
- package/docs/OUTPUT_RENDERING_SPEC.md +248 -0
- package/docs/OUTPUT_UX_RULES.md +449 -0
- package/docs/PLAN_UIUX_V6.md +2 -2
- package/docs/README.md +4 -3
- package/docs/TERMINAL_CONTRACT.md +278 -66
- package/docs/architecture.md +89 -7
- package/docs/changelog.md +1 -1
- package/docs/choosing-mode.md +2 -2
- package/docs/cli.md +9 -5
- package/docs/concepts.md +1 -1
- package/docs/contributing.md +9 -2
- package/docs/environment.md +6 -2
- package/docs/exec.md +46 -5
- package/docs/memory-sessions.md +2 -0
- package/docs/policy-sandbox.md +1 -1
- package/docs/pricing-budget.md +1 -1
- package/docs/quickstart.md +2 -2
- package/docs/repl.md +6 -2
- package/docs/security-model.md +1 -1
- package/docs/security.md +1 -1
- package/docs/skills.md +2 -2
- package/docs/terminal.md +9 -5
- package/docs/tools.md +1 -1
- package/package.json +35 -5
- package/src/app/session.ts +261 -15
- package/src/app/tool-layer.ts +94 -7
- package/src/daemon/approvals.ts +361 -0
- package/src/daemon/capability.ts +145 -0
- package/src/daemon/children.ts +142 -0
- package/src/daemon/client.ts +267 -0
- package/src/daemon/control.ts +350 -0
- package/src/daemon/discovery.ts +234 -0
- package/src/daemon/feed.ts +155 -0
- package/src/daemon/framing.ts +94 -0
- package/src/daemon/host.ts +316 -0
- package/src/daemon/protocol.ts +217 -0
- package/src/daemon/resource.ts +170 -0
- package/src/daemon/sanitize.ts +57 -0
- package/src/daemon/server.ts +627 -0
- package/src/daemon/store.ts +317 -0
- package/src/daemon/subscription.ts +270 -0
- package/src/daemon/telemetry.ts +81 -0
- package/src/hooks/run.ts +12 -1
- package/src/lib/atomic-write.ts +29 -3
- package/src/lib/db-path.ts +26 -0
- package/src/lib/keystore.ts +544 -42
- package/src/lib/net.ts +43 -1
- package/src/lib/safe-open.ts +116 -1
- package/src/lib/session-id.ts +15 -0
- package/src/lsp/client.ts +123 -5
- package/src/mcp/client.ts +139 -17
- package/src/mcp/server.ts +177 -50
- package/src/mcp/transport.ts +16 -19
- package/src/memory/vector.ts +770 -55
- package/src/policy/allowlist.ts +14 -2
- package/src/policy/bash-guard.ts +105 -10
- package/src/policy/compaction.ts +82 -5
- package/src/policy/consequence-engine.ts +220 -0
- package/src/policy/context.ts +132 -0
- package/src/policy/executor.ts +187 -121
- package/src/policy/no-progress.ts +559 -0
- package/src/policy/permission.ts +4 -8
- package/src/policy/pricing.ts +17 -3
- package/src/policy/scrub.ts +69 -2
- package/src/policy/tool-contract.ts +515 -0
- package/src/policy/usage.ts +310 -24
- package/src/policy/verifier.ts +6 -3
- package/src/policy/work-mode.ts +182 -0
- package/src/presentation/adapter.ts +533 -26
- package/src/presentation/events.ts +151 -0
- package/src/presentation/model.ts +180 -27
- package/src/presentation/projection.ts +858 -0
- package/src/presentation/reducer.ts +645 -310
- package/src/presentation/store.ts +12 -7
- package/src/providers/anthropic.ts +18 -10
- package/src/providers/responses.ts +17 -7
- package/src/runtime/capability.ts +409 -0
- package/src/runtime/child-execution.ts +274 -0
- package/src/runtime/composition.ts +958 -0
- package/src/runtime/dispatch.ts +591 -0
- package/src/runtime/execution-backend.ts +632 -0
- package/src/runtime/execution-events.ts +272 -0
- package/src/runtime/execution-id.ts +230 -0
- package/src/runtime/execution-journal.ts +926 -0
- package/src/runtime/execution-kernel.ts +456 -0
- package/src/runtime/execution-registry.ts +379 -0
- package/src/runtime/process-supervision.ts +276 -0
- package/src/runtime/production-execution.ts +551 -0
- package/src/runtime/production-runtime.ts +217 -0
- package/src/runtime/recovery-safety.ts +70 -0
- package/src/runtime/recovery.ts +477 -0
- package/src/runtime/runtime-capabilities.ts +179 -0
- package/src/runtime/runtime-diagnostics.ts +141 -0
- package/src/runtime/runtime-host.ts +365 -0
- package/src/runtime/runtime-status-facts.ts +222 -0
- package/src/runtime/runtime-status-provider.ts +74 -0
- package/src/runtime/runtime-status.ts +459 -0
- package/src/runtime/runtime-task-admission.ts +101 -0
- package/src/runtime/supervisor.ts +444 -0
- package/src/session/authority.ts +168 -0
- package/src/session/checkpoint.ts +88 -1
- package/src/session/context-adapter.ts +251 -0
- package/src/session/context-assembly.ts +242 -0
- package/src/session/context-identity.ts +389 -0
- package/src/session/context-projection.ts +248 -0
- package/src/session/context-selector.ts +500 -0
- package/src/session/cross-session-adoption.ts +249 -0
- package/src/session/full-history-fold.ts +171 -0
- package/src/session/identity.ts +192 -0
- package/src/session/journal.ts +805 -102
- package/src/session/open-work-intent.ts +732 -0
- package/src/session/open-work.ts +767 -0
- package/src/session/pending-tools.ts +94 -0
- package/src/session/persistence.ts +3569 -127
- package/src/session/runtime-header.ts +208 -0
- package/src/session/shadow-git.ts +13 -5
- package/src/session/verification.ts +1623 -0
- package/src/task/assignment.ts +136 -0
- package/src/task/autonomous-adapter.ts +168 -0
- package/src/task/autonomous-context.ts +630 -0
- package/src/task/autonomous-policy.ts +490 -0
- package/src/task/continuity.ts +179 -0
- package/src/task/execution-cancellation.ts +165 -0
- package/src/task/graph-validate.ts +379 -0
- package/src/task/graph.ts +305 -0
- package/src/task/identity.ts +230 -0
- package/src/task/model.ts +417 -0
- package/src/task/production-scheduler.ts +293 -0
- package/src/task/readiness.ts +229 -0
- package/src/task/scheduler-observability.ts +387 -0
- package/src/task/scheduler.ts +1197 -0
- package/src/task/scheduling-policy.ts +165 -0
- package/src/task/session-authority.ts +148 -0
- package/src/task/session-ownership.ts +211 -0
- package/src/task/store.ts +2887 -0
- package/src/task/sync.ts +343 -0
- package/src/task/trigger.ts +260 -0
- package/src/tools/bash.ts +377 -211
- package/src/tools/code_run.ts +1 -1
- package/src/tools/delete_file.ts +1 -1
- package/src/tools/edit.ts +33 -6
- package/src/tools/evidence.ts +30 -0
- package/src/tools/git.ts +4 -4
- package/src/tools/glob.ts +12 -3
- package/src/tools/grep.ts +1 -1
- package/src/tools/lsp.ts +4 -4
- package/src/tools/mcp_call.ts +11 -4
- package/src/tools/memory.ts +153 -18
- package/src/tools/move_file.ts +1 -1
- package/src/tools/patch.ts +1 -1
- package/src/tools/read_file.ts +1 -1
- package/src/tools/read_image.ts +1 -1
- package/src/tools/submit_result.ts +1 -1
- package/src/tools/task.ts +437 -41
- package/src/tools/todo.ts +662 -35
- package/src/tools/web_fetch.ts +4 -2
- package/src/tools/web_search.ts +9 -3
- package/src/tools/write_file.ts +1 -1
- package/src/ui/assistant/simple.ts +123 -50
- package/src/ui/assistant/turn-status.ts +17 -3
- package/src/ui/contract.ts +184 -0
- package/src/ui/footer.ts +54 -18
- package/src/ui/i18n/en.ts +62 -6
- package/src/ui/i18n/id.ts +62 -6
- package/src/ui/input/prompt-engine.ts +120 -25
- package/src/ui/render/errors.ts +39 -1
- package/src/ui/render/markdown-table.ts +455 -0
- package/src/ui/render/markdown.ts +22 -1
- package/src/ui/render/table-grid.ts +184 -0
- package/src/ui/render/table.ts +15 -76
- package/src/ui/runtime/screen.ts +7 -2
- package/src/ui/runtime/statusline.ts +25 -6
- package/src/ui/tui/app.ts +598 -133
- package/src/ui/tui/transcript.ts +531 -89
- package/vendor/minicore/VENDOR.md +1 -1
- package/vendor/minicore/src/core/budget.ts +25 -25
- package/vendor/minicore/src/core/compact.ts +75 -75
- package/vendor/minicore/src/core/errors.ts +59 -59
- package/vendor/minicore/src/core/events.ts +73 -73
- package/vendor/minicore/src/core/executor.ts +139 -139
- package/vendor/minicore/src/core/history.ts +31 -31
- package/vendor/minicore/src/core/index.ts +41 -41
- package/vendor/minicore/src/core/loop.ts +355 -355
- package/vendor/minicore/src/core/permission.ts +22 -22
- package/vendor/minicore/src/core/provider.ts +39 -39
- package/vendor/minicore/src/core/recovery.ts +35 -35
- package/vendor/minicore/src/core/session.ts +327 -327
- package/vendor/minicore/src/core/snapshot.ts +146 -146
- package/vendor/minicore/src/core/tokens.ts +107 -107
- package/vendor/minicore/src/core/tool.ts +115 -115
- package/vendor/minicore/src/core/types.ts +50 -50
- package/vendor/minicore/src/providers/openai-compat.ts +417 -417
- package/AGENTS.md +0 -45
- package/PLAN.md +0 -491
- package/docs/ARCHITECTURE.html +0 -1248
- package/docs/CONTROL-PLANE-MAP.md +0 -139
- package/docs/HARNESS.md +0 -150
- package/docs/SUMMARY.md +0 -52
- package/docs/UI_RENDER_PIPELINE.md +0 -165
- package/docs/USAGE.md +0 -11
package/docs/cli.md
CHANGED
|
@@ -6,12 +6,13 @@ Semua cara menjalankan Minicode: interaktif, sekali jalan, pipe, dan otomasi CI
|
|
|
6
6
|
|
|
7
7
|
| Perintah | Fungsi |
|
|
8
8
|
|---|---|
|
|
9
|
-
| `minicode` | Mode interaktif (
|
|
9
|
+
| `minicode` | Mode interaktif (TUI fullscreen) + wizard bila belum ada provider |
|
|
10
10
|
| `minicode "prompt"` | Sekali jalan (headless) |
|
|
11
11
|
| `echo "prompt" \| minicode` | Via pipe |
|
|
12
12
|
| `minicode exec "prompt" [--json]` | Headless CI — event JSONL + baris `{"type":"summary"}` di stdout |
|
|
13
13
|
| `minicode acp` | Server JSON-RPC stdio untuk IDE (subset minimal: initialize/run/cancel/shutdown) |
|
|
14
|
-
| `minicode
|
|
14
|
+
| `minicode daemon <start\|status\|stop\|issue\|sessions>` | Daemon lokal: host proses, status, hentikan, terbitkan perintah, daftar sesi anak |
|
|
15
|
+
| `minicode --interactive` | Paksa TUI interaktif |
|
|
15
16
|
| `minicode --provider <id> "prompt"` | Paksa provider agnostik tanpa ubah config (atau `provider::model`) |
|
|
16
17
|
| `minicode config add --baseUrl <url> --apiKey <key>` | Tambah provider LLM |
|
|
17
18
|
| `minicode config mcp add <id> --command <cmd> --args "<a1,a2>"` | Daftarkan MCP server stdio |
|
|
@@ -26,7 +27,7 @@ Semua cara menjalankan Minicode: interaktif, sekali jalan, pipe, dan otomasi CI
|
|
|
26
27
|
| `minicode doctor [--json]` | Diagnosis lokal |
|
|
27
28
|
| `minicode mcp serve` | Ekspos minicode sebagai MCP server |
|
|
28
29
|
|
|
29
|
-
Subcommand di-route di `cli/router.ts` (`stats`, `sessions`, `mcp`, `config`, `skills`, `providers`, `auth`, `pricing`, `exec`, `memory`, `doctor`, `acp`).
|
|
30
|
+
Subcommand di-route di `cli/router.ts` (`stats`, `sessions`, `mcp`, `config`, `skills`, `providers`/`models`/`sync`, `auth`, `pricing`, `exec`, `daemon`, `memory`, `doctor`, `acp`).
|
|
30
31
|
|
|
31
32
|
## Flags
|
|
32
33
|
|
|
@@ -54,8 +55,11 @@ Subcommand di-route di `cli/router.ts` (`stats`, `sessions`, `mcp`, `config`, `s
|
|
|
54
55
|
| `--max-steps <n>` | Batas langkah tool (default 50) |
|
|
55
56
|
| `--context-window <n>` | Ukuran jendela konteks (token) |
|
|
56
57
|
| `--session <id>` | ID sesi (default random, disanitasi) |
|
|
58
|
+
| `--work-mode <m>` | `DISCUSS` \| `PLAN` \| `EXECUTE` (default). **Lapis intent di atas** permission mode: `DISCUSS` = read-only penuh, `PLAN` = hanya tool rencana, `EXECUTE` = tanpa ceiling tambahan. Tidak pernah memperluas kewenangan permission mode; permission mode tetap yang memutuskan allow/deny per tool. Lihat [TUI](repl.md) untuk `/work-mode` (aksi operator saat sesi berjalan) |
|
|
59
|
+
| `--enable-scheduler` | Opt-in scheduler otonom (default **off**). Tanpa flag ini, scheduler tidak dibangun sama sekali dan `/scheduler` menjawab "not enabled". Eksekusi manual saja lewat `/scheduler run` — tidak ada timer; turn otonom bersifat read-only. Lihat `/scheduler status` dan `/scheduler stop` |
|
|
60
|
+
| `--runtime <mode>` | `off` (default) \| `constructed` \| `owned`. Arsitektur eksekusi: `off` = perilaku sekarang, tak berubah; `constructed` = runtime + jurnal durable dibangun, turn masih jalan jalur lama; `owned` = setiap turn di-admit lewat runtime (kernel + jurnal durable) dan admission yang ditolak menjalankan tak apa pun. Nilai tak dikenal = `off` |
|
|
57
61
|
|
|
58
|
-
Di
|
|
62
|
+
Di TUI, **Shift+Tab** memutar permission (`auto` → `ask` → `plan` → `allowlist`) dan benar-benar mengubah keputusan, bukan label. Di baris kosong, **Tab** juga memutar mode (`auto` → `ask` → `plan` → `allowlist`). Shift+Tab **tidak** memutar WorkMode — itu lapis intent terpisah (`/work-mode`).
|
|
59
63
|
|
|
60
64
|
## Kapan memakai apa
|
|
61
65
|
|
|
@@ -117,7 +121,7 @@ itu MCP server lokal tidak di-spawn, endpoint provider lokal tidak dipakai,
|
|
|
117
121
|
|
|
118
122
|
## Anti-injeksi flag
|
|
119
123
|
|
|
120
|
-
`cli/args.ts:
|
|
124
|
+
`cli/args.ts:59-67` berhenti di prompt word pertama: prompt `"review --allow-all"` tidak mengaktifkan flag. `--cwd`/value-flag setelah nama subcommand diparse per-subcommand agar tidak menembus boundary prompt.
|
|
121
125
|
|
|
122
126
|
## Exit codes
|
|
123
127
|
|
package/docs/concepts.md
CHANGED
|
@@ -6,7 +6,7 @@ Minicode itu apa, kenapa dibangun begitu, dan kenapa beberapa hal sengaja tidak
|
|
|
6
6
|
|
|
7
7
|
| Nama | Apa |
|
|
8
8
|
|---|---|
|
|
9
|
-
| **MiniCore** | Kernel runtime `STATE / MODEL / ACTION / LOOP`. Inti di-freeze, zero-dependency, di-vendor ke `vendor/minicore` (
|
|
9
|
+
| **MiniCore** | Kernel runtime `STATE / MODEL / ACTION / LOOP`. Inti di-freeze, zero-dependency, di-vendor ke `vendor/minicore` (isi, jumlah file, dan hash dicatat di `vendor/minicore/VENDOR.md`). Bukan dependency — di-resolve lewat subpath imports `#minicore` |
|
|
10
10
|
| **Minicode** | Layer agencode di atasnya: tools, sub-agents, skills, hooks, policy/sandbox, providers, MCP/LSP, memory, sessions, repo-map, verifier, CLI shell-first |
|
|
11
11
|
|
|
12
12
|
|
package/docs/contributing.md
CHANGED
|
@@ -33,7 +33,7 @@ Catatan instalasi dev:
|
|
|
33
33
|
bun x tsc --noEmit && bun run lint && bun test && bun run gate:coverage && bun run gate:pack
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Coverage naik → naikkan minimum di `scripts/coverage-gate.ts` (
|
|
36
|
+
Coverage naik → naikkan minimum di `scripts/coverage-gate.ts` (per 2026-10-25: **87 funcs / 86 lines** + 19 lantai per-berkas modul kritis; funcs dinaikkan 86 → 87 pada P13.5). Ambang coverage dikunci ke suite CEPAT (`bun test` di CI); gerbang lambat/stokastik tak boleh menaikkan ambang.
|
|
37
37
|
|
|
38
38
|
## Gate cepat vs lambat (F4.2)
|
|
39
39
|
|
|
@@ -44,6 +44,12 @@ bun run gate:slow # extreme fuzz + shadow-git stress + MCP adversarial (nightl
|
|
|
44
44
|
|
|
45
45
|
Lambat/stokastik (fuzz multi-seed, stress, docker) tinggal di `slow.yml` — kegagalannya sinyal investigasi, bukan penolakan PR. CI per-commit (`ci.yml`) hanya menjalankan yang deterministik.
|
|
46
46
|
|
|
47
|
+
### Budget ukuran paket (3,5 MiB)
|
|
48
|
+
|
|
49
|
+
`bun run gate:pack` mengukur ukuran tarball (`npm pack --dry-run`, KiB) dan menolak bila **melebihi 3.584 KiB (3,5 MiB)**. Angka tunggalnya ada di `scripts/pack-budget.ts` — satu sumber untuk gate dan tes, jadi keduanya tak bisa menyimpang. Batas ini **alarm regresi** (menangkap `node_modules`/`test` ikut terbawa), bukan target ukuran yang perlu dikejar.
|
|
50
|
+
|
|
51
|
+
Re-baseline dari 2,25 MiB disetujui owner (Quality Remediation Stage 8.1) karena batas lama ditetapkan saat payload runtime repo ±1.605 KiB, sedangkan sekarang runtime saja ±2.788 KiB — pertumbuhan itu fitur sah, bukan modul tak terjangkau (modul yang dipack tapi tak terjangkau dari entry point = 0). Saat runtime tumbuh melewati batas, **jangan** menaikkan lagi tanpa bukti baru + persetujuan owner: hitung dulu payload runtime (`git ls-tree -r -l HEAD -- src cli vendor`) dan bandwidth non-runtime yang bisa dipangkas (dokumen di luar closure tautan, `PLAN.md`/`AGENTS.md`), lalu usulkan angka barunya ke owner.
|
|
52
|
+
|
|
47
53
|
Gerbang lain:
|
|
48
54
|
|
|
49
55
|
```bash
|
|
@@ -73,7 +79,8 @@ bun run vendor:check # vendor/minicore sinkron dengan ../minicore
|
|
|
73
79
|
- Lebar terminal = kolom, bukan karakter: pakai `displayWidth` dkk. dari `src/ui/render/width.ts` (CJK/emoji = 2 kolom).
|
|
74
80
|
- Teks model/tool/berkas = input tak tepercaya: `sanitizeAnsi` dulu.
|
|
75
81
|
- `cwd` tool dari `ToolContext.cwd`, bukan `process.cwd()`.
|
|
76
|
-
- Line ending LF, encoding UTF-8 tanpa BOM, format `biome` (2 spasi, 100 kolom, double quotes). `bun run lint
|
|
82
|
+
- Line ending LF, encoding UTF-8 tanpa BOM, format `biome` (2 spasi, 100 kolom, double quotes). `bun run format` lalu `bun run lint` sebelum commit.
|
|
83
|
+
- **Line ending = LF di seluruh lapisan**: blob yang di-commit selalu LF (`.gitattributes`: `*.ts text eol=lf`), formatter meminta LF (`biome.json`: `lineEnding: "lf"`), dan editor menulis LF (`.editorconfig`: `end_of_line = lf`). Working tree pun harus LF: di Windows dengan `core.autocrlf=true`, checkout lama bisa meninggalkan CRLF yang **tidak terlihat oleh `git diff`** (perbandingan git menormalisasi) tapi **terlihat oleh `biome check`** sebagai hundreds of diagnostic format. `git checkout-index -f`/`git clone` baru mengembalikan working tree LF. `test/helpers/source-eol.ts` menormalkan EOL untuk assertion semantik, bukan untuk menutupi masalah git.
|
|
77
84
|
- Angka mesin jangan ditulis di markdown (biarkan CI/perintah yang menghasilkannya). Bila temukan angka usang, koreksi + sebutkan koreksinya.
|
|
78
85
|
- Test: tiap fix security/correctness bawa regression test yang **gagal di kode lama**. Tool dua jalur (mis. `grep`) diuji kedua jalurnya. Fuzz `prompt-engine` via `test/fuzz-prompt.test.ts`.
|
|
79
86
|
- Jangan commit kecuali diminta; jangan pernah commit rahasia. Sebelum commit: `git status`, `git diff`, `git log --oneline -10`; stage hanya yang dimaksud.
|
package/docs/environment.md
CHANGED
|
@@ -15,11 +15,13 @@ Variabel yang paling menentukan perilaku (sisanya referensi di bawah):
|
|
|
15
15
|
| `MINICODE_PLAN` | `1` → mode plan (tanpa `--plan`) |
|
|
16
16
|
| `MINICODE_PERMISSION` | `allowlist` → mode permission |
|
|
17
17
|
| `MINICODE_TOOL_SCOPE` | `explore` → subset read-only 12 tool (sama `--tool-scope explore`) |
|
|
18
|
+
| `MINICODE_WORK_MODE` | `DISCUSS` \| `PLAN` \| `EXECUTE` → work mode (lapis intent di atas permission mode; sama `--work-mode`; flag menang atas env; nilai tak dikenal = EXECUTE) |
|
|
18
19
|
| `MINICODE_HOOKS` | `1` → jalankan hook `pre/post-run` dari `~/.minicode/hooks/*.js` & `.minicode/hooks/*.js` (konteks di env `MINICODE_HOOK_CTX`; env hook disanitasi tanpa secret; dilewati bila sesi dibatalkan) |
|
|
19
20
|
| `MINICODE_SESSION_TTL_DAYS` | TTL sesi (default 30; `0` = selamanya) |
|
|
20
21
|
| `MINICODE_HOME` | Override home untuk DB lokal/global (sessions + vector); default `~` |
|
|
21
22
|
| `MINICODE_TELEMETRY` | `0`/`false`/`off` → matikan penulisan traces.jsonl |
|
|
22
23
|
| `MINICODE_VERIFY_CMD` | Custom verify command (ganti `detectVerifyCommand`) |
|
|
24
|
+
| `MINICODE_ACE_ENABLED` | `0`/`false`/`off`/`no` → nonaktifkan ACE-Lite consequence engine (rollback instan ke baseline murni, tanpa self-heal loop). Default `true`. Hard-safety/tamper-guard & permission policy TETAP aktif — sakelar ini hanya mematikan evaluasi consequence, bukan batas keamanan |
|
|
23
25
|
| `MINICODE_BASH_ALLOWLIST` | Kustom allowlist bash (koma-pisah, ganti DEFAULT) |
|
|
24
26
|
|
|
25
27
|
## Bahasa, diagnosis & kunci
|
|
@@ -30,7 +32,7 @@ Variabel yang paling menentukan perilaku (sisanya referensi di bawah):
|
|
|
30
32
|
| `MINICODE_DEBUG_STARTUP` | `1` → cetak durasi tiap tahap setup sesi ke stderr (diagnosis startup lambat; diagnostik saja, bukan perilaku) |
|
|
31
33
|
| `MINICODE_MINIMIZE_ANSWER` | set (nilai apa pun) → JANGAN auto-minimize section jawaban model (nilai unset = minimize default) |
|
|
32
34
|
| `MINICODE_KEYSTORE_DISABLE` | `1` → matikan keystore OS seluruhnya (jatuh ke penyimpanan file; untuk CI/headless yang tak punya keychain/DPAPI) |
|
|
33
|
-
| `MINICODE_KEYSTORE_FORCE_DPAPI` |
|
|
35
|
+
| `MINICODE_KEYSTORE_FORCE_DPAPI` | `1`/`true` → paksa jalur DPAPI/Windows walau di non-Windows (khusus test portabilitas; bukan konfigurasi produksi) |
|
|
34
36
|
| `MINICODE_MINIMIZE_TOOL` | set (nilai apa pun) → JANGAN auto-minimize section tool di TUI (nilai unset = minimize default) |
|
|
35
37
|
|
|
36
38
|
## Sandbox
|
|
@@ -61,6 +63,7 @@ Variabel yang paling menentukan perilaku (sisanya referensi di bawah):
|
|
|
61
63
|
| Variabel | Fungsi |
|
|
62
64
|
|---|---|
|
|
63
65
|
| `MINICODE_BUDGET_STRICT` | `1` → penegasan eksplisit fail-closed (cost tak dikenal + pemakaian = over; kini juga default `--budget`) |
|
|
66
|
+
| `MINICODE_MAX_TURNS` | Batas keras maksimum jumlah turn per sesi (termasuk carry-forward lintas `--resume`; bilangan ≥1) |
|
|
64
67
|
| `MINICODE_ALLOW_LOCAL_CONFIG` | `1` → percayai config lokal workspace (default: diabaikan) |
|
|
65
68
|
|
|
66
69
|
## Terminal & aksesibilitas
|
|
@@ -68,9 +71,10 @@ Variabel yang paling menentukan perilaku (sisanya referensi di bawah):
|
|
|
68
71
|
| Variabel | Fungsi |
|
|
69
72
|
|---|---|
|
|
70
73
|
| `MINICODE_ASCII` | `1` → paksa glyph ASCII (`[OK]`, `>`, `.`) untuk konsol tanpa UTF-8 |
|
|
71
|
-
| `MINICODE_COMPACT` | `1` → tool call ringkas, `0` → expanded. Default: compact di
|
|
74
|
+
| `MINICODE_COMPACT` | `1` → tool call ringkas, `0` → expanded. Default: compact di TUI, expanded di one-shot/exec (juga `/compact`, Ctrl+O) |
|
|
72
75
|
| `MINICODE_JUSTIFY` | `0` → matikan rata kanan-kiri pada keluaran teks model |
|
|
73
76
|
| `MINICODE_DROPDOWN` | `0` → matikan floating dropdown, pakai hint inline (konsol legacy) |
|
|
77
|
+
| `MINICODE_MOUSE_SELECTION` | `0`/`false`/`off`/`no` → matikan mouse tracking TUI; default `1` untuk drag selection + wheel |
|
|
74
78
|
| `MINICODE_MOTION` | `0` → matikan animasi status (pulse spark saat turn berjalan jadi glyph statis) — aksesibilitas/rekaman layar/SSH lambat |
|
|
75
79
|
| `MINICODE_BELL` | `0` → matikan bell `\x07` saat approval (aksesibilitas) |
|
|
76
80
|
| `MINICODE_STATUSLINE` | `rich` → statusline turn menampilkan token kumulatif + biaya sesi (default hemat) |
|
package/docs/exec.md
CHANGED
|
@@ -6,9 +6,48 @@
|
|
|
6
6
|
|---|---|
|
|
7
7
|
| `minicode "prompt"` | Sekali jalan; output teks model + ledger ke terminal |
|
|
8
8
|
| `echo "prompt" \| minicode` | Prompt datang dari pipeline/another tool |
|
|
9
|
-
| `minicode exec "prompt" --json` | CI:
|
|
9
|
+
| `minicode exec "prompt" --json` | CI: envelope `minicode.output.v1` JSONL di stdout + baris terakhir `{"type":"summary"}` berversi |
|
|
10
10
|
|
|
11
|
-
`exec --json` memancarkan satu JSON per event (langkah tool, output, error) dan **summary** terstruktur di akhir — cukup untuk diparse pipeline tanpa screen-scraping. Kegagalan *setup* (mis. tanpa provider) pun membawa satu baris `{"type":"summary","ok":false,…}` di stdout — stream tak pernah kosong; pesan manusia tetap di stderr, exit `1`.
|
|
11
|
+
`exec --json` memancarkan satu JSON per event lifecycle kanonik (langkah tool, output, error) dengan envelope `minicode.output.v1` (`eventId`, `timestamp`, `sessionId`, `turnId`, `correlationId`, `severity`, `status`, `payload`) dan **summary** terstruktur berversi di akhir — cukup untuk diparse pipeline tanpa screen-scraping. Kegagalan *setup* (mis. tanpa provider) pun membawa satu baris `{"type":"summary","ok":false,…}` di stdout — stream tak pernah kosong; pesan manusia tetap di stderr, exit `1`. Teks model mengalir sebagai record `{type:"text",delta}` terpisah yang sudah di-scrub dan bebas ANSI.
|
|
12
|
+
|
|
13
|
+
## Ringkasan mesin: field opsional `verify`
|
|
14
|
+
|
|
15
|
+
Summary **sukses** `exec --json` dapat membawa hasil verifikasi terakhir (opt-in
|
|
16
|
+
`--verify`) sebagai field opsional:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"schema": "minicode.output.v1",
|
|
21
|
+
"type": "summary",
|
|
22
|
+
"ok": true,
|
|
23
|
+
"verify": { "active": true, "ok": false, "command": "bun run lint" }
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- `verify` muncul **hanya pada success summary** dan **hanya bila verifikasi
|
|
28
|
+
benar-benar dijalankan** pada run ini; tanpa `--verify` (atau tanpa perintah
|
|
29
|
+
verify efektif) kuncinya **absen** dari summary (bukan `null`).
|
|
30
|
+
- `verify.ok` menyatakan hasil verifikasi operator (lulus/gagal) dan **bukan**
|
|
31
|
+
pengganti top-level `ok`. Keduanya independen: summary dapat `"ok":true`
|
|
32
|
+
(exit `0`) meski `verify.ok:false`.
|
|
33
|
+
- `verify.command` = perintah verifikasi yang diotorisasi operator
|
|
34
|
+
(`MINICODE_VERIFY_CMD`, config, atau hasil deteksi) — bukan output verifier.
|
|
35
|
+
|
|
36
|
+
**Failure summary tidak menyertakan `verify`.** Saat proses gagal (mis. budget
|
|
37
|
+
habis, writer basi, error penghenti) — **termasuk bila verifikasi sudah berjalan
|
|
38
|
+
sebelum kegagalan** — record terminal memakai error envelope yang telah
|
|
39
|
+
ditentukan (`schema`, `type`, `ok:false`, `error`, `prompt`) dan tidak membawa
|
|
40
|
+
field `verify`. Hasil verifikasi terakhir **tidak dapat diandalkan** lewat
|
|
41
|
+
summary pada jalur ini karena field-nya memang tidak ada.
|
|
42
|
+
|
|
43
|
+
Perbedaan sukses/gagal ini adalah **kontrak saat ini yang sengaja diterima
|
|
44
|
+
untuk P11** (keputusan pemilik atas temuan N-1): implementasi dan bentuk output
|
|
45
|
+
tidak diubah, hanya dinyatakan eksplisit di dokumentasi. Ini **bukan** jaminan
|
|
46
|
+
desain permanen — perluasan `verify` ke failure summary (memuat hasil
|
|
47
|
+
verifikasi yang sudah berjalan beserta tes kontraknya) memerlukan keputusan
|
|
48
|
+
protokol tersendiri di luar P11. Cakupan bukti: kombinasi "verifikasi sudah
|
|
49
|
+
berjalan lalu proses gagal" **tidak** diklaim telah diuji pada seluruh jalur
|
|
50
|
+
kegagalan.
|
|
12
51
|
|
|
13
52
|
## Server JSON-RPC untuk IDE: `minicode acp`
|
|
14
53
|
|
|
@@ -17,7 +56,7 @@
|
|
|
17
56
|
| Method | Params | Balasan |
|
|
18
57
|
|---|---|---|
|
|
19
58
|
| `initialize` | `{client}` | `{server:"minicode-acp", capabilities:{run, streamText, cancel, approval:"deny-headless"}}` |
|
|
20
|
-
| `run` | `{prompt*, cwd?, model?, maxSteps?, timeoutMs?, budget?, mode:"auto"\|"plan"}` | notifikasi `
|
|
59
|
+
| `run` | `{prompt*, cwd?, model?, maxSteps?, timeoutMs?, budget?, mode:"auto"\|"plan"}` | notifikasi lifecycle (`turn.*`, `tool.*`, `approval.*`, `file.changed`, `test.completed`, `diagnostic.raised`, `checkpoint.created`, `plan.updated`, `finding.detected`, `result.produced`, `context.compacted`) + `{type:"text",delta}`, lalu `{ok,tokens,steps,turns,text}` atau `{error}` (`{type:"tool",name}` hanya legacy bila lifecycle absen) |
|
|
21
60
|
| `cancel` | — | `{cancelled:true/false}` (menggugurkan run berjalan) |
|
|
22
61
|
| `shutdown` | — | keluar 0 |
|
|
23
62
|
|
|
@@ -29,7 +68,9 @@ printf '%s\n' '{"id":1,"method":"initialize"}' '{"id":2,"method":"shutdown"}' |
|
|
|
29
68
|
|
|
30
69
|
## Hasil terstruktur: `submit_result`
|
|
31
70
|
|
|
32
|
-
Tool `submit_result` menghasilkan JSON akhir terstruktur, dipanggil paling banyak 1× per run, dengan mode `NO_PROMPT` (tidak minta konfirmasi). Di `exec --json`, isi hasil diteruskan **verbatim** — pengganti `response_format` ala API. Cocok untuk tugas yang hasilnya dikonsumsi program lain, bukan manusia.
|
|
71
|
+
Tool `submit_result` menghasilkan JSON akhir terstruktur, dipanggil paling banyak 1× per run, dengan mode `NO_PROMPT` (tidak minta konfirmasi). Di `exec --json`, isi hasil diteruskan **verbatim** — pengganti `response_format` ala API. Bila `result.findings` berisi daftar eksplisit `{category, severity, summary, evidence?}`, temuan tersebut juga diproyeksikan sebagai event `finding.detected`. Cocok untuk tugas yang hasilnya dikonsumsi program lain, bukan manusia.
|
|
72
|
+
|
|
73
|
+
Mode `--json` menulis envelope `minicode.output.v1` untuk lifecycle kanonik (`eventId`, `timestamp`, `sessionId`, `turnId`, `correlationId`, `severity`, `status`, `payload`) dan record terminal `summary` berversi (`error` = `{category, message, action?}`); teks model tetap record `{type:"text",delta}` terpisah. Setup failure selalu membawa satu baris summary `ok:false`.
|
|
33
74
|
|
|
34
75
|
## Klarifikasi mid-run: `ask_user`
|
|
35
76
|
|
|
@@ -42,7 +83,7 @@ Tool `submit_result` menghasilkan JSON akhir terstruktur, dipanggil paling banya
|
|
|
42
83
|
| `--max-steps <n>` | 50 | Batas langkah tool per run |
|
|
43
84
|
| `--timeout <ms>` | 900000 (15 menit) | Hard deadline per run; `0` = Infinity |
|
|
44
85
|
| `--ratelimit <rpm>` | — | Token bucket request LLM per menit |
|
|
45
|
-
| `--budget <usd>` | — | Warn 80%; lewat → one-shot `exit(1)`,
|
|
86
|
+
| `--budget <usd>` | — | Warn 80%; lewat → one-shot `exit(1)`, TUI break loop; `exec` menegakkan sama seperti one-shot |
|
|
46
87
|
|
|
47
88
|
`MINICODE_TIMEOUT_MS` mengisi default bila `--timeout` tidak diset.
|
|
48
89
|
|
package/docs/memory-sessions.md
CHANGED
|
@@ -23,6 +23,8 @@ Embedding: default `text-embedding-3-small` (`MINICODE_EMBED_MODEL`). Dim-mismat
|
|
|
23
23
|
|
|
24
24
|
Sesi di `.minicode/sessions.db` (WAL, capped + busy-retry async). `--resume <id>` melanjutkan full history (termasuk `toolCallId`/`name`); workspace dibandingkan ke checkpoint terakhir dan divergensi dilaporkan (bukan replay buta). TTL 30 hari (`MINICODE_SESSION_TTL_DAYS=0` = selamanya). `minicode sessions purge` hapus manual. Branch via `branchSession` (fork history+turns).
|
|
25
25
|
|
|
26
|
+
Satu penulis per sesi (P2.2): komposisi mengakuisisi lease otoritas (`tasks.db: session_authority`) saat start dan melepasnya saat close; proses kedua pada sesi yang sama ditolak (`REFUSED_LEASE_HELD`). Setiap mutasi sesi membawa `writer_epoch` yang di-CAS di dalam transaksi SQLite yang sama — penulis basi setelah takeover ditolak (`REFUSED_STALE_EPOCH`), tanpa tulis parsial. Tiga konsep tetap berbeda: **lease** = admission (boleh menulis), **writer_epoch** = pagar mutasi (tulisan ini masih sah), **incarnation** = generasi identitas lintas delete/recreate.
|
|
27
|
+
|
|
26
28
|
## Checkpoint & Undo
|
|
27
29
|
|
|
28
30
|
Setiap turn otomatis checkpoint. Dua mode otomatis:
|
package/docs/policy-sandbox.md
CHANGED
|
@@ -10,7 +10,7 @@ Siapa boleh apa: enam mode izin, penjaga perintah shell, dan isolasi eksekusi
|
|
|
10
10
|
|---|---|
|
|
11
11
|
| `auto` | Readonly + gated-prompt + file/internal-write allow; `code_run`/`bash` dengan guard. `delegate_task`/`mcp_call`/semua MCP bertitik di-gate (prompt saat TTY, tolak tanpa TTY) |
|
|
12
12
|
| `ask` | Readonly + `NO_PROMPT_TOOLS` auto-allow; sisanya prompt/TTY + allowlist persist |
|
|
13
|
-
| `readonly` |
|
|
13
|
+
| `readonly` | Gerbang izin: 18 tool `READONLY_TOOLS`. Visibilitas: model hanya melihat 12 tool baca (`EXPLORE_TOOL_NAMES`) |
|
|
14
14
|
| `plan` | `readonly` + `todo_write` + `delegate_task` (anak dipaksa explore/read-only) + `submit_result`. Tetap tanpa mutasi file/git/memory |
|
|
15
15
|
| `allowlist` | Bash hanya pola `DEFAULT_BASH_ALLOWLIST`/env; file-write/internal-write sesuai set. Diwariskan ke sub-agent (parent allowlist → anak allowlist, bukan auto) |
|
|
16
16
|
| `allow-all` | Allow semua; **tetap** tolak bash berbahaya + path jail tetap aktif |
|
package/docs/pricing-budget.md
CHANGED
|
@@ -26,7 +26,7 @@ minicode --budget 0.05 --budget-strict "task ketat"
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
- Peringatan kuning 80%.
|
|
29
|
-
- Lewat budget: one-shot `exit(1)`,
|
|
29
|
+
- Lewat budget: one-shot `exit(1)`, TUI `break` loop, `exec` menegakkan sama seperti one-shot (pernah ada bug `exec` mengabaikan `--budget`, sudah diperbaiki).
|
|
30
30
|
- Pagu juga diputus MID-TURN: watcher biaya live (`watchBudgetLimit` di `cli/setup.ts`) menggugurkan turn yang sedang berjalan begitu lewat — dulu tool loop / siklus self-heal bisa belanja tanpa batas dalam satu turn. Abort budget membawa identitas kind `budget_exceeded` (bukan `aborted` generik) agar terbedakan dari Ctrl+C user.
|
|
31
31
|
- Cost tak dikenal (model tanpa harga) + ADA pemakaian = fail-closed secara DEFAULT: dianggap over budget, bukan diabaikan (dulu hanya di `--budget-strict`; perilaku lama membuat `--budget` diam-diam mati untuk model baru). Nol token (belum belanja, mis. pre-check prompt baru) tetap lolos.
|
|
32
32
|
- `--budget-strict` / `MINICODE_BUDGET_STRICT=1` = penegasan eksplisit perilaku fail-closed di atas (back-compat; perilaku sama dengan default).
|
package/docs/quickstart.md
CHANGED
|
@@ -32,7 +32,7 @@ minicode --interactive
|
|
|
32
32
|
# minicode › jelaskan isi src/tools/index.ts
|
|
33
33
|
# /model → picker provider::model, Enter = pilih + atur effort
|
|
34
34
|
# /status → token + biaya kumulatif sesi
|
|
35
|
-
# /exit → keluar (
|
|
35
|
+
# /exit → keluar (Esc ganda saat abort juga bisa)
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## 3. Verify otomatis (2 menit)
|
|
@@ -56,5 +56,5 @@ minicode "/review src/a.ts" # skill slash-command
|
|
|
56
56
|
## Berikutnya
|
|
57
57
|
|
|
58
58
|
- [CLI](cli.md) untuk semua mode + flags.
|
|
59
|
-
- [
|
|
59
|
+
- [TUI](repl.md) untuk slash command dan keyboard.
|
|
60
60
|
- [Config & Provider](config-providers.md) untuk pindah gateway dan model.
|
package/docs/repl.md
CHANGED
|
@@ -23,13 +23,15 @@ en. `/lang` tanpa argumen = tampilkan aktif. Semua string lewat kamus i18n
|
|
|
23
23
|
| `/sessions` | Tanpa argumen = popup picker resume; `/sessions <id>` = langsung resume |
|
|
24
24
|
| `/status` | Runtime + pemakaian & biaya **kumulatif sesi** |
|
|
25
25
|
| `/mode [nama]` | Ganti permission (`auto`, `ask`, `plan`, `allowlist`); tanpa argumen = putar |
|
|
26
|
+
| `/work-mode [DISCUSS\|PLAN\|EXECUTE]` | WorkMode = **lapis intent di atas** permission mode: `DISCUSS` read-only penuh, `PLAN` ceiling rencana, `EXECUTE` tanpa ceiling tambahan. Tanpa argumen = tampilkan mode aktif + usage; nilai invalid ditolak dan mode aktif tidak berubah. Terpisah dari `/mode` dan dari Tab/Shift+Tab (keduanya khusus permission mode). Di footer tampil `PLAN·auto` dsb. hanya saat WorkMode ≠ `EXECUTE`. |
|
|
26
27
|
| `/lang [en|id]` | Bahasa UI; tanpa argumen = tampilkan aktif |
|
|
27
28
|
| `/init` | Buat `AGENTS.md` proyek ini |
|
|
28
|
-
| `/copy` | Salin
|
|
29
|
+
| `/copy [n]` | Salin `n` turn terakhir (default `1`, maksimal `10`) via OSC 52 |
|
|
29
30
|
| `/clear` | Kosongkan transkrip (viewport kembali kosong) |
|
|
30
31
|
| `/expand` | Buka isi tool/thinking yang disembunyikan ledger compact (sekali ambil habis) |
|
|
31
32
|
| `/history` | 20 entri prompt terakhir |
|
|
32
33
|
| `/exit` | Keluar (satu-satunya jalan keluar; `/quit` alias) |
|
|
34
|
+
| `/scheduler [status\|run\|stop]` | Kendali Scheduler produksi. **Nonaktif secara bawaan** di setiap sesi (perlu flag `--enable-scheduler`); tanpa flag, perintahnya menjawab "not enabled". Tetap tampil di `/help` supaya operator yang mengaktifkan flag bisa menemukannya. |
|
|
33
35
|
|
|
34
36
|
Alias (jalan, tidak diiklankan di `/help`): `/models` → `/model`, `/providers` → `/provider`, `/usage` & `/cost` → `/status`, `/resume [id]` → `/sessions [id]`, `/compact`, `/thinking`, `/minimize`, `/quit`.
|
|
35
37
|
|
|
@@ -43,6 +45,8 @@ Did-you-mean: typo `/sessoons` → `Did you mean /sessions?` (jarak ≤ 2).
|
|
|
43
45
|
| `tab` / `shift+tab` | Putar mode izin (di form: pindah field) |
|
|
44
46
|
| `↑` / `↓` | Riwayat prompt, atau navigasi item di picker/manager/form |
|
|
45
47
|
| `pgup` / `pgdn` | Gulir transkrip satu halaman; dengan `shift`: setengah halaman (di picker/manager: gulir daftar) |
|
|
48
|
+
| `mouse drag` | Select teks transkrip; `Ctrl+C` menyalin selection app-level |
|
|
49
|
+
| `mouse wheel` | Gulir transkrip; klik prompt memindahkan kursor |
|
|
46
50
|
| `home` / `end` | Awal/akhir baris; saat baris kosong tanpa dropdown: lompat ke atas transkrip / kembali ke ekor (di picker/manager: lompat atas/bawah daftar) |
|
|
47
51
|
| `←` / `→` | Geser kursor (di form select/confirm: ganti opsi/nilai) |
|
|
48
52
|
| `ctrl+a` / `ctrl+e` | Awal / akhir baris |
|
|
@@ -54,7 +58,7 @@ Did-you-mean: typo `/sessoons` → `Did you mean /sessions?` (jarak ≤ 2).
|
|
|
54
58
|
| `ctrl+o` | Putar tool call compact/expanded (juga `/compact`) |
|
|
55
59
|
| `ctrl+t` | Toggle tampilan thinking expanded/minimized (juga `/thinking`) |
|
|
56
60
|
| `esc` | Tutup dropdown/picker; dua-tahap di form (tekan-1 bersihkan field, tekan-2 batal); busy = batalkan turn |
|
|
57
|
-
| `ctrl+c` |
|
|
61
|
+
| `ctrl+c` | Batalkan input/prompt; pada turn TUI gunakan `Esc` untuk abort |
|
|
58
62
|
| `ctrl+d` | Keluar saat baris kosong; busy = abaikan |
|
|
59
63
|
|
|
60
64
|
## Aturan konsistensi (kontrak I25)
|
package/docs/security-model.md
CHANGED
|
@@ -29,7 +29,7 @@ Permission → Jail → Bash Guard → Argument Validation → Executor → Jour
|
|
|
29
29
|
|---|---|---|---|
|
|
30
30
|
| `auto` (default) | Baca + tulis file terjail + bash aman + memori/todo | Gated tools tanpa persetujuan | Sekali per tool gated (TTY); non-TTY = tolak |
|
|
31
31
|
| `ask` | Sama seperti `auto` | Tanpa jawaban allow | Tiap tool non-sepele |
|
|
32
|
-
| `readonly` | 18 tool baca | Mutasi apa pun, bash, commit, delegasi | Tidak perlu (tak ada efek) |
|
|
32
|
+
| `readonly` | 18 tool baca di gerbang izin (model melihat 12) | Mutasi apa pun, bash, commit, delegasi | Tidak perlu (tak ada efek) |
|
|
33
33
|
| `plan` | Baca + `todo_write` + `delegate_task` (anak dipaksa read-only) + `submit_result` | Tulis file, bash, git, memori | Tidak perlu |
|
|
34
34
|
| `allowlist` | Bash pola aman + tulis terjail | Shell di luar pola, tool gated | Tidak perlu |
|
|
35
35
|
| `allow-all` | Semua tool | Bash berbahaya, path di luar jail | Tidak perlu |
|
package/docs/security.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## 6 permission mode
|
|
11
11
|
|
|
12
|
-
`auto` (default) · `readonly` (18 tool read-only) · `plan` (readonly + todo + delegate read-only) · `allowlist` (bash pola aman) · `ask` (prompt tiap tool) · `allow-all` (semua — tetap tolak bash berbahaya, path jail tetap aktif). Putar via Shift+Tab (siklus 5: `allow-all` dilewati), `/mode`, atau flag `--plan/--allowlist/--ask/--allow-all`. Detail per mode di [Policy & Sandbox](policy-sandbox.md).
|
|
12
|
+
`auto` (default) · `readonly` (18 tool read-only di gerbang izin; model melihat 12) · `plan` (readonly + todo + delegate read-only) · `allowlist` (bash pola aman) · `ask` (prompt tiap tool) · `allow-all` (semua — tetap tolak bash berbahaya, path jail tetap aktif). Putar via Shift+Tab (siklus 5: `allow-all` dilewati), `/mode`, atau flag `--plan/--allowlist/--ask/--allow-all`. Detail per mode di [Policy & Sandbox](policy-sandbox.md).
|
|
13
13
|
|
|
14
14
|
## Lapisan perlindungan bash
|
|
15
15
|
|
package/docs/skills.md
CHANGED
|
@@ -14,7 +14,7 @@ Review this diff: {{args}}
|
|
|
14
14
|
|
|
15
15
|
- Placeholder di body: `{{args}}` atau `$ARGUMENTS` — menerima argumen setelah nama skill.
|
|
16
16
|
- Nama auto-slug: `My Skill` → `my-skill`.
|
|
17
|
-
- Panggil dari
|
|
17
|
+
- Panggil dari TUI atau prompt one-shot: `/review src/a.ts` atau `minicode "/review src/a.ts"`.
|
|
18
18
|
- Skill tampil di dropdown `/` (grouped bersama slash command) dan `minicode skills list` melihat yang terpasang.
|
|
19
19
|
- **`disable-model-invocation: true`** di frontmatter = skill HANYA via `/nama` eksplisit, tak masuk katalog auto-pick system prompt. Untuk workflow yang tak boleh dipicu model sendiri (deploy/rilis).
|
|
20
20
|
- **Aset sibling** (opsional, gaya Zed): folder `.minicode/skills/<nama>/` berisi `scripts/` dan `references/` — didaftar sebagai petunjuk baca di katalog (`scripts: check.sh; refs: guide.md`), dibaca model via `read_file` bila perlu, TIDAK dieksekusi otomatis.
|
|
@@ -43,6 +43,6 @@ Hooks global + lokal di-merge dari allowlist secara atomik (chmod 600). Karena h
|
|
|
43
43
|
|
|
44
44
|
## Lanjut
|
|
45
45
|
|
|
46
|
-
- [
|
|
46
|
+
- [TUI](repl.md) - dropdown + slash command.
|
|
47
47
|
- [Config](config.md) — lokasi file & skema config.
|
|
48
48
|
- [Tools](tools.md) — referensi 37 tool yang bisa dipanggil skill.
|
package/docs/terminal.md
CHANGED
|
@@ -24,7 +24,7 @@ bisa di-pipe, di-grep, dan tinggal di scrollback Anda sendiri.
|
|
|
24
24
|
|
|
25
25
|
| Stream | Isi |
|
|
26
26
|
|---|---|
|
|
27
|
-
| stdout | Output program: teks model (wrapped, fence 2-spasi), receipt perubahan (`› write_file …`), artefak perintah. Bersih dari cursor-control saat non-TTY |
|
|
27
|
+
| stdout | Output program: teks model (wrapped, fence 2-spasi; pipe-table menjadi grid selaras di TTY), receipt perubahan (`› write_file …`), artefak perintah. Bersih dari cursor-control saat non-TTY |
|
|
28
28
|
| stderr | Progress/diagnostik: ledger tool (`› …` hijau/merah), reasoning (verbose), warning, error. Boleh transient bila TTY — ditahan saat layar interaktif memegang terminal |
|
|
29
29
|
|
|
30
30
|
- Warna hanya bila TTY (`stdout.isTTY`); `NO_COLOR` menang; `TERM`/`COLORTERM` tidak menyalakan warna di pipe.
|
|
@@ -32,8 +32,8 @@ bisa di-pipe, di-grep, dan tinggal di scrollback Anda sendiri.
|
|
|
32
32
|
|
|
33
33
|
## Primitif tampilan
|
|
34
34
|
|
|
35
|
-
1. Transkrip fullscreen — prompt `minicode ›` + jawaban model + ledger, viewport ikut ekor otomatis
|
|
36
|
-
2. Status bar satu baris — `✦ mode
|
|
35
|
+
1. Transkrip fullscreen — prompt `minicode ›` saat editing + jawaban model + ledger, viewport ikut ekor otomatis; drag mouse membuat selection app-level, `Ctrl+C` menyalin, wheel dan `PgUp/PgDn` menggulir layar
|
|
36
|
+
2. Status bar satu baris — `✦ 00.00.00 mode model cwd` (timer `HH.MM.SS` di sebelah sparkle; redup idle, detik putih saat aktif, menit mulai terang di 60 dtk, jam di 1 jam; tanpa bullet separator; konteks rata kanan)
|
|
37
37
|
3. Popup komposit satu kotak — `/model`, `/provider`, `/sessions`, form, approval; Esc dua-tahap, kursor diparkir
|
|
38
38
|
4. Ledger — ` › name target` hijau / ` › name: …` merah
|
|
39
39
|
5. Teks model & thinking — mengalir redup (thinking), di-buffer untuk `/expand`
|
|
@@ -54,14 +54,18 @@ nested + release idempoten). Pemegangnya: `askLine`/`askSecret`/`runPicker`
|
|
|
54
54
|
tick `\r\x1b[2K` spinner menghapus baris prompt wizard (laporan "macet di
|
|
55
55
|
Menyiapkan sesi…").
|
|
56
56
|
|
|
57
|
-
## Invariant I1–
|
|
57
|
+
## Invariant I1–I35
|
|
58
58
|
|
|
59
|
-
Peta lengkap
|
|
59
|
+
Peta lengkap 35 invariant + test proteksinya (mis. `tui-app`, `screen-buffer`,
|
|
60
60
|
`tui-popup`, `transient-arbitration`, `input-resize`, `exit-codes`, `acp`) ada di
|
|
61
61
|
[Terminal Contract](TERMINAL_CONTRACT.md). Setiap fitur terminal baru tunduk
|
|
62
62
|
pada invariant itu — mis. tak boleh menulis cursor-control ke stdout non-TTY,
|
|
63
63
|
tak boleh mengandalkan alternate screen di jalur non-interaktif.
|
|
64
64
|
|
|
65
|
+
Kontrak versi **v7.4** (2026-10-20) juga mencantumkan **peta gap proteksi**:
|
|
66
|
+
klaim yang implementasinya benar tetapi belum punya assertion penjaga. Baca
|
|
67
|
+
saga itu sebelum menyatakan "sudah dijaga".
|
|
68
|
+
|
|
65
69
|
## Aksesibilitas & konsol lawas
|
|
66
70
|
|
|
67
71
|
`MINICODE_ASCII=1` (glyph `[OK]`/`>`/`.`), `MINICODE_A11Y=1` (live-region approval polos tanpa ANSI), `MINICODE_BELL=0`, `MINICODE_DROPDOWN=0` (hint inline), `MINICODE_MOTION=0` (spark statis, tanpa pulse). Daftar lengkap di [Environment Variables](environment.md).
|
package/docs/tools.md
CHANGED
|
@@ -83,7 +83,7 @@ Batas `BASH_BACKGROUND_MAX_JOBS`; semua job mati saat CLI keluar.
|
|
|
83
83
|
| `write_memory` | Tulis + vector store | `{category?, tags?}`, default `fact`. Kategori `fact|decision|preference|snippet|summary`, boost `decision` +0.1 |
|
|
84
84
|
| `forget_memory` | Hapus cocok query | Menghapus vector + baris file di scope lokal DAN global (keduanya di-search; `MEMORY.md` root/`CLAUDE.md` tak ikut). Hitung-dulu-sebelum-DELETE (trigger FTS mengacaukan `sqlite3_changes`) |
|
|
85
85
|
| `todo_write` / `todo_read` | Rencana per sesi (3+ langkah) | Kirim **seluruh daftar** tiap kali. Status `pending|in_progress|completed|cancelled`, satu `in_progress` dipertahankan. Disimpan `.minicode/todos/<session>.json` + artifact `.minicode/plans/<id>.md` |
|
|
86
|
-
| `submit_result` | Hasil akhir JSON terstruktur 1× | NO_PROMPT, `exec --json` verbatim. Pengganti `response_format` |
|
|
86
|
+
| `submit_result` | Hasil akhir JSON terstruktur 1× | NO_PROMPT, `exec --json` verbatim. `result.findings` eksplisit diproyeksikan sebagai `finding.detected`. Pengganti `response_format` |
|
|
87
87
|
| `ask_user` | Tanya klarifikasi mid-run | Gated + render via injeksi `promptAskText` (fail-closed non-TTY) |
|
|
88
88
|
|
|
89
89
|
## Agents
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minicode-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Coding agent CLI built on the frozen MiniCore runtime — tools, MCP, LSP, sandbox, shadow-git checkpoints",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -48,12 +48,42 @@
|
|
|
48
48
|
"vendor/minicore/src",
|
|
49
49
|
"vendor/minicore/package.json",
|
|
50
50
|
"vendor/minicore/VENDOR.md",
|
|
51
|
-
"docs",
|
|
52
|
-
"PLAN.md",
|
|
53
|
-
"AGENTS.md",
|
|
54
51
|
"README.md",
|
|
55
52
|
"CHANGELOG.md",
|
|
56
|
-
"LICENSE"
|
|
53
|
+
"LICENSE",
|
|
54
|
+
"docs/OUTPUT_ARCHITECTURE_AUDIT.md",
|
|
55
|
+
"docs/OUTPUT_EVENT_MODEL.md",
|
|
56
|
+
"docs/OUTPUT_IMPLEMENTATION_PLAN.md",
|
|
57
|
+
"docs/OUTPUT_PROTOCOL_SPEC.md",
|
|
58
|
+
"docs/OUTPUT_RENDERING_SPEC.md",
|
|
59
|
+
"docs/OUTPUT_UX_RULES.md",
|
|
60
|
+
"docs/PLAN_UIUX_V6.md",
|
|
61
|
+
"docs/TERMINAL_CONTRACT.md",
|
|
62
|
+
"docs/agents.md",
|
|
63
|
+
"docs/architecture.md",
|
|
64
|
+
"docs/choosing-mode.md",
|
|
65
|
+
"docs/cli.md",
|
|
66
|
+
"docs/concepts.md",
|
|
67
|
+
"docs/config-providers.md",
|
|
68
|
+
"docs/config.md",
|
|
69
|
+
"docs/contributing.md",
|
|
70
|
+
"docs/environment.md",
|
|
71
|
+
"docs/exec.md",
|
|
72
|
+
"docs/getting-started.md",
|
|
73
|
+
"docs/glossary.md",
|
|
74
|
+
"docs/mcp-lsp.md",
|
|
75
|
+
"docs/memory-sessions.md",
|
|
76
|
+
"docs/policy-sandbox.md",
|
|
77
|
+
"docs/pricing-budget.md",
|
|
78
|
+
"docs/quickstart.md",
|
|
79
|
+
"docs/repl.md",
|
|
80
|
+
"docs/security-model.md",
|
|
81
|
+
"docs/security.md",
|
|
82
|
+
"docs/skills.md",
|
|
83
|
+
"docs/terminal.md",
|
|
84
|
+
"docs/tools.md",
|
|
85
|
+
"docs/troubleshooting.md",
|
|
86
|
+
"docs/verify-benchmark.md"
|
|
57
87
|
],
|
|
58
88
|
"scripts": {
|
|
59
89
|
"test": "bun test",
|