@amaster.ai/employee-runtime-connector 0.1.1-beta.140 → 0.1.1-beta.142
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.
- package/dist/amaster-runtime-daemon.mjs +374 -174
- package/dist/amaster-runtime.mjs +1 -1
- package/package.json +1 -1
|
@@ -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(),
|
|
@@ -12034,10 +12231,8 @@ var operatingRoundLogSchema = external_exports.object({
|
|
|
12034
12231
|
// ../shared/src/business-task-enrollment.ts
|
|
12035
12232
|
var GOVERNED_BUSINESS_TASK_ORIGIN_KINDS = [
|
|
12036
12233
|
"mirrorx_discovery_candidate",
|
|
12037
|
-
"first_business_activation",
|
|
12038
12234
|
"ceo_periodic_discovery",
|
|
12039
12235
|
"operator_business_task",
|
|
12040
|
-
"company_strategy_first_wave",
|
|
12041
12236
|
"company_strategy_cold_start"
|
|
12042
12237
|
];
|
|
12043
12238
|
var BUSINESS_TASK_ENROLLMENT_READ_STATES = [
|
|
@@ -12084,32 +12279,6 @@ var governedBusinessTaskLineageSchema = external_exports.discriminatedUnion("kin
|
|
|
12084
12279
|
sourceDocumentId: external_exports.string().uuid(),
|
|
12085
12280
|
sourceRevisionId: external_exports.string().uuid()
|
|
12086
12281
|
}).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
12282
|
external_exports.object({
|
|
12114
12283
|
kind: external_exports.literal("company_strategy_cold_start"),
|
|
12115
12284
|
worksetId: external_exports.string().uuid(),
|
|
@@ -15741,7 +15910,7 @@ var completeCompanyCreationReviewSchema = external_exports.object({
|
|
|
15741
15910
|
// src/amaster-runtime-daemon.mjs
|
|
15742
15911
|
import { chmodSync as chmodSync7, copyFileSync as copyFileSync2, existsSync as existsSync15, lstatSync as lstatSync9, mkdirSync as mkdirSync10, mkdtempSync as mkdtempSync2, readFileSync as readFileSync17, readdirSync as readdirSync11, realpathSync as realpathSync7, renameSync as renameSync9, rmSync as rmSync9, statSync as statSync10, symlinkSync as symlinkSync2, unlinkSync as unlinkSync3, writeFileSync as writeFileSync11 } from "node:fs";
|
|
15743
15912
|
import { arch as arch3, homedir as homedir3, hostname as hostname2, platform as platform3, tmpdir } from "node:os";
|
|
15744
|
-
import { basename as basename6, delimiter as delimiter3, dirname as dirname11, extname as extname3, isAbsolute as
|
|
15913
|
+
import { basename as basename6, delimiter as delimiter3, dirname as dirname11, extname as extname3, isAbsolute as isAbsolute10, join as join16, relative as relative8, resolve as resolve14 } from "node:path";
|
|
15745
15914
|
import { spawn, spawnSync as spawnSync5 } from "node:child_process";
|
|
15746
15915
|
|
|
15747
15916
|
// src/amaster-runtime-daemon/common.mjs
|
|
@@ -22294,6 +22463,7 @@ function inspectSourceAcquisitionProfile(profile, expectedRunId) {
|
|
|
22294
22463
|
|
|
22295
22464
|
// src/amaster-runtime-daemon/prompt-compiler.mjs
|
|
22296
22465
|
import { createHash as createHash7 } from "node:crypto";
|
|
22466
|
+
import { isAbsolute as isAbsolute4 } from "node:path";
|
|
22297
22467
|
|
|
22298
22468
|
// src/amaster-runtime-daemon/current-run-contract.mjs
|
|
22299
22469
|
import { createHash as createHash6 } from "node:crypto";
|
|
@@ -22531,6 +22701,30 @@ function jsonCharLength(value) {
|
|
|
22531
22701
|
return String(value).length;
|
|
22532
22702
|
}
|
|
22533
22703
|
}
|
|
22704
|
+
function runtimeTemplateCatalogSection(input) {
|
|
22705
|
+
const catalog = asRecord(input.runtimeTemplateCatalog);
|
|
22706
|
+
if (Object.keys(catalog).length === 0) return null;
|
|
22707
|
+
const targetDir = readString(catalog.targetDir);
|
|
22708
|
+
const manifestSha256 = readString(catalog.manifestSha256);
|
|
22709
|
+
if (catalog.status !== "ready" || !targetDir || !isAbsolute4(targetDir) || targetDir.length > 4096 || /[\0\r\n`]/u.test(targetDir) || !Number.isSafeInteger(catalog.fileCount) || catalog.fileCount < 1 || !manifestSha256 || !/^[a-f0-9]{64}$/u.test(manifestSha256)) {
|
|
22710
|
+
throw promptBudgetError(
|
|
22711
|
+
"runtime_template_catalog_projection_invalid",
|
|
22712
|
+
"Runtime Template Catalog projection requires one attested ready catalog"
|
|
22713
|
+
);
|
|
22714
|
+
}
|
|
22715
|
+
return {
|
|
22716
|
+
sourceRef: "runtime_template_catalog_attestation",
|
|
22717
|
+
content: [
|
|
22718
|
+
"The runtime connector attested and materialized the artifact template catalog before this command was leased.",
|
|
22719
|
+
`- exact catalog path: \`${targetDir}\``,
|
|
22720
|
+
`- file count: ${catalog.fileCount}`,
|
|
22721
|
+
`- manifest SHA-256: ${manifestSha256}`,
|
|
22722
|
+
"This exact catalog is the run's only authorized read-only path outside the execution workspace for template matching. Copy a selected template into the workspace before editing it.",
|
|
22723
|
+
"Use this exact path directly when listing or reading templates. Do not rely on `AMASTER_RUNTIME_TEMPLATES_ROOT` being inherited by out-of-process tools; the path above is the model-facing authority for this run.",
|
|
22724
|
+
"If this exact path is missing or unreadable, report a runtime gap. Do not silently fall back to another directory or treat the failure as a verified template miss."
|
|
22725
|
+
].join("\n")
|
|
22726
|
+
};
|
|
22727
|
+
}
|
|
22534
22728
|
function estimatedTokens(chars) {
|
|
22535
22729
|
return Math.ceil(chars / 4);
|
|
22536
22730
|
}
|
|
@@ -22841,7 +23035,7 @@ function governedBusinessStateSection(context, input) {
|
|
|
22841
23035
|
const hasChildIssues = Array.isArray(context.childIssueSummaries) && context.childIssueSummaries.length > 0;
|
|
22842
23036
|
const rules = [
|
|
22843
23037
|
"This is bounded Server-owned read-side truth. It does not grant mutation authority and it is not a Delivery Manifest claim.",
|
|
22844
|
-
"Recommendation,
|
|
23038
|
+
"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.",
|
|
22845
23039
|
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,
|
|
22846
23040
|
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,
|
|
22847
23041
|
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,
|
|
@@ -24172,6 +24366,7 @@ ${resolvedDependencies.details.content}` : resolvedDependencies.details.content
|
|
|
24172
24366
|
const taskContextAuthority = taskContextAuthoritySection(context);
|
|
24173
24367
|
const continuationPostconditionGap = continuationPostconditionGapSection(context, input);
|
|
24174
24368
|
const companyInitializationAuthority = companyInitializationAuthoritySection(context);
|
|
24369
|
+
const runtimeTemplateCatalog = runtimeTemplateCatalogSection(input);
|
|
24175
24370
|
const rawSections = [
|
|
24176
24371
|
{ name: "recovery_instruction", title: "Recovery Instruction", priority: 100, sourceRef: `run:${input.runId ?? "unknown"}`, content: completeRecoveryInstruction, truncationReason: completeRecoveryInstruction ? null : "mode_selection" },
|
|
24177
24372
|
{ name: "approval_continuation", title: "Approved Runtime Action Continuation", priority: 99, sourceRef: `run:${input.runId ?? "unknown"}`, content: approvalContinuationText(input), truncationReason: mode === "continuation" ? null : "mode_selection" },
|
|
@@ -24207,6 +24402,7 @@ ${resolvedDependencies.details.content}` : resolvedDependencies.details.content
|
|
|
24207
24402
|
}] : [],
|
|
24208
24403
|
{ name: "governed_reads", title: "Governed External Reads", priority: 88, sourceRef: governedReads.provenance.map((entry) => entry.sourceRef), observedAt: governedReads.provenance.map((entry) => entry.observedAt), freshness: governedReads.provenance.map((entry) => entry.freshness), scope: governedReads.provenance.map((entry) => entry.scope), content: governedReads.content },
|
|
24209
24404
|
...optionalTaskWikiContext ? [optionalTaskWikiContext] : [],
|
|
24405
|
+
...runtimeTemplateCatalog ? [{ name: "runtime_template_catalog", title: "Runtime Template Catalog", priority: 100, ...runtimeTemplateCatalog }] : [],
|
|
24210
24406
|
{ name: "agent_instructions", title: "Agent Instructions", priority: 100, sourceRef: "agent_instructions_bundle", content: readString(input.agentInstructions) ?? "" },
|
|
24211
24407
|
{ name: "attachments", title: "Materialized Inputs", priority: 80, sourceRef: "materialized_attachments", content: readString(input.attachmentsText) ?? "" },
|
|
24212
24408
|
{
|
|
@@ -24239,7 +24435,7 @@ ${resolvedDependencies.details.content}` : resolvedDependencies.details.content
|
|
|
24239
24435
|
// src/amaster-runtime-daemon/agent-instruction-delivery.mjs
|
|
24240
24436
|
import { createHash as createHash8, randomBytes as randomBytes2 } from "node:crypto";
|
|
24241
24437
|
import { existsSync as existsSync7, lstatSync as lstatSync4, mkdirSync as mkdirSync5, readFileSync as readFileSync9, readdirSync as readdirSync6, realpathSync as realpathSync4, renameSync as renameSync6, rmSync as rmSync5, writeFileSync as writeFileSync7 } from "node:fs";
|
|
24242
|
-
import { dirname as dirname6, isAbsolute as
|
|
24438
|
+
import { dirname as dirname6, isAbsolute as isAbsolute5, join as join8, relative as relative3, resolve as resolve4 } from "node:path";
|
|
24243
24439
|
|
|
24244
24440
|
// src/amaster-runtime-daemon/workspace-manifest.mjs
|
|
24245
24441
|
import { chownSync as chownSync3, existsSync as existsSync6, readFileSync as readFileSync8, renameSync as renameSync5, rmSync as rmSync4, statSync as statSync3, writeFileSync as writeFileSync6 } from "node:fs";
|
|
@@ -24354,7 +24550,7 @@ function instructionTopologyError(code, message, details = {}) {
|
|
|
24354
24550
|
}
|
|
24355
24551
|
function pathWithin(candidate, root) {
|
|
24356
24552
|
const rel = relative3(root, candidate);
|
|
24357
|
-
return rel === "" || !rel.startsWith("..") && !
|
|
24553
|
+
return rel === "" || !rel.startsWith("..") && !isAbsolute5(rel);
|
|
24358
24554
|
}
|
|
24359
24555
|
function lstatIfPresent(path) {
|
|
24360
24556
|
try {
|
|
@@ -24384,7 +24580,7 @@ function isManagedExecutionDirectory(directory, managedWorkspacesRoot) {
|
|
|
24384
24580
|
if (!manifest || typeof manifest !== "object" || Array.isArray(manifest) || manifest.managed !== true) {
|
|
24385
24581
|
return false;
|
|
24386
24582
|
}
|
|
24387
|
-
return [manifest.managedCwd, manifest.executionWorkdir].some((value) => typeof value === "string" &&
|
|
24583
|
+
return [manifest.managedCwd, manifest.executionWorkdir].some((value) => typeof value === "string" && isAbsolute5(value) && canonicalExistingPath(value) === candidate);
|
|
24388
24584
|
} catch {
|
|
24389
24585
|
return false;
|
|
24390
24586
|
}
|
|
@@ -26711,7 +26907,7 @@ var bestEffortPostJson = bestEffortPostRuntimeConnectorJson;
|
|
|
26711
26907
|
// src/amaster-runtime-daemon/runtime-artifact-upload.mjs
|
|
26712
26908
|
import { createHash as createHash9 } from "node:crypto";
|
|
26713
26909
|
import { closeSync as closeSync2, constants, fstatSync, lstatSync as lstatSync5, openSync as openSync2, readFileSync as readFileSync11, realpathSync as realpathSync5 } from "node:fs";
|
|
26714
|
-
import { isAbsolute as
|
|
26910
|
+
import { isAbsolute as isAbsolute6, relative as relative4, resolve as resolve6 } from "node:path";
|
|
26715
26911
|
var SHA256_PATTERN3 = /^[a-f0-9]{64}$/;
|
|
26716
26912
|
function requiredString(value, name) {
|
|
26717
26913
|
if (typeof value !== "string" || !value.trim()) throw new Error(`Runtime Artifact ${name} is required`);
|
|
@@ -26724,7 +26920,7 @@ function ownedRelativePath(value) {
|
|
|
26724
26920
|
}
|
|
26725
26921
|
function pathWithin2(candidate, root) {
|
|
26726
26922
|
const rel = relative4(root, candidate);
|
|
26727
|
-
return rel === "" || !rel.startsWith("..") && !
|
|
26923
|
+
return rel === "" || !rel.startsWith("..") && !isAbsolute6(rel);
|
|
26728
26924
|
}
|
|
26729
26925
|
function sameFileSnapshot(left, right) {
|
|
26730
26926
|
return left.dev === right.dev && left.ino === right.ino && left.size === right.size && left.mtimeMs === right.mtimeMs && left.ctimeMs === right.ctimeMs;
|
|
@@ -27048,10 +27244,10 @@ function createRuntimeArtifactIngestQueue({ ingest, onError }) {
|
|
|
27048
27244
|
// src/amaster-runtime-daemon/workspace-guard.mjs
|
|
27049
27245
|
import { createHash as createHash11 } from "node:crypto";
|
|
27050
27246
|
import { existsSync as existsSync9, mkdirSync as mkdirSync7, realpathSync as realpathSync6, statSync as statSync4 } from "node:fs";
|
|
27051
|
-
import { basename as basename4, join as join10, isAbsolute as
|
|
27247
|
+
import { basename as basename4, join as join10, isAbsolute as isAbsolute7, relative as relative5, resolve as resolve7 } from "node:path";
|
|
27052
27248
|
function pathWithin3(candidate, root) {
|
|
27053
27249
|
const rel = relative5(root, candidate);
|
|
27054
|
-
return rel === "" || !rel.startsWith("..") && !
|
|
27250
|
+
return rel === "" || !rel.startsWith("..") && !isAbsolute7(rel);
|
|
27055
27251
|
}
|
|
27056
27252
|
function resolveWorkspaceCwd(config, command) {
|
|
27057
27253
|
const payload = asRecord(command.payload);
|
|
@@ -27288,7 +27484,7 @@ import {
|
|
|
27288
27484
|
unlinkSync as unlinkSync2,
|
|
27289
27485
|
writeFileSync as writeFileSync9
|
|
27290
27486
|
} from "node:fs";
|
|
27291
|
-
import { dirname as dirname8, extname, isAbsolute as
|
|
27487
|
+
import { dirname as dirname8, extname, isAbsolute as isAbsolute8, join as join12, parse as parse3, resolve as resolve9, sep as sep3 } from "node:path";
|
|
27292
27488
|
import { fileURLToPath } from "node:url";
|
|
27293
27489
|
var PRESET_TEMPLATE_MANIFEST_FILE = ".mirrorx-preset-templates.json";
|
|
27294
27490
|
var MAX_PRESET_TEMPLATE_FILES = 256;
|
|
@@ -27340,7 +27536,7 @@ function assertCatalogReadableByExecutor(targetDir, fileNames, identity2) {
|
|
|
27340
27536
|
}
|
|
27341
27537
|
}
|
|
27342
27538
|
function validTemplateName(value) {
|
|
27343
|
-
return typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !value.includes("\0") && !value.includes("/") && !value.includes("\\") && !
|
|
27539
|
+
return typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !value.includes("\0") && !value.includes("/") && !value.includes("\\") && !isAbsolute8(value) && parse3(value).base === value && extname(value).toLowerCase() === ".md";
|
|
27344
27540
|
}
|
|
27345
27541
|
function readManifest(manifestPath, { strict }) {
|
|
27346
27542
|
try {
|
|
@@ -28215,7 +28411,7 @@ function readPiFinalContextAttestation(input) {
|
|
|
28215
28411
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
28216
28412
|
import { createHash as createHash14 } from "node:crypto";
|
|
28217
28413
|
import { existsSync as existsSync13, readdirSync as readdirSync10, readFileSync as readFileSync15, statSync as statSync8 } from "node:fs";
|
|
28218
|
-
import { basename as basename5, extname as extname2, isAbsolute as
|
|
28414
|
+
import { basename as basename5, extname as extname2, isAbsolute as isAbsolute9, join as join14, relative as relative6, resolve as resolve12 } from "node:path";
|
|
28219
28415
|
var WORKSPACE_RUNTIME_SERVICES_FILENAME = ".amaster-runtime-services.json";
|
|
28220
28416
|
var ARTIFACT_EXTENSIONS = /* @__PURE__ */ new Map([
|
|
28221
28417
|
[".md", "markdown"],
|
|
@@ -28261,7 +28457,7 @@ var SAFE_RUNTIME_SERVICE_HEALTH_STATUSES = /* @__PURE__ */ new Set(["unknown", "
|
|
|
28261
28457
|
var SAFE_RUNTIME_SERVICE_LIFECYCLES = /* @__PURE__ */ new Set(["shared", "ephemeral"]);
|
|
28262
28458
|
function statusPathWithin(candidate, root) {
|
|
28263
28459
|
const rel = relative6(root, candidate);
|
|
28264
|
-
return rel === "" || !rel.startsWith("..") && !
|
|
28460
|
+
return rel === "" || !rel.startsWith("..") && !isAbsolute9(rel);
|
|
28265
28461
|
}
|
|
28266
28462
|
function normalizeRelativePath(root, filePath) {
|
|
28267
28463
|
return relative6(root, filePath).split(/[\\/]+/).join("/");
|
|
@@ -29375,7 +29571,7 @@ function createSourceCompletionStopPolicy({
|
|
|
29375
29571
|
}
|
|
29376
29572
|
|
|
29377
29573
|
// src/amaster-runtime-daemon.mjs
|
|
29378
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
29574
|
+
var CONNECTOR_VERSION = "0.1.1-beta.142";
|
|
29379
29575
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
29380
29576
|
var SOURCE_ACQUISITION_CAPABILITY2 = source_acquisition_compatibility_default.profileVersion;
|
|
29381
29577
|
var daemonRequire = createRequire(import.meta.url);
|
|
@@ -29850,7 +30046,7 @@ function sourceAcquisitionPackageMetadata(packageName, location = "pi-config") {
|
|
|
29850
30046
|
}
|
|
29851
30047
|
function sourceAcquisitionBrowserExecutableReady() {
|
|
29852
30048
|
const executable = readString(process.env.AMASTER_BROWSER_EXECUTABLE_PATH);
|
|
29853
|
-
if (!executable || !
|
|
30049
|
+
if (!executable || !isAbsolute10(executable)) return false;
|
|
29854
30050
|
try {
|
|
29855
30051
|
const stat = statSync10(executable);
|
|
29856
30052
|
return stat.isFile() && (stat.mode & 73) !== 0;
|
|
@@ -30807,7 +31003,7 @@ function safeAgentInstructionMaterializationTarget(workspace, filePath) {
|
|
|
30807
31003
|
const raw = readString(filePath);
|
|
30808
31004
|
if (!raw || raw.includes("\0")) return null;
|
|
30809
31005
|
const normalized = raw.replace(/\\/g, "/");
|
|
30810
|
-
if (
|
|
31006
|
+
if (isAbsolute10(normalized)) return null;
|
|
30811
31007
|
const segments = normalized.split("/").filter(Boolean);
|
|
30812
31008
|
if (segments.length === 0 || segments.some((segment) => segment === "." || segment === "..")) return null;
|
|
30813
31009
|
const relativePath = segments.join("/");
|
|
@@ -31036,7 +31232,8 @@ function buildCommandPrompt(command, workspace, materializedAttachments = [], op
|
|
|
31036
31232
|
wikiAccess: {
|
|
31037
31233
|
tools: context.wikiToolsAvailable === true,
|
|
31038
31234
|
treePath: wikiTreePathForCommand(command, options.workspaceBindings)
|
|
31039
|
-
}
|
|
31235
|
+
},
|
|
31236
|
+
runtimeTemplateCatalog: options.runtimeTemplateCatalog
|
|
31040
31237
|
}, { maxChars: options.maxChars });
|
|
31041
31238
|
const auditedCompilation = attachCurrentRunContractShadowAudit(
|
|
31042
31239
|
compilation,
|
|
@@ -32060,7 +32257,7 @@ function manifestMatchesActiveRuntimeRef(manifest, refs, workdir = null) {
|
|
|
32060
32257
|
function buildOrphanReaperSample(root, workdir, manifest, residents) {
|
|
32061
32258
|
const relativeWorkdir = (() => {
|
|
32062
32259
|
const value = relative8(root, workdir);
|
|
32063
|
-
return value && !value.startsWith("..") && !
|
|
32260
|
+
return value && !value.startsWith("..") && !isAbsolute10(value) ? value : basename6(workdir);
|
|
32064
32261
|
})();
|
|
32065
32262
|
return {
|
|
32066
32263
|
workdir: relativeWorkdir,
|
|
@@ -34257,7 +34454,7 @@ async function clearIssueCheckpoint(config, command, workspace, reason) {
|
|
|
34257
34454
|
}
|
|
34258
34455
|
function safeCheckpointRelativePath(rawPath) {
|
|
34259
34456
|
const raw = String(rawPath ?? "").trim();
|
|
34260
|
-
if (
|
|
34457
|
+
if (isAbsolute10(raw) || /^[A-Za-z]:[\\/]/.test(raw)) return null;
|
|
34261
34458
|
const normalized = raw.split(/[\\/]+/).filter(Boolean).join("/");
|
|
34262
34459
|
if (!normalized || normalized.startsWith("../") || normalized.split("/").some((segment) => segment.startsWith("."))) return null;
|
|
34263
34460
|
if (normalized.startsWith("input-attachments/") || isRuntimeMetadataArtifactPath(normalized)) return null;
|
|
@@ -34728,6 +34925,7 @@ async function executeRunCommand(config, command) {
|
|
|
34728
34925
|
workspaceProjectInstructionReceipt,
|
|
34729
34926
|
effectiveToolSchemaAttestation,
|
|
34730
34927
|
modelContextBudget,
|
|
34928
|
+
runtimeTemplateCatalog: config.templateCatalog,
|
|
34731
34929
|
runtimeInstructionInjectionEnabled: strictContextGovernance,
|
|
34732
34930
|
maxChars: modelContextBudget.dynamicPromptMaxChars
|
|
34733
34931
|
}));
|
|
@@ -35549,7 +35747,9 @@ async function runOnce(config) {
|
|
|
35549
35747
|
return commands.length;
|
|
35550
35748
|
}
|
|
35551
35749
|
async function dispatchAvailableCommands(config, options = {}) {
|
|
35750
|
+
const templateCatalog = config.templateCatalog;
|
|
35552
35751
|
config = await ensureRegistered(config);
|
|
35752
|
+
config = { ...config, templateCatalog };
|
|
35553
35753
|
try {
|
|
35554
35754
|
await heartbeat(
|
|
35555
35755
|
config,
|
|
@@ -35559,7 +35759,7 @@ async function dispatchAvailableCommands(config, options = {}) {
|
|
|
35559
35759
|
if (!hasConnectorAuth(config) && isConnectorAuthFailure(err)) {
|
|
35560
35760
|
process.stderr.write("AMaster daemon heartbeat was rejected without connector auth; re-registering once.\n");
|
|
35561
35761
|
await register(config, { quiet: true });
|
|
35562
|
-
config = buildConfig(process.env, {});
|
|
35762
|
+
config = { ...buildConfig(process.env, {}), templateCatalog };
|
|
35563
35763
|
await heartbeat(config, { logMode: "compact" });
|
|
35564
35764
|
} else {
|
|
35565
35765
|
throw err;
|
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.142";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|