@wular/coder 0.4.11 → 0.4.12
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/README.md +3 -1
- package/dist/actions-BT7_eKXm.js +10 -0
- package/dist/{adapter-Bi768A94.js → adapter-BT8ECcRG.js} +1 -1
- package/dist/{adapter-CkL4PqXE.js → adapter-CU9H4g6c.js} +1 -1
- package/dist/{adapter-DYxjaefw.js → adapter-CVd5klMH.js} +1 -1
- package/dist/{agent-6GooVMsq.js → agent-BA6xr8QY.js} +2 -2
- package/dist/apps-D-v5sQJk.js +367 -0
- package/dist/args-CbO_Ck9Z.js +11 -0
- package/dist/async-XNO3nqum.js +3 -0
- package/dist/auth-DuXnSNf9.js +1 -0
- package/dist/base64url-CsVsW4Id.js +1 -0
- package/dist/chat-CgQdDRhs.js +13 -0
- package/dist/cli.js +19 -1
- package/dist/{client-sqXb-y09.js → client-C4QCT6cG.js} +2 -2
- package/dist/cmd-DX5ByXo3.js +119 -0
- package/dist/connection-DNxi2btM.js +1 -0
- package/dist/context-65bOofts.js +7 -0
- package/dist/dash/standalone/node_modules/contextjsx/dist/index.mjs +1 -0
- package/dist/dash/standalone/node_modules/contextjsx/dist/jsx-runtime.mjs +1 -0
- package/dist/dash/standalone/node_modules/contextjsx/dist/src-BJ0QFeB8.mjs +2 -0
- package/dist/dash/standalone/node_modules/contextjsx/package.json +70 -0
- package/dist/dash/standalone/server/build-index.json +1 -1
- package/dist/dash/standalone/server/manifest.json +1310 -1310
- package/dist/dash/standalone/server/modules-server-server-react-server/src/agent/context/turn.dac8eb211c500271.js +141 -0
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/create/[id]/page.70913bd4075da914.js +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/(list)/{page.5f88059c03cf82b4.js → page.c6efd5432c1a4a75.js} +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/{layout.b7392d534ce0410e.js → layout.a795379254982121.js} +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/{page.5aae24bbfd90c434.js → page.a2cb6d1f1714259a.js} +4 -4
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/platforms/{page.91c992fdd3b4a493.js → page.996172c951739b35.js} +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/settings/{agent-settings-form.eb707a9e32718374.js → agent-settings-form.aa9e157d141481d7.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/settings/{page.9ec1ec08ba05da59.js → page.44d886e60ae04303.js} +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/tasks/{loading.dd9088a4581b1d65.js → loading.521c9e7b8d77f557.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/(tabs)/tasks/{page.71dc042821133e82.js → page.828cfb8112404792.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/[slug]/edit/{page.e3179ddf20a7e55d.js → page.dd11f2618e08becd.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/editor/{editor.62cb8207218e6437.js → editor.776856fe1ed1a642.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/agents/new/{page.dffb05f2d256d81a.js → page.7d84ef2b178b34d2.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/credentials.b43dd3d97c536c2a.js +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/settings/[tab]/page.dfed4ae6ffc74434.js +5 -5
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/setup/page.f06fda0df59beeb5.js +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/{loading.56520888d5270b88.js → loading.47cbb34ea8d2e33f.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/{page.25b29e72df84806b.js → page.abed2a8424ef3da0.js} +2 -2
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/[id]/{task-view.f2e902c8208b2e78.js → task-view.dc294bb94b7437e1.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/{composer.b0bb1faaac8e0b6c.js → composer.5072aacdce127689.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/list/{task.a0c68180db5fb4c1.js → task.0a1b5878dccd3b37.js} +1 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/list/{tasks-list.b52a49fb5faeefd0.js → tasks-list.1162926f7498c732.js} +6 -6
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/list/{tasks-section.80f9c9a42ecae854.js → tasks-section.1d687c986db53a73.js} +3 -3
- package/dist/dash/standalone/server/modules-server-server-react-server/src/server/dash/app/dash/[org]/tasks/{page.20b5c22658eae312.js → page.d5d8cb5033823c9c.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/action-71685b2d5ad9f359.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{agent-pills-bd32cb89331aff7e.js → agent-pills-15da36c2cb81991b.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/agent-settings-form-6e6a87d6e673daa8.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{agent-toggle-a45b95908d62f926.js → agent-toggle-ca98586e3b4ce9ae.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{agents-grid-9f79b5074899c8be.js → agents-grid-29c399e46b4e9e2b.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{back-b0cd2b85c9d8403e.js → back-fa9d6e37f9828093.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{combo-1050768988cd0347.js → combo-86f3e11d1f6f6cee.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{composer-87f138e21d68370d.js → composer-85e0ec7163ae18b7.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/composer-910bb87127972f62.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{confirm-01d5814b1c5f7721.js → confirm-c29a1db0130638d2.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/connect-apps-b73490e04ae6398d.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{connect-repositories-49098298b3a82647.js → connect-repositories-0de82daaf654b1d3.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{connections-list-46d48443d8fc8a0d.js → connections-list-c50f58b4b28d10bb.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{copy-5db9d328f8f65d82.js → copy-445c11202f136275.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/create-link-6d64a2d5f9ce6de0.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{credentials-list-3cccc85ef335cb22.js → credentials-list-bee95799b2319b3b.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{custom-range-fdf1946aac09cfc3.js → custom-range-a0630599f907b30e.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{editor-d2460c315bb1fd32.js → editor-b9951819f21b2e43.js} +2 -2
- package/dist/dash/standalone/static/assets/chunks/{engines-list-0159c8baa0b3e711.js → engines-list-2720c3e8fa12b2f7.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{field-c530e261587d94df.js → field-b82a0f895266791c.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{instructions-3ea5afeea1992bf2.js → instructions-affaaeff366b1725.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/instructions-fd7402ac5aa8b50e.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{list-b67ce61483dd6acb.js → list-d918f79562d497eb.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{models-list-98c956ba00913a73.js → models-list-12bc7aceaa52f5b0.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{notice-8939183c8a889bae.js → notice-57db7a1f05b7308c.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{outcome-dialog-6323cb5300b6d3c9.js → outcome-dialog-5cf575a5e6921a5d.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/outcome-dialog-b219595be320108a.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/platform-actions-1d27d2ba7eee9ff1.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{platform-actions-aafbf038008de64f.js → platform-actions-dba96dcb0f6513db.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{runners-list-a13d0f8f6583c6d2.js → runners-list-36f8c5ecfcf8e9ae.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{runtime-71b727f8f5906f08-1.js → runtime-6e12333f12903a62-1.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{secrets-list-53a0c079492199c9.js → secrets-list-d7dbafd24dd18481.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{segmented-a3642b8169857fb1.js → segmented-8f809ebe712e92a7.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/shared-init-6e12333f12903a62-2.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{shared-init-6cad28f8cc696d91.js → shared-init-cc13a835f3508618.js} +2 -2
- package/dist/dash/standalone/static/assets/chunks/{shared-init-94883db7bc70a5a8.js → shared-init-f475017dd5811e33.js} +2 -2
- package/dist/dash/standalone/static/assets/chunks/side-toggle-0aa237eba3dfe9c1.js +1 -0
- package/dist/dash/standalone/static/assets/chunks/{tail-81b69d49bfebfd4c.js → tail-b1c46587301ef397.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/task-681061023bdf0a49.js +5 -0
- package/dist/dash/standalone/static/assets/chunks/{task-actions-25c70b47b5a53cd2.js → task-actions-c9e46e81604e85c5.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{task-view-e5ee0ada38552918.js → task-view-134186a544917ceb.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{tasks-list-d58f3063ae31d9d2.js → tasks-list-352a3222d878de0f.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{versions-list-fbeed95c0b4e5f0f.js → versions-list-21cb854e6a7108a7.js} +1 -1
- package/dist/dash/standalone/static/assets/chunks/{wular-pnext-71b727f8f5906f08-0.js → wular-pnext-6e12333f12903a62-0.js} +1 -1
- package/dist/dash/standalone/static/assets/pnext-client-05df74b071ddb0b3.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-2c19cca257f78ae6.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-2db05dfa62642a65.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-36b0d6085a073880.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-576c06599e241231.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-6aa0f19a30d58d63.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-6b30b71f452f2f07.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-6ccb4d4fff812db3.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-74eb465defba421e.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-8c692d12b2fd90d6.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-92e17d39063a9ced.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-93246aea268c2682.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-9954dcbc0c579e0d.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-c0dfa1cdde9a9855.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-c28d38d4aafd4af6.js +1 -0
- package/dist/dash/standalone/static/assets/{pnext-client-e4c659a371f4cd79.js → pnext-client-c2c30dcb6dc31d60.js} +1 -1
- package/dist/dash/standalone/static/assets/pnext-client-dbf741073e11eac0.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-e29194a27280333f.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-f8a7e692b27caad9.js +1 -0
- package/dist/dash/standalone/static/assets/pnext-client-fc5b8cfcba2a9f63.js +1 -0
- package/dist/discover-CPZdprlQ.js +1 -0
- package/dist/docs-x-l7gjFE.js +2 -0
- package/dist/drive-Y-ZlgiUW.js +1 -0
- package/dist/env-B9JG6gwo.js +1 -0
- package/dist/errors-XBA-Ls4n.js +10 -0
- package/dist/exec-iFssTO5V.js +3 -0
- package/dist/executor-Dt2FFT-y.js +11 -0
- package/dist/flow/builtin/review/index.d.ts +2 -0
- package/dist/flow/builtin/review/index.js +16 -0
- package/dist/flow/index.d.ts +1 -1
- package/dist/flow/index.js +1 -1
- package/dist/http-BZfjbiov.js +1 -0
- package/dist/{types-C6NAqGqn.d.ts → index-BdkdNI1v.d.ts} +705 -121
- package/dist/{integrations-IGnXBrPw.js → integrations-DyInAa5g.js} +2 -2
- package/dist/lib/broker.js +2 -2
- package/dist/load-zhcrwSRF.js +2 -0
- package/dist/local-D55UkW93.js +5 -0
- package/dist/maintenance-BfxcatXH.js +1 -0
- package/dist/{match-BwcxeAZF.js → match-Bq4sDuCy.js} +1 -1
- package/dist/mcp-Bta09QCU.js +13 -0
- package/dist/mcp-CUITALl1.js +1 -0
- package/dist/models-C1O2DrXx.js +1 -0
- package/dist/output-D95NoAA9.js +16 -0
- package/dist/prompt-onpyIyXK.js +8 -0
- package/dist/prompts-B8pKhMcu.js +4 -0
- package/dist/refresh-D-0K9fo3.js +1 -0
- package/dist/{remote-D3JZ4MMQ.js → remote-CDm0YUU3.js} +1 -1
- package/dist/runner-CTFTuaz_.js +1 -0
- package/dist/runner.json +1 -1
- package/dist/runner.tgz +0 -0
- package/dist/{runners-DyLnqHKy.js → runners-CYTicTb7.js} +3 -3
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +8 -1
- package/dist/sdk.d.ts +12552 -4
- package/dist/sdk.js +1 -1
- package/dist/serve-Bzs_lEg-.js +1 -0
- package/dist/serve-CWtLyyTz.js +12 -0
- package/dist/serve-DE6A-rBk.js +4 -0
- package/dist/{slack-DhPhLuWb.js → slack-Bo5l13Rs.js} +3 -3
- package/dist/task-BU1JEK9X.js +7 -0
- package/dist/task-CPzBITsp.js +1 -0
- package/dist/tools-BMaKWTa6.js +1 -0
- package/dist/tools-CM4UCsId.js +1 -0
- package/dist/turn-DMvPfhb5.js +3 -0
- package/dist/{views-CE2d9x6T.js → views-DEdKqLm_.js} +1 -1
- package/dist/{wire-nJ7sEi-M.js → wire-JMNPv8f6.js} +1 -1
- package/dist/worker-BuP_Lem1.js +9 -0
- package/dist/worker-C1tuzq5n.js +1 -0
- package/docs/agents/index.md +18 -20
- package/docs/cli/agent.md +137 -0
- package/docs/cli/auth.md +48 -0
- package/docs/cli/connection.md +89 -0
- package/docs/cli/credentials.md +58 -0
- package/docs/cli/flow.md +158 -0
- package/docs/cli/index.md +139 -0
- package/docs/cli/model.md +116 -0
- package/docs/cli/runner.md +92 -0
- package/docs/cli/server.md +89 -0
- package/docs/cli/task.md +271 -0
- package/docs/flows.md +0 -6
- package/docs/mcp.md +8 -8
- package/docs/review.md +4 -0
- package/package.json +3 -1
- package/plugins/agents/skills/coder/SKILL.md +16 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/.mcp.json +5 -0
- package/plugins/claude/skills/dispatch/SKILL.md +16 -1
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/skills/coder/SKILL.md +16 -1
- package/dist/actions-Cwe3IDVs.js +0 -2
- package/dist/add-B6vPKZEr.js +0 -1
- package/dist/add-n6c9OINP.js +0 -2
- package/dist/add-v1Pv00HX.js +0 -1
- package/dist/add-wC8ByRgM.js +0 -6
- package/dist/agent-BkxXgha0.js +0 -1
- package/dist/alias-A8ObWElH.js +0 -2
- package/dist/app-CaxTL1H3.js +0 -1
- package/dist/approvals-h5lytkey.js +0 -2
- package/dist/approve-BNhg0MLi.js +0 -2
- package/dist/approve-BiHM8kSo.js +0 -1
- package/dist/apps-BNe86LfS.js +0 -367
- package/dist/archive-CMHRsVYf.js +0 -4
- package/dist/archive-H2B7Me8E.js +0 -3
- package/dist/args-CURX44CA.js +0 -1
- package/dist/ask-D8TIVhPl.js +0 -4
- package/dist/auth-BSMPjhnz.js +0 -1
- package/dist/auth-D3quZAKT.js +0 -1
- package/dist/chat-3AvUDOwf.js +0 -13
- package/dist/chat-bridge-BmqYsASZ.js +0 -2
- package/dist/cli-BBlH53hA.js +0 -9
- package/dist/config-K6Rrjsee.js +0 -3
- package/dist/connection-B-IB8tlP.js +0 -1
- package/dist/connection-BXBDeoax.js +0 -1
- package/dist/create-CP_JmJnh.js +0 -1
- package/dist/credentials-BRFajC0d.js +0 -1
- package/dist/dash/standalone/server/modules-server-server-react-server/src/core/event-prompt.87f064ca0141e796.js +0 -30
- package/dist/dash/standalone/static/assets/chunks/action-fc8716cda7527d8c.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/agent-settings-form-f5576a2c50fce094.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/composer-8f0e8b1d07e74aad.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/connect-apps-857dc9fa3f6f5bbc.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/create-link-6b6e9eeac436c4af.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/instructions-d8884576a18e6cdb.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/outcome-dialog-be3fbe8c4b43d180.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/platform-actions-ed27388f722b4a4c.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/shared-init-71b727f8f5906f08-2.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/side-toggle-a2f67a8671a0309b.js +0 -1
- package/dist/dash/standalone/static/assets/chunks/task-95daa40d39de664f.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-037852a9f274c8c8.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-10eac8df53f62104.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-12635905e9754177.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-12955733c71cc641.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-26999113ea61d5b9.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-27b6e4b7d1697094.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-34fec171024dd082.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-44eb6d4096f7e875.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-4c558a168b95d9b1.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-5d21f3dd3f4407af.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-5fe04a4e1dff28a3.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-88bbc009041aa776.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-b36106c6b8a6cd35.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-b47dda1cd4cfac04.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-b556f5611fdcf545.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-b8485144ca29d436.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-c5c3c90b3518c5a8.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-f139547dc55d7d76.js +0 -1
- package/dist/dash/standalone/static/assets/pnext-client-fd280710b31af681.js +0 -1
- package/dist/default-Ojx5oFuw.js +0 -1
- package/dist/delete-D1hEPpsk.js +0 -2
- package/dist/delete-UyzcQPoG.js +0 -4
- package/dist/disable-Dml_Slph.js +0 -1
- package/dist/discover-CyIfIBGD.js +0 -3
- package/dist/dispatch-CFZ9Crvg.js +0 -8
- package/dist/docs-BUHKbQjM.js +0 -2
- package/dist/docs-CvjWiada.js +0 -2
- package/dist/drive-BqunNi9n.js +0 -1
- package/dist/enable-xye-Nanc.js +0 -1
- package/dist/env-BgE9ipvN.js +0 -1
- package/dist/exec-Cprez703.js +0 -3
- package/dist/executor-3QMa-XRY.js +0 -11
- package/dist/flow/builtin/review.d.ts +0 -2
- package/dist/flow/builtin/review.js +0 -12
- package/dist/flow-CtillCQY.js +0 -1
- package/dist/history-C53URBjs.js +0 -8
- package/dist/http-CDZKt5ln.js +0 -1
- package/dist/hub-B0WCXtsP.js +0 -2
- package/dist/init-HdSVUozH.js +0 -1
- package/dist/integrations-BdLs4W6o.js +0 -1
- package/dist/list-1IMeVNg3.js +0 -1
- package/dist/list-BTjIMvNs.js +0 -1
- package/dist/list-BlOB32n6.js +0 -4
- package/dist/list-CZGTVKcS.js +0 -4
- package/dist/list-CquHtsmW.js +0 -3
- package/dist/list-CxjPT0Il.js +0 -1
- package/dist/list-DvFVuGT_.js +0 -1
- package/dist/list-gFnOS9Hk.js +0 -2
- package/dist/load-Q9fL4VC6.js +0 -2
- package/dist/local-Bzdmzc1o.js +0 -5
- package/dist/login-C723kHh6.js +0 -1
- package/dist/login-Dq3r6gh6.js +0 -1
- package/dist/logout-DEg0aTmq.js +0 -1
- package/dist/maintenance-DYOstY6V.js +0 -1
- package/dist/mcp-CKqinFkk.js +0 -1
- package/dist/mcp-Dsl3Xdd3.js +0 -13
- package/dist/mcp-server-BlP9lACI.js +0 -1
- package/dist/model-Bs27g5EX.js +0 -1
- package/dist/models-Cb0ZTKZ7.js +0 -1
- package/dist/output-BKeyLbvt.js +0 -5
- package/dist/prompt-PEgcMJO7.js +0 -8
- package/dist/prompts-Bj4Fbd_n.js +0 -78
- package/dist/push-DpEW4XbQ.js +0 -1
- package/dist/reconnect-BmP_XXDv.js +0 -1
- package/dist/refresh-SHNJq9Cx.js +0 -1
- package/dist/remove-BZZgJq8Z.js +0 -1
- package/dist/remove-CId1EwPg.js +0 -1
- package/dist/remove-Ci87WQq0.js +0 -1
- package/dist/remove-DxCv9BB4.js +0 -1
- package/dist/rename-DJaf5SwH.js +0 -1
- package/dist/result-BesDQ-b1.js +0 -5
- package/dist/result-D0dpv2O_.js +0 -18
- package/dist/resume-2Y0uC5MM.js +0 -3
- package/dist/review-DIm9oK_W.js +0 -7
- package/dist/review-Dxs-idTn.d.ts +0 -566
- package/dist/rotate-key-CS1G6ReH.js +0 -1
- package/dist/run-BKUd6B8S.js +0 -2
- package/dist/run-DjTTb8oA.js +0 -5
- package/dist/run-UPW-7pKo.js +0 -2
- package/dist/runner-BLS_ReEw.js +0 -1
- package/dist/runner-BM_98EQl.js +0 -1
- package/dist/schema-CjHmulYJ.js +0 -8
- package/dist/sdk-B4Cl0Hbw.d.ts +0 -12551
- package/dist/serve-BApfeXk8.js +0 -12
- package/dist/serve-DE1cKoGa.js +0 -1
- package/dist/serve-lF97RlpX.js +0 -2
- package/dist/serve-mXTjboT1.js +0 -1
- package/dist/server-CUsxAflx.js +0 -1
- package/dist/setup-host-tlsilI6C.js +0 -6
- package/dist/show-Dn7zTz-9.js +0 -1
- package/dist/show-uyUpeqa9.js +0 -1
- package/dist/status-D_1VGn9F.js +0 -1
- package/dist/steer-CMp-a7v2.js +0 -4
- package/dist/stop-C7YjN2sB.js +0 -1
- package/dist/stop-D8G7AtdY.js +0 -3
- package/dist/task-DJ6nruuA.js +0 -1
- package/dist/task-DeFLNmQH.js +0 -1
- package/dist/task-bkoi8_NN.js +0 -7
- package/dist/test-BD9rvefN.js +0 -1
- package/dist/tools-CdWkwI1g.js +0 -1
- package/dist/unalias-bL5t8Isc.js +0 -1
- package/dist/update-DIYW08ME.js +0 -2
- package/dist/upgrade-3fH6dGJw.js +0 -2
- package/dist/usage-Dr8F0xt0.js +0 -1
- package/dist/watch-BiyN4NxE.js +0 -5
- package/dist/watch-DJXu13jK.js +0 -9
- package/dist/worker-CHD_OiQS.js +0 -1
- package/dist/worker-KfrTK_Dk.js +0 -2
- package/dist/workflow-C21qQ4rT.js +0 -1
- package/docs/agents/prompt.md +0 -231
- package/docs/cli.md +0 -155
package/dist/archive-CMHRsVYf.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t}from"./cli-BBlH53hA.js";import{p as n}from"./output-BKeyLbvt.js";import{n as r,s as i,t as a}from"./args-CURX44CA.js";import o from"node:process";const s=e=>e===1?``:`s`,c=e({name:`task archive`,help:{usage:`coder task archive <task-id> | coder task archive --all-stopped [--server [url]]`,summary:`Archive a task session so it drops out of the default list (see it again with
|
|
2
|
-
\`coder task list --archived [--limit N]\`). Pass --all-stopped to archive every
|
|
3
|
-
finished task. A running task keeps running; steering an archived task
|
|
4
|
-
brings it back.`,flags:[[`--all-stopped`,`archive every stopped (finished) task`],t]},options:{...a,"all-stopped":r,...i},args:1,run:async({options:e,args:[t]})=>{let{tasks:n}=await import(`./task-DJ6nruuA.js`).then(e=>e.t);return n.archive(t,{...e,organization:e.workspace,allStopped:e[`all-stopped`]})},print(e,{options:t}){if(e.count===void 0)return void o.stdout.write(`Archived task ${n.cyan(e.taskId)}.\n`);o.stdout.write(t.server===void 0?e.count?`Archived ${e.count} stopped task${s(e.count)}.\n`:`${n.dim(`No stopped tasks to archive.`)}\n`:`Archived ${e.count} server task${s(e.count)}.\n`)}});export{c as commandArchive,s as plural};
|
package/dist/archive-H2B7Me8E.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./cli-BBlH53hA.js";import{p as t}from"./output-BKeyLbvt.js";import{n,t as r}from"./args-CURX44CA.js";import i from"node:process";const a=e=>e===1?``:`s`,o=e({name:`flow archive`,help:{usage:`coder flow archive <run-id> | coder flow archive --all-stopped`,summary:`Archive a flow run so it drops out of the default list (see it again with
|
|
2
|
-
\`coder flow list --archived [--limit N]\`). Pass --all-stopped to archive every
|
|
3
|
-
finished run. A running run must be stopped first.`,flags:[[`--all-stopped`,`archive every stopped (finished) run`]]},options:{...r,"all-stopped":n},args:1,run:async({options:e,args:[t]})=>{let{archiveRuns:n}=await import(`./executor-3QMa-XRY.js`).then(e=>e.S);return n(t,{allStopped:e[`all-stopped`]})},print(e){if(!(`count`in e))return void i.stdout.write(`Archived run ${t.cyan(e.runId)}.\n`);i.stdout.write(e.count?`Archived ${e.count} stopped run${a(e.count)}.\n`:`${t.dim(`No stopped runs to archive.`)}\n`)}});export{o as commandArchive,a as plural};
|
package/dist/args-CURX44CA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Gt as e,Zt as t}from"./core-DwsAMCnL.js";import{_r as n,br as r,hr as i,jr as a,kr as o,mr as s,vr as c,wr as l,yr as u}from"./prompts-Bj4Fbd_n.js";import{U as d}from"./dispatch-CFZ9Crvg.js";const f=l(c()),p=l(o()),m=l(n(o())),h=l(a([o(),r(!0)])),g=i(h,!0),_={cwd:p,json:f},v={server:h,workspace:p,yes:f},y=l(a([r(`all`),s().check(u(),t())],{error:`expected a positive integer or "all"`})),b=l(a([r(`all`),s().check(u(),e())],{error:`expected a number or "all"`}));function x(e){let t=e.def;for(;t.innerType??t.in;)t=(t.innerType??t.in).def;return t}const S=e=>x(e).type===`boolean`;function C(e,t,n={}){let r=e=>new d(`invalid-option`,e,n.command?{hint:`Help: coder ${n.command} --help`}:{}),i=t.shape,a={},o=[],s=!1,c=(e,t,n,o)=>{let s=i[t],c=o?`-`:`--`;if(!s)throw r(`Unknown option ${c}${e} (use -- to pass literal text starting with -)`);if(S(s))return a[t]=n===void 0||n!==`false`,0;if(x(s).type===`union`&&x(s).options.some(e=>e.def.type===`literal`)&&(n===void 0||n.startsWith(`-`)))return a[t]=!0,0;if(n===void 0)throw r(`Missing value for ${c}${e}`);return a[t]=x(s).type===`array`?[...a[t]??[],n]:n,1};for(let t=0;t<e.length;t+=1){let n=e[t];if(s){o.push(n);continue}if(n===`--`){s=!0;continue}if(!n.startsWith(`-`)||n===`-`){o.push(n);continue}if(n.startsWith(`--`)){let[r,a]=n.slice(2).split(`=`,2);a===void 0&&i[r]&&!S(i[r])?t+=c(r,r,e[t+1],!1):c(r,r,a,!1);continue}let r=n.slice(1);i[r]&&!S(i[r])?t+=c(r,r,e[t+1],!0):c(r,r,void 0,!0)}let l=t.safeParse(a);if(!l.success){let e=l.error.issues[0],t=String(e.path[0]??``),n=a[t];throw r(n===void 0?`Missing required --${t}.`:`Invalid --${t} value ${JSON.stringify(n)}: ${e.message}`)}let u=n.required?.[o.length];if(u)throw r(`Missing ${u}.`);let f=n.positionals??0;if(o.length>f){let e=o.slice(f);throw new d(`invalid-option`,`Unexpected argument${e.length>1?`s`:``}: ${e.join(` `)}`,n.command?{hint:`Help: coder ${n.command} --help`}:{})}return{options:l.data,positionals:o}}export{C as a,p as c,h as i,m as l,f as n,g as o,y as r,v as s,_ as t,b as u};
|
package/dist/ask-D8TIVhPl.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t}from"./cli-BBlH53hA.js";import{p as n}from"./output-BKeyLbvt.js";import{c as r,s as i,t as a}from"./args-CURX44CA.js";import{idAndText as o}from"./steer-CMp-a7v2.js";import s from"node:process";const c=e({name:`task ask`,help:{usage:`coder task ask <task-id> "<question>" [--server [url]]`,summary:`Answer a question ABOUT a task without touching it: a read-only sidecar reads
|
|
2
|
-
the task's progress log, result, and workspace and answers; the task never
|
|
3
|
-
sees the question and its thread is not steered. Works whether the task is
|
|
4
|
-
running or stopped. To change what the task does, use \`coder task steer\`.`,flags:[[`--model <alias|slug>`,`sidecar model (default: the task's own)`],[`--effort <low|medium|high>`,`sidecar reasoning effort`],t],examples:[[`coder task ask task-abc "what approach did you take and why?"`,`probe a decision without derailing the task`]]},options:{...a,model:r,effort:r,...i},args:1/0,async run({options:e,args:t}){let{tasks:r}=await import(`./task-DJ6nruuA.js`).then(e=>e.t),{id:i,text:a}=o(t,`Missing task id or question.`,[`Usage: coder task ask <task-id> "<question>"`,`Help: coder task ask --help`]);return r.ask(i,a,{...e,organization:e.workspace,onAsking:t=>e.json||s.stderr.write(`${n.dim(`[coder]`)} asking about task ${n.cyan(t)} (read-only sidecar; the task is not interrupted)...\n`)})},json:({ok:e,...t})=>t,print(e,{options:t,args:[r]}){if(t.server!==void 0)return void s.stdout.write(`Asked server task ${n.cyan(r)}.\n`);let{answer:i,error:a}=e;i?s.stdout.write(`\n${i}\n`):s.stdout.write(`${n.dim(`(no answer)`)}${a?` ${n.red(a)}`:``}\n`)},exit:(e,{options:t})=>t.server===void 0?+!e.ok:void 0});export{c as commandAsk};
|
package/dist/auth-BSMPjhnz.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,a as O,at as k,b as ee,c as A,ct as j,d as M,dt as te,et as N,f as ne,ft as re,g as ie,gt as ae,ht as oe,i as se,it as ce,j as le,k as ue,lt as de,m as fe,mt as P,n as pe,nt as me,o as he,ot as F,p as ge,pt as _e,q as ve,r as ye,rt as be,s as xe,st as Se,tt as Ce,ut as we,v as Te,vt as Ee,w as De,x as Oe,y as ke,z as Ae}from"./build-CmtlB7pX.js";import{i as je,l as Me}from"./http-CDZKt5ln.js";import{B as Ne,_r as Pe,gr as Fe,or as Ie,yn as Le}from"./apps-BNe86LfS.js";import{M as I,j as L,l as R}from"./schema-CjHmulYJ.js";import{a as Re,i as ze,o as Be}from"./serve-BApfeXk8.js";import{createECDH as Ve,hkdfSync as He}from"node:crypto";import{isDeepStrictEqual as Ue}from"node:util";function We(e,t,n){if(!S(e,t,n))throw new N(`JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint`)}function Ge(e,t,n=!1){if(!e[1]&&!e[2]&&!e[3])throw new N(`either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()`);t!==void 0&&(e[8]=t?.crit);let[,i,a,c,l,d,f,p,m]=e;if(l!==void 0&&v(l,`JWE Additional Authenticated Data`),d!==void 0&&v(d,`JWE Content Encryption Key`),f!==void 0&&v(f,`JWE Initialization Vector`),!n&&i!==void 0&&(i=s(N,i)[0],e[1]=i),a!==void 0&&(a=s(N,a)[0],e[2]=a),!n&&c!==void 0&&(c=s(N,c)[0],e[3]=c),p!==void 0&&!x(p))throw TypeError(`JWE Key Management Parameters must be an object`);We(i,a,c);let h={...i,...a,...c};T(N,i),u(N,o,m,i,h),ke(h,i);let{alg:g,enc:_}=h;if(typeof g!=`string`||!g)throw new N(`JWE "alg" (Algorithm) Header Parameter missing or invalid`);let y=Oe[g];if(y?.mode===`integrated-encryption`){if(_!==void 0)throw new N(`JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption`);if(d!==void 0)throw TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${g}`);if(f!==void 0)throw TypeError(`setInitializationVector cannot be called with JWE "alg" (Algorithm) Header ${g}`);return[h,void 0,y]}if(typeof _!=`string`||!_)throw new N(`JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid`);return[h,r(_),y]}async function Ke(e,t,n){let[r,i,a]=t,[o,s,c,l,u,d,f,m,,h]=e,g=s,_=c,v=a??y(r.alg),x,S,C;v.mode===`integrated-encryption`?C=await p(v,n,`encrypt`):[C,x,S]=await ee(v,i,n,r,d,m),S&&(h?_=_?{..._,...S}:S:g=g?{...g,...S}:S,We(g,_,l));let T=g?w(JSON.stringify(g)):``,E=u?.byteLength?w(u):void 0,D=P(E?`${T}.${E}`:T),O=o;r.zip===`DEF`&&(O=await Te(O).catch(e=>{throw new N(`Failed to compress plaintext`,{cause:e})}));let k,A,j;v.mode===`integrated-encryption`?[x,k]=await v.encrypt(C,O,D,g,r,m):{ciphertext:k,tag:A,iv:j}=await b(i,O,C,f,D);let M={ciphertext:w(k)};return j&&(M.iv=w(j)),A&&(M.tag=w(A)),x?.byteLength&&(M.encrypted_key=w(x)),E&&(M.aad=E),g&&(M.protected=T),l&&(M.unprotected=l),_&&(M.header=_),M}async function qe(e,t,n){return Ke(e,Ge(e,n),t)}function Je(e){return[e.protected,e.encrypted_key,e.iv,e.ciphertext,e.tag].join(`.`)}const z=[[`verify`],[`sign`]];function Ye(e){let t={name:`HMAC`,hash:`SHA-${e}`};return{kty:[`oct`],secret:!0,subtle:t,signing:t,usages:z}}function B(e,t){let n={name:t?`RSA-PSS`:`RSASSA-PKCS1-v1_5`,hash:`SHA-${e}`};return{kty:[`RSA`],subtle:n,signing:t?{...n,saltLength:t}:n,usages:z,minRsaBits:2048}}function Xe(e,t){return{kty:[`EC`],crv:e,subtle:{name:`ECDSA`,namedCurve:e},signing:{name:`ECDSA`,hash:`SHA-${t}`},usages:z}}function Ze(){let e={name:`Ed25519`};return{kty:[`OKP`],crv:`Ed25519`,subtle:e,signing:e,usages:z}}function Qe(e){let t={name:`ML-DSA-${e}`};return{kty:[`AKP`],subtle:t,signing:t,usages:z}}const $e=De({HS256:Ye(256),HS384:Ye(384),HS512:Ye(512),RS256:B(256),RS384:B(384),RS512:B(512),PS256:B(256,32),PS384:B(384,48),PS512:B(512,64),ES256:Xe(`P-256`,256),ES384:Xe(`P-384`,384),ES512:Xe(`P-521`,512),EdDSA:Ze(),Ed25519:Ze(),"ML-DSA-44":Qe(44),"ML-DSA-65":Qe(65),"ML-DSA-87":Qe(87)});function et(t){let n=typeof t==`string`?$e[t]:void 0;if(!n)throw new e(`alg ${t} is not supported either by JOSE or your javascript runtime`);return n}function tt(e){return[e&&d(`algorithms`,e.algorithms),e?.crit]}function nt(e){return e===void 0?{}:C(e,F,`JWS Protected Header is invalid`)}function rt(e){try{return P(e)}catch{throw new F(`JWS Compact Serialization payload must use only ASCII characters`)}}async function it(e,t,r,i,o){let{protected:s,header:c,payload:d}=e,f=o??nt(s);if(!S(f,c))throw new F(`JWS Protected and JWS Unprotected Header Parameter names must be disjoint`);let h={...f,...c},g=ve(f,u(F,l,t[1],f,h)),{alg:_}=h;if(typeof _!=`string`||!_)throw new F(`JWS "alg" (Algorithm) Header Parameter missing or invalid`);if(t[0]&&!t[0].has(_))throw new E(`"alg" (Algorithm) Header Parameter value not allowed`);if(g){if(typeof d!=`string`)throw new F(`JWS Payload must be a string`)}else if(typeof d!=`string`&&!(d instanceof Uint8Array))throw new F(`JWS Payload must be a string or an Uint8Array instance`);let v=g||typeof d!=`string`?d:i(d),y=!1;typeof r==`function`&&(r=await r(f,e),y=!0);let b=et(_),x=te(s===void 0?new Uint8Array:P(s),P(`.`),typeof v==`string`?t[2]??=n(v,`payload`,F):v),C=Ae(e.signature,`signature`,F),w=await p(b,r,`verify`),T=await m(w,b.subtle,`verify`);b.minRsaBits&&a(b.alg,T);let D=!1;try{D=await crypto.subtle.verify(b.signing,T,C,x)}catch{}if(!D)throw new Se;let O={payload:typeof v==`string`?Ae(v,`payload`,F):v};return s!==void 0&&(O.protectedHeader=f),c!==void 0&&(O.unprotectedHeader=c),y?[{...O,key:w},g]:[O,g]}async function at(e,t,n){if(e instanceof Uint8Array&&(e=re.decode(e)),typeof e!=`string`)throw new F(`Compact JWS must be a string or Uint8Array`);let{0:r,1:i,2:a,length:o}=e.split(`.`);if(o!==3)throw new F(`Invalid Compact JWS`);return it({payload:i,protected:r,signature:a},t,n,rt)}const V=e=>Math.floor(e.getTime()/1e3),ot={s:1,m:60,h:3600,d:86400,w:604800,y:31557600},st=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,H=`check_failed`;function ct(){throw TypeError(`Invalid time period format`)}function U(e){typeof e!=`string`&&ct();let t=st.exec(e);(!t||t[4]&&t[1])&&ct();let n=parseFloat(t[2]),r=Math.round(n*ot[t[3][0].toLowerCase()]);return Number.isFinite(r)||ct(),t[1]===`-`||t[4]===`ago`?-r:r}function W(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}function lt(e,t){if(typeof t!=`string`)throw TypeError(`"${e}" claim must be a string`)}function ut(e){if(typeof e!=`string`&&(!Array.isArray(e)||Array.from(e).some(e=>typeof e!=`string`)))throw TypeError(`"aud" claim must be a string or an array of strings`)}function dt(e,t){return typeof e==`number`?W(t,e):e instanceof Date?W(t,V(e)):V(new Date)+U(e)}const ft=e=>{let t=e.toLowerCase();return e.includes(`/`)?t:`application/${t}`},pt=(e,t)=>typeof e==`string`?t.includes(e):Array.isArray(e)?t.some(t=>e.includes(t)):!1;function mt(e,t,n=!1){let r=e[t];if(!(r===void 0&&!n)){if(typeof r!=`number`)throw new j(`"${t}" claim must be a number`,e,t,`invalid`);return r}}function ht(e,t){throw new j(`unexpected "${t}" claim value`,e,t,H)}function gt(e,t,n={}){let r;try{r=JSON.parse(ae.decode(t))}catch{}if(!x(r))throw new we(`JWT Claims Set must be a top-level JSON object`);let{typ:i}=n;if(i!==void 0&&(typeof e.typ!=`string`||ft(e.typ)!==ft(i)))throw new j(`unexpected "typ" JWT header value`,r,`typ`,H);let{requiredClaims:a=[],issuer:o,subject:s,audience:c,maxTokenAge:l}=n,u=[...a];l!==void 0&&u.push(`iat`),c!==void 0&&u.push(`aud`),s!==void 0&&u.push(`sub`),o!==void 0&&u.push(`iss`);for(let e of new Set(u.reverse()))if(!Object.hasOwn(r,e))throw new j(`missing required "${e}" claim`,r,e,`missing`);o!==void 0&&!(Array.isArray(o)?o:[o]).includes(r.iss)&&ht(r,`iss`),s!==void 0&&r.sub!==s&&ht(r,`sub`),c!==void 0&&!pt(r.aud,typeof c==`string`?[c]:c)&&ht(r,`aud`);let{clockTolerance:d}=n,f=0;if(typeof d==`string`)f=U(d);else if(d!==void 0){if(typeof d!=`number`)throw TypeError(`Invalid clockTolerance option type`);f=d}W(`clockTolerance option`,f);let{currentDate:p}=n,m=W(`currentDate option`,V(p===void 0?new Date:p)),h=mt(r,`iat`,l!==void 0),g=mt(r,`nbf`);if(g!==void 0&&g>m+f)throw new j(`"nbf" claim timestamp check failed`,r,`nbf`,H);let _=mt(r,`exp`);if(_!==void 0&&_<=m-f)throw new de(`"exp" claim timestamp check failed`,r,`exp`,H);if(l!==void 0){let e=m-h,t=W(`maxTokenAge option`,typeof l==`number`?l:U(l));if(e-f>t)throw new de(`"iat" claim timestamp check failed (too far in the past)`,r,`iat`,H);if(e<-f)throw new j(`"iat" claim timestamp check failed (it should be in the past)`,r,`iat`,H)}return r}let _t;function G(e){return _t.get(e)}function vt(e){let t=G(e);for(let e of[`iat`,`nbf`,`exp`]){let n=t[e];if(typeof n==`number`&&!Number.isFinite(n))throw TypeError(`"${e}" claim must be a finite number`)}return oe.encode(JSON.stringify(t))}function yt(e,t){return G(e)[t]}var bt=class{constructor(e={}){if(!x(e))throw TypeError(`JWT Claims Set MUST be an object`);(_t||=new WeakMap).set(this,structuredClone(e))}setIssuer(e){return lt(`iss`,e),G(this).iss=e,this}setSubject(e){return lt(`sub`,e),G(this).sub=e,this}setAudience(e){return ut(e),G(this).aud=e,this}setJti(e){return lt(`jti`,e),G(this).jti=e,this}setNotBefore(e){return G(this).nbf=dt(e,`setNotBefore`),this}setExpirationTime(e){return G(this).exp=dt(e,`setExpirationTime`),this}setIssuedAt(e){let t=G(this);return t.iat=e===void 0?V(new Date):typeof e==`string`?W(`setIssuedAt`,V(new Date)+U(e)):dt(e,`setIssuedAt`),this}};async function xt(e,t,n){let[r,i]=await at(e,tt(n),t);if(!i)throw new we(`JWTs MUST NOT use unencoded payload`);let a=gt(r.protectedHeader,r.payload,n);return{...r,payload:a}}async function St(e,t,n){let{plaintext:r,...i}=await ie(e,D(n),t),{protectedHeader:a}=i,o=gt(a,r,n);for(let e of[`iss`,`sub`,`aud`])if(a[e]!==void 0&&(e===`aud`?JSON.stringify(a.aud)!==JSON.stringify(o.aud):a[e]!==o[e]))throw new j(`replicated "${e}" claim header parameter mismatch`,o,e,`mismatch`);return{payload:o,...i}}const Ct=bt;var wt=class extends Ct{#e=[void 0];#t;#n;#r;setProtectedHeader(e){return f(this.#e[1],`setProtectedHeader`),this.#e[1]=e,this}setKeyManagementParameters(e){return f(this.#e[7],`setKeyManagementParameters`),this.#e[7]=e,this}setContentEncryptionKey(e){return f(this.#e[5],`setContentEncryptionKey`),this.#e[5]=e,this}setInitializationVector(e){return f(this.#e[6],`setInitializationVector`),this.#e[6]=e,this}replicateIssuerAsHeader(){return this.#t=!0,this}replicateSubjectAsHeader(){return this.#n=!0,this}replicateAudienceAsHeader(){return this.#r=!0,this}async encrypt(e,t){let n=vt(this);this.#e[1]&&(this.#t||this.#n||this.#r)&&(this.#e[1]={...this.#e[1],iss:this.#t?yt(this,`iss`):void 0,sub:this.#n?yt(this,`sub`):void 0,aud:this.#r?yt(this,`aud`):void 0});let r=[...this.#e];return r[0]=n,Je(await qe(r,e,t))}};async function Tt(e){if(t(e))if(e.type===`secret`)e=e.export();else return e.export({format:`jwk`});if(e instanceof Uint8Array)return{kty:`oct`,k:w(e)};if(!h(e))throw TypeError(i(e,`CryptoKey`,`KeyObject`,`Uint8Array`));if(!e.extractable)throw TypeError(`non-extractable CryptoKey cannot be exported as a JWK`);let n=await crypto.subtle.exportKey(`jwk`,e);delete n.ext,delete n.key_ops,delete n.use,n.kty!==`AKP`&&delete n.alg;for(let e of Object.keys(n))n[e]===void 0&&delete n[e];return n}const K=(e,t)=>{if(typeof e!=`string`||!e)throw new Ce(`${t} missing or invalid`)};async function Et(t,n){let r;if(x(t)){if(r=g(t),typeof r.kty!=`string`)throw TypeError(i(t,`CryptoKey`,`KeyObject`,`JSON Web Key`))}else if(ue(t))r=g(await Tt(t));else throw TypeError(i(t,`CryptoKey`,`KeyObject`,`JSON Web Key`));if(n??=`sha256`,n!==`sha256`&&n!==`sha384`&&n!==`sha512`)throw TypeError(`digestAlgorithm must one of "sha256", "sha384", or "sha512"`);let a;switch(r.kty){case`AKP`:K(r.alg,`"alg" (Algorithm) Parameter`),K(r.pub,`"pub" (Public key) Parameter`),a={alg:r.alg,kty:r.kty,pub:r.pub};break;case`EC`:K(r.crv,`"crv" (Curve) Parameter`),K(r.x,`"x" (X Coordinate) Parameter`),K(r.y,`"y" (Y Coordinate) Parameter`),a={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case`OKP`:K(r.crv,`"crv" (Subtype of Key Pair) Parameter`),K(r.x,`"x" (Public Key) Parameter`),a={crv:r.crv,kty:r.kty,x:r.x};break;case`RSA`:K(r.e,`"e" (Exponent) Parameter`),K(r.n,`"n" (Modulus) Parameter`),a={e:r.e,kty:r.kty,n:r.n};break;case`oct`:if(typeof r.k!=`string`)throw new Ce(`"k" (Key Value) Parameter missing or invalid`);a={k:r.k,kty:r.kty};break;default:throw new e(`"kty" (Key Type) Parameter missing or unsupported`)}let o=P(JSON.stringify(a));return w(await _e(n,o))}function Dt(e,t,n,r){let{kty:i,key_ops:a,ext:o,kid:s,alg:c,use:l,crv:u}=e;return(o===void 0||typeof o==`boolean`)&&(a===void 0||Array.isArray(a)&&a.every((e,t)=>typeof e==`string`&&a.indexOf(e)===t)&&a.includes(`verify`))&&t.kty.includes(i)&&(r===void 0||typeof r==`string`&&r===s)&&(c===void 0?i!==`AKP`:n===c)&&(l===void 0||l===`sig`)&&(!t.crv||u===t.crv)}async function Ot(e,t,n){let r=e.get(t)||e.set(t,{}).get(t),{alg:i}=n;if(r[i]===void 0){let e=le(n,t,!0).then(e=>{if(e.type!==`public`)throw new me(`JSON Web Key Set members must be public keys`);return r[i]=e,e}).catch(t=>{throw r[i]===e&&delete r[i],t});r[i]=e}return r[i]}function kt(t){let n;try{n=structuredClone(t)}catch{}if(!c(n))throw new me(`JSON Web Key Set malformed`);let r=n.keys.map(e=>{let t=g(e);return Array.isArray(t.key_ops)&&(t.key_ops=[...t.key_ops]),t}),i=new WeakMap;return Object.defineProperty(async(t,a)=>{let{alg:o,kid:s}={...t,...a?.header},c=typeof o==`string`?$e[o]:void 0;if(!c||c.secret)throw new e(`Unsupported "alg" value for a JSON Web Key Set`);let l=n.keys.filter((e,t)=>Dt(r[t],c,o,s)),{0:u,length:d}=l;if(!d)throw new ce;if(d!==1){let e=new be;throw e[Symbol.asyncIterator]=async function*(){for(let e of l)try{yield await Ot(i,e,c)}catch{}},e}return Ot(i,u,c)},"jwks",{value:()=>structuredClone(n)})}function At(){return typeof WebSocketPair<`u`||typeof navigator<`u`&&navigator.userAgent===`Cloudflare-Workers`||typeof EdgeRuntime<`u`&&EdgeRuntime===`vercel`}let jt;(typeof navigator>`u`||!navigator.userAgent?.startsWith?.(`Mozilla/5.0 `))&&(jt=`jose/v6.2.12`);const Mt=Symbol();async function Nt(e,t,n,r=fetch){let i=await r(e,{method:`GET`,signal:n,redirect:`manual`,headers:t}).catch(e=>{throw e.name===`TimeoutError`?new k:e});if(i.status!==200)throw new _(`Expected 200 OK from the JSON Web Key Set HTTP response`);try{return await i.json()}catch{throw new _(`Failed to parse the JSON Web Key Set HTTP response as JSON`)}}const Pt=Symbol();function q(e,t){return Number.isFinite(e)&&Date.now()<e+t}function Ft(e,t,n){if(Number.isNaN(e))throw TypeError(`"${n}" option must not be NaN`);return typeof e==`number`?e:t}function It(e,t){if(!(e instanceof URL))throw TypeError(`url must be an instance of URL`);let n=new URL(e.href).href,r=t??{},i=r.timeoutDuration;if(typeof i==`number`&&(!Number.isInteger(i)||i<0))throw TypeError(`"timeoutDuration" option must be a non-negative integer`);let a=typeof i==`number`?i:5e3,o=Ft(r.cooldownDuration,3e4,`cooldownDuration`),s=Ft(r.cacheMaxAge,6e5,`cacheMaxAge`),l=new Headers(r.headers);jt&&!l.has(`User-Agent`)&&l.set(`User-Agent`,jt),l.has(`accept`)||l.set(`accept`,`application/json, application/jwk-set+json`);let u=r[Mt],d=r[Pt],f,p,m=0,h=0,g;if(d&&typeof d==`object`){let{uat:e,jwks:t}=d;q(e,s)&&c(t)&&(f=e,g=kt(t))}let _=async()=>{if(p&&At()&&(p=void 0),!p){let e=++m,t=p=Nt(n,l,AbortSignal.timeout(a),u).then(t=>{let n=kt(t);if(e<=h)return;g=n;let r=Date.now();d&&(d.uat=r,d.jwks=t),f=r,h=e}).finally(()=>{p===t&&(p=void 0)})}await p};return Object.defineProperties(async(e,t)=>{(!g||!q(f,s))&&await _();try{return await g(e,t)}catch(n){if(n instanceof ce&&!q(f,o))return await _(),g(e,t);throw n}},{coolingDown:{get:()=>q(f,o),enumerable:!0},fresh:{get:()=>q(f,s),enumerable:!0},reload:{value:_,enumerable:!0},reloading:{get:()=>!!p,enumerable:!0},jwks:{value:()=>g?.jwks(),enumerable:!0}})}const Lt=(e,t)=>new Uint8Array(He(`sha256`,e,``,t,32));async function Rt(e){let t=Lt(e,`coder oidc client key`),n=Ve(`prime256v1`);n.setPrivateKey(t);let r=n.getPublicKey(),i={kty:`EC`,crv:`P-256`,x:Buffer.from(r.subarray(1,33)).toString(`base64url`),y:Buffer.from(r.subarray(33)).toString(`base64url`)},a=await crypto.subtle.importKey(`jwk`,{...i,d:Buffer.from(t).toString(`base64url`)},{name:`ECDSA`,namedCurve:`P-256`},!1,[`sign`]),o=await Et(i);return{key:a,kid:o,jwk:{...i,kid:o,alg:`ES256`,use:`sig`}}}async function zt(e){let t=[e.encryptionKey,e.previousEncryptionKey].filter(e=>!!e),n=await Promise.all(t.map(Rt));return{cookie:t.map(e=>Lt(e,`coder session cookie`)),client:n[0],jwks:{keys:n.map(e=>e.jwk)}}}const J=`${Fe}.session`,Y=`${Fe}.oidc`,X=`${Fe}.operator`,Bt=3800,Vt=2592e3,Ht=3600,Z=()=>Math.floor(Date.now()/1e3);function Q(e){let t=new Map;for(let n of(e.get(`cookie`)??``).split(/;\s*/)){let e=n.indexOf(`=`);e>0&&t.set(n.slice(0,e),n.slice(e+1))}return t}function Ut(e){let t=[];for(;e.has(`${J}.${t.length}`);)t.push(`${J}.${t.length}`);return t}function $(e){let t=Q(e);return t.get(J)??(Ut(t).map(e=>t.get(e)).join(``)||void 0)}function Wt(e){return Array.isArray(e)?e.flatMap(e=>typeof e?.id==`string`&&typeof e.role==`string`?[{id:e.id,slug:String(e.slug??e.id),name:String(e.name??e.slug??e.id),role:e.role}]:[]):[]}function Gt(e){let t=(e?.orgs.find(t=>t.id===e.org)??e?.orgs[0])?.slug;return t?`/dash/${encodeURIComponent(t)}/operator`:`/dash/operator`}function Kt(e,t,n){let r=e.get(`x-coder-organization`);if(r)return Ie(t,r);let i=t.organizations.find(e=>e.id===n)??t.organizations[0];return i?{...t,organizationId:i.id,role:i.role}:t}async function qt(e,t){let n=t.auth.wular.url,r=t.publicUrl,i=new URL(r).origin,a=r.startsWith(`https:`),o=await zt(t),s=t=>t instanceof Le?t.db:e,c=`${r}${ze}`,l=(e,t,n)=>`${e}=${t}; Path=/; HttpOnly; SameSite=Lax; Max-Age=${n}${a?`; Secure`:``}`,u=(e,t)=>new wt(e).setProtectedHeader({alg:`dir`,enc:`A256GCM`}).setIssuedAt().setExpirationTime(`${t}s`).encrypt(o.cookie[0]);async function d(e){if(e)for(let t of o.cookie)try{return(await St(e,t)).payload}catch{}}async function f(e,t){let n=await u(t,Vt),r=Ut(Q(e));if(n.length<=Bt)return[l(J,n,Vt),...r.map(e=>l(e,``,0))];let i=n.match(RegExp(`.{1,${Bt}}`,`g`));return[l(J,``,0),...i.map((e,t)=>l(`${J}.${t}`,e,Vt)),...r.slice(i.length).map(e=>l(e,``,0))]}let p=e=>[J,...Ut(Q(e))].map(e=>l(e,``,0)),m,h=()=>m??=A(new URL(n),`${r}${Be}`,void 0,pe(o.client),new URL(n).protocol===`http:`?{execute:[ye]}:void 0).catch(e=>{throw m=void 0,e}),g,v=async()=>g??=It(new URL((await h()).serverMetadata().jwks_uri));function y(e,t){let n=e.claims();if(!n)throw Error(`Wular Auth returned no ID token`);let r=Wt(n.organizations),i=e=>r.find(t=>t.id===e)?.id;return{sub:n.sub,name:typeof n.name==`string`?n.name:``,email:typeof n.email==`string`?n.email:``,orgs:r,org:i(t?.org)??i(n.org)??r[0]?.id,exp_at:Z()+(e.expires_in??600),at:Z(),rt:e.refresh_token??t?.rt,idt:e.id_token??t?.idt}}let b=async t=>{try{await Promise.all(t.map(({id:t,slug:n,name:r})=>new Le(e,t).put(`delivery`,`workspace`,{slug:n,name:r})))}catch(e){console.error(`coder server: saving organizations failed`,e)}},x=new Map;function S(e){let t=e.rt;if(!t)return Promise.resolve(void 0);let n=x.get(t);return n||(n=h().then(e=>fe(e,t)).then(t=>y(t,e)).then(t=>(Ue(t.orgs,e.orgs)||b(t.orgs),t)).catch(e=>(x.delete(t),e instanceof Ee&&e.error===`invalid_grant`?!1:void 0)),x.set(t,n),setTimeout(()=>x.delete(t),6e4).unref?.()),n.then(t=>t&&t.orgs.some(t=>t.id===e.org)?{...t,org:e.org}:t)}async function C(e,t,r){let a=(await v().then(t=>xt(e,t,{issuer:n,audience:i,typ:`at+jwt`})).catch(e=>{(!(e instanceof _)||e instanceof k||e.code===`ERR_JOSE_GENERIC`)&&console.error(`coder server: bearer verification unavailable`,e)}))?.payload;if(!a?.sub)return;let o={user:{id:a.sub,name:``,email:``},organizations:Wt(a.organizations)};return r&&Z()-(a.iat??0)>60?{...o,stale:!0}:Kt(t,o,typeof a.org==`string`?a.org:void 0)}async function w(e){let t=await h().catch(()=>void 0);if(!t)return Response.redirect(`${r}/login?error=unavailable`,302);let n=e.searchParams.get(`operator`)===`1`,a=e.searchParams.get(`prompt`)===`login`,o={verifier:ne(),state:ge(),nonce:M(),return:n?`/dash`:Pe(e.searchParams.get(`return`),i),...n?{operator:n}:{}},s=O(t,{redirect_uri:c,...n?{scope:`openid`,prompt:`login`}:{scope:Re},...a?{prompt:`login`}:{},code_challenge:await xe(o.verifier),code_challenge_method:`S256`,state:o.state,nonce:o.nonce});return new Response(null,{status:302,headers:{location:s.href,"set-cookie":l(Y,await u(o,600),600)}})}async function T(e,t){let n=e=>{let t=new Headers({location:`/login?error=${encodeURIComponent(e)}`});return t.append(`set-cookie`,l(Y,``,0)),new Response(null,{status:302,headers:t})},r=await d(Q(e.headers).get(Y));if(!r)return n(`expired`);let i=t.searchParams.get(`error`);if(i)return n(i);let a,o;try{let e=await se(await h(),new URL(`${c}${t.search}`),{pkceCodeVerifier:r.verifier,expectedState:r.state,expectedNonce:r.nonce,idTokenExpected:!0});a=y(e),o=e.claims()?.auth_time}catch{return n(`sign_in_failed`)}if(r.operator)return D(e,a.sub,o);await b(a.orgs);let s=new Headers({location:r.return});s.append(`set-cookie`,l(Y,``,0));for(let t of await f(e.headers,a))s.append(`set-cookie`,t);return new Response(null,{status:302,headers:s})}let E=e=>u(e,e.at+Ht-e.seen).then(t=>l(X,t,e.at+Ht-e.seen));async function D(e,n,r){let a=await d($(e.headers)),o=Z(),s=typeof r==`number`&&o-r<=60,c=s&&a?.sub===n&&t.operators?.includes(n),u=new Headers({location:c?Gt(a):`${Gt(a)}?error=${s?`denied`:`stale`}`});return u.append(`set-cookie`,l(Y,``,0)),c&&u.append(`set-cookie`,await E({sub:n,aud:i,at:o,seen:o})),new Response(null,{status:302,headers:u})}async function ee(e){if(!Ne(e,r))return je();let t=await d($(e.headers)),n=await h().catch(()=>void 0),i=`${r}/?signed_out=1`,a=n?.serverMetadata().end_session_endpoint&&t?.idt?he(n,{id_token_hint:t.idt,post_logout_redirect_uri:i}).href:i,o=Response.json({url:a});for(let t of p(e.headers))o.headers.append(`set-cookie`,t);return o.headers.append(`set-cookie`,l(X,``,0)),o}return{issuer:n,jwks:o.jwks,handler(e){let t=new URL(e.url);return t.pathname===`/api/auth/sign-in`&&e.method===`GET`?w(t):t.pathname===`/api/auth/callback`&&e.method===`GET`?T(e,t):t.pathname===`/api/auth/sign-out`&&e.method===`POST`?ee(e):Promise.resolve(Me())},async session(e,t=!1,n=[]){let r=e.get(`authorization`);if(r?.startsWith(`Bearer `))return C(r.slice(7),e,t);let i=await d($(e));if(i){if(i.exp_at<=Z()||t&&Z()-i.at>60){let t=await S(i);if(t===!1&&n.push(...p(e)),!t)return;i=t,n.push(...await f(e,i))}return Kt(e,{user:{id:i.sub,name:i.name,email:i.email},organizations:i.orgs},i.org)}},async operator(e,t=[]){let n=Q(e).get(X),r=await d(n),a=Z();if(!r||r.aud!==i||a-r.seen>900||a>=r.at+Ht){n&&t.push(l(X,``,0));return}return t.push(await E({...r,seen:a})),r.sub},async setOrganization(e,t,n=[]){let r=await d($(e));r&&r.exp_at<=Z()&&(r=await S(r)||void 0);let i=r?.orgs.find(e=>e.slug===t);if(!(!r||!i))return r.org!==i.id&&n.push(...await f(e,{...r,org:i.id})),i},async organization(t){let n=await new Le(e,t).get(`delivery`,`workspace`);return n&&`slug`in n?n:void 0},async link(e,t,n,r={},i){let a={name:e.name,email:e.email,...r.organizations?{organizations:r.organizations}:{},...r.token?{token:r.token}:{}},[o]=await s(i).insert(R).values({platform:t,platformUserId:n,userId:e.id,...a}).onConflictDoUpdate({target:[R.platform,R.platformUserId],set:a,setWhere:I(R.userId,e.id)}).returning({userId:R.userId});return o?.userId===e.id?`linked`:`taken`},async linkedAccounts(e,t){return(await s(t).select().from(R).where(I(R.userId,e))).map(e=>({platform:e.platform,platformUserId:e.platformUserId,name:e.name,email:e.email,...e.organizations?{organizations:e.organizations}:{},...e.token?{token:e.token}:{}}))},async unlink(e,t,n,r){await s(r).delete(R).where(L(I(R.userId,e),I(R.platform,t),I(R.platformUserId,n)))},async refreshLinkedToken(e,t,n,r,i,a){let[o]=await s(a).update(R).set({token:i}).where(L(I(R.userId,e),I(R.platform,t),I(R.platformUserId,n),I(R.token,r))).returning({userId:R.userId});return!!o},async linkedUser(t,n){let[r]=await e.select({id:R.userId,name:R.name,email:R.email,organizations:R.organizations,token:R.token}).from(R).where(L(I(R.platform,t),I(R.platformUserId,n)));return r&&{id:r.id,name:r.name,email:r.email,...r.organizations?{organizations:r.organizations}:{},...r.token?{token:r.token}:{}}}}}export{qt as createAuth};
|
package/dist/auth-D3quZAKT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./cli-BBlH53hA.js";const t=e(`auth`,{login:async()=>(await import(`./login-Dq3r6gh6.js`)).commandLogin,logout:async()=>(await import(`./logout-DEg0aTmq.js`)).commandLogout,status:async()=>(await import(`./status-D_1VGn9F.js`)).commandStatus},{menu:[{usage:`login`,blurb:`sign in through the browser`},{usage:`logout`,blurb:`sign out and forget the saved session`},{usage:`status`,blurb:`show where you are signed in`}],description:[`Sign in to Coder and manage saved server sessions.`],exampleCommand:`auth login`});export{t as commandAuth};
|
package/dist/chat-3AvUDOwf.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{bn as e}from"./apps-BNe86LfS.js";import{M as t,N as n,R as r,U as i,V as a,X as o,i as s,j as c,r as l}from"./schema-CjHmulYJ.js";import{a as u}from"./client-sqXb-y09.js";import{randomUUID as d}from"node:crypto";var f=class{db;now;constructor(e,t=Date.now){this.db=e,this.now=t}at(e){return e?new Date(this.now()+e):null}stamp(e){return e===void 0?null:new Date(this.now()+e).toISOString()}live(){return i(r(s.expiresAt),n(s.expiresAt,new Date(this.now())))}expired(){return a(s.expiresAt,new Date(this.now()))}async read(e){let[n]=await u(this.db,()=>this.db.select({value:o`${s.value}`}).from(s).where(c(t(s.key,e),this.live())));return n?.value}async claim(e,t,n){return(await this.db.insert(s).values({key:e,value:t,expiresAt:n}).onConflictDoUpdate({target:s.key,set:{value:t,expiresAt:n},setWhere:this.expired()}).returning({key:s.key})).length>0}async connect(){}async disconnect(){}async get(e){return await this.read(`k:${e}`)??null}async set(e,t,n){let r={value:t,expiresAt:this.at(n)};await this.db.insert(s).values({key:`k:${e}`,...r}).onConflictDoUpdate({target:s.key,set:r})}setIfNotExists(e,t,n){return this.claim(`k:${e}`,t,this.at(n))}async delete(e){await this.db.execute(o`with items as (delete from ${l} where key = ${`k:${e}`}) delete from ${s} where key = ${`k:${e}`}`)}async appendToList(e,t,n={}){let r=`k:${e}`,i=n.maxLength?o`or seq <= coalesce((select seq from ${l} where key = ${r} order by seq desc offset ${n.maxLength-1} limit 1), -1)`:o``;await this.db.execute(o`
|
|
2
|
-
with added as (insert into ${l} (key, value, expires_at) values (${r}, ${JSON.stringify(t)}::jsonb, ${this.stamp(n.ttlMs)}::timestamptz))
|
|
3
|
-
delete from ${l} where key = ${r} and ((select expires_at from ${l} where key = ${r} order by seq desc limit 1) <= ${this.stamp(0)}::timestamptz ${i})`)}async getList(t){let n=`k:${t}`;return(await u(this.db,()=>e(this.db,o`
|
|
4
|
-
with newest as (select expires_at from ${l} where key = ${n} order by seq desc limit 1)
|
|
5
|
-
select value from ${l}, newest where key = ${n} and (newest.expires_at is null or newest.expires_at > ${this.stamp(0)}::timestamptz) order by seq`))).map(e=>e.value)}async acquireLock(e,t){let n={threadId:e,token:d(),expiresAt:this.now()+t};return await this.claim(`l:${e}`,n.token,new Date(n.expiresAt))?n:null}async extendLock(e,n){return(await this.db.update(s).set({expiresAt:this.at(n)}).where(c(t(s.key,`l:${e.threadId}`),t(s.value,e.token),this.live())).returning({key:s.key})).length>0}async releaseLock(e){await this.db.delete(s).where(c(t(s.key,`l:${e.threadId}`),t(s.value,e.token)))}async forceReleaseLock(e){await this.db.delete(s).where(t(s.key,`l:${e}`))}async enqueue(t,n,r){let i=`q:${t}`,a=this.stamp(0),[s]=await e(this.db,o`
|
|
6
|
-
with added as (insert into ${l} (key, value, expires_at) values (${i}, ${JSON.stringify(n)}::jsonb, ${new Date(n.expiresAt).toISOString()}::timestamptz)),
|
|
7
|
-
dropped as (delete from ${l} where key = ${i} and (expires_at <= ${a}::timestamptz
|
|
8
|
-
or seq <= coalesce((select seq from ${l} where key = ${i} and expires_at > ${a}::timestamptz order by seq desc offset ${r-1} limit 1), -1)))
|
|
9
|
-
select least((select count(*) from ${l} where key = ${i} and expires_at > ${a}::timestamptz) + 1, ${r})::int as depth`);return Number(s?.depth??0)}async dequeue(t){let n=`q:${t}`,r=this.stamp(0);return(await e(this.db,o`
|
|
10
|
-
delete from ${l} where key = ${n} and (expires_at <= ${r}::timestamptz
|
|
11
|
-
or seq = (select seq from ${l} where key = ${n} and expires_at > ${r}::timestamptz order by seq limit 1 for update skip locked))
|
|
12
|
-
returning value, expires_at > ${r}::timestamptz as live`)).find(e=>e.live)?.value??null}async queueDepth(t){let[n]=await u(this.db,()=>e(this.db,o`
|
|
13
|
-
select count(*)::int as depth from ${l} where key = ${`q:${t}`} and expires_at > ${this.stamp(0)}::timestamptz`));return Number(n?.depth??0)}async subscribe(e){let t={value:!0,expiresAt:null};await this.db.insert(s).values({key:`s:${e}`,...t}).onConflictDoUpdate({target:s.key,set:t})}async unsubscribe(e){await this.db.delete(s).where(t(s.key,`s:${e}`))}async isSubscribed(e){return await this.read(`s:${e}`)===!0}};export{f as PgChatState};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{B as e,u as t}from"./prompts-Bj4Fbd_n.js";import n from"node:process";import r from"node:crypto";import i from"node:http";function a(e){let t=[];typeof e.instructions==`string`&&e.instructions&&t.push({role:`system`,content:e.instructions});let n=Array.isArray(e.input)?e.input:[];for(let e of n)switch(e?.type){case`message`:{let n=Array.isArray(e.content)?e.content.map(e=>e?.text??``).join(``):String(e.content??``);t.push({role:e.role===`developer`?`system`:e.role,content:n});break}case`function_call`:{let n={id:e.call_id,type:`function`,function:{name:e.name,arguments:e.arguments??`{}`}},r=t.at(-1);r?.role===`assistant`&&r.tool_calls?r.tool_calls.push(n):t.push({role:`assistant`,content:null,tool_calls:[n]});break}case`function_call_output`:{let n=e.output;t.push({role:`tool`,tool_call_id:e.call_id,content:typeof n==`string`?n:JSON.stringify(n??``)});break}}return t}function o(e){let t=(Array.isArray(e.tools)?e.tools:[]).filter(e=>e?.type===`function`).map(e=>({type:`function`,function:{name:e.name,description:e.description??``,parameters:e.parameters??{type:`object`,properties:{}}}})),n=e.text?.format;return{model:e.model,messages:a(e),...t.length?{tools:t,tool_choice:e.tool_choice??`auto`}:{},...typeof e.parallel_tool_calls==`boolean`?{parallel_tool_calls:e.parallel_tool_calls}:{},...n?.type===`json_schema`?{response_format:{type:`json_schema`,json_schema:{name:n.name,schema:n.schema,strict:n.strict??!1}}}:{},stream:!0,stream_options:{include_usage:!0}}}var s=class{send;model;responseId=`resp_bridge_${r.randomUUID()}`;text=``;textOpen=!1;toolCalls=new Map;usage=null;buffer=``;constructor(e,t){this.model=e,this.send=t,this.send({type:`response.created`,response:{id:this.responseId,object:`response`,status:`in_progress`,model:e,output:[]}})}push(e){this.buffer+=e;let t=this.buffer.split(`
|
|
2
|
-
`);this.buffer=t.pop()??``;for(let e of t){let t=e.trim();if(!t.startsWith(`data:`))continue;let n=t.slice(5).trim();if(!n||n===`[DONE]`)continue;let r;try{r=JSON.parse(n)}catch{continue}r.usage&&(this.usage=r.usage);let i=r.choices?.[0]?.delta;if(i){typeof i.content==`string`&&i.content&&(this.textOpen||(this.textOpen=!0,this.send({type:`response.output_item.added`,output_index:0,item:{type:`message`,id:`msg_bridge_0`,status:`in_progress`,role:`assistant`,content:[]}})),this.text+=i.content,this.send({type:`response.output_text.delta`,item_id:`msg_bridge_0`,output_index:0,content_index:0,delta:i.content}));for(let e of i.tool_calls??[]){let t=this.toolCalls.get(e.index)??{id:``,name:``,args:``};e.id&&(t.id=e.id),e.function?.name&&(t.name+=e.function.name),e.function?.arguments&&(t.args+=e.function.arguments),this.toolCalls.set(e.index,t)}}}}finish(){let e=[];if(this.text){let t={type:`message`,id:`msg_bridge_0`,status:`completed`,role:`assistant`,content:[{type:`output_text`,text:this.text,annotations:[]}]};e.push(t),this.send({type:`response.output_item.done`,output_index:0,item:t})}let t=e.length;for(let n of this.toolCalls.values()){let r={type:`function_call`,id:`fc_bridge_${t}`,call_id:n.id||`call_bridge_${t}`,name:n.name,arguments:n.args||`{}`,status:`completed`};e.push(r),this.send({type:`response.output_item.done`,output_index:t,item:r}),t+=1}this.send({type:`response.completed`,response:{id:this.responseId,object:`response`,status:`completed`,model:this.model,output:e,usage:{input_tokens:this.usage?.prompt_tokens??0,input_tokens_details:{cached_tokens:this.usage?.prompt_tokens_details?.cached_tokens??0},output_tokens:this.usage?.completion_tokens??0,output_tokens_details:{reasoning_tokens:this.usage?.completion_tokens_details?.reasoning_tokens??0},total_tokens:this.usage?.total_tokens??0}}})}};async function c(c,l=`chat`){let u=l===`responses`,d=e(c.baseUrl,u?`responses`:`chat/completions`),f=null,p=!0,m=c.envKey?n.env[c.envKey]:void 0;async function h(e){let t=f?[f]:d,n=null;for(let r of t)if(n=await fetch(r,{method:`POST`,headers:{"content-type":`application/json`,...m?{authorization:`Bearer ${m}`}:{}},body:e}),n.status!==404)return f=r,n;return n}async function g(e){let n=e.text?.format,r=u?e:o(e),i=()=>{let i=t(n.schema);if(u){let{format:t,...n}=e.text;return{...e,text:n,input:[...e.input??[],{type:`message`,role:`user`,content:[{type:`input_text`,text:i}]}]}}let{response_format:o,...s}=r;return{...s,messages:[...a(e),{role:`user`,content:i}]}};if(n?.type!==`json_schema`)return h(JSON.stringify(r));if(!p)return h(JSON.stringify(i()));let s=await h(JSON.stringify(r));if(![400,422,501].includes(s.status))return s;let c=await s.clone().text();return/(invalid.{0,30}schema|schema.{0,30}invalid|unsupported.{0,30}(keyword|constraint)|(keyword|constraint).{0,30}unsupported)/i.test(c)||!/(response_format|json_schema|text[.\s]format)/i.test(c)||!/(not supported|unsupported|unknown parameter|unrecognized|not available)/i.test(c)?s:(p=!1,await s.body?.cancel(),h(JSON.stringify(i())))}let _=r.randomBytes(16).toString(`hex`),v=i.createServer((e,t)=>{if(e.method!==`POST`||!e.url?.startsWith(`/${_}/`)||!e.url.replace(/\/+$/,``).endsWith(`/responses`)){t.writeHead(404,{"content-type":`application/json`}),t.end(JSON.stringify({error:{message:`coder chat bridge: only POST /responses is supported`}}));return}let n=``;e.on(`data`,e=>n+=e),e.on(`end`,async()=>{let e;try{e=JSON.parse(n)}catch{t.writeHead(400,{"content-type":`application/json`}),t.end(JSON.stringify({error:{message:`invalid JSON`}}));return}try{if(u){let n=await g(e);if(t.writeHead(n.status,{"content-type":n.headers.get(`content-type`)??`application/json`,"cache-control":`no-store`}),n.body)for await(let e of n.body)t.write(e);t.end();return}let n=await g(e);if(!n.ok||!n.body){let e=await n.text().catch(()=>``);t.writeHead(n.status,{"content-type":`application/json`}),t.end(e||JSON.stringify({error:{message:`upstream HTTP ${n.status}`}}));return}t.writeHead(200,{"content-type":`text/event-stream`,"cache-control":`no-store`});let r=new s(e.model,e=>t.write(`data: ${JSON.stringify(e)}\n\n`)),i=new TextDecoder;for await(let e of n.body)r.push(i.decode(e,{stream:!0}));r.finish(),t.end()}catch(e){let n=e instanceof Error?e.message:String(e);t.writeHead(502,{"content-type":`application/json`}),t.end(JSON.stringify({error:{message:`coder chat bridge: ${n}`}}))}})});await new Promise(e=>v.listen(0,`127.0.0.1`,e));let y=v.address();return{url:`http://127.0.0.1:${typeof y==`object`&&y?y.port:0}/${_}/v1`,close:()=>new Promise(e=>{v.close(()=>e()),v.closeAllConnections?.()})}}export{c as t};
|
package/dist/cli-BBlH53hA.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{An as e,Cr as t,Nn as n,W as r}from"./prompts-Bj4Fbd_n.js";import{O as i,U as a}from"./dispatch-CFZ9Crvg.js";import{a as o,l as s,m as c,r as l,t as u,u as d}from"./prompt-PEgcMJO7.js";import{h as f,i as p,p as m,r as h,s as g}from"./output-BKeyLbvt.js";import{a as _}from"./args-CURX44CA.js";import v from"node:path";import y from"node:process";import{pathToFileURL as b}from"node:url";const x=async()=>(await import(`./task-DeFLNmQH.js`)).commandTaskGroup,S=async()=>(await import(`./setup-host-tlsilI6C.js`)).commandSetupHost,C=async()=>(await import(`./server-CUsxAflx.js`)).commandServer,w={task:x,flow:async()=>(await import(`./flow-CtillCQY.js`)).commandFlow,run:async()=>(await import(`./run-UPW-7pKo.js`)).commandTask,list:async()=>(await import(`./list-CZGTVKcS.js`)).commandTasks,result:async()=>(await import(`./result-D0dpv2O_.js`).then(e=>e.s)).commandResult,config:async()=>(await import(`./config-K6Rrjsee.js`)).commandConfig,"setup-host":S,model:async()=>(await import(`./model-Bs27g5EX.js`)).commandModel,connection:async()=>(await import(`./connection-BXBDeoax.js`)).commandConnection,docs:async()=>(await import(`./docs-BUHKbQjM.js`)).commandDocs,review:async()=>(await import(`./review-DIm9oK_W.js`)).commandReview,agent:async()=>(await import(`./agent-BkxXgha0.js`)).commandAgent,server:C,dash:async()=>{let e=await C(),t=await e.subcommands.serve();return Object.assign(t=>e([`serve`,...t]),{commandName:t.commandName,help:t.help})},runner:async()=>(await import(`./runner-BLS_ReEw.js`)).commandRunner,auth:async()=>(await import(`./auth-D3quZAKT.js`)).commandAuth,credentials:async()=>(await import(`./credentials-BRFajC0d.js`)).commandCredentials,upgrade:async()=>(await import(`./upgrade-3fH6dGJw.js`)).commandUpgrade},T={title:`Coder`,usageLine:`coder <command>`,description:`Delegate a coding task to the best available engine and steer it while it runs.`,commands:[{usage:`dash`,blurb:`your tasks, agents and settings in the browser`},{usage:`run "<text>"`,blurb:`run a task (background; --wait blocks)`},{usage:`list`,blurb:`list recent tasks (by default running + just stopped)`},{usage:`result [task-id]`,blurb:`status + final answer (--wait blocks)`},{usage:`task <cmd>`,blurb:`run, list, result, watch, steer, stop, approve, ...`},{usage:`flow <cmd>`,blurb:`run, list, watch, result, resume, stop, discover, ...`},{usage:`agent <cmd>`,blurb:`list, show, init, push, run, usage, integrations`},{usage:`credentials <cmd>`,blurb:`engine credentials: list, add, login, remove`},{usage:`server <cmd>`,blurb:`self-host Coder: serve, rotate-key`},{usage:`runner <cmd>`,blurb:`run your server's tasks on this machine: serve, list, ...`},{usage:`auth <cmd>`,blurb:`sign in to Coder: login, logout, status`},{usage:`review [--base <ref> | --pr <n>]`,blurb:`review changed code with a built-in flow`},{usage:`config <list|get|set|unset> [<key> [value]]`,blurb:`read or write config`},{usage:`model <list|add|alias|disable>`,blurb:`manage models: built-ins, aliases, custom endpoints`},{usage:`connection <cmd>`,blurb:`platform accounts, API keys and MCP servers tasks use: add, list, rm, ...`},{usage:`docs [topic]`,blurb:`print bundled documentation (for agents to read)`},{usage:`upgrade [--cli-only|--plugins-only]`,blurb:`update the CLI and host plugins`}],start:[{usage:`coder setup-host [claude|agents]`,blurb:`"claude" for Claude Code, "agents" for any ~/.agents host (Codex, Pi, ...)`},{usage:`coder run --engine [codex|claude] "<task>"`,blurb:`run a task on that engine's default model`},{usage:`coder task result <task-id> --wait`,blurb:`wait for the answer; returns early if the task needs your approval`}],agents:[{usage:`coder docs skill [--claude]`,blurb:`load the skill once`}],usage:[{usage:`coder <command> --help`,blurb:`flags and details for any command`}]};function E(e,t,n=t.cyan){let r=Math.max(0,...e.map(e=>e.usage.length))+2;return e.map(e=>` ${n(e.usage.padEnd(r))}${t.dim(e.blurb)}${e.note?` ${t.light(e.note)}`:``}`)}function D(e,t,n){return[``,n.bold(`${e}:`),...t]}function O(e,t,n={}){let r=m;return`${[r.bold(`Usage:`),` ${n.usage??`coder ${e} <subcommand>`}`,...n.description?.length?[``,...n.description]:[],...D(`Subcommands`,E(t,r),r),...n.examples?.length?D(`Examples`,n.examples.flatMap(([e,t])=>[` ${r.cyan(e)}`,` ${r.dim(t)}`]),r):[],...n.seeAlso?D(`Related`,n.seeAlso.split(` · `).map(e=>` ${r.cyan(`coder ${e}`)}`),r):[],``,g([`Details on a subcommand: coder ${e} <subcommand> --help`],r,r.cyan)].join(`
|
|
2
|
-
`)}\n`}function k(e,t){if(!t)return null;let n=m,r=([e,t])=>({usage:e,blurb:t}),i=[n.bold(`Usage:`),` ${t.usage}`];t.summary&&i.push(``,t.summary),t.flags?.length&&i.push(...D(`Flags`,E(t.flags.map(r),n),n)),t.globalFlags?.length&&i.push(...D(`Global flags`,E(t.globalFlags.map(r),n),n)),t.exitCodes?.length&&i.push(...D(`Exit codes`,E(t.exitCodes.map(r),n),n)),t.env?.length&&i.push(...D(`Environment`,E(t.env.map(r),n),n)),t.examples?.length&&i.push(...D(`Examples`,t.examples.flatMap(([e,t])=>[` ${n.cyan(e)}`,` ${n.dim(t)}`]),n));let a=e.includes(` `)?[`${e.slice(0,e.lastIndexOf(` `))} --help`]:t.seeAlso?.split(` · `)??[];return a.length&&i.push(...D(`Related`,a.map(e=>` ${n.cyan(`coder ${e}`)}`),n)),`${i.join(`
|
|
3
|
-
`)}\n`}function A(e,t){let n=m,{start:r,agents:i,usage:a,commands:o,globals:s}=e,c=E([...r,...i,...a,...o,...s],n),l=(e,t)=>c.slice(e,e+t);return`${[`${n.bold(e.title)} ${n.dim(`v${t}`)}`,e.description,...D(`Get started`,l(0,r.length),n),...D(`Agents`,l(r.length,i.length),n),...D(`Usage`,[` ${e.usageLine}`,...l(r.length+i.length,a.length)],n),...D(`Commands`,l(r.length+i.length+a.length,o.length),n),...D(`Global`,c.slice(-s.length),n)].join(`
|
|
4
|
-
`)}\n`}function j(e){let t=e.indexOf(`--`),n=t===-1?e:e.slice(0,t);return n.includes(`-h`)||n.includes(`--help`)}const M=`Use luna or sonnet for mechanical work; sol or opus is the default.
|
|
5
|
-
Use astra or fable for the hardest work; they cost the most.`,N={json:[`--json`,`JSON output`],cwd:[`--cwd <dir>`,`workspace directory (default: current)`]},P=[`--server [url] [--workspace <slug>]`,`act on your Coder server; --workspace overrides the saved workspace for this command`],F=[`--server [url]`,`act on your Coder server, in the saved workspace`],I=e=>e===`https://coder.wular.ai`?`Sign in: coder auth login`:`Sign in: coder auth login --server ${e}`;async function L(e,t=!1){let n=c(e);if(s(n))return n;if(!t){if(!l())throw new a(`invalid-option`,`First use of Coder server ${new URL(n).origin} needs confirmation.`,{hint:`Inspect the origin, then repeat with --yes.`});if((await o({title:`Connect to ${new URL(n).origin}?`,hint:`This server can receive task and agent data.`,options:[{value:`yes`,label:`Continue`},{value:`no`,label:`Cancel`}]}))[0]!==`yes`)throw new a(`invalid-option`,`Server connection cancelled.`)}return d(n),n}function R(e){return e.cwd?v.resolve(String(e.cwd)):y.cwd()}function z(e){y.stderr.write(`[coder] No engine could start. Follow fallback.instructions with a native subagent.
|
|
6
|
-
`),f(e)}function B(e,t=!1){let n=`read-only unavailable on this host: the OS sandbox failed to start (Linux/WSL2 needs bubblewrap + socat). Re-dispatch with --permissions auto (or workspace-write) if writes are acceptable, or install the sandbox deps.`;t?f({error:n,code:`read-only-unavailable`,detail:e}):y.stderr.write(`[coder] ${n}\n`),y.exit(1)}function V(e,t,n,i=!1){if(i)f({taskId:t,status:`awaiting-approval`,approval:n});else{let i=r(e).approvals.escalationTimeoutMs/1e3,a=[`Approve: coder task approve ${t} ${n.id}`,`Deny: coder task approve ${t} ${n.id} --deny`,`Then wait again in its own background shell, one per task: coder task result ${t} --wait`,`Unanswered approvals auto-deny after ${i} seconds.`];n.networkHost&&a.push(`Network access to ${n.networkHost} can be pre-approved with approvals.allowedNetworkHosts.`),y.stdout.write(`Approval needed for task ${t}: ${n.summary}\n`),n.cwd&&y.stdout.write(`Runs in: ${n.cwd}\n`),y.stderr.write(`\n${g(a,h,h.blue,`Next steps`)}\n`)}y.exit(4)}function H(e,t,n){switch(e.code){case`chain-exhausted`:z(e.payload),y.exit(3);case`read-only-unavailable`:B(e.message,n.json);case`approval-pending`:V(t,e.taskId,e.approval,n.json);case`startup-failed`:n.json&&(f({taskId:e.taskId,status:`failed`,detail:e.message}),y.exit(1)),p(`Task ${e.taskId} failed to start.${e.message?`\n${e.message}`:``}`,{hint:`See: coder task result ${e.taskId}`});case`login-failed`:p(e.message,{hint:[I(c(n.server)),`Or, for a memory server, set the same ADMIN_TOKEN it was started with`]});case`server`:p(e.message,{hint:e.hint??(e.status===401?I(c(n.server)):void 0)});default:p(e.message,e.hint?{hint:e.hint}:{})}}function U(e){return Object.assign(async n=>{let{options:r,positionals:i}=_(n,t(e.options),{positionals:e.args??0,command:e.name,required:e.required}),o={options:r,args:i,cwd:R(r)},s=r,c;try{s.server!==void 0&&await L(s.server,s.yes),c=await e.run(o)}catch(e){throw e instanceof a&&H(e,o.cwd,s),e}s.json&&c!==void 0?f(e.json?e.json(c,o):c):await e.print?.(c,o);let l=e.exit?.(c,o);l!==void 0&&(y.exitCode=l)},{commandName:e.helpName??e.name,help:e.help&&{...e.help,globalFlags:Object.keys(N).filter(t=>e.globalFlags?.[t]!==!1).map(e=>N[e])}})}function W(e,t,n,{aliases:r={},nested:i=[],hint:a=`Help: coder ${e} --help`,help:o}={}){return Object.assign(async n=>{let[o,...s]=n;if(!o||o===`help`||o===`-h`||o===`--help`)return void y.stdout.write(await q(e));let c=t[o];if(c||(y.stdout.write(await q(e)),p(`Unknown ${e} subcommand "${o}".`,{hint:a})),!i.includes(o)&&j(s)){let t=`${e} ${r[o]??o}`;y.stdout.write(k(t,await K(t))??await q(e));return}await(await c())(s)},{commandName:e,help:o,groupHelp:n,subcommands:t})}async function G(e){let[t,...n]=e.split(` `),r=w[t];if(!r)return;let i=await r();for(let e of n){let t=i.subcommands?.[e];if(!t)return;i=await t()}return i}async function K(e){let t=await G(e);return t&&(t.commandName===e||w[e])?t.help:void 0}async function q(e){let t=await G(e);if(!t)return null;if(!t.groupHelp)return k(t.commandName??e,t.help);let n=t.groupHelp;return O(e,n.menu,{...n,...n.details?{description:[t.help.summary],examples:t.help.examples,seeAlso:t.help.seeAlso}:{},...n.exampleCommand?{examples:(await K(n.exampleCommand))?.examples}:{}})}const J=()=>A({...T,globals:[{usage:`-h, --help`,blurb:`show help (top-level, or for a command)`},{usage:`-v, --version`,blurb:`print the coder version`},...Object.values(N).map(([e,t])=>({usage:e,blurb:t}))]},n());async function Y(){let[t,...r]=y.argv.slice(2);if(t===`--version`||t===`-v`){y.stdout.write(`${n()}\n`);return}if(t===void 0||t===`help`||t===`--help`||t===`-h`){if(r[0]&&(await G(r[0]))?.groupHelp&&r[1]===void 0)return void y.stdout.write(await q(r[0]));for(let e of[r.slice(0,3),r.slice(0,2),...r.map(e=>[e])]){let t=e.join(` `),n=await K(t);if(n){let e=await G(t);y.stdout.write(k(e.commandName,n));return}}y.stdout.write(J());return}if(![`task worker`,`flow drive`,`task mcp`,`task hub`,`agent tools`,`upgrade refresh`].includes(`${t} ${r[0]}`)){let t=i(n(),e);t&&y.stderr.write(h.dim(`coder ${n()} -> `)+h.bold(t)+h.dim(` available. run: coder upgrade
|
|
7
|
-
|
|
8
|
-
`))}let o=w[t];o||(y.stdout.write(J()),y.stdout.write(`
|
|
9
|
-
`),p(`Unknown command "${t}".`,{hint:`See all commands: coder --help`}));let s=await o();if(!s.groupHelp&&j(r)){y.stdout.write(k(s.commandName??t,s.help)??J());return}try{await s(r)}catch(e){throw e instanceof a&&e.hint&&p(e.message,{hint:e.hint}),e}}function X(){return y.stdout.on(`error`,e=>{throw e.code===`EPIPE`&&y.exit(0),e}),Y().catch(e=>{e instanceof u&&y.exit(130);let t=e instanceof Error&&e.cause instanceof Error?`: ${e.cause.message}`:``;y.stderr.write(`${e instanceof Error?e.message:String(e)}${t}\n`),y.exit(1)})}const Z=y.argv[1]&&b(y.argv[1]).href;Z&&[import.meta.url,new URL(`./cli.js`,import.meta.url).href].includes(Z)&&X();export{L as a,X as c,E as d,k as f,U as i,q as l,M as n,K as o,D as p,P as r,W as s,F as t,J as u};
|
package/dist/config-K6Rrjsee.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{$ as e,R as t}from"./prompts-Bj4Fbd_n.js";import{U as n}from"./dispatch-CFZ9Crvg.js";import{f as r,i}from"./cli-BBlH53hA.js";import{h as a,p as o}from"./output-BKeyLbvt.js";import{n as s,t as c}from"./args-CURX44CA.js";import l from"node:process";const u=e=>new n(`invalid-option`,`Usage: ${e}`);function d(e){try{return JSON.parse(e)}catch{return e.includes(`,`)?e.split(`,`).map(e=>e.trim()).filter(Boolean):e}}const f=i({name:`config`,help:{usage:`coder config <list|get|set|unset> [<key> [value]] [--workspace]`,summary:"Read or write configuration. `list` prints the effective config; get/set/unset\ntarget a dotted key (e.g. engines.codex.model). Writes go to ~/.coder/config.json.",flags:[[`--workspace`,`target <repo>/.coder/config.json instead of the user file`]],examples:[[`coder config list`,`print the effective config`],[`coder config set chain codex,claude`,`set the engine fallback chain`],[`coder config get engines.codex.model`,`read one value`]]},options:{...c,workspace:s},args:1/0,run({options:e,args:[n,r,...i],cwd:a}){if(!(!n||n===`help`)){if(n===`list`)return{action:n,config:t.get(void 0,{cwd:a})};if(n===`get`){if(!r)throw u(`coder config get <key> (e.g. chain, engines.codex.model)`);return{action:n,value:t.get(r,{cwd:a})}}if(n!==`set`&&n!==`unset`)throw u(`coder config <list|get|set|unset> [<key> [value]] [--workspace]`);if(!r||n===`set`&&i.length===0)throw u(`coder config ${n} <key>${n===`set`?` <value>`:``}`);return{action:n,set:t.set(r,d(i.join(` `)),{cwd:a,workspace:e.workspace,unset:n===`unset`})}}},json(e){let t=e;return t.action===`list`?t.config:t.action===`get`?t.value??null:t.set},print(t){if(!t)return void l.stdout.write(r(`config`,f.help));if(t.action===`list`)return p(t.config,e());if(t.action===`get`)return m(t.value);h(t.set)}});function p(e,t){let n=o,r=e=>[e?.model,e?.effort,e?.permissions].filter(Boolean).join(`/`)||`-`;l.stdout.write([`${n.dim(`chain`)} ${e.chain.join(` -> `)}`,`${n.dim(`codex`)} ${r(e.engines.codex)}`,`${n.dim(`claude`)} ${r(e.engines.claude)}`,`${n.dim(`approvals`)} timeout=${e.approvals.escalationTimeoutMs}ms hosts=[${e.approvals.allowedNetworkHosts.join(`, `)}]`,`${n.dim(`file`)} ${t}`].join(`
|
|
2
|
-
`)+`
|
|
3
|
-
`)}function m(e){if(e===null||typeof e==`object`&&e!==void 0)return a(e);l.stdout.write(`${e===void 0?`(unset)`:String(e)}\n`)}function h(e){let t=o,n=e.unset?`unset ${t.cyan(e.key)}`:`${t.cyan(e.key)} = ${JSON.stringify(e.value)}`;l.stdout.write(`${n} ${t.dim(`(${e.file})`)}\n`)}export{f as commandConfig};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{qi as e}from"./core-DwsAMCnL.js";import{W as t,ot as n,st as r}from"./prompts-Bj4Fbd_n.js";import{U as i}from"./dispatch-CFZ9Crvg.js";import{a,t as o}from"./remote-D3JZ4MMQ.js";import s from"node:path";import c from"node:process";import{createHash as l}from"node:crypto";var u=e({connection:()=>T});const d=(e,t)=>new i(`invalid-option`,e,t?{hint:t}:{}),f=e=>e.cwd?s.resolve(e.cwd):c.cwd(),p=e=>e.server!==void 0,m=e=>o({...e,organization:e.organization??e.workspace}),h=e=>m(e).connections,g=()=>d(`Signing in needs a Coder server.`,`Repeat with --server <url>, or add it in coder dash`);async function _(e){let[{LocalStore:t},{INTEGRATIONS:n},r]=await Promise.all([import(`./local-Bzdmzc1o.js`).then(e=>e.r),import(`./integrations-IGnXBrPw.js`).then(e=>e.r),import(`./apps-BNe86LfS.js`).then(e=>e.bt)]),a={store:new t,config:{store:`memory`,runner:`local`},integrations:n,organizationId:`default`,local:{cwd:e,port:0}},o=async e=>{try{return await e()}catch(e){throw e instanceof r.ConnectionError?new i(`invalid-option`,e.message,{needs:e.needs}):e}};return{ctx:a,list:()=>r.connectionRows(a),add:e=>o(()=>r.addConnection(a,e)),update:(e,t)=>o(()=>r.changeConnection(a,e,t)),remove:e=>o(()=>r.removeConnection(a,e))}}async function v(e){return p(e)?h(e).list():(await _(f(e))).list()}async function y(e,t){if(p(e))return(await m(e).credentials.list()).some(n=>n.name===t&&(e.me||n.scope===`workspace`));let{parseCredentialId:n}=await import(`./apps-BNe86LfS.js`).then(e=>e.wt),{ctx:r}=await _(f(e));return(await r.store.list(`credential`)).some(e=>n(e.id).name===t)}async function b(e,t){let n=e.key??(await e.askKey?.())?.trim();if(!n)throw d(`${t} needs a key.`,`Give it with --key, on stdin or at the prompt`);return n}async function x(e,t,n){let r=new URL(n,a(e)),i=r.searchParams.get(`state`)??r.searchParams.get(`attempt`);if(!i)throw d(`Sign-in did not start.`);let o=l(`sha256`).update(i).digest(`hex`);e.onAuthorize(r.href);let s=Date.now()+6e5;for(;Date.now()<s;){let n=(await h(e).list(o,t)).find(e=>e.id===t);if(!n)throw d(`The connection was removed before sign-in finished.`);if(n.status===`ok`)return n}throw d(`Sign-in did not finish.`,`Try again: coder connection reconnect ${t}`)}async function S(e,t){let[n,...r]=t.command??[],i=t.access&&{access:t.access},a=t.me?{owner:`me`}:{};if(n&&t.url)throw d(`Use either --url or a command, not both.`);if(t.access&&![`read`,`write`].includes(t.access))throw d(`Invalid --access value.`,`Use read or write`);if(n||t.url){let o=t.auth??(t.key?`key`:t.url?void 0:`none`);if(o!==void 0&&![`oauth`,`key`,`none`].includes(o))throw d(`Invalid --auth value.`,`Use oauth, key or none`);if(o===`oauth`&&!p(t))throw g();if(n&&o===`key`&&!t.env)throw d(`Name the variable the key goes in with --env.`);let s=t.tools?.length?{tools:t.tools}:{};return{name:e,provider:`mcp`,...a,...i,...o?{auth:o}:{},endpoint:t.url?{url:t.url,...t.transport?{type:t.transport}:{},...s}:{command:n,...r.length?{args:r}:{},...s},...o===`key`?{key:await b(t,e),keyIn:t.url?{header:t.header??`Authorization`}:{env:t.env}}:{}}}if(t.env){let n=t.key??(t.credential||await y(t,t.env)?void 0:c.env[t.env]??await b(t,e));return{name:e,provider:`env`,...a,keyIn:{env:t.env},...n?{key:n}:{},...t.credential?{credential:t.credential}:{}}}let{INTEGRATIONS:o}=await import(`./integrations-IGnXBrPw.js`).then(e=>e.r);if(!p(t)&&!o[e]?.auth.user)throw d(`Say what to connect.`,`Give --env <NAME> for an API key, --url <url> or -- <command> for an MCP server, or a platform name`);if(!p(t))throw g();return{name:e,provider:e,...a}}async function C(e,t){if(!e)throw d(`Name the connection.`,`See them: coder connection list`);let n=await v(t),r=n.find(t=>t.id===e)??n.find(t=>t.mine&&t.id.endsWith(`:${e}`));if(!r)throw d(`No connection "${e}".`,`See them: coder connection list`);return r}async function w(e){let{loadAgents:n}=await import(`./load-Q9fL4VC6.js`).then(e=>e.s),{INTEGRATIONS:i}=await import(`./integrations-IGnXBrPw.js`).then(e=>e.r),a=(e,t,n)=>({name:e,source:t,target:n.connection?`connection ${n.connection}`:n.url??[n.command,...n.args??[]].join(` `),approved:!!n.connection||r(n)}),o=(e={})=>Object.entries(e).filter(([,e])=>e.repository);return[...o(t(e).mcp).map(([e,t])=>a(e,`repo`,t)),...(await n(e,i,{includeDisabled:!0})).flatMap(e=>o(e.definition.mcp).map(([t,n])=>a(t,`agent ${e.id}`,n)))]}const T={async add(e,t={}){if(!e)throw d(`Name the connection.`,`Usage: coder connection add <name> ...`);let n=await S(e,t),r=p(t)?h(t):await _(f(t)),a;try{a=await r.add(n)}catch(o){if(!(o instanceof i)||o.needs!==`key`||!n.endpoint?.url||n.auth||n.key||!t.askKey)throw o;a=await r.add({...n,auth:`key`,key:await b(t,e),keyIn:{header:t.header??`Authorization`}})}return a.authorize&&t.onAuthorize?x(t,a.id,a.authorize):a},async list(e={}){return{connections:await v(e),declared:await w(f(e))}},async remove(e,t={}){let n=await C(e,t);return p(t)?await h(t).remove(n.id):await(await _(f(t))).remove(n.id),n},async reconnect(e,t={}){let n=await C(e,t);if(n.auth===`oauth`){if(!p(t))throw g();let{url:e}=await h(t).authorize(n.id);return t.onAuthorize?x(t,n.id,e):{...n,authorize:e}}if(n.auth!==`key`)throw d(`${n.name} uses no key or sign-in.`);let r=await b(t,n.name);return p(t)?h(t).update(n.id,{key:r}):(await _(f(t))).update(n.id,{key:r})},approve:(e,t={})=>n(f(t),e,t.agent)};export{u as n,T as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./cli-BBlH53hA.js";const t=e(`connection`,{add:async()=>(await import(`./add-n6c9OINP.js`)).commandConnectionAdd,list:async()=>(await import(`./list-CxjPT0Il.js`)).commandConnectionList,ls:async()=>(await import(`./list-CxjPT0Il.js`)).commandConnectionList,rm:async()=>(await import(`./remove-Ci87WQq0.js`)).commandConnectionRemove,remove:async()=>(await import(`./remove-Ci87WQq0.js`)).commandConnectionRemove,reconnect:async()=>(await import(`./reconnect-BmP_XXDv.js`)).commandConnectionReconnect,approve:async()=>(await import(`./approve-BiHM8kSo.js`)).commandConnectionApprove},{menu:[{usage:`add <name> [--env <NAME> | --url <url> | -- <command>]`,blurb:`connect a platform account, an API key or an MCP server`},{usage:`list`,blurb:`list connections and the MCP servers this repository declares`},{usage:`rm <name>`,blurb:`remove a connection`},{usage:`reconnect <name>`,blurb:`give a connection a new key, or sign in again`},{usage:`approve <name>`,blurb:`approve a repository MCP server on this machine`}],details:!0},{aliases:{ls:`list`,remove:`rm`},help:{usage:`coder connection <add|list|rm|reconnect|approve>`,summary:"Connections give tasks access to a service without a handle: a platform account, an API key tasks read from the environment, or an MCP server. They live in ~/.coder, or on your Coder server with --server, and every task of yours may use them unless its agent or `coder task run --connections` narrows the set.",examples:[[`coder connection add groq --env GROQ_API_KEY`,`an API key, kept as a credential`],[`coder connection add docs --key --env DOCS_TOKEN -- npx -y docs-mcp`,`a stdio MCP server; the key is read from stdin or a prompt`],[`coder connection add linear --url https://mcp.linear.app/mcp --server`,`a remote MCP server; signs in with OAuth in the browser`],[`coder connection add github --me --server`,`your own GitHub account`],[`coder connection approve docs`,`approve a repository server before its first local use`]],seeAlso:`task run`}});export{t as commandConnection};
|
package/dist/create-CP_JmJnh.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./prompt-PEgcMJO7.js";import{i as t}from"./cli-BBlH53hA.js";import{c as n,n as r}from"./args-CURX44CA.js";import i from"node:process";const a=t({name:`server app create`,globalFlags:{cwd:!1},help:{usage:`coder server app create <integration> [--org <org>] [--name <name>] [--json]`,summary:`Open the page that creates the built-in agent's public app on a platform, once per server. Every workspace then connects it from its dashboard with one click. Run it where the server's environment is set.`,flags:[[`--org <org>`,`create it under this organization instead of your own account`],[`--name <name>`,`the app's name and handle (default Coder)`]],env:[[`DATABASE_URL`,`the server's Postgres`],[`PUBLIC_URL`,`the server's address, which goes into the app`]],examples:[[`coder server app create github --name wular-coder`,`the hosted GitHub App`]]},options:{org:n,name:n,json:r},args:1,required:[`<integration>`],async run({options:e,args:[t]}){let{serverAppLink:n}=await import(`./apps-BNe86LfS.js`).then(e=>e.t);return n(t,{owner:e.org,name:e.name})},json:({url:e})=>({ok:!0,url:e}),print({url:t}){i.stdout.write(`Open this page to create the app (valid 10 minutes):\n${t}\n`),e(t)}});export{a as commandServerAppCreate};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./cli-BBlH53hA.js";const t=e(`credentials`,{list:async()=>(await import(`./list-1IMeVNg3.js`)).commandCredentialsList,add:async()=>(await import(`./add-v1Pv00HX.js`)).commandCredentialsAdd,login:async()=>(await import(`./login-C723kHh6.js`)).commandCredentialsLogin,remove:async()=>(await import(`./remove-BZZgJq8Z.js`)).commandCredentialsRemove},void 0,{help:{usage:`coder credentials [list|add|login|remove] ...`,summary:`Manage subscriptions and API keys, one per variable in each scope. Your personal ones are yours alone; workspace ones serve every member, and only owners and admins change them. A task runs on its requester's own, else the workspace's.`}});export{t as commandCredentials};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export const unxml = (text) => text.replace(/&(amp|lt|gt);/g, (_, name) => ({
|
|
2
|
-
amp: "&",
|
|
3
|
-
lt: "<",
|
|
4
|
-
gt: ">"
|
|
5
|
-
})[name]);
|
|
6
|
-
/** Read event JSON, optionally alongside a turn's history or other text. */
|
|
7
|
-
export function eventJsons(prompt = "", embedded = false) {
|
|
8
|
-
const event = /<event>\n([^]*?)\n<\/event>/g;
|
|
9
|
-
if (!embedded && (!prompt.trimStart().startsWith("<event>") || prompt.replace(event, "").trim())) return;
|
|
10
|
-
const events = [];
|
|
11
|
-
for (const [, body] of prompt.matchAll(event)) {
|
|
12
|
-
try {
|
|
13
|
-
const json = JSON.parse(unxml(body));
|
|
14
|
-
if (!json || typeof json !== "object" || Array.isArray(json)) {
|
|
15
|
-
if (!embedded) return;
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
events.push(json);
|
|
19
|
-
} catch (error) {
|
|
20
|
-
console.error("coder: unreadable event prompt", error);
|
|
21
|
-
if (!embedded) return;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return events.length ? events : undefined;
|
|
25
|
-
}
|
|
26
|
-
/** Any event in a turn or its live steers can require a reply. */
|
|
27
|
-
export function replyRequired(prompt, fallback, steers = []) {
|
|
28
|
-
const asks = [prompt ?? "", ...steers].flatMap((text) => (eventJsons(text, true) ?? []).flatMap((json) => typeof json.mustReply === "boolean" ? [json.mustReply] : []));
|
|
29
|
-
return asks.length ? asks.includes(true) : fallback;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./format-a27067f0186e78ac.js";import{$3d as o}from"./shared-init-6cad28f8cc696d91.js";import{$2a as s}from"./shared-init-6cad28f8cc696d91.js";import{$2h as r}from"./shared-init-71b727f8f5906f08-2.js";var i="Something went wrong",b=n=>o(i,e(n));function k(n={}){let a=s(),[u,t]=r();return{pending:u,run:async(f,c,p={})=>{let{toast:m=i,refresh:g,leaves:l}={...n,...p};t(f);try{await c()}catch(d){return t(void 0),o(m,e(d)),!1}return l||t(void 0),g&&a.refresh(),!0}}}export{b as a,k as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{a as re}from"./agent-pills-bd32cb89331aff7e.js";import{a as ce}from"./agent-toggle-a45b95908d62f926.js";import{b as te,c as se,f as oe,h as k,i as ae,j as B,k as $,l as ie}from"./model-options-8d2170eebe0d061d.js";import{b as j,c as le}from"./types-3eca2c7f47c46054.js";import{a as ne}from"./confirm-01d5814b1c5f7721.js";import{a as y}from"./field-c530e261587d94df.js";import{b as x}from"./action-fc8716cda7527d8c.js";import"./format-a27067f0186e78ac.js";import"./shared-init-6cad28f8cc696d91.js";import{$2B as ee,$2a as Y,$2t as Z,$2x as b}from"./shared-init-6cad28f8cc696d91.js";import"./shared-init-6cad28f8cc696d91.js";import"./wular-pnext-71b727f8f5906f08-0.js";import"./shared-init-6cad28f8cc696d91.js";import{$0c as H}from"./shared-init-94883db7bc70a5a8.js";import{$1L as q,$1a as e,$1e as M}from"./shared-init-94883db7bc70a5a8.js";import"./shared-init-71b727f8f5906f08-2.js";import"./shared-init-71b727f8f5906f08-2.js";import{$2c as L,$2h as d,$2k as W,$2l as X}from"./shared-init-71b727f8f5906f08-2.js";var de=[["read","Read-only"],["write","Read-write"]];function V({name:t,label:w,hint:S,value:c,options:m,blank:A}){let O=c&&!m.some(([p])=>p===c)?[...m,[c,c]]:m;return e(y,{label:w,hint:S,group:!0,children:e(b,{name:t,label:w,defaultValue:c??"",options:[["",A],...O]})})}function xe({agent:t,catalog:w,models:S,defaults:c,runners:m,connections:A}){let O=Y(),p=ee(),[u,U]=d("run"),_=x({refresh:!0}),G=x({leaves:!0}),me=!!_.pending,[Q,z]=d(""),[T,pe]=d(""),[C,ue]=d(),[fe,D]=d(!1),J=X(null),a=t.settings??{},[P,ge]=d(B(a.engine,a.model)),[F,he]=d(a.connections?"some":""),I=t.definition?.integrations??{},E=Object.keys(I).sort(),f=t.definition,g=f?.engine,K=t.source!=="builtin";W(()=>{let n=T.trim().toLowerCase(),i=[];J.current.querySelectorAll(".vpanel").forEach(r=>{let l=!1;r.querySelectorAll(".field").forEach(o=>{let s=[...o.querySelectorAll("input")].map(R=>R.value).join(" "),h=o.closest(".vplatform")?.querySelector("h3")?.textContent??"",v=!n||`${h} ${o.textContent} ${s}`.toLowerCase().includes(n);o.hidden=!v,l||=v}),r.querySelectorAll(".vplatform").forEach(o=>{o.hidden=!o.querySelector(".field:not([hidden])")}),l&&i.push(r.dataset.panel)}),ue(n?i:void 0),n&&i.length&&!i.includes(u)&&U(i[0])},[T]);let ve=()=>void G.run("delete",async()=>{await H.agents.remove(t.id),O.push("/dash/[org]/agents",{params:{org:p}})}).then(n=>n||D(!1)),N=(n,i)=>e("button",{type:"button","aria-current":u===n?"true":void 0,class:C&&!C.includes(n)?"miss":void 0,onClick:()=>U(n),children:i});return e("form",{ref:J,class:"vsettings card frame",onSubmit:async n=>{n.preventDefault();let i=new FormData(n.currentTarget),r=s=>String(i.get(s)??"").trim(),l={};for(let s of["effort","permissions","access","runner"])r(s)&&(l[s]=r(s));let o=$(P);o.engine&&(l.engine=o.engine),o.model&&(l.model=o.model),F&&(l.connections=i.getAll("connection").map(String));for(let s of E){let h={},v=j(I[s]?.events),R=i.getAll(`event:${s}`).map(String);v.length&&R.length<v.length&&(h.allowedEvents=R),Object.keys(h).length&&((l.integrations??={})[s]=h)}t.settings?.disabled&&(l.disabled=!0),z(""),await _.run("save",()=>H.agents.settings(t.id,l))&&z("Saved. New tasks use these settings.")},children:[e("nav",{class:"tabs vertical","aria-label":"Settings sections",children:[e("p",{class:"tabs-label",children:"Runtime"}),N("run","How it runs"),E.length?N("platforms","Platforms"):null,e("p",{class:"tabs-label",children:"Agent"}),N("manage","Manage")]}),e("div",{class:"vbody",children:[e("div",{class:"vsearch",children:[e(Z,{value:T,label:"Search settings",onInput:pe}),C&&!C.length?e("span",{class:"muted",children:"No setting matches."}):null]}),e("section",{class:"vpanel","data-panel":"run",hidden:u!=="run",children:[e("h2",{children:"How it runs"}),e("p",{class:"muted",children:"Anything left on Default follows the agent's own definition."}),e("div",{class:"fields",children:[e(y,{label:"Model",hint:"picking a model picks its engine",group:!0,children:e(b,{label:"Model",value:P,options:[...ae(S,k(g?[oe[g]??g,f?.model??c.engines[g]?.model].filter(Boolean).join(" \xB7 "):"first available engine")),...!a.engine&&a.model?[[B(void 0,a.model),a.model]]:[]],headings:ie(S),onChange:ge})}),e(V,{name:"effort",label:"Effort",value:a.effort,options:te,blank:k(f?.effort??c.engines[$(P).engine??g]?.effort)}),e(V,{name:"permissions",label:"Permissions",hint:"what the runner may change in the checkout",value:a.permissions,options:se,blank:k(f?.permissions??"read-only")}),e(V,{name:"access",label:"Access",hint:"what it may do on its platforms and connections",value:a.access,options:f?.access==="read"?de.slice(0,1):de,blank:k(f?.access==="read"?"Read-only":"Read-write")}),m.length>1?e(y,{label:"Runs on",group:!0,children:e(b,{name:"runner",label:"Runs on",defaultValue:a.runner??"",options:m})}):null,e(y,{label:"Connections",hint:"which workspace connections its tasks can use",group:!0,children:e(b,{label:"Connections",value:F,options:[["","Every workspace connection"],["some","Only the ones picked"]],onChange:he})}),F?e("div",{class:"field picked",children:[e("span",{children:["Picked connections ",e("small",{children:"tasks can use only these"})]}),A.length?e("div",{class:"checks",children:A.map(n=>e("label",{class:"check",children:[e("input",{type:"checkbox",name:"connection",value:n.id,defaultChecked:a.connections?.includes(n.id)}),n.name]},n.id))}):e("span",{class:"muted",children:["This workspace has no connections yet."," ",e(M,{class:"link",href:"/dash/[org]/settings/[tab]",params:{org:p,tab:"connections"},children:"Add one in Settings"})]})]}):null]})]}),E.length?e("section",{class:"vpanel","data-panel":"platforms",hidden:u!=="platforms",children:[e("h2",{children:"Platforms"}),e("p",{class:"muted",children:["Turn events off for this workspace."," ",le(t)?e(L,{children:["To add an event or a platform,"," ",e(M,{href:"/dash/[org]/agents/[slug]/edit",params:{org:p,slug:t.id},search:{section:"platforms"},children:["edit ",t.name]}),"."]}):t.source==="repo"?e(L,{children:[t.name," comes from ",t.repo??"a repository","; add an event or a platform in its"," ",t.sourceUrl?e("a",{href:t.sourceUrl,target:"_blank",rel:"noreferrer",children:"agent.json"}):"agent.json"," ","there."]}):e(L,{children:[t.name," is built in, so its events and platforms ship with Coder. To listen anywhere else,"," ",e(M,{href:"/dash/[org]/agents/new",params:{org:p},children:"create your own agent"}),"."]})]}),E.map(n=>{let i=a.integrations?.[n]??{},r=j(I[n]?.events),l=i.allowedEvents,o=w.find(s=>s.id===n);return e("div",{class:"vplatform",children:[e("h3",{children:[o?e(re,{brand:o.brand}):null,o?.name??n]}),r.length?e("div",{class:"field",children:[e("span",{children:["Events"," ",e("small",{children:"the definition's events; turn off any it should ignore here"})]}),e("div",{class:"checks",children:r.map(s=>e("label",{class:"check",children:[e("input",{type:"checkbox",name:`event:${n}`,value:s,defaultChecked:!l||l.includes(s)}),s]},s))})]}):null]},n)})]}):null,e("section",{class:"vpanel","data-panel":"manage",hidden:u!=="manage",children:[e("h2",{children:"Manage"}),e("div",{class:"field row-action",children:[e("span",{children:["Disable agent",e("small",{children:"stops its events and new tasks in this workspace; its apps and tasks stay"})]}),e(ce,{agent:t})]}),e("div",{class:"field row-action",children:[e("span",{children:["Delete agent",e("small",{children:K?"removes it and every version; its tasks and platform apps stay":`${t.name} is built in and cannot be deleted; disable it above instead`})]}),e(q,{variant:"secondary",danger:!0,disabled:!K,onClick:()=>D(!0),children:"Delete agent"})]})]}),u==="manage"?null:e("div",{class:"form-actions save",children:[Q?e("span",{class:"flash",role:"status",children:Q}):null,e(q,{type:"submit",loading:me,children:"Save"})]})]}),fe?e(ne,{open:!0,title:`Delete ${t.name}?`,body:"It stops answering on every platform. This cannot be undone.",confirmLabel:"Delete agent",busy:!!G.pending,onClose:()=>D(!1),onConfirm:ve}):null]})}export{xe as AgentSettingsForm};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{a,b,c,d}from"./composer-87f138e21d68370d.js";import"./composer-data-5fed6c271a4791ca.js";import"./task-95daa40d39de664f.js";import"./connect-repositories-49098298b3a82647.js";import"./model-options-8d2170eebe0d061d.js";import"./types-3eca2c7f47c46054.js";import"./notice-8939183c8a889bae.js";import"./back-b0cd2b85c9d8403e.js";import"./defaults-52f30e83d7666f7a.js";import"./action-fc8716cda7527d8c.js";import"./format-a27067f0186e78ac.js";import"./shared-init-6cad28f8cc696d91.js";import"./shared-init-6cad28f8cc696d91.js";import"./shared-init-6cad28f8cc696d91.js";import"./wular-pnext-71b727f8f5906f08-0.js";import"./shared-init-94883db7bc70a5a8.js";import"./shared-init-94883db7bc70a5a8.js";import"./shared-init-71b727f8f5906f08-2.js";import"./shared-init-71b727f8f5906f08-2.js";import"./shared-init-71b727f8f5906f08-2.js";export{b as Composer,c as LoadingComposer,a as NeedsCredential,d as NewTaskButton};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{a as c}from"./notice-8939183c8a889bae.js";import{b as l}from"./action-fc8716cda7527d8c.js";import"./format-a27067f0186e78ac.js";import"./shared-init-6cad28f8cc696d91.js";import{$2B as a}from"./shared-init-6cad28f8cc696d91.js";import"./shared-init-6cad28f8cc696d91.js";import"./wular-pnext-71b727f8f5906f08-0.js";import{$0c as i}from"./shared-init-94883db7bc70a5a8.js";import{$1L as s,$1a as o,$1b as e,$1z as r}from"./shared-init-94883db7bc70a5a8.js";import"./shared-init-71b727f8f5906f08-2.js";import"./shared-init-71b727f8f5906f08-2.js";import"./shared-init-71b727f8f5906f08-2.js";function C({apps:d}){let m=a(),t=l({toast:"Not installed",leaves:!0}),g=({id:n,agent:p})=>void t.run(n,async()=>{let u=`/dash/${m}/agents/${encodeURIComponent(p)}/platforms`;location.href=(await i.apps.install(n,u)).url});return o(c,{children:[o(e,{d:r}),o("span",{class:"grow",children:"Add the built-in agent to your repositories and channels."}),d.map(n=>o(s,{variant:"outline",size:"sm",disabled:!!t.pending,loading:t.pending===n.id,onClick:()=>g(n),children:n.label},n.id))]})}export{C as ConnectApps};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{b as u,d as g}from"./platform-actions-aafbf038008de64f.js";import"./copy-5db9d328f8f65d82.js";import"./segmented-a3642b8169857fb1.js";import"./outcome-dialog-6323cb5300b6d3c9.js";import"./confirm-01d5814b1c5f7721.js";import"./field-c530e261587d94df.js";import{a as l}from"./action-fc8716cda7527d8c.js";import"./format-a27067f0186e78ac.js";import"./shared-init-6cad28f8cc696d91.js";import"./shared-init-6cad28f8cc696d91.js";import{$0d as f}from"./shared-init-6cad28f8cc696d91.js";import"./wular-pnext-71b727f8f5906f08-0.js";import"./shared-init-6cad28f8cc696d91.js";import{$0c as c}from"./shared-init-94883db7bc70a5a8.js";import{$1L as m,$1a as e}from"./shared-init-94883db7bc70a5a8.js";import"./shared-init-71b727f8f5906f08-2.js";import"./shared-init-71b727f8f5906f08-2.js";import{$2h as t,$2j as p}from"./shared-init-71b727f8f5906f08-2.js";function v({integration:r,state:i,info:o}){let[d,C]=t(!1),[b,a]=t(!0),[n,h]=t(),s=()=>c.apps.start(r,i);return p(()=>{u(o?.create,i,s).then(h).catch(y=>{C(!0),l(y)})},[]),d?null:n?b?e(g,{integration:r,step:n,start:s,unreachable:o?.unreachable,onClose:()=>a(!1)}):e(m,{onClick:()=>a(!0),children:n.submit}):e(f,{label:`Opening ${o?.name??r}`})}export{v as CreateLink};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{b as a,c as b}from"./instructions-3ea5afeea1992bf2.js";import"./shared-init-94883db7bc70a5a8.js";import"./shared-init-71b727f8f5906f08-2.js";export{b as Instructions,a as markdown};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{a}from"./outcome-dialog-6323cb5300b6d3c9.js";import"./shared-init-6cad28f8cc696d91.js";import"./shared-init-94883db7bc70a5a8.js";import"./shared-init-71b727f8f5906f08-2.js";export{a as OutcomeDialog};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{a,b,c,d,e,f}from"./platform-actions-aafbf038008de64f.js";import"./copy-5db9d328f8f65d82.js";import"./segmented-a3642b8169857fb1.js";import"./outcome-dialog-6323cb5300b6d3c9.js";import"./confirm-01d5814b1c5f7721.js";import"./field-c530e261587d94df.js";import"./action-fc8716cda7527d8c.js";import"./format-a27067f0186e78ac.js";import"./shared-init-6cad28f8cc696d91.js";import"./shared-init-6cad28f8cc696d91.js";import"./shared-init-6cad28f8cc696d91.js";import"./wular-pnext-71b727f8f5906f08-0.js";import"./shared-init-6cad28f8cc696d91.js";import"./shared-init-94883db7bc70a5a8.js";import"./shared-init-94883db7bc70a5a8.js";import"./shared-init-71b727f8f5906f08-2.js";import"./shared-init-71b727f8f5906f08-2.js";import"./shared-init-71b727f8f5906f08-2.js";export{d as CreateDialog,e as DriftQueue,c as InstallButton,f as PlatformActions,b as createForm,a as postTo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var st={observedLocationKey:V()};function V(){return location.pathname+location.search}var ke=[];function ct(){return ke.splice(0)}var Ot,Ne;function Te(t){return/^[\u0000-\u0020]*javascript:/i.test(t)}function Mt(t){return Te(t)?(Ot?Ot(t):window.dispatchEvent(new CustomEvent("pnext:blocked-javascript-url",{detail:t})),!0):!1}function Y(t){let e;try{e=new URL(t,location.href)}catch{return null}return e.origin!==location.origin||Ne?.(e)?null:e}function Ut(t){let e=t.target;return e instanceof Element?e.closest("a[data-pnext-link]"):null}function ft(t){if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return null;let e=Ut(t);if(!e||e.target&&e.target!=="_self"||e.hasAttribute("download"))return null;let n=e.getAttribute("data-pnext-blocked-href")??e.getAttribute("href");if(!n)return null;if(Mt(n))return t.preventDefault(),null;let o=e.getAttribute("data-pnext-replace")==="true",i=Y(n);return i?{link:e,url:i,replace:o,scroll:e.getAttribute("data-pnext-scroll")!=="false"}:(o&&(t.preventDefault(),window.location.replace(n)),null)}var at=new Map;window.__PNEXT_REGISTER_ENTRY__=(t,e)=>{let n=jt(t);at.has(n)||at.set(n,e)};function Ce(){return(window.__PNEXT_ROUTER_IMPORTS__??0)>0}function jt(t){return new URL(t,location.href).href}var Dt;function ht(t){return Dt??=import("./runtime-71b727f8f5906f08-1.js").then(async e=>(await Promise.all(ct().map(n=>n())),e)),Dt.then(t)}function Se(t,e){return ht(n=>n.softNavigate(t,e))}function Ae(t,e){let n=Y(t);if(!n){if(e?.strict)try{new URL(t,location.href)}catch{throw new Error(`Cannot prefetch '${t}' because it cannot be converted to a URL.`)}return Promise.resolve(null)}return ht(o=>o.prefetchRoute(n.href,e))}var Pe=3e3,Z=[],pt=!1,Bt=!1,dt;function Ft(t){let e=ft(t);e&&(t.preventDefault(),Z.push(e),dt??=setTimeout(()=>{let n=Z[0];n&&(location.href=n.url.href)},Pe),mt())}function Wt(){pt=!0,mt()}function mt(){return ht(t=>{Bt||(Bt=!0,document.removeEventListener("click",Ft),window.removeEventListener("popstate",Wt),t.installRouterFull()),clearTimeout(dt),dt=void 0;let e=Z;Z=[];for(let n of e)t.commitLinkNavigation(n);pt&&(pt=!1,t.onPopState())})}function Re(t){typeof requestIdleCallback=="function"?requestIdleCallback(()=>t(),{timeout:1e3}):setTimeout(t,1)}function $e(){window.__PNEXT_ROUTER_INSTALLED__||(window.__PNEXT_ROUTER_INSTALLED__=!0,"scrollRestoration"in history&&(history.scrollRestoration="manual"),st.activeRouteKey=V(),document.addEventListener("click",Ft),window.addEventListener("popstate",Wt),Re(()=>void mt()))}var lt,x,ne,Le,O,Xt,re,oe,vt,Q,W,ie,Et,gt,bt,Ie,nt={},rt=[],He=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,X=Array.isArray;function I(t,e){for(var n in e)t[n]=e[n];return t}function kt(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function T(t,e,n){var o,i,r,a={};for(r in e)r=="key"?o=e[r]:r=="ref"?i=e[r]:a[r]=e[r];if(arguments.length>2&&(a.children=arguments.length>3?lt.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)a[r]===void 0&&(a[r]=t.defaultProps[r]);return tt(t,a,o,i,null)}function tt(t,e,n,o,i){var r={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ne,__i:-1,__u:0};return i==null&&x.vnode!=null&&x.vnode(r),r}function q(t){return t.children}function j(t,e){this.props=t,this.context=e}function F(t,e){if(e==null)return t.__?F(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?F(t):null}function Oe(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,o=[],i=[],r=I({},e);r.__v=e.__v+1,x.vnode&&x.vnode(r),Nt(t.__P,r,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,o,n??F(e),!!(32&e.__u),i),r.__v=e.__v,r.__.__k[r.__i]=r,se(o,r,i),e.__e=e.__=null,r.__e!=n&&le(r)}}function le(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),le(t)}function qt(t){(!t.__d&&(t.__d=!0)&&O.push(t)&&!ot.__r++||Xt!=x.debounceRendering)&&((Xt=x.debounceRendering)||re)(ot)}function ot(){try{for(var t,e=1;O.length;)O.length>e&&O.sort(oe),t=O.shift(),e=O.length,Oe(t)}finally{O.length=ot.__r=0}}function _e(t,e,n,o,i,r,a,p,m,s,v){var l,y,h,N,C,E,g,b=o&&o.__k||rt,$=e.length;for(m=Me(n,e,b,m,$),l=0;l<$;l++)(h=n.__k[l])!=null&&(y=h.__i!=-1&&b[h.__i]||nt,h.__i=l,E=Nt(t,h,y,i,r,a,p,m,s,v),N=h.__e,h.ref&&y.ref!=h.ref&&(y.ref&&Tt(y.ref,null,h),v.push(h.ref,h.__c||N,h)),C==null&&N!=null&&(C=N),(g=!!(4&h.__u))||y.__k===h.__k?(m=ue(h,m,t,g),g&&y.__e&&(y.__e=null)):typeof h.type=="function"&&E!==void 0?m=E:N&&(m=N.nextSibling),h.__u&=-7);return n.__e=C,m}function Me(t,e,n,o,i){var r,a,p,m,s,v=n.length,l=v,y=0;for(t.__k=new Array(i),r=0;r<i;r++)(a=e[r])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=t.__k[r]=tt(null,a,null,null,null):X(a)?a=t.__k[r]=tt(q,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=t.__k[r]=tt(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):t.__k[r]=a,m=r+y,a.__=t,a.__b=t.__b+1,p=null,(s=a.__i=Ue(a,n,m,l))!=-1&&(l--,(p=n[s])&&(p.__u|=2)),p==null||p.__v==null?(s==-1&&(i>v?y--:i<v&&y++),typeof a.type!="function"&&(a.__u|=4)):s!=m&&(s==m-1?y--:s==m+1?y++:(s>m?y--:y++,a.__u|=4))):t.__k[r]=null;if(l)for(r=0;r<v;r++)(p=n[r])!=null&&(2&p.__u)==0&&(p.__e==o&&(o=F(p)),fe(p,p));return o}function ue(t,e,n,o){var i,r;if(typeof t.type=="function"){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=ue(i[r],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=F(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ae(t,e){return e=e||[],t==null||typeof t=="boolean"||(X(t)?t.some(function(n){ae(n,e)}):e.push(t)),e}function Ue(t,e,n,o){var i,r,a,p=t.key,m=t.type,s=e[n],v=s!=null&&(2&s.__u)==0;if(s===null&&p==null||v&&p==s.key&&m==s.type)return n;if(o>(v?1:0)){for(i=n-1,r=n+1;i>=0||r<e.length;)if((s=e[a=i>=0?i--:r++])!=null&&(2&s.__u)==0&&p==s.key&&m==s.type)return a}return-1}function Kt(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||He.test(e)?n:n+"px"}function J(t,e,n,o,i){var r,a;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||Kt(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||Kt(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(ie,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?o?n[W]=o[W]:(n[W]=Et,t.addEventListener(e,r?bt:gt,r)):t.removeEventListener(e,r?bt:gt,r);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Gt(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[Q]==null)e[Q]=Et++;else if(e[Q]<n[W])return;return n(x.event?x.event(e):e)}}}function Nt(t,e,n,o,i,r,a,p,m,s){var v,l,y,h,N,C,E,g,b,$,P,S,G,U,B,A=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(m=!!(32&n.__u),r=[p=e.__e=n.__e]),(v=x.__b)&&v(e);t:if(typeof A=="function")try{if(g=e.props,b=A.prototype&&A.prototype.render,$=(v=A.contextType)&&o[v.__c],P=v?$?$.props.value:v.__:o,n.__c?E=(l=e.__c=n.__c).__=l.__E:(b?e.__c=l=new A(g,P):(e.__c=l=new j(g,P),l.constructor=A,l.render=De),$&&$.sub(l),l.state||(l.state={}),l.__n=o,y=l.__d=!0,l.__h=[],l._sb=[]),b&&l.__s==null&&(l.__s=l.state),b&&A.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=I({},l.__s)),I(l.__s,A.getDerivedStateFromProps(g,l.__s))),h=l.props,N=l.state,l.__v=e,y)b&&A.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),b&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(b&&A.getDerivedStateFromProps==null&&g!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(g,P),e.__v==n.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(g,l.__s,P)===!1){e.__v!=n.__v&&(l.props=g,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(H){H&&(H.__=e)}),rt.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&a.push(l);break t}l.componentWillUpdate!=null&&l.componentWillUpdate(g,l.__s,P),b&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,N,C)})}if(l.context=P,l.props=g,l.__P=t,l.__e=!1,S=x.__r,G=0,b)l.state=l.__s,l.__d=!1,S&&S(e),v=l.render(l.props,l.state,l.context),rt.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,S&&S(e),v=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++G<25);l.state=l.__s,l.getChildContext!=null&&(o=I(I({},o),l.getChildContext())),b&&!y&&l.getSnapshotBeforeUpdate!=null&&(C=l.getSnapshotBeforeUpdate(h,N)),U=v!=null&&v.type===q&&v.key==null?ce(v.props.children):v,p=_e(t,X(U)?U:[U],e,n,o,i,r,a,p,m,s),l.base=e.__e,e.__u&=-161,l.__h.length&&a.push(l),E&&(l.__E=l.__=null)}catch(H){if(e.__v=null,m||r!=null)if(H.then){for(e.__u|=m?160:128;p&&p.nodeType==8&&p.nextSibling;)p=p.nextSibling;r[r.indexOf(p)]=null,e.__e=p}else{for(B=r.length;B--;)kt(r[B]);xt(e)}else e.__e=n.__e,e.__k=n.__k,H.then||xt(e);x.__e(H,e,n)}else r==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):p=e.__e=je(n.__e,e,n,o,i,r,a,m,s);return(v=x.diffed)&&v(e),128&e.__u?void 0:p}function xt(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(xt))}function se(t,e,n){for(var o=0;o<n.length;o++)Tt(n[o],n[++o],n[++o]);x.__c&&x.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(r){r.call(i)})}catch(r){x.__e(r,i.__v)}})}function ce(t){return typeof t!="object"||t==null||t.__b>0?t:X(t)?t.map(ce):t.constructor!==void 0?null:I({},t)}function je(t,e,n,o,i,r,a,p,m){var s,v,l,y,h,N,C,E=n.props||nt,g=e.props,b=e.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),r!=null){for(s=0;s<r.length;s++)if((h=r[s])&&"setAttribute"in h==!!b&&(b?h.localName==b:h.nodeType==3)){t=h,r[s]=null;break}}if(t==null){if(b==null)return document.createTextNode(g);t=document.createElementNS(i,b,g.is&&g),p&&(x.__m&&x.__m(e,r),p=!1),r=null}if(b==null)E===g||p&&t.data==g||(t.data=g);else{if(r=b=="textarea"&&g.defaultValue!=null?null:r&<.call(t.childNodes),!p&&r!=null)for(E={},s=0;s<t.attributes.length;s++)E[(h=t.attributes[s]).name]=h.value;for(s in E)h=E[s],s=="dangerouslySetInnerHTML"?l=h:s=="children"||s in g||s=="value"&&"defaultValue"in g||s=="checked"&&"defaultChecked"in g||J(t,s,null,h,i);for(s in g)h=g[s],s=="children"?y=h:s=="dangerouslySetInnerHTML"?v=h:s=="value"?N=h:s=="checked"?C=h:p&&typeof h!="function"||E[s]===h||J(t,s,h,E[s],i);if(v)p||l&&(v.__html==l.__html||v.__html==t.innerHTML)||(t.innerHTML=v.__html),e.__k=[];else if(l&&(t.innerHTML=""),_e(e.type=="template"?t.content:t,X(y)?y:[y],e,n,o,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,r,a,r?r[0]:n.__k&&F(n,0),p,m),r!=null)for(s=r.length;s--;)kt(r[s]);p&&b!="textarea"||(s="value",b=="progress"&&N==null?t.removeAttribute("value"):N!=null&&(N!==t[s]||b=="progress"&&!N||b=="option"&&N!=E[s])&&J(t,s,N,E[s],i),s="checked",C!=null&&C!=t[s]&&J(t,s,C,E[s],i))}return t}function Tt(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(i){x.__e(i,n)}}function fe(t,e,n){var o,i;if(x.unmount&&x.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Tt(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){x.__e(r,e)}o.base=o.__P=null}if(o=t.__k)for(i=0;i<o.length;i++)o[i]&&fe(o[i],e,n||typeof t.type!="function");n||kt(t.__e),t.__c=t.__=t.__e=void 0}function De(t,e,n){return this.constructor(t,n)}function M(t,e,n){var o,i,r,a;e==document&&(e=document.documentElement),x.__&&x.__(t,e),i=(o=typeof n=="function")?null:n&&n.__k||e.__k,r=[],a=[],Nt(e,t=(!o&&n||e).__k=T(q,null,[t]),i||nt,nt,e.namespaceURI,!o&&n?[n]:i?null:e.firstChild?lt.call(e.childNodes):null,r,!o&&n?n:i?i.__e:e.firstChild,o,a),se(r,t,a)}function _t(t,e){M(t,e,_t)}lt=rt.slice,x={__e:function(t,e,n,o){for(var i,r,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,o||{}),a=i.__d),a)return i.__E=i}catch(p){t=p}throw t}},ne=0,Le=function(t){return t!=null&&t.constructor===void 0},j.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state),typeof t=="function"&&(t=t(I({},n),this.props)),t&&I(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),qt(this))},j.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),qt(this))},j.prototype.render=q,O=[],re=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oe=function(t,e){return t.__v.__b-e.__v.__b},ot.__r=0,vt=Math.random().toString(8),Q="__d"+vt,W="__a"+vt,ie=/(PointerCapture)$|Capture$/i,Et=0,gt=Gt(!1),bt=Gt(!0),Ie=0;var D,w,yt,zt,it=0,pe=[],k=x,Vt=k.__b,Yt=k.__r,Zt=k.diffed,Jt=k.__c,Qt=k.unmount,te=k.__;function K(t,e){k.__h&&k.__h(w,t,it||e),it=0;var n=w.__H||(w.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Ct(t){return it=1,de(me,t)}function de(t,e,n){var o=K(D++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):me(void 0,e),function(p){var m=o.__N?o.__N[0]:o.__[0],s=o.t(m,p);m!==s&&(o.__N=[s,o.__[1]],o.__c.setState({}))}],o.__c=w,!w.__f)){var i=function(p,m,s){if(!o.__c.__H)return!0;var v=o.__c.__H.__.filter(function(y){return y.__c});if(v.every(function(y){return!y.__N}))return!r||r.call(this,p,m,s);var l=o.__c.props!==p;return v.some(function(y){if(y.__N){var h=y.__[0];y.__=y.__N,y.__N=void 0,h!==y.__[0]&&(l=!0)}}),r&&r.call(this,p,m,s)||l};w.__f=!0;var r=w.shouldComponentUpdate,a=w.componentWillUpdate;w.componentWillUpdate=function(p,m,s){if(this.__e){var v=r;r=void 0,i(p,m,s),r=v}a&&a.call(this,p,m,s)},w.shouldComponentUpdate=i}return o.__N||o.__}function ut(t,e){var n=K(D++,3);!k.__s&&St(n.__H,e)&&(n.__=t,n.u=e,w.__H.__h.push(n))}function Be(t,e){var n=K(D++,4);!k.__s&&St(n.__H,e)&&(n.__=t,n.u=e,w.__h.push(n))}function Fe(t){return it=5,he(function(){return{current:t}},[])}function he(t,e){var n=K(D++,7);return St(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function We(){var t=K(D++,11);if(!t.__){for(var e=w.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Xe(){for(var t;t=pe.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(et),e.__h.some(wt),e.__h=[]}catch(n){e.__h=[],k.__e(n,t.__v)}}}k.__b=function(t){w=null,Vt&&Vt(t)},k.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),te&&te(t,e)},k.__r=function(t){Yt&&Yt(t),D=0;var e=(w=t.__c).__H;e&&(yt===w?(e.__h=[],w.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(et),e.__h.some(wt),e.__h=[],D=0)),yt=w},k.diffed=function(t){Zt&&Zt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(pe.push(e)!==1&&zt===k.requestAnimationFrame||((zt=k.requestAnimationFrame)||qe)(Xe)),e.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),yt=w=null},k.__c=function(t,e){e.some(function(n){try{n.__h.some(et),n.__h=n.__h.filter(function(o){return!o.__||wt(o)})}catch(o){e.some(function(i){i.__h&&(i.__h=[])}),e=[],k.__e(o,n.__v)}}),Jt&&Jt(t,e)},k.unmount=function(t){Qt&&Qt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(o){try{et(o)}catch(i){e=i}}),n.__H=void 0,e&&k.__e(e,n.__v))};var ee=typeof requestAnimationFrame=="function";function qe(t){var e,n=function(){clearTimeout(o),ee&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);ee&&(e=requestAnimationFrame(n))}function et(t){var e=w,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),w=e}function wt(t){var e=w;t.__c=t.__(),w=e}function St(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function me(t,e){return typeof e=="function"?e(t):e}var ve=()=>Intl.DateTimeFormat().resolvedOptions().timeZone;function Ke(){return ut(()=>{let t=ve();t&&!document.cookie.includes(`tz=${encodeURIComponent(t)}`)&&(document.cookie=`tz=${encodeURIComponent(t)}; path=/; max-age=31536000; samesite=lax`)},[]),null}function Ge(t){let[e,n]=Ct(t);return ut(()=>n(ve()||t),[]),e}var ze="$$pnext_typed_array",Ve="$$pnext_array_buffer",Ye="$$pnext_ref",$t="__pnextPromise",Ze="$$pnextErrorReset";function Je(t,e){if(t===null||typeof t!="object")return t;let n=o=>{for(let i of Object.keys(o)){let r=o[i];if(r===null||typeof r!="object"||ArrayBuffer.isView(r))continue;let a=r,p=rn(t,a)??e?.(a)??nn(a)??Qe(a);if(p!==void 0){o[i]=p;continue}n(a)}};return n(t),t}function Qe(t){return t[Ze]===!0?tn:void 0}function tn(){location.reload()}function en(t){let e=globalThis[t];return typeof e=="function"&&"BYTES_PER_ELEMENT"in e?e:void 0}function ye(t){return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}function nn(t){let e=t[Ve];if(typeof e=="string")return ye(e).buffer;let n=t[ze];if(n===null||typeof n!="object")return;let{type:o,data:i}=n;if(typeof o!="string"||typeof i!="string")return;let r=en(o);return r?new r(ye(i).buffer):void 0}function rn(t,e){let n=e[Ye];if(!Array.isArray(n))return;let o=t;for(let i of n){if(o===null||typeof o!="object")return;o=o[String(i)]}return o}function on(t){return t.includes($t)}function ln(t,e){return Lt(t,new Set,e)}var _n=new Set(["params","searchParams"]);function Lt(t,e,n,o){if(t===null||typeof t!="object"||e.has(t))return t;if($t in t){let r=t[$t],a=un(r);return!n||!o||!_n.has(o)||r===null||typeof r!="object"?a:n(a,o,r)}if(e.add(t),Array.isArray(t)){for(let r=0;r<t.length;r++)t[r]=Lt(t[r],e,n);return t}if(Object.getPrototypeOf(t)!==Object.prototype)return t;let i=t;for(let r of Object.keys(i))i[r]=Lt(i[r],e,n,r);return t}function un(t){let e=Promise.resolve(t);return e.status="fulfilled",e.value=t,e}var ge="data-pnext-static-slot",be="$$pnext_slot";function an(t){return t.includes(be)}async function sn(t,e,n,o){return await xe(t,e,n,o,new Set)}async function xe(t,e,n,o,i){if(t===null||typeof t!="object"||i.has(t))return t;let r=t[be];if(typeof r=="string"){let m=e.querySelector(`[${ge}="${cn(r)}"]`);return m?o("pnext-static-slot",{[ge]:r,style:{display:"contents"}},await n(m)):null}let a=Object.getPrototypeOf(t);if(!Array.isArray(t)&&a!==Object.prototype&&a!==null)return t;i.add(t);let p=t;for(let m of Object.keys(p))p[m]=await xe(p[m],e,n,o,i);return t}function cn(t){return t.replace(/["\\]/g,"\\$&")}function fn(t,e){let n=e.__pnextMask??=[e.getAttribute("data-pnext-id"),0];Object.defineProperty(t,"__m",{enumerable:!0,get(){return(this.__c||this).__pnextMask??=n}})}function At(t,e,n,o,i){let r=o!==void 0?t(e,n,o):t(e,n);return fn(r,i),r}function Pt(t,e,n,o){let i=pn(t);return an(t)?sn(i,e,n,o):i}function pn(t){let e=JSON.parse(t||"{}"),n=Je(e);return on(t||"")?ln(n):n}function dn(t){let e=t.getAttribute("data-pnext-error-message")??"",n=t.getAttribute("data-pnext-error-digest");return T(function(){let o=new Error(e);throw n&&(o.digest=n),o},null)}function Rt(t){let e={};for(let n of t.attributes)e[n.name]=n.value;return e}function hn(t){return t.parentElement?.closest("pnext-client")}var mn=class extends j{componentDidMount(){this.base&&(this.base.__pnextHole=this)}componentWillUnmount(){this.base&&this.base.__pnextHole===this&&(this.base.__pnextHole=void 0)}componentWillReceiveProps(t){t.children!==this.props.children&&this.setState({adopted:void 0})}render(t,e){return T("pnext-hole",t.attrs,e.adopted!==void 0?e.adopted:t.children)}};function vn(t){let e=t;for(;e.parentElement&&getComputedStyle(e).display==="contents";)e=e.parentElement;return e}async function yn(t,e){let n=t.__pnextMounting;if(n&&(await n,t.__pnextLive&&!t.__pnextIncoming))return;let o=e();t.__pnextMounting=o;try{await o}finally{t.__pnextMounting===o&&(t.__pnextMounting=void 0)}}function gn(){if(typeof customElements>"u"||window.__PNEXT_HOST_MEASURE__)return;window.__PNEXT_HOST_MEASURE__=!0;let t=i=>i.style.display==="contents"||getComputedStyle(i).display==="contents"?i.parentElement:null;class e extends HTMLElement{getBoundingClientRect(){let r=t(this);return r?r.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){let r=t(this);return r?r.getClientRects():super.getClientRects()}}for(let i of["clientWidth","clientHeight","offsetWidth","offsetHeight","offsetTop","offsetLeft"])Object.defineProperty(e.prototype,i,{configurable:!0,get(){let r=t(this);return r?r[i]:0}});for(let i of["pnext-client","pnext-dynamic","pnext-static-children"])customElements.get(i)||customElements.define(i,class extends e{});let n=i=>i instanceof e?t(i)??i:i,o=window.ResizeObserver;o&&(window.ResizeObserver=class extends o{observe(i,r){super.observe(n(i),r)}unobserve(i){super.unobserve(n(i))}})}gn();function bn(t,e){if(!e)return!1;for(let n of e)if(t===n||n instanceof Node&&t.contains&&t.contains(n))return!0;return!1}function xn(t){let e=t.islands??[],n=t.Page,o=t.shell,i=new Set,r,a,p;function m(_,u){let f=_.getAttribute&&_.getAttribute("data-pnext-ssr-failed")!=null;(_.hasChildNodes()&&!f?_t:M)(u,_),_.__pnextLive=M,i.add(_)}let s=new Map(e.map(_=>[_.id,_]));function v(_,u){if(_.moveBefore&&_.isConnected&&u.isConnected)try{_.moveBefore(u,null);return}catch{}_.append(u)}function l(_,u){let f=_.__pnextCaptured;if(f){if(_.__pnextCaptured=void 0,u)for(let c of[...f.childNodes])v(u,c);f.remove()}}function y(_){for(let u of _.querySelectorAll("img[loading=lazy]"))if(!(u.complete||u.currentSrc))for(let f of["src","srcset"]){let c=u.getAttribute(f);c!==null&&(u.removeAttribute(f),u.setAttribute(f,c))}}async function h(_){let u=_.__pnextAdopting;if(u)return u;let f=_.__pnextHole;if(!f)return l(_,_);let c=(async()=>{let d=_.__pnextCaptured,R=await S(d??_);l(_),_.replaceChildren(),f.setState({adopted:R??null},()=>y(_))})();_.__pnextAdopting=c;try{await c}finally{_.__pnextAdopting===c&&(_.__pnextAdopting=void 0)}}async function N(_,u){let f;for(let c=_.parentElement;c&&c!==u;c=c.parentElement)if(c.localName==="pnext-hole"){if(c.__pnextHole){f=c;break}f??=c}if(f&&!f.__pnextHole&&!f.__pnextCaptured&&u.__pnextMounting){let c=document.createElement("pnext-hole-capture");c.hidden=!0,document.body.append(c),f.__pnextCaptured=c;for(let d of[...f.childNodes])v(c,d)}if(await u.__pnextMounting?.catch(()=>{}),!(!f||!f.__pnextCaptured&&!_.isConnected))return h(f)}function C(){let _=[],u=0;for(let f of e)for(let c of document.querySelectorAll(`[data-pnext-client="${f.id}"]`)){if(c.closest("[data-pnext-stream]"))continue;let d=hn(c);if(d){_.push(N(c,d));continue}if(!(c.__pnextLive&&!c.__pnextIncoming)){if(u+=1,f.load&&f.options?.load==="visible"&&!c.__pnextIncoming){$(c,f);continue}_.push(E(c,f))}}return{mounted:u,done:Promise.all(_)}}function E(_,u){return yn(_,()=>b(_,u))}async function g(_){return _.Component??await _.load()}async function b(_,u){let f=await g(u),c=_.getAttribute("data-pnext-props")??"{}",d=_.__pnextIncoming;_.__pnextIncoming=void 0;let R=_.__pnextStreamGrafted;if(_.__pnextStreamGrafted=void 0,d&&_.__pnextLive===M&&!R){if(d!==_){let z=At(T,f,await Pt(c,d,S,T),await P(d,u.id),_);M(z,_)}i.add(_);return}d&&(_.replaceChildren(...d.childNodes),_.__pnextLive=void 0,_.__pnextMask=[d.getAttribute("data-pnext-id"),0]);let L=At(T,f,await Pt(c,_,S,T),await P(_,u.id),_);m(_,L)}function $(_,u){if(typeof IntersectionObserver>"u"){E(_,u);return}let f=new IntersectionObserver(c=>{c.some(d=>d.isIntersecting)&&(f.disconnect(),E(_,u))},u.options);f.observe(vn(_))}async function P(_,u){let f=_.querySelector(`[data-pnext-static-children="${u}"]`);if(!f)return;let c=f.localName==="template",d=c?f.content:f;c&&window.__PNEXT_MATERIALIZE_CLIENT_ISLANDS__&&window.__PNEXT_MATERIALIZE_CLIENT_ISLANDS__(d);let R=await S(d);if(n){let L=d.querySelector?.("#pnext-page");L?.parentNode&&L.replaceWith(...L.childNodes)}return c&&f.remove(),T("pnext-static-children",{"data-pnext-static-children":u,style:{display:"contents"}},R)}async function S(_){let u=(await Promise.all(Array.from(_.childNodes,G))).filter(f=>f!=null&&f!==!1);if(u.length!==0)return u.length===1?u[0]:u}async function G(_){if(_.nodeType===3)return _.textContent;if(_.nodeType!==1)return null;let u=_;if(u.localName==="pnext-boundary-error")return dn(u);if(u.localName==="pnext-hole")return T(mn,{attrs:Rt(u)},await S(u));if(u.localName==="pnext-client"){let f=u.getAttribute("data-pnext-client"),c=f?s.get(f):void 0;if(!c)return T(u.localName,Rt(u),await S(u));let d=u.getAttribute("data-pnext-props")??"{}",R=await P(u,c.id),L=await g(c);return At(T,L,await Pt(d,u,S,T),R,u)}return n&&u.id==="pnext-page"?T(n,B()):T(u.localName,Rt(u),await S(u))}async function U(){await r,!document.getElementById("pnext-page")?.closest("pnext-client")&&A()}function B(){let _=window.__PNEXT_PROPS__??{},u=(f,c)=>{let d=Promise.resolve(c);return d.status="fulfilled",d.value=c,d};return{..._,params:u("params",_.params??{}),searchParams:u("searchParams",_.searchParams??Object.fromEntries(new URLSearchParams(location.search)))}}function A(){if(document.documentElement.hasAttribute("data-pnext-ssr-error"))return;let _=window.__PNEXT_CLIENT_PAGE_ROOT__;if(_&&i.has(_))return;let u=H();u&&(window.__PNEXT_CLIENT_PAGE_ROOT__=u,m(u,T(n,B())))}function H(){let _=document.getElementById("pnext-page");if(!_||!_.parentNode||_.closest("pnext-client")||_.closest("pnext-layout[data-pnext-segment]"))return _;let u=_.parentNode,f="";for(let z of _.attributes)f+=" "+z.name+'="'+z.value+'"';let c=f.replace(/</g,"<").replace(/>/g,">"),d=document.createComment("pnext-page:"+c),R=document.createComment("/pnext-page");for(u.insertBefore(d,_);_.firstChild;)u.insertBefore(_.firstChild,_);u.replaceChild(R,_);let L=we(d,R,u);return L.__pnextAnchors=[d,R],L}function we(_,u,f){return{nodeType:1,namespaceURI:f.namespaceURI,get firstChild(){let c=_.nextSibling;return c===u?null:c},get childNodes(){let c=[];for(let d=_.nextSibling;d&&d!==u;d=d.nextSibling)c.push(d);return c},hasChildNodes(){return _.nextSibling!==u},insertBefore(c,d){return f.insertBefore(c,d??u)},appendChild(c){return f.insertBefore(c,u)},removeChild(c){return f.removeChild(c)},contains(c){for(let d=_.nextSibling;d&&d!==u;d=d.nextSibling)if(d===c||d.contains&&d.contains(c))return!0;return!1},closest(c){return f.closest?f.closest(c):null}}}function Ee(){return e.length>0&&(a=C(),r=a.done.then(()=>a.mounted)),n&&(e.length>0?p=U():A()),window.__PNEXT_ACTIVE_ENTRY__={unmount:Ht},r}function It(){return e.length>0&&(a=C(),r=a.done.then(()=>a.mounted)),n&&(e.length>0?p=U():A()),r}window.__PNEXT_MOUNT_ISLANDS__=It;function Ht(_){for(let c of i)bn(c,_)||(M(null,c),c.__pnextLive=void 0);let u=window.__PNEXT_CLIENT_PAGE_ROOT__,f=!1;if(u&&_)for(let c of _)c===u&&(f=!0);i.clear(),f&&i.add(u)}return{mountRoute:Ee,remountRoute:It,unmountRoute:Ht}}export{st as $0a,V as $0b,ct as $0c,Mt as $0d,Y as $0e,Ut as $0f,ft as $0g,at as $0h,Ce as $0i,jt as $0j,Se as $1a,Ae as $1b,$e as $1c,x as $2a,T as $2b,q as $2c,j as $2d,ae as $2e,M as $2f,_t as $2g,Ct as $2h,de as $2i,ut as $2j,Be as $2k,Fe as $2l,he as $2m,We as $2n,Ke as $3a,Ge as $3b,xn as $4a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$2b as g,$2d as R,$2f as T,$2j as P,$2l as A}from"./shared-init-6cad28f8cc696d91.js";import{$1a as B}from"./shared-init-6cad28f8cc696d91.js";import{$0d as y}from"./shared-init-94883db7bc70a5a8.js";import{$1E as x,$1L as d,$1N as f,$1a as t,$1e as b,$1i as L,$1k as S,$1l as E,$1m as O,$1n as C,$1p as M,$1s as w}from"./shared-init-94883db7bc70a5a8.js";import{$2c as l,$2h as a,$2j as p,$2k as h,$2l as k}from"./shared-init-71b727f8f5906f08-2.js";function N({menu:n}){let r=()=>void y().catch(()=>location.reload());return n?t(P,{icon:M,title:"Sign out",onClick:r}):t(d,{variant:"secondary",danger:!0,onClick:r,children:"Sign out"})}function _(){let n=g(),[r,s]=a(),i=r===n,e=o=>s(o?n:void 0);return p(()=>{if(document.documentElement.classList.toggle("drawer",i),!i)return;let o=c=>c.key==="Escape"&&e(!1);return addEventListener("keydown",o),()=>removeEventListener("keydown",o)},[i]),t(l,{children:[t(f,{icon:w,label:"Open navigation",class:"only-m",onClick:()=>e(!i)}),t("div",{class:"scrim",onClick:()=>e(!1)})]})}function st({within:n,children:r,onClick:s,...i}){let e=g(),o=e===T(i)||n!==void 0&&(e===n||e.startsWith(`${n}/`)),c=k(null);return t(b,{...i,"aria-current":o?"page":void 0,onClick:u=>{c.current=u.currentTarget,s?.(u)},children:[r,t($,{anchor:c,current:o})]})}function $({anchor:n,current:r}){let{pending:s}=R();return h(()=>{n.current&&(s&&!r?n.current.setAttribute("data-pending",""):n.current.removeAttribute("data-pending"))},[s,r]),null}var v="side";function dt({collapsed:n}){let[r,s]=a(n);p(()=>{let o=document.querySelector(".app");if(!o)return;let c=()=>s(o.classList.contains("side-min"));c();let u=new MutationObserver(c);return u.observe(o,{attributes:!0,attributeFilter:["class"]}),()=>u.disconnect()},[]);let i=()=>{let o=!r;document.querySelector(".app")?.classList.toggle("side-min",o),document.cookie=`${v}=${o?"min":"max"}; path=/; max-age=31536000; samesite=lax`},e=r?"Expand sidebar":"Collapse sidebar";return t(f,{icon:r?S:L,label:e,tip:e,class:"side-toggle",onClick:i})}var I=3600*24*365,H=[["light","Light",E],["dark","Dark",O],["system","System",C]];function Lt({theme:n}){let[r,s]=a(n),i=e=>{let o=document.documentElement;e==="system"?delete o.dataset.theme:o.dataset.theme=e,document.cookie=`theme=${e}; path=/; max-age=${I}; samesite=lax`,s(e)};return t(l,{children:H.map(([e,o,c])=>t(A,{on:r===e,onPick:()=>i(e),icon:c,children:o},e))})}function xt({link:n}){let r=`/api/auth/sign-in?${new URLSearchParams({return:n,prompt:"login"})}`;return t(B,{class:"outcome-dialog",tone:"warning",title:"Not in this workspace",icon:x,cancel:"Stay here",actions:t(d,{href:r,children:"Sign in with another account"}),onClose:()=>history.replaceState(history.state,"",location.pathname),children:t("p",{role:"status",children:"The link you followed does not belong to this workspace."})})}export{N as a,_ as b,st as c,dt as d,Lt as e,xt as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as i,f as u}from"./defaults-52f30e83d7666f7a.js";var m=t=>t.replace(/&(amp|lt|gt);/g,(e,n)=>({amp:"&",lt:"<",gt:">"})[n]);function a(t="",e=!1){let n=/<event>\n([^]*?)\n<\/event>/g;if(!e&&(!t.trimStart().startsWith("<event>")||t.replace(n,"").trim()))return;let r=[];for(let[,s]of t.matchAll(n))try{let o=JSON.parse(m(s));if(!o||typeof o!="object"||Array.isArray(o)){if(!e)return;continue}r.push(o)}catch(o){if(console.error("coder: unreadable event prompt",o),!e)return}return r.length?r:void 0}function c(t,e,n=[]){let r=[t??"",...n].flatMap(s=>(a(s,!0)??[]).flatMap(o=>typeof o.mustReply=="boolean"?[o.mustReply]:[]));return r.length?r.includes(!0):e}var x=["Conversation","Activity"],h=[["","Recent"],["active","Active"],["waiting","Needs approval"],["running","Running"],["queued","Queued"],["completed","Completed"],["failed","Failed"],["cancelled","Cancelled"],["archived","Archived"]];function T(t){let{status:e,...n}=t;return e==="archived"?{...n,archived:!0}:{...n,status:e}}var f=[["","All sources"],["dashboard","Dashboard"],["cli","CLI"],["schedule","Schedule"]],A=t=>(f.find(([e])=>e===t)??[t,t])[1],w=t=>t.status==="queued"||t.status==="running"||t.status==="waiting",l=t=>({rank:i(t.status),createdAt:t.createdAt,id:t.task.id}),p=(t,e)=>u(l(t),l(e));function b(t,e){let n=new Set(e.map(r=>r.task.id));return[...e,...t.filter(r=>!n.has(r.task.id))].sort(p)}function S(t,e,n={}){let r=new Set(t.map(s=>s.task.id));return[...e.filter(s=>!r.has(s.task.id)),...t].map(s=>n[s.task.id]??s).sort(p)}function E(t,e,n,r){let s=t.at(-1);return{rows:t.filter(o=>(n[o.task.id]??0)<=r),cursor:s?{since:s.updatedAt,sinceId:s.task.id}:e}}function d(t){return a(t)?.flatMap(e=>e.reactions?e.reactions.map(({emoji:n,by:r})=>({author:r.join(", "),text:`reacted ${n}`,reaction:!0})):(e.messages??(e.message?[e.message]:[])).map(({text:n,author:r})=>({author:r.handle??r.name??r.id,text:n||(e.event??"")})))}var C=(t,e)=>c(e,t.task.event?.mustReply!==!1);function q(t){let e=t.task.prompt?.trim(),n=!e||d(e)?t.task.event?.text?.trim()||d(t.turns?.[0]?.prompt??e)?.find(r=>!r.reaction)?.text.trim():e;return t.task.name?.trim()||n||`${t.task.event?.type??"task"} on ${t.task.agent}`}var J=t=>t.split(/[\\/]/).filter(Boolean).at(-1)??t;export{x as a,h as b,T as c,f as d,A as e,w as f,b as g,S as h,E as i,d as j,C as k,q as l,J as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as I}from"./chunks/back-b0cd2b85c9d8403e.js";import{a as p,b as c,c as l,d as f,e as C,f as u}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as r,$3i as s}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2i as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as m,$0k as a}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as e}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:R,remountRoute:P,unmountRoute:b}=t({islands:[{id:"c-1ac5924051",options:{},load:()=>import("./chunks/models-list-98c956ba00913a73.js").then(o=>o.ModelsList)},{id:"c-2a1887a0ac",options:{},load:()=>import("./chunks/secrets-list-53a0c079492199c9.js").then(o=>o.TaskSecrets)},{id:"c-3152e3eeba",Component:r},{id:"c-34706dc412",options:{},load:()=>import("./chunks/credentials-list-3cccc85ef335cb22.js").then(o=>o.EngineLogins)},{id:"c-44689ff458",Component:p},{id:"c-450a8c0d7f",options:{},load:()=>import("./chunks/runners-list-a13d0f8f6583c6d2.js").then(o=>o.RunnersList)},{id:"c-4e8ca4da33",Component:I},{id:"c-54d48b04c1",Component:c},{id:"c-74daf303c0",Component:s},{id:"c-8b097d487c",Component:l},{id:"c-99efd129c2",Component:f},{id:"c-9ac44950e1",options:{},load:()=>import("./chunks/engines-list-0159c8baa0b3e711.js").then(o=>o.EnginesList)},{id:"c-bb95fb5cd0",options:{},load:()=>import("./chunks/outcome-dialog-be3fbe8c4b43d180.js").then(o=>o.OutcomeDialog)},{id:"c-bd3768138d",Component:n},{id:"c-c2d1844a24",Component:a},{id:"c-c861855933",Component:C},{id:"c-c870abe231",Component:u},{id:"c-ca1e18c91f",Component:d},{id:"c-d0ef3e0346",Component:m},{id:"c-d22db79b78",options:{},load:()=>import("./chunks/credentials-list-3cccc85ef335cb22.js").then(o=>o.CredentialsList)},{id:"c-dee30f9e6a",options:{},load:()=>import("./chunks/connections-list-46d48443d8fc8a0d.js").then(o=>o.ConnectionsList)}]});e();i()||R();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:R,unmountRoute:b});export{R as mountRoute,P as remountRoute,b as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as I}from"./chunks/back-b0cd2b85c9d8403e.js";import{a as s,b as p,c,d as f,e as l,f as C}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as a,$3i as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2i as e}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as i,$0k as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as m}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:u,remountRoute:X,unmountRoute:R}=o({islands:[{id:"c-3152e3eeba",Component:a},{id:"c-44689ff458",Component:s},{id:"c-4e8ca4da33",Component:I},{id:"c-54d48b04c1",Component:p},{id:"c-74daf303c0",Component:d},{id:"c-8b097d487c",Component:c},{id:"c-99efd129c2",Component:f},{id:"c-bd3768138d",Component:n},{id:"c-c2d1844a24",Component:r},{id:"c-c861855933",Component:l},{id:"c-c870abe231",Component:C},{id:"c-ca1e18c91f",Component:e},{id:"c-d0ef3e0346",Component:i}]});m();t()||u();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:u,unmountRoute:R});export{u as mountRoute,X as remountRoute,R as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b as p,c,d as f,e as l,f as u}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as s,$3i as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2i as i}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as m,$0k as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as e}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:C,remountRoute:P,unmountRoute:_}=o({islands:[{id:"c-0e17c1e6be",options:{load:"visible",ssr:!0},load:()=>import("./chunks/tasks-list-d58f3063ae31d9d2.js").then(I=>I.TasksList)},{id:"c-3152e3eeba",Component:s},{id:"c-44689ff458",Component:a},{id:"c-54d48b04c1",Component:p},{id:"c-74daf303c0",Component:d},{id:"c-8b097d487c",Component:c},{id:"c-99efd129c2",Component:f},{id:"c-bd3768138d",Component:n},{id:"c-c2d1844a24",Component:r},{id:"c-c861855933",Component:l},{id:"c-c870abe231",Component:u},{id:"c-ca1e18c91f",Component:i},{id:"c-d0ef3e0346",Component:m}]});e();t()||C();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:C,unmountRoute:_});export{C as mountRoute,P as remountRoute,_ as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T}from"./chunks/custom-range-fdf1946aac09cfc3.js";import{a as R}from"./chunks/agent-toggle-a45b95908d62f926.js";import"./chunks/field-c530e261587d94df.js";import"./chunks/action-fc8716cda7527d8c.js";import"./chunks/format-a27067f0186e78ac.js";import{a as c,b as f,c as l,d as C,e as u,f as I}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as a,$3i as p}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2C as s,$2i as m}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as r,$0k as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as e}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:_,remountRoute:D,unmountRoute:b}=n({islands:[{id:"c-0e17c1e6be",options:{load:"visible",ssr:!0},load:()=>import("./chunks/tasks-list-d58f3063ae31d9d2.js").then(o=>o.TasksList)},{id:"c-3152e3eeba",Component:a},{id:"c-35b309bc7e",Component:T},{id:"c-44689ff458",Component:c},{id:"c-54d48b04c1",Component:f},{id:"c-74daf303c0",Component:p},{id:"c-8419d00b21",options:{},load:()=>import("./chunks/composer-8f0e8b1d07e74aad.js").then(o=>o.NewTaskButton)},{id:"c-8b097d487c",Component:l},{id:"c-99efd129c2",Component:C},{id:"c-bd3768138d",Component:t},{id:"c-c0501a541d",Component:s},{id:"c-c2d1844a24",Component:d},{id:"c-c861855933",Component:u},{id:"c-c870abe231",Component:I},{id:"c-ca1e18c91f",Component:m},{id:"c-d0ef3e0346",Component:r},{id:"c-ef88d7061d",Component:R}]});i();e()||_();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:_,unmountRoute:b});export{_ as mountRoute,D as remountRoute,b as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as R}from"./chunks/agent-toggle-a45b95908d62f926.js";import{a as _}from"./chunks/composer-87f138e21d68370d.js";import"./chunks/composer-data-5fed6c271a4791ca.js";import"./chunks/task-95daa40d39de664f.js";import"./chunks/connect-repositories-49098298b3a82647.js";import"./chunks/model-options-8d2170eebe0d061d.js";import"./chunks/types-3eca2c7f47c46054.js";import"./chunks/notice-8939183c8a889bae.js";import{a as T}from"./chunks/back-b0cd2b85c9d8403e.js";import"./chunks/defaults-52f30e83d7666f7a.js";import"./chunks/action-fc8716cda7527d8c.js";import"./chunks/format-a27067f0186e78ac.js";import{a as f,b as l,c as C,d as I,e as u,f as b}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as p,$3i as c}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2C as s,$2i as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as m,$0k as a,$0l as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as e}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:g,remountRoute:j,unmountRoute:h}=t({islands:[{id:"c-0e17c1e6be",options:{load:"visible",ssr:!0},load:()=>import("./chunks/tasks-list-d58f3063ae31d9d2.js").then(o=>o.TasksList)},{id:"c-18a0dc9be5",options:{},load:()=>import("./chunks/platform-actions-ed27388f722b4a4c.js").then(o=>o.DriftQueue)},{id:"c-3152e3eeba",Component:p},{id:"c-44689ff458",Component:f},{id:"c-54d48b04c1",Component:l},{id:"c-5ee3648746",options:{},load:()=>import("./chunks/platform-actions-ed27388f722b4a4c.js").then(o=>o.PlatformActions)},{id:"c-61854541ef",options:{},load:()=>import("./chunks/platform-actions-ed27388f722b4a4c.js").then(o=>o.InstallButton)},{id:"c-70c81f47fd",Component:_},{id:"c-74daf303c0",Component:c},{id:"c-8419d00b21",options:{},load:()=>import("./chunks/composer-8f0e8b1d07e74aad.js").then(o=>o.NewTaskButton)},{id:"c-8b097d487c",Component:C},{id:"c-99efd129c2",Component:I},{id:"c-b67cafaaf9",Component:r},{id:"c-bb95fb5cd0",options:{},load:()=>import("./chunks/outcome-dialog-be3fbe8c4b43d180.js").then(o=>o.OutcomeDialog)},{id:"c-bd3768138d",Component:n},{id:"c-c0501a541d",Component:s},{id:"c-c2d1844a24",Component:a},{id:"c-c861855933",Component:u},{id:"c-c870abe231",Component:b},{id:"c-ca1e18c91f",Component:d},{id:"c-d0ef3e0346",Component:m},{id:"c-e812bd4faf",Component:T},{id:"c-ef88d7061d",Component:R}]});e();i()||g();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:g,unmountRoute:h});export{g as mountRoute,j as remountRoute,h as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,b as c,c as f,d as l,e as C,f as I}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as a,$3i as s}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2D as d,$2i as i}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as e,$0k as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as m}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:u,remountRoute:X,unmountRoute:R}=o({islands:[{id:"c-15679eb241",Component:d},{id:"c-3152e3eeba",Component:a},{id:"c-44689ff458",Component:p},{id:"c-521cfaedd3",options:{},load:()=>import("./chunks/editor-d2460c315bb1fd32.js").then(_=>_.AgentEditor)},{id:"c-54d48b04c1",Component:c},{id:"c-74daf303c0",Component:s},{id:"c-8b097d487c",Component:f},{id:"c-99efd129c2",Component:l},{id:"c-bd3768138d",Component:n},{id:"c-c2d1844a24",Component:r},{id:"c-c861855933",Component:C},{id:"c-c870abe231",Component:I},{id:"c-ca1e18c91f",Component:i},{id:"c-d0ef3e0346",Component:e}]});m();t()||u();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:u,unmountRoute:R});export{u as mountRoute,X as remountRoute,R as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunks/custom-range-fdf1946aac09cfc3.js";import"./chunks/field-c530e261587d94df.js";import{a as s,b as p,c,d as f,e as l,f as C}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as a,$3i as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2i as e}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as i,$0k as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as m}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:I,remountRoute:X,unmountRoute:R}=o({islands:[{id:"c-3152e3eeba",Component:a},{id:"c-35b309bc7e",Component:u},{id:"c-44689ff458",Component:s},{id:"c-54d48b04c1",Component:p},{id:"c-74daf303c0",Component:d},{id:"c-8b097d487c",Component:c},{id:"c-99efd129c2",Component:f},{id:"c-bd3768138d",Component:n},{id:"c-c2d1844a24",Component:r},{id:"c-c861855933",Component:l},{id:"c-c870abe231",Component:C},{id:"c-ca1e18c91f",Component:e},{id:"c-d0ef3e0346",Component:i}]});m();t()||I();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:I,unmountRoute:R});export{I as mountRoute,X as remountRoute,R as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as _}from"./chunks/agent-toggle-a45b95908d62f926.js";import{a as T}from"./chunks/composer-87f138e21d68370d.js";import"./chunks/composer-data-5fed6c271a4791ca.js";import"./chunks/task-95daa40d39de664f.js";import"./chunks/connect-repositories-49098298b3a82647.js";import"./chunks/model-options-8d2170eebe0d061d.js";import"./chunks/types-3eca2c7f47c46054.js";import"./chunks/notice-8939183c8a889bae.js";import"./chunks/back-b0cd2b85c9d8403e.js";import"./chunks/defaults-52f30e83d7666f7a.js";import"./chunks/action-fc8716cda7527d8c.js";import"./chunks/format-a27067f0186e78ac.js";import{a as c,b as f,c as l,d as C,e as I,f as u}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as a,$3i as p}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2C as s,$2i as m}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as d,$0k as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as e}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:R,remountRoute:B,unmountRoute:b}=n({islands:[{id:"c-0e17c1e6be",options:{load:"visible",ssr:!0},load:()=>import("./chunks/tasks-list-d58f3063ae31d9d2.js").then(o=>o.TasksList)},{id:"c-3152e3eeba",Component:a},{id:"c-44689ff458",Component:c},{id:"c-54d48b04c1",Component:f},{id:"c-70c81f47fd",Component:T},{id:"c-74daf303c0",Component:p},{id:"c-8419d00b21",options:{},load:()=>import("./chunks/composer-8f0e8b1d07e74aad.js").then(o=>o.NewTaskButton)},{id:"c-8ac5bd4461",options:{},load:()=>import("./chunks/agent-settings-form-f5576a2c50fce094.js").then(o=>o.AgentSettingsForm)},{id:"c-8b097d487c",Component:l},{id:"c-99efd129c2",Component:C},{id:"c-bd3768138d",Component:t},{id:"c-c0501a541d",Component:s},{id:"c-c2d1844a24",Component:r},{id:"c-c861855933",Component:I},{id:"c-c870abe231",Component:u},{id:"c-ca1e18c91f",Component:m},{id:"c-d0ef3e0346",Component:d},{id:"c-ef88d7061d",Component:_}]});i();e()||R();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:R,unmountRoute:b});export{R as mountRoute,B as remountRoute,b as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T}from"./chunks/agent-toggle-a45b95908d62f926.js";import"./chunks/action-fc8716cda7527d8c.js";import"./chunks/format-a27067f0186e78ac.js";import{a as c,b as f,c as l,d as u,e as C,f as I}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as a,$3i as p}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2C as s,$2i as m}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as r,$0k as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as e}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:_,remountRoute:x,unmountRoute:R}=n({islands:[{id:"c-0e17c1e6be",options:{load:"visible",ssr:!0},load:()=>import("./chunks/tasks-list-d58f3063ae31d9d2.js").then(o=>o.TasksList)},{id:"c-3152e3eeba",Component:a},{id:"c-44689ff458",Component:c},{id:"c-54d48b04c1",Component:f},{id:"c-74daf303c0",Component:p},{id:"c-8419d00b21",options:{},load:()=>import("./chunks/composer-8f0e8b1d07e74aad.js").then(o=>o.NewTaskButton)},{id:"c-8b097d487c",Component:l},{id:"c-99efd129c2",Component:u},{id:"c-bd3768138d",Component:t},{id:"c-c0501a541d",Component:s},{id:"c-c2d1844a24",Component:d},{id:"c-c861855933",Component:C},{id:"c-c870abe231",Component:I},{id:"c-ca1e18c91f",Component:m},{id:"c-d0ef3e0346",Component:r},{id:"c-ef88d7061d",Component:T}]});e();i()||_();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:_,unmountRoute:R});export{_ as mountRoute,x as remountRoute,R as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as l,g as G}from"./chunks/list-b67ce61483dd6acb.js";import"./chunks/confirm-01d5814b1c5f7721.js";import{a as u}from"./chunks/field-c530e261587d94df.js";import"./chunks/defaults-52f30e83d7666f7a.js";import{a as N}from"./chunks/action-fc8716cda7527d8c.js";import"./chunks/format-a27067f0186e78ac.js";import{a as M,b as P,c as U,d as z,e as X,f as x}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as D,$3i as F}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2i as B}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as w,$0k as O,$0o as L}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import{$0a as A,$0c as S}from"./chunks/shared-init-94883db7bc70a5a8.js";import{$1L as p,$1N as E,$1a as e,$1t as k}from"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as h}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as y}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as _}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as T}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$2c as b,$2h as c,$2j as I,$2l as R,$2n as v}from"./chunks/shared-init-71b727f8f5906f08-2.js";function W({row:o,product:r,unreachable:i,onClose:t}){let m=R(null),f=v(),[d,g]=c(!1);I(()=>m.current.showModal(),[]);let s=()=>!d&&m.current.close(),V=n=>{let C=a=>String(n.get(a)??"").trim()||void 0;g(!0),S.operator.setUp(o.integration,{name:C("name"),owner:C("owner")}).then(({url:a})=>{location.href=a}).catch(a=>{if(a instanceof A&&a.status===401)return location.reload();g(!1),N(a)})};return e("dialog",{ref:m,class:"create-dialog","aria-labelledby":f,onClose:t,onCancel:n=>{n.preventDefault(),s()},onClick:n=>n.target===n.currentTarget&&s(),children:e("form",{onSubmit:n=>{n.preventDefault(),V(new FormData(n.currentTarget))},children:[e("header",{children:[e("h2",{id:f,children:["Set up shared ",o.name," app"]}),e(E,{icon:k,label:"Close",onClick:s})]}),i?e("p",{class:"flash err",children:[o.name," cannot reach this server yet. Set a public address first: run the server with PUBLIC_URL set to an address ",o.name," can reach."]}):null,e("p",{class:"muted",children:["One app on ",o.name," serves the built-in agent in every workspace. People see its name on consent screens, as in ",r," wants to connect."]}),e(u,{label:"App name",children:e("input",{name:"name",defaultValue:r,autocomplete:"off",required:!0})}),o.organizationApps?e(u,{label:`${o.name} organization`,hint:"owns the app; leave empty to own it on your personal account",children:e("input",{name:"owner",placeholder:"your-org",autocomplete:"off"})}):null,e("div",{class:"actions",children:[e(p,{variant:"ghost",disabled:d,onClick:s,children:"Cancel"}),e(p,{type:"submit",disabled:i,loading:d,children:["Continue on ",o.name]})]})]})})}function q({first:o}){let[r,i]=c();return e(b,{children:[e(G,{title:"Built-in apps",count:o.platforms.length,children:o.platforms.map(t=>e(l,{title:t.name,badges:t.app?e(L,{tone:"ok",children:"set up"}):null,sub:t.app?t.app.name:"Not set up. Workspaces cannot add the built-in agent here.",actions:t.app?null:e(p,{variant:"secondary",size:"sm",onClick:()=>i(t),children:"Set up"})},t.integration))}),r?e(W,{row:r,product:o.name,unreachable:o.unreachable,onClose:()=>i(void 0)}):null]})}var{mountRoute:H,remountRoute:Se,unmountRoute:Z}=h({islands:[{id:"c-3152e3eeba",Component:D},{id:"c-44689ff458",Component:M},{id:"c-54d48b04c1",Component:P},{id:"c-74daf303c0",Component:F},{id:"c-8b097d487c",Component:U},{id:"c-99efd129c2",Component:z},{id:"c-a3f550bbb1",Component:q},{id:"c-bd3768138d",Component:y},{id:"c-c2d1844a24",Component:O},{id:"c-c861855933",Component:X},{id:"c-c870abe231",Component:x},{id:"c-ca1e18c91f",Component:B},{id:"c-d0ef3e0346",Component:w},{id:"c-e0f570b1d4",Component:l}]});_();T()||H();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:H,unmountRoute:Z});export{H as mountRoute,Se as remountRoute,Z as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d,b as a,c as s,d as p,e as c,f}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as i,$3i as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as e}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as m}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:l,remountRoute:h,unmountRoute:u}=o({islands:[{id:"c-3152e3eeba",Component:i},{id:"c-44689ff458",Component:d},{id:"c-54d48b04c1",Component:a},{id:"c-74daf303c0",Component:r},{id:"c-8b097d487c",Component:s},{id:"c-99efd129c2",Component:p},{id:"c-bd3768138d",Component:n},{id:"c-c861855933",Component:c},{id:"c-c870abe231",Component:f},{id:"c-d0ef3e0346",Component:e}]});m();t()||l();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:l,unmountRoute:u});export{l as mountRoute,h as remountRoute,u as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as _}from"./chunks/agent-toggle-a45b95908d62f926.js";import{a as T}from"./chunks/composer-87f138e21d68370d.js";import"./chunks/composer-data-5fed6c271a4791ca.js";import"./chunks/task-95daa40d39de664f.js";import"./chunks/connect-repositories-49098298b3a82647.js";import"./chunks/model-options-8d2170eebe0d061d.js";import"./chunks/types-3eca2c7f47c46054.js";import"./chunks/notice-8939183c8a889bae.js";import"./chunks/back-b0cd2b85c9d8403e.js";import"./chunks/defaults-52f30e83d7666f7a.js";import"./chunks/action-fc8716cda7527d8c.js";import"./chunks/format-a27067f0186e78ac.js";import{a as c,b as l,c as f,d as u,e as C,f as I}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as a,$3i as p}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2C as s,$2i as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as r,$0k as m}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as e}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:R,remountRoute:D,unmountRoute:b}=n({islands:[{id:"c-0e17c1e6be",options:{load:"visible",ssr:!0},load:()=>import("./chunks/tasks-list-d58f3063ae31d9d2.js").then(o=>o.TasksList)},{id:"c-165dc36564",options:{load:"visible",ssr:!0},load:()=>import("./chunks/versions-list-fbeed95c0b4e5f0f.js").then(o=>o.VersionsList)},{id:"c-3152e3eeba",Component:a},{id:"c-44689ff458",Component:c},{id:"c-54d48b04c1",Component:l},{id:"c-70c81f47fd",Component:T},{id:"c-74daf303c0",Component:p},{id:"c-8419d00b21",options:{},load:()=>import("./chunks/composer-8f0e8b1d07e74aad.js").then(o=>o.NewTaskButton)},{id:"c-8b097d487c",Component:f},{id:"c-99efd129c2",Component:u},{id:"c-9c0994e737",options:{},load:()=>import("./chunks/instructions-d8884576a18e6cdb.js").then(o=>o.Instructions)},{id:"c-bd3768138d",Component:t},{id:"c-c0501a541d",Component:s},{id:"c-c2d1844a24",Component:m},{id:"c-c861855933",Component:C},{id:"c-c870abe231",Component:I},{id:"c-ca1e18c91f",Component:d},{id:"c-d0ef3e0346",Component:r},{id:"c-ef88d7061d",Component:_}]});e();i()||R();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:R,unmountRoute:b});export{R as mountRoute,D as remountRoute,b as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,b as c,c as f,d as l,e as C,f as I}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as d,$3i as s}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2D as a,$2i as i}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as e,$0k as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as m}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:u,remountRoute:X,unmountRoute:R}=o({islands:[{id:"c-15679eb241",Component:a},{id:"c-3152e3eeba",Component:d},{id:"c-44689ff458",Component:p},{id:"c-54d48b04c1",Component:c},{id:"c-74daf303c0",Component:s},{id:"c-8b097d487c",Component:f},{id:"c-99efd129c2",Component:l},{id:"c-b5a3026961",options:{},load:()=>import("./chunks/task-view-e5ee0ada38552918.js").then(_=>_.TaskView)},{id:"c-bd3768138d",Component:n},{id:"c-c2d1844a24",Component:r},{id:"c-c861855933",Component:C},{id:"c-c870abe231",Component:I},{id:"c-ca1e18c91f",Component:i},{id:"c-d0ef3e0346",Component:e}]});m();t()||u();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:u,unmountRoute:R});export{u as mountRoute,X as remountRoute,R as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as I}from"./chunks/composer-87f138e21d68370d.js";import"./chunks/composer-data-5fed6c271a4791ca.js";import"./chunks/task-95daa40d39de664f.js";import"./chunks/connect-repositories-49098298b3a82647.js";import"./chunks/model-options-8d2170eebe0d061d.js";import"./chunks/types-3eca2c7f47c46054.js";import"./chunks/notice-8939183c8a889bae.js";import"./chunks/back-b0cd2b85c9d8403e.js";import"./chunks/defaults-52f30e83d7666f7a.js";import"./chunks/action-fc8716cda7527d8c.js";import"./chunks/format-a27067f0186e78ac.js";import{a as p,b as c,c as f,d as l,e as C,f as u}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as s,$3i as a}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2i as m}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as r,$0k as d}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as e}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:_,remountRoute:Y,unmountRoute:R}=n({islands:[{id:"c-3152e3eeba",Component:s},{id:"c-44689ff458",Component:p},{id:"c-54d48b04c1",Component:c},{id:"c-70c81f47fd",Component:I},{id:"c-74daf303c0",Component:a},{id:"c-8b097d487c",Component:f},{id:"c-93f8f1416f",options:{load:"visible",ssr:!0},load:()=>import("./chunks/agents-grid-9f79b5074899c8be.js").then(o=>o.AgentsGrid)},{id:"c-99efd129c2",Component:l},{id:"c-a325e54133",options:{},load:()=>import("./chunks/connect-apps-857dc9fa3f6f5bbc.js").then(o=>o.ConnectApps)},{id:"c-bd3768138d",Component:t},{id:"c-c2d1844a24",Component:d},{id:"c-c861855933",Component:C},{id:"c-c870abe231",Component:u},{id:"c-ca1e18c91f",Component:m},{id:"c-d0ef3e0346",Component:r}]});i();e()||_();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:_,unmountRoute:R});export{_ as mountRoute,Y as remountRoute,R as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunks/agent-toggle-a45b95908d62f926.js";import"./chunks/action-fc8716cda7527d8c.js";import"./chunks/format-a27067f0186e78ac.js";import{a as p,b as c,c as f,d as l,e as C,f as I}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as a,$3i as s}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2C as d,$2i as i}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as e,$0k as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as m}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:_,remountRoute:x,unmountRoute:T}=o({islands:[{id:"c-3152e3eeba",Component:a},{id:"c-44689ff458",Component:p},{id:"c-521cfaedd3",options:{},load:()=>import("./chunks/editor-d2460c315bb1fd32.js").then(R=>R.AgentEditor)},{id:"c-54d48b04c1",Component:c},{id:"c-74daf303c0",Component:s},{id:"c-8b097d487c",Component:f},{id:"c-99efd129c2",Component:l},{id:"c-bd3768138d",Component:n},{id:"c-c0501a541d",Component:d},{id:"c-c2d1844a24",Component:r},{id:"c-c861855933",Component:C},{id:"c-c870abe231",Component:I},{id:"c-ca1e18c91f",Component:i},{id:"c-d0ef3e0346",Component:e},{id:"c-ef88d7061d",Component:u}]});m();t()||_();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:_,unmountRoute:T});export{_ as mountRoute,x as remountRoute,T as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s,b as p,c,d as f,e as l,f as C}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3h as d,$3i as a}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2i as m}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as e,$0k as r}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as n}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:u,remountRoute:P,unmountRoute:_}=o({islands:[{id:"c-3152e3eeba",Component:d},{id:"c-44689ff458",Component:s},{id:"c-54d48b04c1",Component:p},{id:"c-74daf303c0",Component:a},{id:"c-8b097d487c",Component:c},{id:"c-99efd129c2",Component:f},{id:"c-bd3768138d",Component:n},{id:"c-c2d1844a24",Component:r},{id:"c-c861855933",Component:l},{id:"c-c870abe231",Component:C},{id:"c-ca1e18c91f",Component:m},{id:"c-d0ef3e0346",Component:e},{id:"c-d9fccf0000",options:{},load:()=>import("./chunks/create-link-6b6e9eeac436c4af.js").then(I=>I.CreateLink)}]});i();t()||u();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:u,unmountRoute:_});export{u as mountRoute,P as remountRoute,_ as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as r}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:m,remountRoute:d,unmountRoute:n}=o({islands:[{id:"c-bd3768138d",Component:t}]});i();r()||m();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:m,unmountRoute:n});export{m as mountRoute,d as remountRoute,n as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as h,b,c as g,d as T,e as k,f as w}from"./chunks/side-toggle-a2f67a8671a0309b.js";import{$3b as t,$3h as C,$3i as N}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$2i as p}from"./chunks/shared-init-6cad28f8cc696d91.js";import{$0j as u,$0k as I}from"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/wular-pnext-71b727f8f5906f08-0.js";import"./chunks/shared-init-6cad28f8cc696d91.js";import"./chunks/shared-init-94883db7bc70a5a8.js";import{$1a as e}from"./chunks/shared-init-94883db7bc70a5a8.js";import{$4a as c}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as d}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as l}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as f}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$2h as s,$2j as m}from"./chunks/shared-init-71b727f8f5906f08-2.js";function _(){let[S,r]=s(!1),[a,i]=s(!1);m(()=>{if(typeof Notification>"u")return i(!0);i(Notification.permission==="denied"),r(localStorage.getItem(t)==="1"&&Notification.permission==="granted")},[]);let E=async o=>{o.checked&&Notification.permission==="default"&&await Notification.requestPermission();let n=o.checked&&Notification.permission==="granted";n?localStorage.setItem(t,"1"):localStorage.removeItem(t),o.checked=n,r(n),i(Notification.permission==="denied")};return e("label",{class:"notify",children:[e("input",{type:"checkbox",role:"switch",class:"switch",checked:S,disabled:a,onChange:o=>void E(o.currentTarget)}),a?"Notifications are blocked in this browser":"Notify me when a task finishes"]})}var{mountRoute:R,remountRoute:V,unmountRoute:v}=c({islands:[{id:"c-3152e3eeba",Component:C},{id:"c-44689ff458",Component:h},{id:"c-54d48b04c1",Component:b},{id:"c-74daf303c0",Component:N},{id:"c-8b097d487c",Component:g},{id:"c-99efd129c2",Component:T},{id:"c-a2cd4b0c1a",Component:_},{id:"c-bd3768138d",Component:d},{id:"c-c2d1844a24",Component:I},{id:"c-c861855933",Component:k},{id:"c-c870abe231",Component:w},{id:"c-ca1e18c91f",Component:p},{id:"c-d0ef3e0346",Component:u}]});l();f()||R();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:R,unmountRoute:v});export{R as mountRoute,V as remountRoute,v as unmountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$4a as o}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$3a as t}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$1c as r}from"./chunks/shared-init-71b727f8f5906f08-2.js";import{$0i as i}from"./chunks/shared-init-71b727f8f5906f08-2.js";import"./chunks/shared-init-71b727f8f5906f08-2.js";var{mountRoute:n,remountRoute:p,unmountRoute:m}=o({islands:[{id:"c-bd3768138d",Component:t},{id:"c-d9fccf0000",options:{},load:()=>import("./chunks/create-link-6b6e9eeac436c4af.js").then(e=>e.CreateLink)}]});r();i()||n();window.__PNEXT_REGISTER_ENTRY__&&window.__PNEXT_REGISTER_ENTRY__(import.meta.url,{mountRoute:n,unmountRoute:m});export{n as mountRoute,p as remountRoute,m as unmountRoute};
|