Skip to content

[EPIC-D][LOU-D34.2] Apps, examples and tests stop calling the deprecated setType() - #97

Merged
LinuxDevil merged 1 commit into
mainfrom
lou-d34-2-settype-cleanup
Oct 1, 2026
Merged

LinuxDevil merged 1 commit into
mainfrom
lou-d34-2-settype-cleanup

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

What

  • Removes .setType(AgentType.SmartAssistant) and incidental agentType: literals from Agent Forge (server/buildAgent.ts + its tests), examples/openrouter, examples/tracing, examples/ops-pipeline, and ~35 src/**/*.test.ts files (codemod, then reviewed). Unused AgentType imports dropped.
  • src/execution/ContextBuilder.ts: drops the agent.agentType as string cast; metadata.agentType is now optional and omitted when the agent has none (also in merge()), plus a test.
  • Kept on purpose (tests that are about the deprecated type): src/core/AgentBuilder.test.ts (setType round-trip, AgentBuilder.from with a type, invalid type), src/data/mocks.test.ts and src/data/models.test.ts (findByType / model mapping), and a typed-agent case in ContextBuilder.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 carry agentType: undefined in context metadata.

Acceptance criteria

  • No setType( call remains in apps/, examples/, packages/, docs/, README.md or scripts/ (grep returns nothing)
  • Incidental agentType: literals removed from tests under src/ and apps/; deliberate ones kept (AgentBuilder.test.ts, data tests)
  • ContextBuilder.ts cast dropped; metadata omits agentType when unset, with test
  • Agent Forge: buildAgent.ts no longer passes a type. The Forge has no type selector/UI that references the agent type, so there was no UI to change.
  • Docs: no .md touched, so no llms regeneration; no CHANGELOG entry (no public API change beyond ExecutionContext.metadata.agentType becoming optional)

How verified

  • npx tsc --noEmit: clean
  • npm run lint: 0 errors, 405 warnings (same as origin/main)
  • npm run test:types: 26 passed, no type errors
  • npx vitest run: 149 files passed, 2160 tests passed, 3 skipped
  • npm run build && npm run build --workspace=packages/create-loushy-agent: success
  • npm run typecheck --workspace apps/agent-forge and typecheck:server: clean
  • npm run test:server --workspace apps/agent-forge: 12 files, 105 tests passed; Forge vitest run: 12 files, 108 tests passed
  • npm 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

…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
@LinuxDevil
LinuxDevil merged commit 5da1fee into main Oct 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants