Commit Graph
74 Commits
Author SHA1 Message Date
ework-agent 0be2a7a016 docs: align typecheck script references with the src+tests gate (#1970) 2026-10-03 20:20:44 +08:00
ework-agent 5dc12ade4b fix: scope Responses ingress id healing to Bili's msg-proxy namespace (#1474)
sanitizeResponsesInputIds rewrote ANY over-64-char input item id to
msg-fix-<hashId> regardless of item type, renaming provider-issued opaque
ids (reasoning rs_*, function_call fc_*, custom_tool_call, item_reference,
compaction) that upstreams with id-shape validation reject with HTTP 400 on
every turn. The length rewrite now applies only to msg-proxy-* ids — the
exact namespace the #242 healing was written for; everything else crosses
ingress byte-identical.
2026-09-27 14:49:16 +08:00
ework-agent b36c49610b docs(devlog): record L2 gate three-state follow-up (#1158) 2026-09-23 22:56:20 +08:00
ework-agent a5e61db20a fix(dsh-native): persist bootstrap failures to bili.log — GUI stderr is invisible (#1158) 2026-09-23 09:58:25 +08:00
ework-agent 9715fed882 fix: make #1158 diagnostics hypothesis-neutral; log takeover-gate refusals once per endpoint
Owner review refuted the injected-private-fetch root cause with unpacked evidence across all published versions (options?.fetch is undefined end-to-end; the OpenAI SDK falls back to the patched globalThis fetch). The one-shot NO MODEL REQUESTS detection stands regardless of the true cause, so its wording no longer names any single confirmed cause. The dsh takeover gate now logs each distinct refused endpoint once per process with the attribution state at refusal time, making the pending runtime repro one-pass diagnosable.
2026-09-23 09:50:31 +08:00
ework-agent 72a7e44f86 fix: make no-model-request plugin 404 loud and actionable (#1158) 2026-09-23 09:50:31 +08:00
ranxianglei d28ae9e70c Merge pull request #789 from ranxianglei/2026-09-15_788-plugin-removal-notice
fix: name entries dropped by plugin install/remove; neutral /acp no-proxy warning (#788)
2026-09-15 08:55:39 +08:00
ework-agent f12bc0772a fix: name entries dropped by plugin install/remove; neutral /acp no-proxy warning (#788) 2026-09-15 02:22:26 +08:00
ework-agent bd20f519c8 fix(launcher): wrap the bundled opencode plugin in an index.js shim dir for OpenCode 2.x
OC 2.0.x (@opencode/cli) rejects bare file paths in the config plugin array (WARN 'configured plugin path must be a directory'; a directory entry loads its index.js), so bili opencode silently degraded every 2.x launch to proxy mode. New opencodeMajorVersion --version probe (cached, failure -> 1) selects pluginDirMode in prepareOpencodeHttpRewrite, which injects a temp wrapper dir re-exporting dist/agent/opencode.js; 1.x keeps the bare file path. Verified end-to-end on @opencode/cli 2.0.3: [plugin] tool acp_status executed via plugin, zero [acp-loop]. Docs: README + agent comment block + devlog now carry the confirmed 2.0.x facts (both hooks fire, ctx.tool.reload exists, editor.add works with Tab+Enter TUI invocation, run mode dispatches no slash commands).
2026-09-14 23:16:04 +08:00
ranxianglei 6f867a93d4 Merge branch 'master' into 2026-09-13_opencode-v2 2026-09-14 22:08:40 +08:00
ework-agent 80f631cb98 docs(opencode-v2): scope runtime facts to specific builds after #754 review
External report (@jensenojs) showed all four next-17444 pre-release observations invert on 2.0.1 stable (model.request fires, ctx.tool.reload exists, context mutation reaches the wire). Independent probes of two adjacent npm dev builds confirmed the 2.x plugin surface changes between builds (one loads V1-only, the other exposes setup() but no ctx.session/ctx.tool). Docs now state facts per-build, the thin-shell rationale is re-based on single-authority + kernel-drift elimination instead of 'plugins cannot mutate context', and a new test pins setup({}) inert-safety on seam-less hosts. No code behavior change.
2026-09-14 21:45:00 +08:00
boundring 914aa27571 launcher: jcode client — env-only cert-MITM launch path (trae-style)
- LAUNCH_CLIENTS/BaseClientName += jcode; launcherInjectMcp skips it
  (jcode manages its own ~/.jcode/mcp.json)
- buildJcodeEnv: HTTPS_PROXY + SSL_CERT_FILE combined CA +
  BILLION_CONTEXT_PROXY + NO_PROXY localhost/127.0.0.1/::1 so loopback
  model servers stay direct
- discoverRoutes jcode branch whitelists JCODE_DEFAULT_MODEL_HOSTS
  (['api.z.ai']); no TOML config reader yet — extra MITM domains ride
  ambient BILI_MITM_DOMAINS (ceiling noted in devlog)
- ModelWindowScope += jcode (no collector branch, hermes/dsh/qoder/trae
  convention)
- cli help: usage row, list, mechanism para, example
- tests: isLaunchClient, buildJcodeEnv, discoverRoutes jcode cases

155 tests: 154 pass; the one trae-env failure is pre-existing on the
clean tree (ambient NODE_EXTRA_CA_CERTS leak) and unrelated.
2026-09-13 18:36:50 -04:00
ework-agent 80c089c1b2 fix(opencode-v2): honor BILLION_CONTEXT_PLUGIN=0 kill switch in tool forwarding + compaction report
The V2 kill switch only gated header stamping in httpRequestHook; native tool execute() still forwarded to the proxy via proxyBaseFromEnv() (the launcher always sets BILLION_CONTEXT_PROXY) and session.compaction.ended reporting ignored it too — a half-disabled state inconsistent with pi/omp detectProxyBase semantics (fully inert). Gate all three sites with one pluginDisabled() helper; strengthen the kill-switch test to set the proxy env and assert zero tool forwarding.
2026-09-13 22:52:57 +08:00
ework-agent 3e81d74d5d feat: OpenCode 2.0 support — V2 launcher mode + pure-proxy validation (#735)
- src/agent/opencode.ts: V2 branch (setup(ctx)) coexisting with V1 server()
  in one dual-shape default export { id, setup, server } (>=1.18.29);
  native tools compress/decompress/search_context/acp_status(+absorb)
  registered synchronously from bundled schemas (same source as proxy
  manifest, src/compress-tool.ts); header injection via probed working
  hook session.hook("http.request") (model.request registers but never
  fires in OC2 runtime); compaction-boundary reporting via
  session.compaction.ended -> /__bili/plugin/compact
- src/agent/shared.ts: fetchManifest gains "openai" format mapping;
  new reportCompactionBoundary helper
- src/launcher.ts: prepareOpencodeHttpRewrite merges compaction.auto=false
  into temp opencode config (safe on both generations)
- tests/opencode-v2.test.ts: 9 new cases (dual export shape, schema parity,
  inert-without-proxy, kill switch, activation+header timing+tool forwarding,
  env activation, compaction boundary, cleanup dispose, manifest mapping)
- tests/launcher.test.ts: +2 assertions (compaction.auto === false)
- README.md: OpenCode 2.0 section (pure-proxy config incl. apiKey
  requirement, launcher behavior, /acp limitation)
- devlog/2026-09-13_opencode-v2/: DESIGN/REQ/WORKLOG

Verified live against real OpenCode 2.0 pre-release binary: pure-proxy
round-trip OK; plugin mode confirmed ([plugin] tool executed via plugin,
zero [acp-loop] wire injection). typecheck clean, build clean,
tests 1243/1244 (sole failure pre-existing sandbox codex-path issue).
2026-09-13 22:42:58 +08:00
ework-agent 303d3d2fe7 docs: AGENTS.md — require issue tracking for discovered/fixed problems (#584) 2026-09-06 21:57:40 +08:00
ework-agent 29fc896261 fix: acp-loop zero-side-effect truncation retry + well-formed anthropic error stream (#413) 2026-09-02 09:27:34 +08:00
ework-agent 07c8fd1af7 docs: devlog entry for logger rotation orphan-inode fix (#210) 2026-08-28 00:49:43 +08:00
ranxianglei cc679ef240 Merge branch 'master' into 2026-08-26_plugin-identity-sticky 2026-08-26 23:56:03 +08:00
Sisyphus 3f217f94eb fix: identity plugin binding survives model switches across sessions (#162 semantic) 2026-08-26 23:25:48 +08:00
Sisyphus bd90581890 fix: stamp type:message on type-less Responses input items so they enter the kernel (omp wire form) 2026-08-26 21:21:13 +08:00
Sisyphus 270476d291 fix: address review follow-ups on plugin passthrough strip — non-streaming JSON parity (responses), stream-cut tail flush, multi-line data collapse, malformed content parts preserved 2026-08-26 20:30:52 +08:00
Sisyphus 7e95b488f6 fix: strip model-emitted render tags from plugin-mode passthrough responses (omp native-mode tag-echo loop) 2026-08-26 19:43:21 +08:00
ework-agent 871c6040ce docs: devlog addendum — regression branch now includes #257/#258 review-fix commits 2026-08-26 19:14:02 +08:00
Sisyphus 218c0df6e2 test: joint regression e2e for #257 + #258 2026-08-26 19:10:16 +08:00
Sisyphus 7f33f9e9e9 merge #258: drop whitespace-only Responses message items 2026-08-26 19:01:53 +08:00
Sisyphus 7e7fbb1299 fix: drop whitespace-only Responses message items at ingress (flattened-turn artifact) 2026-08-26 18:52:28 +08:00
Sisyphus f5342f36ab feat: restore omp native plugin mode — essential tools + identity register (#native)
omp 17.x mounts extension tools that omit loadMode under xd:// devices
(invisible to the main turn); declare loadMode:"essential" so the four
ACP tools reach the model natively. omp emits no before_provider_headers,
so bind the conversation via the launcher identity register (#162 path)
once tools are ready — bound sessions run in plugin mode with wire
injection suppressed. before_provider_request doubles as the retry
driver. Full native roundtrip e2e-verified against omp 17.3.8.
2026-08-26 17:43:46 +08:00
Sisyphus 8c1783f411 fix: net post-compress usage credit + hand launcher context windows to the proxy (#252) 2026-08-26 11:37:56 +08:00
Sisyphus 0d7f5d25d1 docs: devlog for joint regression + double review of PR#246/#248 2026-08-26 10:28:34 +08:00
Sisyphus 0da4274aa1 merge: regression test PR#248 2026-08-26 10:07:45 +08:00
Sisyphus 5eec4fe299 docs: devlog for omp zero-config plugin work 2026-08-26 01:40:33 +08:00
Sisyphus 3bcc3eaeec feat: native /acp command for dsh via --patch loader injection
bili dsh now splices a --patch overlay (~/.dsh-bili/.bili-acp.patch.yml)
into dsh's argv, inserting dist/agent/dsh-acp.js (a cordis command plugin,
same shape as dsh-command-compact) into whatever profile boots: a real
/acp slash command on the web/tui surfaces.

- src/agent/dsh-acp.ts: /acp → status panel (fallback=latest), else
  armed-but-idle info (#235 wording), else unreachable error
- src/agent/shared.ts: +fetchStatusLatest (conversationId=dsh placeholder;
  server rejects the empty string)
- src/launcher.ts: +writeDshAcpPatch (independent of the settings rewrite,
  exists with zero custom providers) +dshArgsWithPatch (prepend / after
  'web' / skip for 'plugin' & --dump-default-config)
- tests: launcher 85 (incl. argv assertions in runLaunch dsh e2e),
  tests/dsh-acp.test.ts 4 outcomes; 610/610
2026-08-25 23:06:30 +08:00
Sisyphus 935dc2da0e feat: bili dsh launcher for deepseek-harness (/bili/ rewrite via DSH_HOME overlay + DEEPSEEK_BASE_URL)
- client-config: resolveDshHome / parseDshSettingsYaml / readDshConfig
- launcher: dsh route discovery, prepareDshHome overlay (settings.yaml line
  rewrite, CRLF-preserving, siblings symlinked), runLaunch branch wiring
  BILLION_CONTEXT_PROXY + DEEPSEEK_BASE_URL (built-in deepseek-official route)
- fix(openai adapter): emitCompletion usage numeric fields ?? 0 — undefined
  prompt_tokens/completion_tokens serialized away and strict clients (dsh
  mapUsage) compute NaN → non-JSON-serializable session events
- cli help, README/CONFIGURATION (en+zh), 7 new tests
2026-08-25 22:11:10 +08:00
Sisyphus 30b33244f2 fix: heal already-poisoned Responses rollouts at ingress (#242)
Sanitize over-long input item ids before the projection reads them so
conversations stuck on 400 recover on the next request. Complements the
root-cause fix (hashId remapping) in this branch.
2026-08-25 21:13:53 +08:00
Sisyphus c4eed7cd58 fix: allow remote clients when bound to a non-loopback host (#240)
- setupMitm: new allowRemoteClients flag; remote CONNECT accepted only for
  whitelisted model hosts (blind tunnels stay loopback-only — no open relay)
- server: derive the flag from --host; honest 0.0.0.0 display + [security]
  warning on non-loopback binds
- tests: #77 case extended to the full remote policy matrix
- docs: README/CONFIGURATION remote-agents section (en+zh)
2026-08-25 20:31:31 +08:00
Sisyphus 646ece0137 fix(agent): /acp shows armed/idle info instead of warning before first request
A 404 from the status endpoint on a live proxy means the conversation
has sent no model request yet (e.g. /acp right after bili pi starts) —
not an error. Probe the manifest for liveness+version and show an info
notice; keep the old warning only when the proxy is unreachable.
2026-08-25 09:51:13 +08:00
Sisyphus e0eefadc6d docs: move deleted README usage detail into CONFIGURATION (en+zh) 2026-08-25 09:09:31 +08:00
Sisyphus 1b76449dfe docs: devlog e2e validation of -e injection (linux + windows vm) 2026-08-25 00:57:11 +08:00
Sisyphus 4caec3a600 feat: bili pi injects native plugin via -e when not installed
launcher pi branch prepends pi -e <dist/agent/pi.js> only when the user
has NOT run plugin install pi (mutually exclusive: pi dedups extensions
by resolved path, packages entry vs -e file would double-register).
Uninstalled users now get the native tool panel and /acp out of the box,
matching bili omp / bili opencode behavior.
2026-08-25 00:54:46 +08:00
Sisyphus e0a979bb73 docs: devlog for pi install legacy cleanup + Windows validation 2026-08-25 00:22:49 +08:00
Sisyphus 852966fdb9 docs: devlog follow-up 5 (zh restructure review) 2026-08-24 23:52:21 +08:00
Sisyphus 562f1d11cb docs: plugin-install parity zh/en — which hosts support install, launcher never needs it 2026-08-24 23:35:26 +08:00
Sisyphus ef5f87ea06 docs(devlog): record zh launcher chapter follow-up 2026-08-24 23:33:37 +08:00
Sisyphus 0170829bb7 docs: cover all six launcher clients + backfill changelog 0.1.41-0.1.49 2026-08-24 23:33:37 +08:00
ranxianglei 7d958b1a47 Merge pull request #223 from ranxianglei/2026-08-24_hermes-launcher
feat(launcher): add hermes to the bili launcher (/bili/ rewrite, no MITM)
2026-08-24 23:17:27 +08:00
Sisyphus 61d738ab5b fix(launcher): hermes prepare-failure warning + CRLF preservation 2026-08-24 22:56:40 +08:00
Sisyphus 84f1cc366f fix(openai-sse): settle tool calls at finish, not per-chunk (name-split regression) 2026-08-24 22:50:12 +08:00
Sisyphus 975c90bcec feat(launcher): add hermes to the bili launcher (/bili/ rewrite, no MITM) 2026-08-24 22:07:05 +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