@amaster.ai/employee-runtime-connector 0.1.1-beta.234 → 0.1.1-beta.235
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.
|
@@ -7783,6 +7783,7 @@ function resolveMirrorxWorkKindPurpose(workKind) {
|
|
|
7783
7783
|
|
|
7784
7784
|
// ../shared/src/task-resource-input.ts
|
|
7785
7785
|
var ATTACHMENT_PREPARATION_VERSION = "attachment-preparation-v1";
|
|
7786
|
+
var ORIGINAL_ONLY_PARSER_VERSION = "original-only-v1";
|
|
7786
7787
|
var TASK_RESOURCE_INPUT_STATES = [
|
|
7787
7788
|
"declared",
|
|
7788
7789
|
"preparing",
|
|
@@ -7882,18 +7883,27 @@ var taskResourceInputSchema = external_exports.discriminatedUnion("kind", [
|
|
|
7882
7883
|
assetId: external_exports.string().uuid(),
|
|
7883
7884
|
byteSize: external_exports.number().int().nonnegative(),
|
|
7884
7885
|
sha256: sha256Schema4,
|
|
7886
|
+
parserVersion: external_exports.string().trim().min(1).max(120).nullable().optional(),
|
|
7885
7887
|
sidecarAssetId: external_exports.string().uuid().nullable().optional(),
|
|
7886
7888
|
preparationReceipt: attachmentPreparationReceiptSchema.nullable().optional()
|
|
7887
7889
|
}).strict()
|
|
7888
7890
|
]).superRefine((value, context) => {
|
|
7889
7891
|
if (value.kind !== "attachment") return;
|
|
7890
|
-
|
|
7892
|
+
const originalOnly = value.parserVersion === ORIGINAL_ONLY_PARSER_VERSION;
|
|
7893
|
+
if (value.state === "prepared" && !value.preparationReceipt && !originalOnly) {
|
|
7891
7894
|
context.addIssue({
|
|
7892
7895
|
code: external_exports.ZodIssueCode.custom,
|
|
7893
7896
|
path: ["preparationReceipt"],
|
|
7894
7897
|
message: "Prepared attachment input requires a complete preparation receipt"
|
|
7895
7898
|
});
|
|
7896
7899
|
}
|
|
7900
|
+
if (originalOnly && (value.preparationReceipt || value.sidecarAssetId)) {
|
|
7901
|
+
context.addIssue({
|
|
7902
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7903
|
+
path: ["preparationReceipt"],
|
|
7904
|
+
message: "Original-only attachment input must not carry a preparation sidecar"
|
|
7905
|
+
});
|
|
7906
|
+
}
|
|
7897
7907
|
if (value.preparationReceipt && (value.preparationReceipt.originalSha256 !== value.sha256 || value.preparationReceipt.originalBytes !== value.byteSize)) {
|
|
7898
7908
|
context.addIssue({
|
|
7899
7909
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -9970,14 +9980,14 @@ function taskDirectionSelectionCount(value) {
|
|
|
9970
9980
|
return new Set(value.labelIds ?? []).size + new Set(value.labels ?? []).size;
|
|
9971
9981
|
}
|
|
9972
9982
|
function addExactlyOneTaskDirectionIssue(value, ctx) {
|
|
9973
|
-
const
|
|
9974
|
-
if (
|
|
9983
|
+
const count2 = taskDirectionSelectionCount(value);
|
|
9984
|
+
if (count2 === 1) return;
|
|
9975
9985
|
ctx.addIssue({
|
|
9976
9986
|
code: external_exports.ZodIssueCode.custom,
|
|
9977
9987
|
path: ["labelIds"],
|
|
9978
|
-
message:
|
|
9988
|
+
message: count2 === 0 ? "Task direction is required" : "Exactly one task direction is required",
|
|
9979
9989
|
params: {
|
|
9980
|
-
code:
|
|
9990
|
+
code: count2 === 0 ? "task_direction_required" : "task_direction_exactly_one_required"
|
|
9981
9991
|
}
|
|
9982
9992
|
});
|
|
9983
9993
|
}
|
|
@@ -16704,6 +16714,52 @@ var prerequisiteReleaseReceiptSchema = external_exports.object({
|
|
|
16704
16714
|
}
|
|
16705
16715
|
});
|
|
16706
16716
|
|
|
16717
|
+
// ../shared/src/mirrorx-prerequisite-read-model.ts
|
|
16718
|
+
var prerequisiteTargetWaitSchema = external_exports.enum([
|
|
16719
|
+
"company",
|
|
16720
|
+
"assignee",
|
|
16721
|
+
"interaction",
|
|
16722
|
+
"external",
|
|
16723
|
+
"dependency",
|
|
16724
|
+
"prerequisite",
|
|
16725
|
+
"recovery",
|
|
16726
|
+
"live_owner"
|
|
16727
|
+
]);
|
|
16728
|
+
var prerequisiteRelationshipSchema = external_exports.object({
|
|
16729
|
+
bindingId: external_exports.string().uuid(),
|
|
16730
|
+
requirementId: external_exports.string().uuid(),
|
|
16731
|
+
requirementRevision: external_exports.number().int().positive(),
|
|
16732
|
+
requirementKind: external_exports.string().min(1),
|
|
16733
|
+
sourceAuthorityKind: external_exports.enum(["board_decision", "task_requirement", "registered_validator"]),
|
|
16734
|
+
targetIssueId: external_exports.string().uuid(),
|
|
16735
|
+
targetIdentifier: external_exports.string().nullable(),
|
|
16736
|
+
targetTitle: external_exports.string(),
|
|
16737
|
+
targetExecutionEpoch: external_exports.number().int().positive(),
|
|
16738
|
+
current: external_exports.boolean(),
|
|
16739
|
+
prerequisiteIssueId: external_exports.string().uuid(),
|
|
16740
|
+
prerequisiteIdentifier: external_exports.string().nullable(),
|
|
16741
|
+
prerequisiteTitle: external_exports.string(),
|
|
16742
|
+
state: prerequisiteBindingStateSchema,
|
|
16743
|
+
reasonCode: external_exports.string().nullable(),
|
|
16744
|
+
accepted: external_exports.boolean(),
|
|
16745
|
+
targetWaits: external_exports.array(prerequisiteTargetWaitSchema),
|
|
16746
|
+
escalatedAt: external_exports.string().nullable()
|
|
16747
|
+
}).strict();
|
|
16748
|
+
var prerequisiteAttentionPageSchema = external_exports.object({
|
|
16749
|
+
items: external_exports.array(prerequisiteRelationshipSchema.extend({ attentionId: external_exports.string() }).strict()),
|
|
16750
|
+
nextCursor: external_exports.string().uuid().nullable()
|
|
16751
|
+
}).strict();
|
|
16752
|
+
var interactionSettlementResultSchema = external_exports.object({
|
|
16753
|
+
interactionId: external_exports.string().uuid(),
|
|
16754
|
+
resolutionRevision: external_exports.number().int().positive(),
|
|
16755
|
+
issueExecutionEpoch: external_exports.number().int().positive(),
|
|
16756
|
+
decision: external_exports.enum(["resume_current_issue", "remain_waiting", "terminate_issue", "dedicated_finalizer", "no_issue_transition"]),
|
|
16757
|
+
reasonCode: external_exports.string().min(1),
|
|
16758
|
+
continuationReceiptId: external_exports.string().uuid().nullable(),
|
|
16759
|
+
committedAt: external_exports.string().datetime({ offset: true })
|
|
16760
|
+
}).strict();
|
|
16761
|
+
var interactionSettlementResultsSchema = external_exports.array(interactionSettlementResultSchema);
|
|
16762
|
+
|
|
16707
16763
|
// ../shared/src/mirrorx-prerequisite-recovery.ts
|
|
16708
16764
|
var prerequisiteRecoveryActionSchema = external_exports.enum(["retry_release", "assign_or_reassign_target", "open_staffing_request", "stop_target", "retry", "replace_prerequisite"]);
|
|
16709
16765
|
var decisionBase = external_exports.object({
|
|
@@ -16749,6 +16805,7 @@ var prerequisiteRecoveryReceiptSchema = external_exports.object({
|
|
|
16749
16805
|
}
|
|
16750
16806
|
});
|
|
16751
16807
|
var issuePrerequisitesSchema = external_exports.object({
|
|
16808
|
+
targets: external_exports.array(prerequisiteRelationshipSchema),
|
|
16752
16809
|
companyId: external_exports.string().uuid(),
|
|
16753
16810
|
targetIssueId: external_exports.string().uuid(),
|
|
16754
16811
|
targetExecutionEpoch: external_exports.number().int().positive(),
|
|
@@ -16783,6 +16840,28 @@ var issuePrerequisitesSchema = external_exports.object({
|
|
|
16783
16840
|
}).strict())
|
|
16784
16841
|
}).strict();
|
|
16785
16842
|
|
|
16843
|
+
// ../shared/src/mirrorx-prerequisite-operations.ts
|
|
16844
|
+
var count = external_exports.number().int().nonnegative();
|
|
16845
|
+
var prerequisiteOperationsSchema = external_exports.object({
|
|
16846
|
+
asOf: external_exports.string().datetime(),
|
|
16847
|
+
windowHours: external_exports.literal(24),
|
|
16848
|
+
admission24h: external_exports.object({ sampleSize: count, rejectedCount: count, rejectionRate: external_exports.number().min(0).max(100), boardProposalCount: count }),
|
|
16849
|
+
boardDeferrals24h: count,
|
|
16850
|
+
parked: external_exports.object({ count, slaExceededCount: count, oldestWaitMs: count.nullable() }),
|
|
16851
|
+
churnIdentityCount: count,
|
|
16852
|
+
churn: external_exports.array(external_exports.object({
|
|
16853
|
+
targetIssueId: external_exports.string().uuid(),
|
|
16854
|
+
targetExecutionEpoch: external_exports.number().int().positive(),
|
|
16855
|
+
requirementKind: external_exports.string(),
|
|
16856
|
+
proposals24h: count,
|
|
16857
|
+
decisions24h: count,
|
|
16858
|
+
staleBeforeBind24h: count,
|
|
16859
|
+
generations24h: count,
|
|
16860
|
+
repeatGenerations24h: count,
|
|
16861
|
+
staleDimensions: external_exports.record(count)
|
|
16862
|
+
}))
|
|
16863
|
+
});
|
|
16864
|
+
|
|
16786
16865
|
// src/amaster-runtime-daemon.mjs
|
|
16787
16866
|
import { chmodSync as chmodSync7, copyFileSync as copyFileSync2, existsSync as existsSync17, lstatSync as lstatSync11, mkdirSync as mkdirSync9, mkdtempSync as mkdtempSync2, readFileSync as readFileSync18, readdirSync as readdirSync11, realpathSync as realpathSync8, renameSync as renameSync10, rmSync as rmSync9, statSync as statSync11, symlinkSync as symlinkSync2, unlinkSync as unlinkSync4, writeFileSync as writeFileSync11 } from "node:fs";
|
|
16788
16867
|
import { arch as arch3, homedir as homedir3, hostname as hostname2, platform as platform3, tmpdir } from "node:os";
|
|
@@ -30355,6 +30434,7 @@ function readWorkspaceStatus(cwd, opts = {}) {
|
|
|
30355
30434
|
}
|
|
30356
30435
|
|
|
30357
30436
|
// src/amaster-runtime-daemon/required-task-attachment.mjs
|
|
30437
|
+
var ORIGINAL_ONLY_PARSER_VERSION2 = "original-only-v1";
|
|
30358
30438
|
function text(value) {
|
|
30359
30439
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
30360
30440
|
}
|
|
@@ -30364,9 +30444,10 @@ function number(value) {
|
|
|
30364
30444
|
function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
30365
30445
|
if (input?.kind !== "attachment") return;
|
|
30366
30446
|
if (input.state !== "prepared") throw new Error("required_attachment_not_prepared");
|
|
30447
|
+
const originalOnly = text(input.parserVersion) === ORIGINAL_ONLY_PARSER_VERSION2;
|
|
30367
30448
|
const requirements = [
|
|
30368
30449
|
{ role: "original", assetId: text(input.assetId), sha256: text(input.sha256), byteSize: number(input.byteSize) },
|
|
30369
|
-
{ role: "sidecar", assetId: text(input.sidecarAssetId), sha256: text(input.sidecarSha256), byteSize: number(input.sidecarByteSize) }
|
|
30450
|
+
...originalOnly ? [] : [{ role: "sidecar", assetId: text(input.sidecarAssetId), sha256: text(input.sidecarSha256), byteSize: number(input.sidecarByteSize) }]
|
|
30370
30451
|
];
|
|
30371
30452
|
for (const requirement of requirements) {
|
|
30372
30453
|
if (!requirement.assetId || !/^[a-f0-9]{64}$/iu.test(requirement.sha256 ?? "") || requirement.byteSize === null) {
|
|
@@ -30381,7 +30462,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
|
30381
30462
|
}
|
|
30382
30463
|
|
|
30383
30464
|
// src/amaster-runtime-daemon.mjs
|
|
30384
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
30465
|
+
var CONNECTOR_VERSION = "0.1.1-beta.235";
|
|
30385
30466
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
30386
30467
|
var daemonRequire = createRequire(import.meta.url);
|
|
30387
30468
|
var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
|
@@ -32720,7 +32801,7 @@ function createLiveOutputLogger(config, command, executorKind, protectedValues =
|
|
|
32720
32801
|
await observationQueue;
|
|
32721
32802
|
if (observationError) throw observationError;
|
|
32722
32803
|
await queue;
|
|
32723
|
-
const suppressedSummaries = Object.entries(suppressedCounts).filter(([,
|
|
32804
|
+
const suppressedSummaries = Object.entries(suppressedCounts).filter(([, count2]) => count2 > 0).map(([stream, count2]) => ({ stream, count: count2 }));
|
|
32724
32805
|
if (suppressedSummaries.length > 0) {
|
|
32725
32806
|
const suppressedCount = suppressedSummaries.reduce((total, summary) => total + summary.count, 0);
|
|
32726
32807
|
await deliverLiveLog({
|
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.235";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|