@linjz/opencode-qqbot 0.3.16 → 0.3.18

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.
Files changed (45) hide show
  1. package/README.md +316 -266
  2. package/README.zh-CN.md +326 -0
  3. package/dist/notify-cli.js +64 -12
  4. package/dist/opencode-qqbot-plugin.js +591 -92
  5. package/dist/openqq-bot.js +1172 -303
  6. package/dist/openqq-cli.js +253 -64
  7. package/dist/openqq-watchdog.js +373 -110
  8. package/package.json +4 -3
  9. package/src/bridge.ts +448 -32
  10. package/src/cli/notify.ts +4 -1
  11. package/src/cli/watchdog-main.ts +22 -7
  12. package/src/commands.ts +74 -58
  13. package/src/config.ts +39 -5
  14. package/src/core/bot-config.ts +66 -0
  15. package/src/core/bot-control.ts +21 -3
  16. package/src/core/bot-launcher.ts +4 -2
  17. package/src/core/cron-reminders.ts +84 -0
  18. package/src/core/delivery.ts +24 -1
  19. package/src/core/discovery.ts +207 -169
  20. package/src/core/error-rescue.ts +1 -1
  21. package/src/core/file-log.ts +16 -7
  22. package/src/core/inflight-journal.ts +1 -0
  23. package/src/core/instance-lock.ts +32 -1
  24. package/src/core/log-rotate.ts +91 -0
  25. package/src/core/mirror.ts +13 -4
  26. package/src/core/notices.ts +62 -0
  27. package/src/core/outbound-sanitize.ts +29 -0
  28. package/src/core/permission.ts +16 -0
  29. package/src/core/qq-instructions.ts +122 -0
  30. package/src/core/queue-view.ts +1 -0
  31. package/src/core/send-media.ts +29 -2
  32. package/src/core/send-requests.ts +227 -0
  33. package/src/core/start-error.ts +26 -0
  34. package/src/core/stt.ts +55 -0
  35. package/src/core/supervisor-election.ts +53 -0
  36. package/src/core/turn-correction.ts +68 -0
  37. package/src/core/watchdog.ts +171 -14
  38. package/src/index.ts +262 -250
  39. package/src/opencode/client.ts +32 -1
  40. package/src/opencode/mirror.ts +17 -4
  41. package/src/opencode/sessions.ts +20 -1
  42. package/src/plugin-entry.ts +67 -2
  43. package/src/qq/gateway.ts +35 -0
  44. package/src/qq/media.ts +21 -0
  45. package/src/qq/sender.ts +50 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linjz/opencode-qqbot",
3
- "version": "0.3.16",
3
+ "version": "0.3.18",
4
4
  "type": "module",
5
5
  "description": "QQ Bot for OpenCode AI - chat with AI coding assistant via QQ",
6
6
  "exports": {
@@ -14,8 +14,9 @@
14
14
  "dev": "bun run --watch src/index.ts",
15
15
  "start": "bun run src/index.ts",
16
16
  "typecheck": "tsc --noEmit",
17
- "test": "bun run test/decision-cases.ts && bun run test/milestone-cases.ts && bun run test/attachment-cases.ts && bun run test/r2-hardening-cases.ts && bun run test/e1-mirror-digest.ts && bun run test/mask-headers-cases.ts && bun run test/perm-mock.ts && bun run test/discovery-cases.ts && bun run test/linkwatch-cases.ts && bun run test/reply-limiter-cases.ts && bun run test/card-approval-cases.ts && bun run test/message-split-cases.ts && bun run test/sync-batch1-cases.ts && bun run test/delivery-dedupe-cases.ts && bun run test/stream-stagger-cases.ts && bun run test/history-render-cases.ts && bun run test/stall-nudge-cases.ts && bun run test/interaction-watch-cases.ts && bun run test/form-command-gate-cases.ts && bun run test/quote-voice-dedup-cases.ts && bun run test/send-media-cases.ts && bun run test/rival-absorb-cases.ts && bun run test/inflight-recovery-cases.ts && bun run test/plugin-launcher-cases.ts && bun run test/pi-absorb-cases.ts && bun run test/recovery-history-cases.ts && bun run test/inbound-dedupe-cases.ts && bun run test/gateway-state-cases.ts && bun run test/turn-attribution-cases.ts && bun run test/qq-render-cases.ts && bun run test/instance-lock-cases.ts && bun run test/outbox-cases.ts && bun run test/notify-cases.ts && bun run test/queue-observability-cases.ts && bun run test/queue-session-isolation-cases.ts && bun run test/zombie-reaper-cases.ts && bun run test/question-form-cases.ts && bun run test/interaction-ack-cases.ts && bun run test/eventstream-flood-cases.ts && bun run test/watchdog-cases.ts && bun run test/service-cases.ts && bun run test/launcher-silent-cases.ts && bun run test/status-title-cases.ts && bun run test/permission-sync-cases.ts && bun run test/perm-location-cases.ts && bun run test/session-model-cases.ts && bun run test/supervise-hardening-cases.ts && bun run test/emoji-gate-cases.ts && bun run test/markdown-safe-cases.ts && bun run test/multibot-cases.ts && bun run test/lane-scope-cases.ts && bun run test/active-quota-cases.ts && bun run test/bg-stream-liveness-cases.ts && bun run test/bg-resume-cases.ts",
18
- "test:e2e": "bun run test/watch-history-e2e.ts && bun run test/d1-subagent-ask-e2e.ts && bun run test/d2-conflict-e2e.ts && bun run test/perm-e2e.ts && bun run test/perm-real-e2e.ts",
17
+ "test": "bun scripts/run-tests.mjs",
18
+ "hooks:install": "bun scripts/install-hooks.mjs",
19
+ "test:e2e": "bun --preload ./test/guard.ts test/watch-history-e2e.ts && bun --preload ./test/guard.ts test/d1-subagent-ask-e2e.ts && bun --preload ./test/guard.ts test/d2-conflict-e2e.ts && bun --preload ./test/guard.ts test/perm-e2e.ts && bun --preload ./test/guard.ts test/perm-real-e2e.ts",
19
20
  "verify": "bun run typecheck && bun run test",
20
21
  "verify:full": "bun run verify && bun run test:e2e",
21
22
  "build:bundle": "bun build src/index.ts --outfile=dist/openqq-bot.js --target=node",