xoonya 1.11.0 → 1.13.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 +7 -0
- package/package.json +1 -1
- package/proof_sdk.js +96 -0
- package/server.js +44 -0
package/README.md
CHANGED
|
@@ -132,9 +132,16 @@ Primary proof-model routes:
|
|
|
132
132
|
- `GET /v1/proof-center/result-package-handoff/summary`
|
|
133
133
|
- `POST /v1/proof-center/result-package-handoff/review`
|
|
134
134
|
- `POST /v1/proof-center/result-package-handoff/review/summary`
|
|
135
|
+
- `POST /v1/proof-center/result-package-handoff/review/extension-readiness`
|
|
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`
|
|
135
139
|
- `POST /v1/proof-center/result-package-handoff/run`
|
|
136
140
|
|
|
137
141
|
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.
|
|
142
|
+
It also now exposes an extension-readiness summary so the stable post-review proof boundary is easier to treat as a reusable seam.
|
|
143
|
+
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.
|
|
144
|
+
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.
|
|
138
145
|
- `POST /v1/events/canonicalize`
|
|
139
146
|
- `POST /v1/events/hash`
|
|
140
147
|
- `POST /v1/receipts/emit`
|
package/package.json
CHANGED
package/proof_sdk.js
CHANGED
|
@@ -1363,6 +1363,98 @@ function summarizeReviewedInteractionResultPackageHandoff(input) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
1365
|
|
|
1366
|
+
function summarizeReviewExtensionReadiness(input) {
|
|
1367
|
+
const review = reviewInteractionResultPackageHandoff(input);
|
|
1368
|
+
const durability = review.durability_summary && typeof review.durability_summary === "object"
|
|
1369
|
+
? review.durability_summary
|
|
1370
|
+
: {};
|
|
1371
|
+
const preserved = durability.preserved_context && typeof durability.preserved_context === "object"
|
|
1372
|
+
? durability.preserved_context
|
|
1373
|
+
: {};
|
|
1374
|
+
return {
|
|
1375
|
+
ok: review.ok === true,
|
|
1376
|
+
handoff_kind: review.handoff_kind || null,
|
|
1377
|
+
result_package_ref: review.handoff && review.handoff.result_package_ref ? review.handoff.result_package_ref : null,
|
|
1378
|
+
review_ref: durability.review_ref || null,
|
|
1379
|
+
extension_ready_ref: durability.review_ref ? `extension.${durability.review_ref}` : null,
|
|
1380
|
+
stable_post_review_context: {
|
|
1381
|
+
execution_context_ready: Boolean(preserved.execution_result && preserved.execution_result.committed_ref),
|
|
1382
|
+
economic_context_ready: Boolean(
|
|
1383
|
+
preserved.economic_state &&
|
|
1384
|
+
(preserved.economic_state.payment_protocol || preserved.economic_state.settlement_mode || preserved.economic_state.treasury_destination_id)
|
|
1385
|
+
),
|
|
1386
|
+
proof_context_ready: Boolean(preserved.proof_handoff && preserved.proof_handoff.source_ref)
|
|
1387
|
+
},
|
|
1388
|
+
proof_extension_ready: durability.run_ready === true,
|
|
1389
|
+
next_surface: durability.next_surface || review.next_surface || null
|
|
1390
|
+
};
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
function summarizeReviewExtensionBoundary(input) {
|
|
1394
|
+
const readiness = summarizeReviewExtensionReadiness(input);
|
|
1395
|
+
return {
|
|
1396
|
+
ok: readiness.ok === true,
|
|
1397
|
+
handoff_kind: readiness.handoff_kind || null,
|
|
1398
|
+
result_package_ref: readiness.result_package_ref || null,
|
|
1399
|
+
extension_ready_ref: readiness.extension_ready_ref || null,
|
|
1400
|
+
stable_boundary_ids: [
|
|
1401
|
+
"review_extension_readiness",
|
|
1402
|
+
"proof_run"
|
|
1403
|
+
],
|
|
1404
|
+
proof_extension_ready: readiness.proof_extension_ready === true,
|
|
1405
|
+
next_surface: readiness.next_surface || null
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
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
|
+
|
|
1366
1458
|
function runDefaultProofLoop(loopRef, input) {
|
|
1367
1459
|
const loop = getDefaultProofLoop(loopRef);
|
|
1368
1460
|
if (!loop) {
|
|
@@ -1419,6 +1511,10 @@ module.exports = {
|
|
|
1419
1511
|
runDefaultProofLoop,
|
|
1420
1512
|
reviewInteractionResultPackageHandoff,
|
|
1421
1513
|
summarizeReviewedInteractionResultPackageHandoff,
|
|
1514
|
+
summarizeReviewExtensionReadiness,
|
|
1515
|
+
summarizeReviewExtensionBoundary,
|
|
1516
|
+
summarizeReviewReusableDefaultContinuation,
|
|
1517
|
+
summarizeReviewReusableDefaultBoundary,
|
|
1422
1518
|
runInteractionResultPackageHandoff,
|
|
1423
1519
|
runInteractionSpineProofHandoff,
|
|
1424
1520
|
runTransactionProofHandoff,
|
package/server.js
CHANGED
|
@@ -204,6 +204,50 @@ async function routeRequest(req, res) {
|
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/result-package-handoff/review/extension-readiness') {
|
|
208
|
+
try {
|
|
209
|
+
const body = await readJsonBody(req);
|
|
210
|
+
const result = proofSdk.summarizeReviewExtensionReadiness(body);
|
|
211
|
+
sendJson(res, 200, result);
|
|
212
|
+
} catch (error) {
|
|
213
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
214
|
+
}
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/result-package-handoff/review/extension-boundary') {
|
|
219
|
+
try {
|
|
220
|
+
const body = await readJsonBody(req);
|
|
221
|
+
const result = proofSdk.summarizeReviewExtensionBoundary(body);
|
|
222
|
+
sendJson(res, 200, result);
|
|
223
|
+
} catch (error) {
|
|
224
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
225
|
+
}
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
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
|
+
|
|
207
251
|
if (req.method === 'POST' && url.pathname === '/v1/receipts/verify') {
|
|
208
252
|
try {
|
|
209
253
|
const body = await readJsonBody(req);
|