xytara 2.3.0 → 2.5.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/OPERATIONS_RUNBOOK.md +1 -0
- package/README.md +16 -0
- package/RELEASE_NOTES.md +18 -14
- package/SERVICE_CONTRACT.md +75 -0
- package/START_HERE.md +40 -0
- package/bin/xytara.js +55 -0
- package/index.js +1 -1
- package/lib/a2a_lane_contract.js +104 -0
- package/lib/a2c_lane_contract.js +111 -0
- package/lib/account_auth.js +347 -1
- package/lib/artifact_distribution_lane_contract.js +54 -0
- package/lib/asyncapi_contract.js +150 -0
- package/lib/auth_interop_contract.js +80 -0
- package/lib/capability_registry.js +572 -0
- package/lib/cloudevents_contract.js +80 -0
- package/lib/command_flow.js +20 -1
- package/lib/commerce_authority.js +449 -0
- package/lib/commerce_client.js +32 -0
- package/lib/commerce_economics.js +2168 -2
- package/lib/commerce_identity.js +578 -0
- package/lib/commerce_runtime.js +4 -0
- package/lib/erc8004_lane_contract.js +65 -0
- package/lib/event_system_lane_contract.js +75 -0
- package/lib/feature_control_lane_contract.js +54 -0
- package/lib/framework_lane_contract.js +89 -0
- package/lib/identity_auth.js +175 -0
- package/lib/identity_interop_contract.js +82 -0
- package/lib/integration_matrix_contract.js +93 -0
- package/lib/major_rails_lane_contract.js +90 -0
- package/lib/mcp_lane_contract.js +110 -0
- package/lib/openapi_contract.js +296 -0
- package/lib/protocol_lane_contract.js +114 -0
- package/lib/provenance_lane_contract.js +54 -0
- package/lib/provider_lane_contract.js +72 -0
- package/lib/release_history.js +16 -0
- package/lib/settlement_lane_contract.js +111 -0
- package/lib/shared_signals_lane_contract.js +54 -0
- package/lib/stablecoin_lane_contract.js +76 -0
- package/lib/stripe_mpp_lane_contract.js +93 -0
- package/lib/telemetry_lane_contract.js +54 -0
- package/lib/treasury_lane_contract.js +84 -0
- package/lib/x402_lane_contract.js +118 -0
- package/package.json +5 -3
- package/server.js +1544 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
buildPhase7EventSystemPack,
|
|
5
|
+
summarizePhase7EventSystemPack
|
|
6
|
+
} = require("./phase_7_event_system_pack");
|
|
7
|
+
const {
|
|
8
|
+
buildPhase7NatsRuntimePack,
|
|
9
|
+
summarizePhase7NatsRuntimePack
|
|
10
|
+
} = require("./phase_7_nats_runtime_pack");
|
|
11
|
+
|
|
12
|
+
function buildEventSystemLanePack() {
|
|
13
|
+
const phasePack = buildPhase7EventSystemPack();
|
|
14
|
+
const natsPack = buildPhase7NatsRuntimePack();
|
|
15
|
+
return {
|
|
16
|
+
product: "xytara",
|
|
17
|
+
category: "machine-commerce-event-system-lane-pack",
|
|
18
|
+
pack_version: "xytara-event-system-lane-pack-v1",
|
|
19
|
+
lane_state: "first_party_event_system_family_present",
|
|
20
|
+
posture: "event_and_system_integration_runtime_lane",
|
|
21
|
+
phase_alignment: {
|
|
22
|
+
phase_ref: phasePack.phase_ref,
|
|
23
|
+
phase_pack: phasePack,
|
|
24
|
+
phase_summary: summarizePhase7EventSystemPack(),
|
|
25
|
+
featured_lane: {
|
|
26
|
+
pack: natsPack,
|
|
27
|
+
summary: summarizePhase7NatsRuntimePack()
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
supported_surfaces: {
|
|
31
|
+
phase_summary_ref: "/v1/phases/phase-7/summary",
|
|
32
|
+
nats_runtime_summary_ref: "/v1/phases/phase-7/nats/summary",
|
|
33
|
+
kafka_runtime_summary_ref: "/v1/phases/phase-7/kafka/summary",
|
|
34
|
+
mqtt_runtime_summary_ref: "/v1/phases/phase-7/mqtt/summary",
|
|
35
|
+
webhook_runtime_summary_ref: "/v1/phases/phase-7/webhook-event-bus/summary",
|
|
36
|
+
continuity_summary_ref: "/v1/phases/phase-7/event-system-continuity/summary",
|
|
37
|
+
asyncapi_ref: "/asyncapi.json",
|
|
38
|
+
cloudevents_ref: "/cloudevents.json"
|
|
39
|
+
},
|
|
40
|
+
first_run_flows: [
|
|
41
|
+
{
|
|
42
|
+
flow_ref: "nats_subject_mesh_runtime",
|
|
43
|
+
recommended_reason: "best first durable event/system lane for subject-oriented machine coordination with NATS plus JetStream-style persistence posture",
|
|
44
|
+
sequence: [
|
|
45
|
+
"inspect_event_system_lane_summary",
|
|
46
|
+
"inspect_nats_runtime_summary",
|
|
47
|
+
"inspect_asyncapi_and_cloudevents_contracts",
|
|
48
|
+
"choose_broker_or_callback_family_for_the_integration"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
guardrails: [
|
|
53
|
+
"event-system lanes extend runtime coordination rather than replace the default transaction flow",
|
|
54
|
+
"nats and jetstream style durability should improve integration fit without widening the public runtime core into a generic bus platform"
|
|
55
|
+
]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function summarizeEventSystemLanePack() {
|
|
60
|
+
const pack = buildEventSystemLanePack();
|
|
61
|
+
return {
|
|
62
|
+
product: "xytara",
|
|
63
|
+
category: "machine-commerce-event-system-lane-pack-summary",
|
|
64
|
+
summary_version: "xytara-event-system-lane-pack-summary-v1",
|
|
65
|
+
lane_state: pack.lane_state,
|
|
66
|
+
posture: pack.posture,
|
|
67
|
+
first_run_flow_count: pack.first_run_flows.length,
|
|
68
|
+
linked_surfaces: pack.supported_surfaces
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
module.exports = {
|
|
73
|
+
buildEventSystemLanePack,
|
|
74
|
+
summarizeEventSystemLanePack
|
|
75
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function buildFeatureControlLanePack() {
|
|
4
|
+
return {
|
|
5
|
+
product: "xytara",
|
|
6
|
+
category: "machine-commerce-feature-control-lane-pack",
|
|
7
|
+
pack_version: "xytara-feature-control-lane-pack-v1",
|
|
8
|
+
lane_state: "first_party_feature_control_lane_present",
|
|
9
|
+
posture: "portable_policy_and_rollout_control_lane",
|
|
10
|
+
standards: ["openfeature", "ofrep"],
|
|
11
|
+
focal_controls: ["pricing_policy", "authority_policy", "machine_identity_policy", "trust_policy", "release_candidate_gates"],
|
|
12
|
+
supported_surfaces: {
|
|
13
|
+
pricing_policy_ref: "/v1/economics/accounts/:account_id/pricing-policy-package",
|
|
14
|
+
authority_policy_ref: "/v1/economics/accounts/:account_id/authority-policy-pack",
|
|
15
|
+
machine_identity_policy_ref: "/v1/economics/accounts/:account_id/machine-identity-policy-pack",
|
|
16
|
+
trust_policy_ref: "/v1/economics/accounts/:account_id/trust-layer-policy-pack",
|
|
17
|
+
release_candidate_ref: "/v1/release-candidate"
|
|
18
|
+
},
|
|
19
|
+
first_run_flows: [
|
|
20
|
+
{
|
|
21
|
+
flow_ref: "portable_rollout_control_alignment",
|
|
22
|
+
recommended_reason: "best path for teams that need portable rollout and policy posture without inventing a second control plane around the runtime",
|
|
23
|
+
sequence: [
|
|
24
|
+
"inspect_feature_control_lane_summary",
|
|
25
|
+
"map native policy packs to portable feature-control posture",
|
|
26
|
+
"use release and trust gates as rollout-compatible control surfaces",
|
|
27
|
+
"keep xytara policy truth canonical beneath external control adapters"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
guardrails: [
|
|
32
|
+
"feature control should expose rollout posture without replacing native pricing, authority, identity, or trust truth",
|
|
33
|
+
"policy portability should remain bounded to avoid accidental split-brain control semantics"
|
|
34
|
+
]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function summarizeFeatureControlLanePack() {
|
|
39
|
+
const pack = buildFeatureControlLanePack();
|
|
40
|
+
return {
|
|
41
|
+
product: "xytara",
|
|
42
|
+
category: "machine-commerce-feature-control-lane-pack-summary",
|
|
43
|
+
summary_version: "xytara-feature-control-lane-pack-summary-v1",
|
|
44
|
+
lane_state: pack.lane_state,
|
|
45
|
+
standard_count: pack.standards.length,
|
|
46
|
+
focal_control_count: pack.focal_controls.length,
|
|
47
|
+
linked_surfaces: pack.supported_surfaces
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = {
|
|
52
|
+
buildFeatureControlLanePack,
|
|
53
|
+
summarizeFeatureControlLanePack
|
|
54
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
buildPhase6FrameworkRuntimePack,
|
|
5
|
+
summarizePhase6FrameworkRuntimePack
|
|
6
|
+
} = require("./phase_6_framework_runtime_pack");
|
|
7
|
+
const {
|
|
8
|
+
summarizePhase6LanggraphRuntimePack
|
|
9
|
+
} = require("./phase_6_langgraph_runtime_pack");
|
|
10
|
+
const {
|
|
11
|
+
summarizePhase6LangchainRuntimePack
|
|
12
|
+
} = require("./phase_6_langchain_runtime_pack");
|
|
13
|
+
const {
|
|
14
|
+
summarizePhase6AutogenRuntimePack
|
|
15
|
+
} = require("./phase_6_autogen_runtime_pack");
|
|
16
|
+
const {
|
|
17
|
+
summarizePhase6SemanticKernelRuntimePack
|
|
18
|
+
} = require("./phase_6_semantic_kernel_runtime_pack");
|
|
19
|
+
|
|
20
|
+
function buildFrameworkLanePack() {
|
|
21
|
+
return {
|
|
22
|
+
product: "xytara",
|
|
23
|
+
category: "machine-commerce-framework-lane-pack",
|
|
24
|
+
pack_version: "xytara-framework-lane-pack-v1",
|
|
25
|
+
lane_state: "first_party_framework_family_present",
|
|
26
|
+
posture: "framework_orchestration_and_execution_family",
|
|
27
|
+
framework_family: {
|
|
28
|
+
pack: buildPhase6FrameworkRuntimePack(),
|
|
29
|
+
summary: summarizePhase6FrameworkRuntimePack()
|
|
30
|
+
},
|
|
31
|
+
featured_frameworks: {
|
|
32
|
+
langgraph: summarizePhase6LanggraphRuntimePack(),
|
|
33
|
+
langchain: summarizePhase6LangchainRuntimePack(),
|
|
34
|
+
autogen: summarizePhase6AutogenRuntimePack(),
|
|
35
|
+
semantic_kernel: summarizePhase6SemanticKernelRuntimePack()
|
|
36
|
+
},
|
|
37
|
+
registry_backed_frameworks: {
|
|
38
|
+
crewai: {
|
|
39
|
+
framework_id: "crewai",
|
|
40
|
+
posture: "registry-backed multi-agent workflow interoperability lane",
|
|
41
|
+
integration_ref: "builtin.execution.crewai"
|
|
42
|
+
},
|
|
43
|
+
llamaindex: {
|
|
44
|
+
framework_id: "llamaindex",
|
|
45
|
+
posture: "registry-backed retrieval and agent interoperability lane",
|
|
46
|
+
integration_ref: "builtin.execution.llamaindex"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
supported_surfaces: {
|
|
50
|
+
phase_6_summary_ref: "/v1/phases/phase-6/summary",
|
|
51
|
+
langgraph_summary_ref: "/v1/phases/phase-6/langgraph/summary",
|
|
52
|
+
langchain_summary_ref: "/v1/phases/phase-6/langchain/summary",
|
|
53
|
+
autogen_summary_ref: "/v1/phases/phase-6/autogen/summary",
|
|
54
|
+
semantic_kernel_summary_ref: "/v1/phases/phase-6/semantic-kernel/summary",
|
|
55
|
+
integrations_ref: "/v1/integrations",
|
|
56
|
+
integration_matrix_ref: "/v1/integration-matrix"
|
|
57
|
+
},
|
|
58
|
+
first_run_flows: [
|
|
59
|
+
{
|
|
60
|
+
flow_ref: "framework_family_selection",
|
|
61
|
+
recommended_reason: "best first path for understanding how orchestration frameworks map into the canonical runtime instead of sitting as disconnected side examples",
|
|
62
|
+
sequence: [
|
|
63
|
+
"inspect_framework_lane_summary",
|
|
64
|
+
"inspect_phase_6_framework_summary",
|
|
65
|
+
"inspect_named_framework_profiles",
|
|
66
|
+
"choose_framework_shape_that_best_matches_runtime_carry_needs"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function summarizeFrameworkLanePack() {
|
|
74
|
+
const pack = buildFrameworkLanePack();
|
|
75
|
+
return {
|
|
76
|
+
product: "xytara",
|
|
77
|
+
category: "machine-commerce-framework-lane-pack-summary",
|
|
78
|
+
summary_version: "xytara-framework-lane-pack-summary-v1",
|
|
79
|
+
lane_state: pack.lane_state,
|
|
80
|
+
featured_framework_count: Object.keys(pack.featured_frameworks).length + Object.keys(pack.registry_backed_frameworks).length,
|
|
81
|
+
first_run_flow_count: pack.first_run_flows.length,
|
|
82
|
+
linked_surfaces: pack.supported_surfaces
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
module.exports = {
|
|
87
|
+
buildFrameworkLanePack,
|
|
88
|
+
summarizeFrameworkLanePack
|
|
89
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function normalizeString(value, fallback = null) {
|
|
4
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
5
|
+
return trimmed || fallback;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function ensureArray(value) {
|
|
9
|
+
return Array.isArray(value) ? value : [];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function nowIso() {
|
|
13
|
+
return new Date().toISOString();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function buildIdentityBindingPublicView(binding) {
|
|
17
|
+
if (!binding) return null;
|
|
18
|
+
return {
|
|
19
|
+
binding_id: binding.binding_id,
|
|
20
|
+
account_id: binding.account_id,
|
|
21
|
+
status: binding.status,
|
|
22
|
+
identity_kind: binding.identity_kind,
|
|
23
|
+
identity_ref: binding.identity_ref,
|
|
24
|
+
registry_scope: binding.registry_scope || null,
|
|
25
|
+
attached_agent_account_id: binding.attached_agent_account_id || null,
|
|
26
|
+
source_transaction_id: binding.source_transaction_id || null,
|
|
27
|
+
expires_at_iso: binding.expires_at_iso || null,
|
|
28
|
+
rotated_from_binding_id: binding.rotated_from_binding_id || null,
|
|
29
|
+
replaced_by_binding_id: binding.replaced_by_binding_id || null,
|
|
30
|
+
created_at_iso: binding.created_at_iso,
|
|
31
|
+
updated_at_iso: binding.updated_at_iso,
|
|
32
|
+
revoked_at_iso: binding.revoked_at_iso || null,
|
|
33
|
+
revoke_reason: binding.revoke_reason || null,
|
|
34
|
+
labels: ensureArray(binding.labels),
|
|
35
|
+
issued_by: binding.issued_by || null
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function createIdentityBinding(state, body) {
|
|
40
|
+
const payload = body && typeof body === "object" && !Array.isArray(body) ? body : {};
|
|
41
|
+
const createdAtIso = nowIso();
|
|
42
|
+
const binding = {
|
|
43
|
+
binding_id: normalizeString(payload.binding_id, `identity_binding_${state.machineIdentityBindings.size + 1}`),
|
|
44
|
+
account_id: normalizeString(payload.account_id, "acct_demo"),
|
|
45
|
+
status: normalizeString(payload.status, "active"),
|
|
46
|
+
identity_kind: normalizeString(payload.identity_kind, "registry_anchor_identity"),
|
|
47
|
+
identity_ref: normalizeString(payload.identity_ref, `identity_ref_${state.machineIdentityBindings.size + 1}`),
|
|
48
|
+
registry_scope: normalizeString(payload.registry_scope, null),
|
|
49
|
+
attached_agent_account_id: normalizeString(payload.attached_agent_account_id, null),
|
|
50
|
+
source_transaction_id: normalizeString(payload.source_transaction_id, null),
|
|
51
|
+
expires_at_iso: normalizeString(payload.expires_at_iso, null),
|
|
52
|
+
labels: ensureArray(payload.labels).map((value) => String(value || "").trim()).filter(Boolean),
|
|
53
|
+
issued_by: normalizeString(payload.issued_by, "operator"),
|
|
54
|
+
rotated_from_binding_id: normalizeString(payload.rotated_from_binding_id, null),
|
|
55
|
+
replaced_by_binding_id: normalizeString(payload.replaced_by_binding_id, null),
|
|
56
|
+
created_at_iso: createdAtIso,
|
|
57
|
+
updated_at_iso: createdAtIso,
|
|
58
|
+
revoked_at_iso: null,
|
|
59
|
+
revoke_reason: null
|
|
60
|
+
};
|
|
61
|
+
state.machineIdentityBindings.set(binding.binding_id, binding);
|
|
62
|
+
return buildIdentityBindingPublicView(binding);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function listIdentityBindings(state, filters) {
|
|
66
|
+
const payload = filters && typeof filters === "object" && !Array.isArray(filters) ? filters : {};
|
|
67
|
+
const accountId = normalizeString(payload.account_id, null);
|
|
68
|
+
const status = normalizeString(payload.status, null);
|
|
69
|
+
return Array.from(state.machineIdentityBindings.values())
|
|
70
|
+
.filter((binding) => {
|
|
71
|
+
if (accountId && binding.account_id !== accountId) return false;
|
|
72
|
+
if (status && binding.status !== status) return false;
|
|
73
|
+
return true;
|
|
74
|
+
})
|
|
75
|
+
.map((binding) => buildIdentityBindingPublicView(binding));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function getIdentityBinding(state, bindingId) {
|
|
79
|
+
if (!bindingId || !state.machineIdentityBindings.has(bindingId)) return null;
|
|
80
|
+
return buildIdentityBindingPublicView(state.machineIdentityBindings.get(bindingId));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function revokeIdentityBinding(state, bindingId, body) {
|
|
84
|
+
if (!bindingId || !state.machineIdentityBindings.has(bindingId)) return null;
|
|
85
|
+
const payload = body && typeof body === "object" && !Array.isArray(body) ? body : {};
|
|
86
|
+
const current = state.machineIdentityBindings.get(bindingId);
|
|
87
|
+
const next = {
|
|
88
|
+
...current,
|
|
89
|
+
status: "revoked",
|
|
90
|
+
revoked_at_iso: nowIso(),
|
|
91
|
+
revoke_reason: normalizeString(payload.reason, "operator_revoked"),
|
|
92
|
+
updated_at_iso: nowIso()
|
|
93
|
+
};
|
|
94
|
+
state.machineIdentityBindings.set(bindingId, next);
|
|
95
|
+
return buildIdentityBindingPublicView(next);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function getIdentityBindingRotationSummary(state, bindingId) {
|
|
99
|
+
if (!bindingId || !state.machineIdentityBindings.has(bindingId)) return null;
|
|
100
|
+
const binding = state.machineIdentityBindings.get(bindingId);
|
|
101
|
+
return {
|
|
102
|
+
summary_version: "xytara-identity-binding-rotation-summary-v1",
|
|
103
|
+
binding_id: binding.binding_id,
|
|
104
|
+
account_id: binding.account_id,
|
|
105
|
+
status: binding.status,
|
|
106
|
+
predecessor_binding_id: binding.rotated_from_binding_id || null,
|
|
107
|
+
successor_binding_id: binding.replaced_by_binding_id || null,
|
|
108
|
+
expires_at_iso: binding.expires_at_iso || null,
|
|
109
|
+
rotation_state: binding.rotated_from_binding_id || binding.replaced_by_binding_id
|
|
110
|
+
? "lineage_present"
|
|
111
|
+
: "standalone",
|
|
112
|
+
linked_surfaces: {
|
|
113
|
+
identity_binding_ref: `/v1/identity/bindings/${encodeURIComponent(binding.binding_id)}`
|
|
114
|
+
},
|
|
115
|
+
generated_at_iso: nowIso()
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function renewIdentityBinding(state, bindingId, body) {
|
|
120
|
+
if (!bindingId || !state.machineIdentityBindings.has(bindingId)) return null;
|
|
121
|
+
const payload = body && typeof body === "object" && !Array.isArray(body) ? body : {};
|
|
122
|
+
const current = state.machineIdentityBindings.get(bindingId);
|
|
123
|
+
const next = {
|
|
124
|
+
...current,
|
|
125
|
+
expires_at_iso: normalizeString(payload.expires_at_iso, current.expires_at_iso || null),
|
|
126
|
+
updated_at_iso: nowIso()
|
|
127
|
+
};
|
|
128
|
+
state.machineIdentityBindings.set(bindingId, next);
|
|
129
|
+
return buildIdentityBindingPublicView(next);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function rotateIdentityBinding(state, bindingId, body) {
|
|
133
|
+
if (!bindingId || !state.machineIdentityBindings.has(bindingId)) return null;
|
|
134
|
+
const payload = body && typeof body === "object" && !Array.isArray(body) ? body : {};
|
|
135
|
+
const current = state.machineIdentityBindings.get(bindingId);
|
|
136
|
+
const successorBindingId = normalizeString(payload.successor_binding_id, `${bindingId}_rotated`);
|
|
137
|
+
const successor = createIdentityBinding(state, {
|
|
138
|
+
binding_id: successorBindingId,
|
|
139
|
+
account_id: current.account_id,
|
|
140
|
+
identity_kind: normalizeString(payload.identity_kind, current.identity_kind),
|
|
141
|
+
identity_ref: normalizeString(payload.identity_ref, current.identity_ref),
|
|
142
|
+
registry_scope: normalizeString(payload.registry_scope, current.registry_scope),
|
|
143
|
+
attached_agent_account_id: normalizeString(payload.attached_agent_account_id, current.attached_agent_account_id),
|
|
144
|
+
source_transaction_id: normalizeString(payload.source_transaction_id, current.source_transaction_id),
|
|
145
|
+
expires_at_iso: normalizeString(payload.expires_at_iso, current.expires_at_iso || null),
|
|
146
|
+
labels: ensureArray(payload.labels).length > 0 ? ensureArray(payload.labels) : ensureArray(current.labels),
|
|
147
|
+
issued_by: normalizeString(payload.issued_by, current.issued_by || "operator"),
|
|
148
|
+
rotated_from_binding_id: current.binding_id
|
|
149
|
+
});
|
|
150
|
+
revokeIdentityBinding(state, bindingId, {
|
|
151
|
+
reason: normalizeString(payload.reason, "rotated_to_successor")
|
|
152
|
+
});
|
|
153
|
+
state.machineIdentityBindings.set(successor.binding_id, {
|
|
154
|
+
...state.machineIdentityBindings.get(successor.binding_id),
|
|
155
|
+
rotated_from_binding_id: current.binding_id
|
|
156
|
+
});
|
|
157
|
+
state.machineIdentityBindings.set(bindingId, {
|
|
158
|
+
...state.machineIdentityBindings.get(bindingId),
|
|
159
|
+
replaced_by_binding_id: successor.binding_id
|
|
160
|
+
});
|
|
161
|
+
return {
|
|
162
|
+
rotated_binding: buildIdentityBindingPublicView(state.machineIdentityBindings.get(bindingId)),
|
|
163
|
+
successor_identity_binding: buildIdentityBindingPublicView(state.machineIdentityBindings.get(successor.binding_id))
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
module.exports = {
|
|
168
|
+
createIdentityBinding,
|
|
169
|
+
listIdentityBindings,
|
|
170
|
+
getIdentityBinding,
|
|
171
|
+
getIdentityBindingRotationSummary,
|
|
172
|
+
renewIdentityBinding,
|
|
173
|
+
revokeIdentityBinding,
|
|
174
|
+
rotateIdentityBinding
|
|
175
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const pkg = require("../package.json");
|
|
4
|
+
|
|
5
|
+
function buildIdentityInteropContract() {
|
|
6
|
+
return {
|
|
7
|
+
product: "xytara",
|
|
8
|
+
category: "machine-commerce-identity-interop-contract",
|
|
9
|
+
contract_version: "xytara-identity-interop-contract-v1",
|
|
10
|
+
service_version: pkg.version,
|
|
11
|
+
primary_posture: "native_machine_identity_and_authority_with_jwt_and_did_vc_interop",
|
|
12
|
+
supported_interop_profiles: [
|
|
13
|
+
{
|
|
14
|
+
profile_id: "jwt_jws_jwk_runtime_claims",
|
|
15
|
+
standards: ["jwt", "jws", "jwk"],
|
|
16
|
+
intended_use: "portable signed claims and upstream assertion interop around runtime access",
|
|
17
|
+
primary_routes: ["/v1/auth-profiles", "/v1/account-auth/authority-bindings", "/v1/account-auth/spend-credentials"]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
profile_id: "did_vc_machine_identity_bridge",
|
|
21
|
+
standards: ["did_core", "vc_data_model"],
|
|
22
|
+
intended_use: "portable machine identity and attestation mapping around native identity bindings",
|
|
23
|
+
primary_routes: ["/v1/identity/bindings", "/v1/economics/accounts/:account_id/machine-identity-summary"]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
profile_id: "sd_jwt_vc_bounded_disclosure",
|
|
27
|
+
standards: ["sd-jwt-vc", "jwt", "jws"],
|
|
28
|
+
intended_use: "selective-disclosure identity or authority assertions without replacing native consequence controls",
|
|
29
|
+
primary_routes: ["/v1/account-auth/authority-bindings", "/v1/identity/bindings"]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
profile_id: "oidc4vc_oidc4vp_wallet_presentation_optional",
|
|
33
|
+
standards: ["oidc4vc", "oidc4vp"],
|
|
34
|
+
intended_use: "optional wallet and presentation interoperability for partner identity exchange",
|
|
35
|
+
primary_routes: ["/v1/identity-interop", "/v1/auth-profiles"]
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
deferred_or_optional_profiles: [
|
|
39
|
+
{ profile_id: "cose_cbor_compact_identity_artifacts", standards: ["cose", "cbor"], status: "later_or_environment_specific" },
|
|
40
|
+
{ profile_id: "json_ld_vc_semantic_credential_line", standards: ["json-ld-vc"], status: "later_or_ecosystem_specific" }
|
|
41
|
+
],
|
|
42
|
+
native_mapping: {
|
|
43
|
+
identity_bindings: "/v1/identity/bindings",
|
|
44
|
+
authority_bindings: "/v1/account-auth/authority-bindings",
|
|
45
|
+
spend_credentials: "/v1/account-auth/spend-credentials",
|
|
46
|
+
machine_identity_summary: "/v1/economics/accounts/:account_id/machine-identity-summary",
|
|
47
|
+
authority_summary: "/v1/economics/accounts/:account_id/authority-summary"
|
|
48
|
+
},
|
|
49
|
+
guardrails: [
|
|
50
|
+
"native machine identity bindings remain canonical inside xytara",
|
|
51
|
+
"jwt and vc profiles may carry claims but must not replace native authority or consequence bounds",
|
|
52
|
+
"did or vc interoperability must remain subordinate to runtime identity and authority truth",
|
|
53
|
+
"selective disclosure may narrow exposure but must not weaken operator auditability"
|
|
54
|
+
],
|
|
55
|
+
linked_surfaces: {
|
|
56
|
+
auth_interop_ref: "/v1/auth-profiles",
|
|
57
|
+
openapi_ref: "/openapi.json",
|
|
58
|
+
asyncapi_ref: "/asyncapi.json",
|
|
59
|
+
cloudevents_ref: "/cloudevents.json",
|
|
60
|
+
service_contract_ref: "SERVICE_CONTRACT.md"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function summarizeIdentityInteropContract() {
|
|
66
|
+
const contract = buildIdentityInteropContract();
|
|
67
|
+
return {
|
|
68
|
+
product: "xytara",
|
|
69
|
+
category: "machine-commerce-identity-interop-contract-summary",
|
|
70
|
+
summary_version: "xytara-identity-interop-contract-summary-v1",
|
|
71
|
+
contract_version: contract.contract_version,
|
|
72
|
+
profile_count: contract.supported_interop_profiles.length,
|
|
73
|
+
deferred_profile_count: contract.deferred_or_optional_profiles.length,
|
|
74
|
+
primary_posture: contract.primary_posture,
|
|
75
|
+
linked_surfaces: contract.linked_surfaces
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
module.exports = {
|
|
80
|
+
buildIdentityInteropContract,
|
|
81
|
+
summarizeIdentityInteropContract
|
|
82
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { summarizeProviderLanePack } = require("./provider_lane_contract");
|
|
4
|
+
const { summarizeFrameworkLanePack } = require("./framework_lane_contract");
|
|
5
|
+
const { summarizeProtocolLanePack } = require("./protocol_lane_contract");
|
|
6
|
+
const { summarizeMcpLanePack } = require("./mcp_lane_contract");
|
|
7
|
+
const { summarizeA2ALanePack } = require("./a2a_lane_contract");
|
|
8
|
+
const { summarizeA2CLanePack } = require("./a2c_lane_contract");
|
|
9
|
+
const { summarizeX402LanePack } = require("./x402_lane_contract");
|
|
10
|
+
const { summarizeSettlementLanePack } = require("./settlement_lane_contract");
|
|
11
|
+
const { summarizeStablecoinLanePack } = require("./stablecoin_lane_contract");
|
|
12
|
+
const { summarizeMajorRailsLanePack } = require("./major_rails_lane_contract");
|
|
13
|
+
const { summarizeTreasuryLanePack } = require("./treasury_lane_contract");
|
|
14
|
+
const { summarizeErc8004LanePack } = require("./erc8004_lane_contract");
|
|
15
|
+
const { summarizeEventSystemLanePack } = require("./event_system_lane_contract");
|
|
16
|
+
const { summarizeTelemetryLanePack } = require("./telemetry_lane_contract");
|
|
17
|
+
const { summarizeProvenanceLanePack } = require("./provenance_lane_contract");
|
|
18
|
+
const { summarizeArtifactDistributionLanePack } = require("./artifact_distribution_lane_contract");
|
|
19
|
+
const { summarizeSharedSignalsLanePack } = require("./shared_signals_lane_contract");
|
|
20
|
+
const { summarizeFeatureControlLanePack } = require("./feature_control_lane_contract");
|
|
21
|
+
|
|
22
|
+
function buildIntegrationMatrixPack(integrations = []) {
|
|
23
|
+
const rows = Array.isArray(integrations) ? integrations : [];
|
|
24
|
+
return {
|
|
25
|
+
product: "xytara",
|
|
26
|
+
category: "machine-commerce-integration-matrix-pack",
|
|
27
|
+
pack_version: "xytara-integration-matrix-pack-v1",
|
|
28
|
+
posture: "canonical_public_view_of_provider_framework_protocol_payment_settlement_and_registry_breadth",
|
|
29
|
+
counts: {
|
|
30
|
+
integration_count: rows.length,
|
|
31
|
+
builtin_count: rows.filter((entry) => entry.source === "builtin").length,
|
|
32
|
+
third_party_example_count: rows.filter((entry) => entry.source === "third_party_example").length,
|
|
33
|
+
production_default_count: rows.filter((entry) => entry.integration_maturity === "production_default").length,
|
|
34
|
+
certified_count: rows.filter((entry) => entry.certification_state === "certified").length
|
|
35
|
+
},
|
|
36
|
+
top_level_lanes: {
|
|
37
|
+
providers: summarizeProviderLanePack(),
|
|
38
|
+
frameworks: summarizeFrameworkLanePack(),
|
|
39
|
+
protocols: summarizeProtocolLanePack(),
|
|
40
|
+
mcp: summarizeMcpLanePack(),
|
|
41
|
+
a2a: summarizeA2ALanePack(),
|
|
42
|
+
a2c: summarizeA2CLanePack(),
|
|
43
|
+
x402: summarizeX402LanePack(),
|
|
44
|
+
settlement: summarizeSettlementLanePack(),
|
|
45
|
+
stablecoins: summarizeStablecoinLanePack(),
|
|
46
|
+
major_rails: summarizeMajorRailsLanePack(),
|
|
47
|
+
treasury: summarizeTreasuryLanePack(),
|
|
48
|
+
erc8004: summarizeErc8004LanePack(),
|
|
49
|
+
event_systems: summarizeEventSystemLanePack(),
|
|
50
|
+
telemetry: summarizeTelemetryLanePack(),
|
|
51
|
+
provenance: summarizeProvenanceLanePack(),
|
|
52
|
+
artifact_distribution: summarizeArtifactDistributionLanePack(),
|
|
53
|
+
shared_signals: summarizeSharedSignalsLanePack(),
|
|
54
|
+
feature_control: summarizeFeatureControlLanePack()
|
|
55
|
+
},
|
|
56
|
+
supported_surfaces: {
|
|
57
|
+
integrations_ref: "/v1/integrations",
|
|
58
|
+
integration_summary_ref: "/v1/integrations/summary",
|
|
59
|
+
provider_lane_ref: "/v1/providers",
|
|
60
|
+
framework_lane_ref: "/v1/frameworks",
|
|
61
|
+
protocol_lane_ref: "/v1/protocols",
|
|
62
|
+
mcp_lane_ref: "/v1/mcp",
|
|
63
|
+
settlement_lane_ref: "/v1/settlement",
|
|
64
|
+
event_system_lane_ref: "/v1/event-systems",
|
|
65
|
+
telemetry_lane_ref: "/v1/telemetry",
|
|
66
|
+
provenance_lane_ref: "/v1/provenance",
|
|
67
|
+
artifact_distribution_lane_ref: "/v1/artifact-distribution",
|
|
68
|
+
shared_signals_lane_ref: "/v1/shared-signals",
|
|
69
|
+
feature_control_lane_ref: "/v1/feature-control",
|
|
70
|
+
treasury_lane_ref: "/v1/treasury",
|
|
71
|
+
integration_protocols_ref: "/v1/integrations/protocols"
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function summarizeIntegrationMatrixPack(integrations = []) {
|
|
77
|
+
const pack = buildIntegrationMatrixPack(integrations);
|
|
78
|
+
return {
|
|
79
|
+
product: "xytara",
|
|
80
|
+
category: "machine-commerce-integration-matrix-pack-summary",
|
|
81
|
+
summary_version: "xytara-integration-matrix-pack-summary-v1",
|
|
82
|
+
integration_count: pack.counts.integration_count,
|
|
83
|
+
production_default_count: pack.counts.production_default_count,
|
|
84
|
+
certified_count: pack.counts.certified_count,
|
|
85
|
+
lane_count: Object.keys(pack.top_level_lanes).length,
|
|
86
|
+
linked_surfaces: pack.supported_surfaces
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
module.exports = {
|
|
91
|
+
buildIntegrationMatrixPack,
|
|
92
|
+
summarizeIntegrationMatrixPack
|
|
93
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
buildPhase5MajorRailsPack,
|
|
5
|
+
summarizePhase5MajorRailsPack
|
|
6
|
+
} = require("./phase_5_major_rails_pack");
|
|
7
|
+
const {
|
|
8
|
+
buildPhase5SolanaRuntimePack,
|
|
9
|
+
summarizePhase5SolanaRuntimePack
|
|
10
|
+
} = require("./phase_5_solana_runtime_pack");
|
|
11
|
+
const {
|
|
12
|
+
buildPhase5AntelopeRuntimePack,
|
|
13
|
+
summarizePhase5AntelopeRuntimePack
|
|
14
|
+
} = require("./phase_5_antelope_runtime_pack");
|
|
15
|
+
const {
|
|
16
|
+
buildPhase5ProtonXprRuntimePack,
|
|
17
|
+
summarizePhase5ProtonXprRuntimePack
|
|
18
|
+
} = require("./phase_5_proton_xpr_runtime_pack");
|
|
19
|
+
|
|
20
|
+
function buildMajorRailsLanePack() {
|
|
21
|
+
const phasePack = buildPhase5MajorRailsPack();
|
|
22
|
+
return {
|
|
23
|
+
product: "xytara",
|
|
24
|
+
category: "machine-commerce-major-rails-lane-pack",
|
|
25
|
+
pack_version: "xytara-major-rails-lane-pack-v1",
|
|
26
|
+
lane_state: "first_party_major_rails_family_present",
|
|
27
|
+
posture: "practical_non_default_settlement_breadth_lane",
|
|
28
|
+
family_summary: summarizePhase5MajorRailsPack(),
|
|
29
|
+
featured_lanes: {
|
|
30
|
+
solana: {
|
|
31
|
+
pack: buildPhase5SolanaRuntimePack(),
|
|
32
|
+
summary: summarizePhase5SolanaRuntimePack()
|
|
33
|
+
},
|
|
34
|
+
antelope: {
|
|
35
|
+
pack: buildPhase5AntelopeRuntimePack(),
|
|
36
|
+
summary: summarizePhase5AntelopeRuntimePack()
|
|
37
|
+
},
|
|
38
|
+
proton_xpr_and_metal: {
|
|
39
|
+
pack: buildPhase5ProtonXprRuntimePack(),
|
|
40
|
+
summary: summarizePhase5ProtonXprRuntimePack(),
|
|
41
|
+
named_family_members: ["proton_xpr", "metal"]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
supported_surfaces: {
|
|
45
|
+
phase_summary_ref: "/v1/phases/phase-5/summary",
|
|
46
|
+
major_rails_summary_ref: "/v1/phases/phase-5/major-rails-continuity/summary",
|
|
47
|
+
solana_summary_ref: "/v1/phases/phase-5/solana/summary",
|
|
48
|
+
antelope_summary_ref: "/v1/phases/phase-5/antelope/summary",
|
|
49
|
+
proton_xpr_summary_ref: "/v1/phases/phase-5/proton-xpr/summary",
|
|
50
|
+
settlement_family_ref: "/v1/settlement",
|
|
51
|
+
stablecoin_lane_ref: "/v1/stablecoins"
|
|
52
|
+
},
|
|
53
|
+
first_run_flows: [
|
|
54
|
+
{
|
|
55
|
+
flow_ref: "major_rails_family_selection",
|
|
56
|
+
recommended_reason: "best first path for understanding practical non-default settlement breadth beyond the native and stablecoin defaults",
|
|
57
|
+
sequence: [
|
|
58
|
+
"inspect_major_rails_lane_summary",
|
|
59
|
+
"inspect_phase_5_major_rails_summary",
|
|
60
|
+
"inspect_solana_antelope_and_proton_xpr_profiles",
|
|
61
|
+
"choose_the_lane_that_best_matches_integrator_ecosystem_fit"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
guardrails: [
|
|
66
|
+
"major rails should stay a practical settlement family rather than turn xytara into a generic chain abstraction layer",
|
|
67
|
+
"named ecosystems improve adoption only when they remain subordinate to the canonical transaction and economics model"
|
|
68
|
+
],
|
|
69
|
+
phase_alignment: phasePack
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function summarizeMajorRailsLanePack() {
|
|
74
|
+
const pack = buildMajorRailsLanePack();
|
|
75
|
+
return {
|
|
76
|
+
product: "xytara",
|
|
77
|
+
category: "machine-commerce-major-rails-lane-pack-summary",
|
|
78
|
+
summary_version: "xytara-major-rails-lane-pack-summary-v1",
|
|
79
|
+
lane_state: pack.lane_state,
|
|
80
|
+
posture: pack.posture,
|
|
81
|
+
featured_lane_count: Object.keys(pack.featured_lanes).length,
|
|
82
|
+
first_run_flow_count: pack.first_run_flows.length,
|
|
83
|
+
linked_surfaces: pack.supported_surfaces
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
module.exports = {
|
|
88
|
+
buildMajorRailsLanePack,
|
|
89
|
+
summarizeMajorRailsLanePack
|
|
90
|
+
};
|