100 Commits
Author SHA1 Message Date
jie65535 dd3aaa417f chat: require owner presence for group triggers
Build and Test / build (push) Canceled after 0s
2026-09-05 22:03:49 +08:00
jie65535 5e9c9d9990 test: make profile date assertion timezone independent 2026-09-05 00:08:22 +08:00
jie65535 e38624e658 profile: disable automatic updates by default 2026-09-04 23:55:40 +08:00
jie65535 46bf992b6b llm: sanitize malformed request Unicode 2026-08-15 21:22:45 +08:00
jie65535 e3e296bd5e fix: refresh meme prompt on reload 2026-08-08 14:21:32 +08:00
jie65535 9ab4432450 profile: gate manual group analysis requests 2026-08-08 13:12:24 +08:00
jie65535 dc76f4831e docs: simplify README 2026-08-07 19:37:47 +08:00
jie65535 6e59622ebc profile: restrict detail queries to trigger sender 2026-08-07 17:44:28 +08:00
jie65535 f508373d02 Unify model configuration and usage accounting 2026-08-07 17:18:04 +08:00
jie65535 c0dd34741a models: use provider defaults for extraction tasks 2026-08-07 11:41:00 +08:00
jie65535 a34d198576 web: summarize page content before returning 2026-08-07 11:29:49 +08:00
jie65535 7e15ce5981 github: broaden read-only CLI access 2026-08-07 11:06:13 +08:00
jie65535 19475b3ee8 history: index short terms and resolve mentions 2026-08-06 22:04:13 +08:00
jie65535 c8cdea6fab history: add indexed search and context retrieval 2026-08-06 21:26:37 +08:00
jie65535 0303bf0ac8 github: add read-only gh CLI tool 2026-08-06 19:53:46 +08:00
jie65535 c7878030f9 profile: add adaptive daily request control 2026-08-06 16:00:04 +08:00
jie65535 3c69bdeff4 conversation: deduplicate profile context 2026-08-05 20:42:44 +08:00
jie65535 f416d889b3 conversation: preserve triggers and await follow-ups 2026-08-05 20:24:19 +08:00
jie65535 c931d39d20 profile: refine query output and live batching 2026-08-05 14:39:29 +08:00
jie65535 795b6620c6 conversation: require tool calls 2026-08-05 12:57:36 +08:00
jie65535 1aa6939893 conversation: separate retry and loop budgets 2026-08-05 12:41:13 +08:00
jie65535 d140ba4fad profile: schedule daily group updates 2026-08-05 11:21:07 +08:00
jie65535 f09645cab0 profile: use support history in analysis 2026-08-05 00:51:02 +08:00
jie65535 cef405616f profile: handle rejected model responses 2026-08-05 00:10:17 +08:00
jie65535 a53a16ea37 chore: ignore local utilities 2026-08-05 00:08:29 +08:00
jie65535 6eef9bb4f2 profile: harden compaction cleanup 2026-08-05 00:07:38 +08:00
jie65535 0dd221a80f profile: preserve valid text and evidence ranges 2026-08-05 00:05:01 +08:00
jie65535 c853e9afcc llm: harden streaming responses 2026-08-05 00:02:29 +08:00
jie65535 1c47a69716 web: support self-hosted Jina Reader 2026-08-04 23:59:28 +08:00
jie65535 7a0969dc4e profile: return complete query results 2026-08-04 23:58:47 +08:00
jie65535 31803396a8 profile: require pending messages for bulk runs 2026-08-04 23:57:10 +08:00
jie65535 9d2a155cf6 profile: improve group history batching 2026-08-04 23:54:08 +08:00
jie65535 74bcf0b8d6 profile: rebase concurrent conversation updates 2026-08-03 17:58:58 +08:00
jie65535 94f303ec72 profile: optimize conversation analysis concurrency 2026-08-03 16:39:19 +08:00
jie65535 b96b732b92 profile: analyze all groups concurrently 2026-08-03 15:38:28 +08:00
jie65535 2ba5752494 retry: add exponential backoff 2026-08-03 15:28:11 +08:00
jie65535 fa93d48002 profile: parallelize and control analysis jobs 2026-08-03 11:55:21 +08:00
jie65535 2a5e7fd2f9 profile: add Overflow contact snapshots 2026-08-03 10:39:56 +08:00
jie65535 f102264a55 profile: harden batch analysis and compaction 2026-08-03 02:53:59 +08:00
jie65535 aa67305d80 test: cover automatic profile analysis
Exercise multi-user commits, attribution failures, model retries, deduplication, and eligibility gates with a deterministic fake model. Move the real-model experiment to an opt-in live test task.
2026-08-02 22:18:17 +08:00
jie65535 9ea14a681a ci: add verified plugin build workflow
Build and test with JDK 17 while preserving the Java 11 bytecode target, cache Gradle dependencies, and upload the packaged Mirai plugin.
2026-08-02 21:54:22 +08:00
jie65535 e4e3a0a537 chore: ignore local research files
Keep design documents and experiment scripts local while removing their previously tracked files from version control.
2026-08-02 21:49:23 +08:00
jie65535 23299b2ae7 profile: add progressive user profiles
Add cache-expiry profile maintenance and contextual injection, reorganize runtime code by responsibility, remove automatic favorability decay, and prepare version 1.15.0.
2026-08-02 21:45:34 +08:00
jie65535 2ed39e9fe8 docs: update token command documentation 2026-07-29 10:08:19 +08:00
jie65535 be29808e51 Adjust the gating sequence to avoid continuously printing logs 2026-07-29 10:00:33 +08:00
jie65535 c52e924cde Add GNU Affero General Public License v3 2026-07-29 10:00:05 +08:00
jie65535 07d11c2b16 history: replace external recorder with SQLite 2026-07-27 22:19:35 +08:00
jie65535 c328a798f7 tools: resolve images by short references 2026-07-27 14:01:12 +08:00
jie65535 a4f5bad322 tools: improve visual image handling 2026-07-26 14:43:34 +08:00
jie65535 7b5a83ba9c tools: integrate QWeather JWT weather service
Replace the unavailable weather endpoint with QWeather location, forecast, minutely precipitation, and alert APIs. Add configurable JWT credentials, automatic alert lookup, setup documentation, and bump the plugin to 1.13.0.
2026-07-24 11:13:26 +08:00
jie65535andClaude Opus 4.8 59a98830cd Skip muted-group messages to avoid wasting tokens
When the bot is muted in a group it cannot send replies, so process
nothing: short-circuit in onMessage before any trigger/LLM work using
Group.botMuteRemaining.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-26 14:08:05 +08:00
jie65535andClaude Opus 4.8 bc61e99013 Give visual and reasoning models their own first-chunk timeouts
Vision and reasoning requests reused the chat model's 10s first-chunk
timeout, but both legitimately need longer before the first chunk:
vision must download the image server-side first, and reasoning has a
thinking warmup. Logs showed frequent TimeoutCancellationException at
10s/15s for imageRecognition and reasoning.

