@amaster.ai/employee-runtime-connector 0.1.1-beta.153 → 0.1.1-beta.155
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.
|
@@ -5397,7 +5397,7 @@ var COMPANY_COLD_START_ACTIONS = [
|
|
|
5397
5397
|
"operate",
|
|
5398
5398
|
"repair_cold_start_invariant"
|
|
5399
5399
|
];
|
|
5400
|
-
var
|
|
5400
|
+
var COMPANY_COLD_START_REQUIRED_FACT_SLOTS_COMPAT = [
|
|
5401
5401
|
"goal_metric_baseline",
|
|
5402
5402
|
"customer_problem_evidence",
|
|
5403
5403
|
"offer_delivery_baseline",
|
|
@@ -5405,15 +5405,31 @@ var COMPANY_COLD_START_FACT_SLOTS = [
|
|
|
5405
5405
|
"near_term_priority_ownership",
|
|
5406
5406
|
"reusable_company_artifact"
|
|
5407
5407
|
];
|
|
5408
|
+
var COMPANY_COLD_START_REQUIRED_FACT_SLOTS_CURRENT = [
|
|
5409
|
+
...COMPANY_COLD_START_REQUIRED_FACT_SLOTS_COMPAT,
|
|
5410
|
+
"internal_system_landscape"
|
|
5411
|
+
];
|
|
5412
|
+
var COMPANY_COLD_START_FACT_SLOTS = COMPANY_COLD_START_REQUIRED_FACT_SLOTS_CURRENT;
|
|
5408
5413
|
var companyColdStartPhaseSchema = external_exports.enum(COMPANY_COLD_START_PHASES);
|
|
5409
5414
|
var companyStageSchema = external_exports.enum(COMPANY_STAGES);
|
|
5410
5415
|
var coldStartStageSchema = external_exports.enum(COLD_START_STAGES);
|
|
5411
5416
|
var coldStartExpectedActionSchema = external_exports.enum(COMPANY_COLD_START_ACTIONS);
|
|
5412
5417
|
var companyColdStartFactSlotSchema = external_exports.enum(COMPANY_COLD_START_FACT_SLOTS);
|
|
5413
|
-
var companyColdStartFactSlotsSchema = external_exports.array(companyColdStartFactSlotSchema).min(1).max(
|
|
5418
|
+
var companyColdStartFactSlotsSchema = external_exports.array(companyColdStartFactSlotSchema).min(1).max(6).transform((slots) => {
|
|
5414
5419
|
const selected = new Set(slots);
|
|
5415
5420
|
return COMPANY_COLD_START_FACT_SLOTS.filter((slot) => selected.has(slot));
|
|
5416
5421
|
});
|
|
5422
|
+
function isExactFactSlotSnapshot(actual, expected) {
|
|
5423
|
+
return actual.length === expected.length && actual.every((slot, index) => slot === expected[index]);
|
|
5424
|
+
}
|
|
5425
|
+
var companyColdStartRequiredFactSlotsSchema = external_exports.array(companyColdStartFactSlotSchema).superRefine((slots, context) => {
|
|
5426
|
+
if (!isExactFactSlotSnapshot(slots, COMPANY_COLD_START_REQUIRED_FACT_SLOTS_COMPAT) && !isExactFactSlotSnapshot(slots, COMPANY_COLD_START_REQUIRED_FACT_SLOTS_CURRENT)) {
|
|
5427
|
+
context.addIssue({
|
|
5428
|
+
code: external_exports.ZodIssueCode.custom,
|
|
5429
|
+
message: "cold_start_required_fact_slots_not_canonical"
|
|
5430
|
+
});
|
|
5431
|
+
}
|
|
5432
|
+
});
|
|
5417
5433
|
var COLD_START_FACT_COVERAGE_DISPOSITIONS = [
|
|
5418
5434
|
"established",
|
|
5419
5435
|
"explicit_unknown",
|
|
@@ -5428,7 +5444,8 @@ var COLD_START_FACT_COVERAGE_DISPOSITION_POLICY = {
|
|
|
5428
5444
|
offer_delivery_baseline: ["established", "explicit_unknown", "not_applicable"],
|
|
5429
5445
|
operating_risk_baseline: ["established", "explicit_unknown", "not_applicable"],
|
|
5430
5446
|
near_term_priority_ownership: ["established"],
|
|
5431
|
-
reusable_company_artifact: ["established"]
|
|
5447
|
+
reusable_company_artifact: ["established"],
|
|
5448
|
+
internal_system_landscape: ["established", "explicit_unknown", "not_applicable"]
|
|
5432
5449
|
};
|
|
5433
5450
|
var coldStartFactCoverageReceiptSchema = external_exports.object({
|
|
5434
5451
|
slot: companyColdStartFactSlotSchema,
|
|
@@ -5457,7 +5474,7 @@ var companyColdStartWorksetItemReadSchema = external_exports.object({
|
|
|
5457
5474
|
issueId: external_exports.string().uuid(),
|
|
5458
5475
|
enrollmentId: external_exports.string().uuid(),
|
|
5459
5476
|
priorityOrder: external_exports.number().int().positive(),
|
|
5460
|
-
factSlots:
|
|
5477
|
+
factSlots: companyColdStartFactSlotsSchema,
|
|
5461
5478
|
disposition: companyColdStartWorksetItemDispositionSchema,
|
|
5462
5479
|
dispositionReceiptId: external_exports.string().min(1).max(512).nullable()
|
|
5463
5480
|
}).strict();
|
|
@@ -5468,6 +5485,7 @@ var companyColdStartWorksetReadSchema = external_exports.object({
|
|
|
5468
5485
|
goalId: external_exports.string().uuid(),
|
|
5469
5486
|
organizationVersion: external_exports.number().int().nonnegative(),
|
|
5470
5487
|
authorityRevision: external_exports.number().int().positive(),
|
|
5488
|
+
requiredFactSlots: companyColdStartRequiredFactSlotsSchema,
|
|
5471
5489
|
priorityIssueId: external_exports.string().uuid(),
|
|
5472
5490
|
items: external_exports.array(companyColdStartWorksetItemReadSchema).min(1)
|
|
5473
5491
|
}).strict();
|
|
@@ -11168,7 +11186,12 @@ var issueDeliveryColdStartFactCoverageContextSchema = external_exports.object({
|
|
|
11168
11186
|
worksetItemId: uuidSchema3,
|
|
11169
11187
|
factSlots: external_exports.array(external_exports.object({
|
|
11170
11188
|
slot: companyColdStartFactSlotSchema,
|
|
11171
|
-
allowedDispositions: external_exports.array(coldStartFactCoverageDispositionSchema).min(1).max(3)
|
|
11189
|
+
allowedDispositions: external_exports.array(coldStartFactCoverageDispositionSchema).min(1).max(3),
|
|
11190
|
+
notApplicableWarning: external_exports.object({
|
|
11191
|
+
code: external_exports.literal("current_systems_present"),
|
|
11192
|
+
message: external_exports.string().min(1).max(500),
|
|
11193
|
+
evidenceRef: external_exports.string().min(1).max(512)
|
|
11194
|
+
}).strict().nullable().optional()
|
|
11172
11195
|
}).strict()).min(1).max(6)
|
|
11173
11196
|
}).strict();
|
|
11174
11197
|
var issueDeliveryAcceptanceReadModelSchema = external_exports.object({
|
|
@@ -13485,6 +13508,7 @@ var agentRuntimeConfigSchema = external_exports.object({
|
|
|
13485
13508
|
cheap: agentModelProfileConfigSchema.optional()
|
|
13486
13509
|
}).strict().optional()
|
|
13487
13510
|
}).catchall(external_exports.unknown());
|
|
13511
|
+
var agentRoleIdentityStringSchema = external_exports.string().min(1);
|
|
13488
13512
|
var agentRoleSchema = external_exports.preprocess(
|
|
13489
13513
|
(value) => typeof value === "string" ? normalizeAgentRoleId(value) ?? value : value,
|
|
13490
13514
|
external_exports.enum(AGENT_ROLE_IDS)
|
|
@@ -14835,7 +14859,7 @@ var pluginManagedAgentDeclarationSchema = external_exports.object({
|
|
|
14835
14859
|
message: "agentKey must start with a lowercase alphanumeric and contain only lowercase letters, digits, dots, colons, underscores, or hyphens"
|
|
14836
14860
|
}),
|
|
14837
14861
|
displayName: external_exports.string().min(1).max(100),
|
|
14838
|
-
role:
|
|
14862
|
+
role: agentRoleIdentityStringSchema.max(100).optional(),
|
|
14839
14863
|
title: external_exports.string().max(200).nullable().optional(),
|
|
14840
14864
|
icon: external_exports.string().max(100).nullable().optional(),
|
|
14841
14865
|
capabilities: external_exports.string().max(2e3).nullable().optional(),
|
|
@@ -23370,6 +23394,7 @@ var DEADLINE_POSTURE_GUARD = "If a named time window or milestone is missed, ski
|
|
|
23370
23394
|
var MIN_PROMPT_BUDGET_CHARS = 8192;
|
|
23371
23395
|
var MAX_RESOLVED_DEPENDENCY_REQUIRED_READS = 20;
|
|
23372
23396
|
var MAX_EXACT_ISSUE_EVIDENCE_REFS = 20;
|
|
23397
|
+
var COMPANY_INITIALIZATION_ORIGIN_KIND = "company_initialization";
|
|
23373
23398
|
function promptBudgetError(code, message) {
|
|
23374
23399
|
const error = new Error(message);
|
|
23375
23400
|
error.code = code;
|
|
@@ -24413,7 +24438,10 @@ function runtimeAuthorizationText(context, mode, {
|
|
|
24413
24438
|
] : [],
|
|
24414
24439
|
"Never use create_interaction, request_confirmation, comment metadata, or free text to authorize a runtime action class."
|
|
24415
24440
|
].join("\n") : "";
|
|
24416
|
-
const
|
|
24441
|
+
const initializationAuthorization = asRecord(envelope.initializationAuthorization);
|
|
24442
|
+
const initializationAuthority = asRecord(context.companyInitializationAuthority);
|
|
24443
|
+
const initializationPlanAuthorizationWithoutExactReplay = readString(envelope.sourceKind) === COMPANY_INITIALIZATION_ORIGIN_KIND && readString(initializationAuthorization.runId) && readString(initializationAuthorization.signature) && readString(initializationAuthority.schemaVersion) === "mirrorx.company-initialization-authority.v1" && (!Array.isArray(envelope.authorizedOrganizationIntents) || envelope.authorizedOrganizationIntents.length === 0);
|
|
24444
|
+
const exactOrganizationReplay = replayAlreadyInTask || initializationPlanAuthorizationWithoutExactReplay ? "" : renderExactOrganizationIntentReplayBlock(envelope);
|
|
24417
24445
|
return [
|
|
24418
24446
|
completionContract,
|
|
24419
24447
|
businessOutcomeOwnershipContract,
|
|
@@ -29912,7 +29940,7 @@ function createSourceCompletionStopPolicy({
|
|
|
29912
29940
|
}
|
|
29913
29941
|
|
|
29914
29942
|
// src/amaster-runtime-daemon.mjs
|
|
29915
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
29943
|
+
var CONNECTOR_VERSION = "0.1.1-beta.155";
|
|
29916
29944
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
29917
29945
|
var SOURCE_ACQUISITION_CAPABILITY2 = source_acquisition_compatibility_default.profileVersion;
|
|
29918
29946
|
var daemonRequire = createRequire(import.meta.url);
|
|
@@ -33284,6 +33312,7 @@ function runExitClosurePrompt(state, options = {}) {
|
|
|
33284
33312
|
const runId = commandRunId(command) ?? "unknown";
|
|
33285
33313
|
const closureStrategy = readString(response.closureStrategy) ?? "select_issue_disposition";
|
|
33286
33314
|
const closurePhase = readString(response.closurePhase) ?? "disposition_closure";
|
|
33315
|
+
const authoritativeNowIso = readString(options.nowIso) ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
33287
33316
|
const workDispositionClosure = closureStrategy === "record_work_disposition" || closurePhase === "work_disposition_closure";
|
|
33288
33317
|
const describeRequired = options.describeRequired !== false;
|
|
33289
33318
|
const allowedActions = Array.isArray(response.allowedActions) ? response.allowedActions.filter((value) => typeof value === "string") : [];
|
|
@@ -33298,6 +33327,8 @@ function runExitClosurePrompt(state, options = {}) {
|
|
|
33298
33327
|
describeRequired ? workDispositionClosure ? "Call runtime_action.describe exactly once for record_work_disposition, then use exactly one runtime_action.submit mutation with that described shape." : "Choose one Server-allowed action, call runtime_action.describe exactly once for that action type, then use exactly one runtime_action.submit mutation with that described shape." : "Use exactly one runtime_action.submit mutation with the already-issued phase-specific schema.",
|
|
33299
33328
|
workDispositionClosure ? "The Server selected record_work_disposition as the only closure strategy. For this already-productive source run, record execute_inline with truthful source-run evidence; do not also mutate issue status or create an interaction. After command terminalization, the Server writes the Business Outcome and owns the matching Board review or terminal-state transition." : closurePhase === "live_path_closure" ? "The Server selected Durable Live Path closure. Establish exactly one typed external wait, scheduled monitor, or Board disposition interaction; a comment or Work Disposition does not satisfy this gate." : closurePhase === "terminal_disposition_closure" ? "The Server selected terminal disposition closure. Establish the authorized terminal state or one Board decision interaction; do not create a new live wait merely to avoid terminalization." : "The Server selected an Issue disposition closure. Choose update_parent, create_interaction (not suggest_tasks), or add_comment only when a comment is truly the intended exit path. A comment alone does not establish completion.",
|
|
33300
33329
|
workDispositionClosure ? `Use evidenceRefs ["run:${runId}", "command:${state.commandId}"], structure.deliverableType "runtime_command_result", structure.deliverableKey "runtime-command-${state.commandId}", and structure.acceptanceMethodCode "governed_business_outcome". Supply a concise truthful reason based only on the primary turn summary.` : null,
|
|
33330
|
+
closurePhase === "live_path_closure" ? `Authoritative current time for this closure turn: ${authoritativeNowIso}` : null,
|
|
33331
|
+
closurePhase === "live_path_closure" ? "For schedule_monitor or upsert_external_wait, copy all time fields verbatim from the runtime_action.describe submitExample.action. If you derive a time instead, derive it only from the authoritative current time above; never use remembered or earlier-context dates." : null,
|
|
33301
33332
|
`The idempotencyKey must be runtime-command-closure:${state.commandId}${closurePhase === "work_disposition_closure" ? ":work-disposition" : closurePhase === "live_path_closure" ? ":live-path" : closurePhase === "terminal_disposition_closure" ? ":terminal-disposition" : ""}.`,
|
|
33302
33333
|
describeRequired ? "Do not call runtime_action.plan or runtime_action.commit. Do not call runtime_action.describe more than once. Stop immediately after the one allowed mutation returns." : "Do not call runtime_action.describe, runtime_action.plan, or runtime_action.commit. Stop immediately after the one allowed mutation returns."
|
|
33303
33334
|
].filter(Boolean).join("\n\n");
|
|
@@ -33517,7 +33548,10 @@ async function executeRunExitClosureTurn(config, inputState, options = {}) {
|
|
|
33517
33548
|
execution = await runExecutor(executable, closureArgs, {
|
|
33518
33549
|
cwd,
|
|
33519
33550
|
env,
|
|
33520
|
-
stdin: runExitClosurePrompt(state, {
|
|
33551
|
+
stdin: runExitClosurePrompt(state, {
|
|
33552
|
+
describeRequired,
|
|
33553
|
+
nowIso: (/* @__PURE__ */ new Date()).toISOString()
|
|
33554
|
+
}),
|
|
33521
33555
|
timeoutSeconds: Math.max(1, readNumber(executionConfig.timeoutSeconds, config.executorTimeoutSeconds)),
|
|
33522
33556
|
maxOutputBytes: Math.max(1, readNumber(executionConfig.maxOutputBytes, config.executorMaxOutputBytes)),
|
|
33523
33557
|
maxRssMb: Math.max(0, readNumber(executionConfig.maxRssMb, config.executorMaxRssMb)),
|
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.155";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|