@amaster.ai/employee-runtime-connector 0.1.1-beta.352 → 0.1.1-beta.353
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.
|
@@ -8,12 +8,26 @@ var __export = (target, all) => {
|
|
|
8
8
|
|
|
9
9
|
// src/amaster-runtime-daemon/goal-context-attestation.mjs
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
|
+
|
|
12
|
+
// ../shared/src/canonical-json.ts
|
|
13
|
+
function canonicalGoalOutcomeValue(value) {
|
|
14
|
+
if (value instanceof Date) return JSON.stringify(value.toISOString());
|
|
15
|
+
if (Array.isArray(value)) return `[${Array.from(value, canonicalGoalOutcomeValue).join(",")}]`;
|
|
16
|
+
if (value && typeof value === "object") return `{${Object.entries(value).filter(([, child]) => child !== void 0).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).map(([key, child]) => `${JSON.stringify(key)}:${canonicalGoalOutcomeValue(child)}`).join(",")}}`;
|
|
17
|
+
return JSON.stringify(value ?? null);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// ../shared/src/task-context-versions.ts
|
|
21
|
+
var TASK_CONTEXT_MANIFEST_VERSION = "task-context-v1";
|
|
22
|
+
var TASK_CONTEXT_V2 = "task-context-v2";
|
|
23
|
+
|
|
24
|
+
// src/amaster-runtime-daemon/goal-context-attestation.mjs
|
|
11
25
|
var hash = (value) => createHash("sha256").update(value).digest("hex");
|
|
12
26
|
function goalAuthorityBlock(context) {
|
|
13
27
|
const manifest = context?.taskContextManifest;
|
|
14
|
-
if (manifest?.version !==
|
|
28
|
+
if (manifest?.version !== TASK_CONTEXT_V2) return null;
|
|
15
29
|
if (!manifest.goalOutcomeContext?.binding || !manifest.goalOutcomeContext?.snapshotHash) throw new Error("goal_authority_context_missing");
|
|
16
|
-
return "<mirrorx-goal-authority>\n" +
|
|
30
|
+
return "<mirrorx-goal-authority>\n" + canonicalGoalOutcomeValue({
|
|
17
31
|
version: manifest.version,
|
|
18
32
|
freshness: manifest.freshness,
|
|
19
33
|
goalOutcomeContext: manifest.goalOutcomeContext,
|
|
@@ -33,7 +47,7 @@ function attestGoalContextDelivery({ authority, prompt, systemPrompt, commandId,
|
|
|
33
47
|
commandId,
|
|
34
48
|
runId,
|
|
35
49
|
executorKind,
|
|
36
|
-
taskContextVersion:
|
|
50
|
+
taskContextVersion: TASK_CONTEXT_V2,
|
|
37
51
|
deliveryStage: "process_spawn",
|
|
38
52
|
transport: deliveredPrompt.transport,
|
|
39
53
|
authoritySha256: hash(authority),
|
|
@@ -7672,7 +7686,6 @@ var TASK_GOVERNANCE_BLOCKER_REASONS = [
|
|
|
7672
7686
|
"missing_expected_outcome",
|
|
7673
7687
|
"missing_acceptance_criteria"
|
|
7674
7688
|
];
|
|
7675
|
-
var TASK_CONTEXT_MANIFEST_VERSION = "task-context-v1";
|
|
7676
7689
|
var TASK_CONTEXT_MEMORY_SCOPES = ["none", "task"];
|
|
7677
7690
|
var TASK_CONTEXT_FRESHNESS_MODES = ["current", "frozen"];
|
|
7678
7691
|
var TASK_CONTEXT_WIKI_MODES = ["disabled", "optional"];
|
|
@@ -33943,8 +33956,9 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
|
33943
33956
|
}
|
|
33944
33957
|
|
|
33945
33958
|
// src/amaster-runtime-daemon.mjs
|
|
33946
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
33959
|
+
var CONNECTOR_VERSION = "0.1.1-beta.353";
|
|
33947
33960
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
33961
|
+
var SUPPORTED_TASK_CONTEXT_VERSIONS = Object.freeze([TASK_CONTEXT_MANIFEST_VERSION, TASK_CONTEXT_V2]);
|
|
33948
33962
|
var daemonRequire = createRequire(import.meta.url);
|
|
33949
33963
|
var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
|
33950
33964
|
var CHECKPOINT_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -34515,7 +34529,7 @@ function buildRegisterPayload(config) {
|
|
|
34515
34529
|
arch: process.arch,
|
|
34516
34530
|
metadata: {
|
|
34517
34531
|
daemon: "amaster-runtime-daemon.mjs",
|
|
34518
|
-
taskContextVersions:
|
|
34532
|
+
taskContextVersions: SUPPORTED_TASK_CONTEXT_VERSIONS,
|
|
34519
34533
|
connectorVersion: CONNECTOR_VERSION,
|
|
34520
34534
|
...buildCommit ? { buildCommit } : {},
|
|
34521
34535
|
authMode: config.token ? "bearer_token" : config.authHeader ? "custom_header" : "none",
|
|
@@ -34591,6 +34605,7 @@ function buildHeartbeatPayload(config, options = {}) {
|
|
|
34591
34605
|
},
|
|
34592
34606
|
metadata: {
|
|
34593
34607
|
authMode: config.token ? "bearer_token" : config.authHeader ? "custom_header" : "none",
|
|
34608
|
+
taskContextVersions: SUPPORTED_TASK_CONTEXT_VERSIONS,
|
|
34594
34609
|
capabilityReport: {
|
|
34595
34610
|
...capabilityReport,
|
|
34596
34611
|
connectorVersion: CONNECTOR_VERSION,
|
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.1-beta.
|
|
10
|
+
const CONNECTOR_VERSION = "0.1.1-beta.353";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|