@orgsdk/cli 0.2.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/runtime/README.md +2 -2
- package/dist/server/index.js +414 -372
- 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 +1 -1
- package/dist/server/out/__next._full.txt +1 -1
- package/dist/server/out/__next._tree.txt +1 -1
- package/dist/server/out/_next/static/chunks/0rghk0nc6wr4-.js +3 -0
- package/dist/server/out/_next/static/chunks/1clfpekejl_sp.js +1 -0
- package/dist/server/out/_next/static/chunks/{19ue6x5c3f_38.js → 25q38gki_yyde.js} +3 -3
- package/dist/server/out/_not-found/__next._full.txt +1 -1
- package/dist/server/out/_not-found/__next._not-found.__PAGE__.txt +1 -1
- 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 +1 -1
- package/dist/server/out/accounts/2fa/__next._full.txt +1 -1
- package/dist/server/out/accounts/2fa/__next._tree.txt +1 -1
- package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +1 -1
- package/dist/server/out/accounts/2fa/index.html +1 -1
- package/dist/server/out/accounts/2fa/index.txt +1 -1
- package/dist/server/out/accounts/email/__next._full.txt +1 -1
- package/dist/server/out/accounts/email/__next._tree.txt +1 -1
- package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +1 -1
- package/dist/server/out/accounts/email/index.html +1 -1
- package/dist/server/out/accounts/email/index.txt +1 -1
- package/dist/server/out/accounts/login/__next._full.txt +1 -1
- package/dist/server/out/accounts/login/__next._tree.txt +1 -1
- package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +1 -1
- package/dist/server/out/accounts/login/index.html +1 -1
- package/dist/server/out/accounts/login/index.txt +1 -1
- package/dist/server/out/accounts/logout/__next._full.txt +1 -1
- package/dist/server/out/accounts/logout/__next._tree.txt +1 -1
- package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +1 -1
- package/dist/server/out/accounts/logout/index.html +1 -1
- package/dist/server/out/accounts/logout/index.txt +1 -1
- package/dist/server/out/accounts/password/change/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/accounts/password/change/index.html +1 -1
- package/dist/server/out/accounts/password/change/index.txt +1 -1
- package/dist/server/out/accounts/password/reset/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/accounts/password/reset/index.html +1 -1
- package/dist/server/out/accounts/password/reset/index.txt +1 -1
- package/dist/server/out/accounts/signup/__next._full.txt +1 -1
- package/dist/server/out/accounts/signup/__next._tree.txt +1 -1
- package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +1 -1
- package/dist/server/out/accounts/signup/index.html +1 -1
- package/dist/server/out/accounts/signup/index.txt +1 -1
- package/dist/server/out/actions/__next.!KHdvcmtzcGFjZSk.actions.__PAGE__.txt +4 -4
- package/dist/server/out/actions/__next._full.txt +4 -4
- 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 +4 -4
- package/dist/server/out/agents/__next.!KHdvcmtzcGFjZSk.agents.__PAGE__.txt +1 -1
- package/dist/server/out/agents/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/approvals/__next.!KHdvcmtzcGFjZSk.approvals.__PAGE__.txt +1 -1
- package/dist/server/out/approvals/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/artifacts/__next.!KHdvcmtzcGFjZSk.artifacts.__PAGE__.txt +1 -1
- package/dist/server/out/artifacts/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/audit/__next.!KHdvcmtzcGFjZSk.audit.__PAGE__.txt +1 -1
- package/dist/server/out/audit/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/chat/__next.!KHdvcmtzcGFjZSk.chat.__PAGE__.txt +1 -1
- package/dist/server/out/chat/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/connections/__next.!KHdvcmtzcGFjZSk.connections.__PAGE__.txt +1 -1
- package/dist/server/out/connections/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/credentials/__next.!KHdvcmtzcGFjZSk.credentials.__PAGE__.txt +1 -1
- package/dist/server/out/credentials/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/documents/__next.!KHdvcmtzcGFjZSk.documents.__PAGE__.txt +1 -1
- package/dist/server/out/documents/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/index.html +1 -1
- package/dist/server/out/index.txt +1 -1
- package/dist/server/out/people/__next.!KHdvcmtzcGFjZSk.people.__PAGE__.txt +1 -1
- package/dist/server/out/people/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/plugins/__next.!KHdvcmtzcGFjZSk.plugins.__PAGE__.txt +3 -3
- package/dist/server/out/plugins/__next._full.txt +3 -3
- 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 +3 -3
- package/dist/server/out/projects/__next.!KHdvcmtzcGFjZSk.projects.__PAGE__.txt +1 -1
- package/dist/server/out/projects/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/runs/__next.!KHdvcmtzcGFjZSk.runs.__PAGE__.txt +1 -1
- package/dist/server/out/runs/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/schedules/__next.!KHdvcmtzcGFjZSk.schedules.__PAGE__.txt +1 -1
- package/dist/server/out/schedules/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/settings/__next.!KHdvcmtzcGFjZSk.settings.__PAGE__.txt +1 -1
- package/dist/server/out/settings/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/setup/__next._full.txt +1 -1
- package/dist/server/out/setup/__next._tree.txt +1 -1
- package/dist/server/out/setup/__next.setup.__PAGE__.txt +1 -1
- package/dist/server/out/setup/index.html +1 -1
- package/dist/server/out/setup/index.txt +1 -1
- package/dist/server/out/tables/__next.!KHdvcmtzcGFjZSk.tables.__PAGE__.txt +1 -1
- package/dist/server/out/tables/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/webhooks/__next.!KHdvcmtzcGFjZSk.webhooks.__PAGE__.txt +1 -1
- package/dist/server/out/webhooks/__next._full.txt +1 -1
- 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 +1 -1
- package/dist/server/out/workspaces/invite/__next._full.txt +1 -1
- package/dist/server/out/workspaces/invite/__next._tree.txt +1 -1
- package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +1 -1
- package/dist/server/out/workspaces/invite/index.html +1 -1
- package/dist/server/out/workspaces/invite/index.txt +1 -1
- package/docs/browser-sessions.md +2 -2
- package/docs/npm-distribution.md +3 -3
- package/package.json +1 -1
- package/runtime/README.md +2 -2
- 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/{pj0R4_8zvgkN95QPXRHgC → USFNp_mjuU8VbaPftn8uI}/_buildManifest.js +0 -0
- /package/dist/server/out/_next/static/{pj0R4_8zvgkN95QPXRHgC → USFNp_mjuU8VbaPftn8uI}/_clientMiddlewareManifest.js +0 -0
- /package/dist/server/out/_next/static/{pj0R4_8zvgkN95QPXRHgC → USFNp_mjuU8VbaPftn8uI}/_ssgManifest.js +0 -0
package/docs/npm-distribution.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Tracking: [Node.js distribution issue #7](https://github.com/OrgSDK/OrgSDK/issues/7).
|
|
4
4
|
|
|
5
|
-
The platform package is `@orgsdk/cli`. Its `orgsdk` command supervises the platform and separate HTTP executor. The independently installable runner is `@orgsdk/executor`. Both packages use public access on the npm registry. The source package version is `0.
|
|
5
|
+
The platform package is `@orgsdk/cli`. Its `orgsdk` command supervises the platform and separate HTTP executor. The independently installable runner is `@orgsdk/executor`. Both packages use public access on the npm registry. The source package version is `1.0.0`; builds, checks and source merges do not publish packages. Commands containing `VERSION` require a selected published version.
|
|
6
6
|
|
|
7
7
|
On Linux with Node.js 22.22.0 or newer:
|
|
8
8
|
|
|
@@ -22,7 +22,7 @@ Both platform builds generate `dist/THIRD_PARTY_NOTICES.txt` from the installed
|
|
|
22
22
|
Install the tarball into a separate directory or globally:
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
|
-
npm install -g ./orgsdk-cli-0.
|
|
25
|
+
npm install -g ./orgsdk-cli-1.0.0.tgz
|
|
26
26
|
orgsdk start
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -46,7 +46,7 @@ Before upgrading, stop OrgSDK and preserve the database, matching encryption key
|
|
|
46
46
|
|
|
47
47
|
## Verification
|
|
48
48
|
|
|
49
|
-
`npm run test:distribution -- ./orgsdk-cli-0.
|
|
49
|
+
`npm run test:distribution -- ./orgsdk-cli-1.0.0.tgz` installs the real tarball into an empty temporary directory. Use `npm run test:distribution -- @orgsdk/cli@VERSION` to install from the public registry instead. The application and runner are launched with a path containing only Node.js. `npm run test:distribution:bun -- ./orgsdk-cli-1.0.0.tgz` runs the same acceptance assertions with Bun. These tests exercise frontend and Monaco assets, setup, login, automatic executor registration, code, validation, reusable action tests/execution, persistent files across restart, migration, backup, cancellation and graceful shutdown. They use disposable account and installation data.
|
|
50
50
|
|
|
51
51
|
Verify the independent registry runner with `npm --prefix runtime run smoke:node -- @orgsdk/executor@VERSION`. Use `smoke:bun` for the matching Bun assertions. An explicit tarball argument tests that exact artifact without rebuilding it.
|
|
52
52
|
|
package/package.json
CHANGED
package/runtime/README.md
CHANGED
|
@@ -49,8 +49,8 @@ Docker mode also needs Docker
|
|
|
49
49
|
Engine. Extract the installer from the tarball and run it as root:
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
tar -xzf orgsdk-executor-0.
|
|
53
|
-
sudo bash package/scripts/install-service.sh "$PWD/orgsdk-executor-0.
|
|
52
|
+
tar -xzf orgsdk-executor-1.0.0.tgz package/scripts/install-service.sh
|
|
53
|
+
sudo bash package/scripts/install-service.sh "$PWD/orgsdk-executor-1.0.0.tgz" researcher docker
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
The installer creates `/opt/orgsdk-executor`, the `orgsdk-researcher` system
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43776,e=>{"use strict";var s=e.i(18050),a=e.i(18566),t=e.i(19455),i=e.i(93479),n=e.i(24687),l=e.i(67489),r=e.i(69212),c=e.i(59037),o=e.i(90350),d=e.i(31084),u=e.i(94757),h=e.i(71645),m=e.i(12102);e.i(44362);var p=e.i(42765),p=p,x=e.i(22219),x=x,j=x,f=e.i(73656),v=e.i(95813),g=e.i(90409),b=e.i(59241),y=e.i(10505);function N({id:e}){let a=(0,g.f)(e);return(0,s.jsxs)("div",{"aria-live":"polite",children:[a.error?(0,s.jsx)("p",{role:"alert",children:a.error}):null,a.data?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{children:["test"===a.data.run.operation?"Mocked tests":"Semantic validation"," ",(0,s.jsx)(y.k,{status:a.data.run.status})]}),a.data.run.error?(0,s.jsx)("p",{role:"alert",children:a.data.run.error}):null,(0,s.jsx)(b.f,{output:a.data.run.output})]}):(0,s.jsx)("p",{children:"Loading check…"})]})}function w({project:e,action:a,version:i,source:l,inputSchema:r,outputSchema:c,dirty:o,onDirtyChange:d}){let[u,g]=(0,h.useState)('[\n {"name":"example", "inputs":{}, "expected":null, "mocks":[], "forbidden_calls":[]}\n]'),[b,y]=(0,h.useState)(""),[S,k]=(0,h.useState)(),[C,$]=(0,h.useState)(!!i),[z,A]=(0,h.useState)(!1),[_,U]=(0,h.useState)(""),[T,R]=(0,h.useState)("");async function P(s){A(!0),U("");try{if("validate"===s){let s=await f.U.actions.validateCode.mutate({project:e,source:l,input_schema:(0,m.J)(r),output_schema:(0,m.J)(c),idempotency_key:crypto.randomUUID()});R(s.id);return}if(!a||!i||o)throw Error("Save the source version before editing or running its tests.");if("save"===s){let e=await f.U.actions.saveTests.mutate({id:a.id,version:i.number,cases:(0,m.z)(u)});k(e.revision),y(u),d(!1);return}if(void 0===S||u!==b)throw Error("Save the test suite before running it.");let t=await f.U.actions.runTests.mutate({id:a.id,version:i.number,suite_revision:S,idempotency_key:crypto.randomUUID()});R(t.id)}catch(e){U((0,v.f)(e))}finally{A(!1)}}return(0,h.useEffect)(()=>{if(!a||!i)return;let e=new AbortController;return(async()=>{try{let s=await f.U.actions.tests.query({id:a.id,version:i.number},{signal:e.signal});if(e.signal.aborted)return;let t=JSON.stringify(s.cases,null,2);g(t),y(t),k(s.revision)}catch(a){let s;e.signal.aborted||(s=a instanceof p.t?a.data:void 0,x.object({code:j.literal("NOT_FOUND")}).safeParse(s).success)||U((0,v.f)(a))}finally{e.signal.aborted||$(!1)}})(),()=>{e.abort()}},[a,i]),(0,s.jsxs)("section",{className:"panel","aria-label":"Validation and mocked tests",children:[(0,s.jsx)("h3",{children:"Validation and mocked tests"}),(0,s.jsx)(t.f,{variant:"outline",disabled:z||!e||!l.trim(),onClick:()=>{P("validate")},children:"Validate source"}),(0,s.jsx)("p",{className:"small",children:"Semantic validation checks this editor’s source and both contracts against the project SDK. It executes no integrations."}),i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h4",{children:["Version ",i.number," ·"," ",void 0===S?"No saved test suite":`Test suite revision ${String(S)}`]}),(0,s.jsx)("p",{className:"small",children:"Mocked tests run in isolation without network, project files or live credentials. Mocks declare expected calls; unexpected calls fail."}),(0,s.jsxs)("label",{children:["Test cases (JSON)",(0,s.jsx)(n.f,{className:"code",rows:12,value:u,disabled:C||z||o,onChange:e=>{g(e.target.value),d(e.target.value!==b)}})]}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(t.f,{variant:"outline",disabled:C||z||o,onClick:()=>{P("save")},children:"Save test suite revision"}),(0,s.jsx)(t.f,{disabled:C||z||o||void 0===S||u!==b,onClick:()=>{P("test")},children:"Run mocked tests"})]}),o?(0,s.jsx)("p",{children:"Save a new source version before saving its tests."}):null]}):(0,s.jsx)("p",{children:"Save a source version to add mocked regression tests."}),_?(0,s.jsx)("p",{className:"error",role:"alert",children:_}):null,T?(0,s.jsx)(N,{id:T},T):null]})}var S=e.i(18879);function k({action:e,isBusy:a,save:n}){return(0,s.jsxs)("details",{className:"panel",children:[(0,s.jsx)("summary",{children:"Action settings"}),(0,s.jsxs)("form",{className:"mt-4",onSubmit:e=>{e.preventDefault();let s=new FormData(e.currentTarget);n({name:(0,S.f)(s,"name"),description:(0,S.f)(s,"description"),enabled:s.has("enabled")})},children:[(0,s.jsxs)("label",{children:["Action name",(0,s.jsx)(i.f,{name:"name",required:!0,defaultValue:e.name,disabled:a})]}),(0,s.jsxs)("label",{children:["Description",(0,s.jsx)(i.f,{name:"description",defaultValue:e.description,disabled:a})]}),(0,s.jsxs)("label",{className:"check",children:[(0,s.jsx)("input",{name:"enabled",type:"checkbox",defaultChecked:e.enabled,disabled:a}),"Enabled for new runs"]}),(0,s.jsx)("p",{className:"small",children:"Disable an action to prevent new runs while preserving its saved versions and run history."}),(0,s.jsx)("div",{className:"row",children:(0,s.jsx)(t.f,{type:"submit",disabled:a,children:"Save action settings"})})]})]})}var C=e.i(87309),$=e.i(70703),z=e.i(56420);let A={name:"braces",size:24,node:[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],aliases:["curly-braces"]};A.node;let _=(0,z.f)(A);var U=e.i(6501),T=e.i(52330);let R={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};R.node;let P=(0,z.f)(R),O={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};O.node;let D=(0,z.f)(O);var M=e.i(21357),L=e.i(77071);let I={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};I.node;let J=(0,z.f)(I);var V=e.i(15080),B=e.i(13581),E=e.i(26495),E=E,q=e.i(79258),F=e.i(66595),K=e.i(29487),H=e.i(78688),W=e.i(75016),G=e.i(23920);async function Y(s){let a,t=await (0,V.p)(s);t.some(e=>"inline"===e.distribution)&&(a=(await e.A(67426)).inspectInlinePlugin);let i=new Map;for(let e of t)i.set(e.id,"inline"===e.distribution?a?.(e.source)??{tools:[],isComplete:!1}:(0,H.o)(e.tools));return{plugins:t,tools:i}}function Q({project:e}){let a=(0,B.f)(Y),[t,n]=(0,h.useState)(""),l=a.data?.plugins.filter(s=>s.project===e?.id)??[],r=l.map(e=>{let s=a.data?.tools.get(e.id)??{tools:[],isComplete:!1},i=s.tools,n="string"==typeof e.display_name?e.display_name:e.slug,l=t.trim().toLowerCase(),r=`${n} ${e.description}`.toLowerCase().includes(l);return{plugin:e,name:n,isComplete:s.isComplete,totalTools:i.length,tools:r?i:i.filter(e=>`${e.name} ${e.description}`.toLowerCase().includes(l)),visible:r||i.some(e=>`${e.name} ${e.description}`.toLowerCase().includes(l))}}).filter(e=>e.visible);return(0,s.jsxs)("section",{className:"action-plugin-panel action-card","aria-label":"Action plugins",children:[(0,s.jsxs)("div",{className:"action-panel-heading",children:[(0,s.jsxs)("h3",{children:["Plugins ",(0,s.jsx)("span",{className:"count",children:l.length})]}),(0,s.jsxs)(W.f,{className:"action-text-link",href:`/plugins/?project=${encodeURIComponent(e?.id??"")}`,children:[(0,s.jsx)(L.f,{size:14})," ",l.length>0?"Manage":"Add plugin"]})]}),l.length>0?(0,s.jsxs)("label",{className:"search-field",children:[(0,s.jsx)(F.f,{size:15,"aria-hidden":"true"}),(0,s.jsx)(i.f,{"aria-label":"Search plugins or tools",placeholder:"Search plugins or tools…",value:t,onChange:e=>{n(e.target.value)}})]}):null,(0,s.jsx)("p",{className:"small action-panel-caption",children:e?`Available to ${e.name}`:"Choose a project to see its plugins."}),(0,s.jsx)(K.f,{...a}),a.isLoading||a.error||0!==r.length?null:(0,s.jsxs)("div",{className:"action-empty action-plugin-empty",children:[(0,s.jsx)("span",{className:"plugin-empty-symbol",children:(0,s.jsx)(q.f,{size:28})}),(0,s.jsx)("h4",{children:t?"No matching tools":"Add tools to your action"}),(0,s.jsx)("p",{children:t?"Try another plugin or tool name.":"Explore the marketplace, then assign plugins to this action’s project to use them in your workflow."}),t?null:(0,s.jsxs)(W.f,{className:"button plugin-marketplace-button",href:"/plugins/",children:[(0,s.jsx)(L.f,{size:15})," Browse marketplace"]})]}),(0,s.jsx)("div",{className:"action-plugin-list",hidden:0===r.length,children:r.map(({plugin:e,name:a,tools:i,isComplete:n,totalTools:l})=>{var r;return(0,s.jsxs)("details",{className:"action-plugin",open:!0,children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)(E.f,{className:"plugin-chevron",size:16}),(0,s.jsx)("span",{className:`plugin-symbol plugin-symbol-${e.slug}`,children:(0,s.jsx)(G.f,{url:e.icon_url,size:23})}),(0,s.jsxs)("span",{className:"plugin-name",children:[(0,s.jsx)("strong",{children:a}),(0,s.jsx)("small",{children:`${String(l)} ${1===l?"function":"functions"}${!n&&"inline"===e.distribution?" declared":""}`})]}),(0,s.jsxs)("span",{className:`plugin-state ${e.enabled?"is-enabled":""}`,children:[(0,s.jsx)("i",{}),e.enabled?"Enabled":"Disabled"]})]}),i.length>0?(0,s.jsx)("ul",{className:"plugin-tools",children:i.map(e=>(0,s.jsxs)("li",{title:e.description,children:[(0,s.jsx)(_,{size:14}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:e.name}),e.description?(0,s.jsx)("p",{className:"small",children:e.description}):null,e.parameters.length>0?(0,s.jsxs)("p",{className:"small",children:["Parameters:"," ",e.parameters.map(e=>`${e.name}${e.optional?"?":""}${e.type?`: ${e.type}`:""}${e.description?` — ${e.description}`:""}`).join("; ")]}):null,e.returnType?(0,s.jsxs)("p",{className:"small",children:["Returns: ",e.returnType]}):null]})]},e.name))}):(0,s.jsx)("p",{className:"small plugin-tool-note",children:(r="inline"===e.distribution,n?"This plugin declares no tools.":r?"Tool definitions are dynamic or could not be read. Their names cannot be listed without running the plugin.":"This installed release does not include tool information.")}),!n&&i.length>0?(0,s.jsx)("p",{className:"small plugin-tool-note",children:"inline"===e.distribution?"Showing statically declared tools. Additional dynamic definitions cannot be listed without running the plugin.":"Showing available tool information. This installed release includes incomplete metadata."}):null]},`${e.id}-${t}`)})}),l.length>0?(0,s.jsx)(W.f,{className:"action-catalog-link",href:"/plugins/",children:"Browse plugin marketplace →"}):null]})}var X=e.i(75775),Z=e.i(62368);let ee={name:"file-braces",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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};ee.node;let es=(0,z.f)(ee);var ea=e.i(26091),et=e.i(94508);let ei={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};ei.node;let en=(0,z.f)(ei);var el=e.i(36174);function er({runs:e,selectedId:a,onSelect:t,compact:i=!1}){return 0===e.length?(0,s.jsxs)("div",{className:"action-empty",children:[(0,s.jsx)(en,{size:24}),(0,s.jsx)("p",{children:"No runs yet. Save and run this action to see its activity."})]}):(0,s.jsx)("div",{className:"action-run-table",children:(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Run"}),(0,s.jsx)("th",{children:"Status"}),(0,s.jsx)("th",{children:"Created"})]})}),(0,s.jsx)("tbody",{children:(i?e.slice(0,5):e).map(e=>(0,s.jsxs)("tr",{className:a===e.id?"is-selected":"",children:[(0,s.jsx)("td",{children:(0,s.jsxs)("button",{type:"button",className:"action-run-link","aria-label":`Inspect run ${e.id.slice(0,8)}`,"aria-pressed":a===e.id,onClick:()=>{t(e.id)},children:["#",e.id.slice(0,8)]})}),(0,s.jsx)("td",{children:(0,s.jsx)(y.k,{status:e.status})}),(0,s.jsx)("td",{children:(0,s.jsxs)("time",{dateTime:e.created_at,title:new Date(e.created_at).toLocaleString(),children:[new Date(e.created_at).toLocaleDateString(void 0,{month:"short",day:"numeric"}),(0,s.jsx)("small",{children:new Date(e.created_at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]})})]},e.id))})]})})}function ec({run:e}){let a=(0,h.useCallback)(async s=>(await (0,V.K)(s)).filter(s=>s.run===e.id),[e.id]),i=(0,B.f)(a,5e3*!!y.B.includes(e.status));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(K.f,{...i}),i.data?.length===0?(0,s.jsxs)("div",{className:"action-empty",children:[(0,s.jsx)(et.f,{size:24}),(0,s.jsx)("p",{children:"No artifacts saved by this run."}),(0,s.jsx)("span",{children:"Files created by the action will appear here."})]}):null,(0,s.jsx)("div",{className:"action-artifact-grid",children:i.data?.map(e=>{let a=e.media_type.includes("json")?es:ea.f;return(0,s.jsxs)("article",{className:"action-artifact",children:[(0,s.jsxs)("header",{children:[(0,s.jsx)("span",{className:"artifact-symbol",children:(0,s.jsx)(a,{size:20})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{title:e.name,children:e.name}),(0,s.jsxs)("small",{children:[e.media_type," ·"," ",new Blob([e.content]).size.toLocaleString()," B"]})]}),(0,s.jsx)(t.f,{variant:"ghost",size:"icon","aria-label":`Download ${e.name}`,onClick:()=>{(0,el.t)(e)},children:(0,s.jsx)(Z.f,{size:15})})]}),(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Preview file"}),(0,s.jsx)("pre",{children:e.content})]}),(0,s.jsx)("pre",{className:"artifact-excerpt","aria-hidden":"true",children:e.content.slice(0,450)})]},e.id)})})]})}function eo({run:e}){let a=(0,h.useCallback)(async s=>f.U.runs.events.query({id:e.id},{signal:s}),[e.id]),t=(0,B.f)(a,3e3*!!y.B.includes(e.status));return(0,s.jsxs)("div",{className:"action-logs",children:[(0,s.jsx)(K.f,{...t}),e.error?(0,s.jsx)("p",{className:"error",role:"alert",children:e.error}):null,t.data?.length===0?(0,s.jsx)("p",{className:"small",children:"No execution events yet."}):null,t.data?.map(e=>(0,s.jsxs)("div",{className:"action-log-line",children:[(0,s.jsx)("time",{children:new Date(e.created_at).toLocaleTimeString()}),(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:e.kind.replaceAll("."," ")}),(0,s.jsx)("pre",{children:(0,y.A)(e.data)})]})]},e.sequence))]})}let ed=["Run artifacts","Previous runs","Logs","Output"];function eu({runs:e,run:a,onSelect:t}){let[i,n]=(0,h.useState)("Run artifacts"),l="Previous runs"!==i&&!a;return(0,s.jsxs)("section",{className:"action-card action-results","aria-label":"Action run results",children:[(0,s.jsx)("div",{className:"action-tab-bar",role:"tablist","aria-label":"Run information",children:ed.map((e,a)=>(0,s.jsx)("button",{id:`result-tab-${String(a)}`,role:"tab","aria-selected":i===e,"aria-controls":"action-result-panel",tabIndex:i===e?0:-1,onClick:()=>{n(e)},onKeyDown:e=>{let s={ArrowRight:(a+1)%ed.length,ArrowLeft:(a+ed.length-1)%ed.length,Home:0,End:ed.length-1}[e.key];void 0!==s&&(e.preventDefault(),n(ed[s]??"Run artifacts"),document.querySelector(`#result-tab-${String(s)}`)?.focus())},children:e},e))}),(0,s.jsxs)("div",{id:"action-result-panel",role:"tabpanel","aria-labelledby":`result-tab-${String(ed.indexOf(i))}`,tabIndex:0,children:[a?(0,s.jsxs)("div",{className:"action-result-context",children:[(0,s.jsxs)("span",{children:["Run #",a.id.slice(0,8)," ",(0,s.jsx)(y.k,{status:a.status})]}),(0,s.jsxs)(W.f,{href:`/runs/?run=${a.id}`,children:["Run details ",(0,s.jsx)(X.f,{size:13})]})]}):null,"Previous runs"===i?(0,s.jsx)(er,{runs:e,selectedId:a?.id??"",onSelect:t}):null,l?(0,s.jsxs)("div",{className:"action-empty",children:[(0,s.jsx)(et.f,{size:26}),(0,s.jsx)("p",{children:"Your run results will appear here."}),(0,s.jsx)("span",{children:"Save your action, then choose Run selected version to get started."})]}):null,"Run artifacts"===i&&a?(0,s.jsx)(ec,{run:a},`${a.id}-${a.status}`):null,"Logs"===i&&a?(0,s.jsx)(eo,{run:a},a.id):null,"Output"===i&&a?(0,s.jsx)("pre",{className:"action-output",children:y.B.includes(a.status)?"This run is in progress. Its output will appear here.":a.error||(0,y.A)(a.output)||"This run completed without output."}):null]})]})}var eh=e.i(59140);let em=(0,$.default)(async()=>{let s=await e.A(96001);return s.configureMonaco(),s.default},{loadableGenerated:{modules:[160]},ssr:!1}),ep='const { name } = actionParams;\nreturn `Hello, ${name ?? "world"}!`;';function ex({projects:e,onDirtyChange:p,selectedId:x,onSelect:j}){let{selected:g}=(0,u.useWorkspace)(),b=(0,a.useRouter)(),N=(0,C.h)(),[S,$]=(0,h.useState)([]),[z,A]=(0,h.useState)(),[R,O]=(0,h.useState)(g||(e[0]?.id??"")),[I,E]=(0,h.useState)(""),[q,F]=(0,h.useState)(ep),[H,G]=(0,h.useState)(ep),[Y,X]=(0,h.useState)([]),[Z,ee]=(0,h.useState)(""),es='{"type":"object"}',[ea,et]=(0,h.useState)(!1),[ei,en]=(0,h.useState)(es),[el,ec]=(0,h.useState)(es),[eo,ed]=(0,h.useState)("{}"),[ej,ef]=(0,h.useState)("{}"),[ev,eg]=(0,h.useState)('{"name": "team"}'),[eb,ey]=(0,h.useState)(o.A),[eN,ew]=(0,h.useState)(!1),[eS,ek]=(0,h.useState)(""),[eC,e$]=(0,h.useState)(""),[ez,eA]=(0,h.useState)(!0),[e_,eU]=(0,h.useState)(""),[eT,eR]=(0,h.useState)(0),[eP,eO]=(0,h.useState)("source"),[eD,eM]=(0,h.useState)(!1),[eL,eI]=(0,h.useState)(""),eJ=z?.id,eV=(0,h.useCallback)(async e=>eJ?(0,V.f)(e):[],[eJ]),eB=(0,B.f)(eV,5e3*!!eJ),eE=new Set(Y.map(e=>e.id)),eq=(eB.data??[]).filter(e=>null!==e.action_version&&eE.has(e.action_version)).toSorted((e,s)=>s.created_at.localeCompare(e.created_at)),eF=eq[0],eK=eq.find(e=>e.id===eL)??eF,eH=q!==H||ei!==el||eo!==ej||!z&&""!==I,eW=Y[0],eG=eW?"Saved":"Draft",eY=eH?"Unsaved changes":eG,eQ=!!Z&&Z!==eW?.id,eX=!!z&&z.enabled&&!!Z&&!eH;if((0,c.f)(eH||ea,p),(0,h.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let s=await (0,V.t)(e.signal);e.signal.throwIfAborted();let a=s.filter(e=>e.project===g);if($(a),x){let s=a.find(e=>e.id===x);if(!s)throw Error("This action does not exist or is not available in this workspace.");let t=await f.U.actions.versions.query({id:s.id},{signal:e.signal});e.signal.throwIfAborted();let i=t.toSorted((e,s)=>s.number-e.number),n=i[0];A(s),O(s.project),E(s.name),X(i),ee(n?.id??""),F(n?.source??ep),G(n?.source??ep);let l=JSON.stringify(n?.input_schema??{type:"object"});en(l),ec(l);let r=JSON.stringify(n?.output_schema??{});ed(r),ef(r),ek("")}}catch(s){e.signal.aborted||eU((0,v.f)(s))}finally{e.signal.aborted||eA(!1)}})(),()=>{e.abort()}},[x,g,eT]),ez)return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.K,{children:(0,s.jsx)("strong",{children:"Actions"})}),(0,s.jsx)("p",{role:"status",children:"Loading actions…"})]});if(e_)return(0,s.jsxs)("section",{className:"panel space-y-4",children:[(0,s.jsx)("h1",{children:"Action unavailable"}),(0,s.jsx)("p",{className:"error",role:"alert",children:e_}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[(0,s.jsx)(t.f,{variant:"outline",asChild:!0,children:(0,s.jsx)(W.f,{href:`/actions/?project=${encodeURIComponent(g)}`,children:"Back to actions"})}),(0,s.jsx)(t.f,{onClick:()=>{eU(""),eA(!0),eR(e=>e+1)},children:"Try again"})]})]});let eZ=async e=>{ew(!0),ek(""),e$("");try{await e()}catch(e){ek((0,v.f)(e))}finally{ew(!1)}},e0=async()=>!(eH||ea)||await N(),e1=async e=>{e||x?j(e?.id??""):await e0()&&(et(!1),A(void 0),X([]),ee(""),E(""),F(ep),G(ep),en(es),ec(es),ed("{}"),ef("{}"),eI(""),eO("source"),ek(""),e$(""))},e2=async e=>{if(!await e0())return;let s=Y.find(s=>s.id===e);if(!s)return;et(!1),ee(s.id),F(s.source),G(s.source);let a=JSON.stringify(s.input_schema);en(a),ec(a);let t=JSON.stringify(s.output_schema);ed(t),ef(t)},e4=async()=>{if(ea&&!await N())return;if(!z&&(await f.U.actions.list.query()).results.some(e=>e.project===R&&e.name===I.trim()))throw Error("An action with this name already exists in this project. Open that action or choose a different name.");let e=await f.U.actions.saveAction.mutate({project:R,...z&&{action:z.id},name:I.trim(),source:q,input_schema:(0,m.J)(ei),output_schema:(0,m.J)(eo)}),s=z??await f.U.actions.get.query({id:e.action}),a=e.version;if(z||(A(s),$(e=>[...e,s])),et(!1),X(e=>[a,...e.filter(e=>e.id!==a.id)]),ee(a.id),G(q),ec(ei),ef(eo),e$(`Version ${String(a.number)} saved.`),x)return;let t=new URLSearchParams({project:R,action:s.id});b.replace(`/actions/?${t.toString()}`)},e5=async()=>{let e=Y.find(e=>e.id===Z);z&&eX&&e&&(eI((await f.U.runs.create.mutate({project:R,action:z.id,operation:"action",version:e.number,inputs:(0,m.J)(ev),idempotency_key:crypto.randomUUID()})).id),await eB.refresh(),e$("Run queued. Follow its progress and results below."))},e6={schema:{description:"Define the JSON Schema used to validate this version’s run inputs.",label:"Input schema (JSON)",value:ei},output:{description:"Define the JSON Schema used to validate this version’s returned output.",label:"Output schema (JSON)",value:eo},inputs:{description:"Provide the JSON inputs for your next run or schedule.",label:"Run inputs (JSON)",value:ev}}[eP];return(0,s.jsx)("div",{className:"actions-workspace",children:(0,s.jsxs)("section",{className:"action-detail","aria-label":"Action editor",children:[(0,s.jsx)(r.K,{children:(0,s.jsxs)("div",{className:"action-toolbar",children:[(0,s.jsx)("h1",{className:"sr-only",children:z?.name??"New action"}),(0,s.jsxs)("nav",{className:"action-breadcrumb","aria-label":"Action navigation",children:[(0,s.jsx)(T.f,{size:16,"aria-hidden":"true"}),(0,s.jsx)(W.f,{href:`/actions/?project=${encodeURIComponent(g)}`,children:"Actions"}),(0,s.jsx)("span",{"aria-hidden":"true",children:"/"}),(0,s.jsxs)(l.d,{value:z?.id??"new",disabled:eN,onValueChange:e=>{e1(S.find(s=>s.id===e))},children:[(0,s.jsx)(l.P,{"aria-label":"Choose action",className:"action-selector",children:(0,s.jsx)(l.U,{})}),(0,s.jsxs)(l.r,{children:[(0,s.jsx)(l.T,{value:"new",children:"New action"}),S.map(e=>(0,s.jsx)(l.T,{value:e.id,children:e.name},e.id))]})]}),(0,s.jsx)("span",{className:`action-save-status ${eH?"is-dirty":""}`,children:eY}),z?.enabled===!1?(0,s.jsx)("span",{className:"badge",children:"Disabled"}):null,(0,s.jsx)(t.f,{variant:"ghost",size:"icon",disabled:eN,"aria-label":"New action",title:"New action",onClick:()=>{e1()},children:(0,s.jsx)(L.f,{size:15})})]}),(0,s.jsxs)("div",{className:"row action-header-controls",children:[eF?(0,s.jsxs)("div",{className:"action-last-run",children:[(0,s.jsx)("span",{children:"Last run"}),(0,s.jsx)(y.k,{status:eF.status}),(0,s.jsx)("small",{children:new Date(eF.created_at).toLocaleString()})]}):null,(0,s.jsxs)(t.f,{variant:"outline",disabled:eN||!q.trim()||!z&&(!I.trim()||!R),onClick:()=>{eZ(e4)},children:[(0,s.jsx)(J,{size:15})," ",eQ?"Save as new version":"Save version"]}),(0,s.jsxs)(t.f,{className:"secondary",disabled:eN||!eX,onClick:()=>{eZ(e5)},children:[(0,s.jsx)(M.f,{size:15})," Run selected version"]})]})]})}),z?(0,s.jsx)(eh.F,{action:z,current:"editor"}):(0,s.jsxs)("div",{className:"mb-5 space-y-2",children:[(0,s.jsx)(W.f,{href:`/actions/?project=${encodeURIComponent(g)}`,children:"Back to actions"}),(0,s.jsx)("h1",{children:"New action"}),(0,s.jsx)("p",{children:"Save reusable code for your connected MCP client to run."})]}),eS?(0,s.jsx)("p",{className:"error",role:"alert",children:eS}):void 0,eC?(0,s.jsx)("p",{className:"notice",role:"status",children:eC}):void 0,z?void 0:(0,s.jsxs)("div",{className:"panel row action-create-fields",children:[(0,s.jsxs)("label",{children:["Action name",(0,s.jsx)(i.f,{value:I,disabled:eN,onChange:e=>{E(e.target.value)},placeholder:"e.g. Daily report"})]}),(0,s.jsxs)("label",{children:["Project",(0,s.jsx)(i.f,{readOnly:!0,value:e.find(e=>e.id===g)?.name??"No project selected"}),(0,s.jsx)("small",{children:"Choose a project in the sidebar before creating an action."})]})]}),0===e.length?(0,s.jsx)("p",{className:"notice",children:"Create a project from Projects before saving an action."}):void 0,(0,s.jsx)(K.f,{...eB}),(0,s.jsxs)("div",{className:`action-content-grid ${eD?"is-editor-expanded":""}`,children:[(0,s.jsxs)("div",{className:"action-editor-column",children:[(0,s.jsxs)("div",{className:"source-pane action-source-pane",children:[(0,s.jsxs)("div",{className:"source-toolbar",children:[(0,s.jsxs)("div",{className:"action-editor-tabs",role:"group","aria-label":"Action configuration",children:[(0,s.jsxs)("button",{type:"button",className:"source"===eP?"is-active":"","aria-pressed":"source"===eP,onClick:()=>{eO("source")},children:[(0,s.jsx)("span",{className:"typescript-icon",children:"TS"})," action.ts"," ",eH?(0,s.jsx)("span",{className:"unsaved-dot",title:"Unsaved changes"}):null]}),(0,s.jsxs)("button",{type:"button",className:"schema"===eP?"is-active":"","aria-pressed":"schema"===eP,onClick:()=>{eO("schema")},children:[(0,s.jsx)(_,{size:14})," Input schema"]}),(0,s.jsxs)("button",{type:"button",className:"output"===eP?"is-active":"","aria-pressed":"output"===eP,onClick:()=>{eO("output")},children:[(0,s.jsx)(_,{size:14})," Output schema"]}),(0,s.jsxs)("button",{type:"button",className:"inputs"===eP?"is-active":"","aria-pressed":"inputs"===eP,onClick:()=>{eO("inputs")},children:[(0,s.jsx)(_,{size:14})," Run inputs"]}),(0,s.jsxs)("button",{type:"button",className:"schedule"===eP?"is-active":"","aria-pressed":"schedule"===eP,onClick:()=>{eO("schedule")},children:[(0,s.jsx)(U.f,{size:14})," Schedule"]})]}),(0,s.jsxs)("div",{className:"row",children:[Y.length>0?(0,s.jsxs)(l.d,{value:Z,disabled:eN,onValueChange:e=>{e2(e)},children:[(0,s.jsx)(l.P,{"aria-label":"Action version",className:"action-version-selector",children:(0,s.jsx)(l.U,{})}),(0,s.jsx)(l.r,{children:Y.map(e=>(0,s.jsxs)(l.T,{value:e.id,children:["Version ",e.number,e.id===eW?.id?" (latest)":""]},e.id))})]}):null,(0,s.jsx)(t.f,{variant:"ghost",size:"icon","aria-label":eD?"Collapse editor":"Expand editor","aria-pressed":eD,onClick:()=>{eM(!eD)},children:eD?(0,s.jsx)(D,{size:15}):(0,s.jsx)(P,{size:15})})]})]}),"source"===eP?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"desktop-editor",children:(0,s.jsx)(em,{value:q,onChange:F,readOnly:eN,actionId:`${R}:${z?.id??"new"}:${Z}`,projectId:R,theme:"light",height:"100%"})}),(0,s.jsx)("div",{className:"mobile-editor",children:(0,s.jsxs)("label",{children:["TypeScript source",(0,s.jsx)(n.f,{className:"code",rows:18,spellCheck:!1,value:q,readOnly:eN,onChange:e=>{F(e.target.value)}})]})})]}):null,"schedule"===eP?(0,s.jsxs)("section",{className:"action-schedule-editor","aria-labelledby":"action-schedule-title",children:[(0,s.jsx)("h3",{id:"action-schedule-title",children:"Schedule action"}),z?(0,s.jsx)(W.f,{href:`/schedules/?${new URLSearchParams({project:R,action:z.id}).toString()}`,children:"View saved schedules"}):null,(0,s.jsx)("p",{className:"small",children:"Creating a schedule copies the current Run inputs. Scheduled runs use this action’s latest saved version."}),eX&&!eQ?null:(0,s.jsx)("p",{className:"notice",role:"status",children:z&&eW?z.enabled?eQ?"Choose the latest version before creating a schedule.":"Save your changes before creating a schedule.":"Enable this action before creating a schedule.":"Save this action before creating a schedule."}),(0,s.jsx)(d.f,{value:eb,onChange:ey,disabled:eN}),(0,s.jsx)(t.f,{className:"secondary",disabled:eN||!eX||eQ,onClick:()=>{eZ(async()=>{z&&eX&&(await f.U.schedules.create.mutate({action:z.id,cron:eb,inputs:(0,m.J)(ev)}),e$("Schedule created."))})},children:"Create schedule"})]}):null,e6?(0,s.jsxs)("div",{className:"action-json-editor",children:[(0,s.jsx)("p",{className:"small",children:e6.description}),(0,s.jsxs)("label",{children:[e6.label,(0,s.jsx)(n.f,{className:"code",spellCheck:!1,value:e6.value,readOnly:eN,onChange:e=>{"schema"===eP?en(e.target.value):"output"===eP?ed(e.target.value):eg(e.target.value)}})]})]}):null,(0,s.jsxs)("footer",{className:"source-footer",children:[(0,s.jsx)("span",{children:"schedule"===eP?"Schedule":"source"===eP?"TypeScript":"JSON"}),(0,s.jsx)("span",{children:eQ?"Historical version · edits save a new version":eY})]})]}),(0,s.jsx)(eu,{runs:eq,run:eK,onSelect:eI})]}),(0,s.jsxs)("aside",{className:"action-context-column","aria-label":"Plugins and recent runs",children:[(0,s.jsx)(Q,{project:e.find(e=>e.id===R)},R),(0,s.jsxs)("section",{className:"action-card action-recent-runs","aria-label":"Recent action runs",children:[(0,s.jsxs)("div",{className:"action-panel-heading",children:[(0,s.jsx)("h3",{children:"Previous runs"}),(0,s.jsxs)("span",{className:"count",children:[eq.length," ",1===eq.length?"run":"runs"]})]}),(0,s.jsx)(er,{runs:eq,selectedId:eK?.id??"",onSelect:eI})]})]})]}),(0,s.jsx)(w,{project:R,action:z,version:Y.find(e=>e.id===Z),source:q,inputSchema:ei,outputSchema:eo,dirty:eH,onDirtyChange:et},`${R}:${z?.id??"new"}:${Z}`),Y.find(e=>e.id===Z)?.promoted_from?(0,s.jsxs)("p",{className:"small",children:["Promoted from run"," ",Y.find(e=>e.id===Z)?.promoted_from]}):null,eH||eQ?(0,s.jsx)("p",{className:"small",role:"status",children:eQ?"Running uses the selected saved version. Editing and saving creates a new immutable version.":"Save your changes before running or scheduling this action."}):void 0,(0,s.jsx)("div",{className:"action-configuration",children:z?(0,s.jsx)(k,{action:z,isBusy:eN,save:e=>{eZ(async()=>{let s=await f.U.actions.update.mutate({id:z.id,...e});A(s),$(e=>e.map(e=>e.id===s.id?s:e)),e$("Action settings saved.")})}},z.id):void 0})]})})}function ej(e){let{selected:a}=(0,u.useWorkspace)();return(0,s.jsx)(ex,{...e},`${a}:${e.selectedId}`)}var ef=e.i(67965),ev=e.i(1101);function eg(){let{projects:e,selected:a}=(0,u.useWorkspace)(),n=e.find(e=>e.id===a),l=(0,B.f)(V.t),[c,o]=(0,h.useState)("");if(!n)return(0,s.jsxs)("section",{className:"panel space-y-4",children:[(0,s.jsx)(r.K,{children:(0,s.jsx)("strong",{children:"Actions"})}),(0,s.jsx)("h1",{children:"Actions"}),(0,s.jsx)("p",{children:"Create a project to give your MCP client a place to build and run saved actions."}),(0,s.jsx)(t.f,{asChild:!0,children:(0,s.jsx)(W.f,{href:"/projects/?new=1",children:"Create project"})})]});let d=(l.data??[]).filter(e=>e.project===a),m=c.trim().toLowerCase(),p=d.filter(e=>`${e.name} ${e.description}`.toLowerCase().includes(m)),x=new URLSearchParams({project:a}).toString();return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(r.K,{children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 text-sm",children:[(0,s.jsx)(W.f,{href:`/projects/?${x}`,className:"truncate",children:n.name}),(0,s.jsx)("span",{"aria-hidden":"true",className:"text-slate-300",children:"/"}),(0,s.jsx)("strong",{children:"Actions"})]})}),(0,s.jsxs)("header",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:n.name}),(0,s.jsx)("h1",{children:"Actions"}),(0,s.jsx)("p",{children:"Build what your connected MCP client can run in this project."})]}),(0,s.jsx)(t.f,{asChild:!0,children:(0,s.jsxs)(W.f,{href:`/actions/?${x}&new=1`,children:[(0,s.jsx)(L.f,{size:16,"aria-hidden":"true"})," New action"]})})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 rounded-xl border border-indigo-100 bg-indigo-50/50 p-4",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(ef.f,{size:20,className:"mt-0.5 shrink-0 text-indigo-600","aria-hidden":"true"}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-slate-900",children:"Built with your MCP client"}),(0,s.jsx)("p",{className:"text-sm",children:"Save reusable actions, inspect their runs, then add schedules or webhooks."})]})]}),(0,s.jsx)(t.f,{variant:"outline",asChild:!0,children:(0,s.jsx)(W.f,{href:`/connections/?${x}`,children:"Connect client"})})]}),(0,s.jsx)(K.f,{...l}),l.data&&d.length>0?(0,s.jsxs)("section",{className:"space-y-4","aria-label":"Saved actions",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("p",{className:"text-sm",children:[d.length," saved"," ",1===d.length?"action":"actions"]}),(0,s.jsxs)("label",{className:"relative block w-full sm:max-w-xs",children:[(0,s.jsx)("span",{className:"sr-only",children:"Search actions"}),(0,s.jsx)(F.f,{size:16,className:"absolute top-2.5 left-3 text-slate-400","aria-hidden":"true"}),(0,s.jsx)(i.f,{value:c,onChange:e=>{o(e.target.value)},placeholder:"Search actions",className:"pl-9!"})]})]}),(0,s.jsx)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:p.map(e=>(0,s.jsx)(ev.f,{action:e},e.id))}),0===p.length?(0,s.jsxs)("p",{role:"status",children:["No actions match “",c,"”."]}):null]}):null,l.isLoading||l.error||0!==d.length?null:(0,s.jsxs)("section",{className:"flex flex-col items-start gap-4 rounded-xl border border-dashed border-slate-300 bg-white p-6",children:[(0,s.jsx)(T.f,{size:24,className:"text-indigo-600","aria-hidden":"true"}),(0,s.jsx)("h2",{className:"mb-0!",children:"No saved actions yet"}),(0,s.jsx)("p",{children:"Ask your connected MCP client to create an action, or start one here. Each action keeps its code versions, runs, schedules and webhooks together."}),(0,s.jsx)(t.f,{variant:"outline",asChild:!0,children:(0,s.jsx)(W.f,{href:`/actions/?${x}&new=1`,children:"Create an action"})})]})]})}e.s(["default",0,function(){let{projects:e,selected:t,setDirty:i,navigateTo:n}=(0,u.useWorkspace)(),l=(0,a.useSearchParams)(),r=l.get("action")??"",c="1"===l.get("new");return r||c?(0,s.jsx)(ej,{projects:e,onDirtyChange:i,selectedId:r,onSelect:e=>{let s=new URLSearchParams({project:t});e?s.set("action",e):s.set("new","1"),n(`/actions/?${s.toString()}`)}},r):(0,s.jsx)(eg,{},t)}],43776)}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
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),a=e.r(90809),l=e.r(18050),s=a._(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)),f=e.r(18581);function h(e,t,n,r,a,l,s){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&&a(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function m(e){return s.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let g="u"<typeof window?s.useEffect:s.useLayoutEffect,j=(0,s.forwardRef)(({src:e,srcSet:t,sizes:n,height:r,width:a,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:_,...N},k)=>{let P=(0,s.useRef)(!1),O=(0,s.useRef)(null);g(()=>{let{current:e}=P,{current:t}=O;e||null===t||(_&&(t.src=t.src),t.complete&&h(t,d,x,v,y,j,S),P.current=!0)},[e,d,x,v,_,j,S]);let R=(0,f.useMergedRef)(k,O);return(0,l.jsx)("img",{...N,...m(u),loading:p,width:a,height:r,decoding:i,"data-nimg":b?"fill":"1",className:o,style:c,sizes:n,srcSet:t,src:e,ref:R,onLoad:e=>{h(e.currentTarget,d,x,v,y,j,S)},onError:e=>{w(!0),"empty"!==d&&y(!0),_&&_(e)}})});function b({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...m(t.fetchPriority)};return e&&i.default.preload?(i.default.preload(t.src,n),null):(0,l.jsx)(o.default,{children:(0,l.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let x=(0,s.forwardRef)((e,t)=>{let n=(0,s.useContext)(u.RouterContext),r=(0,d.useImageConfig)(),{onLoad:a,onLoadingComplete:i}=e,o=(0,s.useRef)(a);(0,s.useEffect)(()=>{o.current=a},[a]);let f=(0,s.useRef)(i);(0,s.useEffect)(()=>{f.current=i},[i]);let[h,m]=(0,s.useState)(!1),[g,x]=(0,s.useState)(!1),{props:v,meta:y}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:r,blurComplete:h,showAltText:g});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(j,{...v,unoptimized:y.unoptimized,placeholder:y.placeholder,fill:y.fill,onLoadRef:o,onLoadingCompleteRef:f,setBlurComplete:m,setShowAltText:x,sizesInput:e.sizes,ref:t}),y.preload?(0,l.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),a=e.r(87690),l=e.r(18556),s={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)(l.ImageConfigContext);return(0,a.prepareImageConfig)(s,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 a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let l=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class s{disable(){throw l}getStore(){}run(){throw l}exit(){throw l}enterWith(){throw l}static bind(e){return e}}let i="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return i?new i:new s}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):s.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 a}});let r=e.r(55682)._(e.r(69093));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.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),a=e.r(88143),l=["-moz-initial","fill","none","scale-down",void 0];function s(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:f,width:h,height:m,fill:g=!1,style:j,overrideSrc:b,onLoad:x,onLoadingComplete:v,placeholder:y="empty",blurDataURL:w,fetchPriority:S,decoding:C="async",layout:_,objectFit:N,objectPosition:k,lazyBoundary:P,lazyRoot:O,...R},A){var M;let I,E,{imgConf:z,showAltText:U,blurComplete:L,defaultLoader:T}=A;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 $=R.loader||T;delete R.loader,delete R.srcSet;let D="__next_img_default"in $;if(D){if("custom"===z.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=$;$=t=>{let{config:n,...r}=t;return e(r)}}if(_){"fill"===_&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[_];e&&(j={...j,...e});let n={responsive:"100vw",fill:"100vw"}[_];n&&!t&&(t=n)}let B="",F=i(h),q=i(m);if((M=e)&&"object"==typeof M&&(s(M)||void 0!==M.src)){let t=s(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(I=t.blurWidth,E=t.blurHeight,w=w||t.blurDataURL,B=t.src,!g)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 W=!c&&!u&&("lazy"===d||void 0===d);(!(e="string"==typeof e?e:B)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,W=!1),z.unoptimized&&(n=!0),D&&!z.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let J=i(f),G=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:N,objectPosition:k}:{},U?{}:{color:"transparent"},j),H=L||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:F,heightInt:q,blurWidth:I,blurHeight:E,blurDataURL:w||"",objectFit:G.objectFit})}")`:`url("${y}")`,K=l.includes(G.objectFit)?"fill"===G.objectFit?"100% 100%":"cover":G.objectFit,V=H?{backgroundSize:K,backgroundPosition:G.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:H}:{},Q=function({config:e,src:t,unoptimized:n,width:a,quality:l,sizes:s,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,a=[];for(let e;e=n.exec(r);)a.push(parseInt(e[2]));if(a.length){let n=.01*Math.min(...a);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,a,s),u=o.length-1;return{sizes:s||"w"!==c?s:"100vw",srcSet:o.map((n,r)=>`${i({config:e,src:t,quality:l,width:n})} ${"w"===c?n:r+1}${c}`).join(", "),src:i({config:e,src:t,quality:l,width:o[u]})}}({config:z,src:e,unoptimized:n,width:F,quality:J,sizes:t,loader:$}),X=W?"lazy":d;return{props:{...R,loading:X,fetchPriority:S,width:F,height:q,decoding:C,className:p,style:{...G,...V},sizes:Q.sizes,srcSet:Q.srcSet,src:b||Q.src},meta:{unoptimized:n,preload:u||c,placeholder:y,fill:g}}}},25633,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return m},defaultHead:function(){return d}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let l=e.r(55682),s=e.r(90809),i=e.r(18050),o=s._(e.r(71645)),c=l._(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 f=["name","httpEquiv","charSet","itemProp"];function h(e){let t,n,r,a;return e.reduce(p,[]).reverse().concat(d().reverse()).filter((t=new Set,n=new Set,r=new Set,a={},e=>{let l=!0,s=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){s=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?l=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?l=!1:n.add(e.type);break;case"meta":for(let t=0,n=f.length;t<n;t++){let n=f[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?l=!1:r.add(n);else{let t=e.props[n],r=a[n]||new Set;("name"!==n||!s)&&r.has(t)?l=!1:(r.add(t),a[n]=r)}}}return l})).reverse().map((e,t)=>{let n=e.key||t;return o.default.cloneElement(e,{key:n})})}let m=function({children:e}){let t=(0,o.useContext)(u.HeadManagerContext);return(0,i.jsx)(c.default,{reduceComponentsToState:h,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:a,blurDataURL:l,objectFit:s}){let i=n?40*n:e,o=a?40*a: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"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${l}'/%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 l}});let r=e.r(55682)._(e.r(71645)),a=e.r(87690),l=r.default.createContext(a.imageConfigDefault)},87690,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return l},imageConfigDefault:function(){return c},prepareImageConfig:function(){return o}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let l=["default","imgix","cloudinary","akamai","custom"],s={},i=new WeakMap;function o(e,t){let n=e??s,r=t??s,a=i.get(n);if(a){let e=a.get(r);if(e)return e}let l=e||t||c,o=[...l.deviceSizes].sort((e,t)=>e-t),u=[...l.imageSizes],d={deviceSizes:o,imageSizes:u,allSizes:[...o,...u].sort((e,t)=>e-t),qualities:void 0===l.qualities?void 0:[...l.qualities].sort((e,t)=>e-t),path:l.path,loader:l.loader,dangerouslyAllowSVG:l.dangerouslyAllowSVG,unoptimized:l.unoptimized,domains:l.domains,remotePatterns:l.remotePatterns,localPatterns:"u"<typeof window&&void 0!==t?t.localPatterns:l.localPatterns,output:l.output};return a||(a=new WeakMap,i.set(n,a)),a.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 s}});let r=e.r(70965),a=e.r(43369);function l({config:e,src:t,width:n,quality:s}){let i=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,a.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 a=n.toString();t=t.slice(0,e)+(a?"?"+a:"")}}}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)(s,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${n}&q=${o}${t.startsWith("/")&&i?`&dpl=${i}`:""}`}l.__next_img_default=!0;let s=l},67585,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return s}});let r=e.r(71645),a=e.r(74080);e.r(32061);let l=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function s({children:e}){return(0,r.use)((0,a.browser)(l)),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),a=e.r(71645),l=e.r(67585),s=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,a.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?a.Suspense:a.Fragment,d=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(l.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),a=e.r(74080),l=e.r(63599),s=e.r(9885),i=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=l.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,s.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.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 s},getReactBrowserBailoutReason:function(){return i},isNextBrowserBailoutError:function(){return o}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let l=Symbol.for("next.browser-bailout-reason");function s(e){return{$$typeof:l,reason:e}}function i(e){let t=e?.cause;return t?.$$typeof===l?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),a="u"<typeof window,l=a?()=>{}:r.useLayoutEffect,s=a?()=>{}: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 a&&(t?.mountedInstances?.add(e.children),i()),l(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),l(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),s(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},13581,29487,e=>{"use strict";var t=e.i(71645),n=e.i(95813);e.s(["f",0,function(e,r=0){let[a,l]=(0,t.useState)(),[s,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;l(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:a,error:s,isLoading:o,refresh:p}}],13581);var r=e.i(18050),a=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)(a.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),a=e.i(73656),l=e.i(95813),s=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 f=u.enum(["none","headers","oauth"]),h=u.enum(["auto","streamable-http","sse"]),m=d.z.record(p.z.string(),p.z.string()),g=[{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:l,onDirtyChange:s}){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,_]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[P,O]=(0,r.useState)(""),[R,A]=(0,r.useState)(""),[M,I]=(0,r.useState)(""),E=u!==e.endpoint||p!==e.authMode||v!==e.transport||!!(w||C),z=E||!!(P||R||M);return(0,r.useEffect)(()=>(s(z),()=>{s(!1)}),[z,s]),(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=>{I(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||E,onClick:()=>{l(async()=>{let t=await a.U.plugins.mcp.beginOAuth.mutate({id:e.pluginId,...P&&{client_id:P},...R&&{client_secret:R},...M&&{client_metadata_url:M}});O(""),A(""),I(""),s(!1),k(t.authorization_url)},"Open the sign-in link, finish authorization, then check the connection.")},children:e.authenticated?"Reconnect account":"Sign in"}),N?(0,t.jsx)("a",{className:"underline",href:N,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(f.parse(e.target.value))},children:g.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=>{_(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(h.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||!E,onClick:()=>{l(async()=>{let t=C.trim()?m.parse(JSON.parse(C)):{};await a.U.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(""),_("")})},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=>a.U.plugins.mcp.get.query({id:e.id},{signal:t}),[e.id]),d=(0,s.f)(u),p=d.refresh,[f,h]=(0,r.useState)(null),[m,g]=(0,r.useState)(!1),[j,y]=(0,r.useState)(""),[w,S]=(0,r.useState)(""),[C,_]=(0,r.useState)(!1),N=C||null!==f;(0,r.useEffect)(()=>(c(e.id,N),()=>{c(e.id,!1)}),[e.id,N,c]);let k=d.data;(0,r.useEffect)(()=>{if(k?.status!=="checking")return;let e=setInterval(()=>{p()},2e3);return()=>{clearInterval(e)}},[k?.status,p]);let P=async(e,t="")=>{g(!0),y(""),S("");try{await e(),await d.refresh(),await o(),S(t)}catch(e){y((0,l.f)(e))}finally{g(!1)}},O=k?.candidate,R=O?.tools.filter(e=>k?.enabledTools.includes(e.name)&&k.catalogue.some(t=>{let{alias:n,...r}=t;return JSON.stringify(r)===JSON.stringify(e)})).map(e=>e.name)??[],A=f??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}),k?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"break-all small",children:k.endpoint}),(0,t.jsxs)("p",{children:[e.enabled?"Enabled":"Disabled"," ·"," ",k.enabledTools.length," tools selected"]}),"ready"===k.runner?null:(0,t.jsx)("p",{role:"status",children:"offline"===k.runner?"Connect the project runner to check or use this server.":"Upgrade the project runner to enable MCP connections."}),"checking"===k.status?(0,t.jsx)("p",{role:"status",children:k.discovery?.status==="queued"?"Waiting for the project runner…":"Checking connection and available tools…"}):null,"authentication_required"===k.status?(0,t.jsx)("p",{role:"status",children:"This server requires authentication. Sign in or update its credentials."}):null,"failed"===k.status?(0,t.jsxs)("p",{role:"alert",children:["Connection check failed. ",k.discovery?.error]}):null,k.checkedAt?(0,t.jsxs)("p",{className:"small",children:["Last checked ",new Date(k.checkedAt).toLocaleString()]}):null,n?(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(i.f,{disabled:m||"ready"!==k.runner||"checking"===k.status,onClick:()=>{h(null),P(()=>a.U.plugins.mcp.discover.mutate({id:e.id}))},children:"Check connection / refresh tools"}),(0,t.jsx)(i.f,{variant:"outline",disabled:m||!e.enabled&&0===k.enabledTools.length,onClick:()=>{P(()=>a.U.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:m,onClick:()=>{P(()=>a.U.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||m,checked:A.includes(e.name),onChange:t=>{h(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":k?.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)}),k.enabledTools.some(e=>O.tools.every(t=>t.name!==e))?(0,t.jsxs)("p",{role:"status",children:["Removed by the server:"," ",k.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:m,onClick:()=>{let t=k.discoveryRunId;t&&P(async()=>{await a.U.plugins.mcp.accept.mutate({id:e.id,run:t,tools:A}),h(null)},"Selected tools are ready for code and actions.")},children:"Enable selected tools"}):null]}):null,k.catalogue.length>0?(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Enabled tool reference"}),k.catalogue.filter(e=>k.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:k,busy:m,perform:P,onDirtyChange:_},k.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:s}){let[u,d]=(0,r.useState)(""),[p,b]=(0,r.useState)(""),[x,v]=(0,r.useState)("auto"),[w,S]=(0,r.useState)("none"),[C,_]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[P,O]=(0,r.useState)(!1),[R,A]=(0,r.useState)(""),M=!!(u||p||C||N);return(0,r.useEffect)(()=>(s(M),()=>{s(!1)}),[M,s]),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:t=>{t.preventDefault(),O(!0),A(""),(async()=>{try{let t=N.trim()?m.parse(JSON.parse(N)):{};await a.U.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(""),await n()}catch(e){A((0,l.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(f.parse(e.target.value))},children:g.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=>{_(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:N,onChange:e=>{k(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(h.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:a,onChanged:l,onDirtyChange:s}){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)(()=>(s(c),()=>{s(!1)}),[c,s]),(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:a,onChanged:l,onDirtyChange:u},e.id)),a?(0,t.jsx)(y,{project:e,onSaved:l,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 a.U.plugins.marketplace.query(void 0,{signal:e})}function _({releases:e}){let n=(0,s.f)(C),[a,l]=(0,r.useState)(""),i=a.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:a,onChange:e=>{l(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,{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 N({plugin:e,auth:n,onConnected:s}){let[c,u]=(0,r.useState)(`${e.slug} connection`),[d,p]=(0,r.useState)(""),[f,h]=(0,r.useState)(""),[m,g]=(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 a.U.credentials.beginOAuth.mutate({plugin:e.id,name:c,client_id:f,client_secret:m});g(""),location.assign(t.authorization_url);return}let t="github"===e.slug?"secret_token":"secret_apiKey",r=await a.U.credentials.create.mutate({name:c,provider:y,secret:{[t]:d}});p(""),await s(r.id)}catch(e){v((0,l.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:[location.origin,"/oauth/callback"]}),(0,t.jsxs)("label",{children:["Client ID",(0,t.jsx)(o.f,{value:f,onChange:e=>{h(e.target.value)},disabled:j})]}),(0,t.jsxs)("label",{children:["Client secret",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:m,onChange:e=>{g(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?!f||!m:!d),onClick:()=>{w()},children:"Connect"}),x?(0,t.jsx)("p",{role:"alert",children:x}):null]})}var k=e.i(78688);function P({slug:e,metadata:n}){let{tools:a,isComplete:l}=(0,k.o)(n),[s,i]=(0,r.useState)(""),c=s.trim().toLowerCase().split(/\s+/).filter(Boolean),u=a.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 · ",a.length," functions"]}),l?null:(0,t.jsx)("p",{className:"small",children:"Function information is incomplete for this release."}),a.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:s,onChange:e=>{i(e.target.value)},placeholder:"Search functions or descriptions"})]}),(0,t.jsxs)("p",{className:"small",role:"status",children:[u.length," of ",a.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 I=(0,A.f)(M);var E=e.i(19877),z=e.i(15080),U=e.i(59037),L=e.i(87309),T=e.i(94757),$=e.i(75016);let D=(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(),E.z.json());async function q(e){let[t,n]=await Promise.all([(0,z.p)(e),(0,z._)(e)]);return{plugins:t,credentials:n}}async function W(e){return a.U.plugins.catalog.query(void 0,{signal:e})}function J({canManage:e,onDirtyChange:n}){let u=(0,s.f)(q),d=(0,s.f)(W),p=(d.data??[]).filter((e,t,n)=>n.findIndex(t=>t.slug===e.slug)===t),{selected:f,projects:h}=(0,T.useWorkspace)(),m=h.find(e=>e.id===f),g=(u.data?.plugins??[]).filter(e=>e.project===f),[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,k.o)(e.tools).tools.map(e=>`${e.name} ${e.description}`)].join(" ").toLowerCase();return C.every(e=>t.includes(e))}),[M,E]=(0,r.useState)(""),[z,G]=(0,r.useState)("1.0.0"),[H,K]=(0,r.useState)(""),[V,Q]=(0,r.useState)(B),[X,Y]=(0,r.useState)(""),[Z,ee]=(0,r.useState)("{}"),et=g.find(e=>e.id===j),en=et?.distribution==="external",er=(0,k.u)(et?.auth),[ea,el]=(0,r.useState)(!1),[es,ei]=(0,r.useState)(""),[eo,ec]=(0,r.useState)(""),eu=JSON.stringify({slug:M,version:z,description:H,source:V,credential:X,configuration:Z}),[ed,ep]=(0,r.useState)(JSON.stringify({slug:"",version:"1.0.0",description:"",source:B,credential:"",configuration:"{}"})),[ef,eh]=(0,r.useState)(!1),em=eu!==ed,eg=(0,L.h)();if((0,U.f)(em||ef,n),!m)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)($.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??""),E(t.slug),G(t.version),K(t.description),Q(t.source),Y(t.credential),ee(t.configuration),ep(JSON.stringify(t))},eb=async e=>{(!em||await eg())&&ej(e)},ex=async e=>{el(!0),ei(""),ec("");try{await e(),await u.refresh()}catch(e){ei((0,l.f)(e))}finally{el(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{project:f,plugins:g.filter(e=>"mcp"===e.distribution),canManage:e,onChanged:u.refresh,onDirtyChange:eh}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Plugin marketplace"}),(0,t.jsxs)("p",{children:["Install optional tools for ",m.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:m.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=g.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,{url:(0,k.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:ea,onClick:()=>{ex(async()=>{em&&!await eg()||(ej(await a.U.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:ea,onClick:()=>{ex(async()=>{em&&!await eg()||(ej(await a.U.plugins.create.mutate({project:f,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)(_,{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!==g.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."})]}),g.filter(e=>"mcp"!==e.distribution).map(n=>(0,t.jsxs)("div",{className:"resource-row",children:[(0,t.jsx)(S.f,{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:[m.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:ea,onClick:()=>{ex(async()=>{await a.U.plugins.update.mutate({id:n.id,enabled:!n.enabled}),ec(n.enabled?"Plugin disabled for future runs.":"Plugin enabled.")})},children:[(0,t.jsx)(I,{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:z,description:H,...en?{configuration:F.parse(JSON.parse(Z))}:{source:V},credential:X||null};await a.U.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=>{E(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Plugin version",(0,t.jsx)(o.f,{required:!0,value:z,disabled:en||ea||!e,onChange:e=>{G(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Plugin credential",(0,t.jsxs)("select",{value:X,disabled:ea||!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:H,disabled:ea||!e,onChange:e=>{K(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)($.f,{href:"/credentials/",children:"Manage credentials"})}),(0,t.jsxs)("label",{children:["Configuration (JSON)",(0,t.jsx)(c.f,{value:Z,disabled:ea||!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)(D,{actionId:`plugin-${j||"new"}`,value:V,onChange:Q,readOnly:ea||!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:V,readOnly:ea||!e,onChange:e=>{Q(e.target.value)}})]})})]}),e?(0,t.jsx)(i.f,{type:"submit",className:"mt-4",disabled:ea||!M.trim()||!z.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:ea,onClick:()=>{ex(async()=>{await eg({title:"Remove this plugin?",description:"Its tools will be removed from future project runs. Existing runs retain their pinned source.",actionLabel:"Remove plugin"})&&(await a.U.plugins.delete.mutate({id:j}),ej(),ec("Plugin removed."))})},children:"Remove plugin"}):void 0]}),en&&e&&!em?(0,t.jsx)(N,{plugin:et,auth:er,onConnected:async e=>{try{let t=await a.U.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,es?(0,t.jsx)("p",{className:"error",role:"alert",children:es}):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,T.useWorkspace)();return(0,t.jsx)(J,{canManage:e,onDirtyChange:n},r)}],33103)},93479,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(39689);let a=n.forwardRef(({className:e,type:n,...a},l)=>(0,t.jsx)("input",{type:n,className:(0,r.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium 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:l,...a}));a.displayName="Input",e.s(["f",0,a])},24687,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(39689);let a=n.forwardRef(({className:e,...n},a)=>(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:a,...n}));a.displayName="Textarea",e.s(["f",0,a])},23920,e=>{"use strict";var t=e.i(18050),n=e.i(5500),n=n,r=e.i(79258),a=e.i(71645);e.s(["f",0,function({url:e,size:l=32}){let s=function(e){if(!e)return"";try{let t=new URL(e);return"https:"!==t.protocol||t.username||t.password?"":t.href}catch{return""}}(e),[i,o]=(0,a.useState)("");return s&&i!==s?(0,t.jsx)(n.Image,{src:s,alt:"",width:l,height:l,unoptimized:!0,referrerPolicy:"no-referrer",className:"shrink-0 object-contain",onError:()=>{o(s)}}):(0,t.jsx)(r.f,{size:l,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=[],a=!0;for(let l of e){let e=t(l),s=n(e.name);if(!s){a=!1;continue}let i=[];if(Array.isArray(e.parameters))for(let r of e.parameters){let e=t(r);if(!n(e.name)){a=!1;continue}i.push({name:n(e.name),type:n(e.type),description:n(e.description),optional:!0===e.optional})}r.push({name:s,description:n(e.description),parameters:i,returnType:n(e.returnType)})}return{tools:r,isComplete:a}},"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)}])}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|