workpilot 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. workpilot-0.1.5/.claude/ISSUE_TEMPLATE/JitAccess.yml +28 -0
  2. workpilot-0.1.5/.claude/acl/access.yml +16 -0
  3. workpilot-0.1.5/.claude/compliance/inventory.yml +6 -0
  4. workpilot-0.1.5/.claude/policies/jit.yml +19 -0
  5. workpilot-0.1.5/.claude/settings.json +31 -0
  6. workpilot-0.1.5/.claude/workflows/cloud-gateway-cd.yml +156 -0
  7. workpilot-0.1.5/.claude/workflows/cloud-gateway-ci.yml +134 -0
  8. workpilot-0.1.5/.claude/workflows/teams-app-package.yml +42 -0
  9. workpilot-0.1.5/.claude/workflows/workpilot-ci.yml +88 -0
  10. workpilot-0.1.5/.gitignore +88 -0
  11. workpilot-0.1.5/CLAUDE.md +273 -0
  12. workpilot-0.1.5/PKG-INFO +44 -0
  13. workpilot-0.1.5/README.md +328 -0
  14. workpilot-0.1.5/cloud_gateway/CloudGateway.slnx +9 -0
  15. workpilot-0.1.5/cloud_gateway/infra/.azure/.gitignore +2 -0
  16. workpilot-0.1.5/cloud_gateway/infra/.azure/config.json +1 -0
  17. workpilot-0.1.5/cloud_gateway/infra/.azure/dev/config.json +1 -0
  18. workpilot-0.1.5/cloud_gateway/infra/azure.yaml +25 -0
  19. workpilot-0.1.5/cloud_gateway/infra/main.bicep +125 -0
  20. workpilot-0.1.5/cloud_gateway/infra/main.json +844 -0
  21. workpilot-0.1.5/cloud_gateway/infra/modules/app-insights.bicep +35 -0
  22. workpilot-0.1.5/cloud_gateway/infra/modules/app-service.bicep +117 -0
  23. workpilot-0.1.5/cloud_gateway/infra/modules/bot-service.bicep +79 -0
  24. workpilot-0.1.5/cloud_gateway/infra/modules/key-vault.bicep +44 -0
  25. workpilot-0.1.5/cloud_gateway/infra/modules/uami.bicep +19 -0
  26. workpilot-0.1.5/cloud_gateway/infra/parameters/dev.bicepparam +15 -0
  27. workpilot-0.1.5/cloud_gateway/infra/parameters/prod.bicepparam +16 -0
  28. workpilot-0.1.5/cloud_gateway/infra/scripts/setup-entra.sh +136 -0
  29. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Auth/BypassAuthHandler.cs +66 -0
  30. workpilot-0.1.5/cloud_gateway/src/CloudGateway/CloudGateway.csproj +27 -0
  31. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Config/BypassAuthOptions.cs +25 -0
  32. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Config/DirectLineOptions.cs +33 -0
  33. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Config/RateLimitOptions.cs +12 -0
  34. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Config/RelayOptions.cs +47 -0
  35. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Config/TeamsOptions.cs +9 -0
  36. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Endpoints/AuthEndpoints.cs +171 -0
  37. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Endpoints/BotWebChatEndpoint.cs +340 -0
  38. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Endpoints/DebugEndpoints.cs +77 -0
  39. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Endpoints/HealthEndpoints.cs +28 -0
  40. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Helpers/ClaimHelper.cs +28 -0
  41. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Middleware/CorrelationIdMiddleware.cs +23 -0
  42. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Middleware/RateLimitMiddleware.cs +82 -0
  43. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Middleware/RequestLoggingMiddleware.cs +34 -0
  44. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Models/ReplyContext.cs +38 -0
  45. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Models/WireFrames.cs +184 -0
  46. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Program.cs +421 -0
  47. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Properties/launchSettings.json +23 -0
  48. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Relay/ConnectEndpoint.cs +336 -0
  49. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Relay/WebChatEndpoint.cs +299 -0
  50. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/IClientRegistry.cs +66 -0
  51. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/IMessageDelivery.cs +14 -0
  52. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/IOfflineBuffer.cs +18 -0
  53. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/IOutboundRouter.cs +20 -0
  54. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/IReplyContextStore.cs +24 -0
  55. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/IWebChatRegistry.cs +28 -0
  56. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/InMemoryClientRegistry.cs +60 -0
  57. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/InMemoryOfflineBuffer.cs +69 -0
  58. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/InMemoryReplyContextStore.cs +95 -0
  59. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/InMemoryWebChatRegistry.cs +22 -0
  60. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/MessageDelivery.cs +45 -0
  61. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/OutboundRouter.cs +112 -0
  62. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/StreamingChunkBuffer.cs +109 -0
  63. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Services/StubOutboundRouter.cs +32 -0
  64. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Teams/TeamsReplyService.cs +125 -0
  65. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Teams/WorkPilotAgent.cs +194 -0
  66. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Templates/auth-fallback.js +3 -0
  67. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Templates/auth-msal.js +50 -0
  68. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Templates/chat.html +216 -0
  69. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Templates/home.html +467 -0
  70. workpilot-0.1.5/cloud_gateway/src/CloudGateway/Templates/login.html +57 -0
  71. workpilot-0.1.5/cloud_gateway/src/CloudGateway/appsettings.Development.json +46 -0
  72. workpilot-0.1.5/cloud_gateway/src/CloudGateway/appsettings.json +58 -0
  73. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Integration/CloudGateway.Integration.csproj +32 -0
  74. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Integration/HealthEndpointTests.cs +49 -0
  75. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Integration/TeamsActivityTests.cs +179 -0
  76. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/CloudGateway.Unit.csproj +32 -0
  77. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/Endpoints/BotWebChatEndpointTests.cs +249 -0
  78. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/Middleware/RateLimitMiddlewareTests.cs +124 -0
  79. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/Models/WireFrameSerializationTests.cs +224 -0
  80. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/Services/InMemoryClientRegistryTests.cs +79 -0
  81. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/Services/InMemoryOfflineBufferTests.cs +108 -0
  82. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/Services/InMemoryReplyContextStoreTests.cs +143 -0
  83. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/Services/OutboundRouterTests.cs +225 -0
  84. workpilot-0.1.5/cloud_gateway/tests/CloudGateway.Unit/Services/StreamingChunkBufferTests.cs +107 -0
  85. workpilot-0.1.5/cloud_gateway/tests/e2e_channel_test.py +350 -0
  86. workpilot-0.1.5/cloud_gateway/tests/e2e_dev_smoke.py +178 -0
  87. workpilot-0.1.5/cloud_gateway/tests/e2e_protocol_test.py +697 -0
  88. workpilot-0.1.5/cloud_gateway/tests/e2e_teams_test.py +208 -0
  89. workpilot-0.1.5/cloud_gateway/tests/e2e_webchat_test.py +253 -0
  90. workpilot-0.1.5/cloud_gateway/tests/e2e_ws_test.py +63 -0
  91. workpilot-0.1.5/design/builtin-agents.md +435 -0
  92. workpilot-0.1.5/design/builtin-features.md +228 -0
  93. workpilot-0.1.5/design/cloud-gateway/server.md +1002 -0
  94. workpilot-0.1.5/design/cloud-gateway/teams-app-package.md +197 -0
  95. workpilot-0.1.5/design/cloud-gateway/webchat-botframework.md +236 -0
  96. workpilot-0.1.5/design/core/agent.md +322 -0
  97. workpilot-0.1.5/design/core/channel.md +267 -0
  98. workpilot-0.1.5/design/core/message-bus.md +236 -0
  99. workpilot-0.1.5/design/core/scheduler.md +325 -0
  100. workpilot-0.1.5/design/core/skill.md +240 -0
  101. workpilot-0.1.5/design/core/tool.md +307 -0
  102. workpilot-0.1.5/design/core-infra.md +485 -0
  103. workpilot-0.1.5/design/features/agent-default.md +720 -0
  104. workpilot-0.1.5/design/features/agent-explorer.md +181 -0
  105. workpilot-0.1.5/design/features/agent-security.md +548 -0
  106. workpilot-0.1.5/design/features/channel-cli.md +61 -0
  107. workpilot-0.1.5/design/features/channel-cloud.md +455 -0
  108. workpilot-0.1.5/design/features/channel-web.md +78 -0
  109. workpilot-0.1.5/design/features/cli.md +521 -0
  110. workpilot-0.1.5/design/features/tool-browser.md +255 -0
  111. workpilot-0.1.5/design/features/tool-cron.md +188 -0
  112. workpilot-0.1.5/design/features/tool-files.md +355 -0
  113. workpilot-0.1.5/design/features/tool-git.md +250 -0
  114. workpilot-0.1.5/design/features/tool-http.md +286 -0
  115. workpilot-0.1.5/design/features/tool-message.md +149 -0
  116. workpilot-0.1.5/design/features/tool-shell.md +323 -0
  117. workpilot-0.1.5/design/features/tool-spawn.md +253 -0
  118. workpilot-0.1.5/pitch-deck.html +1448 -0
  119. workpilot-0.1.5/pitch-deck.md +322 -0
  120. workpilot-0.1.5/pyproject.toml +87 -0
  121. workpilot-0.1.5/research/01-openclaw.md +175 -0
  122. workpilot-0.1.5/research/02-nanobot.md +191 -0
  123. workpilot-0.1.5/research/03-nanoclaw.md +223 -0
  124. workpilot-0.1.5/research/04-ironclaw.md +203 -0
  125. workpilot-0.1.5/research/05-zeroclaw.md +271 -0
  126. workpilot-0.1.5/research/README.md +77 -0
  127. workpilot-0.1.5/teams/build.ps1 +22 -0
  128. workpilot-0.1.5/teams/build.sh +18 -0
  129. workpilot-0.1.5/teams/color.png +0 -0
  130. workpilot-0.1.5/teams/logo-outline.svg +8 -0
  131. workpilot-0.1.5/teams/logo.svg +23 -0
  132. workpilot-0.1.5/teams/manifest.json +72 -0
  133. workpilot-0.1.5/teams/outline.png +0 -0
  134. workpilot-0.1.5/tests/__init__.py +0 -0
  135. workpilot-0.1.5/tests/test_approval.py +179 -0
  136. workpilot-0.1.5/tests/test_audit.py +77 -0
  137. workpilot-0.1.5/tests/test_builtin_agents.py +140 -0
  138. workpilot-0.1.5/tests/test_bus.py +180 -0
  139. workpilot-0.1.5/tests/test_compaction.py +205 -0
  140. workpilot-0.1.5/tests/test_config.py +130 -0
  141. workpilot-0.1.5/tests/test_context.py +348 -0
  142. workpilot-0.1.5/tests/test_e2e.py +463 -0
  143. workpilot-0.1.5/tests/test_e2e_infra.py +577 -0
  144. workpilot-0.1.5/tests/test_estop.py +129 -0
  145. workpilot-0.1.5/tests/test_gateway.py +305 -0
  146. workpilot-0.1.5/tests/test_gateway_api.py +496 -0
  147. workpilot-0.1.5/tests/test_gateway_tools.py +293 -0
  148. workpilot-0.1.5/tests/test_github_auth.py +217 -0
  149. workpilot-0.1.5/tests/test_graph.py +263 -0
  150. workpilot-0.1.5/tests/test_hook_pipeline.py +300 -0
  151. workpilot-0.1.5/tests/test_hooks.py +62 -0
  152. workpilot-0.1.5/tests/test_leak_detection.py +169 -0
  153. workpilot-0.1.5/tests/test_leak_patterns.py +294 -0
  154. workpilot-0.1.5/tests/test_loop_detect.py +146 -0
  155. workpilot-0.1.5/tests/test_loop_hooks.py +361 -0
  156. workpilot-0.1.5/tests/test_mcp.py +283 -0
  157. workpilot-0.1.5/tests/test_memory_enhanced.py +334 -0
  158. workpilot-0.1.5/tests/test_new_tools.py +255 -0
  159. workpilot-0.1.5/tests/test_pr6_fixes.py +258 -0
  160. workpilot-0.1.5/tests/test_rbac.py +195 -0
  161. workpilot-0.1.5/tests/test_real_tools.py +1062 -0
  162. workpilot-0.1.5/tests/test_router.py +139 -0
  163. workpilot-0.1.5/tests/test_sandbox.py +87 -0
  164. workpilot-0.1.5/tests/test_sanitizer.py +46 -0
  165. workpilot-0.1.5/tests/test_scheduler.py +909 -0
  166. workpilot-0.1.5/tests/test_search_files.py +181 -0
  167. workpilot-0.1.5/tests/test_security_agent.py +595 -0
  168. workpilot-0.1.5/tests/test_session.py +61 -0
  169. workpilot-0.1.5/tests/test_skills.py +420 -0
  170. workpilot-0.1.5/tests/test_spawn_scoped.py +169 -0
  171. workpilot-0.1.5/tests/test_ssrf.py +387 -0
  172. workpilot-0.1.5/tests/test_streaming.py +359 -0
  173. workpilot-0.1.5/tests/test_tool_metadata.py +224 -0
  174. workpilot-0.1.5/tests/test_tools.py +152 -0
  175. workpilot-0.1.5/tests/test_web_channel.py +925 -0
  176. workpilot-0.1.5/tests/test_web_tools.py +417 -0
  177. workpilot-0.1.5/tests/test_workflows.py +279 -0
  178. workpilot-0.1.5/workpilot/__init__.py +3 -0
  179. workpilot-0.1.5/workpilot/__main__.py +5 -0
  180. workpilot-0.1.5/workpilot/agent/__init__.py +0 -0
  181. workpilot-0.1.5/workpilot/agent/compaction.py +201 -0
  182. workpilot-0.1.5/workpilot/agent/context.py +323 -0
  183. workpilot-0.1.5/workpilot/agent/loop.py +545 -0
  184. workpilot-0.1.5/workpilot/agent/loop_detect.py +154 -0
  185. workpilot-0.1.5/workpilot/agent/memory.py +885 -0
  186. workpilot-0.1.5/workpilot/agent/tools/__init__.py +4 -0
  187. workpilot-0.1.5/workpilot/agent/tools/base.py +70 -0
  188. workpilot-0.1.5/workpilot/agent/tools/browser.py +660 -0
  189. workpilot-0.1.5/workpilot/agent/tools/cron.py +176 -0
  190. workpilot-0.1.5/workpilot/agent/tools/filesystem.py +419 -0
  191. workpilot-0.1.5/workpilot/agent/tools/git.py +86 -0
  192. workpilot-0.1.5/workpilot/agent/tools/message.py +107 -0
  193. workpilot-0.1.5/workpilot/agent/tools/registry.py +120 -0
  194. workpilot-0.1.5/workpilot/agent/tools/shell.py +95 -0
  195. workpilot-0.1.5/workpilot/agent/tools/spawn.py +193 -0
  196. workpilot-0.1.5/workpilot/agent/tools/web.py +587 -0
  197. workpilot-0.1.5/workpilot/agents/__init__.py +3 -0
  198. workpilot-0.1.5/workpilot/agents/builtin.py +161 -0
  199. workpilot-0.1.5/workpilot/bus/__init__.py +11 -0
  200. workpilot-0.1.5/workpilot/bus/events.py +85 -0
  201. workpilot-0.1.5/workpilot/bus/queue.py +144 -0
  202. workpilot-0.1.5/workpilot/channels/__init__.py +4 -0
  203. workpilot-0.1.5/workpilot/channels/ado.py +133 -0
  204. workpilot-0.1.5/workpilot/channels/base.py +73 -0
  205. workpilot-0.1.5/workpilot/channels/cli.py +95 -0
  206. workpilot-0.1.5/workpilot/channels/cloud.py +601 -0
  207. workpilot-0.1.5/workpilot/channels/github.py +97 -0
  208. workpilot-0.1.5/workpilot/channels/manager.py +78 -0
  209. workpilot-0.1.5/workpilot/channels/outlook.py +94 -0
  210. workpilot-0.1.5/workpilot/channels/teams.py +106 -0
  211. workpilot-0.1.5/workpilot/channels/web.py +158 -0
  212. workpilot-0.1.5/workpilot/cli/__init__.py +0 -0
  213. workpilot-0.1.5/workpilot/cli/commands.py +1515 -0
  214. workpilot-0.1.5/workpilot/config/__init__.py +4 -0
  215. workpilot-0.1.5/workpilot/config/loader.py +165 -0
  216. workpilot-0.1.5/workpilot/config/schema.py +533 -0
  217. workpilot-0.1.5/workpilot/cron/__init__.py +5 -0
  218. workpilot-0.1.5/workpilot/cron/service.py +747 -0
  219. workpilot-0.1.5/workpilot/gateway/__init__.py +6 -0
  220. workpilot-0.1.5/workpilot/gateway/auth.py +254 -0
  221. workpilot-0.1.5/workpilot/gateway/estop_middleware.py +76 -0
  222. workpilot-0.1.5/workpilot/gateway/middleware.py +116 -0
  223. workpilot-0.1.5/workpilot/gateway/server.py +953 -0
  224. workpilot-0.1.5/workpilot/gateway/static/chat.html +1537 -0
  225. workpilot-0.1.5/workpilot/gateway/static/favicon.svg +22 -0
  226. workpilot-0.1.5/workpilot/gateway/static/status.html +530 -0
  227. workpilot-0.1.5/workpilot/graph/__init__.py +20 -0
  228. workpilot-0.1.5/workpilot/graph/auth.py +165 -0
  229. workpilot-0.1.5/workpilot/graph/client.py +127 -0
  230. workpilot-0.1.5/workpilot/graph/mail.py +155 -0
  231. workpilot-0.1.5/workpilot/graph/teams.py +109 -0
  232. workpilot-0.1.5/workpilot/graph/tools.py +310 -0
  233. workpilot-0.1.5/workpilot/heartbeat/__init__.py +5 -0
  234. workpilot-0.1.5/workpilot/heartbeat/service.py +202 -0
  235. workpilot-0.1.5/workpilot/hooks/__init__.py +19 -0
  236. workpilot-0.1.5/workpilot/hooks/handlers.py +250 -0
  237. workpilot-0.1.5/workpilot/hooks/manager.py +167 -0
  238. workpilot-0.1.5/workpilot/mcp/__init__.py +15 -0
  239. workpilot-0.1.5/workpilot/mcp/client.py +278 -0
  240. workpilot-0.1.5/workpilot/mcp/server.py +293 -0
  241. workpilot-0.1.5/workpilot/mcp/transport.py +221 -0
  242. workpilot-0.1.5/workpilot/plugins/__init__.py +0 -0
  243. workpilot-0.1.5/workpilot/plugins/loader.py +33 -0
  244. workpilot-0.1.5/workpilot/providers/__init__.py +4 -0
  245. workpilot-0.1.5/workpilot/providers/base.py +88 -0
  246. workpilot-0.1.5/workpilot/providers/litellm_provider.py +193 -0
  247. workpilot-0.1.5/workpilot/providers/router.py +257 -0
  248. workpilot-0.1.5/workpilot/runtime.py +474 -0
  249. workpilot-0.1.5/workpilot/security/__init__.py +25 -0
  250. workpilot-0.1.5/workpilot/security/approval.py +229 -0
  251. workpilot-0.1.5/workpilot/security/audit.py +163 -0
  252. workpilot-0.1.5/workpilot/security/classifier.py +291 -0
  253. workpilot-0.1.5/workpilot/security/credentials.py +107 -0
  254. workpilot-0.1.5/workpilot/security/estop.py +117 -0
  255. workpilot-0.1.5/workpilot/security/github_auth.py +218 -0
  256. workpilot-0.1.5/workpilot/security/leak.py +71 -0
  257. workpilot-0.1.5/workpilot/security/rbac.py +290 -0
  258. workpilot-0.1.5/workpilot/security/sandbox.py +111 -0
  259. workpilot-0.1.5/workpilot/security/sanitizer.py +68 -0
  260. workpilot-0.1.5/workpilot/security/ssrf.py +101 -0
  261. workpilot-0.1.5/workpilot/session/__init__.py +3 -0
  262. workpilot-0.1.5/workpilot/session/manager.py +129 -0
  263. workpilot-0.1.5/workpilot/skills/__init__.py +5 -0
  264. workpilot-0.1.5/workpilot/skills/bundled/__init__.py +0 -0
  265. workpilot-0.1.5/workpilot/skills/bundled/ado.md +16 -0
  266. workpilot-0.1.5/workpilot/skills/bundled/github.md +18 -0
  267. workpilot-0.1.5/workpilot/skills/loader.py +280 -0
  268. workpilot-0.1.5/workpilot/templates/AGENTS.md +20 -0
  269. workpilot-0.1.5/workpilot/templates/HEARTBEAT.md +16 -0
  270. workpilot-0.1.5/workpilot/templates/MEMORY.md +6 -0
  271. workpilot-0.1.5/workpilot/templates/SOUL.md +15 -0
  272. workpilot-0.1.5/workpilot/templates/TOOLS.md +43 -0
  273. workpilot-0.1.5/workpilot/templates/USER.md +26 -0
  274. workpilot-0.1.5/workpilot/utils/__init__.py +0 -0
  275. workpilot-0.1.5/workpilot/utils/helpers.py +58 -0
  276. workpilot-0.1.5/workpilot/workflows/__init__.py +13 -0
  277. workpilot-0.1.5/workpilot/workflows/dev.py +632 -0
  278. workpilot-0.1.5/workpilot/workflows/office.py +542 -0
  279. workpilot-0.1.5/workpilot.yaml +137 -0
