@orgsdk/cli 0.2.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/bin/configuration.mjs +0 -12
- package/bin/options.mjs +6 -5
- package/bin/orgsdk.mjs +5 -7
- package/bin/supervision.mjs +29 -40
- package/dist/THIRD_PARTY_NOTICES.txt +53 -0
- package/dist/runtime/README.md +3 -3
- package/dist/server/index.js +996 -669
- package/dist/server/out/404/index.html +1 -1
- package/dist/server/out/404.html +1 -1
- package/dist/server/out/__next.!KHdvcmtzcGFjZSk.__PAGE__.txt +34 -33
- package/dist/server/out/__next._full.txt +28 -27
- package/dist/server/out/__next._tree.txt +1 -1
- package/dist/server/out/_next/static/chunks/08j8vkv6c63tl.js +1 -0
- package/dist/server/out/_next/static/chunks/08mhtndhqtap6.js +1 -0
- package/dist/server/out/_next/static/chunks/0_4g944_32yce.js +1 -0
- package/dist/server/out/_next/static/chunks/0ldil27yuop5w.js +1 -0
- package/dist/server/out/_next/static/chunks/0ml0xmlylpypc.js +1 -0
- package/dist/server/out/_next/static/chunks/0pnz1790dyskl.js +1 -0
- package/dist/server/out/_next/static/chunks/0vvzjn6qqroc-.js +1 -0
- package/dist/server/out/_next/static/chunks/1-rdwquujn9vu.js +1 -0
- package/dist/server/out/_next/static/chunks/{0y5lgqdwpeabb.js → 119rk6qs93dvi.js} +1 -1
- package/dist/server/out/_next/static/chunks/1mvslk_7tkoql.js +1 -0
- package/dist/server/out/_next/static/chunks/1qo38zfnwh7m8.js +1 -0
- package/dist/server/out/_next/static/chunks/1wzgdpm-y6pr7.js +1 -0
- package/dist/server/out/_next/static/chunks/1ybinna1i7_ih.js +1 -0
- package/dist/server/out/_next/static/chunks/1z4_it-ka8j5y.js +1 -0
- package/dist/server/out/_next/static/chunks/{0khjy8qh1ll42.js → 23_jxnb5bd655.js} +1 -1
- package/dist/server/out/_next/static/chunks/26xwt7opuq5ra.js +1 -0
- package/dist/server/out/_next/static/chunks/2_mjw80no8x2k.js +1 -0
- package/dist/server/out/_next/static/chunks/2e3acf42jw52v.js +1 -0
- package/dist/server/out/_next/static/chunks/2isb6m1ll4dfq.js +3 -0
- package/dist/server/out/_next/static/chunks/2q18r9vstryqj.js +3 -0
- package/dist/server/out/_next/static/chunks/2zwn2yzygk1de.js +1 -0
- package/dist/server/out/_next/static/chunks/{2z60o39-yshg2.js → 36wd29nar_zo_.js} +1 -1
- package/dist/server/out/_next/static/chunks/37a4b-pq_bp3z.js +1 -0
- package/dist/server/out/_next/static/chunks/37ulwyxnek-f9.js +1 -0
- package/dist/server/out/_next/static/chunks/38qp_i6ue7fcy.js +1 -0
- package/dist/server/out/_next/static/chunks/3a4y69p5pl3_7.js +10 -0
- package/dist/server/out/_next/static/chunks/3l2yelj-blib4.js +1 -0
- package/dist/server/out/_next/static/chunks/3u6154viqt17v.js +1 -0
- package/dist/server/out/_next/static/chunks/{2navy2mx7--vk.js → 3w6l6p3ylx6oq.js} +2 -2
- package/dist/server/out/_next/static/chunks/{0cwfl2xanfapu.js → 3yetoibj5lso8.js} +1 -1
- package/dist/server/out/_next/static/chunks/42mg-r2kufm8n.js +1 -0
- package/dist/server/out/_not-found/__next._full.txt +22 -19
- package/dist/server/out/_not-found/__next._not-found.__PAGE__.txt +25 -22
- package/dist/server/out/_not-found/__next._tree.txt +1 -1
- package/dist/server/out/_not-found/index.html +1 -1
- package/dist/server/out/_not-found/index.txt +22 -19
- package/dist/server/out/accounts/2fa/__next._full.txt +25 -24
- package/dist/server/out/accounts/2fa/__next._tree.txt +1 -1
- package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/2fa/index.html +1 -1
- package/dist/server/out/accounts/2fa/index.txt +25 -24
- package/dist/server/out/accounts/email/__next._full.txt +25 -24
- package/dist/server/out/accounts/email/__next._tree.txt +1 -1
- package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/email/index.html +1 -1
- package/dist/server/out/accounts/email/index.txt +25 -24
- package/dist/server/out/accounts/login/__next._full.txt +25 -24
- package/dist/server/out/accounts/login/__next._tree.txt +1 -1
- package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/login/index.html +1 -1
- package/dist/server/out/accounts/login/index.txt +25 -24
- package/dist/server/out/accounts/logout/__next._full.txt +25 -24
- package/dist/server/out/accounts/logout/__next._tree.txt +1 -1
- package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/logout/index.html +1 -1
- package/dist/server/out/accounts/logout/index.txt +25 -24
- package/dist/server/out/accounts/password/change/__next._full.txt +26 -25
- package/dist/server/out/accounts/password/change/__next._tree.txt +1 -1
- package/dist/server/out/accounts/password/change/__next.accounts.password.change.__PAGE__.txt +30 -29
- package/dist/server/out/accounts/password/change/index.html +1 -1
- package/dist/server/out/accounts/password/change/index.txt +26 -25
- package/dist/server/out/accounts/password/reset/__next._full.txt +25 -23
- package/dist/server/out/accounts/password/reset/__next._tree.txt +1 -1
- package/dist/server/out/accounts/password/reset/__next.accounts.password.reset.__PAGE__.txt +29 -27
- package/dist/server/out/accounts/password/reset/index.html +1 -1
- package/dist/server/out/accounts/password/reset/index.txt +25 -23
- package/dist/server/out/accounts/signup/__next._full.txt +25 -24
- package/dist/server/out/accounts/signup/__next._tree.txt +1 -1
- package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +28 -27
- package/dist/server/out/accounts/signup/index.html +1 -1
- package/dist/server/out/accounts/signup/index.txt +25 -24
- package/dist/server/out/actions/__next.!KHdvcmtzcGFjZSk.actions.__PAGE__.txt +33 -33
- package/dist/server/out/actions/__next._full.txt +28 -28
- package/dist/server/out/actions/__next._tree.txt +1 -1
- package/dist/server/out/actions/index.html +1 -1
- package/dist/server/out/actions/index.txt +28 -28
- package/dist/server/out/agents/__next.!KHdvcmtzcGFjZSk.agents.__PAGE__.txt +38 -37
- package/dist/server/out/agents/__next._full.txt +31 -30
- package/dist/server/out/agents/__next._tree.txt +1 -1
- package/dist/server/out/agents/index.html +1 -1
- package/dist/server/out/agents/index.txt +31 -30
- package/dist/server/out/approvals/__next.!KHdvcmtzcGFjZSk.approvals.__PAGE__.txt +38 -37
- package/dist/server/out/approvals/__next._full.txt +31 -30
- package/dist/server/out/approvals/__next._tree.txt +1 -1
- package/dist/server/out/approvals/index.html +1 -1
- package/dist/server/out/approvals/index.txt +31 -30
- package/dist/server/out/artifacts/__next.!KHdvcmtzcGFjZSk.artifacts.__PAGE__.txt +30 -30
- package/dist/server/out/artifacts/__next._full.txt +25 -25
- package/dist/server/out/artifacts/__next._tree.txt +1 -1
- package/dist/server/out/artifacts/index.html +1 -1
- package/dist/server/out/artifacts/index.txt +25 -25
- package/dist/server/out/audit/__next.!KHdvcmtzcGFjZSk.audit.__PAGE__.txt +35 -34
- package/dist/server/out/audit/__next._full.txt +28 -27
- package/dist/server/out/audit/__next._tree.txt +1 -1
- package/dist/server/out/audit/index.html +1 -1
- package/dist/server/out/audit/index.txt +28 -27
- package/dist/server/out/chat/__next.!KHdvcmtzcGFjZSk.chat.__PAGE__.txt +34 -33
- package/dist/server/out/chat/__next._full.txt +27 -26
- package/dist/server/out/chat/__next._tree.txt +1 -1
- package/dist/server/out/chat/index.html +1 -1
- package/dist/server/out/chat/index.txt +27 -26
- package/dist/server/out/connections/__next.!KHdvcmtzcGFjZSk.connections.__PAGE__.txt +38 -37
- package/dist/server/out/connections/__next._full.txt +31 -30
- package/dist/server/out/connections/__next._tree.txt +1 -1
- package/dist/server/out/connections/index.html +1 -1
- package/dist/server/out/connections/index.txt +31 -30
- package/dist/server/out/credentials/__next.!KHdvcmtzcGFjZSk.credentials.__PAGE__.txt +29 -29
- package/dist/server/out/credentials/__next._full.txt +24 -24
- package/dist/server/out/credentials/__next._tree.txt +1 -1
- package/dist/server/out/credentials/index.html +1 -1
- package/dist/server/out/credentials/index.txt +24 -24
- package/dist/server/out/documents/__next.!KHdvcmtzcGFjZSk.documents.__PAGE__.txt +38 -37
- package/dist/server/out/documents/__next._full.txt +31 -30
- package/dist/server/out/documents/__next._tree.txt +1 -1
- package/dist/server/out/documents/index.html +1 -1
- package/dist/server/out/documents/index.txt +31 -30
- package/dist/server/out/index.html +1 -1
- package/dist/server/out/index.txt +28 -27
- package/dist/server/out/people/__next.!KHdvcmtzcGFjZSk.people.__PAGE__.txt +38 -37
- package/dist/server/out/people/__next._full.txt +31 -30
- package/dist/server/out/people/__next._tree.txt +1 -1
- package/dist/server/out/people/index.html +1 -1
- package/dist/server/out/people/index.txt +31 -30
- package/dist/server/out/plugins/__next.!KHdvcmtzcGFjZSk.plugins.__PAGE__.txt +31 -31
- package/dist/server/out/plugins/__next._full.txt +26 -26
- package/dist/server/out/plugins/__next._tree.txt +1 -1
- package/dist/server/out/plugins/icons/SOURCES.md +24 -0
- package/dist/server/out/plugins/icons/asana.ico +0 -0
- package/dist/server/out/plugins/icons/browser-cdp.png +0 -0
- package/dist/server/out/plugins/icons/chromium-license.txt +27 -0
- package/dist/server/out/plugins/icons/data.svg +1 -0
- package/dist/server/out/plugins/icons/facebook.svg +1 -0
- package/dist/server/out/plugins/icons/github.svg +10 -0
- package/dist/server/out/plugins/icons/gmail.svg +1 -0
- package/dist/server/out/plugins/icons/google-drive.svg +1 -0
- package/dist/server/out/plugins/icons/google-sheets.svg +1 -0
- package/dist/server/out/plugins/icons/google-tasks.svg +1 -0
- package/dist/server/out/plugins/icons/harvest.svg +7 -0
- package/dist/server/out/plugins/icons/linkedin.png +0 -0
- package/dist/server/out/plugins/icons/llm.svg +1 -0
- package/dist/server/out/plugins/icons/lucide-license.txt +43 -0
- package/dist/server/out/plugins/icons/serper.png +0 -0
- package/dist/server/out/plugins/icons/servicem8.png +0 -0
- package/dist/server/out/plugins/icons/shippo.png +0 -0
- package/dist/server/out/plugins/icons/shopify.png +0 -0
- package/dist/server/out/plugins/icons/twitter.svg +1 -0
- package/dist/server/out/plugins/icons/xero.svg +15 -0
- package/dist/server/out/plugins/icons/zendesk.svg +6 -0
- package/dist/server/out/plugins/index.html +1 -1
- package/dist/server/out/plugins/index.txt +26 -26
- package/dist/server/out/projects/__next.!KHdvcmtzcGFjZSk.projects.__PAGE__.txt +38 -37
- package/dist/server/out/projects/__next._full.txt +31 -30
- package/dist/server/out/projects/__next._tree.txt +1 -1
- package/dist/server/out/projects/index.html +1 -1
- package/dist/server/out/projects/index.txt +31 -30
- package/dist/server/out/runs/__next.!KHdvcmtzcGFjZSk.runs.__PAGE__.txt +30 -30
- package/dist/server/out/runs/__next._full.txt +25 -25
- package/dist/server/out/runs/__next._tree.txt +1 -1
- package/dist/server/out/runs/index.html +1 -1
- package/dist/server/out/runs/index.txt +25 -25
- package/dist/server/out/schedules/__next.!KHdvcmtzcGFjZSk.schedules.__PAGE__.txt +29 -29
- package/dist/server/out/schedules/__next._full.txt +24 -24
- package/dist/server/out/schedules/__next._tree.txt +1 -1
- package/dist/server/out/schedules/index.html +1 -1
- package/dist/server/out/schedules/index.txt +24 -24
- package/dist/server/out/settings/__next.!KHdvcmtzcGFjZSk.settings.__PAGE__.txt +38 -37
- package/dist/server/out/settings/__next._full.txt +31 -30
- package/dist/server/out/settings/__next._tree.txt +1 -1
- package/dist/server/out/settings/index.html +1 -1
- package/dist/server/out/settings/index.txt +31 -30
- package/dist/server/out/setup/__next._full.txt +27 -26
- package/dist/server/out/setup/__next._tree.txt +1 -1
- package/dist/server/out/setup/__next.setup.__PAGE__.txt +30 -29
- package/dist/server/out/setup/index.html +1 -1
- package/dist/server/out/setup/index.txt +27 -26
- package/dist/server/out/studio/approve/__next._full.txt +30 -0
- package/dist/server/out/studio/approve/__next._tree.txt +5 -0
- package/dist/server/out/studio/approve/__next.studio.approve.__PAGE__.txt +37 -0
- package/dist/server/out/studio/approve/index.html +1 -0
- package/dist/server/out/studio/approve/index.txt +30 -0
- package/dist/server/out/tables/__next.!KHdvcmtzcGFjZSk.tables.__PAGE__.txt +35 -34
- package/dist/server/out/tables/__next._full.txt +28 -27
- package/dist/server/out/tables/__next._tree.txt +1 -1
- package/dist/server/out/tables/index.html +1 -1
- package/dist/server/out/tables/index.txt +28 -27
- package/dist/server/out/webhooks/__next.!KHdvcmtzcGFjZSk.webhooks.__PAGE__.txt +38 -37
- package/dist/server/out/webhooks/__next._full.txt +31 -30
- package/dist/server/out/webhooks/__next._tree.txt +1 -1
- package/dist/server/out/webhooks/index.html +1 -1
- package/dist/server/out/webhooks/index.txt +31 -30
- package/dist/server/out/workspaces/invite/__next._full.txt +28 -27
- package/dist/server/out/workspaces/invite/__next._tree.txt +1 -1
- package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +31 -30
- package/dist/server/out/workspaces/invite/index.html +1 -1
- package/dist/server/out/workspaces/invite/index.txt +28 -27
- package/docs/browser-sessions.md +3 -3
- package/docs/npm-distribution.md +4 -4
- package/docs/studio.md +25 -0
- package/package.json +3 -1
- package/runtime/README.md +3 -3
- package/dist/server/out/_next/static/chunks/0ay0b1lpy734z.js +0 -1
- package/dist/server/out/_next/static/chunks/0e7s8ie0wlk66.js +0 -1
- package/dist/server/out/_next/static/chunks/0ey-6hb0za4r_.js +0 -1
- package/dist/server/out/_next/static/chunks/0r0572w1rwpcv.js +0 -1
- package/dist/server/out/_next/static/chunks/0u_9k8f7709np.js +0 -1
- package/dist/server/out/_next/static/chunks/0w34iczo7r1v5.js +0 -1
- package/dist/server/out/_next/static/chunks/0zfiikazg0_ga.js +0 -1
- package/dist/server/out/_next/static/chunks/19ue6x5c3f_38.js +0 -3
- package/dist/server/out/_next/static/chunks/1c2xcwifk3vhh.js +0 -1
- package/dist/server/out/_next/static/chunks/1dwr62uuyceq-.js +0 -1
- package/dist/server/out/_next/static/chunks/1fweh1ttncdlv.js +0 -1
- package/dist/server/out/_next/static/chunks/1iklteprcoims.js +0 -1
- package/dist/server/out/_next/static/chunks/1qaow7bdy3oid.js +0 -1
- package/dist/server/out/_next/static/chunks/1wn9ohqcnx8y8.js +0 -3
- package/dist/server/out/_next/static/chunks/1zieh-zxgxmcp.js +0 -1
- package/dist/server/out/_next/static/chunks/25qsan0t-_of0.js +0 -1
- package/dist/server/out/_next/static/chunks/26yareaaj1kyr.js +0 -1
- package/dist/server/out/_next/static/chunks/2bkkmnhngpacd.js +0 -1
- package/dist/server/out/_next/static/chunks/2e39uy7huhczu.js +0 -1
- package/dist/server/out/_next/static/chunks/2rp65hq6bmpxv.js +0 -1
- package/dist/server/out/_next/static/chunks/3_d6w25_b15kx.js +0 -1
- package/dist/server/out/_next/static/chunks/3d8gkwu9nszjk.js +0 -1
- package/dist/server/out/_next/static/chunks/3l-16g1y6k5rs.js +0 -1
- package/dist/server/out/_next/static/chunks/3obu_9-ka7u_h.js +0 -1
- package/dist/server/out/_next/static/chunks/3u7q5w03st-rs.js +0 -1
- /package/dist/server/out/_next/static/{pj0R4_8zvgkN95QPXRHgC → EF7eiGRF-6pU64XbVOn6f}/_buildManifest.js +0 -0
- /package/dist/server/out/_next/static/{pj0R4_8zvgkN95QPXRHgC → EF7eiGRF-6pU64XbVOn6f}/_clientMiddlewareManifest.js +0 -0
- /package/dist/server/out/_next/static/{pj0R4_8zvgkN95QPXRHgC → EF7eiGRF-6pU64XbVOn6f}/_ssgManifest.js +0 -0
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 `
|
|
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.1.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,13 +22,13 @@ 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-
|
|
25
|
+
npm install -g ./orgsdk-cli-1.1.0.tgz
|
|
26
26
|
orgsdk start
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
The installed product needs Node.js, but no source checkout, Bun, frontend build tooling or Docker for host mode. SQLite and password hashing use native dependencies; npm must install the packages appropriate to the host. A platform without a matching native prebuild may need its dependency's native build prerequisites. The supported installation target is Linux; project filesystem operations require `/proc`.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
New local installations try loopback ports 28940 through 28947 and remember their selected port. Existing installations without a saved port use 8080. The CLI prints the address. An explicit port is exact. Complete setup in the browser. The local executor manager creates project registrations through the existing authenticated HTTP bootstrap protocol. It never opens the application database. A private bootstrap credential is stored outside the package alongside the installation data. Job workers receive scoped run authority, not the manager credential.
|
|
32
32
|
|
|
33
33
|
Host mode uses the current OS account and is intended for trusted code, plugins and clients. Validation and action tests run in disposable workers with allowlisted inputs and no project capability or project directory. They do not gain an OS sandbox from that separation. Docker mode remains available when configured with an executor image, network and data mounts.
|
|
34
34
|
|
|
@@ -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-
|
|
49
|
+
`npm run test:distribution -- ./orgsdk-cli-1.1.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.1.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/docs/studio.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Connect a separately hosted dashboard
|
|
2
|
+
|
|
3
|
+
Build the static dashboard with `npm run build:studio` after `npm run setup`. Serve the contents of `frontend/dist/studio/` at the root of a dedicated HTTPS origin. Support directory indexes and serve the included scripts and styles on the same origin. Exclude third-party scripts from this site. A dashboard release can read and act on the workspaces that approve it.
|
|
4
|
+
|
|
5
|
+
Local installations accept pairing requests from `https://studio.orgsdk.ai` by default. Set `ORGSDK_STUDIO_ORIGIN` to an empty string to disable pairing, or to an exact HTTPS origin to use a different dashboard. Remote installations explicitly configure their dashboard origin. The regular installation build includes setup, login, MFA, pairing approval and the full offline dashboard.
|
|
6
|
+
|
|
7
|
+
For the official deployment, build the export from the released source revision and run `npx wrangler@4.147.0 deploy --config wrangler.studio.jsonc` from the repository root. The configuration serves the static files at `studio.orgsdk.ai`.
|
|
8
|
+
|
|
9
|
+
## On this computer
|
|
10
|
+
|
|
11
|
+
Start OrgSDK. New local installations bind to the first available loopback port from 28940 through 28947 and save it in the data directory. The next launch tries the saved port first. Existing databases with no saved port retain 8080. Use `--port` or `PORT` for a fixed listener, including installations with pre-registered OAuth callback URLs. Docker's internal service address and existing host mapping are configured in Compose.
|
|
12
|
+
|
|
13
|
+
Open the printed dashboard link, or choose **Connect to this computer** in the hosted dashboard and grant the browser permission to reach loopback. Pick an installation if several respond. The browser checks the product, protocol and configured dashboard origin before offering a connection. An explicit server address also covers ports outside the discovery range. Chrome and Firefox found compatible local installations in browser tests. Linux WebKit did not discover the plain HTTP loopback listeners in the same setup. If discovery fails, open the local address printed by OrgSDK to use the bundled dashboard.
|
|
14
|
+
|
|
15
|
+
## On a customer server
|
|
16
|
+
|
|
17
|
+
The same export can connect to a remote installation. Give each customer's installation its own hostname, data directory, encryption key and executor environment. Set, for example, `ORGSDK_PUBLIC_ORIGIN=https://customer.example.com`, `ORGSDK_STUDIO_ORIGIN=https://studio.example.com` and a fixed backend `PORT`. Terminate HTTPS at the installation's reverse proxy, preserve the public Host header and initialize the matching workspace hostname and first owner before enabling public ingress. Keep backend listeners and executor registration private. Provide any public OAuth callbacks, MCP or webhook routes on the installation hostname. Only expose the routes your deployment uses. Disable proxy response buffering for tRPC event streams.
|
|
18
|
+
|
|
19
|
+
In Studio, enter the installation's HTTPS origin and choose **Connect to server**. The browser contacts that one address directly. Enter account credentials on the installation, check the dashboard origin displayed on the approval page, and approve. A user on a different computer can follow the same flow. Customer provisioning, backups, executor isolation and production operation are separate deployment responsibilities.
|
|
20
|
+
|
|
21
|
+
## Connection lifetime
|
|
22
|
+
|
|
23
|
+
Protocol version 1 uses a one-minute single-use approval code bound to a browser-generated challenge. The verifier stays in the initiating tab until exchange. The approval comes from an authenticated installation session. Studio keeps its 30-minute session credential in page memory and sends it in a request header for queries, mutations and event streams. Reloading Studio or restarting the server requires a new approval. Signing out of the approving account invalidates its dashboard access. Existing workspace permissions apply to every paired request. Manage account security and reconfirm identity on the installation.
|
|
24
|
+
|
|
25
|
+
Serve an export compatible with the installation's protocol. A server built before Studio support remains available through its own bundled interface. The local interface also works when the dashboard host or the browser's local-network permission is unavailable.
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "1.1.0",
|
|
3
3
|
"name": "@orgsdk/cli",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"dev": "bun --no-env-file scripts/dev.ts",
|
|
15
15
|
"test": "npm run test:unit && npm run test:integration",
|
|
16
16
|
"typecheck": "tsc --noEmit",
|
|
17
|
+
"build:studio": "NEXT_PUBLIC_ORGSDK_STUDIO=1 npm --prefix frontend run build",
|
|
17
18
|
"build": "bun scripts/build.ts",
|
|
18
19
|
"format": "prettier --write server scripts/*.ts bin/*.mjs e2e knip.json package.json tsconfig.json playwright.config.ts eslint.config.mjs drizzle.config.ts",
|
|
19
20
|
"format:check": "prettier --check server scripts/*.ts bin/*.mjs e2e knip.json package.json tsconfig.json playwright.config.ts eslint.config.mjs drizzle.config.ts",
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
"dist/runtime/",
|
|
95
96
|
"dist/THIRD_PARTY_NOTICES.txt",
|
|
96
97
|
"docs/npm-distribution.md",
|
|
98
|
+
"docs/studio.md",
|
|
97
99
|
"docs/remote-mcp.md",
|
|
98
100
|
"docs/browser-sessions.md",
|
|
99
101
|
"runtime/README.md",
|
package/runtime/README.md
CHANGED
|
@@ -35,7 +35,7 @@ For an existing plugin checkout using the canonical `.plugin.json` with `name`,
|
|
|
35
35
|
|
|
36
36
|
Use this optional systemd service to run a project executor on a local Linux machine.
|
|
37
37
|
The service communicates with the application over HTTP and never accesses the application database.
|
|
38
|
-
Use
|
|
38
|
+
Use the loopback URL printed by OrgSDK when the service runs on the server machine, or the
|
|
39
39
|
server's reachable local network address when using another machine. Docker
|
|
40
40
|
jobs also need a server address reachable from their container; container
|
|
41
41
|
`localhost` refers to the job container itself. Allow outbound access to the
|
|
@@ -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-
|
|
53
|
-
sudo bash package/scripts/install-service.sh "$PWD/orgsdk-executor-
|
|
52
|
+
tar -xzf orgsdk-executor-1.1.0.tgz package/scripts/install-service.sh
|
|
53
|
+
sudo bash package/scripts/install-service.sh "$PWD/orgsdk-executor-1.1.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,13581,29487,e=>{"use strict";var s=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,r=0){let[t,n]=(0,s.useState)(),[i,l]=(0,s.useState)(""),[c,d]=(0,s.useState)(!0),o=(0,s.useRef)(void 0),u=(0,s.useRef)(!1),h=(0,s.useCallback)(async()=>{o.current?.abort();let s=new AbortController;o.current=s;try{let a=await e(s.signal);if(s.signal.aborted||!u.current)return;n(a),l("")}catch(e){!s.signal.aborted&&u.current&&l((0,a.f)(e))}finally{!s.signal.aborted&&u.current&&d(!1)}},[e]);return(0,s.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=r>0?setInterval(()=>{h()},r):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,r]),{data:t,error:i,isLoading:c,refresh:h}}],13581);var r=e.i(18050),t=e.i(19455);e.s(["f",0,function({isLoading:e,error:s,refresh:a}){return(0,r.jsxs)(r.Fragment,{children:[e?(0,r.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,s?(0,r.jsxs)("div",{className:"error",role:"alert",children:[(0,r.jsx)("p",{children:s}),(0,r.jsx)(t.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],29487)},40067,e=>{"use strict";var s=e.i(18050),a=e.i(18566),r=e.i(26067),t=e.i(77071),n=e.i(71645),i=e.i(73656),l=e.i(95813),c=e.i(19455),d=e.i(93479),o=e.i(15080),u=e.i(13581),h=e.i(1101),m=e.i(87309);function p({project:e,refresh:a}){let[r,t]=(0,n.useState)("http://localhost"),[d,o]=(0,n.useState)(""),[u,h]=(0,n.useState)(!1),[j,x]=(0,n.useState)(""),[f,b]=(0,n.useState)(""),g=(0,m.h)(),v=async(s,r=!1)=>{if(await g({title:s?"Revoke this project’s runner?":"Register a replacement runner?",description:"The current runner will lose access. Running tasks may stop. This affects only this project.",actionLabel:s?"Revoke runner":"Generate token"})){h(!0),x(""),b(""),o("");try{if(s)await i.U.projects.disconnectExecutor.mutate({id:e.id}),b("Runner access revoked.");else{let s=await i.U.projects.connectExecutor.mutate({id:e.id,locally_managed:r});r?b("Local runner enabled. It will connect when the installation’s runner is running."):o(s.token)}await a()}catch(e){x((0,l.f)(e))}finally{h(!1)}}},w="orgsdk executor register --url "+r+"\norgsdk executor start --mode docker",[N,y]=(0,n.useState)(0);(0,n.useEffect)(()=>{let e=()=>{y(Date.now())};e();let s=setInterval(()=>{e(),a().catch(e=>{x((0,l.f)(e))})},1e4);return()=>{clearInterval(s)}},[a]);let k=e.runner.last_seen_at?new Date(e.runner.last_seen_at).getTime():void 0,C="Registered · waiting for connection";return void 0!==k&&(C=N-k>6e4?"Unavailable · no recent heartbeat":"Available"),e.runner.enabled||(C="Revoked"),(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Project runner"}),(0,s.jsxs)("p",{className:"mb-4",children:["This project uses its own runner to execute actions in its persistent working folder. Starting OrgSDK with ",(0,s.jsx)("code",{children:"orgsdk start"})," also starts the local runner."]}),(0,s.jsxs)("p",{children:[e.runner.registered?C:"Not registered"," ·"," ",e.runner.locally_managed?"Managed by this installation":"Linked runner"]}),e.runner.last_seen_at?(0,s.jsxs)("p",{className:"small",children:["Last connected:"," ",new Date(e.runner.last_seen_at).toLocaleString()]}):(0,s.jsx)("p",{className:"small",children:"Waiting for the runner to connect."}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-3",children:[(0,s.jsx)(c.f,{disabled:u,onClick:()=>{v(!1)},children:"Generate registration token"}),(0,s.jsx)(c.f,{variant:"outline",disabled:u,onClick:()=>{v(!1,!0)},children:"Use local runner"}),(0,s.jsx)(c.f,{variant:"outline",disabled:u||!e.runner.registered||!e.runner.enabled,onClick:()=>{v(!0)},children:"Revoke runner"})]}),d?(0,s.jsxs)("div",{className:"mt-5 grid gap-3",children:[(0,s.jsx)("p",{children:"Copy this token now. It is shown once. Paste it at the registration prompt."}),(0,s.jsx)("code",{className:"break-all",children:d}),(0,s.jsx)(c.f,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(d).then(()=>{b("Token copied.")}).catch(()=>{x("Clipboard unavailable. Select and copy the token.")})},children:"Copy token"})]}):null,(0,s.jsxs)("details",{className:"mt-4",onToggle:()=>{t(location.origin)},children:[(0,s.jsx)("summary",{children:"Link a separate runner"}),(0,s.jsx)("p",{className:"mt-4",children:"The npm-installed OrgSDK command includes the runner. A separate runner machine needs Linux and Node.js 22.22 or newer. Docker mode also requires Docker and an executor image, network and storage configured by your administrator."}),(0,s.jsx)("pre",{className:"my-4 overflow-auto",children:w}),(0,s.jsx)(c.f,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(w).then(()=>{b("Commands copied.")}).catch(()=>{x("Clipboard unavailable. Select and copy the commands.")})},children:"Copy commands"}),(0,s.jsxs)("p",{className:"small mt-3",children:["Use ",(0,s.jsx)("code",{children:"--mode host"})," only when you intend to let tools run directly under your operating system account."]})]}),j?(0,s.jsx)("p",{role:"alert",className:"error",children:j}):null,f?(0,s.jsx)("p",{role:"status",className:"notice",children:f}):null]})}var j=e.i(59037),x=e.i(94757),f=e.i(75016),b=e.i(29487);let g=[{id:"overview",label:"Overview"},{id:"access",label:"Data access"},{id:"runner",label:"Runner"},{id:"settings",label:"Settings"}],v=[{field:"readable_tables",label:"Read tables",resource:"tables"},{field:"writable_tables",label:"Write tables",resource:"tables"},{field:"readable_documents",label:"Read documents",resource:"documents"},{field:"writable_documents",label:"Write documents",resource:"documents"}];async function w(e){let[s,a]=await Promise.all([(0,o.f)(e),(0,o.t)(e)]);return{runs:s,actions:a}}async function N(e){let[s,a,r]=await Promise.all([(0,o.p)(e),(0,o.l)(e),i.U.tables.list.query(void 0,{signal:e})]);return{plugins:s,documents:a,tables:r.results}}function y({project:e,tab:a,refresh:r,onDirtyChange:t}){let{canManage:n}=(0,x.useWorkspace)(),i=`project=${encodeURIComponent(e.id)}`;return(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"!mb-1 !text-xl",children:e.name}),(0,s.jsx)("p",{className:"small",children:"Configure the tools and data your MCP agent can use."})]}),(0,s.jsx)("span",{className:"badge",children:e.enabled?"Enabled":"Disabled"})]}),(0,s.jsx)("nav",{className:"mb-6 flex flex-wrap gap-2 border-b border-slate-200 pb-4","aria-label":"Project configuration",children:g.map(e=>(0,s.jsx)(c.f,{asChild:!0,variant:a===e.id?"secondary":"ghost",children:(0,s.jsx)(f.f,{href:`/projects/?${i}${"overview"===e.id?"":`&tab=${e.id}`}`,"aria-current":a===e.id?"page":void 0,children:e.label})},e.id))}),"overview"===a?(0,s.jsx)(k,{project:e}):void 0,"access"===a?(0,s.jsx)(S,{project:e,refresh:r,onDirtyChange:t}):void 0,"runner"===a?n?(0,s.jsx)(p,{project:e,refresh:r}):(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Project runner"}),(0,s.jsxs)("p",{children:[e.runner.registered?"Registered":"Not registered"," ·"," ",e.runner.enabled?"Enabled":"Revoked"]}),(0,s.jsx)("p",{className:"small mt-3",children:"An owner or admin can configure this project’s runner."})]}):void 0,"settings"===a?(0,s.jsx)(_,{project:e,refresh:r,onDirtyChange:t}):void 0]})}function k({project:e}){let a=(0,u.f)(w),r=`project=${encodeURIComponent(e.id)}`,t=a.data?.actions.filter(s=>s.project===e.id),n=a.data?.runs.filter(s=>s.project===e.id).slice(0,5);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center",children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h2",{className:"!mb-0",children:"Connect your agent over MCP"}),(0,s.jsx)("p",{className:"max-w-2xl",children:"Connect an external agent to this project to build and run actions. Choose the plugins and workspace data it can access, then use saved actions to review runs, add schedules and receive webhooks."})]}),(0,s.jsx)(c.f,{asChild:!0,children:(0,s.jsx)(f.f,{href:`/connections/?${r}`,children:"Connect agent"})})]}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-3 border-t border-slate-200 pt-4",children:[(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/projects/?${r}&tab=access`,children:"Configure data access"})}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/plugins/?${r}`,children:"Manage plugins"})}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/projects/?${r}&tab=runner`,children:e.runner.registered?"Manage runner":"Set up runner"})})]})]}),(0,s.jsx)(b.f,{...a}),(0,s.jsxs)("section",{className:"panel","aria-labelledby":"project-actions-heading",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{id:"project-actions-heading",className:"!mb-1",children:"Saved actions"}),(0,s.jsx)("p",{className:"small",children:"Open an action to manage its code, runs, schedule and webhook."})]}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/actions/?${r}`,children:"View all actions"})})]}),(0,s.jsx)("div",{className:"grid gap-3 xl:grid-cols-2",children:t?.slice(0,4).map(e=>(0,s.jsx)(h.f,{action:e},e.id))}),t?.length===0?(0,s.jsxs)("div",{className:"rounded-lg border border-dashed border-slate-200 p-5",children:[(0,s.jsx)("h3",{children:"No saved actions yet"}),(0,s.jsx)("p",{className:"small mt-2",children:"Create an action or ask your connected agent to build one."}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",className:"mt-4",children:(0,s.jsx)(f.f,{href:`/actions/?${r}&new=1`,children:"Create action"})})]}):void 0]}),(0,s.jsxs)("section",{className:"panel","aria-labelledby":"project-runs-heading",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsx)("h2",{id:"project-runs-heading",className:"!mb-0",children:"Recent runs"}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/runs/?${r}`,children:"View all runs"})})]}),(0,s.jsx)("div",{className:"grid gap-3",children:n?.map(e=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-slate-200 p-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("span",{className:"text-sm font-medium",children:[e.operation," · ",e.status]}),(0,s.jsx)("p",{className:"small mt-1",children:new Date(e.created_at).toLocaleString()})]}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/runs/?${r}&run=${encodeURIComponent(e.id)}`,children:"Inspect run"})})]},e.id))}),n?.length===0?(0,s.jsx)("p",{children:"No runs yet. Run an action to see its results here."}):void 0]})]})}function C(e){return{readable_tables:"readable_tables"in e?e.readable_tables:[],writable_tables:"writable_tables"in e?e.writable_tables:[],readable_documents:"readable_documents"in e?e.readable_documents:[],writable_documents:"writable_documents"in e?e.writable_documents:[]}}function S({project:e,refresh:a,onDirtyChange:r}){let{canManage:t}=(0,x.useWorkspace)(),d=(0,u.f)(N),o=C(e),[h,m]=(0,n.useState)(()=>C(e)),[p,g]=(0,n.useState)(!1),[w,y]=(0,n.useState)(""),[k,_]=(0,n.useState)("");(0,j.f)(v.some(({field:e})=>JSON.stringify(h[e])!==JSON.stringify(o[e])),r);let R=async()=>{g(!0),y(""),_("");try{let s=await i.U.projects.update.mutate({id:e.id,...h});await a(),m(C(s)),_("Project data access saved.")}catch(e){y((0,l.f)(e))}finally{g(!1)}},D=d.data?.plugins.filter(s=>s.project===e.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Workspace data access"}),(0,s.jsx)("p",{className:"mb-5 max-w-3xl",children:"Choose the shared tables and documents available to this project’s actions. Changes apply to new runs; adding access cannot widen a run that has already been submitted."}),t?void 0:(0,s.jsx)("p",{className:"small mb-5",children:"Only owners and admins can change project data access."}),(0,s.jsx)(b.f,{...d}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),R()},children:[(0,s.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:v.map(({field:e,label:a,resource:r})=>{let n=d.data?.[r];return(0,s.jsx)("div",{className:"min-w-0 rounded-lg border border-slate-200 p-4",children:(0,s.jsxs)("fieldset",{className:"!m-0 min-w-0 !border-0 !p-0",disabled:!t||p,children:[(0,s.jsx)("legend",{className:"!mb-3 !text-sm font-semibold",children:a}),(0,s.jsx)("div",{className:"grid gap-3",children:n?.map(a=>(0,s.jsxs)("label",{className:"check !m-0 !items-start gap-2",children:[(0,s.jsx)("input",{type:"checkbox",className:"mt-1 shrink-0",checked:h[e].includes(a.id),onChange:s=>{m(r=>({...r,[e]:s.target.checked?[...r[e],a.id]:r[e].filter(e=>e!==a.id)}))}}),(0,s.jsx)("span",{className:"min-w-0 break-words",children:"name"in a?a.name:a.title})]},a.id))}),n?.length===0?(0,s.jsxs)("p",{className:"small",children:["No workspace ",r," yet."]}):void 0]})},e)})}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[t?(0,s.jsx)(c.f,{type:"submit",disabled:p||d.isLoading||!d.data,children:p?"Saving…":"Save data access"}):void 0,(0,s.jsx)(f.f,{href:"/tables/",children:"Manage workspace tables"}),(0,s.jsx)(f.f,{href:"/documents/",children:"Manage workspace documents"})]})]}),w?(0,s.jsx)("p",{className:"error mt-4",role:"alert",children:w}):void 0,k?(0,s.jsx)("p",{className:"notice mt-4",role:"status",children:k}):void 0]}),(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Project plugins"}),(0,s.jsx)("p",{children:"Plugins add tools your agent can use in this project. Configure each plugin’s credentials separately."}),(0,s.jsxs)("div",{className:"my-4 grid gap-2",children:[D?.map(e=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-md border border-slate-200 p-3",children:[(0,s.jsxs)("span",{className:"text-sm",children:[e.slug," · ",e.version]}),(0,s.jsx)("span",{className:"badge",children:e.enabled?"Enabled":"Disabled"})]},e.id)),D?.length===0?(0,s.jsx)("p",{className:"small",children:"No plugins installed in this project."}):void 0]}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/plugins/?project=${encodeURIComponent(e.id)}`,children:"Manage project plugins"})})]})]})}function _({project:e,refresh:a,onDirtyChange:r}){let{canManage:t,navigateTo:o}=(0,x.useWorkspace)(),[u,h]=(0,n.useState)(e.name),[p,f]=(0,n.useState)(e.enabled),[b,g]=(0,n.useState)(!1),[v,w]=(0,n.useState)(""),[N,y]=(0,n.useState)(""),k=(0,m.h)();(0,j.f)(u!==e.name||p!==e.enabled,r);let C=async()=>{g(!0),w(""),y("");try{let s=await i.U.projects.update.mutate({id:e.id,name:u.trim(),enabled:p});await a(),h(s.name),y("Project settings saved.")}catch(e){w((0,l.f)(e))}finally{g(!1)}},S=async()=>{if(await k({title:"Delete this project?",description:"Its actions and versions will be removed. Projects referenced by retained run history cannot be deleted.",actionLabel:"Delete project"})){g(!0),w(""),y("");try{await i.U.projects.delete.mutate({id:e.id}),r(!1),await a(),await o("/projects/")}catch(e){w((0,l.f)(e))}finally{g(!1)}}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Project settings"}),(0,s.jsxs)("form",{className:"max-w-2xl",onSubmit:e=>{e.preventDefault(),C()},children:[(0,s.jsxs)("label",{children:["Project name",(0,s.jsx)(d.f,{value:u,disabled:b,onChange:e=>{h(e.target.value)},required:!0})]}),(0,s.jsxs)("label",{className:"check",children:[(0,s.jsx)("input",{type:"checkbox",disabled:b,checked:p,onChange:e=>{f(e.target.checked)}}),"Enabled for new work"]}),(0,s.jsx)("p",{className:"small mt-2",children:"Actions execute serially in this project’s persistent working folder."}),(0,s.jsx)(c.f,{className:"mt-5",type:"submit",disabled:b||!u.trim(),children:b?"Saving…":"Save project"})]}),v?(0,s.jsx)("p",{className:"error mt-4",role:"alert",children:v}):void 0,N?(0,s.jsx)("p",{className:"notice mt-4",role:"status",children:N}):void 0]}),t?(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Delete project"}),(0,s.jsx)("p",{children:"Delete this project and its saved actions. Projects with retained run history cannot be deleted."}),(0,s.jsx)(c.f,{className:"mt-4",variant:"outline",disabled:b,onClick:()=>{S()},children:"Delete project"})]}):void 0]})}function R({onCancel:e}){let{setSelected:r,setDirty:t,refresh:o}=(0,x.useWorkspace)(),u=(0,a.useRouter)(),[h,m]=(0,n.useState)(""),[p,f]=(0,n.useState)(!1),[b,g]=(0,n.useState)("");(0,j.f)(""!==h.trim(),t);let v=async()=>{f(!0),g("");try{let e=await i.U.projects.create.mutate({name:h.trim()});r(e.id),await o(),t(!1),u.push(`/projects/?project=${encodeURIComponent(e.id)}`)}catch(e){g((0,l.f)(e))}finally{f(!1)}};return(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Create a project"}),(0,s.jsx)("p",{className:"small mb-5",children:"Give your project a name, configure its runner and data access, then connect your agent over MCP."}),(0,s.jsxs)("form",{className:"max-w-2xl",onSubmit:e=>{e.preventDefault(),v()},children:[(0,s.jsxs)("label",{children:["Project name",(0,s.jsx)(d.f,{autoFocus:!0,required:!0,value:h,disabled:p,placeholder:"e.g. Operations",onChange:e=>{m(e.target.value)}})]}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(c.f,{type:"submit",disabled:p||!h.trim(),children:p?"Creating…":"Create project"}),(0,s.jsx)(c.f,{type:"button",variant:"outline",disabled:p,onClick:e,children:"Cancel"})]})]}),b?(0,s.jsx)("p",{role:"alert",className:"error mt-4",children:b}):void 0]})}e.s(["default",0,function(){let{projects:e,selected:n,setDirty:i,refresh:l,navigateTo:d}=(0,x.useWorkspace)(),o=(0,a.useSearchParams)(),u=e.find(e=>e.id===n);if("1"===o.get("new"))return(0,s.jsx)(R,{onCancel:()=>{d(u?`/projects/?project=${encodeURIComponent(u.id)}`:"/projects/")}});if(u){let e=["access","runner","settings"].find(e=>e===o.get("tab"))??"overview";return(0,s.jsx)(y,{project:u,tab:e,refresh:l,onDirtyChange:i},u.id)}return(0,s.jsxs)("section",{className:"empty",children:[(0,s.jsx)(r.f,{className:"mx-auto",size:32}),(0,s.jsx)("h2",{className:"!mt-4",children:"Create your first project"}),(0,s.jsx)("p",{children:"A project gives your MCP agent a place to build actions, run work and access the data you choose."}),(0,s.jsx)(c.f,{asChild:!0,className:"mt-5",children:(0,s.jsxs)(f.f,{href:"/projects/?new=1",children:[(0,s.jsx)(t.f,{size:16}),"Create project"]})})]})}],40067)},93479,e=>{"use strict";var s=e.i(18050),a=e.i(71645),r=e.i(39689);let t=a.forwardRef(({className:e,type:a,...t},n)=>(0,s.jsx)("input",{type:a,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:n,...t}));t.displayName="Input",e.s(["f",0,t])},1101,75775,e=>{"use strict";var s=e.i(18050),a=e.i(56420);let r={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};r.node;let t=(0,a.f)(r);e.s(["f",0,t],75775);var n=e.i(52330),i=e.i(75016);e.s(["f",0,function({action:e}){let a=e.description.trim(),r=new URLSearchParams({project:e.project,action:e.id}).toString();return(0,s.jsxs)("article",{className:"flex min-w-0 flex-col gap-4 rounded-xl border border-slate-200 bg-white p-5",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsx)(n.f,{size:20,className:"shrink-0 text-indigo-600","aria-hidden":"true"}),(0,s.jsx)("span",{className:e.enabled?"rounded-full bg-emerald-50 px-2.5 py-1 text-xs font-medium text-emerald-700":"rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-600",children:e.enabled?"Enabled":"Disabled"})]}),(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,s.jsx)("h3",{className:"text-base font-semibold",children:(0,s.jsxs)(i.f,{href:`/actions/?${r}`,className:"flex items-start justify-between gap-3 hover:underline",children:[(0,s.jsx)("span",{className:"break-words",children:e.name}),(0,s.jsx)(t,{size:17,className:"mt-0.5 shrink-0","aria-hidden":"true"})]})}),(0,s.jsx)("p",{className:"text-sm leading-relaxed",children:a.length>0?a:"Open this action to review its code, inputs and saved versions."})]}),(0,s.jsxs)("nav",{className:"flex flex-wrap gap-x-4 gap-y-2 border-t border-slate-100 pt-3 text-sm","aria-label":`${e.name} related records`,children:[(0,s.jsx)(i.f,{href:`/runs/?${r}`,className:"hover:underline",children:"Runs"}),(0,s.jsx)(i.f,{href:`/schedules/?${r}`,className:"hover:underline",children:"Schedules"}),(0,s.jsx)(i.f,{href:`/webhooks/?${r}`,className:"hover:underline",children:"Webhooks"})]})]})}],1101)},59037,e=>{"use strict";var s=e.i(71645);e.s(["f",0,function(e,a){(0,s.useEffect)(()=>{a(e);let s=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",s),()=>{removeEventListener("beforeunload",s),a(!1)}},[e,a])}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(90809),o=e.r(18050),i=s._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),f=e.r(18967),d=e.r(5550),p=e.r(88540),m=e.r(91949),h=e.r(73668),g=e.r(9396);function x(t){var r;let n,a,s,[x,b]=(0,i.useOptimistic)(m.IDLE_LINK_STATUS),j=(0,i.useRef)(null),{href:w,as:v,children:N,prefetch:S=null,passHref:C,replace:P,shallow:_,scroll:k,onClick:E,onMouseEnter:T,onTouchStart:O,legacyBehavior:L=!1,onNavigate:U,transitionTypes:R,ref:A,unstable_dynamicOnHover:M,...$}=t;n=N,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let I=i.default.useContext(u.AppRouterContext),B=!1!==S,F=!1===S?"none":!0===S?"full":"auto",D="none"!==F?"auto"===F?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,q="string"==typeof(r=v||w)?r:(0,l.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");a=i.default.Children.only(n)}let K=L?a&&"object"==typeof a&&a.ref:A,z,W=i.default.useCallback(e=>(null!==I&&(j.current=(0,m.mountLinkInstance)(e,q,I,D,B,b,z)),()=>{j.current&&((0,m.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,m.unmountPrefetchableInstance)(e)}),[B,q,I,D,b,z]),V={ref:(0,c.useMergedRef)(W,K),onClick(t){L||"function"!=typeof E||E(t),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,a,s,o,i,l="none"){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{navigate:f}=e.r(32916);f(r,a?"replace":"push",!1===s?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,i,l)}}(t,q,j,P,k,U,R,F)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),I&&B&&(0,m.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){L||"function"!=typeof O||O(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),I&&B&&(0,m.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,f.isAbsoluteUrl)(q)?V.href=q:L&&!C&&("a"!==a.type||"href"in a.props)||(V.href=(0,d.addBasePath)(q)),s=L?i.default.cloneElement(a,V):(0,o.jsx)("a",{...$,...V,children:n}),(0,o.jsx)(y.Provider,{value:x,children:s})}let y=(0,i.createContext)(m.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=s(e,n)),t&&(a.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(18967),a=e.r(52817);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return j},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return h},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return o},getDisplayName:function(){return f},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return d},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return v}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=["CLS","FCP","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let h="u">typeof performance,g=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},70307,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(71645),a=e.i(73656),s=e.i(95813),o=e.i(15448),i=e.i(19455),l=e.i(93479),u=e.i(18879);e.s(["default",0,function(){let[e,c]=(0,n.useState)(),[f,d]=(0,n.useState)(""),[p,m]=(0,n.useState)(!1),[h,g]=(0,n.useState)(!1),[x,y]=(0,n.useState)(0);return(0,n.useEffect)(()=>{let e=new AbortController;return a.U.auth.setupStatus.query(void 0,{signal:e.signal}).then(t=>{e.signal.aborted||c(t)}).catch(t=>{e.signal.aborted||d((0,s.f)(t))}),()=>{e.abort()}},[x]),(0,t.jsxs)(o.f,{title:"Set up your workspace",description:"Create your local administrator and first project. Configure a runner and connect your external client after signing in.",children:[h&&(0,t.jsxs)("div",{role:"status",children:[(0,t.jsx)("p",{children:"Your workspace is ready. Sign in to get started."}),(0,t.jsx)(i.f,{asChild:!0,children:(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in"})})]}),!h&&e?.setup_required===!1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{children:"This server is already set up."}),(0,t.jsx)(i.f,{asChild:!0,children:(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in"})})]}),!h&&e?.setup_required&&(0,t.jsx)("form",{className:"space-y-4",onSubmit:t=>{t.preventDefault();let r=new FormData(t.currentTarget);m(!0),d(""),(async()=>{try{let t=(0,u.f)(r,"password1");if(t!==(0,u.f)(r,"password2"))throw Error("The passwords do not match.");await a.U.auth.setup.mutate({domain:e.hostname,workspace_name:(0,u.f)(r,"workspace_name"),username:(0,u.f)(r,"username"),email:(0,u.f)(r,"email"),password1:t,password2:(0,u.f)(r,"password2"),project_name:(0,u.f)(r,"project_name")}),g(!0)}catch(e){d((0,s.f)(e))}finally{m(!1)}})()},children:(0,t.jsxs)("fieldset",{disabled:p,className:"space-y-4 border-0 p-0",children:[(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Workspace name",(0,t.jsx)(l.f,{name:"workspace_name",autoComplete:"organization",required:!0,maxLength:100})]}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Username",(0,t.jsx)(l.f,{name:"username",autoComplete:"username",required:!0,maxLength:150})]}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Email",(0,t.jsx)(l.f,{name:"email",type:"email",autoComplete:"email",required:!0})]}),(0,t.jsx)("p",{className:"small",children:"Use this email to sign in. No email verification is needed."}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Password",(0,t.jsx)(l.f,{name:"password1",type:"password",autoComplete:"new-password",required:!0})]}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Confirm password",(0,t.jsx)(l.f,{name:"password2",type:"password",autoComplete:"new-password",required:!0})]}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["First project name",(0,t.jsx)(l.f,{name:"project_name",defaultValue:"My project",maxLength:100})]}),(0,t.jsx)(i.f,{type:"submit",children:p?"Creating workspace…":"Create workspace"})]})}),!h&&!e&&!f&&(0,t.jsx)("p",{role:"status",children:"Checking this installation…"}),f&&(0,t.jsxs)("div",{role:"alert",children:[(0,t.jsx)("p",{className:"error",children:f}),!e&&(0,t.jsx)(i.f,{variant:"outline",onClick:()=>{d(""),y(e=>e+1)},children:"Try again"})]})]})}])},15448,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(2716);e.s(["f",0,function({title:e,description:a,children:s,showAccountNavigation:o=!1}){return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between border-b border-slate-200 bg-white px-6 py-4 sm:px-10",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,t.jsx)(n.f,{className:"h-9 w-9"}),"OrgSDK"]}),(0,t.jsx)(r.default,{href:"/",className:"text-sm",children:"Back to app"})]}),(0,t.jsxs)("main",{className:"mx-auto w-full max-w-xl px-4 py-10 sm:py-16",children:[o&&(0,t.jsxs)("nav",{"aria-label":"Account",className:"mb-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:"/accounts/email/",children:"Account"}),(0,t.jsx)(r.default,{href:"/accounts/password/change/",children:"Password"}),(0,t.jsx)(r.default,{href:"/accounts/2fa/",children:"Two-factor authentication"}),(0,t.jsx)(r.default,{href:"/accounts/logout/",children:"Sign out"})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h1",{className:"!text-2xl",children:e}),a&&(0,t.jsx)("p",{className:"mb-6 text-sm",children:a}),s]})]})]})}])},93479,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(39689);let a=r.forwardRef(({className:e,type:r,...a},s)=>(0,t.jsx)("input",{type:r,className:(0,n.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:s,...a}));a.displayName="Input",e.s(["f",0,a])},2716,e=>{"use strict";var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])},18879,e=>{"use strict";e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51757,e=>{"use strict";var t=e.i(56420);let a={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};a.node;let i=(0,t.f)(a);e.s(["f",0,i],51757)},13581,29487,e=>{"use strict";var t=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,i=0){let[s,l]=(0,t.useState)(),[n,r]=(0,t.useState)(""),[o,d]=(0,t.useState)(!0),c=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),h=(0,t.useCallback)(async()=>{c.current?.abort();let t=new AbortController;c.current=t;try{let a=await e(t.signal);if(t.signal.aborted||!u.current)return;l(a),r("")}catch(e){!t.signal.aborted&&u.current&&r((0,a.f)(e))}finally{!t.signal.aborted&&u.current&&d(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=i>0?setInterval(()=>{h()},i):void 0;return()=>{u.current=!1,c.current?.abort(),clearInterval(e)}},[h,i]),{data:s,error:n,isLoading:o,refresh:h}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:a}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:t}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],29487)},93479,e=>{"use strict";var t=e.i(18050),a=e.i(71645),i=e.i(39689);let s=a.forwardRef(({className:e,type:a,...s},l)=>(0,t.jsx)("input",{type:a,className:(0,i.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,...s}));s.displayName="Input",e.s(["f",0,s])},10505,79432,e=>{"use strict";var t=e.i(18050),a=e.i(56420);let i={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};i.node;let s=(0,a.f)(i);e.s(["f",0,s],79432);var l=e.i(51757);let n={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};n.node;let r=(0,a.f)(n),o={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};o.node;let d=(0,a.f)(o),c={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};c.node;let u=(0,a.f)(c);function h(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let a={succeeded:l.f,waiting_approval:d,running:s,queued:r,failed:u,cancelled:u,interrupted:u}[e]??r;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(a,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let a=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${a} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let a=Reflect.get(e,t);if("string"==typeof a)return a}return""})(e.inputs,"message").slice(0,70)}`:`${a} \xb7 ${h(e.operation)}`},"T",0,h],10505)},57743,e=>{"use strict";var t=e.i(18050),a=e.i(71645),i=e.i(73656),s=e.i(95813),l=e.i(13581),n=e.i(19455),r=e.i(93479),o=e.i(94757),d=e.i(87309),c=e.i(29487),u=e.i(10505);let h={key:"name",type:"text",required:!0};function v({table:e,onSaved:l}){let d=(0,a.useId)(),{setDirty:c}=(0,o.useWorkspace)(),[u,x]=(0,a.useState)(e?.name??""),[m,f]=(0,a.useState)(e?.columns??[h]),[p,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)(""),[w,k]=(0,a.useState)("");function g(e,t){f(a=>a.map((a,i)=>i===e?{...a,...t}:a))}return(0,t.jsxs)("form",{onChange:()=>{c(!0)},onSubmit:t=>{t.preventDefault(),b(!0),j(""),k(""),(async()=>{try{let t={name:u,columns:m};e?await i.U.tables.update.mutate({id:e.id,...t,revision:e.revision}):(await i.U.tables.create.mutate(t),x(""),f([h])),c(!1),await l(),k("Table saved.")}catch(e){j((0,s.f)(e))}finally{b(!1)}})()},children:[(0,t.jsxs)("fieldset",{disabled:p,className:"space-y-3",children:[(0,t.jsx)("legend",{className:"mb-3 font-semibold",children:e?"Edit table definition":"Create a table"}),(0,t.jsxs)("label",{children:["Table name",(0,t.jsx)(r.f,{required:!0,maxLength:120,value:u,onChange:e=>{x(e.target.value)}})]}),(0,t.jsx)("p",{className:"small",children:"Column keys use lowercase letters, digits and underscores, starting with a letter. Existing rows must remain valid when a definition changes."}),m.map((e,a)=>(0,t.jsxs)("div",{className:"table-column-fields",children:[(0,t.jsxs)("label",{className:"table-column-key",children:["Column ",a+1," key",(0,t.jsx)(r.f,{required:!0,pattern:"[a-z][a-z0-9_]{0,47}",maxLength:48,value:e.key,onChange:e=>{g(a,{key:e.target.value})}})]}),(0,t.jsxs)("div",{className:"table-column-type",children:[(0,t.jsx)("label",{htmlFor:`${d}-type-${String(a)}`,children:"Type"}),(0,t.jsxs)("select",{id:`${d}-type-${String(a)}`,value:e.type,onChange:e=>{let t=e.target.value;["text","number","boolean","date"].includes(t)&&g(a,{type:t})},children:[(0,t.jsx)("option",{value:"text",children:"Text"}),(0,t.jsx)("option",{value:"number",children:"Number"}),(0,t.jsx)("option",{value:"boolean",children:"Boolean"}),(0,t.jsx)("option",{value:"date",children:"Date"})]})]}),(0,t.jsxs)("label",{className:"check",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.required,onChange:e=>{g(a,{required:e.target.checked})}}),"Required"]}),(0,t.jsxs)(n.f,{type:"button",variant:"outline",disabled:1===m.length,onClick:()=>{c(!0),f(e=>e.filter((e,t)=>t!==a))},children:["Remove column ",a+1]})]},a)),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{type:"button",variant:"outline",disabled:m.length>=50,onClick:()=>{c(!0),f(e=>[...e,{key:"",type:"text",required:!1}])},children:"Add column"}),(0,t.jsx)(n.f,{type:"submit",children:p?"Saving…":"Save table"})]})]}),y?(0,t.jsx)("p",{className:"error",role:"alert",children:y}):void 0,w?(0,t.jsx)("p",{className:"notice",role:"status",children:w}):void 0]})}function x({table:e,row:l,onSaved:d,onCancel:c}){let h=(0,a.useId)(),{setDirty:v}=(0,o.useWorkspace)(),[m,f]=(0,a.useState)(()=>Object.fromEntries(e.columns.map(e=>[e.key,l?.values[e.key]===void 0||null===l.values[e.key]?"":(0,u.A)(l.values[e.key])]))),[p,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)("");return(0,t.jsxs)("form",{className:"panel",onChange:()=>{v(!0)},onSubmit:t=>{t.preventDefault(),b(!0),j(""),(async()=>{try{let t=Object.fromEntries(e.columns.map(e=>{let t=m[e.key]??"";return""!==t||e.required?"boolean"===e.type?[e.key,"true"===t]:"number"===e.type?[e.key,Number(t)]:[e.key,t]:[e.key,null]})),a={table_revision:e.revision,values:t};l?await i.U.tables.updateRow.mutate({id:e.id,rowId:l.id,...a,revision:l.revision}):await i.U.tables.createRow.mutate({id:e.id,...a}),v(!1),await d()}catch(e){j((0,s.f)(e))}finally{b(!1)}})()},children:[(0,t.jsx)("h3",{children:l?"Edit row":"Add row"}),(0,t.jsxs)("fieldset",{disabled:p,className:"space-y-3",children:[e.columns.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:`${h}-${e.key}`,children:[e.key,e.required?" (required)":" (optional)"]}),"boolean"===e.type?(0,t.jsxs)("select",{id:`${h}-${e.key}`,required:e.required,value:m[e.key]??"",onChange:t=>{f(a=>({...a,[e.key]:t.target.value}))},children:[(0,t.jsx)("option",{value:"",children:"No value"}),(0,t.jsx)("option",{value:"true",children:"True"}),(0,t.jsx)("option",{value:"false",children:"False"})]}):(0,t.jsx)(r.f,{id:`${h}-${e.key}`,type:"text"===e.type?"text":e.type,required:e.required,step:"number"===e.type?"any":void 0,maxLength:"text"===e.type?1e4:void 0,value:m[e.key]??"",onChange:t=>{f(a=>({...a,[e.key]:t.target.value}))}})]},e.key)),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{type:"submit",children:p?"Saving…":"Save row"}),(0,t.jsx)(n.f,{type:"button",variant:"outline",onClick:c,children:"Cancel"})]})]}),y?(0,t.jsxs)("p",{className:"error",role:"alert",children:[y," After a conflict, cancel this edit, reload rows and definition, then reopen the row to reconcile your changes."]}):void 0]})}function m({table:e,refreshTables:r}){let{canManage:h,isDirty:f,setDirty:p}=(0,o.useWorkspace)(),b=(0,d.h)(),[y,j]=(0,a.useState)(1),[w,k]=(0,a.useState)(),[g,N]=(0,a.useState)(!1),[C,S]=(0,a.useState)(""),[q,A]=(0,a.useState)(!1),$=(0,a.useCallback)(async t=>{let a=await i.U.tables.listRows.query({id:e.id},{signal:t});return{...a,results:a.results.slice((y-1)*50,50*y),next:a.count>50*y}},[e.id,y]),T=(0,l.f)($);async function R(t){if(await b({title:"Delete this row?",description:"The saved values in this row will be permanently deleted.",actionLabel:"Delete row"})){A(!0),S("");try{await i.U.tables.deleteRow.mutate({id:e.id,rowId:t.id,revision:t.revision}),T.data?.results.length===1&&y>1?j(y-1):await T.refresh()}catch(e){S((0,s.f)(e))}finally{A(!1)}}}return(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsx)("h2",{children:e.name}),(0,t.jsx)(n.f,{disabled:q||void 0!==w||g,onClick:()=>{k("new")},children:"Add row"})]}),(0,t.jsx)(c.f,{...T}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:q,onClick:()=>{(async()=>{(!f||await b())&&(p(!1),k(void 0),N(!1),await T.refresh(),await r())})()},children:"Reload rows and definition"}),(0,t.jsxs)("span",{children:[T.data?.count??0," rows · Page ",y]})]}),T.data?.results.length===0?(0,t.jsx)("p",{children:"No rows on this page. Add a row to start collecting data."}):void 0,(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-left",children:[(0,t.jsxs)("caption",{className:"sr-only",children:["Rows in ",e.name]}),(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[e.columns.map(e=>(0,t.jsxs)("th",{className:"p-2",scope:"col",children:[e.key," ",(0,t.jsxs)("small",{children:["(",e.type,")"]})]},e.key)),(0,t.jsx)("th",{scope:"col",children:"Actions"})]})}),(0,t.jsx)("tbody",{children:T.data?.results.map(a=>(0,t.jsxs)("tr",{className:"border-t",children:[e.columns.map(e=>(0,t.jsx)("td",{className:"max-w-72 break-words p-2",children:void 0===a.values[e.key]||null===a.values[e.key]?"—":(0,u.A)(a.values[e.key])},e.key)),(0,t.jsx)("td",{children:(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:q||void 0!==w||g,onClick:()=>{k(a)},children:"Edit row"}),(0,t.jsx)(n.f,{variant:"destructive",disabled:q,onClick:()=>{R(a)},children:"Delete row"})]})})]},a.id))})]})}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:1===y||void 0!==w,onClick:()=>{j(y-1)},children:"Previous rows"}),(0,t.jsx)(n.f,{variant:"outline",disabled:!T.data?.next||void 0!==w,onClick:()=>{j(y+1)},children:"Next rows"})]}),void 0===w?void 0:(0,t.jsx)(x,{table:e,..."new"===w?{}:{row:w},onCancel:()=>{(async()=>{(!f||await b())&&(p(!1),k(void 0))})()},onSaved:async()=>{k(void 0),await T.refresh()}},"new"===w?"new":w.id),C?(0,t.jsx)("p",{className:"error",role:"alert",children:C}):void 0,h?(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:void 0!==w,onClick:()=>{(async()=>{(!g||!f||await b())&&(p(!1),N(!g))})()},children:g?"Close definition editor":"Edit table definition"}),g?(0,t.jsx)(v,{table:e,onSaved:r}):void 0]}):(0,t.jsx)("p",{className:"small",children:"Owners and admins manage table definitions. Members can edit rows."})]})}e.s(["Tables",0,function(){let{canManage:e,isDirty:r,setDirty:u}=(0,o.useWorkspace)();(0,a.useEffect)(()=>()=>{u(!1)},[u]);let h=(0,d.h)(),[x,f]=(0,a.useState)(1),[p,b]=(0,a.useState)(""),[y,j]=(0,a.useState)(""),[w,k]=(0,a.useState)(!1),g=(0,a.useCallback)(async e=>{let t=await i.U.tables.list.query(void 0,{signal:e});return{...t,results:t.results.slice((x-1)*50,50*x),next:t.count>50*x}},[x]),N=(0,l.f)(g),C=N.data?.results.find(e=>e.id===p);async function S(){if(C&&await h({title:`Delete ${C.name}?`,description:"This permanently deletes the table definition and every row in this table.",actionLabel:"Delete table"})){k(!0),j("");try{await i.U.tables.delete.mutate({id:C.id,revision:C.revision}),u(!1),b(""),N.data?.results.length===1&&x>1?f(x-1):await N.refresh()}catch(e){j((0,s.f)(e))}finally{k(!1)}}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Workspace tables"}),(0,t.jsx)("p",{children:"Store shared records in tables with text, number, boolean and date columns."}),(0,t.jsx)(c.f,{...N}),N.isLoading||N.data?.count!==0?void 0:(0,t.jsx)("p",{children:"No tables yet. A workspace owner or admin can create your first table below."}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"workspace-table",children:"Table"}),(0,t.jsxs)("select",{id:"workspace-table",value:C?.id??"",disabled:w,onChange:e=>{let t=e.target.value;(async()=>{(!r||await h())&&(u(!1),b(t))})()},children:[(0,t.jsx)("option",{value:"",children:"Choose a table"}),N.data?.results.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(n.f,{variant:"outline",disabled:1===x||w||r,onClick:()=>{b(""),f(x-1)},children:"Previous tables"}),(0,t.jsxs)("span",{children:["Page ",x]}),(0,t.jsx)(n.f,{variant:"outline",disabled:!N.data?.next||w||r,onClick:()=>{b(""),f(x+1)},children:"Next tables"}),e&&C?(0,t.jsx)(n.f,{variant:"destructive",disabled:w,onClick:()=>{S()},children:"Delete table"}):void 0]}),y?(0,t.jsx)("p",{className:"error",role:"alert",children:y}):void 0]}),C?(0,t.jsx)(m,{table:C,refreshTables:N.refresh},`${C.id}:${String(C.revision)}`):void 0,e&&!C?(0,t.jsx)("section",{className:"panel",children:(0,t.jsx)(v,{onSaved:N.refresh})}):void 0]})}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809),s=e.r(18050),i=o._(e.r(71645)),u=e.r(95057),l=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),p=e.r(88540),h=e.r(91949),m=e.r(73668),g=e.r(9396);function y(t){var r;let n,a,o,[y,b]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),w=(0,i.useRef)(null),{href:j,as:v,children:S,prefetch:C=null,passHref:N,replace:P,shallow:_,scroll:E,onClick:T,onMouseEnter:U,onTouchStart:R,legacyBehavior:L=!1,onNavigate:O,transitionTypes:$,ref:A,unstable_dynamicOnHover:I,...k}=t;n=S,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,s.jsx)("a",{children:n}));let M=i.default.useContext(l.AppRouterContext),F=!1!==C,B=!1===C?"none":!0===C?"full":"auto",D="none"!==B?"auto"===B?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,K="string"==typeof(r=v||j)?r:(0,u.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");a=i.default.Children.only(n)}let q=L?a&&"object"==typeof a&&a.ref:A,z,W=i.default.useCallback(e=>(null!==M&&(w.current=(0,h.mountLinkInstance)(e,K,M,D,F,b,z)),()=>{w.current&&((0,h.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,h.unmountPrefetchableInstance)(e)}),[F,K,M,D,b,z]),V={ref:(0,c.useMergedRef)(W,q),onClick(t){L||"function"!=typeof T||T(t),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!M||t.defaultPrevented||function(t,r,n,a,o,s,i,u="none"){if("u">typeof window){let l,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((l=t.currentTarget.getAttribute("target"))&&"_self"!==l||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{navigate:d}=e.r(32916);d(r,a?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,i,u)}}(t,K,w,P,E,O,$,B)},onMouseEnter(e){L||"function"!=typeof U||U(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),M&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),M&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?V.href=K:L&&!N&&("a"!==a.type||"href"in a.props)||(V.href=(0,f.addBasePath)(K)),o=L?i.default.cloneElement(a,V):(0,s.jsx)("a",{...k,...V,children:n}),(0,s.jsx)(x.Provider,{value:y,children:o})}let x=(0,i.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(o.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==l?(l="//"+(l||""),a&&"/"!==a[0]&&(a="/"+a)):l||(l=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${l}${a}${c}${i}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return i(e)}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),a=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return w},NormalizeError:function(){return x},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return o},execOnce:function(){return s},getDisplayName:function(){return d},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return v}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","INP","LCP","TTFB"];function s(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class x extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class w extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},76046,e=>{"use strict";e.i(44362);var t=e.i(14778);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let r=new URL(t,location.origin);return r.origin===location.origin?`${r.pathname}${r.search}${r.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},86441,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(73656),a=e.i(71645),o=e.i(92229),s=e.i(18879),i=e.i(11105);function u(){return(0,t.jsxs)("details",{open:!0,className:"mt-6 border-t border-slate-200 pt-4",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Confirm your identity"}),(0,t.jsxs)("p",{className:"text-sm",children:["Session expired? ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in again"}),"."]}),(0,t.jsx)("p",{className:"text-sm",children:"If a security change asks you to confirm your identity, enter your password or an authenticator code, then retry the change."}),(0,t.jsx)(i.F,{submitLabel:"Confirm password",onSubmit:async e=>(await n.U.auth.reauthenticate.mutate({password:(0,s.f)(e,"password")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(i.j,{label:"Password",type:"password",name:"password",autoComplete:"current-password",required:!0})}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(i.F,{submitLabel:"Confirm code",onSubmit:async e=>(await n.U.auth.mfaReauthenticate.mutate({code:(0,s.f)(e,"code")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(i.j,{label:"Authenticator or recovery code",name:"code",autoComplete:"one-time-code",required:!0})})})]})}e.s(["f",0,function({children:e}){let[s,i]=(0,a.useState)(),[l,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=new AbortController;return(0,n.m)(e.signal).then(t=>{e.signal.aborted||i(t)}).catch(()=>{e.signal.aborted||c(!0)}),()=>{e.abort()}},[]);let[d,f]=(0,a.useState)(!1);return l?(0,t.jsx)("p",{role:"alert",children:"Unable to load your account. Reload to try again."}):s?s.is_authenticated?(0,t.jsxs)(o.T,{value:()=>{f(!0)},children:[e,d&&(0,t.jsx)(u,{})]}):(0,t.jsxs)("p",{children:["Please ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"sign in"})," to manage your account."]}):(0,t.jsx)("p",{role:"status",children:"Loading your account…"})}],86441)},11105,92229,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(76046),a=e.i(95813);let o=(0,r.createContext)(void 0);function s(){let e=(0,r.useContext)(o);return(t,r)=>e&&(0,n.$)(t)?(e(),n.z):(0,a.f)(t,r)}e.s(["T",0,o,"G",0,s],92229);var i=e.i(19455),u=e.i(93479);e.s(["j",0,function({label:e,...r}){return(0,t.jsxs)("label",{children:[e,(0,t.jsx)(u.f,{...r})]})},"F",0,function({children:e,submitLabel:n,onSubmit:a}){let o=s(),[u,l]=(0,r.useState)(!1),[c,d]=(0,r.useState)(""),[f,p]=(0,r.useState)("");async function h(e){e.preventDefault();let t=new FormData(e.currentTarget);l(!0),d(""),p("");try{p(await a(t)??"")}catch(e){d(o(e,"Unable to save. Please try again."))}finally{l(!1)}}return(0,t.jsxs)("form",{onSubmit:e=>{h(e)},children:[(0,t.jsxs)("fieldset",{disabled:u,className:"min-w-0 border-0 p-0",children:[e,(0,t.jsx)(i.f,{type:"submit",disabled:u,children:u?"Please wait…":n})]}),c&&(0,t.jsx)("p",{role:"alert",className:"error mt-4",children:c}),f&&(0,t.jsx)("p",{role:"status",className:"notice mt-4",children:f})]})}],11105)},15448,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(2716);e.s(["f",0,function({title:e,description:a,children:o,showAccountNavigation:s=!1}){return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between border-b border-slate-200 bg-white px-6 py-4 sm:px-10",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,t.jsx)(n.f,{className:"h-9 w-9"}),"OrgSDK"]}),(0,t.jsx)(r.default,{href:"/",className:"text-sm",children:"Back to app"})]}),(0,t.jsxs)("main",{className:"mx-auto w-full max-w-xl px-4 py-10 sm:py-16",children:[s&&(0,t.jsxs)("nav",{"aria-label":"Account",className:"mb-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:"/accounts/email/",children:"Account"}),(0,t.jsx)(r.default,{href:"/accounts/password/change/",children:"Password"}),(0,t.jsx)(r.default,{href:"/accounts/2fa/",children:"Two-factor authentication"}),(0,t.jsx)(r.default,{href:"/accounts/logout/",children:"Sign out"})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h1",{className:"!text-2xl",children:e}),a&&(0,t.jsx)("p",{className:"mb-6 text-sm",children:a}),o]})]})]})}])},86108,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(73656),a=e.i(95813),o=e.i(18879),s=e.i(15448),i=e.i(86441),u=e.i(11105);function l(){let[e,s]=(0,r.useState)(""),[i,l]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=!0;return n.U.auth.emails.query().then(t=>{e&&s(t.find(e=>e.primary)?.email??"")}).catch(t=>{e&&l((0,a.f)(t,"Unable to load email address."))}),()=>{e=!1}},[]),(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)("p",{role:"alert",className:"error",children:i}),(0,t.jsx)(u.F,{submitLabel:"Save email address",onSubmit:async e=>(await n.U.auth.changeEmail.mutate({email:(0,o.f)(e,"email")}),s((0,o.f)(e,"email")),"Email address saved."),children:(0,t.jsx)(u.j,{label:"Email address",name:"email",type:"email",defaultValue:e,autoComplete:"email",required:!0},e)})]})}e.s(["ChangePassword",0,function(){return(0,t.jsx)(s.f,{title:"Change password",description:"Choose a strong password you do not use elsewhere.",showAccountNavigation:!0,children:(0,t.jsx)(i.f,{children:(0,t.jsxs)(u.F,{submitLabel:"Change password",onSubmit:async e=>{let t=(0,o.f)(e,"new_password");if(t!==(0,o.f)(e,"confirm_password"))throw Error("The new passwords do not match.");return await n.U.auth.changePassword.mutate({current_password:(0,o.f)(e,"current_password"),new_password:t}),"Your password has been changed."},children:[(0,t.jsx)(u.j,{label:"Current password",name:"current_password",type:"password",autoComplete:"current-password",required:!0}),(0,t.jsx)(u.j,{label:"New password",name:"new_password",type:"password",autoComplete:"new-password",required:!0}),(0,t.jsx)(u.j,{label:"Confirm new password",name:"confirm_password",type:"password",autoComplete:"new-password",required:!0})]})})})},"ManageAccount",0,function(){return(0,t.jsx)(s.f,{title:"Account settings",description:"Manage the email address you use to sign in.",showAccountNavigation:!0,children:(0,t.jsx)(i.f,{children:(0,t.jsx)(l,{})})})}])},93479,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(39689);let a=r.forwardRef(({className:e,type:r,...a},o)=>(0,t.jsx)("input",{type:r,className:(0,n.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:o,...a}));a.displayName="Input",e.s(["f",0,a])},2716,e=>{"use strict";var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])},18879,e=>{"use strict";e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96001,l=>{l.v(t=>Promise.all(["static/chunks/0y5lgqdwpeabb.js"].map(t=>l.l(t))).then(()=>t(160)))},67426,l=>{l.v(t=>Promise.all(["static/chunks/2lxgam-nk-e9a.js"].map(t=>l.l(t))).then(()=>t(99279)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var s=e.i(56420);let t={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};t.node;let i=(0,s.f)(t);e.s(["f",0,i],11241)},51757,e=>{"use strict";var s=e.i(56420);let t={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};t.node;let i=(0,s.f)(t);e.s(["f",0,i],51757)},62368,e=>{"use strict";var s=e.i(56420);let t={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};t.node;let i=(0,s.f)(t);e.s(["f",0,i],62368)},95925,29272,e=>{"use strict";var s=e.i(56420);let t={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};t.node;let i=(0,s.f)(t);e.s(["f",0,i],95925);let r={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};r.node;let a=(0,s.f)(r);e.s(["f",0,a],29272)},66595,e=>{"use strict";var s=e.i(56420);let t={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};t.node;let i=(0,s.f)(t);e.s(["f",0,i],66595)},13581,29487,e=>{"use strict";var s=e.i(71645),t=e.i(95813);e.s(["f",0,function(e,i=0){let[r,a]=(0,s.useState)(),[n,l]=(0,s.useState)(""),[c,o]=(0,s.useState)(!0),d=(0,s.useRef)(void 0),u=(0,s.useRef)(!1),h=(0,s.useCallback)(async()=>{d.current?.abort();let s=new AbortController;d.current=s;try{let t=await e(s.signal);if(s.signal.aborted||!u.current)return;a(t),l("")}catch(e){!s.signal.aborted&&u.current&&l((0,t.f)(e))}finally{!s.signal.aborted&&u.current&&o(!1)}},[e]);return(0,s.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=i>0?setInterval(()=>{h()},i):void 0;return()=>{u.current=!1,d.current?.abort(),clearInterval(e)}},[h,i]),{data:r,error:n,isLoading:c,refresh:h}}],13581);var i=e.i(18050),r=e.i(19455);e.s(["f",0,function({isLoading:e,error:s,refresh:t}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,s?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:s}),(0,i.jsx)(r.f,{variant:"outline",onClick:()=>{t()},children:"Try again"})]}):void 0]})}],29487)},3340,e=>{"use strict";var s=e.i(18050),t=e.i(18566),i=e.i(59140),r=e.i(66595),a=e.i(71645),n=e.i(73656),l=e.i(13581),c=e.i(15080),o=e.i(19455),d=e.i(93479),u=e.i(29487),h=e.i(10505),x=e.i(94757),p=e.i(36174);function j({projects:e,selected:t,onSelect:i,actionId:m=""}){let{selected:f}=(0,x.useWorkspace)(),v=(0,a.useCallback)(async e=>{let[s,t]=await Promise.all([(0,c.f)(e),m?n.U.actions.versions.query({id:m},{signal:e}):void 0]),i=new Set(t?.map(e=>e.id));return s.filter(e=>e.project===f&&(!m||null!==e.action_version&&i.has(e.action_version)))},[m,f]),g=(0,l.f)(v,5e3),[y,b]=(0,a.useState)(""),[k,w]=(0,a.useState)(""),[N,S]=(0,a.useState)(""),C=g.data?.filter(s=>s.project===f&&(!k||s.status===k)&&(!N||s.operation===N)&&`${(0,h.N)(s,e)} ${s.id}`.toLowerCase().includes(y.toLowerCase()))??[];return t&&!g.data?.some(e=>e.id===t)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.f,{...g}),g.isLoading||g.error?null:(0,s.jsx)("p",{role:"alert",children:"This run is not available in this action or project."})]}):t?(0,s.jsx)(p.T,{id:t,projects:e,back:()=>{i("")},openRun:i},t):(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsx)("h2",{children:"Run history"}),(0,s.jsxs)("span",{className:"badge",children:[C.length," runs"]})]}),(0,s.jsxs)("p",{className:"small",children:["Project:"," ",e.find(e=>e.id===f)?.name??"Choose a project"]}),(0,s.jsxs)("div",{className:"resource-toolbar",children:[(0,s.jsxs)("label",{className:"search-field",children:[(0,s.jsx)(r.f,{size:15}),(0,s.jsx)(d.f,{"aria-label":"Search runs",placeholder:"Search by project or run ID…",value:y,onChange:e=>{b(e.target.value)}})]}),(0,s.jsxs)("select",{"aria-label":"Run status",value:k,onChange:e=>{w(e.target.value)},children:[(0,s.jsx)("option",{value:"",children:"All statuses"}),["queued","running","waiting_approval","succeeded","failed","cancelled","interrupted"].map(e=>(0,s.jsx)("option",{value:e,children:e.replaceAll("_"," ")},e))]}),(0,s.jsxs)("select",{"aria-label":"Run type",value:N,onChange:e=>{S(e.target.value)},children:[(0,s.jsx)("option",{value:"",children:"All work"}),(0,s.jsx)("option",{value:"action",children:"Actions"}),(0,s.jsx)("option",{value:"code",children:"Code execution"}),(0,s.jsx)("option",{value:"validate",children:"Code validation"}),(0,s.jsx)("option",{value:"test",children:"Action tests"}),(0,s.jsx)("option",{value:"chat",children:"Chat tasks"})]})]}),(0,s.jsx)(u.f,{...g}),g.isLoading||0!==C.length?void 0:(0,s.jsxs)("div",{className:"resource-empty",children:[(0,s.jsx)("h3",{children:"No matching runs"}),(0,s.jsx)("p",{children:"Execute code from an external client or run a saved action, then follow its progress here."})]}),(0,s.jsx)("div",{className:"table-wrap",children:(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Work"}),(0,s.jsx)("th",{children:"Status"}),(0,s.jsx)("th",{children:"Created"}),(0,s.jsx)("th",{})]})}),(0,s.jsx)("tbody",{children:C.map(t=>(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{children:[(0,s.jsx)("strong",{children:(0,h.N)(t,e)}),(0,s.jsx)("small",{className:"block muted",children:t.id.slice(0,8)})]}),(0,s.jsx)("td",{children:(0,s.jsx)(h.k,{status:t.status})}),(0,s.jsx)("td",{children:new Date(t.created_at).toLocaleString()}),(0,s.jsx)("td",{children:(0,s.jsx)(o.f,{variant:"outline",size:"sm",onClick:()=>{i(t.id)},children:"View run"})})]},t.id))})]})})]})}e.s(["default",0,function(){let{projects:e,selected:r,navigateTo:a}=(0,x.useWorkspace)(),n=(0,t.useSearchParams)();return(0,s.jsx)(i.c,{current:"runs",children:t=>(0,s.jsx)(j,{projects:e,actionId:t,selected:n.get("run")??"",onSelect:e=>{let s=new URLSearchParams({project:r});t&&s.set("action",t),e&&s.set("run",e),a(`/runs/?${s.toString()}`)}},`${r}:${t}`)})}],3340)},93479,e=>{"use strict";var s=e.i(18050),t=e.i(71645),i=e.i(39689);let r=t.forwardRef(({className:e,type:t,...r},a)=>(0,s.jsx)("input",{type:t,className:(0,i.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:a,...r}));r.displayName="Input",e.s(["f",0,r])},24687,e=>{"use strict";var s=e.i(18050),t=e.i(71645),i=e.i(39689);let r=t.forwardRef(({className:e,...t},r)=>(0,s.jsx)("textarea",{className:(0,i.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));r.displayName="Textarea",e.s(["f",0,r])},12102,e=>{"use strict";var s=e.i(40192),t=e.i(54105),i=e.i(19877),r=e.i(22219),r=r;let a=s.z.record(t.z.string(),i.z.json());e.s(["z",0,function(e){let s=JSON.parse(e);return r.array(a).min(1).max(50).parse(s)},"J",0,function(e){let s=JSON.parse(e);return a.parse(s)}],12102)},59140,e=>{"use strict";var s=e.i(18050),t=e.i(71645),i=e.i(18566),r=e.i(11241),a=e.i(73656),n=e.i(13581),l=e.i(94757),c=e.i(75016),o=e.i(29487);let d=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function u({action:e,current:t}){let i=e.project,a=new URLSearchParams({project:i,action:e.id});return(0,s.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)(c.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:i}).toString()}`,children:[(0,s.jsx)(r.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,s.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,s.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,s.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:d.map(e=>(0,s.jsx)(c.f,{href:`${e.path}?${a.toString()}`,"aria-current":t===e.id?"page":void 0,className:t===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function h({project:e,actionId:i,current:r,children:l}){let d=(0,t.useCallback)(async s=>{if(!i)return;let t=await a.U.actions.get.query({id:i},{signal:s});if(t.project!==e)throw Error("This action is not available in the selected project.");return t},[i,e]),x=(0,n.f)(d);return i&&(x.isLoading||x.error||x.data?.id!==i)?(0,s.jsx)(o.f,{...x}):(0,s.jsxs)(s.Fragment,{children:[x.data?(0,s.jsx)(u,{action:x.data,current:r}):(0,s.jsx)("p",{className:"mb-5",children:(0,s.jsx)(c.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(i)]})}e.s(["F",0,u,"c",0,function({current:e,children:t}){let{selected:r}=(0,l.useWorkspace)(),a=(0,i.useSearchParams)().get("action")??"";return(0,s.jsx)(h,{project:r,actionId:a,current:e,children:t},`${r}:${a}`)}])},44555,e=>{"use strict";var s=e.i(18050),t=e.i(56420);let i={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};i.node;let r=(0,t.f)(i);var a=e.i(71645),n=e.i(73656),l=e.i(95813),c=e.i(13581),o=e.i(15080),d=e.i(19455),u=e.i(29487);e.s(["f",0,function({runId:e,openRun:t}){let i=(0,c.f)(o.i,5e3),[h,x]=(0,a.useState)(""),[p,j]=(0,a.useState)(""),m=i.data?.filter(s=>"pending"===s.status&&(!e||s.run===e))??[],f=async(e,s)=>{x(e),j("");try{await n.U.approvals.decide.mutate({id:e,decision:s}),await i.refresh()}catch(e){j((0,l.f)(e))}finally{x("")}};return(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsxs)("h2",{children:[(0,s.jsx)(r,{size:18})," ",e?"Run approvals":"Approval queue"]}),(0,s.jsxs)("span",{className:"badge",children:[m.length," pending"]})]}),(0,s.jsx)(u.f,{...i}),p?(0,s.jsx)("p",{className:"error",role:"alert",children:p}):void 0,i.isLoading||0!==m.length?void 0:(0,s.jsxs)("div",{className:"resource-empty",children:[(0,s.jsx)(r,{size:28}),(0,s.jsx)("h3",{children:"All caught up"}),(0,s.jsx)("p",{children:"No decisions are waiting for you."})]}),m.map(e=>(0,s.jsxs)("article",{className:"approval-card",children:[(0,s.jsx)("span",{className:"eyebrow",children:"Human approval required"}),(0,s.jsx)("p",{className:"approval-prompt",children:e.prompt}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(d.f,{disabled:!!h,onClick:()=>{f(e.id,"approved")},children:h===e.id?"Saving decision…":"Approve"}),(0,s.jsx)(d.f,{variant:"outline",disabled:!!h,onClick:()=>{f(e.id,"denied")},children:"Deny"}),t?(0,s.jsx)(d.f,{variant:"ghost",onClick:()=>{t(e.run)},children:"Inspect run"}):void 0]})]},e.id))]})}],44555)},36174,e=>{"use strict";var s=e.i(18050),t=e.i(11241),i=e.i(62368),r=e.i(95925),a=e.i(29272),n=e.i(71645),l=e.i(73656),c=e.i(95813),o=e.i(13581),d=e.i(15080),u=e.i(19455),h=e.i(85951),x=e.i(10505),p=e.i(29487),j=e.i(90409),m=e.i(59241),f=e.i(12102),v=e.i(75016),g=e.i(93479),y=e.i(24687);function b({id:e}){let[t,i]=(0,n.useState)(""),[r,a]=(0,n.useState)('{"type":"object"}'),[o,d]=(0,n.useState)("{}"),[h,x]=(0,n.useState)(!1),[p,j]=(0,n.useState)(""),[m,k]=(0,n.useState)(""),[w,N]=(0,n.useState)("");async function S(){x(!0),N(""),j("");try{let s=await l.U.runs.promote.mutate({id:e,name:t.trim(),input_schema:(0,f.J)(r),output_schema:(0,f.J)(o)});k(s.action),j(`Saved exact run source as version ${String(s.version.number)} of ${t.trim()} (action ${s.action}).`)}catch(e){N((0,c.f)(e))}finally{x(!1)}}return(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Promote accepted source to a saved action"}),(0,s.jsx)("p",{children:"The server copies this run’s exact source and SDK provenance. Run inputs remain examples and are not saved as defaults."}),(0,s.jsxs)("label",{children:["New action name",(0,s.jsx)(g.f,{value:t,disabled:h,onChange:e=>{i(e.target.value)}})]}),(0,s.jsxs)("label",{children:["Input schema (JSON)",(0,s.jsx)(y.f,{className:"code",value:r,disabled:h,onChange:e=>{a(e.target.value)}})]}),(0,s.jsxs)("label",{children:["Output schema (JSON)",(0,s.jsx)(y.f,{className:"code",value:o,disabled:h,onChange:e=>{d(e.target.value)}})]}),(0,s.jsx)(u.f,{disabled:h||!t.trim(),onClick:()=>{S()},children:"Promote exact source"}),w?(0,s.jsx)("p",{role:"alert",className:"error",children:w}):null,p?(0,s.jsx)("p",{role:"status",children:p}):null,m?(0,s.jsx)(v.f,{href:`/actions/?action=${encodeURIComponent(m)}`,children:"Open saved action"}):null]})}var k=e.i(44555);function w(e){let s=new Blob([e.content],{type:e.media_type}),t=URL.createObjectURL(s),i=document.createElement("a");i.href=t,i.download=e.name,i.click(),URL.revokeObjectURL(t)}function N({run:e,hasCheckReport:t}){return t?(0,s.jsx)(m.f,{output:e.output}):"succeeded"!==e.status?(0,s.jsx)("p",{children:x.B.includes(e.status)?"This run is still in progress. Its result will appear here.":`This run ${e.status}. Review the trace before retrying.`}):"chat"===e.operation?(0,s.jsx)(h.f,{content:(0,x.A)(e.output)}):(0,s.jsx)("pre",{children:(0,x.A)(e.output)||"Completed without output."})}let S={session:"Session result",test:"Mocked test results",validate:"Semantic validation diagnostics"};e.s(["T",0,function({id:e,projects:h,back:m,openRun:f}){let v=(0,j.f)(e),g=(0,o.f)(d.K),[y,C]=(0,n.useState)(!1),[A,z]=(0,n.useState)(""),_=v.data?.run,R=void 0!==_&&("test"===_.operation||"validate"===_.operation)&&null!==_.output&&"object"==typeof _.output&&Object.hasOwn(_.output,"result"),U=async s=>{C(!0),z("");try{if("cancel"===s)await l.U.runs.cancel.mutate({id:e});else{let s=await l.U.runs.retry.mutate({id:e,idempotency_key:crypto.randomUUID()});f(s.id)}await v.refresh()}catch(e){z((0,c.f)(e))}finally{C(!1)}};return(0,s.jsxs)("div",{className:"run-detail",children:[(0,s.jsxs)(u.f,{variant:"ghost",onClick:m,children:[(0,s.jsx)(t.f,{size:14})," All runs"]}),(0,s.jsx)(p.f,{...v}),A?(0,s.jsx)("p",{className:"error",role:"alert",children:A}):void 0,_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"eyebrow",children:["RUN ",_.id.slice(0,8)]}),(0,s.jsxs)("h2",{children:[h.find(e=>e.id===_.project)?.name??"Project"," ","· ",(0,x.T)(_.operation)]})]}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(x.k,{status:_.status}),x.B.includes(_.status)?(0,s.jsxs)(u.f,{variant:"outline",disabled:y||_.cancel_requested,onClick:()=>{U("cancel")},children:[(0,s.jsx)(a.f,{size:13}),_.cancel_requested?"Cancellation requested":"Cancel run"]}):void 0,["action","code","validate","test"].includes(_.operation)&&["failed","interrupted","cancelled"].includes(_.status)?(0,s.jsxs)(u.f,{variant:"outline",disabled:y,onClick:()=>{U("retry")},children:[(0,s.jsx)(r.f,{size:13})," Retry run"]}):void 0]})]}),(0,s.jsxs)("p",{className:"small",children:["Created ",new Date(_.created_at).toLocaleString()," · Updated"," ",new Date(_.updated_at).toLocaleString()]}),_.retry_of?(0,s.jsx)(u.f,{variant:"link",onClick:()=>{f(_.retry_of??"")},children:"View original run"}):void 0,_.error?(0,s.jsx)("div",{className:"error",role:"alert",children:_.error}):void 0,(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{children:"Origin"}),(0,s.jsxs)("dd",{children:[_.origin," ",_.origin_reference]}),(0,s.jsx)("dt",{children:"Originating client"}),(0,s.jsx)("dd",{children:_.client_token??"No client token (historical attribution may be unknown)"}),(0,s.jsx)("dt",{children:"SDK revision"}),(0,s.jsx)("dd",{children:(0,x.A)(_.sdk_revision)||"Unknown"}),(0,s.jsx)("dt",{children:"Configuration revision"}),(0,s.jsx)("dd",{children:(0,x.A)(_.configuration_revision)||"Unknown"}),(0,s.jsx)("dt",{children:"Immutable action version"}),(0,s.jsx)("dd",{children:_.action_version??"One-off source / none"}),(0,s.jsx)("dt",{children:"Source digest"}),(0,s.jsx)("dd",{children:(0,x.A)(_.source_digest)||"Unknown"})]}),null===_.source?null:(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Accepted source"}),(0,s.jsx)("pre",{children:(0,x.A)(_.source)})]}),"code"===_.operation&&null!==_.source?(0,s.jsx)(b,{id:_.id},_.id):null,(0,s.jsx)("h3",{children:S[_.operation]??"Outcome"}),(0,s.jsx)(N,{run:_,hasCheckReport:R}),(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Run inputs"}),(0,s.jsx)("pre",{children:(0,x.A)(_.inputs)})]})]}),"waiting_approval"===_.status?(0,s.jsx)(k.f,{runId:e}):void 0,(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Artifacts"}),(0,s.jsx)(p.f,{...g}),g.data?.filter(s=>s.run===e).length===0?(0,s.jsx)("p",{className:"small",children:"No artifacts were saved by this run."}):void 0,g.data?.filter(s=>s.run===e).map(e=>(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:e.name}),(0,s.jsxs)(u.f,{variant:"outline",size:"sm",onClick:()=>{w(e)},children:[(0,s.jsx)(i.f,{size:13}),"Download"]}),(0,s.jsx)("pre",{children:e.content})]},e.id))]}),"session"===_.operation?null:(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Execution trace"}),v.data?.events.length===0?(0,s.jsx)("p",{className:"small",children:"Waiting for the first execution event."}):void 0,(0,s.jsx)("ol",{className:"run-timeline",children:v.data?.events.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)("span",{className:"timeline-dot"}),(0,s.jsxs)("details",{children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)("strong",{children:e.kind.replaceAll("."," ")}),(0,s.jsx)("time",{children:new Date(e.created_at).toLocaleTimeString()})]}),(0,s.jsx)("pre",{children:(0,x.A)(e.data)})]})]},e.sequence))})]})]}):void 0]})},"t",0,w],36174)},10505,79432,e=>{"use strict";var s=e.i(18050),t=e.i(56420);let i={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};i.node;let r=(0,t.f)(i);e.s(["f",0,r],79432);var a=e.i(51757);let n={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};n.node;let l=(0,t.f)(n),c={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};c.node;let o=(0,t.f)(c),d={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};d.node;let u=(0,t.f)(d);function h(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let t={succeeded:a.f,waiting_approval:o,running:r,queued:l,failed:u,cancelled:u,interrupted:u}[e]??l;return(0,s.jsxs)("span",{className:`run-status status-${e}`,children:[(0,s.jsx)(t,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,s){let t=s.find(s=>s.id===e.project)?.name??"Project";return"chat"===e.operation?`${t} \xb7 ${(function(e,s){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,s)){let t=Reflect.get(e,s);if("string"==typeof t)return t}return""})(e.inputs,"message").slice(0,70)}`:`${t} \xb7 ${h(e.operation)}`},"T",0,h],10505)},90409,59241,e=>{"use strict";var s=e.i(71645),t=e.i(73656),i=e.i(13581);e.s(["f",0,function(e){let r=(0,s.useCallback)(async s=>{let[i,r]=await Promise.all([t.U.runs.get.query({id:e},{signal:s}),t.U.runs.events.query({id:e},{signal:s})]);return{run:i,events:r}},[e]),a=(0,i.f)(r,3e3),n=a.data?.run.id===e?a.data:void 0,l=void 0!==n,{refresh:c}=a;return(0,s.useEffect)(()=>{if(l)return function(e,s,i=t.U.runs.stream.subscribe){let r,a=!0,n=()=>{a&&!r&&(r=setTimeout(()=>{r=void 0,a&&s()},400))},l=i({id:e},{onData:n,onComplete(){a&&(clearTimeout(r),r=void 0,s())},onError:n});return()=>{a=!1,clearTimeout(r),l.unsubscribe()}}(e,c)},[e,l,c]),{...a,data:n}}],90409);var r=e.i(18050),a=e.i(10505);function n(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}e.s(["f",0,function({output:e}){let s=n(e),t=n(s?.result)??s;if(!t)return null;let i=n(t.validation)??t,l=Array.isArray(i.diagnostics)?i.diagnostics:[],c=Array.isArray(t.cases)?t.cases:[];return(0,r.jsxs)("div",{children:["boolean"==typeof i.valid?(0,r.jsx)("p",{children:i.valid?"Source passed semantic validation.":"Source failed semantic validation."}):null,l.length>0?(0,r.jsx)("ul",{children:l.map((e,s)=>{let t=n(e);return(0,r.jsxs)("li",{children:["Line ",(0,a.A)(t?.line),", column"," ",(0,a.A)(t?.column),":"," ",(0,a.A)(t?.message)]},s)})}):null,c.length>0?(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Case"}),(0,r.jsx)("th",{children:"Result"}),(0,r.jsx)("th",{children:"Details"})]})}),(0,r.jsx)("tbody",{children:c.map((e,s)=>{let t=n(e);return(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,a.A)(t?.name)}),(0,r.jsx)("td",{children:t?.passed===!0?"Passed":"Failed"}),(0,r.jsxs)("td",{children:["string"==typeof t?.error&&""!==t.error?(0,r.jsx)("p",{children:t.error}):null,Array.isArray(t?.violations)?(0,r.jsx)("pre",{children:(0,a.A)(t.violations)}):null,(0,r.jsxs)("details",{children:[(0,r.jsx)("summary",{children:"Actual output and logs"}),(0,r.jsx)("pre",{children:(0,a.A)(t?.actual)}),(0,r.jsx)("pre",{children:(0,a.A)(t?.logs)})]})]})]},s)})})]}):null]})}],59241)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var s=e.i(56420);let i={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],11241)},51757,e=>{"use strict";var s=e.i(56420);let i={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],51757)},62368,e=>{"use strict";var s=e.i(56420);let i={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],62368)},26091,e=>{"use strict";var s=e.i(56420);let i={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],26091)},95925,29272,e=>{"use strict";var s=e.i(56420);let i={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],95925);let r={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};r.node;let a=(0,s.f)(r);e.s(["f",0,a],29272)},66595,e=>{"use strict";var s=e.i(56420);let i={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};i.node;let t=(0,s.f)(i);e.s(["f",0,t],66595)},13581,29487,e=>{"use strict";var s=e.i(71645),i=e.i(95813);e.s(["f",0,function(e,t=0){let[r,a]=(0,s.useState)(),[n,l]=(0,s.useState)(""),[c,d]=(0,s.useState)(!0),o=(0,s.useRef)(void 0),u=(0,s.useRef)(!1),h=(0,s.useCallback)(async()=>{o.current?.abort();let s=new AbortController;o.current=s;try{let i=await e(s.signal);if(s.signal.aborted||!u.current)return;a(i),l("")}catch(e){!s.signal.aborted&&u.current&&l((0,i.f)(e))}finally{!s.signal.aborted&&u.current&&d(!1)}},[e]);return(0,s.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=t>0?setInterval(()=>{h()},t):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,t]),{data:r,error:n,isLoading:c,refresh:h}}],13581);var t=e.i(18050),r=e.i(19455);e.s(["f",0,function({isLoading:e,error:s,refresh:i}){return(0,t.jsxs)(t.Fragment,{children:[e?(0,t.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,s?(0,t.jsxs)("div",{className:"error",role:"alert",children:[(0,t.jsx)("p",{children:s}),(0,t.jsx)(r.f,{variant:"outline",onClick:()=>{i()},children:"Try again"})]}):void 0]})}],29487)},39372,e=>{"use strict";var s=e.i(18050),i=e.i(62368),t=e.i(26091),r=e.i(66595),a=e.i(71645),n=e.i(13581),l=e.i(15080),c=e.i(19455),d=e.i(93479),o=e.i(85951),u=e.i(29487),h=e.i(36174);function p({openRun:e}){let x=(0,n.f)(l.K),[f,j]=(0,a.useState)(""),[m,v]=(0,a.useState)(""),y=x.data?.filter(e=>e.name.toLowerCase().includes(f.toLowerCase()))??[],g=x.data?.find(e=>e.id===m);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsx)("h2",{children:"Saved artifacts"}),(0,s.jsxs)("span",{className:"badge",children:[x.data?.length??0," files"]})]}),(0,s.jsx)("p",{className:"small",children:"Markdown, JSON and text produced by your projects and actions."}),(0,s.jsxs)("label",{className:"search-field",children:[(0,s.jsx)(r.f,{size:15}),(0,s.jsx)(d.f,{"aria-label":"Search artifacts",value:f,placeholder:"Search files…",onChange:e=>{j(e.target.value)}})]}),(0,s.jsx)(u.f,{...x}),x.isLoading||0!==y.length?void 0:(0,s.jsxs)("div",{className:"resource-empty",children:[(0,s.jsx)(t.f,{size:30}),(0,s.jsx)("h3",{children:"No artifacts found"}),(0,s.jsx)("p",{children:"Files saved during runs appear here."})]}),y.map(e=>(0,s.jsxs)("div",{className:"resource-row",children:[(0,s.jsx)(t.f,{size:18}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:e.name}),(0,s.jsxs)("small",{children:[e.media_type," · ",new Blob([e.content]).size," bytes"]})]}),(0,s.jsx)(c.f,{variant:"outline",size:"sm",onClick:()=>{v(e.id)},children:"Open"})]},e.id))]}),g?(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsx)("h2",{children:g.name}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(c.f,{variant:"outline",onClick:()=>{e(g.run)},children:"View producing run"}),(0,s.jsxs)(c.f,{onClick:()=>{(0,h.t)(g)},children:[(0,s.jsx)(i.f,{size:14}),"Download"]})]})]}),g.media_type.includes("markdown")||g.name.endsWith(".md")?(0,s.jsx)(o.f,{content:g.content}):(0,s.jsx)("pre",{children:g.content})]}):void 0]})}var x=e.i(94757);e.s(["default",0,function(){let{openRun:e}=(0,x.useWorkspace)();return(0,s.jsx)(p,{openRun:e})}],39372)},93479,e=>{"use strict";var s=e.i(18050),i=e.i(71645),t=e.i(39689);let r=i.forwardRef(({className:e,type:i,...r},a)=>(0,s.jsx)("input",{type:i,className:(0,t.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:a,...r}));r.displayName="Input",e.s(["f",0,r])},24687,e=>{"use strict";var s=e.i(18050),i=e.i(71645),t=e.i(39689);let r=i.forwardRef(({className:e,...i},r)=>(0,s.jsx)("textarea",{className:(0,t.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...i}));r.displayName="Textarea",e.s(["f",0,r])},12102,e=>{"use strict";var s=e.i(40192),i=e.i(54105),t=e.i(19877),r=e.i(22219),r=r;let a=s.z.record(i.z.string(),t.z.json());e.s(["z",0,function(e){let s=JSON.parse(e);return r.array(a).min(1).max(50).parse(s)},"J",0,function(e){let s=JSON.parse(e);return a.parse(s)}],12102)},44555,e=>{"use strict";var s=e.i(18050),i=e.i(56420);let t={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};t.node;let r=(0,i.f)(t);var a=e.i(71645),n=e.i(73656),l=e.i(95813),c=e.i(13581),d=e.i(15080),o=e.i(19455),u=e.i(29487);e.s(["f",0,function({runId:e,openRun:i}){let t=(0,c.f)(d.i,5e3),[h,p]=(0,a.useState)(""),[x,f]=(0,a.useState)(""),j=t.data?.filter(s=>"pending"===s.status&&(!e||s.run===e))??[],m=async(e,s)=>{p(e),f("");try{await n.U.approvals.decide.mutate({id:e,decision:s}),await t.refresh()}catch(e){f((0,l.f)(e))}finally{p("")}};return(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsxs)("h2",{children:[(0,s.jsx)(r,{size:18})," ",e?"Run approvals":"Approval queue"]}),(0,s.jsxs)("span",{className:"badge",children:[j.length," pending"]})]}),(0,s.jsx)(u.f,{...t}),x?(0,s.jsx)("p",{className:"error",role:"alert",children:x}):void 0,t.isLoading||0!==j.length?void 0:(0,s.jsxs)("div",{className:"resource-empty",children:[(0,s.jsx)(r,{size:28}),(0,s.jsx)("h3",{children:"All caught up"}),(0,s.jsx)("p",{children:"No decisions are waiting for you."})]}),j.map(e=>(0,s.jsxs)("article",{className:"approval-card",children:[(0,s.jsx)("span",{className:"eyebrow",children:"Human approval required"}),(0,s.jsx)("p",{className:"approval-prompt",children:e.prompt}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(o.f,{disabled:!!h,onClick:()=>{m(e.id,"approved")},children:h===e.id?"Saving decision…":"Approve"}),(0,s.jsx)(o.f,{variant:"outline",disabled:!!h,onClick:()=>{m(e.id,"denied")},children:"Deny"}),i?(0,s.jsx)(o.f,{variant:"ghost",onClick:()=>{i(e.run)},children:"Inspect run"}):void 0]})]},e.id))]})}],44555)},36174,e=>{"use strict";var s=e.i(18050),i=e.i(11241),t=e.i(62368),r=e.i(95925),a=e.i(29272),n=e.i(71645),l=e.i(73656),c=e.i(95813),d=e.i(13581),o=e.i(15080),u=e.i(19455),h=e.i(85951),p=e.i(10505),x=e.i(29487),f=e.i(90409),j=e.i(59241),m=e.i(12102),v=e.i(75016),y=e.i(93479),g=e.i(24687);function b({id:e}){let[i,t]=(0,n.useState)(""),[r,a]=(0,n.useState)('{"type":"object"}'),[d,o]=(0,n.useState)("{}"),[h,p]=(0,n.useState)(!1),[x,f]=(0,n.useState)(""),[j,k]=(0,n.useState)(""),[w,N]=(0,n.useState)("");async function A(){p(!0),N(""),f("");try{let s=await l.U.runs.promote.mutate({id:e,name:i.trim(),input_schema:(0,m.J)(r),output_schema:(0,m.J)(d)});k(s.action),f(`Saved exact run source as version ${String(s.version.number)} of ${i.trim()} (action ${s.action}).`)}catch(e){N((0,c.f)(e))}finally{p(!1)}}return(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Promote accepted source to a saved action"}),(0,s.jsx)("p",{children:"The server copies this run’s exact source and SDK provenance. Run inputs remain examples and are not saved as defaults."}),(0,s.jsxs)("label",{children:["New action name",(0,s.jsx)(y.f,{value:i,disabled:h,onChange:e=>{t(e.target.value)}})]}),(0,s.jsxs)("label",{children:["Input schema (JSON)",(0,s.jsx)(g.f,{className:"code",value:r,disabled:h,onChange:e=>{a(e.target.value)}})]}),(0,s.jsxs)("label",{children:["Output schema (JSON)",(0,s.jsx)(g.f,{className:"code",value:d,disabled:h,onChange:e=>{o(e.target.value)}})]}),(0,s.jsx)(u.f,{disabled:h||!i.trim(),onClick:()=>{A()},children:"Promote exact source"}),w?(0,s.jsx)("p",{role:"alert",className:"error",children:w}):null,x?(0,s.jsx)("p",{role:"status",children:x}):null,j?(0,s.jsx)(v.f,{href:`/actions/?action=${encodeURIComponent(j)}`,children:"Open saved action"}):null]})}var k=e.i(44555);function w(e){let s=new Blob([e.content],{type:e.media_type}),i=URL.createObjectURL(s),t=document.createElement("a");t.href=i,t.download=e.name,t.click(),URL.revokeObjectURL(i)}function N({run:e,hasCheckReport:i}){return i?(0,s.jsx)(j.f,{output:e.output}):"succeeded"!==e.status?(0,s.jsx)("p",{children:p.B.includes(e.status)?"This run is still in progress. Its result will appear here.":`This run ${e.status}. Review the trace before retrying.`}):"chat"===e.operation?(0,s.jsx)(h.f,{content:(0,p.A)(e.output)}):(0,s.jsx)("pre",{children:(0,p.A)(e.output)||"Completed without output."})}let A={session:"Session result",test:"Mocked test results",validate:"Semantic validation diagnostics"};e.s(["T",0,function({id:e,projects:h,back:j,openRun:m}){let v=(0,f.f)(e),y=(0,d.f)(o.K),[g,z]=(0,n.useState)(!1),[C,S]=(0,n.useState)(""),_=v.data?.run,O=void 0!==_&&("test"===_.operation||"validate"===_.operation)&&null!==_.output&&"object"==typeof _.output&&Object.hasOwn(_.output,"result"),R=async s=>{z(!0),S("");try{if("cancel"===s)await l.U.runs.cancel.mutate({id:e});else{let s=await l.U.runs.retry.mutate({id:e,idempotency_key:crypto.randomUUID()});m(s.id)}await v.refresh()}catch(e){S((0,c.f)(e))}finally{z(!1)}};return(0,s.jsxs)("div",{className:"run-detail",children:[(0,s.jsxs)(u.f,{variant:"ghost",onClick:j,children:[(0,s.jsx)(i.f,{size:14})," All runs"]}),(0,s.jsx)(x.f,{...v}),C?(0,s.jsx)("p",{className:"error",role:"alert",children:C}):void 0,_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"panel-title",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"eyebrow",children:["RUN ",_.id.slice(0,8)]}),(0,s.jsxs)("h2",{children:[h.find(e=>e.id===_.project)?.name??"Project"," ","· ",(0,p.T)(_.operation)]})]}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(p.k,{status:_.status}),p.B.includes(_.status)?(0,s.jsxs)(u.f,{variant:"outline",disabled:g||_.cancel_requested,onClick:()=>{R("cancel")},children:[(0,s.jsx)(a.f,{size:13}),_.cancel_requested?"Cancellation requested":"Cancel run"]}):void 0,["action","code","validate","test"].includes(_.operation)&&["failed","interrupted","cancelled"].includes(_.status)?(0,s.jsxs)(u.f,{variant:"outline",disabled:g,onClick:()=>{R("retry")},children:[(0,s.jsx)(r.f,{size:13})," Retry run"]}):void 0]})]}),(0,s.jsxs)("p",{className:"small",children:["Created ",new Date(_.created_at).toLocaleString()," · Updated"," ",new Date(_.updated_at).toLocaleString()]}),_.retry_of?(0,s.jsx)(u.f,{variant:"link",onClick:()=>{m(_.retry_of??"")},children:"View original run"}):void 0,_.error?(0,s.jsx)("div",{className:"error",role:"alert",children:_.error}):void 0,(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{children:"Origin"}),(0,s.jsxs)("dd",{children:[_.origin," ",_.origin_reference]}),(0,s.jsx)("dt",{children:"Originating client"}),(0,s.jsx)("dd",{children:_.client_token??"No client token (historical attribution may be unknown)"}),(0,s.jsx)("dt",{children:"SDK revision"}),(0,s.jsx)("dd",{children:(0,p.A)(_.sdk_revision)||"Unknown"}),(0,s.jsx)("dt",{children:"Configuration revision"}),(0,s.jsx)("dd",{children:(0,p.A)(_.configuration_revision)||"Unknown"}),(0,s.jsx)("dt",{children:"Immutable action version"}),(0,s.jsx)("dd",{children:_.action_version??"One-off source / none"}),(0,s.jsx)("dt",{children:"Source digest"}),(0,s.jsx)("dd",{children:(0,p.A)(_.source_digest)||"Unknown"})]}),null===_.source?null:(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Accepted source"}),(0,s.jsx)("pre",{children:(0,p.A)(_.source)})]}),"code"===_.operation&&null!==_.source?(0,s.jsx)(b,{id:_.id},_.id):null,(0,s.jsx)("h3",{children:A[_.operation]??"Outcome"}),(0,s.jsx)(N,{run:_,hasCheckReport:O}),(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:"Run inputs"}),(0,s.jsx)("pre",{children:(0,p.A)(_.inputs)})]})]}),"waiting_approval"===_.status?(0,s.jsx)(k.f,{runId:e}):void 0,(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Artifacts"}),(0,s.jsx)(x.f,{...y}),y.data?.filter(s=>s.run===e).length===0?(0,s.jsx)("p",{className:"small",children:"No artifacts were saved by this run."}):void 0,y.data?.filter(s=>s.run===e).map(e=>(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{children:e.name}),(0,s.jsxs)(u.f,{variant:"outline",size:"sm",onClick:()=>{w(e)},children:[(0,s.jsx)(t.f,{size:13}),"Download"]}),(0,s.jsx)("pre",{children:e.content})]},e.id))]}),"session"===_.operation?null:(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Execution trace"}),v.data?.events.length===0?(0,s.jsx)("p",{className:"small",children:"Waiting for the first execution event."}):void 0,(0,s.jsx)("ol",{className:"run-timeline",children:v.data?.events.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)("span",{className:"timeline-dot"}),(0,s.jsxs)("details",{children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)("strong",{children:e.kind.replaceAll("."," ")}),(0,s.jsx)("time",{children:new Date(e.created_at).toLocaleTimeString()})]}),(0,s.jsx)("pre",{children:(0,p.A)(e.data)})]})]},e.sequence))})]})]}):void 0]})},"t",0,w],36174)},10505,79432,e=>{"use strict";var s=e.i(18050),i=e.i(56420);let t={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};t.node;let r=(0,i.f)(t);e.s(["f",0,r],79432);var a=e.i(51757);let n={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};n.node;let l=(0,i.f)(n),c={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};c.node;let d=(0,i.f)(c),o={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};o.node;let u=(0,i.f)(o);function h(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let i={succeeded:a.f,waiting_approval:d,running:r,queued:l,failed:u,cancelled:u,interrupted:u}[e]??l;return(0,s.jsxs)("span",{className:`run-status status-${e}`,children:[(0,s.jsx)(i,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,s){let i=s.find(s=>s.id===e.project)?.name??"Project";return"chat"===e.operation?`${i} \xb7 ${(function(e,s){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,s)){let i=Reflect.get(e,s);if("string"==typeof i)return i}return""})(e.inputs,"message").slice(0,70)}`:`${i} \xb7 ${h(e.operation)}`},"T",0,h],10505)},90409,59241,e=>{"use strict";var s=e.i(71645),i=e.i(73656),t=e.i(13581);e.s(["f",0,function(e){let r=(0,s.useCallback)(async s=>{let[t,r]=await Promise.all([i.U.runs.get.query({id:e},{signal:s}),i.U.runs.events.query({id:e},{signal:s})]);return{run:t,events:r}},[e]),a=(0,t.f)(r,3e3),n=a.data?.run.id===e?a.data:void 0,l=void 0!==n,{refresh:c}=a;return(0,s.useEffect)(()=>{if(l)return function(e,s,t=i.U.runs.stream.subscribe){let r,a=!0,n=()=>{a&&!r&&(r=setTimeout(()=>{r=void 0,a&&s()},400))},l=t({id:e},{onData:n,onComplete(){a&&(clearTimeout(r),r=void 0,s())},onError:n});return()=>{a=!1,clearTimeout(r),l.unsubscribe()}}(e,c)},[e,l,c]),{...a,data:n}}],90409);var r=e.i(18050),a=e.i(10505);function n(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}e.s(["f",0,function({output:e}){let s=n(e),i=n(s?.result)??s;if(!i)return null;let t=n(i.validation)??i,l=Array.isArray(t.diagnostics)?t.diagnostics:[],c=Array.isArray(i.cases)?i.cases:[];return(0,r.jsxs)("div",{children:["boolean"==typeof t.valid?(0,r.jsx)("p",{children:t.valid?"Source passed semantic validation.":"Source failed semantic validation."}):null,l.length>0?(0,r.jsx)("ul",{children:l.map((e,s)=>{let i=n(e);return(0,r.jsxs)("li",{children:["Line ",(0,a.A)(i?.line),", column"," ",(0,a.A)(i?.column),":"," ",(0,a.A)(i?.message)]},s)})}):null,c.length>0?(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Case"}),(0,r.jsx)("th",{children:"Result"}),(0,r.jsx)("th",{children:"Details"})]})}),(0,r.jsx)("tbody",{children:c.map((e,s)=>{let i=n(e);return(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,a.A)(i?.name)}),(0,r.jsx)("td",{children:i?.passed===!0?"Passed":"Failed"}),(0,r.jsxs)("td",{children:["string"==typeof i?.error&&""!==i.error?(0,r.jsx)("p",{children:i.error}):null,Array.isArray(i?.violations)?(0,r.jsx)("pre",{children:(0,a.A)(i.violations)}):null,(0,r.jsxs)("details",{children:[(0,r.jsx)("summary",{children:"Actual output and logs"}),(0,r.jsx)("pre",{children:(0,a.A)(i?.actual)}),(0,r.jsx)("pre",{children:(0,a.A)(i?.logs)})]})]})]},s)})})]}):null]})}],59241)}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],11241)},51757,e=>{"use strict";var t=e.i(56420);let r={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],51757)},62368,e=>{"use strict";var t=e.i(56420);let r={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],62368)},26091,e=>{"use strict";var t=e.i(56420);let r={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],26091)},95925,29272,e=>{"use strict";var t=e.i(56420);let r={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],95925);let i={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};i.node;let s=(0,t.f)(i);e.s(["f",0,s],29272)},66595,e=>{"use strict";var t=e.i(56420);let r={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],66595)},5500,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return j}});let n=e.r(55682),i=e.r(90809),s=e.r(18050),a=i._(e.r(71645)),l=n._(e.r(74080)),o=n._(e.r(25633)),c=e.r(8927),d=e.r(65856),u=e.r(49381),f=n._(e.r(1948)),p=e.r(18581);function h(e,t,r,n,i,s,a){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,i=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}n?.current&&n.current(e)}}))}function m(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let g="u"<typeof window?a.useEffect:a.useLayoutEffect,x=(0,a.forwardRef)(({src:e,srcSet:t,sizes:r,height:n,width:i,decoding:l,className:o,style:c,fetchPriority:d,placeholder:u,loading:f,unoptimized:x,fill:y,onLoadRef:j,onLoadingCompleteRef:v,setBlurComplete:b,setShowAltText:w,sizesInput:_,onLoad:S,onError:k,...P},C)=>{let O=(0,a.useRef)(!1),A=(0,a.useRef)(null);g(()=>{let{current:e}=O,{current:t}=A;e||null===t||(k&&(t.src=t.src),t.complete&&h(t,u,j,v,b,x,_),O.current=!0)},[e,u,j,v,k,x,_]);let N=(0,p.useMergedRef)(C,A);return(0,s.jsx)("img",{...P,...m(d),loading:f,width:i,height:n,decoding:l,"data-nimg":y?"fill":"1",className:o,style:c,sizes:r,srcSet:t,src:e,ref:N,onLoad:e=>{h(e.currentTarget,u,j,v,b,x,_)},onError:e=>{w(!0),"empty"!==u&&b(!0),k&&k(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...m(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,s.jsx)(o.default,{children:(0,s.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let j=(0,a.forwardRef)((e,t)=>{let r=(0,a.useContext)(d.RouterContext),n=(0,u.useImageConfig)(),{onLoad:i,onLoadingComplete:l}=e,o=(0,a.useRef)(i);(0,a.useEffect)(()=>{o.current=i},[i]);let p=(0,a.useRef)(l);(0,a.useEffect)(()=>{p.current=l},[l]);let[h,m]=(0,a.useState)(!1),[g,j]=(0,a.useState)(!1),{props:v,meta:b}=(0,c.getImgProps)(e,{defaultLoader:f.default,imgConf:n,blurComplete:h,showAltText:g});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x,{...v,unoptimized:b.unoptimized,placeholder:b.placeholder,fill:b.fill,onLoadRef:o,onLoadingCompleteRef:p,setBlurComplete:m,setShowAltText:j,sizesInput:e.sizes,ref:t}),b.preload?(0,s.jsx)(y,{isAppRouter:!r,imgAttributes:v}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},49381,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useImageConfig",{enumerable:!0,get:function(){return l}});let n=e.r(71645),i=e.r(87690),s=e.r(18556),a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function l(){let e=(0,n.useContext)(s.ImageConfigContext);return(0,i.prepareImageConfig)(a,e)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class a{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new a}function c(e){let t=Symbol.for(`@next/${e}@16.4.5`),r=globalThis;return r[t]??=o()}function d(e){return l?l.bind(e):a.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(42344)},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let n=e.r(55682)._(e.r(69093));function i(e,t){let r={};"function"==typeof e&&(r.loader=e);let i={...r,...t};return(0,n.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},9885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},70965,(e,t,r)=>{"use strict";function n(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return n}})},8927,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return o}});let n=e.r(43369),i=e.r(88143),s=["-moz-initial","fill","none","scale-down",void 0];function a(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:0/0:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):0/0}function o({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:d=!1,loading:u,className:f,quality:p,width:h,height:m,fill:g=!1,style:x,overrideSrc:y,onLoad:j,onLoadingComplete:v,placeholder:b="empty",blurDataURL:w,fetchPriority:_,decoding:S="async",layout:k,objectFit:P,objectPosition:C,lazyBoundary:O,lazyRoot:A,...N},z){var M;let R,$,{imgConf:I,showAltText:E,blurComplete:L,defaultLoader:U}=z;if(void 0===U)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let T=N.loader||U;delete N.loader,delete N.srcSet;let D="__next_img_default"in T;if(D){if("custom"===I.loader)throw Error(`Image with src "${e}" is missing "loader" prop.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{let e=T;T=t=>{let{config:r,...n}=t;return e(n)}}if(k){"fill"===k&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[k];e&&(x={...x,...e});let r={responsive:"100vw",fill:"100vw"}[k];r&&!t&&(t=r)}let q="",B=l(h),F=l(m);if((M=e)&&"object"==typeof M&&(a(M)||void 0!==M.src)){let t=a(e)?e.default:e;if(!t.src)throw Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`);if(!t.height||!t.width)throw Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`);if(R=t.blurWidth,$=t.blurHeight,w=w||t.blurDataURL,q=t.src,!g)if(B||F){if(B&&!F){let e=B/t.width;F=Math.round(t.height*e)}else if(!B&&F){let e=F/t.height;B=Math.round(t.width*e)}}else B=t.width,F=t.height}let W=!c&&!d&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:q)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,W=!1),I.unoptimized&&(r=!0),D&&!I.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let G=l(p),H=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:P,objectPosition:C}:{},E?{}:{color:"transparent"},x),V=L||"empty"===b?null:"blur"===b?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:B,heightInt:F,blurWidth:R,blurHeight:$,blurDataURL:w||"",objectFit:H.objectFit})}")`:`url("${b}")`,J=s.includes(H.objectFit)?"fill"===H.objectFit?"100% 100%":"cover":H.objectFit,K=V?{backgroundSize:J,backgroundPosition:H.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:V}:{},Q=function({config:e,src:t,unoptimized:r,width:i,quality:s,sizes:a,loader:l}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,n.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,n.getAssetToken)())e=void 0;else if(e){let r=t.indexOf("?");if(-1!==r){let n=new URLSearchParams(t.slice(r+1));n.get("dpl")||(n.append("dpl",e),t=t.slice(0,r)+"?"+n.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:c}=function({deviceSizes:e,allSizes:t},r,n){if(n){let r=/(^|\s)(1?\d?\d)vw/g,i=[];for(let e;e=r.exec(n);)i.push(parseInt(e[2]));if(i.length){let r=.01*Math.min(...i);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,a),d=o.length-1;return{sizes:a||"w"!==c?a:"100vw",srcSet:o.map((r,n)=>`${l({config:e,src:t,quality:s,width:r})} ${"w"===c?r:n+1}${c}`).join(", "),src:l({config:e,src:t,quality:s,width:o[d]})}}({config:I,src:e,unoptimized:r,width:B,quality:G,sizes:t,loader:T}),Y=W?"lazy":u;return{props:{...N,loading:Y,fetchPriority:_,width:B,height:F,decoding:S,className:f,style:{...H,...K},sizes:Q.sizes,srcSet:Q.srcSet,src:y||Q.src},meta:{unoptimized:r,preload:d||c,placeholder:b,fill:g}}}},25633,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},defaultHead:function(){return u}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(55682),a=e.r(90809),l=e.r(18050),o=a._(e.r(71645)),c=s._(e.r(98879)),d=e.r(42732);function u(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let p=["name","httpEquiv","charSet","itemProp"];function h(e){let t,r,n,i;return e.reduce(f,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,n=new Set,i={},e=>{let s=!0,a=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){a=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?s=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?s=!1:r.add(e.type);break;case"meta":for(let t=0,r=p.length;t<r;t++){let r=p[t];if(e.props.hasOwnProperty(r))if("charSet"===r)n.has(r)?s=!1:n.add(r);else{let t=e.props[r],n=i[r]||new Set;("name"!==r||!a)&&n.has(t)?s=!1:(n.add(t),i[r]=n)}}}return s})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let m=function({children:e}){let t=(0,o.useContext)(d.HeadManagerContext);return(0,l.jsx)(c.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},88143,(e,t,r)=>{"use strict";function n({widthInt:e,heightInt:t,blurWidth:r,blurHeight:i,blurDataURL:s,objectFit:a}){let l=r?40*r:e,o=i?40*i:t,c=l&&o?`viewBox='0 0 ${l} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},18556,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let n=e.r(55682)._(e.r(71645)),i=e.r(87690),s=n.default.createContext(i.imageConfigDefault)},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={VALID_LOADERS:function(){return s},imageConfigDefault:function(){return c},prepareImageConfig:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=["default","imgix","cloudinary","akamai","custom"],a={},l=new WeakMap;function o(e,t){let r=e??a,n=t??a,i=l.get(r);if(i){let e=i.get(n);if(e)return e}let s=e||t||c,o=[...s.deviceSizes].sort((e,t)=>e-t),d=[...s.imageSizes],u={deviceSizes:o,imageSizes:d,allSizes:[...o,...d].sort((e,t)=>e-t),qualities:void 0===s.qualities?void 0:[...s.qualities].sort((e,t)=>e-t),path:s.path,loader:s.loader,dangerouslyAllowSVG:s.dangerouslyAllowSVG,unoptimized:s.unoptimized,domains:s.domains,remotePatterns:s.remotePatterns,localPatterns:"u"<typeof window&&void 0!==t?t.localPatterns:s.localPatterns,output:s.output};return i||(i=new WeakMap,l.set(r,i)),i.set(n,u),u}let c={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},1948,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let n=e.r(70965),i=e.r(43369);function s({config:e,src:t,width:r,quality:a}){let l=(0,i.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,i.getAssetToken)())l=void 0;else{let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),n=r.get("dpl");if(n){l=n,r.delete("dpl");let i=r.toString();t=t.slice(0,e)+(i?"?"+i:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
3
|
-
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`);let o=(0,n.findClosestQuality)(a,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${o}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}s.__next_img_default=!0;let a=s},67585,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return a}});let n=e.r(71645),i=e.r(74080);e.r(32061);let s=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function a({children:e}){return(0,n.use)((0,i.browser)(s)),e}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(18050),i=e.r(71645),s=e.r(67585),a=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},r=(0,i.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?i.Suspense:i.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(s.BailoutToCSRForNextDynamic,{children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let n=e.r(18050),i=e.r(74080),s=e.r(63599),a=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=s.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={createReactBrowserBailoutReason:function(){return a},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=Symbol.for("next.browser-bailout-reason");function a(e){return{$$typeof:s,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===s?t.reason:void 0}function o(e){return void 0!==l(e)}},65856,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return n}});let n=(e.r(55682)._(e.r(71645))).default.createContext(null)},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let n=e.r(71645),i="u"<typeof window,s=i?()=>{}:n.useLayoutEffect,a=i?()=>{}:n.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function l(){if(t&&t.mountedInstances){let e=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return i&&(t?.mountedInstances?.add(e.children),l()),s(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),s(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},13581,29487,e=>{"use strict";var t=e.i(71645),r=e.i(95813);e.s(["f",0,function(e,n=0){let[i,s]=(0,t.useState)(),[a,l]=(0,t.useState)(""),[o,c]=(0,t.useState)(!0),d=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),f=(0,t.useCallback)(async()=>{d.current?.abort();let t=new AbortController;d.current=t;try{let r=await e(t.signal);if(t.signal.aborted||!u.current)return;s(r),l("")}catch(e){!t.signal.aborted&&u.current&&l((0,r.f)(e))}finally{!t.signal.aborted&&u.current&&c(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&f()});let e=n>0?setInterval(()=>{f()},n):void 0;return()=>{u.current=!1,d.current?.abort(),clearInterval(e)}},[f,n]),{data:i,error:a,isLoading:o,refresh:f}}],13581);var n=e.i(18050),i=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:r}){return(0,n.jsxs)(n.Fragment,{children:[e?(0,n.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,n.jsxs)("div",{className:"error",role:"alert",children:[(0,n.jsx)("p",{children:t}),(0,n.jsx)(i.f,{variant:"outline",onClick:()=>{r()},children:"Try again"})]}):void 0]})}],29487)},93479,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(39689);let i=r.forwardRef(({className:e,type:r,...i},s)=>(0,t.jsx)("input",{type:r,className:(0,n.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:s,...i}));i.displayName="Input",e.s(["f",0,i])},24687,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(39689);let i=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("textarea",{className:(0,n.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...r}));i.displayName="Textarea",e.s(["f",0,i])},1101,75775,e=>{"use strict";var t=e.i(18050),r=e.i(56420);let n={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};n.node;let i=(0,r.f)(n);e.s(["f",0,i],75775);var s=e.i(52330),a=e.i(75016);e.s(["f",0,function({action:e}){let r=e.description.trim(),n=new URLSearchParams({project:e.project,action:e.id}).toString();return(0,t.jsxs)("article",{className:"flex min-w-0 flex-col gap-4 rounded-xl border border-slate-200 bg-white p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)(s.f,{size:20,className:"shrink-0 text-indigo-600","aria-hidden":"true"}),(0,t.jsx)("span",{className:e.enabled?"rounded-full bg-emerald-50 px-2.5 py-1 text-xs font-medium text-emerald-700":"rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-600",children:e.enabled?"Enabled":"Disabled"})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:(0,t.jsxs)(a.f,{href:`/actions/?${n}`,className:"flex items-start justify-between gap-3 hover:underline",children:[(0,t.jsx)("span",{className:"break-words",children:e.name}),(0,t.jsx)(i,{size:17,className:"mt-0.5 shrink-0","aria-hidden":"true"})]})}),(0,t.jsx)("p",{className:"text-sm leading-relaxed",children:r.length>0?r:"Open this action to review its code, inputs and saved versions."})]}),(0,t.jsxs)("nav",{className:"flex flex-wrap gap-x-4 gap-y-2 border-t border-slate-100 pt-3 text-sm","aria-label":`${e.name} related records`,children:[(0,t.jsx)(a.f,{href:`/runs/?${n}`,className:"hover:underline",children:"Runs"}),(0,t.jsx)(a.f,{href:`/schedules/?${n}`,className:"hover:underline",children:"Schedules"}),(0,t.jsx)(a.f,{href:`/webhooks/?${n}`,className:"hover:underline",children:"Webhooks"})]})]})}],1101)},12102,e=>{"use strict";var t=e.i(40192),r=e.i(54105),n=e.i(19877),i=e.i(22219),i=i;let s=t.z.record(r.z.string(),n.z.json());e.s(["z",0,function(e){let t=JSON.parse(e);return i.array(s).min(1).max(50).parse(t)},"J",0,function(e){let t=JSON.parse(e);return s.parse(t)}],12102)},59140,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(18566),i=e.i(11241),s=e.i(73656),a=e.i(13581),l=e.i(94757),o=e.i(75016),c=e.i(29487);let d=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function u({action:e,current:r}){let n=e.project,s=new URLSearchParams({project:n,action:e.id});return(0,t.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(o.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:n}).toString()}`,children:[(0,t.jsx)(i.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,t.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,t.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,t.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:d.map(e=>(0,t.jsx)(o.f,{href:`${e.path}?${s.toString()}`,"aria-current":r===e.id?"page":void 0,className:r===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function f({project:e,actionId:n,current:i,children:l}){let d=(0,r.useCallback)(async t=>{if(!n)return;let r=await s.U.actions.get.query({id:n},{signal:t});if(r.project!==e)throw Error("This action is not available in the selected project.");return r},[n,e]),p=(0,a.f)(d);return n&&(p.isLoading||p.error||p.data?.id!==n)?(0,t.jsx)(c.f,{...p}):(0,t.jsxs)(t.Fragment,{children:[p.data?(0,t.jsx)(u,{action:p.data,current:i}):(0,t.jsx)("p",{className:"mb-5",children:(0,t.jsx)(o.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(n)]})}e.s(["F",0,u,"c",0,function({current:e,children:r}){let{selected:i}=(0,l.useWorkspace)(),s=(0,n.useSearchParams)().get("action")??"";return(0,t.jsx)(f,{project:i,actionId:s,current:e,children:r},`${i}:${s}`)}])},44555,e=>{"use strict";var t=e.i(18050),r=e.i(56420);let n={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};n.node;let i=(0,r.f)(n);var s=e.i(71645),a=e.i(73656),l=e.i(95813),o=e.i(13581),c=e.i(15080),d=e.i(19455),u=e.i(29487);e.s(["f",0,function({runId:e,openRun:r}){let n=(0,o.f)(c.i,5e3),[f,p]=(0,s.useState)(""),[h,m]=(0,s.useState)(""),g=n.data?.filter(t=>"pending"===t.status&&(!e||t.run===e))??[],x=async(e,t)=>{p(e),m("");try{await a.U.approvals.decide.mutate({id:e,decision:t}),await n.refresh()}catch(e){m((0,l.f)(e))}finally{p("")}};return(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("h2",{children:[(0,t.jsx)(i,{size:18})," ",e?"Run approvals":"Approval queue"]}),(0,t.jsxs)("span",{className:"badge",children:[g.length," pending"]})]}),(0,t.jsx)(u.f,{...n}),h?(0,t.jsx)("p",{className:"error",role:"alert",children:h}):void 0,n.isLoading||0!==g.length?void 0:(0,t.jsxs)("div",{className:"resource-empty",children:[(0,t.jsx)(i,{size:28}),(0,t.jsx)("h3",{children:"All caught up"}),(0,t.jsx)("p",{children:"No decisions are waiting for you."})]}),g.map(e=>(0,t.jsxs)("article",{className:"approval-card",children:[(0,t.jsx)("span",{className:"eyebrow",children:"Human approval required"}),(0,t.jsx)("p",{className:"approval-prompt",children:e.prompt}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(d.f,{disabled:!!f,onClick:()=>{x(e.id,"approved")},children:f===e.id?"Saving decision…":"Approve"}),(0,t.jsx)(d.f,{variant:"outline",disabled:!!f,onClick:()=>{x(e.id,"denied")},children:"Deny"}),r?(0,t.jsx)(d.f,{variant:"ghost",onClick:()=>{r(e.run)},children:"Inspect run"}):void 0]})]},e.id))]})}],44555)},23920,e=>{"use strict";var t=e.i(18050),r=e.i(5500),r=r,n=e.i(79258),i=e.i(71645);e.s(["f",0,function({url:e,size:s=32}){let a=function(e){if(!e)return"";try{let t=new URL(e);return"https:"!==t.protocol||t.username||t.password?"":t.href}catch{return""}}(e),[l,o]=(0,i.useState)("");return a&&l!==a?(0,t.jsx)(r.Image,{src:a,alt:"",width:s,height:s,unoptimized:!0,referrerPolicy:"no-referrer",className:"shrink-0 object-contain",onError:()=>{o(a)}}):(0,t.jsx)(n.f,{size:s,className:"shrink-0","aria-hidden":"true"})}],23920)},36174,e=>{"use strict";var t=e.i(18050),r=e.i(11241),n=e.i(62368),i=e.i(95925),s=e.i(29272),a=e.i(71645),l=e.i(73656),o=e.i(95813),c=e.i(13581),d=e.i(15080),u=e.i(19455),f=e.i(85951),p=e.i(10505),h=e.i(29487),m=e.i(90409),g=e.i(59241),x=e.i(12102),y=e.i(75016),j=e.i(93479),v=e.i(24687);function b({id:e}){let[r,n]=(0,a.useState)(""),[i,s]=(0,a.useState)('{"type":"object"}'),[c,d]=(0,a.useState)("{}"),[f,p]=(0,a.useState)(!1),[h,m]=(0,a.useState)(""),[g,w]=(0,a.useState)(""),[_,S]=(0,a.useState)("");async function k(){p(!0),S(""),m("");try{let t=await l.U.runs.promote.mutate({id:e,name:r.trim(),input_schema:(0,x.J)(i),output_schema:(0,x.J)(c)});w(t.action),m(`Saved exact run source as version ${String(t.version.number)} of ${r.trim()} (action ${t.action}).`)}catch(e){S((0,o.f)(e))}finally{p(!1)}}return(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Promote accepted source to a saved action"}),(0,t.jsx)("p",{children:"The server copies this run’s exact source and SDK provenance. Run inputs remain examples and are not saved as defaults."}),(0,t.jsxs)("label",{children:["New action name",(0,t.jsx)(j.f,{value:r,disabled:f,onChange:e=>{n(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Input schema (JSON)",(0,t.jsx)(v.f,{className:"code",value:i,disabled:f,onChange:e=>{s(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Output schema (JSON)",(0,t.jsx)(v.f,{className:"code",value:c,disabled:f,onChange:e=>{d(e.target.value)}})]}),(0,t.jsx)(u.f,{disabled:f||!r.trim(),onClick:()=>{k()},children:"Promote exact source"}),_?(0,t.jsx)("p",{role:"alert",className:"error",children:_}):null,h?(0,t.jsx)("p",{role:"status",children:h}):null,g?(0,t.jsx)(y.f,{href:`/actions/?action=${encodeURIComponent(g)}`,children:"Open saved action"}):null]})}var w=e.i(44555);function _(e){let t=new Blob([e.content],{type:e.media_type}),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e.name,n.click(),URL.revokeObjectURL(r)}function S({run:e,hasCheckReport:r}){return r?(0,t.jsx)(g.f,{output:e.output}):"succeeded"!==e.status?(0,t.jsx)("p",{children:p.B.includes(e.status)?"This run is still in progress. Its result will appear here.":`This run ${e.status}. Review the trace before retrying.`}):"chat"===e.operation?(0,t.jsx)(f.f,{content:(0,p.A)(e.output)}):(0,t.jsx)("pre",{children:(0,p.A)(e.output)||"Completed without output."})}let k={session:"Session result",test:"Mocked test results",validate:"Semantic validation diagnostics"};e.s(["T",0,function({id:e,projects:f,back:g,openRun:x}){let y=(0,m.f)(e),j=(0,c.f)(d.K),[v,P]=(0,a.useState)(!1),[C,O]=(0,a.useState)(""),A=y.data?.run,N=void 0!==A&&("test"===A.operation||"validate"===A.operation)&&null!==A.output&&"object"==typeof A.output&&Object.hasOwn(A.output,"result"),z=async t=>{P(!0),O("");try{if("cancel"===t)await l.U.runs.cancel.mutate({id:e});else{let t=await l.U.runs.retry.mutate({id:e,idempotency_key:crypto.randomUUID()});x(t.id)}await y.refresh()}catch(e){O((0,o.f)(e))}finally{P(!1)}};return(0,t.jsxs)("div",{className:"run-detail",children:[(0,t.jsxs)(u.f,{variant:"ghost",onClick:g,children:[(0,t.jsx)(r.f,{size:14})," All runs"]}),(0,t.jsx)(h.f,{...y}),C?(0,t.jsx)("p",{className:"error",role:"alert",children:C}):void 0,A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"eyebrow",children:["RUN ",A.id.slice(0,8)]}),(0,t.jsxs)("h2",{children:[f.find(e=>e.id===A.project)?.name??"Project"," ","· ",(0,p.T)(A.operation)]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(p.k,{status:A.status}),p.B.includes(A.status)?(0,t.jsxs)(u.f,{variant:"outline",disabled:v||A.cancel_requested,onClick:()=>{z("cancel")},children:[(0,t.jsx)(s.f,{size:13}),A.cancel_requested?"Cancellation requested":"Cancel run"]}):void 0,["action","code","validate","test"].includes(A.operation)&&["failed","interrupted","cancelled"].includes(A.status)?(0,t.jsxs)(u.f,{variant:"outline",disabled:v,onClick:()=>{z("retry")},children:[(0,t.jsx)(i.f,{size:13})," Retry run"]}):void 0]})]}),(0,t.jsxs)("p",{className:"small",children:["Created ",new Date(A.created_at).toLocaleString()," · Updated"," ",new Date(A.updated_at).toLocaleString()]}),A.retry_of?(0,t.jsx)(u.f,{variant:"link",onClick:()=>{x(A.retry_of??"")},children:"View original run"}):void 0,A.error?(0,t.jsx)("div",{className:"error",role:"alert",children:A.error}):void 0,(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{children:"Origin"}),(0,t.jsxs)("dd",{children:[A.origin," ",A.origin_reference]}),(0,t.jsx)("dt",{children:"Originating client"}),(0,t.jsx)("dd",{children:A.client_token??"No client token (historical attribution may be unknown)"}),(0,t.jsx)("dt",{children:"SDK revision"}),(0,t.jsx)("dd",{children:(0,p.A)(A.sdk_revision)||"Unknown"}),(0,t.jsx)("dt",{children:"Configuration revision"}),(0,t.jsx)("dd",{children:(0,p.A)(A.configuration_revision)||"Unknown"}),(0,t.jsx)("dt",{children:"Immutable action version"}),(0,t.jsx)("dd",{children:A.action_version??"One-off source / none"}),(0,t.jsx)("dt",{children:"Source digest"}),(0,t.jsx)("dd",{children:(0,p.A)(A.source_digest)||"Unknown"})]}),null===A.source?null:(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Accepted source"}),(0,t.jsx)("pre",{children:(0,p.A)(A.source)})]}),"code"===A.operation&&null!==A.source?(0,t.jsx)(b,{id:A.id},A.id):null,(0,t.jsx)("h3",{children:k[A.operation]??"Outcome"}),(0,t.jsx)(S,{run:A,hasCheckReport:N}),(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Run inputs"}),(0,t.jsx)("pre",{children:(0,p.A)(A.inputs)})]})]}),"waiting_approval"===A.status?(0,t.jsx)(w.f,{runId:e}):void 0,(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Artifacts"}),(0,t.jsx)(h.f,{...j}),j.data?.filter(t=>t.run===e).length===0?(0,t.jsx)("p",{className:"small",children:"No artifacts were saved by this run."}):void 0,j.data?.filter(t=>t.run===e).map(e=>(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:e.name}),(0,t.jsxs)(u.f,{variant:"outline",size:"sm",onClick:()=>{_(e)},children:[(0,t.jsx)(n.f,{size:13}),"Download"]}),(0,t.jsx)("pre",{children:e.content})]},e.id))]}),"session"===A.operation?null:(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Execution trace"}),y.data?.events.length===0?(0,t.jsx)("p",{className:"small",children:"Waiting for the first execution event."}):void 0,(0,t.jsx)("ol",{className:"run-timeline",children:y.data?.events.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"timeline-dot"}),(0,t.jsxs)("details",{children:[(0,t.jsxs)("summary",{children:[(0,t.jsx)("strong",{children:e.kind.replaceAll("."," ")}),(0,t.jsx)("time",{children:new Date(e.created_at).toLocaleTimeString()})]}),(0,t.jsx)("pre",{children:(0,p.A)(e.data)})]})]},e.sequence))})]})]}):void 0]})},"t",0,_],36174)},10505,79432,e=>{"use strict";var t=e.i(18050),r=e.i(56420);let n={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};n.node;let i=(0,r.f)(n);e.s(["f",0,i],79432);var s=e.i(51757);let a={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};a.node;let l=(0,r.f)(a),o={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};o.node;let c=(0,r.f)(o),d={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};d.node;let u=(0,r.f)(d);function f(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let r={succeeded:s.f,waiting_approval:c,running:i,queued:l,failed:u,cancelled:u,interrupted:u}[e]??l;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(r,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let r=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${r} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let r=Reflect.get(e,t);if("string"==typeof r)return r}return""})(e.inputs,"message").slice(0,70)}`:`${r} \xb7 ${f(e.operation)}`},"T",0,f],10505)},90409,59241,e=>{"use strict";var t=e.i(71645),r=e.i(73656),n=e.i(13581);e.s(["f",0,function(e){let i=(0,t.useCallback)(async t=>{let[n,i]=await Promise.all([r.U.runs.get.query({id:e},{signal:t}),r.U.runs.events.query({id:e},{signal:t})]);return{run:n,events:i}},[e]),s=(0,n.f)(i,3e3),a=s.data?.run.id===e?s.data:void 0,l=void 0!==a,{refresh:o}=s;return(0,t.useEffect)(()=>{if(l)return function(e,t,n=r.U.runs.stream.subscribe){let i,s=!0,a=()=>{s&&!i&&(i=setTimeout(()=>{i=void 0,s&&t()},400))},l=n({id:e},{onData:a,onComplete(){s&&(clearTimeout(i),i=void 0,t())},onError:a});return()=>{s=!1,clearTimeout(i),l.unsubscribe()}}(e,o)},[e,l,o]),{...s,data:a}}],90409);var i=e.i(18050),s=e.i(10505);function a(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}e.s(["f",0,function({output:e}){let t=a(e),r=a(t?.result)??t;if(!r)return null;let n=a(r.validation)??r,l=Array.isArray(n.diagnostics)?n.diagnostics:[],o=Array.isArray(r.cases)?r.cases:[];return(0,i.jsxs)("div",{children:["boolean"==typeof n.valid?(0,i.jsx)("p",{children:n.valid?"Source passed semantic validation.":"Source failed semantic validation."}):null,l.length>0?(0,i.jsx)("ul",{children:l.map((e,t)=>{let r=a(e);return(0,i.jsxs)("li",{children:["Line ",(0,s.A)(r?.line),", column"," ",(0,s.A)(r?.column),":"," ",(0,s.A)(r?.message)]},t)})}):null,o.length>0?(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Case"}),(0,i.jsx)("th",{children:"Result"}),(0,i.jsx)("th",{children:"Details"})]})}),(0,i.jsx)("tbody",{children:o.map((e,t)=>{let r=a(e);return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,s.A)(r?.name)}),(0,i.jsx)("td",{children:r?.passed===!0?"Passed":"Failed"}),(0,i.jsxs)("td",{children:["string"==typeof r?.error&&""!==r.error?(0,i.jsx)("p",{children:r.error}):null,Array.isArray(r?.violations)?(0,i.jsx)("pre",{children:(0,s.A)(r.violations)}):null,(0,i.jsxs)("details",{children:[(0,i.jsx)("summary",{children:"Actual output and logs"}),(0,i.jsx)("pre",{children:(0,s.A)(r?.actual)}),(0,i.jsx)("pre",{children:(0,s.A)(r?.logs)})]})]})]},t)})})]}):null]})}],59241)},59037,e=>{"use strict";var t=e.i(71645);e.s(["f",0,function(e,r){(0,t.useEffect)(()=>{r(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),r(!1)}},[e,r])}])},18879,e=>{"use strict";e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])},78688,e=>{"use strict";function t(e){return null===e||"object"!=typeof e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e))}function r(e){return"string"==typeof e?e:""}e.s(["o",0,function(e){if(!Array.isArray(e))return{tools:[],isComplete:!1};let n=[],i=!0;for(let s of e){let e=t(s),a=r(e.name);if(!a){i=!1;continue}let l=[];if(Array.isArray(e.parameters))for(let n of e.parameters){let e=t(n);if(!r(e.name)){i=!1;continue}l.push({name:r(e.name),type:r(e.type),description:r(e.description),optional:!0===e.optional})}n.push({name:a,description:r(e.description),parameters:l,returnType:r(e.returnType)})}return{tools:n,isComplete:i}},"u",0,function(e){let r=t(e);return{..."string"==typeof r.type&&{type:r.type},..."string"==typeof r.provider&&{provider:r.provider},..."string"==typeof r.label&&{label:r.label},..."string"==typeof r.hint&&{hint:r.hint}}},"g",0,function(e){return r(t(e).icon_url)}])}]);
|