Add separate visualFirstChunkTimeout (120s) and reasoningFirstChunkTimeout
(90s) config, and raise each service's socket timeout to at least its
first-chunk budget so the socket layer doesn't sever the connection
before the first-chunk timeout can apply. Chat endpoints are unchanged.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-26 14:06:00 +08:00
jie65535andClaude Opus 4.8 826dc460df Add chat endpoint failover for resilience against unstable LLM APIs
Configure a list of fallback chat endpoints (chatFallbacks); each blank
field inherits the primary, so you can swap just the API key, just the
model, or the whole vendor. On LLM streaming failure the retry loop
advances to the next endpoint, and a failed endpoint enters a cooldown
(fallbackCooldownMinutes) so a dead primary is skipped instead of
wasting a timeout on every message.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-24 22:23:43 +08:00
jie65535andClaude Opus 4.8 13329b5fa3 Track cache-hit tokens and consolidate token stats into one dashboard
Capture DeepSeek's prompt_cache_hit_tokens (dropped before by the
openai-kotlin Usage parser) via a raw-JSON extractor in ModelService,
and persist it plus the group name on each daily record.

Collapse the six /jgpt tokens* subcommands into a single /jgpt tokens
dashboard showing cache-hit rate, input/output split, daily trend and
top users/groups. Groups are shown by name only, never by group id.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-23 23:01:16 +08:00
jie65535andClaude Opus 4.8 cfc61c52ba Re-attach timestamp on continuation lines after a time gap
Consecutive messages from the same sender are collapsed under one
name+time header to save context, with follow-ups rendered as bare
"└" continuation lines. When a sender resumed minutes later, the
follow-up still inherited the original timestamp, so the model judged a
just-sent message as having happened long ago and skipped replying.

Track the previous record time and re-print the timestamp on a
continuation line once the gap exceeds CONTINUATION_TIME_GAP_SECONDS
(60s). Short bursts stay timeless to keep context lean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-21 20:24:21 +08:00
jie65535andClaude Opus 4.8 ebb1fbe10c Guard group active-level fetch in name card serialization
member.active.temperature relies on OneBot pulling group honor data,
which throws "Error code: 2" when the upstream is busy/unavailable. That
access sat outside the existing title try/catch, so a failure propagated
through getSystemPrompt -> onMessage and aborted the entire reply.

