Skip to content

Release 0.9.0: native gocoon provider + withdraw/unstake fix + reset#23

Open
TONresistor wants to merge 9 commits into
mainfrom
dev
Open

Release 0.9.0: native gocoon provider + withdraw/unstake fix + reset#23
TONresistor wants to merge 9 commits into
mainfrom
dev

Conversation

@TONresistor
Copy link
Copy Markdown
Owner

Release 0.9.0

Promotes dev to main for the 0.9.0 npm tag. 7 commits.

Highlights

  • Native gocoon provider replacing cocoon, with turnkey TON channel lifecycle + local SSE proxy (fixes pi-ai "empty response zero tokens").
  • gocoon webui withdraw parity + unstake fix: findClientSC(fundAddress) (the owner-vs-fund wallet bug that left staked TON locked); Stop agent control, destination validation, type-"withdraw" confirm, live progress. Validated on mainnet (recovered a real 15 TON stake).
  • Wallet reset + closed-channel guard: teleton gocoon reset, POST /gocoon/reset, Reset button; guard checks the real channel state (channelInfoOnChain) so a closed channel doesn't block reset and a funded one does.
  • ToolSearch mode by default; codex in the provider selector.
  • knip dead-code pass + webui enterprise UI cleanup.
  • chore: version bump to 0.9.0.

Release mechanism

Merging this does NOT publish. The npm release is triggered separately by pushing the v0.9.0 tag on the merged main commit (release.yml).

Pre-release verification (all green on dev)

typecheck, lint (0 warnings), knip, circular deps, 1503/1503 tests, build (sdk+backend+web), CLI smoke, audit (0 vulns).

…fecycle

- Replace the cocoon LLM provider with gocoon (pure-Go COCOON client, native
  OpenAI tool-calling); delete the XML tool-injection shim (src/cocoon/).
- src/gocoon/: installer (download v0.2.0 + SHA-256 + cache), supervisor
  (spawn gocoon-runner + health + watchdog), lifecycle (init/waitFunded/
  topup/withdrawAll) with a shared ProgressSink.
- CLI: teleton gocoon init|topup|withdraw|status.
- WebUI: /api/gocoon/* routes + Gocoon panel in Config.
- Auto-start: provider=gocoon installs + supervises the runner on start.
Swap the XML tool-injection cocoon shim for gocoon, a pure-Go COCOON
client exposing a native OpenAI-compatible API. Adds a turnkey TON
channel lifecycle: download and verify release binaries, supervise the
runner, init/fund/topup/withdraw, with auto-start when provider is
gocoon. Exposes it via the `teleton gocoon` CLI and a dedicated Gocoon
WebUI page. Pins gocoon v0.2.0; default model Qwen/Qwen3-32B.
pi-ai always sends stream:true and only parses Server-Sent Events, but
the gocoon runner returns a single JSON document, so streaming clients
parsed zero chunks and saw an empty response with zero tokens. Start a
local proxy (when provider is gocoon) that forwards to the runner and
frames its JSON reply as SSE, leaving gocoon itself unchanged. pi-ai
points at the proxy instead of the runner.
codex was in the backend registry but missing from the hardcoded
frontend provider list, so it never appeared in the WebUI. Add it, and
treat it as keyless in provider-meta (it authenticates via the Codex CLI
~/.codex/auth.json, no API key to paste) so the switch flow shows no key
field.
gocoon webui withdraw matches myduckai-agent: a Stop agent control,
destination validation, type-"withdraw" confirm, and live progress
polling, over the same withdrawAll the CLI uses.

Unstake fix: withdrawAll located the channel via the owner wallet
instead of the fund wallet (findClientSC(fundAddress)). The owner wallet
has no on-chain history, so the channel was never found, the close was
skipped, and only the liquid balance was withdrawn while the staked TON
stayed locked. It now closes the channel and waits for the refund before
draining, so the stake comes back.

Wallet reset: teleton gocoon reset (CLI), POST /gocoon/reset, and a Reset
wallet button delete the local wallet + config so the next setup creates
a fresh owner/node wallet. Guarded: refuses while the runner is up, or
while funds or a non-closed channel with stake remain. channelInfoOnChain
checks the channel state (not the contract account status, which stays
active after a cooperative close). --force overrides the fund/channel
checks.

Also a knip dead-code pass (events/bus, memory/agent/sessions,
telegram/callbacks, SearchInput, a11y, assorted dead exports) and a webui
cleanup (Dashboard, styles, AllowLists).
Drop the non-existent scripts/ entry from package.json files.
0.9.0 dropped 'cocoon' from the provider enum. Existing 0.8.6 configs
with agent.provider: cocoon now migrate to 'gocoon' (carrying a custom
cocoon.port) instead of failing config validation, mirroring the
claude-code -> anthropic shim. Adds a loader test for the migration.
The create-release job rendered ghcr.io/${{ github.repository }} (mixed
case) in the public install snippet, which the Docker CLI rejects. Use a
lowercased step output, matching the actual image push.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant