Repository navigation
refactor(ts/agent): remove remaining Python-idiom duplicates from the public API #3592
Copy link
Copy link
Closed
Copy link
Labels
P2The team intends to work on this in the near future, or at a lower priority.The team intends to work on this in the near future, or at a lower priority.a: api-simplicitycomponent: agent sdkRelating to the agent SDK libraries in any languageRelating to the agent SDK libraries in any languagecomponent: core sdkAffects the core SDK layer in any languageAffects the core SDK layer in any languagefeature: express formatAffects the A2UI Express inference formatAffects the A2UI Express inference formatfeature: prompt generatorlang: pythonAffects SDKs or apps in the Python programming languageAffects SDKs or apps in the Python programming languagelang: typescriptTypescript agent SDK issuesTypescript agent SDK issuesstatus: first-line-handledtype: bugSomething isn't workingSomething isn't workingtype: feature/enhancement
Milestone
Description
Follow-up to the review of #3397 (comment), which removed four second spellings from the skill module (generateSkillset, positional new Skill(...), SkillSet.length, SkillSet.items()). A scan of the rest of @a2ui/agent's public surface found these, none of which is a duplicate in Python but each of which is a Python idiom with a more usual TS shape:
Skill.toString()returnstoMarkdown()(src/skill/skill.ts). A port of__str__; two spellings for one thing. Remove.SkillSet[Symbol.iterator]yields keys (src/skill/skill.ts), as a Pythondictdoes, while a JSMapyields[key, value]. Sincesize/entries()followMap, iterate likeMaptoo:implements Iterable<[string, Skill]>, iterator returnsentries().keys()stays for callers who want keys.ExpressParser.wrapDecompiledBlocks(string[])andExpressDecompiler.wrapDecompiledBlocks(src/inference-formats/express/{parser,decompiler}.ts), a port ofwrap_decompiled_blocks, sit next towrap(RawResponsePart[]). The only non-test callers are insideExpressPromptGenerator. Make it internal or fold it intowrap.supportsStreamingexists on bothParser(src/parser/parser.ts) andInferenceFormat(src/inference-format.ts, commented "Mirrors PythonInferenceFormat.supports_streaming"). Decide which one owns the answer and drop the other, or have one delegate to the other.A2uiRequestProcessor.activeCatalogs(src/processor/processor.ts) vscatalogsonRendererState,ExpressParser,DirectJsonParser, andPromptGenerator. Rename tocatalogsfor consistency (mirrors Python'sactive_catalogs).ExpressParser.decompile(messages: AgentToRendererMessage | AgentToRendererMessage[])accepts a single message where the abstractParser.decompileandDirectJsonParser.decompiletake only an array. Take the array only, matching the other overload removals.
Items 1–2 and 5–6 are small public API changes and need **BREAKING**: CHANGELOG entries; 3–4 can be done without one if the public member is kept and only delegated.
Update blueprints/codebases/typescript/agents/a2ui_agent/codebase.blueprint.md where method names change.
Metadata
Metadata
Assignees
Labels
P2The team intends to work on this in the near future, or at a lower priority.The team intends to work on this in the near future, or at a lower priority.a: api-simplicitycomponent: agent sdkRelating to the agent SDK libraries in any languageRelating to the agent SDK libraries in any languagecomponent: core sdkAffects the core SDK layer in any languageAffects the core SDK layer in any languagefeature: express formatAffects the A2UI Express inference formatAffects the A2UI Express inference formatfeature: prompt generatorlang: pythonAffects SDKs or apps in the Python programming languageAffects SDKs or apps in the Python programming languagelang: typescriptTypescript agent SDK issuesTypescript agent SDK issuesstatus: first-line-handledtype: bugSomething isn't workingSomething isn't workingtype: feature/enhancement
Type
Projects
- StatusShow more project fieldsDone
Activity
refactor(ts/agent): remove remaining Python-idiom duplicates from the…
refactor(ts/agent): remove remaining Python-idiom duplicates from the…