@linjz/opencode-qqbot 0.3.14 → 0.3.16

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 (52) hide show
  1. package/README.md +73 -5
  2. package/bin/openqq.js +34 -0
  3. package/dist/notify-cli.js +593 -0
  4. package/dist/opencode-qqbot-plugin.js +938 -65
  5. package/dist/openqq-bot.js +3585 -717
  6. package/dist/openqq-cli.js +791 -0
  7. package/dist/openqq-watchdog.js +1063 -0
  8. package/package.json +9 -5
  9. package/src/bridge.ts +1338 -157
  10. package/src/cli/notify-main.ts +6 -0
  11. package/src/cli/notify.ts +167 -0
  12. package/src/cli/openqq-main.ts +95 -0
  13. package/src/cli/service-main.ts +302 -0
  14. package/src/cli/watchdog-main.ts +77 -0
  15. package/src/commands.ts +644 -554
  16. package/src/config.ts +87 -2
  17. package/src/core/bot-control.ts +148 -0
  18. package/src/core/bot-launcher.ts +106 -13
  19. package/src/core/card-approval.ts +20 -9
  20. package/src/core/delivery.ts +145 -54
  21. package/src/core/discovery.ts +22 -4
  22. package/src/core/file-log.ts +35 -3
  23. package/src/core/form-bridge.ts +16 -7
  24. package/src/core/form-journal.ts +4 -4
  25. package/src/core/gateway-state.ts +3 -3
  26. package/src/core/inflight-journal.ts +214 -36
  27. package/src/core/instance-lock.ts +21 -6
  28. package/src/core/linkwatch.ts +3 -4
  29. package/src/core/markdown.ts +117 -0
  30. package/src/core/message-queue.ts +242 -91
  31. package/src/core/mirror.ts +222 -182
  32. package/src/core/notify-sink.ts +93 -0
  33. package/src/core/outbox.ts +10 -9
  34. package/src/core/permission.ts +627 -301
  35. package/src/core/question-form.ts +230 -0
  36. package/src/core/queue-view.ts +661 -0
  37. package/src/core/send-media.ts +32 -0
  38. package/src/core/storage.ts +34 -0
  39. package/src/core/watchdog.ts +513 -0
  40. package/src/core/zombie-reaper.ts +127 -0
  41. package/src/index.ts +140 -52
  42. package/src/opencode/client.ts +206 -27
  43. package/src/opencode/eventstream.ts +94 -12
  44. package/src/opencode/history.ts +4 -2
  45. package/src/opencode/mirror.ts +15 -2
  46. package/src/opencode/sessions.ts +135 -37
  47. package/src/plugin-entry.ts +120 -112
  48. package/src/qq/api.ts +165 -61
  49. package/src/qq/gateway.ts +80 -17
  50. package/src/qq/media.ts +5 -1
  51. package/src/qq/sender.ts +30 -18
  52. package/src/qq/types.ts +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
- {
1
+ {
2
2
  "name": "@linjz/opencode-qqbot",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "type": "module",
5
5
  "description": "QQ Bot for OpenCode AI - chat with AI coding assistant via QQ",
6
6
  "exports": {
@@ -14,14 +14,17 @@
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/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",
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
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",
19
19
  "verify": "bun run typecheck && bun run test",
20
20
  "verify:full": "bun run verify && bun run test:e2e",
21
21
  "build:bundle": "bun build src/index.ts --outfile=dist/openqq-bot.js --target=node",
22
+ "build:notify": "bun build src/cli/notify-main.ts --outfile=dist/notify-cli.js --target=node",
22
23
  "build:plugin": "bun build src/plugin-entry.ts --outfile=dist/opencode-qqbot-plugin.js --target=bun --external @opencode/plugin --external effect",
23
- "deploy:plugin": "bun run build:bundle && bun run build:plugin && bun scripts/deploy-plugin.mjs",
24
- "prepublishOnly": "bun run build:bundle && bun run build:plugin"
24
+ "build:watchdog": "bun build src/cli/watchdog-main.ts --outfile=dist/openqq-watchdog.js --target=node",
25
+ "build:cli": "bun build src/cli/openqq-main.ts --outfile=dist/openqq-cli.js --target=node",
26
+ "deploy:plugin": "bun run build:bundle && bun run build:notify && bun run build:plugin && bun run build:watchdog && bun run build:cli && bun scripts/deploy-plugin.mjs",
27
+ "prepublishOnly": "bun run build:bundle && bun run build:notify && bun run build:plugin && bun run build:watchdog && bun run build:cli"
25
28
  },
26
29
  "files": [
27
30
  "bin",
@@ -67,3 +70,4 @@
67
70
  "typescript": "^5.9.0"
68
71
  }
69
72
  }
73
+