@orgsdk/cli 0.2.1 → 1.1.0
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 +7 -3
- package/bin/configuration.mjs +0 -12
- package/bin/options.mjs +6 -5
- package/bin/orgsdk.mjs +5 -7
- package/bin/supervision.mjs +29 -40
- package/dist/THIRD_PARTY_NOTICES.txt +53 -0
- package/dist/runtime/README.md +3 -3
- package/dist/server/index.js +996 -669
- package/dist/server/out/404/index.html +1 -1
- package/dist/server/out/404.html +1 -1
- package/dist/server/out/__next.!KHdvcmtzcGFjZSk.__PAGE__.txt +34 -33
- package/dist/server/out/__next._full.txt +28 -27
- package/dist/server/out/__next._tree.txt +1 -1
- package/dist/server/out/_next/static/chunks/08j8vkv6c63tl.js +1 -0
- package/dist/server/out/_next/static/chunks/08mhtndhqtap6.js +1 -0
- package/dist/server/out/_next/static/chunks/0_4g944_32yce.js +1 -0
- package/dist/server/out/_next/static/chunks/0ldil27yuop5w.js +1 -0
- package/dist/server/out/_next/static/chunks/0ml0xmlylpypc.js +1 -0
- package/dist/server/out/_next/static/chunks/0pnz1790dyskl.js +1 -0
- package/dist/server/out/_next/static/chunks/0vvzjn6qqroc-.js +1 -0
- package/dist/server/out/_next/static/chunks/1-rdwquujn9vu.js +1 -0
- package/dist/server/out/_next/static/chunks/{0y5lgqdwpeabb.js → 119rk6qs93dvi.js} +1 -1
- package/dist/server/out/_next/static/chunks/1mvslk_7tkoql.js +1 -0
- package/dist/server/out/_next/static/chunks/1qo38zfnwh7m8.js +1 -0
- package/dist/server/out/_next/static/chunks/1wzgdpm-y6pr7.js +1 -0
- package/dist/server/out/_next/static/chunks/1ybinna1i7_ih.js +1 -0
- package/dist/server/out/_next/static/chunks/1z4_it-ka8j5y.js +1 -0
- package/dist/server/out/_next/static/chunks/{0khjy8qh1ll42.js → 23_jxnb5bd655.js} +1 -1
- package/dist/server/out/_next/static/chunks/26xwt7opuq5ra.js +1 -0
- package/dist/server/out/_next/static/chunks/2_mjw80no8x2k.js +1 -0
- package/dist/server/out/_next/static/chunks/2e3acf42jw52v.js +1 -0
- package/dist/server/out/_next/static/chunks/2isb6m1ll4dfq.js +3 -0
- package/dist/server/out/_next/static/chunks/2q18r9vstryqj.js +3 -0
- package/dist/server/out/_next/static/chunks/2zwn2yzygk1de.js +1 -0
- package/dist/server/out/_next/static/chunks/{2z60o39-yshg2.js → 36wd29nar_zo_.js} +1 -1
- package/dist/server/out/_next/static/chunks/37a4b-pq_bp3z.js +1 -0
- package/dist/server/out/_next/static/chunks/37ulwyxnek-f9.js +1 -0
- package/dist/server/out/_next/static/chunks/38qp_i6ue7fcy.js +1 -0
- package/dist/server/out/_next/static/chunks/3a4y69p5pl3_7.js +10 -0
- package/dist/server/out/_next/static/chunks/3l2yelj-blib4.js +1 -0
- package/dist/server/out/_next/static/chunks/3u6154viqt17v.js +1 -0
- package/dist/server/out/_next/static/chunks/{2navy2mx7--vk.js → 3w6l6p3ylx6oq.js} +2 -2
- package/dist/server/out/_next/static/chunks/{0cwfl2xanfapu.js → 3yetoibj5lso8.js} +1 -1
- package/dist/server/out/_next/static/chunks/42mg-r2kufm8n.js +1 -0
- package/dist/server/out/_not-found/__next._full.txt +22 -19
- package/dist/server/out/_not-found/__next._not-found.__PAGE__.txt +25 -22
- package/dist/server/out/_not-found/__next._tree.txt +1 -1
- package/dist/server/out/_not-found/index.html +1 -1
- package/dist/server/out/_not-found/index.txt +22 -19
- package/dist/server/out/accounts/2fa/__next._full.txt +25 -24
- package/dist/server/out/accounts/2fa/__next._tree.txt +1 -1
- package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/2fa/index.html +1 -1
- package/dist/server/out/accounts/2fa/index.txt +25 -24
- package/dist/server/out/accounts/email/__next._full.txt +25 -24
- package/dist/server/out/accounts/email/__next._tree.txt +1 -1
- package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/email/index.html +1 -1
- package/dist/server/out/accounts/email/index.txt +25 -24
- package/dist/server/out/accounts/login/__next._full.txt +25 -24
- package/dist/server/out/accounts/login/__next._tree.txt +1 -1
- package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/login/index.html +1 -1
- package/dist/server/out/accounts/login/index.txt +25 -24
- package/dist/server/out/accounts/logout/__next._full.txt +25 -24
- package/dist/server/out/accounts/logout/__next._tree.txt +1 -1
- package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/logout/index.html +1 -1
- package/dist/server/out/accounts/logout/index.txt +25 -24
- package/dist/server/out/accounts/password/change/__next._full.txt +26 -25
- package/dist/server/out/accounts/password/change/__next._tree.txt +1 -1
- package/dist/server/out/accounts/password/change/__next.accounts.password.change.__PAGE__.txt +30 -29
- package/dist/server/out/accounts/password/change/index.html +1 -1
- package/dist/server/out/accounts/password/change/index.txt +26 -25
- package/dist/server/out/accounts/password/reset/__next._full.txt +25 -23
- package/dist/server/out/accounts/password/reset/__next._tree.txt +1 -1
- package/dist/server/out/accounts/password/reset/__next.accounts.password.reset.__PAGE__.txt +29 -27
- package/dist/server/out/accounts/password/reset/index.html +1 -1
- package/dist/server/out/accounts/password/reset/index.txt +25 -23
- package/dist/server/out/accounts/signup/__next._full.txt +25 -24
- package/dist/server/out/accounts/signup/__next._tree.txt +1 -1
- package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/signup/index.html +1 -1
- package/dist/server/out/accounts/signup/index.txt +25 -24
- package/dist/server/out/actions/__next.!KHdvcmtzcGFjZSk.actions.__PAGE__.txt +33 -33
- package/dist/server/out/actions/__next._full.txt +28 -28
- package/dist/server/out/actions/__next._tree.txt +1 -1
- package/dist/server/out/actions/index.html +1 -1
- package/dist/server/out/actions/index.txt +28 -28
- package/dist/server/out/agents/__next.!KHdvcmtzcGFjZSk.agents.__PAGE__.txt +38 -37
- package/dist/server/out/agents/__next._full.txt +31 -30
- package/dist/server/out/agents/__next._tree.txt +1 -1
- package/dist/server/out/agents/index.html +1 -1
- package/dist/server/out/agents/index.txt +31 -30
- package/dist/server/out/approvals/__next.!KHdvcmtzcGFjZSk.approvals.__PAGE__.txt +38 -37
- package/dist/server/out/approvals/__next._full.txt +31 -30
- package/dist/server/out/approvals/__next._tree.txt +1 -1
- package/dist/server/out/approvals/index.html +1 -1
- package/dist/server/out/approvals/index.txt +31 -30
- package/dist/server/out/artifacts/__next.!KHdvcmtzcGFjZSk.artifacts.__PAGE__.txt +30 -30
- package/dist/server/out/artifacts/__next._full.txt +25 -25
- package/dist/server/out/artifacts/__next._tree.txt +1 -1
- package/dist/server/out/artifacts/index.html +1 -1
- package/dist/server/out/artifacts/index.txt +25 -25
- package/dist/server/out/audit/__next.!KHdvcmtzcGFjZSk.audit.__PAGE__.txt +35 -34
- package/dist/server/out/audit/__next._full.txt +28 -27
- package/dist/server/out/audit/__next._tree.txt +1 -1
- package/dist/server/out/audit/index.html +1 -1
- package/dist/server/out/audit/index.txt +28 -27
- package/dist/server/out/chat/__next.!KHdvcmtzcGFjZSk.chat.__PAGE__.txt +34 -33
- package/dist/server/out/chat/__next._full.txt +27 -26
- package/dist/server/out/chat/__next._tree.txt +1 -1
- package/dist/server/out/chat/index.html +1 -1
- package/dist/server/out/chat/index.txt +27 -26
- package/dist/server/out/connections/__next.!KHdvcmtzcGFjZSk.connections.__PAGE__.txt +38 -37
- package/dist/server/out/connections/__next._full.txt +31 -30
- package/dist/server/out/connections/__next._tree.txt +1 -1
- package/dist/server/out/connections/index.html +1 -1
- package/dist/server/out/connections/index.txt +31 -30
- package/dist/server/out/credentials/__next.!KHdvcmtzcGFjZSk.credentials.__PAGE__.txt +29 -29
- package/dist/server/out/credentials/__next._full.txt +24 -24
- package/dist/server/out/credentials/__next._tree.txt +1 -1
- package/dist/server/out/credentials/index.html +1 -1
- package/dist/server/out/credentials/index.txt +24 -24
- package/dist/server/out/documents/__next.!KHdvcmtzcGFjZSk.documents.__PAGE__.txt +38 -37
- package/dist/server/out/documents/__next._full.txt +31 -30
- package/dist/server/out/documents/__next._tree.txt +1 -1
- package/dist/server/out/documents/index.html +1 -1
- package/dist/server/out/documents/index.txt +31 -30
- package/dist/server/out/index.html +1 -1
- package/dist/server/out/index.txt +28 -27
- package/dist/server/out/people/__next.!KHdvcmtzcGFjZSk.people.__PAGE__.txt +38 -37
- package/dist/server/out/people/__next._full.txt +31 -30
- package/dist/server/out/people/__next._tree.txt +1 -1
- package/dist/server/out/people/index.html +1 -1
- package/dist/server/out/people/index.txt +31 -30
- package/dist/server/out/plugins/__next.!KHdvcmtzcGFjZSk.plugins.__PAGE__.txt +31 -31
- package/dist/server/out/plugins/__next._full.txt +26 -26
- package/dist/server/out/plugins/__next._tree.txt +1 -1
- package/dist/server/out/plugins/icons/SOURCES.md +24 -0
- package/dist/server/out/plugins/icons/asana.ico +0 -0
- package/dist/server/out/plugins/icons/browser-cdp.png +0 -0
- package/dist/server/out/plugins/icons/chromium-license.txt +27 -0
- package/dist/server/out/plugins/icons/data.svg +1 -0
- package/dist/server/out/plugins/icons/facebook.svg +1 -0
- package/dist/server/out/plugins/icons/github.svg +10 -0
- package/dist/server/out/plugins/icons/gmail.svg +1 -0
- package/dist/server/out/plugins/icons/google-drive.svg +1 -0
- package/dist/server/out/plugins/icons/google-sheets.svg +1 -0
- package/dist/server/out/plugins/icons/google-tasks.svg +1 -0
- package/dist/server/out/plugins/icons/harvest.svg +7 -0
- package/dist/server/out/plugins/icons/linkedin.png +0 -0
- package/dist/server/out/plugins/icons/llm.svg +1 -0
- package/dist/server/out/plugins/icons/lucide-license.txt +43 -0
- package/dist/server/out/plugins/icons/serper.png +0 -0
- package/dist/server/out/plugins/icons/servicem8.png +0 -0
- package/dist/server/out/plugins/icons/shippo.png +0 -0
- package/dist/server/out/plugins/icons/shopify.png +0 -0
- package/dist/server/out/plugins/icons/twitter.svg +1 -0
- package/dist/server/out/plugins/icons/xero.svg +15 -0
- package/dist/server/out/plugins/icons/zendesk.svg +6 -0
- package/dist/server/out/plugins/index.html +1 -1
- package/dist/server/out/plugins/index.txt +26 -26
- package/dist/server/out/projects/__next.!KHdvcmtzcGFjZSk.projects.__PAGE__.txt +38 -37
- package/dist/server/out/projects/__next._full.txt +31 -30
- package/dist/server/out/projects/__next._tree.txt +1 -1
- package/dist/server/out/projects/index.html +1 -1
- package/dist/server/out/projects/index.txt +31 -30
- package/dist/server/out/runs/__next.!KHdvcmtzcGFjZSk.runs.__PAGE__.txt +30 -30
- package/dist/server/out/runs/__next._full.txt +25 -25
- package/dist/server/out/runs/__next._tree.txt +1 -1
- package/dist/server/out/runs/index.html +1 -1
- package/dist/server/out/runs/index.txt +25 -25
- package/dist/server/out/schedules/__next.!KHdvcmtzcGFjZSk.schedules.__PAGE__.txt +29 -29
- package/dist/server/out/schedules/__next._full.txt +24 -24
- package/dist/server/out/schedules/__next._tree.txt +1 -1
- package/dist/server/out/schedules/index.html +1 -1
- package/dist/server/out/schedules/index.txt +24 -24
- package/dist/server/out/settings/__next.!KHdvcmtzcGFjZSk.settings.__PAGE__.txt +38 -37
- package/dist/server/out/settings/__next._full.txt +31 -30
- package/dist/server/out/settings/__next._tree.txt +1 -1
- package/dist/server/out/settings/index.html +1 -1
- package/dist/server/out/settings/index.txt +31 -30
- package/dist/server/out/setup/__next._full.txt +27 -26
- package/dist/server/out/setup/__next._tree.txt +1 -1
- package/dist/server/out/setup/__next.setup.__PAGE__.txt +30 -29
- package/dist/server/out/setup/index.html +1 -1
- package/dist/server/out/setup/index.txt +27 -26
- package/dist/server/out/studio/approve/__next._full.txt +30 -0
- package/dist/server/out/studio/approve/__next._tree.txt +5 -0
- package/dist/server/out/studio/approve/__next.studio.approve.__PAGE__.txt +37 -0
- package/dist/server/out/studio/approve/index.html +1 -0
- package/dist/server/out/studio/approve/index.txt +30 -0
- package/dist/server/out/tables/__next.!KHdvcmtzcGFjZSk.tables.__PAGE__.txt +35 -34
- package/dist/server/out/tables/__next._full.txt +28 -27
- package/dist/server/out/tables/__next._tree.txt +1 -1
- package/dist/server/out/tables/index.html +1 -1
- package/dist/server/out/tables/index.txt +28 -27
- package/dist/server/out/webhooks/__next.!KHdvcmtzcGFjZSk.webhooks.__PAGE__.txt +38 -37
- package/dist/server/out/webhooks/__next._full.txt +31 -30
- package/dist/server/out/webhooks/__next._tree.txt +1 -1
- package/dist/server/out/webhooks/index.html +1 -1
- package/dist/server/out/webhooks/index.txt +31 -30
- package/dist/server/out/workspaces/invite/__next._full.txt +28 -27
- package/dist/server/out/workspaces/invite/__next._tree.txt +1 -1
- package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +31 -30
- package/dist/server/out/workspaces/invite/index.html +1 -1
- package/dist/server/out/workspaces/invite/index.txt +28 -27
- package/docs/browser-sessions.md +3 -3
- package/docs/npm-distribution.md +4 -4
- package/docs/studio.md +25 -0
- package/package.json +3 -1
- package/runtime/README.md +3 -3
- package/dist/server/out/_next/static/chunks/0ay0b1lpy734z.js +0 -1
- package/dist/server/out/_next/static/chunks/0e7s8ie0wlk66.js +0 -1
- package/dist/server/out/_next/static/chunks/0ey-6hb0za4r_.js +0 -1
- package/dist/server/out/_next/static/chunks/0r0572w1rwpcv.js +0 -1
- package/dist/server/out/_next/static/chunks/0u_9k8f7709np.js +0 -1
- package/dist/server/out/_next/static/chunks/0w34iczo7r1v5.js +0 -1
- package/dist/server/out/_next/static/chunks/0zfiikazg0_ga.js +0 -1
- package/dist/server/out/_next/static/chunks/19ue6x5c3f_38.js +0 -3
- package/dist/server/out/_next/static/chunks/1c2xcwifk3vhh.js +0 -1
- package/dist/server/out/_next/static/chunks/1dwr62uuyceq-.js +0 -1
- package/dist/server/out/_next/static/chunks/1fweh1ttncdlv.js +0 -1
- package/dist/server/out/_next/static/chunks/1iklteprcoims.js +0 -1
- package/dist/server/out/_next/static/chunks/1qaow7bdy3oid.js +0 -1
- package/dist/server/out/_next/static/chunks/1wn9ohqcnx8y8.js +0 -3
- package/dist/server/out/_next/static/chunks/1zieh-zxgxmcp.js +0 -1
- package/dist/server/out/_next/static/chunks/25qsan0t-_of0.js +0 -1
- package/dist/server/out/_next/static/chunks/26yareaaj1kyr.js +0 -1
- package/dist/server/out/_next/static/chunks/2bkkmnhngpacd.js +0 -1
- package/dist/server/out/_next/static/chunks/2e39uy7huhczu.js +0 -1
- package/dist/server/out/_next/static/chunks/2rp65hq6bmpxv.js +0 -1
- package/dist/server/out/_next/static/chunks/3_d6w25_b15kx.js +0 -1
- package/dist/server/out/_next/static/chunks/3d8gkwu9nszjk.js +0 -1
- package/dist/server/out/_next/static/chunks/3l-16g1y6k5rs.js +0 -1
- package/dist/server/out/_next/static/chunks/3obu_9-ka7u_h.js +0 -1
- package/dist/server/out/_next/static/chunks/3u7q5w03st-rs.js +0 -1
- /package/dist/server/out/_next/static/{pj0R4_8zvgkN95QPXRHgC → EF7eiGRF-6pU64XbVOn6f}/_buildManifest.js +0 -0
- /package/dist/server/out/_next/static/{pj0R4_8zvgkN95QPXRHgC → EF7eiGRF-6pU64XbVOn6f}/_clientMiddlewareManifest.js +0 -0
- /package/dist/server/out/_next/static/{pj0R4_8zvgkN95QPXRHgC → EF7eiGRF-6pU64XbVOn6f}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51757,e=>{"use strict";var t=e.i(56420);let a={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};a.node;let i=(0,t.f)(a);e.s(["f",0,i],51757)},13581,29487,e=>{"use strict";var t=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,i=0){let[s,l]=(0,t.useState)(),[n,r]=(0,t.useState)(""),[d,o]=(0,t.useState)(!0),c=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),h=(0,t.useCallback)(async()=>{c.current?.abort();let t=new AbortController;c.current=t;try{let a=await e(t.signal);if(t.signal.aborted||!u.current)return;l(a),r("")}catch(e){!t.signal.aborted&&u.current&&r((0,a.f)(e))}finally{!t.signal.aborted&&u.current&&o(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=i>0?setInterval(()=>{h()},i):void 0;return()=>{u.current=!1,c.current?.abort(),clearInterval(e)}},[h,i]),{data:s,error:n,isLoading:d,refresh:h}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:a}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:t}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],29487)},10505,79432,e=>{"use strict";var t=e.i(18050),a=e.i(56420);let i={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};i.node;let s=(0,a.f)(i);e.s(["f",0,s],79432);var l=e.i(51757);let n={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};n.node;let r=(0,a.f)(n),d={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};d.node;let o=(0,a.f)(d),c={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};c.node;let u=(0,a.f)(c);function h(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let a={succeeded:l.f,waiting_approval:o,running:s,queued:r,failed:u,cancelled:u,interrupted:u}[e]??r;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(a,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let a=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${a} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let a=Reflect.get(e,t);if("string"==typeof a)return a}return""})(e.inputs,"message").slice(0,70)}`:`${a} \xb7 ${h(e.operation)}`},"T",0,h],10505)},57743,e=>{"use strict";var t=e.i(18050),a=e.i(71645),i=e.i(73656),s=e.i(95813),l=e.i(13581),n=e.i(19455),r=e.i(93479),d=e.i(94757),o=e.i(87309),c=e.i(29487),u=e.i(10505);let h={key:"name",type:"text",required:!0};function v({table:e,onSaved:l}){let o=(0,a.useId)(),{setDirty:c}=(0,d.useWorkspace)(),[u,x]=(0,a.useState)(e?.name??""),[m,p]=(0,a.useState)(e?.columns??[h]),[y,f]=(0,a.useState)(!1),[b,j]=(0,a.useState)(""),[w,k]=(0,a.useState)("");function g(e,t){p(a=>a.map((a,i)=>i===e?{...a,...t}:a))}return(0,t.jsxs)("form",{onChange:()=>{c(!0)},onSubmit:t=>{t.preventDefault(),f(!0),j(""),k(""),(async()=>{try{let t={name:u,columns:m};e?await i.V.tables.update.mutate({id:e.id,...t,revision:e.revision}):(await i.V.tables.create.mutate(t),x(""),p([h])),c(!1),await l(),k("Table saved.")}catch(e){j((0,s.f)(e))}finally{f(!1)}})()},children:[(0,t.jsxs)("fieldset",{disabled:y,className:"space-y-3",children:[(0,t.jsx)("legend",{className:"mb-3 font-semibold",children:e?"Edit table definition":"Create a table"}),(0,t.jsxs)("label",{children:["Table name",(0,t.jsx)(r.f,{required:!0,maxLength:120,value:u,onChange:e=>{x(e.target.value)}})]}),(0,t.jsx)("p",{className:"small",children:"Column keys use lowercase letters, digits and underscores, starting with a letter. Existing rows must remain valid when a definition changes."}),m.map((e,a)=>(0,t.jsxs)("div",{className:"table-column-fields",children:[(0,t.jsxs)("label",{className:"table-column-key",children:["Column ",a+1," key",(0,t.jsx)(r.f,{required:!0,pattern:"[a-z][a-z0-9_]{0,47}",maxLength:48,value:e.key,onChange:e=>{g(a,{key:e.target.value})}})]}),(0,t.jsxs)("div",{className:"table-column-type",children:[(0,t.jsx)("label",{htmlFor:`${o}-type-${String(a)}`,children:"Type"}),(0,t.jsxs)("select",{id:`${o}-type-${String(a)}`,value:e.type,onChange:e=>{let t=e.target.value;["text","number","boolean","date"].includes(t)&&g(a,{type:t})},children:[(0,t.jsx)("option",{value:"text",children:"Text"}),(0,t.jsx)("option",{value:"number",children:"Number"}),(0,t.jsx)("option",{value:"boolean",children:"Boolean"}),(0,t.jsx)("option",{value:"date",children:"Date"})]})]}),(0,t.jsxs)("label",{className:"check",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.required,onChange:e=>{g(a,{required:e.target.checked})}}),"Required"]}),(0,t.jsxs)(n.f,{type:"button",variant:"outline",disabled:1===m.length,onClick:()=>{c(!0),p(e=>e.filter((e,t)=>t!==a))},children:["Remove column ",a+1]})]},a)),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{type:"button",variant:"outline",disabled:m.length>=50,onClick:()=>{c(!0),p(e=>[...e,{key:"",type:"text",required:!1}])},children:"Add column"}),(0,t.jsx)(n.f,{type:"submit",children:y?"Saving…":"Save table"})]})]}),b?(0,t.jsx)("p",{className:"error",role:"alert",children:b}):void 0,w?(0,t.jsx)("p",{className:"notice",role:"status",children:w}):void 0]})}function x({table:e,row:l,onSaved:o,onCancel:c}){let h=(0,a.useId)(),{setDirty:v}=(0,d.useWorkspace)(),[m,p]=(0,a.useState)(()=>Object.fromEntries(e.columns.map(e=>[e.key,l?.values[e.key]===void 0||null===l.values[e.key]?"":(0,u.A)(l.values[e.key])]))),[y,f]=(0,a.useState)(!1),[b,j]=(0,a.useState)("");return(0,t.jsxs)("form",{className:"panel",onChange:()=>{v(!0)},onSubmit:t=>{t.preventDefault(),f(!0),j(""),(async()=>{try{let t=Object.fromEntries(e.columns.map(e=>{let t=m[e.key]??"";return""!==t||e.required?"boolean"===e.type?[e.key,"true"===t]:"number"===e.type?[e.key,Number(t)]:[e.key,t]:[e.key,null]})),a={table_revision:e.revision,values:t};l?await i.V.tables.updateRow.mutate({id:e.id,rowId:l.id,...a,revision:l.revision}):await i.V.tables.createRow.mutate({id:e.id,...a}),v(!1),await o()}catch(e){j((0,s.f)(e))}finally{f(!1)}})()},children:[(0,t.jsx)("h3",{children:l?"Edit row":"Add row"}),(0,t.jsxs)("fieldset",{disabled:y,className:"space-y-3",children:[e.columns.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:`${h}-${e.key}`,children:[e.key,e.required?" (required)":" (optional)"]}),"boolean"===e.type?(0,t.jsxs)("select",{id:`${h}-${e.key}`,required:e.required,value:m[e.key]??"",onChange:t=>{p(a=>({...a,[e.key]:t.target.value}))},children:[(0,t.jsx)("option",{value:"",children:"No value"}),(0,t.jsx)("option",{value:"true",children:"True"}),(0,t.jsx)("option",{value:"false",children:"False"})]}):(0,t.jsx)(r.f,{id:`${h}-${e.key}`,type:"text"===e.type?"text":e.type,required:e.required,step:"number"===e.type?"any":void 0,maxLength:"text"===e.type?1e4:void 0,value:m[e.key]??"",onChange:t=>{p(a=>({...a,[e.key]:t.target.value}))}})]},e.key)),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{type:"submit",children:y?"Saving…":"Save row"}),(0,t.jsx)(n.f,{type:"button",variant:"outline",onClick:c,children:"Cancel"})]})]}),b?(0,t.jsxs)("p",{className:"error",role:"alert",children:[b," After a conflict, cancel this edit, reload rows and definition, then reopen the row to reconcile your changes."]}):void 0]})}function m({table:e,refreshTables:r}){let{canManage:h,isDirty:p,setDirty:y}=(0,d.useWorkspace)(),f=(0,o.h)(),[b,j]=(0,a.useState)(1),[w,k]=(0,a.useState)(),[g,N]=(0,a.useState)(!1),[C,S]=(0,a.useState)(""),[q,A]=(0,a.useState)(!1),$=(0,a.useCallback)(async t=>{let a=await i.V.tables.listRows.query({id:e.id},{signal:t});return{...a,results:a.results.slice((b-1)*50,50*b),next:a.count>50*b}},[e.id,b]),T=(0,l.f)($);async function R(t){if(await f({title:"Delete this row?",description:"The saved values in this row will be permanently deleted.",actionLabel:"Delete row"})){A(!0),S("");try{await i.V.tables.deleteRow.mutate({id:e.id,rowId:t.id,revision:t.revision}),T.data?.results.length===1&&b>1?j(b-1):await T.refresh()}catch(e){S((0,s.f)(e))}finally{A(!1)}}}return(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsx)("h2",{children:e.name}),(0,t.jsx)(n.f,{disabled:q||void 0!==w||g,onClick:()=>{k("new")},children:"Add row"})]}),(0,t.jsx)(c.f,{...T}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:q,onClick:()=>{(async()=>{(!p||await f())&&(y(!1),k(void 0),N(!1),await T.refresh(),await r())})()},children:"Reload rows and definition"}),(0,t.jsxs)("span",{children:[T.data?.count??0," rows · Page ",b]})]}),T.data?.results.length===0?(0,t.jsx)("p",{children:"No rows on this page. Add a row to start collecting data."}):void 0,(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-left",children:[(0,t.jsxs)("caption",{className:"sr-only",children:["Rows in ",e.name]}),(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[e.columns.map(e=>(0,t.jsxs)("th",{className:"p-2",scope:"col",children:[e.key," ",(0,t.jsxs)("small",{children:["(",e.type,")"]})]},e.key)),(0,t.jsx)("th",{scope:"col",children:"Actions"})]})}),(0,t.jsx)("tbody",{children:T.data?.results.map(a=>(0,t.jsxs)("tr",{className:"border-t",children:[e.columns.map(e=>(0,t.jsx)("td",{className:"max-w-72 break-words p-2",children:void 0===a.values[e.key]||null===a.values[e.key]?"—":(0,u.A)(a.values[e.key])},e.key)),(0,t.jsx)("td",{children:(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:q||void 0!==w||g,onClick:()=>{k(a)},children:"Edit row"}),(0,t.jsx)(n.f,{variant:"destructive",disabled:q,onClick:()=>{R(a)},children:"Delete row"})]})})]},a.id))})]})}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:1===b||void 0!==w,onClick:()=>{j(b-1)},children:"Previous rows"}),(0,t.jsx)(n.f,{variant:"outline",disabled:!T.data?.next||void 0!==w,onClick:()=>{j(b+1)},children:"Next rows"})]}),void 0===w?void 0:(0,t.jsx)(x,{table:e,..."new"===w?{}:{row:w},onCancel:()=>{(async()=>{(!p||await f())&&(y(!1),k(void 0))})()},onSaved:async()=>{k(void 0),await T.refresh()}},"new"===w?"new":w.id),C?(0,t.jsx)("p",{className:"error",role:"alert",children:C}):void 0,h?(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:void 0!==w,onClick:()=>{(async()=>{(!g||!p||await f())&&(y(!1),N(!g))})()},children:g?"Close definition editor":"Edit table definition"}),g?(0,t.jsx)(v,{table:e,onSaved:r}):void 0]}):(0,t.jsx)("p",{className:"small",children:"Owners and admins manage table definitions. Members can edit rows."})]})}e.s(["Tables",0,function(){let{canManage:e,isDirty:r,setDirty:u}=(0,d.useWorkspace)();(0,a.useEffect)(()=>()=>{u(!1)},[u]);let h=(0,o.h)(),[x,p]=(0,a.useState)(1),[y,f]=(0,a.useState)(""),[b,j]=(0,a.useState)(""),[w,k]=(0,a.useState)(!1),g=(0,a.useCallback)(async e=>{let t=await i.V.tables.list.query(void 0,{signal:e});return{...t,results:t.results.slice((x-1)*50,50*x),next:t.count>50*x}},[x]),N=(0,l.f)(g),C=N.data?.results.find(e=>e.id===y);async function S(){if(C&&await h({title:`Delete ${C.name}?`,description:"This permanently deletes the table definition and every row in this table.",actionLabel:"Delete table"})){k(!0),j("");try{await i.V.tables.delete.mutate({id:C.id,revision:C.revision}),u(!1),f(""),N.data?.results.length===1&&x>1?p(x-1):await N.refresh()}catch(e){j((0,s.f)(e))}finally{k(!1)}}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Workspace tables"}),(0,t.jsx)("p",{children:"Store shared records in tables with text, number, boolean and date columns."}),(0,t.jsx)(c.f,{...N}),N.isLoading||N.data?.count!==0?void 0:(0,t.jsx)("p",{children:"No tables yet. A workspace owner or admin can create your first table below."}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"workspace-table",children:"Table"}),(0,t.jsxs)("select",{id:"workspace-table",value:C?.id??"",disabled:w,onChange:e=>{let t=e.target.value;(async()=>{(!r||await h())&&(u(!1),f(t))})()},children:[(0,t.jsx)("option",{value:"",children:"Choose a table"}),N.data?.results.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:1===x||w||r,onClick:()=>{f(""),p(x-1)},children:"Previous tables"}),(0,t.jsxs)("span",{children:["Page ",x]}),(0,t.jsx)(n.f,{variant:"outline",disabled:!N.data?.next||w||r,onClick:()=>{f(""),p(x+1)},children:"Next tables"}),e&&C?(0,t.jsx)(n.f,{variant:"destructive",disabled:w,onClick:()=>{S()},children:"Delete table"}):void 0]}),b?(0,t.jsx)("p",{className:"error",role:"alert",children:b}):void 0]}),C?(0,t.jsx)(m,{table:C,refreshTables:N.refresh},`${C.id}:${String(C.revision)}`):void 0,e&&!C?(0,t.jsx)("section",{className:"panel",children:(0,t.jsx)(v,{onSaved:N.refresh})}):void 0]})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var s=e.i(56420);let i={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],11241)},51757,e=>{"use strict";var s=e.i(56420);let i={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],51757)},62368,e=>{"use strict";var s=e.i(56420);let i={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],62368)},26091,e=>{"use strict";var s=e.i(56420);let i={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],26091)},95925,29272,e=>{"use strict";var s=e.i(56420);let i={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],95925);let a={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};a.node;let r=(0,s.f)(a);e.s(["f",0,r],29272)},66595,e=>{"use strict";var s=e.i(56420);let i={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],66595)},40192,54105,19877,e=>{"use strict";var s=e.i(22219);e.s(["z",0,s],40192),e.s(["z",0,s],54105),e.s(["z",0,s],19877)},13581,29487,e=>{"use strict";var s=e.i(71645),i=e.i(95813);e.s(["f",0,function(e,t=0){let[a,r]=(0,s.useState)(),[n,l]=(0,s.useState)(""),[c,d]=(0,s.useState)(!0),o=(0,s.useRef)(void 0),u=(0,s.useRef)(!1),h=(0,s.useCallback)(async()=>{o.current?.abort();let s=new AbortController;o.current=s;try{let i=await e(s.signal);if(s.signal.aborted||!u.current)return;r(i),l("")}catch(e){!s.signal.aborted&&u.current&&l((0,i.f)(e))}finally{!s.signal.aborted&&u.current&&d(!1)}},[e]);return(0,s.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=t>0?setInterval(()=>{h()},t):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,t]),{data:a,error:n,isLoading:c,refresh:h}}],13581);var t=e.i(18050),a=e.i(19455);e.s(["f",0,function({isLoading:e,error:s,refresh:i}){return(0,t.jsxs)(t.Fragment,{children:[e?(0,t.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,s?(0,t.jsxs)("div",{className:"error",role:"alert",children:[(0,t.jsx)("p",{children:s}),(0,t.jsx)(a.f,{variant:"outline",onClick:()=>{i()},children:"Try again"})]}):void 0]})}],29487)},39372,e=>{"use strict";var s=e.i(18050),i=e.i(62368),t=e.i(26091),a=e.i(66595),r=e.i(71645),n=e.i(13581),l=e.i(15080),c=e.i(19455),d=e.i(93479),o=e.i(85951),u=e.i(29487),h=e.i(36174);function p({openRun:e}){let x=(0,n.f)(l.K),[j,f]=(0,r.useState)(""),[m,v]=(0,r.useState)(""),y=x.data?.filter(e=>e.name.toLowerCase().includes(j.toLowerCase()))??[],g=x.data?.find(e=>e.id===m);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsx)("h2",{children:"Saved artifacts"}),(0,s.jsxs)("span",{className:"badge",children:[x.data?.length??0," files"]})]}),(0,s.jsx)("p",{className:"small",children:"Markdown, JSON and text produced by your projects and actions."}),(0,s.jsxs)("label",{className:"search-field",children:[(0,s.jsx)(a.f,{size:15}),(0,s.jsx)(d.f,{"aria-label":"Search artifacts",value:j,placeholder:"Search files…",onChange:e=>{f(e.target.value)}})]}),(0,s.jsx)(u.f,{...x}),x.isLoading||0!==y.length?void 0:(0,s.jsxs)("div",{className:"resource-empty",children:[(0,s.jsx)(t.f,{size:30}),(0,s.jsx)("h3",{children:"No artifacts found"}),(0,s.jsx)("p",{children:"Files saved during runs appear here."})]}),y.map(e=>(0,s.jsxs)("div",{className:"resource-row",children:[(0,s.jsx)(t.f,{size:18}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:e.name}),(0,s.jsxs)("small",{children:[e.media_type," · ",new Blob([e.content]).size," bytes"]})]}),(0,s.jsx)(c.f,{variant:"outline",size:"sm",onClick:()=>{v(e.id)},children:"Open"})]},e.id))]}),g?(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsx)("h2",{children:g.name}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(c.f,{variant:"outline",onClick:()=>{e(g.run)},children:"View producing run"}),(0,s.jsxs)(c.f,{onClick:()=>{(0,h.t)(g)},children:[(0,s.jsx)(i.f,{size:14}),"Download"]})]})]}),g.media_type.includes("markdown")||g.name.endsWith(".md")?(0,s.jsx)(o.f,{content:g.content}):(0,s.jsx)("pre",{children:g.content})]}):void 0]})}var x=e.i(94757);e.s(["default",0,function(){let{openRun:e}=(0,x.useWorkspace)();return(0,s.jsx)(p,{openRun:e})}],39372)},24687,e=>{"use strict";var s=e.i(18050),i=e.i(71645),t=e.i(39689);let a=i.forwardRef(({className:e,...i},a)=>(0,s.jsx)("textarea",{className:(0,t.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...i}));a.displayName="Textarea",e.s(["f",0,a])},12102,e=>{"use strict";var s=e.i(40192),i=e.i(54105),t=e.i(19877),a=e.i(22219),a=a;let r=s.z.record(i.z.string(),t.z.json());e.s(["z",0,function(e){let s=JSON.parse(e);return a.array(r).min(1).max(50).parse(s)},"J",0,function(e){let s=JSON.parse(e);return r.parse(s)}],12102)},44555,e=>{"use strict";var s=e.i(18050),i=e.i(56420);let t={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};t.node;let a=(0,i.f)(t);var r=e.i(71645),n=e.i(73656),l=e.i(95813),c=e.i(13581),d=e.i(15080),o=e.i(19455),u=e.i(29487);e.s(["f",0,function({runId:e,openRun:i}){let t=(0,c.f)(d.i,5e3),[h,p]=(0,r.useState)(""),[x,j]=(0,r.useState)(""),f=t.data?.filter(s=>"pending"===s.status&&(!e||s.run===e))??[],m=async(e,s)=>{p(e),j("");try{await n.V.approvals.decide.mutate({id:e,decision:s}),await t.refresh()}catch(e){j((0,l.f)(e))}finally{p("")}};return(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsxs)("h2",{children:[(0,s.jsx)(a,{size:18})," ",e?"Run approvals":"Approval queue"]}),(0,s.jsxs)("span",{className:"badge",children:[f.length," pending"]})]}),(0,s.jsx)(u.f,{...t}),x?(0,s.jsx)("p",{className:"error",role:"alert",children:x}):void 0,t.isLoading||0!==f.length?void 0:(0,s.jsxs)("div",{className:"resource-empty",children:[(0,s.jsx)(a,{size:28}),(0,s.jsx)("h3",{children:"All caught up"}),(0,s.jsx)("p",{children:"No decisions are waiting for you."})]}),f.map(e=>(0,s.jsxs)("article",{className:"approval-card",children:[(0,s.jsx)("span",{className:"eyebrow",children:"Human approval required"}),(0,s.jsx)("p",{className:"approval-prompt",children:e.prompt}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(o.f,{disabled:!!h,onClick:()=>{m(e.id,"approved")},children:h===e.id?"Saving decision…":"Approve"}),(0,s.jsx)(o.f,{variant:"outline",disabled:!!h,onClick:()=>{m(e.id,"denied")},children:"Deny"}),i?(0,s.jsx)(o.f,{variant:"ghost",onClick:()=>{i(e.run)},children:"Inspect run"}):void 0]})]},e.id))]})}],44555)},36174,e=>{"use strict";var s=e.i(18050),i=e.i(11241),t=e.i(62368),a=e.i(95925),r=e.i(29272),n=e.i(71645),l=e.i(73656),c=e.i(95813),d=e.i(13581),o=e.i(15080),u=e.i(19455),h=e.i(85951),p=e.i(10505),x=e.i(29487),j=e.i(90409),f=e.i(59241),m=e.i(12102),v=e.i(75016),y=e.i(93479),g=e.i(24687);function k({id:e}){let[i,t]=(0,n.useState)(""),[a,r]=(0,n.useState)('{"type":"object"}'),[d,o]=(0,n.useState)("{}"),[h,p]=(0,n.useState)(!1),[x,j]=(0,n.useState)(""),[f,b]=(0,n.useState)(""),[w,N]=(0,n.useState)("");async function z(){p(!0),N(""),j("");try{let s=await l.V.runs.promote.mutate({id:e,name:i.trim(),input_schema:(0,m.J)(a),output_schema:(0,m.J)(d)});b(s.action),j(`Saved exact run source as version ${String(s.version.number)} of ${i.trim()} (action ${s.action}).`)}catch(e){N((0,c.f)(e))}finally{p(!1)}}return(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Promote accepted source to a saved action"}),(0,s.jsx)("p",{children:"The server copies this run’s exact source and SDK provenance. Run inputs remain examples and are not saved as defaults."}),(0,s.jsxs)("label",{children:["New action name",(0,s.jsx)(y.f,{value:i,disabled:h,onChange:e=>{t(e.target.value)}})]}),(0,s.jsxs)("label",{children:["Input schema (JSON)",(0,s.jsx)(g.f,{className:"code",value:a,disabled:h,onChange:e=>{r(e.target.value)}})]}),(0,s.jsxs)("label",{children:["Output schema (JSON)",(0,s.jsx)(g.f,{className:"code",value:d,disabled:h,onChange:e=>{o(e.target.value)}})]}),(0,s.jsx)(u.f,{disabled:h||!i.trim(),onClick:()=>{z()},children:"Promote exact source"}),w?(0,s.jsx)("p",{role:"alert",className:"error",children:w}):null,x?(0,s.jsx)("p",{role:"status",children:x}):null,f?(0,s.jsx)(v.f,{href:`/actions/?action=${encodeURIComponent(f)}`,children:"Open saved action"}):null]})}var b=e.i(44555);function w(e){let s=new Blob([e.content],{type:e.media_type}),i=URL.createObjectURL(s),t=document.createElement("a");t.href=i,t.download=e.name,t.click(),URL.revokeObjectURL(i)}function N({run:e,hasCheckReport:i}){return i?(0,s.jsx)(f.f,{output:e.output}):"succeeded"!==e.status?(0,s.jsx)("p",{children:p.B.includes(e.status)?"This run is still in progress. Its result will appear here.":`This run ${e.status}. Review the trace before retrying.`}):"chat"===e.operation?(0,s.jsx)(h.f,{content:(0,p.A)(e.output)}):(0,s.jsx)("pre",{children:(0,p.A)(e.output)||"Completed without output."})}let z={session:"Session result",test:"Mocked test results",validate:"Semantic validation diagnostics"};e.s(["T",0,function({id:e,projects:h,back:f,openRun:m}){let v=(0,j.f)(e),y=(0,d.f)(o.K),[g,A]=(0,n.useState)(!1),[C,S]=(0,n.useState)(""),_=v.data?.run,O=void 0!==_&&("test"===_.operation||"validate"===_.operation)&&null!==_.output&&"object"==typeof _.output&&Object.hasOwn(_.output,"result"),R=async s=>{A(!0),S("");try{if("cancel"===s)await l.V.runs.cancel.mutate({id:e});else{let s=await l.V.runs.retry.mutate({id:e,idempotency_key:crypto.randomUUID()});m(s.id)}await v.refresh()}catch(e){S((0,c.f)(e))}finally{A(!1)}};return(0,s.jsxs)("div",{className:"run-detail",children:[(0,s.jsxs)(u.f,{variant:"ghost",onClick:f,children:[(0,s.jsx)(i.f,{size:14})," All runs"]}),(0,s.jsx)(x.f,{...v}),C?(0,s.jsx)("p",{className:"error",role:"alert",children:C}):void 0,_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"eyebrow",children:["RUN ",_.id.slice(0,8)]}),(0,s.jsxs)("h2",{children:[h.find(e=>e.id===_.project)?.name??"Project"," ","· ",(0,p.T)(_.operation)]})]}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(p.k,{status:_.status}),p.B.includes(_.status)?(0,s.jsxs)(u.f,{variant:"outline",disabled:g||_.cancel_requested,onClick:()=>{R("cancel")},children:[(0,s.jsx)(r.f,{size:13}),_.cancel_requested?"Cancellation requested":"Cancel run"]}):void 0,["action","code","validate","test"].includes(_.operation)&&["failed","interrupted","cancelled"].includes(_.status)?(0,s.jsxs)(u.f,{variant:"outline",disabled:g,onClick:()=>{R("retry")},children:[(0,s.jsx)(a.f,{size:13})," Retry run"]}):void 0]})]}),(0,s.jsxs)("p",{className:"small",children:["Created ",new Date(_.created_at).toLocaleString()," · Updated"," ",new Date(_.updated_at).toLocaleString()]}),_.retry_of?(0,s.jsx)(u.f,{variant:"link",onClick:()=>{m(_.retry_of??"")},children:"View original run"}):void 0,_.error?(0,s.jsx)("div",{className:"error",role:"alert",children:_.error}):void 0,(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{children:"Origin"}),(0,s.jsxs)("dd",{children:[_.origin," ",_.origin_reference]}),(0,s.jsx)("dt",{children:"Originating client"}),(0,s.jsx)("dd",{children:_.client_token??"No client token (historical attribution may be unknown)"}),(0,s.jsx)("dt",{children:"SDK revision"}),(0,s.jsx)("dd",{children:(0,p.A)(_.sdk_revision)||"Unknown"}),(0,s.jsx)("dt",{children:"Configuration revision"}),(0,s.jsx)("dd",{children:(0,p.A)(_.configuration_revision)||"Unknown"}),(0,s.jsx)("dt",{children:"Immutable action version"}),(0,s.jsx)("dd",{children:_.action_version??"One-off source / none"}),(0,s.jsx)("dt",{children:"Source digest"}),(0,s.jsx)("dd",{children:(0,p.A)(_.source_digest)||"Unknown"})]}),null===_.source?null:(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Accepted source"}),(0,s.jsx)("pre",{children:(0,p.A)(_.source)})]}),"code"===_.operation&&null!==_.source?(0,s.jsx)(k,{id:_.id},_.id):null,(0,s.jsx)("h3",{children:z[_.operation]??"Outcome"}),(0,s.jsx)(N,{run:_,hasCheckReport:O}),(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Run inputs"}),(0,s.jsx)("pre",{children:(0,p.A)(_.inputs)})]})]}),"waiting_approval"===_.status?(0,s.jsx)(b.f,{runId:e}):void 0,(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Artifacts"}),(0,s.jsx)(x.f,{...y}),y.data?.filter(s=>s.run===e).length===0?(0,s.jsx)("p",{className:"small",children:"No artifacts were saved by this run."}):void 0,y.data?.filter(s=>s.run===e).map(e=>(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:e.name}),(0,s.jsxs)(u.f,{variant:"outline",size:"sm",onClick:()=>{w(e)},children:[(0,s.jsx)(t.f,{size:13}),"Download"]}),(0,s.jsx)("pre",{children:e.content})]},e.id))]}),"session"===_.operation?null:(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Execution trace"}),v.data?.events.length===0?(0,s.jsx)("p",{className:"small",children:"Waiting for the first execution event."}):void 0,(0,s.jsx)("ol",{className:"run-timeline",children:v.data?.events.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)("span",{className:"timeline-dot"}),(0,s.jsxs)("details",{children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)("strong",{children:e.kind.replaceAll("."," ")}),(0,s.jsx)("time",{children:new Date(e.created_at).toLocaleTimeString()})]}),(0,s.jsx)("pre",{children:(0,p.A)(e.data)})]})]},e.sequence))})]})]}):void 0]})},"t",0,w],36174)},10505,79432,e=>{"use strict";var s=e.i(18050),i=e.i(56420);let t={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};t.node;let a=(0,i.f)(t);e.s(["f",0,a],79432);var r=e.i(51757);let n={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};n.node;let l=(0,i.f)(n),c={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};c.node;let d=(0,i.f)(c),o={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};o.node;let u=(0,i.f)(o);function h(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let i={succeeded:r.f,waiting_approval:d,running:a,queued:l,failed:u,cancelled:u,interrupted:u}[e]??l;return(0,s.jsxs)("span",{className:`run-status status-${e}`,children:[(0,s.jsx)(i,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,s){let i=s.find(s=>s.id===e.project)?.name??"Project";return"chat"===e.operation?`${i} \xb7 ${(function(e,s){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,s)){let i=Reflect.get(e,s);if("string"==typeof i)return i}return""})(e.inputs,"message").slice(0,70)}`:`${i} \xb7 ${h(e.operation)}`},"T",0,h],10505)},90409,59241,e=>{"use strict";var s=e.i(71645),i=e.i(73656),t=e.i(13581);e.s(["f",0,function(e){let a=(0,s.useCallback)(async s=>{let[t,a]=await Promise.all([i.V.runs.get.query({id:e},{signal:s}),i.V.runs.events.query({id:e},{signal:s})]);return{run:t,events:a}},[e]),r=(0,t.f)(a,3e3),n=r.data?.run.id===e?r.data:void 0,l=void 0!==n,{refresh:c}=r;return(0,s.useEffect)(()=>{if(l)return function(e,s,t=i.V.runs.stream.subscribe){let a,r=!0,n=()=>{r&&!a&&(a=setTimeout(()=>{a=void 0,r&&s()},400))},l=t({id:e},{onData:n,onComplete(){r&&(clearTimeout(a),a=void 0,s())},onError:n});return()=>{r=!1,clearTimeout(a),l.unsubscribe()}}(e,c)},[e,l,c]),{...r,data:n}}],90409);var a=e.i(18050),r=e.i(10505);function n(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}e.s(["f",0,function({output:e}){let s=n(e),i=n(s?.result)??s;if(!i)return null;let t=n(i.validation)??i,l=Array.isArray(t.diagnostics)?t.diagnostics:[],c=Array.isArray(i.cases)?i.cases:[];return(0,a.jsxs)("div",{children:["boolean"==typeof t.valid?(0,a.jsx)("p",{children:t.valid?"Source passed semantic validation.":"Source failed semantic validation."}):null,l.length>0?(0,a.jsx)("ul",{children:l.map((e,s)=>{let i=n(e);return(0,a.jsxs)("li",{children:["Line ",(0,r.A)(i?.line),", column"," ",(0,r.A)(i?.column),":"," ",(0,r.A)(i?.message)]},s)})}):null,c.length>0?(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"Case"}),(0,a.jsx)("th",{children:"Result"}),(0,a.jsx)("th",{children:"Details"})]})}),(0,a.jsx)("tbody",{children:c.map((e,s)=>{let i=n(e);return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,r.A)(i?.name)}),(0,a.jsx)("td",{children:i?.passed===!0?"Passed":"Failed"}),(0,a.jsxs)("td",{children:["string"==typeof i?.error&&""!==i.error?(0,a.jsx)("p",{children:i.error}):null,Array.isArray(i?.violations)?(0,a.jsx)("pre",{children:(0,r.A)(i.violations)}):null,(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:"Actual output and logs"}),(0,a.jsx)("pre",{children:(0,r.A)(i?.actual)}),(0,a.jsx)("pre",{children:(0,r.A)(i?.logs)})]})]})]},s)})})]}):null]})}],59241)}]);
|
|
@@ -394,7 +394,7 @@ function deleteTableRow(tableId: string, rowId: string, revision: number): Promi
|
|
|
394
394
|
function listDocuments(offset?: number, limit?: number): Promise<unknown>;
|
|
395
395
|
function readDocument(documentId: string): Promise<unknown>;
|
|
396
396
|
function writeDocument(documentId: string, title: string, content: string): Promise<unknown>;
|
|
397
|
-
`,eo=new Set([...ea.matchAll(/(?:const|function) (\w+)/g)].map(e=>e[1]));for(let e of["delegate","saveMemory","reportOutcome","eval","arguments"])eo.add(e);function es(e){return null===e||"object"!=typeof e||Array.isArray(e)?void 0:e}function el(e){return!("string"!=typeof e||e.length>100||!ei.test(e)||er.has(e))&&ee.default.createScanner(ee.default.ScriptTarget.Latest,!1,ee.default.LanguageVariant.Standard,e).scan()===ee.default.SyntaxKind.Identifier}function ec(e){if("string"!=typeof e||e.length>1e3)return"unknown";let t=ee.default.createSourceFile("type.ts",`type MetadataType = ${e};`,ee.default.ScriptTarget.Latest,!0),n=t.statements[0];return 1===t.statements.length&&n&&ee.default.isTypeAliasDeclaration(n)&&!t.parseDiagnostics.length?function e(t,n=0){if(n>8)return"unknown";let r=new Map([[ee.default.SyntaxKind.StringKeyword,"string"],[ee.default.SyntaxKind.NumberKeyword,"number"],[ee.default.SyntaxKind.BooleanKeyword,"boolean"],[ee.default.SyntaxKind.UnknownKeyword,"unknown"],[ee.default.SyntaxKind.VoidKeyword,"void"],[ee.default.SyntaxKind.ObjectKeyword,"object"],[ee.default.SyntaxKind.NeverKeyword,"never"]]).get(t.kind);if(r)return r;if(ee.default.isArrayTypeNode(t))return`Array<${e(t.elementType,n+1)}>`;if(ee.default.isParenthesizedTypeNode(t))return`(${e(t.type,n+1)})`;if(ee.default.isUnionTypeNode(t)&&t.types.length<=20)return t.types.map(t=>e(t,n+1)).join(" | ");if(ee.default.isLiteralTypeNode(t)){if(ee.default.isStringLiteral(t.literal))return JSON.stringify(t.literal.text);if(ee.default.isNumericLiteral(t.literal))return t.literal.text;if([ee.default.SyntaxKind.NullKeyword,ee.default.SyntaxKind.TrueKeyword,ee.default.SyntaxKind.FalseKeyword].includes(t.literal.kind))return t.literal.getText()}if(ee.default.isTypeReferenceNode(t)&&ee.default.isIdentifier(t.typeName)){let r=t.typeName.text;if(["Promise","Array","ReadonlyArray"].includes(r)&&t.typeArguments?.length===1&&void 0!==t.typeArguments[0])return`${r}<${e(t.typeArguments[0],n+1)}>`;if("Record"===r&&t.typeArguments?.length===2&&void 0!==t.typeArguments[1]&&t.typeArguments[0]?.kind===ee.default.SyntaxKind.StringKeyword)return`Record<string, ${e(t.typeArguments[1],n+1)}>`}if(ee.default.isTypeLiteralNode(t)&&t.members.length<=30){let r=[];for(let i of t.members){if(!ee.default.isPropertySignature(i)||!i.type||!i.name||!ee.default.isIdentifier(i.name)||!el(i.name.text))return"unknown";r.push(`${i.name.text}${i.questionToken?"?":""}: ${e(i.type,n+1)}`)}return`{${r.join("; ")}}`}return"unknown"}(n.type):"unknown"}var e_=e.i(39625);let ed={moduleDetection:3,lib:["lib.esnext.d.ts"],allowNonTsExtensions:!0,noEmit:!0,skipLibCheck:!0,strict:!1};e.s(["configureMonaco",0,function(){Z({paths:{vs:new URL("/monaco/vs",location.origin).href}})},"default",0,function({value:e,onChange:t,readOnly:n,actionId:i,theme:a="vs-dark",height:o="440px",projectId:s}){let l=(0,R.useRef)(""),c=(0,R.useRef)(void 0),_=(0,R.useRef)(void 0),[d,u]=(0,R.useState)(),p=d&&d.project===s?d.sdk:"",f=d&&d.project===s?d.error:"";return(0,R.useEffect)(()=>{let e=new AbortController;return s&&(async()=>{try{let t=await Q.
|
|
397
|
+
`,eo=new Set([...ea.matchAll(/(?:const|function) (\w+)/g)].map(e=>e[1]));for(let e of["delegate","saveMemory","reportOutcome","eval","arguments"])eo.add(e);function es(e){return null===e||"object"!=typeof e||Array.isArray(e)?void 0:e}function el(e){return!("string"!=typeof e||e.length>100||!ei.test(e)||er.has(e))&&ee.default.createScanner(ee.default.ScriptTarget.Latest,!1,ee.default.LanguageVariant.Standard,e).scan()===ee.default.SyntaxKind.Identifier}function ec(e){if("string"!=typeof e||e.length>1e3)return"unknown";let t=ee.default.createSourceFile("type.ts",`type MetadataType = ${e};`,ee.default.ScriptTarget.Latest,!0),n=t.statements[0];return 1===t.statements.length&&n&&ee.default.isTypeAliasDeclaration(n)&&!t.parseDiagnostics.length?function e(t,n=0){if(n>8)return"unknown";let r=new Map([[ee.default.SyntaxKind.StringKeyword,"string"],[ee.default.SyntaxKind.NumberKeyword,"number"],[ee.default.SyntaxKind.BooleanKeyword,"boolean"],[ee.default.SyntaxKind.UnknownKeyword,"unknown"],[ee.default.SyntaxKind.VoidKeyword,"void"],[ee.default.SyntaxKind.ObjectKeyword,"object"],[ee.default.SyntaxKind.NeverKeyword,"never"]]).get(t.kind);if(r)return r;if(ee.default.isArrayTypeNode(t))return`Array<${e(t.elementType,n+1)}>`;if(ee.default.isParenthesizedTypeNode(t))return`(${e(t.type,n+1)})`;if(ee.default.isUnionTypeNode(t)&&t.types.length<=20)return t.types.map(t=>e(t,n+1)).join(" | ");if(ee.default.isLiteralTypeNode(t)){if(ee.default.isStringLiteral(t.literal))return JSON.stringify(t.literal.text);if(ee.default.isNumericLiteral(t.literal))return t.literal.text;if([ee.default.SyntaxKind.NullKeyword,ee.default.SyntaxKind.TrueKeyword,ee.default.SyntaxKind.FalseKeyword].includes(t.literal.kind))return t.literal.getText()}if(ee.default.isTypeReferenceNode(t)&&ee.default.isIdentifier(t.typeName)){let r=t.typeName.text;if(["Promise","Array","ReadonlyArray"].includes(r)&&t.typeArguments?.length===1&&void 0!==t.typeArguments[0])return`${r}<${e(t.typeArguments[0],n+1)}>`;if("Record"===r&&t.typeArguments?.length===2&&void 0!==t.typeArguments[1]&&t.typeArguments[0]?.kind===ee.default.SyntaxKind.StringKeyword)return`Record<string, ${e(t.typeArguments[1],n+1)}>`}if(ee.default.isTypeLiteralNode(t)&&t.members.length<=30){let r=[];for(let i of t.members){if(!ee.default.isPropertySignature(i)||!i.type||!i.name||!ee.default.isIdentifier(i.name)||!el(i.name.text))return"unknown";r.push(`${i.name.text}${i.questionToken?"?":""}: ${e(i.type,n+1)}`)}return`{${r.join("; ")}}`}return"unknown"}(n.type):"unknown"}var e_=e.i(39625);let ed={moduleDetection:3,lib:["lib.esnext.d.ts"],allowNonTsExtensions:!0,noEmit:!0,skipLibCheck:!0,strict:!1};e.s(["configureMonaco",0,function(){Z({paths:{vs:new URL("/monaco/vs",location.origin).href}})},"default",0,function({value:e,onChange:t,readOnly:n,actionId:i,theme:a="vs-dark",height:o="440px",projectId:s}){let l=(0,R.useRef)(""),c=(0,R.useRef)(void 0),_=(0,R.useRef)(void 0),[d,u]=(0,R.useState)(),p=d&&d.project===s?d.sdk:"",f=d&&d.project===s?d.error:"";return(0,R.useEffect)(()=>{let e=new AbortController;return s&&(async()=>{try{let t=await Q.V.projects.sdk.query({id:s},{signal:e.signal});e.signal.aborted||u({project:s,sdk:function(e){let t=es(e)?.plugins,n=[],r=new Set;if(Array.isArray(t))for(let e of t.slice(0,100)){let t=es(e);if(!t)continue;let i=function(e){let t=e.namespace;if(!0!==e.available||!el(t)||en.has(t)||eo.has(t))return;let n=`const ${t}: Readonly<Record<string, (...args: unknown[]) => Promise<unknown>>>;`;if(!0!==e.metadata_complete||!Array.isArray(e.tools)||e.tools.length>1e3)return n;let r=new Set,i=[];for(let t of e.tools){let a=es(t);if(!a||!el(a.name)||r.has(a.name)||!Array.isArray(a.parameters)||a.parameters.length>30)return n;if(r.add(a.name),"mcp"===e.kind&&a.inputSchema){i.push(`${a.name}(args: ${et(a.inputSchema)}): Promise<{content?: Array<unknown>; structuredContent?: ${et(a.outputSchema)}; [key: string]: unknown}>`);continue}let o="named"===a.calling,s=[],l=new Set,c=!1,_=!1;for(let e of a.parameters){let t=es(e);if(!t||!el(t.name)||l.has(t.name))return n;l.add(t.name);let r=!0===t.optional;if(!o&&c&&!r)return n;c||=r,_||=!r,s.push(`${t.name}${r?"?":""}: ${ec(t.type)}`)}let d=ec(a.returnType??a.returns),u=d.startsWith("Promise<")?d:`Promise<${d}>`,p=s.join(", ");o&&(p=s.length?`args${_?"":"?"}: {${s.join("; ")}}`:"args?: Record<string, never>"),i.push(`${a.name}(${p}): ${u}`)}return`const ${t}: Readonly<{${i.join("; ")}}>;`}(t);if(!i)continue;let a=t.namespace;if(r.has(a))throw Error("Duplicate plugin namespace metadata");if(r.add(a),n.push(i),n.join("\n").length>15e4)throw Error("SDK declarations exceed the supported size")}return`export {};
|
|
398
398
|
declare global {
|
|
399
399
|
${ea}
|
|
400
400
|
${n.join("\n")}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76046,t=>{"use strict";t.i(44362);var e=t.i(14778);t.s(["k",0,function(){location.assign(function(t){let e=new URLSearchParams(t).get("next");if(!e||!e.startsWith("/")||e.startsWith("//")||e.includes("\\"))return"/";for(let t of e)if((t.codePointAt(0)??0)<=32)return"/";let n=new URL(e,location.origin);return n.origin===location.origin?`${n.pathname}${n.search}${n.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(t){return(0,e.f)(t)&&t.data?.code==="UNAUTHORIZED"},"y",0,function(){let t=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(t)}`)},"u",0,function(t){return!t.is_authenticated&&t.flows.some(t=>"mfa_authenticate"===t.id)}])},95813,t=>{"use strict";t.s(["f",0,function(t,e="The request failed. Please try again."){return t instanceof Error?t.message:e}])},86441,t=>{"use strict";var e=t.i(18050),n=t.i(22016),r=t.i(73656),a=t.i(71645),i=t.i(92229),s=t.i(18879),o=t.i(11105);function c(){let t=(0,r.S)("/accounts/email/");return t.startsWith("https:")||t.startsWith("http:")?(0,e.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",children:"Confirm your identity on your installation, then retry."}):(0,e.jsxs)("details",{open:!0,className:"mt-6 border-t border-slate-200 pt-4",children:[(0,e.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Confirm your identity"}),(0,e.jsxs)("p",{className:"text-sm",children:["Session expired? ",(0,e.jsx)(n.default,{href:"/accounts/login/",children:"Sign in again"}),"."]}),(0,e.jsx)("p",{className:"text-sm",children:"If a security change asks you to confirm your identity, enter your password or an authenticator code, then retry the change."}),(0,e.jsx)(o.F,{submitLabel:"Confirm password",onSubmit:async t=>(await r.V.auth.reauthenticate.mutate({password:(0,s.f)(t,"password")}),"Identity confirmed. Retry your change."),children:(0,e.jsx)(o.j,{label:"Password",type:"password",name:"password",autoComplete:"current-password",required:!0})}),(0,e.jsx)("div",{className:"mt-5",children:(0,e.jsx)(o.F,{submitLabel:"Confirm code",onSubmit:async t=>(await r.V.auth.mfaReauthenticate.mutate({code:(0,s.f)(t,"code")}),"Identity confirmed. Retry your change."),children:(0,e.jsx)(o.j,{label:"Authenticator or recovery code",name:"code",autoComplete:"one-time-code",required:!0})})})]})}t.s(["f",0,function({children:t}){let[s,o]=(0,a.useState)(),[l,u]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let t=new AbortController;return(0,r.m)(t.signal).then(e=>{t.signal.aborted||o(e)}).catch(()=>{t.signal.aborted||u(!0)}),()=>{t.abort()}},[]);let[d,h]=(0,a.useState)(!1);return l?(0,e.jsx)("p",{role:"alert",children:"Unable to load your account. Reload to try again."}):s?s.is_authenticated?(0,e.jsxs)(i.T,{value:()=>{h(!0)},children:[t,d&&(0,e.jsx)(c,{})]}):(0,e.jsxs)("p",{children:["Please ",(0,e.jsx)(n.default,{href:"/accounts/login/",children:"sign in"})," to manage your account."]}):(0,e.jsx)("p",{role:"status",children:"Loading your account…"})}],86441)},11105,92229,t=>{"use strict";var e=t.i(18050),n=t.i(71645),r=t.i(76046),a=t.i(95813);let i=(0,n.createContext)(void 0);function s(){let t=(0,n.useContext)(i);return(e,n)=>t&&(0,r.$)(e)?(t(),r.z):(0,a.f)(e,n)}t.s(["T",0,i,"G",0,s],92229);var o=t.i(19455),c=t.i(93479);t.s(["j",0,function({label:t,...n}){return(0,e.jsxs)("label",{children:[t,(0,e.jsx)(c.f,{...n})]})},"F",0,function({children:t,submitLabel:r,onSubmit:a}){let i=s(),[c,l]=(0,n.useState)(!1),[u,d]=(0,n.useState)(""),[h,f]=(0,n.useState)("");async function m(t){t.preventDefault();let e=new FormData(t.currentTarget);l(!0),d(""),f("");try{f(await a(e)??"")}catch(t){d(i(t,"Unable to save. Please try again."))}finally{l(!1)}}return(0,e.jsxs)("form",{onSubmit:t=>{m(t)},children:[(0,e.jsxs)("fieldset",{disabled:c,className:"min-w-0 border-0 p-0",children:[t,(0,e.jsx)(o.f,{type:"submit",disabled:c,children:c?"Please wait…":r})]}),u&&(0,e.jsx)("p",{role:"alert",className:"error mt-4",children:u}),h&&(0,e.jsx)("p",{role:"status",className:"notice mt-4",children:h})]})}],11105)},42498,t=>{"use strict";var e=t.i(18050),n=t.i(76046),r=t.i(73656),a=t.i(15448),i=t.i(86441),s=t.i(11105);t.s(["SignOut",0,function(){return(0,e.jsx)(a.f,{title:"Sign out",description:"Sign out of your account on this browser.",children:(0,e.jsx)(i.f,{children:(0,e.jsx)(s.F,{submitLabel:"Sign out",onSubmit:async()=>(await r.V.auth.logout.mutate(),(0,n.k)(),""),children:null})})})}])},18879,t=>{"use strict";t.s(["f",0,function(t,e){let n=t.get(e);return"string"==typeof n?n:""}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13658,e=>{"use strict";var t=e.i(18050),o=e.i(19455),a=e.i(71645),n=e.i(15448),s=e.i(73656);e.s(["default",0,function(){let[e,i]=(0,a.useState)(""),[r,c]=(0,a.useState)(""),[l,u]=(0,a.useState)("loading"),[h,d]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(!/^[a-f0-9]{64}$/.test(location.hash.slice(1)))throw Error("Start this connection from your dashboard.");let{audience:e}=await s.V.studio.discover.query();(i(e),(await s.V.auth.setupStatus.query()).setup_required)?u("setup"):u((await s.V.auth.browserSession.query()).is_authenticated?"ready":"login")})().catch(e=>{c(e instanceof Error?e.message:"Unable to connect.")})},[]),(0,t.jsxs)(n.f,{title:"Approve dashboard access",description:e?"Allow "+e+" to use your signed-in workspace for 30 minutes.":"",children:[r&&(0,t.jsx)("p",{role:"alert",className:"error",children:r}),"setup"===l&&(0,t.jsxs)("p",{children:[(0,t.jsx)("a",{href:"/setup/",target:"_blank",rel:"noreferrer",children:"Set up this installation"}),", then reload this page."]}),"login"===l&&(0,t.jsx)("a",{href:"/accounts/login/?next="+encodeURIComponent(location.pathname+location.hash),children:"Sign in to this installation"}),"ready"===l&&(0,t.jsx)(o.f,{disabled:h,onClick:()=>{d(!0),s.V.studio.approve.mutate({challenge:location.hash.slice(1)}).then(e=>{location.replace(e.audience+"/#code="+encodeURIComponent(e.code))}).catch(e=>{d(!1),c(e instanceof Error?e.message:"Unable to approve.")})},children:"Approve connection"})]})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var t=e.i(56420);let i={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};i.node;let a=(0,t.f)(i);e.s(["f",0,a],11241)},13581,29487,e=>{"use strict";var t=e.i(71645),i=e.i(95813);e.s(["f",0,function(e,a=0){let[r,s]=(0,t.useState)(),[n,l]=(0,t.useState)(""),[c,o]=(0,t.useState)(!0),d=(0,t.useRef)(void 0),h=(0,t.useRef)(!1),u=(0,t.useCallback)(async()=>{d.current?.abort();let t=new AbortController;d.current=t;try{let i=await e(t.signal);if(t.signal.aborted||!h.current)return;s(i),l("")}catch(e){!t.signal.aborted&&h.current&&l((0,i.f)(e))}finally{!t.signal.aborted&&h.current&&o(!1)}},[e]);return(0,t.useEffect)(()=>{h.current=!0,queueMicrotask(()=>{h.current&&u()});let e=a>0?setInterval(()=>{u()},a):void 0;return()=>{h.current=!1,d.current?.abort(),clearInterval(e)}},[u,a]),{data:r,error:n,isLoading:c,refresh:u}}],13581);var a=e.i(18050),r=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:i}){return(0,a.jsxs)(a.Fragment,{children:[e?(0,a.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,a.jsxs)("div",{className:"error",role:"alert",children:[(0,a.jsx)("p",{children:t}),(0,a.jsx)(r.f,{variant:"outline",onClick:()=>{i()},children:"Try again"})]}):void 0]})}],29487)},65983,e=>{"use strict";var t=e.i(18050),i=e.i(71645),a=e.i(73656),r=e.i(95813),s=e.i(13581),n=e.i(15080),l=e.i(19455),c=e.i(93479),o=e.i(29487),d=e.i(94757),h=e.i(75016),u=e.i(87309),x=e.i(59037);async function p(e){let[t,i]=await Promise.all([a.V.webhooks.list.query(void 0,{signal:e}),(0,n.t)(e)]);return{hooks:t.results,actions:i}}function j(e){return e?new Date(e).toLocaleString():"Never"}function b({actionId:e=""}){let{canManage:n,selected:m,setDirty:v}=(0,d.useWorkspace)(),f=(0,s.f)(p,1e4),g=(f.data?.actions??[]).filter(t=>t.project===m&&(!e||t.id===e)),w=new Set(g.map(e=>e.id)),k=(f.data?.hooks??[]).filter(e=>w.has(e.action_id)),y=(0,u.h)(),[S,N]=(0,i.useState)(""),[R,_]=(0,i.useState)(e),[C,L]=(0,i.useState)(!1),[U,T]=(0,i.useState)(""),[$,E]=(0,i.useState)(""),[W,q]=(0,i.useState)();async function P(e){L(!0),T(""),E("");try{await e(),await f.refresh()}catch(e){T((0,r.f)(e))}finally{L(!1)}}return(0,x.f)(""!==S.trim()||R!==e||!!W,v),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Webhook triggers"}),(0,t.jsx)("p",{children:"Send JSON inputs to queue an action. Each registration keeps its saved action version. Delivery acceptance and action execution are tracked separately."}),(0,t.jsxs)("p",{children:["Send ",(0,t.jsx)("code",{children:"X-Webhook-Secret"})," and a stable, unique"," ",(0,t.jsx)("code",{children:"X-Webhook-Delivery"})," header with"," ",(0,t.jsx)("code",{children:'{"inputs": {}}'}),". JSON bodies are limited to 200 KB. Retrying the same delivery never queues another run."]}),(0,t.jsx)(o.f,{...f}),f.isLoading||f.error||0!==k.length?void 0:(0,t.jsx)("p",{children:"No webhook triggers yet."}),k.map(e=>(0,t.jsxs)("article",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsx)("h3",{children:e.name}),(0,t.jsx)("span",{className:"badge",children:e.enabled?"Enabled":"Disabled"})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)(h.f,{href:`/actions/?${new URLSearchParams({project:m,action:e.action_id}).toString()}`,children:e.action_name})," ","· Version ",e.version]}),(0,t.jsxs)("label",{children:["Endpoint",(0,t.jsx)(c.f,{readOnly:!0,value:(0,a.U)()+e.endpoint})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(l.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await navigator.clipboard.writeText((0,a.U)()+e.endpoint),E("Endpoint copied.")})},children:"Copy endpoint"}),n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await a.V.webhooks.update.mutate({id:e.id,enabled:!e.enabled}),E(e.enabled?"Webhook disabled.":"Webhook enabled.")})},children:e.enabled?"Disable":"Enable"}),(0,t.jsx)(l.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await y({title:"Rotate webhook secret?",description:"The previous secret will stop working immediately. Update the sending service with the new secret.",actionLabel:"Rotate secret"})&&q(await a.V.webhooks.rotate.mutate({id:e.id}))})},children:"Rotate secret"})]}):void 0]}),(0,t.jsxs)("p",{children:["Last receipt: ",j(e.last_received_at)," · Last accepted:"," ",j(e.last_accepted_at)]}),(0,t.jsxs)("p",{children:["Last rejection: ",e.last_rejection||"None",e.last_rejected_at?` (${j(e.last_rejected_at)})`:""," ","· Secret rotated: ",j(e.rotated_at)]}),(0,t.jsxs)("details",{children:[(0,t.jsxs)("summary",{children:["Recent deliveries (",e.deliveries.length,")"]}),0===e.deliveries.length?(0,t.jsx)("p",{children:"No authenticated deliveries recorded."}):void 0,e.deliveries.map(i=>(0,t.jsxs)("div",{className:"resource-row",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:i.delivery_id}),(0,t.jsxs)("small",{children:[j(i.received_at)," · ",i.outcome]})]}),i.run?(0,t.jsxs)(h.f,{href:`/runs/?${new URLSearchParams({project:m,action:e.action_id,run:i.run}).toString()}`,children:["Run: ",i.run_status??"Unavailable"]}):(0,t.jsx)("span",{children:"No run queued"})]},i.id))]})]},e.id))]}),n?(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Register a webhook"}),(0,t.jsxs)("form",{onSubmit:t=>{t.preventDefault(),P(async()=>{q(await a.V.webhooks.create.mutate({name:S,action:R})),N(""),_(e)})},children:[(0,t.jsxs)("label",{children:["Name",(0,t.jsx)(c.f,{required:!0,maxLength:100,value:S,disabled:C,onChange:e=>{N(e.target.value)}})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"webhook-action",children:"Action"}),(0,t.jsxs)("select",{id:"webhook-action",required:!0,value:R,disabled:C,onChange:e=>{_(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"Choose an action"}),g.filter(e=>e.enabled).map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,t.jsx)("p",{children:"The latest saved version is pinned at registration. Register a new webhook to use a different version."}),(0,t.jsx)(l.f,{disabled:C||g.every(e=>e.id!==R||!e.enabled),type:"submit",children:"Register webhook"})]})]}):(0,t.jsx)("p",{children:"Workspace owners and admins manage webhook registrations."}),W?(0,t.jsxs)("section",{className:"panel","aria-label":"One-time webhook secret",children:[(0,t.jsxs)("h2",{children:["Save the secret for ",W.webhook.name]}),(0,t.jsx)("p",{children:"This secret is shown once. Store it in your sending service and keep it out of URLs."}),(0,t.jsxs)("label",{children:["Secret",(0,t.jsx)(c.f,{readOnly:!0,type:"password",value:W.secret})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(l.f,{disabled:C,onClick:()=>{P(async()=>{await navigator.clipboard.writeText(W.secret),E("Secret copied.")})},children:"Copy secret"}),(0,t.jsx)(l.f,{variant:"outline",onClick:()=>{q(void 0)},children:"Dismiss secret"})]})]}):void 0,U?(0,t.jsx)("p",{className:"error",role:"alert",children:U}):void 0,$?(0,t.jsx)("p",{className:"notice",role:"status",children:$}):void 0]})}var m=e.i(59140);e.s(["default",0,function(){let{selected:e}=(0,d.useWorkspace)();return(0,t.jsx)(m.c,{current:"webhooks",children:i=>(0,t.jsx)(b,{actionId:i},`${e}:${i}`)})}],65983)},59140,e=>{"use strict";var t=e.i(18050),i=e.i(71645),a=e.i(18566),r=e.i(11241),s=e.i(73656),n=e.i(13581),l=e.i(94757),c=e.i(75016),o=e.i(29487);let d=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function h({action:e,current:i}){let a=e.project,s=new URLSearchParams({project:a,action:e.id});return(0,t.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(c.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:a}).toString()}`,children:[(0,t.jsx)(r.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,t.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,t.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,t.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:d.map(e=>(0,t.jsx)(c.f,{href:`${e.path}?${s.toString()}`,"aria-current":i===e.id?"page":void 0,className:i===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function u({project:e,actionId:a,current:r,children:l}){let d=(0,i.useCallback)(async t=>{if(!a)return;let i=await s.V.actions.get.query({id:a},{signal:t});if(i.project!==e)throw Error("This action is not available in the selected project.");return i},[a,e]),x=(0,n.f)(d);return a&&(x.isLoading||x.error||x.data?.id!==a)?(0,t.jsx)(o.f,{...x}):(0,t.jsxs)(t.Fragment,{children:[x.data?(0,t.jsx)(h,{action:x.data,current:r}):(0,t.jsx)("p",{className:"mb-5",children:(0,t.jsx)(c.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(a)]})}e.s(["F",0,h,"c",0,function({current:e,children:i}){let{selected:r}=(0,l.useWorkspace)(),s=(0,a.useSearchParams)().get("action")??"";return(0,t.jsx)(u,{project:r,actionId:s,current:e,children:i},`${r}:${s}`)}])},59037,e=>{"use strict";var t=e.i(71645);e.s(["f",0,function(e,i){(0,t.useEffect)(()=>{i(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),i(!1)}},[e,i])}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76046,e=>{"use strict";e.i(44362);var t=e.i(14778);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let a=new URL(t,location.origin);return a.origin===location.origin?`${a.pathname}${a.search}${a.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},95813,e=>{"use strict";e.s(["f",0,function(e,t="The request failed. Please try again."){return e instanceof Error?e.message:t}])},86441,e=>{"use strict";var t=e.i(18050),a=e.i(22016),r=e.i(73656),s=e.i(71645),n=e.i(92229),i=e.i(18879),o=e.i(11105);function c(){let e=(0,r.S)("/accounts/email/");return e.startsWith("https:")||e.startsWith("http:")?(0,t.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",children:"Confirm your identity on your installation, then retry."}):(0,t.jsxs)("details",{open:!0,className:"mt-6 border-t border-slate-200 pt-4",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Confirm your identity"}),(0,t.jsxs)("p",{className:"text-sm",children:["Session expired? ",(0,t.jsx)(a.default,{href:"/accounts/login/",children:"Sign in again"}),"."]}),(0,t.jsx)("p",{className:"text-sm",children:"If a security change asks you to confirm your identity, enter your password or an authenticator code, then retry the change."}),(0,t.jsx)(o.F,{submitLabel:"Confirm password",onSubmit:async e=>(await r.V.auth.reauthenticate.mutate({password:(0,i.f)(e,"password")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(o.j,{label:"Password",type:"password",name:"password",autoComplete:"current-password",required:!0})}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(o.F,{submitLabel:"Confirm code",onSubmit:async e=>(await r.V.auth.mfaReauthenticate.mutate({code:(0,i.f)(e,"code")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(o.j,{label:"Authenticator or recovery code",name:"code",autoComplete:"one-time-code",required:!0})})})]})}e.s(["f",0,function({children:e}){let[i,o]=(0,s.useState)(),[l,u]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=new AbortController;return(0,r.m)(e.signal).then(t=>{e.signal.aborted||o(t)}).catch(()=>{e.signal.aborted||u(!0)}),()=>{e.abort()}},[]);let[d,h]=(0,s.useState)(!1);return l?(0,t.jsx)("p",{role:"alert",children:"Unable to load your account. Reload to try again."}):i?i.is_authenticated?(0,t.jsxs)(n.T,{value:()=>{h(!0)},children:[e,d&&(0,t.jsx)(c,{})]}):(0,t.jsxs)("p",{children:["Please ",(0,t.jsx)(a.default,{href:"/accounts/login/",children:"sign in"})," to manage your account."]}):(0,t.jsx)("p",{role:"status",children:"Loading your account…"})}],86441)},11105,92229,e=>{"use strict";var t=e.i(18050),a=e.i(71645),r=e.i(76046),s=e.i(95813);let n=(0,a.createContext)(void 0);function i(){let e=(0,a.useContext)(n);return(t,a)=>e&&(0,r.$)(t)?(e(),r.z):(0,s.f)(t,a)}e.s(["T",0,n,"G",0,i],92229);var o=e.i(19455),c=e.i(93479);e.s(["j",0,function({label:e,...a}){return(0,t.jsxs)("label",{children:[e,(0,t.jsx)(c.f,{...a})]})},"F",0,function({children:e,submitLabel:r,onSubmit:s}){let n=i(),[c,l]=(0,a.useState)(!1),[u,d]=(0,a.useState)(""),[h,m]=(0,a.useState)("");async function f(e){e.preventDefault();let t=new FormData(e.currentTarget);l(!0),d(""),m("");try{m(await s(t)??"")}catch(e){d(n(e,"Unable to save. Please try again."))}finally{l(!1)}}return(0,t.jsxs)("form",{onSubmit:e=>{f(e)},children:[(0,t.jsxs)("fieldset",{disabled:c,className:"min-w-0 border-0 p-0",children:[e,(0,t.jsx)(o.f,{type:"submit",disabled:c,children:c?"Please wait…":r})]}),u&&(0,t.jsx)("p",{role:"alert",className:"error mt-4",children:u}),h&&(0,t.jsx)("p",{role:"status",className:"notice mt-4",children:h})]})}],11105)},86108,e=>{"use strict";var t=e.i(18050),a=e.i(71645),r=e.i(73656),s=e.i(95813),n=e.i(18879),i=e.i(15448),o=e.i(86441),c=e.i(11105);function l(){let[e,i]=(0,a.useState)(""),[o,l]=(0,a.useState)("");return(0,a.useEffect)(()=>{let e=!0;return r.V.auth.emails.query().then(t=>{e&&i(t.find(e=>e.primary)?.email??"")}).catch(t=>{e&&l((0,s.f)(t,"Unable to load email address."))}),()=>{e=!1}},[]),(0,t.jsxs)(t.Fragment,{children:[o&&(0,t.jsx)("p",{role:"alert",className:"error",children:o}),(0,t.jsx)(c.F,{submitLabel:"Save email address",onSubmit:async e=>(await r.V.auth.changeEmail.mutate({email:(0,n.f)(e,"email")}),i((0,n.f)(e,"email")),"Email address saved."),children:(0,t.jsx)(c.j,{label:"Email address",name:"email",type:"email",defaultValue:e,autoComplete:"email",required:!0},e)})]})}e.s(["ChangePassword",0,function(){return(0,t.jsx)(i.f,{title:"Change password",description:"Choose a strong password you do not use elsewhere.",showAccountNavigation:!0,children:(0,t.jsx)(o.f,{children:(0,t.jsxs)(c.F,{submitLabel:"Change password",onSubmit:async e=>{let t=(0,n.f)(e,"new_password");if(t!==(0,n.f)(e,"confirm_password"))throw Error("The new passwords do not match.");return await r.V.auth.changePassword.mutate({current_password:(0,n.f)(e,"current_password"),new_password:t}),"Your password has been changed."},children:[(0,t.jsx)(c.j,{label:"Current password",name:"current_password",type:"password",autoComplete:"current-password",required:!0}),(0,t.jsx)(c.j,{label:"New password",name:"new_password",type:"password",autoComplete:"new-password",required:!0}),(0,t.jsx)(c.j,{label:"Confirm new password",name:"confirm_password",type:"password",autoComplete:"new-password",required:!0})]})})})},"ManageAccount",0,function(){return(0,t.jsx)(i.f,{title:"Account settings",description:"Manage the email address you use to sign in.",showAccountNavigation:!0,children:(0,t.jsx)(o.f,{children:(0,t.jsx)(l,{})})})}])},18879,e=>{"use strict";e.s(["f",0,function(e,t){let a=e.get(t);return"string"==typeof a?a:""}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var t=e.i(56420);let a={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};a.node;let i=(0,t.f)(a);e.s(["f",0,i],11241)},51757,e=>{"use strict";var t=e.i(56420);let a={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};a.node;let i=(0,t.f)(a);e.s(["f",0,i],51757)},59659,e=>{"use strict";var t=e.i(56420);let a={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};a.node;let i=(0,t.f)(a);e.s(["f",0,i],59659)},40192,54105,19877,e=>{"use strict";var t=e.i(22219);e.s(["z",0,t],40192),e.s(["z",0,t],54105),e.s(["z",0,t],19877)},13581,29487,e=>{"use strict";var t=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,i=0){let[s,n]=(0,t.useState)(),[r,l]=(0,t.useState)(""),[c,d]=(0,t.useState)(!0),o=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),h=(0,t.useCallback)(async()=>{o.current?.abort();let t=new AbortController;o.current=t;try{let a=await e(t.signal);if(t.signal.aborted||!u.current)return;n(a),l("")}catch(e){!t.signal.aborted&&u.current&&l((0,a.f)(e))}finally{!t.signal.aborted&&u.current&&d(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=i>0?setInterval(()=>{h()},i):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,i]),{data:s,error:r,isLoading:c,refresh:h}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:a}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:t}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],29487)},16118,e=>{"use strict";var t=e.i(18050),a=e.i(6501),i=e.i(56420);let s={name:"pause",size:24,node:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]};s.node;let n=(0,i.f)(s);var r=e.i(21357),l=e.i(59659),c=e.i(71645),d=e.i(40192),o=e.i(54105),u=e.i(19877),h=e.i(73656),f=e.i(95813),p=e.i(13581),x=e.i(15080),m=e.i(19455),v=e.i(90350),j=e.i(31084),b=e.i(24687),g=e.i(29487),y=e.i(87309),w=e.i(10505),k=e.i(94757),S=e.i(75016),N=e.i(59037);async function z(e){let[t,a]=await Promise.all([h.V.schedules.list.query(void 0,{signal:e}),(0,x.t)(e)]);return{schedules:t.results,actions:a}}function C({actionId:e=""}){let{selected:i,setDirty:s}=(0,k.useWorkspace)(),x=(0,p.f)(z),A=(x.data?.actions??[]).filter(t=>t.project===i&&(!e||t.id===e)),$=new Set(A.map(e=>e.id)),L=(x.data?.schedules??[]).filter(e=>$.has(e.action)),M=(0,y.h)(),[R,P]=(0,c.useState)(""),[E,T]=(0,c.useState)(e),[V,U]=(0,c.useState)(v.A),[_,q]=(0,c.useState)("{}"),[O,D]=(0,c.useState)({action:e,cron:v.A,inputs:"{}"}),F=E!==O.action||V!==O.cron||_!==O.inputs;(0,N.f)(F,s);let B=()=>{P(""),T(e),U(v.A),q("{}"),D({action:e,cron:v.A,inputs:"{}"})},[I,W]=(0,c.useState)(!1),[H,J]=(0,c.useState)(""),[K,Z]=(0,c.useState)(""),G=async e=>{W(!0),J(""),Z("");try{await e(),await x.refresh()}catch(e){J((0,f.f)(e))}finally{W(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("h2",{children:[(0,t.jsx)(a.f,{size:18})," Scheduled work"]}),(0,t.jsxs)("span",{className:"badge",children:[L.length," schedules"]})]}),(0,t.jsx)(g.f,{...x}),x.isLoading||x.error||0!==L.length?void 0:(0,t.jsx)("p",{children:"No schedules yet. Choose an action below to automate it."}),L.map(e=>(0,t.jsxs)("div",{className:"resource-row",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(S.f,{href:`/actions/?${new URLSearchParams({project:i,action:e.action}).toString()}`,children:(0,t.jsx)("strong",{children:A.find(t=>t.id===e.action)?.name??"Action"})}),(0,t.jsxs)("small",{children:[(0,v.E)(e.cron)," ·"," ",e.enabled?`Next ${new Date(e.next_run_at).toLocaleString(void 0,{timeZone:"UTC"})+" UTC"}`:"Paused"]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsxs)(m.f,{variant:"outline",size:"sm",disabled:I,onClick:()=>{G(async()=>{await h.V.schedules.update.mutate({id:e.id,enabled:!e.enabled}),Z(e.enabled?"Schedule paused.":"Schedule resumed.")})},children:[e.enabled?(0,t.jsx)(n,{size:13}):(0,t.jsx)(r.f,{size:13}),e.enabled?"Pause":"Resume"]}),(0,t.jsx)(m.f,{variant:"ghost",size:"sm",onClick:()=>{(async()=>{if(F&&!await M())return;let t={action:e.action,cron:e.cron,inputs:(0,w.A)(e.inputs)};P(e.id),T(t.action),U(t.cron),q(t.inputs),D(t)})()},children:"Edit"}),(0,t.jsx)(m.f,{variant:"ghost",size:"icon","aria-label":"Delete schedule",disabled:I,onClick:()=>{G(async()=>{await M({title:"Delete this schedule?",description:"Future scheduled runs will stop. Existing runs and their results will be retained.",actionLabel:"Delete schedule"})&&(await h.V.schedules.delete.mutate({id:e.id}),Z("Schedule deleted."))})},children:(0,t.jsx)(l.f,{size:14})})]})]},e.id))]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:R?"Edit schedule":"Create a schedule"}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),G(async()=>{let e={action:E,cron:V,inputs:d.z.record(o.z.string(),u.z.json()).parse(JSON.parse(_))};R?await h.V.schedules.update.mutate({id:R,...e}):await h.V.schedules.create.mutate(e),Z("Schedule saved."),B()})},children:[(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("label",{children:["Action",(0,t.jsxs)("select",{required:!0,value:E,disabled:I,onChange:e=>{T(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"Choose an action"}),A.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]})}),(0,t.jsx)(j.f,{value:V,onChange:U,disabled:I}),(0,t.jsxs)("label",{children:["Scheduled inputs (JSON)",(0,t.jsx)(b.f,{className:"code",rows:3,value:_,disabled:I,onChange:e=>{q(e.target.value)}})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(m.f,{type:"submit",disabled:I||!$.has(E),children:"Save schedule"}),R?(0,t.jsx)(m.f,{variant:"outline",type:"button",onClick:()=>{(async()=>{(!F||await M())&&B()})()},children:"Cancel editing"}):void 0]})]})]}),H?(0,t.jsx)("p",{className:"error",role:"alert",children:H}):void 0,K?(0,t.jsx)("p",{className:"notice",role:"status",children:K}):void 0]})}var A=e.i(59140);e.s(["default",0,function(){let{selected:e}=(0,k.useWorkspace)();return(0,t.jsx)(A.c,{current:"schedules",children:a=>(0,t.jsx)(C,{actionId:a},`${e}:${a}`)})}],16118)},24687,e=>{"use strict";var t=e.i(18050),a=e.i(71645),i=e.i(39689);let s=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("textarea",{className:(0,i.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...a}));s.displayName="Textarea",e.s(["f",0,s])},59140,e=>{"use strict";var t=e.i(18050),a=e.i(71645),i=e.i(18566),s=e.i(11241),n=e.i(73656),r=e.i(13581),l=e.i(94757),c=e.i(75016),d=e.i(29487);let o=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function u({action:e,current:a}){let i=e.project,n=new URLSearchParams({project:i,action:e.id});return(0,t.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(c.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:i}).toString()}`,children:[(0,t.jsx)(s.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,t.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,t.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,t.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:o.map(e=>(0,t.jsx)(c.f,{href:`${e.path}?${n.toString()}`,"aria-current":a===e.id?"page":void 0,className:a===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function h({project:e,actionId:i,current:s,children:l}){let o=(0,a.useCallback)(async t=>{if(!i)return;let a=await n.V.actions.get.query({id:i},{signal:t});if(a.project!==e)throw Error("This action is not available in the selected project.");return a},[i,e]),f=(0,r.f)(o);return i&&(f.isLoading||f.error||f.data?.id!==i)?(0,t.jsx)(d.f,{...f}):(0,t.jsxs)(t.Fragment,{children:[f.data?(0,t.jsx)(u,{action:f.data,current:s}):(0,t.jsx)("p",{className:"mb-5",children:(0,t.jsx)(c.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(i)]})}e.s(["F",0,u,"c",0,function({current:e,children:a}){let{selected:s}=(0,l.useWorkspace)(),n=(0,i.useSearchParams)().get("action")??"";return(0,t.jsx)(h,{project:s,actionId:n,current:e,children:a},`${s}:${n}`)}])},10505,79432,e=>{"use strict";var t=e.i(18050),a=e.i(56420);let i={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};i.node;let s=(0,a.f)(i);e.s(["f",0,s],79432);var n=e.i(51757);let r={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};r.node;let l=(0,a.f)(r),c={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};c.node;let d=(0,a.f)(c),o={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};o.node;let u=(0,a.f)(o);function h(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let a={succeeded:n.f,waiting_approval:d,running:s,queued:l,failed:u,cancelled:u,interrupted:u}[e]??l;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(a,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let a=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${a} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let a=Reflect.get(e,t);if("string"==typeof a)return a}return""})(e.inputs,"message").slice(0,70)}`:`${a} \xb7 ${h(e.operation)}`},"T",0,h],10505)},59037,e=>{"use strict";var t=e.i(71645);e.s(["f",0,function(e,a){(0,t.useEffect)(()=>{a(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),a(!1)}},[e,a])}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13581,29487,e=>{"use strict";var r=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,i=0){let[s,t]=(0,r.useState)(),[n,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!0),o=(0,r.useRef)(void 0),u=(0,r.useRef)(!1),p=(0,r.useCallback)(async()=>{o.current?.abort();let r=new AbortController;o.current=r;try{let a=await e(r.signal);if(r.signal.aborted||!u.current)return;t(a),l("")}catch(e){!r.signal.aborted&&u.current&&l((0,a.f)(e))}finally{!r.signal.aborted&&u.current&&d(!1)}},[e]);return(0,r.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&p()});let e=i>0?setInterval(()=>{p()},i):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[p,i]),{data:s,error:n,isLoading:c,refresh:p}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:r,refresh:a}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,r?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:r}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],29487)},94586,e=>{"use strict";var r=e.i(18050),a=e.i(44555),i=e.i(94757);e.s(["default",0,function(){let{openRun:e}=(0,i.useWorkspace)();return(0,r.jsx)(a.f,{openRun:e})}])},44555,e=>{"use strict";var r=e.i(18050),a=e.i(56420);let i={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};i.node;let s=(0,a.f)(i);var t=e.i(71645),n=e.i(73656),l=e.i(95813),c=e.i(13581),d=e.i(15080),o=e.i(19455),u=e.i(29487);e.s(["f",0,function({runId:e,openRun:a}){let i=(0,c.f)(d.i,5e3),[p,h]=(0,t.useState)(""),[v,f]=(0,t.useState)(""),j=i.data?.filter(r=>"pending"===r.status&&(!e||r.run===e))??[],x=async(e,r)=>{h(e),f("");try{await n.
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13581,29487,e=>{"use strict";var r=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,i=0){let[s,t]=(0,r.useState)(),[n,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!0),o=(0,r.useRef)(void 0),u=(0,r.useRef)(!1),p=(0,r.useCallback)(async()=>{o.current?.abort();let r=new AbortController;o.current=r;try{let a=await e(r.signal);if(r.signal.aborted||!u.current)return;t(a),l("")}catch(e){!r.signal.aborted&&u.current&&l((0,a.f)(e))}finally{!r.signal.aborted&&u.current&&d(!1)}},[e]);return(0,r.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&p()});let e=i>0?setInterval(()=>{p()},i):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[p,i]),{data:s,error:n,isLoading:c,refresh:p}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:r,refresh:a}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,r?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:r}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],29487)},94586,e=>{"use strict";var r=e.i(18050),a=e.i(44555),i=e.i(94757);e.s(["default",0,function(){let{openRun:e}=(0,i.useWorkspace)();return(0,r.jsx)(a.f,{openRun:e})}])},44555,e=>{"use strict";var r=e.i(18050),a=e.i(56420);let i={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};i.node;let s=(0,a.f)(i);var t=e.i(71645),n=e.i(73656),l=e.i(95813),c=e.i(13581),d=e.i(15080),o=e.i(19455),u=e.i(29487);e.s(["f",0,function({runId:e,openRun:a}){let i=(0,c.f)(d.i,5e3),[p,h]=(0,t.useState)(""),[v,f]=(0,t.useState)(""),j=i.data?.filter(r=>"pending"===r.status&&(!e||r.run===e))??[],x=async(e,r)=>{h(e),f("");try{await n.V.approvals.decide.mutate({id:e,decision:r}),await i.refresh()}catch(e){f((0,l.f)(e))}finally{h("")}};return(0,r.jsxs)("section",{className:"panel",children:[(0,r.jsxs)("div",{className:"panel-title",children:[(0,r.jsxs)("h2",{children:[(0,r.jsx)(s,{size:18})," ",e?"Run approvals":"Approval queue"]}),(0,r.jsxs)("span",{className:"badge",children:[j.length," pending"]})]}),(0,r.jsx)(u.f,{...i}),v?(0,r.jsx)("p",{className:"error",role:"alert",children:v}):void 0,i.isLoading||0!==j.length?void 0:(0,r.jsxs)("div",{className:"resource-empty",children:[(0,r.jsx)(s,{size:28}),(0,r.jsx)("h3",{children:"All caught up"}),(0,r.jsx)("p",{children:"No decisions are waiting for you."})]}),j.map(e=>(0,r.jsxs)("article",{className:"approval-card",children:[(0,r.jsx)("span",{className:"eyebrow",children:"Human approval required"}),(0,r.jsx)("p",{className:"approval-prompt",children:e.prompt}),(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)(o.f,{disabled:!!p,onClick:()=>{x(e.id,"approved")},children:p===e.id?"Saving decision…":"Approve"}),(0,r.jsx)(o.f,{variant:"outline",disabled:!!p,onClick:()=>{x(e.id,"denied")},children:"Deny"}),a?(0,r.jsx)(o.f,{variant:"ghost",onClick:()=>{a(e.run)},children:"Inspect run"}):void 0]})]},e.id))]})}],44555)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96001,t=>{t.v(o=>Promise.all(["static/chunks/119rk6qs93dvi.js"].map(o=>t.l(o))).then(()=>o(160)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76046,e=>{"use strict";e.i(44362);var t=e.i(14778);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let a=new URL(t,location.origin);return a.origin===location.origin?`${a.pathname}${a.search}${a.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},95813,e=>{"use strict";e.s(["f",0,function(e,t="The request failed. Please try again."){return e instanceof Error?e.message:t}])},11105,92229,e=>{"use strict";var t=e.i(18050),a=e.i(71645),r=e.i(76046),n=e.i(95813);let s=(0,a.createContext)(void 0);function i(){let e=(0,a.useContext)(s);return(t,a)=>e&&(0,r.$)(t)?(e(),r.z):(0,n.f)(t,a)}e.s(["T",0,s,"G",0,i],92229);var o=e.i(19455),c=e.i(93479);e.s(["j",0,function({label:e,...a}){return(0,t.jsxs)("label",{children:[e,(0,t.jsx)(c.f,{...a})]})},"F",0,function({children:e,submitLabel:r,onSubmit:n}){let s=i(),[c,l]=(0,a.useState)(!1),[u,d]=(0,a.useState)(""),[m,f]=(0,a.useState)("");async function h(e){e.preventDefault();let t=new FormData(e.currentTarget);l(!0),d(""),f("");try{f(await n(t)??"")}catch(e){d(s(e,"Unable to save. Please try again."))}finally{l(!1)}}return(0,t.jsxs)("form",{onSubmit:e=>{h(e)},children:[(0,t.jsxs)("fieldset",{disabled:c,className:"min-w-0 border-0 p-0",children:[e,(0,t.jsx)(o.f,{type:"submit",disabled:c,children:c?"Please wait…":r})]}),u&&(0,t.jsx)("p",{role:"alert",className:"error mt-4",children:u}),m&&(0,t.jsx)("p",{role:"status",className:"notice mt-4",children:m})]})}],11105)},4767,e=>{"use strict";var t=e.i(18050),a=e.i(22016),r=e.i(71645),n=e.i(76046),s=e.i(73656),i=e.i(15448),o=e.i(11105),c=e.i(18879);e.s(["SignIn",0,function({signup:e=!1}){let[l,u]=(0,r.useState)(!1),[d,m]=(0,r.useState)(""),[f,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=new AbortController;return(0,s.m)(e.signal).then(()=>s.V.auth.browserSession.query(void 0,{signal:e.signal})).then(t=>{if(!e.signal.aborted){if(t.is_authenticated)return void(0,n.k)();h((0,n.u)(t)),u(!0)}}).catch(()=>{e.signal.aborted||m("Unable to load your session. Reload this page to try again.")}),()=>{e.abort()}},[]),(0,t.jsxs)(i.f,{title:f?"Two-factor authentication":e?"Create your account":"Welcome back",description:f?"Enter a code from your authenticator app or an unused recovery code.":"Your projects, actions and workspace in one place.",children:[d&&(0,t.jsx)("p",{role:"alert",className:"error",children:d}),!l&&!d&&(0,t.jsx)("p",{role:"status",children:"Loading your session…"}),l&&(0,t.jsx)(o.F,{submitLabel:f?"Verify code":e?"Create account":"Sign in",onSubmit:async t=>{let a=await (f?s.V.auth.mfaAuthenticate.mutate({code:(0,c.f)(t,"code")}):e?s.V.auth.signup.mutate({email:(0,c.f)(t,"email"),username:(0,c.f)(t,"username"),password:(0,c.f)(t,"password")}):s.V.auth.login.mutate({email:(0,c.f)(t,"email"),password:(0,c.f)(t,"password")}));if(a.is_authenticated)return(0,n.k)(),"";if((0,n.u)(a))return h(!0),"";throw Error("Unable to sign in. Please try again.")},children:f?(0,t.jsx)(o.j,{label:"Authentication or recovery code",name:"code",autoComplete:"one-time-code",required:!0}):(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(o.j,{label:"Username",name:"username",autoComplete:"username",required:!0}),(0,t.jsx)(o.j,{label:"Email address",name:"email",type:"email",autoComplete:e?"email":"username",required:!0}),(0,t.jsx)(o.j,{label:"Password",name:"password",type:"password",autoComplete:e?"new-password":"current-password",required:!0})]})}),(0,t.jsxs)("div",{className:"mt-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(a.default,{href:e?"/accounts/login/":"/accounts/signup/",children:e?"Already have an account? Sign in":"Create an account"}),(0,t.jsx)(a.default,{href:"/accounts/password/reset/",children:"Forgot password?"})]})]})}])},18879,e=>{"use strict";e.s(["f",0,function(e,t){let a=e.get(t);return"string"==typeof a?a:""}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13581,29487,e=>{"use strict";var s=e.i(71645),t=e.i(95813);e.s(["f",0,function(e,r=0){let[a,i]=(0,s.useState)(),[n,l]=(0,s.useState)(""),[c,d]=(0,s.useState)(!0),o=(0,s.useRef)(void 0),u=(0,s.useRef)(!1),h=(0,s.useCallback)(async()=>{o.current?.abort();let s=new AbortController;o.current=s;try{let t=await e(s.signal);if(s.signal.aborted||!u.current)return;i(t),l("")}catch(e){!s.signal.aborted&&u.current&&l((0,t.f)(e))}finally{!s.signal.aborted&&u.current&&d(!1)}},[e]);return(0,s.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=r>0?setInterval(()=>{h()},r):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,r]),{data:a,error:n,isLoading:c,refresh:h}}],13581);var r=e.i(18050),a=e.i(19455);e.s(["f",0,function({isLoading:e,error:s,refresh:t}){return(0,r.jsxs)(r.Fragment,{children:[e?(0,r.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,s?(0,r.jsxs)("div",{className:"error",role:"alert",children:[(0,r.jsx)("p",{children:s}),(0,r.jsx)(a.f,{variant:"outline",onClick:()=>{t()},children:"Try again"})]}):void 0]})}],29487)},44727,e=>{"use strict";var s=e.i(18050),t=e.i(71645),r=e.i(73656),a=e.i(13581),i=e.i(18879),n=e.i(19455),l=e.i(93479),c=e.i(94757),d=e.i(29487),o=e.i(69212);let u={};function h({filters:e}){let i=(0,t.useCallback)(async s=>await r.V.audit.list.query(e,{signal:s}),[e]),{data:n,error:l,isLoading:c,refresh:o}=(0,a.f)(i);return(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Recorded events"}),(0,s.jsx)("p",{className:"small",children:"Newest first. Only event metadata is shown; values and credentials are never included."}),(0,s.jsx)(d.f,{isLoading:c,error:l,refresh:o}),n&&!c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{role:"status",children:[n.count," matching events"]}),0===n.results.length?(0,s.jsx)("p",{children:"No audit events match these filters."}):(0,s.jsx)("ol",{className:"grid gap-3","aria-label":"Audit events",children:n.results.map(e=>(0,s.jsxs)("li",{className:"rounded-md border p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap justify-between gap-2",children:[(0,s.jsx)("strong",{children:e.kind}),(0,s.jsx)("time",{dateTime:e.created_at,children:new Date(e.created_at).toLocaleString()})]}),(0,s.jsxs)("p",{className:"small",children:[e.actor_label,e.actor_id?` \xb7 Actor ID ${String(e.actor_id)}`:""]}),(0,s.jsxs)("p",{className:"break-all text-sm",children:["Object: ",e.object_id||"—"]}),(0,s.jsxs)("p",{className:"small break-all",children:["Event: ",e.id]})]},e.id))})]}):void 0]})}e.s(["AuditLog",0,function(){let{canManage:e,workspace:r}=(0,c.useWorkspace)(),[a,d]=(0,t.useState)(u);return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.K,{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{children:"Audit log"}),(0,s.jsx)("p",{className:"small",children:"Review recorded workspace changes."})]})}),(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Filter events"}),(0,s.jsx)("p",{className:"small",children:"Exact matches for action, actor ID and object ID. Times use your local timezone; the start is included and the end is excluded."}),(0,s.jsxs)("form",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",onSubmit:e=>{e.preventDefault();let s=new FormData(e.currentTarget),t=e=>(0,i.f)(s,e).trim(),r={};t("kind")&&(r.kind=t("kind")),t("actor")&&(r.actor=Number(t("actor"))),t("object_id")&&(r.object_id=t("object_id")),t("since")&&(r.since=new Date(t("since")).toISOString()),t("before")&&(r.before=new Date(t("before")).toISOString()),d(r)},children:[(0,s.jsxs)("label",{children:["Action / kind",(0,s.jsx)(l.f,{name:"kind",placeholder:"document.updated",maxLength:100})]}),(0,s.jsxs)("label",{children:["Actor ID",(0,s.jsx)(l.f,{name:"actor",type:"number",min:1,step:1,placeholder:"Numeric member ID"})]}),(0,s.jsxs)("label",{children:["Object ID",(0,s.jsx)(l.f,{name:"object_id",maxLength:100})]}),(0,s.jsxs)("label",{children:["From (inclusive)",(0,s.jsx)(l.f,{name:"since",type:"datetime-local"})]}),(0,s.jsxs)("label",{children:["Before (exclusive)",(0,s.jsx)(l.f,{name:"before",type:"datetime-local"})]}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)(n.f,{type:"submit",children:"Apply filters"}),(0,s.jsx)(n.f,{variant:"outline",type:"reset",onClick:()=>{d(u)},children:"Clear"})]})]})]}),(0,s.jsx)(h,{filters:a},`${r}:${JSON.stringify(a)}`)]}):(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Audit log"}),(0,s.jsx)("p",{children:"Only workspace owners and admins can view the audit log."})]})}])},18879,e=>{"use strict";e.s(["f",0,function(e,s){let t=e.get(s);return"string"==typeof t?t:""}])}]);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5500,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return x}});let r=e.r(55682),s=e.r(90809),a=e.r(18050),l=s._(e.r(71645)),i=r._(e.r(74080)),o=r._(e.r(25633)),c=e.r(8927),u=e.r(65856),d=e.r(49381),p=r._(e.r(1948)),h=e.r(18581);function f(e,t,n,r,s,a,l){let i=e?.src;e&&e["data-loaded-src"]!==i&&(e["data-loaded-src"]=i,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&s(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,s=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>s,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{s=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function g(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let m="u"<typeof window?l.useEffect:l.useLayoutEffect,j=(0,l.forwardRef)(({src:e,srcSet:t,sizes:n,height:r,width:s,decoding:i,className:o,style:c,fetchPriority:u,placeholder:d,loading:p,unoptimized:j,fill:b,onLoadRef:x,onLoadingCompleteRef:v,setBlurComplete:y,setShowAltText:w,sizesInput:S,onLoad:C,onError:k,..._},N)=>{let P=(0,l.useRef)(!1),O=(0,l.useRef)(null);m(()=>{let{current:e}=P,{current:t}=O;e||null===t||(k&&(t.src=t.src),t.complete&&f(t,d,x,v,y,j,S),P.current=!0)},[e,d,x,v,k,j,S]);let R=(0,h.useMergedRef)(N,O);return(0,a.jsx)("img",{..._,...g(u),loading:p,width:s,height:r,decoding:i,"data-nimg":b?"fill":"1",className:o,style:c,sizes:n,srcSet:t,src:e,ref:R,onLoad:e=>{f(e.currentTarget,d,x,v,y,j,S)},onError:e=>{w(!0),"empty"!==d&&y(!0),k&&k(e)}})});function b({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&i.default.preload?(i.default.preload(t.src,n),null):(0,a.jsx)(o.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let x=(0,l.forwardRef)((e,t)=>{let n=(0,l.useContext)(u.RouterContext),r=(0,d.useImageConfig)(),{onLoad:s,onLoadingComplete:i}=e,o=(0,l.useRef)(s);(0,l.useEffect)(()=>{o.current=s},[s]);let h=(0,l.useRef)(i);(0,l.useEffect)(()=>{h.current=i},[i]);let[f,g]=(0,l.useState)(!1),[m,x]=(0,l.useState)(!1),{props:v,meta:y}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:r,blurComplete:f,showAltText:m});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j,{...v,unoptimized:y.unoptimized,placeholder:y.placeholder,fill:y.fill,onLoadRef:o,onLoadingCompleteRef:h,setBlurComplete:g,setShowAltText:x,sizesInput:e.sizes,ref:t}),y.preload?(0,a.jsx)(b,{isAppRouter:!n,imgAttributes:v}):null]})});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},49381,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useImageConfig",{enumerable:!0,get:function(){return i}});let r=e.r(71645),s=e.r(87690),a=e.r(18556),l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function i(){let e=(0,r.useContext)(a.ImageConfigContext);return(0,s.prepareImageConfig)(l,e)}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},90317,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={bindSnapshot:function(){return u},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return d},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let a=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class l{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let i="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return i?new i:new l}function c(e){let t=Symbol.for(`@next/${e}@16.4.5`),n=globalThis;return n[t]??=o()}function u(e){return i?i.bind(e):l.bind(e)}function d(){return i?i.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=e.r(42344)},70703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let r=e.r(55682)._(e.r(69093));function s(e,t){let n={};"function"==typeof e&&(n.loader=e);let s={...n,...t};return(0,r.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},9885,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},70965,(e,t,n)=>{"use strict";function r(e,t){let n=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,t.qualities[0]):n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"findClosestQuality",{enumerable:!0,get:function(){return r}})},8927,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImgProps",{enumerable:!0,get:function(){return o}});let r=e.r(43369),s=e.r(88143),a=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function i(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:0/0:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):0/0}function o({src:e,sizes:t,unoptimized:n=!1,priority:c=!1,preload:u=!1,loading:d,className:p,quality:h,width:f,height:g,fill:m=!1,style:j,overrideSrc:b,onLoad:x,onLoadingComplete:v,placeholder:y="empty",blurDataURL:w,fetchPriority:S,decoding:C="async",layout:k,objectFit:_,objectPosition:N,lazyBoundary:P,lazyRoot:O,...R},A){var M;let z,I,{imgConf:E,showAltText:L,blurComplete:T,defaultLoader:$}=A;if(void 0===$)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let D=R.loader||$;delete R.loader,delete R.srcSet;let U="__next_img_default"in D;if(U){if("custom"===E.loader)throw Error(`Image with src "${e}" is missing "loader" prop.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{let e=D;D=t=>{let{config:n,...r}=t;return e(r)}}if(k){"fill"===k&&(m=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[k];e&&(j={...j,...e});let n={responsive:"100vw",fill:"100vw"}[k];n&&!t&&(t=n)}let B="",F=i(f),q=i(g);if((M=e)&&"object"==typeof M&&(l(M)||void 0!==M.src)){let t=l(e)?e.default:e;if(!t.src)throw Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`);if(!t.height||!t.width)throw Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`);if(z=t.blurWidth,I=t.blurHeight,w=w||t.blurDataURL,B=t.src,!m)if(F||q){if(F&&!q){let e=F/t.width;q=Math.round(t.height*e)}else if(!F&&q){let e=q/t.height;F=Math.round(t.width*e)}}else F=t.width,q=t.height}let V=!c&&!u&&("lazy"===d||void 0===d);(!(e="string"==typeof e?e:B)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,V=!1),E.unoptimized&&(n=!0),U&&!E.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let W=i(h),J=Object.assign(m?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:_,objectPosition:N}:{},L?{}:{color:"transparent"},j),G=T||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,s.getImageBlurSvg)({widthInt:F,heightInt:q,blurWidth:z,blurHeight:I,blurDataURL:w||"",objectFit:J.objectFit})}")`:`url("${y}")`,H=a.includes(J.objectFit)?"fill"===J.objectFit?"100% 100%":"cover":J.objectFit,K=G?{backgroundSize:H,backgroundPosition:J.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:G}:{},Q=function({config:e,src:t,unoptimized:n,width:s,quality:a,sizes:l,loader:i}){if(n){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,r.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,r.getAssetToken)())e=void 0;else if(e){let n=t.indexOf("?");if(-1!==n){let r=new URLSearchParams(t.slice(n+1));r.get("dpl")||(r.append("dpl",e),t=t.slice(0,n)+"?"+r.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:c}=function({deviceSizes:e,allSizes:t},n,r){if(r){let n=/(^|\s)(1?\d?\d)vw/g,s=[];for(let e;e=n.exec(r);)s.push(parseInt(e[2]));if(s.length){let n=.01*Math.min(...s);return{widths:t.filter(t=>t>=e[0]*n),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof n?{widths:e,kind:"w"}:{widths:[...new Set([n,2*n].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,s,l),u=o.length-1;return{sizes:l||"w"!==c?l:"100vw",srcSet:o.map((n,r)=>`${i({config:e,src:t,quality:a,width:n})} ${"w"===c?n:r+1}${c}`).join(", "),src:i({config:e,src:t,quality:a,width:o[u]})}}({config:E,src:e,unoptimized:n,width:F,quality:W,sizes:t,loader:D}),X=V?"lazy":d;return{props:{...R,loading:X,fetchPriority:S,width:F,height:q,decoding:C,className:p,style:{...J,...K},sizes:Q.sizes,srcSet:Q.srcSet,src:b||Q.src},meta:{unoptimized:n,preload:u||c,placeholder:y,fill:m}}}},25633,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return g},defaultHead:function(){return d}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let a=e.r(55682),l=e.r(90809),i=e.r(18050),o=l._(e.r(71645)),c=a._(e.r(98879)),u=e.r(42732);function d(){return[(0,i.jsx)("meta",{charSet:"utf-8"},"charset"),(0,i.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let h=["name","httpEquiv","charSet","itemProp"];function f(e){let t,n,r,s;return e.reduce(p,[]).reverse().concat(d().reverse()).filter((t=new Set,n=new Set,r=new Set,s={},e=>{let a=!0,l=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){l=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?a=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?a=!1:n.add(e.type);break;case"meta":for(let t=0,n=h.length;t<n;t++){let n=h[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?a=!1:r.add(n);else{let t=e.props[n],r=s[n]||new Set;("name"!==n||!l)&&r.has(t)?a=!1:(r.add(t),s[n]=r)}}}return a})).reverse().map((e,t)=>{let n=e.key||t;return o.default.cloneElement(e,{key:n})})}let g=function({children:e}){let t=(0,o.useContext)(u.HeadManagerContext);return(0,i.jsx)(c.default,{reduceComponentsToState:f,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},88143,(e,t,n)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:s,blurDataURL:a,objectFit:l}){let i=n?40*n:e,o=s?40*s:t,c=i&&o?`viewBox='0 0 ${i} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===l?"xMidYMid":"cover"===l?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},18556,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let r=e.r(55682)._(e.r(71645)),s=e.r(87690),a=r.default.createContext(s.imageConfigDefault)},87690,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return a},imageConfigDefault:function(){return c},prepareImageConfig:function(){return o}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let a=["default","imgix","cloudinary","akamai","custom"],l={},i=new WeakMap;function o(e,t){let n=e??l,r=t??l,s=i.get(n);if(s){let e=s.get(r);if(e)return e}let a=e||t||c,o=[...a.deviceSizes].sort((e,t)=>e-t),u=[...a.imageSizes],d={deviceSizes:o,imageSizes:u,allSizes:[...o,...u].sort((e,t)=>e-t),qualities:void 0===a.qualities?void 0:[...a.qualities].sort((e,t)=>e-t),path:a.path,loader:a.loader,dangerouslyAllowSVG:a.dangerouslyAllowSVG,unoptimized:a.unoptimized,domains:a.domains,remotePatterns:a.remotePatterns,localPatterns:"u"<typeof window&&void 0!==t?t.localPatterns:a.localPatterns,output:a.output};return s||(s=new WeakMap,i.set(n,s)),s.set(r,d),d}let c={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},1948,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return l}});let r=e.r(70965),s=e.r(43369);function a({config:e,src:t,width:n,quality:l}){let i=(0,s.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,s.getAssetToken)())i=void 0;else{let e=t.indexOf("?");if(-1!==e){let n=new URLSearchParams(t.slice(e+1)),r=n.get("dpl");if(r){i=r,n.delete("dpl");let s=n.toString();t=t.slice(0,e)+(s?"?"+s:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
3
|
+
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`);let o=(0,r.findClosestQuality)(l,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${n}&q=${o}${t.startsWith("/")&&i?`&dpl=${i}`:""}`}a.__next_img_default=!0;let l=a},67585,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return l}});let r=e.r(71645),s=e.r(74080);e.r(32061);let a=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function l({children:e}){return(0,r.use)((0,s.browser)(a)),e}},69093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let r=e.r(18050),s=e.r(71645),a=e.r(67585),l=e.r(52157);function i(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},n=(0,s.lazy)(()=>t.loader().then(i)),c=t.loading;function u(e){let i=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,u=o?s.Suspense:s.Fragment,d=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(a.BailoutToCSRForNextDynamic,{children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(u,{...o?{fallback:i}:{},children:d})}return u.displayName="LoadableComponent",u}},52157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return o}});let r=e.r(18050),s=e.r(74080),a=e.r(63599),l=e.r(9885),i=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=a.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={createReactBrowserBailoutReason:function(){return l},getReactBrowserBailoutReason:function(){return i},isNextBrowserBailoutError:function(){return o}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let a=Symbol.for("next.browser-bailout-reason");function l(e){return{$$typeof:a,reason:e}}function i(e){let t=e?.cause;return t?.$$typeof===a?t.reason:void 0}function o(e){return void 0!==i(e)}},65856,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return r}});let r=(e.r(55682)._(e.r(71645))).default.createContext(null)},98879,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return i}});let r=e.r(71645),s="u"<typeof window,a=s?()=>{}:r.useLayoutEffect,l=s?()=>{}:r.useEffect;function i(e){let{headManager:t,reduceComponentsToState:n}=e;function i(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(e))}}return s&&(t?.mountedInstances?.add(e.children),i()),a(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),a(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},40192,54105,19877,e=>{"use strict";var t=e.i(22219);e.s(["z",0,t],40192),e.s(["z",0,t],54105),e.s(["z",0,t],19877)},13581,29487,e=>{"use strict";var t=e.i(71645),n=e.i(95813);e.s(["f",0,function(e,r=0){let[s,a]=(0,t.useState)(),[l,i]=(0,t.useState)(""),[o,c]=(0,t.useState)(!0),u=(0,t.useRef)(void 0),d=(0,t.useRef)(!1),p=(0,t.useCallback)(async()=>{u.current?.abort();let t=new AbortController;u.current=t;try{let n=await e(t.signal);if(t.signal.aborted||!d.current)return;a(n),i("")}catch(e){!t.signal.aborted&&d.current&&i((0,n.f)(e))}finally{!t.signal.aborted&&d.current&&c(!1)}},[e]);return(0,t.useEffect)(()=>{d.current=!0,queueMicrotask(()=>{d.current&&p()});let e=r>0?setInterval(()=>{p()},r):void 0;return()=>{d.current=!1,u.current?.abort(),clearInterval(e)}},[p,r]),{data:s,error:l,isLoading:o,refresh:p}}],13581);var r=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:n}){return(0,r.jsxs)(r.Fragment,{children:[e?(0,r.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,r.jsxs)("div",{className:"error",role:"alert",children:[(0,r.jsx)("p",{children:t}),(0,r.jsx)(s.f,{variant:"outline",onClick:()=>{n()},children:"Try again"})]}):void 0]})}],29487)},33103,e=>{"use strict";var t=e.i(18050),n=e.i(70703),r=e.i(71645),s=e.i(73656),a=e.i(95813),l=e.i(13581),i=e.i(19455),o=e.i(93479),c=e.i(24687),u=e.i(22219),u=u,d=e.i(40192),p=e.i(54105);let h=u.enum(["none","headers","oauth"]),f=u.enum(["auto","streamable-http","sse"]),g=d.z.record(p.z.string(),p.z.string()),m=[{value:"none",label:"No authentication"},{value:"headers",label:"Token or custom headers"},{value:"oauth",label:"Sign in with OAuth"}],j=[{value:"auto",label:"Automatic"},{value:"streamable-http",label:"Streamable HTTP"},{value:"sse",label:"Legacy HTTP/SSE"}];function b({connection:e,busy:n,perform:a,onDirtyChange:l}){let[u,d]=(0,r.useState)(e.endpoint),[p,x]=(0,r.useState)(e.authMode),[v,y]=(0,r.useState)(e.transport),[w,S]=(0,r.useState)(""),[C,k]=(0,r.useState)(""),[_,N]=(0,r.useState)(""),[P,O]=(0,r.useState)(""),[R,A]=(0,r.useState)(""),[M,z]=(0,r.useState)(""),I=u!==e.endpoint||p!==e.authMode||v!==e.transport||!!(w||C),E=I||!!(P||R||M);return(0,r.useEffect)(()=>(l(E),()=>{l(!1)}),[E,l]),(0,t.jsxs)("div",{className:"space-y-3",children:["oauth"===e.authMode?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Registered OAuth application (optional)"}),(0,t.jsxs)("label",{className:"block",children:["Client ID",(0,t.jsx)(o.f,{value:P,onChange:e=>{O(e.target.value)}})]}),(0,t.jsxs)("label",{className:"block",children:["Client secret",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:R,onChange:e=>{A(e.target.value)}})]}),(0,t.jsxs)("label",{className:"block",children:["Client metadata URL",(0,t.jsx)(o.f,{type:"url",value:M,onChange:e=>{z(e.target.value)}})]}),(0,t.jsxs)("p",{className:"small",children:["Register ",(0,t.jsx)("code",{children:"/oauth/mcp/callback"})," on your configured OrgSDK public origin as the callback URL."]})]}),(0,t.jsx)(i.f,{disabled:n||I,onClick:()=>{a(async()=>{let t=await s.V.plugins.mcp.beginOAuth.mutate({id:e.pluginId,...P&&{client_id:P},...R&&{client_secret:R},...M&&{client_metadata_url:M}});O(""),A(""),z(""),l(!1),N(t.authorization_url)},"Open the sign-in link, finish authorization, then check the connection.")},children:e.authenticated?"Reconnect account":"Sign in"}),_?(0,t.jsx)("a",{className:"underline",href:_,target:"_blank",rel:"noopener noreferrer",children:"Continue to server sign-in"}):null]}):null,(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Update connection"}),(0,t.jsx)("p",{children:"Saving disables this connection until its tools are checked and reviewed again."}),(0,t.jsxs)("label",{className:"block",children:["Server URL",(0,t.jsx)(o.f,{type:"url",value:u,onChange:e=>{d(e.target.value)}})]}),(0,t.jsxs)("label",{className:"block",children:["Authentication",(0,t.jsx)("select",{className:"field",value:p,onChange:e=>{x(h.parse(e.target.value))},children:m.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),"headers"===p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"block",children:["Replacement bearer token",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:w,onChange:e=>{S(e.target.value)}})]}),(0,t.jsxs)("label",{className:"block",children:["Replacement custom headers (JSON)",(0,t.jsx)(c.f,{value:C,onChange:e=>{k(e.target.value)},placeholder:'{"X-API-Key":"..."}'})]}),(0,t.jsx)("p",{className:"small",children:"Leave credential fields empty to keep existing credentials at the same endpoint."})]}):null,(0,t.jsxs)("label",{className:"block",children:["Connection transport",(0,t.jsx)("select",{className:"field",value:v,onChange:e=>{y(f.parse(e.target.value))},children:j.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsx)(i.f,{disabled:n||!I,onClick:()=>{a(async()=>{let t=C.trim()?g.parse(JSON.parse(C)):{};await s.V.plugins.mcp.update.mutate({id:e.pluginId,endpoint:u,transport:v,auth_mode:p,..."headers"===p&&(w||C)&&{headers:{...t,...w&&{Authorization:`Bearer ${w}`}}}}),S(""),k("")})},children:"Save connection changes"})]})]})}var x=e.i(29487);function v({plugin:e,canManage:n,onChanged:o,onDirtyChange:c}){let u=(0,r.useCallback)(t=>s.V.plugins.mcp.get.query({id:e.id},{signal:t}),[e.id]),d=(0,l.f)(u),p=d.refresh,[h,f]=(0,r.useState)(null),[g,m]=(0,r.useState)(!1),[j,y]=(0,r.useState)(""),[w,S]=(0,r.useState)(""),[C,k]=(0,r.useState)(!1),_=C||null!==h;(0,r.useEffect)(()=>(c(e.id,_),()=>{c(e.id,!1)}),[e.id,_,c]);let N=d.data;(0,r.useEffect)(()=>{if(N?.status!=="checking")return;let e=setInterval(()=>{p()},2e3);return()=>{clearInterval(e)}},[N?.status,p]);let P=async(e,t="")=>{m(!0),y(""),S("");try{await e(),await d.refresh(),await o(),S(t)}catch(e){y((0,a.f)(e))}finally{m(!1)}},O=N?.candidate,R=O?.tools.filter(e=>N?.enabledTools.includes(e.name)&&N.catalogue.some(t=>{let{alias:n,...r}=t;return JSON.stringify(r)===JSON.stringify(e)})).map(e=>e.name)??[],A=h??R;return(0,t.jsxs)("article",{className:"rounded-lg border p-4 space-y-3","aria-label":`MCP ${e.slug}`,children:[(0,t.jsx)("h3",{children:e.slug}),(0,t.jsx)(x.f,{...d}),N?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"break-all small",children:N.endpoint}),(0,t.jsxs)("p",{children:[e.enabled?"Enabled":"Disabled"," ·"," ",N.enabledTools.length," tools selected"]}),"ready"===N.runner?null:(0,t.jsx)("p",{role:"status",children:"offline"===N.runner?"Connect the project runner to check or use this server.":"Upgrade the project runner to enable MCP connections."}),"checking"===N.status?(0,t.jsx)("p",{role:"status",children:N.discovery?.status==="queued"?"Waiting for the project runner…":"Checking connection and available tools…"}):null,"authentication_required"===N.status?(0,t.jsx)("p",{role:"status",children:"This server requires authentication. Sign in or update its credentials."}):null,"failed"===N.status?(0,t.jsxs)("p",{role:"alert",children:["Connection check failed. ",N.discovery?.error]}):null,N.checkedAt?(0,t.jsxs)("p",{className:"small",children:["Last checked ",new Date(N.checkedAt).toLocaleString()]}):null,n?(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(i.f,{disabled:g||"ready"!==N.runner||"checking"===N.status,onClick:()=>{f(null),P(()=>s.V.plugins.mcp.discover.mutate({id:e.id}))},children:"Check connection / refresh tools"}),(0,t.jsx)(i.f,{variant:"outline",disabled:g||!e.enabled&&0===N.enabledTools.length,onClick:()=>{P(()=>s.V.plugins.update.mutate({id:e.id,enabled:!e.enabled}),e.enabled?"Connection disabled. Active runs are being cancelled.":"Connection enabled.")},children:e.enabled?"Disable":"Enable"}),(0,t.jsx)(i.f,{variant:"outline",disabled:g,onClick:()=>{P(()=>s.V.plugins.delete.mutate({id:e.id}))},children:"Remove"})]}):null,O&&!O.authRequired?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h4",{children:"Review available tools"}),(0,t.jsx)("p",{children:"Only selected tools become available to this project. Changed tools need your review again."}),O.tools.map(e=>{var r;return(0,t.jsxs)("div",{className:"block rounded border p-2",children:[(0,t.jsxs)("label",{children:[(0,t.jsx)("input",{type:"checkbox",disabled:!n||g,checked:A.includes(e.name),onChange:t=>{f(t.target.checked?[...A,e.name]:A.filter(t=>t!==e.name))}})," ",(0,t.jsx)("strong",{children:e.name})]}),(0,t.jsx)("span",{className:"small",children:(r=e.name,R.includes(r)?"Enabled, unchanged":N?.catalogue.some(e=>e.name===r)?"Review changes":"New tool")}),(0,t.jsx)("p",{className:"small",children:e.description}),(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Tool contract"}),(0,t.jsx)("pre",{className:"overflow-auto",children:JSON.stringify({inputSchema:e.inputSchema,outputSchema:e.outputSchema},null,2)})]})]},e.name)}),N.enabledTools.some(e=>O.tools.every(t=>t.name!==e))?(0,t.jsxs)("p",{role:"status",children:["Removed by the server:"," ",N.enabledTools.filter(e=>O.tools.every(t=>t.name!==e)).join(", "),". Accepting this catalogue removes their access and cancels affected runs."]}):null,0===O.tools.length?(0,t.jsx)("p",{children:"This server exposes no tools."}):null,n?(0,t.jsx)(i.f,{disabled:g,onClick:()=>{let t=N.discoveryRunId;t&&P(async()=>{await s.V.plugins.mcp.accept.mutate({id:e.id,run:t,tools:A}),f(null)},"Selected tools are ready for code and actions.")},children:"Enable selected tools"}):null]}):null,N.catalogue.length>0?(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Enabled tool reference"}),N.catalogue.filter(e=>N.enabledTools.includes(e.name)).map(n=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("code",{children:[e.slug.replaceAll(/-([a-z])/g,(e,t)=>t.toUpperCase()),".",n.alias,"(args)"]}),(0,t.jsx)("pre",{className:"overflow-auto",children:JSON.stringify(n.inputSchema,null,2)})]},n.name))]}):null,n?(0,t.jsx)(b,{connection:N,busy:g,perform:P,onDirtyChange:k},N.revision):null]}):null,j?(0,t.jsx)("p",{role:"alert",children:j}):null,w?(0,t.jsx)("p",{role:"status",children:w}):null]})}function y({project:e,onSaved:n,onDirtyChange:l}){let[u,d]=(0,r.useState)(""),[p,b]=(0,r.useState)(""),[x,v]=(0,r.useState)("auto"),[w,S]=(0,r.useState)("none"),[C,k]=(0,r.useState)(""),[_,N]=(0,r.useState)(""),[P,O]=(0,r.useState)(!1),[R,A]=(0,r.useState)(""),M=!!(u||p||C||_);return(0,r.useEffect)(()=>(l(M),()=>{l(!1)}),[M,l]),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:t=>{t.preventDefault(),O(!0),A(""),(async()=>{try{let t=_.trim()?g.parse(JSON.parse(_)):{};await s.V.plugins.mcp.create.mutate({project:e,slug:u,endpoint:p,transport:x,auth_mode:w,..."headers"===w&&{headers:{...t,...C&&{Authorization:`Bearer ${C}`}}}}),d(""),b(""),k(""),N(""),await n()}catch(e){A((0,a.f)(e))}finally{O(!1)}})()},children:[(0,t.jsx)("h3",{children:"Connect MCP server"}),(0,t.jsx)("p",{children:"Add a server, check its connection, then choose the tools this project can use."}),(0,t.jsxs)("label",{className:"block",children:["Connection name",(0,t.jsx)(o.f,{required:!0,value:u,onChange:e=>{d(e.target.value)},placeholder:"customer-tools",pattern:"[a-z][a-z0-9]*(-[a-z][a-z0-9]*)*"})]}),(0,t.jsxs)("label",{className:"block",children:["Server URL",(0,t.jsx)(o.f,{required:!0,type:"url",value:p,onChange:e=>{b(e.target.value)},placeholder:"https://example.com/mcp"})]}),(0,t.jsxs)("label",{className:"block",children:["Authentication",(0,t.jsx)("select",{className:"field",value:w,onChange:e=>{S(h.parse(e.target.value))},children:m.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),"headers"===w?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"block",children:["Bearer token",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:C,onChange:e=>{k(e.target.value)}})]}),(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Custom authentication headers"}),(0,t.jsxs)("label",{className:"block",children:["Headers as a JSON object",(0,t.jsx)(c.f,{value:_,onChange:e=>{N(e.target.value)},placeholder:'{"X-API-Key":"..."}'})]})]})]}):null,(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Transport settings"}),(0,t.jsxs)("label",{className:"block",children:["Connection transport",(0,t.jsx)("select",{className:"field",value:x,onChange:e=>{v(f.parse(e.target.value))},children:j.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),R?(0,t.jsx)("p",{role:"alert",children:R}):null,(0,t.jsx)(i.f,{disabled:P,type:"submit",children:P?"Saving…":"Add connection"})]})}function w({project:e,plugins:n,canManage:s,onChanged:a,onDirtyChange:l}){let[i,o]=(0,r.useState)({}),c=Object.values(i).some(Boolean),u=(0,r.useCallback)((e,t)=>{o(n=>n[e]===t?n:{...n,[e]:t})},[]),d=(0,r.useCallback)(e=>{u("create",e)},[u]);return(0,r.useEffect)(()=>(l(c),()=>{l(!1)}),[c,l]),(0,t.jsxs)("section",{className:"panel space-y-4",children:[(0,t.jsx)("h2",{children:"Remote MCP connections"}),(0,t.jsx)("p",{children:"Use tools from your own servers in this project’s code and actions. Connections run from the project runner."}),n.map(e=>(0,t.jsx)(v,{plugin:e,canManage:s,onChanged:a,onDirtyChange:u},e.id)),s?(0,t.jsx)(y,{project:e,onSaved:a,onDirtyChange:d},e):(0,t.jsx)("p",{children:"Ask an administrator to connect a server or change tool access."})]})}var S=e.i(23920);async function C(e){return s.V.plugins.marketplace.query(void 0,{signal:e})}function k({releases:e}){let n=(0,l.f)(C),[s,a]=(0,r.useState)(""),i=s.trim().toLowerCase().split(/\s+/).filter(Boolean),c=(n.data??[]).filter(t=>{let n=[t.display_name,t.description,t.category,...t.tags,...t.use_cases].join(" ").toLowerCase();return e.every(e=>e.slug!==t.slug)&&i.every(e=>n.includes(e))});return(0,t.jsxs)("section",{className:"panel space-y-4",children:[(0,t.jsx)("h2",{children:"Discover plugins"}),(0,t.jsx)("p",{children:"Explore the OrgSDK plugin catalog. Plugins without a published release can be inspected on the website; installation becomes available when a compatible release is published."}),(0,t.jsx)("a",{className:"underline",href:"https://orgsdk.ai/plugins",target:"_blank",rel:"noreferrer",children:"Browse plugins on orgsdk.ai ↗"}),(0,t.jsxs)("label",{className:"block",children:["Search plugin catalog",(0,t.jsx)(o.f,{type:"search",value:s,onChange:e=>{a(e.target.value)},placeholder:"Search names, categories or use cases"})]}),(0,t.jsx)(x.f,{...n}),n.isLoading||n.error||0!==c.length?null:(0,t.jsx)("p",{children:"No additional plugins match this search."}),(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:c.map(e=>(0,t.jsxs)("article",{className:"rounded-lg border p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(S.f,{catalogSlug:e.slug,url:"string"==typeof e.icon_url?e.icon_url:""}),(0,t.jsx)("h3",{children:e.display_name})]}),(0,t.jsxs)("p",{className:"small",children:[e.category," ·"," ","available"===e.release_status?"Release listed on marketplace":"Awaiting release"]}),(0,t.jsx)("p",{children:e.description}),"number"==typeof e.tool_count?(0,t.jsxs)("p",{className:"small",children:[e.tool_count," functions"]}):null,(0,t.jsx)("ul",{className:"my-3 list-inside list-disc text-sm",children:e.use_cases.map(e=>(0,t.jsx)("li",{children:e},e))}),(0,t.jsxs)("a",{className:"inline-flex min-h-11 items-center underline",href:e.url,target:"_blank",rel:"noreferrer",children:["Explore ",e.display_name," ↗"]})]},e.slug))})]})}function _({plugin:e,auth:n,onConnected:l}){let[c,u]=(0,r.useState)(`${e.slug} connection`),[d,p]=(0,r.useState)(""),[h,f]=(0,r.useState)(""),[g,m]=(0,r.useState)(""),[j,b]=(0,r.useState)(!1),[x,v]=(0,r.useState)(""),y=n.provider;if(!y)return null;let w=async()=>{b(!0),v("");try{if("oauth2"===n.type){let t=await s.V.credentials.beginOAuth.mutate({plugin:e.id,name:c,client_id:h,client_secret:g});m(""),location.assign(t.authorization_url);return}let t="github"===e.slug?"secret_token":"secret_apiKey",r=await s.V.credentials.create.mutate({name:c,provider:y,secret:{[t]:d}});p(""),await l(r.id)}catch(e){v((0,a.f)(e))}finally{b(!1)}};return(0,t.jsxs)("details",{className:"my-4 rounded-lg border p-4",children:[(0,t.jsxs)("summary",{children:["Connect ",n.label??e.slug]}),(0,t.jsxs)("label",{children:["Connection name",(0,t.jsx)(o.f,{value:c,onChange:e=>{u(e.target.value)},disabled:j})]}),"oauth2"===n.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{children:"Use your own OAuth application. Register this redirect URL:"}),(0,t.jsxs)("code",{className:"break-all",children:[(0,s.U)(),"/oauth/callback"]}),(0,t.jsxs)("label",{children:["Client ID",(0,t.jsx)(o.f,{value:h,onChange:e=>{f(e.target.value)},disabled:j})]}),(0,t.jsxs)("label",{children:["Client secret",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:g,onChange:e=>{m(e.target.value)},disabled:j})]})]}):(0,t.jsxs)("label",{children:[n.label??"API token",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:d,onChange:e=>{p(e.target.value)},disabled:j})]}),(0,t.jsx)(i.f,{type:"button",className:"mt-3",disabled:j||!c.trim()||("oauth2"===n.type?!h||!g:!d),onClick:()=>{w()},children:"Connect"}),x?(0,t.jsx)("p",{role:"alert",children:x}):null]})}var N=e.i(78688);function P({slug:e,metadata:n}){let{tools:s,isComplete:a}=(0,N.o)(n),[l,i]=(0,r.useState)(""),c=l.trim().toLowerCase().split(/\s+/).filter(Boolean),u=s.filter(e=>c.every(t=>`${e.name} ${e.description}`.toLowerCase().includes(t))),d=e.replaceAll(/-([a-z])/g,(e,t)=>t.toUpperCase());return(0,t.jsxs)("details",{className:"my-3 min-w-0 rounded-lg border p-3",children:[(0,t.jsxs)("summary",{children:["Capabilities · ",s.length," functions"]}),a?null:(0,t.jsx)("p",{className:"small",children:"Function information is incomplete for this release."}),s.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"my-3 block",children:["Find a function",(0,t.jsx)(o.f,{type:"search",value:l,onChange:e=>{i(e.target.value)},placeholder:"Search functions or descriptions"})]}),(0,t.jsxs)("p",{className:"small",role:"status",children:[u.length," of ",s.length," functions"]}),(0,t.jsx)("div",{className:"max-h-80 space-y-3 overflow-auto",children:u.map(e=>(0,t.jsxs)("details",{className:"min-w-0 rounded border p-3",children:[(0,t.jsx)("summary",{className:"break-words",children:(0,t.jsxs)("code",{children:[d,".",e.name]})}),(0,t.jsx)("p",{className:"small my-2",children:e.description}),(0,t.jsx)("dl",{className:"space-y-2 text-sm",children:e.parameters.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("dt",{className:"break-words font-medium",children:[e.name,e.optional?" (optional)":"",":"," ",(0,t.jsx)("code",{children:e.type})]}),e.description?(0,t.jsx)("dd",{children:e.description}):null]},e.name))}),e.returnType?(0,t.jsxs)("p",{className:"small mt-2 break-words",children:["Returns: ",(0,t.jsx)("code",{children:e.returnType})]}):null]},e.name))}),0===u.length?(0,t.jsx)("p",{children:"No matching functions."}):null]}):(0,t.jsx)("p",{className:"small",children:"No functions are declared in this metadata."})]})}var O=e.i(85951),R=e.i(79258),A=e.i(56420);let M={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};M.node;let z=(0,A.f)(M);var I=e.i(19877),E=e.i(15080),L=e.i(59037),T=e.i(87309),$=e.i(94757),D=e.i(75016);let U=(0,n.default)(async()=>{let t=await e.A(96001);return t.configureMonaco(),t.default},{loadableGenerated:{modules:[160]},ssr:!1}),B='export const safeFunctions = [{\n name: "greet",\n handler: (name: string) => `Hello, ${name}!`\n}];',F=d.z.record(p.z.string(),I.z.json());async function q(e){let[t,n]=await Promise.all([(0,E.p)(e),(0,E._)(e)]);return{plugins:t,credentials:n}}async function V(e){return s.V.plugins.catalog.query(void 0,{signal:e})}function W({canManage:e,onDirtyChange:n}){let u=(0,l.f)(q),d=(0,l.f)(V),p=(d.data??[]).filter((e,t,n)=>n.findIndex(t=>t.slug===e.slug)===t),{selected:h,projects:f}=(0,$.useWorkspace)(),g=f.find(e=>e.id===h),m=(u.data?.plugins??[]).filter(e=>e.project===h),[j,b]=(0,r.useState)(""),[v,y]=(0,r.useState)(""),C=v.trim().toLowerCase().split(/\s+/).filter(Boolean),A=p.filter(e=>{let t=[e.display_name,e.description,e.category,...(0,N.o)(e.tools).tools.map(e=>`${e.name} ${e.description}`)].join(" ").toLowerCase();return C.every(e=>t.includes(e))}),[M,I]=(0,r.useState)(""),[E,J]=(0,r.useState)("1.0.0"),[G,H]=(0,r.useState)(""),[K,Q]=(0,r.useState)(B),[X,Y]=(0,r.useState)(""),[Z,ee]=(0,r.useState)("{}"),et=m.find(e=>e.id===j),en=et?.distribution==="external",er=(0,N.u)(et?.auth),[es,ea]=(0,r.useState)(!1),[el,ei]=(0,r.useState)(""),[eo,ec]=(0,r.useState)(""),eu=JSON.stringify({slug:M,version:E,description:G,source:K,credential:X,configuration:Z}),[ed,ep]=(0,r.useState)(JSON.stringify({slug:"",version:"1.0.0",description:"",source:B,credential:"",configuration:"{}"})),[eh,ef]=(0,r.useState)(!1),eg=eu!==ed,em=(0,T.h)();if((0,L.f)(eg||eh,n),!g)return(0,t.jsxs)("section",{className:"panel space-y-4",children:[(0,t.jsx)("h2",{children:"Project plugins"}),(0,t.jsx)("p",{children:"Create a project before installing and configuring its tools."}),(0,t.jsx)(D.f,{href:"/projects/?new=1",children:"Create project"})]});let ej=e=>{let t={slug:e?.slug??"",version:e?.version??"1.0.0",description:e?.description??"",source:e?.source??B,credential:e?.credential??"",configuration:JSON.stringify(e?.configuration??{},null,2)};b(e?.id??""),I(t.slug),J(t.version),H(t.description),Q(t.source),Y(t.credential),ee(t.configuration),ep(JSON.stringify(t))},eb=async e=>{(!eg||await em())&&ej(e)},ex=async e=>{ea(!0),ei(""),ec("");try{await e(),await u.refresh()}catch(e){ei((0,a.f)(e))}finally{ea(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{project:h,plugins:m.filter(e=>"mcp"===e.distribution),canManage:e,onChanged:u.refresh,onDirtyChange:ef}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Plugin marketplace"}),(0,t.jsxs)("p",{children:["Install optional tools for ",g.name," from the external marketplace. This project owns its plugin configuration and credentials."]}),(0,t.jsxs)("p",{className:"small mt-3",children:["Project: ",(0,t.jsx)("strong",{children:g.name})]}),(0,t.jsx)(x.f,{...d}),(0,t.jsxs)("label",{className:"my-4 block",children:["Find plugins or capabilities",(0,t.jsx)(o.f,{type:"search",value:v,onChange:e=>{y(e.target.value)},placeholder:"Search plugins, functions or descriptions"})]}),d.isLoading||d.error||!(p.length>0)||0!==A.length?null:(0,t.jsx)("p",{children:"No plugins match this search."}),d.isLoading||d.error||d.data?.length!==0?null:(0,t.jsx)("p",{children:"No external releases are available from the configured marketplace. Your projects can run without plugins."}),(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:A.map(n=>{let r=m.find(e=>e.slug===n.slug);return(0,t.jsxs)("article",{className:"min-w-0 rounded-lg border p-4","aria-label":n.display_name,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(S.f,{catalogSlug:n.slug,url:(0,N.g)(n.marketplace)}),(0,t.jsx)("h3",{children:n.display_name})]}),(0,t.jsxs)("p",{className:"small",children:[n.category," · v",n.version]}),(0,t.jsx)("p",{children:n.description}),(0,t.jsx)(P,{slug:n.slug,metadata:n.tools}),(0,t.jsx)("p",{className:"small",children:n.package_url?"Downloadable package. The runner installs this pinned release for the selected project.":"Local package. Install this package on the selected project’s runner first using the executor CLI with --file. Saving its configuration here does not install the package."}),e&&r?.distribution==="external"&&r.digest!==n.digest?(0,t.jsx)(i.f,{variant:"outline",disabled:es,onClick:()=>{ex(async()=>{eg&&!await em()||(ej(await s.V.plugins.update.mutate({id:r.id,version:n.version,refresh_bundle:!0})),ec("Plugin updated for future runs. Older runs still require their original executor image."))})},children:"Update plugin"}):null,(0,t.jsxs)("details",{className:"my-3",children:[(0,t.jsx)("summary",{children:"Documentation"}),(0,t.jsx)("p",{className:"small",children:"Upstream reference documentation. Use the connection form below for this installation."}),(0,t.jsx)(O.f,{className:"max-h-80 overflow-auto",content:n.documentation})]}),r?(0,t.jsx)(i.f,{variant:"outline",onClick:()=>{eb(r)},children:"Configure"}):null,!r&&e?(0,t.jsx)(i.f,{disabled:es,onClick:()=>{ex(async()=>{eg&&!await em()||(ej(await s.V.plugins.create.mutate({project:h,slug:n.slug,version:n.version,distribution:"external",enabled:!0})),ec("Plugin enabled for the selected project. The runner downloads and verifies its package. Connect credentials if required."))})},children:"Enable plugin"}):null,r||e?null:(0,t.jsx)("p",{children:"Ask an administrator to enable this plugin."})]},n.slug)})})]}),(0,t.jsx)(k,{releases:d.data??[]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)(x.f,{...u}),(0,t.jsx)("div",{className:"panel-title",children:(0,t.jsxs)("h2",{children:[(0,t.jsx)(R.f,{size:18})," Installed plugins"]})}),u.isLoading||u.error||0!==m.length?void 0:(0,t.jsxs)("div",{className:"resource-empty",children:[(0,t.jsx)(R.f,{size:30}),(0,t.jsx)("h3",{children:"No plugins installed"}),(0,t.jsx)("p",{children:"Installed plugins will appear here. Ask your workspace administrator to provision reviewed tools."})]}),m.filter(e=>"mcp"!==e.distribution).map(n=>(0,t.jsxs)("div",{className:"resource-row",children:[(0,t.jsx)(S.f,{catalogSlug:"external"===n.distribution?n.slug:void 0,url:n.icon_url,size:24}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"string"==typeof n.display_name?n.display_name:n.slug}),(0,t.jsxs)("small",{children:[g.name," · v",n.version," ·"," ",n.enabled?"Enabled":"Disabled"," ·"," ",n.description]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(i.f,{variant:"outline",size:"sm",onClick:()=>{eb(n)},children:"Inspect"}),e?(0,t.jsxs)(i.f,{variant:"ghost",size:"sm",disabled:es,onClick:()=>{ex(async()=>{await s.V.plugins.update.mutate({id:n.id,enabled:!n.enabled}),ec(n.enabled?"Plugin disabled for future runs.":"Plugin enabled.")})},children:[(0,t.jsx)(z,{size:13}),n.enabled?"Disable":"Enable"]}):void 0]})]},n.id))]}),j?(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("h2",{children:["Plugin: ",M]}),et?.distribution==="external"?(0,t.jsx)(P,{slug:et.slug,metadata:et.tools}):null,(0,t.jsx)("p",{className:"small",children:en?"This plugin comes from an external release. Select a matching credential and configure it below.":"Changed source requires a new version. Existing runs keep their pinned plugin source."}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),ex(async()=>{let e={version:E,description:G,...en?{configuration:F.parse(JSON.parse(Z))}:{source:K},credential:X||null};await s.V.plugins.update.mutate({id:j,...e}),ep(eu),ec("Plugin saved for its project.")})},children:[(0,t.jsxs)("div",{className:"row",children:[(0,t.jsxs)("label",{children:["Plugin slug",(0,t.jsx)(o.f,{required:!0,value:M,disabled:!0,onChange:e=>{I(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Plugin version",(0,t.jsx)(o.f,{required:!0,value:E,disabled:en||es||!e,onChange:e=>{J(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Plugin credential",(0,t.jsxs)("select",{value:X,disabled:es||!e,onChange:e=>{Y(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"No credential"}),u.data?.credentials.filter(e=>!en||e.provider===er.provider).map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]}),(0,t.jsxs)("label",{children:["Description",(0,t.jsx)(o.f,{value:G,disabled:es||!e,onChange:e=>{H(e.target.value)}})]}),en?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"small",children:er.hint??"No additional setup instructions."}),(0,t.jsx)("p",{children:(0,t.jsx)(D.f,{href:"/credentials/",children:"Manage credentials"})}),(0,t.jsxs)("label",{children:["Configuration (JSON)",(0,t.jsx)(c.f,{value:Z,disabled:es||!e,onChange:e=>{ee(e.target.value)}})]})]}):(0,t.jsxs)("div",{className:"source-pane",children:[(0,t.jsxs)("div",{className:"source-toolbar",children:[(0,t.jsx)("span",{children:"plugin.ts"}),(0,t.jsx)("span",{children:"TypeScript safe-functions"})]}),(0,t.jsx)("div",{className:"desktop-editor",children:(0,t.jsx)(U,{actionId:`plugin-${j||"new"}`,value:K,onChange:Q,readOnly:es||!e})}),(0,t.jsx)("div",{className:"mobile-editor",children:(0,t.jsxs)("label",{children:["Plugin source",(0,t.jsx)(c.f,{className:"code",rows:12,value:K,readOnly:es||!e,onChange:e=>{Q(e.target.value)}})]})})]}),e?(0,t.jsx)(i.f,{type:"submit",className:"mt-4",disabled:es||!M.trim()||!E.trim(),children:"Save plugin"}):(0,t.jsx)("p",{className:"small",children:"Only owners and admins can update plugins."}),e&&j?(0,t.jsx)(i.f,{type:"button",variant:"outline",className:"ml-3 mt-4",disabled:es,onClick:()=>{ex(async()=>{await em({title:"Remove this plugin?",description:"Its tools will be removed from future project runs. Existing runs retain their pinned source.",actionLabel:"Remove plugin"})&&(await s.V.plugins.delete.mutate({id:j}),ej(),ec("Plugin removed."))})},children:"Remove plugin"}):void 0]}),en&&e&&!eg?(0,t.jsx)(_,{plugin:et,auth:er,onConnected:async e=>{try{let t=await s.V.plugins.update.mutate({id:et.id,credential:e});ej(t),ec("Credential connected for this project’s plugin.")}finally{await u.refresh()}}},et.id):null]}):void 0,el?(0,t.jsx)("p",{className:"error",role:"alert",children:el}):void 0,eo?(0,t.jsx)("p",{className:"notice",role:"status",children:eo}):void 0]})}e.s(["default",0,function(){let{canManage:e,setDirty:n,selected:r}=(0,$.useWorkspace)();return(0,t.jsx)(W,{canManage:e,onDirtyChange:n},r)}],33103)},24687,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(39689);let s=n.forwardRef(({className:e,...n},s)=>(0,t.jsx)("textarea",{className:(0,r.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...n}));s.displayName="Textarea",e.s(["f",0,s])},23920,e=>{"use strict";var t=e.i(18050),n=e.i(5500),n=n,r=e.i(79258),s=e.i(71645);let a=new Map([["asana","/plugins/icons/asana.ico"],["browser","/plugins/icons/browser-cdp.png"],["browser-cdp","/plugins/icons/browser-cdp.png"],["data","/plugins/icons/data.svg"],["facebook","/plugins/icons/facebook.svg"],["github","/plugins/icons/github.svg"],["gmail","/plugins/icons/gmail.svg"],["google-drive","/plugins/icons/google-drive.svg"],["google-sheets","/plugins/icons/google-sheets.svg"],["google-tasks","/plugins/icons/google-tasks.svg"],["harvest","/plugins/icons/harvest.svg"],["linkedin","/plugins/icons/linkedin.png"],["llm","/plugins/icons/llm.svg"],["serper","/plugins/icons/serper.png"],["servicem8","/plugins/icons/servicem8.png"],["shippo","/plugins/icons/shippo.png"],["shopify","/plugins/icons/shopify.png"],["twitter","/plugins/icons/twitter.svg"],["xero","/plugins/icons/xero.svg"],["zendesk","/plugins/icons/zendesk.svg"]]);e.s(["f",0,function({url:e,catalogSlug:l="",size:i=32}){let o=a.get(l)??"",c=function(e){if(!e)return"";try{let t=new URL(e);return"https:"!==t.protocol||t.username||t.password?"":t.href}catch{return""}}(e),[u,d]=(0,s.useState)([]),p=[o&&c===`https://orgsdk.ai${o}`?o:c,o].find(e=>e.length>0&&!u.includes(e));return p?(0,t.jsx)(n.Image,{src:p,alt:"",width:i,height:i,unoptimized:!0,referrerPolicy:"no-referrer",className:"shrink-0 object-contain",onError:()=>{d(e=>[...e,p])}}):(0,t.jsx)(r.f,{size:i,className:"shrink-0","aria-hidden":"true"})}],23920)},59037,e=>{"use strict";var t=e.i(71645);e.s(["f",0,function(e,n){(0,t.useEffect)(()=>{n(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),n(!1)}},[e,n])}])},78688,e=>{"use strict";function t(e){return null===e||"object"!=typeof e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e))}function n(e){return"string"==typeof e?e:""}e.s(["o",0,function(e){if(!Array.isArray(e))return{tools:[],isComplete:!1};let r=[],s=!0;for(let a of e){let e=t(a),l=n(e.name);if(!l){s=!1;continue}let i=[];if(Array.isArray(e.parameters))for(let r of e.parameters){let e=t(r);if(!n(e.name)){s=!1;continue}i.push({name:n(e.name),type:n(e.type),description:n(e.description),optional:!0===e.optional})}r.push({name:l,description:n(e.description),parameters:i,returnType:n(e.returnType)})}return{tools:r,isComplete:s}},"u",0,function(e){let n=t(e);return{..."string"==typeof n.type&&{type:n.type},..."string"==typeof n.provider&&{provider:n.provider},..."string"==typeof n.label&&{label:n.label},..."string"==typeof n.hint&&{hint:n.hint}}},"g",0,function(e){return n(t(e).icon_url)}])}]);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],11241)},51757,e=>{"use strict";var t=e.i(56420);let r={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],51757)},62368,e=>{"use strict";var t=e.i(56420);let r={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],62368)},26091,e=>{"use strict";var t=e.i(56420);let r={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],26091)},95925,29272,e=>{"use strict";var t=e.i(56420);let r={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],95925);let i={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};i.node;let s=(0,t.f)(i);e.s(["f",0,s],29272)},66595,e=>{"use strict";var t=e.i(56420);let r={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],66595)},5500,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let n=e.r(55682),i=e.r(90809),s=e.r(18050),a=i._(e.r(71645)),l=n._(e.r(74080)),o=n._(e.r(25633)),c=e.r(8927),d=e.r(65856),u=e.r(49381),f=n._(e.r(1948)),p=e.r(18581);function h(e,t,r,n,i,s,a){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,i=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}n?.current&&n.current(e)}}))}function m(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let g="u"<typeof window?a.useEffect:a.useLayoutEffect,x=(0,a.forwardRef)(({src:e,srcSet:t,sizes:r,height:n,width:i,decoding:l,className:o,style:c,fetchPriority:d,placeholder:u,loading:f,unoptimized:x,fill:y,onLoadRef:v,onLoadingCompleteRef:j,setBlurComplete:b,setShowAltText:w,sizesInput:k,onLoad:_,onError:S,...P},C)=>{let O=(0,a.useRef)(!1),A=(0,a.useRef)(null);g(()=>{let{current:e}=O,{current:t}=A;e||null===t||(S&&(t.src=t.src),t.complete&&h(t,u,v,j,b,x,k),O.current=!0)},[e,u,v,j,S,x,k]);let z=(0,p.useMergedRef)(C,A);return(0,s.jsx)("img",{...P,...m(d),loading:f,width:i,height:n,decoding:l,"data-nimg":y?"fill":"1",className:o,style:c,sizes:r,srcSet:t,src:e,ref:z,onLoad:e=>{h(e.currentTarget,u,v,j,b,x,k)},onError:e=>{w(!0),"empty"!==u&&b(!0),S&&S(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...m(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,s.jsx)(o.default,{children:(0,s.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,a.forwardRef)((e,t)=>{let r=(0,a.useContext)(d.RouterContext),n=(0,u.useImageConfig)(),{onLoad:i,onLoadingComplete:l}=e,o=(0,a.useRef)(i);(0,a.useEffect)(()=>{o.current=i},[i]);let p=(0,a.useRef)(l);(0,a.useEffect)(()=>{p.current=l},[l]);let[h,m]=(0,a.useState)(!1),[g,v]=(0,a.useState)(!1),{props:j,meta:b}=(0,c.getImgProps)(e,{defaultLoader:f.default,imgConf:n,blurComplete:h,showAltText:g});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x,{...j,unoptimized:b.unoptimized,placeholder:b.placeholder,fill:b.fill,onLoadRef:o,onLoadingCompleteRef:p,setBlurComplete:m,setShowAltText:v,sizesInput:e.sizes,ref:t}),b.preload?(0,s.jsx)(y,{isAppRouter:!r,imgAttributes:j}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},49381,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useImageConfig",{enumerable:!0,get:function(){return l}});let n=e.r(71645),i=e.r(87690),s=e.r(18556),a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function l(){let e=(0,n.useContext)(s.ImageConfigContext);return(0,i.prepareImageConfig)(a,e)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class a{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new a}function c(e){let t=Symbol.for(`@next/${e}@16.4.5`),r=globalThis;return r[t]??=o()}function d(e){return l?l.bind(e):a.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(42344)},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let n=e.r(55682)._(e.r(69093));function i(e,t){let r={};"function"==typeof e&&(r.loader=e);let i={...r,...t};return(0,n.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},9885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},70965,(e,t,r)=>{"use strict";function n(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return n}})},8927,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return o}});let n=e.r(43369),i=e.r(88143),s=["-moz-initial","fill","none","scale-down",void 0];function a(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:0/0:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):0/0}function o({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:d=!1,loading:u,className:f,quality:p,width:h,height:m,fill:g=!1,style:x,overrideSrc:y,onLoad:v,onLoadingComplete:j,placeholder:b="empty",blurDataURL:w,fetchPriority:k,decoding:_="async",layout:S,objectFit:P,objectPosition:C,lazyBoundary:O,lazyRoot:A,...z},N){var M;let R,$,{imgConf:I,showAltText:E,blurComplete:L,defaultLoader:T}=N;if(void 0===T)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let U=z.loader||T;delete z.loader,delete z.srcSet;let D="__next_img_default"in U;if(D){if("custom"===I.loader)throw Error(`Image with src "${e}" is missing "loader" prop.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{let e=U;U=t=>{let{config:r,...n}=t;return e(n)}}if(S){"fill"===S&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[S];e&&(x={...x,...e});let r={responsive:"100vw",fill:"100vw"}[S];r&&!t&&(t=r)}let q="",B=l(h),F=l(m);if((M=e)&&"object"==typeof M&&(a(M)||void 0!==M.src)){let t=a(e)?e.default:e;if(!t.src)throw Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`);if(!t.height||!t.width)throw Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`);if(R=t.blurWidth,$=t.blurHeight,w=w||t.blurDataURL,q=t.src,!g)if(B||F){if(B&&!F){let e=B/t.width;F=Math.round(t.height*e)}else if(!B&&F){let e=F/t.height;B=Math.round(t.width*e)}}else B=t.width,F=t.height}let V=!c&&!d&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:q)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,V=!1),I.unoptimized&&(r=!0),D&&!I.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let W=l(p),G=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:P,objectPosition:C}:{},E?{}:{color:"transparent"},x),H=L||"empty"===b?null:"blur"===b?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:B,heightInt:F,blurWidth:R,blurHeight:$,blurDataURL:w||"",objectFit:G.objectFit})}")`:`url("${b}")`,J=s.includes(G.objectFit)?"fill"===G.objectFit?"100% 100%":"cover":G.objectFit,K=H?{backgroundSize:J,backgroundPosition:G.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:H}:{},Q=function({config:e,src:t,unoptimized:r,width:i,quality:s,sizes:a,loader:l}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,n.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,n.getAssetToken)())e=void 0;else if(e){let r=t.indexOf("?");if(-1!==r){let n=new URLSearchParams(t.slice(r+1));n.get("dpl")||(n.append("dpl",e),t=t.slice(0,r)+"?"+n.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:c}=function({deviceSizes:e,allSizes:t},r,n){if(n){let r=/(^|\s)(1?\d?\d)vw/g,i=[];for(let e;e=r.exec(n);)i.push(parseInt(e[2]));if(i.length){let r=.01*Math.min(...i);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,a),d=o.length-1;return{sizes:a||"w"!==c?a:"100vw",srcSet:o.map((r,n)=>`${l({config:e,src:t,quality:s,width:r})} ${"w"===c?r:n+1}${c}`).join(", "),src:l({config:e,src:t,quality:s,width:o[d]})}}({config:I,src:e,unoptimized:r,width:B,quality:W,sizes:t,loader:U}),Y=V?"lazy":u;return{props:{...z,loading:Y,fetchPriority:k,width:B,height:F,decoding:_,className:f,style:{...G,...K},sizes:Q.sizes,srcSet:Q.srcSet,src:y||Q.src},meta:{unoptimized:r,preload:d||c,placeholder:b,fill:g}}}},25633,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},defaultHead:function(){return u}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(55682),a=e.r(90809),l=e.r(18050),o=a._(e.r(71645)),c=s._(e.r(98879)),d=e.r(42732);function u(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let p=["name","httpEquiv","charSet","itemProp"];function h(e){let t,r,n,i;return e.reduce(f,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,n=new Set,i={},e=>{let s=!0,a=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){a=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?s=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?s=!1:r.add(e.type);break;case"meta":for(let t=0,r=p.length;t<r;t++){let r=p[t];if(e.props.hasOwnProperty(r))if("charSet"===r)n.has(r)?s=!1:n.add(r);else{let t=e.props[r],n=i[r]||new Set;("name"!==r||!a)&&n.has(t)?s=!1:(n.add(t),i[r]=n)}}}return s})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let m=function({children:e}){let t=(0,o.useContext)(d.HeadManagerContext);return(0,l.jsx)(c.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},88143,(e,t,r)=>{"use strict";function n({widthInt:e,heightInt:t,blurWidth:r,blurHeight:i,blurDataURL:s,objectFit:a}){let l=r?40*r:e,o=i?40*i:t,c=l&&o?`viewBox='0 0 ${l} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},18556,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let n=e.r(55682)._(e.r(71645)),i=e.r(87690),s=n.default.createContext(i.imageConfigDefault)},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={VALID_LOADERS:function(){return s},imageConfigDefault:function(){return c},prepareImageConfig:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=["default","imgix","cloudinary","akamai","custom"],a={},l=new WeakMap;function o(e,t){let r=e??a,n=t??a,i=l.get(r);if(i){let e=i.get(n);if(e)return e}let s=e||t||c,o=[...s.deviceSizes].sort((e,t)=>e-t),d=[...s.imageSizes],u={deviceSizes:o,imageSizes:d,allSizes:[...o,...d].sort((e,t)=>e-t),qualities:void 0===s.qualities?void 0:[...s.qualities].sort((e,t)=>e-t),path:s.path,loader:s.loader,dangerouslyAllowSVG:s.dangerouslyAllowSVG,unoptimized:s.unoptimized,domains:s.domains,remotePatterns:s.remotePatterns,localPatterns:"u"<typeof window&&void 0!==t?t.localPatterns:s.localPatterns,output:s.output};return i||(i=new WeakMap,l.set(r,i)),i.set(n,u),u}let c={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},1948,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let n=e.r(70965),i=e.r(43369);function s({config:e,src:t,width:r,quality:a}){let l=(0,i.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,i.getAssetToken)())l=void 0;else{let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),n=r.get("dpl");if(n){l=n,r.delete("dpl");let i=r.toString();t=t.slice(0,e)+(i?"?"+i:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
3
|
+
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`);let o=(0,n.findClosestQuality)(a,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${o}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}s.__next_img_default=!0;let a=s},67585,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return a}});let n=e.r(71645),i=e.r(74080);e.r(32061);let s=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function a({children:e}){return(0,n.use)((0,i.browser)(s)),e}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(18050),i=e.r(71645),s=e.r(67585),a=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},r=(0,i.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?i.Suspense:i.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(s.BailoutToCSRForNextDynamic,{children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let n=e.r(18050),i=e.r(74080),s=e.r(63599),a=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=s.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={createReactBrowserBailoutReason:function(){return a},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=Symbol.for("next.browser-bailout-reason");function a(e){return{$$typeof:s,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===s?t.reason:void 0}function o(e){return void 0!==l(e)}},65856,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return n}});let n=(e.r(55682)._(e.r(71645))).default.createContext(null)},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let n=e.r(71645),i="u"<typeof window,s=i?()=>{}:n.useLayoutEffect,a=i?()=>{}:n.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function l(){if(t&&t.mountedInstances){let e=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return i&&(t?.mountedInstances?.add(e.children),l()),s(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),s(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},40192,54105,19877,e=>{"use strict";var t=e.i(22219);e.s(["z",0,t],40192),e.s(["z",0,t],54105),e.s(["z",0,t],19877)},13581,29487,e=>{"use strict";var t=e.i(71645),r=e.i(95813);e.s(["f",0,function(e,n=0){let[i,s]=(0,t.useState)(),[a,l]=(0,t.useState)(""),[o,c]=(0,t.useState)(!0),d=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),f=(0,t.useCallback)(async()=>{d.current?.abort();let t=new AbortController;d.current=t;try{let r=await e(t.signal);if(t.signal.aborted||!u.current)return;s(r),l("")}catch(e){!t.signal.aborted&&u.current&&l((0,r.f)(e))}finally{!t.signal.aborted&&u.current&&c(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&f()});let e=n>0?setInterval(()=>{f()},n):void 0;return()=>{u.current=!1,d.current?.abort(),clearInterval(e)}},[f,n]),{data:i,error:a,isLoading:o,refresh:f}}],13581);var n=e.i(18050),i=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:r}){return(0,n.jsxs)(n.Fragment,{children:[e?(0,n.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,n.jsxs)("div",{className:"error",role:"alert",children:[(0,n.jsx)("p",{children:t}),(0,n.jsx)(i.f,{variant:"outline",onClick:()=>{r()},children:"Try again"})]}):void 0]})}],29487)},24687,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(39689);let i=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("textarea",{className:(0,n.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...r}));i.displayName="Textarea",e.s(["f",0,i])},1101,75775,e=>{"use strict";var t=e.i(18050),r=e.i(56420);let n={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};n.node;let i=(0,r.f)(n);e.s(["f",0,i],75775);var s=e.i(52330),a=e.i(75016);e.s(["f",0,function({action:e}){let r=e.description.trim(),n=new URLSearchParams({project:e.project,action:e.id}).toString();return(0,t.jsxs)("article",{className:"flex min-w-0 flex-col gap-4 rounded-xl border border-slate-200 bg-white p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)(s.f,{size:20,className:"shrink-0 text-indigo-600","aria-hidden":"true"}),(0,t.jsx)("span",{className:e.enabled?"rounded-full bg-emerald-50 px-2.5 py-1 text-xs font-medium text-emerald-700":"rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-600",children:e.enabled?"Enabled":"Disabled"})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:(0,t.jsxs)(a.f,{href:`/actions/?${n}`,className:"flex items-start justify-between gap-3 hover:underline",children:[(0,t.jsx)("span",{className:"break-words",children:e.name}),(0,t.jsx)(i,{size:17,className:"mt-0.5 shrink-0","aria-hidden":"true"})]})}),(0,t.jsx)("p",{className:"text-sm leading-relaxed",children:r.length>0?r:"Open this action to review its code, inputs and saved versions."})]}),(0,t.jsxs)("nav",{className:"flex flex-wrap gap-x-4 gap-y-2 border-t border-slate-100 pt-3 text-sm","aria-label":`${e.name} related records`,children:[(0,t.jsx)(a.f,{href:`/runs/?${n}`,className:"hover:underline",children:"Runs"}),(0,t.jsx)(a.f,{href:`/schedules/?${n}`,className:"hover:underline",children:"Schedules"}),(0,t.jsx)(a.f,{href:`/webhooks/?${n}`,className:"hover:underline",children:"Webhooks"})]})]})}],1101)},12102,e=>{"use strict";var t=e.i(40192),r=e.i(54105),n=e.i(19877),i=e.i(22219),i=i;let s=t.z.record(r.z.string(),n.z.json());e.s(["z",0,function(e){let t=JSON.parse(e);return i.array(s).min(1).max(50).parse(t)},"J",0,function(e){let t=JSON.parse(e);return s.parse(t)}],12102)},59140,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(18566),i=e.i(11241),s=e.i(73656),a=e.i(13581),l=e.i(94757),o=e.i(75016),c=e.i(29487);let d=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function u({action:e,current:r}){let n=e.project,s=new URLSearchParams({project:n,action:e.id});return(0,t.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(o.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:n}).toString()}`,children:[(0,t.jsx)(i.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,t.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,t.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,t.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:d.map(e=>(0,t.jsx)(o.f,{href:`${e.path}?${s.toString()}`,"aria-current":r===e.id?"page":void 0,className:r===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function f({project:e,actionId:n,current:i,children:l}){let d=(0,r.useCallback)(async t=>{if(!n)return;let r=await s.V.actions.get.query({id:n},{signal:t});if(r.project!==e)throw Error("This action is not available in the selected project.");return r},[n,e]),p=(0,a.f)(d);return n&&(p.isLoading||p.error||p.data?.id!==n)?(0,t.jsx)(c.f,{...p}):(0,t.jsxs)(t.Fragment,{children:[p.data?(0,t.jsx)(u,{action:p.data,current:i}):(0,t.jsx)("p",{className:"mb-5",children:(0,t.jsx)(o.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(n)]})}e.s(["F",0,u,"c",0,function({current:e,children:r}){let{selected:i}=(0,l.useWorkspace)(),s=(0,n.useSearchParams)().get("action")??"";return(0,t.jsx)(f,{project:i,actionId:s,current:e,children:r},`${i}:${s}`)}])},44555,e=>{"use strict";var t=e.i(18050),r=e.i(56420);let n={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};n.node;let i=(0,r.f)(n);var s=e.i(71645),a=e.i(73656),l=e.i(95813),o=e.i(13581),c=e.i(15080),d=e.i(19455),u=e.i(29487);e.s(["f",0,function({runId:e,openRun:r}){let n=(0,o.f)(c.i,5e3),[f,p]=(0,s.useState)(""),[h,m]=(0,s.useState)(""),g=n.data?.filter(t=>"pending"===t.status&&(!e||t.run===e))??[],x=async(e,t)=>{p(e),m("");try{await a.V.approvals.decide.mutate({id:e,decision:t}),await n.refresh()}catch(e){m((0,l.f)(e))}finally{p("")}};return(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("h2",{children:[(0,t.jsx)(i,{size:18})," ",e?"Run approvals":"Approval queue"]}),(0,t.jsxs)("span",{className:"badge",children:[g.length," pending"]})]}),(0,t.jsx)(u.f,{...n}),h?(0,t.jsx)("p",{className:"error",role:"alert",children:h}):void 0,n.isLoading||0!==g.length?void 0:(0,t.jsxs)("div",{className:"resource-empty",children:[(0,t.jsx)(i,{size:28}),(0,t.jsx)("h3",{children:"All caught up"}),(0,t.jsx)("p",{children:"No decisions are waiting for you."})]}),g.map(e=>(0,t.jsxs)("article",{className:"approval-card",children:[(0,t.jsx)("span",{className:"eyebrow",children:"Human approval required"}),(0,t.jsx)("p",{className:"approval-prompt",children:e.prompt}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(d.f,{disabled:!!f,onClick:()=>{x(e.id,"approved")},children:f===e.id?"Saving decision…":"Approve"}),(0,t.jsx)(d.f,{variant:"outline",disabled:!!f,onClick:()=>{x(e.id,"denied")},children:"Deny"}),r?(0,t.jsx)(d.f,{variant:"ghost",onClick:()=>{r(e.run)},children:"Inspect run"}):void 0]})]},e.id))]})}],44555)},23920,e=>{"use strict";var t=e.i(18050),r=e.i(5500),r=r,n=e.i(79258),i=e.i(71645);let s=new Map([["asana","/plugins/icons/asana.ico"],["browser","/plugins/icons/browser-cdp.png"],["browser-cdp","/plugins/icons/browser-cdp.png"],["data","/plugins/icons/data.svg"],["facebook","/plugins/icons/facebook.svg"],["github","/plugins/icons/github.svg"],["gmail","/plugins/icons/gmail.svg"],["google-drive","/plugins/icons/google-drive.svg"],["google-sheets","/plugins/icons/google-sheets.svg"],["google-tasks","/plugins/icons/google-tasks.svg"],["harvest","/plugins/icons/harvest.svg"],["linkedin","/plugins/icons/linkedin.png"],["llm","/plugins/icons/llm.svg"],["serper","/plugins/icons/serper.png"],["servicem8","/plugins/icons/servicem8.png"],["shippo","/plugins/icons/shippo.png"],["shopify","/plugins/icons/shopify.png"],["twitter","/plugins/icons/twitter.svg"],["xero","/plugins/icons/xero.svg"],["zendesk","/plugins/icons/zendesk.svg"]]);e.s(["f",0,function({url:e,catalogSlug:a="",size:l=32}){let o=s.get(a)??"",c=function(e){if(!e)return"";try{let t=new URL(e);return"https:"!==t.protocol||t.username||t.password?"":t.href}catch{return""}}(e),[d,u]=(0,i.useState)([]),f=[o&&c===`https://orgsdk.ai${o}`?o:c,o].find(e=>e.length>0&&!d.includes(e));return f?(0,t.jsx)(r.Image,{src:f,alt:"",width:l,height:l,unoptimized:!0,referrerPolicy:"no-referrer",className:"shrink-0 object-contain",onError:()=>{u(e=>[...e,f])}}):(0,t.jsx)(n.f,{size:l,className:"shrink-0","aria-hidden":"true"})}],23920)},36174,e=>{"use strict";var t=e.i(18050),r=e.i(11241),n=e.i(62368),i=e.i(95925),s=e.i(29272),a=e.i(71645),l=e.i(73656),o=e.i(95813),c=e.i(13581),d=e.i(15080),u=e.i(19455),f=e.i(85951),p=e.i(10505),h=e.i(29487),m=e.i(90409),g=e.i(59241),x=e.i(12102),y=e.i(75016),v=e.i(93479),j=e.i(24687);function b({id:e}){let[r,n]=(0,a.useState)(""),[i,s]=(0,a.useState)('{"type":"object"}'),[c,d]=(0,a.useState)("{}"),[f,p]=(0,a.useState)(!1),[h,m]=(0,a.useState)(""),[g,w]=(0,a.useState)(""),[k,_]=(0,a.useState)("");async function S(){p(!0),_(""),m("");try{let t=await l.V.runs.promote.mutate({id:e,name:r.trim(),input_schema:(0,x.J)(i),output_schema:(0,x.J)(c)});w(t.action),m(`Saved exact run source as version ${String(t.version.number)} of ${r.trim()} (action ${t.action}).`)}catch(e){_((0,o.f)(e))}finally{p(!1)}}return(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Promote accepted source to a saved action"}),(0,t.jsx)("p",{children:"The server copies this run’s exact source and SDK provenance. Run inputs remain examples and are not saved as defaults."}),(0,t.jsxs)("label",{children:["New action name",(0,t.jsx)(v.f,{value:r,disabled:f,onChange:e=>{n(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Input schema (JSON)",(0,t.jsx)(j.f,{className:"code",value:i,disabled:f,onChange:e=>{s(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Output schema (JSON)",(0,t.jsx)(j.f,{className:"code",value:c,disabled:f,onChange:e=>{d(e.target.value)}})]}),(0,t.jsx)(u.f,{disabled:f||!r.trim(),onClick:()=>{S()},children:"Promote exact source"}),k?(0,t.jsx)("p",{role:"alert",className:"error",children:k}):null,h?(0,t.jsx)("p",{role:"status",children:h}):null,g?(0,t.jsx)(y.f,{href:`/actions/?action=${encodeURIComponent(g)}`,children:"Open saved action"}):null]})}var w=e.i(44555);function k(e){let t=new Blob([e.content],{type:e.media_type}),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e.name,n.click(),URL.revokeObjectURL(r)}function _({run:e,hasCheckReport:r}){return r?(0,t.jsx)(g.f,{output:e.output}):"succeeded"!==e.status?(0,t.jsx)("p",{children:p.B.includes(e.status)?"This run is still in progress. Its result will appear here.":`This run ${e.status}. Review the trace before retrying.`}):"chat"===e.operation?(0,t.jsx)(f.f,{content:(0,p.A)(e.output)}):(0,t.jsx)("pre",{children:(0,p.A)(e.output)||"Completed without output."})}let S={session:"Session result",test:"Mocked test results",validate:"Semantic validation diagnostics"};e.s(["T",0,function({id:e,projects:f,back:g,openRun:x}){let y=(0,m.f)(e),v=(0,c.f)(d.K),[j,P]=(0,a.useState)(!1),[C,O]=(0,a.useState)(""),A=y.data?.run,z=void 0!==A&&("test"===A.operation||"validate"===A.operation)&&null!==A.output&&"object"==typeof A.output&&Object.hasOwn(A.output,"result"),N=async t=>{P(!0),O("");try{if("cancel"===t)await l.V.runs.cancel.mutate({id:e});else{let t=await l.V.runs.retry.mutate({id:e,idempotency_key:crypto.randomUUID()});x(t.id)}await y.refresh()}catch(e){O((0,o.f)(e))}finally{P(!1)}};return(0,t.jsxs)("div",{className:"run-detail",children:[(0,t.jsxs)(u.f,{variant:"ghost",onClick:g,children:[(0,t.jsx)(r.f,{size:14})," All runs"]}),(0,t.jsx)(h.f,{...y}),C?(0,t.jsx)("p",{className:"error",role:"alert",children:C}):void 0,A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"eyebrow",children:["RUN ",A.id.slice(0,8)]}),(0,t.jsxs)("h2",{children:[f.find(e=>e.id===A.project)?.name??"Project"," ","· ",(0,p.T)(A.operation)]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(p.k,{status:A.status}),p.B.includes(A.status)?(0,t.jsxs)(u.f,{variant:"outline",disabled:j||A.cancel_requested,onClick:()=>{N("cancel")},children:[(0,t.jsx)(s.f,{size:13}),A.cancel_requested?"Cancellation requested":"Cancel run"]}):void 0,["action","code","validate","test"].includes(A.operation)&&["failed","interrupted","cancelled"].includes(A.status)?(0,t.jsxs)(u.f,{variant:"outline",disabled:j,onClick:()=>{N("retry")},children:[(0,t.jsx)(i.f,{size:13})," Retry run"]}):void 0]})]}),(0,t.jsxs)("p",{className:"small",children:["Created ",new Date(A.created_at).toLocaleString()," · Updated"," ",new Date(A.updated_at).toLocaleString()]}),A.retry_of?(0,t.jsx)(u.f,{variant:"link",onClick:()=>{x(A.retry_of??"")},children:"View original run"}):void 0,A.error?(0,t.jsx)("div",{className:"error",role:"alert",children:A.error}):void 0,(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{children:"Origin"}),(0,t.jsxs)("dd",{children:[A.origin," ",A.origin_reference]}),(0,t.jsx)("dt",{children:"Originating client"}),(0,t.jsx)("dd",{children:A.client_token??"No client token (historical attribution may be unknown)"}),(0,t.jsx)("dt",{children:"SDK revision"}),(0,t.jsx)("dd",{children:(0,p.A)(A.sdk_revision)||"Unknown"}),(0,t.jsx)("dt",{children:"Configuration revision"}),(0,t.jsx)("dd",{children:(0,p.A)(A.configuration_revision)||"Unknown"}),(0,t.jsx)("dt",{children:"Immutable action version"}),(0,t.jsx)("dd",{children:A.action_version??"One-off source / none"}),(0,t.jsx)("dt",{children:"Source digest"}),(0,t.jsx)("dd",{children:(0,p.A)(A.source_digest)||"Unknown"})]}),null===A.source?null:(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Accepted source"}),(0,t.jsx)("pre",{children:(0,p.A)(A.source)})]}),"code"===A.operation&&null!==A.source?(0,t.jsx)(b,{id:A.id},A.id):null,(0,t.jsx)("h3",{children:S[A.operation]??"Outcome"}),(0,t.jsx)(_,{run:A,hasCheckReport:z}),(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Run inputs"}),(0,t.jsx)("pre",{children:(0,p.A)(A.inputs)})]})]}),"waiting_approval"===A.status?(0,t.jsx)(w.f,{runId:e}):void 0,(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Artifacts"}),(0,t.jsx)(h.f,{...v}),v.data?.filter(t=>t.run===e).length===0?(0,t.jsx)("p",{className:"small",children:"No artifacts were saved by this run."}):void 0,v.data?.filter(t=>t.run===e).map(e=>(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:e.name}),(0,t.jsxs)(u.f,{variant:"outline",size:"sm",onClick:()=>{k(e)},children:[(0,t.jsx)(n.f,{size:13}),"Download"]}),(0,t.jsx)("pre",{children:e.content})]},e.id))]}),"session"===A.operation?null:(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Execution trace"}),y.data?.events.length===0?(0,t.jsx)("p",{className:"small",children:"Waiting for the first execution event."}):void 0,(0,t.jsx)("ol",{className:"run-timeline",children:y.data?.events.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"timeline-dot"}),(0,t.jsxs)("details",{children:[(0,t.jsxs)("summary",{children:[(0,t.jsx)("strong",{children:e.kind.replaceAll("."," ")}),(0,t.jsx)("time",{children:new Date(e.created_at).toLocaleTimeString()})]}),(0,t.jsx)("pre",{children:(0,p.A)(e.data)})]})]},e.sequence))})]})]}):void 0]})},"t",0,k],36174)},10505,79432,e=>{"use strict";var t=e.i(18050),r=e.i(56420);let n={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};n.node;let i=(0,r.f)(n);e.s(["f",0,i],79432);var s=e.i(51757);let a={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};a.node;let l=(0,r.f)(a),o={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};o.node;let c=(0,r.f)(o),d={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};d.node;let u=(0,r.f)(d);function f(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let r={succeeded:s.f,waiting_approval:c,running:i,queued:l,failed:u,cancelled:u,interrupted:u}[e]??l;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(r,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let r=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${r} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let r=Reflect.get(e,t);if("string"==typeof r)return r}return""})(e.inputs,"message").slice(0,70)}`:`${r} \xb7 ${f(e.operation)}`},"T",0,f],10505)},90409,59241,e=>{"use strict";var t=e.i(71645),r=e.i(73656),n=e.i(13581);e.s(["f",0,function(e){let i=(0,t.useCallback)(async t=>{let[n,i]=await Promise.all([r.V.runs.get.query({id:e},{signal:t}),r.V.runs.events.query({id:e},{signal:t})]);return{run:n,events:i}},[e]),s=(0,n.f)(i,3e3),a=s.data?.run.id===e?s.data:void 0,l=void 0!==a,{refresh:o}=s;return(0,t.useEffect)(()=>{if(l)return function(e,t,n=r.V.runs.stream.subscribe){let i,s=!0,a=()=>{s&&!i&&(i=setTimeout(()=>{i=void 0,s&&t()},400))},l=n({id:e},{onData:a,onComplete(){s&&(clearTimeout(i),i=void 0,t())},onError:a});return()=>{s=!1,clearTimeout(i),l.unsubscribe()}}(e,o)},[e,l,o]),{...s,data:a}}],90409);var i=e.i(18050),s=e.i(10505);function a(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}e.s(["f",0,function({output:e}){let t=a(e),r=a(t?.result)??t;if(!r)return null;let n=a(r.validation)??r,l=Array.isArray(n.diagnostics)?n.diagnostics:[],o=Array.isArray(r.cases)?r.cases:[];return(0,i.jsxs)("div",{children:["boolean"==typeof n.valid?(0,i.jsx)("p",{children:n.valid?"Source passed semantic validation.":"Source failed semantic validation."}):null,l.length>0?(0,i.jsx)("ul",{children:l.map((e,t)=>{let r=a(e);return(0,i.jsxs)("li",{children:["Line ",(0,s.A)(r?.line),", column"," ",(0,s.A)(r?.column),":"," ",(0,s.A)(r?.message)]},t)})}):null,o.length>0?(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Case"}),(0,i.jsx)("th",{children:"Result"}),(0,i.jsx)("th",{children:"Details"})]})}),(0,i.jsx)("tbody",{children:o.map((e,t)=>{let r=a(e);return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,s.A)(r?.name)}),(0,i.jsx)("td",{children:r?.passed===!0?"Passed":"Failed"}),(0,i.jsxs)("td",{children:["string"==typeof r?.error&&""!==r.error?(0,i.jsx)("p",{children:r.error}):null,Array.isArray(r?.violations)?(0,i.jsx)("pre",{children:(0,s.A)(r.violations)}):null,(0,i.jsxs)("details",{children:[(0,i.jsx)("summary",{children:"Actual output and logs"}),(0,i.jsx)("pre",{children:(0,s.A)(r?.actual)}),(0,i.jsx)("pre",{children:(0,s.A)(r?.logs)})]})]})]},t)})})]}):null]})}],59241)},59037,e=>{"use strict";var t=e.i(71645);e.s(["f",0,function(e,r){(0,t.useEffect)(()=>{r(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),r(!1)}},[e,r])}])},18879,e=>{"use strict";e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])},78688,e=>{"use strict";function t(e){return null===e||"object"!=typeof e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e))}function r(e){return"string"==typeof e?e:""}e.s(["o",0,function(e){if(!Array.isArray(e))return{tools:[],isComplete:!1};let n=[],i=!0;for(let s of e){let e=t(s),a=r(e.name);if(!a){i=!1;continue}let l=[];if(Array.isArray(e.parameters))for(let n of e.parameters){let e=t(n);if(!r(e.name)){i=!1;continue}l.push({name:r(e.name),type:r(e.type),description:r(e.description),optional:!0===e.optional})}n.push({name:a,description:r(e.description),parameters:l,returnType:r(e.returnType)})}return{tools:n,isComplete:i}},"u",0,function(e){let r=t(e);return{..."string"==typeof r.type&&{type:r.type},..."string"==typeof r.provider&&{provider:r.provider},..."string"==typeof r.label&&{label:r.label},..."string"==typeof r.hint&&{hint:r.hint}}},"g",0,function(e){return r(t(e).icon_url)}])}]);
|