Commit Graph
125 Commits
Author SHA1 Message Date
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