openfeel 1.5.6 → 1.5.7
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/README.md +1 -1
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +9 -1
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/req.js +1 -1
- package/dist/commands/req.js.map +1 -1
- package/dist/commands/shared/errors.d.ts +18 -1
- package/dist/commands/shared/errors.d.ts.map +1 -1
- package/dist/commands/shared/errors.js +32 -2
- package/dist/commands/shared/errors.js.map +1 -1
- package/dist/core/flow-manager.d.ts +12 -0
- package/dist/core/flow-manager.d.ts.map +1 -1
- package/dist/core/flow-manager.js +23 -1
- package/dist/core/flow-manager.js.map +1 -1
- package/dist/core/i18n-data/en.d.ts.map +1 -1
- package/dist/core/i18n-data/en.js +6 -2
- package/dist/core/i18n-data/en.js.map +1 -1
- package/dist/core/i18n-data/zh-CN.d.ts.map +1 -1
- package/dist/core/i18n-data/zh-CN.js +6 -2
- package/dist/core/i18n-data/zh-CN.js.map +1 -1
- package/dist/core/plan/path.d.ts +52 -0
- package/dist/core/plan/path.d.ts.map +1 -1
- package/dist/core/plan/path.js +109 -3
- package/dist/core/plan/path.js.map +1 -1
- package/dist/core/plan/stage.d.ts.map +1 -1
- package/dist/core/plan/stage.js +24 -2
- package/dist/core/plan/stage.js.map +1 -1
- package/dist/core/req/requirement-ops.d.ts +8 -7
- package/dist/core/req/requirement-ops.d.ts.map +1 -1
- package/dist/core/req/requirement-ops.js +21 -12
- package/dist/core/req/requirement-ops.js.map +1 -1
- package/dsh/ADAPTER.md +2 -0
- package/dsh/README.md +2 -1
- package/dsh/lib/adapters/workflow-gate.js +8 -6
- package/dsh/lib/guard.js +4 -4
- package/dsh/lib/surface/prompt.js +12 -6
- package/dsh/lib/tools/index.js +71 -2
- package/dsh/package.json +2 -2
- package/package.json +1 -1
package/dsh/lib/tools/index.js
CHANGED
|
@@ -135,6 +135,70 @@ function safeObservability(snapshot) {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
/**
|
|
139
|
+
* `feel_status` 的默认精简视图(v1.5.7):只保留调度必需字段。
|
|
140
|
+
*
|
|
141
|
+
* 去掉的三块日常用不到、但每次都占大量上下文的冗余:
|
|
142
|
+
* - `mode.transitionsByMode`(三份转移表,约 60 行)→ 需要时用 `feel_flow action=phases` 现取;
|
|
143
|
+
* - `recovery.handoff`(交接摘要全文)→ 需要时读 `dev_last/pending.md`;
|
|
144
|
+
* - `observability`(preflight/statusSync 的复制副本,与顶层字段重复)。
|
|
145
|
+
*
|
|
146
|
+
* 需要完整快照时传 `detail: "full"`。
|
|
147
|
+
* @param {Record<string, any>} snapshot
|
|
148
|
+
* @returns {Record<string, any>}
|
|
149
|
+
*/
|
|
150
|
+
export function compactStatusSnapshot(snapshot) {
|
|
151
|
+
const focus = snapshot?.focus ?? {};
|
|
152
|
+
const mode = snapshot?.mode ?? {};
|
|
153
|
+
const recovery = snapshot?.recovery ?? {};
|
|
154
|
+
const compact = {
|
|
155
|
+
schemaVersion: snapshot?.schemaVersion,
|
|
156
|
+
project: snapshot?.project,
|
|
157
|
+
pipeline: snapshot?.pipeline,
|
|
158
|
+
focus: {
|
|
159
|
+
stage: focus.stage ?? '',
|
|
160
|
+
phase: focus.phase ?? '',
|
|
161
|
+
phaseLabel: focus.phaseLabel ?? '',
|
|
162
|
+
status: focus.status ?? '',
|
|
163
|
+
deps: focus.deps ?? [],
|
|
164
|
+
workflowMode: focus.workflowMode ?? null,
|
|
165
|
+
reviewTier: focus.reviewTier ?? null,
|
|
166
|
+
effectiveReviewTier: focus.effectiveReviewTier ?? null,
|
|
167
|
+
legalNextPhases: focus.legalNextPhases ?? [],
|
|
168
|
+
suggestedCommand: focus.suggestedCommand ?? null,
|
|
169
|
+
responsibleAgent: focus.responsibleAgent ?? null,
|
|
170
|
+
guards: focus.guards ?? [],
|
|
171
|
+
blockingReviews: focus.blockingReviews ?? [],
|
|
172
|
+
},
|
|
173
|
+
mode: {
|
|
174
|
+
current: mode.current ?? null,
|
|
175
|
+
source: mode.source ?? null,
|
|
176
|
+
skippedPhases: mode.skippedPhases ?? [],
|
|
177
|
+
},
|
|
178
|
+
stages: snapshot?.stages ?? [],
|
|
179
|
+
statusSync: snapshot?.statusSync ?? null,
|
|
180
|
+
workflowGate: snapshot?.workflowGate ?? null,
|
|
181
|
+
preflight: snapshot?.preflight ?? null,
|
|
182
|
+
recovery: {
|
|
183
|
+
stage: recovery.stage ?? null,
|
|
184
|
+
phase: recovery.phase ?? null,
|
|
185
|
+
requirement: recovery.requirement ?? null,
|
|
186
|
+
lastTransition: recovery.lastTransition ?? null,
|
|
187
|
+
lastError: recovery.lastError ?? null,
|
|
188
|
+
hasDevLast: recovery.hasDevLast === true,
|
|
189
|
+
nextAction: recovery.nextAction ?? null,
|
|
190
|
+
},
|
|
191
|
+
revision: snapshot?.revision ?? null,
|
|
192
|
+
snapshotAt: snapshot?.snapshotAt ?? null,
|
|
193
|
+
stale: snapshot?.stale === true,
|
|
194
|
+
};
|
|
195
|
+
// 需求概览是显式开关(with_requirements),compact 档同样只在请求时带上
|
|
196
|
+
if (snapshot?.requirements !== undefined) {
|
|
197
|
+
compact.requirements = snapshot.requirements;
|
|
198
|
+
}
|
|
199
|
+
return compact;
|
|
200
|
+
}
|
|
201
|
+
|
|
138
202
|
/**
|
|
139
203
|
* 构造全部工具定义。
|
|
140
204
|
*
|
|
@@ -175,11 +239,15 @@ export function createTools(context) {
|
|
|
175
239
|
const feelStatus = {
|
|
176
240
|
name: 'feel_status',
|
|
177
241
|
description:
|
|
178
|
-
'读取 OpenFeel
|
|
242
|
+
'读取 OpenFeel 项目状态快照:宏观 pipeline 相位、**每个阶段的相位**(调度目标是 phase!=done 的活跃阶段)、当前工作流模式与来源、该阶段在此模式下的**合法下一相位**、负责 Agent、审查档位、守卫与阻塞审查。默认返回 **compact** 档(调度必需字段);`detail: "full"` 返回完整快照(含模式转移表 / 交接摘要 / 观测摘要)。模式来源的转移表请按需用 `feel_flow action=phases` / `action=mode` 现取。调度字段优先消费 `flow next --json` 权威输出(失败时回退 `flow status`/`flow mode`)。做任何推进/委派前先调用它。',
|
|
179
243
|
parameters: {
|
|
180
244
|
action: stringConst('status', '固定为 status(读取快照)。'),
|
|
181
245
|
project: string('项目根目录(相对会话工作区或绝对路径)。缺省时从会话工作区向上回溯 .openfeel/。'),
|
|
182
246
|
with_requirements: boolean('是否附带需求概览(多一次 CLI 调用)。'),
|
|
247
|
+
detail: stringEnum(
|
|
248
|
+
['compact', 'full'],
|
|
249
|
+
'输出档位:compact=默认,只给调度必需字段(省上下文);full=完整快照(含 mode.transitionsByMode / recovery.handoff / observability)。',
|
|
250
|
+
),
|
|
183
251
|
},
|
|
184
252
|
output: { schema: envelopeSchema(), render: renderEnvelope },
|
|
185
253
|
async execute(args, exec) {
|
|
@@ -206,8 +274,9 @@ export function createTools(context) {
|
|
|
206
274
|
const focus = snapshot.focus;
|
|
207
275
|
const gateWarning = snapshot.workflowGate.required ? '⚠ 无活跃阶段:非只读任务先 feel_status→建阶段。' : '';
|
|
208
276
|
const staleWarning = snapshot.stale ? '⚠ 快照为降级(flow next 缺失),以 flow status 为准。' : '';
|
|
277
|
+
const data = args.detail === 'full' ? snapshot : compactStatusSnapshot(snapshot);
|
|
209
278
|
return {
|
|
210
|
-
data
|
|
279
|
+
data,
|
|
211
280
|
summary: `${staleWarning}${gateWarning}pipeline=${snapshot.pipeline.phase || '(空)'} 活跃阶段=${focus.stage || '(无)'} phase=${focus.phase || '(空)'} mode=${snapshot.mode.current}(${snapshot.mode.source}) 负责=${focus.responsibleAgent} 可推进到=[${(focus.legalNextPhases ?? []).join(', ') || '无'}]`,
|
|
212
281
|
next: focus.phase === 'done' || focus.phase === ''
|
|
213
282
|
? null
|
package/dsh/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openfeel-dsh",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"description": "OpenFeel × DSH — Feel 模式适配器:把 OpenFeel 的流水线、需求分发、版本归档与知识库接入 DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": true,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"openfeel": {
|
|
34
34
|
"adapter": "dsh",
|
|
35
|
-
"requiresCli": ">=1.5.
|
|
35
|
+
"requiresCli": ">=1.5.7"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"openfeel",
|