@ibgib/core-gib 0.1.60 → 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 (179) hide show
  1. package/CHANGELOG.md +3 -0
  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-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.d.mts +1 -0
  95. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.d.mts.map +1 -1
  96. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.mjs +13 -4
  97. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.mjs.map +1 -1
  98. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.d.mts +1 -1
  99. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.d.mts.map +1 -1
  100. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.mjs +5 -3
  101. package/dist/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.mjs.map +1 -1
  102. package/dist/sync/sync-saga-coordinator.d.mts.map +1 -1
  103. package/dist/sync/sync-saga-coordinator.mjs +165 -145
  104. package/dist/sync/sync-saga-coordinator.mjs.map +1 -1
  105. package/dist/sync/sync-withid.pingpong.respec.mjs +8 -8
  106. package/dist/sync/sync-withid.pingpong.respec.mjs.map +1 -1
  107. package/dist/timeline/timeline-api.d.mts.map +1 -1
  108. package/dist/timeline/timeline-api.mjs +1 -14
  109. package/dist/timeline/timeline-api.mjs.map +1 -1
  110. package/dist/witness/space/reconciliation-space/reconciliation-space-base.d.mts.map +1 -1
  111. package/dist/witness/space/reconciliation-space/reconciliation-space-base.mjs +0 -40
  112. package/dist/witness/space/reconciliation-space/reconciliation-space-base.mjs.map +1 -1
  113. package/dist/witness/space/reconciliation-space/reconciliation-space-helper.d.mts.map +1 -1
  114. package/dist/witness/space/reconciliation-space/reconciliation-space-helper.mjs +6 -6
  115. package/dist/witness/space/reconciliation-space/reconciliation-space-helper.mjs.map +1 -1
  116. package/ibgib-foundations.md +2 -1
  117. package/package.json +1 -1
  118. package/src/common/other/graph-helper.mts +7 -6
  119. package/src/keystone/README.md +19 -15
  120. package/src/keystone/docs/CRYPTANALYSIS.md +185 -0
  121. package/src/keystone/docs/architecture.md +24 -1
  122. package/src/keystone/docs/profiles.md +124 -0
  123. package/src/keystone/keystone-config-builder.mts +3 -21
  124. package/src/keystone/keystone-constants.mts +2 -0
  125. package/src/keystone/keystone-helpers.mts +74 -77
  126. package/src/keystone/keystone-policy-types.mts +6 -4
  127. package/src/keystone/keystone-service-v1.mts +4 -9
  128. package/src/keystone/keystone-service-v1.respec.mts +214 -32
  129. package/src/keystone/keystone-types.mts +5 -9
  130. package/src/keystone/policy/IMPLEMENTATION.md +60 -0
  131. package/src/keystone/policy/README.md +94 -0
  132. package/src/keystone/policy/keystone-profile-builder.mts +131 -0
  133. package/src/keystone/policy/profiles/profile-high.json +84 -0
  134. package/src/keystone/policy/profiles/profile-low.json +84 -0
  135. package/src/keystone/policy/profiles/profile-medium.json +84 -0
  136. package/src/keystone/policy/profiles/profile-session.json +84 -0
  137. package/src/keystone/policy/profiles/profile-test.json +84 -0
  138. package/src/keystone/policy/schemas/connect-pool.high.schema.json +23 -0
  139. package/src/keystone/policy/schemas/connect-pool.low.schema.json +23 -0
  140. package/src/keystone/policy/schemas/connect-pool.medium.schema.json +23 -0
  141. package/src/keystone/policy/schemas/keystone.high.schema.json +26 -0
  142. package/src/keystone/policy/schemas/keystone.low.schema.json +26 -0
  143. package/src/keystone/policy/schemas/keystone.medium.schema.json +26 -0
  144. package/src/keystone/policy/schemas/manage-pool.high.schema.json +23 -0
  145. package/src/keystone/policy/schemas/manage-pool.low.schema.json +23 -0
  146. package/src/keystone/policy/schemas/manage-pool.medium.schema.json +23 -0
  147. package/src/keystone/policy/schemas/revoke-pool.high.schema.json +23 -0
  148. package/src/keystone/policy/schemas/revoke-pool.low.schema.json +23 -0
  149. package/src/keystone/policy/schemas/revoke-pool.medium.schema.json +23 -0
  150. package/src/keystone/policy/schemas/sign-pool.high.schema.json +23 -0
  151. package/src/keystone/policy/schemas/sign-pool.low.schema.json +23 -0
  152. package/src/keystone/policy/schemas/sign-pool.medium.schema.json +23 -0
  153. package/src/keystone/policy/schemas/sync-pool.high.schema.json +23 -0
  154. package/src/keystone/policy/schemas/sync-pool.low.schema.json +23 -0
  155. package/src/keystone/policy/schemas/sync-pool.medium.schema.json +23 -0
  156. package/src/sync/docs/security.md +54 -21
  157. package/src/sync/sync-conflict-adv-multitimelines.withid.respec.mts +706 -0
  158. package/src/sync/sync-conflict-basic-divergence.withid.respec.mts +321 -0
  159. package/src/sync/sync-conflict-basic-multitimelines.withid.respec.mts +374 -0
  160. package/src/sync/sync-conflict-text-merge.withid.respec.mts +347 -0
  161. package/src/sync/sync-innerspace-constants.withid.respec.mts +264 -0
  162. package/src/sync/sync-innerspace-deep-updates.withid.respec.mts +272 -0
  163. package/src/sync/sync-innerspace-dest-ahead.withid.respec.mts +266 -0
  164. package/src/sync/sync-innerspace-multiple-timelines.respec.mts +0 -1
  165. package/src/sync/sync-innerspace-multiple-timelines.withid.respec.mts +273 -0
  166. package/src/sync/sync-innerspace-partial-update.withid.respec.mts +249 -0
  167. package/src/sync/sync-innerspace.withid.respec.mts +265 -0
  168. package/src/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-peer-websocket-receiver-v1.mts +12 -4
  169. package/src/sync/sync-peer/sync-peer-websocket/sync-peer-websocket-receiver/sync-websocket-peer-helpers.mts +5 -3
  170. package/src/sync/sync-saga-coordinator.mts +159 -143
  171. package/src/sync/sync-withid.pingpong.respec.mts +8 -8
  172. package/src/timeline/timeline-api.mts +1 -15
  173. package/src/timeline/timeline-api.respec.mts +3 -3
  174. package/src/witness/space/reconciliation-space/reconciliation-space-base.mts +0 -46
  175. package/src/witness/space/reconciliation-space/reconciliation-space-helper.mts +6 -5
  176. package/tsconfig.json +6 -1
  177. package/src/keystone/keystone-policy.schema.json +0 -51
  178. package/src/witness/space/reconciliation-space/reconciliation-space-base.mts.OLD.md +0 -884
  179. 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
