11 Commits

Author SHA1 Message Date
zeyu.fz d24104f7dc feat(kb-dsh): 接入仓库工程约定并改名为公开包 bailian-kb-dsh
包名 @ali/bailian-kb-dsh → bailian-kb-dsh(公开 npm):package.json name +
cordis.patch.yml insert.name + tsdown PLUGIN_ID 三处同步(漏一处即 dsh 运行时崩)。

产物 lib/ → dist/(本仓 .gitignore 忽略 dist 不忽略 lib),连带 main/types/
exports/files/tsdown outDir 同步;.gitignore 补 *.tsbuildinfo。

依赖接 catalog(yaml/typescript/@types/node/vite-plus);测试导入 vitest →
vite-plus/test(全仓统一约定,消掉唯一的 vitest 依赖漂移)。

tsconfig 拆三件套:tsconfig.json 纯类型检查覆盖 src+tests(供 oxlint 自动发现,
含 jsx/DOM),tsconfig.build.json 产出 node 半,tsconfig.web.json 隔离检查 web 半。
补齐 tests 从未被类型检查暴露的一处 partial 输入类型错误。

根 vite.config.ts 新增两条 override:web 半 no-restricted-imports 把 tsdown 构建期
的 bundle purity gate 提前到 lint 期;全包放开 _ 前缀的 no-unused-vars。

文档:新增 docs/agents/dsh-plugin.md,AGENTS.md 项目地图/版本锁步例外/分层边界/
场景索引同步,packages.mjs 注释说明故意不进发布白名单。

格式化(单引号无分号 → 双引号加分号)由 pre-commit 的 vp check --fix 自动完成,
无法单独成 commit,一并纳入。

全仓 vp check 0 error;插件 13 文件 85 测试全绿;build + typecheck 通过。
2026-08-24 11:02:44 +08:00
故璃 e46053b93e fix(tooling): stop interpolating filenames into staged check
Passing staged filenames per-file puts repository paths into the argv of
the vp check node process. When an endpoint security agent matches process
argv by substring, the whole process is SIGKILLed and pre-commit can never
finish. Use the function form so the command runs without filenames: one
whole-repo check, wider coverage than per-file, and independent of any path.
2026-07-29 17:54:54 +08:00
chenanran555 9cad1994e7 feat(agent): validate by client apiKey auth type 2026-07-24 14:50:30 +08:00
若麒 63edde3588 refactor: simplify command context capabilities
- replace lazy store and manager accessors with direct properties
- enforce command capability boundaries through lint rules
2026-07-13 15:47:57 +08:00
clh02467605 6e5ecf8923 chore: drop redundant helpers.d.ts fmt/gitignore guards
Runtime tsconfig already limits pack to src, so tests/**/*.d.ts is never
emitted during build; the fmt ignore and gitignore entries are unnecessary.
2026-07-10 12:32:30 +08:00
clh02467605 301986b669 fix(ci): stop emitting and checking generated tests helpers.d.ts
Runtime pack build was pulling in e2e test imports and tsgo emitted
helpers.d.ts beside commands/tests; restrict runtime tsconfig to src and
ignore tests/**/*.d.ts in fmt/gitignore as a safety net.
2026-07-10 12:26:41 +08:00
clh02467605 9602209113 feat(e2e): integrate e2e package and update test configurations
- Added e2e package as a workspace dependency in pnpm-lock.yaml.
- Updated globalSetup path in vite.config.ts to point to the new e2e package location.
- Enhanced documentation for CLI E2E testing, including architecture layers and triggering conditions.
- Refactored test paths and commands in the documentation to align with the new structure.
- Removed outdated dataset and auth E2E tests to streamline the test suite.
- Updated command references and validation checks in the documentation to reflect recent changes.
2026-07-10 11:46:05 +08:00
若麒 b0c48bab6b Merge branch 'main' into feat/self-built-framework 2026-07-08 14:05:48 +08:00
若麒 1f56feab24 refactor(commands): route all exits through the central error handler
Commands no longer call process.exit() directly. Every failure now throws
UsageError (bad input → exit 2) or BailianError (runtime failure, with
AUTH/TIMEOUT codes), so the runtime's handleError stays the single exit
point and telemetry always flushes.

- convert 27 process.exit() sites across 15 commands to throws
- move cross-flag/value checks into validate(); use flag `choices` for
  --events / --sort; drop dead --model required check
- keep pipeline's process.exitCode for lint-style soft failures
- enforce with unicorn/no-process-exit, allowed only in runtime/tools/tests
- fix incidental lint: void floating run(), narrow console errorCode,
  align generate-reference type imports to source
2026-06-29 09:07:12 +08:00
qcq01083097 8023809666 feat: Pre-commit verification to add the md file type 2026-06-11 13:45:32 +08:00
若麒 1533e2013e Initial commit 2026-05-28 18:37:07 +08:00