@amaster.ai/employee-runtime-connector 0.1.1-beta.38 → 0.1.1-beta.39
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.
|
@@ -3148,6 +3148,29 @@ function createManagedPiMcpProfileApi(options = {}) {
|
|
|
3148
3148
|
}
|
|
3149
3149
|
return { ...env, ...record6(commandEnv) };
|
|
3150
3150
|
}
|
|
3151
|
+
function sourceAcquisitionBrowserEnvironment(sourceAcquisition, baseEnv) {
|
|
3152
|
+
const env = {
|
|
3153
|
+
PI_BROWSER_USE_RUNTIME_READ_POLICY: "required"
|
|
3154
|
+
};
|
|
3155
|
+
if (sourceAcquisition?.profile?.transport?.browserMode !== "isolated") return env;
|
|
3156
|
+
const executable = typeof baseEnv?.AMASTER_BROWSER_EXECUTABLE_PATH === "string" ? baseEnv.AMASTER_BROWSER_EXECUTABLE_PATH.trim() : "";
|
|
3157
|
+
if (!executable || !isAbsolute2(executable)) {
|
|
3158
|
+
throw new Error("source_acquisition_browser_executable_unavailable");
|
|
3159
|
+
}
|
|
3160
|
+
let stat;
|
|
3161
|
+
try {
|
|
3162
|
+
stat = statSync2(executable);
|
|
3163
|
+
} catch {
|
|
3164
|
+
throw new Error("source_acquisition_browser_executable_unavailable");
|
|
3165
|
+
}
|
|
3166
|
+
if (!stat.isFile() || (stat.mode & 73) === 0) {
|
|
3167
|
+
throw new Error("source_acquisition_browser_executable_unavailable");
|
|
3168
|
+
}
|
|
3169
|
+
return {
|
|
3170
|
+
...env,
|
|
3171
|
+
CHROME_BIN: executable
|
|
3172
|
+
};
|
|
3173
|
+
}
|
|
3151
3174
|
function projectMcpConfigHasContent(filePath) {
|
|
3152
3175
|
if (!existsSync3(filePath)) return false;
|
|
3153
3176
|
let parsed;
|
|
@@ -3684,9 +3707,7 @@ ${result3.stderr ?? ""}`, "Pi", MINIMUM_PI_VERSION);
|
|
|
3684
3707
|
AMASTER_PI_EFFECTIVE_TOOLS_CACHE: directAttestationInput.cachePath,
|
|
3685
3708
|
AMASTER_PI_EFFECTIVE_TOOLS_CONFIG: directAttestationInput.configPath
|
|
3686
3709
|
} : {},
|
|
3687
|
-
...input.sourceAcquisition ? {
|
|
3688
|
-
PI_BROWSER_USE_RUNTIME_READ_POLICY: "required"
|
|
3689
|
-
} : {}
|
|
3710
|
+
...input.sourceAcquisition ? sourceAcquisitionBrowserEnvironment(input.sourceAcquisition, input.baseEnv) : {}
|
|
3690
3711
|
};
|
|
3691
3712
|
const spawnIdentity = typeof input.prepareExecutorAccess === "function" ? input.prepareExecutorAccess({ profileRoot, workspaceRoot: cwd }) : null;
|
|
3692
3713
|
const executorAttestation = attestPi(
|
|
@@ -9668,7 +9689,7 @@ var source_acquisition_compatibility_default = {
|
|
|
9668
9689
|
};
|
|
9669
9690
|
|
|
9670
9691
|
// src/amaster-runtime-daemon.mjs
|
|
9671
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
9692
|
+
var CONNECTOR_VERSION = "0.1.1-beta.39";
|
|
9672
9693
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
9673
9694
|
var SOURCE_ACQUISITION_CAPABILITY = source_acquisition_compatibility_default.profileVersion;
|
|
9674
9695
|
var SOURCE_ACQUISITION_PROFILE_VERSION = source_acquisition_compatibility_default.profileVersion;
|
|
@@ -10135,6 +10156,16 @@ function sourceAcquisitionPackageMetadata(packageName) {
|
|
|
10135
10156
|
const metadata = readJsonFile2(packagePath);
|
|
10136
10157
|
return metadata.name === packageName && readString(metadata.version) ? metadata : null;
|
|
10137
10158
|
}
|
|
10159
|
+
function sourceAcquisitionBrowserExecutableReady() {
|
|
10160
|
+
const executable = readString(process.env.AMASTER_BROWSER_EXECUTABLE_PATH);
|
|
10161
|
+
if (!executable || !isAbsolute6(executable)) return false;
|
|
10162
|
+
try {
|
|
10163
|
+
const stat = statSync8(executable);
|
|
10164
|
+
return stat.isFile() && (stat.mode & 73) !== 0;
|
|
10165
|
+
} catch {
|
|
10166
|
+
return false;
|
|
10167
|
+
}
|
|
10168
|
+
}
|
|
10138
10169
|
function sourceAcquisitionRuntimeReadiness(config) {
|
|
10139
10170
|
const unavailable = (reason) => ({ ready: false, reason });
|
|
10140
10171
|
const piExecutor = config.executors.find((executor) => executor.kind === "pi");
|
|
@@ -10155,6 +10186,9 @@ function sourceAcquisitionRuntimeReadiness(config) {
|
|
|
10155
10186
|
if (adapters.length === 0 || adapters.some((adapter) => ![SOURCE_ACQUISITION_HEADLESS_ADAPTER, SOURCE_ACQUISITION_DESKTOP_ADAPTER].includes(adapter))) {
|
|
10156
10187
|
return unavailable("source_acquisition_adapter_attestation_invalid");
|
|
10157
10188
|
}
|
|
10189
|
+
if (adapters.includes(SOURCE_ACQUISITION_HEADLESS_ADAPTER) && !sourceAcquisitionBrowserExecutableReady()) {
|
|
10190
|
+
return unavailable("source_acquisition_browser_executable_unavailable");
|
|
10191
|
+
}
|
|
10158
10192
|
const connectorDigest = readString(process.env.AMASTER_SOURCE_ACQUISITION_CONNECTOR_DIGEST);
|
|
10159
10193
|
if (!connectorDigest || !/^[a-f0-9]{64}$/.test(connectorDigest)) {
|
|
10160
10194
|
return unavailable("source_acquisition_connector_digest_unavailable");
|
package/dist/amaster-runtime.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { basename, dirname, join, resolve } from "node:path";
|
|
|
6
6
|
import { homedir, hostname } from "node:os";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
9
|
-
const CONNECTOR_VERSION = "0.1.1-beta.
|
|
9
|
+
const CONNECTOR_VERSION = "0.1.1-beta.39";
|
|
10
10
|
|
|
11
11
|
const CAPABILITIES = [
|
|
12
12
|
"remote_registration",
|