@amaster.ai/employee-runtime-connector 0.1.1-beta.312 → 0.1.1-beta.313
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.
|
@@ -13619,6 +13619,47 @@ var mirrorXIssueHandlingDiagnosticSchema = external_exports.object({
|
|
|
13619
13619
|
reasonParams: reasonParamsSchema,
|
|
13620
13620
|
sourceRefs: external_exports.array(issueProgressSourceRefSchema)
|
|
13621
13621
|
}).strict();
|
|
13622
|
+
var mirrorXRecoveryCompletionSchema = external_exports.object({
|
|
13623
|
+
actionId: external_exports.string().uuid(),
|
|
13624
|
+
actionRevision: external_exports.number().int().positive(),
|
|
13625
|
+
executionEpoch: external_exports.number().int().positive(),
|
|
13626
|
+
state: external_exports.enum(["allowed", "blocked"]),
|
|
13627
|
+
blockerGates: external_exports.array(external_exports.string())
|
|
13628
|
+
}).strict().superRefine((value, ctx) => {
|
|
13629
|
+
if (value.state === "allowed" !== (value.blockerGates.length === 0)) {
|
|
13630
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Completion eligibility must agree with terminal blockers", path: ["state"] });
|
|
13631
|
+
}
|
|
13632
|
+
});
|
|
13633
|
+
var mirrorXIssueHandlingOperationSchema = external_exports.enum([
|
|
13634
|
+
"activate",
|
|
13635
|
+
"continue",
|
|
13636
|
+
"recover",
|
|
13637
|
+
"retry",
|
|
13638
|
+
"review",
|
|
13639
|
+
"dismiss_to_review",
|
|
13640
|
+
"force_done",
|
|
13641
|
+
"accept",
|
|
13642
|
+
"update_wait",
|
|
13643
|
+
"resolve_wait"
|
|
13644
|
+
]);
|
|
13645
|
+
var mirrorXIssueHandlingOperationCapabilitySchema = external_exports.discriminatedUnion("state", [
|
|
13646
|
+
external_exports.object({ state: external_exports.literal("allowed"), reasonCode: external_exports.null() }).strict(),
|
|
13647
|
+
external_exports.object({ state: external_exports.literal("forbidden"), reasonCode: external_exports.literal("actor_not_authorized") }).strict(),
|
|
13648
|
+
external_exports.object({ state: external_exports.literal("unavailable"), reasonCode: external_exports.enum([
|
|
13649
|
+
"target_stale",
|
|
13650
|
+
"assignee_missing",
|
|
13651
|
+
"review_path_missing",
|
|
13652
|
+
"company_paused",
|
|
13653
|
+
"operation_not_required",
|
|
13654
|
+
"delivery_not_ready",
|
|
13655
|
+
"execution_stages_pending",
|
|
13656
|
+
"agent_unavailable"
|
|
13657
|
+
]) }).strict()
|
|
13658
|
+
]);
|
|
13659
|
+
var mirrorXIssueHandlingOperationsSchema = external_exports.object({
|
|
13660
|
+
intentId: external_exports.string().regex(/^intent:v1:[a-f0-9]{64}$/),
|
|
13661
|
+
capabilities: external_exports.record(mirrorXIssueHandlingOperationSchema, mirrorXIssueHandlingOperationCapabilitySchema)
|
|
13662
|
+
}).strict();
|
|
13622
13663
|
var mirrorXIssueHandlingProjectionSchema = external_exports.object({
|
|
13623
13664
|
schemaVersion: external_exports.literal(MIRRORX_ISSUE_HANDLING_SCHEMA_VERSION),
|
|
13624
13665
|
issueId: external_exports.string().uuid(),
|
|
@@ -13630,11 +13671,37 @@ var mirrorXIssueHandlingProjectionSchema = external_exports.object({
|
|
|
13630
13671
|
}).strict(),
|
|
13631
13672
|
currentProgress: mirrorXIssueCurrentProgressSchema,
|
|
13632
13673
|
primaryIntent: mirrorXIssueHandlingIntentSchema.nullable(),
|
|
13674
|
+
// Detail-only terminal eligibility, evaluated by the same owner as done writes.
|
|
13675
|
+
// Older/list responses omit it; clients must not infer completion eligibility.
|
|
13676
|
+
recoveryCompletion: mirrorXRecoveryCompletionSchema.nullable().optional(),
|
|
13677
|
+
operations: mirrorXIssueHandlingOperationsSchema.optional(),
|
|
13633
13678
|
relatedIntents: external_exports.array(mirrorXIssueHandlingIntentSchema).max(3),
|
|
13634
13679
|
listBucket: mirrorXIssueHandlingListBucketSchema.nullable(),
|
|
13635
13680
|
diagnostics: external_exports.array(mirrorXIssueHandlingDiagnosticSchema)
|
|
13636
13681
|
}).strict().superRefine((value, ctx) => {
|
|
13637
13682
|
const terminal = value.currentProgress.state === "terminal";
|
|
13683
|
+
if (value.operations && value.operations.intentId !== value.primaryIntent?.intentId) {
|
|
13684
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Operations require the exact primary intent", path: ["operations"] });
|
|
13685
|
+
}
|
|
13686
|
+
if (value.operations) {
|
|
13687
|
+
const surfaceOperations = {
|
|
13688
|
+
recovery: ["recover", "retry", "review", "dismiss_to_review", "force_done"],
|
|
13689
|
+
continuation: ["continue"],
|
|
13690
|
+
task_governance: ["activate"],
|
|
13691
|
+
acceptance: ["accept"],
|
|
13692
|
+
external_wait: ["update_wait", "resolve_wait"]
|
|
13693
|
+
};
|
|
13694
|
+
const allowed = value.primaryIntent ? surfaceOperations[value.primaryIntent.target.surface] ?? [] : [];
|
|
13695
|
+
if (Object.keys(value.operations.capabilities).some((operation) => !allowed.includes(operation))) {
|
|
13696
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Operations must belong to the primary surface", path: ["operations", "capabilities"] });
|
|
13697
|
+
}
|
|
13698
|
+
}
|
|
13699
|
+
if (value.recoveryCompletion) {
|
|
13700
|
+
const target = value.primaryIntent?.target;
|
|
13701
|
+
if (target?.surface !== "recovery" || target.actionId !== value.recoveryCompletion.actionId || target.actionRevision !== value.recoveryCompletion.actionRevision || target.executionEpoch !== value.recoveryCompletion.executionEpoch || value.basis.executionEpoch !== value.recoveryCompletion.executionEpoch) {
|
|
13702
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Completion eligibility requires the exact primary Recovery target", path: ["recoveryCompletion"] });
|
|
13703
|
+
}
|
|
13704
|
+
}
|
|
13638
13705
|
if (terminal && value.primaryIntent !== null) {
|
|
13639
13706
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Terminal handling projections cannot have a primary intent", path: ["primaryIntent"] });
|
|
13640
13707
|
}
|
|
@@ -34441,7 +34508,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
|
34441
34508
|
}
|
|
34442
34509
|
|
|
34443
34510
|
// src/amaster-runtime-daemon.mjs
|
|
34444
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
34511
|
+
var CONNECTOR_VERSION = "0.1.1-beta.313";
|
|
34445
34512
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
34446
34513
|
var daemonRequire = createRequire(import.meta.url);
|
|
34447
34514
|
var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
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.313";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|