[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69B9T3CPD73EZ460DWDTF1A":3,"skill-same:01M69B9T3CPD73EZ460DWDTF1A":46},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M69B9T3CPD73EZ460DWDTF1A","restore-template-configs",null,"microsoft\u002FEmployee-Self-Service-Agent-Developer-Kit","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69B8MRC17NGDB6TFWV3247A",31,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit\u002Fblob\u002Fmain\u002Fsolutions\u002Fess-maker-skills\u002Fsrc\u002Fskills\u002Frestore-template-configs\u002FSKILL.md",[],[18],"restore template configs","2026-11-10 10:12:30",false,"# Restore Template Configs Skill\n\nRe-apply ESS Workday HCM template config customisations from a backup file\nproduced by `\u002Fbackup-template-configs`. Use this after installing a new ESS\nWorkday HCM package release, which would otherwise reset customised\nreference-data records to the package defaults.\n\nRecords are matched by `msdyn_uniquename` (stable across envs), so the same\nbackup file can also be used to port customisations from dev to prod (warns\nonce, proceed-or-cancel).\n\nThis is a bounded **hybrid Workday** operation. It writes only the\n`msdyn_value` field of matching Workday reference-data template configurations\nin the extension's Dataverse environment. It does not install an ESS parent\nsolution, discover or bind a Dataverse bot, register flows, or configure a\npreferred solution.\n\nEvery **Message** block is the exact text to show the user. Copy it\nverbatim. Do not rephrase, add commentary, or tell the user what tools you\nare calling.\n\n---\n\n## Start\n\nRead `.local\u002Fconfig.json` and get `dataverseEndpoint`.\n\nIf `dataverseEndpoint` is missing or empty, show:\n\n**Message:**\n\nWorkday template-config restore needs the Dataverse environment used by your\nhybrid Workday extension. That extension has not recorded a Dataverse endpoint\nin this workspace, so no records were changed.\n\n**End message.**\n\nStop here.\n\nDo not invoke foundation setup, install a solution, bind a flow, or infer an\nendpoint. Once the Workday extension has recorded `dataverseEndpoint`, proceed.\n\n---\n\n## Step 1: Pick the backup file\n\nList candidate backup files in `workspace\u002Ftemplate-config-backups\u002F`:\n- Glob: `workspace\u002Ftemplate-config-backups\u002F*.json`\n- Sort newest first (by mtime).\n- If the folder doesn't exist or is empty, show:\n\n  **Message:**\n\n  No backup files were found in `workspace\u002Ftemplate-config-backups\u002F`.\n\n  Run `\u002Fbackup-template-configs` first to capture your customisations, or\n  copy a backup file from another machine into that folder and re-run\n  `\u002Frestore-template-configs`.\n\n  **End message.**\n\n  Stop here.\n\nUse `vscode_askQuestions` with the discovered files as options. Show the\nmost-recent two or three at the top with a `recommended: true` flag on the\nnewest. Include the filename, captured timestamp (read from each file's\n`metadata.capturedAt`), and record count.\n\n```json\n[\n  {\n    \"header\": \"BackupFile\",\n    \"question\": \"Which backup file do you want to restore from?\",\n    \"options\": [\n      { \"label\": \"{filename}\", \"description\": \"Captured {capturedAt} — {recordCount} records\", \"recommended\": true },\n      { \"label\": \"{older filename}\", \"description\": \"Captured {capturedAt} — {recordCount} records\" }\n    ],\n    \"allowFreeformInput\": true\n  }\n]\n```\n\nKeep `allowFreeformInput: true` so the customer can paste a path to a\nbackup file they have outside the default folder.\n\nCapture the selection as `{BACKUP_PATH}`.\n\n---\n\n## Step 2: Confirm intent and check env match\n\nRead the chosen backup file to inspect `metadata.envUrl`, `metadata.capturedAt`,\n`metadata.recordCount`, and `metadata.agentsDetected`. Also read the current\n`dataverseEndpoint` from `.local\u002Fconfig.json`.\n\nBuild the summary:\n\n```\nRestoring from:\n  File         : {BACKUP_PATH}\n  Captured at  : {capturedAt}\n  Source env   : {envUrl from backup}\n  Records      : {recordCount} across {agentsDetected}\n\nRestoring into:\n  Target env   : {dataverseEndpoint from .local\u002Fconfig.json}\n\nNote: restore overwrites the `msdyn_value` field on each matched record\nwith the value captured in the backup. Other fields on the record (name,\nunique name, any future fields a newer package version may have added)\nkeep whatever the current package shipped. Microsoft does not edit the\ncatalog values in `msdyn_value`, so a full overwrite is the intended\nbehaviour - your customisations win.\n```\n\nIf `metadata.envUrl` (in the backup) does NOT match `dataverseEndpoint`\n(in the current config), show one additional line in the summary:\n\n```\nNote: Backup was captured from a different environment than the target.\nThis is fine for promoting customisations across envs (e.g. dev -> prod),\nbut worth confirming.\n```\n\nUse `vscode_askQuestions`:\n\n```json\n[\n  {\n    \"header\": \"Confirm\",\n    \"question\": \"Proceed with restore?\",\n    \"options\": [\n      { \"label\": \"Yes — restore now\", \"recommended\": true },\n      { \"label\": \"Cancel\" }\n    ],\n    \"allowFreeformInput\": false\n  }\n]\n```\n\nIf they pick **Cancel**, show:\n\n**Message:**\n\nCancelled. Re-run `\u002Frestore-template-configs` whenever you're ready.\n\n**End message.**\n\nStop here.\n\n---\n\n## Step 3: Run the restore\n\n**Message:**\n\nRunning restore — this takes 1-2 seconds per record. A typical multi-agent\nenv finishes in under a minute.\n\n**End message.**\n\nRun in the terminal:\n\n```\npython scripts\u002Frestore_template_configs.py --url \u003CdataverseEndpoint> --input \u003CBACKUP_PATH> --yes --force\n```\n\n- `--yes` skips the script's overwrite prompt (the user already confirmed\n  in Step 2).\n- `--force` skips the script's own cross-env-mismatch prompt (which would\n  duplicate the Note in Step 2's summary if the envs differ; if they match,\n  `--force` is a no-op).\n\nWait for the script to finish. Read its final summary line, which looks\nlike:\n\n```\nRestore complete: N restored, M skipped, K failed.\n```\n\nCapture `N`, `M`, `K`, plus exit code.\n\n---\n\n## Step 4: Show the result\n\n### 4a — Full success (exit code 0, failed == 0)\n\nShow:\n\n```\nRestore complete.\n\n| | Count |\n|---|---|\n| Restored | {N} |\n| Skipped (not in env) | {M} |\n| Failed | 0 |\n\nYour customisations are back. If `Skipped` is non-zero, those records came\nfrom an agent installation that no longer exists in this env (e.g., a\nsolution was uninstalled). Re-install the missing solution(s) and re-run if\nyou need those records back.\n```\n\nStop here. Do not add commentary after this block.\n\n### 4b — Partial failure (exit code 4)\n\nThe script prints the first failure's full diagnostic at the end of its\noutput (status code, tip, URL, request id). Show:\n\n~~~~\nRestore partially failed.\n\n| | Count |\n|---|---|\n| Restored | {N} |\n| Skipped (not in env) | {M} |\n| Failed | {K} |\n\nFirst failure detail:\n~~~\n{paste the \"First failure detail\" block from the script's stdout verbatim}\n~~~\n\nFollow the tip in the failure message. After fixing the underlying issue\n(usually a permission gap, expired session, or transient throttling),\nre-run `\u002Frestore-template-configs` — already-restored records will simply\noverwrite with the same value, so re-running is safe.\n~~~~\n\nStop here.\n\n### 4c — Hard failure (exit code 1)\n\nThe script exits 1 only when the backup file is unusable (missing,\nunreadable, wrong schema version, no records). The script's stdout has the\nspecific reason. Show:\n\n```\nRestore failed before any records were written.\n\n{paste the script's last few lines of stdout}\n\nFix the underlying issue (usually a stale or wrong backup file) and re-run\n`\u002Frestore-template-configs`.\n```\n\nStop here.\n\n---\n\n## Notes for future maintainers of this skill\n\n- The script is idempotent: re-running over a partially-restored env writes\n  the same values again. There is no state on the script side to clean up.\n- `_call_with_refresh()` in the script handles 401 mid-restore by\n  re-authenticating once and retrying. The customer may briefly see a\n  \"Access token expired\" line; that is expected on multi-agent envs that\n  take longer than one MSAL token lifetime to restore.\n- The script does NOT support a `--dry-run` mode in v1. Showing what the\n  PATCH would look like requires diff'ing each `msdyn_value` payload, which\n  is out of scope for v1. If the customer asks \"what will this overwrite\",\n  the answer is \"every record listed in the summary, with the values that\n  were in the backup at capture time.\"\n",{},"main","a1b1bbb8aaa2435985ea2242cf836acf31b8a390","solutions\u002Fess-maker-skills\u002Fsrc\u002Fskills\u002Frestore-template-configs",19,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-13 02:21:47",{"source":7,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add microsoft\u002FEmployee-Self-Service-Agent-Developer-Kit --skill restore-template-configs",{"tool":38,"command":39},"bunx","bunx skills add microsoft\u002FEmployee-Self-Service-Agent-Developer-Kit --skill restore-template-configs",{"tool":41,"command":42},"pnpm","pnpm dlx skills add microsoft\u002FEmployee-Self-Service-Agent-Developer-Kit --skill restore-template-configs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit\u002Fblob\u002Fmain\u002Fsolutions\u002Fess-maker-skills\u002Fsrc\u002Fskills\u002Frestore-template-configs\u002FSKILL.md",true,[],[47,55,62,69,77,83],{"skillNo":48,"name":49,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M6PJDNK6N62M11V5WPFY8PK0","servicenow-da","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit\u002Fblob\u002Fmain\u002Fsolutions\u002Fess-maker-skills\u002Fsrc\u002Fskills\u002Fconnect\u002Fservicenow-da\u002FSKILL.md",[],[53,54],"servicenow","servicenow da",{"skillNo":56,"name":57,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M6PJDHJHJYWRPB3NFKY8J7SY","servicenow-da-itsm","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit\u002Fblob\u002Fmain\u002Fsolutions\u002Fess-maker-skills\u002Fsrc\u002Fskills\u002Fconnect\u002Fservicenow-da-itsm\u002FSKILL.md",[],[53,61],"servicenow da itsm",{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M6PJD93VBG12YV42JC80VTQJ","servicenow-da-hrsd","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit\u002Fblob\u002Fmain\u002Fsolutions\u002Fess-maker-skills\u002Fsrc\u002Fskills\u002Fconnect\u002Fservicenow-da-hrsd\u002FSKILL.md",[],[53,68],"servicenow da hrsd",{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M69BAFGZ25JSN9W1GMP16NHD","ESS-Diagnostics-Skills","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit\u002Fblob\u002Fmain\u002Ftools\u002FESS-Diagnostics-Skills\u002FSKILL.md",[],[75,76],"diagnostics","ESS Diagnostics Skills",{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M69BADVK3HC5BCARHN74EEGJ","update","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit\u002Fblob\u002Fmain\u002Fsolutions\u002Fess-maker-skills\u002Fsrc\u002Fskills\u002Fworkflows\u002Fupdate\u002FSKILL.md",[],[79],{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":93,"publishedAt":19},"01M69BAC4GJCHR0MS5DWEK5JRC","test","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FEmployee-Self-Service-Agent-Developer-Kit\u002Fblob\u002Fmain\u002Fsolutions\u002Fess-maker-skills\u002Fsrc\u002Fskills\u002Fworkflows\u002Ftest\u002FSKILL.md",[88],{"categoryNo":89,"categoryName":90,"taxonomyType":91,"taxonomyTypeDesc":92},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[85]]