@amaster.ai/employee-runtime-connector 0.1.1-beta.141 → 0.1.1-beta.143

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.
@@ -5465,6 +5465,36 @@ var companyStageSchema = external_exports.enum(COMPANY_STAGES);
5465
5465
  var coldStartStageSchema = external_exports.enum(COLD_START_STAGES);
5466
5466
  var coldStartExpectedActionSchema = external_exports.enum(COMPANY_COLD_START_ACTIONS);
5467
5467
  var companyColdStartFactSlotSchema = external_exports.enum(COMPANY_COLD_START_FACT_SLOTS);
5468
+ var COLD_START_FACT_COVERAGE_DISPOSITIONS = [
5469
+ "established",
5470
+ "explicit_unknown",
5471
+ "not_applicable"
5472
+ ];
5473
+ var coldStartFactCoverageDispositionSchema = external_exports.enum(
5474
+ COLD_START_FACT_COVERAGE_DISPOSITIONS
5475
+ );
5476
+ var COLD_START_FACT_COVERAGE_DISPOSITION_POLICY = {
5477
+ goal_metric_baseline: ["established", "explicit_unknown"],
5478
+ customer_problem_evidence: ["established", "explicit_unknown", "not_applicable"],
5479
+ offer_delivery_baseline: ["established", "explicit_unknown", "not_applicable"],
5480
+ operating_risk_baseline: ["established", "explicit_unknown", "not_applicable"],
5481
+ near_term_priority_ownership: ["established"],
5482
+ reusable_company_artifact: ["established"]
5483
+ };
5484
+ var coldStartFactCoverageReceiptSchema = external_exports.object({
5485
+ slot: companyColdStartFactSlotSchema,
5486
+ disposition: coldStartFactCoverageDispositionSchema,
5487
+ verdictAuthority: external_exports.literal("human_only"),
5488
+ outcomeId: external_exports.string().uuid(),
5489
+ acceptanceId: external_exports.string().uuid(),
5490
+ acceptanceRevision: external_exports.number().int().positive(),
5491
+ evidenceRefs: external_exports.array(external_exports.string().trim().min(1).max(512)).min(1).max(100)
5492
+ }).strict();
5493
+ var coldStartFactCoverageVerdictSchema = external_exports.object({
5494
+ slot: companyColdStartFactSlotSchema,
5495
+ disposition: coldStartFactCoverageDispositionSchema,
5496
+ evidenceRefs: external_exports.array(external_exports.string().trim().min(1).max(512)).min(1).max(100)
5497
+ }).strict();
5468
5498
  var companyColdStartWorksetItemDispositionSchema = external_exports.enum([
5469
5499
  "pending",
5470
5500
  "accepted_outcome",
@@ -5593,6 +5623,164 @@ var mirrorxCurrentRunContractSchema = external_exports.object({
5593
5623
  }).strict()
5594
5624
  }).strict();
5595
5625
 