+ }
@@ -184,6 +184,27 @@ Context ibgib now has a clean, consistent pair:
184
184
 
185
185
  ---
186
186
 
187
+ ## respec-gib Testing Framework
188
+
189
+ Because `ibgib` has unique execution environments and a high need for custom asynchronous block handling, it uses a custom testing framework located in `@ibgib/helper-gib/dist/respec-gib`.
190
+
191
+ ### Key Framework APIs
192
+ * **`respecfully`**: The equivalent of `describe` or an outer test suite block. It is async and MUST be awaited.
193
+ * **`ifWe`**: The equivalent of `it`, used for defining a specific test case block. It is async and MUST be awaited. It cannot be nested.
194
+ * **`ifWeMight`**: A focused test case (equivalent to `fit` or `it.only`). It is async, MUST be awaited, and cannot be nested.
195
+ * **`iReckon`**: The assertion fluent API (equivalent to `expect`). It is synchronous and should NOT be awaited. Available assertions include: `willEqual(expected)`, `isGonnaBe(expected)`, `isGonnaBeTruthy()`, `isGonnaBeFalsy()`, `isGonnaBeTrue()`, `isGonnaBeFalse()`, `isGonnaBeUndefined()`, and `includes(expected)`. You can modify assertions using `.not` and `.asTo(label)`.
196
+
197
+ ### Crucial Execution & Logging Nuances
198
+ > [!IMPORTANT]
199
+ > **File Focus vs. Code Execution**:
200
+ > The test runner scans all test files for the presence of `ifWeMight` (or `respecfullyDear`) to determine which *files* get selected and executed. However, once a file is selected and run, **the entire file executes**.
201
+ >
202
+ > **The Logging Caveat**:
203
+ > The `ifWeMight` filter **only** determines which test results are ultimately *reported* in the test summary output. This means all code and `console.log` statements in any standard `ifWe` blocks within the same file will **still execute and write to the logs**.
204
+ > This behavior can make test logs extremely noisy and confusing. If you are focusing on a single test, you should temporarily change all other `ifWeMight` blocks to `ifWe`, and use a single `ifWeMight` block or comment out other logs/tests to keep console output readable.
205
+
206
+ ---
207
+
187
208
  ## Implementation Plan
