Skip to content

[BUG]: TS Direct JSON prompt generator should put the protocol schemas in base rules (TS follow-up to #3526) #3562

Open

Description

@nan-yu

The Python fix for #3526 (#3559) moves the Direct JSON protocol schemas (the agent-to-renderer schema and the common types schema) from generate_catalog_instructions() into generate_base_rules(). The TypeScript DirectJsonPromptGenerator needs the same change, so that the two SDKs split their output across the hooks the same way.

Current behavior

typescript/agents/a2ui_agent/src/inference-formats/direct-json/prompt-generator.ts:

  • generateBaseRules() returns only DEFAULT_WORKFLOW_RULES.
  • generateCatalogInstructions(catalog?) returns the agent-to-renderer schema, the pruned common types schema and the catalog schemas, all in one schema block.

Nothing triggers the duplication on main, because TS has no SkillGenerator yet. Once #3397 lands, SkillGenerator.generateSkill() calls generateCatalogInstructions(c) once per catalog. A monolithic Direct JSON skill with two catalogs would then repeat the protocol schemas, as Python did before #3559.

Expected behavior

Match #3559:

  • generateBaseRules(allowedMessages?) returns the workflow rules followed by a schema block with the agent-to-renderer schema (pruned to the allowed messages) and the common types schema (pruned against all of the generator's catalogs).
  • generateCatalogInstructions(catalog?) returns a schema block with only the catalog schemas.
  • generate() / promptSnippet stays byte-identical, so the prompt conformance fixtures don't change.

Done looks like

Related: #3416, #3526, #3559, #3397.

Activity

  1. added
    status: needs-triageauto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs
    on Oct 23, 2026
  2. added
    status: needs-triageauto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs
    and removed
    status: needs-triageauto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs
    on Oct 26, 2026
  3. added
    P2The team intends to work on this in the near future, or at a lower priority.
    on Oct 26, 2026
  4. removed
    status: needs-triageauto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs
    on Oct 26, 2026
  5. added
    P1This is a priority. Team is actively working on it, or will be soon.
    component: specificationAffects the A2UI specification documents and JSON schemas
    lang: pythonAffects SDKs or apps in the Python programming language
    and removed
    P2The team intends to work on this in the near future, or at a lower priority.
    on Oct 28, 2026
  6. added
    status: needs-triageauto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs
    on Oct 28, 2026
  7. self-assigned this
    on Oct 28, 2026
  8. removed
    status: needs-triageauto-managed: https://github.com/a2ui-project/a2ui/blob/main/scripts/triage.mjs
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1This is a priority. Team is actively working on it, or will be soon.component: agent sdkRelating to the agent SDK libraries in any languagecomponent: specificationAffects the A2UI specification documents and JSON schemasfeature: prompt generatorlang: pythonAffects SDKs or apps in the Python programming languagelang: typescriptTypescript agent SDK issuesstatus: first-line-handledtype: bugSomething isn't working

Type

No type

Projects

  • Status
    Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions