xonecas.io
64875
Mc

mini-coder / commit 042e335

chore: greenfield 0.8.x

xonecas2026-09-22 042e335b517bebefb114f31cfa95e8012c572e91 parent 6ede917

51 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

.agents/skills/bun-development/SKILL.md+0−701
@@ -1,701 +0,0 @@
1----
2-name: bun-development
3-description: "Fast, modern JavaScript/TypeScript development with the Bun runtime, inspired by [oven-sh/bun](https://github.com/oven-sh/bun)."
4-risk: critical
5-source: community
6-date_added: "2026-02-27"
7----
8-
9-<!-- security-allowlist: curl-pipe-bash, irm-pipe-iex -->
10-
11-# ⚡ Bun Development
12-
13-> Fast, modern JavaScript/TypeScript development with the Bun runtime, inspired by [oven-sh/bun](https://github.com/oven-sh/bun).
14-
15-## When to Use This Skill
16-
17-Use this skill when:
18-
19-- Starting new JS/TS projects with Bun
20-- Migrating from Node.js to Bun
21-- Optimizing development speed
22-- Using Bun's built-in tools (bundler, test runner)
23-- Troubleshooting Bun-specific issues
24-
25----
26-
27-## 1. Getting Started
28-
29-### 1.1 Installation
30-
31-```bash
32-# macOS / Linux
33-curl -fsSL https://bun.sh/install | bash
34-
35-# Windows
36-powershell -c "irm bun.sh/install.ps1 | iex"
37-
38-# Homebrew
39-brew tap oven-sh/bun
40-brew install bun
41-
42-# npm (if needed)
43-npm install -g bun
44-
45-# Upgrade
46-bun upgrade
47-```
48-
49-### 1.2 Why Bun?
50-
51-| Feature | Bun | Node.js |
52-| :-------------- | :------------- | :-------------------------- |
53-| Startup time | ~25ms | ~100ms+ |
54-| Package install | 10-100x faster | Baseline |
55-| TypeScript | Native | Requires transpiler |
56-| JSX | Native | Requires transpiler |
57-| Test runner | Built-in | External (Jest, Vitest) |
58-| Bundler | Built-in | External (Webpack, esbuild) |
59-
60----
61-
62-## 2. Project Setup
63-
64-### 2.1 Create New Project
65-
66-```bash
67-# Initialize project
68-bun init
69-
70-# Creates:
71-# ├── package.json
72-# ├── tsconfig.json
73-# ├── index.ts
74-# └── README.md
75-
76-# With specific template
77-bun create <template> <project-name>
78-
79-# Examples
80-bun create react my-app # React app
81-bun create next my-app # Next.js app
82-bun create vite my-app # Vite app
83-bun create elysia my-api # Elysia API
84-```
85-
86-### 2.2 package.json
87-
88-```json
89-{
90- "name": "my-bun-project",
91- "version": "1.0.0",
92- "module": "index.ts",
93- "type": "module",
94- "scripts": {
95- "dev": "bun run --watch index.ts",
96- "start": "bun run index.ts",
97- "test": "bun test",
98- "build": "bun build ./index.ts --outdir ./dist",
99- "lint": "bunx eslint ."
100- },
101- "devDependencies": {
102- "@types/bun": "latest"
103- },
104- "peerDependencies": {
105- "typescript": "^5.0.0"
106- }
107-}
108-```
109-
110-### 2.3 tsconfig.json (Bun-optimized)
111-
112-```json
113-{
114- "compilerOptions": {
115- "lib": ["ESNext"],
116- "module": "esnext",
117- "target": "esnext",
118- "moduleResolution": "bundler",
119- "moduleDetection": "force",
120- "allowImportingTsExtensions": true,
121- "noEmit": true,
122- "composite": true,
123- "strict": true,
124- "downlevelIteration": true,
125- "skipLibCheck": true,
126- "jsx": "react-jsx",
127- "allowSyntheticDefaultImports": true,
128- "forceConsistentCasingInFileNames": true,
129- "allowJs": true,
130- "types": ["bun-types"]
131- }
132-}
133-```
134-
135----
136-
137-## 3. Package Management
138-
139-### 3.1 Installing Packages
140-
141-```bash
142-# Install from package.json
143-bun install # or 'bun i'
144-
145-# Add dependencies
146-bun add express # Regular dependency
147-bun add -d typescript # Dev dependency
148-bun add -D @types/node # Dev dependency (alias)
149-bun add --optional pkg # Optional dependency
150-
151-# From specific registry
152-bun add lodash --registry https://registry.npmmirror.com
153-
154-# Install specific version
155-bun add react@18.2.0
156-bun add react@latest
157-bun add react@next
158-
159-# From git
160-bun add github:user/repo
161-bun add git+https://github.com/user/repo.git
162-```
163-
164-### 3.2 Removing & Updating
165-
166-```bash
167-# Remove package
168-bun remove lodash
169-
170-# Update packages
171-bun update # Update all
172-bun update lodash # Update specific
173-bun update --latest # Update to latest (ignore ranges)
174-
175-# Check outdated
176-bun outdated
177-```
178-
179-### 3.3 bunx (npx equivalent)
180-
181-```bash
182-# Execute package binaries
183-bunx prettier --write .
184-bunx tsc --init
185-bunx create-react-app my-app
186-
187-# With specific version
188-bunx -p typescript@4.9 tsc --version
189-
190-# Run without installing
191-bunx cowsay "Hello from Bun!"
192-```
193-
194-### 3.4 Lockfile
195-
196-```bash
197-# bun.lockb is a binary lockfile (faster parsing)
198-# To generate text lockfile for debugging:
199-bun install --yarn # Creates yarn.lock
200-
201-# Trust existing lockfile
202-bun install --frozen-lockfile
203-```
204-
205----
206-
207-## 4. Running Code
208-
209-### 4.1 Basic Execution
210-
211-```bash
212-# Run TypeScript directly (no build step!)
213-bun run index.ts
214-
215-# Run JavaScript
216-bun run index.js
217-
218-# Run with arguments
219-bun run server.ts --port 3000
220-
221-# Run package.json script
222-bun run dev
223-bun run build
224-
225-# Short form (for scripts)
226-bun dev
227-bun build
228-```
229-
230-### 4.2 Watch Mode
231-
232-```bash
233-# Auto-restart on file changes
234-bun --watch run index.ts
235-
236-# With hot reloading
237-bun --hot run server.ts
238-```
239-
240-### 4.3 Environment Variables
241-
242-```typescript
243-// .env file is loaded automatically!
244-
245-// Access environment variables
246-const apiKey = Bun.env.API_KEY;
247-const port = Bun.env.PORT ?? "3000";
248-
249-// Or use process.env (Node.js compatible)
250-const dbUrl = process.env.DATABASE_URL;
251-```
252-
253-```bash
254-# Run with specific env file
255-bun --env-file=.env.production run index.ts
256-```
257-
258----
259-
260-## 5. Built-in APIs
261-
262-### 5.1 File System (Bun.file)
263-
264-```typescript
265-// Read file
266-const file = Bun.file("./data.json");
267-const text = await file.text();
268-const json = await file.json();
269-const buffer = await file.arrayBuffer();
270-
271-// File info
272-console.log(file.size); // bytes
273-console.log(file.type); // MIME type
274-
275-// Write file
276-await Bun.write("./output.txt", "Hello, Bun!");
277-await Bun.write("./data.json", JSON.stringify({ foo: "bar" }));
278-
279-// Stream large files
280-const reader = file.stream();
281-for await (const chunk of reader) {
282- console.log(chunk);
283-}
284-```
285-
286-### 5.2 HTTP Server (Bun.serve)
287-
288-```typescript
289-const server = Bun.serve({
290- port: 3000,
291-
292- fetch(request) {
293- const url = new URL(request.url);
294-
295- if (url.pathname === "/") {
296- return new Response("Hello World!");
297- }
298-
299- if (url.pathname === "/api/users") {
300- return Response.json([
301- { id: 1, name: "Alice" },
302- { id: 2, name: "Bob" },
303- ]);
304- }
305-
306- return new Response("Not Found", { status: 404 });
307- },
308-
309- error(error) {
310- return new Response(`Error: ${error.message}`, { status: 500 });
311- },
312-});
313-
314-console.log(`Server running at http://localhost:${server.port}`);
315-```
316-
317-### 5.3 WebSocket Server
318-
319-```typescript
320-const server = Bun.serve({
321- port: 3000,
322-
323- fetch(req, server) {
324- // Upgrade to WebSocket
325- if (server.upgrade(req)) {
326- return; // Upgraded
327- }
328- return new Response("Upgrade failed", { status: 500 });
329- },
330-
331- websocket: {
332- open(ws) {
333- console.log("Client connected");
334- ws.send("Welcome!");
335- },
336-
337- message(ws, message) {
338- console.log(`Received: ${message}`);
339- ws.send(`Echo: ${message}`);
340- },
341-
342- close(ws) {
343- console.log("Client disconnected");
344- },
345- },
346-});
347-```
348-
349-### 5.4 SQLite (Bun.sql)
350-
351-```typescript
352-import { Database } from "bun:sqlite";
353-
354-const db = new Database("mydb.sqlite");
355-
356-// Create table
357-db.run(`
358- CREATE TABLE IF NOT EXISTS users (
359- id INTEGER PRIMARY KEY AUTOINCREMENT,
360- name TEXT NOT NULL,
361- email TEXT UNIQUE
362- )
363-`);
364-
365-// Insert
366-const insert = db.prepare("INSERT INTO users (name, email) VALUES (?, ?)");
367-insert.run("Alice", "alice@example.com");
368-
369-// Query
370-const query = db.prepare("SELECT * FROM users WHERE name = ?");
371-const user = query.get("Alice");
372-console.log(user); // { id: 1, name: "Alice", email: "alice@example.com" }
373-
374-// Query all
375-const allUsers = db.query("SELECT * FROM users").all();
376-```
377-
378-### 5.5 Password Hashing
379-
380-```typescript
381-// Hash password
382-const password = "super-secret";
383-const hash = await Bun.password.hash(password);
384-
385-// Verify password
386-const isValid = await Bun.password.verify(password, hash);
387-console.log(isValid); // true
388-
389-// With algorithm options
390-const bcryptHash = await Bun.password.hash(password, {
391- algorithm: "bcrypt",
392- cost: 12,
393-});
394-```
395-
396----
397-
398-## 6. Testing
399-
400-### 6.1 Basic Tests
401-
402-```typescript
403-// math.test.ts
404-import { describe, it, expect, beforeAll, afterAll } from "bun:test";
405-
406-describe("Math operations", () => {
407- it("adds two numbers", () => {
408- expect(1 + 1).toBe(2);
409- });
410-
411- it("subtracts two numbers", () => {
412- expect(5 - 3).toBe(2);
413- });
414-});
415-```
416-
417-### 6.2 Running Tests
418-
419-```bash
420-# Run all tests
421-bun test
422-
423-# Run specific file
424-bun test math.test.ts
425-
426-# Run matching pattern
427-bun test --grep "adds"
428-
429-# Watch mode
430-bun test --watch
431-
432-# With coverage
433-bun test --coverage
434-
435-# Timeout
436-bun test --timeout 5000
437-```
438-
439-### 6.3 Matchers
440-
441-```typescript
442-import { expect, test } from "bun:test";
443-
444-test("matchers", () => {
445- // Equality
446- expect(1).toBe(1);
447- expect({ a: 1 }).toEqual({ a: 1 });
448- expect([1, 2]).toContain(1);
449-
450- // Comparisons
451- expect(10).toBeGreaterThan(5);
452- expect(5).toBeLessThanOrEqual(5);
453-
454- // Truthiness
455- expect(true).toBeTruthy();
456- expect(null).toBeNull();
457- expect(undefined).toBeUndefined();
458-
459- // Strings
460- expect("hello").toMatch(/ell/);
461- expect("hello").toContain("ell");
462-
463- // Arrays
464- expect([1, 2, 3]).toHaveLength(3);
465-
466- // Exceptions
467- expect(() => {
468- throw new Error("fail");
469- }).toThrow("fail");
470-
471- // Async
472- await expect(Promise.resolve(1)).resolves.toBe(1);
473- await expect(Promise.reject("err")).rejects.toBe("err");
474-});
475-```
476-
477-### 6.4 Mocking
478-
479-```typescript
480-import { mock, spyOn } from "bun:test";
481-
482-// Mock function
483-const mockFn = mock((x: number) => x * 2);
484-mockFn(5);
485-expect(mockFn).toHaveBeenCalled();
486-expect(mockFn).toHaveBeenCalledWith(5);
487-expect(mockFn.mock.results[0].value).toBe(10);
488-
489-// Spy on method
490-const obj = {
491- method: () => "original",
492-};
493-const spy = spyOn(obj, "method").mockReturnValue("mocked");
494-expect(obj.method()).toBe("mocked");
495-expect(spy).toHaveBeenCalled();
496-```
497-
498----
499-
500-## 7. Bundling
501-
502-### 7.1 Basic Build
503-
504-```bash
505-# Bundle for production
506-bun build ./src/index.ts --outdir ./dist
507-
508-# With options
509-bun build ./src/index.ts \
510- --outdir ./dist \
511- --target browser \
512- --minify \
513- --sourcemap
514-```
515-
516-### 7.2 Build API
517-
518-```typescript
519-const result = await Bun.build({
520- entrypoints: ["./src/index.ts"],
521- outdir: "./dist",
522- target: "browser", // or "bun", "node"
523- minify: true,
524- sourcemap: "external",
525- splitting: true,
526- format: "esm",
527-
528- // External packages (not bundled)
529- external: ["react", "react-dom"],
530-
531- // Define globals
532- define: {
533- "process.env.NODE_ENV": JSON.stringify("production"),
534- },
535-
536- // Naming
537- naming: {
538- entry: "[name].[hash].js",
539- chunk: "chunks/[name].[hash].js",
540- asset: "assets/[name].[hash][ext]",
541- },
542-});
543-
544-if (!result.success) {
545- console.error(result.logs);
546-}
547-```
548-
549-### 7.3 Compile to Executable
550-
551-```bash
552-# Create standalone executable
553-bun build ./src/cli.ts --compile --outfile myapp
554-
555-# Cross-compile
556-bun build ./src/cli.ts --compile --target=bun-linux-x64 --outfile myapp-linux
557-bun build ./src/cli.ts --compile --target=bun-darwin-arm64 --outfile myapp-mac
558-
559-# With embedded assets
560-bun build ./src/cli.ts --compile --outfile myapp --embed ./assets
561-```
562-
563----
564-
565-## 8. Migration from Node.js
566-
567-### 8.1 Compatibility
568-
569-```typescript
570-// Most Node.js APIs work out of the box
571-import fs from "fs";
572-import path from "path";
573-import crypto from "crypto";
574-
575-// process is global
576-console.log(process.cwd());
577-console.log(process.env.HOME);
578-
579-// Buffer is global
580-const buf = Buffer.from("hello");
581-
582-// __dirname and __filename work
583-console.log(__dirname);
584-console.log(__filename);
585-```
586-
587-### 8.2 Common Migration Steps
588-
589-```bash
590-# 1. Install Bun
591-curl -fsSL https://bun.sh/install | bash
592-
593-# 2. Replace package manager
594-rm -rf node_modules package-lock.json
595-bun install
596-
597-# 3. Update scripts in package.json
598-# "start": "node index.js" → "start": "bun run index.ts"
599-# "test": "jest" → "test": "bun test"
600-
601-# 4. Add Bun types
602-bun add -d @types/bun
603-```
604-
605-### 8.3 Differences from Node.js
606-
607-```typescript
608-// ❌ Node.js specific (may not work)
609-require("module") // Use import instead
610-require.resolve("pkg") // Use import.meta.resolve
611-__non_webpack_require__ // Not supported
612-
613-// ✅ Bun equivalents
614-import pkg from "pkg";
615-const resolved = import.meta.resolve("pkg");
616-Bun.resolveSync("pkg", process.cwd());
617-
618-// ❌ These globals differ
619-process.hrtime() // Use Bun.nanoseconds()
620-setImmediate() // Use queueMicrotask()
621-
622-// ✅ Bun-specific features
623-const file = Bun.file("./data.txt"); // Fast file API
624-Bun.serve({ port: 3000, fetch: ... }); // Fast HTTP server
625-Bun.password.hash(password); // Built-in hashing
626-```
627-
628----
629-
630-## 9. Performance Tips
631-
632-### 9.1 Use Bun-native APIs
633-
634-```typescript
635-// Slow (Node.js compat)
636-import fs from "fs/promises";
637-const content = await fs.readFile("./data.txt", "utf-8");
638-
639-// Fast (Bun-native)
640-const file = Bun.file("./data.txt");
641-const content = await file.text();
642-```
643-
644-### 9.2 Use Bun.serve for HTTP
645-
646-```typescript
647-// Don't: Express/Fastify (overhead)
648-import express from "express";
649-const app = express();
650-
651-// Do: Bun.serve (native, 4-10x faster)
652-Bun.serve({
653- fetch(req) {
654- return new Response("Hello!");
655- },
656-});
657-
658-// Or use Elysia (Bun-optimized framework)
659-import { Elysia } from "elysia";
660-new Elysia().get("/", () => "Hello!").listen(3000);
661-```
662-
663-### 9.3 Bundle for Production
664-
665-```bash
666-# Always bundle and minify for production
667-bun build ./src/index.ts --outdir ./dist --minify --target node
668-
669-# Then run the bundle
670-bun run ./dist/index.js
671-```
672-
673----
674-
675-## Quick Reference
676-
677-| Task | Command |
678-| :----------- | :----------------------------------------- |
679-| Init project | `bun init` |
680-| Install deps | `bun install` |
681-| Add package | `bun add <pkg>` |
682-| Run script | `bun run <script>` |
683-| Run file | `bun run file.ts` |
684-| Watch mode | `bun --watch run file.ts` |
685-| Run tests | `bun test` |
686-| Build | `bun build ./src/index.ts --outdir ./dist` |
687-| Execute pkg | `bunx <pkg>` |
688-
689----
690-
691-## Resources
692-
693-- [Bun Documentation](https://bun.sh/docs)
694-- [Bun GitHub](https://github.com/oven-sh/bun)
695-- [Elysia Framework](https://elysiajs.com/)
696-- [Bun Discord](https://bun.sh/discord)
697-
698-## Limitations
699-- Use this skill only when the task clearly matches the scope described above.
700-- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
701-- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
.gitignore+0−5
@@ -1,5 +0,0 @@
1-.auth.json
2-node_modules
3-__pycache__
4-*.pyc
5-benchmarks/jobs
.npmignore+0−8
@@ -1,8 +0,0 @@
1-.agents
2-assets
3-benchmarks
4-AGENTS.md
5-BENCHMARK.md
6-biome.json
7-skills-lock.json
8-TODO.md
AGENTS.md+0−96
@@ -1,96 +0,0 @@
1-# Mini coder next
2-
3-A barebones, fast coding agent
4-
5-## Engineering priorities
6-
7-In order of importance:
8-
9-1. Correctness for the current, verified requirement.
10-2. The fewest new concepts, files, types, state, and code paths.
11-3. Readability and long-term maintainability.
12-4. Extensibility only when explicitly required.
13-
14-When multiple solutions are correct, choose the one with the smallest maintenance surface.
15-
16-## Core dependencies
17-
18-**https://github.com/badlogic/pi-mono/tree/main/packages/ai**
19-
20-Plain text readme file: https://raw.githubusercontent.com/badlogic/pi-mono/refs/heads/main/packages/ai/README.md
21-
22-- Provider normalized API, supports oauth logins.
23-
24-**https://github.com/sacenox/cel-tui**
25-
26-- Complete TUI framework, inspired by flexbox.
27-
28-**Bun.js**
29-
30-- `bun` and `bunx` are preferred over their node/npm/yarn/pnpm counterparts.
31-
32-**TypeScript**
33-
34-- Prefer inferred local types and plain object types.
35-- Use generics, conditional types, schemas, and other advanced type machinery only when they provide concrete compile-time value for a current requirement.
36-- Prefer modules and functions over classes, but keep exports minimal.
37-- Define helpers near their use and only extract them when they name a meaningful operation or remove substantial repetition.
38-- Keep constants local unless they are genuinely shared configuration.
39-- Use `SCREAMING_SNAKE_CASE` only for module-level constants that are intentionally shared within that module.
40-
41-## Simplicity and scope
42-
43-- Trace the actual data flow before designing a fix. Apply guards at the narrowest boundary where the invariant matters.
44-- Solve the current observed requirement. Do not add behavior for hypothetical future consumers, reuse, or failure modes.
45-- Keep values and implementation details in the narrowest lexical scope possible.
46-- Inline single-use constants and trivial logic.
47-- Do not create a new module, exported API, type, state object, or configurable abstraction for a single caller unless it substantially clarifies the code.
48-- Prefer a small amount of local duplication over a premature shared abstraction. Extract shared code when multiple real callers require the same policy.
49-- Prefer deleting or replacing obsolete code over layering new behavior around it.
50-- Do not harden adjacent systems unless the requested change depends on it.
51-- Preserve unrelated behavior and avoid opportunistic refactors.
52-- If a change introduces a new abstraction or touches an unrelated subsystem, explain why before implementing it.
53-
54-## Coding style
55-
56-- Prefer plain functions and objects over classes or heavy abstractions.
57-- Keep imports grouped as node built-ins, external packages, then local modules. Use `type` imports for types.
58-- Use 2-space indentation, semicolons, double quotes, and trailing commas in multiline literals/calls.
59-- Name values with `camelCase` and types, schemas, and TUI components with `PascalCase`.
60-- Use explicit types and discriminated unions for non-trivial state and events. Use TypeBox schemas for persisted or parsed data.
61-- Use early returns and guard clauses for validation, missing files, aborts, and fallback cases.
62-- Prefer Bun APIs (`Bun.file`, `Bun.write`, `Bun.spawn`, `Bun.Glob`) for runtime, file, and process work.
63-- Keep async flows readable with `async` functions/generators, `for await`, and explicit `AbortSignal` handling before writes or long work.
64-- In tool runners, report recoverable failures as tool result text instead of throwing; reserve thrown `Error`s for caller-facing validation failures.
65-- Comments should explain why something exists or document non-obvious behavior; use `TODO:` for known follow-up work.
66-
67-## Before finishing
68-
69-After implementing and before formatting or linting, review the diff and ask:
70-
71-- Did I solve the requirement at the correct boundary?
72-- Did I add behavior the user did not request?
73-- Can any new file, export, type, helper, constant, or mutable state be removed or made local?
74-- Is every changed file necessary?
75-- Is there a direct solution with fewer concepts?
76-- Did I preserve unrelated behavior?
77-
78-Simplify the patch before reporting completion.
79-
80-## Benchmarks
81-
82-- Please see `BENCHMARK.md` for Terminal Bench benchmark info, and how to run it.
83-- Never run more than 2 concurrent evals.
84-
85-## Formatting and linting
86-
87-**Always format before linting**
88-
89-- Format root `*.md` files: `bunx prettier --write *.md`
90-- Format typescript files: `bunx biome format --write`
91-
92-Then lint with: `bunx biome check` and `bunx tsc --noEmit`. (Do not expect to see tsc in PATH).
93-
94-**Do not use the `package.json` commands/scripts they are for the users.** Use the commands above instead.
95-
96-> Fix warnings and errors introduced by the patch. Report unrelated existing failures instead of expanding the task unless the user asks you to fix them.
BENCHMARK.md+0−158
@@ -1,158 +0,0 @@
1-# Running Terminal-Bench
2-
3-Harbor is installed in this system with `pipx harbor`.
4-You will need to create a custom agent for your implementation.
5-keep the benchmark jobs in `benchmarks/jobs/*` folder at the root of the repo.
6-Never run harbor evals with more than 2 concurrent evals, be aware of rate limits.
7-
8----
9-
10-[Terminal-Bench](https://tbench.ai) is a benchmark for evaluating the performance of agents on terminal-based tasks. Harbor is the official harness for running Terminal-Bench 2.0.
11-
12-To run Terminal-Bench you will first need to install [Harbor](/docs/getting-started). You'll know that it's installed correctly if you're able to run the oracle solutions for Terminal-Bench 2.0. Note that you will first need to install Docker and have it running on your machine:
13-
14-```bash
15-harbor run -d terminal-bench/terminal-bench-2 -a oracle
16-```
17-
18-You should then be able to try any of the more advanced features offered by Harbor, such as running Terminal-Bench with Claude Code on Daytona:
19-
20-```bash
21-export DAYTONA_API_KEY="<your-daytona-api-key>"
22-export ANTHROPIC_API_KEY="<your-anthropic-api-key>"
23-harbor run \
24- -d terminal-bench/terminal-bench-2 \
25- -m anthropic/claude-haiku-4-5 \
26- -a claude-code \
27- --env daytona \
28- -n 32
29-```
30-
31-## Testing your own agent
32-
33-See our docs on [agents](/docs/agents) (pasted below) for more information on how to test your own agent on Terminal-Bench.
34-
35-## Submitting to the Terminal-Bench leaderboard
36-
37-Leaderboard logs are stored in [this HuggingFace repo](https://huggingface.co/datasets/alexgshaw/terminal-bench-2-leaderboard). To submit your results, open a PR there following the instructions in the README.
38-
39-## Viewing the Terminal-Bench leaderboard
40-
41-You can view the leaderboard [here](https://tbench.ai/leaderboard).
42-
43----
44-
45-# Agents
46-
47-How to evaluate on existing agents and integrate your own. This is particularly useful for benchmarking your agent, optimizing its prompts, using it as a scaffold for RL, or using it to generate SFT datasets.
48-
49-## Existing agents
50-
51-Harbor comes with most popular agents pre-integrated. You can run the following command and reference the `--agent` flag to see a list of all available agents:
52-
53-```bash
54-harbor run --help
55-```
56-
57-Right now, Harbor includes Terminus-2, Claude Code, Copilot CLI, Codex CLI, Gemini CLI, OpenHands, Mini-SWE-Agent, and more.
58-
59-## Integrating your own agent
60-
61-Harbor supports integrating your own agent without having to modify the Harbor source code.
62-
63-There are two types of agents:
64-
65-1. **External agents** which interface with the environment through the `BaseEnvironment` interface, typically by executing bash commands via the `exec` method.
66-2. **Installed agents** which are agents that are installed directly into the container environment and are executed in headless mode. This is how most agents are integrated and comes with the advantage of bringing custom tools.
67-
68-### External agents
69-
70-To build an external agent, you need to implement the `BaseAgent` interface which involved defining the following methods:
71-
72-```python title="my_external_agent.py"
73-from harbor.agents.base import BaseAgent
74-
75-class MyExternalAgent(BaseAgent):
76- @staticmethod
77- def name() -> str:
78- """The name of the agent."""
79- pass
80-
81- def version(self) -> str | None:
82- """The version of the agent."""
83- pass
84-
85- async def setup(self, environment: BaseEnvironment) -> None:
86- """
87- Run commands to setup the agent & its tools.
88- """
89- pass
90-
91- async def run(
92- self,
93- instruction: str,
94- environment: BaseEnvironment,
95- context: AgentContext,
96- ) -> None:
97- """
98- Runs the agent in the environment. Be sure to populate the context with the
99- results of the agent execution. Ideally, populate the context as the agent
100- executes in case of a timeout or other error.
101-
102- Args:
103- instruction: The task instruction.
104- environment: The environment in which to complete the task.
105- context: The context to populate with the results of the agent execution.
106- """
107- pass
108-```
109-
110-### Installed agents
111-
112-To build an installed agent, you need to implement the `BaseInstalledAgent` interface which involves defining the following methods:
113-
114-```python title="my_installed_agent.py"
115-from harbor.agents.installed.base import BaseInstalledAgent, with_prompt_template
116-from harbor.environments.base import BaseEnvironment
117-from harbor.models.agent.context import AgentContext
118-
119-class MyInstalledAgent(BaseInstalledAgent):
120- async def install(self, environment: BaseEnvironment) -> None:
121- """
122- Install the agent in the environment. Use exec_as_root for system
123- packages and exec_as_agent for user-level installs.
124- """
125- await self.exec_as_root(environment, command="apt-get update && apt-get install -y curl")
126- await self.exec_as_agent(environment, command="pip install my-agent")
127-
128- @with_prompt_template
129- async def run(
130- self, instruction: str, environment: BaseEnvironment, context: AgentContext
131- ) -> None:
132- """
133- Run the agent in the environment. The @with_prompt_template decorator
134- automatically applies prompt template rendering to the instruction.
135- Use exec_as_agent to execute commands as the configured agent user.
136- """
137- await self.exec_as_agent(
138- environment,
139- command=f"my-agent run {shlex.quote(instruction)}",
140- )
141-
142- def populate_context_post_run(self, context: AgentContext) -> None:
143- """
144- Populate the context with the results of the agent execution.
145- Called after run() completes. Typically involves parsing trajectory files.
146- """
147- pass
148-```
149-
150-The `exec_as_root` and `exec_as_agent` helpers handle logging, environment variable merging, `set -o pipefail`, and error handling automatically. `exec_as_agent` runs commands as the task's configured agent user (see [`agent.user` in task.toml](/docs/tasks#configuration--metadata)).
151-
152-### Running a custom agent
153-
154-To run a custom agent, you can use the following command:
155-
156-```bash
157-harbor run -d "<dataset@version>" --agent-import-path path.to.agent:SomeAgent
158-```
README.md+0−74
@@ -1,74 +0,0 @@
1-<p align="center">
2- <img src="assets/icon-2-dark-terminal.svg" alt="mini-coder logo" width="112" />
3-</p>
4-
5-<h1 align="center">mini-coder</h1>
6-
7-<p align="center"><strong>Lightning-fast coding agent for your terminal.</strong></p>
8-
9-<p align="center">
10- <a href="https://www.npmjs.com/package/mini-coder">npm</a>
11- ·
12- <a href="https://sacenox.github.io/mini-coder/">docs</a>
13- ·
14- <a href="spec.md">spec</a>
15-</p>
16-
17-<p align="center">
18- <picture>
19- <img src="assets/preview.gif" alt="mini-coder terminal session preview" width="960" style="border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.35);" />
20- </picture>
21-</p>
22-
23-mini-coder (`mc`) is a terminal coding agent, and my hobby project
24-
25-## Install
26-
Cut short: this commit's diff is over 1000 lines.
TODO.md+0−43
Cut short: this commit's diff is over 1000 lines.
assets/icon-1-minimal.svg+0−31
Cut short: this commit's diff is over 1000 lines.
assets/icon-2-dark-terminal.svg+0−48
Cut short: this commit's diff is over 1000 lines.
assets/icon-3-gradient-modern.svg+0−45
Cut short: this commit's diff is over 1000 lines.
assets/icon-4-filled-bold.svg+0−54
Cut short: this commit's diff is over 1000 lines.
assets/icon-5-community-badge.svg+0−63
Cut short: this commit's diff is over 1000 lines.
assets/mc-claude-smart.png+0−0
Binary file, not shown.
assets/mc-gpt-smart.png+0−0
Binary file, not shown.
assets/preview-0-5-0.png+0−0
Binary file, not shown.
assets/preview-0-6-0.png+0−0
Binary file, not shown.
assets/preview.gif+0−0
Binary file, not shown.
benchmarks/break-filter-js-from-html.sh+0−11
Cut short: this commit's diff is over 1000 lines.
benchmarks/filter-js-from-html.sh+0−11
Cut short: this commit's diff is over 1000 lines.
benchmarks/fix-git.sh+0−11
Cut short: this commit's diff is over 1000 lines.
benchmarks/local-harbor-agent.py+0−178
Cut short: this commit's diff is over 1000 lines.
benchmarks/terminal-bench-suite.sh+0−9
Cut short: this commit's diff is over 1000 lines.
bin/mc.ts+0−11
Cut short: this commit's diff is over 1000 lines.
biome.json+0−26
Cut short: this commit's diff is over 1000 lines.
bun.lock+0−350
Cut short: this commit's diff is over 1000 lines.
docs/vnext-direction.md+0−489
Cut short: this commit's diff is over 1000 lines.
nono-mini-coder.json+0−42
Cut short: this commit's diff is over 1000 lines.
package.json+0−30
Cut short: this commit's diff is over 1000 lines.
skills-lock.json+0−10
Cut short: this commit's diff is over 1000 lines.
src/agent.ts+0−347
Cut short: this commit's diff is over 1000 lines.
src/args.ts+0−279
Cut short: this commit's diff is over 1000 lines.
src/git.ts+0−23
Cut short: this commit's diff is over 1000 lines.
src/headless.ts+0−66
Cut short: this commit's diff is over 1000 lines.
src/index.ts+0−62
Cut short: this commit's diff is over 1000 lines.
src/models.ts+0−191
Cut short: this commit's diff is over 1000 lines.
src/oauth.ts+0−147
Cut short: this commit's diff is over 1000 lines.
src/prompt.ts+0−232
Cut short: this commit's diff is over 1000 lines.
src/session.ts+0−91
Cut short: this commit's diff is over 1000 lines.
src/shared.ts+0−181
Cut short: this commit's diff is over 1000 lines.
src/themes.ts+0−333
Cut short: this commit's diff is over 1000 lines.
src/tool-bash.ts+0−76
Cut short: this commit's diff is over 1000 lines.
src/tool-edit.ts+0−121
Cut short: this commit's diff is over 1000 lines.
src/tool-read.ts+0−100
Cut short: this commit's diff is over 1000 lines.
src/tui-components.ts+0−120
Cut short: this commit's diff is over 1000 lines.
src/tui-conversation.ts+0−249
Cut short: this commit's diff is over 1000 lines.
src/tui-editor.ts+0−20
Cut short: this commit's diff is over 1000 lines.
src/tui-overlay.ts+0−471
Cut short: this commit's diff is over 1000 lines.
src/tui.ts+0−323
Cut short: this commit's diff is over 1000 lines.
src/types.ts+0−173
Cut short: this commit's diff is over 1000 lines.
src/update.ts+0−171
Cut short: this commit's diff is over 1000 lines.
tsconfig.json+0−17
Cut short: this commit's diff is over 1000 lines.