feat: 完善工作流工具链与大结果保护
- 工作流节点描述增加服务端托管黑名单,仅代码节点保留自定义 desc - 工作流保存新增 --in-place,并改进版本冲突提示 - platform records 新增 --page 分页,--all 强制走 ndjson 文件流 - platform schema 展示 ownerId/submitterId 等系统字段 - 更新 Agent Skill 的代码节点 agent use 标记规范 - 补充对应测试与文档
This commit is contained in:
1 parent
37643da254
commit
7423e166a1
10 files changed
+123
-20
No files matched your search
@@ -54,11 +54,21 @@ export async function handleRecords(parsed: CliParsedArgs, runtime: CliRuntime):
|
||||
const isAll = booleanOption(parsed.options, ["all", "a"], false);
|
||||
const groupBy = stringOption(parsed.options, ["group-by", "groupBy"]);
|
||||
const fetchAll = isAll || Boolean(sumOption || isProfileStats);
|
||||
const start = numberOption(parsed.options, ["start", "offset"], 0);
|
||||
const count = numberOption(parsed.options, ["count", "limit"], 20);
|
||||
const pageSize = numberOption(parsed.options, ["page-size", "pageSize"], 500);
|
||||
const count = numberOption(parsed.options, ["count", "limit"], 20) ?? 20;
|
||||
const page = Math.max(1, numberOption(parsed.options, ["page"], 1) ?? 1);
|
||||
const start = numberOption(parsed.options, ["start", "offset"], (page - 1) * count) ?? 0;
|
||||
const pageSize = numberOption(parsed.options, ["page-size", "pageSize"], 500) ?? 500;
|
||||
const fields = splitFields(stringOption(parsed.options, ["fields", "select"]));
|
||||
|
||||
// 全量 JSON/表格很容易把几十万条记录倒进 stdout 或内存;全量导出必须显式走文件流。
|
||||
if (isAll && !isProfileStats && !sumOption) {
|
||||
if (!isStream || !runtime.outputOptions?.outputFile) {
|
||||
throw usageError(
|
||||
"--all 不再直接返回全量 JSON/表格。请使用 --page/--count 分页查询,或使用 --ndjson --output-file <path> 流式导出;大范围检索建议交给脚本处理。"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 1. 高性能流式下发模式 (--ndjson / --stream,内存开销 O(pageSize),专为海量数据外部脚本管道设计)
|
||||
if (isStream) {
|
||||
let streamCount = 0;
|
||||
|
||||
Reference in new issue
Block a user