Skip to content

fix: support '#' version separator in AiAgentDefinitionVersion @W-23939860@ - #1826

Open
WillieRuemmele wants to merge 5 commits into
mainfrom
wr/hashVersionSeparator
Open

fix: support '#' version separator in AiAgentDefinitionVersion @W-23939860@#1826
WillieRuemmele wants to merge 5 commits into
mainfrom
wr/hashVersionSeparator

Conversation

@WillieRuemmele

Copy link
Copy Markdown
Member

Summary

  • Fix critical bug: key.split('#') in metadataApiDeploy.ts breaks when fullNames contain # (AiAgentDefinitionVersion uses AgentName#N format). Changed to split only on first #.
  • Registry support: Added missing suffix and new versionSeparator field for AiAgentDefinitionVersion
  • Pipeline support: Added parseAgentVersionFullName parser, componentSetBuilder handling, and filePathGenerator bundle mapping

Work Item

@W-23939860@: Add '#' Version separator support to the CLI

Proof of Work

  • Tests: 41 new tests pass (deployMessages + agentVersionParsing), full suite (30471) passes
  • Lint: clean (pre-commit hook)
  • Type check: clean (tsc --noEmit)
  • Build: clean (pre-push hook)

Test plan

  • Retrieve AiAgentDefinitionVersion:AgentName#1 — should resolve correctly without key splitting errors
  • Deploy a project containing AiAgentDefinitionVersion bundles — deploy messages should map correctly
  • Retrieve with wildcard AiAgentDefinitionVersion:AgentName#* — should retrieve all versions
  • Verify existing BotVersion behavior unchanged (regression check)

…mes @W-23939860@

AiAgentDefinitionVersion uses '#' as its version separator (e.g., 'ASA1#1'),
which conflicts with SDR's internal KEY_DELIMITER that also uses '#' for
composite keys (type#fullName). This change:

- Fixes key.split('#') in metadataApiDeploy to split only on the first '#'
- Adds registry suffix and versionSeparator field for AiAgentDefinitionVersion
- Adds parseAgentVersionFullName for version filter parsing
- Adds componentSetBuilder handling for AiAgentDefinitionVersion entries
- Adds filePathGenerator bundle mapping for the type
@WillieRuemmele
WillieRuemmele force-pushed the wr/hashVersionSeparator branch from e51f5e0 to cb9bd70 Compare August 25, 2026 21:08
…939860@

Bundle types must not have 'suffix' set — it causes calculateRelativePath
to take the flat path (directoryName/basename) instead of the trimUntil
path that preserves bundle subdirectory structure. This was causing
retrieved files to be written flat rather than in the expected
bundle directory (e.g., type/name/name.suffix-meta.xml).
…-23939860@

When a user specifies just the agent name without a version (e.g.,
-m "AiAgentDefinitionVersion:AgentName"), resolve it to the highest
version by calling listMetadata and selecting the max version number.
Self-document the version separator convention: BotVersion uses '.'
and AiAgentDefinitionVersion uses '#'.
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