Discovery 入门工具包部署
discovery-services-starter-kit-deployer
端到端部署 Discovery 目录中的入门工具包(starter-kit):验证 kit.json 中的 agentRefs、构建并部署每个引用的智能体工具、逐一部署每个引用的智能体,并汇总已部署的智能体/工具以及可直接提供给客户的示例提示词。当用户要求部署 Discovery 入门工具包,或部署 starter-kits/*/kit.json 中列出的所有智能体时使用此技能。
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 289
- Forks
- 101
01 前言 Front Matter
- name
- discovery-services-starter-kit-deployer
- description
- Deploy Discovery catalog starter-kits end-to-end: validate kit.json agentRefs, build and deploy every referenced agent tool, deploy each referenced agent individually, and summarize deployed agents/tools plus customer-ready sample prompts. Use this skill whenever the user asks to deploy a Discovery starter-kit or deploy all agents listed in starter-kits/*/kit.json.
- allowed-tools
- shell
02 资源文件 2
- 参考文档config.template.json525 B
- 脚本scripts/deploy-discovery-starter-kit.ps150.8 KB
03 SKILL.md 正文
Discovery Starter-Kit Deployer
Compatibility
Runs on Windows, macOS, and Linux through PowerShell 7+ (pwsh). Requires git, python with pip, and Azure CLI (az). Docker is optional because the runner can use Azure Container Registry Tasks when local Docker is unavailable.
New configurations default to Discovery GA 2026-06-01. Explicit preview versions in local configs and saved runs remain unchanged; knowledge-base bindings are validated against the selected API version.
What this skill does
Deploy a starter-kit from starter-kits\ as individual Discovery prompt agents:
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 <starter-kit-name>
The runner reads starter-kits\<starter-kit>\kit.json, validates every top-level agentRefs[].ref resolves to an existing agents\<agent>\ folder, builds every tool from those agents, deploys the tool resources in parallel, patches each referenced source agent with its own deployed tool resource ids, deploys all referenced agents in parallel, and prints a summary of deployed agents, deployed tools, and all top-level samplePrompts the customer can run manually.
For each deployed agent, the runner sets humanInTheLoop and every bound tool's confirmation to Disabled, even if the source YAML enables them. This persists for subsequent uses of the deployed agents; source YAML files remain unchanged. It does not bypass Supercomputer nodepool confirmation or approval requests in agent instructions. Starter-kit deployment does not run validation or create conversations.
When to use
Use this skill for requests like:
- "/discovery-services-starter-kit-deployer
drug-discovery" - "Deploy the
protein-structure-analysisstarter-kit" - "Deploy the agents in this starter-kit"
- "Deploy all agents referenced by this starter-kit kit.json"
If the user only wants one agent deployed, use discovery-services-agent-deployer instead. If the user only wants inventory, use discovery-catalog.
Customer inputs
| Parameter | Purpose |
|---|---|
<starter-kit-name> or -StarterKitName <name> |
Starter-kit folder name directly under starter-kits/. Required for init and -WhatIfPlan. |
-PublisherName <name> |
Deprecated. Tolerated for backwards compatibility but ignored — kits live in the flat starter-kits/<kit-name>/ layout with no publisher folder. The deployer prints a one-line deprecation notice when the flag is supplied. |
-BuildMode remote|local |
Required for every new starter-kit deployment during init; ask the customer to choose. remote queues ACR builds; local uses local Docker and pushes to ACR. Do not store build mode in config.json. |
-Stage init|build-tools|deploy-tools|deploy-agent|summary|stop |
Runs exactly one stage so Copilot TODOs can advance between commands. |
-RunDir <RunDir> |
Required with -Stage after init. |
-KnowledgeBasesJson <json-or-path> |
Required during init when any referenced agent declares discoveryExtensions.knowledgeBases. Pass either inline JSON or a path to a JSON file keyed by agent name. |
-ConfirmSupercomputerNodepools |
Run-scoped confirmation that the customer chose Proceed for the current run's tool/SKU plan. Pass it to init if the confirmation was collected before the run directory is created, or to the rerun of build-tools if the runner requested confirmation there. Do not store this in config.json. |
-WhatIfPlan |
Prints kit discovery, agentRefs, and stage plan without Azure calls. |
Local environment values live in .github\skills\discovery-services-starter-kit-deployer\config.json, copied from config.template.json. If that file is absent, the runner falls back to .github\skills\discovery-services-agent-deployer\config.json for the shared Azure/Discovery settings; starter-kit config values override the fallback when both files exist. The populated files are intentionally gitignored; never commit them. Build mode and Supercomputer nodepool confirmation are per-run choices, not config values; never write buildMode or confirmSupercomputerNodepools to config.json, and ignore/remove stale copies if they are present from older runs. During full deployment init, the runner checks required config before asking for build mode. If it emits CONFIG_INPUT_REQUIRED=true, ask the user only for the fields listed in CONFIG_FIELDS_TO_COLLECT, keep the optional defaults shown in the suggested config shape, write the ignored starter-kit config.json only when the fallback does not already provide the values, and rerun init. Only after config is complete, if the runner emits BUILD_MODE_INPUT_REQUIRED=true, ask the customer to choose remote or local, then rerun init with -BuildMode <choice>. For build-tools, first show the tool/SKU nodepool plan and collect the Proceed/Stop decision before asking for Azure build config. build/deploy-tools need subscriptionId, resourceGroup, acrName, and location; set optional acrResourceGroup when the ACR registry is in a different resource group than the Discovery deployment resources. forceToolImageRebuild must be explicitly present in either deployer config; set it to true only when build-tools should rebuild and repush images even if the same repository:tag already exists in ACR, otherwise set it to false. deploy-agent needs workspaceEndpoint, project, tenantId, and chatModel. Do not invent missing values.
When .github\skills\discovery-services-starter-kit-deployer\config.json is missing or still contains template placeholders, ask the customer for these values and create the ignored config file:
| Config field | Ask the customer for |
|---|---|
subscriptionId |
Azure subscription id that contains the Discovery resources and ACR. |
resourceGroup |
Resource group for Discovery tool and agent resources. |
acrName |
Azure Container Registry name without .azurecr.io. |
acrResourceGroup |
Optional ACR resource group when different from resourceGroup; otherwise use the same value as resourceGroup. |
location |
Discovery region. Present eastus, swedencentral, and uksouth as the supported choices, and allow a freeform text value only for future expansion or explicit customer override. |
workspaceEndpoint |
Discovery workspace endpoint, for example https://<workspace>.workspace.discovery.azure.com. |
project |
Discovery project name. |
tenantId |
Azure tenant id GUID. |
chatModel |
Chat model deployment name for the deployed agents. |
forceToolImageRebuild |
Whether to rebuild tool images even when the same ACR repository:tag already exists; ask explicitly and default to false unless the customer asks to force rebuilds. |
For location, use a multiple-choice prompt with eastus, swedencentral, and uksouth, while still allowing freeform input. Discovery currently supports only those three regions; treat any other value as an explicit future-expansion override from the customer.
Workflow
- For planning or uncertain names, run
-WhatIfPlanfirst. - Validate the starter-kit exists at
starter-kits\<starter-kit>\kit.json. - Parse
agentRefs[].refand ensure every referencedagents\<agent>\agent.yamlexists before creating deployment TODOs. - Create the native Copilot TODO list only after starter-kit preflight succeeds.
- Run stages from the repo root. Keep all starter-kit-level run artifacts under
starter-kits\tmp\<starter-kit>\<timestamp>\. For every new starter-kit run, chooseremoteorlocalbuild mode duringinit; do not letautoproceed silently. - During
init, the runner scans every referencedagent.yamlfordiscoveryExtensions.knowledgeBases. Knowledge bases are not deployed by this skill. If any are declared, the runner emitsKNOWLEDGE_BASE_INPUT_REQUIRED=trueplus oneKNOWLEDGE_BASE_REQUIRED agent=<name> count=<n>line per affected agent and a suggested JSON shape. Ask the user to provide the actualknowledgeBaseIdvalues in/bookshelves/{bookshelf_name}/knowledgeBases/{knowledgebase_name}format for GA2026-06-01(the default). Explicit preview configs also accept a/versions/{version}suffix; GA rejects it. Follow the runner'sKNOWLEDGE_BASE_ID_FORMAT; do not silently strip versions. Save the IDs to a temporary JSON file or pass inline JSON, and reruninitwith-KnowledgeBasesJson <json-or-path>. The JSON must be keyed by agent name and each value must be an array of objects withknowledgeBaseId; the runner stores these values inrun-state.jsonand patches each agent before deployment. - Before building tools, run the runner's
build-toolsstage without-ConfirmSupercomputerNodepoolsso it prints the authoritativeTOOL_BUILD_PLANlines, writes<RunDir>\build-plan.json, and pauses withTASK_STATUS=build-tools:input_required. Do not userg,grep, or ad-hoc file scanning to inspect generatedtool.yamlfiles; those tools may not be installed in the customer's shell, and the runner already parsesrecommended_skuchoices consistently. Show the customer every tool image and therecommendedSkuschoices from theTOOL_BUILD_PLANoutput orBUILD_PLAN_JSONpath. Explain that the SKUs listed for a tool are alternative nodepool choices, not cumulative requirements; the customer needs capacity for at least one listed SKU per tool. Then ask whether to proceed or stop based on their Supercomputer nodepool capacity. Useask_userwith choicesProceed - I have Supercomputer nodepool capacity for at least one listed SKU per toolandStop - I do not have the required Supercomputer nodepool capacity. Ask this at most once per run. If they choose Proceed afterbuild-toolsrequested confirmation, rerunbuild-toolswith-ConfirmSupercomputerNodepools; do not persist that confirmation inconfig.jsonbecause it must be reconfirmed for every new starter-kit run. If they choose Stop, do not runbuild-tools; immediately run-Stage stop -RunDir <RunDir>so the runner emitsTASK_STATUS=<stage>:stoppedfor every full-deployment task (init,build-tools,deploy-tools,deploy-agent,summary), even ifinithad already completed. Existing ACR tags are reused by default;forceToolImageRebuild: trueoverrides reuse and queues a rebuild for the same tag. In remote mode, submit all required ACR builds first, then track every run independently; if any build fails, stop the deployment and report the failed tool list. Agents withouttools\*\tool.yamlare recorded as skipped. - Deploy every built tool in the
deploy-toolsstage and capture eachMicrosoft.Discovery/tools/<tool>resource id. The runner deploys tool resources in parallel. - Deploy every referenced source agent individually in the
deploy-agentstage. The runner patches each agent'sdiscoveryExtensions.toolsto point to the tool resources deployed for that agent, patchesdiscoveryExtensions.knowledgeBaseswith user-provided knowledge base ids when required, writes run-local patched YAML files under<RunDir>\agents\, and upserts the agents in parallel. It does not synthesize a combined starter-kit agent. - Do not create an investigation as part of starter-kit deployment. The final summary lists the sample prompts the customer can run after deployment.
- Report only the final summary printed by the runner.
Copilot task tracking
When a TODO UI is visible, create these starter-kit TODOs after kit.json and agentRefs pass preflight:
For full deployment requests, create:
init- discover starter-kit, validate plugin, collect config, createstarter-kits\tmp\<starter-kit>\<timestamp>build-tools- build and push all referenced agent tool imagesdeploy-tools- create or update every Discovery tool resource in paralleldeploy-agent- deploy every referenced agent individually in parallelsummary- print deployed agents, tools, and customer-ready prompts
Run stage-at-a-time when TODOs are visible:
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 drug-discovery -Stage init
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage build-tools
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage deploy-tools
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage deploy-agent
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage summary
If the customer chooses Stop at the Supercomputer nodepool confirmation prompt, run:
pwsh -NoProfile -ExecutionPolicy Bypass -File .github\skills\discovery-services-starter-kit-deployer\scripts\deploy-discovery-starter-kit.ps1 -RunDir <RunDir> -Stage stop
Mark each TODO done only after the command exits successfully or emits TASK_STATUS=<stage>:done. If the runner emits TASK_STATUS=<stage>:input_required, keep that stage as waiting for input rather than failed, collect only the fields or confirmation requested by the runner, then rerun the same stage with -RunDir <RunDir>. If a stage fails, mark it failed and report the exact stage command with -RunDir <RunDir>.
Reporting contract
When the runner completes, summarize:
RUN_DIRSTARTER_KIT- referenced
AGENTS - stage statuses from
stage-todos.jsonand summary output - deployed
AGENT_DEPLOYEDnames and run-localAGENT_YAMLfiles - deployed
TOOL_DEPLOYEDvalues - numbered, complete sample prompts from
kit.json, introduced with "You can now try any of the following prompts to test the deployment:"
If the runner fails, report the failed stage and required action from the output. Include the exact stage command with -RunDir <RunDir> for recoverable failures, except when the customer chose Stop for Supercomputer nodepool capacity; in that case, do not provide a direct PowerShell rerun command and say exactly: "When you have Supercomputer nodepool capacity for at least one of the listed SKUs per tool, rerun the skill."
04 同仓库更多 Skills
quickstart-runner
Follow a supplied full QuickStart Scenario guide and its exact input files from a fresh Discovery project. Use for run this QuickStart, BioPharma, SiPhy, CMS or Bookshelf setup. Check readiness, obtain separate setup and execution approvals, and validate actual outputs. Do not replace the guide with a generated profile or infer permission from examples.
token-estimator-mvp
Estimate AI planning ranges from a work description or explicitly authorized safe project context. Provides coarse class ranges or conditional planning bases without requiring token guesses.
build-research-paper
Cross-domain / Scientific writing and publication — Build beautifully-formatted, arxiv-ready research paper PDFs from a mix of hand-authored LaTeX and/or markdown + PNG figures, using `tectonic` (default) or `pandoc` (escape hatch). Captures the reusable pattern that research projects keep re-discovering: `report/main.tex` + `references.bib` + `generate_figures.py` + iterative feedback/response scaffolding, all buildable with a single command. WHEN: write a research paper, arxiv submission, prepub, generate PDF from markdown, LaTeX paper, build main.tex, journal manuscript, referee revision, response to referee, resubmission package, publication-quality figures, matplotlib publication style, tectonic build, pandoc build, generate arxiv-ready PDF, bibliography from BibTeX.
Discovery 示例智能体导入
add-example-agents
从公共的 microsoft/discovery GitHub 仓库将智能体添加到此工作区,方式可以是:(a) 本地方式,用于 Copilot 应用,为每个智能体生成一个 `.agent.md` 伴随文件(以便每个智能体都可通过 `runSubagent` 调用);(b) 通过 `UpsertAgent` 将上游最新来源的智能体添加到 Microsoft Discovery 项目(存在时绑定已有的工具 ARM 资源,缺失时先在 Azure 中构建、推送并注册这些资源);或 (c) 将已添加到本地 Copilot 应用的智能体(来源于其 `.github/agents/<name>.agent.md` 伴随文件;带工具的智能体还带有 `discovery_catalog/<name>/` 文件夹以及本地构建的工具容器,而无工具的智能体仅有伴随文件)提升到指定的 Microsoft Discovery 项目 + Azure,且不再从上游重新获取或刷新。用户每次运行只能从这三个目标中精确选择一个。适用场景:'添加 discovery 智能体''下载 discovery 智能体''安装所有 Microsoft discovery 智能体''从 microsoft/discovery 添加智能体''从 microsoft/discovery 创建 copilot 智能体''将 discovery 智能体部署到 Foundry''将 discovery 智能体部署到 Azure''将本地智能体提升到 Microsoft Discovery''将本地智能体及其容器推送到 Discovery 项目''将本地应用智能体复制到 Azure'。始终将上游仓库 `agents/<name>/` 下每个选中的子文件夹刷新到 `discovery_catalog/<name>/`,使本地目录保持最新(出现新智能体、显现已移除的智能体、应用更新后的内容)。判断智能体是否"已在本地添加"使用 `.github/agents/<name>.agent.md`(Copilot 伴随文件),而非 `discovery_catalog/` 文件夹。对于本地部署,每个生成的 `.agent.md` 都带有延迟的 Docker 引导前言,使智能体仅在首次使用且工具镜像不存在时才构建该镜像。对于 Discovery + Azure 部署,会针对工作区的资源组(RG)通过 `GetDiscoveryTool` 对每个声明的工具进行预检,并**在工具已存在时完全跳过 Docker 构建 / ACR 推送 / AcrPull RBAC**(这在 `mdqacr` 等注册表上的共享目录镜像中很常见);仅构建并注册实际缺失的工具。始终通过 `UpsertAgent` 在选定的 Discovery 项目中创建智能体,并轮询 `GetAgent` 直到 `provisioningState=Succeeded`(MCP 的 `GetAgentOperation` 工具在实践中会返回不透明错误;切勿依赖它)。所有 MCP 调用都通过嵌入在本 SKILL.md 中、并在步骤 4d 期间具体化为 `.vscode/` 的 PowerShell 脚本进行——该技能不依赖同级的辅助文件,也不依赖 VS Code MCP 运行时在会话中途浮现 `mcp_microsoft-dis_*` 工具。通过 `agents action=create` 进行的本地 Discovery 运行时注册是可选的,默认跳过。不要用于:运行已部署的智能体(使用 runSubagent),或编辑单个智能体的提示词(直接编辑 `agent.yaml`)。
Podman Containerfile 迁移
migrate-podman-containerfile
将 Podman Containerfile 迁移为 Discovery 目录要求的规范 Dockerfile。当 PR 未通过 POL-022 检查、某个工具包含 Containerfile 或 Dockerfile.in,或贡献者要求将 Podman 构建文件转换为 Docker 构建文件时使用。仅在迁移在机械上安全时直接创建 Dockerfile,并拒绝处理存在歧义的预处理或多文件构建。
Discovery 智能体端到端部署
discovery-services-agent-deployer
通过一个命令端到端部署 Discovery 目录中的智能体:发现智能体、在存在工具时构建并绑定该工具、对没有工具的智能体跳过工具相关阶段、部署智能体,并可选择运行验证。当用户要求部署 Discovery 智能体、发布或重建智能体工具镜像、从仓库中的 Dockerfile/tool.yaml 注册 Discovery 工具、恢复失败的部署,或为该目录中的某个智能体生成预演(dry-run)部署计划时使用此技能。