nx-kv 0.66.3 → 0.67.0
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/CHANGELOG.md +31 -0
- package/assets/nx-kv/references/A02-/346/217/220/344/272/244/344/273/273/345/212/241.md +6 -7
- package/assets/nx-kv/references/B02-CLI/351/200/237/346/237/245.md +2 -2
- package/package.json +1 -1
- package/src/core/db/import-json/tasks.ts +10 -9
- package/src/core/db/import-json.ts +16 -6
- package/src/core/db/index.ts +1 -1
- package/src/core/db/verify.ts +7 -3
- package/src/core/topic-key.ts +5 -8
- package/src/core/workflow/readiness.ts +1 -1
- package/src/core/workflow/types.ts +1 -1
- package/src/modules/claim/host.ts +2 -2
- package/src/modules/claim/wait.ts +9 -49
- package/src/modules/localtask/actions/localtask-add.ts +1 -3
- package/src/modules/localtask/actions/localtask-boardtasks.ts +0 -1
- package/src/modules/localtask/actions/localtask-clone.ts +1 -1
- package/src/modules/localtask/infra/events.ts +5 -5
- package/src/modules/localtask/infra/repo/rows.ts +0 -1
- package/src/modules/localtask/infra/repo/topics.ts +0 -4
- package/src/modules/localtask/lifecycle/add.ts +2 -9
- package/src/modules/localtask/lifecycle/deletion.ts +7 -15
- package/src/modules/localtask/lifecycle/task-lifecycle.ts +2 -2
- package/src/modules/localtask/lifecycle/task-ops.ts +14 -56
- package/src/modules/localtask/lifecycle/task-view.ts +2 -3
- package/src/modules/localtask/lifecycle/topics.ts +0 -2
- package/src/modules/localtask/paths.ts +7 -17
- package/src/modules/localtask/service.ts +3 -7
- package/src/modules/localtask/ui/action-flags.ts +2 -2
- package/src/modules/localtask/ui/action-render.ts +4 -7
- package/src/modules/localtask/waiting.ts +1 -8
- package/src/modules/templates/scope.ts +1 -1
- package/src/web/frontend/App.tsx +4 -9
- package/src/web/frontend/api/cli-tree.json +2 -2
- package/src/web/frontend/api/client.generated.ts +3 -3
- package/src/web/frontend/api/tasks.ts +1 -1
- package/src/web/frontend/components/sidebar/index.tsx +52 -48
- package/src/web/frontend/components/sidebar/model.ts +16 -32
- package/src/web/frontend/components/sidebar/queue-nav.ts +3 -4
- package/src/web/frontend/components/sidebar/row-menu.tsx +1 -1
- package/src/web/frontend/components/sidebar/task-children.tsx +39 -21
- package/src/web/frontend/components/task-panel/task-ops.ts +3 -3
- package/src/web/frontend/modules/board/board-view.ts +2 -56
- package/src/web/frontend/modules/md/doc-store.ts +2 -3
- package/src/web/frontend/page/dag/head-bar.tsx +0 -1
- package/src/web/frontend/page/dag/index.tsx +1 -4
- package/src/web/frontend/page/dag/model.ts +0 -1
- package/src/web/frontend/page/dir/index.tsx +21 -25
- package/src/web/frontend/page/dir/task-actions.ts +20 -32
- package/src/web/frontend/page/dir/task-chain.ts +6 -10
- package/src/web/frontend/page/dir/task-dock-panel.tsx +2 -5
- package/src/web/frontend/page/dir/task-feedback.ts +9 -17
- package/src/web/frontend/page/dir/task-not-found.tsx +2 -3
- package/src/web/frontend/page/dir/task-utils.ts +0 -1
- package/src/web/frontend/page/dir/task.tsx +13 -17
- package/src/web/frontend/page/group/index.tsx +2 -3
- package/src/web/frontend/page/progress/index.tsx +7 -12
- package/src/web/frontend/panels.tsx +1 -1
- package/src/web/frontend/registry.ts +1 -2
- package/src/web/frontend/route-map.ts +0 -1
- package/src/web/frontend/routes/dir.ts +1 -4
- package/src/web/frontend/routes/keys.ts +5 -3
- package/src/web/frontend/svghub/catalog-nav.ts +8 -11
- package/src/web/public/assets/app-context-CngKv8Tc.js +1 -0
- package/src/web/public/assets/{bar-D7cWe7Kp.js → bar-C0Q_Qe4z.js} +1 -1
- package/src/web/public/assets/board-view-C8OQhkyi.js +1 -0
- package/src/web/public/assets/{button-3JlUeln_.js → button-Cs6w2CDi.js} +1 -1
- package/src/web/public/assets/{composer-launch--nJGFG35.js → composer-launch-BF3_hyn5.js} +1 -1
- package/src/web/public/assets/{composer-panel-Dhivt7UJ.js → composer-panel-D6vBrzCs.js} +1 -1
- package/src/web/public/assets/{dag-DUhHxgTk.js → dag-CZF6sV2_.js} +1 -1
- package/src/web/public/assets/dir-6RhnWw1E.js +1 -0
- package/src/web/public/assets/{doc-QBHQi1EV.js → doc-CVIVBV6n.js} +1 -1
- package/src/web/public/assets/group-AF62Z-_G.js +1 -0
- package/src/web/public/assets/index-Bposj22Z.js +3 -0
- package/src/web/public/assets/{list-search-B2S2g8kn.js → list-search-DFvFY408.js} +1 -1
- package/src/web/public/assets/{md-history-DdM6P9Gq.js → md-history-COQu16vy.js} +1 -1
- package/src/web/public/assets/{member-picker-BZgE3HGb.js → member-picker-CHX0nS0O.js} +1 -1
- package/src/web/public/assets/popup-dBtYqEM1.js +1 -0
- package/src/web/public/assets/progress-CDh6DY7g.js +3 -0
- package/src/web/public/assets/{refs-CCZgGPlL.js → refs-t79ynSY8.js} +1 -1
- package/src/web/public/assets/{reopen-text-BC9a8KOp.js → reopen-text-B2d9SZi0.js} +1 -1
- package/src/web/public/assets/{repo-form-modal-D8WabN0R.js → repo-form-modal-dZqpHyUj.js} +1 -1
- package/src/web/public/assets/{repos-V5xb5Kz-.js → repos-DdhOQJqF.js} +1 -1
- package/src/web/public/assets/{route-crumb-DX9C4jmQ.js → route-crumb-BKq2jry0.js} +1 -1
- package/src/web/public/assets/{settings-CAOSCF3E.js → settings-Bk3clN2f.js} +1 -1
- package/src/web/public/assets/task-C8nax2rT.js +13 -0
- package/src/web/public/assets/{task-ops-DZgza5eZ.js → task-ops-D6E_TgEC.js} +2 -2
- package/src/web/public/assets/task-utils-Dh33OFKe.js +1 -0
- package/src/web/public/assets/{templates-6ClSnYJN.js → templates-Dusbff7Z.js} +3 -3
- package/src/web/public/assets/{tool-bar-BYdfBQeo.js → tool-bar-DPXnjdQF.js} +1 -1
- package/src/web/public/assets/{use-rail-drag-BMXJ48je.js → use-rail-drag-B6J0iqFK.js} +1 -1
- package/src/web/public/index.html +12 -12
- package/src/web/public/assets/app-context-BqCBcDsx.js +0 -1
- package/src/web/public/assets/board-view-Cm8189wG.js +0 -1
- package/src/web/public/assets/dir-CkYGYT9e.js +0 -1
- package/src/web/public/assets/group-CfJxWA7V.js +0 -1
- package/src/web/public/assets/index-ByAPGidL.js +0 -3
- package/src/web/public/assets/popup-DZ2Khv2c.js +0 -1
- package/src/web/public/assets/progress-BVpSy-uF.js +0 -3
- package/src/web/public/assets/task-BwWlNP0i.js +0 -13
- package/src/web/public/assets/task-utils--WIpAwUx.js +0 -1
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
// (#54 自 service.js 拆出)主题删除:四条删除路径共用的同一套判定(deleteGuard:
|
|
2
|
-
//
|
|
2
|
+
// 等待中/有未领取 → 需 --force)+ 单个/批量删除。
|
|
3
3
|
//
|
|
4
4
|
// 删除 = 软删 topics 行(deleted_at 打标;任务/依赖/presence 保留,同名目录再出现即恢复)。
|
|
5
|
-
// 全局池例外:同一个 key 永远会再出现,软删会被下一次 ensureTopic 复活成「没删掉」,
|
|
6
|
-
// 所以 force 清空全局池走真删(FK 级联清任务)。
|
|
7
5
|
import { badInput } from '../../../core/errors.js';
|
|
8
|
-
import {
|
|
6
|
+
import { normalizeCwd, resolveTopicKey } from '../paths.js';
|
|
9
7
|
import { openLocaltaskStore as openStore, topics as topicsRepo } from '../infra/repo/index.js';
|
|
10
8
|
import { isLiveWaiting, isPending, topicView } from './task-view.js';
|
|
11
9
|
// ─── 删除判定:四条删除路径共用同一套规则 ──────────────────────────────
|
|
@@ -21,7 +19,7 @@ import { isLiveWaiting, isPending, topicView } from './task-view.js';
|
|
|
21
19
|
//
|
|
22
20
|
// force=true 仍然强删(老用法不变)。
|
|
23
21
|
export const DELETE_REASONS = {
|
|
24
|
-
protected: '
|
|
22
|
+
protected: '受保护',
|
|
25
23
|
waiting: '等待中',
|
|
26
24
|
has_pending: '有未领取任务',
|
|
27
25
|
manual: '手动登记',
|
|
@@ -44,11 +42,6 @@ export type DeleteGuardResult =
|
|
|
44
42
|
* @returns {{ok:boolean, reason?:string, pending?:number, message?:string}}
|
|
45
43
|
*/
|
|
46
44
|
export function deleteGuard(topic: any, { force = false, key = '', scope = 'topic' }: DeleteGuardOptions = {}): DeleteGuardResult {
|
|
47
|
-
if (isGlobalKey(key)) {
|
|
48
|
-
return force
|
|
49
|
-
? { ok: true }
|
|
50
|
-
: { ok: false, reason: 'protected', message: '全局主题是共享任务池,默认不能删除(确认要清空请加 --force)' };
|
|
51
|
-
}
|
|
52
45
|
if (isLiveWaiting(topic)) {
|
|
53
46
|
return force
|
|
54
47
|
? { ok: true }
|
|
@@ -96,8 +89,7 @@ export interface RemoveTopicResult {
|
|
|
96
89
|
|
|
97
90
|
// 删除整个主题(连同其全部任务)。默认拒绝删除「等待中」主题——那会让正阻塞的
|
|
98
91
|
// agent 只能等到超时;force=true 才强删(agent 随后超时收尾)。
|
|
99
|
-
|
|
100
|
-
// force=true 清空全局任务池。
|
|
92
|
+
|
|
101
93
|
export async function removeTopic({ cwd: rawCwd, key: rawKey, force = false }: RemoveTopicInput = {}): Promise<RemoveTopicResult> {
|
|
102
94
|
if (!rawKey && !rawCwd) {
|
|
103
95
|
throw badInput('需要 --cwd "<工作目录>" 或 --key "<主题key>"');
|
|
@@ -109,11 +101,11 @@ export async function removeTopic({ cwd: rawCwd, key: rawKey, force = false }: R
|
|
|
109
101
|
const { notFound } = await import('../../../core/errors.js');
|
|
110
102
|
throw notFound(`主题不存在(key ${key})`);
|
|
111
103
|
}
|
|
112
|
-
// 删除判定只写一份(deleteGuard
|
|
104
|
+
// 删除判定只写一份(deleteGuard):等待中 / 有未领取任务 → 都要 --force。
|
|
113
105
|
const guard = deleteGuard(t, { force, key });
|
|
114
106
|
if (!guard.ok) throw badInput(guard.message);
|
|
115
107
|
const view = topicView(t);
|
|
116
|
-
topicsRepo.deleteTopic(key, { purge:
|
|
108
|
+
topicsRepo.deleteTopic(key, { purge: false });
|
|
117
109
|
return { status: 'removed', key, name: t.name, cwd: t.cwd, topic: view };
|
|
118
110
|
}
|
|
119
111
|
|
|
@@ -164,6 +156,6 @@ export async function removeTopics({ keys, cwds, all = false, force = false }: R
|
|
|
164
156
|
}
|
|
165
157
|
removed.push({ key, name: t.name, cwd: t.cwd });
|
|
166
158
|
}
|
|
167
|
-
for (const r of removed) topicsRepo.deleteTopic(r.key, { purge:
|
|
159
|
+
for (const r of removed) topicsRepo.deleteTopic(r.key, { purge: false });
|
|
168
160
|
return { status: 'ok', all: !!all, count: removed.length, removed, skipped };
|
|
169
161
|
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../../../shared/feedback-text.js';
|
|
15
15
|
import { findFirstReadyPending } from '../dag.js';
|
|
16
16
|
import { basename } from 'node:path';
|
|
17
|
-
import {
|
|
17
|
+
import { resolveTaskKey, topicKeyFor } from '../paths.js';
|
|
18
18
|
import { normalizeSummary, normalizeText, stampNow } from '../infra/store-io.js';
|
|
19
19
|
import { normalizeTask, foreignResolver, isPending } from './task-view.js';
|
|
20
20
|
import {
|
|
@@ -295,7 +295,7 @@ export async function claimFirstPending(key: string, roundSummary?: string, by?:
|
|
|
295
295
|
const claimed = tx(() =>
|
|
296
296
|
tasksRepo.claimTask(t.id, task.id, {
|
|
297
297
|
summary: roundSummary || t.summary || '',
|
|
298
|
-
from:
|
|
298
|
+
from: 'local',
|
|
299
299
|
byKey: by?.key,
|
|
300
300
|
byName: by?.name,
|
|
301
301
|
})
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// (#54 自 service.js 拆出)单条任务的查/增/改:getTask、addTask(waiter 唤醒链 +
|
|
2
|
-
//
|
|
2
|
+
// 投递与唤醒)、updateTask(正文/时间目标/DAG 依赖/改归属搬家)。
|
|
3
3
|
import { badInput, notFound } from '../../../core/errors.js';
|
|
4
4
|
import { parseFrontmatter, preserveFrontmatter } from '../../../shared/frontmatter.js';
|
|
5
5
|
import { sanitizeTaskGoal } from '../../goals/taskgoal.js';
|
|
6
6
|
import { normalizeBlockBy, isReadyToClaim } from '../dag.js';
|
|
7
7
|
import { MAX_TEXT, normalizeSummary, normalizeText } from '../infra/store-io.js';
|
|
8
8
|
import { openLocaltaskStore as openStore, topics as topicsRepo, tasks as tasksRepo, links as linksRepo, txw as tx, db } from '../infra/repo/index.js';
|
|
9
|
-
import {
|
|
9
|
+
import { normalizeCwd, resolveTaskKey, topicKeyFor } from '../paths.js';
|
|
10
10
|
import { normalizeTask, foreignResolver, queueRelationsOf, relocateTask, resolveForkRef } from './task-view.js';
|
|
11
|
-
import { takeTopicWaiter
|
|
11
|
+
import { takeTopicWaiter } from '../waiters.js';
|
|
12
12
|
import { presence as presenceRepo } from '../infra/repo/index.js';
|
|
13
13
|
|
|
14
14
|
/** 任务寻址入参(--cwd/--key + --id)。 */
|
|
@@ -77,15 +77,13 @@ export async function getTask({ cwd: rawCwd, key: rawKey, id }: TaskAddress = {}
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* 若本进程正有 wait
|
|
82
|
-
* 全局投递的唤醒链:显式 wait 全局 key 者(罕见)→ globalWaiters FIFO → 入队。
|
|
80
|
+
* 向某主题(工作目录)的队列回填任务(#190 起只有目录队列,没有全局共享池)。
|
|
81
|
+
* 若本进程正有 wait 在等该主题 → 直接投递并唤醒;否则入队堆积。
|
|
83
82
|
*/
|
|
84
83
|
export async function addTask({
|
|
85
84
|
cwd: rawCwd,
|
|
86
85
|
summary: rawSummary,
|
|
87
86
|
text,
|
|
88
|
-
global: toGlobal = false,
|
|
89
87
|
timegoal: rawGoal,
|
|
90
88
|
blockBy: rawBlockBy,
|
|
91
89
|
blocksFollowing = false,
|
|
@@ -103,22 +101,9 @@ export async function addTask({
|
|
|
103
101
|
}
|
|
104
102
|
|
|
105
103
|
openStore();
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (toGlobal) {
|
|
110
|
-
// 全局主题:cwd 恒空、名字固定;--cwd 显式给出也忽略(--global 优先)。
|
|
111
|
-
// 但**不静默**:被忽略的 cwd 会在返回值里带出来(ignoredCwd),
|
|
112
|
-
// 由 CLI/面板如实告诉用户"你给的目录没生效,任务进了全局池"。
|
|
113
|
-
// (gh/kubectl 遇到矛盾参数会直接报错;这里为了不打断既有脚本,
|
|
114
|
-
// 选择"照做 + 明说",而不是改语义。)
|
|
115
|
-
key = GLOBAL_KEY;
|
|
116
|
-
cwd = GLOBAL_CWD;
|
|
117
|
-
t = topicsRepo.ensureTopic(key, { cwd, name: GLOBAL_NAME });
|
|
118
|
-
} else {
|
|
119
|
-
({ key, cwd } = normalizeCwd(rawCwd));
|
|
120
|
-
t = topicsRepo.ensureTopic(key, { cwd });
|
|
121
|
-
}
|
|
104
|
+
// #190:只有目录队列。rawCwd 缺省时由 normalizeCwd 落到当前进程工作目录。
|
|
105
|
+
const { key, cwd } = normalizeCwd(rawCwd);
|
|
106
|
+
const t: { id: number; name: string; summary?: string } = topicsRepo.ensureTopic(key, { cwd });
|
|
122
107
|
const tView = topicsRepo.getTopic(key)!;
|
|
123
108
|
|
|
124
109
|
// 编号只在插入的同一个事务里取(insertTask 用 UPDATE ... RETURNING)。
|
|
@@ -165,26 +150,7 @@ export async function addTask({
|
|
|
165
150
|
const probe = normalizeTask({ ...taskDraft, id: provisionalId }, tView.tasks, readyOpts);
|
|
166
151
|
const canDeliver = isReadyToClaim(probe, tView.tasks, readyOpts);
|
|
167
152
|
|
|
168
|
-
if (canDeliver
|
|
169
|
-
const direct = takeTopicWaiter(GLOBAL_KEY); // 显式等全局 key 的(罕见路径)
|
|
170
|
-
if (direct) {
|
|
171
|
-
wakeMeta = { summary: tView.summary || '', from: 'global', byKey: GLOBAL_KEY, byName: GLOBAL_NAME, wake: direct.resolve };
|
|
172
|
-
delivered = true;
|
|
173
|
-
} else {
|
|
174
|
-
const gw = takeGlobalWaiter(); // FIFO:最早阻塞的先领
|
|
175
|
-
if (gw) {
|
|
176
|
-
wakeMeta = {
|
|
177
|
-
// roundSummary 记领取方 wait 的现状;claimedBy 记领取方是谁
|
|
178
|
-
summary: gw.summary,
|
|
179
|
-
from: 'global',
|
|
180
|
-
byKey: gw.by?.key,
|
|
181
|
-
byName: gw.by?.name,
|
|
182
|
-
wake: gw.onTask,
|
|
183
|
-
};
|
|
184
|
-
delivered = true;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
} else if (canDeliver) {
|
|
153
|
+
if (canDeliver) {
|
|
188
154
|
const waiter = takeTopicWaiter(key);
|
|
189
155
|
if (waiter) {
|
|
190
156
|
wakeMeta = { summary: tView.summary || '', from: 'local', byKey: key, byName: tView.name, wake: waiter.resolve };
|
|
@@ -245,7 +211,7 @@ export async function addTask({
|
|
|
245
211
|
if (wakeMeta && wakeMeta.wake) wakeMeta.wake(normalizeTask(task));
|
|
246
212
|
|
|
247
213
|
// DAG 单一写路径:闸门/依赖经 Mutator 投影(fail-open,不挡入队)
|
|
248
|
-
if (
|
|
214
|
+
if (task.blocksFollowing || (task.blockBy && task.blockBy.length)) {
|
|
249
215
|
try {
|
|
250
216
|
const { syncNewTaskDag } = await import('../infra/writes.js');
|
|
251
217
|
await syncNewTaskDag(key, task);
|
|
@@ -260,10 +226,6 @@ export async function addTask({
|
|
|
260
226
|
cwd,
|
|
261
227
|
name: t.name,
|
|
262
228
|
summary: t.summary,
|
|
263
|
-
isGlobal: toGlobal,
|
|
264
|
-
// --global 与 --cwd 同时给时,cwd 被忽略(--global 优先)。不静默:
|
|
265
|
-
// 把被忽略的那个带出来,让调用方能如实告诉用户"任务进了全局池,不是你给的目录"。
|
|
266
|
-
ignoredCwd: toGlobal && rawCwd && String(rawCwd).trim() ? String(rawCwd).trim() : '',
|
|
267
229
|
// key 一并回带:附件标注按 (topic.key, seq) 查 task_attach(与 getTask 同一口径)。
|
|
268
230
|
task: { ...normalizeTask(task), key },
|
|
269
231
|
delivered,
|
|
@@ -360,7 +322,7 @@ export async function updateTask({
|
|
|
360
322
|
);
|
|
361
323
|
}
|
|
362
324
|
// 搬家必须与后面的正文/目标写入同事务:搬到一半再抛错,就是「任务凭空消失」。
|
|
363
|
-
if (movable
|
|
325
|
+
if (movable) {
|
|
364
326
|
const movedTo = relocateTask(t, want, moveTo);
|
|
365
327
|
if (movedTo) {
|
|
366
328
|
host = movedTo.topic;
|
|
@@ -444,7 +406,7 @@ export async function updateTask({
|
|
|
444
406
|
* - 不写 forkOf / forkKind——克隆没有「从哪来」的语义,就是拿内容当模板开新活;
|
|
445
407
|
* - 不继承 timegoal / blockBy / blocksFollowing——约束跟着活走,克隆是新的一件;
|
|
446
408
|
* - 源任务一个字不动(不归档、不改状态)——clone 之后两条并存。
|
|
447
|
-
*
|
|
409
|
+
* 落点:同主题。正文带 frontmatter 时走 addTask 既有口径
|
|
448
410
|
* (归属 fail-open、落点跟项目队列)。
|
|
449
411
|
*/
|
|
450
412
|
export async function cloneTask({ cwd: rawCwd, key: rawKey, id }: TaskAddress = {}): Promise<Record<string, any>> {
|
|
@@ -456,11 +418,9 @@ export async function cloneTask({ cwd: rawCwd, key: rawKey, id }: TaskAddress =
|
|
|
456
418
|
if (!t) throw notFound('主题不存在: ' + key);
|
|
457
419
|
const src = (t.tasks || []).find((x: any) => Number(x.id) === want && !x.deletedAt && !x.migratedTo);
|
|
458
420
|
if (!src) throw notFound('任务不存在或已删除: #' + want);
|
|
459
|
-
const toGlobal = isGlobalKey(key);
|
|
460
421
|
const res = await addTask({
|
|
461
422
|
text: src.text,
|
|
462
|
-
|
|
463
|
-
cwd: toGlobal ? undefined : t.cwd || rawCwd,
|
|
423
|
+
cwd: t.cwd || rawCwd,
|
|
464
424
|
});
|
|
465
425
|
return { ...res, cloned: true, from: { key, id: want } };
|
|
466
426
|
}
|
|
@@ -482,11 +442,9 @@ export async function forkTask({ cwd: rawCwd, key: rawKey, id }: TaskAddress = {
|
|
|
482
442
|
if (!t) throw notFound('主题不存在: ' + key);
|
|
483
443
|
const src = (t.tasks || []).find((x: any) => Number(x.id) === want && !x.deletedAt && !x.migratedTo);
|
|
484
444
|
if (!src) throw notFound('任务不存在或已删除: #' + want);
|
|
485
|
-
const toGlobal = isGlobalKey(key);
|
|
486
445
|
const res = await addTask({
|
|
487
446
|
text: src.text,
|
|
488
|
-
|
|
489
|
-
cwd: toGlobal ? undefined : t.cwd || rawCwd,
|
|
447
|
+
cwd: t.cwd || rawCwd,
|
|
490
448
|
// 跨主题也拼成 'key:id',父任务定位与 reopen 同一条链路
|
|
491
449
|
forkOf: `${key}:${want}`,
|
|
492
450
|
forkKind: 'fork',
|
|
@@ -5,7 +5,7 @@ import { existsSync } from 'node:fs';
|
|
|
5
5
|
import { badInput, notFound } from '../../../core/errors.js';
|
|
6
6
|
import { sanitizeTaskGoal } from '../../goals/taskgoal.js';
|
|
7
7
|
import { normalizeBlockBy, isReadyToClaim } from '../dag.js';
|
|
8
|
-
import {
|
|
8
|
+
import { topicKeyFor, resolveTaskKey } from '../paths.js';
|
|
9
9
|
import { parseStampMs, stampNow } from '../infra/store-io.js';
|
|
10
10
|
import { topics as topicsRepo, tasks as tasksRepo, links as linksRepo, db } from '../infra/repo/index.js';
|
|
11
11
|
import { parseFrontmatter } from '../../../shared/frontmatter.js';
|
|
@@ -323,7 +323,7 @@ export function topicView(t: any, repoCtx: any = null, readyOpts: ReadyOpts = {}
|
|
|
323
323
|
cwd: t.cwd || '',
|
|
324
324
|
// 目录还在不在:临时目录被删 / 外接盘未挂载 / 测试残留都会让 cwd 失效。
|
|
325
325
|
// UI 与 prune --missing-dir 都靠它判断「这条主题是幽灵还是真的」。
|
|
326
|
-
cwdExists:
|
|
326
|
+
cwdExists: !!t.cwd && existsSync(String(t.cwd)),
|
|
327
327
|
name: t.name || '',
|
|
328
328
|
summary: t.summary || '',
|
|
329
329
|
// 提交方(add --summary)留下的补充说明:与 agent 的「当前现状」分开存,
|
|
@@ -343,7 +343,6 @@ export function topicView(t: any, repoCtx: any = null, readyOpts: ReadyOpts = {}
|
|
|
343
343
|
waitingUntilMs: Number(t.waitingUntilMs) || 0,
|
|
344
344
|
waitingSince: t.waitingSince || '',
|
|
345
345
|
cancelRequested: !!t.cancelRequested,
|
|
346
|
-
isGlobal: isGlobalKey(t.key),
|
|
347
346
|
// 手动登记的目录(面板「添加目录」):空主题也不被 prune 清掉
|
|
348
347
|
manual: !!t.manual,
|
|
349
348
|
createdAt: t.createdAt,
|
|
@@ -57,7 +57,6 @@ export async function addTopic({ cwd: rawCwd, summary: rawSummary }: { cwd?: str
|
|
|
57
57
|
// 全局主题永远置顶(共享池是所有 worker 的候补来源,放最显眼处)。
|
|
58
58
|
//
|
|
59
59
|
// 注意:**全局主题不在这里凭空造**。全局池空着的时候库里就是没有它
|
|
60
|
-
// (它只有真的往池子里投过东西才存在)。看板层(board.js)负责补一行"全局任务池"
|
|
61
60
|
// 占位,保证用户永远找得到往全局池加任务的入口——服务层的契约保持原样。
|
|
62
61
|
export async function listTasks(): Promise<Record<string, any>> {
|
|
63
62
|
openStore();
|
|
@@ -69,7 +68,6 @@ export async function listTasks(): Promise<Record<string, any>> {
|
|
|
69
68
|
.map((t) => topicView(t, repoCtxOf(repoIndex, t.cwd), readyOpts))
|
|
70
69
|
.sort(
|
|
71
70
|
(a, b) =>
|
|
72
|
-
Number(!!b.isGlobal) - Number(!!a.isGlobal) ||
|
|
73
71
|
String(b.updatedAt).localeCompare(String(a.updatedAt))
|
|
74
72
|
);
|
|
75
73
|
return {
|
|
@@ -3,24 +3,15 @@ import { basename, join, resolve } from 'node:path';
|
|
|
3
3
|
import { topicKeyOf } from '../../core/topic-key.js';
|
|
4
4
|
import { APP_DIR } from '../../core/paths.js';
|
|
5
5
|
import { badInput } from '../../core/errors.js';
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// 参考 Go runtime scheduler 的两层队列:每个 P 有 local runq,空了去 global runq
|
|
9
|
-
// 取,还没有才 park。这里的对应物:每个工作目录一个本地主题队列,wait 在本地
|
|
10
|
-
// 取不到 pending 时自动去「全局主题」领;全局也没有才阻塞。
|
|
11
|
-
// 任务侧用 addTask({global:true})(CLI --global)把不限定接收方的任务发布进池子。
|
|
12
|
-
//
|
|
13
|
-
// 全局主题是真实存在的主题对象(复用 topics 存储),但有特殊行为:
|
|
14
|
-
// - key 固定 '__GLOBAL__',与目录名哈希出的 16 位 hex key 永不冲突;cwd 恒为空
|
|
15
|
-
// - 永不进入 waiting 状态(它是任务源,不是等待源)——countWaitingTopics 自然不计
|
|
16
|
-
// - prune/remove 默认跳过(受保护),--force 才能删;等待语义(setWaiting/cancel)不适用
|
|
17
|
-
export const GLOBAL_KEY = '__GLOBAL__';
|
|
18
|
-
export const GLOBAL_NAME = '全局任务';
|
|
19
|
-
export const GLOBAL_CWD = ''; // 全局主题永不指向真实目录
|
|
6
|
+
// #190:**全局任务池已删除**。队列一律绑定真实目录;CLI 不带 --cwd 时用当前工作目录。
|
|
7
|
+
// 全局池的固定 key / 名称 / 空 cwd 语义全部下线(库里的 __GLOBAL__ 行按用户要求一并删除)。
|
|
20
8
|
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
/** 解析要操作的目录:显式 --cwd 优先,缺省用当前进程工作目录。 */
|
|
10
|
+
export function resolveCwd(cwd: unknown): string {
|
|
11
|
+
const v = String(cwd ?? '').trim();
|
|
12
|
+
return v ? resolve(v) : process.cwd();
|
|
23
13
|
}
|
|
14
|
+
|
|
24
15
|
// ─── 存储位置(历史兼容层已随 T07 下线;存储进 nxkv.db,见 repo/open.js)───
|
|
25
16
|
|
|
26
17
|
// 改名前的存储文件(sessiontasks.json)。显式覆盖(NX_KV_LOCALTASK_STORE)时
|
|
@@ -61,7 +52,6 @@ export function normalizeCwd(raw?: unknown): NormalizedCwd {
|
|
|
61
52
|
// (面板显示的路径跟着变,看着像队列跑到别处去了)。新版修正这个语义:
|
|
62
53
|
// 不同路径 = 不同队列。**旧 key 一律失效、不做别名解析**(设计裁决)——
|
|
63
54
|
// 旧 key 只留在 topics.ext.ext_legacy_key 作取证,CLI 提示「旧版 key 请改用 --cwd」。
|
|
64
|
-
// 全局池:topicKeyOf('') === '__GLOBAL__',与旧 GLOBAL_KEY 同值,地址不变。
|
|
65
55
|
export function topicKeyFor(name: unknown): string {
|
|
66
56
|
// 保留旧名(几个调用点按名字寻址),但**语义已变**:它只该用于「从 cwd 派生」,
|
|
67
57
|
// 不再接受裸目录名 —— 名字仍在是为了调用点少改一处。
|
|
@@ -10,15 +10,11 @@
|
|
|
10
10
|
// 1. **工作目录即主题,主题拥有队列。** get 传入工作目录(默认进程 cwd),归一化后
|
|
11
11
|
// 作为主题 key;同一目录的多次阻塞领取共用同一个任务队列,
|
|
12
12
|
// 不同目录 → 不同主题 → 队列互不串。任务可在一个主题队列里逐条堆积,agent 按序领取。
|
|
13
|
-
// 2.
|
|
14
|
-
// 「全局主题」(key '__GLOBAL__'):本地队列取不到 pending 时,任何 wait 都自动去
|
|
15
|
-
// 全局领(显式传 --cwd 也不例外);全局也没有才阻塞。任务用 addTask({global:true})
|
|
16
|
-
// (CLI --global)发布进池子,谁闲谁领——类似 Go 调度器的 local runq + global runq。
|
|
17
|
-
// 3. **现状总结只作状态展示。** --summary 是 agent 当前状态(人读),每次 wait 刷新,
|
|
13
|
+
// 2. **现状总结只作状态展示。** --summary 是 agent 当前状态(人读),每次 wait 刷新,
|
|
18
14
|
// 不再参与队列分桶;用户据此一眼看清 agent 做到哪、卡在哪。
|
|
19
|
-
//
|
|
15
|
+
// 3. **纯本地协调,不依赖 KV 后端登录态。** 数据落本机文件,弹窗由本进程临时起的
|
|
20
16
|
// http 服务器直出,未登录也能用。
|
|
21
|
-
//
|
|
17
|
+
// 4. **排队语义。** 用户可提前回填:主题已有 pending 时 wait 立即取走、不开窗;
|
|
22
18
|
// 没有 pending 才开窗阻塞。
|
|
23
19
|
// 6. **超时是业务结果不是错误。** 默认阻塞 3 分钟(页面可调,上限 10 分钟);超时返回 {status:'timeout'}、
|
|
24
20
|
// exit 0,agent 据此安静收尾结束本轮,绝不抛异常。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// action 共享的 flag 定义(自 index.js 拆出):cwd/key 主题定位与 wait 的现状参数。
|
|
2
2
|
|
|
3
3
|
export const CWD = { type: 'string', hint: '工作目录(作为主题;默认当前目录)' };
|
|
4
|
-
// 任务级寻址的 key flag
|
|
5
|
-
export const KEY = { type: 'string', hint: '主题 key(与 --cwd
|
|
4
|
+
// 任务级寻址的 key flag:按主题 key 定位(与 --cwd 二选一)
|
|
5
|
+
export const KEY = { type: 'string', hint: '主题 key(与 --cwd 二选一)' };
|
|
@@ -14,7 +14,7 @@ export function renderOverview(d: RenderInput): string {
|
|
|
14
14
|
return lines.join('\n');
|
|
15
15
|
}
|
|
16
16
|
for (const t of d.topics) {
|
|
17
|
-
const tag = t.
|
|
17
|
+
const tag = t.waiting ? '[等待中]' : '[已结束]';
|
|
18
18
|
const head = t.cwd ? `${t.name} ${t.cwd}` : t.name;
|
|
19
19
|
lines.push(` ${tag} ${head} · 待领取 ${t.pending}/${t.total}`);
|
|
20
20
|
if (t.summary) lines.push(` 现状: ${t.summary}`);
|
|
@@ -70,15 +70,12 @@ export function renderDetach(d: RenderInput): string {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export function renderAdd(d: RenderInput): string {
|
|
73
|
-
const where =
|
|
73
|
+
const where = `主题「${d.name}」`;
|
|
74
74
|
const head = `#${d.task.id} [${d.task.status}] ${d.task.text}`;
|
|
75
|
-
const ignored = d.ignoredCwd
|
|
76
|
-
? `\n注意:--global 优先,你给的 --cwd「${d.ignoredCwd}」未生效(任务进了全局池)。`
|
|
77
|
-
: '';
|
|
78
75
|
const body = d.delivered
|
|
79
76
|
? `已实时投递给等待中的 agent(${where}): ${head}`
|
|
80
77
|
: `已排入${where}队列(agent 下一次 wait 取走): ${head}`;
|
|
81
|
-
return body
|
|
78
|
+
return body;
|
|
82
79
|
}
|
|
83
80
|
|
|
84
81
|
// `localtask chain` 的人读输出(#74):同任务 history 节点为主;旧 forkOf 祖先/子任务为辅
|
|
@@ -156,7 +153,7 @@ export function renderWait(r: RenderInput): string {
|
|
|
156
153
|
// 跨进程轮询捡走的那条是 queued:false + delivered:false —— 它其实来自队列,
|
|
157
154
|
// 只是被 500ms 的轮询取到了;按 queued 反推会把它说成「实时回填」,是假的。
|
|
158
155
|
const how = r.delivered ? '实时回填' : '排队任务';
|
|
159
|
-
const origin =
|
|
156
|
+
const origin = `本目录队列 · ${how}`;
|
|
160
157
|
const header = `已取得下一条任务(${origin} · 主题「${r.cwd}」现状「${r.summary}」): #${r.task.id}`;
|
|
161
158
|
return `${header}\n${deliveryBodyText(r)}`;
|
|
162
159
|
}
|
|
@@ -5,15 +5,13 @@
|
|
|
5
5
|
// T03:等待态进 topic_presence 表(schema P0-4 的落地)—— wait 进程被 SIGKILL 时
|
|
6
6
|
// finally 不会执行,waiting:true 会永久残留;独立成表后残留只污染这张小表,
|
|
7
7
|
// 整表清空即可,不会让队列本身看起来像有人在等。
|
|
8
|
-
import {
|
|
8
|
+
import { resolveTopicKey } from './paths.js';
|
|
9
9
|
import { openLocaltaskStore as openStore, presence as presenceRepo, topics as topicsRepo, txw as tx } from './infra/repo/index.js';
|
|
10
10
|
|
|
11
11
|
// 在库里把某主题置为等待/结束,并刷新现状。
|
|
12
12
|
// waitingSince 是「等待起点」,面板据此显示「已等多久」——waitingUntil(截止时刻)
|
|
13
13
|
// 只能反推剩余,反推不出起点(超时值可被改写),所以两者都存。
|
|
14
|
-
// 全局主题是任务源不是等待源,永不置等待态(no-op)。
|
|
15
14
|
export async function setWaiting(key: string, cwd: string, summary: string, waiting: boolean, deadline: Date | null): Promise<void> {
|
|
16
|
-
if (isGlobalKey(key)) return;
|
|
17
15
|
openStore();
|
|
18
16
|
tx(() => {
|
|
19
17
|
topicsRepo.ensureTopic(key, { cwd });
|
|
@@ -32,7 +30,6 @@ export async function setWaiting(key: string, cwd: string, summary: string, wait
|
|
|
32
30
|
// wait 结束复位:**仅当主题仍存在**时清等待态,绝不重建——主题可能已被 force 删除,
|
|
33
31
|
// 重建会让「删除主题」失效(曾在超时清理路径上把删掉的主题又建回来)。
|
|
34
32
|
export async function clearWaiting(key: string): Promise<void> {
|
|
35
|
-
if (isGlobalKey(key)) return;
|
|
36
33
|
openStore();
|
|
37
34
|
presenceRepo.clearPresence(key);
|
|
38
35
|
}
|
|
@@ -61,10 +58,6 @@ export async function cancelWait({ cwd: rawCwd, key: rawKey }: { cwd?: string; k
|
|
|
61
58
|
throw badInput('需要 --cwd "<工作目录>" 或 --key "<主题key>"');
|
|
62
59
|
}
|
|
63
60
|
const key = resolveTopicKey({ key: rawKey, cwd: rawCwd });
|
|
64
|
-
// 全局主题不是等待源(永不 waiting),无从关闭
|
|
65
|
-
if (isGlobalKey(key)) {
|
|
66
|
-
return { cancelled: false, key, name: GLOBAL_NAME, cwd: '', reason: 'global_not_waitable' };
|
|
67
|
-
}
|
|
68
61
|
openStore();
|
|
69
62
|
const t = topicsRepo.getTopic(key);
|
|
70
63
|
// 「真的在等」的判定在 requestCancel 里(waiting=1 且截止未过)——僵尸标志不算
|
package/src/web/frontend/App.tsx
CHANGED
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
// 所以深链 = 一屏:把地址发给别人,对方看到的布局与你一致。
|
|
14
14
|
//
|
|
15
15
|
// hash 路由:
|
|
16
|
-
// #/dir/<key> 目录详情 #/
|
|
17
|
-
// #/group/<id> 项目组 #/repos 仓库管理 #/global 总览
|
|
16
|
+
// #/dir/<key> 目录详情 #/group/<id> 项目组 #/repos 仓库管理
|
|
18
17
|
// #/templates 任务模板(面板,不是弹窗)
|
|
19
18
|
// (经典看板 #/localtask 已下线;wait 深链改落 #/dir/<key>)
|
|
20
19
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -143,13 +142,9 @@ function routeFromHash(): AppRoute {
|
|
|
143
142
|
}
|
|
144
143
|
return { view: 'templates', key: '', task: '', mode: '', id: '', topic: '', scope: '' };
|
|
145
144
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return { view: path, key: path === 'global' ? '__GLOBAL__' : '', task: path === 'global' ? task : '' };
|
|
150
|
-
}
|
|
151
|
-
// 旧深链(#/localtask?…)与未知路径统一落全局任务池(#174:全部目录总览已下线)
|
|
152
|
-
return { view: 'global', key: '__GLOBAL__', task: '' };
|
|
145
|
+
if (path === 'repos') return { view: 'repos', key: '', task: '' };
|
|
146
|
+
// 旧深链(#/localtask…、#/global…)与未知路径统一落仓库管理(#190 全局池已删除)
|
|
147
|
+
return { view: 'repos', key: '', task: '' };
|
|
153
148
|
}
|
|
154
149
|
|
|
155
150
|
/** FlexLayout 自带的右键菜单是英文。只翻译**用得到的**几条;没翻的原样透出。 */
|
|
@@ -1163,7 +1163,7 @@
|
|
|
1163
1163
|
"action": {
|
|
1164
1164
|
"id": "localtask.add",
|
|
1165
1165
|
"module": "localtask",
|
|
1166
|
-
"summary": "向某主题(工作目录)的队列回填一条任务(正文可多行;--file <文件|-> 从文件/标准输入读,长文本不必靠引号硬拼;有 wait 在等则即时投递,否则排队);--
|
|
1166
|
+
"summary": "向某主题(工作目录)的队列回填一条任务(正文可多行;--file <文件|-> 从文件/标准输入读,长文本不必靠引号硬拼;有 wait 在等则即时投递,否则排队);--duration 给任务带时间目标(领取即计时,完成前必须 check);--board/--project 让任务带工作组语义(正文 frontmatter:board + project + 双方介绍引用),并落进该项目的队列;正文自带 frontmatter 时同样认归属——补介绍引用,落点跟到项目队列(显式给过 --cwd 时不挪窝)",
|
|
1167
1167
|
"usage": "localtask add",
|
|
1168
1168
|
"http": "POST /api/localtasks"
|
|
1169
1169
|
},
|
|
@@ -1283,7 +1283,7 @@
|
|
|
1283
1283
|
"action": {
|
|
1284
1284
|
"id": "localtask.clone",
|
|
1285
1285
|
"module": "localtask",
|
|
1286
|
-
"summary": "
|
|
1286
|
+
"summary": "克隆任务:复制正文内容为一条新任务(同主题)。不带派生链、不继承时间目标与依赖——开新活用",
|
|
1287
1287
|
"usage": "localtask clone",
|
|
1288
1288
|
"http": "POST /api/localtasks/clone"
|
|
1289
1289
|
},
|
|
@@ -296,7 +296,7 @@ export interface ApiClient {
|
|
|
296
296
|
docRemove(input: z.input<InstanceType<typeof RepoDocRemoveAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof RepoDocRemoveAction>['run']>>>;
|
|
297
297
|
/** 取仓库完整知识:项目介绍 + 所属组(介绍/组内描述/绑定文档)+ 参考仓库(--md 拼成单篇 markdown;缺省当前目录) */
|
|
298
298
|
knowledge(input?: z.input<InstanceType<typeof RepoKnowledgeAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof RepoKnowledgeAction>['run']>>>;
|
|
299
|
-
/** 向某主题(工作目录)的队列回填一条任务(正文可多行;--file <文件|-> 从文件/标准输入读,长文本不必靠引号硬拼;有 wait 在等则即时投递,否则排队);--
|
|
299
|
+
/** 向某主题(工作目录)的队列回填一条任务(正文可多行;--file <文件|-> 从文件/标准输入读,长文本不必靠引号硬拼;有 wait 在等则即时投递,否则排队);--duration 给任务带时间目标(领取即计时,完成前必须 check);--board/--project 让任务带工作组语义(正文 frontmatter:board + project + 双方介绍引用),并落进该项目的队列;正文自带 frontmatter 时同样认归属——补介绍引用,落点跟到项目队列(显式给过 --cwd 时不挪窝) */
|
|
300
300
|
localtaskAdd(input?: z.input<InstanceType<typeof LocaltaskAddAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskAddAction>['run']>>>;
|
|
301
301
|
/** 改一条附件绑定的说明(desc):--attachment <资源 id> --note <说明>(只动说明,角色/位置不变) */
|
|
302
302
|
attachNote(input: z.input<InstanceType<typeof LocaltaskAttachNoteAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskAttachNoteAction>['run']>>>;
|
|
@@ -312,7 +312,7 @@ export interface ApiClient {
|
|
|
312
312
|
cancel(input?: z.input<InstanceType<typeof LocaltaskCancelAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskCancelAction>['run']>>>;
|
|
313
313
|
/** 查一条任务的链:history 节点(origin/reopen/comment/current)+ 旧 forkOf 祖先/子任务;面板点节点可旁路查看正文 */
|
|
314
314
|
chain(input: z.input<InstanceType<typeof LocaltaskChainAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskChainAction>['run']>>>;
|
|
315
|
-
/**
|
|
315
|
+
/** 克隆任务:复制正文内容为一条新任务(同主题)。不带派生链、不继承时间目标与依赖——开新活用 */
|
|
316
316
|
localtaskClone(input: z.input<InstanceType<typeof LocaltaskCloneAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskCloneAction>['run']>>>;
|
|
317
317
|
/** 批量收口还没结束的任务(按 --ids,定位到 --cwd 主题或 --key):不要求先领取;--status done 写完成总结,cancelled 只改状态;待领取与已领取都能收(已领取的 agent 侧回执会被忽略),已完成/已取消跳过 */
|
|
318
318
|
closeMany(input: z.input<InstanceType<typeof LocaltaskCloseManyAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskCloseManyAction>['run']>>>;
|
|
@@ -923,7 +923,7 @@ export function createApiClient(transport: Transport): ApiClient {
|
|
|
923
923
|
async localtaskAdd(input?: z.input<InstanceType<typeof LocaltaskAddAction>['_input']>) {
|
|
924
924
|
const inp = input ?? ({} as z.input<InstanceType<typeof LocaltaskAddAction>['_input']>);
|
|
925
925
|
const path = `/api/localtasks`;
|
|
926
|
-
const body = { "text": inp["text"], "file": inp["file"], "cwd": inp["cwd"], "summary": inp["summary"], "
|
|
926
|
+
const body = { "text": inp["text"], "file": inp["file"], "cwd": inp["cwd"], "summary": inp["summary"], "board": inp["board"], "project": inp["project"], "duration": inp["duration"], "goal-prompt": inp["goal-prompt"], "goalPrompt": inp["goalPrompt"], "block-by": inp["block-by"], "blockBy": inp["blockBy"], "gate": inp["gate"], "fork-of": inp["fork-of"], "forkOf": inp["forkOf"], "fork-kind": inp["fork-kind"], "forkKind": inp["forkKind"] };
|
|
927
927
|
return (await transport.request("POST", path, body)) as Awaited<ReturnType<InstanceType<typeof LocaltaskAddAction>['run']>>;
|
|
928
928
|
},
|
|
929
929
|
// action: localtask.attach-note
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// 反向依赖页面目录。页面自己的 api.ts 保留各自专有的调用,并 re-export 这份公共面。
|
|
6
6
|
//
|
|
7
7
|
// 只搬调用不改语义:路径 / 方法 / body 与原 page/dir/api.ts 逐字一致。
|
|
8
|
-
// scope:主题定位二选一——{ cwd } 或 { key }
|
|
8
|
+
// scope:主题定位二选一——{ cwd } 或 { key }(#190 起队列一律绑定目录,无全局池)。
|
|
9
9
|
import { api } from './client.js';
|
|
10
10
|
|
|
11
11
|
/** 主题定位:cwd(目录主题)或 key(含全局池)。 */
|