Commit Graph

245 Commits

Author SHA1 Message Date
Peter Steinberger b080dd1e76 refactor: consolidate coercion contracts (#122458)
* refactor: consolidate coercion contracts

Centralize exact string, record, numeric, date, Boolean, argument, and structured-error coercions while preserving call-site semantics.

Migrate canonical-name collisions and deprecated internal SDK bypasses, deleting 55 net production/tooling lines. Expand declaration ownership enforcement to 101 allowed helpers and add a narrow export-completeness audit.

* fix: preserve standalone script coercions

Keep copied Control UI tooling self-contained and retain the trusted release harness module-relative source seam when the harness runs against an old target cwd.
2026-08-11 23:26:37 -07:00
Peter Steinberger cad77fb39c refactor: consolidate remaining coercion helpers (#122020) 2026-08-11 10:22:01 -07:00
Peter Steinberger fa03d9b913 refactor: consolidate coercion helpers (#121366)
* refactor: consolidate coercion helpers

* fix: remove duplicate coercion imports

* fix: preserve serialized coercion guard

* chore: ratchet coercion helper carve-outs

* fix(test): keep gauntlet subprocess startup lean

* fix: preserve imported session timestamp semantics

* fix: preserve catalog timestamp string semantics

* chore: align plugin SDK surface ratchet

* fix: preserve trajectory and SDK string contracts

* fix(test): preserve QA record assertion semantics

* fix: complete standalone record guard rename

* refactor(cron): use canonical string coercion

* fix(acpx): preserve Pi timestamp parsing

* test(channels): adapt custody test harnesses

* test(telegram): classify media harness as test support

* test(acpx): split timestamp contract coverage

* test(channels): support generated custody contracts

* chore: ban the full coercion helper name set

Extends the declaration guard to all eleven consolidated helper names and
renames the cron schedule-identity readNumber wrapper to readScheduleInteger
so the banned generic name cannot regrow.

* fix(scripts): repair release-validation guard drift and lint cause

Restores the renamed isJsonRecord guard in assertTrustedWorkflowHarness after
main added isRecord call sites in parallel, and attaches the caught YAML error
as the thrown error cause (preserve-caught-error was red on main).

* fix: preserve Claude timestamp string semantics

* fix: preserve persisted timestamp string semantics

* fix: preserve date-first timestamp contracts

* fix(openai): harden delegation failure formatting

* chore: close coercion helper guard gaps

* test(openai): model non-error delegation rejection

* chore: refresh plugin SDK API contract

* fix(tasks): use canonical string field reader

* fix(ai): use canonical provider error field coercion

* fix(browser): migrate native bootstrap coercion

* docs(plugin-sdk): clarify text record export compatibility

* fix(gateway): normalize approval execution identity

* test(outbound): isolate message action poll harness
2026-08-11 00:02:18 -07:00
Vito Cappello 9320bd379e fix(ollama): enable cloud max thinking (#121074)
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
2026-08-10 19:06:54 -07:00
Peter Steinberger 890a5e895b fix: onboarding stalls or loses progress during interrupted setup (#121415)
* fix: harden onboarding recovery flows

Amp-Thread-ID: https://ampcode.com/threads/T-019fe94a-32da-757b-bff1-caefb6302cd1

* refactor: consolidate onboarding state lifecycles

Amp-Thread-ID: https://ampcode.com/threads/T-019fe94a-32da-757b-bff1-caefb6302cd1

* test: model canonical onboarding config writes

Amp-Thread-ID: https://ampcode.com/threads/T-019fe94a-32da-757b-bff1-caefb6302cd1

* fix: compose onboarding locks across gateway surfaces

Amp-Thread-ID: https://ampcode.com/threads/T-019fe94a-32da-757b-bff1-caefb6302cd1

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-10 02:45:14 -07:00
Peter Steinberger 8cb53c7b55 perf(doctor): keep bundled doctor contract closures dependency-light (#120698)
* perf(doctor): keep bundled doctor contract closures dependency-light

Doctor contract enumeration cold-loads each plugin's doctor-contract-api
closure via jiti, so a static value import of openclaw/plugin-sdk/runtime-doctor
pulled the state-db/kysely graph (~4.3s per closure) into
listPluginDoctorLegacyConfigRules / listPluginDoctorStateMigrationEntries.

- migrate all light doctor-contract closures (66 files) to the
  dependency-light openclaw/plugin-sdk/runtime-doctor-migrations subpath
- voice-call: load detect/repairOpenClawStateDatabaseSchema* lazily inside
  the migration bodies; keep only a type-only static runtime-doctor import
- matrix: split pure credential record shapes/normalizers into
  credentials-state.ts so the doctor closure no longer imports the sync
  plugin-state store through credentials-read
- guard: doctor-contract-closure-guard.test.ts now forbids static value
  imports of runtime-doctor in closures alongside agent-runtime

* fix(matrix): keep credential revocation record type module-local

Knip production scan flags the export as consumer-less; the type is only
referenced by the exported union and revocation guard signature.
2026-08-08 17:51:31 -07:00
Peter Steinberger bc0c3fcd63 refactor(providers): shared generated-media download guard and binary-response adoption (#120351)
* fix(agents): cancel rejected provider binary bodies

* refactor(providers): share generated media downloads

* refactor(providers): adopt payload patch stream wrapper

* fix(providers): preserve generated media helper contracts
2026-08-07 15:45:53 -07:00
Peter Steinberger b4a26783f7 refactor(test): consolidate duplicated requireRecord and provider HTTP mock helpers (#119982)
* refactor(test): consolidate duplicated test helpers

* test: remove stale record guard import

* fix(test): remove orphaned record guards

* refactor(test): keep record requirement messages exhaustively typed

* fix(test): keep packages/ai record guard package-local
2026-08-06 14:48:01 -07:00
Vincent Koc 2fc2fc930b improve(ollama): reduce inactive startup cost (#119745)
* improve(ollama): defer optional runtime imports

Punchcard-Session: coral-workshop-workshop-3f

* improve(ollama): isolate lazy runtime modules

* improve(ollama): preserve lazy runtime boundaries
2026-08-06 07:40:22 +08:00
Vincent Koc f70821908e fix(ollama): activate the model selected during setup 2026-08-04 09:39:02 +08:00
Michael Christenson II 7f7a709b1d fix: Ollama missing from onboarding when its service is reachable (#118020) 2026-08-03 17:49:31 -06:00
Peter Steinberger 084833b324 fix(search): propagate cancellation through provider-owned requests (#118895) 2026-08-03 12:46:17 -07:00
Peter Steinberger d857c8eebc fix(ollama): scope embedding credentials to the selected host (#118753) 2026-08-03 10:09:12 -07:00
Vincent Koc 011691f734 fix(ollama): keep resident model rows private 2026-08-03 12:23:52 +08:00
Vincent Koc 04c8d418e6 refactor(ollama): share resident model discovery 2026-08-03 12:23:52 +08:00
Peter Steinberger b653597020 test(ollama): deduplicate web search fixtures (#118328) 2026-08-02 21:00:03 -07:00
Peter Steinberger c3ea28af61 test(ollama): consolidate stream runtime fixtures (#118419) 2026-08-02 20:39:14 -07:00
Peter Steinberger c6ef95604e refactor(ollama): deduplicate memory embedding test fixtures (#118267) 2026-08-02 17:05:37 -07:00
Peter Steinberger 30c79e4db1 fix(inference): prevent lost cancellation, stuck compaction, and runaway tools (#118146)
* fix(inference): preserve cancellations, compaction, and tool-loop safety

* fix(inference): satisfy Codex and mock-provider type checks

* fix(codex): secure tool-free recovery and restricted turns

* fix(codex): satisfy host-prompt provenance lint
2026-08-02 14:42:01 -07:00
zengLingbiao 397e09e1af fix(ollama): cancel unread auth-failure bodies in web search (#117473)
* fix(ollama): cancel unread auth-failure bodies in web search

(cherry picked from commit 881f191fac)

* fix(ollama): avoid waiting on captured response tees

* chore: keep contributor fix out of release changelog

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-02 19:44:19 +08:00
Peter Steinberger 35a1777f68 refactor(providers): consolidate catalog setup helpers (#117824)
* refactor(providers): consolidate catalog setup helpers

* fix(huggingface): narrow discovered model entries
2026-08-01 22:17:52 -07:00
Peter Steinberger 865a7286c8 fix(ollama): honor model requests and pull completion contracts (#117171)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 20:19:57 -07:00
Peter Steinberger c2b0def137 fix(ollama): stream native tool call lifecycle (#116809)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 05:08:10 -07:00
Leon-SK668 86b1e26993 fix(ollama): resolve web search secret refs (#104829)
* fix(ollama): resolve web search secret refs

* fix(ollama): preserve blocked search secret refs

* fix(ollama): share web search credential policy

* fix(ollama): resolve web search secret refs via shared resolver

Route configured models.providers.ollama.apiKey resolution through the
existing shared resolveWebSearchProviderCredential helper so env-backed
SecretRefs resolve for web search, and resolve the ambient OLLAMA_API_KEY
independently of the configured selected-host key so mixed setups still
reach the Ollama Cloud fallback after both selected-host attempts fail
(regression fixed at web-search-provider.ts:195).

Drop the two optional plugin-SDK resolver hooks (provider normalization
and unavailable-configured-ref callback) added earlier: the fix does not
depend on them, so the shared resolver and its generated plugin-SDK
baseline stay identical to main and no new plugin-SDK contract surface is
introduced. Ollama applies its own non-secret-marker filter locally on
the resolver output instead.

Add a mixed-credential regression test (configured host key plus a
distinct ambient OLLAMA_API_KEY reaching the cloud fallback) and drop the
tests for the removed fail-closed-throw behavior.

* fix(ollama): fail closed on unavailable web search refs

* fix(web-search): resolve env shorthand secret refs

* docs(changelog): note Ollama web-search SecretRef fix

* chore(changelog): remove release-owned entry

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 17:57:47 +08:00
Peter Steinberger 3d0f02c223 fix(ollama): honor stop sequences and async payload hooks (#116737)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 02:57:31 -07:00
wahaha1223 a28219bcee fix(ollama): stop oversized stream records from growing memory (#107473)
* fix(ollama): bound pending NDJSON stream records

* chore(changelog): remove release-owned entry

---------

Co-authored-by: wangmiao0668000666 <wang.miao86@xydigit.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 17:57:01 +08:00
zw-xysk d2b869eda7 fix(ollama): models advertise tools when /api/show fails (#109971)
* fix(ollama): do not advertise tools when /api/show fails

Failed show responses left capabilities undefined, which
buildOllamaModelDefinition treats as optimistic supportsTools.
Match setup inspect: return empty capabilities instead.

* test(ollama): cover show-fail tools gate including L3 live HTTP

Unit paths for HTTP error/throw plus real 127.0.0.1 server proving
buildOllamaProvider keeps supportsTools false when /api/show 500s.

* fix(ollama): keep reasoning heuristics when /api/show fails

Distinguish failed inspection from authoritative empty capabilities
so tools stay conservative without suppressing model-name reasoning.

* test(ollama): cover three capability states for tools and reasoning

Failed show keeps reasoning heuristics; authoritative [] disables both.

* fix(ollama): propagate showInspectionFailed through setup configs

Setup inspection failures now use the three-state marker instead of
authoritative empty capabilities, keeping tools off and reasoning heuristics.

* test(ollama): setup show-fail keeps tools off and reasoning heuristics

Cover interactive setup when /api/show returns 500 for deepseek-r1.

* fix(ollama): propagate showInspectionFailed through dynamic model resolve

/models add dynamic path now builds failed-show definitions with tools
off while preserving reasoning name heuristics.

* test(ollama): dynamic resolve covers failed /api/show three-state behavior

Mock builder matches production tools/reasoning contract for inspection failure.

* fix(ollama): keep catalog-missing dynamic resolve fail-closed on show failure

Failed /api/show is an existence probe for unresolved models; return undefined so typos/404s stay rejected. Tag-discovered and setup paths keep showInspectionFailed tools-off behavior.

* chore(changelog): remove release-owned entry

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 17:37:48 +08:00
NIO 89bfd2150c fix(ollama): use CJK-aware char estimate for usage fallback (#110073)
* fix(ollama): use CJK-aware char estimate for usage fallback

* fix(ollama): keep CJK estimator plugin-private

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 17:37:13 +08:00
dwc1997 2c4886ec40 fix(ollama): release failed setup response bodies before returning (#111802)
* fix(ollama): release failed setup response bodies before returning

* chore(changelog): remove release-owned entry

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 17:32:36 +08:00
Vincent Koc 0822e8d39e fix(qa): preserve missing Ollama cache telemetry (#116424) 2026-07-30 16:37:54 +00:00
Vincent Koc 69f10e72f2 fix(ollama): retry unreachable setup in place (#116210) 2026-07-30 12:23:56 +08:00
Peter Steinberger 8e1ea3048c refactor(ollama): unify model inspection and setup (#115879) 2026-07-29 08:27:41 -04:00
Peter Steinberger 42e9558110 fix(qa): bound paired-node gateway startup readiness (#115693) 2026-07-29 03:45:56 -04:00
Peter Steinberger f466ad0e71 fix(ollama): keep active streams within their idle timeout (#115648)
Retain the existing guarded-fetch timeout callback while consuming native Ollama NDJSON. Prove active slow HTTP streams remain alive and genuine stalls still expire.

Reconstructed from the independently reviewed contributor fix for #94251.

Co-authored-by: Henry <henrybrewer93@icloud.com>
2026-07-29 02:27:02 -04:00
Peter Steinberger 5da5551a5c fix(qa): verify paired Ollama nodes over the gateway (#115644) 2026-07-29 02:18:16 -04:00
Peter Steinberger 032defb172 fix(nodes): cancel paired local inference when callers disconnect (#115624) 2026-07-29 02:00:22 -04:00
Peter Steinberger 1e82025a54 refactor(ollama): unify local model onboarding (#115543)
* refactor(ollama): unify local model onboarding

* fix(ollama): remove obsolete setup max-lines exemption
2026-07-29 01:24:58 -04:00
Peter Steinberger 087f996874 fix(ollama): enforce one paired-node inference deadline (#115558) 2026-07-29 00:59:16 -04:00
Peter Steinberger 25909ef5da fix(ollama): preserve selected model capabilities during onboarding (#115467) 2026-07-28 21:07:48 -04:00
Peter Steinberger 107bc4f963 fix: make gateway nodes and local inference reliable under stress (#115185) 2026-07-28 08:41:14 -04:00
Peter Steinberger a92f85e642 fix(node): cancel remote commands and stabilize local inference (#114935) 2026-07-28 01:03:25 -04:00
Peter Steinberger 577a0642fa fix(plugin-sdk): classify loopback hosts consistently (#114832)
* fix(plugin-sdk): expose loopback host classifier

* fix(ollama): remove stale host normalizer import

* chore: keep release notes in PR context
2026-07-27 22:55:44 -04:00
Peter Steinberger 9bcc44301b fix(nodes): preserve gateway connections and local inference (#114857) 2026-07-27 22:28:32 -04:00
RileyJJY 6de4b47203 fix(ollama): release failed discovery bodies (#109967)
* fix(ollama): release failed discovery bodies

* test(ollama): prove failed discovery sockets close

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 22:20:15 -04:00
Peter Steinberger 43ff420492 fix(providers): preserve local model discovery and retry ownership (#114582) 2026-07-27 09:14:23 -04:00
Peter Steinberger b6c3ff1aa1 fix(providers): make Ollama and LM Studio onboarding reliable (#114405)
* fix(ollama): persist local auth only after model selection

* fix(ollama): preserve native max thinking effort

* fix(lmstudio): preserve model tool capabilities

* fix(lmstudio): preserve configured model compatibility

* test(ollama): prove isolated onboarding and persisted gateway turns

* fix(ollama): fail closed on unresolved secret references

* fix(ollama): keep local onboarding model catalogs installed-only

* fix(onboard): preflight local models before reset

* fix(lmstudio): normalize unsupported tool schema patterns

* Revert "test(ollama): prove isolated onboarding and persisted gateway turns"

This reverts commit 1d333d4c67b6cf43c4def40f93075ac6bda34847.

* Revert "fix(ollama): preserve native max thinking effort"

This reverts commit 5d2600b0982e5bca73b1b5f8b42f660fa5f2473d.

* fix(lmstudio): preserve typed model compatibility

* test(lmstudio): await provider catalog augmentation

* test(ollama): narrow optional discovery auth fixture

* test(lmstudio): narrow reset validator registration

* fix(onboard): preserve verified local model lean defaults

* test(ollama): split non-interactive onboarding auth regressions

* fix(onboard): exclude hosted Ollama models from lean defaults

* test(onboard): prove local reset preflight order
2026-07-27 05:07:29 -04:00
Peter Steinberger 8e4b6623e5 test(providers): consolidate streaming and model contract cases (#114336) 2026-07-27 01:36:32 -04:00
Peter Steinberger f703d803cc chore(models): curate all provider model catalogs to current-generation lineups (#113681)
* chore(models): fleet-wide provider catalog curation

* fix(models): sync provider runtime catalogs and tests with curated manifests

* test(models): align venice lifecycle assertions and copilot auth default with curated catalogs

* test(models): align catalog lifecycle contract checks
2026-07-25 07:21:17 -07:00
Peter Steinberger 3018e8b78a refactor: deduplicate micro helpers onto canonical homes (#113534)
* refactor: deduplicate micro helpers

* fix(ai): keep hash prefix helper internal
2026-07-25 00:41:01 -07:00
Peter Steinberger 2a5ad61ce9 feat(system-agent): constrain planner JSON output at generation time (#113482)
* feat(system-agent): constrain planner JSON output

* fix(ai): align response format request typing

* fix(ai): preserve response format backend contracts
2026-07-24 21:00:28 -07:00