fix: add data-plane fallback for skills/tools/subagents/tasks/filters in export-agent - #278
Merged
Dalibor Kovacevic (RobiladK) merged 4 commits intoJul 30, 2026
Conversation
… in export-agent ARM child resources for skills, tools, subagents, scheduledTasks, and incidentFilters return empty on 3P (external) tenants because these resources are now deployed via data-plane only (apply-extras.sh). Add inline data-plane fallback reads when ARM returns 0 results, matching the existing dual-path pattern already used for hooks, commonPrompts, and pluginConfigs. Data-plane endpoints used: - Skills: GET /api/v2/extendedAgent/skills - Subagents: GET /api/v2/extendedAgent/agents - Tools: GET /api/v2/extendedAgent/tools - Scheduled Tasks: GET /api/v2/extendedAgent/scheduledtasks - Incident Filters: GET /api/v2/extendedAgent/incidentFilters Fixes #277
[System.IO.File]::WriteAllText uses .NET CWD ([Environment]::CurrentDirectory) which can diverge from PowerShell CWD when the user cd's in their terminal. This caused 'Could not find a part of the path' errors when writing skill .md files to config/skills/. Resolve EXPORT_DIR to an absolute path before any file operations.
On Windows, Python is installed as 'python' not 'python3'. Add a script-scoped alias so all existing python3 calls work on both platforms. Also fix the prerequisite check to accept either name.
Same fix as the PS1 script — detect python3 vs python at startup and use $PYTHON variable throughout. Fixes the bash script when run under Git Bash (MINGW64) on Windows where only 'python' exists.
Dalibor Kovacevic (RobiladK)
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
export-agent.shandExport-Agent.ps1only read skills, tools, subagents, scheduled tasks, and incident filters from ARM child resources. On 3P (external) tenants, these resources are deployed via data-plane only (apply-extras.sh), so ARM returns 0 results and the export is incomplete.Root Cause
The Bicep deployment (
agent-extensions.bicep) moved all child resources except connectors to data-plane to avoid ARM tenant restrictions that block 3P tenants. The deploy path (apply-extras.sh) was updated but the export path was not.Fix
Added inline data-plane fallback reads when ARM returns 0 results for each of the 5 affected resource types:
arm_list "skills"GET /api/v2/extendedAgent/skillsarm_list "subagents"GET /api/v2/extendedAgent/agentsarm_list "tools"GET /api/v2/extendedAgent/toolsarm_list "scheduledTasks"GET /api/v2/extendedAgent/scheduledtasksarm_list "incidentFilters"GET /api/v2/extendedAgent/incidentFiltersThis matches the existing dual-path pattern already used for hooks, commonPrompts, and pluginConfigs.
Both
export-agent.sh(bash) andExport-Agent.ps1(PowerShell) are updated.Testing
bash -n) and PowerShell syntax (ParseFile)--dry-runexport against a 1P agent (ARM path still works — skills: 2, subagents: 3, filters: 1)Fixes #277