5626
+ // ../shared/src/amaster-runtime-user-presentation.ts
5627
+ var ERROR_PRESENTATIONS = {
5628
+ control_plane_cancel_requested: {
5629
+ label: "\u5DF2\u6309\u8981\u6C42\u53D6\u6D88",
5630
+ summary: "\u672C\u6B21\u6267\u884C\u5DF2\u6309\u53D6\u6D88\u8BF7\u6C42\u5B89\u5168\u7ED3\u675F\u3002",
5631
+ nextAction: null,
5632
+ tone: "neutral"
5633
+ },
5634
+ runtime_connector_cancel_requested: {
5635
+ label: "\u5DF2\u6309\u8981\u6C42\u53D6\u6D88",
5636
+ summary: "\u672C\u6B21\u6267\u884C\u5DF2\u6309\u53D6\u6D88\u8BF7\u6C42\u5B89\u5168\u7ED3\u675F\u3002",
5637
+ nextAction: null,
5638
+ tone: "neutral"
5639
+ },
5640
+ runtime_connector_terminate_requested: {
5641
+ label: "\u5DF2\u6309\u8981\u6C42\u7EC8\u6B62",
5642
+ summary: "\u672C\u6B21\u6267\u884C\u5DF2\u6309\u7EC8\u6B62\u8BF7\u6C42\u7ED3\u675F\u3002",
5643
+ nextAction: null,
5644
+ tone: "warning"
5645
+ },
5646
+ runtime_connector_budget_paused: {
5647
+ label: "\u53D7\u9884\u7B97\u9650\u5236\u6682\u505C",
5648
+ summary: "\u4EFB\u52A1\u56E0\u9884\u7B97\u9650\u5236\u6682\u505C\uFF0C\u5F53\u524D\u4E0D\u4F1A\u7EE7\u7EED\u6D88\u8017\u989D\u5EA6\u3002",
5649
+ nextAction: "\u6062\u590D\u53EF\u7528\u9884\u7B97\u540E\u91CD\u65B0\u6267\u884C\u3002",
5650
+ tone: "warning"
5651
+ },
5652
+ runtime_connector_task_paused: {
5653
+ label: "\u4EFB\u52A1\u5DF2\u6682\u505C",
5654
+ summary: "\u4EFB\u52A1\u5904\u4E8E\u6682\u505C\u72B6\u6001\uFF0C\u672C\u6B21\u6267\u884C\u5DF2\u5B89\u5168\u7ED3\u675F\u3002",
5655
+ nextAction: "\u6062\u590D\u4EFB\u52A1\u540E\u91CD\u65B0\u6267\u884C\u3002",
5656
+ tone: "warning"
5657
+ },
5658
+ runtime_connector_agent_paused: {
5659
+ label: "\u8D1F\u8D23\u4EBA\u5DF2\u6682\u505C",
5660
+ summary: "\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u5904\u4E8E\u6682\u505C\u72B6\u6001\uFF0C\u672C\u6B21\u6267\u884C\u5DF2\u5B89\u5168\u7ED3\u675F\u3002",
5661
+ nextAction: "\u6062\u590D\u8D1F\u8D23\u4EBA\u540E\u91CD\u65B0\u6267\u884C\u3002",
5662
+ tone: "warning"
5663
+ },
5664
+ runtime_connector_execution_superseded: {
5665
+ label: "\u6267\u884C\u5DF2\u88AB\u66FF\u4EE3",
5666
+ summary: "\u8FD9\u6B21\u6267\u884C\u5DF2\u7ECF\u88AB\u66F4\u65B0\u7684\u4EFB\u52A1\u72B6\u6001\u6216\u540E\u7EED\u6267\u884C\u66FF\u4EE3\uFF0C\u65E0\u9700\u6309\u6545\u969C\u6062\u590D\u3002",
5667
+ nextAction: null,
5668
+ tone: "neutral"
5669
+ },
5670
+ runtime_connector_unavailable: {
5671
+ label: "\u8FD0\u884C\u73AF\u5883\u5DF2\u65AD\u5F00",
5672
+ summary: "\u8FD0\u884C\u5668\u8FDE\u63A5\u4E0D\u53EF\u7528\uFF0C\u672C\u6B21\u6267\u884C\u672A\u80FD\u7EE7\u7EED\u3002",
5673
+ nextAction: "\u6062\u590D\u8FD0\u884C\u5668\u8FDE\u63A5\u540E\u91CD\u8BD5\uFF0C\u6216\u68C0\u67E5\u8FD0\u884C\u73AF\u5883\u3002",
5674
+ tone: "danger"
5675
+ },
5676
+ runtime_connector_not_bound: {
5677
+ label: "\u8FD0\u884C\u73AF\u5883\u672A\u7ED1\u5B9A",
5678
+ summary: "\u8BE5\u7845\u57FA\u5458\u5DE5\u9700\u8981\u7531\u6258\u7BA1\u8FD0\u884C\u5668\u6267\u884C\uFF0C\u4F46\u5F53\u524D\u7F3A\u5C11\u6709\u6548\u8FD0\u884C\u7ED1\u5B9A\u3002",
5679
+ nextAction: "\u7B49\u5F85\u7CFB\u7EDF\u4FEE\u590D\u8FD0\u884C\u7ED1\u5B9A\u540E\u91CD\u65B0\u6267\u884C\uFF0C\u6216\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u8FD0\u884C\u5668\u72B6\u6001\u3002",
5680
+ tone: "danger"
5681
+ },
5682
+ runtime_connector_cancellation_unclassified: {
5683
+ label: "\u53D6\u6D88\u539F\u56E0\u5F85\u786E\u8BA4",
5684
+ summary: "\u672C\u6B21\u6267\u884C\u5DF2\u505C\u6B62\uFF0C\u4F46\u7CFB\u7EDF\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u5177\u4F53\u53D6\u6D88\u539F\u56E0\u3002",
5685
+ nextAction: "\u67E5\u770B\u5173\u8054\u8FD0\u884C\u4E2D\u7684\u6280\u672F\u8BE6\u60C5\uFF0C\u786E\u8BA4\u662F\u5426\u9700\u8981\u6062\u590D\u3002",
5686
+ tone: "warning"
5687
+ },
5688
+ agent_not_invokable: {
5689
+ label: "\u8D1F\u8D23\u4EBA\u5F53\u524D\u4E0D\u53EF\u6267\u884C",
5690
+ summary: "\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u5F53\u524D\u65E0\u6CD5\u542F\u52A8\u8FD0\u884C\u3002",
5691
+ nextAction: "\u6062\u590D\u8D1F\u8D23\u4EBA\u72B6\u6001\u3001\u9884\u7B97\u6216\u6267\u884C\u6743\u9650\u540E\u91CD\u8BD5\u3002",
5692
+ tone: "warning"
5693
+ },
5694
+ runtime_connector_authority_invalid: {
5695
+ label: "\u6267\u884C\u6388\u6743\u5DF2\u5931\u6548",
5696
+ summary: "\u8FD0\u884C\u6240\u9700\u7684\u6388\u6743\u4E0A\u4E0B\u6587\u5DF2\u7ECF\u5931\u6548\uFF0C\u672C\u6B21\u6267\u884C\u672A\u80FD\u7EE7\u7EED\u3002",
5697
+ nextAction: "\u5237\u65B0\u6388\u6743\u6216\u91CD\u65B0\u53D1\u8D77\u4EFB\u52A1\u3002",
5698
+ tone: "danger"
5699
+ },
5700
+ platform_execution_context_credential_unavailable: {
5701
+ label: "\u6267\u884C\u6388\u6743\u4E0D\u53EF\u7528",
5702
+ summary: "\u542F\u52A8\u672C\u6B21\u8FD0\u884C\u6240\u9700\u7684\u6388\u6743\u4E0A\u4E0B\u6587\u4E0D\u53EF\u7528\uFF0C\u7CFB\u7EDF\u5DF2\u505C\u6B62\u6267\u884C\u3002",
5703
+ nextAction: "\u6062\u590D\u8FD0\u884C\u5668\u6216\u5E73\u53F0\u6388\u6743\u540E\u91CD\u8BD5\u3002",
5704
+ tone: "danger"
5705
+ },
5706
+ runtime_connector_timeout: {
5707
+ label: "\u6267\u884C\u8D85\u65F6",
5708
+ summary: "\u672C\u6B21\u6267\u884C\u8D85\u8FC7\u5141\u8BB8\u65F6\u95F4\uFF0C\u7CFB\u7EDF\u5DF2\u7ECF\u505C\u6B62\u8FD0\u884C\u3002",
5709
+ nextAction: "\u68C0\u67E5\u4EFB\u52A1\u89C4\u6A21\u548C\u8FD0\u884C\u73AF\u5883\u540E\u91CD\u8BD5\u3002",
5710
+ tone: "warning"
5711
+ },
5712
+ timeout: {
5713
+ label: "\u6267\u884C\u8D85\u65F6",
5714
+ summary: "\u672C\u6B21\u6267\u884C\u8D85\u8FC7\u5141\u8BB8\u65F6\u95F4\uFF0C\u7CFB\u7EDF\u5DF2\u7ECF\u505C\u6B62\u8FD0\u884C\u3002",
5715
+ nextAction: "\u68C0\u67E5\u4EFB\u52A1\u89C4\u6A21\u548C\u8FD0\u884C\u73AF\u5883\u540E\u91CD\u8BD5\u3002",
5716
+ tone: "warning"
5717
+ },
5718
+ runtime_connector_process_lost: {
5719
+ label: "\u6267\u884C\u8FDB\u7A0B\u5DF2\u4E2D\u65AD",
5720
+ summary: "\u7CFB\u7EDF\u5931\u53BB\u4E86\u6B63\u5728\u6267\u884C\u7684\u672C\u673A\u8FDB\u7A0B\uFF0C\u672C\u6B21\u6267\u884C\u672A\u80FD\u7EE7\u7EED\u3002",
5721
+ nextAction: "\u68C0\u67E5\u8FD0\u884C\u5668\u548C\u672C\u673A\u8FDB\u7A0B\u72B6\u6001\u540E\u91CD\u8BD5\u3002",
5722
+ tone: "danger"
5723
+ },
5724
+ process_lost: {
5725
+ label: "\u6267\u884C\u8FDB\u7A0B\u5DF2\u4E2D\u65AD",
5726
+ summary: "\u7CFB\u7EDF\u5931\u53BB\u4E86\u6B63\u5728\u6267\u884C\u7684\u8FDB\u7A0B\uFF0C\u672C\u6B21\u6267\u884C\u672A\u80FD\u7EE7\u7EED\u3002",
5727
+ nextAction: "\u68C0\u67E5\u8FD0\u884C\u73AF\u5883\u540E\u91CD\u8BD5\u3002",
5728
+ tone: "danger"
5729
+ },
5730
+ workspace_validation_failed: {
5731
+ label: "\u5DE5\u4F5C\u533A\u4E0D\u53EF\u7528",
5732
+ summary: "\u4EFB\u52A1\u5DE5\u4F5C\u533A\u672A\u901A\u8FC7\u6821\u9A8C\uFF0C\u7CFB\u7EDF\u5DF2\u5728\u6267\u884C\u524D\u505C\u6B62\u8FD0\u884C\u3002",
5733
+ nextAction: "\u4FEE\u590D\u5DE5\u4F5C\u533A\u8DEF\u5F84\u6216 Git checkout \u540E\u91CD\u8BD5\u3002",
5734
+ tone: "danger"
5735
+ },
5736
+ adapter_failed: {
5737
+ label: "\u6267\u884C\u73AF\u5883\u5F02\u5E38",
5738
+ summary: "\u6267\u884C\u73AF\u5883\u672A\u80FD\u5B8C\u6210\u672C\u6B21\u4EFB\u52A1\u3002",
5739
+ nextAction: "\u67E5\u770B\u5173\u8054\u8FD0\u884C\u4E2D\u7684\u6280\u672F\u8BE6\u60C5\uFF0C\u4FEE\u590D\u73AF\u5883\u540E\u91CD\u8BD5\u3002",
5740
+ tone: "danger"
5741
+ },
5742
+ pi_provider_auth_required: {
5743
+ label: "\u6A21\u578B\u670D\u52A1\u9700\u8981\u767B\u5F55",
5744
+ summary: "\u5F53\u524D\u6A21\u578B\u670D\u52A1\u7F3A\u5C11\u6709\u6548\u767B\u5F55\u72B6\u6001\uFF0C\u4EFB\u52A1\u6682\u65F6\u65E0\u6CD5\u6267\u884C\u3002",
5745
+ nextAction: "\u5B8C\u6210\u6A21\u578B\u670D\u52A1\u767B\u5F55\u540E\u91CD\u8BD5\u3002",
5746
+ tone: "warning"
5747
+ },
5748
+ pi_provider_quota_exhausted: {
5749
+ label: "\u6A21\u578B\u989D\u5EA6\u4E0D\u8DB3",
5750
+ summary: "\u5F53\u524D Credits \u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u5DF2\u8FDB\u5165\u989D\u5EA6\u6062\u590D\u7B49\u5F85\u3002",
5751
+ nextAction: "\u5145\u503C\u540E\u7CFB\u7EDF\u4F1A\u5B9A\u65F6\u68C0\u67E5\u5E76\u81EA\u52A8\u6062\u590D\uFF0C\u65E0\u9700\u624B\u52A8\u91CD\u8BD5\u3002",
5752
+ tone: "warning"
5753
+ },
5754
+ issue_assignee_changed: {
5755
+ label: "\u4EFB\u52A1\u5DF2\u6539\u6D3E",
5756
+ summary: "\u65E7\u8D1F\u8D23\u4EBA\u7684\u6392\u961F\u8FD0\u884C\u5DF2\u53D6\u6D88\uFF0C\u65B0\u8D1F\u8D23\u4EBA\u4F1A\u81EA\u52A8\u63A5\u624B\u3002",
5757
+ nextAction: null,
5758
+ tone: "neutral"
5759
+ },
5760
+ pi_executor_invalid_output: {
5761
+ label: "\u6A21\u578B\u54CD\u5E94\u4E0D\u5B8C\u6574",
5762
+ summary: "\u6A21\u578B\u6267\u884C\u5668\u8FD4\u56DE\u7684\u54CD\u5E94\u4E0D\u5B8C\u6574\uFF0C\u7CFB\u7EDF\u65E0\u6CD5\u786E\u8BA4\u672C\u6B21\u8F93\u51FA\u53EF\u4EE5\u5B89\u5168\u91C7\u4FE1\u3002",
5763
+ nextAction: "\u91CD\u65B0\u6267\u884C\uFF1B\u5982\u679C\u8FDE\u7EED\u51FA\u73B0\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B\u670D\u52A1\u94FE\u8DEF\u3002",
5764
+ actionTitle: "\u5C1D\u8BD5\u91CD\u65B0\u6267\u884C\uFF0C\u5982\u679C\u8FDE\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B\u670D\u52A1",
5765
+ tone: "danger"
5766
+ },
5767
+ setup_failed: {
5768
+ label: "\u6267\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25",
5769
+ summary: "\u4EFB\u52A1\u542F\u52A8\u65F6\u6267\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u7CFB\u7EDF\u672A\u80FD\u5F00\u59CB\u672C\u6B21\u6267\u884C\u3002",
5770
+ nextAction: "\u68C0\u67E5\u8FD0\u884C\u5668\u3001\u5DE5\u4F5C\u533A\u548C\u542F\u52A8\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",
5771
+ actionTitle: "\u4FEE\u590D\u6267\u884C\u73AF\u5883\u540E\u91CD\u8BD5",
5772
+ tone: "danger"
5773
+ },
5774
+ runtime_artifact_ingest_failed: {
5775
+ label: "\u4EA7\u7269\u8BB0\u5F55\u5931\u8D25",
5776
+ summary: "\u672C\u6B21\u8FD0\u884C\u7ED3\u675F\u65F6\u672A\u80FD\u628A\u4EA7\u7269\u8BB0\u5F55\u5230\u7CFB\u7EDF\uFF0C\u4EFB\u52A1\u7ED3\u679C\u9700\u8981\u91CD\u65B0\u6838\u5BF9\u3002",
5777
+ nextAction: "\u67E5\u770B\u8FD0\u884C\u8BE6\u60C5\u5E76\u91CD\u65B0\u8BFB\u53D6\u4EA7\u7269\uFF1B\u5982\u679C\u4EFB\u52A1\u5DF2\u901A\u8FC7\u5176\u4ED6\u65B9\u5F0F\u5B8C\u6210\uFF0C\u53EF\u4EBA\u5DE5\u786E\u8BA4\u7ED3\u679C\u3002",
5778
+ actionTitle: "\u91CD\u65B0\u6838\u5BF9\u4EA7\u7269\u8BB0\u5F55",
5779
+ tone: "danger"
5780
+ }
5781
+ };
5782
+ var AMASTER_RUNTIME_USER_PRESENTATION_ERROR_CODES = Object.freeze(Object.keys(ERROR_PRESENTATIONS).sort());
5783
+
5596
5784
  // ../shared/src/company-profile-facts.ts
