dsh-tool-goal/packages/goal/tool-goal官方

175.3kStar19.0kFork0Issue752Watching

提供模型面向的同会话目标管理工具get_goal、create_goal和update_goal,支持目标创建、编辑、暂停、恢复、完成和阻塞操作,带有执行时权限检查,用于长期运行目标的跟踪与管理

机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

$ dsh plugin --profile web add npm:@deepseek-ai/dsh-tool-goal

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/goal/tool-goal:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

The model-facing control tools for ctx.goals: get_goal, create_goal, and update_goal. The goal-tool Agent Note owns the authority split and Codex-shaped UX.

Tools

  • get_goal() returns the current goal or null, including the compare-and-set id/revision, durable phase, admitted/capped goal rounds, any blocker reason, and current process-local activation.
  • create_goal(objective, max_goal_rounds?) creates one goal from a direct top-level human turn. The model may infer long-running goal intent without an exact command phrase; non-human turns and subagents are rejected at execution.
  • update_goal(goal_id, revision, action, objective?, max_goal_rounds?, blocked_reason?) supports edit, pause, resume, complete, and blocked. Replacements belong only to edit; blocked_reason is required only for blocked and is persisted with the stable code model-reported. Strict-schema empty-string and zero fillers count as omitted, while meaningful values remain limited to their action.

All calls are exclusive, so a model-ordered batch observes earlier mutations and their new revisions. UI clients receive pure generic cards: read for get_goal, other for mutations. Mutation cards select the first meaningful action value and otherwise show the goal id, so accepted fillers never produce blank input.

All three canonical values match the compact JSON already rendered to Native callers: { goal: null } or { goal: { id, revision, objective, phase, roundsStarted, maxGoalRounds, blockedReason? }, activation }. Programmatic consumers therefore receive the same domain structure without parsing the rendered JSON.

An autonomous goal round that successfully reports complete or blocked marks that tool execution with concludeTurn() so the physical turn stops after the step. Direct-human mutations never contribute this stop: the assistant may acknowledge the change and concurrent human steering remains available to the loop.

Authority

Execution requires the exact live exec.agent, its inherited AgentRegistry initiator, running status, and an open turn. Create, edit, pause, and resume additionally require an accepted { kind: 'user' } message or steering event in a runtime-root agent's current turn. Durable fork lineage does not demote a resumed root; live subagent ownership does.

{ kind: 'user' } is a host attestation. Agent.followup() and steer() assign it when their caller omits a source, so plugins, schedulers, and other non-human producers must pass their own source rather than inheriting human authority.

Complete and blocked also accept the exact current goal round: a goal-sourced user/message whose id, revision, and round equal the folded current goal. A goal-round blocked call is mechanically rejected until blockedAfterConsecutiveRounds; the model judges whether the same condition actually persisted and must describe it in blocked_reason. Direct human authority may stop a goal immediately.

Config

- id: tool-goal
  name: '@deepseek-ai/dsh-tool-goal'
  config:
    blockedAfterConsecutiveRounds: 3

The value must be a positive safe integer. It supplies both the hard lower bound on model self-blocking and the number named in model guidance.

Model Experience

System prompt

What the model sees

A fixed goal policy says when semantic human intent warrants creation, requires exact read-before-update refs, explains rearming after resume/fork, and limits completion/blocking claims. The configured threshold is interpolated into that guidance.

Goal policy
Use goal tools for one long-running completion objective in the current session. create_goal may infer goal intent from a direct human request in any language; do not create a goal for routine single-turn work. Call get_goal before update_goal and copy its exact goal_id and revision. After session resume or fork, an active goal is disarmed: when a human asks to continue or resume in any wording or language, use update_goal action resume to rearm it. Mark complete only when the objective is actually achieved. Mark blocked only after the same blocking condition persists for at least 3 consecutive goal rounds, and report that concrete condition in blocked_reason; difficulty, uncertainty, or useful remaining work is not blocked.

Token effect

Small fixed input cost on every request where this plugin's prompt registration is in scope.

KV Cache effect

Prefix-stable while the plugin scope, configured threshold, and guidance text are unchanged. Activation, disposal, or configuration changes may invalidate reuse from this prompt section.

Tool schemas and results

What the model sees

The generated get_goal, create_goal, and update_goal schemas. Successful results are compact JSON. A mutation appends the goal domain's durable goal/change event without queuing model context. activation in a result is a live observation and never becomes replay authority.

Token effect

Fixed schema cost plus one compact result per call. The durable mutation adds no separate model-visible context.

KV Cache effect

Schemas are prefix-stable while their definitions and visibility are unchanged. Calls and results append after the reusable request prefix without invalidating earlier entries.

Known Limitations and Deferred Work

  • Semantic intent remains model judgment — execution can prove that the current turn contains a direct human message, not whether the request is substantial enough to merit a goal.
  • Same-condition blocking remains model judgment — the runtime enforces distinct admitted-round count, not semantic equivalence of obstacles; an independent evaluator is deferred.
  • No scheduling or direct human rendering — these tools mutate state only; the same-session driver and dsh-command-goal are independent consumers of the same domain.
  • Goal-round authority requires a driver — the autonomous complete/blocked path is dormant unless a continuation driver admits goal-sourced user turns; mounting this tool package alone does not create them.
  • Prompt registration is independent of filtering — a scope may hide the tools while retaining their guidance unless the deployment scopes both registrations together.

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/goal/tool-goal)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录