@nanobpm/nano-coder 0.45.1 → 0.46.1
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 +45 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -164,6 +164,7 @@ src/
|
|
|
164
164
|
│ ├── openai.rs # OpenAI Chat Completions (and compatible servers)
|
|
165
165
|
│ ├── anthropic.rs # Anthropic Messages API
|
|
166
166
|
│ ├── github_copilot.rs # UNOFFICIAL Copilot-subscription provider
|
|
167
|
+
│ ├── muse.rs # UNOFFICIAL Meta Muse Code provider
|
|
167
168
|
│ ├── retry.rs # Retry classification and backoff
|
|
168
169
|
│ └── mock.rs # Offline scripted client
|
|
169
170
|
├── bash.rs # bash tool: timeout, file capture, bounded output
|
|
@@ -451,7 +452,7 @@ not on the next turn). The picker then shows `title · last prompt`. Titles live
|
|
|
451
452
|
so older nano-coders can still read the logs. Deleting `index.jsonl` loses them; a new run then
|
|
452
453
|
asks again on the session's next turn.
|
|
453
454
|
|
|
454
|
-
Flags: `--login github-copilot`, `--list-models PROVIDER`, `--trajectory SESSION_ID [--json|--markdown]`, `--acp`, `--model provider/model` (or `AGENTIC_HARNESS_MODEL`), `--resume [SESSION_ID|last]`, `--list-sessions [--all] [--json]`,
|
|
455
|
+
Flags: `--login github-copilot|muse`, `--list-models PROVIDER`, `--trajectory SESSION_ID [--json|--markdown]`, `--acp`, `--model provider/model` (or `AGENTIC_HARNESS_MODEL`), `--resume [SESSION_ID|last]`, `--list-sessions [--all] [--json]`,
|
|
455
456
|
`--config PATH`, `--verbosity LEVEL` (`-v`), `--sandbox off|workspace|read-only` (or `NANO_CODER_SANDBOX`),
|
|
456
457
|
`--allow RULE` and `--deny RULE` (repeatable; added to the config's rules), `--version` (`-V`).
|
|
457
458
|
|
|
@@ -541,6 +542,7 @@ Built-in presets:
|
|
|
541
542
|
| `ollama` | openai | `http://localhost:11434/v1` | — |
|
|
542
543
|
| `llamacpp` | openai | `http://localhost:8080/v1` | — |
|
|
543
544
|
| `github-copilot` | github-copilot | from session token | `GITHUB_COPILOT_OAUTH_TOKEN` or `--login` (unofficial, see below) |
|
|
545
|
+
| `muse` | muse | from minted key (`--login`); default Meta API endpoint (`META_API_KEY`) | `META_API_KEY` or `--login` (unofficial, see below) |
|
|
544
546
|
| `mock` | mock | — | — |
|
|
545
547
|
|
|
546
548
|
`kind = "openai"` means OpenAI Chat Completions, which also covers vLLM, LM Studio,
|
|
@@ -661,6 +663,8 @@ Endpoints that report levels:
|
|
|
661
663
|
|
|
662
664
|
- **GitHub Copilot:** `/models` lists each model's levels, read with the same request as its
|
|
663
665
|
context window.
|
|
666
|
+
- **Meta Muse Code:** the model catalog (`/muse-code/models`) lists each model's
|
|
667
|
+
`reasoning_effort` tiers, read with the same request as its context window.
|
|
664
668
|
- **Ollama:** a model with the `thinking` capability (`/api/show`) gets `off`, `low`,
|
|
665
669
|
`medium` and `high`. Ollama refuses a level for a model without it, so none is sent then.
|
|
666
670
|
- **llama.cpp:** the loaded model's chat template (`/props`) decides. A template with an
|
|
@@ -711,7 +715,9 @@ Whether a model can see images comes from, in order: a `vision = true|false` ove
|
|
|
711
715
|
(global, `[providers.<name>]`, or `[providers.<name>.models."<model>"]`, like `thinking`);
|
|
712
716
|
what the endpoint reports (GitHub Copilot `/models` `capabilities.supports.vision` and its
|
|
713
717
|
`limits.vision`, Ollama `/api/show`'s `vision` capability, llama.cpp `/props`
|
|
714
|
-
`modalities.vision`);
|
|
718
|
+
`modalities.vision`); a provider assumption (Meta Muse Code's catalog has no vision
|
|
719
|
+
schema, so every visible, non-image-generation chat model is treated as vision-capable);
|
|
720
|
+
and a built-in assumption for current Anthropic and OpenAI model
|
|
715
721
|
families. A model that can't see images gets the text error with a hint to switch models
|
|
716
722
|
or set `vision = true`:
|
|
717
723
|
|
|
@@ -737,8 +743,8 @@ which is the `openai` default), `retry_initial_backoff_ms`, `retry_max_backoff_m
|
|
|
737
743
|
The old top-level `api_key` / `base_url` still work. They apply to `default_provider`,
|
|
738
744
|
which becomes `openai` if it was `mock`.
|
|
739
745
|
|
|
740
|
-
List a provider's models with `--list-models <provider>` (OpenAI-compatible endpoints
|
|
741
|
-
`github-copilot`).
|
|
746
|
+
List a provider's models with `--list-models <provider>` (OpenAI-compatible endpoints,
|
|
747
|
+
`github-copilot` and `muse`).
|
|
742
748
|
|
|
743
749
|
### Local servers on another machine (macOS)
|
|
744
750
|
|
|
@@ -783,6 +789,40 @@ request. `GITHUB_COPILOT_DOMAIN` selects a GHE.com host.
|
|
|
783
789
|
The sanctioned route is the [Copilot SDK](https://github.com/github/copilot-sdk), which
|
|
784
790
|
drives the Copilot CLI's own agent loop rather than exposing the model.
|
|
785
791
|
|
|
792
|
+
### Meta Muse Code (unofficial)
|
|
793
|
+
|
|
794
|
+
The `muse` provider uses a Meta Muse Code subscription by authenticating **as the `muse` CLI
|
|
795
|
+
does**: an RFC 8628 device-code login against `auth.meta.com` with Muse's public OAuth client
|
|
796
|
+
id, a *mint* of that OAuth token for a short-lived Meta API key
|
|
797
|
+
(`POST https://api.meta.ai/muse-code/key`), and model calls carrying Muse's client headers
|
|
798
|
+
against the OpenAI-compatible Meta API at `https://api.meta.ai/v1`. Model calls use the
|
|
799
|
+
OpenAI Responses API (`POST {base}/responses`). Like the Copilot provider this is **not a
|
|
800
|
+
Meta-sanctioned integration**: it
|
|
801
|
+
may breach Meta's terms or your organisation's policy, it can break without notice, and
|
|
802
|
+
misuse could get an account flagged. It is never used unless you select it.
|
|
803
|
+
|
|
804
|
+
The login only establishes *who you are*; your plan is checked at the mint, which returns the
|
|
805
|
+
key plus your account state (`is_subs_active`, `subs_tier_name`, `require_payment`,
|
|
806
|
+
`subs_usage`). So a subscription works through the same `--login muse`: the device flow
|
|
807
|
+
completes, the mint confirms the plan, and calls are served against it. If the mint refuses —
|
|
808
|
+
the account isn't enabled for the Model API, or no payment method/subscription is on it — the
|
|
809
|
+
provider relays Meta's own message and the URL to fix it (`dev.meta.ai` to onboard,
|
|
810
|
+
`accountscenter.meta.com/muse_code` to subscribe), and a lapsed subscription makes calls stop
|
|
811
|
+
until you renew and log in again.
|
|
812
|
+
|
|
813
|
+
```bash
|
|
814
|
+
nano-coder --login muse # interactive; saves the OAuth token + minted key (0600)
|
|
815
|
+
nano-coder --list-models muse
|
|
816
|
+
nano-coder --model muse/muse-spark-1.3
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
Headless workers can't do the device flow; set `META_API_KEY` to a Meta API key instead. Note
|
|
820
|
+
this is **a different credential lane from the subscription**: a raw key is metered/PAYG and
|
|
821
|
+
carries no Muse Code plan, so it will not draw on a subscription (use `--login muse` for
|
|
822
|
+
that). `META_API_KEY` takes priority over a stored login; the minted key and OAuth token live
|
|
823
|
+
in `<data dir>/nano-coder/muse.json`. `MUSE_AUTH_BASE_URL` and `MUSE_MINT_BASE_URL` point the
|
|
824
|
+
login and mint at other hosts.
|
|
825
|
+
|
|
786
826
|
### Retries
|
|
787
827
|
|
|
788
828
|
Retry behaviour comes from unreal-agent's retry logic (MIT). Connection errors and
|
|
@@ -886,6 +926,7 @@ sets the window). The window a server has *loaded* is preferred over the model's
|
|
|
886
926
|
| LM Studio | `/api/v0/models` `loaded_context_length` |
|
|
887
927
|
| Ollama | `/api/ps` for a loaded model, else `num_ctx`; never the model maximum, since Ollama runs with a smaller default |
|
|
888
928
|
| GitHub Copilot | `/models` `max_prompt_tokens` |
|
|
929
|
+
| Meta Muse Code | `/muse-code/models` `context_limit` |
|
|
889
930
|
|
|
890
931
|
Compaction asks the current model to summarize older messages, keeping the recent tail
|
|
891
932
|
(up to 20k tokens, never starting at a tool result). Auto-compaction runs before a model
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanobpm/nano-coder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.1",
|
|
4
4
|
"description": "A 6MB coding agent. Run a fleet on your laptop.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"node": ">=18"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@nanobpm/nano-coder-darwin-arm64": "0.
|
|
35
|
-
"@nanobpm/nano-coder-darwin-x64": "0.
|
|
36
|
-
"@nanobpm/nano-coder-linux-arm64": "0.
|
|
37
|
-
"@nanobpm/nano-coder-linux-x64": "0.
|
|
34
|
+
"@nanobpm/nano-coder-darwin-arm64": "0.46.1",
|
|
35
|
+
"@nanobpm/nano-coder-darwin-x64": "0.46.1",
|
|
36
|
+
"@nanobpm/nano-coder-linux-arm64": "0.46.1",
|
|
37
|
+
"@nanobpm/nano-coder-linux-x64": "0.46.1"
|
|
38
38
|
}
|
|
39
39
|
}
|