5597
5785
  var COMPANY_PROFILE_FIELD_KEYS = ["tagline", "industry", "companySize", "coreBusiness", "stage", "targetCustomers", "products", "currentPriority", "businessModel", "regions", "brandTone", "constraints"];
5598
5786
  var PROFILE_FACT_BASES = ["company_provided", "user_confirmed", "source_backed", "model_inferred", "legacy_acknowledged"];
@@ -6436,6 +6624,7 @@ var decideRuntimeBusinessOutcomeAcceptanceSchema = external_exports.object({
6436
6624
  rejectedIssueStatus: external_exports.literal("cancelled").nullable().optional(),
6437
6625
  reason: external_exports.string().trim().max(4e3).nullable().optional(),
6438
6626
  evidenceRefs: external_exports.array(runtimeOutcomeEvidenceRefSchema).min(1).max(100),
6627
+ coldStartFactCoverage: external_exports.array(coldStartFactCoverageVerdictSchema).min(1).max(6).optional(),
6439
6628
  deliveryManifest: issueDeliveryManifestIdentitySchema.nullable()
6440
6629
  }).strict().superRefine((value, ctx) => {
6441
6630
  if (value.decision !== "accepted" && !value.reason?.trim()) {
@@ -6465,6 +6654,32 @@ var decideRuntimeBusinessOutcomeAcceptanceSchema = external_exports.object({
6465
6654
  message: "evidenceRefs must be unique"
6466
6655
  });
6467
6656
  }
6657
+ if (value.decision !== "accepted" && value.coldStartFactCoverage !== void 0) {
6658
+ ctx.addIssue({
6659
+ code: external_exports.ZodIssueCode.custom,
6660
+ path: ["coldStartFactCoverage"],
6661
+ message: "coldStartFactCoverage is only valid for accepted decisions"
6662
+ });
6663
+ }
6664
+ const coverageSlots = /* @__PURE__ */ new Set();
6665
+ for (const [index, verdict] of (value.coldStartFactCoverage ?? []).entries()) {
6666
+ if (coverageSlots.has(verdict.slot)) {
6667
+ ctx.addIssue({
6668
+ code: external_exports.ZodIssueCode.custom,
6669
+ path: ["coldStartFactCoverage", index, "slot"],
6670
+ message: "coldStartFactCoverage slots must be unique"
6671
+ });
6672
+ }
6673
+ coverageSlots.add(verdict.slot);
6674
+ const allowed = COLD_START_FACT_COVERAGE_DISPOSITION_POLICY[verdict.slot];
6675
+ if (!allowed.includes(verdict.disposition)) {
6676
+ ctx.addIssue({
6677
+ code: external_exports.ZodIssueCode.custom,
6678
+ path: ["coldStartFactCoverage", index, "disposition"],
6679
+ message: "cold_start_fact_disposition_not_allowed"
6680
+ });
6681
+ }
6682
+ }
6468
6683
  });
