@stackstackstack/dsh-command-goal 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +58 -0
- package/README.zh.md +58 -0
- package/lib/index.js +151 -0
- package/lib/invariant.js +23 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/invariant.d.ts +16 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/goal/command-goal/README.md
|
|
5
|
+
README.md: 504c0034e1a117a144221400bcc69d5c0fea49f3
|
|
6
|
+
README.zh.md: eac4cfda3d951d4404baf86b76ebb9f0d6aa5cfd
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @stackstackstack/dsh-command-goal
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
Human-facing `/goal` control over [`ctx.goals`](../goal/README.md). The plugin registers one global command through [`ctx.commands`](../../interaction/commands/README.md), so every composed command adapter discovers and executes it without a model turn. The [human goal-command Agent Note](../../../.agents/notes/implemented/feature/2026-07-19-human-goal-command.md) owns the UX and composition decisions.
|
|
6
|
+
|
|
7
|
+
## Command contract
|
|
8
|
+
|
|
9
|
+
| Input | Result |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `/goal` | Show the current objective, durable phase, round count/cap, process-local activation, and valid next commands; a blocked goal also shows its policy code and explanation, while no goal shows usage. |
|
|
12
|
+
| `/goal <objective>` | Create and arm a goal, or replace a completed goal with a fresh identity. An unfinished goal is never replaced without an explicit clear. |
|
|
13
|
+
| `/goal edit <objective>` | Edit the current objective without changing its phase or activation. Editing a completed goal creates a fresh active goal. |
|
|
14
|
+
| `/goal pause` | Pause an active goal and disarm continuation. |
|
|
15
|
+
| `/goal resume` | Resume a stopped goal or rearm an active goal after session resume/fork, subject to its remaining round cap. |
|
|
16
|
+
| `/goal clear` | Clear the current pointer while retaining its durable history and tombstone. |
|
|
17
|
+
|
|
18
|
+
Control words are case-insensitive only when they occupy the complete input. Every other non-empty suffix is an objective, so `/goal pause after verification` creates that literal objective. The goal domain trims and validates objectives. Because the generic command plane has no modal editor or confirmation primitive, `edit` takes its replacement inline and an unfinished replacement returns a direct error instructing the user to edit or clear.
|
|
19
|
+
|
|
20
|
+
Expected domain rejections become stable direct command errors without exposing branded ids or revisions. Unexpected implementation failures still reject dispatch so adapters can report them as command failures. Generic command text and output remain live UI state; `dsh-goal` persists every accepted mutation through its own durable `goal/change` event.
|
|
21
|
+
|
|
22
|
+
## Composition
|
|
23
|
+
|
|
24
|
+
The producer injects `commands` and `goals`. A custom app mounts their owners plus this plugin; automatic continuation remains an independent choice:
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
- id: commands
|
|
28
|
+
name: '@stackstackstack/dsh-commands'
|
|
29
|
+
- id: goal
|
|
30
|
+
name: '@stackstackstack/dsh-goal'
|
|
31
|
+
- id: command-goal
|
|
32
|
+
name: '@stackstackstack/dsh-command-goal'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The shipped `dsh` base enables the persisted-goal stack and this command; the Web client provides its interactive adapter. The ACP automation app enables the domain and model tools without a command adapter; `goals: false` removes that stack. The UI-less `agent-spine-demo` requires an explicit `goals: {}` so headless one-shot callers do not silently change from one physical turn to a multi-round operation.
|
|
36
|
+
|
|
37
|
+
## Model Experience
|
|
38
|
+
|
|
39
|
+
### Human `/goal` control
|
|
40
|
+
|
|
41
|
+
#### What the model sees
|
|
42
|
+
|
|
43
|
+
The slash input, mutation, and direct status/error output are absent from model requests. The goal domain records the mutation as `goal/change`; an enabled same-session driver may expose the resulting state in a later continuation prompt. Presentation text is never logged.
|
|
44
|
+
|
|
45
|
+
#### Token effect
|
|
46
|
+
|
|
47
|
+
Reading status, mutating a goal, or receiving a direct command error adds no model tokens. An enabled same-session driver may add later goal-round prompts.
|
|
48
|
+
|
|
49
|
+
#### KV Cache effect
|
|
50
|
+
|
|
51
|
+
Command discovery, mutations, and direct output do not affect the cache. Later continuation prompts follow the driver's ordinary request history.
|
|
52
|
+
|
|
53
|
+
## Known Limitations and Deferred Work
|
|
54
|
+
|
|
55
|
+
- **Plain-text interaction only** — the generic command registry has no modal edit form or replacement-confirmation callback; inline edit and explicit clear keep destructive intent deterministic across adapters.
|
|
56
|
+
- **No per-command round-cap argument** — `defaultMaxGoalRounds` remains deployment config, while a direct human request may ask the model to edit `max_goal_rounds` through the separately authorized goal tool.
|
|
57
|
+
- **No continuous status widget** — bare `/goal` is the portable observation API; adapter-specific badges and reconnectable command output remain future UI work.
|
|
58
|
+
- **Web command adapter only in the shipped apps** — headless, ACP automation, and JSON-RPC adapters do not consume `ctx.commands`. Ordinary prompts can still authorize model-facing goal tools when those are composed.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @stackstackstack/dsh-command-goal
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
面向用户的 `/goal` 控制,基于 [`ctx.goals`](../goal/README.md) 实现。该插件通过 [`ctx.commands`](../../interaction/commands/README.md) 注册一个全局命令,因此每个已组合的命令适配器都能发现并执行它,无需模型轮次。[用户 goal 命令 Agent Note](../../../.agents/notes/implemented/feature/2026-07-19-human-goal-command.md) 负责用户体验与组合决策。
|
|
6
|
+
|
|
7
|
+
## 命令约定
|
|
8
|
+
|
|
9
|
+
| 输入 | 结果 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `/goal` | 显示当前目标、持久 phase、Round 计数/上限、进程本地续行启用状态与有效的下一步命令;被阻塞的 goal 还会显示策略代码和说明,没有 goal 时则显示用法。 |
|
|
12
|
+
| `/goal <objective>` | 创建 goal 并启用续行,或用全新身份替换已完成 goal。未完成 goal 绝不会在没有显式 clear 的情况下被替换。 |
|
|
13
|
+
| `/goal edit <objective>` | 编辑当前目标,不改变其 phase 或续行启用状态。编辑已完成 goal 会创建新的 active goal。 |
|
|
14
|
+
| `/goal pause` | 暂停 active goal,并停用续行。 |
|
|
15
|
+
| `/goal resume` | 恢复已停止 goal,或在会话 resume/fork 后为 active goal 重新启用续行;仍受剩余 Round 上限约束。 |
|
|
16
|
+
| `/goal clear` | 清除当前指针,同时保留其持久历史和 tombstone。 |
|
|
17
|
+
|
|
18
|
+
只有控制词占据完整输入时才不区分大小写。其他任何非空后缀都属于目标,因此 `/goal pause after verification` 会创建该字面目标。goal 领域会去除目标首尾空白并进行验证。由于通用命令平面没有模态编辑器或确认原语,`edit` 会内联接收替换内容;若试图替换未完成的 goal,则直接返回错误,提示用户执行 edit 或 clear。
|
|
19
|
+
|
|
20
|
+
可预期的领域拒绝会变成稳定的直接命令错误,不公开带品牌类型的 id 或 revision。意外实现失败仍会 reject 分发,使适配器能将其报告为命令失败。通用命令文本和输出仍属于实时 UI 状态;`dsh-goal` 通过自有的持久 `goal/change` 事件记录每项已接受变更。
|
|
21
|
+
|
|
22
|
+
## 组合
|
|
23
|
+
|
|
24
|
+
生产方注入 `commands` 和 `goals`。自定义应用会挂载它们的所有者与此插件;自动续行仍是独立选择:
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
- id: commands
|
|
28
|
+
name: '@stackstackstack/dsh-commands'
|
|
29
|
+
- id: goal
|
|
30
|
+
name: '@stackstackstack/dsh-goal'
|
|
31
|
+
- id: command-goal
|
|
32
|
+
name: '@stackstackstack/dsh-command-goal'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
随附 `dsh` 基础配置启用持久 goal 栈和此命令;Web 客户端提供其交互适配器。ACP(Agent Client Protocol)自动化应用启用领域与模型工具,但不挂载命令适配器;`goals: false` 会移除该栈。无 UI 的 `agent-spine-demo` 必须显式配置 `goals: {}`,避免无头单次调用方在不知情时从一个物理轮次变为包含多个 Round 的操作。
|
|
36
|
+
|
|
37
|
+
## 模型体验
|
|
38
|
+
|
|
39
|
+
### 用户 `/goal` 控制
|
|
40
|
+
|
|
41
|
+
#### 模型看到的内容
|
|
42
|
+
|
|
43
|
+
斜杠输入、变更以及直接状态/错误输出不会进入模型请求。goal 领域把变更记录为 `goal/change`;已启用的同会话驱动器可以在后续继续执行提示词中暴露结果状态。呈现文本绝不会记录到日志中。
|
|
44
|
+
|
|
45
|
+
#### Token 影响
|
|
46
|
+
|
|
47
|
+
读取状态、变更 goal 或收到直接命令错误不会增加模型 token。已启用的同会话驱动器可能增加后续 Goal Round 提示词。
|
|
48
|
+
|
|
49
|
+
#### KV Cache 影响
|
|
50
|
+
|
|
51
|
+
命令发现、变更与直接输出不会影响缓存。后续继续执行提示词遵循驱动器的普通请求历史。
|
|
52
|
+
|
|
53
|
+
## 已知限制与暂缓事项
|
|
54
|
+
|
|
55
|
+
- **仅纯文本交互**:通用命令注册表没有模态编辑表单或替换确认回调;内联 edit 与显式 clear 能在不同适配器中保持明确且一致的破坏性意图。
|
|
56
|
+
- **没有逐命令 Round 上限参数**:`defaultMaxGoalRounds` 仍是部署配置;用户直接请求时,可以要求模型通过另行授权的 goal 工具编辑 `max_goal_rounds`。
|
|
57
|
+
- **没有持续状态组件**:裸 `/goal` 是可移植的观察接口;适配器专用徽标和重连后可恢复的命令输出仍属于未来 UI 工作。
|
|
58
|
+
- **随附应用中只有 Web 命令适配器使用此命令**:无头、ACP 自动化和 JSON-RPC 适配器不消费 `ctx.commands`。如果组合中包含面向模型的 goal 工具,普通提示词仍能授权它们。
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { GoalError } from "@stackstackstack/dsh-goal";
|
|
2
|
+
//#region lib/types/index.js
|
|
3
|
+
/**
|
|
4
|
+
* Human-facing `/goal` command over the persisted same-session goal domain.
|
|
5
|
+
* @module @stackstackstack/dsh-command-goal
|
|
6
|
+
*/
|
|
7
|
+
const name = "command-goal";
|
|
8
|
+
const inject = ["commands", "goals"];
|
|
9
|
+
const USAGE = "Usage: /goal [<objective>|clear|edit <objective>|pause|resume]";
|
|
10
|
+
/** Fail loudly if a locally closed union gains an unhandled member. */
|
|
11
|
+
/* v8 ignore start -- closed-union backstop is unreachable without violating the TypeScript contract */
|
|
12
|
+
function assertNever(value, label) {
|
|
13
|
+
throw new TypeError(`unknown ${label}: ${String(value)}`);
|
|
14
|
+
}
|
|
15
|
+
/* v8 ignore stop */
|
|
16
|
+
/** Parse only the grammar owned by `/goal`; arbitrary other input is an objective. */
|
|
17
|
+
function parseGoalCommand(rawInput) {
|
|
18
|
+
const input = rawInput.trim();
|
|
19
|
+
if (input.length === 0) return { kind: "show" };
|
|
20
|
+
const control = input.toLowerCase();
|
|
21
|
+
if (control === "clear") return { kind: "clear" };
|
|
22
|
+
if (control === "pause") return { kind: "pause" };
|
|
23
|
+
if (control === "resume") return { kind: "resume" };
|
|
24
|
+
if (control === "edit") return { kind: "invalid-edit" };
|
|
25
|
+
if (/^edit(?=\s)/iu.test(input)) return {
|
|
26
|
+
kind: "edit",
|
|
27
|
+
objective: input.slice(4).trim()
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
kind: "create",
|
|
31
|
+
objective: input
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** Human label for one durable goal phase. */
|
|
35
|
+
function phaseLabel(phase) {
|
|
36
|
+
switch (phase) {
|
|
37
|
+
case "active": return "active";
|
|
38
|
+
case "paused": return "paused";
|
|
39
|
+
case "blocked": return "blocked";
|
|
40
|
+
case "complete": return "complete";
|
|
41
|
+
/* v8 ignore next 2 -- GoalPhase is closed and every member is handled above */
|
|
42
|
+
default: return assertNever(phase, "goal phase");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** Commands that are meaningful from one exact live state. */
|
|
46
|
+
function commandHint(goal) {
|
|
47
|
+
if (goal.phase === "active") return goal.activation === "armed" ? "/goal edit <objective>, /goal pause, /goal clear" : "/goal edit <objective>, /goal resume, /goal clear";
|
|
48
|
+
switch (goal.phase) {
|
|
49
|
+
case "paused":
|
|
50
|
+
case "blocked": return "/goal edit <objective>, /goal resume, /goal clear";
|
|
51
|
+
case "complete": return "/goal <objective>, /goal clear";
|
|
52
|
+
/* v8 ignore next 2 -- the active branch and every non-active phase are handled above */
|
|
53
|
+
default: return assertNever(goal.phase, "goal phase");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Render direct UI output without exposing compare-and-set internals. */
|
|
57
|
+
function renderGoal(title, goal) {
|
|
58
|
+
const reason = goal.phase === "blocked" ? goal.blockedReason : void 0;
|
|
59
|
+
/* v8 ignore next -- durable replay guarantees every blocked goal carries its validated reason */
|
|
60
|
+
if (goal.phase === "blocked" && reason === void 0) throw new TypeError("blocked goal is missing its reason");
|
|
61
|
+
const blocker = reason === void 0 ? [] : [`Blocker: ${reason.code}: ${reason.message}`];
|
|
62
|
+
return {
|
|
63
|
+
kind: "success",
|
|
64
|
+
text: [
|
|
65
|
+
title,
|
|
66
|
+
`Status: ${phaseLabel(goal.phase)}`,
|
|
67
|
+
...blocker,
|
|
68
|
+
`Objective: ${goal.objective}`,
|
|
69
|
+
`Rounds: ${goal.roundsStarted}/${goal.maxGoalRounds}`,
|
|
70
|
+
`Activation: ${goal.activation}`,
|
|
71
|
+
"",
|
|
72
|
+
`Commands: ${commandHint(goal)}`
|
|
73
|
+
].join("\n")
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** Exact current compare-and-set ref. */
|
|
77
|
+
function goalRef(goal) {
|
|
78
|
+
return {
|
|
79
|
+
id: goal.id,
|
|
80
|
+
revision: goal.revision
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/** Direct error for an operation that requires a current goal. */
|
|
84
|
+
function missingGoal(action) {
|
|
85
|
+
return {
|
|
86
|
+
kind: "error",
|
|
87
|
+
text: `No goal is currently set; /goal ${action} requires one. ${USAGE}`
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/** Execute one parsed human command through the domain that owns persistence. */
|
|
91
|
+
function executeGoalCommand(ctx, invocation) {
|
|
92
|
+
const command = parseGoalCommand(invocation.rawInput);
|
|
93
|
+
try {
|
|
94
|
+
const current = ctx.goals.get(invocation.agent);
|
|
95
|
+
switch (command.kind) {
|
|
96
|
+
case "show": return current === void 0 ? {
|
|
97
|
+
kind: "success",
|
|
98
|
+
text: `No goal is currently set.\n${USAGE}`
|
|
99
|
+
} : renderGoal("Goal", current);
|
|
100
|
+
case "invalid-edit": return {
|
|
101
|
+
kind: "error",
|
|
102
|
+
text: `Goal editing requires a replacement objective.\n${USAGE}`
|
|
103
|
+
};
|
|
104
|
+
case "create":
|
|
105
|
+
if (current !== void 0 && current.phase !== "complete") return {
|
|
106
|
+
kind: "error",
|
|
107
|
+
text: `A goal is already ${phaseLabel(current.phase)}. Use /goal edit <objective> to change it or /goal clear before replacing it.`
|
|
108
|
+
};
|
|
109
|
+
return renderGoal("Goal created", ctx.goals.create(invocation.agent, { objective: command.objective }));
|
|
110
|
+
case "edit":
|
|
111
|
+
if (current === void 0) return missingGoal("edit");
|
|
112
|
+
if (current.phase === "complete") return renderGoal("Goal created", ctx.goals.create(invocation.agent, { objective: command.objective }));
|
|
113
|
+
return renderGoal("Goal updated", ctx.goals.edit(invocation.agent, goalRef(current), { objective: command.objective }));
|
|
114
|
+
case "pause":
|
|
115
|
+
if (current === void 0) return missingGoal("pause");
|
|
116
|
+
return renderGoal("Goal paused", ctx.goals.pause(invocation.agent, goalRef(current)));
|
|
117
|
+
case "resume":
|
|
118
|
+
if (current === void 0) return missingGoal("resume");
|
|
119
|
+
return renderGoal("Goal resumed", ctx.goals.resume(invocation.agent, goalRef(current)));
|
|
120
|
+
case "clear":
|
|
121
|
+
if (current === void 0) return {
|
|
122
|
+
kind: "success",
|
|
123
|
+
text: "No goal to clear."
|
|
124
|
+
};
|
|
125
|
+
ctx.goals.clear(invocation.agent, goalRef(current));
|
|
126
|
+
return {
|
|
127
|
+
kind: "success",
|
|
128
|
+
text: "Goal cleared."
|
|
129
|
+
};
|
|
130
|
+
/* v8 ignore next 2 -- GoalCommand is closed and every member is handled above */
|
|
131
|
+
default: return assertNever(command, "goal command");
|
|
132
|
+
}
|
|
133
|
+
} catch (error) {
|
|
134
|
+
if (error instanceof GoalError) return {
|
|
135
|
+
kind: "error",
|
|
136
|
+
text: "The goal command is not valid for the current state. Run /goal to view available commands."
|
|
137
|
+
};
|
|
138
|
+
throw error;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/** Register the Codex-shaped `/goal` command for every composed command adapter. */
|
|
142
|
+
function apply(ctx) {
|
|
143
|
+
ctx.commands.register({
|
|
144
|
+
name: "goal",
|
|
145
|
+
description: "set or view the goal for a long-running task",
|
|
146
|
+
input: { hint: "[<objective>|clear|edit <objective>|pause|resume]" },
|
|
147
|
+
handler: (invocation) => executeGoalCommand(ctx, invocation)
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
export { apply, inject, name };
|
package/lib/invariant.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region lib/types/invariant.js
|
|
2
|
+
/**
|
|
3
|
+
* Package-owned invariant companion for `@stackstackstack/dsh-command-goal`.
|
|
4
|
+
* @module @stackstackstack/dsh-command-goal/invariant
|
|
5
|
+
*/
|
|
6
|
+
const PACKAGE_NAME = "@stackstackstack/dsh-command-goal";
|
|
7
|
+
/** Cordis companion plugin name. */
|
|
8
|
+
const name = "command-goal-invariant";
|
|
9
|
+
/** Service required before the companion can reserve package ownership. */
|
|
10
|
+
const inject = ["invariants"];
|
|
11
|
+
/**
|
|
12
|
+
* No runtime invariant: this command adapter owns no event stream or state projection; accepted
|
|
13
|
+
* mutations are checked by the goal domain and command dispatch behavior is covered by package tests.
|
|
14
|
+
*/
|
|
15
|
+
const install = () => {};
|
|
16
|
+
/**
|
|
17
|
+
* Register this package's invariant companion.
|
|
18
|
+
* @param ctx - Cordis context carrying the invariant service.
|
|
19
|
+
* @returns the installed registration's disposer after setup succeeds.
|
|
20
|
+
*/
|
|
21
|
+
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
22
|
+
//#endregion
|
|
23
|
+
export { apply, inject, name };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human-facing `/goal` command over the persisted same-session goal domain.
|
|
3
|
+
* @module @stackstackstack/dsh-command-goal
|
|
4
|
+
*/
|
|
5
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
6
|
+
export declare const name = "command-goal";
|
|
7
|
+
export declare const inject: string[];
|
|
8
|
+
/** Register the Codex-shaped `/goal` command for every composed command adapter. */
|
|
9
|
+
export declare function apply(ctx: Context): void;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package-owned invariant companion for `@stackstackstack/dsh-command-goal`.
|
|
3
|
+
* @module @stackstackstack/dsh-command-goal/invariant
|
|
4
|
+
*/
|
|
5
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
6
|
+
/** Cordis companion plugin name. */
|
|
7
|
+
export declare const name = "command-goal-invariant";
|
|
8
|
+
/** Service required before the companion can reserve package ownership. */
|
|
9
|
+
export declare const inject: string[];
|
|
10
|
+
/**
|
|
11
|
+
* Register this package's invariant companion.
|
|
12
|
+
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
+
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
+
*/
|
|
15
|
+
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
16
|
+
//# sourceMappingURL=invariant.d.ts.map
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stackstackstack/dsh-command-goal",
|
|
3
|
+
"description": "Human-facing slash command for persisted same-session goals",
|
|
4
|
+
"version": "0.1.5",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/goal/command-goal"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./invariant": {
|
|
22
|
+
"types": "./lib/types/invariant.d.ts",
|
|
23
|
+
"default": "./lib/invariant.js"
|
|
24
|
+
},
|
|
25
|
+
"./src/*": "./src/*",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"lib/index.js",
|
|
30
|
+
"lib/invariant.js",
|
|
31
|
+
"lib/types/**/*.d.ts"
|
|
32
|
+
],
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@stackstackstack/dsh-commands": "^0.1.5",
|
|
36
|
+
"@stackstackstack/dsh-goal": "^0.1.5",
|
|
37
|
+
"@stackstackstack/dsh-invariants": "^0.1.5",
|
|
38
|
+
"@deepseek-ai/cordis": "^4.0.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@stackstackstack/dsh-agent": "^0.1.5",
|
|
42
|
+
"@stackstackstack/dsh-goal": "^0.1.5",
|
|
43
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.2",
|
|
44
|
+
"@stackstackstack/dsh-invariants": "^0.1.5",
|
|
45
|
+
"@stackstackstack/dsh-commands": "^0.1.5",
|
|
46
|
+
"@stackstackstack/dsh-llm": "^0.1.5",
|
|
47
|
+
"@stackstackstack/dsh-session": "^0.1.5",
|
|
48
|
+
"@deepseek-ai/cordis": "^4.0.1"
|
|
49
|
+
}
|
|
50
|
+
}
|