Wrap the active.temperature access in its own try/catch and degrade
gracefully (omit the lv segment) instead of breaking the whole turn.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-21 20:15:34 +08:00
jie65535andClaude Opus 4.8 a29cf17361 Release ByteReadChannel when first-chunk timeout fires
The streaming refactor moved post()+body() inside withTimeout, so a
first-chunk timeout threw before `channel` was bound and the finally
guard never ran, leaking the connection on every slow-API retry. Hold
the channel in an outer nullable var and wrap the whole flow in
try/finally so an acquired channel is always cancelled.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 23:56:11 +08:00
jie65535andClaude Opus 4.8 4307019ee8 Add global skill system for self-accumulated knowledge
Introduce a cross-group skill system that lets the bot distill reusable
knowledge into markdown docs and load them on demand, keeping day-to-day
context pollution low.

- SkillStore manages data/skills/*.md files with name/description
  frontmatter and an in-memory index cache (rebuilt on init/reload)
- Only the skill index (name + one-line description) is injected via the
  new {skills} system-prompt placeholder; bodies load on demand
- New tools: loadSkill / saveSkill (upsert, iterate = load+overwrite) /
  deleteSkill, gated by PluginConfig.skillsEnabled
- Skill names validated against ^[A-Za-z0-9_-]+$ to prevent traversal
- Wire SkillStore.init into onEnable and refresh on /jgpt reload; add
  /jgpt skills listing command
- Bump version to 1.12.0; update README

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 23:37:44 +08:00
jie65535andClaude Opus 4.8 538fe563a0 Expand forwarded messages into context with nested support
Forwarded messages were collapsed to a placeholder, so the LLM couldn't
read a forwarded conversation a user asked it to look at. Now forwards
are fully expanded (no truncation, relying on the large context window
and cache hits) as Markdown blockquotes, with each nesting level adding
another ">". Nested forwards recurse by depth for clean, unambiguous
indentation; node bodies (including images) render inline.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 23:03:26 +08:00
jie65535andClaude Opus 4.8 890ccb10d5 Separate real group role from title in serialized name card
A custom special title (e.g. a troll "群主" given to a regular member)
used to override the permission-based role, misleading the LLM about
who actually holds authority. Now the real role (群主/管理员/群员) from
member.permission is always shown, with the title slot showing the
special title (labeled 头衔"…") when present, otherwise falling back to
the activity-level temperatureTitle that everyone sees in chat.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 22:57:52 +08:00
jie65535andClaude Opus 4.8 d2bdd273b2 Add reply-to-message capability with ID-addressable history
Lets the bot quote-reply to a specific message via an optional replyTo
on sendSingleMessage, and reworks history serialization so the LLM can
address messages and stop confusing quoted content with the quoter.

- Serialize each history line with a short [n] id; consecutive messages
  from the same sender continue under "[n]  └". A per-subject ReplyIndex
  maps [n] -> MessageRecord, kept alive with the context cache so ids
  stay continuous across cached turns.
- Replace inlined quote text with a reference: "↩[k]" when the quoted
  message is in-window, otherwise "↩(author:"snippet…")". This removes
  the ambiguity where A quoting B looked like A's own speech.
- Collapse forwarded messages to "[转发消息·N条:title]".
- sendSingleMessage accepts replyTo (the [n]); it resolves the record via
  MessageRecord.toMessageSource() and prepends a QuoteReply, falling back
  to a plain send with a note if the source is gone. ids may be null, so
  numbering still happens but such records can't be reply targets.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 22:46:59 +08:00
jie65535andClaude Opus 4.8 eedbd55f62 Fix streaming first-token timeout never firing on slow API
The firstChunkTimeout only wrapped the response-body read, but when the
upstream (e.g. DeepSeek under load) stalls before sending response
headers, httpClient.post() itself blocks and the withTimeout block is
never reached. Every slow request fell through to Ktor's
requestTimeoutMillis (120s) and was retried up to retryMax times,
causing multi-minute waits before any reply.

- Move post() inside withTimeout(firstChunkTimeout) so the entire
  request-to-first-data-chunk window is bounded and fails fast.
- Apply withTimeout(firstChunkTimeout) to each streaming read so a
  mid-stream stall is also caught quickly instead of waiting on the
  socket/request backstop.
- Drop requestTimeoutMillis so legitimately long streams are no longer
  killed at 120s; TTFT and inter-token gaps are now governed at the
  application layer.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 22:01:44 +08:00
jie65535andClaude Opus 4.7 92acbb2310 Upgrade TTS to qwen3-tts-instruct-flash with instruction control
Adds an optional instructions parameter to sendVoiceMessage so the model
can describe tone, pace and emotion in natural language. Defaults the
TTS model to qwen3-tts-instruct-flash; Chelsie voice is unchanged.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-22 15:57:15 +08:00
jie65535andClaude Opus 4.7 39b49bb302 Replace ImageEdit with ImageAgent for Qwen Image 2.0
Supports text-to-image, single-image edit and multi-image fusion (0-3
reference images) via a single tool. Renames imageEditModel config to
imageModel (default qwen-image-2.0) and adds imageWatermark toggle.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-22 15:47:08 +08:00
jie65535 98bb1066c4 Update README 2026-05-22 14:16:18 +08:00
jie65535 4dde523dfc Move token usage to JSON store 2026-05-22 14:16:12 +08:00
jie65535 f17adee4ba Extend favorability into user profile system 2026-05-22 14:16:06 +08:00
jie65535 72892336bc Add first-chunk timeout 2026-05-22 14:16:00 +08:00
jie65535 e629d37fa8 Relax searchChatHistory limits 2026-05-22 14:15:54 +08:00
jie65535 200a404927 Update README for v1.11.0 2026-05-22 14:15:48 +08:00
jie65535 3ed54dae0e Update version to v1.11.0 2026-05-22 14:15:42 +08:00
jie65535 417b5f631f Add searchChatHistory tool 2026-05-22 14:15:34 +08:00
jie65535 bc2ab553b9 Add reasoning_content replay for tool calls 2026-05-22 14:15:19 +08:00
jie65535 e5d5445a1f Add ModelService with extra body support 2026-05-22 14:15:12 +08:00
jie65535andClaude Sonnet 4.6 2d3045e110 Add tokens report command and optimize statistics queries
- Add /jgpt tokens [days] command for usage summary report
- Add /jgpt tokensUserDaily <userId> [days] for daily user stats
- Fix tokensDaily day calculation (was showing 4 days for 3-day query)
- Optimize tokens() from 5-6 passes to single pass (5-10x faster)
- Fix tokensUserDaily inefficient nickname lookup
- Add number formatting with thousand separators to all outputs
- Extract helper functions: calculateCutoffTimestamp, calculateTodayStartTimestamp
- Add parameter validation for days and limit
- Update README with new commands and formatted examples

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-25 12:36:11 +08:00
jie65535 b0c985e220 Add token consumption tracking system Update version to v1.10.0 2026-03-18 12:09:23 +08:00
jie65535 c4afdb811b Add Lunar calendar context 2026-01-26 17:42:46 +08:00
jie65535 9094f6c8db Add maxToolOutputLength config 2026-01-25 12:59:00 +08:00
jie65535 ec358fd852 Add context cache 2026-01-06 16:49:27 +08:00
jie65535 6705859604 Add requestOwnerHelp tool 2025-12-06 00:24:24 +08:00
jie65535 621a045a62 Update Jina to allow trial usage without a key 2025-12-02 23:52:34 +08:00
jie65535 634f0c1026 Add meme prompt 2025-11-24 21:31:40 +08:00
jie65535 0f482407d4 Add favorability system
Update version to v1.9.0
2025-10-30 15:03:38 +08:00
jie65535 8ac0197fc4 Add memory clear command 2025-09-11 21:54:24 +08:00
jie65535 68a45a9657 Update LeTeX return message 2025-09-11 21:47:48 +08:00
jie65535 099625c2f2 Separate LaTeX parsing into independent tool for LLM calling 2025-09-11 19:15:33 +08:00
jie65535 ffa7f78c25 Update README by Qwen 2025-09-10 11:12:30 +08:00
jie65535 2c40ef1b16 Add Memory switch 2025-09-10 10:53:34 +08:00
jie65535 e083b7aff9 Adjust the chat history concatenation format 2025-09-05 23:45:21 +08:00
jie65535 e2caba6a10 Add reply message call 2025-08-31 21:04:57 +08:00
jie65535 af17f1e698 Update version to 1.8.0
Add SendVoiceMessage tool
Move prompt to SystemPrompt.md file
Add tool calling message switch config
2025-08-31 15:57:16 +08:00
jie65535 e79bcd9983 Update tool list
Disable EPIC Free game tool
Fix the issue where invalid JSON parameters caused exceptions
2025-08-21 13:57:03 +08:00
jie65535 b6aa638b1a Add DashScope API Config 2025-08-21 13:55:21 +08:00
jie65535 bc2eb437e6 Update VisualAgent tool name to imageRecognition 2025-08-21 13:55:08 +08:00
jie65535 b534606bb0 Update runCode tool description 2025-08-21 13:54:46 +08:00
jie65535 867d9ad56f Update http client timeout 2025-08-21 13:54:20 +08:00
jie65535 92a6879cc1 Add imageEdit tool 2025-08-21 13:54:02 +08:00
jie65535 eda932b4e9 Update memory structure 2025-07-20 11:27:31 +08:00
jie65535 6cba3cca22 Shorten dialogue intervals 2025-07-20 11:27:11 +08:00
jie65535 60a48c5211 Add data reload 2025-07-20 11:26:41 +08:00