@@ -0,0 +1,28 @@
1
+ name: Temporary administrator access request
2
+ description: Request for temporary repository administrator access to this repository, a.k.a Just-in-Time (JIT) access.
3
+ title: "JIT Request"
4
+ labels: ["jit"]
5
+ assignees:
6
+ - gimsvc_microsoft
7
+ -
8
+ body:
9
+ - type: markdown
10
+ attributes:
11
+ value: |
12
+ :closed_lock_with_key: Permanent repository administrator access is not allowed as per Microsoft security policy. You can use this form to request for temporary administrator access to this repository.
13
+ - type: textarea
14
+ id: justification
15
+ attributes:
16
+ label: Justification
17
+ description: Describe the actions that you will perform with your temporary administrator access.
18
+ placeholder: I need to create secrets.
19
+ validations:
20
+ required: true
21
+ - type: dropdown
22
+ id: duration
23
+ attributes:
24
+ label: Duration (hours)
25
+ description: How long do you need access for? The duration you select is in hours.
26
+ options:
27
+ - 1
28
+ - 2
@@ -0,0 +1,16 @@
1
+ # Documentation for ACL policy: https://aka.ms/gim/docs/policy/acl
2
+
3
+ name: Access control list
4
+ description: List of teams and their permission levels
5
+ resource: repository
6
+ where:
7
+ configuration:
8
+ manageAccess:
9
+ - member: weilail
10
+ role: Maintain
11
+ - member: xiaowxie
12
+ role: Maintain
13
+ - team: CustomerConnectAdmin
14
+ role: Push
15
+ - team: M365CENGFTEs
16
+ role: Push
@@ -0,0 +1,6 @@
1
+ inventory:
2
+ - source: DirectOwners
3
+ items:
4
+ - id: weilail@microsoft.com
5
+ - id: xiaowxie@microsoft.com
6
+ isProduction: false
@@ -0,0 +1,19 @@
1
+ # Documentation for JIT policy: https://aka.ms/gim/docs/policy/jit
2
+
3
+ # metadata
4
+ id: id
5
+ name: JIT_Access
6
+ description: Policy for admin JIT for repos in this org
7
+
8
+ # filters
9
+ resource: repository
10
+
11
+ # primitive configuration
12
+ configuration:
13
+ jitAccess:
14
+ enabled: true
15
+ maxHours: 2
16
+ approvers:
17
+ role: Maintain
18
+ requestors:
19
+ role: Write
@@ -0,0 +1,31 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(*)",
5
+ "Bash(git clone:*)",
6
+ "Bash(git commit:*)",
7
+ "Bash(git push:*)",
8
+ "Bash(gh:*)",
9
+ "Bash(gh api:*)",
10
+ "Bash(gh search:*)",
11
+ "Bash(gh repo:*)",
12
+ "Bash(gh issue:*)",
13
+ "Bash(gh pr:*)",
14
+ "Bash(wc:*)",
15
+ "Bash(grep:*)",
16
+ "Bash(python:*)",
17
+ "Bash(xargs grep:*)",
18
+ "Bash(sed:*)",
19
+ "Write",
20
+ "Read",
21
+ "Glob",
22
+ "Grep",
23
+ "NotebookEdit",
24
+ "WebFetch",
25
+ "WebSearch",
26
+ "WebFetch(domain:github.com)",
27
+ "Task",
28
+ "Skill"
29
+ ]
30
+ }
31
+ }
@@ -0,0 +1,156 @@
1
+ name: Cloud Gateway CD
2
+
3
+ # Deploys to Azure App Service when changes merge to main.
4
+ # Uses OIDC federated credentials — no client secret stored in GitHub.
5
+ #
6
+ # Required GitHub secrets (set in repo Settings → Secrets → Actions):
7
+ # AZURE_CLIENT_ID — federated service principal (contributor on resource group)
8
+ # AZURE_TENANT_ID — 72f988bf-86f1-41af-91ab-2d7cd011db47
9
+ # AZURE_SUBSCRIPTION_ID — 6b3685a0-3ff1-4d6e-80d5-0ea493dc144a
10
+ #
11
+ # Required GitHub variables (Settings → Variables → Actions):
12
+ # AZURE_WEBAPP_NAME_DEV — workpilot-gw-dev
13
+ # AZURE_RESOURCE_GROUP — future-test
14
+ #
15
+ # To set up federated credentials:
16
+ # az ad sp create-for-rbac \
17
+ # --name "workpilot-gw-cd" \
18
+ # --role "Contributor" \
19
+ # --scopes /subscriptions/<sub>/resourceGroups/future-test \
20
+ # --sdk-auth # outputs clientId, tenantId, subscriptionId
21
+ # Then add federated credential in Azure Portal:
22
+ # App Registration → Certificates & secrets → Federated credentials
23
+ # Scenario: GitHub Actions → repo: gim-home/WorkPilot → branch: main
24
+
25
+ on:
26
+ push:
27
+ branches:
28
+ - main
29
+ paths:
30
+ - "cloud_gateway/src/**"
31
+ - "cloud_gateway/CloudGateway.slnx"
32
+ - ".github/workflows/cloud-gateway-cd.yml"
33
+
34
+ # Allow manual trigger (e.g., hotfix deploy)
35
+ workflow_dispatch:
36
+ inputs:
37
+ environment:
38
+ description: "Target environment"
39
+ required: true
40
+ default: "dev"
41
+ type: choice
42
+ options:
43
+ - dev
44
+
45
+ defaults:
46
+ run:
47
+ working-directory: cloud_gateway
48
+
49
+ permissions:
50
+ id-token: write # required for OIDC token
51
+ contents: read
52
+
53
+ jobs:
54
+ # ── 1. Build & publish artifact ───────────────────────────────────────────
55
+ build:
56
+ name: Build & Publish (.NET 10)
57
+ runs-on: windows-latest
58
+ outputs:
59
+ artifact-name: ${{ steps.set-artifact.outputs.name }}
60
+
61
+ steps:
62
+ - name: Checkout
63
+ uses: actions/checkout@v4
64
+
65
+ - name: Setup .NET 10
66
+ uses: actions/setup-dotnet@v4
67
+ with:
68
+ dotnet-version: "10.x"
69
+
70
+ - name: Restore
71
+ run: dotnet restore CloudGateway.slnx
72
+
73
+ - name: Build (Release)
74
+ run: dotnet build CloudGateway.slnx --no-restore --configuration Release
75
+
76
+ - name: Run tests
77
+ run: |
78
+ dotnet test CloudGateway.slnx --no-build --configuration Release `
79
+ --logger "trx;LogFileName=test-results.trx" `
80
+ --results-directory TestResults
81
+
82
+ - name: Upload test results
83
+ if: always()
84
+ uses: actions/upload-artifact@v4
85
+ with:
86
+ name: test-results-cd
87
+ path: cloud_gateway/TestResults/*.trx
88
+
89
+ - name: Publish (self-contained for Windows x64)
90
+ run: |
91
+ dotnet publish src/CloudGateway/CloudGateway.csproj `
92
+ --configuration Release `
93
+ --runtime win-x64 `
94
+ --self-contained false `
95
+ --output publish/
96
+
97
+ - name: Set artifact name
98
+ id: set-artifact
99
+ run: echo "name=cloud-gateway-${{ github.sha }}" >> $env:GITHUB_OUTPUT
100
+
101
+ - name: Upload publish artifact
102
+ uses: actions/upload-artifact@v4
103
+ with:
104
+ name: ${{ steps.set-artifact.outputs.name }}
105
+ path: cloud_gateway/publish/
106
+ if-no-files-found: error
107
+
108
+ # ── 2. Deploy to Dev ──────────────────────────────────────────────────────
109
+ deploy-dev:
110
+ name: Deploy → Dev
111
+ runs-on: ubuntu-latest
112
+ needs: build
113
+ environment: dev # maps to GitHub environment for approval gates (optional)
114
+
115
+ steps:
116
+ - name: Download publish artifact
117
+ uses: actions/download-artifact@v4
118
+ with:
119
+ name: ${{ needs.build.outputs.artifact-name }}
120
+ path: publish/
121
+
122
+ - name: Azure login (OIDC)
123
+ uses: azure/login@v2
124
+ with:
125
+ client-id: ${{ secrets.AZURE_CLIENT_ID }}
126
+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}
127
+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
128
+
129
+ - name: Zip publish output
130
+ run: zip -r deploy.zip publish/
131
+
132
+ - name: Deploy to Azure App Service
133
+ uses: azure/webapps-deploy@v3
134
+ with:
135
+ app-name: ${{ vars.AZURE_WEBAPP_NAME_DEV }}
136
+ package: deploy.zip
137
+
138
+ - name: Smoke test — health endpoint
139
+ run: |
140
+ APP_URL="https://${{ vars.AZURE_WEBAPP_NAME_DEV }}.azurewebsites.net"
141
+ echo "Smoke testing $APP_URL/health ..."
142
+ for i in $(seq 1 12); do
143
+ STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$APP_URL/health" || true)
144
+ if [ "$STATUS" = "200" ]; then
145
+ echo "Health check passed (attempt $i)"
146
+ exit 0
147
+ fi
148
+ echo "Attempt $i: got $STATUS — waiting 5s..."
149
+ sleep 5
150
+ done
151
+ echo "ERROR: health check failed after 60s"
152
+ exit 1
153
+
154
+ - name: Azure logout
155
+ if: always()
156
+ run: az logout
@@ -0,0 +1,134 @@
1
+ name: Cloud Gateway CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - impl/cloud-gateway
7
+ - main
8
+ paths:
9
+ - "cloud_gateway/**"
10
+ - ".github/workflows/cloud-gateway-ci.yml"
11
+ pull_request:
12
+ branches:
13
+ - main
14
+ paths:
15
+ - "cloud_gateway/**"
16
+ - ".github/workflows/cloud-gateway-ci.yml"
17
+
18
+ defaults:
19
+ run:
20
+ working-directory: cloud_gateway
21
+
22
+ jobs:
23
+ # ── 1. Build + Unit/Integration Tests ─────────────────────────────────────
24
+ build-and-test:
25
+ name: Build & Test (.NET 10 / Windows)
26
+ runs-on: windows-latest
27
+
28
+ steps:
29
+ - name: Checkout
30
+ uses: actions/checkout@v4
31
+
32
+ - name: Setup .NET 10
33
+ uses: actions/setup-dotnet@v4
34
+ with:
35
+ dotnet-version: "10.x"
36
+
37
+ - name: Restore
38
+ run: dotnet restore CloudGateway.slnx
39
+
40
+ - name: Build
41
+ run: dotnet build CloudGateway.slnx --no-restore --configuration Release
42
+
43
+ - name: Unit + Integration Tests
44
+ run: |
45
+ dotnet test CloudGateway.slnx --no-build --configuration Release `
46
+ --logger "trx;LogFileName=test-results.trx" `
47
+ --results-directory TestResults
48
+
49
+ - name: Upload test results
50
+ if: always()
51
+ uses: actions/upload-artifact@v4
52
+ with:
53
+ name: test-results
54
+ path: cloud_gateway/TestResults/*.trx
55
+
56
+ # ── 2. Bicep Validation ───────────────────────────────────────────────────
57
+ bicep-validate:
58
+ name: Validate Bicep IaC
59
+ runs-on: ubuntu-latest
60
+
61
+ steps:
62
+ - name: Checkout
63
+ uses: actions/checkout@v4
64
+
65
+ - name: Setup Azure CLI + Bicep
66
+ run: |
67
+ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
68
+ az bicep install
69
+
70
+ - name: Build / Lint Bicep
71
+ working-directory: cloud_gateway/infra
72
+ run: az bicep build --file main.bicep --stdout > /dev/null
73
+
74
+ # ── 3. E2E Protocol Tests ─────────────────────────────────────────────────
75
+ e2e:
76
+ name: E2E Protocol Tests
77
+ runs-on: windows-latest
78
+ needs: build-and-test # only run if unit tests pass
79
+
80
+ steps:
81
+ - name: Checkout
82
+ uses: actions/checkout@v4
83
+
84
+ - name: Setup .NET 10
85
+ uses: actions/setup-dotnet@v4
86
+ with:
87
+ dotnet-version: "10.x"
88
+
89
+ - name: Setup Python
90
+ uses: actions/setup-python@v5
91
+ with:
92
+ python-version: "3.13"
93
+
94
+ - name: Install Python dependencies
95
+ run: pip install websockets httpx
96
+
97
+ - name: Build (Release)
98
+ run: dotnet build CloudGateway.slnx --configuration Release
99
+
100
+ - name: Start Cloud Gateway service
101
+ shell: pwsh
102
+ run: |
103
+ $proc = Start-Process -FilePath "dotnet" `
104
+ -ArgumentList "run --project src/CloudGateway/CloudGateway.csproj --no-build --configuration Release" `
105
+ -PassThru -WindowStyle Hidden
106
+ echo "SERVICE_PID=$($proc.Id)" >> $env:GITHUB_ENV
107
+ # Wait for service to be healthy
108
+ $maxAttempts = 20
109
+ for ($i = 1; $i -le $maxAttempts; $i++) {
110
+ Start-Sleep -Seconds 1
111
+ try {
112
+ $r = Invoke-WebRequest -Uri "http://localhost:5136/health" -UseBasicParsing -TimeoutSec 2
113
+ if ($r.StatusCode -eq 200) {
114
+ Write-Host "Service healthy after $i second(s)"
115
+ break
116
+ }
117
+ } catch {}
118
+ if ($i -eq $maxAttempts) {
119
+ Write-Error "Service did not start within $maxAttempts seconds"
120
+ exit 1
121
+ }
122
+ }
123
+
124
+ - name: Run E2E protocol tests
125
+ shell: pwsh
126
+ run: python tests/e2e_protocol_test.py
127
+
128
+ - name: Stop service
129
+ if: always()
130
+ shell: pwsh
131
+ run: |
132
+ if ($env:SERVICE_PID) {
133
+ Stop-Process -Id $env:SERVICE_PID -Force -ErrorAction SilentlyContinue
134
+ }
@@ -0,0 +1,42 @@
1
+ name: Teams App Package
2
+
3
+ # Build and upload the WorkPilot Teams app package (WorkPilot-teams-app.zip).
4
+ # Triggered when teams/ assets change on main, or manually.
5
+
6
+ on:
7
+ push:
8
+ branches: [main]
9
+ paths:
10
+ - "teams/**"
11
+ - ".github/workflows/teams-app-package.yml"
12
+ pull_request:
13
+ paths:
14
+ - "teams/**"
15
+ - ".github/workflows/teams-app-package.yml"
16
+ workflow_dispatch:
17
+
18
+ defaults:
19
+ run:
20
+ working-directory: teams
21
+
22
+ jobs:
23
+ build:
24
+ name: Build WorkPilot-teams-app.zip
25
+ runs-on: ubuntu-latest
26
+
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@v4
30
+
31
+ - name: Build package
32
+ run: |
33
+ chmod +x build.sh
34
+ ./build.sh
35
+
36
+ - name: Upload artifact
37
+ uses: actions/upload-artifact@v4
38
+ with:
39
+ name: WorkPilot-teams-app
40
+ path: teams/WorkPilot-teams-app.zip
41
+ if-no-files-found: error
42
+ retention-days: 30
@@ -0,0 +1,88 @@
1
+ name: WorkPilot CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ci-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ test:
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ os: [ubuntu-latest, windows-latest]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.13"
28
+
29
+ - name: Cache pip
30
+ uses: actions/cache@v4
31
+ with:
32
+ path: ~/.cache/pip
33
+ key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
34
+ restore-keys: |
35
+ ${{ runner.os }}-pip-
36
+
37
+ - name: Install dependencies
38
+ run: pip install -e ".[dev]"
39
+
40
+ - name: Run tests
41
+ run: pytest tests/ -v --tb=short
42
+
43
+ - name: Run tests with coverage
44
+ if: matrix.os == 'ubuntu-latest'
45
+ run: pytest tests/ --cov=workpilot --cov-report=term-missing --cov-report=xml
46
+
47
+ - name: Upload coverage
48
+ if: matrix.os == 'ubuntu-latest'
49
+ uses: actions/upload-artifact@v4
50
+ with:
51
+ name: coverage-report
52
+ path: coverage.xml
53
+
54
+ lint:
55
+ runs-on: ubuntu-latest
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+
59
+ - name: Set up Python
60
+ uses: actions/setup-python@v5
61
+ with:
62
+ python-version: "3.13"
63
+
64
+ - name: Install dev deps
65
+ run: pip install -e ".[dev]"
66
+
67
+ - name: Ruff check
68
+ run: ruff check workpilot/ tests/
69
+
70
+ - name: Ruff format check
71
+ run: ruff format --check workpilot/ tests/
72
+
73
+ typecheck:
74
+ runs-on: ubuntu-latest
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+
78
+ - name: Set up Python
79
+ uses: actions/setup-python@v5
80
+ with:
81
+ python-version: "3.13"
82
+
83
+ - name: Install dev deps
84
+ run: pip install -e ".[dev]"
85
+
86
+ - name: Mypy
87
+ run: mypy workpilot/
88
+ continue-on-error: true # gradual adoption — pre-existing errors in v0.1 code
@@ -0,0 +1,88 @@
1
+ # Teams app package zip (built artifact — regenerate with build.ps1 / build.sh)
2
+ teams/*.zip
3
+
4
+ # .NET / C#
5
+ bin/
6
+ obj/
7
+ *.user
8
+ *.suo
9
+ .vs/
10
+ _ReSharper*/
11
+ *.DotSettings.user
12
+ TestResults/
13
+ *.nupkg
14
+ *.snupkg
15
+ project.lock.json
16
+ project.fragment.lock.json
17
+ artifacts/
18
+ # User secrets (dotnet user-secrets)
19
+ */secrets.json
20
+
21
+ # .NET publish output
22
+ publish/
23
+ out/
24
+
25
+ # Python
26
+ __pycache__/
27
+ *.py[cod]
28
+ *$py.class
29
+ *.so
30
+ *.egg-info/
31
+ *.egg
32
+ dist/
33
+ build/
34
+ .eggs/
35
+ *.whl
36
+
37
+ # Virtual environments
38
+ .venv/
39
+ venv/
40
+ env/
41
+
42
+ # IDE
43
+ .idea/
44
+ .vscode/
45
+ *.swp
46
+ *.swo
47
+
48
+ # Testing
49
+ .coverage
50
+ htmlcov/
51
+ .pytest_cache/
52
+ .mypy_cache/
53
+
54
+ # Environment
55
+ .env
56
+ .env.local
57
+ .env.*.local
58
+
59
+ # Logs
60
+ *.log
61
+ logs/
62
+
63
+ # OS
64
+ .DS_Store
65
+ Thumbs.db
66
+
67
+ # Claude Code local settings
68
+ settings.local.json
69
+
70
+ # WorkPilot data
71
+ .workpilot/
72
+ !workpilot/
73
+
74
+ # WorkPilot local config overrides
75
+ *.local.yaml
76
+ *.local.yml
77
+
78
+ # Secrets
79
+ *.pem
80
+ *.key
81
+
82
+ # SQLite
83
+ *.db
84
+ *.db-journal
85
+ deploy.zip
86
+ deploy.zip
87
+ /MEMORY.md
88
+ /HISTORY.md