Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
3ec8de0
fix(checkpoint): don't count a timed-out writer wait as a writer failure
wqymi Jul 27, 2026
217e90f
fix(rebuild): make manual /rebuild perform an on-the-spot rebuild wit…
wqymi Jul 15, 2026
0d7dd0e
fix(rebuild): implement case 2 — spawn+wait+rebuild when no checkpoin…
wqymi Jul 17, 2026
8896c89
fix(rebuild): add descriptive busy messages to /rebuild handler
wqymi Jul 20, 2026
336d5e1
fix(provider): drop `as any` on plugin models() call — SDK types now …
wqymi Jul 20, 2026
67ac27a
test(rebuild): drive the real /rebuild handler end-to-end instead of …
wqymi Jul 20, 2026
3244ca7
fix(rebuild): manual /rebuild must not auto-reply (restore noReply)
wqymi Jul 20, 2026
91d3ef4
fix(rebuild): manual /rebuild inserts only the boundary, no fabricate…
wqymi Jul 22, 2026
054775d
fix(tui): make the /rebuild context boundary visible in the transcript
wqymi Jul 27, 2026
6b31795
fix(plugin): skip non-function exports in getLegacyPlugins
Jul 27, 2026
4fad57b
fix(actor): make spawn the default and run the exception in the tool …
wqymi Jul 27, 2026
d709482
revert(session): remove the empty-step guard that mis-flagged no-arg …
wqymi Jul 27, 2026
0aca274
fix(plugin): prettier formatting
Jul 27, 2026
70f0eb6
ci: comprehensive CI/CD pipeline with multi-language support
Jul 27, 2026
b890aca
ci: remove old workflows (replaced by ci.yml)
Jul 27, 2026
bd0be88
docs(actor): move the run-exception note off the JSON example line
wqymi Jul 27, 2026
076b790
Merge pull request #1938 from XiaomiMiMo/fix/checkpoint-writer-wait-t…
wqymi Jul 27, 2026
e56ecb0
fix(checkpoint): book the writer's real outcome when the wait bound e…
wqymi Jul 27, 2026
7d4f3c8
fix(worktree): set git identity on isolated worktree creation to stop…
wqymi Jul 20, 2026
430bbe3
fix(bash): git-identity env floor + align worktree fallback (layer 2)
wqymi Jul 20, 2026
3b33ee4
fix(git-identity): use mimo@xiaomi.com as the fallback identity
wqymi Jul 27, 2026
f592fe4
fix(git-identity): shorten fallback name to MiMo
wqymi Jul 27, 2026
9b0e030
fix(mcp): negotiate per-turn lifecycle notifications
wqymi Jul 21, 2026
cd16c20
fix(mcp): make lifecycle negotiation cancellation-safe
wqymi Jul 21, 2026
54e0c33
test(mcp): pin lifecycle MCP tests to a direct-MCP model
wqymi Jul 27, 2026
7b48703
fix(mcp): drop dead turn context fields and unblock stuck lifecycle s…
wqymi Jul 27, 2026
ae18dec
refactor(git-identity): single source of truth + document the env-flo…
wqymi Jul 27, 2026
829d00f
fix(provider): never send an empty-content message (Bedrock 400)
wqymi Jul 27, 2026
fe1ab5b
feat(exec): restore MCP dispatch with request-scoped gating, structur…
JinyuXiang-Mimo Jul 28, 2026
3613792
feat(tui): render exec collapsed view as one clickable block with sub…
JinyuXiang-Mimo Jul 28, 2026
e0edc52
feat(tui): add Click to expand hint to exec collapsed block
JinyuXiang-Mimo Jul 28, 2026
e9e42b6
fix(tui): keep the transcript alive after a directory switch
wqymi Jul 28, 2026
9e7f022
test(actor): verify the spawn-first claim end-to-end with a real model
wqymi Jul 28, 2026
67bf626
fix(exec): pass the MCP view through ctx.extra instead of a module-le…
JinyuXiang-Mimo Jul 28, 2026
60af8f1
Merge pull request #1951 from JinyuXiang-Mimo/feat/exec-mcp-dispatch
JinyuXiang-Mimo Jul 28, 2026
eb41838
fix(tui): stop a finished status message from latching into the next …
wqymi Jul 28, 2026
6f981f1
fix: repair orphaned running tool parts and stop a directory 403 from…
wqymi Jul 28, 2026
e080a83
fix(inbox): stop rendering a body-less notification into an empty use…
wqymi Jul 28, 2026
3f32482
fix(tui): discard superseded bootstrap writes and stop minting duplic…
wqymi Jul 28, 2026
0178b57
fix(inbox): fold #1963 — drain renders before writing and never persi…
wqymi Jul 28, 2026
1fba320
fix(provider): the trailing continuation turn must be a text PART, no…
wqymi Jul 28, 2026
9af5a1e
fix(provider): stop normalizeContentArray from text-backfilling a too…
wqymi Jul 28, 2026
eb504fc
fix(tui): guard syncWorkspace against a directory switch landing mid-…
wqymi Jul 28, 2026
299b4aa
test(provider): pin tool-role content as untouched, not merely un-tex…
wqymi Jul 28, 2026
c8b315c
Merge pull request #1953 from XiaomiMiMo/fix/tui-blank-transcript-dir…
wqymi Jul 28, 2026
95f0768
Merge pull request #1948 from XiaomiMiMo/fix/no-empty-content-invariant
wqymi Jul 28, 2026
9cb1257
Merge pull request #1942 from XiaomiMiMo/fix/actor-spawn-first
wqymi Jul 29, 2026
7167c47
Merge pull request #1851 from XiaomiMiMo/codex/mcp-turn-lifecycle
wqymi Jul 29, 2026
9a2f758
fix(tui): surface a directory-denied bootstrap instead of swallowing it
wqymi Jul 29, 2026
8c965e9
fix(git-identity): never substitute a hardcoded fallback identity
wqymi Jul 29, 2026
c028e0e
Merge pull request #1825 from XiaomiMiMo/fix/worktree-git-identity
wqymi Jul 29, 2026
388f8c6
design: Orchestrator route-first redesign (route-to-existing as prima…
wqymi Jul 15, 2026
b2dc315
design: AI-route revision — remove tool-level matching, AI routes via…
wqymi Jul 15, 2026
57f3534
design: add R1.1 injection strategy — compact summary + on-demand detail
wqymi Jul 15, 2026
36f488b
design: user's agent upgrade — Orchestrator as user's proxy, not mess…
wqymi Jul 17, 2026
077b7d5
impl: Phase 1+2 — active-sessions injection + orchestrator route-firs…
wqymi Jul 17, 2026
a30d4dd
design: add Reliability / Liveness Detection section
wqymi Jul 17, 2026
50b574a
docs: add Reliability/Liveness Detection section + prompt refinements
wqymi Jul 17, 2026
691d51f
feat(orchestrator): digital-twin identity + behavioral principles + t…
wqymi Jul 20, 2026
e103e09
docs(orchestrator): document session send as resume, not just relay
wqymi Jul 20, 2026
c73c5b3
docs(orchestrator): close 3 audit gaps — child git-ownership, topic r…
wqymi Jul 21, 2026
35712ae
test(orchestrator): e2e behavior tests for route-first — and fix the …
wqymi Jul 27, 2026
950be64
fix(orchestrator): make the active-sessions roster actually routable
wqymi Jul 28, 2026
a8da207
test(orchestrator): live-model behaviour suite — and one claim the mo…
wqymi Jul 28, 2026
714fbae
fix(orchestrator): make an intra-turn duplicate dispatch self-evident…
wqymi Jul 28, 2026
32685d1
docs(orchestrator): authorize the bounded ask when the named artifact…
wqymi Jul 28, 2026
a154c08
fix(session): never let arg recovery rewrite a route into a new child
wqymi Jul 28, 2026
b427e84
fix(tool): enforce isolated-child git safety in the bash tool
wqymi Jul 28, 2026
0605047
fix(tool): re-ground the isolated-git guard on measured hazards, and …
wqymi Jul 29, 2026
ad5d469
fix(orchestrator): merging is the maintainer's job — a conflict route…
wqymi Jul 29, 2026
3068ed9
test(checkpoint): pin the late writer outcome and the ~1h wait-extens…
wqymi Jul 29, 2026
efcad56
feat(bash): route a conflicted merge back to the branch's owner via t…
wqymi Jul 29, 2026
52bf01f
fix(rebuild): write a checkpoint on the spot before ever degrading to…
wqymi Jul 29, 2026
08b4a47
test(rebuild): cover writer-first auto overflow; rewrite two guards t…
wqymi Jul 29, 2026
fa36a1f
fix(orchestrator): delete the <active-sessions> tag rather than ask t…
wqymi Jul 29, 2026
57ff02e
Merge pull request #1741 from XiaomiMiMo/docs/orchestrator-route-firs…
wqymi Jul 29, 2026
5189f19
fix(rebuild): a scaffolded checkpoint file must not count as a usable…
wqymi Jul 29, 2026
95a3d6e
fix(rebuild): a nullable watermark made the scaffolded-checkpoint gua…
wqymi Jul 29, 2026
28087df
refactor(checkpoint): let the compiler enforce lastBoundary's flatten…
wqymi Jul 29, 2026
7ee91df
docs(agents): record the nullable-column rule this PR's defect came from
wqymi Jul 29, 2026
fe747f0
Merge pull request #1752 from XiaomiMiMo/fix/rebuild-on-the-spot-rebu…
wqymi Jul 29, 2026
f91eb63
Merge pull request #1960 from XiaomiMiMo/wq/fix-orphan-toolparts-and-…
wqymi Jul 29, 2026
b816708
Merge pull request #1782 from XiaomiMiMo/mimocode/revert-empty-step-g…
wqymi Jul 29, 2026
773edc5
fix: bound a running actor row's claim to be in progress
wqymi Jul 28, 2026
2375280
fix(actor): judge a child by last activity, not by last completed step
wqymi Jul 29, 2026
4e011ea
fix(checkpoint): delete writer failure accounting, let the next thres…
wqymi Jul 29, 2026
40f6c80
fix(actor): coalesce the activity heartbeat to the resolution its con…
wqymi Jul 29, 2026
556a0de
feat(actor): carry a failure classification on AgentOutcome
wqymi Jul 29, 2026
e3bd071
fix(checkpoint): distinguish a deterministic writer failure from a tr…
wqymi Jul 29, 2026
3ee9142
fix(checkpoint): give the final threshold a bounded, class-gated reco…
wqymi Jul 29, 2026
014c363
feat(mcp): support client-side sampling with audio
wqymi Jul 29, 2026
f7ec04d
test(mcp): move the WAV fixture out of a test file
wqymi Jul 29, 2026
2e5f088
fix(actor): say what the stall verdict measures, and size its window …
wqymi Jul 29, 2026
43a0857
test(mcp): probe the unknown-modality gate, the timeout bound, and th…
wqymi Jul 30, 2026
8028640
fix(mcp): make the sampling timeout abort the provider call and let a…
wqymi Jul 30, 2026
4e2a3cb
fix(session): send skill instructions as user reminders
MiMoHardFather Jul 30, 2026
3b0593a
Merge pull request #1988 from XiaomiMiMo/fix/skill-user-reminder
MiMoHardFather Jul 30, 2026
1bfb3d8
fix(permission): let a rejection win the abortSignal race instead of …
wqymi Jul 30, 2026
a674efd
fix(provider): retry internal request timeouts
MiMoHardFather Jul 30, 2026
3d34aef
docs(mcp): name data.server as the tell for whose -32001 fired
wqymi Jul 30, 2026
3c59f64
Merge pull request #1989 from XiaomiMiMo/fix/retry-provider-timeouts
MiMoHardFather Jul 30, 2026
6617c83
fix(mcp): split the sampling deadline by phase and keep a server's ti…
wqymi Jul 30, 2026
8a46dab
feat(session): render Claude environment dynamically
MiMoHardFather Jul 30, 2026
3410119
Merge pull request #1990 from XiaomiMiMo/feat/claude-dynamic-environment
MiMoHardFather Jul 30, 2026
90064e9
feat(mcp): stream the sampling model call so a hang is observed, not …
wqymi Jul 30, 2026
4eb4fa1
fix(mcp): stop inventing sampling timeouts and inherit the provider's…
wqymi Jul 30, 2026
00ee2ec
Merge pull request #1972 from XiaomiMiMo/feat/mcp-client-sampling
wqymi Jul 30, 2026
6c87eda
Merge pull request #1945 from XiaomiMiMo/fix/checkpoint-writer-timeou…
wqymi Jul 30, 2026
dc384ff
Merge pull request #1965 from XiaomiMiMo/fix/roster-liveness-dead-child
wqymi Jul 30, 2026
fb37845
fix(tui): keep agent on declined plan entry
yanyihan-xiaomi Jul 31, 2026
a58fb55
Merge pull request #1996 from XiaomiMiMo/fix/plan-enter-input-mode
yanyihan-xiaomi Jul 31, 2026
dd1e20c
fix(session): remove context pressure nudge
yanyihan-xiaomi Jul 31, 2026
4dcafd6
fix(session): honor the configured context limit
yanyihan-xiaomi Jul 31, 2026
392b4e8
Merge pull request #1997 from XiaomiMiMo/fix/context-limit-threshold-…
yanyihan-xiaomi Jul 31, 2026
15e5d04
Merge pull request #1998 from XiaomiMiMo/fix/remove-context-pressure-…
yanyihan-xiaomi Jul 31, 2026
85a7fac
fix(tui): render actor-hosted transcripts, refuse only runtime-spawne…
wqymi Jul 31, 2026
05d71e1
fix(tui): stop context readout showing a stale figure after /rebuild …
wqymi Jul 31, 2026
ce124cb
fix(tui): make post-rebuild pending-detection independent of message …
wqymi Jul 31, 2026
6853935
refactor(tool): remove plan_enter so only the user enters plan mode (…
yanyihan-xiaomi Aug 3, 2026
09d03d6
fix(tui): stop the sidebar surviving a shrink, and stop scrollbar dra…
yanyihan-xiaomi Aug 3, 2026
b1a50d0
fix(workflow): read built-in workflow scripts through a build-time ma…
yanyihan-xiaomi Aug 4, 2026
6674db7
fix(session): persist missing-model assistant errors (#2024)
peipeiwang-xiaomi Aug 4, 2026
7230f8a
fix(provider): send function tools to OpenAI Responses with explicit …
clyfish Aug 4, 2026
63e7f49
fix(session): declare strict: false for the goal judge's structured o…
clyfish Aug 4, 2026
fe9e9ab
feat(skill): separate model reachability from authorization (#2026)
yanyihan-xiaomi Aug 4, 2026
f1e9964
fix(server): stop emitting a dangling $ref, unbreaking SDK codegen (#…
yanyihan-xiaomi Aug 4, 2026
807ff9e
fix(provider): document the Responses-API provider set, stop empty op…
clyfish Aug 4, 2026
e77356b
test(provider): assert xai's additionalProperties stripping instead o…
clyfish Aug 4, 2026
68405e2
test(provider): pin the xai version the additionalProperties claim wa…
clyfish Aug 4, 2026
c326c2c
Merge pull request #2028 from clyfish/fix/openai-responses-explicit-n…
qiaozongming Aug 4, 2026
803835f
fix(session): retry OpenAI stream server errors
MiMoHardFather Aug 4, 2026
91dc9d1
Merge pull request #2029 from XiaomiMiMo/fix/gpt-stream-server-error-…
MiMoHardFather Aug 4, 2026
9e5bc04
feat(tui): default to minimal visuals
yanyihan-xiaomi Aug 5, 2026
d70fb5a
fix(tui): honor quiet mode for idle logos
yanyihan-xiaomi Aug 5, 2026
9bb6559
docs(compose): finalize TUI quiet mode
yanyihan-xiaomi Aug 5, 2026
89068dd
fix(tui): keep vivid visuals as default
yanyihan-xiaomi Aug 5, 2026
5931f01
feat(tui): add vivid mode slash toggle
yanyihan-xiaomi Aug 5, 2026
8ae03b5
fix(session): prevent duplicate context rebuilds
yanyihan-xiaomi Aug 5, 2026
11b8a08
docs(compose): finalize vivid mode controls
yanyihan-xiaomi Aug 5, 2026
0af6991
fix(tui): simplify vivid toggle copy
yanyihan-xiaomi Aug 5, 2026
641c0d1
docs(compose): finalize vivid copy refinement
yanyihan-xiaomi Aug 5, 2026
75df7db
Merge pull request #2032 from XiaomiMiMo/investigate/context-limit-do…
yanyihan-xiaomi Aug 5, 2026
bf2d300
Merge pull request #2031 from XiaomiMiMo/feature/tui-quiet-mode
yanyihan-xiaomi Aug 5, 2026
cbe44c1
docs: add TUI rendering troubleshooting
yanyihan-xiaomi Aug 5, 2026
ea49fd3
docs(skill): add TUI rendering troubleshooting
yanyihan-xiaomi Aug 5, 2026
f91ae8d
feat(tui): add vivid mode home tip
yanyihan-xiaomi Aug 5, 2026
747e54b
Merge pull request #2033 from XiaomiMiMo/docs/visual-mode-terminology
yanyihan-xiaomi Aug 5, 2026
8061d5f
chore: bump version to 0.1.10 (#2034)
qiaozongming Aug 5, 2026
e8f4326
fix(cli): normalize command output newlines
yanyihan-xiaomi Aug 5, 2026
db4f4a7
fix(agent): align subagent prompts with runtime tool schemas
MiMoHardFather Aug 5, 2026
faedc0b
feat(agent): enable full-capability general subagents
MiMoHardFather Aug 5, 2026
c9d8cf6
fix(agent): unify subagent prompts across models
MiMoHardFather Aug 5, 2026
4deb756
Merge pull request #2041 from XiaomiMiMo/fix/cli-output-newline
yanyihan-xiaomi Aug 5, 2026
2451913
Merge pull request #2039 from XiaomiMiMo/fix/gpt-agent-prompt-tool-co…
MiMoHardFather Aug 5, 2026
abf5957
feat(skill): add memory-search builtin skill
JinyuXiang-Mimo Aug 6, 2026
f36d7b7
fix(skill): address review — state.error blind spot, scope cc, query …
JinyuXiang-Mimo Aug 6, 2026
73b6f99
Merge pull request #2046 from JinyuXiang-Mimo/feat/memory-search-skill
JinyuXiang-Mimo Aug 6, 2026
eba27b6
refactor(mcp): share one process-wide client layer (#2044)
wqymi Aug 6, 2026
46b7d70
feat(skill): add memory-search builtin skill — SQLite trajectory DB q…
JinyuXiang-Mimo Aug 7, 2026
c518800
fix(tui): hide runtime-spawned agent hosts from the Sessions list (#2…
wqymi Aug 7, 2026
e8bbc89
Merge pull request #2053 from JinyuXiang-Mimo/feat/memory-search-skil…
JinyuXiang-Mimo Aug 7, 2026
bce8bcc
feat(memory): add the memory.disable_write switch — stop memory write…
wqymi Aug 7, 2026
e7c691a
fix(mcp): patch @ai-sdk/openai-compatible to stop dropping multi-arg …
YOMXXX Aug 7, 2026
5ba78a2
fix(session): scope diffs to requested message
MiMoHardFather Aug 7, 2026
eef8206
Merge pull request #2055 from XiaomiMiMo/fix/session-message-diff
MiMoHardFather Aug 7, 2026
d051bf5
merge: sync with upstream/main
Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 173 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
name: CI

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
CI: true

jobs:
typecheck:
name: Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-bun
- name: Run typecheck
run: bun typecheck

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-bun
- name: Run oxlint
run: bun lint
- name: Check formatting
run: npx prettier --check "packages/opencode/src/**/*.ts" "packages/opencode/test/**/*.ts"

test:
name: Test (shard ${{ matrix.shard }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: ["1/4", "2/4", "3/4", "4/4"]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-bun
- name: Configure git identity
run: |
git config --global user.email "ci@mimo.ai"
git config --global user.name "mimo-ci"
- name: Run unit tests (shard ${{ matrix.shard }})
timeout-minutes: 8
working-directory: packages/opencode
run: bun run test:ci --shard ${{ matrix.shard }}
- name: Upload JUnit
if: always()
uses: actions/upload-artifact@v7
with:
name: junit-shard-${{ strategy.job-index }}
path: packages/opencode/.artifacts/unit/junit.xml

security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-bun
- name: Install skylos
run: pip install skylos
- name: Run skylos security scan
run: skylos suite packages/opencode/src/plugin --json || true
- name: Upload results
if: always()
uses: actions/upload-artifact@v7
with:
name: skylos-results
path: packages/opencode/.artifacts/security/

quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-bun
- name: Install repowise
run: pip install repowise
- name: Run repowise health
run: repowise health packages/opencode/src/plugin --json || true
- name: Upload results
if: always()
uses: actions/upload-artifact@v7
with:
name: repowise-results
path: packages/opencode/.artifacts/quality/

# Multi-language support: detect and test additional languages
python:
name: Python (if present)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check for Python files
id: check
run: |
if find . -name "pyproject.toml" -o -name "setup.py" -o -name "requirements.txt" | grep -v node_modules | head -1; then
echo "found=true" >> $GITHUB_OUTPUT
fi
- name: Setup Python
if: steps.check.outputs.found == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Python deps
if: steps.check.outputs.found == 'true'
run: |
pip install ruff mypy pytest
- name: Run ruff
if: steps.check.outputs.found == 'true'
run: ruff check .
- name: Run mypy
if: steps.check.outputs.found == 'true'
run: mypy . --ignore-missing-imports
- name: Run pytest
if: steps.check.outputs.found == 'true'
run: python -m pytest tests/ -x --timeout=60 || true

rust:
name: Rust (if present)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check for Cargo.toml
id: check
run: |
if find . -name "Cargo.toml" | grep -v node_modules | head -1; then
echo "found=true" >> $GITHUB_OUTPUT
fi
- name: Setup Rust
if: steps.check.outputs.found == 'true'
uses: dtolnay/rust-toolchain@stable
- name: Cargo check
if: steps.check.outputs.found == 'true'
run: cargo check
- name: Cargo test
if: steps.check.outputs.found == 'true'
run: cargo test --no-fail-fast || true

go:
name: Go (if present)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check for go.mod
id: check
run: |
if find . -name "go.mod" | grep -v node_modules | head -1; then
echo "found=true" >> $GITHUB_OUTPUT
fi
- name: Setup Go
if: steps.check.outputs.found == 'true'
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Go vet
if: steps.check.outputs.found == 'true'
run: go vet ./...
- name: Go test
if: steps.check.outputs.found == 'true'
run: go test ./... || true
21 changes: 0 additions & 21 deletions .github/workflows/lint.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/test.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/typecheck.yml

This file was deleted.

7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@ Thumbs.db
.playwright-cli/
.mimocode/wiki
.mimocode/wikis
.mimocode/cache
.mimocode/cache

# SDK codegen scratch: script/build.ts writes it, consumes it, then removes it.
# A failed generation leaves it behind, where it is easy to commit by accident.
/packages/sdk/js/openapi.json
/packages/sdk/js/openapi-ts-error-*.log
23 changes: 23 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,29 @@ const table = sqliteTable("session", {
})
```

### Reading a nullable column

Two independent absences meet in one expression, and only one of them is
`undefined`. `.get()` yields `undefined` when no row matches — Drizzle normalises
the driver's `null` there — while a nullable column's SQL `NULL` arrives as
`null`. So `row?.some_column` is `T | null | undefined`.

When a caller only asks "is there a value", flatten to `undefined`, and write the
flattening as an annotation rather than an `as` cast:

```ts
// Good — the compiler enforces it; deleting the `?? undefined` is a type error
const boundary: MessageID | undefined = row?.last_checkpoint_message_id ?? undefined

// Bad — the cast removes `null` from the union without converting anything,
// so the declared type is untrue at runtime
return row?.last_checkpoint_message_id as MessageID | undefined
```

Discriminate a possibly-absent value with truthiness or `== null`, never with
`=== undefined` / `!== undefined`. Because `null !== undefined` is `true`, such a
guard typechecks, reads correctly in review, and does nothing.

## Testing

- Avoid mocks as much as possible
Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,36 @@ sudo apt install xsel
```
</details>

<details>
<summary><strong>macOS: rendering issues in the default terminal</strong></summary>

MiMoCode does not support the built-in macOS Terminal (Terminal.app). If the interface is misaligned, flickers, or has other rendering issues, use [iTerm2](https://iterm2.com/) or the VS Code integrated terminal instead:

```bash
brew install --cask iterm2
```
</details>

<details>
<summary><strong>TUI lag and visual animation issues</strong></summary>

If the TUI lags when run directly over SSH, render it locally and run only the MiMoCode server on the remote host. Start the server from the remote project directory:

```bash
# Remote host
mimo serve --port 4096

# Local host: create the SSH port forward
ssh -N -L 4096:127.0.0.1:4096 user@remote-host

# Local host: connect from another terminal
mimo attach http://127.0.0.1:4096
```

If decorative animation is causing the lag, run `/vivid`, or configure **Vivid visuals** in the `ctrl+p` command palette, to switch between Vivid and Minimal visuals as needed.

</details>

<details>
<summary><strong>Windows: garbled CJK (Chinese/Japanese/Korean) output in the shell</strong></summary>

Expand Down
30 changes: 30 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,36 @@ sudo apt install xsel
```
</details>

<details>
<summary><strong>macOS:默认终端渲染异常</strong></summary>

MiMoCode 不支持 macOS 自带的“终端”(Terminal.app)。如果界面出现错位、闪烁或其他渲染异常,请改用 [iTerm2](https://iterm2.com/) 或 VS Code 集成终端:

```bash
brew install --cask iterm2
```
</details>

<details>
<summary><strong>TUI 卡顿与视觉动画问题</strong></summary>

如果通过 SSH 直接运行 TUI 时卡顿,可以让 TUI 在本地渲染,远端只运行 MiMoCode 服务。先在远端项目目录中启动服务:

```bash
# 远端主机
mimo serve --port 4096

# 本地主机:建立 SSH 端口转发
ssh -N -L 4096:127.0.0.1:4096 user@remote-host

# 本地主机:在另一个终端连接远端 MiMoCode
mimo attach http://127.0.0.1:4096
```

如果卡顿来自装饰性动画,可以运行 `/vivid`,或在 `ctrl+p` 命令面板中设置“丰富显示”,根据实际情况在丰富视觉模式和简洁模式间切换。

</details>

<details>
<summary><strong>Windows:shell 输出中文(CJK)乱码</strong></summary>

Expand Down
Loading