mini-coder 0.3.0 → 0.4.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/README.md +2 -2
- package/dist/mc.js +2274 -2287
- package/docs/KNOWN_ISSUES.md +1 -0
- package/docs/design-decisions.md +1 -1
- package/docs/mini-coder.1.md +16 -14
- package/docs/superpowers/plans/2026-03-30-anthropic-oauth-removal.md +61 -0
- package/docs/superpowers/specs/2026-03-30-anthropic-oauth-removal-design.md +47 -0
- package/package.json +1 -1
package/docs/KNOWN_ISSUES.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- AI SDK expands `claude-3-5-haiku` → dated variant that Zen doesn't serve (404).
|
|
6
6
|
- Shell tool: model can `tmux kill-session` the host tmux session if names collide (e.g. audit skill creates session named "audit" matching the user's). Not a code bug — the skill/model just picks a conflicting name. Mitigate via skill wording or session name prefixing.
|
|
7
|
+
- Shell tool output truncation only stops reading stdout/stderr; it does not terminate the underlying process yet. Commands that emit a lot of output and then keep running can still block until they exit or hit timeout.
|
|
7
8
|
|
|
8
9
|
## Features
|
|
9
10
|
|
package/docs/design-decisions.md
CHANGED
|
@@ -20,7 +20,7 @@ A coding agent runs dozens of shell commands per task. Requiring approval for ea
|
|
|
20
20
|
|
|
21
21
|
### Isolation is a separate concern
|
|
22
22
|
|
|
23
|
-
Sandboxing is a real need, but it belongs at the OS/container level — not inside the agent. Tools like [nono](https://nono.sh/) provide proper filesystem and network isolation that the LLM cannot circumvent. This is defense in depth done right: the agent runs unrestricted inside a sandbox that enforces actual boundaries.
|
|
23
|
+
Sandboxing is a real need, but it belongs at the OS/container level — not inside the agent. Tools like [Anthropic Sandbox Runtime (`srt`)](https://github.com/anthropic-experimental/sandbox-runtime) and [nono](https://nono.sh/) provide proper filesystem and network isolation that the LLM cannot circumvent. This is defense in depth done right: the agent runs unrestricted inside a sandbox that enforces actual boundaries.
|
|
24
24
|
|
|
25
25
|
### Our approach
|
|
26
26
|
|
package/docs/mini-coder.1.md
CHANGED
|
@@ -40,9 +40,15 @@ _prompt_
|
|
|
40
40
|
`/model`
|
|
41
41
|
: List all available models.
|
|
42
42
|
|
|
43
|
+
`/models`
|
|
44
|
+
: Alias for `/model`.
|
|
45
|
+
|
|
43
46
|
`/model` _id_
|
|
44
47
|
: Switch model.
|
|
45
48
|
|
|
49
|
+
`/models` _id_
|
|
50
|
+
: Alias for `/model` _id_.
|
|
51
|
+
|
|
46
52
|
`/model effort` _low|medium|high|xhigh|off_
|
|
47
53
|
: Set reasoning effort.
|
|
48
54
|
|
|
@@ -73,14 +79,11 @@ _prompt_
|
|
|
73
79
|
`/mcp remove` _name_
|
|
74
80
|
: Remove MCP server.
|
|
75
81
|
|
|
76
|
-
`/review`
|
|
77
|
-
: Review recent changes (global skill, auto-created at first run).
|
|
78
|
-
|
|
79
82
|
`/login`
|
|
80
83
|
: Show OAuth login status.
|
|
81
84
|
|
|
82
85
|
`/login` _provider_
|
|
83
|
-
: Login via OAuth (opens browser for device flow). Currently supports `
|
|
86
|
+
: Login via OAuth (opens browser for device flow). Currently supports `openai`.
|
|
84
87
|
|
|
85
88
|
`/logout` _provider_
|
|
86
89
|
: Clear saved OAuth tokens.
|
|
@@ -169,29 +172,28 @@ Skills are reusable instruction files at `.agents/skills/<name>/SKILL.md`.
|
|
|
169
172
|
`description`
|
|
170
173
|
: Help text.
|
|
171
174
|
|
|
172
|
-
Skills are
|
|
175
|
+
Skills are auto discovered. To load explicitly:
|
|
173
176
|
|
|
174
177
|
- `/skill-name` in prompts (injects body as a user message).
|
|
175
178
|
- **listSkills** / **readSkill** tools at runtime.
|
|
176
179
|
|
|
177
180
|
Local discovery walks up from cwd to the git worktree root.
|
|
178
181
|
|
|
179
|
-
A default **review** skill is created at `~/.agents/skills/review/SKILL.md` on first run if it doesn't exist. It can be customized or shadowed locally.
|
|
180
|
-
|
|
181
182
|
## CONFIGURATION
|
|
182
183
|
|
|
183
184
|
Config roots: `.agents/`, `.claude/` — local (repo) or global (`~/`).
|
|
184
185
|
|
|
185
|
-
**Context files** (
|
|
186
|
+
**Context files** (global files first, then the nearest local directory with context files):
|
|
186
187
|
|
|
187
|
-
- Global: `~/.agents/AGENTS.md` → `~/.agents/CLAUDE.md`
|
|
188
|
-
- Local: `./.agents/AGENTS.md` → `./CLAUDE.md` → `./AGENTS.md`
|
|
188
|
+
- Global files concatenate in this order: `~/.agents/AGENTS.md` → `~/.agents/CLAUDE.md` → `~/.claude/CLAUDE.md`
|
|
189
|
+
- Local files concatenate in this order within the nearest matching directory (the same nearest-directory precedence applies to both `AGENTS.md` and `CLAUDE.md`): `./.agents/AGENTS.md` → `./.agents/CLAUDE.md` → `./.claude/CLAUDE.md` → `./CLAUDE.md` → `./AGENTS.md`
|
|
189
190
|
|
|
190
191
|
**Precedence:**
|
|
191
192
|
|
|
192
|
-
1. Local
|
|
193
|
-
2.
|
|
194
|
-
3.
|
|
193
|
+
1. Local context is loaded from the nearest directory between cwd and the git root.
|
|
194
|
+
2. Within one scope, matching files are concatenated in the order above.
|
|
195
|
+
3. Global context appears before local context in the system prompt.
|
|
196
|
+
4. Skills: nearest ancestor directory wins.
|
|
195
197
|
|
|
196
198
|
## ENVIRONMENT
|
|
197
199
|
|
|
@@ -216,7 +218,7 @@ Config roots: `.agents/`, `.claude/` — local (repo) or global (`~/`).
|
|
|
216
218
|
## FILES
|
|
217
219
|
|
|
218
220
|
`~/.config/mini-coder/`
|
|
219
|
-
: App data directory (sessions.db,
|
|
221
|
+
: App data directory (sessions.db, with tables for error and other logs).
|
|
220
222
|
|
|
221
223
|
`.agents/` or `.claude/`
|
|
222
224
|
: Config directories for skills and context files.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Anthropic OAuth Removal Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
+
|
|
5
|
+
**Goal:** Remove Claude Code subscription OAuth support without affecting Anthropic API-key access or Zen Claude models.
|
|
6
|
+
|
|
7
|
+
**Architecture:** Delete the Anthropic OAuth provider registration and stop consulting Anthropic OAuth state in discovery/model-info paths. Preserve all direct `ANTHROPIC_API_KEY` behavior and Anthropic-family handling needed by Zen and direct API use.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** Bun, TypeScript, bun:test, SQLite-backed auth storage, AI SDK providers.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
### Task 1: Track the work and lock the user-facing contract
|
|
14
|
+
|
|
15
|
+
**Files:**
|
|
16
|
+
|
|
17
|
+
- Modify: `TODO.md`
|
|
18
|
+
- Reference: `docs/superpowers/specs/2026-03-30-anthropic-oauth-removal-design.md`
|
|
19
|
+
|
|
20
|
+
- [ ] **Step 1: Update TODO.md with active work item**
|
|
21
|
+
- [ ] **Step 2: Keep TODO.md current as tasks complete**
|
|
22
|
+
|
|
23
|
+
### Task 2: Write failing tests for Anthropic OAuth removal
|
|
24
|
+
|
|
25
|
+
**Files:**
|
|
26
|
+
|
|
27
|
+
- Modify: `src/llm-api/providers-resolve.test.ts`
|
|
28
|
+
- Modify: `src/llm-api/model-info.test.ts`
|
|
29
|
+
- Create: `src/session/oauth/auth-storage.test.ts`
|
|
30
|
+
|
|
31
|
+
- [ ] **Step 1: Add a test asserting OAuth providers list only OpenAI**
|
|
32
|
+
- [ ] **Step 2: Add tests asserting Anthropic discovery requires `ANTHROPIC_API_KEY`**
|
|
33
|
+
- [ ] **Step 3: Run focused tests to verify they fail for the expected reason**
|
|
34
|
+
|
|
35
|
+
### Task 3: Remove Anthropic OAuth registration and discovery usage
|
|
36
|
+
|
|
37
|
+
**Files:**
|
|
38
|
+
|
|
39
|
+
- Delete: `src/session/oauth/anthropic.ts`
|
|
40
|
+
- Modify: `src/session/oauth/auth-storage.ts`
|
|
41
|
+
- Modify: `src/llm-api/providers.ts`
|
|
42
|
+
- Modify: `src/llm-api/model-info.ts`
|
|
43
|
+
- Modify: `src/llm-api/model-info-fetch.ts`
|
|
44
|
+
|
|
45
|
+
- [ ] **Step 1: Remove the Anthropic OAuth provider from auth storage**
|
|
46
|
+
- [ ] **Step 2: Remove Anthropic OAuth-based provider discovery/autodiscovery**
|
|
47
|
+
- [ ] **Step 3: Remove Anthropic OAuth-based model list fetching**
|
|
48
|
+
- [ ] **Step 4: Run the focused tests and make them pass**
|
|
49
|
+
|
|
50
|
+
### Task 4: Update CLI/docs and finish verification
|
|
51
|
+
|
|
52
|
+
**Files:**
|
|
53
|
+
|
|
54
|
+
- Modify: `src/cli/commands-help.ts`
|
|
55
|
+
- Modify: `docs/mini-coder.1.md`
|
|
56
|
+
- Modify: `TODO.md`
|
|
57
|
+
|
|
58
|
+
- [ ] **Step 1: Remove Anthropic OAuth mentions from help/manpage**
|
|
59
|
+
- [ ] **Step 2: Run formatting if needed**
|
|
60
|
+
- [ ] **Step 3: Run focused tests, then broader verification commands**
|
|
61
|
+
- [ ] **Step 4: Clear the completed TODO item**
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Anthropic OAuth Removal Design
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Remove Claude Code subscription OAuth support from mini-coder while preserving:
|
|
6
|
+
|
|
7
|
+
- direct Anthropic API key support via `ANTHROPIC_API_KEY`
|
|
8
|
+
- Anthropic-family models served through Opencode Zen (`zen/claude-*`)
|
|
9
|
+
|
|
10
|
+
## Approved behavior
|
|
11
|
+
|
|
12
|
+
- `anthropic` is removed completely from the user-facing OAuth surface.
|
|
13
|
+
- `/login anthropic` is no longer supported and behaves like any unknown provider.
|
|
14
|
+
- `/logout anthropic` is no longer documented or advertised as a supported path.
|
|
15
|
+
- Existing saved Anthropic OAuth rows in SQLite are ignored; no migration or cleanup is required.
|
|
16
|
+
- Anthropic remains available through `ANTHROPIC_API_KEY`.
|
|
17
|
+
- Zen-backed Claude models remain available and unchanged.
|
|
18
|
+
|
|
19
|
+
## Approach
|
|
20
|
+
|
|
21
|
+
Use a narrow OAuth-only removal:
|
|
22
|
+
|
|
23
|
+
1. Remove the Anthropic OAuth provider module and provider registration.
|
|
24
|
+
2. Stop consulting Anthropic OAuth state during provider discovery and model-info refresh visibility.
|
|
25
|
+
3. Keep direct Anthropic provider resolution via `ANTHROPIC_API_KEY`.
|
|
26
|
+
4. Keep Anthropic-family request handling and Zen backend routing unchanged.
|
|
27
|
+
5. Update tests and docs to match the new OAuth surface.
|
|
28
|
+
|
|
29
|
+
## Files in scope
|
|
30
|
+
|
|
31
|
+
- `src/session/oauth/anthropic.ts` — delete
|
|
32
|
+
- `src/session/oauth/auth-storage.ts` — unregister Anthropic OAuth
|
|
33
|
+
- `src/llm-api/providers.ts` — stop treating Anthropic OAuth as connected
|
|
34
|
+
- `src/llm-api/model-info.ts` — stop treating Anthropic OAuth as a refresh/visibility source
|
|
35
|
+
- `src/llm-api/model-info-fetch.ts` — stop fetching Anthropic models via OAuth tokens
|
|
36
|
+
- `src/cli/commands-help.ts` — remove Anthropic OAuth example text
|
|
37
|
+
- `docs/mini-coder.1.md` — document OpenAI-only OAuth support
|
|
38
|
+
- tests around provider discovery/model info — update to be deterministic and Anthropic-OAuth-free
|
|
39
|
+
|
|
40
|
+
## Risks and mitigations
|
|
41
|
+
|
|
42
|
+
- Risk: accidentally breaking direct Anthropic API-key support.
|
|
43
|
+
- Mitigation: keep direct provider resolver and add/update tests that verify `ANTHROPIC_API_KEY` still wins.
|
|
44
|
+
- Risk: accidentally breaking Zen Claude behavior.
|
|
45
|
+
- Mitigation: avoid touching Anthropic-family routing/caching code used for Zen.
|
|
46
|
+
- Risk: stale Anthropic OAuth tokens still affecting behavior.
|
|
47
|
+
- Mitigation: remove all Anthropic OAuth checks from discovery and model fetching paths.
|