xytara 1.22.0 → 1.23.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/README.md CHANGED
@@ -226,6 +226,15 @@ The current `1.22.0` line starts turning that adapter-stable operating contract
226
226
 
227
227
  This is intended to make the transaction-side continuation path easier to rely on operationally as a durable public interface instead of only a stable operating contract shape.
228
228
 
229
+ The current `1.23.0` line starts turning that adapter-reliable operating interface into a clearer adapter-integrable operating path:
230
+
231
+ - operating-integration summaries on top of the default operating-interface path
232
+ - compact operating-integration bundles for direct adapter-facing integration posture
233
+ - default operating-integration summaries for the next proof-side operating-integration run posture
234
+ - clearer operating-integration ids and stable integrable carry
235
+
236
+ This is intended to make the transaction-side continuation path easier to plug into adapters directly as a durable public operating path instead of only a reliable interface shape.
237
+
229
238
  ## Package Surface
230
239
 
231
240
  The SDK is broad, but it stays organized into a few repeatable families instead of one-off surfaces.
package/index.js CHANGED
@@ -40,7 +40,7 @@ const {
40
40
  } = require("./integrations/registry");
41
41
 
42
42
  const COMMERCE_SDK_NAME = "xytara";
43
- const COMMERCE_SDK_VERSION = "1.22.0";
43
+ const COMMERCE_SDK_VERSION = "1.23.0";
44
44
  const COMMERCE_API_VERSION = "v1";
45
45
 
46
46
  function createClient(options) {
@@ -4872,6 +4872,54 @@ class CommerceClient {
4872
4872
  });
4873
4873
  }
4874
4874
 
