copilot-operator 0.1.5 → 0.1.6
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.
- package/dist/src/api/operator.controller.js +5 -2
- package/dist/src/api/operator.service.js +34 -12
- package/dist/src/orchestrator/taskRunner.js +11 -1
- package/dist/src/plan/brief.js +52 -10
- package/dist/src/plan/script.js +13 -0
- package/dist/src/plan/systemGuide.js +1377 -185
- package/dist/src/session/compose.js +5 -1
- package/dist/src/session/exports.js +1 -0
- package/dist/src/session/store.js +4 -1
- package/dist/src/session/story.js +10 -1
- package/dist/src/vcs/taskVcs.js +2 -1
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/549-afafecd6bfbb138e.js +1 -0
- package/dist/web/_next/static/chunks/56-91cd1709158ebf99.js +1 -0
- package/dist/web/_next/static/chunks/867-fc983d08916b4e28.js +1 -0
- package/dist/web/_next/static/chunks/app/history/page-b3b4af994c868b5d.js +1 -0
- package/dist/web/_next/static/chunks/app/layout-e0174d863960f109.js +1 -0
- package/dist/web/_next/static/chunks/app/sessions/view/{page-4631bdf5113a73b2.js → page-d4213354730a945c.js} +1 -1
- package/dist/web/_next/static/css/{5a10c60adf9c5336.css → 63fea96806e6b2cb.css} +1 -1
- package/dist/web/appearance.html +2 -2
- package/dist/web/appearance.txt +25 -24
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +25 -24
- package/dist/web/history.html +2 -2
- package/dist/web/history.txt +25 -24
- package/dist/web/import.html +2 -2
- package/dist/web/import.txt +25 -24
- package/dist/web/index.html +2 -2
- package/dist/web/index.txt +25 -24
- package/dist/web/level1.html +2 -2
- package/dist/web/level1.txt +25 -24
- package/dist/web/presets.html +2 -2
- package/dist/web/presets.txt +25 -24
- package/dist/web/sessions/view.html +2 -2
- package/dist/web/sessions/view.txt +25 -24
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +25 -24
- package/package.json +1 -1
- package/dist/web/_next/static/chunks/549-2086c05135bc9753.js +0 -1
- package/dist/web/_next/static/chunks/867-0cd2c3cfd0ff0a45.js +0 -1
- package/dist/web/_next/static/chunks/89-382e9b29486d2747.js +0 -1
- package/dist/web/_next/static/chunks/app/history/page-83543937cecde5de.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-92fa876afe619cf3.js +0 -1
- /package/dist/web/_next/static/{7TE2rEuHqGdGx14If8TEb → WJ_8hRZsp4VWiDZx8NMUw}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{7TE2rEuHqGdGx14If8TEb → WJ_8hRZsp4VWiDZx8NMUw}/_ssgManifest.js +0 -0
package/dist/web/system.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--WJ_8hRZsp4VWiDZx8NMUw--><html lang="en" data-theme="light" data-textsize="normal" data-contrast="normal" data-motion="normal" data-links="plain" data-focus="normal"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/63fea96806e6b2cb.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js"/><script src="/_next/static/chunks/c7879cf7-b5ab1053c1d9a2e7.js" async=""></script><script src="/_next/static/chunks/131-bae98f790a541679.js" async=""></script><script src="/_next/static/chunks/main-app-e3a5f713ba31557e.js" async=""></script><script src="/_next/static/chunks/197-f7c33a0114fc3db3.js" async=""></script><script src="/_next/static/chunks/867-fc983d08916b4e28.js" async=""></script><script src="/_next/static/chunks/549-afafecd6bfbb138e.js" async=""></script><script src="/_next/static/chunks/app/layout-e0174d863960f109.js" async=""></script><script src="/_next/static/chunks/app/system/page-3aa2a0fef5454e69.js" async=""></script><title>copilot-operator</title><meta name="description" content="Runs task loops with Microsoft 365 Copilot on this machine."/><script>
|
|
2
2
|
(function () {
|
|
3
3
|
try {
|
|
4
4
|
var d = document.documentElement;
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
d.dataset.focus = a.strongFocus ? 'strong' : 'normal';
|
|
13
13
|
} catch (e) {}
|
|
14
14
|
})();
|
|
15
|
-
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a aria-current="page" href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div class="panel"><h2>This machine</h2><div class="muted">Loading…</div></div><div class="panel"><h2>Settings</h2><p class="muted small">Read from data/settings.json next to the project. It has the same shape as run.example.yaml; anything missing takes the default. Edit the file and restart the API.</p></div><div class="panel"><h2>Sign-in</h2><p class="muted small">Signing in is done once, from the terminal, so that the bot never handles credentials:</p><pre>npx tsx src/cli.ts login --account you@yourtenant.org</pre></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[1205,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"177\",\"static/chunks/app/layout-92fa876afe619cf3.js\"],\"themeScript\"]\n3:I[1205,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"177\",\"static/chunks/app/layout-92fa876afe619cf3.js\"],\"AppearanceProvider\"]\n4:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"177\",\"static/chunks/app/layout-92fa876afe619cf3.js\"],\"LanguageProvider\"]\n5:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"177\",\"static/chunks/app/layout-92fa876afe619cf3.js\"],\"DialogHost\"]\n6:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"177\",\"static/chunks/app/layout-92fa876afe619cf3.js\"],\"SkipLink\"]\n7:I[8197,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"177\",\"static/chunks/app/layout-92fa876afe619cf3.js\"],\"\"]\n8:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"177\",\"static/chunks/app/layout-92fa876afe619cf3.js\"],\"Nav\"]\n9:I[6657,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"177\",\"static/chunks/app/layout-92fa876afe619cf3.js\"],\"GlobalApprovals\"]\na:I[5204,[],\"\"]\nb:I[2642,[],\"\"]\nc:I[7089,[],\"ClientPageRoot\"]\nd:I[3134,[\"867\",\"static/chunks/867-0cd2c3cfd0ff0a45.js\",\"549\",\"static/chunks/549-2086c05135bc9753.js\",\"186\",\"static/chunks/app/system/page-3aa2a0fef5454e69.js\"],\"default\"]\n10:I[433,[],\"OutletBoundary\"]\n12:I[9884,[],\"AsyncMetadataOutlet\"]"])</script><script>self.__next_f.push([1,"\n14:I[433,[],\"ViewportBoundary\"]\n16:I[433,[],\"MetadataBoundary\"]\n17:\"$Sreact.suspense\"\n19:I[3536,[],\"\"]\n:HL[\"/_next/static/css/5a10c60adf9c5336.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"7TE2rEuHqGdGx14If8TEb\",\"p\":\"\",\"c\":[\"\",\"system\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"system\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5a10c60adf9c5336.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$2\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"children\":[[\"$\",\"$L6\",null,{}],[\"$\",\"div\",null,{\"className\":\"wrap\",\"children\":[[\"$\",\"header\",null,{\"className\":\"top\",\"children\":[[\"$\",\"h1\",null,{\"children\":[\"$\",\"$L7\",null,{\"href\":\"/\",\"children\":\"copilot-operator\"}]}],[\"$\",\"$L8\",null,{}]]}],[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"id\":\"main\",\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}]}]}]}]]}]]}],{\"children\":[\"system\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$Lc\",null,{\"Component\":\"$d\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@e\",\"$@f\"]}],null,[\"$\",\"$L10\",null,{\"children\":[\"$L11\",[\"$\",\"$L12\",null,{\"promise\":\"$@13\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L14\",null,{\"children\":\"$L15\"}],null],[\"$\",\"$L16\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$17\",null,{\"fallback\":null,\"children\":\"$L18\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$19\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"e:{}\nf:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"15:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n11:null\n"])</script><script>self.__next_f.push([1,"13:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"18:\"$13:metadata\"\n"])</script></body></html>
|
|
15
|
+
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a aria-current="page" href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div class="panel"><h2>This machine</h2><div class="muted">Loading…</div></div><div class="panel"><h2>Settings</h2><p class="muted small">Read from data/settings.json next to the project. It has the same shape as run.example.yaml; anything missing takes the default. Edit the file and restart the API.</p></div><div class="panel"><h2>Sign-in</h2><p class="muted small">Signing in is done once, from the terminal, so that the bot never handles credentials:</p><pre>npx tsx src/cli.ts login --account you@yourtenant.org</pre></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[1205,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"themeScript\"]\n3:I[1205,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"AppearanceProvider\"]\n4:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"LanguageProvider\"]\n5:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"DialogHost\"]\n6:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"SkipLink\"]\n7:I[8197,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"\"]\n8:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"Nav\"]\n9:I[6657,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"GlobalApprovals\"]\na:I[5204,[],\"\"]\nb:I[2642,[],\"\"]\nc:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"177\",\"static/chunks/app/layout-e0174d863960f109.js\"],\"ScrollJump\"]\nd:I[7089,[],\"ClientPageRoot\"]\ne:I[3134,[\"867\",\"stat"])</script><script>self.__next_f.push([1,"ic/chunks/867-fc983d08916b4e28.js\",\"549\",\"static/chunks/549-afafecd6bfbb138e.js\",\"186\",\"static/chunks/app/system/page-3aa2a0fef5454e69.js\"],\"default\"]\n11:I[433,[],\"OutletBoundary\"]\n13:I[9884,[],\"AsyncMetadataOutlet\"]\n15:I[433,[],\"ViewportBoundary\"]\n17:I[433,[],\"MetadataBoundary\"]\n18:\"$Sreact.suspense\"\n1a:I[3536,[],\"\"]\n:HL[\"/_next/static/css/63fea96806e6b2cb.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"WJ_8hRZsp4VWiDZx8NMUw\",\"p\":\"\",\"c\":[\"\",\"system\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"system\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/63fea96806e6b2cb.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$2\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"children\":[[\"$\",\"$L6\",null,{}],[\"$\",\"div\",null,{\"className\":\"wrap\",\"children\":[[\"$\",\"header\",null,{\"className\":\"top\",\"children\":[[\"$\",\"h1\",null,{\"children\":[\"$\",\"$L7\",null,{\"href\":\"/\",\"children\":\"copilot-operator\"}]}],[\"$\",\"$L8\",null,{}]]}],[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"id\":\"main\",\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}],[\"$\",\"$Lc\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"system\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$Ld\",null,{\"Component\":\"$e\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@f\",\"$@10\"]}],null,[\"$\",\"$L11\",null,{\"children\":[\"$L12\",[\"$\",\"$L13\",null,{\"promise\":\"$@14\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L15\",null,{\"children\":\"$L16\"}],null],[\"$\",\"$L17\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$18\",null,{\"fallback\":null,\"children\":\"$L19\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$1a\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"f:{}\n10:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"16:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n12:null\n"])</script><script>self.__next_f.push([1,"14:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"19:\"$14:metadata\"\n"])</script></body></html>
|
package/dist/web/system.txt
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[1205,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-
|
|
3
|
-
3:I[1205,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-
|
|
4
|
-
4:I[867,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-
|
|
5
|
-
5:I[1035,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-
|
|
6
|
-
6:I[8214,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-
|
|
7
|
-
7:I[8197,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-
|
|
8
|
-
8:I[8214,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-
|
|
9
|
-
9:I[6657,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-
|
|
2
|
+
2:I[1205,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],"themeScript"]
|
|
3
|
+
3:I[1205,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],"AppearanceProvider"]
|
|
4
|
+
4:I[867,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],"LanguageProvider"]
|
|
5
|
+
5:I[1035,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],"DialogHost"]
|
|
6
|
+
6:I[8214,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],"SkipLink"]
|
|
7
|
+
7:I[8197,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],""]
|
|
8
|
+
8:I[8214,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],"Nav"]
|
|
9
|
+
9:I[6657,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],"GlobalApprovals"]
|
|
10
10
|
a:I[5204,[],""]
|
|
11
11
|
b:I[2642,[],""]
|
|
12
|
-
c:I[
|
|
13
|
-
d:I[
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
17:"
|
|
19
|
-
|
|
20
|
-
:
|
|
21
|
-
|
|
22
|
-
e:{}
|
|
23
|
-
f:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
12
|
+
c:I[7712,["197","static/chunks/197-f7c33a0114fc3db3.js","867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","177","static/chunks/app/layout-e0174d863960f109.js"],"ScrollJump"]
|
|
13
|
+
d:I[7089,[],"ClientPageRoot"]
|
|
14
|
+
e:I[3134,["867","static/chunks/867-fc983d08916b4e28.js","549","static/chunks/549-afafecd6bfbb138e.js","186","static/chunks/app/system/page-3aa2a0fef5454e69.js"],"default"]
|
|
15
|
+
11:I[433,[],"OutletBoundary"]
|
|
16
|
+
13:I[9884,[],"AsyncMetadataOutlet"]
|
|
17
|
+
15:I[433,[],"ViewportBoundary"]
|
|
18
|
+
17:I[433,[],"MetadataBoundary"]
|
|
19
|
+
18:"$Sreact.suspense"
|
|
20
|
+
1a:I[3536,[],""]
|
|
21
|
+
:HL["/_next/static/css/63fea96806e6b2cb.css","style"]
|
|
22
|
+
0:{"P":null,"b":"WJ_8hRZsp4VWiDZx8NMUw","p":"","c":["","system"],"i":false,"f":[[["",{"children":["system",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/63fea96806e6b2cb.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"data-theme":"light","data-textsize":"normal","data-contrast":"normal","data-motion":"normal","data-links":"plain","data-focus":"normal","children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"$2"}}]}],["$","body",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"children":[["$","$L6",null,{}],["$","div",null,{"className":"wrap","children":[["$","header",null,{"className":"top","children":[["$","h1",null,{"children":["$","$L7",null,{"href":"/","children":"copilot-operator"}]}],["$","$L8",null,{}]]}],["$","$L9",null,{}],["$","main",null,{"id":"main","children":["$","$La",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Lb",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}],["$","$Lc",null,{}]]}]}]}]}]]}]]}],{"children":["system",["$","$1","c",{"children":[null,["$","$La",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Lb",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","searchParams":{},"params":{},"promises":["$@f","$@10"]}],null,["$","$L11",null,{"children":["$L12",["$","$L13",null,{"promise":"$@14"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$L15",null,{"children":"$L16"}],null],["$","$L17",null,{"children":["$","div",null,{"hidden":true,"children":["$","$18",null,{"fallback":null,"children":"$L19"}]}]}]]}],false]],"m":"$undefined","G":["$1a",[]],"s":false,"S":true}
|
|
23
|
+
f:{}
|
|
24
|
+
10:"$0:f:0:1:2:children:2:children:1:props:children:0:props:params"
|
|
25
|
+
16:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
26
|
+
12:null
|
|
27
|
+
14:{"metadata":[["$","title","0",{"children":"copilot-operator"}],["$","meta","1",{"name":"description","content":"Runs task loops with Microsoft 365 Copilot on this machine."}]],"error":null,"digest":"$undefined"}
|
|
28
|
+
19:"$14:metadata"
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[549],{5549:(t,e,o)=>{o.d(e,{AV:()=>r,FH:()=>h,FZ:()=>d,aT:()=>c,c5:()=>y,dK:()=>m,nC:()=>s,rt:()=>l,ub:()=>i,zi:()=>p});var n=o(986);let s="/api";function c(t,e){return"/sessions/view?id=".concat(encodeURIComponent(t)).concat(e?"#".concat(e):"")}let a="cop-api-token";function r(){try{var t;let e=/(?:^#|&)token=([0-9a-f]{16,})/i.exec(window.location.hash);if(e)return window.localStorage.setItem(a,e[1]),window.history.replaceState(null,"",window.location.pathname+window.location.search),e[1];return window.localStorage.getItem(a)||(null!=(t=n.env.NEXT_PUBLIC_COP_TOKEN)?t:"")}catch(t){return""}}function i(t){let e=r();return e?"".concat(t).concat(t.includes("?")?"&":"?","token=").concat(encodeURIComponent(e)):t}let d=["exit-zero","exit-nonzero","output-contains","output-omits","output-matches","file-exists","file-missing","file-contains"];function l(t){return t.startsWith("exit-")||t.startsWith("output-")}function m(t){return"output-contains"===t||"output-omits"===t||"output-matches"===t||"file-contains"===t}async function u(t,e){var o;let n=await fetch("".concat(s).concat(t),{...e,headers:{"content-type":"application/json",...r()?{"x-cop-token":r()}:{},...null!=(o=null==e?void 0:e.headers)?o:{}}});if(!n.ok){let t="".concat(n.status," ").concat(n.statusText);try{let e=await n.json();(null==e?void 0:e.message)&&(t=Array.isArray(e.message)?e.message.join("; "):e.message)}catch(t){}throw Error(t)}let c=await n.text();return c?JSON.parse(c):void 0}let h={health:()=>u("/health"),doctor:()=>u("/doctor"),settings:()=>u("/settings"),saveSettings:t=>u("/settings",{method:"PUT",body:JSON.stringify(t)}),level1:()=>u("/level1"),setLevel1:t=>u("/level1",{method:"PUT",body:JSON.stringify({content:t})}),resetLevel1:()=>u("/level1",{method:"DELETE"}),presets:()=>u("/presets"),savePreset:(t,e)=>u("/presets/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:e})}),deletePreset:t=>u("/presets/".concat(encodeURIComponent(t)),{method:"DELETE"}),personas:()=>u("/personas"),savePersona:(t,e)=>u("/personas/".concat(encodeURIComponent(t)),{method:"PUT",body:JSON.stringify({content:e})}),deletePersona:t=>u("/personas/".concat(encodeURIComponent(t)),{method:"DELETE"}),sessions:()=>u("/sessions"),session:t=>u("/sessions/".concat(t)),createSession:(t,e)=>u("/sessions",{method:"POST",body:JSON.stringify({name:t,mirror:e})}),updateSession:(t,e)=>u("/sessions/".concat(t),{method:"PUT",body:JSON.stringify(e)}),deleteSession:t=>u("/sessions/".concat(t),{method:"DELETE"}),addTask:(t,e)=>u("/sessions/".concat(t,"/tasks"),{method:"POST",body:JSON.stringify(e)}),updateTask:(t,e,o)=>u("/sessions/".concat(t,"/tasks/").concat(e),{method:"PUT",body:JSON.stringify(o)}),deleteTask:(t,e)=>u("/sessions/".concat(t,"/tasks/").concat(e),{method:"DELETE"}),continueTask:(t,e)=>u("/sessions/".concat(t,"/tasks/").concat(e,"/continue"),{method:"POST",body:"{}"}),rerunTask:function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u("/sessions/".concat(t,"/tasks/").concat(e,"/rerun"),{method:"POST",body:JSON.stringify(o)})},taskStory:(t,e,o)=>u("/sessions/".concat(t,"/tasks/").concat(e,"/story").concat(o?"?run=".concat(encodeURIComponent(o)):"")),taskFiles:(t,e,o)=>u("/sessions/".concat(t,"/tasks/").concat(e,"/files").concat(o?"?run=".concat(encodeURIComponent(o)):"")),taskLogUrl:(t,e,o)=>"".concat(s,"/sessions/").concat(t,"/tasks/").concat(e,"/log").concat(o?"?run=".concat(encodeURIComponent(o)):""),taskFileUrl:(t,e,o,n,c)=>"".concat(s,"/sessions/").concat(t,"/tasks/").concat(e,"/files/").concat(o,"/").concat(encodeURIComponent(n)).concat(c?"?run=".concat(encodeURIComponent(c)):""),saveTaskLog:(t,e,o)=>u("/sessions/".concat(t,"/tasks/").concat(e,"/log").concat(o?"?run=".concat(encodeURIComponent(o)):""),{method:"POST",body:"{}"}),saveTaskFile:(t,e,o,n,s)=>u("/sessions/".concat(t,"/tasks/").concat(e,"/files/").concat(o,"/").concat(encodeURIComponent(n)).concat(s?"?run=".concat(encodeURIComponent(s)):""),{method:"POST",body:"{}"}),start:(t,e,o)=>u("/sessions/".concat(t,"/start"),{method:"POST",body:JSON.stringify({mode:e,name:o})}),stop:t=>u("/sessions/".concat(t,"/stop"),{method:"POST",body:"{}"}),approvals:t=>u("/approvals".concat(t?"?session=".concat(encodeURIComponent(t)):"")),decide:(t,e)=>u("/approvals/".concat(t),{method:"POST",body:JSON.stringify({action:e})}),setRunMode:(t,e)=>u("/sessions/".concat(t,"/mode"),{method:"POST",body:JSON.stringify({mode:e})}),streamUrl:t=>i("".concat(s,"/sessions/").concat(t,"/stream")),batch:()=>u("/batch").then(t=>null!=t?t:null),startBatch:(t,e,o,n,s,c)=>u("/batch/start",{method:"POST",body:JSON.stringify({sessionIds:t,mode:e,onFailure:o,model:n,reviewModel:s,name:c})}),suggestedRunName:t=>u("/batch/name?sessions=".concat(encodeURIComponent(t.join(",")))),stopBatch:()=>u("/batch/stop",{method:"POST",body:"{}"}),pauseBatch:()=>u("/batch/pause",{method:"POST",body:"{}"}),resumeBatch:()=>u("/batch/resume",{method:"POST",body:"{}"}),planBrief:t=>u("/plan/brief?lang=".concat(encodeURIComponent(t))),context:(t,e)=>u("/context/".concat(t,"?lang=").concat(encodeURIComponent(e))),setContext:(t,e)=>u("/context/".concat(t),{method:"PUT",body:JSON.stringify({content:e})}),resetContext:(t,e)=>u("/context/".concat(t,"?lang=").concat(encodeURIComponent(e)),{method:"DELETE"}),checkPlan:t=>u("/plan/check",{method:"POST",body:JSON.stringify({text:t})}),importPlan:t=>u("/plan/import",{method:"POST",body:JSON.stringify({text:t})}),dirs:function(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return u("/dirs?root=".concat(encodeURIComponent(t),"&gitignore=").concat(e?"1":"0"))},browseFolder:t=>u("/browse-folder",{method:"POST",body:JSON.stringify({start:t})}),previewMirror:t=>u("/mirror/preview",{method:"POST",body:JSON.stringify(t)}),tasks:()=>u("/tasks"),activity:()=>u("/activity"),downloadBundle:async t=>{var e,o,n;let c=await fetch("".concat(s,"/export/bundle"),{method:"POST",headers:{"content-type":"application/json",...r()?{"x-cop-token":r()}:{}},body:JSON.stringify({tasks:t})});if(!c.ok)throw Error(await c.text()||"".concat(c.status," ").concat(c.statusText));let a=null!=(n=c.headers.get("content-disposition"))?n:"",i=null==(e=/filename\*=UTF-8''([^;]+)/i.exec(a))?void 0:e[1],d=null==(o=/filename="([^"]+)"/i.exec(a))?void 0:o[1],l=null!=d?d:"copilot-operator-bundle.json";if(i)try{l=decodeURIComponent(i)}catch(t){}let m=URL.createObjectURL(await c.blob()),u=document.createElement("a");return u.href=m,u.download=l,document.body.appendChild(u),u.click(),u.remove(),setTimeout(()=>URL.revokeObjectURL(m),1e4),l},exportUrl:(t,e)=>{let o=new URLSearchParams;return e.run&&o.set("run",e.run),e.session&&o.set("session",e.session),e.task&&o.set("task",e.task),i("".concat(s,"/export/").concat(t,"?").concat(o.toString()))},debugExportUrl:t=>i("".concat(s,"/debug/export").concat(t.length>0?"?sessions=".concat(encodeURIComponent(t.join(","))):"")),vcsStatus:t=>u("/sessions/".concat(t,"/vcs")),restorePreview:(t,e)=>u("/sessions/".concat(t,"/tasks/").concat(e,"/restore")),restore:(t,e)=>u("/sessions/".concat(t,"/tasks/").concat(e,"/restore"),{method:"POST",body:"{}"}),restartPlan:(t,e)=>u("/sessions/".concat(t,"/tasks/").concat(e,"/restart")),restartFrom:function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u("/sessions/".concat(t,"/tasks/").concat(e,"/restart"),{method:"POST",body:JSON.stringify(o)})},repoCheck:t=>u("/repo?dir=".concat(encodeURIComponent(t))),project:()=>u("/project"),setProject:t=>u("/project",{method:"PUT",body:JSON.stringify(t)}),models:()=>u("/models"),setDefaultModel:t=>u("/models/default",{method:"PUT",body:JSON.stringify({model:t})}),setDefaultReviewModel:t=>u("/models/review-default",{method:"PUT",body:JSON.stringify({model:t})}),refreshModels:()=>u("/models/refresh",{method:"POST",body:"{}"})};function p(t){return t<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(1)," MB")}function y(t){if(void 0===t)return"";let e=Math.round(t/1e3);if(e<60)return"".concat(e,"s");let o=Math.floor(e/60);return o<60?"".concat(o,"m ").concat(e%60,"s"):"".concat(Math.floor(o/60),"h ").concat(o%60,"m")}}}]);
|