Files
hose-use/specs/hose-open-api/openapi.yaml
T
gitea 362acfba58 feat(cli): 分离 hose-aipro 独立命令体系并升级至 v0.9.0
1. 架构对称性与声明式注册表抽取:
   - 新增 src/cli/aipro-registry.ts,声明式定义 AIPRO_COMMAND_REGISTRY 及其别名映射与 mutating 突变检查
   - 重构 src/aipro-cli.ts,移除过程式 switch-case 分发,改为查表式声明分发,与 hose-use 的 CLI_COMMAND_REGISTRY 保持 100% 对称
   - 在 src/cli/registry.ts 统一重导出 aipro-registry,巩固其作为顶层声明注册表的单一事实源地位
   - 增加 aipro-cli 测试用例,强制校验 COMMAND_METADATA["hose-aipro"] 与声明式注册表双向一致性

2. 双 Skill 独立打包与内嵌部署:
   - 注册两个独立技能:skills/hose-use 与 skills/hose-aipro,互相关联引用
   - src/packaging/embedded-skill.ts 增加双 Skill 编译期嵌入与 installSkillFiles 全量同步
   - hose-use / hose-aipro 下的 skill status/dump/install 完全对齐

3. 守护服务交叉治理:
   - src/cli/service.ts 支持 ServiceTargetName ("hose-use" | "hose-aipro"),默认端口 8888 与 8889
   - 支持 hose-use aipro <start|stop|...> 与 hose-aipro hose-use <start|stop|...> 双向服务纳管
   - 误触非本领域业务命令时提供友好互导拦截

4. 审批领域数据层防御加固:
   - 迁移 004:approval_runs 增加 short_id 唯一约束
   - 增加 allocateUniqueShortId 冲突重试,多步写操作纳入事务

5. 版本升级至 v0.9.0:
   - package.json、README.md、specs、.zcode-plugin 及两套 Skill 同步更新至 0.9.0
   - bump-version 脚本适配多 Skill 自动递增
2026-11-03 19:16:12 +08:00

55 lines
1.7 KiB
YAML

openapi: 3.1.0
info:
title: hose-use API & MCP Tools Specification
version: 0.9.0
description: >-
Unified Enterprise SaaS API, CLI, and MCP Specification for Ekuaibao (合思/易快报), EASO, and Piper Workflows.
servers:
- url: http://localhost:3000
description: Local hose-use CLI / MCP Runtime Gateway
tags:
- name: Auth & SSO
description: 统一认证、多账号管理与 30 天 Token 自动无感续杯
- name: Corps & Tenancy
description: 多企业租户管理与工作空间切换
- name: Platforms
description: 自建应用检索与实例枚举
- name: Workflows
description: 跨自建应用工作流聚合检索、DSL 图谱与启停
- name: Bills & Documents
description: 费控单据、报销借款单、发票明细与 DataLink 实体字典
- name: Probe & Diagnostics
description: 会话有效性与 EASO 鉴权连通性诊断
paths:
/api/auth/login:
$ref: ./paths/auth.yaml#/login
/api/auth/status:
$ref: ./paths/auth.yaml#/status
/api/auth/refresh:
$ref: ./paths/auth.yaml#/refresh
/api/corps:
$ref: ./paths/corps.yaml#/list
/api/corps/switch:
$ref: ./paths/corps.yaml#/switch
/api/platforms:
$ref: ./paths/platform.yaml#/list
/api/workflows:
$ref: ./paths/workflow.yaml#/list
/api/workflows/find:
$ref: ./paths/workflow.yaml#/find
/api/workflows/{pipelineId}:
$ref: ./paths/workflow.yaml#/detail
/api/workflows/{pipelineId}/toggle:
$ref: ./paths/workflow.yaml#/toggle
/api/bills:
$ref: ./paths/bill.yaml#/list
/api/bills/{code}:
$ref: ./paths/bill.yaml#/get
/api/bills/schema:
$ref: ./paths/bill.yaml#/schema
/api/probe:
$ref: ./paths/probe.yaml#/probe
components:
schemas:
$ref: ./components/schemas/index.yaml