Skip to content

Feat/3.1.0 beta2 - #2809

Merged
zgqgit merged 378 commits into
mainfrom
feat/3.1.0-beta2
Nov 25, 2026
Merged

zgqgit merged 378 commits into
mainfrom
feat/3.1.0-beta2

Conversation

@zgqgit

@zgqgit zgqgit commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

What

简要描述做了什么改动。

Why

为什么需要这个改动?

How

实现方式、设计决策(如有)。

Test

  • 本地测试通过
  • 114 测试服务器验证通过

Related

  • Issue/ticket:

jieyuhuayang and others added 30 commits November 13, 2026 19:25
…irmation

The proposed change is kept in proposed/p02-existing-tests.patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Admit the MEMORY app type in the enum guard and assistant.memory_enabled in the shared assistant DDL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion safety, scoped redaction

- MemoryGate.resolve checks the acting user and reads the registration row without the tenant auto-filter
- assistant memory only on logged-in connections; workflow memory only for platform-source runs
- replace .is_(True/False) with == comparisons (DM8 rejects IS 1 / IS 0)
- consolidator: stop on lost lock, drop results after a concurrent clear, move watermark only to the last message read, cap existing items, LLM timeout, exceptions handled per session
- reconcile deletes orphan detail objects only after a grace period
- past-event rewrite keeps the source mark and is attempted once
- redaction matches the two built-in memory tools by exact name
- deep-research round start is best effort; lost workflow run object leaves the session pending
- design: pitfalls 29-33 and new internal contracts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ked turns, frontend memory runs

- assistant: redact Anthropic tool_use content blocks; resident system message goes first (consecutive with the system prompt); memory only on logged-in connections; acting user checked
- daily: acting user checked; content-safety blocked turns move the watermark
- memory_search never raises into the agent loop
- client: mask memory tool runs in assistant chat and deep-research step rows; exact tool names in both apps
- design: R10, R11, R6 revision, known limitations

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tings

AC-106 (user ruling 2026-11-14): the setting lives in the workbench tab of the
system model settings as "记忆整理模型" instead of the workbench (daily chat)
config.

- Backend: WorkbenchModelConfig.memory_llm (linsight_llm key) joins the
  model-reference validation, inaccessible-model filtering and the inherited
  model list; WorkstationConfig.memory_model_id is removed. Consolidation reads
  memory_llm, else the first daily-chat model, else fails as before.
- Platform: selector next to the chat-title model in WorkbenchModel; the
  MemoryModelConfig selector and its copy leave the daily chat config.
- Tests replaced; spec AC-106, design decision 18 and release contract updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry switches

- Assistant and workflow memory switch copy (AC-75) now says plainly that the
  switch also decides whether this app's conversations become the user's
  memory, that memory may appear in answers, and that users are isolated.
- New constants ASSISTANT_MEMORY_DEFAULT / MEMORY_SWITCH_DEFAULT (both off)
  for newly created apps; workflows saved before the switch existed are still
  upgraded with it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rding

- Redacted memory tool outputs keep the content-free ok / reason_code, so a
  step can say "已记下 1 条记忆" or "记忆写入被拒绝:内容里有相对时间"
  instead of a bare "记忆操作" (daily chat timeline, deep research steps,
  assistant run cards share describeMemoryStep). Legacy events: a write with
  no item id reads as rejected.
- The receipt under an answer lists one memory per row (operation only when
  mixed, content, undo); a correction shows the old text struck through.
- "常驻" no longer appears anywhere in the UI (user ruling 2026-11-14):
  attribution is one list, the settings list drops the tag; spec AC-87/88.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ory list

MessageFeedbackButtons renders display: contents, so placing it directly in
the flex-col wrapper added for the memory notice stacked the two buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resident memory is carried into every turn, so listing it made unrelated
items appear under every answer (a sorting question showed a meeting date).
has_attribution now means the turn retrieved items, in the daily, assistant
and deep research signals and in history flags; the list shows retrieved
items only. Revises AC-87 and design decision 16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…emory switch

Templates saved before the switch existed carry no switch, so the editor's
legacy upgrade added it switched off and template-created workflows ignored
the new-workflow default. Creating from a template now sets the switch to the
default (or keeps it on when the template already turned it on).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The item text already states the date, so the meta line repeated it. The
event date still drives resident expiry and stays editable in the item
editor. Revises AC-88.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the action row

- The items a search returned now open from its step in the thinking process
  (daily, assistant, deep research), each deletable; the separate
  'used memory' entry under the answer is gone. Back-to-back searches (often
  fired in parallel) read as one step with distinct items counted.