188
209
 
189
210
  Each phase below is a discrete, verifiable step. We proceed **one checkbox at a time**, **reviewing/discussing** code/results before moving to the next. Each phase has two targets: **innerspace** (automated unit test) and **space-gib** (manual/integrated e2e).
@@ -385,64 +406,76 @@ The sync proper will not be called. The test only cares that the pre-connect ide
385
406
 
386
407
  **Goal**: Extend the WebSocket peer and Space-Gib interface to manually execute and verify all advanced data and conflict scenarios currently covered by the InnerSpace unit tests.
387
408
 
388
- For each scenario, verify automated innerspace tests (A) are fully functional, and create manual websocket peer tests (B) with corresponding buttons/UI elements.
409
+ > [!IMPORTANT]
410
+ > **Guidelines & Testing Reminders**:
411
+ > - Before starting the implementation of any automated test (A) or manual verification (B) in Phase 4, you **MUST** scan/re-scan the variable naming and structural guidelines in [testing.md](file:///c:/Users/billm/antigravity/ibgib/libs/core-gib/src/sync/docs/testing.md) to align the codebase structure and naming conventions.
412
+ > - **Manual Testing (B) Rule**: The AI assistant **MUST NOT** use the browser subagent to perform manual browser/UI testing for any "B" manual verification phases in space-gib. The user will run all B testing themselves to conserve tokens.
413
+ > - **Executing Focused Tests**: After changing previous test phase file's ifWeMight blocks -> ifWe to defocus that file, and after you have setup the new test file with ifWeMight blocks, use `npm run test:core-gib` to execute the new *.respec.mts file. (NOTE: If you search files for these blocks, be sure to include the open paren, e.g., "ifWeMight(", because often ifWeMight remains unused in import statements). After you have executed the tests and they pass, do NOT change it back to ifWe blocks immediately, so I can execute and look at the tests myself.
414
+
415
+ For each scenario:
416
+ 1. **Automated Verification (A)**: Copy the grandfathered non-identity unit test file (e.g., `sync-innerspace.respec.mts`) to a new file named with `.withid.` in the filename (e.g., `sync-innerspace.withid.respec.mts`). Incorporate identity setup (referencing `sync-withid.pingpong.respec.mts` for setup pattern) and ensure the test runs and passes.
417
+ * **Test naming/structure convention**: The new `.withid.respec.mts` tests must follow the variable and structural naming guidelines outlined in [testing.md](file:///c:/Users/billm/antigravity/ibgib/libs/core-gib/src/sync/docs/testing.md).
418
+ * **Identity Verification Checks**: Each `.withid.respec.mts` test must verify that the session identity `S` evolved the expected number of times, the user identity `I` evolved the expected number of times on both spaces, and that the full dependency graphs for `S` and `I` are correctly synced to both spaces.
419
+ 2. **Manual Verification (B)**: Create manual websocket peer tests with corresponding buttons/UI elements integrated via Dev Tools.
420
+ * **Dont use browser testing**: We must minimize token use, so I will do all of the manual testing in the browser. Do not do automated browser testing in B phases.
389
421
 
390
422
  #### 1. Sync InnerSpace (Basic Push Sync)
391
- - [ ] Phase 4.1A — Automated InnerSpace Verification (`sync-innerspace.respec.mts`)
392
- - [ ] Phase 4.1B — WebSocket Peer Manual Verification (integrated via Dev Tools)
423
+ - [x] Phase 4.1A — Automated InnerSpace Verification (`sync-innerspace.withid.respec.mts`)
424
+ - [x] Phase 4.1B — WebSocket Peer Manual Verification (integrated via Dev Tools)
393
425
  * Tests basic push sync of a single timeline and its mutations from Source to Destination.
394
426
  * Verifies that the target timeline tip and its dependency graph successfully arrive at the destination.
395
427
 
396
428
  #### 2. Sync Constants (No TJP)
397
- - [ ] Phase 4.2A — Automated InnerSpace Verification (`sync-innerspace-constants.respec.mts`)
398
- - [ ] Phase 4.2B — WebSocket Peer Manual Verification (integrated via Dev Tools)
429
+ - [x] Phase 4.2A — Automated InnerSpace Verification (`sync-innerspace-constants.withid.respec.mts`)
430
+ - [x] Phase 4.2B — WebSocket Peer Manual Verification (integrated via Dev Tools)
399
431
  * Tests syncing "constants" (ibGibs without timelines/TJPs) and verifies that dependencies (linked constants) are resolved.
400
432
  * Ensures idempotency/smart diffing (payloads are not re-sent if they already exist in the destination space).
401
433
 
402
434
  #### 3. Sync Destination with Partial History
403
- - [ ] Phase 4.3A — Automated InnerSpace Verification (`sync-innerspace-partial-update.respec.mts`)
404
- - [ ] Phase 4.3B — WebSocket Peer Manual Verification (integrated via Dev Tools)
435
+ - [x] Phase 4.3A — Automated InnerSpace Verification (`sync-innerspace-partial-update.withid.respec.mts`)
436
+ - [x] Phase 4.3B — WebSocket Peer Manual Verification (integrated via Dev Tools)
405
437
  * Tests push synchronization when the destination already contains a partial timeline history (e.g., up to V1), but the sender has newer frames (V2).
406
438
  * Verifies that only the delta is transmitted and correctly linked to the existing history at the destination.
439
+ - [x] INTERSTITIAL — Refactor `dev-tools.mts` to split it into a `dev-tools` directory containing modular sub-files to reduce file size.
407
440
 
408
441
  #### 4. Sync Deep History Updates
409
- - [ ] Phase 4.4A — Automated InnerSpace Verification (`sync-innerspace-deep-updates.respec.mts`)
410
- - [ ] Phase 4.4B — WebSocket Peer Manual Verification (integrated via Dev Tools)
442
+ - [x] Phase 4.4A — Automated InnerSpace Verification (`sync-innerspace-deep-updates.withid.respec.mts`)
443
+ - [x] Phase 4.4B — WebSocket Peer Manual Verification (integrated via Dev Tools)
411
444
  * Tests push synchronization of a timeline tip with a deep mutation history (multiple updates).
412
445
  * Verifies that the destination receives all intermediate frames, preserving the full timeline history and graph integrity.
413
446
 
414
447
  #### 5. Sync Destination Ahead (Remote Newer)
415
- - [ ] Phase 4.5A — Automated InnerSpace Verification (`sync-innerspace-dest-ahead.respec.mts`)
416
- - [ ] Phase 4.5B — WebSocket Peer Manual Verification (integrated via Dev Tools)
448
+ - [x] Phase 4.5A — Automated InnerSpace Verification (`sync-innerspace-dest-ahead.withid.respec.mts`)
449
+ - [x] Phase 4.5B — WebSocket Peer Manual Verification (integrated via Dev Tools)
417
450
  * Tests synchronization when the destination (remote) actually has a newer frame (V2) than the sender's local tip (V1).
418
451
  * Verifies that the sender learns of the remote tip and pulls it down so both client and server converge to the dest-ahead tip.
419
452
 
420
453
  #### 6. Sync Multiple Independent Timelines
421
- - [ ] Phase 4.6A — Automated InnerSpace Verification (`sync-innerspace-multiple-timelines.respec.mts`)
422
- - [ ] Phase 4.6B — WebSocket Peer Manual Verification (integrated via Dev Tools)
454
+ - [x] Phase 4.6A — Automated InnerSpace Verification (`sync-innerspace-multiple-timelines.withid.respec.mts`)
455
+ - [x] Phase 4.6B — WebSocket Peer Manual Verification (integrated via Dev Tools)
423
456
  * Tests synchronization of multiple independent timelines (e.g., Timeline A and Timeline B) in a single sync coordinator call.
424
457
  * Verifies that both timeline tips and their respective dependency graphs are transferred and updated correctly.
425
458
 
426
459
  #### 7. Basic Divergence Conflict Resolution
427
- - [ ] Phase 4.7A — Automated InnerSpace Verification (`sync-conflict-basic-divergence.respec.mts`)
428
- - [ ] Phase 4.7B — WebSocket Peer Manual Verification (integrated via Dev Tools)
460
+ - [x] Phase 4.7A — Automated InnerSpace Verification (`sync-conflict-basic-divergence.withid.respec.mts`)
461
+ - [x] Phase 4.7B — WebSocket Peer Manual Verification (integrated via Dev Tools)
429
462
  * Tests divergence when source and destination edit different fields on a shared base timeline simultaneously.
430
463
  * Verifies that optimistic merge automatically produces a merged tip (V3) containing both edits and records the graft metadata (`graftbase`, `graftorphan`).
431
464
 
432
465
  #### 8. Divergence with Related Timelines
433
- - [ ] Phase 4.8A — Automated InnerSpace Verification (`sync-conflict-basic-multitimelines.respec.mts`)
434
- - [ ] Phase 4.8B — WebSocket Peer Manual Verification (integrated via Dev Tools)
466
+ - [x] Phase 4.8A — Automated InnerSpace Verification (`sync-conflict-basic-multitimelines.withid.respec.mts`)
467
+ - [x] Phase 4.8B — WebSocket Peer Manual Verification (integrated via Dev Tools)
435
468
  * Tests advanced divergence where one of the divergent updates also references/relates a new independent timeline (Beta).
436
469
  * Verifies that during optimistic merge, the dependent timeline is synced automatically alongside the merged tip.
437
470
 
438
471
  #### 9. Text Field Merge (LCS) Conflict Resolution
439
- - [ ] Phase 4.9A — Automated InnerSpace Verification (`sync-conflict-text-merge.respec.mts`)
440
- - [ ] Phase 4.9B — WebSocket Peer Manual Verification (integrated via Dev Tools)
472
+ - [x] Phase 4.9A — Automated InnerSpace Verification (`sync-conflict-text-merge.withid.respec.mts`)
473
+ - [x] Phase 4.9B — WebSocket Peer Manual Verification (integrated via Dev Tools)
441
474
  * Tests automatic merging of conflicting string edits within the `ibgib.data.text` field using the LCS (Longest Common Subsequence) merge algorithm.
442
475
  * Verifies merging of simple appends (beginning vs. end) and interleaved edits in different paragraphs.
443
476
 
444
477
  #### 10. Advanced Multi-Round/Timeline Permutations
445
- - [ ] Phase 4.10A — Automated InnerSpace Verification (`sync-conflict-adv-multitimelines.respec.mts`)
446
- - [ ] Phase 4.10B — WebSocket Peer Manual Verification (integrated via Dev Tools)
478
+ - [x] Phase 4.10A — Automated InnerSpace Verification (`sync-conflict-adv-multitimelines.withid.respec.mts`)
479
+ - [x] Phase 4.10B — WebSocket Peer Manual Verification (integrated via Dev Tools)
447
480
  * Tests complex multi-round/timeline permutations with parallel divergent edits across multiple rounds.
448
481
  * Verifies that nested or sequential merges resolve correctly using the optimistic graft strategy.