[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69A6X8SE5ZMK7A78TFPFSRP":3,"skill-same:01M69A6X8SE5ZMK7A78TFPFSRP":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M69A6X8SE5ZMK7A78TFPFSRP","add-activity",null,"Add a new duroxide activity to the runtime. Activities are the durable boundary between the orchestration and session management — they dispatch to ManagedSession or SessionManager methods.","microsoft\u002FPilotSwarm","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69A6RNK492A5JSNBTXANKX5",16,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fadd-activity\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29],"add activity","add","activity","orchestration","boundary","management","session","dispatch","methods","runtime","session management","2026-11-10 10:12:30",false,"---\nname: add-activity\ndescription: Add a new duroxide activity to the runtime. Activities are the durable boundary between the orchestration and session management — they dispatch to ManagedSession or SessionManager methods.\n---\n\n# Add a New Activity\n\nActivities are the durable boundary between the orchestration generator and the session layer. They must only accept and return serializable data.\n\n## Steps\n\n1. **Define the activity function** in `src\u002Fsession-proxy.ts` inside `registerActivities()`:\n   ```typescript\n   runtime.registerActivity(\"myActivity\", async (ctx: any, input: any) => {\n       const { sessionId, ...args } = input;\n       const session = await sessionManager.getOrCreate(sessionId, args.config);\n       const result = await session.myMethod(args);\n       return result;\n   });\n   ```\n\n2. **Create a proxy function** in `createSessionProxy()` (session-scoped) or `createSessionManagerProxy()` (manager-scoped):\n   ```typescript\n   myActivity: (args: any) => {\n       return ctx.scheduleActivityOnSession(\n           \"myActivity\",\n           { sessionId, ...args },\n           affinityKey,\n       );\n   }\n   ```\n\n3. **Call it from the orchestration** in `src\u002Forchestration.ts`:\n   ```typescript\n   const result = yield session.myActivity(args);\n   ```\n\n4. **Add tests** in `test\u002Fsdk.test.js`.\n\n## Key constraints\n\n- Activities must only accept and return **serializable** data (no functions, no class instances).\n- Activity functions should be thin — delegate business logic to `ManagedSession` or `SessionManager`.\n- Use `ctx.scheduleActivityOnSession()` (not `ctx.scheduleActivity()`) to maintain session affinity.\n- The `affinityKey` ensures the activity runs on the same worker that holds the in-memory session.\n\n## Key files\n- [src\u002Fsession-proxy.ts](..\u002F..\u002F..\u002Fsrc\u002Fsession-proxy.ts) — activity definitions and proxy factories\n- [src\u002Forchestration.ts](..\u002F..\u002F..\u002Fsrc\u002Forchestration.ts) — orchestration generator function\n- [src\u002Ftypes.ts](..\u002F..\u002F..\u002Fsrc\u002Ftypes.ts) — type definitions for activity inputs\u002Foutputs\n","# Add a New Activity\n\nActivities are the durable boundary between the orchestration generator and the session layer. They must only accept and return serializable data.\n\n## Steps\n\n1. **Define the activity function** in `src\u002Fsession-proxy.ts` inside `registerActivities()`:\n   ```typescript\n   runtime.registerActivity(\"myActivity\", async (ctx: any, input: any) => {\n       const { sessionId, ...args } = input;\n       const session = await sessionManager.getOrCreate(sessionId, args.config);\n       const result = await session.myMethod(args);\n       return result;\n   });\n   ```\n\n2. **Create a proxy function** in `createSessionProxy()` (session-scoped) or `createSessionManagerProxy()` (manager-scoped):\n   ```typescript\n   myActivity: (args: any) => {\n       return ctx.scheduleActivityOnSession(\n           \"myActivity\",\n           { sessionId, ...args },\n           affinityKey,\n       );\n   }\n   ```\n\n3. **Call it from the orchestration** in `src\u002Forchestration.ts`:\n   ```typescript\n   const result = yield session.myActivity(args);\n   ```\n\n4. **Add tests** in `test\u002Fsdk.test.js`.\n\n## Key constraints\n\n- Activities must only accept and return **serializable** data (no functions, no class instances).\n- Activity functions should be thin — delegate business logic to `ManagedSession` or `SessionManager`.\n- Use `ctx.scheduleActivityOnSession()` (not `ctx.scheduleActivity()`) to maintain session affinity.\n- The `affinityKey` ensures the activity runs on the same worker that holds the in-memory session.\n\n## Key files\n- [src\u002Fsession-proxy.ts](..\u002F..\u002F..\u002Fsrc\u002Fsession-proxy.ts) — activity definitions and proxy factories\n- [src\u002Forchestration.ts](..\u002F..\u002F..\u002Fsrc\u002Forchestration.ts) — orchestration generator function\n- [src\u002Ftypes.ts](..\u002F..\u002F..\u002Fsrc\u002Ftypes.ts) — type definitions for activity inputs\u002Foutputs\n",{"name":5,"description":7},"main","cecafe1ca7a9f2778a6166abdd12f6165d99f777",".github\u002Fskills\u002Fadd-activity",10,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-15 00:36:04",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add microsoft\u002FPilotSwarm --skill add-activity",{"tool":50,"command":51},"bunx","bunx skills add microsoft\u002FPilotSwarm --skill add-activity",{"tool":53,"command":54},"pnpm","pnpm dlx skills add microsoft\u002FPilotSwarm --skill add-activity","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fadd-activity\u002FSKILL.md",true,[],[59,67,74,81,88,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":66},"01M760N7TCZBTY635MYZQ8YAB0","workflow-testing","Load before you test a Workflow with mocked effects — the test, test_respond and test_advance operations, fixtures, interception ids, valid answers, the virtual clock, test evidence and what a test run does not prove.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Ftest-mode-skills\u002Fworkflow-testing\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":66},"01M760N4RKD6BMYPGHD490SNN2","workflow-tools","Every argument of the Workflow tools, testing a revision, package definitions and the refusals you can fix. Load when a Workflow tool's short description is not enough.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Fskills\u002Fworkflow-tools\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":66},"01M760N1P2VTGVE6C4N5WF3FVR","workflow-reference","Field reference for Workflow YAML (root keys, every state type, bindings, outputs, runtime error codes), what the engine guarantees, and a review fan-out example. For design, call load_skill with name workflow-authoring.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Fskills\u002Fworkflow-reference\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":66},"01M760MZ5CFSAX4FYMEXZJBGM2","workflow-patterns","Load when one Workflow must run different nodes in its branches at the same time (a different prompt or model for each branch), or loops back to a state (a polling loop). Named branches, the router pattern, examples that compile.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Fskills\u002Fworkflow-patterns\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":66},"01M760MWKBDJFEECRFAF3BAVQ2","workflow-authoring","Load before you create, edit, publish or run a Workflow (pilotswarm.dev\u002Fv1) — choosing states, bounded graphs, bindings, typed contracts, agent and parallel states, the lifecycle and failure diagnosis.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Fskills\u002Fworkflow-authoring\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":66},"01M760MN4Y9199ARAY85DWD08X","tla-formal-validation","Required for any change to the core orchestrations (the durable session orchestration, session hydration and dehydration, and the Workflow controller and store). Teaches how to model the change in TLA+, update the existing models, run TLC with the repo runner, read the results, turn a counterexample into a fix and a regression test, and record the binding to the code.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftla-formal-validation\u002FSKILL.md",[],[]]