Skip to content

Commit 7233b71

Browse files
committed
Initial open-source release of MiMo Code
0 parents  commit 7233b71

3,941 files changed

Lines changed: 639653 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
insert_final_newline = true
6+
end_of_line = lf
7+
indent_style = space
8+
indent_size = 2
9+
max_line_length = 80
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Bug report
2+
description: Report an issue that should be fixed
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description
9+
description: Describe the bug you encountered
10+
placeholder: What happened?
11+
validations:
12+
required: true
13+
14+
- type: input
15+
id: plugins
16+
attributes:
17+
label: Plugins
18+
description: What plugins are you using?
19+
validations:
20+
required: false
21+
22+
- type: input
23+
id: opencode-version
24+
attributes:
25+
label: OpenCode version
26+
description: What version of OpenCode are you using?
27+
validations:
28+
required: false
29+
30+
- type: textarea
31+
id: reproduce
32+
attributes:
33+
label: Steps to reproduce
34+
description: How can we reproduce this issue?
35+
placeholder: |
36+
1.
37+
2.
38+
3.
39+
validations:
40+
required: false
41+
42+
- type: textarea
43+
id: screenshot-or-link
44+
attributes:
45+
label: Screenshot and/or share link
46+
description: Run `/share` to get a share link, or attach a screenshot
47+
placeholder: Paste link or drag and drop screenshot here
48+
validations:
49+
required: false
50+
51+
- type: input
52+
id: os
53+
attributes:
54+
label: Operating System
55+
description: what OS are you using?
56+
placeholder: e.g., macOS 26.0.1, Ubuntu 22.04, Windows 11
57+
validations:
58+
required: false
59+
60+
- type: input
61+
id: terminal
62+
attributes:
63+
label: Terminal
64+
description: what terminal are you using?
65+
placeholder: e.g., iTerm2, Ghostty, Alacritty, Windows Terminal
66+
validations:
67+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Discord Community
4+
url: https://discord.gg/opencode
5+
about: For quick questions or real-time discussion. Note that issues are searchable and help others with the same question.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 🚀 Feature Request
2+
description: Suggest an idea, feature, or enhancement
3+
labels: [discussion]
4+
title: "[FEATURE]:"
5+
6+
body:
7+
- type: checkboxes
8+
id: verified
9+
attributes:
10+
label: Feature hasn't been suggested before.
11+
options:
12+
- label: I have verified this feature I'm about to request hasn't been suggested before.
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: Describe the enhancement you want to request
18+
description: What do you want to change or add? What are the benefits of implementing this? Try to be detailed so we can understand your request better :)
19+
validations:
20+
required: true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Question
2+
description: Ask a question
3+
labels: ["question"]
4+
body:
5+
- type: textarea
6+
id: question
7+
attributes:
8+
label: Question
9+
description: What's your question?
10+
validations:
11+
required: true
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Setup Bun"
2+
description: "Setup Bun with caching and install dependencies"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Get baseline download URL
7+
id: bun-url
8+
shell: bash
9+
run: |
10+
if [ "$RUNNER_ARCH" = "X64" ]; then
11+
V=$(node -p "require('./package.json').packageManager.split('@')[1]")
12+
case "$RUNNER_OS" in
13+
macOS) OS=darwin ;;
14+
Linux) OS=linux ;;
15+
Windows) OS=windows ;;
16+
esac
17+
echo "url=https://github.com/oven-sh/bun/releases/download/bun-v${V}/bun-${OS}-x64-baseline.zip" >> "$GITHUB_OUTPUT"
18+
fi
19+
20+
- name: Setup Bun
21+
uses: oven-sh/setup-bun@v2
22+
with:
23+
bun-version-file: ${{ !steps.bun-url.outputs.url && 'package.json' || '' }}
24+
bun-download-url: ${{ steps.bun-url.outputs.url }}
25+
26+
- name: Get cache directory
27+
id: cache
28+
shell: bash
29+
run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT"
30+
31+
- name: Cache Bun dependencies
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ steps.cache.outputs.dir }}
35+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-bun-
38+
39+
- name: Install setuptools for distutils compatibility
40+
run: python3 -m pip install setuptools || pip install setuptools || true
41+
shell: bash
42+
43+
- name: Install dependencies
44+
run: |
45+
# Workaround for patched peer variants
46+
# e.g. ./patches/ for standard-openapi
47+
# https://github.com/oven-sh/bun/issues/28147
48+
if [ "$RUNNER_OS" = "Windows" ]; then
49+
bun install --linker hoisted
50+
else
51+
bun install
52+
fi
53+
shell: bash

.github/pull_request_template.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
### Issue for this PR
2+
3+
Closes #
4+
5+
### Type of change
6+
7+
- [ ] Bug fix
8+
- [ ] New feature
9+
- [ ] Refactor / code improvement
10+
- [ ] Documentation
11+
12+
### What does this PR do?
13+
14+
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
15+
16+
**If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!**
17+
18+
### How did you verify your code works?
19+
20+
### Screenshots / recordings
21+
22+
_If this is a UI change, please include a screenshot or recording._
23+
24+
### Checklist
25+
26+
- [ ] I have tested my changes locally
27+
- [ ] I have not included unrelated changes in this PR
28+
29+
_If you do not follow this template your PR will be automatically rejected._

.github/workflows/typecheck.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: typecheck
2+
3+
on:
4+
push:
5+
branches: [dev]
6+
pull_request:
7+
branches: [dev]
8+
workflow_dispatch:
9+
10+
jobs:
11+
typecheck:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Bun
18+
uses: ./.github/actions/setup-bun
19+
20+
- name: Run typecheck
21+
run: bun typecheck

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.DS_Store
2+
node_modules
3+
.worktrees
4+
.sst
5+
.env
6+
.idea
7+
.vscode
8+
.codex
9+
*~
10+
playground
11+
tmp
12+
dist
13+
ts-dist
14+
.turbo
15+
**/.serena
16+
.serena/
17+
/result
18+
refs
19+
Session.vim
20+
/opencode.json
21+
a.out
22+
target
23+
.scripts
24+
.direnv/
25+
26+
# Local dev files
27+
opencode-dev
28+
UPCOMING_CHANGELOG.md
29+
logs/
30+
*.bun-build
31+
tsconfig.tsbuildinfo
32+
.dev-home/
33+
34+
# Local agent harness state
35+
.claude/
36+
*.pid
37+
.mimo-worktrees
38+
.mimocode/
39+
40+
# experiment run artifacts (regenerated per run, not source)
41+
experiment/*.log
42+
experiment/last-outcome.json
43+
/experiment

.husky/pre-push

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
set -e
3+
# Check if bun version matches package.json
4+
# keep in sync with packages/script/src/index.ts semver qualifier
5+
bun -e '
6+
import { semver } from "bun";
7+
const pkg = await Bun.file("package.json").json();
8+
const expectedBunVersion = pkg.packageManager?.split("@")[1];
9+
if (!expectedBunVersion) {
10+
throw new Error("packageManager field not found in root package.json");
11+
}
12+
const expectedBunVersionRange = `^${expectedBunVersion}`;
13+
if (!semver.satisfies(process.versions.bun, expectedBunVersionRange)) {
14+
throw new Error(`This script requires bun@${expectedBunVersionRange}, but you are using bun@${process.versions.bun}`);
15+
}
16+
if (process.versions.bun !== expectedBunVersion) {
17+
console.warn(`Warning: Bun version ${process.versions.bun} differs from expected ${expectedBunVersion}`);
18+
}
19+
'
20+
bun typecheck

0 commit comments

Comments
 (0)