@siming-org/core 0.6.4 → 0.7.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/dist/index.d.ts +330 -12
- package/dist/index.js +929 -416
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ declare function createRepo<T extends {
|
|
|
55
55
|
list(filter?: Filter<Document>): Promise<T[]>;
|
|
56
56
|
getById(id: string): Promise<T | null>;
|
|
57
57
|
getByName(name: string): Promise<T | null>;
|
|
58
|
-
create(data: OmitId<T
|
|
58
|
+
create(data: OmitId<T>, session?: ClientSession): Promise<T>;
|
|
59
59
|
update(id: string, patch: EoptPartial<OmitId<T>>): Promise<T | null>;
|
|
60
60
|
delete(id: string): Promise<boolean>;
|
|
61
61
|
/** Raw collection access for entity-specific queries */
|
|
@@ -937,6 +937,8 @@ type DagInstance = z.infer<typeof DagInstanceSchema>;
|
|
|
937
937
|
/**
|
|
938
938
|
* N017 D7:删 gate_failed(随 gates 退役),增 approved/rejected——
|
|
939
939
|
* 审批决策是新的领域事件,rejected 需要可追溯。
|
|
940
|
+
* T202609130009:增 reopened——终态重开是新的领域事件(reason/操作者/恢复目标进 details)。
|
|
941
|
+
* 读侧不跑 parse(toEntity 约定),旧版本读到 reopened 条目不崩——回退安全。
|
|
940
942
|
*/
|
|
941
943
|
declare const HistoryActionSchema: z.ZodEnum<{
|
|
942
944
|
completed: "completed";
|
|
@@ -947,6 +949,7 @@ declare const HistoryActionSchema: z.ZodEnum<{
|
|
|
947
949
|
approved: "approved";
|
|
948
950
|
rejected: "rejected";
|
|
949
951
|
cancelled: "cancelled";
|
|
952
|
+
reopened: "reopened";
|
|
950
953
|
}>;
|
|
951
954
|
declare const HistoryEntrySchema: z.ZodObject<{
|
|
952
955
|
nodeId: z.ZodString;
|
|
@@ -959,6 +962,7 @@ declare const HistoryEntrySchema: z.ZodObject<{
|
|
|
959
962
|
approved: "approved";
|
|
960
963
|
rejected: "rejected";
|
|
961
964
|
cancelled: "cancelled";
|
|
965
|
+
reopened: "reopened";
|
|
962
966
|
}>;
|
|
963
967
|
timestamp: z.ZodDefault<z.ZodDate>;
|
|
964
968
|
details: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -1084,6 +1088,7 @@ declare const TaskSchema: z.ZodObject<{
|
|
|
1084
1088
|
approved: "approved";
|
|
1085
1089
|
rejected: "rejected";
|
|
1086
1090
|
cancelled: "cancelled";
|
|
1091
|
+
reopened: "reopened";
|
|
1087
1092
|
}>;
|
|
1088
1093
|
timestamp: z.ZodDefault<z.ZodDate>;
|
|
1089
1094
|
details: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -1271,8 +1276,8 @@ interface TaskPathUpdate {
|
|
|
1271
1276
|
arrayFilters?: Record<string, unknown>[];
|
|
1272
1277
|
}
|
|
1273
1278
|
type TaskRepo = Repo<Task> & {
|
|
1274
|
-
/** resolvedProjectId 由路由层解析(D2:显式携带校验一致性后传入 / 缺省 = 模板 projectId),repo
|
|
1275
|
-
createTask(input: TaskCreateInput, template: DagTemplate, resolvedProjectId: string): Promise<Task>;
|
|
1279
|
+
/** resolvedProjectId 由路由层解析(D2:显式携带校验一致性后传入 / 缺省 = 模板 projectId),repo 不做隐式继承;session 供 convert 组事务透传(T202609150002:任务+关联原子,缺省行为不变) */
|
|
1280
|
+
createTask(input: TaskCreateInput, template: DagTemplate, resolvedProjectId: string, session?: ClientSession): Promise<Task>;
|
|
1276
1281
|
getByTaskId(taskId: string): Promise<Task | null>;
|
|
1277
1282
|
/** N015 F4/F5/F6 + N017 D6:分页 + 排序 + 进度概要投影(剥离 dagInstance/history;total 为过滤后总数) */
|
|
1278
1283
|
listTasks(filter?: TaskListFilter): Promise<{
|
|
@@ -1288,6 +1293,250 @@ type TaskRepo = Repo<Task> & {
|
|
|
1288
1293
|
};
|
|
1289
1294
|
declare function createTaskRepo(db: Db): TaskRepo;
|
|
1290
1295
|
|
|
1296
|
+
/**
|
|
1297
|
+
* Issue 相关 Schemas(T202609150002 问题池)
|
|
1298
|
+
* 小问题轻量跟进:入池 → 整理(合并/拆分)→ 转任务(多对多)。
|
|
1299
|
+
*
|
|
1300
|
+
* 状态语义(PRD 3.2 四态,终态禁止回转):
|
|
1301
|
+
* - pending 待整理 / partial 部分转任务(存在未覆盖遗留)/ converted 已转任务 / cancelled 已取消
|
|
1302
|
+
* - 任务后续演进(完成/取消)不触碰问题状态,进度是读时聚合(taskLinks × tasks.status)
|
|
1303
|
+
*
|
|
1304
|
+
* 关联模型(D1):单一真相源在 Issue 侧(taskLinks 嵌入数组),Task 零改动;
|
|
1305
|
+
* 多对多,同项目内组合;取消问题时 taskLinks 终止条目拷入 history(D8 结构化追溯)。
|
|
1306
|
+
*/
|
|
1307
|
+
/** 池内状态(终态 = converted / cancelled,状态机保护见 issue.repo) */
|
|
1308
|
+
declare const ISSUE_STATUSES: readonly ["pending", "partial", "converted", "cancelled"];
|
|
1309
|
+
type IssueStatus = (typeof ISSUE_STATUSES)[number];
|
|
1310
|
+
declare const IssueStatusSchema: z.ZodEnum<{
|
|
1311
|
+
pending: "pending";
|
|
1312
|
+
cancelled: "cancelled";
|
|
1313
|
+
partial: "partial";
|
|
1314
|
+
converted: "converted";
|
|
1315
|
+
}>;
|
|
1316
|
+
/** 可参与转出/取消的非终态集合(事务内条件更新的并发安全带) */
|
|
1317
|
+
declare const ISSUE_ACTIVE_STATUSES: readonly ["pending", "partial"];
|
|
1318
|
+
/** 录入来源渠道(服务端按通道注入,客户端不可传) */
|
|
1319
|
+
declare const ISSUE_SOURCES: readonly ["mcp", "cli", "web"];
|
|
1320
|
+
type IssueSource = (typeof ISSUE_SOURCES)[number];
|
|
1321
|
+
declare const IssueSourceSchema: z.ZodEnum<{
|
|
1322
|
+
mcp: "mcp";
|
|
1323
|
+
cli: "cli";
|
|
1324
|
+
web: "web";
|
|
1325
|
+
}>;
|
|
1326
|
+
/** 当前活跃任务关联(取消问题时移出 taskLinks、拷入 history 终止条目) */
|
|
1327
|
+
declare const TaskLinkSchema: z.ZodObject<{
|
|
1328
|
+
taskId: z.ZodString;
|
|
1329
|
+
mode: z.ZodEnum<{
|
|
1330
|
+
all: "all";
|
|
1331
|
+
partial: "partial";
|
|
1332
|
+
}>;
|
|
1333
|
+
linkedAt: z.ZodDate;
|
|
1334
|
+
}, z.core.$strip>;
|
|
1335
|
+
type TaskLink = z.infer<typeof TaskLinkSchema>;
|
|
1336
|
+
/** 转出声明(组循环后终态推导用:任一成功组声明 all → converted) */
|
|
1337
|
+
declare const ISSUE_CONVERT_MODES: readonly ["all", "partial"];
|
|
1338
|
+
type IssueConvertMode = (typeof ISSUE_CONVERT_MODES)[number];
|
|
1339
|
+
declare const IssueConvertModeSchema: z.ZodEnum<{
|
|
1340
|
+
all: "all";
|
|
1341
|
+
partial: "partial";
|
|
1342
|
+
}>;
|
|
1343
|
+
/**
|
|
1344
|
+
* 状态变化历史条目(只增不改,全量保留不裁剪):
|
|
1345
|
+
* - created:录入(无 from/to)
|
|
1346
|
+
* - status-change:状态迁移(from/to;转任务推导携带 taskId 可选)
|
|
1347
|
+
* - link-added:关联建立(taskId + reason 携带声明)
|
|
1348
|
+
* - link-terminated:关联终止(取消问题时拷入,taskId 携带原 link 的 mode/linkedAt 摘要)
|
|
1349
|
+
*/
|
|
1350
|
+
declare const IssueHistoryEntrySchema: z.ZodObject<{
|
|
1351
|
+
id: z.ZodString;
|
|
1352
|
+
action: z.ZodEnum<{
|
|
1353
|
+
created: "created";
|
|
1354
|
+
"status-change": "status-change";
|
|
1355
|
+
"link-added": "link-added";
|
|
1356
|
+
"link-terminated": "link-terminated";
|
|
1357
|
+
}>;
|
|
1358
|
+
from: z.ZodOptional<z.ZodEnum<{
|
|
1359
|
+
pending: "pending";
|
|
1360
|
+
cancelled: "cancelled";
|
|
1361
|
+
partial: "partial";
|
|
1362
|
+
converted: "converted";
|
|
1363
|
+
}>>;
|
|
1364
|
+
to: z.ZodOptional<z.ZodEnum<{
|
|
1365
|
+
pending: "pending";
|
|
1366
|
+
cancelled: "cancelled";
|
|
1367
|
+
partial: "partial";
|
|
1368
|
+
converted: "converted";
|
|
1369
|
+
}>>;
|
|
1370
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
1371
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1372
|
+
at: z.ZodDate;
|
|
1373
|
+
}, z.core.$strip>;
|
|
1374
|
+
type IssueHistoryEntry = z.infer<typeof IssueHistoryEntrySchema>;
|
|
1375
|
+
declare const IssueSchema: z.ZodObject<{
|
|
1376
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1377
|
+
issueId: z.ZodString;
|
|
1378
|
+
title: z.ZodString;
|
|
1379
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1380
|
+
source: z.ZodEnum<{
|
|
1381
|
+
mcp: "mcp";
|
|
1382
|
+
cli: "cli";
|
|
1383
|
+
web: "web";
|
|
1384
|
+
}>;
|
|
1385
|
+
projectId: z.ZodString;
|
|
1386
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
1387
|
+
pending: "pending";
|
|
1388
|
+
cancelled: "cancelled";
|
|
1389
|
+
partial: "partial";
|
|
1390
|
+
converted: "converted";
|
|
1391
|
+
}>>;
|
|
1392
|
+
taskLinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1393
|
+
taskId: z.ZodString;
|
|
1394
|
+
mode: z.ZodEnum<{
|
|
1395
|
+
all: "all";
|
|
1396
|
+
partial: "partial";
|
|
1397
|
+
}>;
|
|
1398
|
+
linkedAt: z.ZodDate;
|
|
1399
|
+
}, z.core.$strip>>>;
|
|
1400
|
+
history: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1401
|
+
id: z.ZodString;
|
|
1402
|
+
action: z.ZodEnum<{
|
|
1403
|
+
created: "created";
|
|
1404
|
+
"status-change": "status-change";
|
|
1405
|
+
"link-added": "link-added";
|
|
1406
|
+
"link-terminated": "link-terminated";
|
|
1407
|
+
}>;
|
|
1408
|
+
from: z.ZodOptional<z.ZodEnum<{
|
|
1409
|
+
pending: "pending";
|
|
1410
|
+
cancelled: "cancelled";
|
|
1411
|
+
partial: "partial";
|
|
1412
|
+
converted: "converted";
|
|
1413
|
+
}>>;
|
|
1414
|
+
to: z.ZodOptional<z.ZodEnum<{
|
|
1415
|
+
pending: "pending";
|
|
1416
|
+
cancelled: "cancelled";
|
|
1417
|
+
partial: "partial";
|
|
1418
|
+
converted: "converted";
|
|
1419
|
+
}>>;
|
|
1420
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
1421
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1422
|
+
at: z.ZodDate;
|
|
1423
|
+
}, z.core.$strip>>>;
|
|
1424
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
1425
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
1426
|
+
}, z.core.$strip>;
|
|
1427
|
+
type Issue = z.infer<typeof IssueSchema>;
|
|
1428
|
+
/**
|
|
1429
|
+
* 录入输入:source/projectId 由服务端按通道/项目解析注入,不入客户端 schema
|
|
1430
|
+
* (source 是统计信息非权限依据;projectId 缺省按 key=default 解析)。
|
|
1431
|
+
*/
|
|
1432
|
+
declare const IssueCreateSchema: z.ZodObject<{
|
|
1433
|
+
title: z.ZodString;
|
|
1434
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1435
|
+
}, z.core.$strip>;
|
|
1436
|
+
type IssueCreate = z.infer<typeof IssueCreateSchema>;
|
|
1437
|
+
/** 编辑输入(独立 object 不派生——Zod4 UpdateSchema 范式;任意状态可编辑,终态无副作用) */
|
|
1438
|
+
declare const IssueUpdateSchema: z.ZodObject<{
|
|
1439
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1440
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1441
|
+
}, z.core.$strip>;
|
|
1442
|
+
type IssueUpdate = z.infer<typeof IssueUpdateSchema>;
|
|
1443
|
+
/** 转任务进度(读时聚合:taskLinks × tasks.status;total = 关联任务总数) */
|
|
1444
|
+
declare const IssueProgressSchema: z.ZodObject<{
|
|
1445
|
+
done: z.ZodNumber;
|
|
1446
|
+
cancelled: z.ZodNumber;
|
|
1447
|
+
total: z.ZodNumber;
|
|
1448
|
+
}, z.core.$strip>;
|
|
1449
|
+
type IssueProgress = z.infer<typeof IssueProgressSchema>;
|
|
1450
|
+
/** 列表项(Issue + progress) */
|
|
1451
|
+
type IssueWithProgress = Issue & {
|
|
1452
|
+
progress: IssueProgress;
|
|
1453
|
+
};
|
|
1454
|
+
/** 详情关联任务快照(问题详情看板卡片) */
|
|
1455
|
+
type IssueTaskSnapshot = {
|
|
1456
|
+
taskId: string;
|
|
1457
|
+
title: string;
|
|
1458
|
+
currentNode: string;
|
|
1459
|
+
status: string;
|
|
1460
|
+
mode: IssueConvertMode;
|
|
1461
|
+
linkedAt: Date;
|
|
1462
|
+
updatedAt: Date;
|
|
1463
|
+
};
|
|
1464
|
+
/** 任务侧反查视图(任务详情「关联问题」区块;terminated = 历史终止关联——问题已取消仍展示) */
|
|
1465
|
+
type TaskIssueView = {
|
|
1466
|
+
issueId: string;
|
|
1467
|
+
title: string;
|
|
1468
|
+
status: IssueStatus;
|
|
1469
|
+
source: IssueSource;
|
|
1470
|
+
progress: IssueProgress;
|
|
1471
|
+
terminated: boolean;
|
|
1472
|
+
updatedAt: Date;
|
|
1473
|
+
};
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* Issue 仓储(T202609150002)
|
|
1477
|
+
* 状态机保护在此层:终态(converted/cancelled)禁止 cancel/convert 关联写入——
|
|
1478
|
+
* 条件更新双保险(filter 携带 status ∈ {pending, partial},命中 0 行即并发终态)。
|
|
1479
|
+
* 进度计算两步批查(D2:不用 $lookup——Zod parse 单源 + 一次 $in 往返 + 内存映射)。
|
|
1480
|
+
*/
|
|
1481
|
+
type IssueListFilter = {
|
|
1482
|
+
projectId?: string;
|
|
1483
|
+
/** 状态多值过滤(T202609160002:逗号分隔由 server 切分为数组;[] 与 undefined 等价——不过滤) */
|
|
1484
|
+
status?: string[];
|
|
1485
|
+
source?: string;
|
|
1486
|
+
/** 任务关联反查(列表侧入口;详情级反查用 listByTaskId) */
|
|
1487
|
+
taskId?: string;
|
|
1488
|
+
/** 标题/描述模糊搜索 */
|
|
1489
|
+
q?: string;
|
|
1490
|
+
/** all = 全量(缺省);open = 有效未跟进完(pending/partial ∪ converted 存在未终态关联任务) */
|
|
1491
|
+
view?: 'all' | 'open';
|
|
1492
|
+
page?: number;
|
|
1493
|
+
limit?: number;
|
|
1494
|
+
};
|
|
1495
|
+
/** 统一终态推导输入(convert 组循环后由路由层组装) */
|
|
1496
|
+
interface ConvertGroupOutcome {
|
|
1497
|
+
ok: boolean;
|
|
1498
|
+
issueIds: string[];
|
|
1499
|
+
/** 成功组的新任务 id(失败组无值) */
|
|
1500
|
+
taskId?: string;
|
|
1501
|
+
}
|
|
1502
|
+
/** 推导产生的状态迁移记录(convert 响应 statusChanges 字段数据源) */
|
|
1503
|
+
interface IssueStatusChange {
|
|
1504
|
+
issueId: string;
|
|
1505
|
+
from: IssueStatus;
|
|
1506
|
+
to: 'partial' | 'converted';
|
|
1507
|
+
}
|
|
1508
|
+
/** 组事务关联写入的声明语义由 linkTaskForConvert(issueId, taskId, mode) 内联参数承载(原 ConvertLinkSpec 接口无消费者,已删) */
|
|
1509
|
+
type IssueRepo = Repo<Issue> & {
|
|
1510
|
+
createIssue(data: IssueCreate, source: IssueSource, projectId: string): Promise<Issue>;
|
|
1511
|
+
getByIssueId(issueId: string): Promise<Issue | null>;
|
|
1512
|
+
updateIssue(issueId: string, patch: IssueUpdate): Promise<Issue>;
|
|
1513
|
+
cancelIssue(issueId: string, reason?: string): Promise<Issue>;
|
|
1514
|
+
/** 列表(进度聚合 + view=open 过滤;两支合并 createdAt 降序统一切片) */
|
|
1515
|
+
listIssues(filter?: IssueListFilter): Promise<{
|
|
1516
|
+
items: IssueWithProgress[];
|
|
1517
|
+
total: number;
|
|
1518
|
+
}>;
|
|
1519
|
+
/** 详情(进度 + 当前关联任务快照数组) */
|
|
1520
|
+
getIssueDetail(issueId: string): Promise<(IssueWithProgress & {
|
|
1521
|
+
tasks: IssueTaskSnapshot[];
|
|
1522
|
+
}) | null>;
|
|
1523
|
+
/** 任务侧反查:活跃关联 ∪ 终止关联(问题取消后任务侧仍可追溯展示) */
|
|
1524
|
+
listByTaskId(taskId: string): Promise<TaskIssueView[]>;
|
|
1525
|
+
/**
|
|
1526
|
+
* convert 组事务内关联写入(只写 taskLink + link-added history,不写 status——
|
|
1527
|
+
* 终态推导延迟到组循环后统一执行,见 finalizeConvertStatuses)。
|
|
1528
|
+
* 条件更新双保险:命中 0 行(外部并发终态/不存在)抛 ConflictError → 事务中止整组回滚。
|
|
1529
|
+
*/
|
|
1530
|
+
linkTaskForConvert(session: ClientSession, issueId: string, taskId: string, mode: 'all' | 'partial'): Promise<void>;
|
|
1531
|
+
/**
|
|
1532
|
+
* 统一终态推导(组循环后):按 v1.3 §4.1 规则表逐问题合并全部组成败与声明,
|
|
1533
|
+
* 条件更新写终态 + status-change history(命中 0 行 = 并发处理,跳过不报错;
|
|
1534
|
+
* 无成功组问题零写入,天然保持原状态)。
|
|
1535
|
+
*/
|
|
1536
|
+
finalizeConvertStatuses(issues: Pick<Issue, 'issueId' | 'status' | 'history'>[], outcomes: ConvertGroupOutcome[], declarations: ReadonlyMap<string, 'all' | 'partial'>): Promise<IssueStatusChange[]>;
|
|
1537
|
+
};
|
|
1538
|
+
declare function createIssueRepo(db: Db): IssueRepo;
|
|
1539
|
+
|
|
1291
1540
|
/**
|
|
1292
1541
|
* Project Schema — 项目实体(N012)
|
|
1293
1542
|
* 项目是 Task / DagTemplate 的归属维度;Skill / Agent 通过 scope 字段支持全局或项目专用。
|
|
@@ -1427,8 +1676,8 @@ declare function assertModelAliasExists(repo: ModelAliasRepo, code: string): Pro
|
|
|
1427
1676
|
|
|
1428
1677
|
/**
|
|
1429
1678
|
* 枚举注册表 Schema(N016 D1/D4/D5)
|
|
1430
|
-
* settings-as-truth:
|
|
1431
|
-
* task_status / node_status / skill_category / scope)由 DB 注册表维护,消费端(web 下拉 /
|
|
1679
|
+
* settings-as-truth:9 类业务枚举(dag_phase / dag_track / pause_type /
|
|
1680
|
+
* task_status / node_status / skill_category / scope / agent_function / issue_status)由 DB 注册表维护,消费端(web 下拉 /
|
|
1432
1681
|
* CLI 校验 / server validator)从注册表读取,消除硬编码漂移。
|
|
1433
1682
|
* N017 F8:gate_type 类整体退役(gates 机制删除后无引用方)。
|
|
1434
1683
|
*
|
|
@@ -1450,6 +1699,7 @@ declare const EnumRegistryCategorySchema: z.ZodEnum<{
|
|
|
1450
1699
|
node_status: "node_status";
|
|
1451
1700
|
skill_category: "skill_category";
|
|
1452
1701
|
agent_function: "agent_function";
|
|
1702
|
+
issue_status: "issue_status";
|
|
1453
1703
|
}>;
|
|
1454
1704
|
type EnumRegistryCategory = z.infer<typeof EnumRegistryCategorySchema>;
|
|
1455
1705
|
/** 注册表条目(D5) */
|
|
@@ -1474,6 +1724,7 @@ declare const EnumRegistrySchema: z.ZodObject<{
|
|
|
1474
1724
|
node_status: "node_status";
|
|
1475
1725
|
skill_category: "skill_category";
|
|
1476
1726
|
agent_function: "agent_function";
|
|
1727
|
+
issue_status: "issue_status";
|
|
1477
1728
|
}>;
|
|
1478
1729
|
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1479
1730
|
value: z.ZodString;
|
|
@@ -1936,7 +2187,7 @@ declare function createAuthAccountRepo(db: Db): {
|
|
|
1936
2187
|
id?: string | undefined;
|
|
1937
2188
|
createdAt?: Date | undefined;
|
|
1938
2189
|
updatedAt?: Date | undefined;
|
|
1939
|
-
}
|
|
2190
|
+
}>, session?: mongodb.ClientSession): Promise<{
|
|
1940
2191
|
username: string;
|
|
1941
2192
|
passwordHash: string;
|
|
1942
2193
|
id?: string | undefined;
|
|
@@ -2005,7 +2256,7 @@ declare function createAuthTokenRepo(db: Db): {
|
|
|
2005
2256
|
projectId?: string | undefined;
|
|
2006
2257
|
createdAt?: Date | undefined;
|
|
2007
2258
|
updatedAt?: Date | undefined;
|
|
2008
|
-
}
|
|
2259
|
+
}>, session?: mongodb.ClientSession): Promise<{
|
|
2009
2260
|
tokenHash: string;
|
|
2010
2261
|
type: "project" | "admin";
|
|
2011
2262
|
id?: string | undefined;
|
|
@@ -2079,7 +2330,7 @@ declare function createAuthSessionRepo(db: Db): {
|
|
|
2079
2330
|
id?: string | undefined;
|
|
2080
2331
|
createdAt?: Date | undefined;
|
|
2081
2332
|
updatedAt?: Date | undefined;
|
|
2082
|
-
}
|
|
2333
|
+
}>, session?: mongodb.ClientSession): Promise<{
|
|
2083
2334
|
sessionId: string;
|
|
2084
2335
|
accountId: string;
|
|
2085
2336
|
expiresAt: Date;
|
|
@@ -2734,8 +2985,8 @@ declare const ImportPlanResponseSchema: z.ZodObject<{
|
|
|
2734
2985
|
type ImportPlanResponse = z.infer<typeof ImportPlanResponseSchema>;
|
|
2735
2986
|
declare const DependencyActionSchema: z.ZodEnum<{
|
|
2736
2987
|
skipped: "skipped";
|
|
2737
|
-
identical: "identical";
|
|
2738
2988
|
created: "created";
|
|
2989
|
+
identical: "identical";
|
|
2739
2990
|
updated: "updated";
|
|
2740
2991
|
failed: "failed";
|
|
2741
2992
|
}>;
|
|
@@ -2763,8 +3014,8 @@ declare const ImportApplyResponseSchema: z.ZodObject<{
|
|
|
2763
3014
|
}>>;
|
|
2764
3015
|
action: z.ZodEnum<{
|
|
2765
3016
|
skipped: "skipped";
|
|
2766
|
-
identical: "identical";
|
|
2767
3017
|
created: "created";
|
|
3018
|
+
identical: "identical";
|
|
2768
3019
|
updated: "updated";
|
|
2769
3020
|
failed: "failed";
|
|
2770
3021
|
}>;
|
|
@@ -2791,6 +3042,7 @@ declare function decisionKey(kind: 'skill' | 'agent' | 'modelAlias', scope: 'glo
|
|
|
2791
3042
|
declare const AdvanceRequestSchema: z.ZodObject<{
|
|
2792
3043
|
note: z.ZodOptional<z.ZodString>;
|
|
2793
3044
|
summary: z.ZodOptional<z.ZodString>;
|
|
3045
|
+
finalize: z.ZodOptional<z.ZodBoolean>;
|
|
2794
3046
|
}, z.core.$strip>;
|
|
2795
3047
|
type AdvanceRequest = z.infer<typeof AdvanceRequestSchema>;
|
|
2796
3048
|
/** 暂停点审批:approved=通过并流转;rejected=驳回保持 paused(comment 为决策说明) */
|
|
@@ -2980,6 +3232,15 @@ declare const CancelRequestSchema: z.ZodObject<{
|
|
|
2980
3232
|
reason: z.ZodOptional<z.ZodString>;
|
|
2981
3233
|
}, z.core.$strip>;
|
|
2982
3234
|
type CancelRequest = z.infer<typeof CancelRequestSchema>;
|
|
3235
|
+
/**
|
|
3236
|
+
* 终态重开请求体:completed/cancelled → 恢复终态化前状态。
|
|
3237
|
+
* reason 必填(审计链核心字段:重开动机必须可追溯)——与 CancelRequestSchema 同居同界
|
|
3238
|
+
* (min(1).max(500)),差异仅在可选性(取消可无理由,重开必凭理由)。
|
|
3239
|
+
*/
|
|
3240
|
+
declare const ReopenRequestSchema: z.ZodObject<{
|
|
3241
|
+
reason: z.ZodString;
|
|
3242
|
+
}, z.core.$strip>;
|
|
3243
|
+
type ReopenRequest = z.infer<typeof ReopenRequestSchema>;
|
|
2983
3244
|
|
|
2984
3245
|
/**
|
|
2985
3246
|
* T202608280007 F1:写入轻量回执——任务信息结构化写端点(doc/record/archnote 域 +
|
|
@@ -3320,7 +3581,7 @@ declare function parseAuthEnabledEnvValue(raw: string): boolean | undefined;
|
|
|
3320
3581
|
* Domain error types — thrown by core business logic, caught by server's app.onError().
|
|
3321
3582
|
*/
|
|
3322
3583
|
/** N012 语义化业务错误码(可选挂载到 AppError 子类;HTTP 形状向后兼容:error 字段缺省仍为 http 级 code) */
|
|
3323
|
-
type BizCode = 'PROJECT_ARCHIVED' | 'TEMPLATE_PROJECT_MISMATCH' | 'TEMPLATE_PROJECT_IMMUTABLE' | 'SCOPE_IMMUTABLE' | 'TASK_PROJECT_IMMUTABLE' | 'DEFAULT_PROJECT_IMMUTABLE' | 'TEMPLATE_NAME_CONFLICT' | 'TEMPLATE_CODE_CONFLICT' | 'TEMPLATE_CODE_IMMUTABLE' | 'PROJECT_NOT_FOUND' | 'AGENT_SKILL_SCOPE_CONFLICT' | 'MODEL_CODE_EXISTS' | 'MODEL_CODE_IMMUTABLE' | 'MODEL_ALIAS_IN_USE' | 'ENUM_ENTRY_BUILTIN' | 'ENUM_ENTRY_IN_USE' | 'ENUM_VALUE_CONFLICT' | 'NAME_SCOPE_CONFLICT' | 'REFERENCE_IN_USE' | 'TASK_DOC_NOT_SET' | 'TASK_DOC_NOT_FOUND' | 'TASK_DOC_SECTION_NOT_FOUND' | 'TASK_AT_PAUSE_POINT' | 'TASK_NOT_AT_PAUSE_POINT' | 'NODE_NOT_IN_INSTANCE' | 'CHECK_NOT_FOUND' | 'NODE_RECORD_NOT_WRITABLE' | 'TASK_TERMINATED' | 'TASK_PRUNE_GRAPH_INVALID' | 'TASK_SKIP_NODE_NOT_FOUND' | 'TASK_TYPE_TRACK_MISMATCH' | 'TEMPLATE_DISABLED' | 'AUTH_REQUIRED' | 'AUTH_TOKEN_INVALID' | 'AUTH_INVALID_CREDENTIALS' | 'AUTH_FORBIDDEN' | 'AUTH_ACCOUNT_EXISTS' | 'BATCH_EMPTY' | 'BATCH_LIMIT_EXCEEDED' | 'BATCH_PAYLOAD_TOO_LARGE' | 'NODE_PRESET_CODE_EXISTS' | 'NODE_PRESET_CODE_IMMUTABLE' | 'NODE_PRESET_VERSION_REQUIRED' | 'TEMPLATE_NODE_ID_DUPLICATE' | 'NODE_LIBRARY_COMPOSITION_NOT_FOUND' | 'UPGRADE_DECISION_REQUIRED' | 'UPGRADE_STALE' | 'FLOW_MANIFEST_INVALID';
|
|
3584
|
+
type BizCode = 'PROJECT_ARCHIVED' | 'TEMPLATE_PROJECT_MISMATCH' | 'TEMPLATE_PROJECT_IMMUTABLE' | 'SCOPE_IMMUTABLE' | 'TASK_PROJECT_IMMUTABLE' | 'DEFAULT_PROJECT_IMMUTABLE' | 'TEMPLATE_NAME_CONFLICT' | 'TEMPLATE_CODE_CONFLICT' | 'TEMPLATE_CODE_IMMUTABLE' | 'PROJECT_NOT_FOUND' | 'AGENT_SKILL_SCOPE_CONFLICT' | 'MODEL_CODE_EXISTS' | 'MODEL_CODE_IMMUTABLE' | 'MODEL_ALIAS_IN_USE' | 'ENUM_ENTRY_BUILTIN' | 'ENUM_ENTRY_IN_USE' | 'ENUM_VALUE_CONFLICT' | 'NAME_SCOPE_CONFLICT' | 'REFERENCE_IN_USE' | 'TASK_DOC_NOT_SET' | 'TASK_DOC_NOT_FOUND' | 'TASK_DOC_SECTION_NOT_FOUND' | 'TASK_AT_PAUSE_POINT' | 'TASK_NOT_AT_PAUSE_POINT' | 'NODE_NOT_IN_INSTANCE' | 'CHECK_NOT_FOUND' | 'NODE_RECORD_NOT_WRITABLE' | 'TASK_TERMINATED' | 'TASK_NOT_TERMINATED' | 'TASK_FINALIZE_CONFIRMATION_REQUIRED' | 'TASK_PRUNE_GRAPH_INVALID' | 'TASK_SKIP_NODE_NOT_FOUND' | 'TASK_TYPE_TRACK_MISMATCH' | 'TEMPLATE_DISABLED' | 'AUTH_REQUIRED' | 'AUTH_TOKEN_INVALID' | 'AUTH_INVALID_CREDENTIALS' | 'AUTH_FORBIDDEN' | 'AUTH_ACCOUNT_EXISTS' | 'BATCH_EMPTY' | 'BATCH_LIMIT_EXCEEDED' | 'BATCH_PAYLOAD_TOO_LARGE' | 'NODE_PRESET_CODE_EXISTS' | 'NODE_PRESET_CODE_IMMUTABLE' | 'NODE_PRESET_VERSION_REQUIRED' | 'TEMPLATE_NODE_ID_DUPLICATE' | 'NODE_LIBRARY_COMPOSITION_NOT_FOUND' | 'UPGRADE_DECISION_REQUIRED' | 'UPGRADE_STALE' | 'FLOW_MANIFEST_INVALID' | 'ISSUE_NOT_FOUND' | 'ISSUE_INVALID_TRANSITION' | 'ISSUE_PROJECT_MISMATCH' | 'ISSUE_BATCH_LIMIT_EXCEEDED';
|
|
3324
3585
|
/** bizCode → 用户可读中文 message(单一真相源,路由层抛错时引用) */
|
|
3325
3586
|
declare const BIZ_CODE_MESSAGES: Record<BizCode, string>;
|
|
3326
3587
|
interface AppErrorOptions {
|
|
@@ -3615,6 +3876,13 @@ interface AdvanceInput {
|
|
|
3615
3876
|
* (同一 $set 目标,F12 双入口分工无冲突)。
|
|
3616
3877
|
*/
|
|
3617
3878
|
summary?: string;
|
|
3879
|
+
/**
|
|
3880
|
+
* T202609130009 收尾确认(可选):终节点推进默认被拒
|
|
3881
|
+
* (TASK_FINALIZE_CONFIRMATION_REQUIRED),携带 finalize=true 才完成收尾终态化,
|
|
3882
|
+
* completed 条目 details 记 finalized:true(审计区分确认收尾);
|
|
3883
|
+
* 中间节点传递无副作用(守卫仅位于终态收敛分支,宽容语义不报错)。
|
|
3884
|
+
*/
|
|
3885
|
+
finalize?: boolean;
|
|
3618
3886
|
}
|
|
3619
3887
|
declare function advanceTask(deps: AdvanceDeps, taskId: string, input?: AdvanceInput): Promise<AdvanceResponse>;
|
|
3620
3888
|
declare function approveTask(deps: AdvanceDeps, taskId: string, request: ApproveRequest): Promise<ApproveResponse>;
|
|
@@ -3630,6 +3898,56 @@ declare function resumeTask(deps: AdvanceDeps, taskId: string, decision?: string
|
|
|
3630
3898
|
* - 终态重复取消 → 400 TASK_TERMINATED(复用既有码:completed/cancelled 同语义)。
|
|
3631
3899
|
*/
|
|
3632
3900
|
declare function cancelTask(deps: AdvanceDeps, taskId: string, reason?: string): Promise<Task>;
|
|
3901
|
+
interface ReopenInput {
|
|
3902
|
+
/** 重开理由(必填,审计链核心字段——重开动机必须可追溯) */
|
|
3903
|
+
reason: string;
|
|
3904
|
+
}
|
|
3905
|
+
/**
|
|
3906
|
+
* 重开响应:task 为全量实体(与 pauseTask/cancelTask 返回形态同构——writeAck 投影
|
|
3907
|
+
* 需要 updatedAt/projectId/taskProgress,TaskPublic 缺字段);restored 为恢复摘要。
|
|
3908
|
+
*/
|
|
3909
|
+
interface ReopenResponse {
|
|
3910
|
+
task: Task;
|
|
3911
|
+
restored: {
|
|
3912
|
+
fromStatus: string;
|
|
3913
|
+
toStatus: string;
|
|
3914
|
+
pausedAt: string | null;
|
|
3915
|
+
};
|
|
3916
|
+
}
|
|
3917
|
+
/**
|
|
3918
|
+
* T202609130009 终态重开:completed/cancelled → 恢复终态化前状态(普通功能,权限语义归 server 层)。
|
|
3919
|
+
*
|
|
3920
|
+
* - 恢复正确性依赖不变量「终态化不动 currentNode/nodeStates」(cancelTask/advance Step5
|
|
3921
|
+
* 均只改 status/pausedAt/history)——重开以 currentNode 为恢复锚点;
|
|
3922
|
+
* - completed 恢复规则固定:status=active + 终节点 state 回 active(enteredAt 保留、
|
|
3923
|
+
* completedAt 清 null)——终态化 advance 前任务必为 active,无需推导;
|
|
3924
|
+
* - cancelled 恢复走 derivePreTerminalState 纯推导(见下);nodeStates 不动(cancel 未动过);
|
|
3925
|
+
* - 两分支公共:history 追加 reopened 条目(reason/operator/恢复目标进 details,纯 append);
|
|
3926
|
+
* - CAS 双条件(expectedStatus + expectedCurrentNode):并发下终态被他人变更即冲突,不重试;
|
|
3927
|
+
* - 非终态(active/paused)调用 → 400 TASK_NOT_TERMINATED(新码,不复用 TASK_TERMINATED——
|
|
3928
|
+
* 该码调用方语义为「已终态禁止写入」,重开场景语义相反,同码不同义污染按码程序化判定)。
|
|
3929
|
+
*/
|
|
3930
|
+
declare function reopenTask(deps: AdvanceDeps, taskId: string, input: ReopenInput, operator?: string): Promise<ReopenResponse>;
|
|
3931
|
+
/**
|
|
3932
|
+
* 包导出 helper(单测直接验证 seam,与 findNextEdge/checkTermination 同惯例——
|
|
3933
|
+
* 经包根 export * 对外可见,属受支持的稳定验证入口,非模块私有)
|
|
3934
|
+
* T202609130009:从 cancelled 任务的 history 推导取消前的状态锚点(调用前置条件:
|
|
3935
|
+
* status==='cancelled')。规则:定位最后一个 cancelled 条目,从其前一条向前扫描,
|
|
3936
|
+
* 命中首个状态锚点条目按引擎写入路径反推:
|
|
3937
|
+
* paused(pausePoint) → paused + pausedAt=该条 nodeId(advance Step6 暂停点形态)
|
|
3938
|
+
* paused(无 pausePoint) → paused + pausedAt=null(pauseTask 手动暂停形态)
|
|
3939
|
+
* rejected → 继续向前扫描(approveTask rejected 只写 history 不改状态)
|
|
3940
|
+
* resumed/advanced/entered/approved → active + null
|
|
3941
|
+
* completed → active + null(防御兜底,理论不可达)
|
|
3942
|
+
* reopened → 按该条自身 details 的 toStatus/restoredPausedAt 取值
|
|
3943
|
+
* (重开可恢复为 paused 且可再次被取消——「取消→重开→再取消」
|
|
3944
|
+
* 路径下扫描锚点即 reopened 条目,信息已在 details 无需二扫)
|
|
3945
|
+
* 不变量:cancelled 条目前必存在锚点(创建即写 entered)——扫描必命中;违反即内部错误。
|
|
3946
|
+
*/
|
|
3947
|
+
declare function derivePreTerminalState(history: HistoryEntry[]): {
|
|
3948
|
+
status: 'active' | 'paused';
|
|
3949
|
+
pausedAt: string | null;
|
|
3950
|
+
};
|
|
3633
3951
|
/**
|
|
3634
3952
|
* @internal 供单测直接验证的模块私有 helper(非公共 API)
|
|
3635
3953
|
* N017:findNextNode → findNextEdge——返回边对象(调用方需要 pausePoint)
|
|
@@ -3766,4 +4084,4 @@ declare function applyImport(deps: TemplateTransferDeps, targetProjectId: string
|
|
|
3766
4084
|
declare const VERSION: string;
|
|
3767
4085
|
declare function ping(): string;
|
|
3768
4086
|
|
|
3769
|
-
export { AGENT_MAIN_DOC, ARTIFACT_TYPES, AUTH_COLLECTIONS, type AdvanceDeps, type AdvanceInput, type AdvanceRequest, AdvanceRequestSchema, type AdvanceResponse, AdvanceResponseSchema, type Agent, type AgentCopy, AgentCopySchema, type AgentCreate, AgentCreateSchema, type AgentFunction, AgentFunctionSchema, type AgentPayload, AgentPayloadSchema, type AgentRepo, AgentSchema, type AgentScope, AgentScopeSchema, AgentShapeSchema, type AgentUpdate, AgentUpdateSchema, AppError, type AppErrorOptions, type ApproveRequest, ApproveRequestSchema, type ApproveResponse, ApproveResponseSchema, type ArchNote, ArchNoteSchema, type Artifact, ArtifactSchema, type ArtifactType, type AssetListOpts, type AssetSetEnabled, AssetSetEnabledSchema, type AuthAccount, type AuthAccountCreate, AuthAccountCreateSchema, AuthAccountSchema, type AuthSession, type AuthStatus, AuthStatusSchema, type AuthToken, type AuthTokenGenResponse, AuthTokenGenResponseSchema, type AuthTokenKind, AuthTokenSchema, type AuthTokenStatus, AuthTokenStatusSchema, type AuthTokenType, AuthTokenTypeSchema, type AuthWhoami, AuthWhoamiSchema, BIZ_CODE_MESSAGES, BadRequestError, type BizCode, CONTEXT_VIEWS, type CancelRequest, CancelRequestSchema, type CheckItem, CheckItemSchema, type Composition, type CompositionEdge, CompositionEdgeSchema, CompositionSchema, type Confirmation, ConfirmationSchema, ConflictError, type ContextView, ContextViewSchema, type CreateTaskResponse, CreateTaskResponseSchema, DAG_PHASES, DAG_TRACKS, DEFAULT_PROJECT_KEY, type DagEdge, DagEdgeSchema, type DagInstance, type DagInstanceNode, DagInstanceNodeSchema, DagInstanceSchema, type DagNode, DagNodePhaseSchema, DagNodeSchema, DagNodeTrackSchema, type DagTemplate, type DagTemplateCopy, DagTemplateCopySchema, type DagTemplateCreate, DagTemplateCreateSchema, type DagTemplateRepo, DagTemplateSchema, type DagTemplateUpdate, DagTemplateUpdateSchema, type Decision, DecisionSchema, type DependencyAction, DependencyActionSchema, type DependencyCheck, DependencyCheckSchema, type DependencyStatus, DependencyStatusSchema, ENTRY_ID_REGEX, EXPORT_FORMAT_VERSION, type EchoItem, EchoItemSchema, type EdgePausePoint, EdgePausePointBaseSchema, EdgePausePointSchema, type EnumEntry, EnumEntrySchema, type EnumRegistry, type EnumRegistryCategory, EnumRegistryCategorySchema, type EnumRegistryRepo, EnumRegistrySchema, type EnumRegistryUpdate, EnumRegistryUpdateSchema, type ExportBundle, ExportBundleSchema, ForbiddenError, HistoryActionSchema, type HistoryEntry, HistoryEntrySchema, type ImportApplyRequest, ImportApplyRequestSchema, type ImportApplyResponse, ImportApplyResponseSchema, type ImportDecision, ImportDecisionSchema, type ImportPlanRequest, ImportPlanRequestSchema, type ImportPlanResponse, ImportPlanResponseSchema, type LoginInput, LoginSchema, type ModelAlias, type ModelAliasCreate, ModelAliasCreateSchema, type ModelAliasPayload, ModelAliasPayloadSchema, type ModelAliasRepo, ModelAliasSchema, ModelAliasShapeSchema, type ModelAliasUpdate, ModelAliasUpdateSchema, type ModelAliasWithRefCount, ModelAliasWithRefCountSchema, NODE_ID_PATTERN, NODE_PRESET_CODE_PATTERN, NODE_STATUSES, type NodeContentFields, type NodeInfo, NodeInfoSchema, type NodeLibrary, type NodeLibraryRepo, NodeLibrarySchema, type NodeLibraryUpsert, NodeLibraryUpsertSchema, type NodePreset, type NodePresetCopy, NodePresetCopySchema, type NodePresetCreate, NodePresetCreateSchema, type NodePresetListFilter, type NodePresetRepo, NodePresetSchema, NodePresetShapeSchema, type NodePresetUpdate, NodePresetUpdateSchema, type NodeRecord, NodeRecordSchema, type NodeState, NodeStateSchema, NodeStatusSchema, NotFoundError, OBJECT_ID_HEX, type OmitId, PAUSE_POINT_TYPES, type PasswordChange, PasswordChangeSchema, PausePointTypeSchema, type PauseRequest, PauseRequestSchema, type Project, type ProjectCreate, ProjectCreateSchema, type ProjectRepo, ProjectSchema, type ProjectStatus, ProjectStatusSchema, type ProjectUpdate, ProjectUpdateSchema, type PruneResult, REFERENCE_LIMITS, type ReferenceDoc, type Repo, type ResumeRequest, ResumeRequestSchema, type ReviewSummary, ReviewSummarySchema, SIMING_CODE_REGEX, SIMING_CONFIG_ENV_KEYS, SIMING_CONFIG_KEYS, SKILL_MAIN_DOC, type SimingClient, type SimingConfig, type SimingConfigKey, SimingConfigSchema, SimingLogLevelSchema, type Skill, type SkillCopy, SkillCopySchema, type SkillCreate, SkillCreateSchema, type SkillPayload, SkillPayloadSchema, type SkillRepo, SkillSchema, type SkillScope, SkillScopeSchema, SkillShapeSchema, type SkillUpdate, SkillUpdateSchema, type SourcePreset, SourcePresetSchema, TASK_PHASES, TASK_STATUSES, TASK_TYPES, TEMPLATE_CODE_MAX_LENGTH, TEMPLATE_CODE_REGEX, type Task, type TaskBatchAck, TaskBatchAckSchema, type TaskBatchEntry, TaskBatchEntrySchema, type TaskBatchFailure, TaskBatchFailureSchema, type TaskContext, TaskContextSchema, type TaskCreateInput, TaskCreateInputSchema, type TaskDocContent, TaskDocContentSchema, type TaskPatch, TaskPhaseSchema, type TaskProgress, type TaskProgressPublic, TaskProgressPublicSchema, TaskProgressSchema, type TaskPublic, TaskPublicSchema, type TaskRepo, TaskSchema, TaskStatusSchema, type TaskSummary, TaskSummarySchema, type TaskType, type TemplateCandidate, TemplateCandidateSchema, TemplateCodeFieldSchema, type TemplateContentChanges, type TemplateContentDiff, type TemplateContentSource, type TemplatePayload, TemplatePayloadSchema, type TemplateTransferDeps, UnauthorizedError, type UpgradeAction, UpgradeActionSchema, type UpgradeApplyOutcome, type UpgradeApplyRequest, UpgradeApplyRequestSchema, type UpgradeApplyResultItem, type UpgradeDecision, type UpgradeDecisionInput, UpgradeDecisionSchema, type UpgradeNodeStatus, UpgradeNodeStatusSchema, type UpgradePlanItem, type UpgradePlanResult, VERSION, ValidationError, WRITE_ACK_ENTRY_KINDS, type WithId, type WriteAck, type WriteAckEntryKind, WriteAckEntryKindSchema, WriteAckSchema, advanceTask, applyImport, applyUpgradeDecisions, approveTask, assertBoundSkillsCompatible, assertModelAliasExists, assertReferenceAggregateLimit, assertReferencesDeletable, assertUniqueNodeIds, buildImportPlan, buildTemplateCode, buildUpgradePlan, bumpPatch, bumpPatchOrPassthrough, cancelTask, canonicalizeReferencePath, checkTermination, composeExportBundle, computeNodeContentHash, computeUpgradeStatus, createAgentRepo, createAuthAccountRepo, createAuthSessionRepo, createAuthTokenRepo, createDagTemplateRepo, createEnumRegistryRepo, createModelAliasRepo, createMongoClient, createNodeLibraryRepo, createNodePresetRepo, createProjectRepo, createReferencesSchema, createRepo, createSkillRepo, createTaskRepo, decisionKey, diffTemplateContent, enabledNeFalse, escapeRegExpLiteral, excerpt, findDuplicateNodeIds, findNextEdge, findTemplateByName, generateEntryId, generateProjectKey, generateSessionId, generateToken, hasProjectDefault, hashPassword, hashToken, isLegalTemplateCode, mkHistory, normalizeNameToTemplateCode, parseAuthEnabledEnvValue, pauseTask, ping, pruneInstance, renderPrompt, resumeTask, sumReferenceContentChars, taskProgress, toNodeInfo, toTaskPublic, tokenTypeFromValue, trackMatchSet, verifyPassword, withTransaction };
|
|
4087
|
+
export { AGENT_MAIN_DOC, ARTIFACT_TYPES, AUTH_COLLECTIONS, type AdvanceDeps, type AdvanceInput, type AdvanceRequest, AdvanceRequestSchema, type AdvanceResponse, AdvanceResponseSchema, type Agent, type AgentCopy, AgentCopySchema, type AgentCreate, AgentCreateSchema, type AgentFunction, AgentFunctionSchema, type AgentPayload, AgentPayloadSchema, type AgentRepo, AgentSchema, type AgentScope, AgentScopeSchema, AgentShapeSchema, type AgentUpdate, AgentUpdateSchema, AppError, type AppErrorOptions, type ApproveRequest, ApproveRequestSchema, type ApproveResponse, ApproveResponseSchema, type ArchNote, ArchNoteSchema, type Artifact, ArtifactSchema, type ArtifactType, type AssetListOpts, type AssetSetEnabled, AssetSetEnabledSchema, type AuthAccount, type AuthAccountCreate, AuthAccountCreateSchema, AuthAccountSchema, type AuthSession, type AuthStatus, AuthStatusSchema, type AuthToken, type AuthTokenGenResponse, AuthTokenGenResponseSchema, type AuthTokenKind, AuthTokenSchema, type AuthTokenStatus, AuthTokenStatusSchema, type AuthTokenType, AuthTokenTypeSchema, type AuthWhoami, AuthWhoamiSchema, BIZ_CODE_MESSAGES, BadRequestError, type BizCode, CONTEXT_VIEWS, type CancelRequest, CancelRequestSchema, type CheckItem, CheckItemSchema, type Composition, type CompositionEdge, CompositionEdgeSchema, CompositionSchema, type Confirmation, ConfirmationSchema, ConflictError, type ContextView, ContextViewSchema, type ConvertGroupOutcome, type CreateTaskResponse, CreateTaskResponseSchema, DAG_PHASES, DAG_TRACKS, DEFAULT_PROJECT_KEY, type DagEdge, DagEdgeSchema, type DagInstance, type DagInstanceNode, DagInstanceNodeSchema, DagInstanceSchema, type DagNode, DagNodePhaseSchema, DagNodeSchema, DagNodeTrackSchema, type DagTemplate, type DagTemplateCopy, DagTemplateCopySchema, type DagTemplateCreate, DagTemplateCreateSchema, type DagTemplateRepo, DagTemplateSchema, type DagTemplateUpdate, DagTemplateUpdateSchema, type Decision, DecisionSchema, type DependencyAction, DependencyActionSchema, type DependencyCheck, DependencyCheckSchema, type DependencyStatus, DependencyStatusSchema, ENTRY_ID_REGEX, EXPORT_FORMAT_VERSION, type EchoItem, EchoItemSchema, type EdgePausePoint, EdgePausePointBaseSchema, EdgePausePointSchema, type EnumEntry, EnumEntrySchema, type EnumRegistry, type EnumRegistryCategory, EnumRegistryCategorySchema, type EnumRegistryRepo, EnumRegistrySchema, type EnumRegistryUpdate, EnumRegistryUpdateSchema, type ExportBundle, ExportBundleSchema, ForbiddenError, HistoryActionSchema, type HistoryEntry, HistoryEntrySchema, ISSUE_ACTIVE_STATUSES, ISSUE_CONVERT_MODES, ISSUE_SOURCES, ISSUE_STATUSES, type ImportApplyRequest, ImportApplyRequestSchema, type ImportApplyResponse, ImportApplyResponseSchema, type ImportDecision, ImportDecisionSchema, type ImportPlanRequest, ImportPlanRequestSchema, type ImportPlanResponse, ImportPlanResponseSchema, type Issue, type IssueConvertMode, IssueConvertModeSchema, type IssueCreate, IssueCreateSchema, type IssueHistoryEntry, IssueHistoryEntrySchema, type IssueListFilter, type IssueProgress, IssueProgressSchema, type IssueRepo, IssueSchema, type IssueSource, IssueSourceSchema, type IssueStatus, type IssueStatusChange, IssueStatusSchema, type IssueTaskSnapshot, type IssueUpdate, IssueUpdateSchema, type IssueWithProgress, type LoginInput, LoginSchema, type ModelAlias, type ModelAliasCreate, ModelAliasCreateSchema, type ModelAliasPayload, ModelAliasPayloadSchema, type ModelAliasRepo, ModelAliasSchema, ModelAliasShapeSchema, type ModelAliasUpdate, ModelAliasUpdateSchema, type ModelAliasWithRefCount, ModelAliasWithRefCountSchema, NODE_ID_PATTERN, NODE_PRESET_CODE_PATTERN, NODE_STATUSES, type NodeContentFields, type NodeInfo, NodeInfoSchema, type NodeLibrary, type NodeLibraryRepo, NodeLibrarySchema, type NodeLibraryUpsert, NodeLibraryUpsertSchema, type NodePreset, type NodePresetCopy, NodePresetCopySchema, type NodePresetCreate, NodePresetCreateSchema, type NodePresetListFilter, type NodePresetRepo, NodePresetSchema, NodePresetShapeSchema, type NodePresetUpdate, NodePresetUpdateSchema, type NodeRecord, NodeRecordSchema, type NodeState, NodeStateSchema, NodeStatusSchema, NotFoundError, OBJECT_ID_HEX, type OmitId, PAUSE_POINT_TYPES, type PasswordChange, PasswordChangeSchema, PausePointTypeSchema, type PauseRequest, PauseRequestSchema, type Project, type ProjectCreate, ProjectCreateSchema, type ProjectRepo, ProjectSchema, type ProjectStatus, ProjectStatusSchema, type ProjectUpdate, ProjectUpdateSchema, type PruneResult, REFERENCE_LIMITS, type ReferenceDoc, type ReopenInput, type ReopenRequest, ReopenRequestSchema, type ReopenResponse, type Repo, type ResumeRequest, ResumeRequestSchema, type ReviewSummary, ReviewSummarySchema, SIMING_CODE_REGEX, SIMING_CONFIG_ENV_KEYS, SIMING_CONFIG_KEYS, SKILL_MAIN_DOC, type SimingClient, type SimingConfig, type SimingConfigKey, SimingConfigSchema, SimingLogLevelSchema, type Skill, type SkillCopy, SkillCopySchema, type SkillCreate, SkillCreateSchema, type SkillPayload, SkillPayloadSchema, type SkillRepo, SkillSchema, type SkillScope, SkillScopeSchema, SkillShapeSchema, type SkillUpdate, SkillUpdateSchema, type SourcePreset, SourcePresetSchema, TASK_PHASES, TASK_STATUSES, TASK_TYPES, TEMPLATE_CODE_MAX_LENGTH, TEMPLATE_CODE_REGEX, type Task, type TaskBatchAck, TaskBatchAckSchema, type TaskBatchEntry, TaskBatchEntrySchema, type TaskBatchFailure, TaskBatchFailureSchema, type TaskContext, TaskContextSchema, type TaskCreateInput, TaskCreateInputSchema, type TaskDocContent, TaskDocContentSchema, type TaskIssueView, type TaskLink, TaskLinkSchema, type TaskPatch, TaskPhaseSchema, type TaskProgress, type TaskProgressPublic, TaskProgressPublicSchema, TaskProgressSchema, type TaskPublic, TaskPublicSchema, type TaskRepo, TaskSchema, TaskStatusSchema, type TaskSummary, TaskSummarySchema, type TaskType, type TemplateCandidate, TemplateCandidateSchema, TemplateCodeFieldSchema, type TemplateContentChanges, type TemplateContentDiff, type TemplateContentSource, type TemplatePayload, TemplatePayloadSchema, type TemplateTransferDeps, UnauthorizedError, type UpgradeAction, UpgradeActionSchema, type UpgradeApplyOutcome, type UpgradeApplyRequest, UpgradeApplyRequestSchema, type UpgradeApplyResultItem, type UpgradeDecision, type UpgradeDecisionInput, UpgradeDecisionSchema, type UpgradeNodeStatus, UpgradeNodeStatusSchema, type UpgradePlanItem, type UpgradePlanResult, VERSION, ValidationError, WRITE_ACK_ENTRY_KINDS, type WithId, type WriteAck, type WriteAckEntryKind, WriteAckEntryKindSchema, WriteAckSchema, advanceTask, applyImport, applyUpgradeDecisions, approveTask, assertBoundSkillsCompatible, assertModelAliasExists, assertReferenceAggregateLimit, assertReferencesDeletable, assertUniqueNodeIds, buildImportPlan, buildTemplateCode, buildUpgradePlan, bumpPatch, bumpPatchOrPassthrough, cancelTask, canonicalizeReferencePath, checkTermination, composeExportBundle, computeNodeContentHash, computeUpgradeStatus, createAgentRepo, createAuthAccountRepo, createAuthSessionRepo, createAuthTokenRepo, createDagTemplateRepo, createEnumRegistryRepo, createIssueRepo, createModelAliasRepo, createMongoClient, createNodeLibraryRepo, createNodePresetRepo, createProjectRepo, createReferencesSchema, createRepo, createSkillRepo, createTaskRepo, decisionKey, derivePreTerminalState, diffTemplateContent, enabledNeFalse, escapeRegExpLiteral, excerpt, findDuplicateNodeIds, findNextEdge, findTemplateByName, generateEntryId, generateProjectKey, generateSessionId, generateToken, hasProjectDefault, hashPassword, hashToken, isLegalTemplateCode, mkHistory, normalizeNameToTemplateCode, parseAuthEnabledEnvValue, pauseTask, ping, pruneInstance, renderPrompt, reopenTask, resumeTask, sumReferenceContentChars, taskProgress, toNodeInfo, toTaskPublic, tokenTypeFromValue, trackMatchSet, verifyPassword, withTransaction };
|