Skip to content

Refactor AG-UI helpers and knowledge upload classification - #1251

Merged
kojiwakayama merged 1 commit into
mainfrom
behavior-preserving-refactor-ag-ui-knowledge
Apr 23, 2026
Merged

kojiwakayama merged 1 commit into
mainfrom
behavior-preserving-refactor-ag-ui-knowledge

Conversation

@kojiwakayama

Copy link
Copy Markdown
Contributor

Summary

  • Split shared AG-UI request/parse helpers from injected-tool merge helpers to preserve module boundaries while removing duplication
  • Reused the AG-UI helpers across direct, runtime, detached, run-control, and contract/support paths without changing behavior
  • Deduplicated knowledge ingest upload listing classification while preserving skip/target partitioning and prefix retry behavior

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.ts
  • DENO_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.ts
  • VF_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.ts
  • VF_DISABLE_LRU_INTERVAL=1 deno test --no-check --allow-all cli/commands/knowledge/command.test.ts cli/commands/knowledge/handler.test.ts
  • deno task typecheck
  • Pre-push hook: fmt, lint, typecheck, and unit suite passed (1429 passed, 17170 steps, 0 failed)
  • Architect review approved the final split-helper diff

Deferred

  • API module-loader/provider runtime-loader cleanup left for a later, narrower PR
  • AgentRuntime/proxy/render/WebSocket cleanup intentionally out of scope

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
@kojiwakayama
kojiwakayama enabled auto-merge (squash) April 23, 2026 06:52
@kojiwakayama
kojiwakayama merged commit 3f76b47 into main Apr 23, 2026
16 checks passed
@kojiwakayama
kojiwakayama deleted the behavior-preserving-refactor-ag-ui-knowledge branch April 23, 2026 06:55
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.

1 participant