- The write receipt sits in the answer's action row with like/dislike.
- Memory tool descriptions, search results and the resident block say memory
  is not a numbered source: a model had cited a memory write as [S1], which
  showed as literal text.
- @bisheng/chat: optional runDetail slot for a run's expanded body.
Revises AC-87 and design decision 16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ies have details

- The receipt entry in the action row shrank to one character per line (CJK
  text has no min width in a flex row); it no longer shrinks or wraps.
- Search results mark items that carry a detail and say how to fetch it with
  detail_ids; fetched details are labelled as the full text. Before this the
  model could not know detail_ids was worth using.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
memory_search with detail_ids now returns those items' full detail text
directly (SearchService.get_details: the caller's own active items only).
Before, details were read only for items the same query happened to hit
again, so the model had to repeat its query to get one. query is optional
when detail_ids is given; the 'has detail' marker says how to fetch it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p it

- The memory page folds a long memory's full text under its line
  ('Show full text'); it never says 'detail'. New owner-only endpoint
  GET /api/v1/memory/items/{id}/detail (12113 when the text cannot be read).
- A hand edit used to replace the item without its full text, silently
  dropping it. The edit now copies the full text to the new item, and fails
  instead of dropping it when the text cannot be read.
Revises AC-88.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to change it

- Opening a memory shows its own view: last updated, summary, details
  (markdown), type and source, with edit and delete, and a box at the bottom
  to tell the AI how to change it. The AI change applies at once and can be
  undone (edits it back to the previous version). Replaces the in-row
  'show full text' toggle.
- Add and edit take the details too: left out keeps them, empty removes them.
  The edit dialog loads them, and leaves them alone if they could not be read.
- POST /api/v1/memory/items/{id}/revise: the memory model rewrites summary,
  details, type and event date through the edit path (audit
  memory.item.revise); unchanged answers write nothing; failures write
  nothing (new 12114).
Revises AC-88, AC-89; adds AC-107.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l; details at body size

- After an AI change or an edit, the list reloads before it holds the new
  version; the view briefly fell back to the list and lost its 'changed ·
  undo' note. It now stays on the old version until the new one arrives.
- Restore memory.event_time_value (still used on the memory view).
- Details render at the summary's size instead of prose size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…asking the AI

- The opened memory shows its line as the heading and its details as the
  body, with type, source, event date and update time in one quiet row: no
  'summary'/'details' labels to learn.
- The ask-the-AI box is pinned to the bottom of the pane like a chat
  composer (it was easy to miss under the content).
- No hand editing: the edit button, the list's pencil and the edit dialog are
  gone; adding a memory is a single box. The edit endpoint stays for the AI
  change and its undo.
Revises AC-88, AC-89.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A memory without details showed a single line and nothing else. The view now
follows Claude's memory page: last updated, summary, details, and says when
there are no details yet (the AI can add some). Revises AC-88.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es resident room

Checked the consolidation prompt against the memory research (§7):
- #7 / AC-20: candidates carry a 'detail' (the specifics behind the one-line
  conclusion, as a markdown list). Before, consolidated memories never had
  one. A detail that fails validation is dropped on its own; a tense rewrite
  carries the old detail over.
- #18: duplicate_of / contradicts only when sure; when unsure, a new item.
- #12: the prompt states the resident limit, how many are used and how many
  are left.
Revises AC-48.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
'本周结论', '下周计划', '本月总结' name parts of a report or plan, but the
relative-time check rejected them, so a consolidated weekly-report preference
was dropped on 104. Period words right before such section nouns are no
longer rejected; '本周在北京出差', '这个月要完成', '下周三之前' still are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in beta1)

beta2 branched before the knowledge unification / F118 merge; this brings
all of beta1 in while keeping beta2's own commits (middleware credentials,
F009 browser object paths, upload/endpoint/SSRF hardening, open API streams).

Resolution notes:
- Helm: beta1's restructured chart is the base; beta2's credential keyring is
  wired in (BS_SECRET_KEYS_FILE in every backend container, generated keyring
  Secret, existingKeyringSecret for upgrades, extraEnv guard). The settings
  renderer now writes MinIO/Milvus/ES secrets as encrypt(<token>), which
  beta2's strict loader requires. F009 nginx object path ported.
- Config: unknown top-level keys warn and are ignored (beta1 rule) in both
  config_service and the credential preflight; plaintext credentials are still
  rejected (beta2 rule).
- Knowledge: beta2's trusted-upload checks ported onto beta1's staged/owned
  upload flow; the legacy /process path into SPACE knowledge, which beta1
  routed around them, now resolves references too.
- Route login guard: five routes with their own auth (DSH mobile device /
  refresh token, storage browser-bucket auth_request) added to the frozen list.
