Skip to content

dispatcher: caching, validation, and cleanup#2233

Merged
robgruen merged 9 commits intomainfrom
dev/robgruen/TODO/dispatcher
Apr 23, 2026
Merged

dispatcher: caching, validation, and cleanup#2233
robgruen merged 9 commits intomainfrom
dev/robgruen/TODO/dispatcher

Conversation

@robgruen
Copy link
Copy Markdown
Collaborator

  • Drive dynamic-agent permission from manifest (not hardcoded name)
  • Cache lookup-clarify translator per session
  • Detect and skip circular type references in action template builder
  • Validate parsed action schema JSON structure in loadParsedActionSchema
  • Clean up options RPC channel when agent context is closed
  • Parallelize unknownSwitcher assistant-selection partitions

Split from #2210.

robgruen and others added 8 commits April 22, 2026 14:03
When closeAgentContext is called, delete the options channel from the
channel provider and clear the optionsRpc reference. Options are
agent-scoped (created once per initializeAgentContext call), so they
can safely be released when the context is torn down.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ActionSchema

Checks that the JSON has valid version, entry, and types fields before passing
to fromJSONParsedActionSchema, producing a clear error for corrupted cache files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Thread a visited-names Set through toTemplateType/toTemplateTypeObject/
toTemplateTypeArray so that a type-reference cycle returns undefined
rather than infinitely recursing and overflowing the stack.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract translator construction into a WeakMap-backed helper keyed on
CommandHandlerContext. The lookup-clarify path rebuilt the translator on
every invocation even though the agents + promptLogger inputs are stable
for the session.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… name

Replace the record.name === "browser" check in appAgentManager with a
manifest-declared allowDynamicAgents flag on AppAgentManifest. Opt in the
browser agent via its manifest so its dynamic-agent privilege is
expressed in the manifest rather than in dispatcher code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- knowPro/collections: matchesWithMinHitCount condition > 0 → > 1 (optimization,
  all matches already have hitCount ≥ 1 by design)
- dispatcher/unknownSwitcher: parallelize assistant-selection partitions via
  Promise.all; extract selectFromPartitions() for testability
- knowledgeProcessor actions/entities: addMultiple concurrency 1 → settings.concurrency
- cache/explainWorkQueue: extend parameter-value-in-request check to cover numbers
- azure-ai-foundry/wikipedia: add optional locale param (default "en") to
  getPageObject and getPageMarkdown

Each fix is covered by new or updated unit tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ENT, parallel translation, URL protocol validation

Agent-Logs-Url: https://github.com/microsoft/TypeAgent/sessions/5828fefd-5097-4099-aa84-2f64fcd73f4e

Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
@robgruen robgruen temporarily deployed to development-fork April 22, 2026 23:37 — with GitHub Actions Inactive
@robgruen robgruen temporarily deployed to development-fork April 22, 2026 23:37 — with GitHub Actions Inactive
@robgruen robgruen added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit e105632 Apr 23, 2026
21 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