@rootintf/protocol-2phw 2.3.7-api.2 → 3.0.13-api.2

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.
Files changed (32) hide show
  1. package/README.md +384 -1
  2. package/dist/generated/iface-TwoPhW/index.d.mts +25 -0
  3. package/dist/generated/iface-TwoPhW/validate.d.cts +76 -0
  4. package/dist/generated/iface-TwoPhW/validate.d.mts +75 -0
  5. package/dist/twoPhW.cjs.js +419 -974
  6. package/dist/twoPhW.d.ts +51 -36
  7. package/dist/twoPhW.es.mjs +403 -970
  8. package/package.json +26 -17
  9. package/src/generated/.gitattributes +4 -0
  10. package/src/generated/iface-TwoPhW/index.cjs +26 -0
  11. package/src/generated/iface-TwoPhW/index.d.cts +25 -0
  12. package/src/generated/iface-TwoPhW/index.d.mts +25 -0
  13. package/src/generated/iface-TwoPhW/index.d.ts +25 -0
  14. package/src/generated/iface-TwoPhW/index.mjs +23 -0
  15. package/src/generated/iface-TwoPhW/package.json +36 -0
  16. package/src/generated/iface-TwoPhW/schema/schema_TwoPhW.json +131 -0
  17. package/src/generated/iface-TwoPhW/validate.cjs +1 -0
  18. package/src/generated/iface-TwoPhW/validate.mjs +1 -0
  19. package/src/generated/iface-introspection/index.cjs +13 -0
  20. package/src/generated/iface-introspection/index.d.cts +6 -0
  21. package/src/generated/iface-introspection/index.d.mts +6 -0
  22. package/src/generated/iface-introspection/index.d.ts +6 -0
  23. package/src/generated/iface-introspection/index.mjs +10 -0
  24. package/src/generated/iface-introspection/package.json +30 -0
  25. package/src/schema-cache/.gitattributes +4 -0
  26. package/src/schema-cache/5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a.json +131 -0
  27. package/src/twoPhW.ts +770 -833
  28. package/dist/ajv-gen-validate.d.cts +0 -1
  29. package/dist/validate-esm.d.mts +0 -48
  30. package/schema/schema_2PhW.json +0 -61
  31. package/src/ajv-gen-validate.cjs +0 -40
  32. package/src/validate-esm.mjs +0 -1