- Removed beta2's filesUpload.process.test.tsx (tests the page beta1 replaced).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the workflow/assistant/daily/task-mode long-term memory feature
(feat/v3.0.0/132-long-term-memory) onto the 3.1 beta2 line.

Conflict resolution keeps 3.1's structure and adds the memory hooks:
- workflow publish keeps validate_version and runs the memory node check
  when going online; chat WS passes memory_register next to the lease args
- assistant agent keeps 3.1's admission/login_user and adds memory turns
- llm.py keeps 3.1's reference handling; memory_llm joins
  WORKBENCH_MODEL_OBJECTS and the registry-only system-model autofill
- daily/task-mode chat keeps 3.1's leases, generated files and failure
  info, plus memory turn binding, tools and redaction
- alembic merge revision joins f132_long_term_memory onto the 3.1 head
- F132 tests adapted to 3.1 fixtures (execution admission, publish
  transition, content-violation marking, model reference repository)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zgqgit and others added 29 commits November 25, 2026 03:08
An empty grant is a valid policy: it removes the model from every member
of the current tenant. The backend already accepts it. The dialog no
longer blocks the save and shows the consequence as a neutral note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In daily chat the ask_user tool call stayed "running" after the user
answered, and the answer showed as a separate user message below the
resumed output. After a reload the question was gone.

Backend: the question row of an answer keeps the question in extra
(run_id + ask_user). When the resumed run or the snapshot fallback
writes the answer row, it adds each answered question of the run as an
ask_user tool call.

Frontend: ask_user_answered closes the ask_user call with the question
and the answer. An answered ask_user shows as a question block (the
deep-research IntentRow); an open one is not drawn. The answer leaves
the message list after the send, and history does not list rows marked
with ask_user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header text was pushed to the right edge, but each checkbox sits to the
left of the delete button. Give the checkbox and delete button fixed-width
columns and use the same columns in the header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The send of an answer clears pendingQuestion before ask_user_answered
arrives. The live block then had only the tool arguments and lost the
numbered question layout until a reload.

The ask_user event now stores the question on the ask_user tool call,
so the answered call keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… answer row

When a daily-chat run parked on ask_user, the resumed execution started a new
projector from the snapshot text only, so the thinking and tool calls shown
before the question disappeared from the stored answer row.

On the ask_user event the projector now hands its answer row so far
({msg, events}, ask_user args set to the question) to the caller, which writes
it once to the parked_answer field of the direct-run Redis hash. The resumed
projector and the snapshot fallback (stop while parked, lease lost after
resume) start from it: each open ask_user call gets the answer of its question
row, unanswered questions are dropped, and later snapshot text is appended.
remember_direct_run keeps the field on resume, so all rounds accumulate. Runs
parked before this change fall back to text plus answered questions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A generic tool row of a direct answer had a separate blue "查看代码和输出"
link on every row. The row itself is now the toggle, the same as knowledge
and web rows: a chevron, hover darkens the label, and the code (or
parameters) and the output open under the row. The two unused copy keys
are removed from the three locale files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An answer row stores its own copy of a generated file under a new file_id
and keeps the id of the run's live file events in workspace_file_id. For
one hour after a run ends, opening the conversation replays the run's
events, and the workspace matched the replayed file against the stored one
only by file_id and by path. Both differ, so the same file was listed
twice. The stored entry now carries the workspace id, and the merge also
matches on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a model streams a tool call, only the first delta carries the name
and id, so the start frame has empty params. The mapper reassembled the
later deltas only for sub-agent delegations. Every other tool call ended
with empty params, and the expanded tool row showed only its output. The
end frame now carries the reassembled args, and the direct-answer
projector takes them from the end frame when the start frame had none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A guest-link visitor has no user name, so the user message avatar
showed a "?" glyph. AvatarName now shows the Filled.Person icon from
bisheng-icons when the name is empty. Named avatars do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The memory ES index uses the standard analyzer, so Chinese text is split
into single characters, and a plain match finds an item that shares any
one character with the query. On 116, the query "用户旅行偏好 出行习惯"
found an item about JSON output only through "用户" and "出".

The keyword search now cuts the query into words with jieba, removes
single-character words, general stopwords and memory stopwords (words
that most items contain because of how items are written, such as 用户,
喜欢, 偏好, 通常), and asks for each remaining word as a phrase. When no
word remains, the keyword search is skipped. The index is not rebuilt.

Verified against the 116 ES index: the false match is gone, and
"调用技能" and "JSON 输出格式" still find the item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zgqgit
zgqgit merged commit f11fca2 into main Nov 25, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants