@osovv/vv-opencode 2.3.0-rc.7 → 2.3.0-rc.9
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/CHANGELOG.md +34 -0
- package/README.md +18 -12
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/telegram-log.d.ts +12 -0
- package/dist/commands/telegram-log.js +54 -0
- package/dist/commands/telegram-log.js.map +1 -0
- package/dist/commands/telegram-status.d.ts +60 -0
- package/dist/commands/telegram-status.js +305 -0
- package/dist/commands/telegram-status.js.map +1 -0
- package/dist/commands/telegram.d.ts +2 -0
- package/dist/commands/telegram.js +32 -0
- package/dist/commands/telegram.js.map +1 -0
- package/dist/lib/agent-tool-catalog.js +29 -1
- package/dist/lib/agent-tool-catalog.js.map +1 -1
- package/dist/lib/vvoc-config.d.ts +11 -4
- package/dist/lib/vvoc-config.js +17 -4
- package/dist/lib/vvoc-config.js.map +1 -1
- package/dist/plugins/telegram/bot-api.d.ts +2 -2
- package/dist/plugins/telegram/bot-api.js +3 -6
- package/dist/plugins/telegram/bot-api.js.map +1 -1
- package/dist/plugins/telegram/commands.js +8 -20
- package/dist/plugins/telegram/commands.js.map +1 -1
- package/dist/plugins/telegram/config.d.ts +3 -0
- package/dist/plugins/telegram/config.js +5 -1
- package/dist/plugins/telegram/config.js.map +1 -1
- package/dist/plugins/telegram/delivery.d.ts +6 -0
- package/dist/plugins/telegram/delivery.js +26 -0
- package/dist/plugins/telegram/delivery.js.map +1 -1
- package/dist/plugins/telegram/index.js +12 -6
- package/dist/plugins/telegram/index.js.map +1 -1
- package/dist/plugins/telegram/log.d.ts +13 -0
- package/dist/plugins/telegram/log.js +70 -0
- package/dist/plugins/telegram/log.js.map +1 -0
- package/dist/plugins/telegram/sessions.d.ts +12 -4
- package/dist/plugins/telegram/sessions.js +92 -36
- package/dist/plugins/telegram/sessions.js.map +1 -1
- package/dist/plugins/telegram/topology.d.ts +14 -5
- package/dist/plugins/telegram/topology.js +63 -38
- package/dist/plugins/telegram/topology.js.map +1 -1
- package/dist/plugins/web-tools/config.d.ts +4 -4
- package/dist/plugins/web-tools/config.js +17 -4
- package/dist/plugins/web-tools/config.js.map +1 -1
- package/dist/plugins/web-tools/fetch-service.js +27 -5
- package/dist/plugins/web-tools/fetch-service.js.map +1 -1
- package/dist/plugins/web-tools/providers/deepseek.d.ts +23 -0
- package/dist/plugins/web-tools/providers/deepseek.js +173 -0
- package/dist/plugins/web-tools/providers/deepseek.js.map +1 -0
- package/dist/plugins/web-tools/providers/exa.d.ts +2 -2
- package/dist/plugins/web-tools/providers/exa.js +5 -2
- package/dist/plugins/web-tools/providers/exa.js.map +1 -1
- package/dist/plugins/web-tools/schemas.d.ts +58 -3
- package/dist/plugins/web-tools/schemas.js +28 -7
- package/dist/plugins/web-tools/schemas.js.map +1 -1
- package/dist/plugins/web-tools/search-service.js +9 -6
- package/dist/plugins/web-tools/search-service.js.map +1 -1
- package/dist/plugins/workflow/results.d.ts +15 -15
- package/dist/runtime/context.js +37 -3
- package/dist/runtime/context.js.map +1 -1
- package/package.json +2 -2
- package/schemas/vvoc/v3.json +11 -3
- package/templates/skills/vv-execute/references/tool-contracts.md +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## 2.3.0-rc.9 (2026-10-26)
|
|
2
|
+
|
|
3
|
+
### Summary
|
|
4
|
+
|
|
5
|
+
This release adds direct DeepSeek search and fetch support to the provider-neutral web tools, giving users another search and retrieval backend with freshness mapping, bounded rate-limit retries, and credential-safe errors such as insufficient balance. It fixes model-role admission so location-only sessions complete their first turn on the family-qualified variant, and closes the first-work window when a user model choice is observed. Release and harness behavior is also corrected: host and end-to-end evidence now stays under the scratch base instead of the workspace GRACE tree, a missing host-evidence directory reports the exact mkdir command, and prerelease versions are accepted in packed-version assertions. Packaging now mirrors every non-TypeScript source asset into dist and fails the package check when an asset is missing, while a new CI gate runs typecheck, lint, formatting, GRACE markup, and tool-contract checks on pushes and pull requests. The changelog also records the previously shipped vv-reflect environment-reflection dispatcher, read-only vv-reflector subagent, and session-graph extractor, and several test suites were made more deterministic.
|
|
6
|
+
|
|
7
|
+
* docs(changelog): record the vv-reflect v2 and vv-reflector feature shipped in 2.3.0-rc.7 ([225fabe](https://github.com/osovv/vv-opencode/commit/225fabe))
|
|
8
|
+
* fix(contracts): report the exact mkdir command when the host evidence bundle directory is missing ([cdcd0c2](https://github.com/osovv/vv-opencode/commit/cdcd0c2))
|
|
9
|
+
* fix(contracts): write host evidence under the scratch base, not the GRACE active tree ([988ecd3](https://github.com/osovv/vv-opencode/commit/988ecd3))
|
|
10
|
+
* fix(e2e): accept prerelease semver in the activation packed-version assertion ([56abd10](https://github.com/osovv/vv-opencode/commit/56abd10))
|
|
11
|
+
* fix(e2e): write harness evidence under the scratch base, not the GRACE tree ([9319fa9](https://github.com/osovv/vv-opencode/commit/9319fa9))
|
|
12
|
+
* fix(runtime): admit the pre-binding bare-base dispatch of an implicit first turn ([6948e11](https://github.com/osovv/vv-opencode/commit/6948e11))
|
|
13
|
+
* fix(runtime): close the first-work window on a pump-missed user choice ([8d475a2](https://github.com/osovv/vv-opencode/commit/8d475a2))
|
|
14
|
+
* fix(test): restore comment prefix on merged CHANGE_SUMMARY marker line ([b41b7d0](https://github.com/osovv/vv-opencode/commit/b41b7d0))
|
|
15
|
+
* feat(web-tools): add direct DeepSeek search and fetch provider ([fb3d86b](https://github.com/osovv/vv-opencode/commit/fb3d86b))
|
|
16
|
+
* test: use ephemeral loopback ports in the model-roles host smoke ([a55df42](https://github.com/osovv/vv-opencode/commit/a55df42))
|
|
17
|
+
* test(commands): bound registered-CLI spawns through one shared helper ([3b57eed](https://github.com/osovv/vv-opencode/commit/3b57eed))
|
|
18
|
+
* test(e2e): restore LAST_CHANGE and PREVIOUS prefixes in harness CHANGE_SUMMARY ([f9ea5f5](https://github.com/osovv/vv-opencode/commit/f9ea5f5))
|
|
19
|
+
* test(e2e): restore required LAST_CHANGE entry in harness coverage markup ([b92f241](https://github.com/osovv/vv-opencode/commit/b92f241))
|
|
20
|
+
* test(e2e): restore required LAST_CHANGE entry in harness coverage markup ([fe61708](https://github.com/osovv/vv-opencode/commit/fe61708))
|
|
21
|
+
* test(secrets-redaction): reconcile the distinct-context host contract with the pinned host ([5ac63ec](https://github.com/osovv/vv-opencode/commit/5ac63ec))
|
|
22
|
+
* test(workflow): determinize continuation timing and post-finish state reads ([5a32c04](https://github.com/osovv/vv-opencode/commit/5a32c04))
|
|
23
|
+
* ci: add push/PR gate running typecheck, lint, format, grace markup, and tool contracts ([579360f](https://github.com/osovv/vv-opencode/commit/579360f))
|
|
24
|
+
* build: mirror non-ts src assets into dist and gate package check on completeness ([7c9ddf1](https://github.com/osovv/vv-opencode/commit/7c9ddf1))
|
|
25
|
+
|
|
26
|
+
## 2.3.0-rc.8 (2026-10-07)
|
|
27
|
+
|
|
28
|
+
### Summary
|
|
29
|
+
|
|
30
|
+
This release fixes the Telegram bridge so it stays bounded and observable. Topics are now created only for top-level sessions, so child and helper sessions no longer spawn their own topics and instead render as cards in the parent topic. The topic surface is capped at a configurable maxTopics (default 20) most recent sessions, with evicted topics removed via deleteForumTopic, a method the Bot API supports in private chats, and their topic/session rows, mirrors, and outbox records purged so nothing later targets a dead thread. New top-level sessions are adopted immediately on session.created, the event pump now resubscribes and resyncs after a stream end instead of going silent, and a periodic resync keeps the surface current. Plugin diagnostics now append to a bounded log at $XDG_DATA_HOME/vvoc/telegram/telegram.log, and two new commands, vvoc telegram status and vvoc telegram log, report config/token/state/verdict and tail the log so operators can diagnose issues on any machine without reading server code, with the token never printed.
|
|
31
|
+
|
|
32
|
+
* feat(telegram): top-level-only topics, delete-based rotation, log, and status CLI ([59deaaa](https://github.com/osovv/vv-opencode/commit/59deaaa))
|
|
33
|
+
|
|
1
34
|
## 2.3.0-rc.7 (2026-10-05)
|
|
2
35
|
|
|
3
36
|
### Summary
|
|
@@ -5,6 +38,7 @@
|
|
|
5
38
|
This release fixes Telegram delivery so that final messages are actually routed through the rich markdown delivery path instead of bypassing it. Previously, finals could fall through to a plain path, so users could see formatting and markdown rendered incorrectly or inconsistently on Telegram; with this fix, completed responses consistently use the rich markdown renderer, ensuring the delivered message matches the intended formatting.
|
|
6
39
|
|
|
7
40
|
* fix(telegram): actually route finals through the rich markdown delivery path ([ec2e1db](https://github.com/osovv/vv-opencode/commit/ec2e1db))
|
|
41
|
+
* feat(skills): rework vv-reflect into an environment-reflection dispatcher with a read-only vv-reflector subagent on the new seeded reflector role and the bundled session-graph extractor over the OpenCode 2.x session and subagent tree, applied only after per-entry approval ([ec2e1db](https://github.com/osovv/vv-opencode/commit/ec2e1db))
|
|
8
42
|
|
|
9
43
|
## 2.3.0-rc.6 (2026-10-04)
|
|
10
44
|
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ vv-opencode addresses each of these:
|
|
|
31
31
|
- **A state machine for multi-agent work** — explicit work items, required reviewers, round limits, and hard stops instead of free-form subagent loops.
|
|
32
32
|
- **Portable model choices** — agents reference roles like `vv-role:smart` and `vv-role:fast`; you map roles to concrete models per machine or project and switch stacks with one preset command.
|
|
33
33
|
- **Per-model editing** — each model edits through the tool it knows best: DeepSeek gets its `str_replace_editor` contract, GLM/Qwen/Kimi use the host built-in `edit`, GPT keeps the host `apply_patch` path, and unmatched models get the plugin's `hashline_edit`. Routing is resolved dynamically per session and exposes exactly one edit tool to each model.
|
|
34
|
-
- **Provider-neutral web tools** — agents get one canonical `web_search` and `web_fetch` contract backed by Exa, Brave, Z.AI, native retrieval, or Spider, instead of provider-specific search and reader schemas leaking into your prompts.
|
|
34
|
+
- **Provider-neutral web tools** — agents get one canonical `web_search` and `web_fetch` contract backed by Exa, Brave, Z.AI, DeepSeek, native retrieval, or Spider, instead of provider-specific search and reader schemas leaking into your prompts.
|
|
35
35
|
- **Long-run safety** — Guardian auto-approves routine low-risk permissions (risky ones stay in OpenCode's manual approval flow), and secrets are redacted before they reach the model.
|
|
36
36
|
- **Reproducible setup** — `vvoc install` / `vvoc sync` recreate the same workflow on any machine or project.
|
|
37
37
|
|
|
@@ -177,7 +177,7 @@ The server plugins run inside the OpenCode server process; **ContextTuiPlugin**
|
|
|
177
177
|
| **HashlineEditPlugin** | Routes each model to exactly one native edit tool (host `edit` for GLM/Qwen/Kimi, host `apply_patch` for GPT, `str_replace_editor` for DeepSeek, `hashline_edit` for unmatched models) and hides the other edit tools per session. |
|
|
178
178
|
| **SystemContextInjectionPlugin** | Injects universal guidance — including correctness obligations and evidence discipline for behavior changes — plus the work policy selected by the orchestration profile into vv-controller at startup; subagents stay unpolluted. Skill discovery is registered by `vvoc install`/`sync` through the native `skills` config, not by a plugin. |
|
|
179
179
|
| **SecretsRedactionPlugin** | Redacts tokens, keys, emails, and other sensitive values before messages reach the model, restoring them only where local execution needs the originals. |
|
|
180
|
-
| **WebToolsPlugin** | Two provider-neutral tools — `web_search` and `web_fetch` — over Exa, Brave, Z.AI, native retrieval, or Spider, with permission checks and normalized output. |
|
|
180
|
+
| **WebToolsPlugin** | Two provider-neutral tools — `web_search` and `web_fetch` — over Exa, Brave, Z.AI, DeepSeek, native retrieval, or Spider, with permission checks and normalized output. |
|
|
181
181
|
| **ToolHistoryCompactionPlugin** | Shrinks the context replayed to the model by compacting old tool outputs non-destructively, without touching on-disk history. |
|
|
182
182
|
| **AnalyticsPlugin** | Local-only token and cache telemetry per model step, a live `cache NN%` indicator in the TUI, and `vvoc analytics cache-hit-rate` for retrospective comparison. |
|
|
183
183
|
| **PeakHoursPlugin** | Warns or blocks models whose provider is in peak-priced hours right now, suggests connected off-peak providers, and shows a persistent orange banner in the TUI. |
|
|
@@ -696,14 +696,14 @@ Conservatively materialized by `vvoc sync`/`init`; `enforce` blocks only ERROR s
|
|
|
696
696
|
|
|
697
697
|
`TelegramBridgePlugin` runs a single-owner Telegram bot inside the OpenCode server process — no second process, no exposed ports. Enable forum topics for the bot in @BotFather first; the bridge uses the private chat between you and the bot only.
|
|
698
698
|
|
|
699
|
-
The layout is one Telegram DM topic per
|
|
699
|
+
The layout is one Telegram DM topic per **top-level** session, with a fixed **General** topic as the control lane. Child sessions and helper sessions — subagents, and the auto-title `vvoc title` session — never get a topic; their activity renders as a bounded card inside the parent topic. Topic titles carry a live status emoji (⚙️ running, 💤 idle, ❓ question, 🔐 permission, ‼️ error, ⏹ aborted) ahead of the session title. The surface is capped at General plus the `maxTopics` (default 20) most recent top-level sessions: when a newer session pushes an older one out, that topic is **deleted** — the Bot API rejects closing a topic in a private chat, so deletion is the only way to bound the surface, and the evicted thread and its history are removed. New sessions are adopted immediately on creation and a periodic reconcile keeps the surface in sync; `/sync` reconciles on demand.
|
|
700
700
|
|
|
701
701
|
Commands:
|
|
702
702
|
|
|
703
703
|
| Command | Where | What it does |
|
|
704
704
|
|---|---|---|
|
|
705
705
|
| `/new` | General | Pick a project from an inline list; the session is created with that project's default agent and gets its own topic |
|
|
706
|
-
| `/sync` | General | Idempotent reconciliation: create topics for
|
|
706
|
+
| `/sync` | General | Idempotent reconciliation: create topics for top-level sessions missing one, delete evicted ones, report counts |
|
|
707
707
|
| `/status` | General or session topic | Active sessions with context usage, or the current session's state |
|
|
708
708
|
| `/help` | anywhere | Command list |
|
|
709
709
|
| plain text | session topic | Prompt for that session; consecutive texts inside the merge window join into one prompt |
|
|
@@ -723,24 +723,28 @@ Configuration is an optional top-level section of `vvoc.json` (schema v3). The b
|
|
|
723
723
|
"botToken": "${TELEGRAM_BOT_TOKEN}",
|
|
724
724
|
"allowedUserIds": [123456789],
|
|
725
725
|
"activityWindowMinutes": 240,
|
|
726
|
+
"maxTopics": 20,
|
|
726
727
|
"apiRoot": "https://tg.example.com"
|
|
727
728
|
}
|
|
728
729
|
```
|
|
729
730
|
|
|
730
731
|
- `botToken` — a literal or `${VAR}` placeholder resolved from the OpenCode process environment at startup; an unset variable disables the gateway with a value-free diagnostic naming the variable. Prefer the environment or the global vvoc layer; never commit a token.
|
|
731
732
|
- `allowedUserIds` — the numeric Telegram user ids allowed to talk to the bot (get yours from @userinfobot). This is the entire access boundary: single owner, private chat, non-owner messages are ignored.
|
|
732
|
-
- `activityWindowMinutes` — how long a session
|
|
733
|
+
- `activityWindowMinutes` — how long a session counts as active after its last update (default 240).
|
|
734
|
+
- `maxTopics` — how many session topics stay live beside General (default 20, 1..100); older topics are deleted.
|
|
733
735
|
- `apiRoot` or `proxyUrl` — mutually exclusive connectivity modes for restricted corporate networks: a custom Bot API root behind your own reverse proxy, or an outbound proxy URL for `api.telegram.org`.
|
|
734
|
-
- `settings` — delivery defaults: `showReasoning` (default false), `showToolCalls` (default
|
|
736
|
+
- `settings` — delivery defaults: `showReasoning` (default false), `showToolCalls` (default true), `formatMode` (`markdown` default or `raw`), `codeFileMaxKb` (default 100; larger code blocks arrive as file documents), `mergeWindowMs` (default 1500).
|
|
735
737
|
|
|
736
738
|
Durable state (update offset, topic and session map, message mirror, pending finals, settings) lives in the OpenCode plugin storage, scoped to the plugin, and survives `opencode service restart`; a changed bot token resets the stored maps instead of reusing stale bindings. Assistant output streams through draft previews with a throttled edit fallback, finals are delivered exactly once per message across restarts, and all topics share one chat rate budget, so streaming is throttled adaptively. Telegram configuration changes require an OpenCode restart, like other runtime plugins; the `telegram` plugin toggle (`plugins["telegram"]`) is a kill-switch that registers nothing.
|
|
737
739
|
|
|
740
|
+
Diagnose the bridge without opening the server: `vvoc telegram status` reports the resolved toggle and section, a value-free disabled reason (including unresolved `${VAR}` names), live `getMe` token liveness, the bot fingerprint, the General topic id, topic/session/mirror counts, the update offset age, whether the config is newer than the last gateway boot, and a verdict (`--json` for machine output). The plugin also appends token-free diagnostics to `$XDG_DATA_HOME/vvoc/telegram/telegram.log`, readable with `vvoc telegram log [--lines N]` or `vvoc telegram log --path`.
|
|
741
|
+
|
|
738
742
|
### Web tools
|
|
739
743
|
|
|
740
744
|
`WebToolsPlugin` exposes exactly two canonical model-facing tools:
|
|
741
745
|
|
|
742
|
-
- `web_search` requests the `web_search` permission and returns ranked titles, URLs, snippets, and publication dates. Search uses Exa by default, Brave when configured,
|
|
743
|
-
- `web_fetch` requests the `web_fetch` permission and retrieves a known HTTP or HTTPS URL as Markdown, text, raw HTML, or a direct JPEG, PNG, GIF, WebP, or PDF attachment. Fetch uses local native retrieval by default, Spider for configured textual extraction,
|
|
746
|
+
- `web_search` requests the `web_search` permission and returns ranked titles, URLs, snippets, and publication dates. Search uses Exa by default, Brave when configured, the direct Z.AI/Zhipu Tool API for an explicitly selected region, or the direct DeepSeek Search Tool API.
|
|
747
|
+
- `web_fetch` requests the `web_fetch` permission and retrieves a known HTTP or HTTPS URL as Markdown, text, raw HTML, or a direct JPEG, PNG, GIF, WebP, or PDF attachment. Fetch uses local native retrieval by default, Spider for configured textual extraction, the direct Z.AI/Zhipu Reader Tool API, or the direct DeepSeek Fetch Tool API, which always returns Markdown.
|
|
744
748
|
|
|
745
749
|
The `web-tools` vvoc plugin toggle is enabled by default. Provider selection belongs to `vvoc.json`, not to individual model calls:
|
|
746
750
|
|
|
@@ -751,7 +755,7 @@ The `web-tools` vvoc plugin toggle is enabled by default. Provider selection bel
|
|
|
751
755
|
}
|
|
752
756
|
```
|
|
753
757
|
|
|
754
|
-
Supported search providers are `exa` (default), `brave`, and `
|
|
758
|
+
Supported search providers are `exa` (default), `brave`, `zai`, and `deepseek`. Supported fetch providers are `native` (default, no credential required), `spider`, `zai`, and `deepseek`. A `zai` section must set `region` to either `international` or `china`; the plugin never guesses or falls back to another region. The `deepseek` provider requires no region.
|
|
755
759
|
|
|
756
760
|
Both tools validate a closed caller contract before any provider dispatch. `web_search` accepts `query`, an optional `count` (1–20), and an optional `freshness`; `web_fetch` accepts a URL, an optional `format`, and an optional `timeout` in seconds greater than 0 and at most 120 (fractional values such as `0.5` are allowed). Unknown keys, an invalid URL scheme or shape, or an out-of-range provided value are rejected before the permission prompt or any provider request, so no provider is dispatched and no network call is made. Provider credentials are resolved from configuration once at startup as described below; structural validation only prevents the permission prompt, provider dispatch, and network use, and does not re-resolve or override that startup resolution. Document text, binary/media content, and per-call provider or credential selection are never part of the caller contract. Defaults are applied at execution time even when OpenCode forwards raw, unparsed arguments, so the effective behavior is unchanged: an omitted `count` is 8, an omitted `format` is `markdown`, and an omitted `timeout` is 30 seconds (bounded at 120). Provider and credential configuration is still resolved once at startup from `vvoc.json`; changing it takes effect only after restarting OpenCode through the same `vvoc sync` and restart flow as before.
|
|
757
761
|
|
|
@@ -764,9 +768,11 @@ Direct Z.AI endpoint routing:
|
|
|
764
768
|
|
|
765
769
|
The `zai` provider calls these documented REST Tool APIs directly. It does not use MCP, install or manage Z.AI MCP servers, or consume GLM Coding Plan MCP quota. Direct requests require ordinary Z.AI/Zhipu API entitlement and may use paid API balance. For fetch, supported image and PDF URLs still return direct attachments; textual targets are sent to the selected regional Reader endpoint.
|
|
766
770
|
|
|
771
|
+
The `deepseek` provider likewise calls the documented DeepSeek Tool APIs directly — search at `https://api.deepseek.com/v1/tools/search` and fetch at `https://api.deepseek.com/v1/tools/fetch` — with bearer authentication using the same API key as the DeepSeek chat completions API, and it does not use MCP. The search query is forwarded verbatim, including operators such as `site:` and quoted phrases, `freshness` maps to the documented `after:` operator, and search requests snippets only, so full pages go through `web_fetch`, whose DeepSeek route returns Markdown content. Only documented rate-limit responses are retried, with bounded backoff. Direct requests require ordinary DeepSeek API entitlement and may use paid API balance.
|
|
772
|
+
|
|
767
773
|
Credentials resolve in this order:
|
|
768
774
|
|
|
769
|
-
1. `EXA_API_KEY`, `BRAVE_API_KEY`, `SPIDER_API_KEY`, or `
|
|
775
|
+
1. `EXA_API_KEY`, `BRAVE_API_KEY`, `SPIDER_API_KEY`, `ZAI_API_KEY`, or `DEEPSEEK_API_KEY` for the selected provider
|
|
770
776
|
2. `web.search.apiKey` or `web.fetch.apiKey` in the effective `vvoc.json`
|
|
771
777
|
|
|
772
778
|
Environment variables win when both sources exist; config changes take effect after restarting OpenCode. Config `apiKey` values may be literal or use `${VAR}` placeholders resolved from the OpenCode process environment at startup, matching `secretsRedaction.secret`; a placeholder referencing an unset or empty variable logs a startup warning naming the config field and the missing variable names, never values. Placeholder-resolved `apiKey` values become exact-match SecretsRedactionPlugin rules for provider-bound message flows, and WebToolsPlugin diagnostics report only the credential source (`env` or `config`), never the value. If a project-layer `.vvoc/vvoc.json` containing an `apiKey` is tracked by Git, startup logs warn with the file name only. Prefer environment variables or the global vvoc layer; do not commit credentials.
|
|
@@ -837,9 +843,9 @@ bun run release:check # Verify package/schema release consistency
|
|
|
837
843
|
|
|
838
844
|
`bun run contracts:check` is a repository-only, read-only gate: it censuses owned tool registrations independently of the catalog, executes every catalog fixture through the real validators and result schemas, and fails on a fake tool, a missing fixture or result variant, an opaque known object, a changed default, or a stale generated reference. It is part of `bun run check` and requires no network or host process. Run `bun run contracts:generate` only as a deliberate, reviewed step when a contract change is intended — the generated file is checked for currency, so editing it by hand fails the gate.
|
|
839
845
|
|
|
840
|
-
`bun run contracts:host` proves the same contract against the real host. It requires a locally installed `opencode` binary inside the supported window (2.0.18, checked by exact version), a current `bun run build` (it exercises the built `dist/` plugins), pinned native manifests with no stale `@opencode-ai` dependency
|
|
846
|
+
`bun run contracts:host` proves the same contract against the real host. It requires a locally installed `opencode` binary inside the supported window (2.0.18, checked by exact version), a current `bun run build` (it exercises the built `dist/` plugins), and pinned native manifests with no stale `@opencode-ai` dependency. Observed evidence is written under the harness scratch base (`VVOC_E2E_SCRATCH`, default `/tmp/opencode`) as `vvoc-contracts-host-evidence/compatibility-evidence.json`, and the runner creates that directory when missing; evidence never lands inside the workspace or the GRACE change tree, so a run leaves `grace lint` green. The runner never writes into an archive and never finalizes lifecycle state — approval and lifecycle are owned by the GRACE controller. It creates disposable HOME/XDG/config/workspace directories, uses only local built plugin URLs, synthetic agents/messages/credentials, and loopback OpenAI-compatible and Anthropic-compatible responders, and it sends no real provider or paid request. `bun scripts/check-tool-contracts-host.ts --probe` runs the minimal host-seam feasibility test, while the default full run executes the nine-tool matrix and writes `compatibility-evidence.json` only on a full observed pass; a missing executable, an unsupported host version, or any failed scenario exits nonzero instead of recording a skipped success. The generated evidence is one of three distinct levels and never stands in for the separately executed pinned-native unit fixtures (the 2.0.18 schema projection plus OpenAI/Anthropic/Google lowering fixtures) or for real remote-provider acceptance and model quality — paid-provider effectiveness stays explicitly unverified.
|
|
841
847
|
|
|
842
|
-
`bun run e2e:v2` runs the installed-package parity harness (`bun scripts/e2e-v2.ts --full`): it verifies the pinned native OpenCode 2.0.18 binary and packed-tarball hashes, isolates `HOME`/`XDG_*`/scratch state with loopback-only providers and exact PID ownership, exercises the packed core, real-PTY TUI, and installed-surface tiers against the installed package, and writes machine-readable `core-evidence.json` and `parity-evidence.json`
|
|
848
|
+
`bun run e2e:v2` runs the installed-package parity harness (`bun scripts/e2e-v2.ts --full`): it verifies the pinned native OpenCode 2.0.18 binary and packed-tarball hashes, isolates `HOME`/`XDG_*`/scratch state with loopback-only providers and exact PID ownership, exercises the packed core, real-PTY TUI, and installed-surface tiers against the installed package, and writes machine-readable `core-evidence.json` and `parity-evidence.json` under the harness scratch base (`vvoc-e2e-evidence/` beside its scratch directories, `VVOC_E2E_SCRATCH`, default `/tmp/opencode`) — never inside the workspace, so a run leaves no files in the GRACE tree and `grace lint` stays green right after a run. It exits nonzero while any mandatory parity row is unverified beyond an accepted, documented residual. The current evidence records 38 rows: 35 verified, 3 accepted AC-11 residuals (secrets live-session WebSocket cannot be driven offline against this host; the workflow aggregate sub-checks and cancellation-recovery scenario are cross-referenced to the dedicated workflow suites under T-004/wi-20), 0 failed, 0 unverified — with recorded limits including unexercised paid providers and cross-session equal-time first-accept ordering.
|
|
843
849
|
|
|
844
850
|
Git hooks are managed via `lefthook`.
|
|
845
851
|
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// START_MODULE_CONTRACT
|
|
5
5
|
// PURPOSE: Assemble and run the vvoc CLI entrypoint.
|
|
6
6
|
// SCOPE: Package version lookup, top-level command registration including the lint command, and main command execution.
|
|
7
|
-
// DEPENDS: [citty, src/commands/analytics.ts, src/commands/completion.ts, src/commands/config.ts, src/commands/doctor.ts, src/commands/guardian.ts, src/commands/init.ts, src/commands/install.ts, src/commands/launch.ts, src/commands/orchestration.ts, src/commands/lint.ts, src/commands/patch-provider.ts, src/commands/preset.ts, src/commands/plugin.ts, src/commands/role.ts, src/commands/status.ts, src/commands/sync.ts, src/commands/upgrade.ts, src/commands/version.ts, src/lib/package.ts]
|
|
7
|
+
// DEPENDS: [citty, src/commands/analytics.ts, src/commands/completion.ts, src/commands/config.ts, src/commands/doctor.ts, src/commands/guardian.ts, src/commands/init.ts, src/commands/install.ts, src/commands/launch.ts, src/commands/orchestration.ts, src/commands/lint.ts, src/commands/patch-provider.ts, src/commands/preset.ts, src/commands/plugin.ts, src/commands/role.ts, src/commands/status.ts, src/commands/sync.ts, src/commands/telegram.ts, src/commands/upgrade.ts, src/commands/version.ts, src/lib/package.ts]
|
|
8
8
|
// LINKS: [M-CLI-COMMANDS]
|
|
9
9
|
// ROLE: SCRIPT
|
|
10
10
|
// MAP_MODE: LOCALS
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// END_MODULE_MAP
|
|
17
17
|
//
|
|
18
18
|
// START_CHANGE_SUMMARY
|
|
19
|
-
// LAST_CHANGE: [C-
|
|
19
|
+
// LAST_CHANGE: [C-TELEGRAM-TOPIC-HYGIENE T-008 - Registered the telegram command group in the CLI tree.]
|
|
20
20
|
// END_CHANGE_SUMMARY
|
|
21
21
|
import { defineCommand, runMain } from "citty";
|
|
22
22
|
import analytics from "./commands/analytics.js";
|
|
@@ -35,6 +35,7 @@ import plugin from "./commands/plugin.js";
|
|
|
35
35
|
import role from "./commands/role.js";
|
|
36
36
|
import status from "./commands/status.js";
|
|
37
37
|
import sync from "./commands/sync.js";
|
|
38
|
+
import telegram from "./commands/telegram.js";
|
|
38
39
|
import upgrade from "./commands/upgrade.js";
|
|
39
40
|
import version from "./commands/version.js";
|
|
40
41
|
import { getPackageVersion } from "./lib/package.js";
|
|
@@ -63,6 +64,7 @@ const main = defineCommand({
|
|
|
63
64
|
role,
|
|
64
65
|
status,
|
|
65
66
|
sync,
|
|
67
|
+
telegram,
|
|
66
68
|
upgrade,
|
|
67
69
|
version,
|
|
68
70
|
},
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,mBAAmB;AACnB,kBAAkB;AAClB,wBAAwB;AACxB,uDAAuD;AACvD,0HAA0H;AAC1H,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,mBAAmB;AACnB,kBAAkB;AAClB,wBAAwB;AACxB,uDAAuD;AACvD,0HAA0H;AAC1H,sgBAAsgB;AACtgB,4BAA4B;AAC5B,iBAAiB;AACjB,qBAAqB;AACrB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,oEAAoE;AACpE,wCAAwC;AACxC,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,2GAA2G;AAC3G,qBAAqB;AAErB,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,iCAAiC;AACjC,MAAM,cAAc,GAAG,MAAM,iBAAiB,EAAE,CAAC;AAEjD,MAAM,IAAI,GAAG,aAAa,CAAC;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,cAAc;QACvB,WAAW,EACT,+HAA+H;KAClI;IACD,WAAW,EAAE;QACX,SAAS;QACT,UAAU;QACV,MAAM;QACN,MAAM;QACN,QAAQ;QACR,IAAI;QACJ,OAAO;QACP,MAAM;QACN,IAAI;QACJ,aAAa;QACb,gBAAgB,EAAE,aAAa;QAC/B,MAAM;QACN,MAAM;QACN,IAAI;QACJ,MAAM;QACN,IAAI;QACJ,QAAQ;QACR,OAAO;QACP,OAAO;KACR;CACF,CAAC,CAAC;AACH,+BAA+B;AAE/B,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import("citty").CommandDef<{
|
|
2
|
+
readonly lines: {
|
|
3
|
+
readonly type: "string";
|
|
4
|
+
readonly description: "Number of trailing lines to print (default 50).";
|
|
5
|
+
};
|
|
6
|
+
readonly path: {
|
|
7
|
+
readonly type: "boolean";
|
|
8
|
+
readonly default: false;
|
|
9
|
+
readonly description: "Print only the log file path.";
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// FILE: src/commands/telegram-log.ts
|
|
2
|
+
// VERSION: 1.0.0
|
|
3
|
+
// START_MODULE_CONTRACT
|
|
4
|
+
// PURPOSE: Print the tail of the vvoc Telegram plugin log, or its file path.
|
|
5
|
+
// SCOPE: Optional line-count parsing with a bounded default and a path-only flag over the bounded log reader.
|
|
6
|
+
// DEPENDS: [citty, src/plugins/telegram/log.ts]
|
|
7
|
+
// LINKS: [M-CLI-COMMANDS, M-PLUGIN-TELEGRAM-BRIDGE]
|
|
8
|
+
// ROLE: RUNTIME
|
|
9
|
+
// MAP_MODE: EXPORTS
|
|
10
|
+
// END_MODULE_CONTRACT
|
|
11
|
+
//
|
|
12
|
+
// START_MODULE_MAP
|
|
13
|
+
// default - The vvoc telegram log command definition.
|
|
14
|
+
// END_MODULE_MAP
|
|
15
|
+
//
|
|
16
|
+
// START_CHANGE_SUMMARY
|
|
17
|
+
// LAST_CHANGE: [C-TELEGRAM-TOPIC-HYGIENE T-008 - Added the vvoc telegram log command over the bounded plugin log.]
|
|
18
|
+
// END_CHANGE_SUMMARY
|
|
19
|
+
import { defineCommand } from "citty";
|
|
20
|
+
import { getTelegramLogPath, readTelegramLogTail } from "../plugins/telegram/log.js";
|
|
21
|
+
export default defineCommand({
|
|
22
|
+
meta: {
|
|
23
|
+
name: "log",
|
|
24
|
+
description: "Print the tail of the vvoc Telegram plugin log.",
|
|
25
|
+
},
|
|
26
|
+
args: {
|
|
27
|
+
lines: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "Number of trailing lines to print (default 50).",
|
|
30
|
+
},
|
|
31
|
+
path: {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
default: false,
|
|
34
|
+
description: "Print only the log file path.",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
run({ args }) {
|
|
38
|
+
if (args.path === true) {
|
|
39
|
+
console.log(getTelegramLogPath());
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const parsed = typeof args.lines === "string" ? Number.parseInt(args.lines, 10) : Number.NaN;
|
|
43
|
+
const lines = Number.isFinite(parsed) && parsed > 0 ? parsed : 50;
|
|
44
|
+
const tail = readTelegramLogTail(lines);
|
|
45
|
+
if (tail.length === 0) {
|
|
46
|
+
console.log(`(no log yet at ${getTelegramLogPath()})`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
for (const line of tail) {
|
|
50
|
+
console.log(line);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=telegram-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telegram-log.js","sourceRoot":"","sources":["../../src/commands/telegram-log.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,iBAAiB;AACjB,wBAAwB;AACxB,+EAA+E;AAC/E,gHAAgH;AAChH,kDAAkD;AAClD,sDAAsD;AACtD,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,wDAAwD;AACxD,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,qHAAqH;AACrH,qBAAqB;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAErF,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,iDAAiD;KAC/D;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iDAAiD;SAC/D;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,+BAA+B;SAC7C;KACF;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACV,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC,CAAC;YAClC,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;QAC7F,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,MAAM,IAAI,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,kBAAkB,kBAAkB,EAAE,GAAG,CAAC,CAAC;YACvD,OAAO;QACT,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Durable bridge state read from the OpenCode kv table. */
|
|
2
|
+
export type TelegramDurableState = {
|
|
3
|
+
readonly metaFound: boolean;
|
|
4
|
+
readonly generalThreadId: number | null;
|
|
5
|
+
readonly fingerprint: string | undefined;
|
|
6
|
+
readonly topics: number;
|
|
7
|
+
readonly sessions: number;
|
|
8
|
+
readonly mirrors: number;
|
|
9
|
+
readonly offset: number | null;
|
|
10
|
+
readonly offsetUpdatedAtMs: number | null;
|
|
11
|
+
readonly lastActivityMs: number | null;
|
|
12
|
+
};
|
|
13
|
+
/** Full status report rendered by the command. */
|
|
14
|
+
export type TelegramStatusReport = {
|
|
15
|
+
readonly toggleEnabled: boolean;
|
|
16
|
+
readonly enabled: boolean;
|
|
17
|
+
readonly reason: string | undefined;
|
|
18
|
+
readonly missingVars: readonly string[];
|
|
19
|
+
readonly fingerprint: string | undefined;
|
|
20
|
+
readonly tokenOk: boolean;
|
|
21
|
+
readonly botUsername: string | undefined;
|
|
22
|
+
readonly tokenError: string | undefined;
|
|
23
|
+
readonly state: TelegramDurableState;
|
|
24
|
+
readonly restartLikely: boolean;
|
|
25
|
+
readonly verdict: string;
|
|
26
|
+
};
|
|
27
|
+
type ProbeResult = {
|
|
28
|
+
readonly ok: boolean;
|
|
29
|
+
readonly username?: string;
|
|
30
|
+
readonly error?: string;
|
|
31
|
+
};
|
|
32
|
+
/** Injectable seams so the report is testable without network, database, or real tokens. */
|
|
33
|
+
export type TelegramStatusOptions = {
|
|
34
|
+
readonly cwd?: string;
|
|
35
|
+
readonly configDir?: string;
|
|
36
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
37
|
+
readonly loadConfig?: () => Promise<{
|
|
38
|
+
plugins?: unknown;
|
|
39
|
+
telegram?: unknown;
|
|
40
|
+
}>;
|
|
41
|
+
readonly probeToken?: (token: string, apiRoot: string | undefined) => Promise<ProbeResult>;
|
|
42
|
+
readonly readState?: () => Promise<TelegramDurableState>;
|
|
43
|
+
readonly configMtimeMs?: number | undefined;
|
|
44
|
+
readonly logMtimeMs?: number | undefined;
|
|
45
|
+
};
|
|
46
|
+
export declare function collectTelegramStatus(options?: TelegramStatusOptions): Promise<TelegramStatusReport>;
|
|
47
|
+
/** Render a status report as human-readable lines. */
|
|
48
|
+
export declare function renderTelegramStatus(report: TelegramStatusReport): void;
|
|
49
|
+
declare const _default: import("citty").CommandDef<{
|
|
50
|
+
readonly json: {
|
|
51
|
+
readonly type: "boolean";
|
|
52
|
+
readonly default: false;
|
|
53
|
+
readonly description: "Emit the report as JSON.";
|
|
54
|
+
};
|
|
55
|
+
readonly "config-dir": {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
readonly description: "Override the global config home used for vvoc/ and opencode/.";
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
60
|
+
export default _default;
|