@melaya/runner 1.1.53 → 1.1.54
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/dist/connection.js +13 -0
- package/package.json +1 -1
package/dist/connection.js
CHANGED
|
@@ -815,6 +815,13 @@ export async function connect(opts) {
|
|
|
815
815
|
})(),
|
|
816
816
|
// Inject per-pipeline credentials (already scoped by the server)
|
|
817
817
|
...payload.credentials,
|
|
818
|
+
// laya-local (decide_* tools): the runner can't reach the box's private
|
|
819
|
+
// 127.0.0.1:8770, so point LAYA_LOCAL_URL at the server's PER-USER-gated
|
|
820
|
+
// proxy. AFTER the credential spread so it can't be overridden. The proxy
|
|
821
|
+
// authenticates with this run's signed MEL_RUN_TOKEN (already in
|
|
822
|
+
// payload.credentials) - never a shared secret - and meters per user.
|
|
823
|
+
LAYA_LOCAL_URL: opts.serverUrl.replace(/^wss:/, "https:").replace(/^ws:/, "http:").replace(/\/$/, "") +
|
|
824
|
+
"/api/v1/internal/laya",
|
|
818
825
|
// If a Luma browser bridge is up (i.e. the user has signed in
|
|
819
826
|
// via this runner), inject its localhost URL + bearer token so
|
|
820
827
|
// shared/tools/luma.py routes /event/register through Playwright
|
|
@@ -1680,6 +1687,12 @@ export async function connect(opts) {
|
|
|
1680
1687
|
: {}),
|
|
1681
1688
|
// Per-user creds (incl. MELAYA_API_KEY + the selected connectors' env).
|
|
1682
1689
|
...(payload.credentials || {}),
|
|
1690
|
+
// laya-local (decide_* built-in tools, always-on core): the runner can't
|
|
1691
|
+
// see the box's private 127.0.0.1:8770, so point LAYA_LOCAL_URL at the
|
|
1692
|
+
// server's PER-USER-gated proxy. AFTER creds so it can't be overridden.
|
|
1693
|
+
// The proxy authenticates with this user's MELAYA_API_KEY (in the
|
|
1694
|
+
// projected creds) - never a shared secret - and meters per user.
|
|
1695
|
+
LAYA_LOCAL_URL: httpBase.replace(/\/$/, "") + "/api/v1/internal/laya",
|
|
1683
1696
|
};
|
|
1684
1697
|
const session = launchAssistantHost({
|
|
1685
1698
|
env, pythonPath: envResult.pythonPath, workDir, stagedHost,
|