@amaster.ai/employee-runtime-connector 0.1.1-beta.357 → 0.1.1-beta.359

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.
@@ -9152,15 +9152,31 @@ var frozenDiscoveryResearchV2Schema = external_exports.object({
9152
9152
  sourceBindingRevision: sha256Schema5,
9153
9153
  sourceBinding: discoveryResearchSourceBindingV2Schema,
9154
9154
  coverageMode: external_exports.literal("targeted_goal_criterion"),
9155
- maxRuntimeMs: positiveBoundedInteger(864e5),
9156
9155
  maxProviderReads: positiveBoundedInteger(100),
9157
- maxModelTokens: positiveBoundedInteger(1e7),
9158
- finalizationReserveTokens: positiveBoundedInteger(1e5),
9159
- researchTokenLimit: positiveBoundedInteger(1e7),
9156
+ // Deprecated compatibility fields. New V2 briefs omit these because task
9157
+ // execution budgets and executor timeouts own compute admission. Historical
9158
+ // frozen runs remain readable, but these values never gate provider reads.
9159
+ maxRuntimeMs: positiveBoundedInteger(864e5).optional(),
9160
+ maxModelTokens: positiveBoundedInteger(1e7).optional(),
9161
+ finalizationReserveTokens: positiveBoundedInteger(1e5).optional(),
9162
+ researchTokenLimit: positiveBoundedInteger(1e7).optional(),
9160
9163
  evidenceValidityMs: positiveBoundedInteger(31 * 24 * 60 * 60 * 1e3),
9161
9164
  startedAt: external_exports.string().datetime({ offset: true })
9162
9165
  }).strict().superRefine((value, ctx) => {
9163
- if (value.researchTokenLimit !== value.maxModelTokens - value.finalizationReserveTokens) {
9166
+ const legacyBudgetFields = [
9167
+ value.maxRuntimeMs,
9168
+ value.maxModelTokens,
9169
+ value.finalizationReserveTokens,
9170
+ value.researchTokenLimit
9171
+ ];
9172
+ const legacyBudgetFieldCount = legacyBudgetFields.filter((field) => field !== void 0).length;
9173
+ if (legacyBudgetFieldCount !== 0 && legacyBudgetFieldCount !== legacyBudgetFields.length) {
9174
+ ctx.addIssue({
9175
+ code: external_exports.ZodIssueCode.custom,
9176
+ path: ["maxRuntimeMs"],
9177
+ message: "Deprecated Discovery compute limits must be all present or all omitted"
9178
+ });
9179
+ } else if (value.researchTokenLimit !== void 0 && value.maxModelTokens !== void 0 && value.finalizationReserveTokens !== void 0 && value.researchTokenLimit !== value.maxModelTokens - value.finalizationReserveTokens) {
9164
9180
  ctx.addIssue({
9165
9181
  code: external_exports.ZodIssueCode.custom,
9166
9182
  path: ["researchTokenLimit"],
@@ -11179,6 +11195,41 @@ var createIssueLabelSchema = external_exports.object({
11179
11195
  name: external_exports.string().trim().min(1).max(48),
11180
11196
  color: external_exports.string().regex(/^#(?:[0-9a-fA-F]{6})$/, "Color must be a 6-digit hex value")
11181
11197
  });
11198
+ var executionStageDecisionTargetSchema = external_exports.object({
11199
+ executionEpoch: external_exports.number().int().nonnegative(),
11200
+ stageId: external_exports.string().trim().min(1).max(160),
11201
+ stageType: external_exports.enum(["review", "approval"]),
11202
+ participant: external_exports.discriminatedUnion("type", [
11203
+ external_exports.object({
11204
+ type: external_exports.literal("user"),
11205
+ userId: external_exports.string().trim().min(1)
11206
+ }).strict(),
11207
+ external_exports.object({
11208
+ type: external_exports.literal("agent"),
11209
+ agentId: external_exports.string().uuid()
11210
+ }).strict()
11211
+ ]),
11212
+ expectedLastDecisionId: external_exports.string().uuid().nullable(),
11213
+ guardRevision: external_exports.string().regex(/^stage-decision:v1:[0-9a-f]{64}$/)
11214
+ }).strict();
11215
+ var executionStageDecisionCommandObjectSchema = external_exports.object({
11216
+ target: executionStageDecisionTargetSchema,
11217
+ outcome: external_exports.enum(["approved", "changes_requested"]),
11218
+ reviewEvidence: issueExecutionReviewEvidenceSchema.optional()
11219
+ }).strict();
11220
+ function validateExecutionStageDecisionEvidence(value, ctx) {
11221
+ if (value.target.stageType === "approval" && value.reviewEvidence) {
11222
+ ctx.addIssue({
11223
+ code: external_exports.ZodIssueCode.custom,
11224
+ message: "Approval stages do not accept review evidence",
11225
+ path: ["reviewEvidence"]
11226
+ });
11227
+ }
11228
+ }
11229
+ var executionStageDecisionCommandSchema = executionStageDecisionCommandObjectSchema.superRefine(validateExecutionStageDecisionEvidence);
11230
+ var executionStageDecisionRequestSchema = executionStageDecisionCommandObjectSchema.extend({
11231
+ comment: multilineTextSchema.pipe(external_exports.string().min(1))
11232
+ }).strict().superRefine(validateExecutionStageDecisionEvidence);
11182
11233
  var updateIssueSchema = createIssueBaseSchema.omit({
11183
11234
  creationProfile: true,
11184
11235
  taskIntent: true,
@@ -11196,6 +11247,7 @@ var updateIssueSchema = createIssueBaseSchema.omit({
11196
11247
  comment: multilineTextSchema.pipe(external_exports.string().min(1)).optional(),
11197
11248
  reviewRequest: issueReviewRequestSchema.optional().nullable(),
11198
11249
  reviewEvidence: issueExecutionReviewEvidenceSchema.optional(),
11250
+ executionDecision: executionStageDecisionCommandSchema.optional(),
11199
11251
  reopen: external_exports.boolean().optional(),
11200
11252
  resume: external_exports.boolean().optional(),
11201
11253
  interrupt: external_exports.boolean().optional(),
@@ -11354,7 +11406,8 @@ var addIssueCommentSchema = external_exports.object({
11354
11406
  reopen: external_exports.boolean().optional(),
11355
11407
  resume: external_exports.boolean().optional(),
11356
11408
  interrupt: external_exports.boolean().optional(),
11357
- continuation: external_exports.literal("successor_execution_epoch").optional()
11409
+ continuation: external_exports.literal("successor_execution_epoch").optional(),
11410
+ executionDecision: executionStageDecisionCommandSchema.optional()
11358
11411
  }).superRefine((value, ctx) => {
11359
11412
  if (value.continuation === "successor_execution_epoch" && (value.reopen === true || value.resume === true || value.interrupt === true)) {
11360
11413
  ctx.addIssue({
@@ -14015,7 +14068,8 @@ var MIRRORX_ISSUE_HANDLING_LIST_BUCKETS = [
14015
14068
  "result_disposition",
14016
14069
  "execution_recovery",
14017
14070
  "dependency_blocker",
14018
- "external_wait"
14071
+ "external_wait",
14072
+ "execution_review"
14019
14073
  ];
14020
14074
  var mirrorXIssueHandlingListBucketSchema = external_exports.enum(
14021
14075
  MIRRORX_ISSUE_HANDLING_LIST_BUCKETS
@@ -14108,6 +14162,15 @@ var externalWaitTargetSchema = external_exports.object({
14108
14162
  reviewAt: external_exports.string().datetime().nullable(),
14109
14163
  issueUpdatedAt: external_exports.string().datetime()
14110
14164
  }).strict();
14165
+ var executionStageTargetSchema = external_exports.object({
14166
+ surface: external_exports.literal("execution_stage"),
14167
+ executionEpoch: external_exports.number().int().nonnegative(),
14168
+ stageId: external_exports.string().trim().min(1).max(160),
14169
+ stageType: external_exports.enum(["review", "approval"]),
14170
+ participant: external_exports.object({ type: external_exports.literal("user"), userId: external_exports.string().trim().min(1) }).strict(),
14171
+ expectedLastDecisionId: external_exports.string().uuid().nullable(),
14172
+ guardRevision: external_exports.string().regex(/^stage-decision:v1:[0-9a-f]{64}$/)
14173
+ }).strict();
14111
14174
  var mirrorXIssueHandlingTargetSchema = external_exports.discriminatedUnion("surface", [
14112
14175
  interactionTargetSchema,
14113
14176
  acceptanceTargetSchema,
@@ -14119,7 +14182,8 @@ var mirrorXIssueHandlingTargetSchema = external_exports.discriminatedUnion("surf
14119
14182
  continuationTargetSchema,
14120
14183
  runTargetSchema,
14121
14184
  routineTargetSchema,
14122
- externalWaitTargetSchema
14185
+ externalWaitTargetSchema,
14186
+ executionStageTargetSchema
14123
14187
  ]);
14124
14188
  var MIRRORX_ISSUE_HANDLING_INTENT_KINDS = [
14125
14189
  "respond",
@@ -14140,7 +14204,7 @@ var mirrorXIssueHandlingIntentSchema = external_exports.object({
14140
14204
  }).strict().superRefine((value, ctx) => {
14141
14205
  const allowedSurfacesByKind = {
14142
14206
  respond: ["interaction", "external_wait"],
14143
- decide: ["interaction", "acceptance", "approval"],
14207
+ decide: ["interaction", "acceptance", "approval", "execution_stage"],
14144
14208
  assign_or_activate: ["task_governance"],
14145
14209
  clear_dependency: ["dependency_issue"],
14146
14210
  recover: ["recovery", "continuation"],
@@ -14198,6 +14262,7 @@ var mirrorXIssueCurrentProgressSchema = external_exports.discriminatedUnion("cod
14198
14262
  progressBranch("completion_settling", "active", "business_completion_requested"),
14199
14263
  progressBranch("automatic_finalizing", "active", "evidence_auto_reconciliation_pending"),
14200
14264
  progressBranch("waiting_review", "waiting", "pending_review"),
14265
+ progressBranch("execution_review_pending", "needs_action", "pending_review"),
14201
14266
  progressBranch("waiting_human_owner", "waiting", "human_owned"),
14202
14267
  progressBranch("waiting_blocker", "waiting", "waiting_on_blocker"),
14203
14268
  progressBranch("waiting_external_input", "needs_action", "external_input_required"),
@@ -14245,13 +14310,16 @@ var mirrorXIssueHandlingOperationSchema = external_exports.enum([
14245
14310
  "force_done",
14246
14311
  "accept",
14247
14312
  "update_wait",
14248
- "resolve_wait"
14313
+ "resolve_wait",
14314
+ "decide_stage"
14249
14315
  ]);
14250
14316
  var mirrorXIssueHandlingOperationCapabilitySchema = external_exports.discriminatedUnion("state", [
14251
14317
  external_exports.object({ state: external_exports.literal("allowed"), reasonCode: external_exports.null() }).strict(),
14252
14318
  external_exports.object({ state: external_exports.literal("forbidden"), reasonCode: external_exports.literal("actor_not_authorized") }).strict(),
14253
14319
  external_exports.object({ state: external_exports.literal("unavailable"), reasonCode: external_exports.enum([
14254
14320
  "target_stale",
14321
+ "stage_target_stale",
14322
+ "stage_evidence_not_ready",
14255
14323
  "assignee_missing",
14256
14324
  "review_path_missing",
14257
14325
  "company_paused",
@@ -14294,7 +14362,8 @@ var mirrorXIssueHandlingProjectionSchema = external_exports.object({
14294
14362
  continuation: ["continue"],
14295
14363
  task_governance: ["activate"],
14296
14364
  acceptance: ["accept"],
14297
- external_wait: ["update_wait", "resolve_wait"]
14365
+ external_wait: ["update_wait", "resolve_wait"],
14366
+ execution_stage: ["decide_stage"]
14298
14367
  };
14299
14368
  const allowed = value.primaryIntent ? surfaceOperations[value.primaryIntent.target.surface] ?? [] : [];
14300
14369
  if (Object.keys(value.operations.capabilities).some((operation) => !allowed.includes(operation))) {
@@ -14330,6 +14399,7 @@ var mirrorXIssueHandlingProjectionSchema = external_exports.object({
14330
14399
  "decide:interaction": ["confirmation_acceptance", "goal_acceptance_linkage"],
14331
14400
  "decide:acceptance": ["confirmation_acceptance"],
14332
14401
  "decide:approval": ["approval"],
14402
+ "decide:execution_stage": ["execution_review"],
14333
14403
  "assign_or_activate:task_governance": ["task_governance"],
14334
14404
  "resume:tree_control": ["task_governance"],
14335
14405
  "clear_dependency:dependency_issue": ["dependency_blocker"],
@@ -34001,7 +34071,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
34001
34071
  }
34002
34072
 
34003
34073
  // src/amaster-runtime-daemon.mjs
34004
- var CONNECTOR_VERSION = "0.1.1-beta.357";
34074
+ var CONNECTOR_VERSION = "0.1.1-beta.359";
34005
34075
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
34006
34076
  var SUPPORTED_TASK_CONTEXT_VERSIONS = Object.freeze([TASK_CONTEXT_MANIFEST_VERSION, TASK_CONTEXT_V2]);
34007
34077
  var daemonRequire = createRequire(import.meta.url);
@@ -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.357";
10
+ const CONNECTOR_VERSION = "0.1.1-beta.359";
11
11
 
12
12
  const CONFIG_KEY_MAP = new Map([
13
13
  ["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amaster.ai/employee-runtime-connector",
3
- "version": "0.1.1-beta.357",
3
+ "version": "0.1.1-beta.359",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",