Add msagent-backed agent lifecycle skills - #47
Draft
Anderson Silva (anderson-joyle) wants to merge 2 commits into
Draft
Anderson Silva (anderson-joyle) wants to merge 2 commits into
Anderson Silva (anderson-joyle) wants to merge 2 commits into
Conversation
…on helper Introduce six msagent-CLI-backed skills as the user-facing surface for Copilot Studio agent lifecycle operations, replacing the PAC-based manage agent for day-to-day use: - agent-auth: sign in/status/switch/logout and environment select - list-agents: msagent agent list (environment or tenant-wide) - clone-agent: msagent agent create (clone mode) into a new project - pull-agent: msagent agent pull into a registered project - push-agent: msagent agent deploy to a dev deployment slot (no publish) - publish-agent: msagent agent deploy --publish, behind a confirmation gate Re-scope agents/copilot-studio-manage.md to an INTERNAL migration-only helper used by /migrate for its PAC clone+push. Narrow its description so it no longer competes with the new skills, remove the Publish and List sections and their workflow rules, and add a redirect table pointing users to the skills. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcaa5aa6-2684-4021-9bc4-bc40b27f5dca
Require exact account, agent, deployment, and environment resolution before cloud mutations. Revalidate identity after login, verify imported workspace bindings, accurately describe publish behavior, and avoid unsafe interactive connection prompts. Document the msagent prerequisite and add contract tests for the lifecycle skill safety invariants. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcaa5aa6-2684-4021-9bc4-bc40b27f5dca
Copilot started reviewing on behalf of
Anderson Silva (anderson-joyle)
September 25, 2026 22:20
View session
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved correctness, safety-gate, workspace-discovery, escaping, and regression-test issues remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 5
Open (5)
Discover unregistered workspaces without a supplied folder · New Resolve missing deployment environment before confirmation · New Discover unregistered workspaces without a supplied folder · New Handle named deployment targets explicitly · New Move deployment creation behind target confirmation · New
What changed in this PR
Adds msagent-backed authentication and agent lifecycle skills while limiting PAC management to migration workflows.
Changes:
- Adds auth, list, clone, pull, push, and publish skills.
- Documents CLI prerequisites and adds contract tests.
- Restricts PAC management to migration use.
| File | Summary |
|---|---|
skills/push-agent/SKILL.md |
Dev-slot deployment; unresolved escaping, workspace discovery, named deployment selection, and confirmation-gate issues. |
skills/pull-agent/SKILL.md |
Cloud-to-local synchronization; unresolved apostrophe escaping issue. |
skills/publish-agent/SKILL.md |
Publishing workflow; unresolved environment resolution, workspace discovery, and apostrophe escaping issues. |
skills/list-agents/SKILL.md |
Agent discovery workflow. |
skills/clone-agent/SKILL.md |
Agent cloning; unresolved apostrophe escaping and target-environment resolution issues. |
skills/agent-auth/SKILL.md |
Authentication workflow; unresolved apostrophe escaping issue. |
scripts/test/msagent-skill-contracts.test.js |
Lifecycle contract tests; unresolved command-scoping and migration-command regression guards. |
README.md |
CLI prerequisite documentation. |
agents/copilot-studio-manage.md |
Migration-only PAC management scope. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+50
to
+54
| 2. Otherwise auto-discover with `Glob: **/.config/agent.config.json` and present a numbered | ||
| pick-list; never silently use the first match. | ||
| 3. If the only candidate is an unregistered workspace, follow | ||
| **Register an unregistered workspace safely** below before continuing. | ||
| 4. If nothing usable is found, tell the user publish needs a registered project, and ask for a folder. |
Comment on lines
+72
to
+75
| - Choose the deployment slot to publish. If the user named one, require exactly one match within | ||
| that agent's deployments. Otherwise present a numbered list (`deploymentName`, `deploymentType`, | ||
| `environmentId`) and let the user pick. If there are no deployments, tell the user to use the | ||
| `push-agent` skill first. |
Comment on lines
+49
to
+53
| 2. Otherwise auto-discover with `Glob: **/.config/agent.config.json` and present a numbered | ||
| pick-list; never silently use the first match. | ||
| 3. If the only candidate is an unregistered workspace (`settings.mcs.yml` + `.mcs\conn.json`, no | ||
| `.config`), follow **Register an unregistered workspace safely** below before continuing. | ||
| 4. If nothing usable is found, tell the user push needs a registered project, and ask for a folder. |
Comment on lines
+74
to
+76
| - **Existing dev slot:** prefer a deployment whose `deploymentType` is `dev`. If exactly one, use its | ||
| `deploymentName`. If several, present a pick-list. If its `environmentId` is absent, use the | ||
| selected agent's home `environmentId` when displaying and confirming the target. |
Comment on lines
+77
to
+82
| - **No dev slot:** offer to create one. Ask the user for a slot name (4–42 chars, `[-a-zA-Z0-9_]`) or | ||
| propose one, then: | ||
|
|
||
| ```bash | ||
| msagent deployment create --project '<project>' --agent-id '<agentId>' --deployment-name '<name>' --deployment-type dev --json --non-interactive | ||
| ``` |
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.

Summary
msagent-backed skills for authentication, agent listing, clone, pull, push, and publish/migrateclone/push helper onlymsagentprerequisite and tested minimum versionBehavior changes
push-agentdeploys local content to an explicitly selected dev deployment without publishingpublish-agentexplicitly confirms that current local content will be deployed and then made liveagentId/migrateand/chatremain PAC-backedValidation
npm test— 62 tests passedmsagent 0.1.49-betaCLI helpgit diff --checkpassedKnown existing issue
npm auditreports a high-severity CPU-denial-of-service advisory for the existing directjs-yamldependency below 4.3.2. This branch does not change dependencies or the lockfile.