Repository navigation
[EPIC-D][LOU-D34.2] Apps, examples and tests stop calling the deprecated setType() - #97
Merged
Merged
Conversation
…ted setType() Drop setType(AgentType.SmartAssistant) and incidental agentType literals from Agent Forge, examples and tests (kept where a test is about the deprecated type: AgentBuilder.test.ts, data/mocks+models tests). ContextBuilder no longer casts agent.agentType; metadata omits agentType when unset. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016bY29ibQgv3MDdjAbUT4YR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
.setType(AgentType.SmartAssistant)and incidentalagentType:literals from Agent Forge (server/buildAgent.ts+ its tests),examples/openrouter,examples/tracing,examples/ops-pipeline, and ~35src/**/*.test.tsfiles (codemod, then reviewed). UnusedAgentTypeimports dropped.src/execution/ContextBuilder.ts: drops theagent.agentType as stringcast;metadata.agentTypeis now optional and omitted when the agent has none (also inmerge()), plus a test.src/core/AgentBuilder.test.ts(setType round-trip,AgentBuilder.fromwith a type, invalid type),src/data/mocks.test.tsandsrc/data/models.test.ts(findByType/ model mapping), and a typed-agent case inContextBuilder.test.ts.Why
Follow-up of LOU-D34 (#76), which deprecated
AgentType/setType(). Nothing in-repo should still model the deprecated API as the normal way to build an agent, and untyped agents should not carryagentType: undefinedin context metadata.Acceptance criteria
setType(call remains in apps/, examples/, packages/, docs/, README.md or scripts/ (grep returns nothing)agentType:literals removed from tests under src/ and apps/; deliberate ones kept (AgentBuilder.test.ts, data tests)ContextBuilder.tscast dropped; metadata omitsagentTypewhen unset, with testbuildAgent.tsno longer passes a type. The Forge has no type selector/UI that references the agent type, so there was no UI to change.ExecutionContext.metadata.agentTypebecoming optional)How verified
npx tsc --noEmit: cleannpm run lint: 0 errors, 405 warnings (same as origin/main)npm run test:types: 26 passed, no type errorsnpx vitest run: 149 files passed, 2160 tests passed, 3 skippednpm run build && npm run build --workspace=packages/create-loushy-agent: successnpm run typecheck --workspace apps/agent-forgeandtypecheck:server: cleannpm run test:server --workspace apps/agent-forge: 12 files, 105 tests passed; Forgevitest run: 12 files, 108 tests passednpm run test:coverage && npm run fallow: passed on re-run (first coverage run had 1 unrelated failing test that did not reproduce); fallow exit 0, 0 above threshold🤖 Generated with Claude Code
https://claude.ai/code/session_016bY29ibQgv3MDdjAbUT4YR
Generated by Claude Code