Commit Graph
7 Commits
Author SHA1 Message Date
ework-agent 81befc6dc6 test: wire-contract anti-regression system — parity fakes, goldens, unified ledger (#1304)
Consolidates the #1301 served-surface gate and the #1302 kernel-export gate
into one wire-contract suite and extends it per owner decision on #1304
(items 1+2+3, plus the 4-protocol scripted-client matrix phase):

- tests/wire-contract-fakes.ts: WIRE_RULES ledger (WC-001..WC-006, each with
  production/doc provenance) + strictest-known validation for all four wires
  (anthropic /v1/messages, openai chat, responses, google v1beta) + four
  validation-parity fake upstreams on listen(0) with canned per-wire replies.
- tests/wire-contract.test.ts: four layers — ledger self-check (every rule id
  has a live enforcement clause), A kernel exports, B bili-built surfaces,
  C plugin manifest (default + opt-in), D live proxy-mode forward of one
  client-shaped turn per protocol through the matching fake (asserts the
  forwarded tool set is exactly bili's intended surface and the fake's
  strictest validation accepts it). The anthropic lane reproduces #1299
  end-to-end. Supersedes tests/kernel-pin-wire-schema.test.ts and
  tests/issue1299-anthropic-top-level.test.ts (all their assertions kept).
- tests/wire-contract-golden.test.ts + tests/golden/wire-contract/*.json:
  byte-equal golden snapshots of every advertised tool schema at both layers
  (kernel exports, bili surfaces, plugin manifest default+opt-in); manifest
  version normalized to <VERSION> so release commits don't churn it.
- scripts/update-wire-contract-goldens.ts: explicit regeneration path.
- AGENTS.md §7.3: institutional rule — every upstream rejection/validation
  constraint becomes a permanent wire-contract rule inside the fixing PR;
  the ledger only grows.
2026-09-25 14:18:36 +08:00
ework-agent af65c57362 fix: make dist-import-annotations gate immune to symlinked invocation (review of #1256)
Node resolves entry-point symlinks, so when the gate script is invoked through a symlink (pnpm-style symlinked trees, /tmp -> /private/tmp), process.argv[1] no longer string-matches import.meta.url and the main-module guard silently skipped the whole check (exit 0, no output) — a silent gate death of exactly the class this gate exists to prevent. Compare realpathSync(fileURLToPath(import.meta.url)) against realpathSync(argv[1]) instead. Verified: direct/symlink/copy invocations all run the check; negative case still fails loudly; unit tests pass.
2026-09-24 12:54:00 +08:00
ework-agent 4fc1de2470 fix: strip JSDoc import() annotations from dist bundles — dead opencode plugin lane (#1255)
Non-minified esbuild output keeps class-member JSDoc comments; undici's
{import('./client.js')}-style type annotations therefore survive into every
dist entry. Node's ESM loader ignores them, but opencode's plugin loader
resolves them as real files -> ENOENT -> 'failed to load plugin' -> silent
dead lane for all modern versions under opencode 1.x.

Set minifyWhitespace via tsup's esbuildOptions hook (drops non-legal
comments, keeps structure + license footers) and add a build gate that
fails if relative import()/require() text ever reappears in dist.
2026-09-24 12:27:23 +08:00
ework-agent 927b98cd73 test: add Windows codex overlay MCP-registration check
Headless, key-free verification for the real-machine gap in #686:
confirm that codex accepts the <CODEX_HOME>-bili overlay produced by
`bili codex` and registers the bili MCP server, on a hosted Windows
runner. Uses `codex mcp list` (reads config.toml only, never calls a
model) so no E2E_UPSTREAM_* secrets are needed.

Refs #686
2026-09-10 22:36:01 +08:00
ework-agent c6d1f2c88f feat: clamp effective window to codex's model perception for codex clients (#321 PR-E1) 2026-08-29 01:21:59 +08:00
Sisyphus 82c0d8793c feat(registry): bundle the ENTIRE models.dev registry (282KB, 355 models, all fields) 2026-08-24 18:41:36 +08:00
Sisyphus 605a917754 feat(registry): bundle a slim models.dev snapshot as the offline floor (351 models, 12KB) 2026-08-24 18:35:26 +08:00