feat(core-agent): extract pure runtime logic from stage-ui into core-agent (#1524)
Depends on #1487 ## Summary - Introduce `packages/core-agent` — a new pure-runtime package that extracts zero-Vue/Pinia algorithmic logic from `@proj-airi/stage-ui`, following a "compatible facade + core sinking" strategy - Migrate shared chat types, LLM streaming types, chat hook registry, session message merge logic, context registry algorithm, and LLM service utilities into `core-agent` - `stage-ui` files are preserved as re-exports / thin wrappers — all external imports, store IDs, and public APIs remain unchanged ## Motivation `stage-ui` currently mixes pure agent runtime logic (algorithms, type definitions, stateless utilities) with Vue/Pinia state management and browser-specific adapters. This coupling makes it hard to: - Test agent logic in isolation - Reuse agent algorithms outside of Vue contexts (e.g., server-side, CLI, other frameworks) - Reason about the boundary between "what the agent does" vs "how the UI manages state" --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by-agent: Unknown <unknown@example.com>
This commit is contained in:
co-authored by
autofix-ci[bot]
parent
11ac511dd9
commit
bf41655dbb
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "@proj-airi/core-agent",
|
||||
"type": "module",
|
||||
"version": "0.9.0-alpha.35",
|
||||
"private": true,
|
||||
"description": "Core agent runtime orchestration for AIRI",
|
||||
"author": {
|
||||
"name": "Moeru AI Project AIRI Team",
|
||||
"email": "airi@moeru.ai",
|
||||
"url": "https://github.com/moeru-ai"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/moeru-ai/airi.git",
|
||||
"directory": "packages/core-agent"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.mts",
|
||||
"files": [
|
||||
"README.md",
|
||||
"dist",
|
||||
"package.json"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsdown",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@proj-airi/server-shared": "workspace:^",
|
||||
"@xsai-ext/providers": "catalog:",
|
||||
"@xsai/model": "catalog:",
|
||||
"@xsai/shared-chat": "catalog:",
|
||||
"@xsai/stream-text": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tsdown": "catalog:",
|
||||
"typescript": "^5.9.2"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user