@amaster.ai/employee-runtime-connector 0.1.10 → 0.1.12
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.
|
@@ -33525,6 +33525,7 @@ var BROWSER_CREDENTIAL_ENV_CAPABILITY = "browser_credential_env_read_v1";
|
|
|
33525
33525
|
var BROWSER_CREDENTIAL_PRIVATE_CAPABILITY = "browser_credential_auth_transaction_v1";
|
|
33526
33526
|
var BROWSER_CREDENTIAL_ENV_FILE = "PI_AGENT_BROWSER_CREDENTIAL_ENV_FILE";
|
|
33527
33527
|
var BROWSER_CREDENTIAL_AUTHORITY_ENV = "AMASTER_BROWSER_CREDENTIAL_AUTHORITY_JSON";
|
|
33528
|
+
var BROWSER_SESSION_USER_DATA_DIR_ENV = "AMASTER_BROWSER_SESSION_USER_DATA_DIR";
|
|
33528
33529
|
var BROWSER_CREDENTIAL_USERNAME_KEY = "BROWSER_USERNAME";
|
|
33529
33530
|
var BROWSER_CREDENTIAL_PASSWORD_KEY = "BROWSER_PASSWORD";
|
|
33530
33531
|
function exactOrigin2(value) {
|
|
@@ -33605,6 +33606,15 @@ function browserCredentialPrivateAuthority(command, presentation = browserCreden
|
|
|
33605
33606
|
refs: Object.freeze(refs.map((ref2) => Object.freeze({ ...ref2 })))
|
|
33606
33607
|
});
|
|
33607
33608
|
}
|
|
33609
|
+
function attachTrustedBrowserExecutorEnv(env, { authority = null, userDataDir = null } = {}) {
|
|
33610
|
+
const result2 = { ...env };
|
|
33611
|
+
delete result2[BROWSER_CREDENTIAL_AUTHORITY_ENV];
|
|
33612
|
+
delete result2[BROWSER_SESSION_USER_DATA_DIR_ENV];
|
|
33613
|
+
if (authority && !userDataDir) fail2("browser_credential_authority_profile_required");
|
|
33614
|
+
if (userDataDir) result2[BROWSER_SESSION_USER_DATA_DIR_ENV] = userDataDir;
|
|
33615
|
+
if (authority) result2[BROWSER_CREDENTIAL_AUTHORITY_ENV] = JSON.stringify(authority);
|
|
33616
|
+
return result2;
|
|
33617
|
+
}
|
|
33608
33618
|
function dotenvQuotedValue(value) {
|
|
33609
33619
|
if (value.includes("\0")) fail2("browser_credential_env_value_invalid");
|
|
33610
33620
|
return `"${value.replace(/[\\"\n\r\t$`]/gu, (char) => ({
|
|
@@ -35262,7 +35272,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
|
35262
35272
|
}
|
|
35263
35273
|
|
|
35264
35274
|
// src/amaster-runtime-daemon.mjs
|
|
35265
|
-
var CONNECTOR_VERSION = "0.1.
|
|
35275
|
+
var CONNECTOR_VERSION = "0.1.12";
|
|
35266
35276
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
35267
35277
|
var SUPPORTED_TASK_CONTEXT_VERSIONS = Object.freeze([TASK_CONTEXT_MANIFEST_VERSION, TASK_CONTEXT_V2]);
|
|
35268
35278
|
var daemonRequire = createRequire(import.meta.url);
|
|
@@ -40265,13 +40275,7 @@ async function executeRunCommand(config, command) {
|
|
|
40265
40275
|
const nativeSessionRequest = asRecord(asRecord(command.payload).nativeSession);
|
|
40266
40276
|
let invocation = null;
|
|
40267
40277
|
let executorEnv = buildExecutorEnv(config, command, workspace);
|
|
40268
|
-
|
|
40269
|
-
if (browserCredentialAuthority) {
|
|
40270
|
-
executorEnv = {
|
|
40271
|
-
...executorEnv,
|
|
40272
|
-
[BROWSER_CREDENTIAL_AUTHORITY_ENV]: JSON.stringify(browserCredentialAuthority)
|
|
40273
|
-
};
|
|
40274
|
-
}
|
|
40278
|
+
let browserSessionUserDataDir = null;
|
|
40275
40279
|
let managedMcpProfile = null;
|
|
40276
40280
|
let managedMcpCleanup = null;
|
|
40277
40281
|
let cleanupManagedMcpProfile = null;
|
|
@@ -40325,10 +40329,7 @@ async function executeRunCommand(config, command) {
|
|
|
40325
40329
|
cleanupBrowserSessionProfile(config, browserSession);
|
|
40326
40330
|
}
|
|
40327
40331
|
const ownedProfile = ensureBrowserSessionProfile(config, browserSession);
|
|
40328
|
-
|
|
40329
|
-
...executorEnv,
|
|
40330
|
-
AMASTER_BROWSER_SESSION_USER_DATA_DIR: ownedProfile.userDataDir
|
|
40331
|
-
};
|
|
40332
|
+
browserSessionUserDataDir = ownedProfile.userDataDir;
|
|
40332
40333
|
}
|
|
40333
40334
|
invocation = buildExecutorInvocation(executor, executionCommand, workspace);
|
|
40334
40335
|
if (taskSessionCheckpointUnavailable) {
|
|
@@ -40470,6 +40471,10 @@ async function executeRunCommand(config, command) {
|
|
|
40470
40471
|
...managedMcpProfile.attestation
|
|
40471
40472
|
});
|
|
40472
40473
|
}
|
|
40474
|
+
executorEnv = attachTrustedBrowserExecutorEnv(executorEnv, {
|
|
40475
|
+
authority: browserCredentialAuthority,
|
|
40476
|
+
userDataDir: browserSessionUserDataDir
|
|
40477
|
+
});
|
|
40473
40478
|
executorEnv = withAuditCorrelationEnvironment(executorEnv, command);
|
|
40474
40479
|
if (Object.keys(trustedPiRuntimeAssertion).length > 0) {
|
|
40475
40480
|
throw new Error("pi_trusted_runtime_unsupported");
|
package/dist/amaster-runtime.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { homedir, hostname } from "node:os";
|
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { BUILD_SUPPORTED_CAPABILITIES } from "./amaster-runtime-daemon/capability-registry.mjs";
|
|
9
9
|
|
|
10
|
-
const CONNECTOR_VERSION = "0.1.
|
|
10
|
+
const CONNECTOR_VERSION = "0.1.12";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|