Repository navigation
Commit 65f31a8
authored
fix: harden Discussion and Agent Core v2 workflows (#273)
## Related Issue
No public issue. This is direct repository-owner requested work for
reported Discussion regressions and approved Agent Core v2
reconciliation.
## Problem
Discussion did not preserve the selected model pair, had no per-role
reasoning effort, exposed inactive state in the composer, and rejected
valid catalog models through the unrelated subagent pool. Live exchanges
could also stop after a late tool call, lose reasoning updates, collapse
completed work, or let one model panel overgrow the other.
Several applicable Agent Core v2 fixes were also missing from this
branch, including provider compatibility, safe command handling, config
formatting preservation, transcript recovery, and Tower workspace-state
safeguards.
## What changed
- Persist Discussion model and effort preferences across sessions,
validate configured catalog models directly, and make New Discussion
reuse the current workspace and saved pair.
- Stream live reasoning in equal-height scrollable panes, keep completed
exchanges expanded, add a persistent reasoning visibility setting,
restore the final agreement/differences/uncertainty comparison, improve
dark model menus, align Dynamic Workflow status dots, and anchor
action/manual-stop toasts above the composer.
- Harden the Discussion workflow against late tool calls, provider-idle
failures, cancellation races, partial participant creation, cleanup
failures, malformed Fusion output, and stale live snapshots without
increasing request limits.
- Reconcile applicable non-breaking Agent Core v2 fixes for Pythinker
Responses, secondary-model routing, telemetry, Tower state, transcript
identity, TOML writeback, and dangerous Bash command approval.
- Update Web, TUI, gateway, klient, docs, tests, changesets, and the
committed Web bundle together.
## Verification
- `pnpm lint` — 0 errors
- `pnpm typecheck`
- `pnpm exec vitest run --maxWorkers=8` — 1,244 files and 21,143 tests
passed
- Focused Agent Core v2, gateway, and Web Discussion suites
- `pnpm run build:web && pnpm run check:web`
- `npm run build` in `docs/`
- `node scripts/check-nix-workspace.mjs`
- `nix build .#pythinker-code --print-build-logs`
- `pnpm package:desktop` and strict deep code-sign verification
- Launched the exact packaged worktree app successfully
Two unrelated timing tests each failed once under unbounded full-suite
saturation. Both passed immediately in isolation; the complete
bounded-worker suite passed cleanly.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [ ] I have linked a related issue. Not applicable: direct
repository-owner requested work; no public issue was authorized.
- [x] I have added tests that prove the behavior works.
- [x] Ran `gen-changesets` skill.
- [x] Ran `gen-docs` skill.1 parent 0d57540 commit 65f31a8
253 files changed
Lines changed: 8091 additions & 2076 deletions
File tree
- .changeset
- apps
- pythinker-code
- dist-web
- assets
- src
- cli/v2
- tui
- commands
- components
- chrome
- messages
- controllers
- test/tui
- commands
- components/chrome
- pythinker-web
- src
- api
- daemon
- components
- chat
- tool-calls
- settings
- ui
- composables
- client
- i18n/locales/en
- icons/pythinker
- lib
- test
- docs
- configuration
- guides
- reference
- packages
- agent-core-v2
- docs
- src
- _base/di
- agent
- llmRequester
- loop
- media
- modeMutex
- permissionPolicy
- policies
- permissionRules
- prompt
- shellCommand
- app
- bootstrap
- config
- sessionIndex
- telemetry
- web
- providers
- features
- skill/catalog/builtin
- tower
- injection
- protocol
- tools
- merge
- spawn
- teardown
- kosong/provider/providers/pythinker
- persistence
- backends/node-fs
- interface
- session
- agentLifecycle
- expertTalk
- subagent
- workspace/sessionLifecycle
- test
- _base/di
- agent
- loop
- modeMutex
- permissionPolicy
- prompt
- app
- config
- sessionIndex
- features
- plan
- tower
- tools
- kosong/provider
- session/expertTalk
- state
- tool
- wire
- agent-gateway
- src
- protocol
- routes
- services/transcript
- test
- klient
- src/contract/session
- test
- node-sdk/test
- transcript
- src
- contract
- history
- model
- ops
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments