@ibgib/core-gib 0.1.59 → 0.1.61

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 (206) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/dist/common/other/graph-helper.d.mts.map +1 -1
  3. package/dist/common/other/graph-helper.mjs +7 -6
  4. package/dist/common/other/graph-helper.mjs.map +1 -1
  5. package/dist/keystone/keystone-config-builder.d.mts +1 -2
  6. package/dist/keystone/keystone-config-builder.d.mts.map +1 -1
  7. package/dist/keystone/keystone-config-builder.mjs +4 -19
  8. package/dist/keystone/keystone-config-builder.mjs.map +1 -1
  9. package/dist/keystone/keystone-constants.d.mts +2 -0
  10. package/dist/keystone/keystone-constants.d.mts.map +1 -1
  11. package/dist/keystone/keystone-constants.mjs +2 -0
  12. package/dist/keystone/keystone-constants.mjs.map +1 -1
  13. package/dist/keystone/keystone-helpers.d.mts +5 -15
  14. package/dist/keystone/keystone-helpers.d.mts.map +1 -1
  15. package/dist/keystone/keystone-helpers.mjs +59 -73
  16. package/dist/keystone/keystone-helpers.mjs.map +1 -1
  17. package/dist/keystone/keystone-policy-types.d.mts +6 -4
  18. package/dist/keystone/keystone-policy-types.d.mts.map +1 -1
  19. package/dist/keystone/keystone-service-v1.d.mts.map +1 -1
  20. package/dist/keystone/keystone-service-v1.mjs +4 -8
  21. package/dist/keystone/keystone-service-v1.mjs.map +1 -1
  22. package/dist/keystone/keystone-service-v1.respec.mjs +182 -33
  23. package/dist/keystone/keystone-service-v1.respec.mjs.map +1 -1
  24. package/dist/keystone/keystone-types.d.mts +4 -11
  25. package/dist/keystone/keystone-types.d.mts.map +1 -1
  26. package/dist/keystone/policy/keystone-profile-builder.d.mts +25 -0
  27. package/dist/keystone/policy/keystone-profile-builder.d.mts.map +1 -0
  28. package/dist/keystone/policy/keystone-profile-builder.mjs +117 -0
  29. package/dist/keystone/policy/keystone-profile-builder.mjs.map +1 -0
  30. package/dist/keystone/policy/profiles/profile-high.json +84 -0
  31. package/dist/keystone/policy/profiles/profile-low.json +84 -0
  32. package/dist/keystone/policy/profiles/profile-medium.json +84 -0
  33. package/dist/keystone/policy/profiles/profile-session.json +84 -0
  34. package/dist/keystone/policy/profiles/profile-test.json +84 -0
  35. package/dist/keystone/policy/schemas/connect-pool.high.schema.json +23 -0
  36. package/dist/keystone/policy/schemas/connect-pool.low.schema.json +23 -0
  37. package/dist/keystone/policy/schemas/connect-pool.medium.schema.json +23 -0
  38. package/dist/keystone/policy/schemas/keystone.high.schema.json +26 -0
  39. package/dist/keystone/policy/schemas/keystone.low.schema.json +26 -0
  40. package/dist/keystone/policy/schemas/keystone.medium.schema.json +26 -0
  41. package/dist/keystone/policy/schemas/manage-pool.high.schema.json +23 -0
  42. package/dist/keystone/policy/schemas/manage-pool.low.schema.json +23 -0
  43. package/dist/keystone/policy/schemas/manage-pool.medium.schema.json +23 -0
  44. package/dist/keystone/policy/schemas/revoke-pool.high.schema.json +23 -0
  45. package/dist/keystone/policy/schemas/revoke-pool.low.schema.json +23 -0
  46. package/dist/keystone/policy/schemas/revoke-pool.medium.schema.json +23 -0
  47. package/dist/keystone/policy/schemas/sign-pool.high.schema.json +23 -0
  48. package/dist/keystone/policy/schemas/sign-pool.low.schema.json +23 -0
  49. package/dist/keystone/policy/schemas/sign-pool.medium.schema.json +23 -0
  50. package/dist/keystone/policy/schemas/sync-pool.high.schema.json +23 -0
  51. package/dist/keystone/policy/schemas/sync-pool.low.schema.json +23 -0
  52. package/dist/keystone/policy/schemas/sync-pool.medium.schema.json +23 -0
  53. package/dist/sync/sync-conflict-adv-multitimelines.withid.respec.d.mts +8 -0
  54. package/dist/sync/sync-conflict-adv-multitimelines.withid.respec.d.mts.map +1 -0
  55. package/dist/sync/sync-conflict-adv-multitimelines.withid.respec.mjs +582 -0
  56. package/dist/sync/sync-conflict-adv-multitimelines.withid.respec.mjs.map +1 -0
  57. package/dist/sync/sync-conflict-basic-divergence.withid.respec.d.mts +7 -0
  58. package/dist/sync/sync-conflict-basic-divergence.withid.respec.d.mts.map +1 -0
  59. package/dist/sync/sync-conflict-basic-divergence.withid.respec.mjs +274 -0
  60. package/dist/sync/sync-conflict-basic-divergence.withid.respec.mjs.map +1 -0
  61. package/dist/sync/sync-conflict-basic-multitimelines.withid.respec.d.mts +8 -0
  62. package/dist/sync/sync-conflict-basic-multitimelines.withid.respec.d.mts.map +1 -0
  63. package/dist/sync/sync-conflict-basic-multitimelines.withid.respec.mjs +322 -0
  64. package/dist/sync/sync-conflict-basic-multitimelines.withid.respec.mjs.map +1 -0
  65. package/dist/sync/sync-conflict-text-merge.withid.respec.d.mts +7 -0
  66. package/dist/sync/sync-conflict-text-merge.withid.respec.d.mts.map +1 -0
  67. package/dist/sync/sync-conflict-text-merge.withid.respec.mjs +307 -0
  68. package/dist/sync/sync-conflict-text-merge.withid.respec.mjs.map +1 -0
  69. package/dist/sync/sync-innerspace-constants.withid.respec.d.mts +8 -0
  70. package/dist/sync/sync-innerspace-constants.withid.respec.d.mts.map +1 -0
  71. package/dist/sync/sync-innerspace-constants.withid.respec.mjs +233 -0
  72. package/dist/sync/sync-innerspace-constants.withid.respec.mjs.map +1 -0
  73. package/dist/sync/sync-innerspace-deep-updates.withid.respec.d.mts +7 -0
  74. package/dist/sync/sync-innerspace-deep-updates.withid.respec.d.mts.map +1 -0
  75. package/dist/sync/sync-innerspace-deep-updates.withid.respec.mjs +233 -0
  76. package/dist/sync/sync-innerspace-deep-updates.withid.respec.mjs.map +1 -0
  77. package/dist/sync/sync-innerspace-dest-ahead.withid.respec.d.mts +7 -0
  78. package/dist/sync/sync-innerspace-dest-ahead.withid.respec.d.mts.map +1 -0
  79. package/dist/sync/sync-innerspace-dest-ahead.withid.respec.mjs +225 -0
  80. package/dist/sync/sync-innerspace-dest-ahead.withid.respec.mjs.map +1 -0
  81. package/dist/sync/sync-innerspace-multiple-timelines.respec.mjs.map +1 -1
  82. package/dist/sync/sync-innerspace-multiple-timelines.withid.respec.d.mts +7 -0
  83. package/dist/sync/sync-innerspace-multiple-timelines.withid.respec.d.mts.map +1 -0
  84. package/dist/sync/sync-innerspace-multiple-timelines.withid.respec.mjs +235 -0
  85. package/dist/sync/sync-innerspace-multiple-timelines.withid.respec.mjs.map +1 -0
  86. package/dist/sync/sync-innerspace-partial-update.withid.respec.d.mts +7 -0
  87. package/dist/sync/sync-innerspace-partial-update.withid.respec.d.mts.map +1 -0
  88. package/dist/sync/sync-innerspace-partial-update.withid.respec.mjs +211 -0
  89. package/dist/sync/sync-innerspace-partial-update.withid.respec.mjs.map +1 -0
  90. package/dist/sync/sync-innerspace.withid.respec.d.mts +8 -0
  91. package/dist/sync/sync-innerspace.withid.respec.d.mts.map +1 -0
  92. package/dist/sync/sync-innerspace.withid.respec.mjs +260 -0
  93. package/dist/sync/sync-innerspace.withid.respec.mjs.map +1 -0
  94. package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs +1 -1
  95. package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs.map +1 -1
  96. package/dist/sync/sync-peer/sync-peer-types.d.mts +12 -1
  97. package/dist/sync/sync-peer/sync-peer-types.d.mts.map +1 -1
  98. package/dist/sync/sync-peer/sync-peer-v1.d.mts +7 -0
  99. package/dist/sync/sync-peer/sync-peer-v1.d.mts.map +1 -1
  100. package/dist/sync/sync-peer/sync-peer-v1.mjs +43 -1
  101. package/dist/sync/sync-peer/sync-peer-v1.mjs.map +1 -1
  102. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.d.mts +2 -0
  103. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.d.mts.map +1 -1
  104. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.mjs +28 -9
  105. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.mjs.map +1 -1
  106. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.d.mts +1 -1
  107. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.d.mts.map +1 -1
  108. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.mjs +5 -3
  109. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.mjs.map +1 -1
  110. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-sender/sync-peer-websocket-sender-v1.d.mts +16 -0
  111. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-sender/sync-peer-websocket-sender-v1.d.mts.map +1 -1
  112. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-sender/sync-peer-websocket-sender-v1.mjs +223 -79
  113. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-sender/sync-peer-websocket-sender-v1.mjs.map +1 -1
  114. package/dist/sync/sync-saga-context/sync-saga-context-helpers.d.mts.map +1 -1
  115. package/dist/sync/sync-saga-context/sync-saga-context-helpers.mjs +41 -2
  116. package/dist/sync/sync-saga-context/sync-saga-context-helpers.mjs.map +1 -1
  117. package/dist/sync/sync-saga-context/sync-saga-context-types.d.mts +4 -0
  118. package/dist/sync/sync-saga-context/sync-saga-context-types.d.mts.map +1 -1
  119. package/dist/sync/sync-saga-coordinator.d.mts +6 -0
  120. package/dist/sync/sync-saga-coordinator.d.mts.map +1 -1
  121. package/dist/sync/sync-saga-coordinator.mjs +213 -137
  122. package/dist/sync/sync-saga-coordinator.mjs.map +1 -1
  123. package/dist/sync/sync-withid.pingpong.respec.mjs +70 -2
  124. package/dist/sync/sync-withid.pingpong.respec.mjs.map +1 -1
  125. package/dist/timeline/timeline-api.d.mts.map +1 -1
  126. package/dist/timeline/timeline-api.mjs +1 -14
  127. package/dist/timeline/timeline-api.mjs.map +1 -1
  128. package/dist/witness/space/reconciliation-space/reconciliation-space-base.d.mts.map +1 -1
  129. package/dist/witness/space/reconciliation-space/reconciliation-space-base.mjs +0 -40
  130. package/dist/witness/space/reconciliation-space/reconciliation-space-base.mjs.map +1 -1
  131. package/dist/witness/space/reconciliation-space/reconciliation-space-helper.d.mts.map +1 -1
  132. package/dist/witness/space/reconciliation-space/reconciliation-space-helper.mjs +6 -6
  133. package/dist/witness/space/reconciliation-space/reconciliation-space-helper.mjs.map +1 -1
  134. package/ibgib-foundations.md +2 -1
  135. package/package.json +1 -1
  136. package/src/common/other/graph-helper.mts +7 -6
  137. package/src/keystone/README.md +19 -15
  138. package/src/keystone/docs/CRYPTANALYSIS.md +185 -0
  139. package/src/keystone/docs/architecture.md +24 -1
  140. package/src/keystone/docs/profiles.md +124 -0
  141. package/src/keystone/keystone-config-builder.mts +3 -21
  142. package/src/keystone/keystone-constants.mts +2 -0
  143. package/src/keystone/keystone-helpers.mts +74 -77
  144. package/src/keystone/keystone-policy-types.mts +6 -4
  145. package/src/keystone/keystone-service-v1.mts +4 -9
  146. package/src/keystone/keystone-service-v1.respec.mts +214 -32
  147. package/src/keystone/keystone-types.mts +5 -9
  148. package/src/keystone/policy/IMPLEMENTATION.md +60 -0
  149. package/src/keystone/policy/README.md +94 -0
  150. package/src/keystone/policy/keystone-profile-builder.mts +131 -0
  151. package/src/keystone/policy/profiles/profile-high.json +84 -0
  152. package/src/keystone/policy/profiles/profile-low.json +84 -0
  153. package/src/keystone/policy/profiles/profile-medium.json +84 -0
  154. package/src/keystone/policy/profiles/profile-session.json +84 -0
  155. package/src/keystone/policy/profiles/profile-test.json +84 -0
  156. package/src/keystone/policy/schemas/connect-pool.high.schema.json +23 -0
  157. package/src/keystone/policy/schemas/connect-pool.low.schema.json +23 -0
  158. package/src/keystone/policy/schemas/connect-pool.medium.schema.json +23 -0
  159. package/src/keystone/policy/schemas/keystone.high.schema.json +26 -0
  160. package/src/keystone/policy/schemas/keystone.low.schema.json +26 -0
  161. package/src/keystone/policy/schemas/keystone.medium.schema.json +26 -0
  162. package/src/keystone/policy/schemas/manage-pool.high.schema.json +23 -0
  163. package/src/keystone/policy/schemas/manage-pool.low.schema.json +23 -0
  164. package/src/keystone/policy/schemas/manage-pool.medium.schema.json +23 -0
  165. package/src/keystone/policy/schemas/revoke-pool.high.schema.json +23 -0
  166. package/src/keystone/policy/schemas/revoke-pool.low.schema.json +23 -0
  167. package/src/keystone/policy/schemas/revoke-pool.medium.schema.json +23 -0
  168. package/src/keystone/policy/schemas/sign-pool.high.schema.json +23 -0
  169. package/src/keystone/policy/schemas/sign-pool.low.schema.json +23 -0
  170. package/src/keystone/policy/schemas/sign-pool.medium.schema.json +23 -0
  171. package/src/keystone/policy/schemas/sync-pool.high.schema.json +23 -0
  172. package/src/keystone/policy/schemas/sync-pool.low.schema.json +23 -0
  173. package/src/keystone/policy/schemas/sync-pool.medium.schema.json +23 -0
  174. package/src/sync/docs/security-3b.md +92 -0
  175. package/src/sync/docs/security.md +139 -38
  176. package/src/sync/sync-conflict-adv-multitimelines.withid.respec.mts +706 -0
  177. package/src/sync/sync-conflict-basic-divergence.withid.respec.mts +321 -0
  178. package/src/sync/sync-conflict-basic-multitimelines.withid.respec.mts +374 -0
  179. package/src/sync/sync-conflict-text-merge.withid.respec.mts +347 -0
  180. package/src/sync/sync-innerspace-constants.withid.respec.mts +264 -0
  181. package/src/sync/sync-innerspace-deep-updates.withid.respec.mts +272 -0
  182. package/src/sync/sync-innerspace-dest-ahead.withid.respec.mts +266 -0
  183. package/src/sync/sync-innerspace-multiple-timelines.respec.mts +0 -1
  184. package/src/sync/sync-innerspace-multiple-timelines.withid.respec.mts +273 -0
  185. package/src/sync/sync-innerspace-partial-update.withid.respec.mts +249 -0
  186. package/src/sync/sync-innerspace.withid.respec.mts +265 -0
  187. package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mts +1 -1
  188. package/src/sync/sync-peer/sync-peer-types.mts +11 -1
  189. package/src/sync/sync-peer/sync-peer-v1.mts +47 -1
  190. package/src/sync/sync-peer/sync-peer-websocket/README.md +42 -0
  191. package/src/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.mts +26 -9
  192. package/src/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.mts +5 -3
  193. package/src/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-sender/sync-peer-websocket-sender-v1.mts +242 -78
  194. package/src/sync/sync-saga-context/sync-saga-context-helpers.mts +46 -4
  195. package/src/sync/sync-saga-context/sync-saga-context-types.mts +5 -0
  196. package/src/sync/sync-saga-coordinator.mts +221 -137
  197. package/src/sync/sync-withid.pingpong.respec.mts +76 -3
  198. package/src/timeline/timeline-api.mts +1 -15
  199. package/src/timeline/timeline-api.respec.mts +3 -3
  200. package/src/witness/space/reconciliation-space/reconciliation-space-base.mts +0 -46
  201. package/src/witness/space/reconciliation-space/reconciliation-space-helper.mts +6 -5
  202. package/tsconfig.json +6 -1
  203. package/src/keystone/keystone-policy.schema.json +0 -51
  204. package/src/sync/docs/ping_pong_plan.md +0 -147
  205. package/src/witness/space/reconciliation-space/reconciliation-space-base.mts.OLD.md +0 -884
  206. package/src/witness/space/reconciliation-space/reconciliation-space-helper.mts.OLD.md +0 -125
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "MediumSecurityKeystoneProfile",
4
+ "type": "object",
5
+ "properties": {
6
+ "metadata": {
7
+ "type": "object",
8
+ "properties": {
9
+ "name": { "type": "string" },
10
+ "securityLevel": { "type": "string", "const": "medium" }
11
+ }
12
+ },
13
+ "pools": {
14
+ "type": "object",
15
+ "properties": {
16
+ "sync": { "$ref": "./sync-pool.medium.schema.json" },
17
+ "manage": { "$ref": "./manage-pool.medium.schema.json" },
18
+ "revoke": { "$ref": "./revoke-pool.medium.schema.json" },
19
+ "connect": { "$ref": "./connect-pool.medium.schema.json" },
20
+ "sign": { "$ref": "./sign-pool.medium.schema.json" }
21
+ },
22
+ "required": ["sync", "manage", "revoke", "connect", "sign"]
23
+ }
24
+ },
25
+ "required": ["pools"]
26
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "HighSecurityManagePool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "manage" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "manage" } },
8
+ "algo": { "type": "string", "const": "SHA-512" },
9
+ "rounds": { "type": "integer", "minimum": 4 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 2000 },
14
+ "replenish": { "type": "string", "enum": ["top-up", "replace-all"] },
15
+ "selectSequentially": { "type": "integer", "minimum": 10 },
16
+ "selectRandomly": { "type": "integer", "minimum": 10 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 16 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "LowSecurityManagePool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "manage" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "manage" } },
8
+ "algo": { "type": "string", "const": "SHA-256" },
9
+ "rounds": { "type": "integer", "minimum": 2 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 10 },
14
+ "replenish": { "type": "string", "enum": ["top-up", "replace-all"] },
15
+ "selectSequentially": { "type": "integer", "minimum": 1 },
16
+ "selectRandomly": { "type": "integer", "minimum": 1 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 3 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "MediumSecurityManagePool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "manage" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "manage" } },
8
+ "algo": { "type": "string", "enum": ["SHA-256", "SHA-512"] },
9
+ "rounds": { "type": "integer", "minimum": 2 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 500 },
14
+ "replenish": { "type": "string", "enum": ["top-up", "replace-all"] },
15
+ "selectSequentially": { "type": "integer", "minimum": 5 },
16
+ "selectRandomly": { "type": "integer", "minimum": 5 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 10 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "HighSecurityRevokePool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "revoke" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "revoke" } },
8
+ "algo": { "type": "string", "const": "SHA-512" },
9
+ "rounds": { "type": "integer", "minimum": 20 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 2000 },
14
+ "replenish": { "type": "string", "const": "delete-all" },
15
+ "selectSequentially": { "type": "integer", "minimum": 50 },
16
+ "selectRandomly": { "type": "integer", "minimum": 50 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 0 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "LowSecurityRevokePool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "revoke" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "revoke" } },
8
+ "algo": { "type": "string", "const": "SHA-256" },
9
+ "rounds": { "type": "integer", "minimum": 5 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 12 },
14
+ "replenish": { "type": "string", "const": "delete-all" },
15
+ "selectSequentially": { "type": "integer", "minimum": 3 },
16
+ "selectRandomly": { "type": "integer", "minimum": 3 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 0 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "MediumSecurityRevokePool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "revoke" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "revoke" } },
8
+ "algo": { "type": "string", "enum": ["SHA-256", "SHA-512"] },
9
+ "rounds": { "type": "integer", "minimum": 10 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 200 },
14
+ "replenish": { "type": "string", "const": "delete-all" },
15
+ "selectSequentially": { "type": "integer", "minimum": 20 },
16
+ "selectRandomly": { "type": "integer", "minimum": 20 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 0 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "HighSecuritySignPool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "default" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "sign" } },
8
+ "algo": { "type": "string", "const": "SHA-512" },
9
+ "rounds": { "type": "integer", "minimum": 4 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 1000 },
14
+ "replenish": { "type": "string", "const": "top-up" },
15
+ "selectSequentially": { "type": "integer", "minimum": 10 },
16
+ "selectRandomly": { "type": "integer", "minimum": 10 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 16 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "LowSecuritySignPool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "default" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "sign" } },
8
+ "algo": { "type": "string", "const": "SHA-256" },
9
+ "rounds": { "type": "integer", "minimum": 2 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 20 },
14
+ "replenish": { "type": "string", "const": "top-up" },
15
+ "selectSequentially": { "type": "integer", "minimum": 1 },
16
+ "selectRandomly": { "type": "integer", "minimum": 1 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 3 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "MediumSecuritySignPool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "default" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "sign" } },
8
+ "algo": { "type": "string", "enum": ["SHA-256", "SHA-512"] },
9
+ "rounds": { "type": "integer", "minimum": 2 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 200 },
14
+ "replenish": { "type": "string", "const": "top-up" },
15
+ "selectSequentially": { "type": "integer", "minimum": 5 },
16
+ "selectRandomly": { "type": "integer", "minimum": 5 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 10 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "HighSecuritySyncPool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "sync" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "sync" } },
8
+ "algo": { "type": "string", "const": "SHA-512" },
9
+ "rounds": { "type": "integer", "minimum": 4 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 2000 },
14
+ "replenish": { "type": "string", "const": "top-up" },
15
+ "selectSequentially": { "type": "integer", "minimum": 10 },
16
+ "selectRandomly": { "type": "integer", "minimum": 10 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 16 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "LowSecuritySyncPool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "sync" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "sync" } },
8
+ "algo": { "type": "string", "const": "SHA-256" },
9
+ "rounds": { "type": "integer", "minimum": 1 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 12 },
14
+ "replenish": { "type": "string", "const": "top-up" },
15
+ "selectSequentially": { "type": "integer", "minimum": 1 },
16
+ "selectRandomly": { "type": "integer", "minimum": 1 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 3 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "MediumSecuritySyncPool",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string", "const": "sync" },
7
+ "allowedVerbs": { "type": "array", "items": { "const": "sync" } },
8
+ "algo": { "type": "string", "enum": ["SHA-256", "SHA-512"] },
9
+ "rounds": { "type": "integer", "minimum": 2 },
10
+ "behavior": {
11
+ "type": "object",
12
+ "properties": {
13
+ "size": { "type": "integer", "minimum": 500 },
14
+ "replenish": { "type": "string", "const": "top-up" },
15
+ "selectSequentially": { "type": "integer", "minimum": 5 },
16
+ "selectRandomly": { "type": "integer", "minimum": 5 },
17
+ "targetBindingCount": { "type": "integer", "minimum": 10 }
18
+ },
19
+ "required": ["size", "replenish", "selectSequentially", "selectRandomly", "targetBindingCount"]
20
+ }
21
+ },
22
+ "required": ["id", "allowedVerbs", "algo", "rounds", "behavior"]
23
+ }
@@ -0,0 +1,92 @@
1
+ # Implementation Plan: Phase 3B — Basic Single-Timeline Sync with Identity (Integrated)
2
+
3
+ This document outlines the implementation plan for Phase 3B of identity integration, focusing on integrating the cryptographic session identity into the WebSocket sync peer architecture, and wiring up the Row 3B dev-tools test buttons.
4
+
5
+ ## 1. Goal
6
+ The goal of Phase 3B is to achieve successful end-to-end synchronization of a test ibgib `X` over a stateful WebSocket connection using asymmetric session identity validation.
7
+ At the end of the sync saga:
8
+ - Both sender and receiver durable spaces must contain the same evolved Domain Keystone (I1).
9
+ - Both spaces must contain the full session identity keystone (S) graph evolved to the correct turn count ($n = 3$, or potentially $n = 4$ depending on exact commit phase timeline evolution).
10
+ - Both spaces must contain the identical target ibgib `X` dependency graph.
11
+
12
+ ---
13
+
14
+ ## 2. Technical Challenge: Asymmetric Authentication in WebSocket Peers
15
+ In V1, only the sender (Alice) signs the synchronization context. The receiver (Bob) skips signing the response context (`skipSign: true`), relying on transport-level security (TLS) for the return path.
16
+ Consequently:
17
+ - Alice's request context contains a `signedSessionIdentity`.
18
+ - Bob's response context has `signedSessionIdentity` set to `undefined`.
19
+
20
+ ### Current Issue in `SyncPeerWebSocketSender_V1`
21
+ In `SyncPeerWebSocketSender_V1.handleRuntimeMessage`, the sender currently attempts to authenticate Bob's response context:
22
+ ```typescript
23
+ if (msg.type === SyncWebSocketMsgType.sync_frame_response) {
24
+ const responseContext = msg.context as SyncSagaContextIbGib_V1;
25
+
26
+ // Validate and authenticate Bob's response context first
27
+ await this.authenticateAndValidate({ context: responseContext });
28
+ ```
29
+ Because `authenticateAndValidate` calls `authenticateContextIntrinsically` which expects a signature when `sagaFrame.data.sessionIdentityTjpAddr` is present, this call will throw an error since Bob's response context has no `signedSessionIdentity`.
30
+
31
+ ### Solution
32
+ Change `SyncPeerWebSocketSender_V1.handleRuntimeMessage` to run structural/intrinsic validation instead of full authentication on the response context:
33
+ ```typescript
34
+ // Ensure the response context and saga frame are valid structurally
35
+ const validationErrors = await validateContextAndSagaFrame({ context: responseContext });
36
+ if (validationErrors.length > 0) {
37
+ throw new Error(`Invalid response context received. Errors: ${validationErrors.join(', ')}`);
38
+ }
39
+ ```
40
+ The client-side `SyncSagaCoordinator` will then run the turn-by-turn continuation, sequence, and identity validation checks via `validateReturnContext(...)`. This provides a robust stopgap validation for V1 before the receiver-side signing is fully implemented in future versions.
41
+
42
+
43
+ ---
44
+
45
+ ## 3. UI Integration: Dev Tools Row 3B
46
+ We will wire up the three buttons in `apps/space-gib/src/client/dev-tools.mts` under the `init3bPlaceholder` placeholder handler:
47
+
48
+ ### 3.1. `btn-3b-setup`
49
+ - **Actions**:
50
+ 1. Generates a new long-lived Domain Keystone (I) for Alice using master secret `'test-sender-secret-phase3'` and unique salts (`'senderidentitysyncsaltphase3'`, `'senderidentitymanagesaltphase3'`).
51
+ 2. Registers the genesis Domain Keystone (I) on the server via `apiBridge.postGenesisKeystone(domainI)`.
52
+ 3. Creates a local dummy Target IbGib (X) with distinct test data: `{ hello: 'world3', random: Math.random() }`.
53
+ 4. Stores `domainI`, `domainIMasterSecret`, and `targetX` in `debugState`.
54
+ 5. Updates button text to `✓ 3B Setup Complete` and enables `btn-3b-sync`.
55
+
56
+ ### 3.2. `btn-3b-sync`
57
+ - **Actions**:
58
+ 1. Instantiates `SyncPeerWebSocketSender_V1` targeting the server's WS and evolution endpoints.
59
+ 2. Initializes peer options with Alice's identity, secret, and a newly generated `sagaId`.
60
+ 3. Instantiates `SyncSagaCoordinator`.
61
+ 4. Calls `coordinator.sync(...)` to synchronize Target X to the server.
62
+ 5. Awaits completion (`await syncSaga.done`). This must run without errors.
63
+ 6. Updates button text to `✓ 3B Sync Run` and enables `btn-3b-check`.
64
+
65
+ ### 3.3. `btn-3b-check`
66
+ - **Actions**:
67
+ 1. Resolves the client's latest Target X address and fetches its local dependency graph.
68
+ 2. Resolves the server's latest Target X address and fetches its server-side dependency graph using a new API bridge helper.
69
+ 3. Asserts the client and server Target X graphs are equivalent:
70
+ - The latest address of X is identical.
71
+ - Graph node counts are identical.
72
+ - All keys and values match.
73
+ 4. Resolves the latest session identity (S) address and asserts it evolved to `n = 2` (Init at $n=0$, Connect Handshake at $n=1$, Sync Context Sign at $n=2$).
74
+ 5. Verifies the latest S address and graph are identical on both client and server.
75
+ 6. Verifies the evolved Domain Keystone (I1) is present in both client and server spaces.
76
+ 7. If all checks pass, logs `🎉 ALL PHASE 3B CHECKS PASSED FLAWLESSLY! ✓` and updates button text to `✓ 3B All Passed`.
77
+
78
+ ---
79
+
80
+ ## 4. Concrete Checklist
81
+
82
+ ### [ ] API Bridge Extension
83
+ - [ ] Add `getIbGibGraph(domainAddr, ibGibAddr)` to `SpaceGibApiBridge` (`apps/space-gib/src/client/api/space-gib-api-bridge.mts`) to retrieve dependency graphs with `getGraph=true`.
84
+
85
+ ### [ ] WebSocket Peer Adjustments
86
+ - [ ] Modify `SyncPeerWebSocketSender_V1.handleRuntimeMessage` to bypass `authenticateAndValidate` on Bob's response context, using `validateContextAndSagaFrame` instead.
87
+
88
+ ### [ ] Dev Tools UI (Row 3B) Wiring
89
+ - [ ] Implement `init3bSetupButton` inside `dev-tools.mts`.
90
+ - [ ] Implement `init3bSyncButton` inside `dev-tools.mts`.
91
+ - [ ] Implement `init3bCheckButton` inside `dev-tools.mts`.
92
+ - [ ] Update `initDevTools` to initialize the new button handlers and remove `init3bPlaceholder`.