xoonya 1.12.0 → 1.14.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 +9 -0
- package/package.json +1 -1
- package/proof_sdk.js +113 -0
- package/server.js +55 -0
package/README.md
CHANGED
|
@@ -134,10 +134,19 @@ Primary proof-model routes:
|
|
|
134
134
|
- `POST /v1/proof-center/result-package-handoff/review/summary`
|
|
135
135
|
- `POST /v1/proof-center/result-package-handoff/review/extension-readiness`
|
|
136
136
|
- `POST /v1/proof-center/result-package-handoff/review/extension-boundary`
|
|
137
|
+
- `POST /v1/proof-center/result-package-handoff/review/default-continuation`
|
|
138
|
+
- `POST /v1/proof-center/result-package-handoff/review/default-boundary`
|
|
139
|
+
- `POST /v1/proof-center/result-package-handoff/review/contract-summary`
|
|
140
|
+
- `POST /v1/proof-center/result-package-handoff/review/contract-boundary`
|
|
141
|
+
- `POST /v1/proof-center/result-package-handoff/review/contract-carry`
|
|
137
142
|
- `POST /v1/proof-center/result-package-handoff/run`
|
|
138
143
|
|
|
139
144
|
The result-package review surface now also returns a durability summary so the preserved execution, economic, and proof-facing context is easier to inspect before proof-native execution.
|
|
140
145
|
It also now exposes an extension-readiness summary so the stable post-review proof boundary is easier to treat as a reusable seam.
|
|
146
|
+
It now also exposes a reusable-default continuation summary so that same stable post-review boundary is easier to reuse as a standard proof-side default path.
|
|
147
|
+
It now also exposes a compact reusable-default boundary summary so the proof-side default seam can be treated as a stable public boundary, not just a recommended path.
|
|
148
|
+
It now also exposes composition-contract summaries so the proof-side default seam can be treated more clearly as a stable public contract across review and run.
|
|
149
|
+
It now also exposes compact contract-carry summaries so the stable proof-side contract context is easier to inspect directly without expanding proof scope.
|
|
141
150
|
- `POST /v1/events/canonicalize`
|
|
142
151
|
- `POST /v1/events/hash`
|
|
143
152
|
- `POST /v1/receipts/emit`
|
package/package.json
CHANGED
package/proof_sdk.js
CHANGED
|
@@ -1406,6 +1406,114 @@ function summarizeReviewExtensionBoundary(input) {
|
|
|
1406
1406
|
};
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
|
+
function summarizeReviewReusableDefaultContinuation(input) {
|
|
1410
|
+
const review = reviewInteractionResultPackageHandoff(input);
|
|
1411
|
+
const durability = review.durability_summary && typeof review.durability_summary === "object"
|
|
1412
|
+
? review.durability_summary
|
|
1413
|
+
: {};
|
|
1414
|
+
const preserved = durability.preserved_context && typeof durability.preserved_context === "object"
|
|
1415
|
+
? durability.preserved_context
|
|
1416
|
+
: {};
|
|
1417
|
+
return {
|
|
1418
|
+
ok: review.ok === true,
|
|
1419
|
+
handoff_kind: review.handoff_kind || null,
|
|
1420
|
+
result_package_ref: review.handoff && review.handoff.result_package_ref ? review.handoff.result_package_ref : null,
|
|
1421
|
+
review_ref: durability.review_ref || null,
|
|
1422
|
+
reusable_default_ref: durability.review_ref ? `default.${durability.review_ref}` : null,
|
|
1423
|
+
stable_default_context: {
|
|
1424
|
+
execution_context_ready: Boolean(preserved.execution_result && preserved.execution_result.committed_ref),
|
|
1425
|
+
economic_context_ready: Boolean(
|
|
1426
|
+
preserved.economic_state &&
|
|
1427
|
+
(preserved.economic_state.payment_protocol || preserved.economic_state.settlement_mode || preserved.economic_state.treasury_destination_id)
|
|
1428
|
+
),
|
|
1429
|
+
proof_context_ready: Boolean(preserved.proof_handoff && preserved.proof_handoff.source_ref)
|
|
1430
|
+
},
|
|
1431
|
+
default_followthrough: {
|
|
1432
|
+
review_summary_surface: "/v1/proof-center/result-package-handoff/review/summary",
|
|
1433
|
+
run_surface: durability.next_surface || review.next_surface || null,
|
|
1434
|
+
reusable_by_default: durability.run_ready === true
|
|
1435
|
+
}
|
|
1436
|
+
};
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
function summarizeReviewReusableDefaultBoundary(input) {
|
|
1440
|
+
const reusableDefault = summarizeReviewReusableDefaultContinuation(input);
|
|
1441
|
+
return {
|
|
1442
|
+
ok: reusableDefault.ok === true,
|
|
1443
|
+
handoff_kind: reusableDefault.handoff_kind || null,
|
|
1444
|
+
result_package_ref: reusableDefault.result_package_ref || null,
|
|
1445
|
+
reusable_default_ref: reusableDefault.reusable_default_ref || null,
|
|
1446
|
+
stable_boundary_ids: [
|
|
1447
|
+
"review_default_continuation",
|
|
1448
|
+
"review_summary",
|
|
1449
|
+
"proof_run"
|
|
1450
|
+
],
|
|
1451
|
+
reusable_by_default: reusableDefault.default_followthrough && reusableDefault.default_followthrough.reusable_by_default === true,
|
|
1452
|
+
next_surface: reusableDefault.default_followthrough && reusableDefault.default_followthrough.run_surface
|
|
1453
|
+
? reusableDefault.default_followthrough.run_surface
|
|
1454
|
+
: null
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
function summarizeReviewCompositionContract(input) {
|
|
1459
|
+
const reusableDefault = summarizeReviewReusableDefaultContinuation(input);
|
|
1460
|
+
return {
|
|
1461
|
+
ok: reusableDefault.ok === true,
|
|
1462
|
+
handoff_kind: reusableDefault.handoff_kind || null,
|
|
1463
|
+
result_package_ref: reusableDefault.result_package_ref || null,
|
|
1464
|
+
reusable_default_ref: reusableDefault.reusable_default_ref || null,
|
|
1465
|
+
composition_contract_ref: reusableDefault.reusable_default_ref
|
|
1466
|
+
? `contract.${reusableDefault.reusable_default_ref}`
|
|
1467
|
+
: null,
|
|
1468
|
+
public_contract_ids: [
|
|
1469
|
+
"review_default_continuation",
|
|
1470
|
+
"review_summary",
|
|
1471
|
+
"proof_run"
|
|
1472
|
+
],
|
|
1473
|
+
stable_contract_context: {
|
|
1474
|
+
execution_context_ready: reusableDefault.stable_default_context && reusableDefault.stable_default_context.execution_context_ready === true,
|
|
1475
|
+
economic_context_ready: reusableDefault.stable_default_context && reusableDefault.stable_default_context.economic_context_ready === true,
|
|
1476
|
+
proof_context_ready: reusableDefault.stable_default_context && reusableDefault.stable_default_context.proof_context_ready === true
|
|
1477
|
+
},
|
|
1478
|
+
helper_only_summary_ids: [
|
|
1479
|
+
"review_extension_readiness",
|
|
1480
|
+
"review_extension_boundary"
|
|
1481
|
+
],
|
|
1482
|
+
contract_ready: reusableDefault.default_followthrough && reusableDefault.default_followthrough.reusable_by_default === true,
|
|
1483
|
+
next_surface: reusableDefault.default_followthrough && reusableDefault.default_followthrough.run_surface
|
|
1484
|
+
? reusableDefault.default_followthrough.run_surface
|
|
1485
|
+
: null
|
|
1486
|
+
};
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
function summarizeReviewCompositionContractBoundary(input) {
|
|
1490
|
+
const contract = summarizeReviewCompositionContract(input);
|
|
1491
|
+
return {
|
|
1492
|
+
ok: contract.ok === true,
|
|
1493
|
+
handoff_kind: contract.handoff_kind || null,
|
|
1494
|
+
result_package_ref: contract.result_package_ref || null,
|
|
1495
|
+
composition_contract_ref: contract.composition_contract_ref || null,
|
|
1496
|
+
stable_boundary_ids: [
|
|
1497
|
+
"review_contract_summary",
|
|
1498
|
+
"proof_run"
|
|
1499
|
+
],
|
|
1500
|
+
contract_ready: contract.contract_ready === true,
|
|
1501
|
+
next_surface: contract.next_surface || null
|
|
1502
|
+
};
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
function summarizeReviewCompositionContractCarry(input) {
|
|
1506
|
+
const contract = summarizeReviewCompositionContract(input);
|
|
1507
|
+
return {
|
|
1508
|
+
ok: contract.ok === true,
|
|
1509
|
+
composition_contract_ref: contract.composition_contract_ref || null,
|
|
1510
|
+
stable_contract_carry: contract.stable_contract_context || {},
|
|
1511
|
+
public_contract_ids: Array.isArray(contract.public_contract_ids) ? contract.public_contract_ids : [],
|
|
1512
|
+
contract_ready: contract.contract_ready === true,
|
|
1513
|
+
next_surface: contract.next_surface || null
|
|
1514
|
+
};
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1409
1517
|
function runDefaultProofLoop(loopRef, input) {
|
|
1410
1518
|
const loop = getDefaultProofLoop(loopRef);
|
|
1411
1519
|
if (!loop) {
|
|
@@ -1464,6 +1572,11 @@ module.exports = {
|
|
|
1464
1572
|
summarizeReviewedInteractionResultPackageHandoff,
|
|
1465
1573
|
summarizeReviewExtensionReadiness,
|
|
1466
1574
|
summarizeReviewExtensionBoundary,
|
|
1575
|
+
summarizeReviewReusableDefaultContinuation,
|
|
1576
|
+
summarizeReviewReusableDefaultBoundary,
|
|
1577
|
+
summarizeReviewCompositionContract,
|
|
1578
|
+
summarizeReviewCompositionContractBoundary,
|
|
1579
|
+
summarizeReviewCompositionContractCarry,
|
|
1467
1580
|
runInteractionResultPackageHandoff,
|
|
1468
1581
|
runInteractionSpineProofHandoff,
|
|
1469
1582
|
runTransactionProofHandoff,
|
package/server.js
CHANGED
|
@@ -226,6 +226,61 @@ async function routeRequest(req, res) {
|
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/result-package-handoff/review/default-continuation') {
|
|
230
|
+
try {
|
|
231
|
+
const body = await readJsonBody(req);
|
|
232
|
+
const result = proofSdk.summarizeReviewReusableDefaultContinuation(body);
|
|
233
|
+
sendJson(res, 200, result);
|
|
234
|
+
} catch (error) {
|
|
235
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
236
|
+
}
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/result-package-handoff/review/default-boundary') {
|
|
241
|
+
try {
|
|
242
|
+
const body = await readJsonBody(req);
|
|
243
|
+
const result = proofSdk.summarizeReviewReusableDefaultBoundary(body);
|
|
244
|
+
sendJson(res, 200, result);
|
|
245
|
+
} catch (error) {
|
|
246
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
247
|
+
}
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/result-package-handoff/review/contract-summary') {
|
|
252
|
+
try {
|
|
253
|
+
const body = await readJsonBody(req);
|
|
254
|
+
const result = proofSdk.summarizeReviewCompositionContract(body);
|
|
255
|
+
sendJson(res, 200, result);
|
|
256
|
+
} catch (error) {
|
|
257
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
258
|
+
}
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/result-package-handoff/review/contract-boundary') {
|
|
263
|
+
try {
|
|
264
|
+
const body = await readJsonBody(req);
|
|
265
|
+
const result = proofSdk.summarizeReviewCompositionContractBoundary(body);
|
|
266
|
+
sendJson(res, 200, result);
|
|
267
|
+
} catch (error) {
|
|
268
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
269
|
+
}
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/result-package-handoff/review/contract-carry') {
|
|
274
|
+
try {
|
|
275
|
+
const body = await readJsonBody(req);
|
|
276
|
+
const result = proofSdk.summarizeReviewCompositionContractCarry(body);
|
|
277
|
+
sendJson(res, 200, result);
|
|
278
|
+
} catch (error) {
|
|
279
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
280
|
+
}
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
|
|
229
284
|
if (req.method === 'POST' && url.pathname === '/v1/receipts/verify') {
|
|
230
285
|
try {
|
|
231
286
|
const body = await readJsonBody(req);
|