Commit Graph
1122 Commits
Author SHA1 Message Date
Xu HanxiangandDeepSeek Harness da7f9b4c5a feat(liveshare): open the viewer capabilities a share can serve (#8304)
* feat(liveshare): open reader capabilities the share can serve

(cherry picked from commit 3c893b488900fff776a21eebee4eb2d95b878764)

* feat(liveshare): let a reader run the session's slash commands

(cherry picked from commit ae02bcc0f819e55ebf066de7581d4d89994930a4)

* fix(liveshare): allow a reader to list the workspace file references

(cherry picked from commit fffaa864b9d790a0aab30da639d5ef50ff8f303c)

* fix(liveshare): bind the job endpoints to their session resource

(cherry picked from commit 357d1f6efe5b161a4ce1b616e66599c4e75a6ab1)

* chore: refresh the Cordis surface catalog

(cherry picked from commit 88f88b225f0fcff0a5a88f09b0f555749dd62756)

* test(job-controller): read the Session resources the Remote methods declare

The job roster, the follow stream, and a kill each declare the request's
Session as the resource they touch, and an unowned job's follow names none.
Read those declarations off the mounted Controller and pin what they answer.

(cherry picked from commit fa3f92427a6bd56ad2a949dc74315505cb75533b)

* feat(liveshare): offer a shareable core component to viewers

The terminal controller reaches the catalog from a core profile bundle, which
the catalog excludes so no application plumbing is offered. Mark such a
component shareable: PluginMetadata gains the mark, and the host names the
packages that carry it, so a marked core component enters the catalog and
every other core component stays out.

The terminal namespace leaves the exclusion list for the same reason, and
the marked component carries the title its dialog row shows.

(cherry picked from commit b0e9e390719aab519fd82cf39c85c60e4f77b588)

* fix(liveshare): classify the terminal methods as owner-selected

The nine terminal methods leave owner-only for plugin-offered: the owner picks
them in the share dialog, no reader role grants one, and a share that names
none still refuses every terminal call.

(cherry picked from commit 718c1b45a1b01320cbe9be46ece9deca37225fe2)

* docs(liveshare): state that terminals open per method

Terminals are no longer unconditionally owner-only: the share dialog offers
the terminal controller's methods and opens none until the owner picks them.

(cherry picked from commit 505c1193571b16431731f69bd5ca1b59a1059a13)

* test(liveshare): cover a viewer reaching the Session's terminals

The end-to-end case mounts a real terminal controller beside the share host:
the catalog offers it as a shareable core component, a share that selects
nothing refuses every terminal call, and a selected terminal/create through
the reader's own Peer binds the shell to the Session its agentId names.

(cherry picked from commit 25955a936dc5b58ebfd8e1d24f495d62d59f7b70)

* fix(workspace-files): confine non-owner reads to the session workspace

A non-owner Peer now reads and watches files only inside the connected Session workspace. stat, read, readBytes (including baseFile) and changes resolve the target canonically and refuse an outside one with workspace-file/outside-workspace before reporting its kind. Owner and trusted in-process callers keep the filesystem read authority.

(cherry picked from commit 7ae855e12ba6c5bc99c7ae75d65d984661f3bbb5)

* refactor(workspace-files): name the file access confinement

Replace the contain boolean with a named FileConfinement carried by the service, and move the outside-workspace refusal into one helper shared by file reads and watches. No Remote interface or behavior changes.

(cherry picked from commit 1c4dbd68220df7c559f84cf2782f9626c5b2ef4b)

* refactor(workspace-files): name the path mode PathScope

Replace the FileConfinement/confinement vocabulary with PathScope, and rename its module and test. The values and behavior are unchanged.

# Conflicts:
#	packages/api/workspace-files/src/index.ts
#	packages/api/workspace-files/tsconfig.host.json

(cherry picked from commit 5d3f7b31dc6a1dbcf44c5fdd59295402bf40cf76)

* refactor(workspace-files): accept several workspace roots in the path check

The confinement helper and change feed now take several resolved roots; the current scope still supplies one. WorkspaceFileScope.workspaceRoot remains the primary root, so a future multi-workspace Session can add optional roots without changing endpoint signatures, path arguments, or the client address.

(cherry picked from commit 73fd59be92c421c378b7fe5606d8d7c5806b13cb)

* fix(workspace-files): keep the multi-root watch check covered

Pass the primary watch root separately and iterate the roots list, so the feed keeps full coverage for the multi-root preparation. Add braces to the multi-root test arrow for the lint rule.

(cherry picked from commit 1286aac6a6d93e693dbb33f2feaa71e6252424e0)

* test(workspace-files): assert a refusal never reports the target kind

The outside-workspace failure carries only the path, so a share reader learns
nothing about what it was refused. stat, read, readBytes, list, and a relative
escape are each asserted not to carry a kind.

(cherry picked from commit a9495de0ff63a1aac325d1cb62b8111c188ae8a5)

* test(workspace-files): keep the search caps in the shared harness config

Rebasing over the search endpoint left configOf() without the search limits
the master harness passed inline, so every search call reached the subprocess
provider with an undefined graceMs. configOf and peer() now take Caps and
supply the suite defaults.

(cherry picked from commit 70cecb9b352ce5c1e17482429b1539483e101d60)

* docs(workspace-files): describe the read confinement against the search-era structure

The master README added the search section and rewrote the file-read checks
without a workspace-containment check. Those paragraphs now state which
caller the check applies to, the change feed mentions the non-owner watch,
and the source map lists path-scope.ts. Bilingual hashes re-recorded with
verify-translation-pairing --write.

(cherry picked from commit e61fdabaf2fb9b0c0bc507ef5ceea0f213f70683)

* fix(liveshare): keep workspaceFiles/search in the reader session-read role

The classification table is the single source for POLICY_DECIDED_ACTIONS, so
the new search endpoint must also appear in the read role's actions.

(cherry picked from commit 665093b07cfee87be105fdc71a7d58fe25974788)

* docs(catalog): regenerate the client and config catalogs

Removing the viewer share-path tab drops its client slot entry, and the workspace file import shifts the Config source line.

(cherry picked from commit 7bb9295a18b011971b4338171a60d16ff82eebd1)

* docs(catalog): regenerate the config catalog source line

(cherry picked from commit 2d98a59afc8aa6e2a9ac268d4446bcd8cd5eeb26)

* fix(liveshare): let share readers preview workspace files

The served page keeps the shipped Sidebar and now reads the shared Session
workspace through workspaceFiles: stat, read, readBytes, list and changes join
the Session read role, while the file service confines every non-owner read to
that workspace root. The viewer tab type that answered each file address with
"a share hands over paths, not contents" is removed, so the shipped document
preview opens the file.

Refs #7901

(cherry picked from 5e0ceac3faa)(partial: liveshare files only)

* fix(ui-jobs): offer the stop control only with job/kill access

(cherry picked from commit 804956ece9c09b2fac6180cd78da7aa7393ae0de)

* fix(ui-chat): attribute a reader's steering row while it is pending

Chat declared the message-source seat on the user node registration, so an
admitted steering row rendered the shared bubble without asking for it and
a Host-pending steering occurrence carried no source to ask with. Move the
seat to the flow: it renders user rows, admitted steering rows, and pending
steering occurrences, and hands the same renderer to each.

Liveshare's selector now elects a share-viewer source of either kind, so a
reader's interjection states its author from the moment it is sent.

(cherry picked from c802aef8392)(partial: liveshare client files only)

* docs(liveshare): state when a reader's interjection shows its author

A local submission echo carries no source, so the author line appears once the
Host records the input in the Inbox, not when the reader sends it.

(cherry picked from 42001b1294d)(partial: liveshare client files only)

* docs(liveshare): describe the seat source arriving as row props

(cherry picked from commit 466e25328c5c42c792bfb30bba05ff790259bf99)

* fix(liveshare): refuse /permission to share readers

The commands executor runs a command handler inside the owner Host with no
reader-specific narrowing, so a reader line such as
`/permission danger-full-access` left the shared Session unconfined with no
approval. The read role's condition now parses the `commands/execute` line
and refuses the owner-only command names, starting with `/permission`, with
the new `command-owner-only` reason the viewer page classifies. Every other
command keeps following visibility.

* feat(permission-presets): add the permissionPresets/set Remote

The `/permission` command switches a Session's sandbox mode and approval
policy inside the owner Host's own handler, which gives a share reader that
reaches `commands/execute` no endpoint decision to meet. The switch now has
a Remote face: `permissionPresets/set` names the Session it writes as its
`session` resource, so the Gateway decides who may call it before any preset
is resolved or any knob changes.

The request carries the Session id and the preset name only. An unknown
preset and a Session this process does not hold live both refuse with
`gateway/bad-request` before writing. The call reports the selection the
Session reads back after the switch.

The command reaches the same switch, keeping its ordering and its `success`
and `error` text. Because a Remote parameter cannot carry an Agent, the
command supplies the approval write itself so its model-visible policy
notice still follows the switch.

Co-Authored-By: DeepSeek Harness <[email protected]>

* fix(liveshare): classify permissionPresets/set owner-only

The new preset endpoint writes the source Session's sandbox mode and approval
policy, so no share reader role may reach it at any tier. The viewer endpoint
classification records it as owner-only, and the viewer access policy spec
proves a reader is refused on the shared Session, on its own forks, and on a
Session outside the share, and that no reader grant carries the action.

The owner-only command whitelist stays as the second defense: the commands
handler runs inside the owner Host, so a reader line must not depend on that
handler continuing to route through the endpoint.

Co-Authored-By: DeepSeek Harness <[email protected]>

* test(liveshare): keep every permission preset endpoint owner-only

The classification table's completeness gate proves a new generated endpoint
has a row, but not that the row keeps a reader out. This case reads the table
and fails when any `permissionPresets/*` endpoint is classified as anything
other than owner-only, so an endpoint added there without its class checked
turns the suite red instead of widening a reader's reach.

Co-Authored-By: DeepSeek Harness <[email protected]>

* docs(catalog): regenerate for the preset set Remote

The new `permissionPresets/set` Remote adds its signature and its request type
to the generated service and type catalogs, maps the request type to the
permission presets subsystem page, and shifts the permission preset config
source line. The permission presets subsystem pages describe the write path
and its Remote face on both sides.

Co-Authored-By: DeepSeek Harness <[email protected]>

* test: construct SessionId values and keep the approval notice lock

The rebased specs called SessionId as a value while importing it as a
type, so every case threw ReferenceError. Construct the ids the way the
packages already do, and keep the /permission case that locks the single
model-visible approval notice.

* test(liveshare): load the terminal controller without a built artifact

The spec resolved a generated typert artifact at module load, so a clean
checkout failed before any case ran.

* docs(liveshare): state the reader limits the review asked about

Marks the answer path's dependence on timed asks, records that @ mentions
list every host session, and explains which commands stay owner-only.

* feat(liveshare): let a viewer manage the goal of a visible Session

The goal is Session data, not the workspace sandbox, so the same visibility
rule that already covers goals/get and goals/edit applies to create, pause,
resume, complete and clear. The /goal command reaches the same service, so
the endpoint and the command now agree.

# Conflicts:
#	packages/experimental/liveshare/README.i18n.yaml

* fix(liveshare): keep the terminal component titles

The shareable mark's localized titles were spread onto the metadata record, which
put `en` and `zh` at the top level instead of in the `titles` field the catalog
reads. A core bundle without display metadata therefore offered the terminal
with no product name at all.

* fix(workspace-files): decide the path scope before stat

A non-owner read probed the path with `lstat` before it checked containment, so
reading an absent path outside the workspace answered `not-found` while an
existing one answered `outside-workspace`. That let a share reader probe whether
any path on the owner's machine exists.

Every confined read now resolves and confines its target first: `read`, `stat`,
`readBytes` (including a path relative to a base file) and `list`. The final
`lstat` still reports the component's own kind, and the owner keeps the
filesystem's authority, including its previous answer for an absent path.

* docs(liveshare): drop the queue-verb mention

`session/updateQueue` is not in the viewer Session read role, and viewer queue
management is not part of this change. The role's rationale now names the
reach it actually carries, and the workspace file actions no longer leak
whether a path outside the workspace exists.

* test(liveshare): describe the terminal suite's actual coverage

* chore: regenerate the catalogs the viewer capability change moves

session-reference, user-questions and the permission presets all feed the
Cordis, persistence and doc-graph generators, so their artifacts were stale.

* fix(liveshare): keep the command refusal copy paired and cover the file paths

The English notice read "/permission on", which the locale gate tokenised
together while the translations kept the command alone. The workspace-file
and preset paths the coverage lane flagged now have cases of their own.

* test(workspace-files): accept either refusal code for a UNC base

Windows resolves an unreachable UNC host through the local backend's ancestor
walk, which reports an IO failure instead of the not-found POSIX reads. Both
refuse the read; the code belongs to that backend, not to the path-scope
decision this case covers.

* refactor(liveshare): leave the command surface to its own change

Running a slash command is a separate decision from what a reader may read:
the executor wraps several capabilities in one opaque call, so the endpoint
that admits it is not the place to decide them. This change keeps the reader
capabilities and the preset endpoint, and returns the command wiring when the
command surface itself is reshaped.

* refactor(liveshare): leave the workspace file preview and terminal grant out

Reading a Session's data and reaching into the owner's workspace or shell are
different promises: the first follows visibility, the second changes what the
owner's machine does. This change keeps the reader capabilities that describe
Session data and returns the other two for their own discussion.

* refactor(jobs): let the session resolver name the job endpoints' Session

The session resource resolver already reads a top-level sessionId, so the
explicit readers restated what it derives. Removing them keeps one rule for
how a Session resource is named.

* test(liveshare): drop the workspace preview stubs the strip left behind

The viewer shell no longer opens workspace files, so the fixture route and
the assertion about it no longer describe anything.

* fix(jobs): bind the job endpoints to the Session they name

The session resolver reads a top-level sessionId, but these methods take a
request object and no lookup parameter, so the request fell through to the
global resource and a reader was refused. The explicit readers state the
Session the Gateway must authorise.

* refactor(jobs): let the session resolver name the job endpoints' Session

The session controller's resolver already reads the sessionId of the first
object argument, so an explicit reader on these methods restated a rule the
Gateway already applies. The tests now install the session controller and
assert the resource the production composition produces.

* refactor(session-controller): take the resolve input as one argument

An exported function cannot destructure its parameters, because the JSDoc
gate names them one by one.

* docs(liveshare): describe the capabilities this change actually opens

The workspace file preview, the terminal grant and the command surface
moved out of this change, so the package reference and the PR description
now state what remains.

* docs(persistence): refresh the catalog after the preset JSDoc edit

The permission-presets module doc grew a line, so the recorded source
line for its persisted event moved from 60 to 61.

---------

Co-authored-by: DeepSeek Harness <[email protected]>
2026-11-14 15:41:52 +00:00
imccyu a7beca9f00 Merge branch 'master' into worktree-sync-release-dsh-0.2.2-rc.3-to-master 2026-11-13 15:23:05 +08:00
imccyu ff6db9df9f Merge branch 'release/dsh-0.2.2' into master 2026-11-13 15:12:47 +08:00
Shigma e7a31d7517 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12
# Conflicts:
#	packages/bundle/web-app/src/index.ts
#	packages/client/connection/src/index.ts
2026-11-13 14:08:25 +08:00
imccyu 4c1cf20cb1 release(dsh): 0.2.2-rc.3 2026-11-13 13:11:59 +08:00
imccyu 71753fdf91 refactor(connection): add connection auth provider for remote connection (#8266)
* refactor(connection): extract peer authentication providers

* test(connection): cover provider lifecycle and satisfy package gates

* fix(packaging): publish authentication provider locale resources

* test(auth): use runtime login output and cover gateway admission

* fix(auth): preserve Worker requests and migrate Desktop fixtures

* refactor(auth): centralize route admission with required policy

* fix(release): align authentication providers with rc.2

* refactor(connection): keep peer lookup and source policy private

* test(gateway): cover centralized upgrade rejections

* fix(ci): authenticate homepage compression probe

* refactor(auth): let Token own API socket lifecycle

* fix(auth): prevent caching admission refusals and clarify ownership

* refactor(web): collect provider entry URLs after readiness

* refactor(webserver): name the shared entry URL event

* refactor(connection): provide authentication as a nested service

* fix(web-app): restore startup publication defaults

* fix(auth): scope web events and preserve callback flows

* docs(auth): record the implemented provider architecture

* fix(auth): require owner access for administrative routes
2026-11-12 23:14:32 +08:00
a39d44b5dc feat(session): add host reading status to SessionStatus (#6858)
* ✨ feat(session): persist and synchronize read state

* 🌐 fix(client): complete Japanese labels after base update

* 📝 docs: refresh session read-state dependency graph

* 🧪 test(web): align session menu and read-state snapshots

* 🌐 fix(session): complete Japanese plugin metadata

* 🧪 test(web): distinguish unread from pending user input

* 🐛 修复会话阅读状态的故障隔离与生命周期

* 🐛 修复阅读状态依赖检查并补齐自动已读覆盖

* 🐛 恢复会话绿点并移除未读标题加粗

* ♻️ Keep shared session reading state in Host memory

* 🌐 Complete reading-state metadata for supported locales

* 📝 Refresh module graph after removing storage dependency

* 🧹 Move storage dependency policy out of memory-only reading

* 🐛 Wait for sidebar catalog before replay navigation

* 🔧 Give Host TypeScript checks 8 GiB of heap

* ✅ Align Host heap checks and Windows diagnostics

* ♻️ Keep CI repairs outside the session reading PR

* 🐛 Show failed unread turns with an error indicator

* 🔧 Adjust npm layout budget for the reading package

* 🧪 Scope projection stream assertions to observed units

* 🧪 Scope permission and title assertions to their projections

* ♻️ Simplify session reading updates to explicit positions

* 🐛 Align session reading package with release version

* 🧪 Load reading state in LiveShare viewer fixtures

* 🧹 Remove persistence-only type link from memory PR

* 🧪 Align context menu expectations with reading actions

* 🐛 Sync reading package with the release version

* 🧪 Include turn boundaries in session summary expectations

* ♻️ Derive reading failure facts from Host events instead of a projection

The reading service took each completion from the Agent turn-boundary
projection, which forced a stateVersion bump and put that projection's whole
internal state on the wire for every Session list row. The service now records
`turn/end` itself, so `core/agent` and the persisted projection schema are
untouched.

History that ended before the service started raises no reminder, which keeps
"existing history reads as read" without a startup scan. The failure flag
therefore describes only turns this Host observed: marking a Session whose last
turn failed before a restart shows the ordinary unread reminder.

* 🐛 Preserve manual unread until explicit Session interaction

* 🧪 Align cold Session reading snapshot with unloaded title

* 🔖 chore(session): align session-read-state with 0.2.2-rc.2

Master moved the root and every released manifest to 0.2.2-rc.2, but the
new dsh-session-read-state package still declared 0.2.2-rc.1, failing
constraints, verify-version-sync, verify-npm-install-layout, and
release:verify after the master merge.

* ♻️ refactor(gateway): recognize Remote stream carrier loss by error code

RemoteStream now decides whether a generation end or failure is a
retryable carrier loss by the stable code 'gateway/carrier-lost' instead
of `instanceof RemoteStreamCarrierError`. RemoteStreamCarrierError keeps
working and carries that code, so existing callers are unchanged, while a
Client feature package can return a coded Error from `ended` without
importing the class. The new RemoteStreamCarrierFailure type describes
such errors; terminal-controller classifies disconnects the same way.

* ♻️ refactor(session): move Session reading into ui-session-status

Fold the reading feature into the single package
packages/client/ui-session-status and delete session-read-state.

- Host face: SessionStatusService keeps in-memory reading records and
  serves the sessionStatus Remote namespace (mark, follow) with
  session-status/* error codes; its service key is registered only for
  Gateway discovery and is not declared on Context.
- Client face: a package-internal reading model follows the Host stream
  through RemoteSnapshotStream; ctx.uiSession.sessionStatus folds the
  records into completionUnread and completionFailed and exposes mark and
  readingReady; main-view acknowledgement and the
  session-status/read-intent event live here. No reading service or type
  is exported.
- verify-client-packages lets a packages/client feature package request
  packages/api rows through dsh.client.external; feature-to-feature
  requests stay rejected.
- ui-workspace, ui-conversation, bundles, remotes, LiveShare, the client
  test runtime, docs, Agent Notes, and the upgrade guide follow.

* ♻️ refactor(session): clear manual unread only when the main view switches to the Session

Remove the session-status/read-intent event. ui-session-status now clears an
existing manual unread mark when the main view switches to a different
Session, including the first selection after a page load, once the reading
baseline is ready and the body arrives. Window focus, visibility changes,
a replaced binding for the same Session, and activity in the open Session
preserve manual unread.

ui-conversation returns to master (only the ui-session-status client
tsconfig reference remains), and ui-workspace navigation no longer emits
the event. Tests, the session-reading Web e2e case, READMEs, and the
reading Agent Note follow the new rule.

* 🐛 fix(session): address the Session status review findings

- Open the reading stream only while ctx.remoteAccess allows
  sessionStatus/follow, so a LiveShare viewer opens no owner-only stream,
  keeps readingReady false, and logs no synchronization failure; access
  changes start or stop the stream.
- Hide the unacknowledged completion of the Session the visible, focused
  main view retains; manual marks stay visible, completionFailed follows
  completionUnread, and the reminder returns on blur, hiding, or a switch.
- Declare ctx.sessionStatus on Context and restore its SERVICE_PAGE and
  SERVICE_ROLES entries; the service and SessionRead* types document on
  docs/subsystems/web-client.md, which now owns the reading section with
  the failed field.
- Document that a Host plugin reload can leave the Client with a terminal
  error until a page reload; drop the redundant types import and the
  unused publish() result.
- Archived Sessions read as read and offer no reading mark in the row
  menu or the toggle-read shortcut.
- session.toggleRead names the open dialog, open panel, or archived
  Session that blocks it instead of asking to select a Session.
- isRemoteStreamCarrierFailure rejects a RemoteError from the Host even
  when it carries gateway/carrier-lost; the code is Client-local.
- ./types is types-only like ui-trajectory, and files no longer ship
  lib/types JavaScript.

* 🐛 fix(session): close the remaining Session status review gaps

- The Gateway Client exports isRemoteStreamCarrierFailure, and the
  terminal view uses it, so a Host RemoteError carrying the carrier code
  shows as failed rather than disconnected.
- Each access grant's reading stream carries a token: frames a revoked
  or superseded stream still delivers are discarded, and cleanup waits
  for disposal before leaving reading unavailable unless a newer grant
  is active.
- The status table hides the viewed Session's natural reminder only
  while that Session is open; the panel case is a documented limitation.
- The README limitation and the upgrade guide state that only the
  main-view switch rule, including a reload restore, clears manual
  unread automatically.
- Add the missing blank line before the next heading in the web-client
  reading section.

* ♻️ refactor(session): install reading under the Session status table

- apply returns to master's form plus one line: UiSessionStatus is the
  root, published as the useSessionStatus source, and installReading()
  from the new src/client/read.ts follows Host reading records into it.
  UiSessionStatus takes master's three constructor parameters and
  creates its own SessionReadModel as the package-internal `reading`
  member; installSessionStatus is removed and acknowledge.ts stays a
  separate file.
- The viewed Session's snapshot subscription republishes the table only
  when its openState changes, so streamed events do not rebuild it.
- Remove the obsolete Dev Note sentence about failure outcomes.
- session.toggleRead passes when the Peer may not mark reading, matching
  the row menu, and reports readingUnavailable only while unsynchronized.

---------

Co-authored-by: imccyu <[email protected]>
Co-authored-by: imccyu <[email protected]>
2026-11-12 05:35:57 +00:00
Shigma fc1710a167 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12 2026-11-11 22:09:14 +08:00
imccyu 5e7206f6c6 refactor(exports): retire obsolete subpaths with compatible brand APIs (#8215)
* refactor(exports): consolidate type entries and remove obsolete subpaths

* fix(exports): preserve constructors while retiring brand subpaths

* fix(exports): retain guide relocation after parent squash
2026-11-11 08:39:14 +00:00
imccyu 455f7a38a6 Merge pull request #8214 from deepseek-harness/split-exports-brand-strings
refactor(brand): migrate internal identity construction
2026-11-11 15:15:26 +08:00
imccyu 91319233e1 release(dsh): 0.2.2-rc.2 2026-11-11 10:18:52 +08:00
Shigma 862e699e27 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12
# Conflicts:
#	vendor/README.md
2026-11-07 14:18:03 +08:00
Yudong Han 2d463af8d2 Merge pull request #7365 from deepseek-harness/feat/sidebar-file-search
feat(ui-sidebar-files): 侧栏文件树新增搜索栏 UI 与排除规则设置
2026-11-07 00:56:13 +08:00
imccyu 0a228f0a6a feat(ui-chat): load earlier history with explicit consumption intent 2026-11-06 23:37:20 +08:00
lsdsjy d51d623bfc feat(account): 接入通用通知接口并统一账号服务 (#7550)
将赠金专用提示迁移到通用通知 list、content 和 events 接口,支持轮询、语言刷新及单次交互上报。

统一账号服务和 Remote,通知 UI 放入侧栏并保持独立生命周期。

Refs #6373
2026-11-06 17:40:24 +08:00
Magolor 2f9d5d083c Show server-masked credential previews by Unicode code point 2026-11-06 16:59:29 +08:00
Magolor ef3a02167a fix(settings): preserve saved API key mask length 2026-11-06 16:59:27 +08:00
Magolor 86247d664b fix(settings): protect saved keys and preserve clear failure state 2026-11-06 16:58:59 +08:00
Magolor 334a76ef88 fix(settings): show masked saved keys and restore environment auth 2026-11-06 16:58:49 +08:00
Shigma 1511a6ed44 chore(cordis): upgrade core to 4.0.0-rc.12 2026-11-05 20:34:44 +08:00
Yichen Jiang 2246027c59 Merge remote-tracking branch 'origin/master' into feat/agent-terminal-panel-host 2026-11-05 14:43:16 +08:00
imccyu 6b8d868008 chore(deps): unify zod to 4.6.6
Raise all 88 workspace zod declarations to exact 4.6.6 and move @browserbasehq/stagehand to 4.4.0, which pins the same version, so the lock keeps a single zod copy. Test expectations and the Typert consumer's node types follow the new declarations; pnpm-workspace.yaml records the release-age exemption for [email protected].
2026-11-05 11:27:26 +08:00
Turtle 38c7a9fbf4 feat(release): publish package source, declaration maps, and documentation (#5884)
* feat(release): publish package source, declaration maps, and documentation

Every release member publishes its TypeScript source and the declaration
maps that resolve into it, and @deepseek-ai/dsh publishes the repository
Markdown documentation staged from docs/ at prepack time.

The ./src/* export most members already declared now resolves for an
installed consumer, and a consumer editor follows a declaration to the
implementation. Bundled JavaScript maps stay unpublished; the vendored
family and the Desktop runtime file policy are unchanged.

Rationale: .agents/notes/implemented/process/2026-10-08-published-source-and-docs.md

* feat(release): publish JavaScript maps and compress bundles

Every emitted JavaScript map ships beside the bundle it describes, and the
workspace build and the client preset compress bundles without mangling
identifiers.

The documentation payload now mirrors the website publication manifest and
is removed again by `postpack`; Desktop and the Python executable exclude
the published source, documentation, and maps; `clean` removes a staged
copy. Typert's publication contract gains the Remote declaration map.

* fix(release): keep node bundles readable for the worker image

The browser worker image lowers `yield*` only as a whole statement and
rewrites `for await` loops by their source layout, so compressed node-side
entries either fail that lowering or lower to unparseable code. Only the
browser bundles keep compression, which removes about a third of their text.

The bundle-purity assertion now matches the module-loader call regardless of
the quote style compression picks, and the release-pack fixture exercises
the installed package's new documentation requirement.

* feat(release): publish the whole documentation tree

`@deepseek-ai/dsh` copies `docs/` in full instead of the website's page
set: the maintainer documents, the generated migration records, the
translation guidelines, and the `*.i18n.yaml` consistency records ship
with the installed package, so the documentation's own links resolve
without a checkout.

* feat(release): publish the upgrade guides with the documentation

The staged documentation keeps the website's page set and adds every
`docs/upgrade-guide/` document, which is what an installed reader consults
when a released change breaks something. The rest of the maintainer tree
stays out.

* test(release): expect source and maps in master's new payload cases

* feat(release): keep installed docs and source readable in Desktop

Desktop keeps the published src/ and docs/ trees inside app.asar, and
every model shell call receives DSH_INSTALL_DIR and DSH_NODE_EXECUTABLE
so an agent can read them through Electron's Node mode. Staging also
generates docs/upgrade-guide/README.md, an index of the upgrade guides
grouped by the release they upgrade from.

Minified client bundles print string literals with backticks: the
worker image packer now recognizes those chunk requests, client license
banners are prepended after minification so their text survives, and
the affected artifact tests accept either quote.

* test(desktop): read archived docs through the Windows PowerShell form

Regenerate the config catalog for the shifted shell-env source line.

* test(desktop): wait for the GUI-subsystem Electron process from PowerShell

* build(release): publish source and maps from the message-quotes package

* build(release): publish source and maps from packages new on master

* build(release): publish source and maps from the tool-office package
2026-11-05 00:22:36 +08:00
yudshj a220e017b5 refactor(office): 合并为 office-kit,Kit 缺失时降级而非加载失败
- Kit CLI 由 office-kit/locate 在 Host 中定位(含 ASAR 映射与可选 root 越界检查),删除 Desktop 壳的 office-cli 与诊断文件;生产版 Desktop 由壳通过 DSH_BUNDLED_RUNTIME_ROOT 显式传入 Kit 根目录,开发版与 Web 不检查
- office-to-pdf 与 office-kit-resolver 合并为 @deepseek-ai/dsh-office-kit,由同一包定位 Kit 并提供转换服务
- Kit 缺失时 provider 照常注册,转换请求以 OfficeKitError unavailable 拒绝,之后安装 Kit 无需重载
- 类型统一使用 OfficeKit 前缀(OfficeKitRequest/Result/Priority/Key),同步消费方、文档、升级指南与 catalog
- 处理 ds-review-bot 意见,并更新 unknown 断言基线

本 PR 的 snapshot 统一在这个提交里用 keyless refresh 重新生成,前 3 个提交中的 snapshot 不一定和那一步的代码对应。
2026-11-04 18:17:57 +08:00
Yichen Jiang 1bcbda3d6d Merge remote-tracking branch 'origin/master' into feat/agent-terminal-panel-host 2026-11-04 16:51:18 +08:00
Yichen Jiang c5ea810a06 Merge remote-tracking branch 'origin/master' into feat/agent-terminal-panel-host 2026-11-04 16:09:24 +08:00
imccyu abc0e7092b Merge remote-tracking branch 'origin/release/dsh-0.2.2' into merge/release-dsh-0.2.2-rc.1-to-master
# Conflicts:
#	packages/client/ui-agent-team/package.json
#	packages/client/ui-brand-official/package.json
#	packages/client/ui-open-in-app/package.json
#	packages/client/ui-settings-web-search/package.json
#	packages/experimental/agent-team-profile/package.json
#	packages/team/agent-team/package.json
#	packages/web/web-search-exa/package.json
#	packages/web/web-search-perplexity/package.json
2026-11-04 15:59:50 +08:00
imccyu 2f97f60455 release(dsh): 0.2.2-rc.1 2026-11-04 15:50:06 +08:00
Yichen Jiang 454a3f7a88 fix(terminal-controller): delete confined Agent shell history and stop pointing read-only shells at it
read-only confinement cannot write /tmp, so the per-terminal history path
did nothing there; read-only shells now get an empty HISTFILE, which also
keeps them from loading the person's history. workspace-write shells keep
their per-terminal history file, and the controller now deletes it
through the same execution environment after the shell ends, including a
failed allocation; a failed deletion is logged.
2026-11-04 15:48:30 +08:00
Yichen Jiang 9eb4144222 refactor(terminal-controller): publish AgentTerminal as an interface
The public AgentTerminal class took the internal BrowserTerminal as its
constructor parameter, so the Cordis API catalog listed BrowserTerminal
and all of its members. AgentTerminal is now a type-only interface and
the controller constructs a package-private AgentTerminalHandle; the
catalog no longer names BrowserTerminal. BrowserTerminal.onStateChange
becomes setStateListener, because a later call replaces the listener.
2026-11-04 15:41:10 +08:00
Yichen Jiang b105a29412 fix(ui-sidebar-terminal): close the tab of a terminal that ends under Agent control
The sidebar only opened tabs for Agent terminals that appeared in the
roster, so a terminal the Agent closed left a "Terminal closed." tab
behind. Each window now remembers which listed terminals the Agent
controls and closes the tabs bound to one that leaves the roster; a
terminal the person took over keeps its tab. The client terminal list
also adopts each whole roster instead of only merging it, so terminals
the Host no longer retains leave the cached list. ClientTerminals gains
boundTerminal to read a tab's terminal binding.
2026-11-04 15:38:52 +08:00
Yichen Jiang 5659e20c45 fix(ui-sidebar-terminal): keep focus reports and scrolling from taking over Agent terminals
A click that focuses a program with focus reporting (DECSET 1004), such as
vim or neovim, made xterm send ESC [ I within the gesture window, so the
click took the terminal over. Scrolling a pager on the alternate screen
did the same through wheel-generated arrow keys. Focus reports are never
typed, and the wheel no longer opens the typed-input window.
2026-11-04 15:34:43 +08:00
liukx0205 78167faa4f Merge remote-tracking branch 'origin/master' into fix/web-prompt-retry 2026-11-04 15:34:17 +08:00
liukx0205 a186602dc3 Merge remote-tracking branch 'origin/master' into fix/web-prompt-retry
# Conflicts:
#	packages/api/session-controller/README.i18n.yaml
#	packages/api/session-controller/src/commands.ts
2026-11-04 15:29:20 +08:00
Yichen Jiang 6be8e43bcd fix(terminal-controller): reopen a failed roster stream for its remaining watchers
A roster stream that failed while watched used to drop its watchers, so
Agent terminals stopped opening tabs until the Session header remounted.
The stream now reopens in place on the next watch of that Session or when
the connection resets.
2026-11-04 14:23:31 +08:00
Yichen Jiang f1e90e5845 fix(terminal-controller): bound Agent terminals precisely and report closed screens uniformly
maxAgentTerminals now counts only running Agent-controlled terminals and
pending Agent allocations, each id once; exited terminals and failed
allocations awaiting cleanup still count toward maxTerminals. openForAgent
applies rename's 1-120 character title rule and trims the title.
readScreen reports a terminal closed while its read drains as
RemoteError terminal/unavailable, like a missing terminal.
2026-11-04 14:23:21 +08:00
Turtleandimccyu 4731be7515 Merge origin/master into turtle/fork-name-suffix-5f3435925211
Co-authored-by: imccyu <[email protected]>
2026-11-04 14:16:25 +08:00
Yichen Jiang c8cf0693ac docs(terminal-controller): state Agent terminal history and close ordering precisely
Only workspace-write can write the confined history file, so read-only
shells do not save history; unconfined shells keep the inherited HISTFILE
unless env sets one. AgentTerminal.close checks control once when called,
and a takeover during cleanup does not stop the close. The sidebar README
now says only a confined terminal's badge names its sandbox mode on hover.
2026-11-04 14:08:52 +08:00
liukx0205 8706daa679 fix(web): deduplicate prompt retries after input acceptance 2026-11-04 13:37:53 +08:00
Yichen Jiang b0279fa8ae test: share continuation fixture across compiler faces 2026-11-04 12:53:54 +08:00
Yichen Jiang dde72c5af1 test: classify shared continuation fixture as client 2026-11-04 12:49:31 +08:00
Yichen Jiang 6f84e118b1 Merge remote-tracking branch 'origin/master' into worktree/continue-generation-after-failure
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-11-03 16:48:34 +08:00
Yichen Jiang 00fbab4c14 Merge remote-tracking branch 'origin/master' into worktree/continue-generation-after-failure
# Conflicts:
#	docs/persistence-schema.json
2026-11-03 15:28:52 +08:00
imccyu f590c13c92 Merge master into worktree-sync-dsh-0.2.2-to-master-1103b 2026-11-03 15:10:23 +08:00
Yichen Jiang bc98ceb69f test(api): include retry eligibility in default session summaries 2026-11-03 14:12:21 +08:00
Yichen Jiang 2fb4ea0bec Merge origin/master into worktree/continue-generation-after-failure 2026-11-03 14:08:46 +08:00
gengruilin d9d3b80fe3 Merge remote-tracking branch 'origin/master' into feat/mcp-manager-core 2026-11-03 13:37:58 +08:00
imccyu 1c78d475bf release(dsh): 0.2.2-alpha.3 2026-11-03 13:37:26 +08:00
gengruilin df078ddc82 Merge remote-tracking branch 'origin/master' into feat/mcp-manager-core 2026-11-03 13:31:23 +08:00
yudshj 3859913c68 feat(web): 网页搜索与获取设置页分开选择 Search 与 Fetch,Search 默认改为 DeepSeek Search API 2026-11-03 13:04:26 +08:00