Prepare v0.10.36 release changes
This commit is contained in:
1 parent
37f5567ab5
commit
e52e145eba
14 files changed
+218
-197
No files matched your search
+18
-12
@@ -1882,7 +1882,8 @@ export const sealTools = [
|
||||
limit?: number;
|
||||
maxScan?: number;
|
||||
includeBridge?: boolean;
|
||||
}
|
||||
},
|
||||
context: ToolContext
|
||||
) => {
|
||||
const query = params.sn ?? params.query;
|
||||
if (!query) throw new Error("query or sn is required");
|
||||
@@ -1899,6 +1900,11 @@ export const sealTools = [
|
||||
);
|
||||
const fields = parseFieldPaths(params.fields);
|
||||
const projected = records.map((record) => pickApprovalRunCandidate(record, fields));
|
||||
const nextRuleVersionNumber = records.find((record) => record.ruleSetVersionNumber !== undefined)?.ruleSetVersionNumber;
|
||||
const nextRuleVersionSelector = nextRuleVersionNumber === undefined ? "latest" : String(nextRuleVersionNumber);
|
||||
const nextRuleVersionPayload = nextRuleVersionNumber === undefined
|
||||
? '"latestRuleVersion":true'
|
||||
: `"ruleVersionNumber":${nextRuleVersionNumber}`;
|
||||
|
||||
return {
|
||||
query,
|
||||
@@ -1910,10 +1916,10 @@ export const sealTools = [
|
||||
matched: projected.length,
|
||||
records: projected,
|
||||
next: {
|
||||
getSummary: "seal-home approval-runs get <recordId> --summary",
|
||||
getRuleVersion: "seal-home rules version <ruleSetVersionNumber>",
|
||||
searchRuleVersion: "seal-home tool seal_approval_search --json '{\"keywords\":[\"关键词\"],\"areas\":[\"rules\"],\"ruleVersionScope\":\"version\",\"ruleVersionNumber\":14}'",
|
||||
getVersionContext: "seal-home tool seal_approval_context_get --json '{\"ruleVersionNumber\":14}'"
|
||||
getSummary: `seal-use approval-runs get <recordId> --summary --corp ${context.corp.id}`,
|
||||
getRuleVersion: `seal-use rules version ${nextRuleVersionSelector} --corp ${context.corp.id}`,
|
||||
searchRuleVersion: `seal-use tool seal_approval_search --corp ${context.corp.id} --json '{"keywords":["关键词"],"areas":["rules"],"ruleVersionScope":"version",${nextRuleVersionPayload}}'`,
|
||||
getVersionContext: `seal-use tool seal_approval_context_get --corp ${context.corp.id} --json '{${nextRuleVersionPayload}}'`
|
||||
},
|
||||
...(params.includeBridge ? { bridge: summarizeRunBridge(records) } : {})
|
||||
};
|
||||
@@ -2035,8 +2041,8 @@ export const sealTools = [
|
||||
count: batches.length,
|
||||
batches: batches.map(summarizeSimulationBatch),
|
||||
next: {
|
||||
getBatch: "seal-home simulation get <batchId>",
|
||||
getRecords: "seal-home simulation batch-records <batchId>"
|
||||
getBatch: "seal-use simulation get <batchId>",
|
||||
getRecords: "seal-use simulation batch-records <batchId>"
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -2052,7 +2058,7 @@ export const sealTools = [
|
||||
return {
|
||||
batch,
|
||||
next: {
|
||||
getRecords: "seal-home simulation batch-records <batchId>"
|
||||
getRecords: "seal-use simulation batch-records <batchId>"
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -2100,7 +2106,7 @@ export const sealTools = [
|
||||
updatedAt: template.updatedAt
|
||||
})),
|
||||
next: {
|
||||
createBatch: "seal-home simulation create --mode hosecloud --flow-ids ..."
|
||||
createBatch: "seal-use simulation create --mode hosecloud --flow-ids ..."
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -2136,7 +2142,7 @@ export const sealTools = [
|
||||
return {
|
||||
materialPackage,
|
||||
next: {
|
||||
createBatch: `seal-home simulation create --mode material_pack --package-ids ${materialPackage.id} --schema-config schema.json`
|
||||
createBatch: `seal-use simulation create --mode material_pack --package-ids ${materialPackage.id} --schema-config schema.json`
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -2256,12 +2262,12 @@ export const sealTools = [
|
||||
status,
|
||||
elapsedMs: Date.now() - startedAt,
|
||||
next: {
|
||||
getRecords: `seal-home simulation batch-records ${params.batchId}`
|
||||
getRecords: `seal-use simulation batch-records ${params.batchId}`
|
||||
}
|
||||
};
|
||||
}
|
||||
if (Date.now() - startedAt >= timeoutMs) {
|
||||
throw new Error(`等待模拟批次 ${params.batchId} 超时(已等待 ${(Date.now() - startedAt) / 1000}s)。可稍后执行 seal-home simulation get ${params.batchId} 查看状态`);
|
||||
throw new Error(`等待模拟批次 ${params.batchId} 超时(已等待 ${(Date.now() - startedAt) / 1000}s)。可稍后执行 seal-use simulation get ${params.batchId} 查看状态`);
|
||||
}
|
||||
await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user