feat: add local approval submission drafts
This commit is contained in:
@@ -19,12 +19,14 @@ test("legacy updater post-install syncs the complete bundled Skill", () => {
|
||||
mkdirSync(target, { recursive: true });
|
||||
writeFileSync(join(bundled, "SKILL.md"), "new skill");
|
||||
writeFileSync(join(bundled, "references", "create-approval.md"), "create rules");
|
||||
writeFileSync(join(bundled, "references", "local-drafts.md"), "draft rules");
|
||||
writeFileSync(join(target, "SKILL.md"), "old skill");
|
||||
|
||||
syncBundledSkillForLegacyUpdate(statePath, bundled);
|
||||
|
||||
assert.equal(readFileSync(join(target, "SKILL.md"), "utf8"), "new skill");
|
||||
assert.equal(readFileSync(join(target, "references", "create-approval.md"), "utf8"), "create rules");
|
||||
assert.equal(readFileSync(join(target, "references", "local-drafts.md"), "utf8"), "draft rules");
|
||||
assert.deepEqual(readdirSync(join(root, "client", "skill")), ["dingtalk-approval"]);
|
||||
});
|
||||
|
||||
@@ -245,6 +247,7 @@ test("MCP approval_login returns both portable text and a standard resource link
|
||||
const instructions = client.getInstructions() ?? "";
|
||||
assert.match(instructions, /登录链接过期.*approval_login.*绝不.*重新安装/);
|
||||
assert.match(instructions, /审批引用.*调用容量.*内部分批.*不得向用户解释/);
|
||||
assert.match(instructions, /提单草稿仅可保存在 Agent 所在机器.*不得上传网关.*实时模板 Schema/s);
|
||||
assert.doesNotMatch(instructions, /最多.*20|selectionId|approvalId|targetId/);
|
||||
const history = tools.tools.find((tool) => tool.name === "approval_list_history")!;
|
||||
assert.equal((history.inputSchema as any).properties.startDate.default, "");
|
||||
|
||||
Reference in New Issue
Block a user