Skip to content

fix: add data-plane fallback for skills/tools/subagents/tasks/filters in export-agent - #278

Merged
Dalibor Kovacevic (RobiladK) merged 4 commits into
mainfrom
fix/export-agent-dataplane-fallback
Jul 30, 2026
Merged

fix: add data-plane fallback for skills/tools/subagents/tasks/filters in export-agent#278
Dalibor Kovacevic (RobiladK) merged 4 commits into
mainfrom
fix/export-agent-dataplane-fallback

Conversation

@dm-chelupati

Copy link
Copy Markdown
Collaborator

Problem

export-agent.sh and Export-Agent.ps1 only 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:

Resource ARM path Data-plane fallback
Skills arm_list "skills" GET /api/v2/extendedAgent/skills
Subagents arm_list "subagents" GET /api/v2/extendedAgent/agents
Tools arm_list "tools" GET /api/v2/extendedAgent/tools
Scheduled Tasks arm_list "scheduledTasks" GET /api/v2/extendedAgent/scheduledtasks
Incident Filters arm_list "incidentFilters" GET /api/v2/extendedAgent/incidentFilters

This matches the existing dual-path pattern already used for hooks, commonPrompts, and pluginConfigs.

Both export-agent.sh (bash) and Export-Agent.ps1 (PowerShell) are updated.

Testing

  • Verified bash syntax (bash -n) and PowerShell syntax (ParseFile)
  • Tested --dry-run export against a 1P agent (ARM path still works — skills: 2, subagents: 3, filters: 1)

Fixes #277

… 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.
@RobiladK
Dalibor Kovacevic (RobiladK) merged commit 50ce02d into main Jul 30, 2026
2 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.

[Issue] Export-Agent.sh (and .ps1) not exporting skills, tools, scheduled tasks, subagents, etc.

2 participants