10 Commits
Author SHA1 Message Date
0e4b1bab56 feat(providers): accept OpenCode 1.18.31-1.19.4 through an explicit verified set (#713)
* feat(providers): accept OpenCode 1.18.31-1.18.34 version range

- Replace the exact pin with inclusive _OPENCODE_MIN_VERSION /
  _OPENCODE_MAX_VERSION triplets; _parse_opencode_version returns
  a triple and both gates (preflight + auth check) share one
  range predicate; prereleases and unparsable output still fail
  closed; the debug-config subset check is untouched
- 14 new boundary cases: parse accept (.31-.34) / reject (.30,
  .35, prerelease, garbage, empty); probe accept / reject; RED
  witnessed on the exact pin before the cutover
- Verified: tests/provider 55 passed, 3 skipped (pre-existing
  POSIX-only skips); ruff + format + diff-check clean; live
  matrix .31/.32/.33/.34 all green (auth + preflight +
  isolated live run + run --help diff)
- Ponytail review: lean, no findings

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>

* fix(providers): answer range review with explicit version set

- Replace the MIN/MAX window with _OPENCODE_SUPPORTED_VERSIONS,
  a frozenset of the 4 verified triples; the predicate is
  membership, so a raised MAX can never silently admit an
  unverified patch; error text keeps the 1.18.31-through-1.18.34
  wording
- README + DEVELOPMENT list the verified releases; prereleases
  fail closed
- Comments carry per-version evidence; TEST_HOME/MANAGED
  overrides confirmed per window; gate documented load-bearing,
  not belt-and-suspenders
- tests: predicate-call rewrites, frozenset membership pin,
  fake-binary preflight at .30/.35 (RED: missing name)
- Verified: file 58/5, provider+unit 140/5, ruff clean

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>

* fix(providers): widen verified OpenCode set to 1.19.3

- Add (1, 19, 1), (1, 19, 2), (1, 19, 3) to
  _OPENCODE_SUPPORTED_VERSIONS; nine explicit triples, never a
  range
- Evidence beside the set: per-release live matrix with exact
  nonce replies, auth-list shape byte-identical, preflight PASS;
  run --help byte-identical across 1.19.1-1.19.3 (sole delta vs
  1.19.0: hidden --share flag, session sharing discontinued);
  plugin packages pinned identically across 1.19.0-1.19.3 in
  bun.lock and no in-tree plugin source changed (the check review
  asked to keep next to the set)
- Boundary tests move with the edge: accept 1.19.1-1.19.3; reject
  1.19.4 at parse, probe and preflight levels; set pin covers
  nine
- Docs: README table + fail-closed note and DEVELOPMENT list nine
- Verified: provider + agent_cli suites 155 passed, 10 skipped;
  ruff check + format and git diff --check clean

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Zen DeepSeek V4.1 Flash Free (200K context) <noreply@opencode.ai>

* fix(providers): widen verified OpenCode set to 1.19.4

- Add (1, 19, 4) to _OPENCODE_SUPPORTED_VERSIONS; ten explicit
  triples, never a range
- Evidence beside the set: same live matrix with exact nonce replies,
  auth-list and both --help surfaces byte-identical to 1.19.3, plugin
  packages and in-tree plugin source unchanged from 1.19.3
- Boundary tests move with the edge: accept 1.19.4; reject 1.19.5 at
  parse, probe and preflight levels
- Docs: README table + fail-closed note and DEVELOPMENT list 1.19.4
- Verified: provider suite 72 passed, 6 skipped; ruff check + format
  and git diff --check clean

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode DeepSeek V4.1 Flash Free (1M context) <noreply@anthropic.com>

---------

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-authored-by: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
Co-authored-by: OpenCode DeepSeek V4.1 Flash Free (1M context) <noreply@anthropic.com>
2026-10-28 09:07:17 -07:00
elliottwaves-20andClaude Opus 5.5 22cec46672 docs(providers): describe the plugin scope precisely and pin the env scrub
The _build_opencode_argv docstring still said the runner disables plugins;
only external plugins are off, the internal OAuth/provider plugins stay
enabled. The isolation test now also feeds an ambient
OPENCODE_DISABLE_DEFAULT_PLUGINS=1, which the sandbox must scrub so a user
environment cannot switch the OAuth logins back off.

Refs #809

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: elliottwaves-20 <pail1217@web.de>
2026-10-09 00:18:40 +02:00
elliottwaves-20andClaude Opus 5.5 8cc9c17a1c fix(providers): keep OpenCode's internal plugins so OAuth logins work
OPENCODE_DISABLE_DEFAULT_PLUGINS=1 skips every internal OpenCode plugin.
In OpenCode 1.18.33 those plugins implement the OAuth logins (ChatGPT via
CodexAuthPlugin, Copilot, GitLab, ...) and only register auth and
chat.headers/chat.params hooks, no tools. With the flag set, an OAuth
login is never attached and every call fails with "Unexpected server
error", although the sandbox is meant to keep the user's existing login
usable. Tool access stays denied by the deny-all agent and
OPENCODE_PERMISSION, and external plugins stay off through --pure /
OPENCODE_PURE.

Fixes #809

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: elliottwaves-20 <pail1217@web.de>
2026-10-08 23:59:04 +02:00
yashrajbasav d41ab95703 Merge commit 'ce44b61bc9e580c613728cfff9ba66d1c937f3c6' into yashraj/allowlist-agent-cli-environment
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-05 21:29:35 +05:30
yashrajbasav 2b00db0bc2 fix(security): allowlist agent CLI environment variables
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-05 11:00:53 +05:30
Yoseph ZuskinandOpenCode Muse Spark 1.3 Free 56b900328f fix(providers): surface Zen free-tier refusal as actionable error
- run_agent_cli maps the Zen FreeTierError envelope (403 under the
  deny-all isolation, verified by env bisect, re-observed
  live 2026-10-03) to a fail-closed AgentCLIError naming the
  incompatibility and suggesting a key-backed model; plain non-zero
  exits keep the generic message
- No sandbox weakening: refusal never falls back to a weaker policy
- Verified: 2 new cross-platform tests (fake Popen); file suite
  43 passed / 3 skipped; ruff check + format + diff-check clean

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
2026-10-03 20:41:31 -04:00
Yoseph ZuskinandOpenCode Muse Spark 1.3 Free dbe13870aa feat(providers): verify OpenCode 1.18.33 for the deny-all policy
- Bump _OPENCODE_SUPPORTED_VERSION 1.18.32 -> 1.18.33 plus all
  version references (code comments, test fixtures, README pin
  note, DEVELOPMENT); run --help flags identical across the bump,
  no policy changes
- Live 1.18.33 evidence: nonce probe returns the exact echo with
  unchanged envelope shapes (one additive part.metadata.openai.itemId
  field, ignored by the parser); _preflight_opencode_policy passes
  against the real binary (version gate + all 12 sensitive settings
  + agent deny, no auth or inference required)
- Verified: file suite 41 passed / 3 skipped; ruff + format clean
- Note: full provider-path inference stays blocked by the known
  isolation x auth limitation (pre-existing, version-independent,
  tracked separately)

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
2026-09-28 19:10:03 -04:00
Yoseph ZuskinandOpenCode Muse Spark 1.3 Free 1d60524f58 feat(providers): verify OpenCode 1.18.32 for the deny-all policy
- Bump _OPENCODE_SUPPORTED_VERSION 1.18.31 -> 1.18.32 plus all
  version references (code comments, test fixtures, README pin
  note, DEVELOPMENT); run --help flags identical across the bump,
  no policy changes
- Verified: file suite 41 passed / 3 skipped; ruff + format clean;
  version gate passes on real 1.18.32; raw default-model inference
  returns the exact nonce with valid envelope
- Note: full provider-path inference stays blocked by the known
  isolation x auth limitation (pre-existing, version-independent);
  Groq llama-3.3-70b-versatile and llama-3.1-8b-instant are retired
  server-side (404), use current IDs for future probes

Fixes #612

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
2026-09-22 23:44:56 -04:00
Yoseph ZuskinandOpenCode Muse Spark 1.3 Free d162d9b343 feat(providers): verify OpenCode 1.18.31 for the deny-all policy (#575)
* feat(providers): verify OpenCode 1.18.31 for the deny-all policy

- Bump _OPENCODE_SUPPORTED_VERSION 1.18.30 → 1.18.31 plus all version
  references (code comments, test fixtures, README pin note, DEVELOPMENT);
  run --help flags identical across the bump, no policy changes
- Fix test_probe_rejects_unverified_version to use 1.18.99 as its
  rejection case (it had hardcoded the new pinned version)
- Verified: provider suites 128 passed; ruff + format clean; live
  self-scan on 1.18.31 via Zen free tier (opencode/mimo-v2.5-free):
  llm_available true, 3/3 calls succeeded, 0 semantic findings

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>

* test(providers): use a version outside both pins in deny-all test

- test_unverified_runtime_version_fails_before_inference faked 1.18.31
  as its rejection case, which stopped failing once the pin bumped to
  it (CI: DID NOT RAISE); fake 1.18.99 instead, wrong under both pins

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>

---------

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-authored-by: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
2026-09-18 03:27:36 -07:00
3479aa6422 feat(providers): add opencode_cli semantic-scan provider (#536)
* feat(providers): add opencode_cli semantic-scan provider

- Add providers/opencode_cli/provider.py and __init__.py mirroring codex_cli
- Register opencode in _agent_cli.py: argv builder (opencode run --format json),
  JSON-event parser, auth check (opencode auth list)
- Wire SKILLSPECTOR_PROVIDER=opencode_cli in providers/__init__.py and
  inference_usage.py
- Update docs trio: README provider table, .env.example, docs/DEVELOPMENT.md
- Add model-registry entries for opencode/nemotron-3-ultra-free and
  opencode/nemotron-3.5-lightning-free (1M context)
- Add tests/provider/test_opencode_cli.py (31 tests: argv, auth, parser,
  wiring, registry label)
- Verified: live probe and self-scan with opencode 1.18.30 (CLI-default
  model), llm_available=true, 3/3 semantic calls succeeded; self-scan of
  the provider package found 0 semantic issues

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
Co-Authored-By: OpenCode Nemotron 3 Ultra Free (1M context) <noreply@opencode.ai>

* fix(opencode): enforce deny-all host policy

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>

---------

Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-authored-by: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
Co-authored-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-authored-by: Narendran Raghavan <32655573+rng1995@users.noreply.github.com>
2026-09-16 19:48:31 +00:00