4875
+ async prepareInteractionResultPackageOperatingIntegrationSummary(continuationRef, body, options) {
4876
+ const opts = options || {};
4877
+ return this.runNamedTaskRoute("/v1/transaction-center/result-package-continuations/prepare/operating-integration-summary", {
4878
+ command: opts.command || String(continuationRef || "").trim() || "result.package.continuation.operating.integration.summary",
4879
+ continuation_ref: String(continuationRef || "").trim(),
4880
+ body: body || {},
4881
+ callback_url: opts.callbackUrl || null,
4882
+ settlement_mode: opts.settlementMode || null,
4883
+ payment_protocol: opts.paymentProtocol || null,
4884
+ protocol: opts.protocol || null,
4885
+ integration_id: opts.integrationId || null,
4886
+ integration_ids: Array.isArray(opts.integrationIds) ? opts.integrationIds : [],
4887
+ integration_context: opts.integrationContext || null
4888
+ });
4889
+ }
4890
+
4891
+ async prepareInteractionResultPackageOperatingIntegrationBundle(continuationRef, body, options) {
4892
+ const opts = options || {};
4893
+ return this.runNamedTaskRoute("/v1/transaction-center/result-package-continuations/prepare/operating-integration-bundle", {
4894
+ command: opts.command || String(continuationRef || "").trim() || "result.package.continuation.operating.integration.bundle",
4895
+ continuation_ref: String(continuationRef || "").trim(),
4896
+ body: body || {},
4897
+ callback_url: opts.callbackUrl || null,
4898
+ settlement_mode: opts.settlementMode || null,
4899
+ payment_protocol: opts.paymentProtocol || null,
4900
+ protocol: opts.protocol || null,
4901
+ integration_id: opts.integrationId || null,
4902
+ integration_ids: Array.isArray(opts.integrationIds) ? opts.integrationIds : [],
4903
+ integration_context: opts.integrationContext || null
4904
+ });
4905
+ }
4906
+
4907
+ async prepareInteractionResultPackageOperatingIntegrationDefaultSummary(continuationRef, body, options) {
4908
+ const opts = options || {};
4909
+ return this.runNamedTaskRoute("/v1/transaction-center/result-package-continuations/prepare/operating-integration-default-summary", {
4910
+ command: opts.command || String(continuationRef || "").trim() || "result.package.continuation.operating.integration.default.summary",
4911
+ continuation_ref: String(continuationRef || "").trim(),
4912
+ body: body || {},
4913
+ callback_url: opts.callbackUrl || null,
4914
+ settlement_mode: opts.settlementMode || null,
4915
+ payment_protocol: opts.paymentProtocol || null,
4916
+ protocol: opts.protocol || null,
4917
+ integration_id: opts.integrationId || null,
4918
+ integration_ids: Array.isArray(opts.integrationIds) ? opts.integrationIds : [],
4919
+ integration_context: opts.integrationContext || null
4920
+ });
4921
+ }
4922
+
4875
4923
  async runNamedTaskRoute(path, payload) {
4876
4924
  if (!this.apiKey || !this.walletId || !this.walletSecret) {
4877
4925
  throw new Error("named task routes require apiKey, walletId, and walletSecret");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xytara",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
4
4
  "description": "Machine commerce SDK for discovery, quoting, execution, lifecycle inspection, and adapters.",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
package/server.js CHANGED
@@ -1776,6 +1776,58 @@ function buildPreparedContinuationDefaultOperatingInterfaceSummary(portableHando
1776
1776
  };
1777
1777
  }
1778
1778
 
1779
+ function buildPreparedContinuationAdapterIntegrableOperatingIntegrationSummary(portableHandoff, continuation) {
1780
+ const operatingInterface = buildPreparedContinuationDefaultOperatingInterfaceSummary(portableHandoff, continuation);
1781
+ return {
1782
+ ok: operatingInterface.ok === true,
1783
+ default_operating_interface_ref: operatingInterface.default_operating_interface_ref || null,
1784
+ operating_integration_ref: operatingInterface.default_operating_interface_ref
1785
+ ? `integration.${operatingInterface.default_operating_interface_ref}`
1786
+ : null,
1787
+ integrable_operating_ids: Array.isArray(operatingInterface.stable_default_operating_interface_ids)
1788
+ ? operatingInterface.stable_default_operating_interface_ids
1789
+ : [],
1790
+ operating_integration_carry: operatingInterface.default_operating_interface_carry || {},
1791
+ adapter_integrable: operatingInterface.operating_interface_reliable_by_default === true,
1792
+ next_surface: "/v1/proof-center/result-package-handoff/review/operating-integration"
1793
+ };
1794
+ }
1795
+
1796
+ function buildPreparedContinuationAdapterIntegrableOperatingIntegrationBundle(portableHandoff, continuation) {
1797
+ const handoff = portableHandoff && typeof portableHandoff === "object" ? portableHandoff : {};
1798
+ const summary = buildPreparedContinuationAdapterIntegrableOperatingIntegrationSummary(portableHandoff, continuation);
1799
+ return {
1800
+ ok: true,
1801
+ operating_integration_summary: summary,
1802
+ operating_integration_template: {
1803
+ ok: true,
1804
+ operating_integration_ref: summary.operating_integration_ref || null,
1805
+ target_surface: "/v1/proof-center/result-package-handoff/review/operating-integration",
1806
+ request_template: {
1807
+ handoff_bundle: handoff
1808
+ },
1809
+ stable_boundary_ids: Array.isArray(summary.integrable_operating_ids) ? summary.integrable_operating_ids : []
1810
+ }
1811
+ };
1812
+ }
1813
+
1814
+ function buildPreparedContinuationDefaultOperatingIntegrationSummary(portableHandoff, continuation) {
1815
+ const operatingIntegration = buildPreparedContinuationAdapterIntegrableOperatingIntegrationSummary(portableHandoff, continuation);
1816
+ return {
1817
+ ok: operatingIntegration.ok === true,
1818
+ operating_integration_ref: operatingIntegration.operating_integration_ref || null,
1819
+ default_operating_integration_ref: operatingIntegration.operating_integration_ref
1820
+ ? `default.${operatingIntegration.operating_integration_ref}`
1821
+ : null,
1822
+ stable_default_operating_integration_ids: Array.isArray(operatingIntegration.integrable_operating_ids)
1823
+ ? operatingIntegration.integrable_operating_ids
1824
+ : [],
1825
+ default_operating_integration_carry: operatingIntegration.operating_integration_carry || {},
1826
+ operating_integration_integrable_by_default: operatingIntegration.adapter_integrable === true,
1827
+ next_surface: "/v1/proof-center/result-package-handoff/review/operating-integration-run"
1828
+ };
1829
+ }
1830
+
1779
1831
  function buildInteractionResultPackageContinuationRequestTemplate(portableHandoff, continuation) {
1780
1832
  const handoff = portableHandoff && typeof portableHandoff === "object" ? portableHandoff : {};
1781
1833
  return {
@@ -3680,6 +3732,99 @@ async function routeRequest(req, res) {
3680
3732
  return;
3681
3733
  }
3682
3734
 
3735
+ if (req.method === "POST" && url.pathname === "/v1/transaction-center/result-package-continuations/prepare/operating-integration-summary") {
3736
+ const body = await readJsonBody(req);
3737
+ const continuationRef = String(body && body.continuation_ref || "").trim();
3738
+ const continuation = getInteractionResultPackageContinuation(continuationRef);
3739
+ if (!continuation) {
3740
+ sendJson(res, 404, { ok: false, error: "result_package_continuation_not_found" });
3741
+ return;
3742
+ }
3743
+ const resultPackage = getInteractionResultPackage(continuation.result_package_ref);
3744
+ if (!resultPackage) {
3745
+ sendJson(res, 404, { ok: false, error: "result_package_not_found" });
3746
+ return;
3747
+ }
3748
+ const payload = buildInteractionSpinePathRunPayload({
3749
+ ...(body && typeof body === "object" && !Array.isArray(body) ? body : {}),
3750
+ spine_path_ref: resultPackage.source_ref
3751
+ });
3752
+ if (!payload) {
3753
+ sendJson(res, 404, { ok: false, error: "result_package_continuation_not_found" });
3754
+ return;
3755
+ }
3756
+ const result = executeCommandRequest(state, payload, req.headers);
3757
+ if (result.status !== 200) {
3758
+ sendJson(res, result.status, result.payload);
3759
+ return;
3760
+ }
3761
+ const portableHandoff = buildInteractionResultPackagePortableHandoff(result.payload, resultPackage);
3762
+ sendJson(res, 200, buildPreparedContinuationAdapterIntegrableOperatingIntegrationSummary(portableHandoff, continuation));
3763
+ return;
3764
+ }
3765
+
3766
+ if (req.method === "POST" && url.pathname === "/v1/transaction-center/result-package-continuations/prepare/operating-integration-bundle") {
3767
+ const body = await readJsonBody(req);
3768
+ const continuationRef = String(body && body.continuation_ref || "").trim();
3769
+ const continuation = getInteractionResultPackageContinuation(continuationRef);
3770
+ if (!continuation) {
3771
+ sendJson(res, 404, { ok: false, error: "result_package_continuation_not_found" });
3772
+ return;
3773
+ }
3774
+ const resultPackage = getInteractionResultPackage(continuation.result_package_ref);
3775
+ if (!resultPackage) {
3776
+ sendJson(res, 404, { ok: false, error: "result_package_not_found" });
3777
+ return;
3778
+ }
3779
+ const payload = buildInteractionSpinePathRunPayload({
3780
+ ...(body && typeof body === "object" && !Array.isArray(body) ? body : {}),
3781
+ spine_path_ref: resultPackage.source_ref
3782
+ });
3783
+ if (!payload) {
3784
+ sendJson(res, 404, { ok: false, error: "result_package_continuation_not_found" });
3785
+ return;
3786
+ }
3787
+ const result = executeCommandRequest(state, payload, req.headers);
3788
+ if (result.status !== 200) {
3789
+ sendJson(res, result.status, result.payload);
3790
+ return;
3791
+ }
3792
+ const portableHandoff = buildInteractionResultPackagePortableHandoff(result.payload, resultPackage);
3793
+ sendJson(res, 200, buildPreparedContinuationAdapterIntegrableOperatingIntegrationBundle(portableHandoff, continuation));
3794
+ return;
3795
+ }
3796
+
3797
+ if (req.method === "POST" && url.pathname === "/v1/transaction-center/result-package-continuations/prepare/operating-integration-default-summary") {
3798
+ const body = await readJsonBody(req);
3799
+ const continuationRef = String(body && body.continuation_ref || "").trim();
3800
+ const continuation = getInteractionResultPackageContinuation(continuationRef);
3801
+ if (!continuation) {
3802
+ sendJson(res, 404, { ok: false, error: "result_package_continuation_not_found" });
3803
+ return;
3804
+ }
3805
+ const resultPackage = getInteractionResultPackage(continuation.result_package_ref);
3806
+ if (!resultPackage) {
3807
+ sendJson(res, 404, { ok: false, error: "result_package_not_found" });
3808
+ return;
3809
+ }
3810
+ const payload = buildInteractionSpinePathRunPayload({
3811
+ ...(body && typeof body === "object" && !Array.isArray(body) ? body : {}),
3812
+ spine_path_ref: resultPackage.source_ref
3813
+ });
3814
+ if (!payload) {
3815
+ sendJson(res, 404, { ok: false, error: "result_package_continuation_not_found" });
3816
+ return;
3817
+ }
3818
+ const result = executeCommandRequest(state, payload, req.headers);
3819
+ if (result.status !== 200) {
3820
+ sendJson(res, result.status, result.payload);
3821
+ return;
3822
+ }
3823
+ const portableHandoff = buildInteractionResultPackagePortableHandoff(result.payload, resultPackage);
3824
+ sendJson(res, 200, buildPreparedContinuationDefaultOperatingIntegrationSummary(portableHandoff, continuation));
3825
+ return;
3826
+ }
3827
+
3683
3828
  if (req.method === "POST" && url.pathname === "/v1/transaction-center/result-package-continuations/prepare/contract-template") {
3684
3829
  const body = await readJsonBody(req);
3685
3830
  const continuationRef = String(body && body.continuation_ref || "").trim();