freddie 0.0.93 → 0.0.95
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/AGENTS.md +27 -0
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -366,3 +366,30 @@ Note: kilo + opencode ACP backends return content only, no tool_calls (the LLM-s
|
|
|
366
366
|
|
|
367
367
|
`node scripts/sync-upstream.mjs [--dry-run] [pkg ...]` bumps sibling dep entries (plugsdk, acptoapi, anentrypoint-design, gm-cc) in package.json to `^<latest>` from npm registry, then runs `npm install --package-lock-only`. Skips `file:` deps (local-dev pattern). Wired into `.github/workflows/sync-upstream.yml` (weekly cron + workflow_dispatch) which opens a PR via peter-evans/create-pull-request@v6 when changes land. Dry-run validated: detected `acptoapi: ^1.0.52 -> ^1.0.54`.
|
|
368
368
|
|
|
369
|
+
## Model availability matrix (2026-05-13)
|
|
370
|
+
|
|
371
|
+
`scripts/build-model-availability.js` writes `.gm/model-availability.json` — a Cartesian witness of every (provider × model × mode) cell. Per-cell probe with `PER_CELL_TIMEOUT_MS` (15s default) and `MAX_MODELS_PER_PROVIDER` (5 default). Provider keys read from `.env`. Feeds acptoapi sampler: `probeDirect` and `probeAgentLoop` both call `markOk`/`markFailed` on outcome; both skip when `isAvailable(provider)===false` (sampler-backoff respected).
|
|
372
|
+
|
|
373
|
+
Schema:
|
|
374
|
+
|
|
375
|
+
```
|
|
376
|
+
{
|
|
377
|
+
timestamp, config:{MAX_MODELS_PER_PROVIDER, PER_CELL_TIMEOUT_MS, modes:[7]},
|
|
378
|
+
daemons:{acptoapi_passthrough, freddie_v1, kilo_acp, opencode_acp, claude_cli},
|
|
379
|
+
providers:[{id, key_present, discovery_error, models:[{id, discovered_via, modes:{<mode>:{ok,latency_ms,excerpt?,error?,skipped?,reason?}}, usable_in_any_mode}]}],
|
|
380
|
+
sampler:[{provider, ok, failCount, nextCheckIn}],
|
|
381
|
+
summary:{total_providers, total_models, usable_in_any_mode, per_mode_counts:{<mode>:{ok,fail,skipped}}}
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
7 modes: `direct_api`, `acptoapi_passthrough`, `freddie_v1`, `kilo_acp`, `opencode_acp`, `claude_cli`, `freddie_agent_loop`.
|
|
386
|
+
|
|
387
|
+
6 skipped-reasons: `no_api_key_for_provider`, `sampler_backoff_active`, `daemon_not_running:<PORT>`, `mode_mismatch:<detail>`, `claude_cli_not_installed`, `unknown_mode`.
|
|
388
|
+
|
|
389
|
+
3 dashboard endpoints (registered in `plugins/gui-models-discover/plugin.js`):
|
|
390
|
+
- `GET /api/models/availability` → full JSON (404 with `{error,hint}` if file absent)
|
|
391
|
+
- `GET /api/models/availability/summary` → `{timestamp, daemons, summary}` (truncated)
|
|
392
|
+
- `POST /api/models/availability/rebuild` → 202 `{ok, pid, jobId}` (spawns matrix build; 409 if rebuild already in flight)
|
|
393
|
+
|
|
394
|
+
Sampler integration: agent-loop failures now feed acptoapi's per-provider backoff (5-step 30s→480s). Provider-scoped granularity only — per-(provider,model) would need acptoapi sampler schema change.
|
|
395
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
- `scripts/validate-llm-providers.js`: now invokes the matrix builder by default. `--single-shot` retains the legacy one-model-per-provider behavior; `--with-single-shot` runs both.
|
|
9
9
|
- `test.js`: asserts both `scripts/build-model-availability.js` exists and the `/api/models/availability` endpoint returns 200|404 with valid schema when present.
|
|
10
10
|
|
|
11
|
+
### Fixed
|
|
12
|
+
- `scripts/build-model-availability.js`: `probeAgentLoop` now feeds acptoapi sampler (`markOk`/`markFailed`) symmetric with `probeDirect`, closing the asymmetric-sampler-state gap where agent-loop failures bypassed per-provider backoff. Witnessed 2026-05-13: test.js 12/12 green.
|
|
13
|
+
- `AGENTS.md`: added "Model availability matrix" section documenting the JSON schema, 7 modes, 6 skipped-reasons, and 3 dashboard endpoints (`/availability`, `/availability/summary`, `/availability/rebuild`).
|
|
14
|
+
|
|
11
15
|
### Refactored
|
|
12
16
|
- `src/host/host.js`: createHost split from 111L → 24L body. Helper factories (`makePi`, `makeGui`, `makeCcHooks`, `makeHooksRegistry`, `makeCcLoaders`, plus `reg`/`guard`/`scopedCfg`/`nullStore`) extracted to new `src/host/host_helpers.js`. host.js drops from 197L → 64L, host_helpers.js is 152L. Both well under the 200L hard cap. Witnessed: test.js 12/12 green, plugins>=100, platforms>=18, memory>=8, surface guard + cycle errors still throw.
|
|
13
17
|
- `test.js`: trimmed from 202L → 199L (within the 200L cap) by collapsing redundant blank lines and joining the final two control statements. Every assertion preserved. Witnessed 12/12 green.
|