refactor(agent): own model selection on each agent

This commit is contained in:
_Kerman committed 2026-10-20 21:09:09 +08:00
1 parent 639602e63a
commit a9c006f9c3
237 files changed
+1051 -1734

No files matched your search

-1
View File
@@ -68,7 +68,6 @@ export const SERVICE_PAGE: Record<string, string> = {
mcpResources: 'mcp.md',
agentLoop: 'core.md',
agentDefaultModel: 'core.md',
agentModel: 'core.md',
agentPresets: 'core.md',
agents: 'core.md',
approval: 'approval.md',
+1 -9
View File
@@ -641,14 +641,6 @@ const SERVICE_ROLES: ServiceRole[] = [
consumers: ['agent-loop', 'acp', 'subagent'],
note: 'Owns live Agent handles, the create/resume factory seam, and process-local initiator propagation.',
},
{
key: 'agentModel',
pkg: 'agent-model',
title: 'Session model selection',
mode: 'core',
consumers: ['agent-loop', 'api-session-controller', 'acp', 'sdk-jsonrpc-server', 'headless'],
note: 'Reads and records Session model choices; owns the modelSelection projection and optional scoped route-switch notices.',
},
{
key: 'agentDefaultModel',
pkg: 'agent-default-model',
@@ -1550,7 +1542,7 @@ function renderEventRelations(pkgs: Pkg[], events: readonly EventEntry[]): strin
}
lines.push(
'',
'## Events outside the current Harness API catalog',
'## Non-harness or undeclared event strings seen in package source',
'',
renderGeneratedRegion('event-producer-consumer:undeclared', extraRows.join('\n')),
)
+1 -3
View File
@@ -245,10 +245,8 @@
},
"packages/api/session-controller/tests/session-cold.host.spec.ts": {
"23129d43b519124d7c915c0f1dfd075c1d84579c176678fa8905d0ba02403406": 1,
"36809c8a43a7b9240089e359618107af0a42e948791f0502d6366df65d43208f": 2,
"4e05d4d65c076fff556c0dd813f53e90b8c98390825e7293033d8450a8f94ff0": 1,
"526a22860f8bc330caf4a3f28a28948de5c04b4e17125f04b3738808cfbd4e3e": 1,
"a6a04773270367c3ea0f54b577d3f766ff738afb6702e09caac1b3fa66a7397d": 1
"526a22860f8bc330caf4a3f28a28948de5c04b4e17125f04b3738808cfbd4e3e": 1
},
"packages/api/session-controller/tests/session-fork.host.spec.ts": {
"dbbb38fac6189a3be6f7c29f8df6ef34679f5956c168d08d4f058b5d66b24089": 1
+7 -2
View File
@@ -146,6 +146,11 @@
"symbol": "Inbox",
"source": "packages/core/agent/src/runtime-types.ts"
},
{
"doc": "docs/subsystems/core.md",
"symbol": "Model",
"source": "packages/core/agent/src/runtime-types.ts"
},
{
"doc": "docs/subsystems/core.md",
"symbol": "InboxTarget",
@@ -2495,12 +2500,12 @@
{
"doc": "docs/subsystems/core.md",
"symbol": "ModelSelectionProjectionState",
"source": "packages/core/agent-model/src/types.ts"
"source": "packages/core/agent/src/model-selection.ts"
},
{
"doc": "docs/subsystems/core.md",
"symbol": "ModelSelectionProjection",
"source": "packages/core/agent-model/src/types.ts"
"source": "packages/core/agent/src/types.ts"
},
{
"doc": "docs/subsystems/core.md",