@amaster.ai/employee-runtime-connector 0.1.1-beta.35 → 0.1.1-beta.37
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
CHANGED
|
@@ -21,12 +21,13 @@ Do not use `latest`, `^`, or `~` in a runtime image. The image tag and connector
|
|
|
21
21
|
|
|
22
22
|
Immutable images should pin an exact package version as their baseline. The current connector does not download or replace runtime code while running; package upgrades and rollbacks belong to the image build and rollout.
|
|
23
23
|
|
|
24
|
-
The publish workflow verifies that npm records the publishing commit as the package `gitHead`, then updates the repository deployment pin. Remote deployment accepts that package only when its `gitHead` is an ancestor of the target source commit and the connector
|
|
24
|
+
The publish workflow verifies that npm records the publishing commit as the package `gitHead`, then updates the repository deployment pin. Remote deployment accepts that package only when its `gitHead` is an ancestor of the target source commit and the connector runtime build inputs are unchanged between them. Those inputs are the package path plus `packages/shared/src/source-acquisition-compatibility.json`, which is copied into the published package and bundled into the daemon. If another workspace source becomes a runtime build input, expand the provenance scope and tests before release. After restart, deployment also verifies the package CLI version inside the container. Do not update the deployment pin manually to bypass either provenance check.
|
|
25
25
|
|
|
26
26
|
## Package Contents
|
|
27
27
|
|
|
28
28
|
- `dist/amaster-runtime.mjs`: configuration, pairing, workspace, diagnostics, and daemon lifecycle CLI.
|
|
29
29
|
- `dist/amaster-runtime-daemon.mjs`: standalone daemon bundle for connector registration, heartbeat, command execution, and result ingestion.
|
|
30
|
+
- `dist/source-acquisition-compatibility.json`: versioned Source Acquisition compatibility manifest. Runner image builds must read this file from the exact installed connector package and fail before publishing when their Source Acquisition profile, adapter, or required package versions do not match it.
|
|
30
31
|
|
|
31
32
|
The source of truth lives under this package's `src/` directory. The package build copies the CLI and bundles the daemon modules into publishable output; do not edit generated files under `dist/`.
|
|
32
33
|
|
|
@@ -1891,6 +1891,25 @@ var MANAGED_PI_PROVIDER_PROTECTED_ENV_NAMES = Object.freeze([
|
|
|
1891
1891
|
"AMASTER_API_KEY",
|
|
1892
1892
|
"AMASTER_PLATFORM_OAUTH_TOKEN"
|
|
1893
1893
|
]);
|
|
1894
|
+
var MANAGED_PI_HELIGE_EXECUTION_ENV_NAMES = Object.freeze([
|
|
1895
|
+
"HELIGE_ACCESS_TOKEN",
|
|
1896
|
+
"HELIGE_BASE_URL",
|
|
1897
|
+
"HELIGE_USER_ID",
|
|
1898
|
+
"HELIGE_USER_UID",
|
|
1899
|
+
"HELIGE_USER_NAME",
|
|
1900
|
+
"HELIGE_USER_EMAIL"
|
|
1901
|
+
]);
|
|
1902
|
+
var MANAGED_PI_HELIGE_EXECUTION_PROTECTED_ENV_NAMES = Object.freeze([
|
|
1903
|
+
"HELIGE_ACCESS_TOKEN"
|
|
1904
|
+
]);
|
|
1905
|
+
var MANAGED_PI_LEGACY_PLATFORM_EXECUTION_ENV_NAMES = Object.freeze([
|
|
1906
|
+
"PLATFORM_ACCESS_TOKEN",
|
|
1907
|
+
"PLATFORM_BASE_URL",
|
|
1908
|
+
"PLATFORM_USER_ID",
|
|
1909
|
+
"PLATFORM_USER_UID",
|
|
1910
|
+
"PLATFORM_USER_NAME",
|
|
1911
|
+
"PLATFORM_USER_EMAIL"
|
|
1912
|
+
]);
|
|
1894
1913
|
function isRecord(value) {
|
|
1895
1914
|
return value && typeof value === "object" && !Array.isArray(value);
|
|
1896
1915
|
}
|
|
@@ -2700,7 +2719,10 @@ function createManagedPiMcpProfileApi(options = {}) {
|
|
|
2700
2719
|
"PAPERCLIP_API_KEY",
|
|
2701
2720
|
"AMASTER_BOARD_API_KEY"
|
|
2702
2721
|
]);
|
|
2703
|
-
const ALLOWED_COMMAND_ENV2 = new Set(
|
|
2722
|
+
const ALLOWED_COMMAND_ENV2 = /* @__PURE__ */ new Set([
|
|
2723
|
+
...MANAGED_PI_PROVIDER_ENV_NAMES,
|
|
2724
|
+
...MANAGED_PI_HELIGE_EXECUTION_ENV_NAMES
|
|
2725
|
+
]);
|
|
2704
2726
|
const SAFE_INHERITED_ENV2 = /* @__PURE__ */ new Set([
|
|
2705
2727
|
"PATH",
|
|
2706
2728
|
"LANG",
|
|
@@ -3717,7 +3739,10 @@ ${result3.stderr ?? ""}`, "Pi", MINIMUM_PI_VERSION);
|
|
|
3717
3739
|
protectedValues: [.../* @__PURE__ */ new Set([
|
|
3718
3740
|
sessionToken,
|
|
3719
3741
|
...sharedRuntime.protectedValues,
|
|
3720
|
-
...
|
|
3742
|
+
...[
|
|
3743
|
+
...MANAGED_PI_PROVIDER_PROTECTED_ENV_NAMES,
|
|
3744
|
+
...MANAGED_PI_HELIGE_EXECUTION_PROTECTED_ENV_NAMES
|
|
3745
|
+
].map((name) => input.commandEnv?.[name]).filter((value) => typeof value === "string" && value.length > 0)
|
|
3721
3746
|
])],
|
|
3722
3747
|
attestation: {
|
|
3723
3748
|
...attestationFacts,
|
|
@@ -5457,6 +5482,7 @@ function runtimeAuthorizationText(context, mode, { suppressOrdinaryCompletionCon
|
|
|
5457
5482
|
const completion = asRecord(requirements.completion);
|
|
5458
5483
|
const delivery = asRecord(requirements.delivery);
|
|
5459
5484
|
const businessOutcome = asRecord(requirements.businessOutcome);
|
|
5485
|
+
const workDisposition = asRecord(requirements.workDisposition);
|
|
5460
5486
|
const acceptancePolicy = asRecord(businessOutcome.acceptancePolicy);
|
|
5461
5487
|
const acceptanceValidatorIds = Array.isArray(acceptancePolicy.validatorIds) ? acceptancePolicy.validatorIds.filter((value) => typeof value === "string") : [];
|
|
5462
5488
|
const evidenceAutoAcceptance = acceptancePolicy.mode === "evidence_auto" && acceptancePolicy.verdictAuthority === "none" && acceptancePolicy.acceptanceAuthority === null && acceptanceValidatorIds.length === EVIDENCE_AUTO_VALIDATOR_IDS.size && acceptanceValidatorIds.every((value) => EVIDENCE_AUTO_VALIDATOR_IDS.has(value));
|
|
@@ -5465,7 +5491,7 @@ function runtimeAuthorizationText(context, mode, { suppressOrdinaryCompletionCon
|
|
|
5465
5491
|
const manifestRefreshOnly = legacyManifestRefreshOnly(context);
|
|
5466
5492
|
const firstDocumentCheckpoint = completionDeliverable === "document_or_artifact" ? manifestRefreshOnly ? "The current deliverable content already exists and this run is limited to refreshing stale immutable Manifest refs. Do not create or revise a document unless a fresh Delivery readiness read proves a content or acceptance gap beyond stale refs." : mode === "cold" ? "Before the first external browse, search, or research action, call upsert_document with a stable key. Create a checkpoint skeleton containing the acceptance criteria, a source table, and known unknowns; update the same document with each piece of verified evidence instead of waiting until broad research is complete. Immediately after upsert_document, call update_parent with status: in_progress and a concrete next action; complete both control-plane writes before the first external browse, search, or research action." : "Before the first external browse, search, or research action, read the existing stable-key document. Preserve all still-valid verified rows, source URLs, conclusions, and known unknowns; do not replace a populated document with a blank skeleton or less-informative fallback. Only when the document does not exist may you create a checkpoint skeleton. Then call update_parent with status: in_progress and a concrete next action before the first external browse, search, or research action. Update the same document with each piece of verified evidence." : "";
|
|
5467
5493
|
const completionContract = !suppressOrdinaryCompletionContract && completionRole && completionDeliverable ? [
|
|
5468
|
-
"Before ending this run, persist durable progress through Runtime Actions and record one explicit task disposition. Browser and tool history alone are not durable progress.",
|
|
5494
|
+
workDisposition.mode === "required" ? "Before the first business mutation, ensure the current required work disposition is recorded. Read-only governed checks may precede it. If no current valid receipt exists, call runtime_action.describe for record_work_disposition and persist exactly one truthful disposition before upsert_document, update_parent, add_comment, create_interaction, publish_delivery_manifest, or any other business mutation. Before ending this run, persist durable progress through Runtime Actions; browser and tool history alone are not durable progress." : "Before ending this run, persist durable progress through Runtime Actions and record one explicit task disposition. Browser and tool history alone are not durable progress.",
|
|
5469
5495
|
firstDocumentCheckpoint,
|
|
5470
5496
|
"If work remains in an ordinary productive run, call update_parent with status: in_progress and a concrete next action so bounded continuation recovery can preserve a live path. Status: todo does not queue a normal continuation from an ordinary productive run. Only a server-issued successful-run handoff recovery may use status: todo, and only according to its exact Recovery Instruction. Otherwise use a supported terminal or waiting disposition."
|
|
5471
5497
|
].filter(Boolean).join(" ") : "";
|
|
@@ -9625,18 +9651,33 @@ function assertSourceAcquisitionRuntimeAuthority({
|
|
|
9625
9651
|
}
|
|
9626
9652
|
}
|
|
9627
9653
|
|
|
9654
|
+
// ../shared/src/source-acquisition-compatibility.json
|
|
9655
|
+
var source_acquisition_compatibility_default = {
|
|
9656
|
+
schemaVersion: "mirrorx.source-acquisition-compatibility.v1",
|
|
9657
|
+
profileVersion: "source_acquisition_v1",
|
|
9658
|
+
retentionVersion: "source_summary_only_v1",
|
|
9659
|
+
actionVersion: "complete_source_acquisition_v1",
|
|
9660
|
+
policyVersion: "browser_read_policy_v1",
|
|
9661
|
+
adapters: [
|
|
9662
|
+
"pi_browser_use_headless_v1"
|
|
9663
|
+
],
|
|
9664
|
+
requiredPackages: {
|
|
9665
|
+
"@amaster.ai/pi-browser-use": "0.1.2-beta.59"
|
|
9666
|
+
}
|
|
9667
|
+
};
|
|
9668
|
+
|
|
9628
9669
|
// src/amaster-runtime-daemon.mjs
|
|
9629
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
9670
|
+
var CONNECTOR_VERSION = "0.1.1-beta.37";
|
|
9630
9671
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
9631
|
-
var SOURCE_ACQUISITION_CAPABILITY =
|
|
9632
|
-
var SOURCE_ACQUISITION_PROFILE_VERSION =
|
|
9633
|
-
var SOURCE_ACQUISITION_RETENTION_VERSION =
|
|
9634
|
-
var SOURCE_ACQUISITION_ACTION_VERSION =
|
|
9635
|
-
var SOURCE_ACQUISITION_HEADLESS_ADAPTER =
|
|
9672
|
+
var SOURCE_ACQUISITION_CAPABILITY = source_acquisition_compatibility_default.profileVersion;
|
|
9673
|
+
var SOURCE_ACQUISITION_PROFILE_VERSION = source_acquisition_compatibility_default.profileVersion;
|
|
9674
|
+
var SOURCE_ACQUISITION_RETENTION_VERSION = source_acquisition_compatibility_default.retentionVersion;
|
|
9675
|
+
var SOURCE_ACQUISITION_ACTION_VERSION = source_acquisition_compatibility_default.actionVersion;
|
|
9676
|
+
var SOURCE_ACQUISITION_HEADLESS_ADAPTER = source_acquisition_compatibility_default.adapters[0];
|
|
9636
9677
|
var SOURCE_ACQUISITION_DESKTOP_ADAPTER = "browser_skill_desktop_v1";
|
|
9637
|
-
var SOURCE_ACQUISITION_PACKAGE_VERSIONS = Object.freeze(
|
|
9638
|
-
|
|
9639
|
-
|
|
9678
|
+
var SOURCE_ACQUISITION_PACKAGE_VERSIONS = Object.freeze(
|
|
9679
|
+
source_acquisition_compatibility_default.requiredPackages
|
|
9680
|
+
);
|
|
9640
9681
|
var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
|
9641
9682
|
var CHECKPOINT_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
9642
9683
|
var AMASTER_PI_PROHIBITED_EXTRA_ARGS = /* @__PURE__ */ new Set(["--no-extensions", "--no-skills", "--no-tools", "--no-session"]);
|
|
@@ -11050,7 +11091,11 @@ function buildExecutorEnv(config, command, workspace) {
|
|
|
11050
11091
|
const issueId = commandIssueId(command) ?? "";
|
|
11051
11092
|
const companyId = readString(runtimeAuth.companyId) ?? readString(asRecord(command.payload).companyId) ?? "";
|
|
11052
11093
|
const baseEnv = { ...process.env };
|
|
11053
|
-
for (const name of
|
|
11094
|
+
for (const name of [
|
|
11095
|
+
...MANAGED_PI_PROVIDER_ENV_NAMES,
|
|
11096
|
+
...MANAGED_PI_HELIGE_EXECUTION_ENV_NAMES,
|
|
11097
|
+
...MANAGED_PI_LEGACY_PLATFORM_EXECUTION_ENV_NAMES
|
|
11098
|
+
]) delete baseEnv[name];
|
|
11054
11099
|
const executorPaths = readStringArray(config.executorPaths);
|
|
11055
11100
|
if (executorPaths.length > 0) {
|
|
11056
11101
|
baseEnv.PATH = [...executorPaths, baseEnv.PATH ?? ""].filter(Boolean).join(delimiter3);
|
|
@@ -14108,7 +14153,12 @@ async function executeRunCommand(config, command) {
|
|
|
14108
14153
|
}
|
|
14109
14154
|
if (executor.kind === "pi") {
|
|
14110
14155
|
piResolvedProviderConfig = executorEnv;
|
|
14111
|
-
for (const envName of [
|
|
14156
|
+
for (const envName of [
|
|
14157
|
+
"AMASTER_API_KEY",
|
|
14158
|
+
"AMASTER_PLATFORM_OAUTH_TOKEN",
|
|
14159
|
+
...MANAGED_PI_HELIGE_EXECUTION_PROTECTED_ENV_NAMES,
|
|
14160
|
+
"PLATFORM_ACCESS_TOKEN"
|
|
14161
|
+
]) {
|
|
14112
14162
|
const protectedValue = readString(piResolvedProviderConfig[envName]);
|
|
14113
14163
|
if (protectedValue && !providerProtectedValues.includes(protectedValue)) {
|
|
14114
14164
|
providerProtectedValues.push(protectedValue);
|
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.37";
|
|
10
10
|
|
|
11
11
|
const CAPABILITIES = [
|
|
12
12
|
"remote_registration",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "mirrorx.source-acquisition-compatibility.v1",
|
|
3
|
+
"profileVersion": "source_acquisition_v1",
|
|
4
|
+
"retentionVersion": "source_summary_only_v1",
|
|
5
|
+
"actionVersion": "complete_source_acquisition_v1",
|
|
6
|
+
"policyVersion": "browser_read_policy_v1",
|
|
7
|
+
"adapters": [
|
|
8
|
+
"pi_browser_use_headless_v1"
|
|
9
|
+
],
|
|
10
|
+
"requiredPackages": {
|
|
11
|
+
"@amaster.ai/pi-browser-use": "0.1.2-beta.59"
|
|
12
|
+
}
|
|
13
|
+
}
|