Refactor AG-UI helpers and knowledge upload classification - #1251
Merged
Merged
Conversation
Centralize repeated AG-UI request parsing and injected-tool merge behavior behind narrow shared helpers so future fixes can land in one place without widening pure contract/support module dependencies. Deduplicate knowledge ingest upload classification while preserving the existing prefix retry and skipped-file behavior. Constraint: Behavior-preserving refactor only; no new dependencies or runtime behavior changes Rejected: Continue into API module-loader/provider runtime-loader split | broader risk and review surface after safe slices were green Rejected: Single combined AG-UI helper module | architect review found it pulled tool registry dependencies into pure request/contract modules Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep AG-UI request/contract helpers separate from tool/runtime registry imports unless import-boundary tests are updated Tested: deno fmt --check changed files; DENO_NO_PACKAGE_JSON=1 deno lint changed files; focused AG-UI tests (6 passed, 47 steps); focused knowledge tests (17 passed, 54 steps); deno task typecheck; architect review Not-tested: Full deno task test suite; API module-loader/provider refactor candidates intentionally deferred
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.
Summary
Verification
deno fmt --check src/agent/ag-ui-request-shared.ts src/agent/ag-ui-tool-shared.ts src/agent/ag-ui-detached-start.ts src/agent/ag-ui-handler.ts src/agent/ag-ui-run-control.ts src/agent/ag-ui-runtime-handler.ts src/agent/ag-ui-host-support.ts src/agent/runtime-ag-ui-contract.ts cli/commands/knowledge/command.tsDENO_NO_PACKAGE_JSON=1 deno lint src/agent/ag-ui-request-shared.ts src/agent/ag-ui-tool-shared.ts src/agent/ag-ui-detached-start.ts src/agent/ag-ui-handler.ts src/agent/ag-ui-run-control.ts src/agent/ag-ui-runtime-handler.ts src/agent/ag-ui-host-support.ts src/agent/runtime-ag-ui-contract.ts cli/commands/knowledge/command.tsVF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --allow-all --unstable-worker-options --unstable-net src/agent/ag-ui-handler.test.ts src/agent/ag-ui-runtime-handler.test.ts src/agent/ag-ui-detached-start.test.ts src/agent/ag-ui-run-control.test.ts src/agent/ag-ui-host-support.test.ts src/agent/runtime-ag-ui-contract.test.tsVF_DISABLE_LRU_INTERVAL=1 deno test --no-check --allow-all cli/commands/knowledge/command.test.ts cli/commands/knowledge/handler.test.tsdeno task typecheck1429 passed,17170 steps,0 failed)Deferred