refactor(core-agent): move spark-command agent from stage-ui to core-agent (#2528)
## Summary Move `spark-command` and `spark-notify` agents from `packages/stage-ui/src/tools/character/orchestrator/` to `packages/core-agent/src/agents/` for better separation of concerns and reusability across packages. ## Changes - **Relocate spark-command agent** — moved `spark-command-shared.ts`, `spark-command.ts`, and `spark-command.test.ts` to `packages/core-agent/src/agents/spark-command/` - **Relocate spark-notify test** — moved `spark-notify.test.ts` to `packages/core-agent/src/agents/spark-notify/` - **Add barrel export** — created `packages/core-agent/src/agents/spark-command/index.ts` with re-exports - **Update package.json** — added `./agents/spark-command` entry in `packages/core-agent/package.json` - **Update build config** — added `src/agents/spark-command/index.ts` to `tsdown.config.ts` entry list - **Consolidate schemas** — merged duplicate `sparkNotifyCommandGuidanceSchema` into `sparkCommandGuidanceSchema` - **Add JSDoc** — added `@example` blocks to all normalize functions in `schema.ts` - **Update imports** — provider tests and `tool-resolver.ts` now import from `@proj-airi/core-agent/agents/spark-command` - **Delete legacy shims** — removed `stage-ui/src/tools/character/` re-export layer ## Verification ```bash pnpm -F @proj-airi/core-agent typecheck pnpm -F @proj-airi/stage-ui typecheck pnpm -F @proj-airi/core-agent exec vitest run pnpm lint ```
This commit is contained in:
@@ -23,6 +23,10 @@
|
||||
"./agents/spark-notify": {
|
||||
"types": "./dist/agents/spark-notify/index.d.mts",
|
||||
"default": "./dist/agents/spark-notify/index.mjs"
|
||||
},
|
||||
"./agents/spark-command": {
|
||||
"types": "./dist/agents/spark-command/index.d.mts",
|
||||
"default": "./dist/agents/spark-command/index.mjs"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
|
||||
Reference in New Issue
Block a user