Mint-hfut/dsh-personal-assistant ↗★ 0

dsh-personal-assistant

提供主动式、拟人化的个人助理内核 适合需要行程规划、习惯记忆和经验推理的主动式助理任务。

套件
dsh-personal-assistant
相容性
待驗證
版本
0.13.0
授權
MIT
最近更新
2026年10月23日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Mint-hfut/dsh-personal-assistant

Usage

There are no commands to memorize. Talk to the assistant.

  • Plan a trip: “我下周要去上海出差两天,帮我安排” — before acting, the assistant works through the trip end to end, weighs the material decisions and follow-ups against your saved guidance, and asks only for missing facts that would change the plan. It researches the resulting options, records later actions as tasks, tells you what it will check on and when, and asks before booking anything.
  • Tell it a habit: “记住我坐飞机靠窗” — saved as a stable preference; “和客户吃饭时别给我安排酒” — saved as a situational preference that overrides the stable record only in that situation.
  • Remember experience and reasoning: “上次去南京选高铁,是因为门到门更快、改签更灵活;不是长期交通偏好” — saved as a sourced, time-aware decision record. The assistant can later explain why while still re-evaluating a new trip instead of inventing a rail preference.
  • Separate observation from inference: “三次长会他都提前离开;我猜他不喜欢长会” — the observations and low-confidence hypothesis remain distinct, and the hypothesis is used only for low-cost, reversible suggestions.
  • Fill the gaps: “做个偏好问卷” — the survey is rendered as chat questions; answered items are saved, and a declined survey is never offered again.
  • Proactive check-in: at the routine schedule, the assistant inspects open tasks, deadlines, and approval needs first, then reports only actionable findings. No news means a quiet session.
  • Keep a conversation: click the star below a reply you want to keep, pick 1–5 stars and one or two save reasons (instruction followed / wording / output / recurring scene / process & decision / pitfall & correction / preference clue / spark), and it is captured as a whole turn. In Settings → Personal Assistant the collapsed list shows ratings and actions; parsing distills both a knowledge record and a preference record — the chosen reasons decide the emphasis (process reasons bring in the thinking and tool order, result reasons only the question and final answer), the knowledge body follows that reason's content skeleton, and situational preferences are produced only when the exchange states a scenario. Deleting the parsed knowledge leaves the favorite itself untouched.

A runnable demo script lives in DEMO.zh.md (Chinese).

The v0.10.0 personal-knowledge report lives in TEST-REPORT-v0.10.0.md (Chinese). Run npm run check for the regression suite, including local v6 and colleague v7 state migration, Bilibili import, stale parse results after editing or reloading, reminder recovery after persistence errors, and editing favorites at the 1000-record limit. Network and model calls in these tests use fixtures; live host behavior and knowledge quality still need acceptance testing.

Configuration

All fields are optional and default sensibly. Configuration lives in two layers: the web settings panel (runtime-mutable, effective on save) and the profile's cordis.patch.yml (the baseline layer).

Web settings panel

Under Settings → Personal Assistant in the DSH web GUI the plugin serves its own panel (host-side HTTP routes; works on any host with a webserver, no settings-service dependency):

FieldMeaningEffect
In-request proactivityExpand a request into material dependencies, missing facts, follow-ups, and care itemsLive on save
Time-driven proactivityExtract future agenda items from the conversation, already-read sources, and personal knowledgeLive on save
External source subscriptions (dynamic)Owner- or assistant-added sources, each enabled independently; assistant suggestions start disabled (the model may enable one after the owner agrees in conversation)Live on change
Task due-time wakeAutomatically schedule a due-time reminder for tasks with a deadlineLive on save
Wake lead minutesMinutes before the deadline the wake fires (0–1440, 0 = on time)Live on save
Routine cron / time zone / reminder titleDefault schedule for assistant_routine when enabledNext routine enable

Panel writes persist to personal-assistant/config.json next to the state file (the UI overlay layer, merged over the cordis.yml baseline); each field can be reset back to the baseline and overridden fields carry a badge. Turning the task wake off clears every recorded wake on the next task operation.