6469
6684
  var runtimeBusinessOutcomeReceiptSchema = external_exports.object({
6470
6685
  outcomeId: external_exports.string().uuid(),
@@ -7750,24 +7965,6 @@ var companyRecommendationDecisionInputSchema = external_exports.object({
7750
7965
  expectedRevision: external_exports.number().int().positive()
7751
7966
  }).strict();
7752
7967
 
7753
- // ../shared/src/validators/first-business-activation.ts
7754
- var uniqueIds = (values, ctx) => {
7755
- if (new Set(values).size !== values.length) {
7756
- ctx.addIssue({
7757
- code: external_exports.ZodIssueCode.custom,
7758
- path: ["routineIds"],
7759
- message: "Routine ids must be unique"
7760
- });
7761
- }
7762
- };
7763
- var firstBusinessActivationCreateInputSchema = external_exports.object({
7764
- routineIds: external_exports.array(external_exports.string().uuid()).max(20).default([])
7765
- }).strict().superRefine((value, ctx) => uniqueIds(value.routineIds, ctx));
7766
- var firstBusinessActivationCorrectionInputSchema = external_exports.object({
7767
- expectedRevision: external_exports.number().int().positive()
7768
- }).strict();
7769
- var firstBusinessActivationIdempotencyKeySchema = external_exports.string().trim().min(1).max(200).regex(/^[A-Za-z0-9][A-Za-z0-9._:-]*$/u);
7770
-
7771
7968
  // ../shared/src/validators/amaster-notifications.ts
7772
7969
  var feishuWebhookSchema = external_exports.string().trim().max(2048).superRefine((value, ctx) => {
7773
7970
  if (!value) return;
@@ -8208,6 +8405,114 @@ var ISSUE_RECOVERY_ACTION_KINDS = [
8208
8405
  "issue_graph_liveness",
8209
8406
  "finalization_operator"
8210
8407
  ];
8408
+ var ISSUE_PROGRESS_FINDING_CODES = [
8409
+ "terminal",
8410
+ "pending_governance",
8411
+ "pending_interaction",
8412
+ "pending_approval",
8413
+ "pending_review",
8414
+ "missing_successful_run_disposition",
8415
+ "open_recovery_issue",
8416
+ "external_wait",
8417
+ "human_owned",
8418
+ "active_run",
8419
+ "runtime_command_live",
8420
+ "runtime_command_waiting",
8421
+ "runtime_command_recovery",
8422
+ "queued_continuation",
8423
+ "scheduled_retry",
8424
+ "scheduled_monitor",
8425
+ "waiting_on_blocker",
8426
+ "graph_blocked",
8427
+ "recovery_action",
8428
+ "graph_recovery",
8429
+ "missing_review_path",
8430
+ "agent_owned_no_live_path",
8431
+ "unassigned_no_owner"
8432
+ ];
8433
+ var ISSUE_PROGRESS_STATES = [
8434
+ "live",
8435
+ "waiting",
8436
+ "needs_recovery",
8437
+ "human_owned",
8438
+ "terminal",
8439
+ "silent_dead_state"
8440
+ ];
8441
+ var ISSUE_PROGRESS_LIVENESS_PATHS = [
8442
+ "active_run",
8443
+ "runtime_command",
8444
+ "queued_continuation",
8445
+ "pending_approval",
8446
+ "pending_review",
8447
+ "pending_interaction",
8448
+ "external_wait",
8449
+ "scheduled_retry",
8450
+ "scheduled_monitor",
8451
+ "waiting_on_blocker",
8452
+ "recovery_action",
8453
+ "missing_review_path",
8454
+ "human_owner",
8455
+ "terminal",
8456
+ "none"
8457
+ ];
8458
+ var ISSUE_PROGRESS_NEXT_STEP_KINDS = [
8459
+ "run",
8460
+ "runtime_command",
8461
+ "wakeup",
8462
+ "approval",
8463
+ "review",
8464
+ "interaction",
8465
+ "scheduled_retry",
8466
+ "scheduled_monitor",
8467
+ "blocker",
8468
+ "recovery_action",
8469
+ "human_owner",
8470
+ "terminal",
8471
+ "none"
8472
+ ];
8473
+ var ISSUE_PROGRESS_REASON_CODES = [
8474
+ "terminal_issue",
8475
+ "pending_governance",
8476
+ "pending_interaction",
8477
+ "pending_approval",
8478
+ "pending_review",
8479
+ "missing_successful_run_disposition",
8480
+ "open_recovery_issue",
8481
+ "external_wait",
8482
+ "human_owned",
8483
+ "active_run",
8484
+ "runtime_command_live",
8485
+ "runtime_command_waiting",
8486
+ "runtime_command_needs_recovery",
8487
+ "queued_continuation",
8488
+ "scheduled_retry",
8489
+ "scheduled_monitor",
8490
+ "waiting_on_blocker",
8491
+ "graph_blocked",
8492
+ "active_recovery_action",
8493
+ "graph_recovery_required",
8494
+ "missing_review_path",
8495
+ "agent_owned_no_live_path",
8496
+ "unassigned_no_owner"
8497
+ ];
8498
+ var ISSUE_PROGRESS_SOURCE_REF_KINDS = [
8499
+ "issue",
8500
+ "heartbeat_run",
8501
+ "runtime_command",
8502
+ "runtime_connector",
8503
+ "wakeup_request",
8504
+ "approval",
8505
+ "issue_thread_interaction",
8506
+ "successful_run_handoff",
8507
+ "external_wait",
8508
+ "recovery_issue",
8509
+ "scheduled_retry",
8510
+ "scheduled_monitor",
8511
+ "blocker",
8512
+ "recovery_action",
8513
+ "graph_finding",
8514
+ "execution_state"
8515
+ ];
8211
8516
  var ISSUE_RECOVERY_ACTION_STATUSES = [
8212
8517
  "active",
8213
8518
  "escalated",
@@ -8906,114 +9211,6 @@ var issueDelegationContextSchema = external_exports.object({
8906
9211
  }).strict();
8907
9212
 
8908
9213
  // ../shared/src/validators/issue.ts
8909
- var ISSUE_PROGRESS_FINDING_CODES = [
8910
- "terminal",
8911
- "pending_governance",
8912
- "pending_interaction",
8913
- "pending_approval",
8914
- "pending_review",
8915
- "missing_successful_run_disposition",
8916
- "open_recovery_issue",
8917
- "external_wait",
8918
- "human_owned",
8919
- "active_run",
8920
- "runtime_command_live",
8921
- "runtime_command_waiting",
8922
- "runtime_command_recovery",
8923
- "queued_continuation",
8924
- "scheduled_retry",
8925
- "scheduled_monitor",
8926
- "waiting_on_blocker",
8927
- "graph_blocked",
8928
- "recovery_action",
8929
- "graph_recovery",
8930
- "missing_review_path",
8931
- "agent_owned_no_live_path",
8932
- "unassigned_no_owner"
8933
- ];
8934
- var ISSUE_PROGRESS_STATES = [
8935
- "live",
8936
- "waiting",
8937
- "needs_recovery",
8938
- "human_owned",
8939
- "terminal",
8940
- "silent_dead_state"
8941
- ];
8942
- var ISSUE_PROGRESS_LIVENESS_PATHS = [
8943
- "active_run",
8944
- "runtime_command",
8945
- "queued_continuation",
8946
- "pending_approval",
8947
- "pending_review",
8948
- "pending_interaction",
8949
- "external_wait",
8950
- "scheduled_retry",
8951
- "scheduled_monitor",
8952
- "waiting_on_blocker",
8953
- "recovery_action",
8954
- "missing_review_path",
8955
- "human_owner",
8956
- "terminal",
8957
- "none"
8958
- ];
8959
- var ISSUE_PROGRESS_NEXT_STEP_KINDS = [
8960
- "run",
8961
- "runtime_command",
8962
- "wakeup",
8963
- "approval",
8964
- "review",
8965
- "interaction",
8966
- "scheduled_retry",
8967
- "scheduled_monitor",
8968
- "blocker",
8969
- "recovery_action",
8970
- "human_owner",
8971
- "terminal",
8972
- "none"
8973
- ];
8974
- var ISSUE_PROGRESS_REASON_CODES = [
8975
- "terminal_issue",
8976
- "pending_governance",
8977
- "pending_interaction",
8978
- "pending_approval",
8979
- "pending_review",
8980
- "missing_successful_run_disposition",
8981
- "open_recovery_issue",
8982
- "external_wait",
8983
- "human_owned",
8984
- "active_run",
8985
- "runtime_command_live",
8986
- "runtime_command_waiting",
8987
- "runtime_command_needs_recovery",
8988
- "queued_continuation",
8989
- "scheduled_retry",
8990
- "scheduled_monitor",
8991
- "waiting_on_blocker",
8992
- "graph_blocked",
8993
- "active_recovery_action",
8994
- "graph_recovery_required",
8995
- "missing_review_path",
8996
- "agent_owned_no_live_path",
8997
- "unassigned_no_owner"
8998
- ];
8999
- var ISSUE_PROGRESS_SOURCE_REF_KINDS = [
9000
- "issue",
9001
- "heartbeat_run",
9002
- "runtime_command",
9003
- "runtime_connector",
9004
- "wakeup_request",
9005
- "approval",
9006
- "issue_thread_interaction",
9007
- "successful_run_handoff",
9008
- "external_wait",
9009
- "recovery_issue",
9010
- "scheduled_retry",
9011
- "scheduled_monitor",
9012
- "blocker",
9013
- "recovery_action",
9014
- "graph_finding",
9015
- "execution_state"
9016
- ];
9017
9214
  var requiredReasonString = external_exports.string().trim().min(1);
9018
9215
  var ISSUE_PROGRESS_REASON_PARAM_SCHEMAS = {
9019
9216
  terminal_issue: external_exports.object({ status: requiredReasonString }).passthrough(),
@@ -9587,10 +9784,16 @@ var createIssueBaseSchema = external_exports.object({
9587
9784
  instructions: multilineTextSchema.optional().nullable()
9588
9785
  }).strict().optional().nullable()
9589
9786
  });
9787
+ var createIssueLabelNamesSchema = external_exports.array(external_exports.string().trim().min(1).max(48)).max(3).describe(
9788
+ "Optional existing or new label names. Use zero to three reusable work categories: prefer exact existing Company labels that fit the taxonomy, otherwise use a shared business-domain label or a stable industry-specific topic grounded in verified Company context. Do not use entity names, Issue kinds, workflow metadata, one-off deliverables, file formats, or vague buckets as labels. The Server creates missing names and reuses exact Company matches."
9789
+ );
9590
9790
  var createIssueInputSchema = createIssueBaseSchema.extend({
9591
- status: createIssueBaseSchema.shape.status.optional()
9791
+ status: createIssueBaseSchema.shape.status.optional(),
9792
+ labels: createIssueLabelNamesSchema.optional()
9592
9793
  });
9593
- var createIssueSchema = withCreateIssueStatusDefault(createIssueBaseSchema);
9794
+ var createIssueSchema = withCreateIssueStatusDefault(createIssueBaseSchema.extend({
9795
+ labels: createIssueLabelNamesSchema.optional()
9796
+ }));
9594
9797
  var upsertIssueWatchdogSchema = external_exports.object({
9595
9798
  agentId: external_exports.string().uuid(),
9596
9799
  instructions: multilineTextSchema.optional().nullable()
@@ -9612,7 +9815,8 @@ var createChildIssueSchema = withCreateIssueStatusDefault(createIssueBaseSchema.
9612
9815
  delegation: issueDelegationInputSchema,
9613
9816
  acceptanceCriteria: external_exports.array(external_exports.string().trim().min(1).max(500)).max(20).optional(),
9614
9817
  blockParentUntilDone: external_exports.boolean().optional().default(false),
9615
- inputWorkProductIds: external_exports.array(external_exports.string().uuid()).max(50).optional()
9818
+ inputWorkProductIds: external_exports.array(external_exports.string().uuid()).max(50).optional(),
9819
+ labels: createIssueLabelNamesSchema.optional()
9616
9820
  }));
9617
9821
  var createAcceptedPlanDecompositionSchema = external_exports.object({
9618
9822
  acceptedPlanRevisionId: external_exports.string().uuid(),
@@ -12034,10 +12238,8 @@ var operatingRoundLogSchema = external_exports.object({
12034
12238
  // ../shared/src/business-task-enrollment.ts
12035
12239
  var GOVERNED_BUSINESS_TASK_ORIGIN_KINDS = [
12036
12240
  "mirrorx_discovery_candidate",
12037
- "first_business_activation",
12038
12241
  "ceo_periodic_discovery",
12039
12242
  "operator_business_task",
12040
- "company_strategy_first_wave",
12041
12243
  "company_strategy_cold_start"
12042
12244
  ];
12043
12245
  var BUSINESS_TASK_ENROLLMENT_READ_STATES = [
@@ -12084,32 +12286,6 @@ var governedBusinessTaskLineageSchema = external_exports.discriminatedUnion("kin
12084
12286
  sourceDocumentId: external_exports.string().uuid(),
12085
12287
  sourceRevisionId: external_exports.string().uuid()
12086
12288
  }).strict(),
12087
- external_exports.object({
12088
- kind: external_exports.literal("first_business_activation"),
12089
- activationId: external_exports.string().uuid(),
12090
- recommendationSetId: external_exports.string().uuid(),
12091
- recommendationSnapshotId: external_exports.string().uuid(),
12092
- recommendationSnapshotHash: sha256Schema5,
12093
- candidateRef: stableIdentitySchema2,
12094
- priorityOrder: external_exports.number().int().min(1).max(3),
12095
- dependencyCandidateRef: stableIdentitySchema2.nullable(),
12096
- diagnosisId: external_exports.string().uuid(),
12097
- diagnosisRevision: external_exports.number().int().positive(),
12098
- diagnosisSnapshotId: external_exports.string().uuid(),
12099
- briefDocumentRevisionId: external_exports.string().uuid(),
12100
- knowledgeAsOf: external_exports.string().datetime({ offset: true })
12101
- }).strict(),
12102
- external_exports.object({
12103
- kind: external_exports.literal("company_strategy_first_wave"),
12104
- activationId: external_exports.string().uuid(),
12105
- initializationId: external_exports.string().uuid(),
12106
- strategyIssueId: external_exports.string().uuid(),
12107
- goalId: external_exports.string().uuid(),
12108
- strategyDocumentRevisionId: external_exports.string().uuid(),
12109
- itemClientKey: stableIdentitySchema2,
12110
- priorityOrder: external_exports.number().int().min(1).max(10),
12111
- dependencyItemClientKey: stableIdentitySchema2.nullable()
12112
- }).strict(),
12113
12289
  external_exports.object({
12114
12290
  kind: external_exports.literal("company_strategy_cold_start"),
12115
12291
  worksetId: external_exports.string().uuid(),
@@ -22866,7 +23042,7 @@ function governedBusinessStateSection(context, input) {
22866
23042
  const hasChildIssues = Array.isArray(context.childIssueSummaries) && context.childIssueSummaries.length > 0;
22867
23043
  const rules = [
22868
23044
  "This is bounded Server-owned read-side truth. It does not grant mutation authority and it is not a Delivery Manifest claim.",
22869
- "Recommendation, First Business Activation, and Business Task Enrollment may be claimed only when the supplied state contains the exact matching Server ref. Issue and Document are not Business Task Enrollment.",
23045
+ "Recommendation, Cold-start Workset, and Business Task Enrollment may be claimed only when the supplied state contains the exact matching Server ref. Issue and Document are not Business Task Enrollment.",
22870
23046
  hasUnsupportedObjects ? "An object kind listed under unsupported has no governed record type. You may create or update a clearly labeled tracker/document, but never claim a formal record or receipt for that kind." : null,
22871
23047
  hasChildIssues ? "For parent aggregation, read Server-owned governed state; never accept child final prose, an Issue, or a Document as a formal object receipt." : null,
22872
23048
  hasUnavailableRead ? "An unavailable read does not prove an instance is absent. Unrelated work may continue, but formal-object completion claims must remain fail-closed until a managed read succeeds." : null,
@@ -29402,7 +29578,7 @@ function createSourceCompletionStopPolicy({
29402
29578
  }
29403
29579
 
29404
29580
  // src/amaster-runtime-daemon.mjs
29405
- var CONNECTOR_VERSION = "0.1.1-beta.141";
29581
+ var CONNECTOR_VERSION = "0.1.1-beta.143";
29406
29582
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
29407
29583
  var SOURCE_ACQUISITION_CAPABILITY2 = source_acquisition_compatibility_default.profileVersion;
29408
29584
  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.141";
10
+ const CONNECTOR_VERSION = "0.1.1-beta.143";
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.141",
3
+ "version": "0.1.1-beta.143",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",