Repository navigation
feat!: remove AgentType, its registry and unused donor-era types (A2a) - #390
Merged
Merged
Conversation
LinuxDevil
force-pushed
the
lou-a1-subpaths
branch
from
October 4, 2026 12:39
28e5d09 to
2342328
Compare
Remove 25 root exports that had no runtime effect or no implementation: - src/agent-types/ (index, registry, validators) and its root re-export - src/types/repository.ts and src/types/common.ts (no users) - types/agent.ts: AgentType, AgentTypeDescriptor, AgentConfig.agentType, AgentExecutionOptions, AgentExecutionResult, AgentDefinition, ToolSetting - AgentBuilder: setType(), the persisted agentType field, and the registry-validator imports; the name/tool checks move inline into validate() with the same messages and LOUSHO_VALIDATION_FAILED code Checkpoints saved with agentType still load; the field is ignored. Closes #237
LinuxDevil
force-pushed
the
lou-a2a-remove-agenttype
branch
from
October 4, 2026 12:41
667e08a to
75c99cb
Compare
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.
Closes #237
Stacked on #387 (
lou-a1-subpaths) — merge order: A1 → this PR → A2b → A2c → A3 → A5.What this removes (25 root exports)
src/agent-types/(index, registry, validators) and itsexport *from the root:agentTypesRegistry,getAgentTypeDescriptor,getAllAgentTypeDescriptors,isValidAgentType,validateAgentConfig,validateAgentTools.src/types/repository.ts:IRepository,IAgentRepository,SessionData,ISessionRepository,ResultData,IResultRepository,SDKRepositories.src/types/common.ts:DataLoadingStatus,PaginationParams,PaginatedResponse,DeepPartial,Timestamped,IdEntity.src/types/agent.ts:AgentType,AgentTypeDescriptor,AgentConfig.agentType,AgentExecutionOptions,AgentExecutionResult,AgentDefinition,ToolSetting(+ the now-unusedMessageimport).AgentBuilder:setType(), the persistedagentTypefield, and the registry-validator imports.Export counts (TypeScript checker over each entry point)
src/index.ts: 727 → 702 (exactly −25)../typessrc/types/index.ts: 32 → 13 (exactly −19 type names fromtypes/files).Spec decisions exercised
AgentBuilder's privatevalidate(): the missing-name error (Agent name is required. Example: AgentBuilder.create().setName('my-agent')...build()) and the missing-toolerror (Tool configuration for '<key>' is missing 'tool' property), both underLOUSHO_VALIDATION_FAILED. Only the deadagentTypecheck insidevalidateAgentConfigwas dropped.AgentConfig.flows?: AgentFlow[]kept (A1 moved flows, did not remove them).agentTypewas optional, so old checkpoints/approval snapshots still load and the field is ignored (noted in the changelog).src/publicSurface.test-d.tsas@ts-expect-erroroff the root; the 8 runtime values (6 registry/validators +AgentType+DataLoadingStatusenums) pinned absent insrc/publicSurface.test.ts.Ambiguities resolved / deviations
grep -rn "AgentType\b\|agentType" src apps/agent-forge examples docs/*.md README.mdmatches onlysrc/publicSurface.test.ts/src/publicSurface.test-d.ts— the spec itself requires the removed names to appear there as pins asserting their absence, so those two files are the only hits by design. Everything else (source, apps, examples, docs, README) is clean;docs/research/feature-audit.mdis outside the grep'sdocs/*.mdglob and was left alone as a historical audit document.AgentBuilder.test.ts: deleted the two agent-type-only cases (setTyperound trip,agentType: 'bogus'), renamedbuilds without setType()tobuilds an agent with a name only, and added one case asserting thetool-less tool entry still throwsLOUSHO_VALIDATION_FAILED(covers the acceptance criterion that both validations keep firing).AgentType... in the next alpha?") has no recorded answer; proceeded because every removed symbol was already@deprecatedor unused and this is a pre-1.0 alpha.npm run pack-smokefails only on the pre-existing tarball size caps (919 entries vs max 900; 16,949,834 vs 16,777,216 bytes unpacked — improved from 924 / 16,997,702 by the deletions). All functional pack checks pass (19/19 ESM + CJS entries load, createAgent + mockModel turn ok, CLI + tsc resolution ok). Tracked separately onfix/lou-s1-tarball.Verification
npm run build✅ (incl. DTS)npx vitest run✅ 296 files / 4,278 testsnpm run test:types✅ 18 files / 83 tests, no type errorsnpm run test:evals:judge✅npm run lint✅,npm run typecheck✅npm run docs:llmsregenerated (llms.txtunchanged,llms-full.txtupdated);npm run docs:verify-snippets -- --skip-build✅ 258 snippetstypecheck✅,typecheck:server✅, client tests 119 ✅, server tests 133 ✅npm run pack-smoke