2026-02-04 11:06:13 +00:00
|
|
|
module github.com/sipeed/picoclaw
|
|
|
|
|
|
2026-04-08 02:57:22 +00:00
|
|
|
go 1.25.9
|
2026-02-04 11:06:13 +00:00
|
|
|
|
|
|
|
|
require (
|
2026-03-17 06:12:32 +00:00
|
|
|
fyne.io/systray v1.12.0
|
2026-03-21 18:45:09 +00:00
|
|
|
github.com/BurntSushi/toml v1.6.0
|
2026-04-03 02:56:26 +00:00
|
|
|
github.com/SevereCloud/vksdk/v3 v3.3.1
|
2026-02-11 04:28:37 +00:00
|
|
|
github.com/adhocore/gronx v1.19.6
|
2026-03-16 02:51:55 +00:00
|
|
|
github.com/anthropics/anthropic-sdk-go v1.26.0
|
2026-04-07 11:24:27 +00:00
|
|
|
github.com/atc0005/go-teams-notify/v2 v2.14.0
|
2026-03-30 07:58:04 +00:00
|
|
|
github.com/aws/aws-sdk-go-v2 v1.41.5
|
2026-04-09 17:18:14 +00:00
|
|
|
github.com/aws/aws-sdk-go-v2/config v1.32.14
|
2026-03-30 07:58:04 +00:00
|
|
|
github.com/aws/aws-sdk-go-v2/service/bedrockruntime v1.50.4
|
2026-02-10 09:10:41 +00:00
|
|
|
github.com/bwmarrin/discordgo v0.29.0
|
2026-03-16 02:47:46 +00:00
|
|
|
github.com/caarlos0/env/v11 v11.4.0
|
2026-04-12 10:44:24 +00:00
|
|
|
github.com/charmbracelet/lipgloss v1.1.0
|
2026-03-25 16:35:56 +00:00
|
|
|
github.com/creack/pty v1.1.24
|
2026-03-20 03:45:37 +00:00
|
|
|
github.com/ergochat/irc-go v0.6.0
|
2026-03-13 09:58:34 +00:00
|
|
|
github.com/ergochat/readline v0.1.3
|
2026-03-02 16:47:25 +00:00
|
|
|
github.com/gdamore/tcell/v2 v2.13.8
|
2026-03-11 10:08:00 +00:00
|
|
|
github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab
|
2026-03-13 09:58:34 +00:00
|
|
|
github.com/google/uuid v1.6.0
|
2026-02-04 11:06:13 +00:00
|
|
|
github.com/gorilla/websocket v1.5.3
|
feat(commands): centralized command registry with sub-command routing (#959)
* feat(commands): Session management [Phase 1/2] command centralization and registration
* docs: add design for command registry post-review fixes
Documents the architecture decisions for fixing 5 Important issues
from code review: SubCommand pattern, Deps struct, command-group files,
Executor caching, and Telegram registration dedup.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(commands): add SubCommand type and EffectiveUsage method
Introduce SubCommand struct for declaring sub-commands structurally
within a parent command Definition. The EffectiveUsage() method
auto-generates usage strings from sub-command names and args,
preventing drift between help text and actual handler behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(commands): add Deps struct and secondToken helper, remove dead contains()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(commands): add sub-command routing to Executor
Uses Registry.Lookup for O(1) command dispatch instead of iterating
all definitions. Definitions with SubCommands are routed to matching
sub-command handlers. Missing or unknown sub-commands reply with
auto-generated usage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(commands): split into command-group files with Deps injection
Extract show/list/start/help into individual cmd_*.go files.
Replace config.Config parameter with Deps struct for runtime data.
Restore /show agents and /list agents sub-commands.
Use EffectiveUsage for auto-generated help text.
Bridge external callers (agent/loop.go, telegram.go) with Deps wrapper
until Task 5 fully wires the Deps fields.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* perf(commands): cache Executor in AgentLoop, wire Deps with runtime callbacks
Create Executor once in NewAgentLoop instead of per-message. Deps
closures capture AgentLoop pointer for late-bound access to
channelManager and runtime agent model.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(telegram): remove duplicate initBotCommands, keep async startCommandRegistration only
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(commands): restore Outcome comments and annotate Deps.Config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(commands): consolidate /switch into commands package, fix ! prefix
Move /switch model and /switch channel handling from inline loop.go
logic into cmd_switch.go using the SubCommand + Deps pattern. This
removes the OutcomePassthrough branch in handleCommand entirely.
Also replace the hardcoded "/" prefix check with commands.HasCommandPrefix
so that "!" prefixed commands are correctly routed to the Executor.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add docs/plans to .gitignore and untrack existing files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(commands): address code review findings
- Remove dead ExecuteResult.Reply field and unused branch in loop.go
- Extract shared agentsHandler for /show agents and /list agents
- Remove redundant firstToken/secondToken (use nthToken instead)
- Simplify Telegram startup: pass BuiltinDefinitions directly
- Centralize req.Reply nil guard in executeDefinition
- Extract unavailableMsg constant (was duplicated 5 times)
- Remove unused MessageID from Request
- Remove stale "reserved for Phase 2" comment on Deps.Config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(commands): replace Deps with per-request Runtime
Separate stateless Registry (cached on AgentLoop) from per-request
Runtime (passed to handlers at execution time). This enables future
session management features to inject per-request context without
modifying the command registry.
- Rename Deps → Runtime, move to runtime.go
- Change Handler signature: func(ctx, req) error → func(ctx, req, rt *Runtime) error
- NewExecutor now takes (registry, runtime) — executor is created per-request
- BuiltinDefinitions() no longer takes parameters (stateless)
- AgentLoop caches cmdRegistry, builds Runtime via buildRuntime()
- Update all cmd_*.go handlers and tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* style: fix gci import grouping and godoc formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(onboard): skip legacy AGENT.md when copying embedded workspace templates
The workspace/ directory contains both AGENT.md (legacy) and AGENTS.md
(current). copyEmbeddedToTarget was copying both, causing the test
TestCopyEmbeddedToTargetUsesAgentsMarkdown to fail. Skip AGENT.md
during the walk to match the expected behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(agent): address self-review comments on loop.go
- Move cmdRegistry init into struct literal (review comment #11)
- Rename buildRuntime → buildCommandsRuntime for clarity (review comment #12)
- Add comment to default switch case explaining passthrough (review comment #13)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(commands): address code review findings on naming and correctness
- Rename dispatcher.go → request.go (no Dispatcher type remains)
- Rename cmd_agents.go → handler_agents.go (shared handler, not a top-level command)
- Add modelMu to protect AgentInstance.Model writes in SwitchModel
- Add ListDefinitions to Runtime so /help uses registry instead of BuiltinDefinitions()
- Fix SwitchChannel message: validation-only callback should not say "Switched"
- Propagate Reply errors in executor instead of discarding with _ =
- Add HasCommandPrefix unit test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(onboard): extract legacy filename to constant
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(agent): handle commands before route error check
Move handleCommand() before the routeErr gate so global commands
(/help, /show, /switch) remain available even when routing fails.
Context-dependent commands that need a routed agent will report
"unavailable" through their nil-Runtime guards.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* revert: remove unnecessary AGENT.md skip in onboard
Reverts 02d0c04 and 74deae1. The test failure was caused by a local
leftover workspace/AGENT.md file (gitignored but embedded by go:embed).
Deleting the local file fixes the root cause; the code-level skip was
never needed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: executeDefinition Unknown option
* fix(agent): use routed agent for model commands, restore Telegram command diff
- Remove modelMu: message processing is serial, no concurrent writes
- Pass routed agent to handleCommand/buildCommandsRuntime instead of
always using default agent
- GetModelInfo/SwitchModel are nil when agent is nil (route failed),
handlers reply "unavailable"
- Restore GetMyCommands + slices.Equal check before SetMyCommands to
avoid unnecessary Telegram API calls on restart
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(commands): remove unintended config mutation in SwitchModel
SwitchModel should only update the routed agent's runtime Model field.
Writing to cfg.Agents.Defaults.ModelName was a behavioral change that
corrupts the default agent config when switching a non-default agent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(commands): move /switch channel to /check channel
/switch channel only validates availability, not actually switching.
Rename to /check channel to match actual behavior. /switch channel
now shows a redirect message pointing users to the new command.
Addresses review feedback from yinwm on PR #959.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 09:31:40 +00:00
|
|
|
github.com/h2non/filetype v1.1.3
|
2026-02-10 07:20:00 +00:00
|
|
|
github.com/larksuite/oapi-sdk-go/v3 v3.5.3
|
2026-02-22 20:29:27 +00:00
|
|
|
github.com/mdp/qrterminal/v3 v3.2.1
|
2026-04-01 15:41:32 +00:00
|
|
|
github.com/minio/selfupdate v0.6.0
|
2026-04-10 02:46:45 +00:00
|
|
|
github.com/modelcontextprotocol/go-sdk v1.5.0
|
2026-04-17 02:09:16 +00:00
|
|
|
github.com/muesli/termenv v0.16.0
|
2026-04-09 17:18:19 +00:00
|
|
|
github.com/mymmrac/telego v1.8.0
|
2026-02-10 13:33:55 +00:00
|
|
|
github.com/open-dingtalk/dingtalk-stream-sdk-go v0.9.1
|
2026-02-14 12:44:19 +00:00
|
|
|
github.com/openai/openai-go/v3 v3.22.0
|
2026-04-07 01:58:20 +00:00
|
|
|
github.com/pion/rtp v1.10.1
|
2026-04-01 04:21:21 +00:00
|
|
|
github.com/pion/webrtc/v3 v3.3.6
|
2026-03-02 16:47:25 +00:00
|
|
|
github.com/rivo/tview v0.42.0
|
2026-04-02 17:17:07 +00:00
|
|
|
github.com/rs/zerolog v1.35.0
|
2026-02-12 04:46:28 +00:00
|
|
|
github.com/slack-go/slack v0.17.3
|
2026-02-25 07:47:45 +00:00
|
|
|
github.com/spf13/cobra v1.10.2
|
2026-04-12 10:44:24 +00:00
|
|
|
github.com/spf13/pflag v1.0.10
|
2026-02-15 18:12:50 +00:00
|
|
|
github.com/stretchr/testify v1.11.1
|
2026-02-10 01:46:07 +00:00
|
|
|
github.com/tencent-connect/botgo v0.2.1
|
2026-04-17 02:09:16 +00:00
|
|
|
go.mau.fi/util v0.9.8
|
2026-02-22 20:29:27 +00:00
|
|
|
go.mau.fi/whatsmeow v0.0.0-20260219150138-7ae702b1eed4
|
2026-03-16 02:42:04 +00:00
|
|
|
golang.org/x/oauth2 v0.36.0
|
2026-04-17 02:09:16 +00:00
|
|
|
golang.org/x/term v0.42.0
|
2026-03-30 07:51:19 +00:00
|
|
|
golang.org/x/time v0.15.0
|
2026-02-22 20:29:27 +00:00
|
|
|
google.golang.org/protobuf v1.36.11
|
2026-03-13 09:58:34 +00:00
|
|
|
gopkg.in/yaml.v3 v3.0.1
|
2026-03-20 03:58:24 +00:00
|
|
|
maunium.net/go/mautrix v0.26.4
|
2026-04-09 17:18:28 +00:00
|
|
|
modernc.org/sqlite v1.48.2
|
2026-03-25 16:35:56 +00:00
|
|
|
rsc.io/qr v0.2.0
|
2026-02-04 11:06:13 +00:00
|
|
|
)
|
|
|
|
|
|
2026-02-15 18:12:50 +00:00
|
|
|
require (
|
2026-04-01 15:41:32 +00:00
|
|
|
aead.dev/minisign v0.2.0 // indirect
|
2026-03-20 03:58:24 +00:00
|
|
|
filippo.io/edwards25519 v1.2.0 // indirect
|
2026-03-30 07:58:04 +00:00
|
|
|
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect
|
2026-04-09 17:18:14 +00:00
|
|
|
github.com/aws/aws-sdk-go-v2/credentials v1.19.14 // indirect
|
|
|
|
|
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.21 // indirect
|
2026-03-30 07:58:04 +00:00
|
|
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect
|
|
|
|
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 // indirect
|
2026-03-23 17:10:56 +00:00
|
|
|
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 // indirect
|
|
|
|
|
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 // indirect
|
2026-04-09 17:18:14 +00:00
|
|
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 // indirect
|
|
|
|
|
github.com/aws/aws-sdk-go-v2/service/signin v1.0.9 // indirect
|
|
|
|
|
github.com/aws/aws-sdk-go-v2/service/sso v1.30.15 // indirect
|
|
|
|
|
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.19 // indirect
|
|
|
|
|
github.com/aws/aws-sdk-go-v2/service/sts v1.41.10 // indirect
|
2026-03-23 17:10:56 +00:00
|
|
|
github.com/aws/smithy-go v1.24.2 // indirect
|
2026-04-12 10:44:24 +00:00
|
|
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
github.com/beeper/argo-go v1.1.2 // indirect
|
2026-04-12 10:44:24 +00:00
|
|
|
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
|
|
|
|
|
github.com/charmbracelet/x/ansi v0.8.0 // indirect
|
|
|
|
|
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
|
|
|
|
|
github.com/charmbracelet/x/term v0.2.1 // indirect
|
2026-04-01 04:21:21 +00:00
|
|
|
github.com/cloudflare/circl v1.6.3 // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
github.com/coder/websocket v1.8.14 // indirect
|
2026-02-15 18:12:50 +00:00
|
|
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
|
|
|
github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect
|
2026-02-28 11:37:18 +00:00
|
|
|
github.com/gdamore/encoding v1.0.1 // indirect
|
2026-03-30 07:47:17 +00:00
|
|
|
github.com/go-logr/logr v1.4.3 // indirect
|
|
|
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
2026-03-17 06:12:32 +00:00
|
|
|
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
2026-02-25 07:47:45 +00:00
|
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
2026-02-28 11:37:18 +00:00
|
|
|
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
|
|
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
2026-04-12 10:44:24 +00:00
|
|
|
github.com/mattn/go-runewidth v0.0.16 // indirect
|
2026-04-17 02:09:16 +00:00
|
|
|
github.com/mattn/go-sqlite3 v1.14.42 // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
github.com/ncruces/go-strftime v1.0.0 // indirect
|
2026-04-17 02:09:16 +00:00
|
|
|
github.com/petermattis/goid v0.0.0-20260330135022-df67b199bc81 // indirect
|
2026-04-01 04:21:21 +00:00
|
|
|
github.com/pion/randutil v0.1.0 // indirect
|
2026-02-15 18:12:50 +00:00
|
|
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
2026-02-28 11:37:18 +00:00
|
|
|
github.com/rivo/uniseg v0.4.7 // indirect
|
2026-03-06 22:26:30 +00:00
|
|
|
github.com/segmentio/asm v1.1.3 // indirect
|
2026-03-20 08:13:10 +00:00
|
|
|
github.com/segmentio/encoding v0.5.4 // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
github.com/vektah/gqlparser/v2 v2.5.27 // indirect
|
2026-04-03 02:56:26 +00:00
|
|
|
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
|
|
|
|
|
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
2026-04-12 10:44:24 +00:00
|
|
|
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
go.mau.fi/libsignal v0.2.1 // indirect
|
2026-03-30 07:47:17 +00:00
|
|
|
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
|
|
|
|
go.opentelemetry.io/otel v1.35.0 // indirect
|
|
|
|
|
go.opentelemetry.io/otel/metric v1.35.0 // indirect
|
|
|
|
|
go.opentelemetry.io/otel/trace v1.35.0 // indirect
|
2026-04-17 02:09:16 +00:00
|
|
|
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
|
|
|
|
|
golang.org/x/text v0.36.0 // indirect
|
2026-03-30 08:05:11 +00:00
|
|
|
modernc.org/libc v1.70.0 // indirect
|
2026-02-22 20:29:27 +00:00
|
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
|
|
|
modernc.org/memory v1.11.0 // indirect
|
2026-02-15 18:12:50 +00:00
|
|
|
)
|
2026-02-16 08:38:21 +00:00
|
|
|
|
2026-02-04 11:06:13 +00:00
|
|
|
require (
|
2026-02-11 21:51:18 +00:00
|
|
|
github.com/andybalholm/brotli v1.2.0 // indirect
|
|
|
|
|
github.com/bytedance/gopkg v0.1.3 // indirect
|
|
|
|
|
github.com/bytedance/sonic v1.15.0 // indirect
|
|
|
|
|
github.com/bytedance/sonic/loader v0.5.0 // indirect
|
|
|
|
|
github.com/cloudwego/base64x v0.1.6 // indirect
|
2026-03-30 07:47:17 +00:00
|
|
|
github.com/github/copilot-sdk/go v0.2.0
|
2026-02-10 01:46:07 +00:00
|
|
|
github.com/go-resty/resty/v2 v2.17.1 // indirect
|
2026-02-10 07:20:00 +00:00
|
|
|
github.com/gogo/protobuf v1.3.2 // indirect
|
2026-02-15 09:26:36 +00:00
|
|
|
github.com/google/jsonschema-go v0.4.2 // indirect
|
2026-02-11 21:51:18 +00:00
|
|
|
github.com/grbit/go-json v0.11.0 // indirect
|
2026-02-12 04:46:28 +00:00
|
|
|
github.com/klauspost/compress v1.18.4 // indirect
|
|
|
|
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
2026-02-10 01:46:07 +00:00
|
|
|
github.com/tidwall/gjson v1.18.0 // indirect
|
|
|
|
|
github.com/tidwall/match v1.2.0 // indirect
|
|
|
|
|
github.com/tidwall/pretty v1.2.1 // indirect
|
2026-02-12 04:46:28 +00:00
|
|
|
github.com/tidwall/sjson v1.2.5 // indirect
|
2026-02-11 21:51:18 +00:00
|
|
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
|
|
|
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
|
|
|
|
github.com/valyala/fasthttp v1.69.0 // indirect
|
2026-03-16 02:46:54 +00:00
|
|
|
github.com/valyala/fastjson v1.6.10 // indirect
|
2026-02-16 11:40:14 +00:00
|
|
|
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
|
2026-02-12 04:46:28 +00:00
|
|
|
golang.org/x/arch v0.24.0 // indirect
|
2026-04-17 02:09:16 +00:00
|
|
|
golang.org/x/crypto v0.50.0
|
|
|
|
|
golang.org/x/net v0.53.0
|
2026-04-02 17:17:07 +00:00
|
|
|
golang.org/x/sync v0.20.0
|
2026-04-10 02:18:25 +00:00
|
|
|
golang.org/x/sys v0.43.0
|
2026-02-04 11:06:13 +00:00
|
|
|
)
|
2026-04-01 04:21:21 +00:00
|
|
|
|
|
|
|
|
replace github.com/bwmarrin/discordgo => github.com/yeongaori/discordgo-fork v0.0.0-20260319072544-e8e546f5d532
|