@orgsdk/cli 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -7
- package/bin/orgsdk.mjs +1 -1
- package/dist/THIRD_PARTY_NOTICES.txt +278 -0
- package/dist/runtime/README.md +9 -7
- package/dist/runtime/cli.js +12 -13
- package/dist/runtime/client.js +79 -17
- package/dist/runtime/contract.js +39 -6
- package/dist/runtime/executor-configuration.js +1 -1
- package/dist/runtime/isolated-actions.js +4 -5
- package/dist/runtime/isolated-worker.js +5 -0
- package/dist/runtime/mcp/aliases.js +29 -0
- package/dist/runtime/mcp/client.js +239 -0
- package/dist/runtime/mcp/contract.js +57 -0
- package/dist/runtime/mcp/functions.js +40 -0
- package/dist/runtime/mcp/network.js +61 -0
- package/dist/runtime/mcp/schema-types.js +35 -0
- package/dist/runtime/mcp/transport.js +18 -0
- package/dist/runtime/project-data.js +1 -1
- package/dist/runtime/register-executor.js +23 -0
- package/dist/runtime/runner.js +30 -24
- package/dist/runtime/sdk-declarations.js +8 -1
- package/dist/runtime/session-job-contract.js +29 -0
- package/dist/runtime/session-job.js +256 -0
- package/dist/runtime/session-plugin-call.js +33 -0
- package/dist/runtime/sessions/manager.js +5 -3
- package/dist/runtime/sessions/process.js +3 -3
- package/dist/runtime/sessions/session-runtime.js +7 -3
- package/dist/runtime/sessions/worker-guard.js +20 -0
- package/dist/runtime/spawn-job.js +69 -0
- package/dist/runtime/supervisor.js +102 -146
- package/dist/runtime/worker.js +48 -45
- package/dist/server/{bun-driver-JKOGHIVX.js → bun-driver-DTZUUCI3.js} +1 -1
- package/dist/server/{chunk-WCVBLUNL.js → chunk-S5SFX3JM.js} +24 -0
- package/dist/server/index.js +2628 -1230
- package/dist/server/migrations/0003_remote-mcp.sql +17 -0
- package/dist/server/migrations/meta/0003_snapshot.json +3395 -0
- package/dist/server/migrations/meta/_journal.json +7 -0
- package/dist/server/{node-driver-FRDSYDBU.js → node-driver-HDJKKWXQ.js} +1 -1
- 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 +10 -10
- package/dist/server/out/__next._full.txt +11 -11
- package/dist/server/out/__next._tree.txt +2 -2
- package/dist/server/out/_next/static/chunks/0ay0b1lpy734z.js +1 -0
- package/dist/server/out/_next/static/chunks/0c-3k17txbh0-.js +1 -0
- package/dist/server/out/_next/static/chunks/0cwfl2xanfapu.js +1 -0
- package/dist/server/out/_next/static/chunks/0e7s8ie0wlk66.js +1 -0
- package/dist/server/out/_next/static/chunks/0ey-6hb0za4r_.js +1 -0
- package/dist/server/out/_next/static/chunks/0huhp5j8dlai8.js +1 -0
- package/dist/server/out/_next/static/chunks/0khjy8qh1ll42.js +1 -0
- package/dist/server/out/_next/static/chunks/0r0572w1rwpcv.js +1 -0
- package/dist/server/out/_next/static/chunks/0rlc9tihf4po6.css +1 -0
- package/dist/server/out/_next/static/chunks/0u_9k8f7709np.js +1 -0
- package/dist/server/out/_next/static/chunks/0w34iczo7r1v5.js +1 -0
- package/dist/server/out/_next/static/chunks/{280w168xxgtwt.js → 0y5lgqdwpeabb.js} +4 -4
- package/dist/server/out/_next/static/chunks/0zfiikazg0_ga.js +1 -0
- package/dist/server/out/_next/static/chunks/1-75euysc3lin.js +22 -0
- package/dist/server/out/_next/static/chunks/10aam78qxauw0.js +1 -0
- package/dist/server/out/_next/static/chunks/12ro_nqb83zku.js +1 -0
- package/dist/server/out/_next/static/chunks/19ue6x5c3f_38.js +3 -0
- package/dist/server/out/_next/static/chunks/1c1ayx3fqtub5.js +31 -0
- package/dist/server/out/_next/static/chunks/1c2xcwifk3vhh.js +1 -0
- package/dist/server/out/_next/static/chunks/1dwr62uuyceq-.js +1 -0
- package/dist/server/out/_next/static/chunks/1fweh1ttncdlv.js +1 -0
- package/dist/server/out/_next/static/chunks/1iklteprcoims.js +1 -0
- package/dist/server/out/_next/static/chunks/1qaow7bdy3oid.js +1 -0
- package/dist/server/out/_next/static/chunks/1tnzhqkfwk7l8.js +1 -0
- package/dist/server/out/_next/static/chunks/1wn9ohqcnx8y8.js +3 -0
- package/dist/server/out/_next/static/chunks/1zieh-zxgxmcp.js +1 -0
- package/dist/server/out/_next/static/chunks/25qsan0t-_of0.js +1 -0
- package/dist/server/out/_next/static/chunks/26yareaaj1kyr.js +1 -0
- package/dist/server/out/_next/static/chunks/2bkkmnhngpacd.js +1 -0
- package/dist/server/out/_next/static/chunks/2e39uy7huhczu.js +1 -0
- package/dist/server/out/_next/static/chunks/2lxgam-nk-e9a.js +3 -0
- package/dist/server/out/_next/static/chunks/{3dx108d0g6032.js → 2navy2mx7--vk.js} +1 -1
- package/dist/server/out/_next/static/chunks/2ngzwwqeitkk7.js +1 -0
- package/dist/server/out/_next/static/chunks/2rp65hq6bmpxv.js +1 -0
- package/dist/server/out/_next/static/chunks/2z60o39-yshg2.js +1 -0
- package/dist/server/out/_next/static/chunks/3_d6w25_b15kx.js +1 -0
- package/dist/server/out/_next/static/chunks/3d8gkwu9nszjk.js +1 -0
- package/dist/server/out/_next/static/chunks/3l-16g1y6k5rs.js +1 -0
- package/dist/server/out/_next/static/chunks/3obu_9-ka7u_h.js +1 -0
- package/dist/server/out/_next/static/chunks/3xs2ji0dgkbmc.js +1 -0
- package/dist/server/out/_next/static/chunks/{turbopack-3-ry682tkyiqk.js → turbopack-2u1d16houkiyo.js} +1 -1
- package/dist/server/out/_not-found/__next._full.txt +4 -4
- package/dist/server/out/_not-found/__next._not-found.__PAGE__.txt +3 -3
- package/dist/server/out/_not-found/__next._tree.txt +2 -2
- package/dist/server/out/_not-found/index.html +1 -1
- package/dist/server/out/_not-found/index.txt +4 -4
- package/dist/server/out/accounts/2fa/__next._full.txt +9 -9
- package/dist/server/out/accounts/2fa/__next._tree.txt +2 -2
- package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +8 -8
- package/dist/server/out/accounts/2fa/index.html +1 -1
- package/dist/server/out/accounts/2fa/index.txt +9 -9
- package/dist/server/out/accounts/email/__next._full.txt +8 -8
- package/dist/server/out/accounts/email/__next._tree.txt +2 -2
- package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/email/index.html +1 -1
- package/dist/server/out/accounts/email/index.txt +8 -8
- package/dist/server/out/accounts/login/__next._full.txt +8 -8
- package/dist/server/out/accounts/login/__next._tree.txt +2 -2
- package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/login/index.html +1 -1
- package/dist/server/out/accounts/login/index.txt +8 -8
- package/dist/server/out/accounts/logout/__next._full.txt +8 -8
- package/dist/server/out/accounts/logout/__next._tree.txt +2 -2
- package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/logout/index.html +1 -1
- package/dist/server/out/accounts/logout/index.txt +8 -8
- package/dist/server/out/accounts/password/change/__next._full.txt +8 -8
- package/dist/server/out/accounts/password/change/__next._tree.txt +2 -2
- package/dist/server/out/accounts/password/change/__next.accounts.password.change.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/password/change/index.html +1 -1
- package/dist/server/out/accounts/password/change/index.txt +8 -8
- package/dist/server/out/accounts/password/reset/__next._full.txt +6 -6
- package/dist/server/out/accounts/password/reset/__next._tree.txt +2 -2
- package/dist/server/out/accounts/password/reset/__next.accounts.password.reset.__PAGE__.txt +5 -5
- package/dist/server/out/accounts/password/reset/index.html +1 -1
- package/dist/server/out/accounts/password/reset/index.txt +6 -6
- package/dist/server/out/accounts/signup/__next._full.txt +8 -8
- package/dist/server/out/accounts/signup/__next._tree.txt +2 -2
- package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/signup/index.html +1 -1
- package/dist/server/out/accounts/signup/index.txt +8 -8
- package/dist/server/out/actions/__next.!KHdvcmtzcGFjZSk.actions.__PAGE__.txt +15 -15
- package/dist/server/out/actions/__next._full.txt +16 -16
- package/dist/server/out/actions/__next._tree.txt +2 -2
- package/dist/server/out/actions/index.html +1 -1
- package/dist/server/out/actions/index.txt +16 -16
- package/dist/server/out/agents/__next.!KHdvcmtzcGFjZSk.agents.__PAGE__.txt +8 -8
- package/dist/server/out/agents/__next._full.txt +9 -9
- package/dist/server/out/agents/__next._tree.txt +2 -2
- package/dist/server/out/agents/index.html +1 -1
- package/dist/server/out/agents/index.txt +9 -9
- package/dist/server/out/apple-touch-icon.png +0 -0
- package/dist/server/out/approvals/__next.!KHdvcmtzcGFjZSk.approvals.__PAGE__.txt +10 -10
- package/dist/server/out/approvals/__next._full.txt +11 -11
- package/dist/server/out/approvals/__next._tree.txt +2 -2
- package/dist/server/out/approvals/index.html +1 -1
- package/dist/server/out/approvals/index.txt +11 -11
- package/dist/server/out/artifacts/__next.!KHdvcmtzcGFjZSk.artifacts.__PAGE__.txt +12 -12
- package/dist/server/out/artifacts/__next._full.txt +13 -13
- package/dist/server/out/artifacts/__next._tree.txt +2 -2
- package/dist/server/out/artifacts/index.html +1 -1
- package/dist/server/out/artifacts/index.txt +13 -13
- package/dist/server/out/audit/__next.!KHdvcmtzcGFjZSk.audit.__PAGE__.txt +10 -10
- package/dist/server/out/audit/__next._full.txt +11 -11
- package/dist/server/out/audit/__next._tree.txt +2 -2
- package/dist/server/out/audit/index.html +1 -1
- package/dist/server/out/audit/index.txt +11 -11
- package/dist/server/out/chat/__next.!KHdvcmtzcGFjZSk.chat.__PAGE__.txt +8 -8
- package/dist/server/out/chat/__next._full.txt +9 -9
- package/dist/server/out/chat/__next._tree.txt +2 -2
- package/dist/server/out/chat/index.html +1 -1
- package/dist/server/out/chat/index.txt +9 -9
- package/dist/server/out/connections/__next.!KHdvcmtzcGFjZSk.connections.__PAGE__.txt +10 -10
- package/dist/server/out/connections/__next._full.txt +11 -11
- package/dist/server/out/connections/__next._tree.txt +2 -2
- package/dist/server/out/connections/index.html +1 -1
- package/dist/server/out/connections/index.txt +11 -11
- package/dist/server/out/credentials/__next.!KHdvcmtzcGFjZSk.credentials.__PAGE__.txt +11 -11
- package/dist/server/out/credentials/__next._full.txt +12 -12
- package/dist/server/out/credentials/__next._tree.txt +2 -2
- package/dist/server/out/credentials/index.html +1 -1
- package/dist/server/out/credentials/index.txt +12 -12
- package/dist/server/out/documents/__next.!KHdvcmtzcGFjZSk.documents.__PAGE__.txt +10 -10
- package/dist/server/out/documents/__next._full.txt +11 -11
- package/dist/server/out/documents/__next._tree.txt +2 -2
- package/dist/server/out/documents/index.html +1 -1
- package/dist/server/out/documents/index.txt +11 -11
- package/dist/server/out/favicon.ico +0 -0
- package/dist/server/out/favicon.png +0 -0
- package/dist/server/out/favicon.svg +4 -7
- package/dist/server/out/index.html +1 -1
- package/dist/server/out/index.txt +11 -11
- package/dist/server/out/people/__next.!KHdvcmtzcGFjZSk.people.__PAGE__.txt +10 -10
- package/dist/server/out/people/__next._full.txt +11 -11
- package/dist/server/out/people/__next._tree.txt +2 -2
- package/dist/server/out/people/index.html +1 -1
- package/dist/server/out/people/index.txt +11 -11
- package/dist/server/out/plugins/__next.!KHdvcmtzcGFjZSk.plugins.__PAGE__.txt +13 -13
- package/dist/server/out/plugins/__next._full.txt +14 -14
- package/dist/server/out/plugins/__next._tree.txt +2 -2
- package/dist/server/out/plugins/index.html +1 -1
- package/dist/server/out/plugins/index.txt +14 -14
- package/dist/server/out/projects/__next.!KHdvcmtzcGFjZSk.projects.__PAGE__.txt +10 -10
- package/dist/server/out/projects/__next._full.txt +11 -11
- package/dist/server/out/projects/__next._tree.txt +2 -2
- package/dist/server/out/projects/index.html +1 -1
- package/dist/server/out/projects/index.txt +11 -11
- package/dist/server/out/runs/__next.!KHdvcmtzcGFjZSk.runs.__PAGE__.txt +12 -12
- package/dist/server/out/runs/__next._full.txt +13 -13
- package/dist/server/out/runs/__next._tree.txt +2 -2
- package/dist/server/out/runs/index.html +1 -1
- package/dist/server/out/runs/index.txt +13 -13
- package/dist/server/out/schedules/__next.!KHdvcmtzcGFjZSk.schedules.__PAGE__.txt +12 -12
- package/dist/server/out/schedules/__next._full.txt +13 -13
- package/dist/server/out/schedules/__next._tree.txt +2 -2
- package/dist/server/out/schedules/index.html +1 -1
- package/dist/server/out/schedules/index.txt +13 -13
- package/dist/server/out/settings/__next.!KHdvcmtzcGFjZSk.settings.__PAGE__.txt +10 -10
- package/dist/server/out/settings/__next._full.txt +11 -11
- package/dist/server/out/settings/__next._tree.txt +2 -2
- package/dist/server/out/settings/index.html +1 -1
- package/dist/server/out/settings/index.txt +11 -11
- package/dist/server/out/setup/__next._full.txt +8 -8
- package/dist/server/out/setup/__next._tree.txt +2 -2
- package/dist/server/out/setup/__next.setup.__PAGE__.txt +7 -7
- package/dist/server/out/setup/index.html +1 -1
- package/dist/server/out/setup/index.txt +8 -8
- package/dist/server/out/tables/__next.!KHdvcmtzcGFjZSk.tables.__PAGE__.txt +10 -10
- package/dist/server/out/tables/__next._full.txt +11 -11
- package/dist/server/out/tables/__next._tree.txt +2 -2
- package/dist/server/out/tables/index.html +1 -1
- package/dist/server/out/tables/index.txt +11 -11
- package/dist/server/out/webhooks/__next.!KHdvcmtzcGFjZSk.webhooks.__PAGE__.txt +10 -10
- package/dist/server/out/webhooks/__next._full.txt +11 -11
- package/dist/server/out/webhooks/__next._tree.txt +2 -2
- package/dist/server/out/webhooks/index.html +1 -1
- package/dist/server/out/webhooks/index.txt +11 -11
- package/dist/server/out/workspaces/invite/__next._full.txt +7 -7
- package/dist/server/out/workspaces/invite/__next._tree.txt +2 -2
- package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +6 -6
- package/dist/server/out/workspaces/invite/index.html +1 -1
- package/dist/server/out/workspaces/invite/index.txt +7 -7
- package/docs/browser-sessions.md +85 -0
- package/docs/npm-distribution.md +16 -17
- package/docs/remote-mcp.md +51 -0
- package/package.json +53 -20
- package/runtime/README.md +9 -7
- package/dist/runtime/generated/schema.d.ts +0 -6443
- package/dist/server/out/THIRD_PARTY_NOTICES.md +0 -13
- package/dist/server/out/_next/static/chunks/016glzdsa3q5_.js +0 -1
- package/dist/server/out/_next/static/chunks/05i1qq0mw887k.js +0 -1
- package/dist/server/out/_next/static/chunks/06tt8wiyre1ez.js +0 -1
- package/dist/server/out/_next/static/chunks/0cm9i2msjsy--.js +0 -1
- package/dist/server/out/_next/static/chunks/0hq5dvj7fy64b.js +0 -1
- package/dist/server/out/_next/static/chunks/0ma4vl-fj0tmu.js +0 -1
- package/dist/server/out/_next/static/chunks/0noal-jqjivtf.js +0 -1
- package/dist/server/out/_next/static/chunks/0spckmsiek0gd.js +0 -1
- package/dist/server/out/_next/static/chunks/103sekujf0rxr.js +0 -1
- package/dist/server/out/_next/static/chunks/10h8kpcnjfe_v.js +0 -1
- package/dist/server/out/_next/static/chunks/16_aurf9162_6.js +0 -1
- package/dist/server/out/_next/static/chunks/1c48yx15nlt6w.js +0 -1
- package/dist/server/out/_next/static/chunks/1jp827_2p_wkf.js +0 -1
- package/dist/server/out/_next/static/chunks/1kdk-viqnjs3j.js +0 -1
- package/dist/server/out/_next/static/chunks/1mlfee105fhl7.js +0 -1
- package/dist/server/out/_next/static/chunks/1q9jpzm9b6zy9.js +0 -1
- package/dist/server/out/_next/static/chunks/1v0-a7pehktp9.js +0 -22
- package/dist/server/out/_next/static/chunks/24qxhh2dqvhaa.js +0 -1
- package/dist/server/out/_next/static/chunks/253gnn8ai3i89.js +0 -1
- package/dist/server/out/_next/static/chunks/27umf0z4povug.js +0 -1
- package/dist/server/out/_next/static/chunks/2a_c2xcjy62fq.css +0 -1
- package/dist/server/out/_next/static/chunks/2mvlvogrl6o0u.js +0 -1
- package/dist/server/out/_next/static/chunks/2xzrcwr9q6195.js +0 -1
- package/dist/server/out/_next/static/chunks/2yi6lq56xoijl.js +0 -31
- package/dist/server/out/_next/static/chunks/30g0jo299pr8e.js +0 -1
- package/dist/server/out/_next/static/chunks/36tf56rgybjz0.js +0 -3
- package/dist/server/out/_next/static/chunks/39dofrhzg_uju.js +0 -1
- package/dist/server/out/_next/static/chunks/3a8aanmz3kfof.js +0 -1
- package/dist/server/out/_next/static/chunks/3bd3k15tx3lj1.js +0 -1
- package/dist/server/out/_next/static/chunks/3d34pxerfr389.js +0 -1
- package/dist/server/out/_next/static/chunks/3elab9vgx7_ok.js +0 -1
- package/dist/server/out/_next/static/chunks/3gvae9c-5pi5z.js +0 -1
- package/dist/server/out/_next/static/chunks/3hzia782sc9pf.js +0 -1
- package/dist/server/out/_next/static/chunks/3jl4k-15i8847.js +0 -1
- package/dist/server/out/_next/static/chunks/3lb23el6qno6s.js +0 -1
- package/dist/server/out/_next/static/chunks/3prum3lr5470i.js +0 -3
- package/dist/server/out/_next/static/chunks/3prwkrciuqwjg.js +0 -1
- package/dist/server/out/_next/static/chunks/3txmqtuo5xgfd.js +0 -3
- package/dist/server/out/third-party-licenses/monaco-editor.txt +0 -21
- package/dist/server/out/third-party-licenses/zod.txt +0 -21
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → pj0R4_8zvgkN95QPXRHgC}/_buildManifest.js +0 -0
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → pj0R4_8zvgkN95QPXRHgC}/_clientMiddlewareManifest.js +0 -0
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → pj0R4_8zvgkN95QPXRHgC}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -19,17 +19,25 @@ Use `orgsdk server` to run only the platform, or `orgsdk executor --help` to reg
|
|
|
19
19
|
|
|
20
20
|
See [distribution and verification](docs/npm-distribution.md) for pinned installation, upgrades, recovery and release checks.
|
|
21
21
|
|
|
22
|
+
## Browser discovery sessions
|
|
23
|
+
|
|
24
|
+
Use an external MCP client to iterate on a live browser with persistent TypeScript variables, then validate, test and replay the steps as a versioned action. See the [local browser session guide](docs/browser-sessions.md) for setup, example cells and a reproducible end-to-end check.
|
|
25
|
+
|
|
22
26
|
## Build and run locally
|
|
23
27
|
|
|
24
|
-
Install Bun 1.4, Node.js 22.22.0 or newer and npm, then run `
|
|
28
|
+
Install Bun 1.4, Node.js 22.22.0 or newer and npm, then run `npm run setup` and `npm run build`. Start `dist/orgsdk` and open `http://127.0.0.1:8080`. The executable embeds the frontend, including Monaco, and does not require Bun or Node at runtime. `HOST`, `PORT`, and `ORGSDK_DATA_DIR` configure listening and storage. The default data directory is `~/.local/share/orgsdk`.
|
|
25
29
|
|
|
26
|
-
To build the npm package, run `npm run build:npm`, then `npm pack --ignore-scripts`. The tarball includes the platform JavaScript, frontend, migrations and executor workers. `npm pack` without `--ignore-scripts` builds those assets automatically. Use `npm run test:distribution -- ./orgsdk-cli-0.
|
|
30
|
+
To build the npm package, run `npm run build:npm`, then `npm pack --ignore-scripts`. The tarball includes the platform JavaScript, frontend, migrations and executor workers. `npm pack` without `--ignore-scripts` builds those assets automatically. Use `npm run test:distribution -- ./orgsdk-cli-0.2.0.tgz` to install and verify the actual tarball with temporary data and a Node-only runtime path. Replace the tarball argument with `@orgsdk/cli@VERSION` to verify the registry release.
|
|
31
|
+
|
|
32
|
+
Both release builds generate `dist/THIRD_PARTY_NOTICES.txt` from the installed dependencies. It is included in the npm tarball; distribute it alongside `dist/orgsdk` when sharing the standalone executable. The notice text is generated during packaging and is not stored in the source tree or served as frontend assets.
|
|
27
33
|
|
|
28
34
|
The Drizzle schema is the source of truth. Startup applies pending generated migrations to `orgsdk.sqlite3`, and the executable embeds the migration files. Start the initial installation in an empty data directory. This is a greenfield schema without compatibility with the earlier experimental database.
|
|
29
35
|
|
|
30
|
-
For development, run `
|
|
36
|
+
For development, run `npm run setup` once, then `npm run dev`. This starts the API with reload, Next.js with HMR, and the separate host executor. Open `http://localhost:3000`; development data stays in `.runtime/dev` within this checkout. Ctrl+C stops the managed processes and their workers. See [local development](docs/development.md) for ports, configuration, test groups and cleanup commands.
|
|
37
|
+
|
|
38
|
+
Run `npm run check` for all source gates, unit and integration tests, and the frontend build. `npm run test:unit` and `npm run test:integration` select disjoint suites; integration files use `.int.test.ts` (or `.int.test.mjs` for existing JavaScript tests). Install Playwright's browser with `bunx playwright install chromium`; browser tests also need OpenSSL for their temporary TLS mailbox.
|
|
31
39
|
|
|
32
|
-
After `npm run build:npm`, run the same browser suite against either runtime with `ORGSDK_E2E_RUNTIME=node ORGSDK_E2E_ENTRY=dist/server/index.js
|
|
40
|
+
After `npm run build:npm`, run the same browser suite against either runtime with `ORGSDK_E2E_RUNTIME=node ORGSDK_E2E_ENTRY=dist/server/index.js npm run e2e` or replace `node` with `bun`. The selected runtime runs both the application and its separate execution worker. To test the standalone product, run `ORGSDK_E2E_BINARY=dist/orgsdk npm run e2e` after `npm run build`. All browser modes create disposable installation data and a local mailbox, reject requests to retired `/api` routes, and preserve existing installations.
|
|
33
41
|
|
|
34
42
|
CI tests Node.js 22.22.0, the latest Node.js 24 patch and Bun 1.4.0 in separate jobs using shared platform, packaged-installation, browser and executor assertions. The full unit suites remain on Bun; the compiled Bun executable has its own regression job. The required `check` job succeeds only when every quality and runtime job succeeds. See [the verification commands and coverage](docs/npm-distribution.md#verification).
|
|
35
43
|
|
|
@@ -49,20 +57,26 @@ repeat starts, encrypted data, database constraints and failed-upgrade rollback.
|
|
|
49
57
|
|
|
50
58
|
## Containers and executor
|
|
51
59
|
|
|
52
|
-
`
|
|
60
|
+
`npm run container:start` builds and starts the app using Compose. By default it binds to localhost port 8080 and uses a distinct `orgsdk-bun` project and data volume. Review `compose.yaml` before changing its bindings or project name. The optional `runner` profile builds the separate executor and job images. Configure the same private `LOCAL_EXECUTOR_BOOTSTRAP_TOKEN` for the app and executor before starting that profile. The executor has Docker socket access so it can run isolated jobs; protect the host accordingly.
|
|
53
61
|
|
|
54
62
|
## Backup and recovery
|
|
55
63
|
|
|
56
|
-
`
|
|
64
|
+
`npm run container:backup -- /secure/path/backup.sqlite3` creates a verified SQLite snapshot. Back up the matching encryption key from the application data directory and the executor project data separately, with appropriate access controls. A database snapshot alone cannot recover encrypted credentials or project files. Backups preserve the source migration level without upgrading it; restored databases apply pending migrations on their next startup.
|
|
57
65
|
|
|
58
|
-
`
|
|
66
|
+
`npm run container:restore -- /secure/path/backup.sqlite3` restores only into a Bun data volume without a database. Put the matching `encryption.key` in that volume before running the restore. Test recovery in a separate Compose project and preserve the source backup. Restore into a separate empty data directory.
|
|
59
67
|
|
|
60
68
|
The source is distributed under [LICENSE](LICENSE). See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidance.
|
|
61
69
|
|
|
62
70
|
For OAuth, set `ORGSDK_PUBLIC_ORIGIN` to the installation's exact public origin and use the same hostname for workspace setup. HTTPS is required except for loopback HTTP. Invitations require SMTP: configure `SMTP_HOST`, `SMTP_PORT` (default 587), `SMTP_FROM`, and optional paired `SMTP_USER` and `SMTP_PASSWORD`. STARTTLS is required by default; set `SMTP_SECURE=true` for implicit TLS. Keep credentials private. See `.env.example` for names; provide environment variables to your process or Compose deployment through your normal secrets mechanism.
|
|
63
71
|
|
|
72
|
+
External plugins can declare `xero-oauth` for a bring-your-own Xero confidential web application. Register the exact `${ORGSDK_PUBLIC_ORIGIN}/oauth/callback` redirect URI in Xero and connect through the plugin's browser setup with your client ID and client secret. The pinned plugin release supplies the requested scopes; include `offline_access` for refresh. OrgSDK stores and rotates refresh tokens in the control plane and injects only the access token into execution. This uses Xero's [standard authorization-code flow](https://developer.xero.com/documentation/guides/oauth2/auth-flow/), not its separate PKCE or Custom Connections app types. The external plugin must restrict API calls to its configured, authorized Xero tenant.
|
|
73
|
+
|
|
74
|
+
For local Xero setup, use `http://localhost` consistently for the workspace, public origin and registered callback; Xero does not accept `http://127.0.0.1` redirect URIs. Other deployments should use the exact registered HTTPS origin.
|
|
75
|
+
|
|
64
76
|
If local account recovery is needed, an administrator with access to the server can run `orgsdk reset-password EMAIL` and enter the new password at the private interactive prompt.
|
|
65
77
|
|
|
66
78
|
For an HTTPS reverse proxy, set `ORGSDK_PUBLIC_ORIGIN` to the public HTTPS origin, preserve the public Host header, and keep the backend reachable through that trusted proxy. The application uses the explicit origin for CSRF and Secure cookies; it ignores forwarded scheme and host headers. Health checks and authenticated internal executor routes keep their direct service address.
|
|
67
79
|
|
|
68
80
|
The prior Django implementation and its management commands are retained in Git history. The Django admin interface is retired; use the application settings and account pages. The frontend uses native tRPC throughout, with input and output types inferred directly from the Bun server router. Application REST compatibility routes and OpenAPI snapshots have been removed.
|
|
81
|
+
|
|
82
|
+
Remote HTTP MCP servers can also be connected as project plugins. See [Remote MCP connections](docs/remote-mcp.md) for tool review, authentication, execution and compatibility boundaries.
|
package/bin/orgsdk.mjs
CHANGED
|
@@ -71,7 +71,7 @@ async function main() {
|
|
|
71
71
|
env.LOCAL_EXECUTOR_BOOTSTRAP_TOKEN = await bootstrapToken(options.data);
|
|
72
72
|
env.EXECUTOR_DATA_DIR ||= join(options.data, "executor");
|
|
73
73
|
const address = localAddress(options.host, options.port);
|
|
74
|
-
env.
|
|
74
|
+
env.ORGSDK_SERVER_URL = address;
|
|
75
75
|
if (options.mode === "host") {
|
|
76
76
|
console.log(
|
|
77
77
|
"Local executor: project code runs with your current user's host privileges. Use trusted code and clients only.",
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
OrgSDK third-party notices
|
|
2
|
+
Generated from installed, lockfile-resolved dependencies during the release build.
|
|
3
|
+
These notices cover the listed redistributed components. Other dependencies
|
|
4
|
+
retain their own notices; OrgSDK's license is supplied separately.
|
|
5
|
+
|
|
6
|
+
==============================================================================
|
|
7
|
+
@modelcontextprotocol/client@2.4.0
|
|
8
|
+
@modelcontextprotocol/core@2.4.0
|
|
9
|
+
|
|
10
|
+
The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0.
|
|
11
|
+
|
|
12
|
+
Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License.
|
|
13
|
+
|
|
14
|
+
No rights beyond those granted by the applicable original license are conveyed for such contributions.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Apache License
|
|
19
|
+
Version 2.0, January 2004
|
|
20
|
+
http://www.apache.org/licenses/
|
|
21
|
+
|
|
22
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
23
|
+
|
|
24
|
+
1. Definitions.
|
|
25
|
+
|
|
26
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
27
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
28
|
+
|
|
29
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
30
|
+
the copyright owner that is granting the License.
|
|
31
|
+
|
|
32
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
33
|
+
other entities that control, are controlled by, or are under common
|
|
34
|
+
control with that entity. For the purposes of this definition,
|
|
35
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
36
|
+
direction or management of such entity, whether by contract or
|
|
37
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
38
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
39
|
+
|
|
40
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
41
|
+
exercising permissions granted by this License.
|
|
42
|
+
|
|
43
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
44
|
+
including but not limited to software source code, documentation
|
|
45
|
+
source, and configuration files.
|
|
46
|
+
|
|
47
|
+
"Object" form shall mean any form resulting from mechanical
|
|
48
|
+
transformation or translation of a Source form, including but
|
|
49
|
+
not limited to compiled object code, generated documentation,
|
|
50
|
+
and conversions to other media types.
|
|
51
|
+
|
|
52
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
53
|
+
Object form, made available under the License, as indicated by a
|
|
54
|
+
copyright notice that is included in or attached to the work
|
|
55
|
+
(an example is provided in the Appendix below).
|
|
56
|
+
|
|
57
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
58
|
+
form, that is based on (or derived from) the Work and for which the
|
|
59
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
60
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
61
|
+
of this License, Derivative Works shall not include works that remain
|
|
62
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
63
|
+
the Work and Derivative Works thereof.
|
|
64
|
+
|
|
65
|
+
"Contribution" shall mean any work of authorship, including
|
|
66
|
+
the original version of the Work and any modifications or additions
|
|
67
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
68
|
+
submitted to the Licensor for inclusion in the Work by the copyright
|
|
69
|
+
owner or by an individual or Legal Entity authorized to submit on behalf
|
|
70
|
+
of the copyright owner. For the purposes of this definition, "submitted"
|
|
71
|
+
means any form of electronic, verbal, or written communication sent
|
|
72
|
+
to the Licensor or its representatives, including but not limited to
|
|
73
|
+
communication on electronic mailing lists, source code control systems,
|
|
74
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
75
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
76
|
+
excluding communication that is conspicuously marked or otherwise
|
|
77
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
78
|
+
|
|
79
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
80
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
81
|
+
subsequently incorporated within the Work.
|
|
82
|
+
|
|
83
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
84
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
85
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
86
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
87
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
88
|
+
Work and such Derivative Works in Source or Object form.
|
|
89
|
+
|
|
90
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
91
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
92
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
93
|
+
(except as stated in this section) patent license to make, have made,
|
|
94
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
95
|
+
where such license applies only to those patent claims licensable
|
|
96
|
+
by such Contributor that are necessarily infringed by their
|
|
97
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
98
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
99
|
+
institute patent litigation against any entity (including a
|
|
100
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
101
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
102
|
+
or contributory patent infringement, then any patent licenses
|
|
103
|
+
granted to You under this License for that Work shall terminate
|
|
104
|
+
as of the date such litigation is filed.
|
|
105
|
+
|
|
106
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
107
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
108
|
+
modifications, and in Source or Object form, provided that You
|
|
109
|
+
meet the following conditions:
|
|
110
|
+
|
|
111
|
+
(a) You must give any other recipients of the Work or
|
|
112
|
+
Derivative Works a copy of this License; and
|
|
113
|
+
|
|
114
|
+
(b) You must cause any modified files to carry prominent notices
|
|
115
|
+
stating that You changed the files; and
|
|
116
|
+
|
|
117
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
118
|
+
that You distribute, all copyright, patent, trademark, and
|
|
119
|
+
attribution notices from the Source form of the Work,
|
|
120
|
+
excluding those notices that do not pertain to any part of
|
|
121
|
+
the Derivative Works; and
|
|
122
|
+
|
|
123
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
124
|
+
distribution, then any Derivative Works that You distribute must
|
|
125
|
+
include a readable copy of the attribution notices contained
|
|
126
|
+
within such NOTICE file, excluding those notices that do not
|
|
127
|
+
pertain to any part of the Derivative Works, in at least one
|
|
128
|
+
of the following places: within a NOTICE text file distributed
|
|
129
|
+
as part of the Derivative Works; within the Source form or
|
|
130
|
+
documentation, if provided along with the Derivative Works; or,
|
|
131
|
+
within a display generated by the Derivative Works, if and
|
|
132
|
+
wherever such third-party notices normally appear. The contents
|
|
133
|
+
of the NOTICE file are for informational purposes only and
|
|
134
|
+
do not modify the License. You may add Your own attribution
|
|
135
|
+
notices within Derivative Works that You distribute, alongside
|
|
136
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
137
|
+
that such additional attribution notices cannot be construed
|
|
138
|
+
as modifying the License.
|
|
139
|
+
|
|
140
|
+
You may add Your own copyright statement to Your modifications and
|
|
141
|
+
may provide additional or different license terms and conditions
|
|
142
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
143
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
144
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
145
|
+
the conditions stated in this License.
|
|
146
|
+
|
|
147
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
148
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
149
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
150
|
+
this License, without any additional terms or conditions.
|
|
151
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
152
|
+
the terms of any separate license agreement you may have executed
|
|
153
|
+
with Licensor regarding such Contributions.
|
|
154
|
+
|
|
155
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
156
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
157
|
+
except as required for reasonable and customary use in describing the
|
|
158
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
159
|
+
|
|
160
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
161
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
162
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
163
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
164
|
+
implied, including, without limitation, any warranties or conditions
|
|
165
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
166
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
167
|
+
appropriateness of using or redistributing the Work and assume any
|
|
168
|
+
risks associated with Your exercise of permissions under this License.
|
|
169
|
+
|
|
170
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
171
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
172
|
+
unless required by applicable law (such as deliberate and grossly
|
|
173
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
174
|
+
liable to You for damages, including any direct, indirect, special,
|
|
175
|
+
incidental, or consequential damages of any character arising as a
|
|
176
|
+
result of this License or out of the use or inability to use the
|
|
177
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
178
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
179
|
+
other commercial damages or losses), even if such Contributor
|
|
180
|
+
has been advised of the possibility of such damages.
|
|
181
|
+
|
|
182
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
183
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
184
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
185
|
+
or other liability obligations and/or rights consistent with this
|
|
186
|
+
License. However, in accepting such obligations, You may act only
|
|
187
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
188
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
189
|
+
defend, and hold each Contributor harmless for any liability
|
|
190
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
191
|
+
of your accepting any such warranty or additional liability.
|
|
192
|
+
|
|
193
|
+
END OF TERMS AND CONDITIONS
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
MIT License
|
|
198
|
+
|
|
199
|
+
Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC.
|
|
200
|
+
|
|
201
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
202
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
203
|
+
in the Software without restriction, including without limitation the rights
|
|
204
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
205
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
206
|
+
furnished to do so, subject to the following conditions:
|
|
207
|
+
|
|
208
|
+
The above copyright notice and this permission notice shall be included in all
|
|
209
|
+
copies or substantial portions of the Software.
|
|
210
|
+
|
|
211
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
212
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
213
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
214
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
215
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
216
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
217
|
+
SOFTWARE.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
Creative Commons Attribution 4.0 International (CC-BY-4.0)
|
|
222
|
+
|
|
223
|
+
Documentation in this project (excluding specifications) is licensed under
|
|
224
|
+
CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
|
|
225
|
+
the full license text.
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
==============================================================================
|
|
229
|
+
monaco-editor@0.52.2
|
|
230
|
+
|
|
231
|
+
The MIT License (MIT)
|
|
232
|
+
|
|
233
|
+
Copyright (c) 2016 - present Microsoft Corporation
|
|
234
|
+
|
|
235
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
236
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
237
|
+
in the Software without restriction, including without limitation the rights
|
|
238
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
239
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
240
|
+
furnished to do so, subject to the following conditions:
|
|
241
|
+
|
|
242
|
+
The above copyright notice and this permission notice shall be included in all
|
|
243
|
+
copies or substantial portions of the Software.
|
|
244
|
+
|
|
245
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
246
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
247
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
248
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
249
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
250
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
251
|
+
SOFTWARE.
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
==============================================================================
|
|
255
|
+
zod@4.6.7
|
|
256
|
+
|
|
257
|
+
MIT License
|
|
258
|
+
|
|
259
|
+
Copyright (c) 2025 Colin McDonnell
|
|
260
|
+
|
|
261
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
262
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
263
|
+
in the Software without restriction, including without limitation the rights
|
|
264
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
265
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
266
|
+
furnished to do so, subject to the following conditions:
|
|
267
|
+
|
|
268
|
+
The above copyright notice and this permission notice shall be included in all
|
|
269
|
+
copies or substantial portions of the Software.
|
|
270
|
+
|
|
271
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
272
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
273
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
274
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
275
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
276
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
277
|
+
SOFTWARE.
|
|
278
|
+
|
package/dist/runtime/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Persistent project executor
|
|
2
2
|
|
|
3
|
-
The `@orgsdk/executor` npm package provides `orgsdk-executor`. Install it with `npm install -g @orgsdk/executor
|
|
3
|
+
The `@orgsdk/executor` npm package provides `orgsdk-executor`. Install it with `npm install -g @orgsdk/executor` for an independently managed runner. The `@orgsdk/cli` platform package already includes its local executor. Linux with Node 22.22.0+ and npm is required. Bun 1.4 remains an optional source-development runtime; installed JavaScript workers do not require Bun on PATH. Docker execution additionally requires Docker with `--mount volume-subpath` support, a built executor image, and network access to the OrgSDK application.
|
|
4
4
|
|
|
5
5
|
Create an executor identity for the chosen project in the application. Register using its token on stdin (or `EXECUTOR_TOKEN`), without placing the token in command history:
|
|
6
6
|
|
|
@@ -9,13 +9,13 @@ orgsdk-executor register --url http://localhost:8080 --data /path/to/private-run
|
|
|
9
9
|
orgsdk-executor start --data /path/to/private-runner
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Registration saves the token in `registration.json` with mode 0600. Without `--data` or `EXECUTOR_DATA_DIR`, data lives at `$XDG_DATA_HOME/orgsdk/executor` (default `~/.local/share/orgsdk/executor`), independently of the package installation directory. Docker is the default mode. Configure `EXECUTOR_IMAGE`, `EXECUTION_NETWORK`, and `EXECUTOR_DATA_VOLUME`; set `--data` to the mounted volume root so it contains `agents/<agent-id>`. Docker jobs mount only their own agent subdirectory at `/agent`, use `/agent/workspace` as their working directory, and receive only their run capability through stdin. Other agents and registration files are not mounted. The managed installation runs `orgsdk-executor manage` (or `node dist/supervisor.js`) with `
|
|
12
|
+
Registration saves the token in `registration.json` with mode 0600. Without `--data` or `EXECUTOR_DATA_DIR`, data lives at `$XDG_DATA_HOME/orgsdk/executor` (default `~/.local/share/orgsdk/executor`), independently of the package installation directory. Docker is the default mode. Configure `EXECUTOR_IMAGE`, `EXECUTION_NETWORK`, and `EXECUTOR_DATA_VOLUME`; set `--data` to the mounted volume root so it contains `agents/<agent-id>`. Docker jobs mount only their own agent subdirectory at `/agent`, use `/agent/workspace` as their working directory, and receive only their run capability through stdin. Other agents and registration files are not mounted. The managed installation runs `orgsdk-executor manage` (or `node dist/supervisor.js`) with `ORGSDK_SERVER_URL` and `LOCAL_EXECUTOR_BOOTSTRAP_TOKEN`. Each identity has one serial worker; revoked identities stop and remain stopped while the same revoked registration is advertised. Bootstrap omissions stop active workers; a later explicit re-enable or replacement identity starts a new worker. Transient startup failures retry with a bounded delay.
|
|
13
13
|
|
|
14
14
|
Use `start --mode host` explicitly to run child jobs using the current OS account, its PATH and HOME. Host mode can use installed command-line tools and their account configuration; it is appropriate only for trusted plugins. It filters bootstrap, token, password, API key and credential environment variables from child jobs. Plugin code still receives only snapshot-authorized product credentials through the run capability. Host processes retain OS account filesystem access. Host validation/test workers receive only the allowlisted source, SDK metadata, test fixtures and output schema, run in a disposable directory, and have no product capability or project mount. Their OS account can still access host files; Docker provides the OS isolation boundary. Docker is the default isolation boundary.
|
|
15
15
|
|
|
16
16
|
Project workspace files and installed plugin releases survive runs. No run cleanup deletes the agent folder. Plugins install under `agents/<id>/plugins/<slug>/<sha256>/plugin.mjs`; historical pinned versions remain available to retries. Current enabled configuration is fetched before each claim. External clients own reasoning and coordination. The runtime executes action, code, validation and test jobs only; built-in chat and reasoning delegation are retired. Existing `agents/<id>` storage paths and `--agent` install arguments identify retained project IDs.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
[Execution sessions](src/sessions/README.md) keep successive cells in one live worker, with stable session IDs, cursor-based events and retained history after close or expiry. The executor advertises session support during registration and handles authenticated session commands in its project job loop.
|
|
19
19
|
|
|
20
20
|
## External plugins
|
|
21
21
|
|
|
@@ -49,8 +49,8 @@ Docker mode also needs Docker
|
|
|
49
49
|
Engine. Extract the installer from the tarball and run it as root:
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
tar -xzf orgsdk-executor-0.
|
|
53
|
-
sudo bash package/scripts/install-service.sh "$PWD/orgsdk-executor-0.
|
|
52
|
+
tar -xzf orgsdk-executor-0.2.0.tgz package/scripts/install-service.sh
|
|
53
|
+
sudo bash package/scripts/install-service.sh "$PWD/orgsdk-executor-0.2.0.tgz" researcher docker
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
The installer creates `/opt/orgsdk-executor`, the `orgsdk-researcher` system
|
|
@@ -95,7 +95,7 @@ Browser's engine is a runner prerequisite. The optional `Dockerfile.chromium` in
|
|
|
95
95
|
|
|
96
96
|
```sh
|
|
97
97
|
docker build -t orgsdk-job:chromium -f runtime/Dockerfile.chromium runtime
|
|
98
|
-
|
|
98
|
+
EXECUTOR_IMAGE=orgsdk-job:chromium orgsdk-executor start --mode docker
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
Independently managed executors can select that image using `EXECUTOR_IMAGE`. Standard executors remain unchanged. Host-mode runners need matching Chromium at `PLAYWRIGHT_BROWSERS_PATH`.
|
|
@@ -109,4 +109,6 @@ bun --no-env-file runtime/scripts/verify-plugin-releases.ts \
|
|
|
109
109
|
|
|
110
110
|
Use `--catalog /path/releases.json --bundle-root /path/bundles` before publication. Add `--render-pdf` when the matching engine is provisioned to exercise real PDF output. Every package is checksum-verified, installed in temporary `orgsdk-platform-test` project storage, and loaded to compare its exported tools to the catalog. Data Tools is exercised through the VM action interface. This does not prove provider OAuth setup or live external writes.
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
`ORGSDK_SERVER_URL` is the executor's application base URL. Point it at the application server, for example `http://127.0.0.1:8080`. The server binary does not include or start the executor. Separately managed executors must configure `ORGSDK_SERVER_URL` when upgrading; the platform CLI and managed development command supply it automatically.
|
|
113
|
+
|
|
114
|
+
Protocol 4 adds project-owned remote MCP discovery and execution over Streamable HTTP or legacy HTTP/SSE. Connections and reviewed tool schemas are supplied in immutable jobs; authentication headers are retrieved using run-scoped credentials. Each run owns and closes its connections. No stdio servers are launched. See the platform [remote MCP guide](../docs/remote-mcp.md).
|
package/dist/runtime/cli.js
CHANGED
|
@@ -9,8 +9,14 @@ import { Client } from "./client.js";
|
|
|
9
9
|
import { manage, registrationSchema, runAgent } from "./supervisor.js";
|
|
10
10
|
import { installPlugin } from "./plugin-store.js";
|
|
11
11
|
import { pluginSchema } from "./contract.js";
|
|
12
|
+
import { registerExecutor } from "./register-executor.js";
|
|
12
13
|
import { packagePlugin } from "./package-plugin.js";
|
|
13
14
|
var { command, option } = executorArguments(process.argv.slice(2));
|
|
15
|
+
var registerResponseSchema = z.object({
|
|
16
|
+
id: z.string(),
|
|
17
|
+
agent_id: z.string()
|
|
18
|
+
});
|
|
19
|
+
var modeSchema = z.enum(["docker", "host"]);
|
|
14
20
|
var data = resolve(
|
|
15
21
|
option("data") || process.env.EXECUTOR_DATA_DIR || join(
|
|
16
22
|
process.env.XDG_DATA_HOME || join(homedir(), ".local", "share"),
|
|
@@ -25,19 +31,12 @@ if (command === "--help" || !command) {
|
|
|
25
31
|
"orgsdk-executor register --url URL [--data DIR] (token: EXECUTOR_TOKEN or stdin)\norgsdk-executor start [--mode docker|host] [--data DIR]\norgsdk-executor install --agent ID --manifest FILE [--file bundled.mjs] [--data DIR]\norgsdk-executor package-plugin --directory CHECKOUT --output DIR [--embed-dependencies package,...] [--license FILE]\norgsdk-executor manage [--mode docker|host] (bootstrap manager)"
|
|
26
32
|
);
|
|
27
33
|
} else if (command === "--version") {
|
|
28
|
-
console.log("0.1.
|
|
34
|
+
console.log("0.1.1");
|
|
29
35
|
} else if (command === "register") {
|
|
30
|
-
const base = z.string().url().parse(option("url") || process.env.
|
|
36
|
+
const base = z.string().url().parse(option("url") || process.env.ORGSDK_SERVER_URL);
|
|
31
37
|
const token = z.string().min(32).parse(process.env.EXECUTOR_TOKEN || (await readStdin()).trim());
|
|
32
|
-
const registration =
|
|
33
|
-
await new Client(base, token)
|
|
34
|
-
"/internal/execution/v1/register/",
|
|
35
|
-
"POST",
|
|
36
|
-
{
|
|
37
|
-
protocol_version: 3,
|
|
38
|
-
capabilities: ["action", "code", "validate", "test"]
|
|
39
|
-
}
|
|
40
|
-
)
|
|
38
|
+
const registration = registerResponseSchema.parse(
|
|
39
|
+
await registerExecutor(new Client(base, token))
|
|
41
40
|
);
|
|
42
41
|
await mkdir(data, { recursive: true, mode: 448 });
|
|
43
42
|
await writeFile(
|
|
@@ -57,10 +56,10 @@ if (command === "--help" || !command) {
|
|
|
57
56
|
await runAgent(
|
|
58
57
|
config.base,
|
|
59
58
|
config,
|
|
60
|
-
|
|
59
|
+
modeSchema.parse(option("mode") || "docker")
|
|
61
60
|
);
|
|
62
61
|
} else if (command === "manage")
|
|
63
|
-
await manage(
|
|
62
|
+
await manage(modeSchema.parse(option("mode") || "docker"));
|
|
64
63
|
else if (command === "package-plugin")
|
|
65
64
|
await packagePlugin(
|
|
66
65
|
z.string().parse(option("directory")),
|
package/dist/runtime/client.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// src/client.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { withRetry } from "./engine/retry.js";
|
|
4
|
+
function identifier(value) {
|
|
5
|
+
return z.string().regex(/^[a-zA-Z0-9_-]+$/).parse(value);
|
|
6
|
+
}
|
|
4
7
|
var Client = class {
|
|
5
8
|
constructor(base, token, signal) {
|
|
6
9
|
this.base = base;
|
|
@@ -10,9 +13,74 @@ var Client = class {
|
|
|
10
13
|
base;
|
|
11
14
|
token;
|
|
12
15
|
signal;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
register(input) {
|
|
17
|
+
return this.#request("/internal/execution/v1/register/", "POST", input);
|
|
18
|
+
}
|
|
19
|
+
configuration() {
|
|
20
|
+
return this.#request("/internal/execution/v1/configuration/", "GET");
|
|
21
|
+
}
|
|
22
|
+
claim() {
|
|
23
|
+
return this.#request("/internal/execution/v1/claim/", "POST");
|
|
24
|
+
}
|
|
25
|
+
bootstrap() {
|
|
26
|
+
return this.#request("/internal/execution/v1/bootstrap/", "POST");
|
|
27
|
+
}
|
|
28
|
+
heartbeat(runId) {
|
|
29
|
+
return this.#request(
|
|
30
|
+
`/internal/execution/v1/runs/${identifier(runId)}/heartbeat/`,
|
|
31
|
+
"POST",
|
|
32
|
+
{}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
publishEvent(runId, event) {
|
|
36
|
+
return this.#request(
|
|
37
|
+
`/internal/execution/v1/runs/${identifier(runId)}/events/`,
|
|
38
|
+
"POST",
|
|
39
|
+
event
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
complete(runId, result) {
|
|
43
|
+
return this.#request(
|
|
44
|
+
`/internal/execution/v1/runs/${identifier(runId)}/complete/`,
|
|
45
|
+
"POST",
|
|
46
|
+
result
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
createApproval(input) {
|
|
50
|
+
return this.#request(
|
|
51
|
+
"/internal/execution/v1/product/approvals/",
|
|
52
|
+
"POST",
|
|
53
|
+
input
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
approval(id) {
|
|
57
|
+
return this.#request(
|
|
58
|
+
`/internal/execution/v1/product/approvals/${identifier(id)}/`,
|
|
59
|
+
"GET"
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
saveArtifact(input) {
|
|
63
|
+
return this.#request(
|
|
64
|
+
"/internal/execution/v1/product/artifacts/",
|
|
65
|
+
"POST",
|
|
66
|
+
input
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
projectData(operation, params) {
|
|
70
|
+
return this.#request(
|
|
71
|
+
"/internal/execution/v1/product/project-data/",
|
|
72
|
+
"POST",
|
|
73
|
+
{ ...params, operation }
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
async secret(id) {
|
|
77
|
+
const result = await this.#request(
|
|
78
|
+
`/internal/execution/v1/credentials/${identifier(id)}/`,
|
|
79
|
+
"GET"
|
|
80
|
+
);
|
|
81
|
+
return z.object({ secret: z.record(z.string(), z.unknown()) }).parse(result).secret;
|
|
82
|
+
}
|
|
83
|
+
async #request(path, method, body) {
|
|
16
84
|
const response = await withRetry(
|
|
17
85
|
async () => {
|
|
18
86
|
const result = await fetch(`${this.base.replace(/\/$/, "")}${path}`, {
|
|
@@ -25,29 +93,23 @@ var Client = class {
|
|
|
25
93
|
signal: this.signal ? AbortSignal.any([this.signal, AbortSignal.timeout(15e3)]) : AbortSignal.timeout(15e3),
|
|
26
94
|
redirect: "error"
|
|
27
95
|
});
|
|
28
|
-
if (result.status >= 500)
|
|
96
|
+
if (result.status >= 500) {
|
|
97
|
+
throw new Error(`API ${result.status}`);
|
|
98
|
+
}
|
|
29
99
|
return result;
|
|
30
100
|
},
|
|
31
101
|
{ maxRetries: method === "GET" ? 2 : 0 }
|
|
32
102
|
);
|
|
33
|
-
if (!response.ok)
|
|
103
|
+
if (!response.ok) {
|
|
34
104
|
throw new Error(
|
|
35
105
|
`API ${response.status}: ${(await response.text()).slice(0, 500)}`
|
|
36
106
|
);
|
|
37
|
-
|
|
107
|
+
}
|
|
108
|
+
if (response.status === 204) {
|
|
109
|
+
return void 0;
|
|
110
|
+
}
|
|
38
111
|
return response.json();
|
|
39
112
|
}
|
|
40
|
-
product(path, method = "GET", body) {
|
|
41
|
-
if (!/^[a-z][a-z0-9/-]*\/$/.test(path))
|
|
42
|
-
throw new Error("Invalid product capability path");
|
|
43
|
-
return this.request(`/internal/execution/v1/product/${path}`, method, body);
|
|
44
|
-
}
|
|
45
|
-
async secret(id) {
|
|
46
|
-
const result = await this.request(
|
|
47
|
-
`/internal/execution/v1/credentials/${id}/`
|
|
48
|
-
);
|
|
49
|
-
return z.object({ secret: z.record(z.string(), z.unknown()) }).parse(result).secret;
|
|
50
|
-
}
|
|
51
113
|
};
|
|
52
114
|
export {
|
|
53
115
|
Client
|