The panel also shows five live inventories; the preference library, conversation favorites, and personal knowledge library share one card language: a stats strip, filter pills, and collapsible rows. The external signal source list grows through interaction: owners can add sources directly, assistants can suggest disabled sources, and every row has its own enable switch and delete action; once the owner agrees in conversation, the model may enable a suggestion on their behalf. The wake inventory lists every due-time wake and the routine the assistant has scheduled, read live from the host scheduler and joined with task bindings: each row shows the kind, the arm status, the next fire time, the last delivery, and the owning session, with an active/all filter. Wakes are added and removed by the task lifecycle itself — completing, cancelling, or deleting a task removes its wake, and rescheduling rebinds it. The preference library renders stable and situational preferences as modular cards: a stats strip for total / categories / situational count / average confidence, category-grouped sections with an SVG icon and fixed accent tone, ordered from the eight core domains (travel / food / schedule / communication / work / health / finance / clothing) through the four on-demand domains (sports / arts & entertainment / learning / shopping) to other, keys as breadcrumb tags, a five-segment confidence meter, and source/time chips — plus all/stable/situational filters, collapsible groups, direct add, in-place edit, and two-step delete, with the add/edit category picker grouped by the same tiers. The conversation favorites card lists saved exchanges collapsed by default — the first line carries the star rating, category (why you saved it), parse status, and the parse / edit / delete actions, the last line carries the session id, turn number, and save time — with per-row disclosure, expand-all / collapse-all, and internal scrolling; expanded rows show the question, the execution-process overview, the reply, and the note. Parsing runs through an LLM in a background queue (star-descending, one call at a time): the status badge and a 2 s poll track "parsing…", failures show their reason inline with a retry action, an analyzed favorite can be re-parsed, and pending favorites parse automatically on each host start (when the llm service is not available yet they simply stay pending — never marked failed — and the panel can parse them once the service is available). The personal knowledge library shows the latest non-sensitive knowledge grouped by attribute (entity / event / pattern …, the 12 kinds) by default, or by content genre (teaching / guide / resource library …), or switched back to recent order; the genre also appears as a clickable standalone tag and facet, alongside kind/text filtering, create, archive, and two-step delete; attributes are labeled in your language (对象 / 事件 / 状态 / 观察 / 方法模式 / 目标 / 决策 / 承诺 / 产出物 / 关系 / 规则 / 假设), while type (教学 / 攻略 / 资源库 …) is a clickable data-type tag and facet; the two are orthogonal, and the favorite reason is neither. Deleting a knowledge record that a favorite produced unlinks it and marks that favorite skipped — it will not be re-parsed automatically on the next host start; re-parse it from the panel when wanted — without changing its content, stars, category, or note. All five edit through the same serialized store path and validation as their conversation tools, so panel changes are visible to later conversations immediately.

cordis.yml layer

Override in the profile's cordis.patch.yml (also the baseline the panel resets to):

- insert:
    - id: dsh-personal-assistant
      name: dsh-personal-assistant
      config:
        dataFile: personal-assistant/state.json
        proactive:
          requestProactivity: true    # expand requests into material dependencies and follow-ups
          timeProactivity: true       # extract future agenda items and maintain anticipatory checks
          cron: '0 9,13,17 * * *'   # default check-in schedule when the agent enables the routine
          timeZone: Asia/Shanghai
          title: '[Personal Assistant] Proactive check'
          taskWake: true             # task due-time wake switch (overridable per field from the settings panel)
          taskWakeLeadMinutes: 0     # lead minutes before the deadline (0–1440; panel-overridable)
        workflow:
          maxTraceSteps: 200        # root-call steps recorded per workflow (10–2000) before the trace is marked truncated
  • dataFile — state file name under the DSH data directory. State is stored per DSH data directory and shared across all workspaces; generated workflow Skills are projected per workspace.
  • proactive — defaults for in-request proactivity, time-driven agenda extraction, wakes, and the routine binding (requestProactivity, timeProactivity, cron, timeZone, title, taskWake, taskWakeLeadMinutes). They are overridable per field from the settings panel. External-signal proactivity is not a fixed config enum: dynamic source records live in plugin state, owners can add them directly, assistants can suggest disabled sources, and each source is independently enabled. The agent still derives the actual routine schedule from the follow-ups it serves and rebinds as timings change. Task due-time wakes work independently of the routine state — they fire with the routine disabled.
  • workflow — maxTraceSteps bounds how many root calls one workflow records (10–2000, default 200); at the bound the trace is marked truncated and cannot publish a skill. Lowering the value never blocks loading existing longer traces. Read once at plugin load (reload the plugin after changing it).

Task due-time wake behavior

  • The wake binds the session that recorded the task: it delivers when that session is live at the deadline; otherwise it waits and delivers when the session comes back (one-shots are never lost and never delivered to another session).
  • Due-time changes and deletions retire the host wake before committing: a failed retirement aborts the whole operation (ok:false) with the old deadline and binding kept for the next task action to retry. A failed cleanup on completion or cancellation keeps the binding on the terminal task (visible in the wake inventory) for the sweep on any later task action to retry. The retirement is gated by a full validation dry-run: invalid arguments (a malformed deadline, a blank title) are rejected before any host wake is touched, so a failed update can never silently drop a wake; if the persistence layer fails after the retirement already committed, the wake is re-armed from the task's unchanged deadline and the result says so.
  • Moving a task to a terminal status through update recycles its wake exactly like complete/cancel; a task created already terminal never arms a wake.
  • Turning the wake off affects tasks from then on: recorded wakes are cleared on the next task operation, and existing tasks gain their wake on their next update. Due-time changes and deletions issued while the wake is off follow the same retire-first rule: when the sweep cannot delete the target wake the operation aborts with the binding kept, never leaving an orphan wake that no state record points to.
  • A wake creation failure never fails the task mutation — the failure is reported in the tool result's wake field.
  • Hosts without a Schedule service degrade gracefully: wakes are skipped (reported in the result). Hosts without a webserver keep everything except the settings panel (headless profiles log one line).