gitea
13c47d7569
feat: 补齐 Piper 集群地址环境变量并明确功能授权边界
...
e562ae9 移除旧 HOSE_GRAY_GATEWAY_URL 逃生口后,两个 Piper 域名一直
硬编码,且 webhook.ts 把同一域名又写了一遍,改常量不会跟着变。
- 新增 core/http/piper-endpoints.ts 收口常量与 resolvePiperBaseUrl(),
运行时读取 HOSE_PIPER_BASE_URL / HOSE_PIPER_TEST_BASE_URL;
script-engine-client.ts 保留历史导出并改用运行时解析。
- 工作流引擎客户端、Webhook 触发 URL、灰度节点开通三处统一走
resolvePiperBaseUrl,不再各写一份域名。
- EASO 换票默认地址复用 EKB_BASE_URL,消除第三份硬编码。
- .env.example 补齐 Piper、AI PRO 凭证与签发方、管理员密码变量;
README 新增环境变量小节;README.transport.md 同步。
纠正上一轮的误判:hose-use 是免费功能,凭证只作用于 hose-aipro,
「hose-use 写命令未受凭证约束」不是安全缺口。该边界已写入
README、hose-aipro Skill 与项目记忆,不再列为待办。
校验:bun test 1103 pass / 0 fail,bun run check、check:readme 通过。
2026-11-05 17:13:20 +08:00
gitea
8375445bcb
fix: 灰度节点开通加生产硬拦截并拆薄传输层
...
三处 P0:
- 生产企业零拦截:handleGrantNodes 用 isCorpProd 直接拒绝,无
--force 逃生口,且拦截发生在 --yes 确认之前;补 2 条单测。
- dry-run 预览失真:payload 改由编排层显式构造,固定附带开关
(recalculate-the-approval-flow / ui-notification / start) 提为
GRANT_ATTACHED_OPTIONS,dry-run 与成功输出都会展示。刻意不改
真实 payload 语义,避免破坏 Piper 历史接口契约。
- api.ts 越权:只留换票、POST、响应校验;业务码判定与
saved/skipped 映射移到 catalog.ts 的 mapGrantResult。新增
assertNoAuthFailure 复用 EASO 响应体系,401/403 统一转成
AuthenticationError(CLI 退出码 11)。
P1:修 gray-nodes-catalog 同名「数据映射」(mapping/dmn) 静默覆盖,
normalizeGrayNodes 遇歧义抛 ValidationError;节点去重;删 node.ts
死常量;Piper 测试域名常量收敛到 core/http;修 filterKw 的
args[1] 越界;归一化逻辑收敛为一份;同步文档与测试名。
校验:bun test 1099 pass / 0 fail,bun run check、check:readme 通过。
本次不打 tag、不触发 Release;Skill 内嵌变更等 0.9.3 发版生效。
2026-11-05 16:46:48 +08:00
gitea
7a19fa8337
feat(workflow): 保存期接口权限预检与 choose 表达式序列化开关
...
## 一、保存期「接口 → 应用」权限预检
工作流 HTTP 节点调用某些开放接口前,企业必须先开通对应应用,否则运行时
返回 403「未开通功能,无权访问」,而该报文字段里完全看不出缺哪个应用。
真实案例:某客户「单据审批」应用未开通,流程跑到第 9 步才被网关拦下,
排查成本极高。
本次在保存/静态分析阶段按接口路径反推所需应用:
- 新增 `analysis/openapi-app-requirements.ts`:接口路径 → 所需应用的映射表
(首条 `/api/openapi/v1/backlog/data/` + POST/PUT/PATCH → 「单据审批」
`TICKET_AUDIT_switch`、productId `o0hMBw000000g0`),配套
`extractStaticUrlPath`(去域名、截断到第一个 `@{`、去 query/hash)与
`matchAppRequirement`。
- `analysis/analyzer.ts` 6.3 节重构:以路径反查为主,节点显式声明的
`powerCode`(`params` / URL query)作为交叉印证;两者指向同一权限时走
路径规则,以便报文带上接口名、应用名、productId 与判定依据路径。显式
声明了其它 `powerCode` 时以声明为准,避免两套规则打架。
- 新增保存期钩子 `preflightNodeAppRequirements` / `renderAppRequirementAlerts`
(`cli/commands/workflow/shared.ts`),接入 `node add` / `node edit`:
只检查本次写入的 HTTP 节点,未开通则输出 ⛔ 段并在 JSON 模式落到
`appRequirementAlerts`;读不到企业应用清单时降级为 ⚠️ ,不阻断写入。
- `domains/store/tools.ts` 抽出 `isClientGoodOpened` 与
`fetchOpenedPowerCodes`,`workflow analyze` 改为复用,移除内联汇总逻辑
(`isClientGoodOpened` 仍从 `analyze.ts` 再导出以保持既有契约)。
判定边界(刻意收紧,宁可漏报不误报):只对 HTTP 节点生效;URL 若整体由
上游节点变量拼接则完全不判断;无法静态读出接口路径时不做任何猜测性告警。
## 二、choose 表达式序列化开关
合思前端序列化模板字符串时多写了一个右花括号,产出 `...}')}` 形态;
后端 Jackson 默认未开启 `FAIL_ON_TRAILING_TOKENS`,尾随 `}` 被静默忽略,
因此该形态在引擎侧可正常执行。
- 新增 `models/choose-serialization.ts`:`frontend` / `pure` 双模式序列化,
以及 `parseChoosePayloadLoose`(逐个剥离尾部多余 `}` 再解析)。
- 全局配置新增 `chooseSerialization`,默认 `frontend`(与设计器字节一致),
可用 `--choose-serialization` 单次覆盖;读取侧永远双形态兼容。
- 修复 `branch/explain.ts` 的 `parseChooseTag` 在 `}}` 形态下静默返回 null
的缺陷,该缺陷会导致真实数据上的分支解释与字段引用分析失效。
## 测试
新增 24 个用例,覆盖:
- `choose-serialization.test.ts`:双模式序列化与宽松解析
- `openapi-app-requirements.test.ts`:静态路径提取、路径命中、方法不符跳过、
纯变量 URL 跳过、非 HTTP 节点不判断、未开通/已开通/无清单三种诊断
- `shared.app-preflight.test.ts`:预检只处理 HTTP 节点、动态 URL 跳过、
读不到清单降级不阻断、告警分级渲染
`bun test` 1068 pass / 0 fail;`bun run check` 零错误;`check:readme` 通过。
## 实机核对(全部只读,未触碰任何生产流程配置)
- 真实流程的两个 HTTP 节点均命中「单据审批」;同时确认设计器确实会把
`powerCode` 写入节点 `params`,因此显式声明与路径反推两条规则都需要保留。
- 已开通该应用的企业 → 无诊断;未开通的企业 → 精确打出硬门禁并指向具体
节点 key 与判定依据路径。
2026-11-04 16:43:34 +08:00
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
gitea
95af2177e5
feat(assist-platform): 固化钉钉扫码登录闭环并优化多集群与网关错误解析
...
- 支持一行命令自动发起钉钉交互式扫码登录 (hose-use assist-platform login [--qr])
- 集成 qrcode-terminal 在终端直接输出紧凑 ANSI 文本二维码
- 严格对齐 HoseCloud SSO 钉钉时间戳的 60 秒安全防重放倒计时
- 自动从重定向参数或 Token 换取 Unity 运营中心会话凭证并安全落盘
- 在 core/http/assist-platform-client 增加响应体 errorCode: 403 拦截,杜绝凭证过期被吞成空数据的静默失败
- 修复 assist-platform enter 多集群租户 (wx2/shanghai 等) baseUrl 硬编码为 app 的验票失败问题
- 修复 workflow nodes grant 网关回包双层嵌套 saved/skipped 数据解析问题
- 补全 core/http/sso-client 单元测试并确保全部 957 项测试通过
2026-11-02 14:58:20 +08:00
gitea
4e03c9bcd7
refactor: 将应用数据与工作流统一归入应用平台子模块
...
建立 applications 的应用模型和查询出口,保留基础及详情投影差异。
下沉 DataLink,将工作流模型、API、编排及执行上下文归回 workflow。
同步 CLI、SDK、生成脚本、测试和活跃文档引用,公开命令与 SDK 名称保持兼容。
验证:943 项测试、类型和版本检查通过;三份生成规范字节一致,README 审计通过。
2026-10-30 16:56:09 +08:00
gitea
3345ce9b39
docs: 补齐 README 审计发现的 17 个目录说明
...
按各目录实际职责补充源码入口、CLI 命令、认证缓存与 HTTP、工作流子模块说明。
同时补齐项目规则、产品参考、规范路径和历史审阅记录导航,保留已有文档与代码。
验证:README 审计 28 个必需目录全部通过,缺失 0;938 项测试、类型与版本检查通过。
新增文档本地链接全部有效,OpenAPI 打包内容不变。
2026-10-30 16:25:56 +08:00
gitea
55d31e27e6
fix: 表达工作流部分保存结果并校验认证重放
...
Piper 的 chooses 刷新与删除检查业务码,保留空成功响应。主保存成功后刷新失败抛出携带已保存版本的 WorkflowSavePartialError;统一 JSON 错误保留可选 EkbError.details。
workflow save 在部分成功时返回非零与恢复信息,--in-place 仍同步已保存版本;新增带写确认的 refresh-chooses,仅重试元数据刷新,不重发完整快照。主保存失败不改本地版本。
认证重放保留最终鉴权响应检查(含 HTTP 200 的错误头),最多重放一次,其他 HTTP 错误维持 Ky 语义。补充 SDK、CLI、恢复与重放回归,并更新文档。
验证:bun test 922 通过、0 失败;bun run check、git diff --check 通过。所有业务请求均为离线假接口。
2026-10-29 18:21:30 +08:00
gitea
a7974abb08
fix: address Codex PR review findings
2026-10-25 22:32:45 +08:00
gitea
aea30fbcd5
feat(workflow): 准确识别工作流延时执行与在途运行状态并补全节点字典
2026-10-21 17:21:35 +08:00
gitea
3597ec6694
fix: preserve assist session lifecycle and identity certainty
2026-10-21 16:04:26 +08:00
gitea
2ace4e2378
feat(assist): 支持协助身份与角色权限穿透呈现及高管防误用警示
...
- 实测澄清协助平台时长限制: 服务端 POST /api/assistPlatform/create 硬性单次上限为 24 小时 (1 天),超过直接报错 400,支持 --days/--hours 并在超限时清晰提示
- 协助直通会话生成及落盘时实时穿透解析组织架构: 提取人员姓名、工号、手机、所属部门、所配角色清单及核心系统权限
- 建立高管身份与特权角色风控评级体系 (analyzeStaffRoleRisk): 自动识别总监、主管理员、财务负责人、总经理等高危身份并输出安全风控警示框
- 将完整人员身份画像与风控元数据注入持久化企业配置 (enterprises/<corpId>.json)
- 在 SKILL.md 追加 Rule 13 及更新 assist-platform.md 说明文档
2026-10-21 11:39:00 +08:00
gitea
35552944d1
feat(assist-platform): adapt to live assist backend query and id dialect
...
- Support filterBy in corporation search for server-side name/id resolution
- Normalize corporation ID with leading dollar prefix for detail and ticket endpoints
- Include required query object in ticket search payloads
- Improve ticket status mapping for live numeric states
- Rebuild plugin mcp bundle
2026-10-21 10:44:27 +08:00
gitea
ed9fa979e0
feat(assist-platform): add assist platform automation and tenant onboarding
...
- Add SSO QR status poller and assist platform HTTP client
- Add assist-platform session store with 0600 secure permissions
- Implement domains/assist-platform (api, services, types) for corporation search, detail, tickets, staff query and passwordless token generation
- Implement cli/commands/assist-platform with aliases assist-center and ap
- Support seamless --save --switch --elevate pipeline to import tenant and extract persistent OpenAPI credentials
- Update embedded skill documentation, reference guide, and test suites
2026-10-21 10:33:27 +08:00
gitea
53689e89d0
fix(auth): renew cached subdomain tokens before bounded request replay
2026-10-20 17:57:41 +08:00
gitea
af1e11c018
feat(corps): 企业配置增加环境属性与生产安全保护机制
...
- Schema 扩展: CorpConfigSchema 增加 env ('prod' | 'test' | 'demo') 与 isTest 字段,未知企业保守兜底为 prod
- 智能初判与归一化: inferCorpEnvFromName 依据名称初判环境,normalizeCorpConfig 确保配置持久化时环境对齐
- CLI 视图升级: corps list 与 search 增加「环境」列 (🏭 正式 / 🧪 测试 / 🎪 演示),支持 --test/--prod/--env 筛选
- 环境打标与迁移: 新增 hose-use corps tag 命令,支持单个企业标记与 --migrate-all 批量显式升级持久化
- 生产安全阻断: workflow test 等敏感调试在正式生产环境 (prod) 阻断执行,需显式附加 --force 确认生产风险
- 上下文与探针增强: context、probe、corps current 全面输出企业环境属性
- 测试与文档补全: 覆盖 489 项全量测试并通过 tsc 类型检查
2026-10-16 12:30:08 +08:00
gitea
7ec369f77e
fix: stabilize auth identity, record operations, and workflow diagnostics
2026-10-15 14:54:10 +08:00
gitea
0c6a3ee660
feat(workflow,corps): add dynamic staff link switching and deep failed job inspection
2026-10-14 18:32:14 +08:00
gitea
0499ccb2cc
refactor(corps): normalize credential categories and format workflow history logs
2026-10-14 18:19:13 +08:00
gitea
95eb8ee676
chore(legacy): remove ekb-mcp migration layer, approval db compat shim, and stale daily notes
...
The ekb-mcp -> hose-use rename migration (LEGACY_* constants,
syncLegacyEnterprisesDir/syncLegacyGlobalConfig with 7-day grace
cleanup, dual-source enterprises resolution) has completed its job:
legacy data self-deleted on active machines years of grace ago.
Config resolution now returns the single primary
~/.config/hose-use source; startup no longer scans the legacy dir.
- core/config/loader.ts: drop legacy constants, sync functions, and
LEGACY path from diagnostics candidates; loader.test.ts drops the
three legacy-migration cases
- domains/approval/db.ts deleted: pure pass-through over core/db whose
consumers (repository.ts) already call core/db directly; the four
test files now import getDatabase/closeDatabase from core/db
- scripts/dev-hygiene.ts: drop the config.legacy finding and
legacyConfig snapshot field
- docs/daily/* removed: Python-era (ekb-cli/ekb-mcp) notes describing
commands and architecture that no longer exist (preserved in git
history)
No behavior change on machines without legacy data: tsc clean,
313 tests pass (316 minus the 3 removed legacy cases).
2026-10-05 16:29:19 +08:00
gitea
27c86e052a
refactor(core,packaging): relocate embedded assets and binary runtime to src/packaging and enforce core whitelist
2026-09-30 00:29:20 +08:00
gitea
3864f0ffd0
refactor(db,persistence): unify EventStore and WorkflowAlertStore onto core/db SQLite
2026-09-30 00:26:49 +08:00
gitea
fb11fedb76
docs(architecture): sync core and domain READMEs with refactored modules and layering
2026-09-30 00:14:54 +08:00
gitea
c15d622ba2
refactor(errors): unify EkbError hierarchy across domains and structured CLI error classification
2026-09-30 00:13:35 +08:00
gitea
2b220bc5d9
refactor(auth,config): split 2260-line login.ts into focused modules and normalize CorpConfig fields
2026-09-30 00:04:28 +08:00
gitea
2d744d283b
perf(http,auth): persist EASO, Unity, and Piper tokens across CLI invocations via token-store
2026-09-29 23:45:38 +08:00
gitea
76f7832522
refactor(mcp): remove deprecated fine-grained MCP tool definitions and simplify server to single CLI gateway
2026-09-29 23:42:12 +08:00
gitea
d0af46b445
fix(security,config): enforce 0600 file permissions, dynamic account store path, and HTTP origin protection
2026-09-29 23:34:06 +08:00
gitea
a0ec7f95a7
feat(platform,datalink,bill): add workflow job drilldown, safe record batch-edit, audit, and spec linkage diagnostics (v0.8.11)
2026-09-29 20:00:55 +08:00
gitea
96c5a3f242
feat(auth): support OpenAPI persistent credentials, auto-refresh, and Web login link generation (v0.8.10)
2026-09-28 16:50:18 +08:00
gitea
8c444efc85
fix(auth): point account-store and token-store directly to ~/.config/hose-use
2026-09-18 11:22:41 +08:00
gitea
d0f3d2738a
refactor(core): 全量语义化客户端迁移并移除历史兼容桥接层
2026-09-17 15:44:25 +08:00
gitea
aa69b50e6e
refactor(core): 抽象语义化 HTTP 客户端与统一防爬指纹管理
2026-09-17 15:32:56 +08:00
gitea
43595e2410
fix: sqlite cache migration, bill timeout protection with --mine, and add-link overwrite UX (v0.8.7)
2026-09-17 10:06:08 +08:00
gitea
ebed61d6b4
feat(skill): 合思系列统一入口,新增 MVEL 与节点开通子技能
...
- skills/hose-use 收敛为合思/易快报系列唯一入口,新增「本套件结构」路由表
- 新增子技能 multi/ekuaibao-mvel:工作流 MVEL 代码节点脚本生成与排错
- 新增子技能 multi/ekuaibao-nodes:工作流节点批量开通(自 curl 提取 token/corpId/baseUrl)
- 开通服务地址改为 HOSE_WORKFLOW_NODE_URL 环境变量,不再硬编码实例
- embedded-skill 内嵌清单 14 -> 18,installer 递归保留 multi/ 层级;测试同步更新
2026-09-15 16:21:15 +08:00
gitea
33db72f863
fix: install skill only in canonical global directory
2026-09-12 23:02:25 +08:00
gitea
7cfb68e434
feat: migrate legacy hose configuration paths
2026-09-11 17:24:08 +08:00
gitea
639aaa9271
feat: embed keys and store skill guidance
2026-09-11 16:35:21 +08:00
gitea
fb700a4c86
feat(feetype): add fee type domain CRUD CLI commands and specifications
2026-09-09 16:25:03 +08:00
gitea
1cd8901f7a
feat(cli): add corps search command and intuitive aliases
...
- Implement hose-use corps search <keyword> with case-insensitive fuzzy matching across id, name, corpId, staffId, staffName, and accountId
- Format terminal table output with matched cell brackets, hit labels, active corp markers, and friendly no-match fallback
- Support --json structured output conforming to CliResult specification
- Add intuitive aliases for frequently guessed commands: auth list -> auth accounts, corps find -> corps search, config show -> config paths
- Enhance CorpSummary and CorpContext with corpId, staffName, and getAllCorps
- Add comprehensive unit tests in corps.test.ts, auth.test.ts, and config.test.ts
2026-09-09 14:42:58 +08:00
gitea
0c953df30e
feat(store): 新增企业 OpenAPI 密钥一键提取(keys)与应用中心探查(store)能力
2026-09-08 16:59:57 +08:00
gitea
3a15b064fe
refactor(core): 规范数据库表结构、版本迁移与多级缓存体系加固
...
- 数据库表规范化与原子事务版本迁移机制 (_schema_migrations)
- 增加 SQLite 复合主键、PRAGMA busy_timeout 与索引覆盖
- 构建统一两级协同缓存 (L1 Memory LRU + L2 SQLite 持久化)
- withCache 增加 In-flight Promise 去重并发防击穿 (单飞机制)
- 收敛 dimension、role、bill 与 token-store 缓存逻辑
- 100% 保持现有 API 契约与零功能删除
2026-09-08 15:49:27 +08:00
gitea
3f015d8e22
fix(auth): guard temporary token refresh and translate bill flow
2026-09-08 12:08:12 +08:00
gitea
a5b5f1918e
feat(config): align with seal-use to remove cwd enterprises and support testEnterprisesDir (v0.7.4)
2026-09-07 16:25:45 +08:00
gitea
2bf8d22810
feat: 支持协助链接秒级导入 (corps add-link) 与多集群 (wx2等) 动态鉴权换票
2026-09-07 14:44:37 +08:00
gitea
065ba42bfe
chore(skill): embed references/approval.md into embedded skill assets
2026-09-07 14:26:06 +08:00
gitea
2f8bcb90c9
refactor(cli): purge short hose alias and standardize on hose-use across docs, scripts, and prompts
2026-09-06 22:26:04 +08:00
gitea
2865728885
feat(cli): enhance update sources, normalize repo, upgrade to MCP 2.0, and bump to v0.6.2
2026-09-05 22:32:39 +08:00
gitea
6d61ece8cd
feat: add role definitions and member CLI
2026-09-05 20:29:36 +08:00
gitea
1f3334bfbd
feat(dimension): query custom archive catalogs and items
2026-09-05 20:17:19 +08:00