Files
hose-use/.agents/rules/tenant-and-credential.md
yunyingk 4b75132b43 feat(agents): add .agents modular rules with manual trigger (keep .agents, omit .agent) (#80)
- Match seal-use repository layout with .agents/rules and skills.json
- Ensure no .agent singular directory or symlink exists
- Set trigger: 'manual' on all rules to prevent automatic prompt injection
- Track .agents/ in git by updating .gitignore
2026-09-17 10:20:10 +08:00

1.6 KiB
Raw Permalink Blame History

description, globs, trigger
description globs trigger
多租户凭据管理、合思免密/协助链接导入与个人单据检索最佳实践 src/{domains,core,cli}/**/*.{ts,md} manual

租户凭据与业务操作最佳实践

  1. 同等凭据原则(Equal Credential Scope Principle):

    • 合思第三方免密/协助链接 (https://.../web/thirdparty.html?...) 与在合思管理员后台抓取的 cURL 在凭据范围上等价,均携带完整的 Web 前台会话权限(accessToken / ekbCorpId)。
    • 面对协助链接或 cURL 时,可通过 corps add-link <url> 直接导入或更新租户。
  2. 协助链接导入与覆盖(add-link):

    • 导入协助链接时,系统会自动预解析 ekbCorpId 与 JWT Session。
    • 若本地已存在该企业配置,必须显式追加 --overwrite 参数(如 hose-use corps add-link <url> --overwrite --yes)。
  3. 单据查询的业务分流与避坑:

    • 查“我的单据” / 当前员工发起的单据:
      • 优先使用 hose-use task submitted 或 hose-use bill list --mine;
      • 响应速度为秒级,包含完整表单明细、提交时间、审批状态与金额。
    • 查“待办任务”:
      • 使用 hose-use task todo,支持分页与节点状态查看。
    • 全局发票大盘(bill list):
      • 底层调用全量账表接口 /api/v2/invoice/search;在像转转这样的大企业或发票量级巨大的租户中耗时较长,避免在无过滤条件时频繁调用;遇超时应引导使用轻量化的 task submitted / bill list --mine。