package/package.json CHANGED
@@ -1,21 +1,31 @@
1
1
  {
2
2
  "name": "@rootintf/protocol-2phw",
3
- "version": "2.3.7-api.2",
3
+ "version": "3.0.13-api.2",
4
4
  "description": "",
5
5
  "main": "dist/twoPhW.cjs.js",
6
- "types": "dist/twoPhW.d.ts",
6
+ "module": "dist/twoPhW.es.mjs",
7
7
  "browser": "dist/twoPhW.es.mjs",
8
+ "types": "dist/twoPhW.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/twoPhW.d.ts",
12
+ "import": "./dist/twoPhW.es.mjs",
13
+ "require": "./dist/twoPhW.cjs.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
8
17
  "files": [
9
18
  "dist",
10
19
  "src",
11
20
  "schema"
12
21
  ],
13
22
  "scripts": {
14
- "gv:all" : "gv --js --antora --tag api && git add package.json ./antora-docs/antora.yml",
15
- "build": "node src/ajv-gen-validate.cjs && rollup --config",
23
+ "gv:all": "gv --js --antora --tag api && git add package.json ./antora-docs/antora.yml",
24
+ "gen": "iface-gen --config ifacegenconfig.json",
25
+ "build": "rollup --config",
16
26
  "script": "node --experimental-json-modules tests/twoPhW.test.mjs",
17
27
  "test": "jasmine --config=jasmine.json",
18
- "clean": "del-cli dist && del-cli src/validate-esm.mjs && echo OK"
28
+ "clean": "del-cli dist && echo OK"
19
29
  },
20
30
  "repository": {
21
31
  "type": "git",
@@ -35,22 +45,21 @@
35
45
  "dependencies": {
36
46
  "@knev/bitlogr": "^3.2.2",
37
47
  "@rootintf/eventlog": "^0.0.3",
38
- "@rootintf/json-msg": "^2.1.7",
39
- "ajv": "^8.17.1"
48
+ "@rootintf/json-msg": "^4.0.2-api.4"
40
49
  },
41
50
  "devDependencies": {
42
- "@rollup/plugin-commonjs": "^29.0.0",
51
+ "@rollup/plugin-commonjs": "^29.0.3",
43
52
  "@rollup/plugin-json": "^6.1.0",
44
53
  "@rollup/plugin-node-resolve": "^16.0.3",
45
- "@rollup/plugin-typescript": "^12.3.0",
46
- "@types/ajv": "^1.0.4",
47
- "@types/node": "^25.1.0",
54
+ "@rollup/plugin-typescript": "^12.3.1",
55
+ "@rootintf/iface-gen": "^3.1.29",
56
+ "@types/node": "^26.6.6",
48
57
  "ajv-cli": "^5.0.0",
49
- "del-cli": "^7.0.0",
50
- "jasmine": "^6.0.0",
51
- "rollup": "^4.57.0",
52
- "tslib": "^2.8.1",
53
- "typescript": "^5.9.3",
54
- "uuid": "^13.0.0"
58
+ "del-cli": "^8.0.1",
59
+ "jasmine": "^7.0.0",
60
+ "rollup": "^4.68.8",
61
+ "tslib": "^2.9.1",
62
+ "typescript": "^6.0.3",
63
+ "uuid": "^14.0.3"
55
64
  }
56
65
  }
@@ -0,0 +1,4 @@
1
+ # generated by iface-gen: byte-stability pin -- everything in this gen-managed dir is
2
+ # written LF (content-addressed cache blobs, embedded schema bytes, generated sources).
3
+ # eol=lf stops a core.autocrlf=true checkout from smudging it to CRLF (hash breaks / churn).
4
+ * text eol=lf
@@ -0,0 +1,26 @@
1
+ // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
+ "use strict";
3
+ const { _v_JSON_MsgWarp, _v_JSON_AckWarp, _v_JSON_EffEngage, _v_JSON_AckEngage } = require("./validate.cjs");
4
+ const { JSON_Msg, JSON_Eff } = require("@rootintf/json-msg");
5
+
6
+ const VERSION = "2";
7
+
8
+ const JSON_MsgWarp = {
9
+ validate: _v_JSON_MsgWarp,
10
+ merge: (body) => JSON_Msg.merge({ "warp": body, "2PhW": VERSION }),
11
+ };
12
+
13
+ const JSON_AckWarp = {
14
+ validate: _v_JSON_AckWarp,
15
+ };
16
+
17
+ const JSON_EffEngage = {
18
+ validate: _v_JSON_EffEngage,
19
+ create_with_cause_merge: (cause, body) => JSON_Eff.create_with_cause_merge(cause, { "engage": body, "2PhW": VERSION }),
20
+ };
21
+
22
+ const JSON_AckEngage = {
23
+ validate: _v_JSON_AckEngage,
24
+ };
25
+
26
+ module.exports = { VERSION, JSON_MsgWarp, JSON_AckWarp, JSON_EffEngage, JSON_AckEngage };
@@ -0,0 +1,25 @@
1
+ // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
+ import type { JSON_Msg, JSON_Ack, JSON_Eff } from "@rootintf/json-msg";
3
+ export declare const VERSION: "2";
4
+
5
+ export type JSON_MsgWarp = JSON_Msg & { "warp": { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }; "2PhW": "2" };
6
+ export declare const JSON_MsgWarp: {
7
+ validate(msg: JSON_Msg): msg is JSON_MsgWarp;
8
+ merge(body: { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }): JSON_MsgWarp;
9
+ };
10
+
11
+ export type JSON_AckWarp = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
12
+ export declare const JSON_AckWarp: {
13
+ validate(msg: JSON_Ack): msg is JSON_AckWarp;
14
+ };
15
+
16
+ export type JSON_EffEngage = JSON_Eff & { "_cause"?: unknown; "engage": { "ok": boolean; "rtt_msec": number }; "2PhW": "2" };
17
+ export declare const JSON_EffEngage: {
18
+ validate(msg: JSON_Eff): msg is JSON_EffEngage;
19
+ create_with_cause_merge(cause: JSON_Msg, body: { "ok": boolean; "rtt_msec": number }): JSON_EffEngage;
20
+ };
21
+
22
+ export type JSON_AckEngage = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
23
+ export declare const JSON_AckEngage: {
24
+ validate(msg: JSON_Ack): msg is JSON_AckEngage;
25
+ };
@@ -0,0 +1,25 @@
1
+ // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
+ import type { JSON_Msg, JSON_Ack, JSON_Eff } from "@rootintf/json-msg";
3
+ export declare const VERSION: "2";
4
+
5
+ export type JSON_MsgWarp = JSON_Msg & { "warp": { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }; "2PhW": "2" };
6
+ export declare const JSON_MsgWarp: {
7
+ validate(msg: JSON_Msg): msg is JSON_MsgWarp;
8
+ merge(body: { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }): JSON_MsgWarp;
9
+ };
10
+
11
+ export type JSON_AckWarp = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
12
+ export declare const JSON_AckWarp: {
13
+ validate(msg: JSON_Ack): msg is JSON_AckWarp;
14
+ };
15
+
16
+ export type JSON_EffEngage = JSON_Eff & { "_cause"?: unknown; "engage": { "ok": boolean; "rtt_msec": number }; "2PhW": "2" };
17
+ export declare const JSON_EffEngage: {
18
+ validate(msg: JSON_Eff): msg is JSON_EffEngage;
19
+ create_with_cause_merge(cause: JSON_Msg, body: { "ok": boolean; "rtt_msec": number }): JSON_EffEngage;
20
+ };
21
+
22
+ export type JSON_AckEngage = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
23
+ export declare const JSON_AckEngage: {
24
+ validate(msg: JSON_Ack): msg is JSON_AckEngage;
25
+ };
@@ -0,0 +1,25 @@
1
+ // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
+ import type { JSON_Msg, JSON_Ack, JSON_Eff } from "@rootintf/json-msg";
3
+ export declare const VERSION: "2";
4
+
5
+ export type JSON_MsgWarp = JSON_Msg & { "warp": { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }; "2PhW": "2" };
6
+ export declare const JSON_MsgWarp: {
7
+ validate(msg: JSON_Msg): msg is JSON_MsgWarp;
8
+ merge(body: { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }): JSON_MsgWarp;
9
+ };
10
+
11
+ export type JSON_AckWarp = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
12
+ export declare const JSON_AckWarp: {
13
+ validate(msg: JSON_Ack): msg is JSON_AckWarp;
14
+ };
15
+
16
+ export type JSON_EffEngage = JSON_Eff & { "_cause"?: unknown; "engage": { "ok": boolean; "rtt_msec": number }; "2PhW": "2" };
17
+ export declare const JSON_EffEngage: {
18
+ validate(msg: JSON_Eff): msg is JSON_EffEngage;
19
+ create_with_cause_merge(cause: JSON_Msg, body: { "ok": boolean; "rtt_msec": number }): JSON_EffEngage;
20
+ };
21
+
22
+ export type JSON_AckEngage = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
23
+ export declare const JSON_AckEngage: {
24
+ validate(msg: JSON_Ack): msg is JSON_AckEngage;
25
+ };
@@ -0,0 +1,23 @@
1
+ // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
+ import { _v_JSON_MsgWarp, _v_JSON_AckWarp, _v_JSON_EffEngage, _v_JSON_AckEngage } from "./validate.mjs";
3
+ import { JSON_Msg, JSON_Eff } from "@rootintf/json-msg";
4
+
5
+ export const VERSION = "2";
6
+
7
+ export const JSON_MsgWarp = {
8
+ validate: _v_JSON_MsgWarp,
9
+ merge: (body) => JSON_Msg.merge({ "warp": body, "2PhW": VERSION }),
10
+ };
11
+
12
+ export const JSON_AckWarp = {
13
+ validate: _v_JSON_AckWarp,
14
+ };
15
+
16
+ export const JSON_EffEngage = {
17
+ validate: _v_JSON_EffEngage,
18
+ create_with_cause_merge: (cause, body) => JSON_Eff.create_with_cause_merge(cause, { "engage": body, "2PhW": VERSION }),
19
+ };
20
+
21
+ export const JSON_AckEngage = {
22
+ validate: _v_JSON_AckEngage,
23
+ };
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@rootintf/iface-twophw",
3
+ "version": "3.1.29-api.2",
4
+ "description": "IPSME interface TwoPhW — generated from schema_TwoPhW.json",
5
+ "type": "module",
6
+ "main": "index.cjs",
7
+ "module": "index.mjs",
8
+ "types": "index.d.cts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./index.d.mts",
13
+ "default": "./index.mjs"
14
+ },
15
+ "require": {
16
+ "types": "./index.d.cts",
17
+ "default": "./index.cjs"
18
+ }
19
+ }
20
+ },
21
+ "files": [
22
+ "index.mjs",
23
+ "index.cjs",
24
+ "validate.mjs",
25
+ "validate.cjs",
26
+ "index.d.ts",
27
+ "index.d.cts",
28
+ "index.d.mts",
29
+ "schema"
30
+ ],
31
+ "sideEffects": false,
32
+ "license": "ISC",
33
+ "dependencies": {
34
+ "@rootintf/json-msg": "^4.0.2-api.4"
35
+ }
36
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "$id": "https://root-interface.se/protocols/TwoPhW",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "schemas": {
5
+ "https://root-interface.se/protocols/TwoPhW/definitions": {
6
+ "$id": "https://root-interface.se/protocols/TwoPhW/definitions",
7
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
8
+ "definitions": {
9
+ "_v": {
10
+ "const": "2"
11
+ }
12
+ }
13
+ },
14
+ "https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp": {
15
+ "$id": "https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp",
16
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
17
+ "$comment": "phase 1, sender -> receiver: the request to warp `user` to `hyperport`. `id` names the whole exchange (every later message reaches it through its _cause chain). `ttl_msec` is measured from this message's own dt. `instantaneous` = single phase: the AckWarp concludes the exchange, no Engage follows.",
18
+ "type": "object",
19
+ "required": [
20
+ "warp",
21
+ "2PhW"
22
+ ],
23
+ "properties": {
24
+ "warp": {
25
+ "type": "object",
26
+ "required": [
27
+ "id",
28
+ "user",
29
+ "hyperport",
30
+ "ttl_msec"
31
+ ],
32
+ "properties": {
33
+ "id": {
34
+ "type": "string"
35
+ },
36
+ "ttl_msec": {
37
+ "type": "integer",
38
+ "exclusiveMinimum": 0
39
+ },
40
+ "instantaneous": {
41
+ "type": "boolean"
42
+ }
43
+ }
44
+ },
45
+ "2PhW": {
46
+ "$ref": "definitions#/definitions/_v"
47
+ }
48
+ },
49
+ "x-base": "JSON_Msg"
50
+ },
51
+ "https://root-interface.se/protocols/TwoPhW/JSON_AckWarp": {
52
+ "$id": "https://root-interface.se/protocols/TwoPhW/JSON_AckWarp",
53
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
54
+ "$comment": "phase 1, receiver -> sender: the verdict on a JSON_MsgWarp, which rides in the base JSON_Ack's _cause. The base's ok flag IS the verdict; ok:false ends the exchange.",
55
+ "type": "object",
56
+ "required": [
57
+ "ack",
58
+ "2PhW"
59
+ ],
60
+ "properties": {
61
+ "_cause": {
62
+ "$ref": "JSON_MsgWarp"
63
+ },
64
+ "ack": {
65
+ "type": "object"
66
+ },
67
+ "2PhW": {
68
+ "$ref": "definitions#/definitions/_v"
69
+ }
70
+ },
71
+ "x-base": "JSON_Ack"
72
+ },
73
+ "https://root-interface.se/protocols/TwoPhW/JSON_EffEngage": {
74
+ "$id": "https://root-interface.se/protocols/TwoPhW/JSON_EffEngage",
75
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
76
+ "$comment": "phase 2, sender -> receiver: commit the warp. _cause is the JSON_MsgWarp itself (not its ack). `rtt_msec` is the round trip the sender measured, from the warp's dt to the creation of this engage; it extends the window in which the JSON_AckEngage is accepted. It is capped at 2 * ttl_msec; a schema cannot relate two fields, so the cap is enforced by the protocol (an engage that claims more is refused).",
77
+ "type": "object",
78
+ "required": [
79
+ "engage",
80
+ "2PhW"
81
+ ],
82
+ "properties": {
83
+ "_cause": {
84
+ "$ref": "JSON_MsgWarp"
85
+ },
86
+ "engage": {
87
+ "type": "object",
88
+ "required": [
89
+ "ok",
90
+ "rtt_msec"
91
+ ],
92
+ "properties": {
93
+ "ok": {
94
+ "type": "boolean"
95
+ },
96
+ "rtt_msec": {
97
+ "type": "integer",
98
+ "minimum": 0
99
+ }
100
+ }
101
+ },
102
+ "2PhW": {
103
+ "$ref": "definitions#/definitions/_v"
104
+ }
105
+ },
106
+ "x-base": "JSON_Eff"
107
+ },
108
+ "https://root-interface.se/protocols/TwoPhW/JSON_AckEngage": {
109
+ "$id": "https://root-interface.se/protocols/TwoPhW/JSON_AckEngage",
110
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
111
+ "$comment": "phase 2, receiver -> sender: the verdict on a JSON_EffEngage, which rides in the base JSON_Ack's _cause (its own _cause is the JSON_MsgWarp). Concludes the exchange.",
112
+ "type": "object",
113
+ "required": [
114
+ "ack",
115
+ "2PhW"
116
+ ],
117
+ "properties": {
118
+ "_cause": {
119
+ "$ref": "JSON_EffEngage"
120
+ },
121
+ "ack": {
122
+ "type": "object"
123
+ },
124
+ "2PhW": {
125
+ "$ref": "definitions#/definitions/_v"
126
+ }
127
+ },
128
+ "x-base": "JSON_Ack"
129
+ }
130
+ }
131
+ }
@@ -0,0 +1 @@
1
+ "use strict";exports._v_JSON_MsgWarp = validate18;const schema21 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 1, sender -> receiver: the request to warp `user` to `hyperport`. `id` names the whole exchange (every later message reaches it through its _cause chain). `ttl_msec` is measured from this message's own dt. `instantaneous` = single phase: the AckWarp concludes the exchange, no Engage follows.","type":"object","required":["warp","2PhW"],"properties":{"warp":{"type":"object","required":["id","user","hyperport","ttl_msec"],"properties":{"id":{"type":"string"},"ttl_msec":{"type":"integer","exclusiveMinimum":0},"instantaneous":{"type":"boolean"}}},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Msg"};const schema23 = {"const":"2"};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp" */;let vErrors = null;let errors = 0;const evaluated0 = validate18.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.warp === undefined) && (missing0 = "warp")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate18.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.warp !== undefined){let data0 = data.warp;const _errs3 = errors;if(errors === _errs3){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if(((((data0.id === undefined) && (missing1 = "id")) || ((data0.user === undefined) && (missing1 = "user"))) || ((data0.hyperport === undefined) && (missing1 = "hyperport"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))){validate18.errors = [{instancePath:instancePath+"/warp",schemaPath:"#/properties/warp/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.id !== undefined){const _errs5 = errors;if(typeof data0.id !== "string"){validate18.errors = [{instancePath:instancePath+"/warp/id",schemaPath:"#/properties/warp/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;}else {var valid1 = true;}if(valid1){if(data0.ttl_msec !== undefined){let data2 = data0.ttl_msec;const _errs7 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){validate18.errors = [{instancePath:instancePath+"/warp/ttl_msec",schemaPath:"#/properties/warp/properties/ttl_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs7){if((typeof data2 == "number") && (isFinite(data2))){if(data2 <= 0 || isNaN(data2)){validate18.errors = [{instancePath:instancePath+"/warp/ttl_msec",schemaPath:"#/properties/warp/properties/ttl_msec/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data0.instantaneous !== undefined){const _errs9 = errors;if(typeof data0.instantaneous !== "boolean"){validate18.errors = [{instancePath:instancePath+"/warp/instantaneous",schemaPath:"#/properties/warp/properties/instantaneous/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}}else {validate18.errors = [{instancePath:instancePath+"/warp",schemaPath:"#/properties/warp/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs11 = errors;if("2" !== data["2PhW"]){validate18.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs11 === errors;}else {var valid0 = true;}}}}else {validate18.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate18.errors = vErrors;return errors === 0;}validate18.evaluated = {"props":{"warp":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};exports._v_JSON_AckWarp = validate20;const schema24 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_AckWarp","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 1, receiver -> sender: the verdict on a JSON_MsgWarp, which rides in the base JSON_Ack's _cause. The base's ok flag IS the verdict; ok:false ends the exchange.","type":"object","required":["ack","2PhW"],"properties":{"_cause":{"$ref":"JSON_MsgWarp"},"ack":{"type":"object"},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Ack"};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_AckWarp" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.ack === undefined) && (missing0 = "ack")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate18(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.ack !== undefined){let data1 = data.ack;const _errs4 = errors;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){validate20.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs6 = errors;if("2" !== data["2PhW"]){validate20.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":{"_cause":true,"ack":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};exports._v_JSON_EffEngage = validate22;const schema26 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_EffEngage","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 2, sender -> receiver: commit the warp. _cause is the JSON_MsgWarp itself (not its ack). `rtt_msec` is the round trip the sender measured, from the warp's dt to the creation of this engage; it extends the window in which the JSON_AckEngage is accepted. It is capped at 2 * ttl_msec; a schema cannot relate two fields, so the cap is enforced by the protocol (an engage that claims more is refused).","type":"object","required":["engage","2PhW"],"properties":{"_cause":{"$ref":"JSON_MsgWarp"},"engage":{"type":"object","required":["ok","rtt_msec"],"properties":{"ok":{"type":"boolean"},"rtt_msec":{"type":"integer","minimum":0}}},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Eff"};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_EffEngage" */;let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.engage === undefined) && (missing0 = "engage")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate22.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate18(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.engage !== undefined){let data1 = data.engage;const _errs4 = errors;if(errors === _errs4){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){let missing1;if(((data1.ok === undefined) && (missing1 = "ok")) || ((data1.rtt_msec === undefined) && (missing1 = "rtt_msec"))){validate22.errors = [{instancePath:instancePath+"/engage",schemaPath:"#/properties/engage/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data1.ok !== undefined){const _errs6 = errors;if(typeof data1.ok !== "boolean"){validate22.errors = [{instancePath:instancePath+"/engage/ok",schemaPath:"#/properties/engage/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data1.rtt_msec !== undefined){let data3 = data1.rtt_msec;const _errs8 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate22.errors = [{instancePath:instancePath+"/engage/rtt_msec",schemaPath:"#/properties/engage/properties/rtt_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs8){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){validate22.errors = [{instancePath:instancePath+"/engage/rtt_msec",schemaPath:"#/properties/engage/properties/rtt_msec/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}else {validate22.errors = [{instancePath:instancePath+"/engage",schemaPath:"#/properties/engage/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs10 = errors;if("2" !== data["2PhW"]){validate22.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs10 === errors;}else {var valid0 = true;}}}}}else {validate22.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"props":{"_cause":true,"engage":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};exports._v_JSON_AckEngage = validate24;const schema28 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_AckEngage","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 2, receiver -> sender: the verdict on a JSON_EffEngage, which rides in the base JSON_Ack's _cause (its own _cause is the JSON_MsgWarp). Concludes the exchange.","type":"object","required":["ack","2PhW"],"properties":{"_cause":{"$ref":"JSON_EffEngage"},"ack":{"type":"object"},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Ack"};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_AckEngage" */;let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.ack === undefined) && (missing0 = "ack")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate24.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate22(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.ack !== undefined){let data1 = data.ack;const _errs4 = errors;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){validate24.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs6 = errors;if("2" !== data["2PhW"]){validate24.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":{"_cause":true,"ack":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};
@@ -0,0 +1 @@
1
+ "use strict";export const _v_JSON_MsgWarp = validate18;const schema21 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 1, sender -> receiver: the request to warp `user` to `hyperport`. `id` names the whole exchange (every later message reaches it through its _cause chain). `ttl_msec` is measured from this message's own dt. `instantaneous` = single phase: the AckWarp concludes the exchange, no Engage follows.","type":"object","required":["warp","2PhW"],"properties":{"warp":{"type":"object","required":["id","user","hyperport","ttl_msec"],"properties":{"id":{"type":"string"},"ttl_msec":{"type":"integer","exclusiveMinimum":0},"instantaneous":{"type":"boolean"}}},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Msg"};const schema23 = {"const":"2"};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp" */;let vErrors = null;let errors = 0;const evaluated0 = validate18.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.warp === undefined) && (missing0 = "warp")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate18.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.warp !== undefined){let data0 = data.warp;const _errs3 = errors;if(errors === _errs3){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if(((((data0.id === undefined) && (missing1 = "id")) || ((data0.user === undefined) && (missing1 = "user"))) || ((data0.hyperport === undefined) && (missing1 = "hyperport"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))){validate18.errors = [{instancePath:instancePath+"/warp",schemaPath:"#/properties/warp/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.id !== undefined){const _errs5 = errors;if(typeof data0.id !== "string"){validate18.errors = [{instancePath:instancePath+"/warp/id",schemaPath:"#/properties/warp/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;}else {var valid1 = true;}if(valid1){if(data0.ttl_msec !== undefined){let data2 = data0.ttl_msec;const _errs7 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){validate18.errors = [{instancePath:instancePath+"/warp/ttl_msec",schemaPath:"#/properties/warp/properties/ttl_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs7){if((typeof data2 == "number") && (isFinite(data2))){if(data2 <= 0 || isNaN(data2)){validate18.errors = [{instancePath:instancePath+"/warp/ttl_msec",schemaPath:"#/properties/warp/properties/ttl_msec/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data0.instantaneous !== undefined){const _errs9 = errors;if(typeof data0.instantaneous !== "boolean"){validate18.errors = [{instancePath:instancePath+"/warp/instantaneous",schemaPath:"#/properties/warp/properties/instantaneous/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}}else {validate18.errors = [{instancePath:instancePath+"/warp",schemaPath:"#/properties/warp/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs11 = errors;if("2" !== data["2PhW"]){validate18.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs11 === errors;}else {var valid0 = true;}}}}else {validate18.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate18.errors = vErrors;return errors === 0;}validate18.evaluated = {"props":{"warp":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};export const _v_JSON_AckWarp = validate20;const schema24 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_AckWarp","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 1, receiver -> sender: the verdict on a JSON_MsgWarp, which rides in the base JSON_Ack's _cause. The base's ok flag IS the verdict; ok:false ends the exchange.","type":"object","required":["ack","2PhW"],"properties":{"_cause":{"$ref":"JSON_MsgWarp"},"ack":{"type":"object"},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Ack"};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_AckWarp" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.ack === undefined) && (missing0 = "ack")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate18(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.ack !== undefined){let data1 = data.ack;const _errs4 = errors;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){validate20.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs6 = errors;if("2" !== data["2PhW"]){validate20.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":{"_cause":true,"ack":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};export const _v_JSON_EffEngage = validate22;const schema26 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_EffEngage","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 2, sender -> receiver: commit the warp. _cause is the JSON_MsgWarp itself (not its ack). `rtt_msec` is the round trip the sender measured, from the warp's dt to the creation of this engage; it extends the window in which the JSON_AckEngage is accepted. It is capped at 2 * ttl_msec; a schema cannot relate two fields, so the cap is enforced by the protocol (an engage that claims more is refused).","type":"object","required":["engage","2PhW"],"properties":{"_cause":{"$ref":"JSON_MsgWarp"},"engage":{"type":"object","required":["ok","rtt_msec"],"properties":{"ok":{"type":"boolean"},"rtt_msec":{"type":"integer","minimum":0}}},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Eff"};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_EffEngage" */;let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.engage === undefined) && (missing0 = "engage")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate22.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate18(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.engage !== undefined){let data1 = data.engage;const _errs4 = errors;if(errors === _errs4){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){let missing1;if(((data1.ok === undefined) && (missing1 = "ok")) || ((data1.rtt_msec === undefined) && (missing1 = "rtt_msec"))){validate22.errors = [{instancePath:instancePath+"/engage",schemaPath:"#/properties/engage/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data1.ok !== undefined){const _errs6 = errors;if(typeof data1.ok !== "boolean"){validate22.errors = [{instancePath:instancePath+"/engage/ok",schemaPath:"#/properties/engage/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data1.rtt_msec !== undefined){let data3 = data1.rtt_msec;const _errs8 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate22.errors = [{instancePath:instancePath+"/engage/rtt_msec",schemaPath:"#/properties/engage/properties/rtt_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs8){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){validate22.errors = [{instancePath:instancePath+"/engage/rtt_msec",schemaPath:"#/properties/engage/properties/rtt_msec/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}else {validate22.errors = [{instancePath:instancePath+"/engage",schemaPath:"#/properties/engage/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs10 = errors;if("2" !== data["2PhW"]){validate22.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs10 === errors;}else {var valid0 = true;}}}}}else {validate22.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"props":{"_cause":true,"engage":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};export const _v_JSON_AckEngage = validate24;const schema28 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_AckEngage","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 2, receiver -> sender: the verdict on a JSON_EffEngage, which rides in the base JSON_Ack's _cause (its own _cause is the JSON_MsgWarp). Concludes the exchange.","type":"object","required":["ack","2PhW"],"properties":{"_cause":{"$ref":"JSON_EffEngage"},"ack":{"type":"object"},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Ack"};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_AckEngage" */;let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.ack === undefined) && (missing0 = "ack")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate24.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate22(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.ack !== undefined){let data1 = data.ack;const _errs4 = errors;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){validate24.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs6 = errors;if("2" !== data["2PhW"]){validate24.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":{"_cause":true,"ack":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};
@@ -0,0 +1,13 @@
1
+ // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
+ "use strict";
3
+ const PKG_VERSION = "3.1.29";
4
+
5
+ // friendly name (the config registry key) -> sha256 of the schema bytes this target generated from
6
+ const INTERFACES = Object.freeze({
7
+ "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a",
8
+ });
9
+
10
+ // the pin for one interface; null when the interface is not in this target
11
+ const sha256 = (name) => Object.prototype.hasOwnProperty.call(INTERFACES, name) ? INTERFACES[name] : null;
12
+
13
+ module.exports = { PKG_VERSION, INTERFACES, sha256 };
@@ -0,0 +1,6 @@
1
+ // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
+ export declare const PKG_VERSION: "3.1.29";
3
+ export declare const INTERFACES: {
4
+ readonly "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a";
5
+ };
6
+ export declare function sha256(name: string): string | null;
@@ -0,0 +1,6 @@
1
+ // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
+ export declare const PKG_VERSION: "3.1.29";
3
+ export declare const INTERFACES: {
4
+ readonly "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a";
5
+ };
6
+ export declare function sha256(name: string): string | null;
@@ -0,0 +1,6 @@
1
+ // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
+ export declare const PKG_VERSION: "3.1.29";
3
+ export declare const INTERFACES: {
4
+ readonly "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a";
5
+ };
6
+ export declare function sha256(name: string): string | null;
@@ -0,0 +1,10 @@
1
+ // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
+ export const PKG_VERSION = "3.1.29";
3
+
4
+ // friendly name (the config registry key) -> sha256 of the schema bytes this target generated from
5
+ export const INTERFACES = Object.freeze({
6
+ "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a",
7
+ });
8
+
9
+ // the pin for one interface; null when the interface is not in this target
10
+ export const sha256 = (name) => Object.prototype.hasOwnProperty.call(INTERFACES, name) ? INTERFACES[name] : null;
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@rootintf/iface-introspection",
3
+ "version": "3.1.29",
4
+ "description": "IPSME interface introspection — generated from ifacegenconfig.json (friendly interface name -> schema sha256)",
5
+ "type": "module",
6
+ "main": "index.cjs",
7
+ "module": "index.mjs",
8
+ "types": "index.d.cts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./index.d.mts",
13
+ "default": "./index.mjs"
14
+ },
15
+ "require": {
16
+ "types": "./index.d.cts",
17
+ "default": "./index.cjs"
18
+ }
19
+ }
20
+ },
21
+ "files": [
22
+ "index.mjs",
23
+ "index.cjs",
24
+ "index.d.ts",
25
+ "index.d.cts",
26
+ "index.d.mts"
27
+ ],
28
+ "sideEffects": false,
29
+ "license": "ISC"
30
+ }
@@ -0,0 +1,4 @@
1
+ # generated by iface-gen: byte-stability pin -- everything in this gen-managed dir is
2
+ # written LF (content-addressed cache blobs, embedded schema bytes, generated sources).
3
+ # eol=lf stops a core.autocrlf=true checkout from smudging it to CRLF (hash breaks / churn).
4
+ * text eol=lf