xytara 2.11.0 → 2.12.0
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/RELEASE_NOTES.md +2 -4
- package/fixtures/catalog.js +9 -1
- package/index.js +86 -0
- package/lib/capability_registry.js +25 -1
- package/lib/catalog_contract.js +15 -0
- package/lib/catalog_family_model.js +190 -0
- package/lib/delivery_summary_contract.js +95 -0
- package/lib/first_run_conversion_contract.js +290 -0
- package/lib/full_catalog_contract.js +513 -0
- package/lib/go_live_operator_pack.js +9 -0
- package/lib/market_lane_contract.js +467 -0
- package/lib/market_lane_depth_contract.js +182 -0
- package/lib/market_lane_promotion_contract.js +210 -0
- package/lib/market_lane_trace_contract.js +278 -0
- package/lib/provider_lane_contract.js +185 -17
- package/lib/provider_runtime_journey_contract.js +183 -0
- package/lib/release_history.js +13 -0
- package/lib/revenue_launch_path_contract.js +326 -0
- package/package.json +13 -2
- package/scripts/verify_delivery_summary.js +112 -0
- package/scripts/verify_first_run_conversions.js +81 -0
- package/scripts/verify_full_catalog.js +174 -0
- package/scripts/verify_market_lane_depth.js +94 -0
- package/scripts/verify_market_lane_promotion.js +103 -0
- package/scripts/verify_market_lane_traces.js +98 -0
- package/scripts/verify_market_lanes.js +102 -0
- package/scripts/verify_provider_runtime_breadth.js +109 -0
- package/scripts/verify_provider_runtime_journeys.js +111 -0
- package/scripts/verify_release_candidate.js +5 -6
- package/scripts/verify_revenue_launch_paths.js +105 -0
- package/scripts/verify_runtime_durability.js +52 -0
- package/scripts/verify_service.js +223 -0
- package/server.js +307 -0
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
`xytara` 2.11.0 is the lowercase-brand-convention line for aligned npm, GitHub, website, code, documentation, and public-copy surfaces.
|
|
1
|
+
`xytara` 2.12.0 is the full-catalog public truth line for aligned npm, GitHub, website, code, documentation, and public-copy surfaces.
|
|
4
2
|
|
|
5
3
|
Highlights:
|
|
6
4
|
|
|
7
5
|
- normalizes visible `xytara`, `xoonya`, and `naxytra` product references to the lowercase convention across package docs, CLI copy, release history, and public-facing strings
|
|
8
|
-
- preserves the quote-first first-run path, adapter-depth boundaries, pricing guardrails, treasury public-claim safety, and read-only operator observability boundaries
|
|
6
|
+
- preserves the quote-first first-run path, provider-runtime journeys, revenue-launch paths, adapter-depth boundaries, pricing guardrails, treasury public-claim safety, and read-only operator observability boundaries
|
|
9
7
|
- keeps `RELEASE_NOTES.md` scoped to the current release so npm and GitHub release notes stay clean
|
|
10
8
|
- keeps the canonical `https://naxytra.com/xytara` public product URL and synchronized naxytra release posture intact
|
|
11
9
|
- verifies the lowercase convention through the release candidate, full package verifier, umbrella pre-deploy gates, and clean-consumer release smoke
|
package/fixtures/catalog.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
const { decorateTaskMetadata } = require("../lib/catalog_family_model");
|
|
4
|
+
|
|
3
5
|
function makeTask(definition) {
|
|
6
|
+
const metadata = decorateTaskMetadata(definition);
|
|
4
7
|
return {
|
|
5
8
|
task_ref: definition.task_ref,
|
|
6
9
|
public_task_ref: definition.public_task_ref,
|
|
@@ -15,7 +18,12 @@ function makeTask(definition) {
|
|
|
15
18
|
failure_posture: definition.failure_posture,
|
|
16
19
|
input_schema: definition.input_schema,
|
|
17
20
|
capabilities: definition.capabilities,
|
|
18
|
-
adapters: definition.adapters
|
|
21
|
+
adapters: definition.adapters,
|
|
22
|
+
task_family: metadata.task_family,
|
|
23
|
+
lifecycle_stage: metadata.lifecycle_stage,
|
|
24
|
+
market_class: metadata.market_class,
|
|
25
|
+
claim_status: metadata.claim_status,
|
|
26
|
+
evidence_status: metadata.evidence_status
|
|
19
27
|
};
|
|
20
28
|
}
|
|
21
29
|
|
package/index.js
CHANGED
|
@@ -35,6 +35,30 @@ const {
|
|
|
35
35
|
buildAdapterPack,
|
|
36
36
|
summarizeAdapterPack
|
|
37
37
|
} = require("./lib/adapter_pack");
|
|
38
|
+
const {
|
|
39
|
+
buildProviderLanePack,
|
|
40
|
+
getProviderProfileDetail,
|
|
41
|
+
summarizeProviderLanePack
|
|
42
|
+
} = require("./lib/provider_lane_contract");
|
|
43
|
+
const {
|
|
44
|
+
buildProviderRuntimeJourneyPack,
|
|
45
|
+
getProviderRuntimeJourneyDetail,
|
|
46
|
+
summarizeProviderRuntimeJourneyPack
|
|
47
|
+
} = require("./lib/provider_runtime_journey_contract");
|
|
48
|
+
const {
|
|
49
|
+
buildFirstRunConversionPack,
|
|
50
|
+
getFirstRunConversionDetail,
|
|
51
|
+
summarizeFirstRunConversionPack
|
|
52
|
+
} = require("./lib/first_run_conversion_contract");
|
|
53
|
+
const {
|
|
54
|
+
buildDeliverySummaryPack,
|
|
55
|
+
summarizeDeliveryState
|
|
56
|
+
} = require("./lib/delivery_summary_contract");
|
|
57
|
+
const {
|
|
58
|
+
buildRevenueLaunchPathPack,
|
|
59
|
+
getRevenueLaunchPathDetail,
|
|
60
|
+
summarizeRevenueLaunchPathPack
|
|
61
|
+
} = require("./lib/revenue_launch_path_contract");
|
|
38
62
|
const {
|
|
39
63
|
buildFrameworkProviderPromotionPack,
|
|
40
64
|
summarizeFrameworkProviderPromotionPack
|
|
@@ -43,6 +67,35 @@ const {
|
|
|
43
67
|
buildPricingExperimentPlan,
|
|
44
68
|
summarizePricingExperimentPlan
|
|
45
69
|
} = require("./lib/pricing_optimization_contract");
|
|
70
|
+
const {
|
|
71
|
+
buildFullCatalogPack,
|
|
72
|
+
summarizeFullCatalogPack,
|
|
73
|
+
buildFamilyPromotionPack,
|
|
74
|
+
summarizeFamilyPromotionPack
|
|
75
|
+
} = require("./lib/full_catalog_contract");
|
|
76
|
+
const {
|
|
77
|
+
buildMarketLaneActivationPack,
|
|
78
|
+
buildMarketLanePack,
|
|
79
|
+
getMarketLaneDetail,
|
|
80
|
+
summarizeMarketLaneActivationPack,
|
|
81
|
+
summarizeMarketLanePack
|
|
82
|
+
} = require("./lib/market_lane_contract");
|
|
83
|
+
const {
|
|
84
|
+
buildMarketLaneDepthPack,
|
|
85
|
+
getMarketLaneDepthDetail,
|
|
86
|
+
summarizeMarketLaneDepthPack
|
|
87
|
+
} = require("./lib/market_lane_depth_contract");
|
|
88
|
+
const {
|
|
89
|
+
buildMarketLaneTracePack,
|
|
90
|
+
getMarketLaneTraceDetail,
|
|
91
|
+
summarizeMarketLaneTracePack
|
|
92
|
+
} = require("./lib/market_lane_trace_contract");
|
|
93
|
+
const {
|
|
94
|
+
buildMarketLanePromotionPack,
|
|
95
|
+
getMarketLanePromotionDetail,
|
|
96
|
+
summarizeMarketLanePromotionPack,
|
|
97
|
+
validateMarketLanePromotionEvidence
|
|
98
|
+
} = require("./lib/market_lane_promotion_contract");
|
|
46
99
|
const {
|
|
47
100
|
buildPublishPlan,
|
|
48
101
|
summarizePublishPlan
|
|
@@ -167,10 +220,43 @@ module.exports = {
|
|
|
167
220
|
summarizeReleaseHistory,
|
|
168
221
|
buildAdapterPack,
|
|
169
222
|
summarizeAdapterPack,
|
|
223
|
+
buildProviderLanePack,
|
|
224
|
+
getProviderProfileDetail,
|
|
225
|
+
summarizeProviderLanePack,
|
|
226
|
+
buildProviderRuntimeJourneyPack,
|
|
227
|
+
getProviderRuntimeJourneyDetail,
|
|
228
|
+
summarizeProviderRuntimeJourneyPack,
|
|
229
|
+
buildFirstRunConversionPack,
|
|
230
|
+
getFirstRunConversionDetail,
|
|
231
|
+
summarizeFirstRunConversionPack,
|
|
232
|
+
buildDeliverySummaryPack,
|
|
233
|
+
summarizeDeliveryState,
|
|
234
|
+
buildRevenueLaunchPathPack,
|
|
235
|
+
getRevenueLaunchPathDetail,
|
|
236
|
+
summarizeRevenueLaunchPathPack,
|
|
170
237
|
buildFrameworkProviderPromotionPack,
|
|
171
238
|
summarizeFrameworkProviderPromotionPack,
|
|
172
239
|
buildPricingExperimentPlan,
|
|
173
240
|
summarizePricingExperimentPlan,
|
|
241
|
+
buildFullCatalogPack,
|
|
242
|
+
summarizeFullCatalogPack,
|
|
243
|
+
buildFamilyPromotionPack,
|
|
244
|
+
summarizeFamilyPromotionPack,
|
|
245
|
+
buildMarketLanePack,
|
|
246
|
+
buildMarketLaneActivationPack,
|
|
247
|
+
buildMarketLaneDepthPack,
|
|
248
|
+
buildMarketLaneTracePack,
|
|
249
|
+
buildMarketLanePromotionPack,
|
|
250
|
+
getMarketLaneDetail,
|
|
251
|
+
getMarketLaneDepthDetail,
|
|
252
|
+
getMarketLaneTraceDetail,
|
|
253
|
+
getMarketLanePromotionDetail,
|
|
254
|
+
summarizeMarketLanePack,
|
|
255
|
+
summarizeMarketLaneActivationPack,
|
|
256
|
+
summarizeMarketLaneDepthPack,
|
|
257
|
+
summarizeMarketLaneTracePack,
|
|
258
|
+
summarizeMarketLanePromotionPack,
|
|
259
|
+
validateMarketLanePromotionEvidence,
|
|
174
260
|
buildPublishPlan,
|
|
175
261
|
summarizePublishPlan,
|
|
176
262
|
buildEcosystemEntryPack,
|
|
@@ -39,6 +39,10 @@ const {
|
|
|
39
39
|
summarizeCapabilityExecutionTruthBundle,
|
|
40
40
|
buildCapabilityCommercializationSummary
|
|
41
41
|
} = require("./capability_execution_truth");
|
|
42
|
+
const {
|
|
43
|
+
summarizeFullCatalogPack,
|
|
44
|
+
summarizeFamilyPromotionPack
|
|
45
|
+
} = require("./full_catalog_contract");
|
|
42
46
|
|
|
43
47
|
function buildCapabilityRegistrySummary() {
|
|
44
48
|
const catalogSummary = summarizeCatalog();
|
|
@@ -77,12 +81,15 @@ function buildCapabilityRegistrySummary() {
|
|
|
77
81
|
catalog_state: "task_and_workflow_registry_present",
|
|
78
82
|
execution_pack_state: "task_class_precommit_and_loop_packs_present",
|
|
79
83
|
continuation_state: "result_package_and_continuation_registry_present",
|
|
80
|
-
adapter_state: "adapter_registration_promotion_and_partner_registry_present"
|
|
84
|
+
adapter_state: "adapter_registration_promotion_and_partner_registry_present",
|
|
85
|
+
full_catalog_state: "family_lifecycle_market_registry_present"
|
|
81
86
|
},
|
|
82
87
|
linked_surfaces: {
|
|
83
88
|
capability_registry_ref: "/v1/capability-registry",
|
|
84
89
|
execution_truth_summary_ref: "/v1/capability-registry/execution-truth/summary",
|
|
85
90
|
commercialization_summary_ref: "/v1/capability-registry/commercialization-summary",
|
|
91
|
+
full_catalog_summary_ref: "/v1/full-catalog/summary",
|
|
92
|
+
family_promotion_summary_ref: "/v1/full-catalog/family-promotions/summary",
|
|
86
93
|
catalog_summary_ref: "/v1/catalog/summary",
|
|
87
94
|
task_packs_summary_ref: "/v1/transaction-center/task-packs/summary",
|
|
88
95
|
class_packs_summary_ref: "/v1/transaction-center/transaction-class-packs/summary",
|
|
@@ -103,6 +110,8 @@ function buildCapabilityRegistryBundle() {
|
|
|
103
110
|
capability_registry_summary: buildCapabilityRegistrySummary(),
|
|
104
111
|
capability_execution_truth: buildCapabilityExecutionTruthBundle(),
|
|
105
112
|
capability_commercialization_summary: buildCapabilityCommercializationSummary(),
|
|
113
|
+
full_catalog_summary: summarizeFullCatalogPack(),
|
|
114
|
+
family_promotion_summary: summarizeFamilyPromotionPack(),
|
|
106
115
|
catalog: getCatalog(),
|
|
107
116
|
catalog_summary: summarizeCatalog(),
|
|
108
117
|
task_pack_catalog: buildDefaultTransactionTaskPackCatalog(),
|
|
@@ -129,6 +138,8 @@ function buildCapabilityRegistryBundle() {
|
|
|
129
138
|
capability_registry_summary_ref: "/v1/capability-registry/summary",
|
|
130
139
|
capability_execution_truth_ref: "/v1/capability-registry/execution-truth",
|
|
131
140
|
capability_commercialization_summary_ref: "/v1/capability-registry/commercialization-summary",
|
|
141
|
+
full_catalog_summary_ref: "/v1/full-catalog/summary",
|
|
142
|
+
family_promotion_summary_ref: "/v1/full-catalog/family-promotions/summary",
|
|
132
143
|
catalog_ref: "/v1/catalog",
|
|
133
144
|
task_pack_catalog_ref: "/v1/transaction-center/task-packs",
|
|
134
145
|
class_pack_catalog_ref: "/v1/transaction-center/transaction-class-packs",
|
|
@@ -146,14 +157,23 @@ function buildCapabilityRegistryClassificationSummary() {
|
|
|
146
157
|
const workflowCategories = new Map();
|
|
147
158
|
const taskLatencies = new Map();
|
|
148
159
|
const taskFailurePostures = new Map();
|
|
160
|
+
const taskFamilies = new Map();
|
|
161
|
+
const lifecycleStages = new Map();
|
|
162
|
+
const marketClasses = new Map();
|
|
149
163
|
|
|
150
164
|
for (const task of Array.isArray(catalog.tasks) ? catalog.tasks : []) {
|
|
151
165
|
const category = task && task.public_category ? task.public_category : "unknown";
|
|
152
166
|
const latency = task && task.latency_class ? task.latency_class : "unknown";
|
|
153
167
|
const failurePosture = task && task.failure_posture ? task.failure_posture : "unknown";
|
|
168
|
+
const taskFamily = task && task.task_family ? task.task_family : "unknown";
|
|
169
|
+
const lifecycleStage = task && task.lifecycle_stage ? task.lifecycle_stage : "unknown";
|
|
170
|
+
const marketClass = task && task.market_class ? task.market_class : "unknown";
|
|
154
171
|
taskCategories.set(category, Number(taskCategories.get(category) || 0) + 1);
|
|
155
172
|
taskLatencies.set(latency, Number(taskLatencies.get(latency) || 0) + 1);
|
|
156
173
|
taskFailurePostures.set(failurePosture, Number(taskFailurePostures.get(failurePosture) || 0) + 1);
|
|
174
|
+
taskFamilies.set(taskFamily, Number(taskFamilies.get(taskFamily) || 0) + 1);
|
|
175
|
+
lifecycleStages.set(lifecycleStage, Number(lifecycleStages.get(lifecycleStage) || 0) + 1);
|
|
176
|
+
marketClasses.set(marketClass, Number(marketClasses.get(marketClass) || 0) + 1);
|
|
157
177
|
}
|
|
158
178
|
|
|
159
179
|
for (const workflow of Array.isArray(catalog.workflows) ? catalog.workflows : []) {
|
|
@@ -177,6 +197,9 @@ function buildCapabilityRegistryClassificationSummary() {
|
|
|
177
197
|
category: "machine-commerce-capability-registry-classification-summary",
|
|
178
198
|
summary_version: "xytara-capability-registry-classification-summary-v1",
|
|
179
199
|
task_categories: Array.from(taskCategories.entries()).map(([category, task_count]) => ({ category, task_count })),
|
|
200
|
+
task_families: Array.from(taskFamilies.entries()).map(([task_family, task_count]) => ({ task_family, task_count })),
|
|
201
|
+
lifecycle_stages: Array.from(lifecycleStages.entries()).map(([lifecycle_stage, task_count]) => ({ lifecycle_stage, task_count })),
|
|
202
|
+
market_classes: Array.from(marketClasses.entries()).map(([market_class, task_count]) => ({ market_class, task_count })),
|
|
180
203
|
workflow_categories: Array.from(workflowCategories.entries()).map(([category, workflow_count]) => ({ category, workflow_count })),
|
|
181
204
|
task_latency_classes: Array.from(taskLatencies.entries()).map(([latency_class, task_count]) => ({ latency_class, task_count })),
|
|
182
205
|
task_failure_postures: Array.from(taskFailurePostures.entries()).map(([failure_posture, task_count]) => ({ failure_posture, task_count })),
|
|
@@ -186,6 +209,7 @@ function buildCapabilityRegistryClassificationSummary() {
|
|
|
186
209
|
capability_registry_ref: "/v1/capability-registry",
|
|
187
210
|
capability_execution_truth_ref: "/v1/capability-registry/execution-truth",
|
|
188
211
|
capability_commercialization_summary_ref: "/v1/capability-registry/commercialization-summary",
|
|
212
|
+
full_catalog_summary_ref: "/v1/full-catalog/summary",
|
|
189
213
|
capability_registry_lineage_summary_ref: "/v1/capability-registry/lineage-summary",
|
|
190
214
|
catalog_summary_ref: "/v1/catalog/summary"
|
|
191
215
|
}
|
package/lib/catalog_contract.js
CHANGED
|
@@ -791,6 +791,11 @@ function summarizeCatalog() {
|
|
|
791
791
|
pricing_note: task.pricing_note,
|
|
792
792
|
latency_class: task.latency_class,
|
|
793
793
|
failure_posture: task.failure_posture,
|
|
794
|
+
task_family: task.task_family,
|
|
795
|
+
lifecycle_stage: task.lifecycle_stage,
|
|
796
|
+
market_class: task.market_class,
|
|
797
|
+
claim_status: task.claim_status,
|
|
798
|
+
evidence_status: task.evidence_status,
|
|
794
799
|
capabilities: task.capabilities,
|
|
795
800
|
adapters: task.adapters
|
|
796
801
|
})),
|
|
@@ -828,6 +833,11 @@ function getTaskDetail(ref) {
|
|
|
828
833
|
pricing_note: task.pricing_note,
|
|
829
834
|
latency_class: task.latency_class,
|
|
830
835
|
failure_posture: task.failure_posture,
|
|
836
|
+
task_family: task.task_family,
|
|
837
|
+
lifecycle_stage: task.lifecycle_stage,
|
|
838
|
+
market_class: task.market_class,
|
|
839
|
+
claim_status: task.claim_status,
|
|
840
|
+
evidence_status: task.evidence_status,
|
|
831
841
|
input_schema: task.input_schema,
|
|
832
842
|
capabilities: task.capabilities,
|
|
833
843
|
adapters: task.adapters
|
|
@@ -845,6 +855,11 @@ function buildWorkflowShape(workflow) {
|
|
|
845
855
|
category: task.public_category,
|
|
846
856
|
latency_class: task.latency_class,
|
|
847
857
|
failure_posture: task.failure_posture,
|
|
858
|
+
task_family: task.task_family,
|
|
859
|
+
lifecycle_stage: task.lifecycle_stage,
|
|
860
|
+
market_class: task.market_class,
|
|
861
|
+
claim_status: task.claim_status,
|
|
862
|
+
evidence_status: task.evidence_status,
|
|
848
863
|
pricing_band: task.pricing_band,
|
|
849
864
|
public_launch_price: task.public_launch_price
|
|
850
865
|
}));
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const FAMILY_DEFINITIONS = Object.freeze([
|
|
4
|
+
{ family_id: "identity", label: "identity" },
|
|
5
|
+
{ family_id: "discovery", label: "discovery" },
|
|
6
|
+
{ family_id: "negotiation", label: "negotiation" },
|
|
7
|
+
{ family_id: "invocation", label: "invocation" },
|
|
8
|
+
{ family_id: "sessions_messaging", label: "sessions/messaging" },
|
|
9
|
+
{ family_id: "payments_metering", label: "payments/metering" },
|
|
10
|
+
{ family_id: "delivery", label: "delivery" },
|
|
11
|
+
{ family_id: "disputes", label: "disputes" },
|
|
12
|
+
{ family_id: "anchoring_finality", label: "anchoring/finality" }
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
const LIFECYCLE_STAGE_DEFINITIONS = Object.freeze([
|
|
16
|
+
{ lifecycle_stage: "discover", label: "discover" },
|
|
17
|
+
{ lifecycle_stage: "negotiate", label: "negotiate" },
|
|
18
|
+
{ lifecycle_stage: "quote_commit", label: "quote/commit" },
|
|
19
|
+
{ lifecycle_stage: "invoke", label: "invoke" },
|
|
20
|
+
{ lifecycle_stage: "session_send_close", label: "session/send/close" },
|
|
21
|
+
{ lifecycle_stage: "meter", label: "meter" },
|
|
22
|
+
{ lifecycle_stage: "deliver", label: "deliver" },
|
|
23
|
+
{ lifecycle_stage: "settlement_intent", label: "settlement-intent" },
|
|
24
|
+
{ lifecycle_stage: "settle_reconcile", label: "settle/reconcile" },
|
|
25
|
+
{ lifecycle_stage: "anchor", label: "anchor" },
|
|
26
|
+
{ lifecycle_stage: "dispute_open", label: "dispute-open" },
|
|
27
|
+
{ lifecycle_stage: "dispute_fetch", label: "dispute-fetch" },
|
|
28
|
+
{ lifecycle_stage: "verify", label: "verify" }
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
const MARKET_CLASS_DEFINITIONS = Object.freeze([
|
|
32
|
+
{ market_class: "compute", label: "compute" },
|
|
33
|
+
{ market_class: "data", label: "data" },
|
|
34
|
+
{ market_class: "storage", label: "storage" },
|
|
35
|
+
{ market_class: "messaging", label: "messaging" },
|
|
36
|
+
{ market_class: "device_robotics", label: "device/robotics" },
|
|
37
|
+
{ market_class: "treasury_payments", label: "treasury/payments" }
|
|
38
|
+
]);
|
|
39
|
+
|
|
40
|
+
function mapCategoryDefaults(publicCategory) {
|
|
41
|
+
switch (String(publicCategory || "").trim()) {
|
|
42
|
+
case "trust":
|
|
43
|
+
return { task_family: "identity", lifecycle_stage: "verify", market_class: "data" };
|
|
44
|
+
case "receipt":
|
|
45
|
+
return { task_family: "delivery", lifecycle_stage: "verify", market_class: "data" };
|
|
46
|
+
case "runtime":
|
|
47
|
+
return { task_family: "delivery", lifecycle_stage: "deliver", market_class: "compute" };
|
|
48
|
+
case "jobs":
|
|
49
|
+
return { task_family: "invocation", lifecycle_stage: "quote_commit", market_class: "compute" };
|
|
50
|
+
case "credits":
|
|
51
|
+
return { task_family: "payments_metering", lifecycle_stage: "meter", market_class: "treasury_payments" };
|
|
52
|
+
case "a2a":
|
|
53
|
+
return { task_family: "negotiation", lifecycle_stage: "negotiate", market_class: "messaging" };
|
|
54
|
+
case "a2c":
|
|
55
|
+
return { task_family: "sessions_messaging", lifecycle_stage: "session_send_close", market_class: "messaging" };
|
|
56
|
+
case "policy":
|
|
57
|
+
return { task_family: "payments_metering", lifecycle_stage: "settlement_intent", market_class: "treasury_payments" };
|
|
58
|
+
case "identity":
|
|
59
|
+
return { task_family: "identity", lifecycle_stage: "verify", market_class: "data" };
|
|
60
|
+
case "registry":
|
|
61
|
+
return { task_family: "identity", lifecycle_stage: "deliver", market_class: "storage" };
|
|
62
|
+
case "anchoring":
|
|
63
|
+
return { task_family: "anchoring_finality", lifecycle_stage: "anchor", market_class: "storage" };
|
|
64
|
+
case "discovery":
|
|
65
|
+
return { task_family: "discovery", lifecycle_stage: "discover", market_class: "data" };
|
|
66
|
+
case "admission":
|
|
67
|
+
return { task_family: "negotiation", lifecycle_stage: "settlement_intent", market_class: "treasury_payments" };
|
|
68
|
+
case "settlement":
|
|
69
|
+
return { task_family: "payments_metering", lifecycle_stage: "settle_reconcile", market_class: "treasury_payments" };
|
|
70
|
+
case "adapter":
|
|
71
|
+
return { task_family: "invocation", lifecycle_stage: "invoke", market_class: "compute" };
|
|
72
|
+
default:
|
|
73
|
+
return { task_family: "discovery", lifecycle_stage: "discover", market_class: "data" };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function decorateTaskMetadata(definition = {}) {
|
|
78
|
+
const defaults = mapCategoryDefaults(definition.public_category);
|
|
79
|
+
const publicTaskRef = String(definition.public_task_ref || "").trim();
|
|
80
|
+
let task_family = defaults.task_family;
|
|
81
|
+
let lifecycle_stage = defaults.lifecycle_stage;
|
|
82
|
+
let market_class = defaults.market_class;
|
|
83
|
+
let claim_status = "bounded_live";
|
|
84
|
+
let evidence_status = "first_party_runtime";
|
|
85
|
+
|
|
86
|
+
switch (publicTaskRef) {
|
|
87
|
+
case "trust.handoff.emit":
|
|
88
|
+
case "execution_receipt.handoff.emit":
|
|
89
|
+
case "receipt_ledger.handoff.emit":
|
|
90
|
+
case "identity.registry.link":
|
|
91
|
+
case "registry.pack.bundle":
|
|
92
|
+
case "jobs.release":
|
|
93
|
+
lifecycle_stage = "deliver";
|
|
94
|
+
evidence_status = "proof_handoff_ready";
|
|
95
|
+
break;
|
|
96
|
+
case "trust.handoff.validate":
|
|
97
|
+
case "execution_receipt.handoff.validate":
|
|
98
|
+
case "receipt_ledger.handoff.validate":
|
|
99
|
+
case "receipt.validate":
|
|
100
|
+
lifecycle_stage = "verify";
|
|
101
|
+
break;
|
|
102
|
+
case "runtime.anchor":
|
|
103
|
+
case "runtime.emit_anchor":
|
|
104
|
+
task_family = "anchoring_finality";
|
|
105
|
+
lifecycle_stage = "anchor";
|
|
106
|
+
break;
|
|
107
|
+
case "jobs.quote":
|
|
108
|
+
lifecycle_stage = "quote_commit";
|
|
109
|
+
break;
|
|
110
|
+
case "jobs.reserve":
|
|
111
|
+
case "jobs.commit":
|
|
112
|
+
task_family = "invocation";
|
|
113
|
+
lifecycle_stage = "quote_commit";
|
|
114
|
+
break;
|
|
115
|
+
case "credits.apply":
|
|
116
|
+
lifecycle_stage = "settle_reconcile";
|
|
117
|
+
evidence_status = "first_party_ledger";
|
|
118
|
+
break;
|
|
119
|
+
case "a2a.commit":
|
|
120
|
+
lifecycle_stage = "quote_commit";
|
|
121
|
+
break;
|
|
122
|
+
case "policy.simulate":
|
|
123
|
+
case "admission.preview":
|
|
124
|
+
lifecycle_stage = "settlement_intent";
|
|
125
|
+
evidence_status = "first_party_policy_preview";
|
|
126
|
+
break;
|
|
127
|
+
case "settlement.submit":
|
|
128
|
+
lifecycle_stage = "settle_reconcile";
|
|
129
|
+
evidence_status = "first_party_settlement";
|
|
130
|
+
break;
|
|
131
|
+
case "adapter.mcp.invoke":
|
|
132
|
+
claim_status = "live";
|
|
133
|
+
evidence_status = "provider_live";
|
|
134
|
+
break;
|
|
135
|
+
default:
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return {
|
|
140
|
+
task_family,
|
|
141
|
+
lifecycle_stage,
|
|
142
|
+
market_class,
|
|
143
|
+
claim_status,
|
|
144
|
+
evidence_status
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function decorateAdapterMetadata(adapterId) {
|
|
149
|
+
switch (String(adapterId || "").trim()) {
|
|
150
|
+
case "mcp":
|
|
151
|
+
return {
|
|
152
|
+
task_family: "invocation",
|
|
153
|
+
lifecycle_stage: "invoke",
|
|
154
|
+
market_class: "compute",
|
|
155
|
+
claim_status: "live",
|
|
156
|
+
evidence_status: "provider_live"
|
|
157
|
+
};
|
|
158
|
+
case "chain":
|
|
159
|
+
return {
|
|
160
|
+
task_family: "payments_metering",
|
|
161
|
+
lifecycle_stage: "settle_reconcile",
|
|
162
|
+
market_class: "treasury_payments",
|
|
163
|
+
claim_status: "bounded_live",
|
|
164
|
+
evidence_status: "first_party_settlement"
|
|
165
|
+
};
|
|
166
|
+
case "http":
|
|
167
|
+
default:
|
|
168
|
+
return {
|
|
169
|
+
task_family: "discovery",
|
|
170
|
+
lifecycle_stage: "discover",
|
|
171
|
+
market_class: "data",
|
|
172
|
+
claim_status: "bounded_live",
|
|
173
|
+
evidence_status: "first_party_runtime"
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function definitionLabel(definitions, field, value) {
|
|
179
|
+
const entry = definitions.find((item) => item[field] === value);
|
|
180
|
+
return entry ? entry.label : value;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
module.exports = {
|
|
184
|
+
FAMILY_DEFINITIONS,
|
|
185
|
+
LIFECYCLE_STAGE_DEFINITIONS,
|
|
186
|
+
MARKET_CLASS_DEFINITIONS,
|
|
187
|
+
decorateAdapterMetadata,
|
|
188
|
+
decorateTaskMetadata,
|
|
189
|
+
definitionLabel
|
|
190
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
const { loadRuntimeOperationsConfig } = require("./runtime_operations_worker");
|
|
5
|
+
|
|
6
|
+
function listDeliveries(state) {
|
|
7
|
+
if (!state || !state.deliveries) return [];
|
|
8
|
+
if (state.deliveries instanceof Map) {
|
|
9
|
+
return Array.from(state.deliveries.values()).filter(Boolean);
|
|
10
|
+
}
|
|
11
|
+
return Array.isArray(state.deliveries) ? state.deliveries.filter(Boolean) : [];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function summarizeDeliveryState(state) {
|
|
15
|
+
const config = loadRuntimeOperationsConfig();
|
|
16
|
+
const deliveries = listDeliveries(state);
|
|
17
|
+
const callbackDeliveries = deliveries.filter((delivery) => delivery && delivery.callback_url);
|
|
18
|
+
const directDeliveries = deliveries.filter((delivery) => delivery && !delivery.callback_url);
|
|
19
|
+
const deliveredDeliveries = deliveries.filter((delivery) => delivery && delivery.status === "delivered");
|
|
20
|
+
const pendingDeliveries = deliveries.filter((delivery) => delivery && delivery.status === "pending_delivery");
|
|
21
|
+
const retryingCallbackDeliveries = callbackDeliveries.filter((delivery) => {
|
|
22
|
+
const callbackDelivery = delivery.callback_delivery || {};
|
|
23
|
+
return callbackDelivery.status === "retrying";
|
|
24
|
+
});
|
|
25
|
+
const queuedCallbackDeliveries = callbackDeliveries.filter((delivery) => {
|
|
26
|
+
const callbackDelivery = delivery.callback_delivery || {};
|
|
27
|
+
return callbackDelivery.status === "queued";
|
|
28
|
+
});
|
|
29
|
+
const inProgressCallbackDeliveries = callbackDeliveries.filter((delivery) => {
|
|
30
|
+
const callbackDelivery = delivery.callback_delivery || {};
|
|
31
|
+
return callbackDelivery.status === "in_progress";
|
|
32
|
+
});
|
|
33
|
+
const failedCallbackDeliveries = callbackDeliveries.filter((delivery) => {
|
|
34
|
+
const callbackDelivery = delivery.callback_delivery || {};
|
|
35
|
+
return callbackDelivery.status === "failed";
|
|
36
|
+
});
|
|
37
|
+
const signedCallbackDeliveries = callbackDeliveries.filter((delivery) => {
|
|
38
|
+
const callbackDelivery = delivery.callback_delivery || {};
|
|
39
|
+
return callbackDelivery.signature_mode === "hmac_sha256";
|
|
40
|
+
});
|
|
41
|
+
const callbackSignalingConfigured = config.callback_delivery_enabled === true;
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
ok: true,
|
|
45
|
+
product: packageJson.name,
|
|
46
|
+
category: "machine-commerce-delivery-summary",
|
|
47
|
+
summary_version: "xytara-delivery-summary-v1",
|
|
48
|
+
callback_delivery_enabled: config.callback_delivery_enabled,
|
|
49
|
+
callback_signing_secret_configured: Boolean(config.callback_signing_secret),
|
|
50
|
+
callback_timeout_ms: config.callback_timeout_ms,
|
|
51
|
+
callback_max_attempts: config.callback_max_attempts,
|
|
52
|
+
callback_retry_base_ms: config.callback_retry_base_ms,
|
|
53
|
+
worker_interval_ms: config.worker_interval_ms,
|
|
54
|
+
settlement_refresh_interval_ms: config.settlement_refresh_interval_ms,
|
|
55
|
+
delivery_count: deliveries.length,
|
|
56
|
+
callback_delivery_count: callbackDeliveries.length,
|
|
57
|
+
direct_delivery_count: directDeliveries.length,
|
|
58
|
+
delivered_delivery_count: deliveredDeliveries.length,
|
|
59
|
+
pending_delivery_count: pendingDeliveries.length,
|
|
60
|
+
queued_callback_delivery_count: queuedCallbackDeliveries.length,
|
|
61
|
+
in_progress_callback_delivery_count: inProgressCallbackDeliveries.length,
|
|
62
|
+
retrying_callback_delivery_count: retryingCallbackDeliveries.length,
|
|
63
|
+
failed_callback_delivery_count: failedCallbackDeliveries.length,
|
|
64
|
+
signed_callback_delivery_count: signedCallbackDeliveries.length,
|
|
65
|
+
delivery_posture: callbackSignalingConfigured ? "callback_enabled" : "callback_disabled",
|
|
66
|
+
ready: callbackSignalingConfigured,
|
|
67
|
+
blockers: callbackSignalingConfigured ? [] : ["callback_delivery_disabled"],
|
|
68
|
+
linked_surfaces: {
|
|
69
|
+
deliveries_ref: "/v1/deliveries",
|
|
70
|
+
go_live_ref: "/v1/go-live",
|
|
71
|
+
go_live_summary_ref: "/v1/go-live/summary",
|
|
72
|
+
runtime_durability_ref: "/v1/runtime/durability"
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function buildDeliverySummaryPack(state) {
|
|
78
|
+
const summary = summarizeDeliveryState(state);
|
|
79
|
+
return {
|
|
80
|
+
...summary,
|
|
81
|
+
delivery_statuses: {
|
|
82
|
+
delivered: summary.delivered_delivery_count,
|
|
83
|
+
pending: summary.pending_delivery_count,
|
|
84
|
+
callback_queued: summary.queued_callback_delivery_count,
|
|
85
|
+
callback_in_progress: summary.in_progress_callback_delivery_count,
|
|
86
|
+
callback_retrying: summary.retrying_callback_delivery_count,
|
|
87
|
+
callback_failed: summary.failed_callback_delivery_count
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
module.exports = {
|
|
93
|
+
buildDeliverySummaryPack,
|
|
94
|
+
summarizeDeliveryState
|
|
95
|
+
};
|