@nanobpm/nano-coder 0.60.1 → 0.62.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.
Files changed (2) hide show
  1. package/README.md +45 -8
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -318,11 +318,9 @@ the [permission rules and sandbox](#permissions-and-sandbox) instead.
318
318
 
319
319
  ## Permissions and Sandbox
320
320
 
321
- Every tool call is checked before it runs, and a blocked call returns an error telling the
322
- model to stop and ask the user rather than work around the block. Headless runs (agent
323
- fleets, `-p`, ACP) never stop to ask for approval; an interactive session prompts once for
324
- the few calls that can be neither approved nor denied automatically (see **Shell loops**
325
- below).
321
+ nano-coder never stops to ask for approval. Every tool call is checked before it runs
322
+ instead, and a blocked call returns an error telling the model to stop and ask the user
323
+ rather than work around the block.
326
324
 
327
325
  **Order of checks:** `deny` rules, then `allow` rules, then the built-in guards. Deny always
328
326
  wins. An allow rule approves a shell command only when *every* command in it matches, so
@@ -356,9 +354,9 @@ wherever the two `gh` commands are, and an unrolled command that is denied or ca
356
354
  is denied. The unroll is capped (64 iterations) and refuses a body that rebinds the loop
357
355
  variable or still expands something at run time after substitution; those fall through to
358
356
  the next rule. A loop that still cannot be verified — a non-literal list, or a static body
359
- command that is not a known read-only utility — is **asked** about once (showing the whole
360
- loop) in an interactive session, and blocked with the usual guidance where no one can answer
361
- (headless `-p`, ACP, a fleet worker). The hard blocks always stand: a command name computed
357
+ command that is not a known read-only utility — **runs when the OS sandbox is on** (the
358
+ sandbox confines what it can write) and is **blocked** with the usual guidance when it is
359
+ off; nano-coder never prompts for it. The hard blocks always stand: a command name computed
362
360
  at run time, `eval`/interpreters (`sh -c`, `python -c`, ...), path-qualified programs outside
363
361
  `/bin`/`/usr/bin`, assignments to `PATH`/`IFS` and other dangerous names, arithmetic-assignment
364
362
  tricks, and writes/redirections to computed targets.
@@ -727,6 +725,45 @@ api_key_env = "BAILIAN_TOKEN_PLAN_API_KEY"
727
725
  as thinking models like K3 require. Set `extra_body = { reasoning_effort = "low" }` to
728
726
  make K3 think less.
729
727
 
728
+ #### Regional OpenRouter workspaces and curated model lists
729
+
730
+ Some OpenRouter workspaces (e.g. Camunda's) reject the global `openrouter.ai` host, so
731
+ the `openrouter` preset fails with them. They accept only the regional hosts
732
+ `us.openrouter.ai` and `eu.openrouter.ai`, and each model is served on just one of them.
733
+ Three provider settings cover this:
734
+
735
+ - `[providers.<name>.models."<model>"]` takes a `base_url`, which overrides the
736
+ provider's for that model, and a display `name`.
737
+ - `list_models = "configured"` makes `/model`, `--list-models` and `/model` Tab completion
738
+ offer only the models configured under `models`, with their names, instead of the
739
+ endpoint's whole `/models` catalogue. The default is `"endpoint"`.
740
+ - `disabled = true` hides a provider (a preset too) from `/providers`, the pickers and
741
+ suggestions. A model spec that names it is an error.
742
+
743
+ ```toml
744
+ model = "openrouter-camunda/moonshotai/kimi-k3"
745
+
746
+ [providers.openrouter]
747
+ disabled = true # the global host is rejected
748
+
749
+ [providers.openrouter-camunda]
750
+ kind = "openai"
751
+ base_url = "https://us.openrouter.ai/api/v1"
752
+ api_key_env = "OPENROUTER_API_KEY"
753
+ list_models = "configured"
754
+
755
+ [providers.openrouter-camunda.models."moonshotai/kimi-k3"]
756
+ name = "Kimi K3"
757
+
758
+ [providers.openrouter-camunda.models."amazon/nova-lite-v1"]
759
+ name = "Nova Lite 1.0"
760
+ base_url = "https://eu.openrouter.ai/api/v1" # served in the EU only
761
+ ```
762
+
763
+ [`examples/openrouter-camunda.toml`](examples/openrouter-camunda.toml) is the full
764
+ equivalent of the `opencode.json` in Camunda's handbook. A model's `"provider": {"api": …}`
765
+ there becomes its `base_url` here.
766
+
730
767
  ### Temperature
731
768
 
732
769
  `temperature` is a number, or `"default"` to send none so the model uses its own default.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanobpm/nano-coder",
3
- "version": "0.60.1",
3
+ "version": "0.62.0",
4
4
  "description": "A 6MB coding agent. Run a fleet on your laptop.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -27,9 +27,9 @@
27
27
  "node": ">=18"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@nanobpm/nano-coder-darwin-arm64": "0.60.1",
31
- "@nanobpm/nano-coder-darwin-x64": "0.60.1",
32
- "@nanobpm/nano-coder-linux-arm64": "0.60.1",
33
- "@nanobpm/nano-coder-linux-x64": "0.60.1"
30
+ "@nanobpm/nano-coder-darwin-arm64": "0.62.0",
31
+ "@nanobpm/nano-coder-darwin-x64": "0.62.0",
32
+ "@nanobpm/nano-coder-linux-arm64": "0.62.0",
33
+ "@nanobpm/nano-coder-linux-x64": "0.62.0"
34
34
  }
35
35
  }