whitelonng/dshcode--packages-client-ui-goal ↗★ 715

@deepseek-ai/dsh-client-ui-goal

Session goal surface: GoalBar docked above the composer, read from the goal session projection 适合需跟踪并管理当前会话目标的用户;操作经目标服务处理。

Package
@deepseek-ai/dsh-client-ui-goal
Compatibility
Unverified
Harness peer range
workspace:^
Cordis peer range
workspace:^
Version
0.1.2-alpha.4
License
MIT
Last updated
Sep 13, 2026

Other repositories with this package name

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗


description: "Goal surface for the Web GUI: the composer-context strip that shows the current goal and edits, pauses, resumes, or clears it; for users and maintainers of the goal experience." kind: "package-reference"

@deepseek-ai/dsh-client-ui-goal

English | 中文

Summary

This package renders the goal surface in the Web GUI: a strip in the composer-context stack that shows the current goal of the session and offers edit, pause, resume, and clear actions. It reads the live goal from the host-computed projection and routes every mutation through the goal service, surfacing rejections inline. It also projects each durable /goal command run as a Command input bubble in the chat, so a goal command entered by the user or the model appears in the transcript. Goal creation is outside this plugin. The shipped Web presets other than minimal mount /goal in their agent scope.

Table of Contents


Use this package

Mount this plugin alongside ui-conversation and the goal domain package; the strip then appears as the second card in the composer-context stack (after Todo, before Queue) whenever the session has a goal. An active goal offers pause; a paused one offers resume; edit rewrites the objective; clear removes the goal and suppresses the strip until the projection catches up.

The command-input bubble

Each durable /goal run projects as a right-aligned monospace user-style bubble labeled Command input (or 指令输入), rendered before the generic command result row. It carries no timestamp, copy, or branch actions, and reloading reconstructs it from the run.

Failures

A rejected mutation surfaces the Remote error inline on the strip; loading, absent, completed, and successfully cleared goals render nothing.


Understand the implementation

Implementation internals — click to expand

The strip is projection-mode: the live goal arrives through useProjection('goal') (seeded by the history tail page and updated by session/projection frames), so the plugin owns no domain store, refresh chain, or event listener. The inject face carries only the four mutation verbs through ctx.remote.goals; each reads the CAS ref from the session's current projected value at call time, and the RPC's compare-and-set is the staleness guard. The strip single-flights mutations synchronously because a pending render cannot fence same-frame clicks. The command-input projection is a separate Conversation Definition that builds a command-input Chat Node before the generic command result Node; it never creates user/message or a model turn.


Further Exploration

Read these pages when the goal surface is not enough. They move from the browser strip to the goal domain and the slots it fills.

  • dsh-goal — the goal domain, projection, and /goal command this surface reads and mutates.
  • ui-conversation — declares the conversation.input.dock slot and owns the composer.
  • Client package map — adjacent browser UI packages.

Model Experience

Indirectly, through the goals/edit, goals/pause, goals/resume, and goals/clear mutations the strip routes; the host GoalService owns the model-visible goal context message those mutations queue.

KV Cache effect

None unless the queued goal context is admitted. An admitted context extends the history tail like any other message; an insertion discarded before admission does not affect the cache.

Known Limitations and Deferred Work

These limits define the current goal surface. They are current package constraints, not a goal-domain comparison or a task backlog.

  • Durable phase only — the projection omits process-local activation, so the strip cannot distinguish an active-but-disarmed goal from an armed one; resume re-arms through the RPC side. There is no host-live activation channel.
  • Preset-independent host state — switching an active session to minimal leaves its host-owned goal intact. /goal and goal tools disappear, while this strip can still edit, pause, resume, or clear the goal.

Dev Note

Working context for maintainers — click to expand

None.

Runtime invariant: No companion is published. A single GoalBar dock registration whose disposal is proven by the HMR-safety spec — the plugin owns no store (state arrives on the goal projection), emits no cordis events, and holds no cross-plugin mutable state.