@blue-repository/types 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +1 -1
  2. package/dist/meta.d.ts +2 -2
  3. package/dist/meta.d.ts.map +1 -1
  4. package/dist/meta.js +2 -6
  5. package/dist/meta.js.map +1 -1
  6. package/dist/packages/common/index.d.ts +1 -1
  7. package/dist/packages/common/meta.d.ts +1 -1
  8. package/dist/packages/common/meta.js +1 -1
  9. package/dist/packages/conversation/blue-ids.d.ts +14 -11
  10. package/dist/packages/conversation/blue-ids.d.ts.map +1 -1
  11. package/dist/packages/conversation/blue-ids.js +14 -11
  12. package/dist/packages/conversation/blue-ids.js.map +1 -1
  13. package/dist/packages/conversation/contents/AcceptChangeWorkflow.d.ts +3 -3
  14. package/dist/packages/conversation/contents/AcceptChangeWorkflow.js +3 -3
  15. package/dist/packages/conversation/contents/AcceptChangeWorkflow.js.map +1 -1
  16. package/dist/packages/conversation/contents/ChangeOperation.d.ts +1 -1
  17. package/dist/packages/conversation/contents/ChangeOperation.js +1 -1
  18. package/dist/packages/conversation/contents/ChangeRequest.d.ts +12 -6
  19. package/dist/packages/conversation/contents/ChangeRequest.d.ts.map +1 -1
  20. package/dist/packages/conversation/contents/ChangeRequest.js +12 -6
  21. package/dist/packages/conversation/contents/ChangeRequest.js.map +1 -1
  22. package/dist/packages/conversation/contents/ChangeWorkflow.d.ts +4 -4
  23. package/dist/packages/conversation/contents/ChangeWorkflow.js +4 -4
  24. package/dist/packages/conversation/contents/ChangeWorkflow.js.map +1 -1
  25. package/dist/packages/conversation/contents/ContractsChangePolicy.d.ts +14 -0
  26. package/dist/packages/conversation/contents/ContractsChangePolicy.d.ts.map +1 -0
  27. package/dist/packages/conversation/contents/ContractsChangePolicy.js +14 -0
  28. package/dist/packages/conversation/contents/ContractsChangePolicy.js.map +1 -0
  29. package/dist/packages/conversation/contents/DocumentSection.d.ts +15 -3
  30. package/dist/packages/conversation/contents/DocumentSection.d.ts.map +1 -1
  31. package/dist/packages/conversation/contents/DocumentSection.js +15 -3
  32. package/dist/packages/conversation/contents/DocumentSection.js.map +1 -1
  33. package/dist/packages/conversation/contents/DocumentSectionChangeEntry.d.ts +29 -0
  34. package/dist/packages/conversation/contents/DocumentSectionChangeEntry.d.ts.map +1 -0
  35. package/dist/packages/conversation/contents/DocumentSectionChangeEntry.js +29 -0
  36. package/dist/packages/conversation/contents/DocumentSectionChangeEntry.js.map +1 -0
  37. package/dist/packages/conversation/contents/DocumentSectionChanges.d.ts +32 -0
  38. package/dist/packages/conversation/contents/DocumentSectionChanges.d.ts.map +1 -0
  39. package/dist/packages/conversation/contents/DocumentSectionChanges.js +32 -0
  40. package/dist/packages/conversation/contents/DocumentSectionChanges.js.map +1 -0
  41. package/dist/packages/conversation/contents/JavaScriptCode.d.ts +1 -1
  42. package/dist/packages/conversation/contents/JavaScriptCode.js +1 -1
  43. package/dist/packages/conversation/contents/JavaScriptCode.js.map +1 -1
  44. package/dist/packages/conversation/contents/ProposeChangeOperation.d.ts +1 -1
  45. package/dist/packages/conversation/contents/ProposeChangeOperation.js +1 -1
  46. package/dist/packages/conversation/contents/ProposeChangeWorkflow.d.ts +4 -4
  47. package/dist/packages/conversation/contents/ProposeChangeWorkflow.js +4 -4
  48. package/dist/packages/conversation/contents/ProposeChangeWorkflow.js.map +1 -1
  49. package/dist/packages/conversation/contents/RejectChangeWorkflow.d.ts +3 -3
  50. package/dist/packages/conversation/contents/RejectChangeWorkflow.js +3 -3
  51. package/dist/packages/conversation/contents/TriggerEvent.d.ts +1 -1
  52. package/dist/packages/conversation/contents/TriggerEvent.js +1 -1
  53. package/dist/packages/conversation/contents/TriggerEvent.js.map +1 -1
  54. package/dist/packages/conversation/contents/UpdateDocument.d.ts +1 -1
  55. package/dist/packages/conversation/contents/UpdateDocument.js +1 -1
  56. package/dist/packages/conversation/contents/UpdateDocument.js.map +1 -1
  57. package/dist/packages/conversation/contents/index.d.ts +317 -224
  58. package/dist/packages/conversation/contents/index.d.ts.map +1 -1
  59. package/dist/packages/conversation/contents/index.js +40 -31
  60. package/dist/packages/conversation/contents/index.js.map +1 -1
  61. package/dist/packages/conversation/index.d.ts +2859 -298
  62. package/dist/packages/conversation/index.d.ts.map +1 -1
  63. package/dist/packages/conversation/meta.d.ts +78 -48
  64. package/dist/packages/conversation/meta.d.ts.map +1 -1
  65. package/dist/packages/conversation/meta.js +70 -37
  66. package/dist/packages/conversation/meta.js.map +1 -1
  67. package/dist/packages/conversation/schemas/ChangeOperation.d.ts +436 -5
  68. package/dist/packages/conversation/schemas/ChangeOperation.d.ts.map +1 -1
  69. package/dist/packages/conversation/schemas/ChangeRequest.d.ts +348 -3
  70. package/dist/packages/conversation/schemas/ChangeRequest.d.ts.map +1 -1
  71. package/dist/packages/conversation/schemas/ChangeRequest.js +3 -1
  72. package/dist/packages/conversation/schemas/ChangeRequest.js.map +1 -1
  73. package/dist/packages/conversation/schemas/ChangeWorkflow.d.ts +436 -5
  74. package/dist/packages/conversation/schemas/ChangeWorkflow.d.ts.map +1 -1
  75. package/dist/packages/conversation/schemas/ContractsChangePolicy.d.ts +25 -0
  76. package/dist/packages/conversation/schemas/ContractsChangePolicy.d.ts.map +1 -0
  77. package/dist/packages/conversation/schemas/ContractsChangePolicy.js +10 -0
  78. package/dist/packages/conversation/schemas/ContractsChangePolicy.js.map +1 -0
  79. package/dist/packages/conversation/schemas/DocumentSection.d.ts +6 -0
  80. package/dist/packages/conversation/schemas/DocumentSection.d.ts.map +1 -1
  81. package/dist/packages/conversation/schemas/DocumentSection.js +2 -0
  82. package/dist/packages/conversation/schemas/DocumentSection.js.map +1 -1
  83. package/dist/packages/conversation/schemas/DocumentSectionChangeEntry.d.ts +88 -0
  84. package/dist/packages/conversation/schemas/DocumentSectionChangeEntry.d.ts.map +1 -0
  85. package/dist/packages/conversation/schemas/DocumentSectionChangeEntry.js +13 -0
  86. package/dist/packages/conversation/schemas/DocumentSectionChangeEntry.js.map +1 -0
  87. package/dist/packages/conversation/schemas/DocumentSectionChanges.d.ts +262 -0
  88. package/dist/packages/conversation/schemas/DocumentSectionChanges.d.ts.map +1 -0
  89. package/dist/packages/conversation/schemas/DocumentSectionChanges.js +12 -0
  90. package/dist/packages/conversation/schemas/DocumentSectionChanges.js.map +1 -0
  91. package/dist/packages/conversation/schemas/InformUserAboutPendingAction.d.ts +2 -2
  92. package/dist/packages/conversation/schemas/ProposeChangeOperation.d.ts +436 -5
  93. package/dist/packages/conversation/schemas/ProposeChangeOperation.d.ts.map +1 -1
  94. package/dist/packages/conversation/schemas/ProposeChangeWorkflow.d.ts +436 -5
  95. package/dist/packages/conversation/schemas/ProposeChangeWorkflow.d.ts.map +1 -1
  96. package/dist/packages/conversation/schemas/index.d.ts +2480 -36
  97. package/dist/packages/conversation/schemas/index.d.ts.map +1 -1
  98. package/dist/packages/conversation/schemas/index.js +20 -11
  99. package/dist/packages/conversation/schemas/index.js.map +1 -1
  100. package/dist/packages/myos/blue-ids.d.ts +8 -8
  101. package/dist/packages/myos/blue-ids.js +8 -8
  102. package/dist/packages/myos/contents/ChatGPTConnectorAgent.d.ts +1 -1
  103. package/dist/packages/myos/contents/ChatGPTConnectorAgent.js +1 -1
  104. package/dist/packages/myos/contents/DocumentSessionBootstrap.d.ts +9 -9
  105. package/dist/packages/myos/contents/DocumentSessionBootstrap.js +9 -9
  106. package/dist/packages/myos/contents/LinkedDocumentsPermissionGrantToAccount.d.ts +3 -3
  107. package/dist/packages/myos/contents/LinkedDocumentsPermissionGrantToAccount.js +3 -3
  108. package/dist/packages/myos/contents/LinkedDocumentsPermissionGrantToDocument.d.ts +3 -3
  109. package/dist/packages/myos/contents/LinkedDocumentsPermissionGrantToDocument.js +3 -3
  110. package/dist/packages/myos/contents/MyOSAdminBase.d.ts +1 -1
  111. package/dist/packages/myos/contents/MyOSAdminBase.js +1 -1
  112. package/dist/packages/myos/contents/SingleDocumentPermissionGrantToAccount.d.ts +3 -3
  113. package/dist/packages/myos/contents/SingleDocumentPermissionGrantToAccount.js +3 -3
  114. package/dist/packages/myos/contents/SingleDocumentPermissionGrantToDocument.d.ts +3 -3
  115. package/dist/packages/myos/contents/SingleDocumentPermissionGrantToDocument.js +3 -3
  116. package/dist/packages/myos/contents/WorkerAgencyPermissionGrant.d.ts +3 -3
  117. package/dist/packages/myos/contents/WorkerAgencyPermissionGrant.js +3 -3
  118. package/dist/packages/myos/contents/index.d.ts +585 -585
  119. package/dist/packages/myos/contents/index.d.ts.map +1 -1
  120. package/dist/packages/myos/contents/index.js +24 -24
  121. package/dist/packages/myos/contents/index.js.map +1 -1
  122. package/dist/packages/myos/index.d.ts +688 -688
  123. package/dist/packages/myos/meta.d.ts +37 -37
  124. package/dist/packages/myos/meta.js +29 -29
  125. package/dist/packages/myos/meta.js.map +1 -1
  126. package/dist/packages/myos/schemas/DocumentSessionBootstrap.d.ts +24 -24
  127. package/dist/packages/myos/schemas/LinkedDocumentsPermissionGrantToAccount.d.ts +2 -2
  128. package/dist/packages/myos/schemas/LinkedDocumentsPermissionGrantToDocument.d.ts +2 -2
  129. package/dist/packages/myos/schemas/SingleDocumentPermissionGrantToAccount.d.ts +2 -2
  130. package/dist/packages/myos/schemas/SingleDocumentPermissionGrantToDocument.d.ts +2 -2
  131. package/dist/packages/myos/schemas/index.d.ts +40 -40
  132. package/dist/packages/myos/schemas/index.js +8 -8
  133. package/dist/packages/myos/schemas/index.js.map +1 -1
  134. package/dist/packages/paynote/blue-ids.d.ts +1 -1
  135. package/dist/packages/paynote/blue-ids.js +1 -1
  136. package/dist/packages/paynote/contents/PayNoteDelivery.d.ts +9 -9
  137. package/dist/packages/paynote/contents/PayNoteDelivery.js +9 -9
  138. package/dist/packages/paynote/contents/index.d.ts +18 -18
  139. package/dist/packages/paynote/contents/index.js +3 -3
  140. package/dist/packages/paynote/index.d.ts +38 -38
  141. package/dist/packages/paynote/meta.d.ts +16 -16
  142. package/dist/packages/paynote/meta.js +15 -15
  143. package/dist/packages/paynote/schemas/PayNote.d.ts +4 -4
  144. package/dist/packages/paynote/schemas/index.d.ts +5 -5
  145. package/dist/packages/paynote/schemas/index.js +1 -1
  146. package/dist/repository.d.ts +3655 -1094
  147. package/dist/repository.d.ts.map +1 -1
  148. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  export const DocumentSection = {
2
- description: 'Declarative marker used to document a logical section of a document and link it to relevant fields and contracts. No runtime behavior.\n',
2
+ description: 'Declarative marker that documents a logical section of a document and links it to relevant fields and contracts. Used as the section anchor for sectionChanges.\n',
3
3
  name: 'Document Section',
4
4
  relatedContracts: {
5
- description: 'Contract keys in the same scope that implement/affect the section.',
5
+ description: 'Contract keys in the same scope that implement or affect the section.',
6
6
  itemType: {
7
7
  blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
8
8
  },
@@ -11,7 +11,7 @@ export const DocumentSection = {
11
11
  },
12
12
  },
13
13
  relatedFields: {
14
- description: 'Absolute JSON Pointer paths of fields that belong to this section.',
14
+ description: 'Absolute JSON Pointer paths of fields covered by this section.',
15
15
  itemType: {
16
16
  blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
17
17
  },
@@ -19,6 +19,18 @@ export const DocumentSection = {
19
19
  blueId: '6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY',
20
20
  },
21
21
  },
22
+ summary: {
23
+ description: "Brief functional summary of the section's purpose and behavior.",
24
+ type: {
25
+ blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
26
+ },
27
+ },
28
+ title: {
29
+ description: 'Short, human-readable title shown in UI summaries.',
30
+ type: {
31
+ blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
32
+ },
33
+ },
22
34
  type: {
23
35
  blueId: '7QACj919YMRvFCTELCf6jfQTp41RVhtHdE6bPazLUZQ6',
24
36
  },
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentSection.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/DocumentSection.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW,EACT,0IAA0I;IAC5I,IAAI,EAAE,kBAAkB;IACxB,gBAAgB,EAAE;QAChB,WAAW,EACT,oEAAoE;QACtE,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,aAAa,EAAE;QACb,WAAW,EACT,oEAAoE;QACtE,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
1
+ {"version":3,"file":"DocumentSection.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/DocumentSection.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW,EACT,mKAAmK;IACrK,IAAI,EAAE,kBAAkB;IACxB,gBAAgB,EAAE;QAChB,WAAW,EACT,uEAAuE;QACzE,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,aAAa,EAAE;QACb,WAAW,EACT,gEAAgE;QAClE,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,OAAO,EAAE;QACP,WAAW,EACT,iEAAiE;QACnE,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,KAAK,EAAE;QACL,WAAW,EAAE,oDAAoD;QACjE,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
@@ -0,0 +1,29 @@
1
+ export declare const DocumentSectionChangeEntry: {
2
+ readonly contracts: {
3
+ readonly description: "Map of contractKey -> contract node to add or replace for this section.";
4
+ readonly keyType: {
5
+ readonly blueId: "DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K";
6
+ };
7
+ readonly type: {
8
+ readonly blueId: "G7fBT9PSod1RfHLHkpafAGBDVAJMrMhAMY51ERcyXNrj";
9
+ };
10
+ readonly valueType: {
11
+ readonly blueId: "AERp8BWnuUsjoPciAeNXuUWS9fmqPNMdWbxmKn3tcitx";
12
+ };
13
+ };
14
+ readonly description: "Single section change entry used by sectionChanges.add/modify. The section's relatedContracts should align with the keys provided in contracts.\n";
15
+ readonly name: "Document Section Change Entry";
16
+ readonly section: {
17
+ readonly description: "Document Section contract node; must include type Conversation/Document Section and relatedContracts should list keys in contracts.";
18
+ readonly type: {
19
+ readonly blueId: "JBfupL6eyZsqj7CYbReFaS5ga784SLT8aP8r9W64vbLm";
20
+ };
21
+ };
22
+ readonly sectionKey: {
23
+ readonly description: "Contracts key under /contracts for the Document Section marker.";
24
+ readonly type: {
25
+ readonly blueId: "DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K";
26
+ };
27
+ };
28
+ };
29
+ //# sourceMappingURL=DocumentSectionChangeEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSectionChangeEntry.d.ts","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/DocumentSectionChangeEntry.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B7B,CAAC"}
@@ -0,0 +1,29 @@
1
+ export const DocumentSectionChangeEntry = {
2
+ contracts: {
3
+ description: 'Map of contractKey -> contract node to add or replace for this section.',
4
+ keyType: {
5
+ blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
6
+ },
7
+ type: {
8
+ blueId: 'G7fBT9PSod1RfHLHkpafAGBDVAJMrMhAMY51ERcyXNrj',
9
+ },
10
+ valueType: {
11
+ blueId: 'AERp8BWnuUsjoPciAeNXuUWS9fmqPNMdWbxmKn3tcitx',
12
+ },
13
+ },
14
+ description: "Single section change entry used by sectionChanges.add/modify. The section's relatedContracts should align with the keys provided in contracts.\n",
15
+ name: 'Document Section Change Entry',
16
+ section: {
17
+ description: 'Document Section contract node; must include type Conversation/Document Section and relatedContracts should list keys in contracts.',
18
+ type: {
19
+ blueId: 'JBfupL6eyZsqj7CYbReFaS5ga784SLT8aP8r9W64vbLm',
20
+ },
21
+ },
22
+ sectionKey: {
23
+ description: 'Contracts key under /contracts for the Document Section marker.',
24
+ type: {
25
+ blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
26
+ },
27
+ },
28
+ };
29
+ //# sourceMappingURL=DocumentSectionChangeEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSectionChangeEntry.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/DocumentSectionChangeEntry.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS,EAAE;QACT,WAAW,EACT,yEAAyE;QAC3E,OAAO,EAAE;YACP,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;QACD,SAAS,EAAE;YACT,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,WAAW,EACT,mJAAmJ;IACrJ,IAAI,EAAE,+BAA+B;IACrC,OAAO,EAAE;QACP,WAAW,EACT,qIAAqI;QACvI,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,UAAU,EAAE;QACV,WAAW,EACT,iEAAiE;QACnE,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;CACO,CAAC"}
@@ -0,0 +1,32 @@
1
+ export declare const DocumentSectionChanges: {
2
+ readonly add: {
3
+ readonly description: "New sections to create with their Document Section and contracts.";
4
+ readonly itemType: {
5
+ readonly blueId: "9xv7YjqsSn7W7P8rnUhSpdWGfSrgL4Jt3cmiACJT5VQs";
6
+ };
7
+ readonly type: {
8
+ readonly blueId: "6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY";
9
+ };
10
+ };
11
+ readonly description: "Structured /contracts changes grouped by logical sections, used by change workflows.";
12
+ readonly modify: {
13
+ readonly description: "Existing sections to update with a full contracts map.";
14
+ readonly itemType: {
15
+ readonly blueId: "9xv7YjqsSn7W7P8rnUhSpdWGfSrgL4Jt3cmiACJT5VQs";
16
+ };
17
+ readonly type: {
18
+ readonly blueId: "6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY";
19
+ };
20
+ };
21
+ readonly name: "Document Section Changes";
22
+ readonly remove: {
23
+ readonly description: "Section keys to remove (also removes the section's related contracts).";
24
+ readonly itemType: {
25
+ readonly blueId: "DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K";
26
+ };
27
+ readonly type: {
28
+ readonly blueId: "6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY";
29
+ };
30
+ };
31
+ };
32
+ //# sourceMappingURL=DocumentSectionChanges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSectionChanges.d.ts","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/DocumentSectionChanges.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCzB,CAAC"}
@@ -0,0 +1,32 @@
1
+ export const DocumentSectionChanges = {
2
+ add: {
3
+ description: 'New sections to create with their Document Section and contracts.',
4
+ itemType: {
5
+ blueId: '9xv7YjqsSn7W7P8rnUhSpdWGfSrgL4Jt3cmiACJT5VQs',
6
+ },
7
+ type: {
8
+ blueId: '6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY',
9
+ },
10
+ },
11
+ description: 'Structured /contracts changes grouped by logical sections, used by change workflows.',
12
+ modify: {
13
+ description: 'Existing sections to update with a full contracts map.',
14
+ itemType: {
15
+ blueId: '9xv7YjqsSn7W7P8rnUhSpdWGfSrgL4Jt3cmiACJT5VQs',
16
+ },
17
+ type: {
18
+ blueId: '6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY',
19
+ },
20
+ },
21
+ name: 'Document Section Changes',
22
+ remove: {
23
+ description: "Section keys to remove (also removes the section's related contracts).",
24
+ itemType: {
25
+ blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
26
+ },
27
+ type: {
28
+ blueId: '6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY',
29
+ },
30
+ },
31
+ };
32
+ //# sourceMappingURL=DocumentSectionChanges.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSectionChanges.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/DocumentSectionChanges.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,GAAG,EAAE;QACH,WAAW,EACT,mEAAmE;QACrE,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,WAAW,EACT,sFAAsF;IACxF,MAAM,EAAE;QACN,WAAW,EAAE,wDAAwD;QACrE,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,IAAI,EAAE,0BAA0B;IAChC,MAAM,EAAE;QACN,WAAW,EACT,wEAAwE;QAC1E,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;CACO,CAAC"}
@@ -5,7 +5,7 @@ export declare const JavaScriptCode: {
5
5
  readonly blueId: "DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K";
6
6
  };
7
7
  };
8
- readonly description: "Conversation workflow step that executes provided JavaScript source as part of a sequential workflow.\n- Gas accounting (when & what is charged):\n - Base step charge (once per run of this step): 100 + ceil(bytes(code)/100)\n where bytes(code) is the UTF-8 length of the JavaScript source.\n - Document snapshot reads (via document(<pointer>) inside the code):\n 8 + depth(pointer) + ceil(snapshotBytes/100) per call, where:\n - depth(\"/\") = 0, depth(\"/a/b\") = 2 (number of path segments),\n - snapshotBytes is the canonical JSON size of the retrieved snapshot.\n - Event emissions (if the returned result contains events: [...]):\n 20 + ceil(eventBytes/100) per emitted event, where eventBytes is the\n canonical JSON size of that event. (Delivery/handling of those events may incur\n additional charges elsewhere, outside this step.)\n- JavaScript bindings available to the code:\n - `event`: triggering event rendered via the `'simple'` JSON strategy (plain\n values/arrays, no metadata).\n - `eventCanonical`: triggering event rendered via the `'official'` strategy.\n - `document(pointer?)`: document snapshot (absolute path or scope-relative) rendered\n with the `'simple'` strategy; defaults to `/` when omitted.\n - `document.canonical(pointer?)`: snapshot rendered using the `'official'`\n strategy for canonical metadata.\n - `steps`: results of previously executed steps.\n - `canon.unwrap(canonical, deep=true)`: converts canonical JSON back to plain values.\n - `canon.at(canonical, pointer)`: JSON Pointer navigation helper for canonical\n JSON objects.\n";
8
+ readonly description: "Conversation workflow step that executes provided JavaScript source as part of a sequential workflow.\n- Deterministic JavaScript runtime (QuickJS in Wasm):\n - Only deterministic APIs are available. Date, Math.random, eval/Function,\n Promise/async, RegExp, Proxy, ArrayBuffer/typed arrays, WebAssembly,\n console, JSON.parse/stringify, and Array.prototype.sort are disabled.\n - Values passed into and returned from the VM must be DV-compatible\n (null, boolean, number, string, array, object with string keys).\n- Gas accounting (when and what is charged):\n - JavaScript execution is metered by the QuickJS VM. The VM reports wasm\n fuel used; the processor converts it to host gas with:\n hostGas = ceil(wasmFuel / 1700)\n (calibration factor currently 1700 fuel per host gas unit).\n - Document snapshot reads (via document(<pointer>) inside the code):\n 8 + depth(pointer) + ceil(snapshotBytes/100) per call, where:\n - depth(\"/\") = 0, depth(\"/a/b\") = 2 (number of path segments),\n - snapshotBytes is the canonical JSON size of the retrieved snapshot.\n - Event emissions (if the returned result contains events: [...]):\n 20 + ceil(eventBytes/100) per emitted event, where eventBytes is the\n canonical JSON size of that event. (Delivery/handling of those events may incur\n additional charges elsewhere, outside this step.)\n- JavaScript bindings available to the code:\n - `event`: triggering event rendered via the `'simple'` JSON strategy (plain\n values/arrays, no metadata).\n - `eventCanonical`: triggering event rendered via the `'official'` strategy.\n - `currentContract`: the current handler contract rendered via the `'simple'`\n JSON strategy.\n - `currentContractCanonical`: current handler contract rendered via the\n `'official'` strategy.\n - `document(pointer?)`: document snapshot (absolute path or scope-relative) rendered\n with the `'simple'` strategy; defaults to `/` when omitted.\n - `document.canonical(pointer?)`: snapshot rendered using the `'official'`\n strategy for canonical metadata.\n - `steps`: results of previously executed steps.\n - `canon.unwrap(canonical, deep=true)`: converts canonical JSON back to plain values.\n - `canon.at(canonical, pointer)`: JSON Pointer navigation helper for canonical\n JSON objects.\n";
9
9
  readonly name: "JavaScript Code";
10
10
  readonly type: {
11
11
  readonly blueId: "HYsLiqsqk7t98d5fK6YxKEQGeqBaHNVjM4rRNdxK4yUW";
@@ -5,7 +5,7 @@ export const JavaScriptCode = {
5
5
  blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
6
6
  },
7
7
  },
8
- description: "Conversation workflow step that executes provided JavaScript source as part of a sequential workflow.\n- Gas accounting (when & what is charged):\n - Base step charge (once per run of this step): 100 + ceil(bytes(code)/100)\n where bytes(code) is the UTF-8 length of the JavaScript source.\n - Document snapshot reads (via document(<pointer>) inside the code):\n 8 + depth(pointer) + ceil(snapshotBytes/100) per call, where:\n - depth(\"/\") = 0, depth(\"/a/b\") = 2 (number of path segments),\n - snapshotBytes is the canonical JSON size of the retrieved snapshot.\n - Event emissions (if the returned result contains events: [...]):\n 20 + ceil(eventBytes/100) per emitted event, where eventBytes is the\n canonical JSON size of that event. (Delivery/handling of those events may incur\n additional charges elsewhere, outside this step.)\n- JavaScript bindings available to the code:\n - `event`: triggering event rendered via the `'simple'` JSON strategy (plain\n values/arrays, no metadata).\n - `eventCanonical`: triggering event rendered via the `'official'` strategy.\n - `document(pointer?)`: document snapshot (absolute path or scope-relative) rendered\n with the `'simple'` strategy; defaults to `/` when omitted.\n - `document.canonical(pointer?)`: snapshot rendered using the `'official'`\n strategy for canonical metadata.\n - `steps`: results of previously executed steps.\n - `canon.unwrap(canonical, deep=true)`: converts canonical JSON back to plain values.\n - `canon.at(canonical, pointer)`: JSON Pointer navigation helper for canonical\n JSON objects.\n",
8
+ description: "Conversation workflow step that executes provided JavaScript source as part of a sequential workflow.\n- Deterministic JavaScript runtime (QuickJS in Wasm):\n - Only deterministic APIs are available. Date, Math.random, eval/Function,\n Promise/async, RegExp, Proxy, ArrayBuffer/typed arrays, WebAssembly,\n console, JSON.parse/stringify, and Array.prototype.sort are disabled.\n - Values passed into and returned from the VM must be DV-compatible\n (null, boolean, number, string, array, object with string keys).\n- Gas accounting (when and what is charged):\n - JavaScript execution is metered by the QuickJS VM. The VM reports wasm\n fuel used; the processor converts it to host gas with:\n hostGas = ceil(wasmFuel / 1700)\n (calibration factor currently 1700 fuel per host gas unit).\n - Document snapshot reads (via document(<pointer>) inside the code):\n 8 + depth(pointer) + ceil(snapshotBytes/100) per call, where:\n - depth(\"/\") = 0, depth(\"/a/b\") = 2 (number of path segments),\n - snapshotBytes is the canonical JSON size of the retrieved snapshot.\n - Event emissions (if the returned result contains events: [...]):\n 20 + ceil(eventBytes/100) per emitted event, where eventBytes is the\n canonical JSON size of that event. (Delivery/handling of those events may incur\n additional charges elsewhere, outside this step.)\n- JavaScript bindings available to the code:\n - `event`: triggering event rendered via the `'simple'` JSON strategy (plain\n values/arrays, no metadata).\n - `eventCanonical`: triggering event rendered via the `'official'` strategy.\n - `currentContract`: the current handler contract rendered via the `'simple'`\n JSON strategy.\n - `currentContractCanonical`: current handler contract rendered via the\n `'official'` strategy.\n - `document(pointer?)`: document snapshot (absolute path or scope-relative) rendered\n with the `'simple'` strategy; defaults to `/` when omitted.\n - `document.canonical(pointer?)`: snapshot rendered using the `'official'`\n strategy for canonical metadata.\n - `steps`: results of previously executed steps.\n - `canon.unwrap(canonical, deep=true)`: converts canonical JSON back to plain values.\n - `canon.at(canonical, pointer)`: JSON Pointer navigation helper for canonical\n JSON objects.\n",
9
9
  name: 'JavaScript Code',
10
10
  type: {
11
11
  blueId: 'HYsLiqsqk7t98d5fK6YxKEQGeqBaHNVjM4rRNdxK4yUW',
@@ -1 +1 @@
1
- {"version":3,"file":"JavaScriptCode.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/JavaScriptCode.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE;QACJ,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,WAAW,EACT,goDAAgoD;IACloD,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
1
+ {"version":3,"file":"JavaScriptCode.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/JavaScriptCode.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE;QACJ,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,WAAW,EACT,u2EAAu2E;IACz2E,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
@@ -3,7 +3,7 @@ export declare const ProposeChangeOperation: {
3
3
  readonly name: "Propose Change Operation";
4
4
  readonly request: {
5
5
  readonly type: {
6
- readonly blueId: "Dfdxevr94oumtBfXyFBhx9tawqcFESioqmJxhVJBL5M5";
6
+ readonly blueId: "9KDfK6k1HBAyHckj5VuWXFMLkgY5cJBESKT4eoq1bnrw";
7
7
  };
8
8
  };
9
9
  readonly type: {
@@ -3,7 +3,7 @@ export const ProposeChangeOperation = {
3
3
  name: 'Propose Change Operation',
4
4
  request: {
5
5
  type: {
6
- blueId: 'Dfdxevr94oumtBfXyFBhx9tawqcFESioqmJxhVJBL5M5',
6
+ blueId: '9KDfK6k1HBAyHckj5VuWXFMLkgY5cJBESKT4eoq1bnrw',
7
7
  },
8
8
  },
9
9
  type: {
@@ -10,7 +10,7 @@ export declare const ProposeChangeWorkflow: {
10
10
  readonly request: {
11
11
  readonly description: "Expected request payload for this workflow.";
12
12
  readonly type: {
13
- readonly blueId: "Dfdxevr94oumtBfXyFBhx9tawqcFESioqmJxhVJBL5M5";
13
+ readonly blueId: "9KDfK6k1HBAyHckj5VuWXFMLkgY5cJBESKT4eoq1bnrw";
14
14
  };
15
15
  };
16
16
  readonly steps: {
@@ -19,11 +19,11 @@ export declare const ProposeChangeWorkflow: {
19
19
  readonly type: {
20
20
  readonly blueId: "DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K";
21
21
  };
22
- readonly value: "const issues = [];\n\nconst request = event.message.request || {};\n\nconst proposedChangesetDescription = request.changesetDescription;\nconst proposedChangeset = request.changeset;\n\nif (!proposedChangesetDescription) {\n issues.push('changesetDescription is missing');\n}\n\nif (!proposedChangeset) {\n issues.push('changeset is missing');\n}\n\nif (issues.length > 0) {\n return {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: issues.join('; ')\n }\n ]\n }\n}\n\nconst postfix = currentContract.postfix ?? ''\nconst path = '/proposedChange' + postfix\n\nconst existing = document(path)\nif (existing) {\n return {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: \"Can not propose change when it already exists at \" + path\n }\n ]\n }\n}\n\nreturn {\n changeset: [{\n op: 'add',\n path,\n val: {\n changesetDescription: proposedChangesetDescription,\n changeset: proposedChangeset\n }\n }]\n};\n";
22
+ readonly value: "const issues = [];\n\nconst request = event.message.request || {};\n\nconst changeDescription = request.changeDescription;\nconst rawChangeset = request.changeset;\nconst rawSectionChanges = request.sectionChanges;\nconst requestSectionChanges = rawSectionChanges || {};\n\nconst toText = (value) => {\n const raw = value && value.value ? value.value : value;\n return raw && raw.trim ? raw.trim() : '';\n};\nconst asList = (value) => Array.isArray(value) ? value : [];\nconst hasType = (value) => value && value.type;\nconst escapePointer = (value) => {\n const text = toText(value);\n return text.split('~').join('~0').split('/').join('~1');\n};\nconst requestChangeset = asList(rawChangeset);\n\nconst uniqueKeys = (values, label) => {\n const seen = new Set();\n const output = [];\n for (const value of values) {\n const key = toText(value);\n if (!key) {\n issues.push(label + ' contains invalid key');\n continue;\n }\n if (seen.has(key)) {\n issues.push(label + ' contains duplicate key: ' + key);\n continue;\n }\n seen.add(key);\n output.push(key);\n }\n return output;\n};\n\nconst sameStringSet = (left, right) => {\n if (left.length !== right.length) return false;\n const set = new Set(left);\n if (set.size !== right.length) return false;\n for (const value of right) {\n if (!set.has(value)) return false;\n }\n return true;\n};\n\nconst contracts = Object(document('/contracts') || {});\n\nconst isDocumentSection = (contract) =>\n !!contract && Array.isArray(contract.relatedContracts);\n\nconst isContractsChangePolicy = (contract) => {\n if (!contract) return false;\n return 'requireSectionChanges' in contract;\n};\n\nconst findPolicy = () => {\n for (const key of Object.keys(contracts)) {\n const contract = contracts[key];\n if (isContractsChangePolicy(contract)) {\n return contract;\n }\n }\n return null;\n};\n\nconst policy = findPolicy();\nconst policyEnabled = !!policy && policy.requireSectionChanges !== false;\n\nif (!toText(changeDescription)) {\n issues.push('changeDescription is missing');\n}\n\nconst hasChangeset = !!rawChangeset;\nconst hasSectionChanges = !!rawSectionChanges;\n\nif (!hasChangeset && !hasSectionChanges) {\n issues.push('changeset or sectionChanges is required');\n}\n\nconst isContractsPath = (path) => {\n const value = toText(path);\n return value === '/contracts' || value.startsWith('/contracts/');\n};\nif (policyEnabled && hasChangeset) {\n for (const entry of requestChangeset) {\n if (entry && isContractsPath(entry.path)) {\n issues.push('changeset cannot modify /contracts when Contracts Change Policy is enabled');\n break;\n }\n }\n}\nconst isProposedChangePath = (path) =>\n toText(path).startsWith('/proposedChange');\nif (hasChangeset) {\n for (const entry of requestChangeset) {\n if (entry && isProposedChangePath(entry.path)) {\n issues.push('changeset cannot modify /proposedChange');\n break;\n }\n }\n}\n\nconst existingSections = {};\nfor (const key of Object.keys(contracts)) {\n const contract = contracts[key];\n if (isDocumentSection(contract)) {\n existingSections[key] = contract;\n }\n}\n\nconst contractIndex = {};\nfor (const sectionKey of Object.keys(existingSections)) {\n const section = existingSections[sectionKey];\n const related = asList(section.relatedContracts);\n for (const relatedKey of related) {\n const contractKey = toText(relatedKey);\n if (!contractKey) continue;\n if (contractIndex[contractKey] && contractIndex[contractKey] !== sectionKey) {\n contractIndex[contractKey] = null;\n } else if (!contractIndex[contractKey]) {\n contractIndex[contractKey] = sectionKey;\n }\n }\n}\n\nconst normalizeSectionDefinition = (sectionDef, label) => {\n if (!sectionDef) {\n issues.push(label + ' entry must be an object');\n return null;\n }\n const sectionKey = toText(sectionDef.sectionKey);\n if (!sectionKey) {\n issues.push(label + ' sectionKey is missing');\n return null;\n }\n const section = sectionDef.section;\n if (!section) {\n issues.push(label + ' section is missing');\n return null;\n }\n\n const contractsMap = sectionDef.contracts || {};\n const contractDefs = [];\n const contractKeys = [];\n for (const [rawKey, contract] of Object.entries(contractsMap)) {\n const key = toText(rawKey);\n if (!key) {\n issues.push(label + ' contract key is missing');\n continue;\n }\n if (!contract) {\n issues.push(label + ' contract ' + key + ' is missing or invalid');\n continue;\n }\n if (!hasType(contract)) {\n issues.push(label + ' contract ' + key + ' is missing type');\n }\n contractDefs.push({ key, contract });\n contractKeys.push(key);\n }\n\n if (!hasType(section)) {\n issues.push(label + ' section ' + sectionKey + ' is missing type');\n }\n\n const related = section.relatedContracts\n ? uniqueKeys(asList(section.relatedContracts), label + ' section ' + sectionKey + ' relatedContracts')\n : null;\n if (related && !sameStringSet(related, contractKeys)) {\n issues.push(label + ' section ' + sectionKey + ' relatedContracts must match contracts');\n }\n\n const normalizedRelated = related || contractKeys;\n const normalizedSection = Object.assign({}, section, {\n type: 'Conversation/Document Section',\n relatedContracts: normalizedRelated\n });\n\n return {\n sectionKey,\n section: normalizedSection,\n contractDefs,\n contractKeys\n };\n};\n\nconst sectionChangeset = [];\nconst seenSectionKeys = new Set();\nconst seenContractKeys = new Set();\n\nconst addList = asList(requestSectionChanges.add);\nconst modifyList = asList(requestSectionChanges.modify);\nconst removeList = asList(requestSectionChanges.remove);\n\nfor (const entry of addList) {\n const normalized = normalizeSectionDefinition(entry, 'sectionChanges.add');\n if (!normalized) continue;\n const sectionKey = normalized.sectionKey;\n if (seenSectionKeys.has(sectionKey)) {\n issues.push('section key duplicated in sectionChanges: ' + sectionKey);\n continue;\n }\n seenSectionKeys.add(sectionKey);\n\n if (contracts[sectionKey]) {\n issues.push('section key already exists at /contracts/' + sectionKey);\n }\n\n for (const contractKey of normalized.contractKeys) {\n if (seenContractKeys.has(contractKey)) {\n issues.push('contract key used by multiple sections in request: ' + contractKey);\n continue;\n }\n seenContractKeys.add(contractKey);\n if (contracts[contractKey]) {\n issues.push('contract key already exists at /contracts/' + contractKey);\n }\n }\n\n for (const contractDef of normalized.contractDefs) {\n sectionChangeset.push({\n op: 'add',\n path: '/contracts/' + escapePointer(contractDef.key),\n val: contractDef.contract\n });\n }\n sectionChangeset.push({\n op: 'add',\n path: '/contracts/' + escapePointer(sectionKey),\n val: normalized.section\n });\n}\n\nfor (const entry of modifyList) {\n const normalized = normalizeSectionDefinition(entry, 'sectionChanges.modify');\n if (!normalized) continue;\n const sectionKey = normalized.sectionKey;\n if (seenSectionKeys.has(sectionKey)) {\n issues.push('section key duplicated in sectionChanges: ' + sectionKey);\n continue;\n }\n seenSectionKeys.add(sectionKey);\n\n const existingSection = contracts[sectionKey];\n if (!existingSection) {\n issues.push('section key does not exist at /contracts/' + sectionKey);\n } else if (!isDocumentSection(existingSection)) {\n issues.push('existing section at /contracts/' + sectionKey + ' is not a Document Section');\n }\n\n const existingRelated =\n existingSection && existingSection.relatedContracts\n ? asList(existingSection.relatedContracts)\n : [];\n if (existingSection && !existingSection.relatedContracts) {\n issues.push('existing section ' + sectionKey + ' is missing relatedContracts');\n }\n\n for (const contractKey of normalized.contractKeys) {\n if (seenContractKeys.has(contractKey)) {\n issues.push('contract key used by multiple sections in request: ' + contractKey);\n continue;\n }\n seenContractKeys.add(contractKey);\n if (contractIndex[contractKey] && contractIndex[contractKey] !== sectionKey) {\n issues.push('contract key ' + contractKey + ' is linked to another section');\n }\n }\n\n for (const contractDef of normalized.contractDefs) {\n const op = contracts[contractDef.key] ? 'replace' : 'add';\n sectionChangeset.push({\n op,\n path: '/contracts/' + escapePointer(contractDef.key),\n val: contractDef.contract\n });\n }\n\n const toRemove = uniqueKeys(existingRelated, 'sectionChanges.modify remove list').filter(\n (key) => !normalized.contractKeys.includes(key)\n );\n for (const contractKey of toRemove) {\n if (contractIndex[contractKey] && contractIndex[contractKey] !== sectionKey) {\n issues.push('contract key ' + contractKey + ' is linked to another section');\n continue;\n }\n sectionChangeset.push({\n op: 'remove',\n path: '/contracts/' + escapePointer(contractKey)\n });\n }\n\n sectionChangeset.push({\n op: 'replace',\n path: '/contracts/' + escapePointer(sectionKey),\n val: normalized.section\n });\n}\n\nconst removeKeys = uniqueKeys(removeList, 'sectionChanges.remove');\nfor (const sectionKey of removeKeys) {\n if (seenSectionKeys.has(sectionKey)) {\n issues.push('section key duplicated in sectionChanges: ' + sectionKey);\n continue;\n }\n seenSectionKeys.add(sectionKey);\n\n const existingSection = contracts[sectionKey];\n if (!existingSection) {\n issues.push('section key does not exist at /contracts/' + sectionKey);\n continue;\n }\n if (!isDocumentSection(existingSection)) {\n issues.push('existing section at /contracts/' + sectionKey + ' is not a Document Section');\n continue;\n }\n\n const related = existingSection.relatedContracts\n ? uniqueKeys(asList(existingSection.relatedContracts), 'sectionChanges.remove relatedContracts')\n : [];\n if (!existingSection.relatedContracts) {\n issues.push('existing section ' + sectionKey + ' is missing relatedContracts');\n }\n\n for (const contractKey of related) {\n if (contractIndex[contractKey] && contractIndex[contractKey] !== sectionKey) {\n issues.push('contract key ' + contractKey + ' is linked to another section');\n continue;\n }\n sectionChangeset.push({\n op: 'remove',\n path: '/contracts/' + escapePointer(contractKey)\n });\n }\n sectionChangeset.push({\n op: 'remove',\n path: '/contracts/' + escapePointer(sectionKey)\n });\n}\nconst combinedChangeset = sectionChangeset.concat(hasChangeset ? requestChangeset : []);\n\nif (combinedChangeset.length === 0) {\n issues.push('no changes provided');\n}\n\nif (issues.length > 0) {\n return {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: issues.join('; ')\n }\n ]\n }\n}\n\nconst postfixValue = currentContract.postfix || '';\nconst path = '/proposedChange' + postfixValue;\n\nif (document(path)) {\n return {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: \"Can not propose change when it already exists at \" + path\n }\n ]\n }\n}\n\nconst proposedPayload = {\n changeDescription\n};\n\nproposedPayload.preparedChangeset = combinedChangeset;\n\nif (hasChangeset) {\n proposedPayload.changeset = requestChangeset;\n}\n\nconst hasSectionChangesData = addList.length || modifyList.length || removeList.length;\nif (hasSectionChangesData) {\n proposedPayload.sectionChanges = rawSectionChanges;\n}\n\nreturn {\n changeset: [{\n op: 'add',\n path,\n val: proposedPayload\n }]\n};\n";
23
23
  };
24
24
  readonly name: "Prepare";
25
25
  readonly type: {
26
- readonly blueId: "3hYcmWMtMUPAzXBLFLb7BpuG9537tuTJPCr7pxWXvTZK";
26
+ readonly blueId: "ExZxT61PSpWHpEAtP2WKMXXqxEYN7Z13j7Zv36Dp99kS";
27
27
  };
28
28
  }, {
29
29
  readonly changeset: {
@@ -34,7 +34,7 @@ export declare const ProposeChangeWorkflow: {
34
34
  };
35
35
  readonly name: "Apply";
36
36
  readonly type: {
37
- readonly blueId: "BnnNLCnKF49TUJ1bRfZ5rSMaFw8SVfUNfnE4kJFG7HtM";
37
+ readonly blueId: "FtHZJzH4hqAoGxFBjsmy1svfT4BwEBB4aHpFSZycZLLa";
38
38
  };
39
39
  }];
40
40
  };
@@ -10,7 +10,7 @@ export const ProposeChangeWorkflow = {
10
10
  request: {
11
11
  description: 'Expected request payload for this workflow.',
12
12
  type: {
13
- blueId: 'Dfdxevr94oumtBfXyFBhx9tawqcFESioqmJxhVJBL5M5',
13
+ blueId: '9KDfK6k1HBAyHckj5VuWXFMLkgY5cJBESKT4eoq1bnrw',
14
14
  },
15
15
  },
16
16
  steps: {
@@ -20,11 +20,11 @@ export const ProposeChangeWorkflow = {
20
20
  type: {
21
21
  blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
22
22
  },
23
- value: "const issues = [];\n\nconst request = event.message.request || {};\n\nconst proposedChangesetDescription = request.changesetDescription;\nconst proposedChangeset = request.changeset;\n\nif (!proposedChangesetDescription) {\n issues.push('changesetDescription is missing');\n}\n\nif (!proposedChangeset) {\n issues.push('changeset is missing');\n}\n\nif (issues.length > 0) {\n return {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: issues.join('; ')\n }\n ]\n }\n}\n\nconst postfix = currentContract.postfix ?? ''\nconst path = '/proposedChange' + postfix\n\nconst existing = document(path)\nif (existing) {\n return {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: \"Can not propose change when it already exists at \" + path\n }\n ]\n }\n}\n\nreturn {\n changeset: [{\n op: 'add',\n path,\n val: {\n changesetDescription: proposedChangesetDescription,\n changeset: proposedChangeset\n }\n }]\n};\n",
23
+ value: "const issues = [];\n\nconst request = event.message.request || {};\n\nconst changeDescription = request.changeDescription;\nconst rawChangeset = request.changeset;\nconst rawSectionChanges = request.sectionChanges;\nconst requestSectionChanges = rawSectionChanges || {};\n\nconst toText = (value) => {\n const raw = value && value.value ? value.value : value;\n return raw && raw.trim ? raw.trim() : '';\n};\nconst asList = (value) => Array.isArray(value) ? value : [];\nconst hasType = (value) => value && value.type;\nconst escapePointer = (value) => {\n const text = toText(value);\n return text.split('~').join('~0').split('/').join('~1');\n};\nconst requestChangeset = asList(rawChangeset);\n\nconst uniqueKeys = (values, label) => {\n const seen = new Set();\n const output = [];\n for (const value of values) {\n const key = toText(value);\n if (!key) {\n issues.push(label + ' contains invalid key');\n continue;\n }\n if (seen.has(key)) {\n issues.push(label + ' contains duplicate key: ' + key);\n continue;\n }\n seen.add(key);\n output.push(key);\n }\n return output;\n};\n\nconst sameStringSet = (left, right) => {\n if (left.length !== right.length) return false;\n const set = new Set(left);\n if (set.size !== right.length) return false;\n for (const value of right) {\n if (!set.has(value)) return false;\n }\n return true;\n};\n\nconst contracts = Object(document('/contracts') || {});\n\nconst isDocumentSection = (contract) =>\n !!contract && Array.isArray(contract.relatedContracts);\n\nconst isContractsChangePolicy = (contract) => {\n if (!contract) return false;\n return 'requireSectionChanges' in contract;\n};\n\nconst findPolicy = () => {\n for (const key of Object.keys(contracts)) {\n const contract = contracts[key];\n if (isContractsChangePolicy(contract)) {\n return contract;\n }\n }\n return null;\n};\n\nconst policy = findPolicy();\nconst policyEnabled = !!policy && policy.requireSectionChanges !== false;\n\nif (!toText(changeDescription)) {\n issues.push('changeDescription is missing');\n}\n\nconst hasChangeset = !!rawChangeset;\nconst hasSectionChanges = !!rawSectionChanges;\n\nif (!hasChangeset && !hasSectionChanges) {\n issues.push('changeset or sectionChanges is required');\n}\n\nconst isContractsPath = (path) => {\n const value = toText(path);\n return value === '/contracts' || value.startsWith('/contracts/');\n};\nif (policyEnabled && hasChangeset) {\n for (const entry of requestChangeset) {\n if (entry && isContractsPath(entry.path)) {\n issues.push('changeset cannot modify /contracts when Contracts Change Policy is enabled');\n break;\n }\n }\n}\nconst isProposedChangePath = (path) =>\n toText(path).startsWith('/proposedChange');\nif (hasChangeset) {\n for (const entry of requestChangeset) {\n if (entry && isProposedChangePath(entry.path)) {\n issues.push('changeset cannot modify /proposedChange');\n break;\n }\n }\n}\n\nconst existingSections = {};\nfor (const key of Object.keys(contracts)) {\n const contract = contracts[key];\n if (isDocumentSection(contract)) {\n existingSections[key] = contract;\n }\n}\n\nconst contractIndex = {};\nfor (const sectionKey of Object.keys(existingSections)) {\n const section = existingSections[sectionKey];\n const related = asList(section.relatedContracts);\n for (const relatedKey of related) {\n const contractKey = toText(relatedKey);\n if (!contractKey) continue;\n if (contractIndex[contractKey] && contractIndex[contractKey] !== sectionKey) {\n contractIndex[contractKey] = null;\n } else if (!contractIndex[contractKey]) {\n contractIndex[contractKey] = sectionKey;\n }\n }\n}\n\nconst normalizeSectionDefinition = (sectionDef, label) => {\n if (!sectionDef) {\n issues.push(label + ' entry must be an object');\n return null;\n }\n const sectionKey = toText(sectionDef.sectionKey);\n if (!sectionKey) {\n issues.push(label + ' sectionKey is missing');\n return null;\n }\n const section = sectionDef.section;\n if (!section) {\n issues.push(label + ' section is missing');\n return null;\n }\n\n const contractsMap = sectionDef.contracts || {};\n const contractDefs = [];\n const contractKeys = [];\n for (const [rawKey, contract] of Object.entries(contractsMap)) {\n const key = toText(rawKey);\n if (!key) {\n issues.push(label + ' contract key is missing');\n continue;\n }\n if (!contract) {\n issues.push(label + ' contract ' + key + ' is missing or invalid');\n continue;\n }\n if (!hasType(contract)) {\n issues.push(label + ' contract ' + key + ' is missing type');\n }\n contractDefs.push({ key, contract });\n contractKeys.push(key);\n }\n\n if (!hasType(section)) {\n issues.push(label + ' section ' + sectionKey + ' is missing type');\n }\n\n const related = section.relatedContracts\n ? uniqueKeys(asList(section.relatedContracts), label + ' section ' + sectionKey + ' relatedContracts')\n : null;\n if (related && !sameStringSet(related, contractKeys)) {\n issues.push(label + ' section ' + sectionKey + ' relatedContracts must match contracts');\n }\n\n const normalizedRelated = related || contractKeys;\n const normalizedSection = Object.assign({}, section, {\n type: 'Conversation/Document Section',\n relatedContracts: normalizedRelated\n });\n\n return {\n sectionKey,\n section: normalizedSection,\n contractDefs,\n contractKeys\n };\n};\n\nconst sectionChangeset = [];\nconst seenSectionKeys = new Set();\nconst seenContractKeys = new Set();\n\nconst addList = asList(requestSectionChanges.add);\nconst modifyList = asList(requestSectionChanges.modify);\nconst removeList = asList(requestSectionChanges.remove);\n\nfor (const entry of addList) {\n const normalized = normalizeSectionDefinition(entry, 'sectionChanges.add');\n if (!normalized) continue;\n const sectionKey = normalized.sectionKey;\n if (seenSectionKeys.has(sectionKey)) {\n issues.push('section key duplicated in sectionChanges: ' + sectionKey);\n continue;\n }\n seenSectionKeys.add(sectionKey);\n\n if (contracts[sectionKey]) {\n issues.push('section key already exists at /contracts/' + sectionKey);\n }\n\n for (const contractKey of normalized.contractKeys) {\n if (seenContractKeys.has(contractKey)) {\n issues.push('contract key used by multiple sections in request: ' + contractKey);\n continue;\n }\n seenContractKeys.add(contractKey);\n if (contracts[contractKey]) {\n issues.push('contract key already exists at /contracts/' + contractKey);\n }\n }\n\n for (const contractDef of normalized.contractDefs) {\n sectionChangeset.push({\n op: 'add',\n path: '/contracts/' + escapePointer(contractDef.key),\n val: contractDef.contract\n });\n }\n sectionChangeset.push({\n op: 'add',\n path: '/contracts/' + escapePointer(sectionKey),\n val: normalized.section\n });\n}\n\nfor (const entry of modifyList) {\n const normalized = normalizeSectionDefinition(entry, 'sectionChanges.modify');\n if (!normalized) continue;\n const sectionKey = normalized.sectionKey;\n if (seenSectionKeys.has(sectionKey)) {\n issues.push('section key duplicated in sectionChanges: ' + sectionKey);\n continue;\n }\n seenSectionKeys.add(sectionKey);\n\n const existingSection = contracts[sectionKey];\n if (!existingSection) {\n issues.push('section key does not exist at /contracts/' + sectionKey);\n } else if (!isDocumentSection(existingSection)) {\n issues.push('existing section at /contracts/' + sectionKey + ' is not a Document Section');\n }\n\n const existingRelated =\n existingSection && existingSection.relatedContracts\n ? asList(existingSection.relatedContracts)\n : [];\n if (existingSection && !existingSection.relatedContracts) {\n issues.push('existing section ' + sectionKey + ' is missing relatedContracts');\n }\n\n for (const contractKey of normalized.contractKeys) {\n if (seenContractKeys.has(contractKey)) {\n issues.push('contract key used by multiple sections in request: ' + contractKey);\n continue;\n }\n seenContractKeys.add(contractKey);\n if (contractIndex[contractKey] && contractIndex[contractKey] !== sectionKey) {\n issues.push('contract key ' + contractKey + ' is linked to another section');\n }\n }\n\n for (const contractDef of normalized.contractDefs) {\n const op = contracts[contractDef.key] ? 'replace' : 'add';\n sectionChangeset.push({\n op,\n path: '/contracts/' + escapePointer(contractDef.key),\n val: contractDef.contract\n });\n }\n\n const toRemove = uniqueKeys(existingRelated, 'sectionChanges.modify remove list').filter(\n (key) => !normalized.contractKeys.includes(key)\n );\n for (const contractKey of toRemove) {\n if (contractIndex[contractKey] && contractIndex[contractKey] !== sectionKey) {\n issues.push('contract key ' + contractKey + ' is linked to another section');\n continue;\n }\n sectionChangeset.push({\n op: 'remove',\n path: '/contracts/' + escapePointer(contractKey)\n });\n }\n\n sectionChangeset.push({\n op: 'replace',\n path: '/contracts/' + escapePointer(sectionKey),\n val: normalized.section\n });\n}\n\nconst removeKeys = uniqueKeys(removeList, 'sectionChanges.remove');\nfor (const sectionKey of removeKeys) {\n if (seenSectionKeys.has(sectionKey)) {\n issues.push('section key duplicated in sectionChanges: ' + sectionKey);\n continue;\n }\n seenSectionKeys.add(sectionKey);\n\n const existingSection = contracts[sectionKey];\n if (!existingSection) {\n issues.push('section key does not exist at /contracts/' + sectionKey);\n continue;\n }\n if (!isDocumentSection(existingSection)) {\n issues.push('existing section at /contracts/' + sectionKey + ' is not a Document Section');\n continue;\n }\n\n const related = existingSection.relatedContracts\n ? uniqueKeys(asList(existingSection.relatedContracts), 'sectionChanges.remove relatedContracts')\n : [];\n if (!existingSection.relatedContracts) {\n issues.push('existing section ' + sectionKey + ' is missing relatedContracts');\n }\n\n for (const contractKey of related) {\n if (contractIndex[contractKey] && contractIndex[contractKey] !== sectionKey) {\n issues.push('contract key ' + contractKey + ' is linked to another section');\n continue;\n }\n sectionChangeset.push({\n op: 'remove',\n path: '/contracts/' + escapePointer(contractKey)\n });\n }\n sectionChangeset.push({\n op: 'remove',\n path: '/contracts/' + escapePointer(sectionKey)\n });\n}\nconst combinedChangeset = sectionChangeset.concat(hasChangeset ? requestChangeset : []);\n\nif (combinedChangeset.length === 0) {\n issues.push('no changes provided');\n}\n\nif (issues.length > 0) {\n return {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: issues.join('; ')\n }\n ]\n }\n}\n\nconst postfixValue = currentContract.postfix || '';\nconst path = '/proposedChange' + postfixValue;\n\nif (document(path)) {\n return {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: \"Can not propose change when it already exists at \" + path\n }\n ]\n }\n}\n\nconst proposedPayload = {\n changeDescription\n};\n\nproposedPayload.preparedChangeset = combinedChangeset;\n\nif (hasChangeset) {\n proposedPayload.changeset = requestChangeset;\n}\n\nconst hasSectionChangesData = addList.length || modifyList.length || removeList.length;\nif (hasSectionChangesData) {\n proposedPayload.sectionChanges = rawSectionChanges;\n}\n\nreturn {\n changeset: [{\n op: 'add',\n path,\n val: proposedPayload\n }]\n};\n",
24
24
  },
25
25
  name: 'Prepare',
26
26
  type: {
27
- blueId: '3hYcmWMtMUPAzXBLFLb7BpuG9537tuTJPCr7pxWXvTZK',
27
+ blueId: 'ExZxT61PSpWHpEAtP2WKMXXqxEYN7Z13j7Zv36Dp99kS',
28
28
  },
29
29
  },
30
30
  {
@@ -36,7 +36,7 @@ export const ProposeChangeWorkflow = {
36
36
  },
37
37
  name: 'Apply',
38
38
  type: {
39
- blueId: 'BnnNLCnKF49TUJ1bRfZ5rSMaFw8SVfUNfnE4kJFG7HtM',
39
+ blueId: 'FtHZJzH4hqAoGxFBjsmy1svfT4BwEBB4aHpFSZycZLLa',
40
40
  },
41
41
  },
42
42
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"ProposeChangeWorkflow.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/ProposeChangeWorkflow.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,WAAW,EAAE,0DAA0D;IACvE,IAAI,EAAE,yBAAyB;IAC/B,OAAO,EAAE;QACP,WAAW,EACT,iEAAiE;QACnE,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,OAAO,EAAE;QACP,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL;gBACE,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ,MAAM,EAAE,8CAA8C;qBACvD;oBACD,KAAK,EACH,kkCAAkkC;iBACrkC;gBACD,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE;oBACJ,MAAM,EAAE,8CAA8C;iBACvD;aACF;YACD;gBACE,SAAS,EAAE;oBACT,IAAI,EAAE;wBACJ,MAAM,EAAE,8CAA8C;qBACvD;oBACD,KAAK,EAAE,4BAA4B;iBACpC;gBACD,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE;oBACJ,MAAM,EAAE,8CAA8C;iBACvD;aACF;SACF;KACF;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
1
+ {"version":3,"file":"ProposeChangeWorkflow.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/ProposeChangeWorkflow.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,WAAW,EAAE,0DAA0D;IACvE,IAAI,EAAE,yBAAyB;IAC/B,OAAO,EAAE;QACP,WAAW,EACT,iEAAiE;QACnE,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,OAAO,EAAE;QACP,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL;gBACE,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ,MAAM,EAAE,8CAA8C;qBACvD;oBACD,KAAK,EACH,sqXAAsqX;iBACzqX;gBACD,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE;oBACJ,MAAM,EAAE,8CAA8C;iBACvD;aACF;YACD;gBACE,SAAS,EAAE;oBACT,IAAI,EAAE;wBACJ,MAAM,EAAE,8CAA8C;qBACvD;oBACD,KAAK,EAAE,4BAA4B;iBACpC;gBACD,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE;oBACJ,MAAM,EAAE,8CAA8C;iBACvD;aACF;SACF;KACF;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
@@ -13,11 +13,11 @@ export declare const RejectChangeWorkflow: {
13
13
  readonly type: {
14
14
  readonly blueId: "DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K";
15
15
  };
16
- readonly value: "const postfix = currentContract.postfix ?? ''\nconst path = '/proposedChange' + postfix\n\nconst proposedChange = document(path)\nif (proposedChange) {\n return {\n changeset: [{ op: 'remove', path }]\n }\n}\n\nreturn {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: \"Proposed change does not exist at \" + path\n }\n ]\n};\n";
16
+ readonly value: "const postfix = currentContract.postfix || ''\nconst path = '/proposedChange' + postfix\n\nconst proposedChange = document(path)\nif (proposedChange) {\n return {\n changeset: [{ op: 'remove', path }]\n }\n}\n\nreturn {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: \"Proposed change does not exist at \" + path\n }\n ]\n};\n";
17
17
  };
18
18
  readonly name: "Prepare";
19
19
  readonly type: {
20
- readonly blueId: "3hYcmWMtMUPAzXBLFLb7BpuG9537tuTJPCr7pxWXvTZK";
20
+ readonly blueId: "ExZxT61PSpWHpEAtP2WKMXXqxEYN7Z13j7Zv36Dp99kS";
21
21
  };
22
22
  }, {
23
23
  readonly changeset: {
@@ -28,7 +28,7 @@ export declare const RejectChangeWorkflow: {
28
28
  };
29
29
  readonly name: "Apply";
30
30
  readonly type: {
31
- readonly blueId: "BnnNLCnKF49TUJ1bRfZ5rSMaFw8SVfUNfnE4kJFG7HtM";
31
+ readonly blueId: "FtHZJzH4hqAoGxFBjsmy1svfT4BwEBB4aHpFSZycZLLa";
32
32
  };
33
33
  }];
34
34
  };
@@ -14,11 +14,11 @@ export const RejectChangeWorkflow = {
14
14
  type: {
15
15
  blueId: 'DLRQwz7MQeCrzjy9bohPNwtCxKEBbKaMK65KBrwjfG6K',
16
16
  },
17
- value: "const postfix = currentContract.postfix ?? ''\nconst path = '/proposedChange' + postfix\n\nconst proposedChange = document(path)\nif (proposedChange) {\n return {\n changeset: [{ op: 'remove', path }]\n }\n}\n\nreturn {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: \"Proposed change does not exist at \" + path\n }\n ]\n};\n",
17
+ value: "const postfix = currentContract.postfix || ''\nconst path = '/proposedChange' + postfix\n\nconst proposedChange = document(path)\nif (proposedChange) {\n return {\n changeset: [{ op: 'remove', path }]\n }\n}\n\nreturn {\n changeset: [],\n events: [\n {\n type: \"Conversation/Proposed Change Invalid\",\n reason: \"Proposed change does not exist at \" + path\n }\n ]\n};\n",
18
18
  },
19
19
  name: 'Prepare',
20
20
  type: {
21
- blueId: '3hYcmWMtMUPAzXBLFLb7BpuG9537tuTJPCr7pxWXvTZK',
21
+ blueId: 'ExZxT61PSpWHpEAtP2WKMXXqxEYN7Z13j7Zv36Dp99kS',
22
22
  },
23
23
  },
24
24
  {
@@ -30,7 +30,7 @@ export const RejectChangeWorkflow = {
30
30
  },
31
31
  name: 'Apply',
32
32
  type: {
33
- blueId: 'BnnNLCnKF49TUJ1bRfZ5rSMaFw8SVfUNfnE4kJFG7HtM',
33
+ blueId: 'FtHZJzH4hqAoGxFBjsmy1svfT4BwEBB4aHpFSZycZLLa',
34
34
  },
35
35
  },
36
36
  ],
@@ -1,5 +1,5 @@
1
1
  export declare const TriggerEvent: {
2
- readonly description: "Conversation workflow step that enqueues an event as part of the workflow.\n- Gas accounting (when & what is charged):\n - Base step charge (once per run of this step): 30.\n - Expression/template resolution under \"/event\" (if present):\n - For each standalone expression ${…}: 5 + ceil(bytes(expr)/100).\n - For each template string containing one or more ${…} placeholders:\n 3 × placeholderCount + ceil(bytes(template)/100).\n - Any document(<pointer>) used inside expressions/templates charges\n per call: 8 + depth(pointer) + ceil(snapshotBytes/100).\n - Event emission (enqueue): 20 + ceil(eventBytes/100) for the final event\n payload after expression resolution.\n";
2
+ readonly description: "Conversation workflow step that enqueues an event as part of the workflow.\n- Gas accounting (when and what is charged):\n - Base step charge (once per run of this step): 30.\n - Expression/template resolution under \"/event\" (if present):\n - Expressions run in the deterministic QuickJS VM (same sandbox and\n bindings as the JavaScript Code step).\n - VM gas is converted to host gas as:\n hostGas = ceil(wasmFuel / 1700)\n (calibration factor currently 1700 fuel per host gas unit).\n - Any document(<pointer>) used inside expressions/templates charges\n per call: 8 + depth(pointer) + ceil(snapshotBytes/100).\n - Event emission (enqueue): 20 + ceil(eventBytes/100) for the final event\n payload after expression resolution.\n";
3
3
  readonly event: {
4
4
  readonly description: "The event payload to enqueue (any Blue node).";
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export const TriggerEvent = {
2
- description: 'Conversation workflow step that enqueues an event as part of the workflow.\n- Gas accounting (when & what is charged):\n - Base step charge (once per run of this step): 30.\n - Expression/template resolution under "/event" (if present):\n - For each standalone expression ${…}: 5 + ceil(bytes(expr)/100).\n - For each template string containing one or more ${…} placeholders:\n 3 × placeholderCount + ceil(bytes(template)/100).\n - Any document(<pointer>) used inside expressions/templates charges\n per call: 8 + depth(pointer) + ceil(snapshotBytes/100).\n - Event emission (enqueue): 20 + ceil(eventBytes/100) for the final event\n payload after expression resolution.\n',
2
+ description: 'Conversation workflow step that enqueues an event as part of the workflow.\n- Gas accounting (when and what is charged):\n - Base step charge (once per run of this step): 30.\n - Expression/template resolution under "/event" (if present):\n - Expressions run in the deterministic QuickJS VM (same sandbox and\n bindings as the JavaScript Code step).\n - VM gas is converted to host gas as:\n hostGas = ceil(wasmFuel / 1700)\n (calibration factor currently 1700 fuel per host gas unit).\n - Any document(<pointer>) used inside expressions/templates charges\n per call: 8 + depth(pointer) + ceil(snapshotBytes/100).\n - Event emission (enqueue): 20 + ceil(eventBytes/100) for the final event\n payload after expression resolution.\n',
3
3
  event: {
4
4
  description: 'The event payload to enqueue (any Blue node).',
5
5
  },
@@ -1 +1 @@
1
- {"version":3,"file":"TriggerEvent.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/TriggerEvent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,WAAW,EACT,utBAAutB;IACztB,KAAK,EAAE;QACL,WAAW,EAAE,+CAA+C;KAC7D;IACD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
1
+ {"version":3,"file":"TriggerEvent.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/TriggerEvent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,WAAW,EACT,myBAAmyB;IACryB,KAAK,EAAE;QACL,WAAW,EAAE,+CAA+C;KAC7D;IACD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
@@ -7,7 +7,7 @@ export declare const UpdateDocument: {
7
7
  readonly blueId: "6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY";
8
8
  };
9
9
  };
10
- readonly description: "Updates the document with the provided changeset.\n- Gas accounting (when & what is charged):\n - Base step charge (once per run of this step): 40 + 5 × changesetLength.\n - Expression/template resolution under \"/changeset/**\" (if present):\n - For each standalone expression ${…}: 5 + ceil(bytes(expr)/100).\n - For each template string containing one or more ${…} placeholders:\n 3 × placeholderCount + ceil(bytes(template)/100).\n - Any document(<pointer>) used inside expressions/templates charges\n per call: 8 + depth(pointer) + ceil(snapshotBytes/100).\n - Per change (applied in order after boundary validation):\n - Boundary check: 2.\n - Operation charge:\n - add or replace: 20 + ceil(valueBytes/100) (valueBytes is the\n canonical JSON size of val).\n - remove: 10.\n - Cascade routing (Document Update delivery):\n 10 × N, where N is the number of scopes that receive the resulting\n Document Update (origin scope and each participating ancestor up to root).\n";
10
+ readonly description: "Updates the document with the provided changeset.\n- Gas accounting (when and what is charged):\n - Base step charge (once per run of this step): 40 + 5 * changesetLength.\n - Expression/template resolution under \"/changeset/**\" (if present):\n - Expressions run in the deterministic QuickJS VM (same sandbox and\n bindings as the JavaScript Code step).\n - VM gas is converted to host gas as:\n hostGas = ceil(wasmFuel / 1700)\n (calibration factor currently 1700 fuel per host gas unit).\n - Any document(<pointer>) used inside expressions/templates charges\n per call: 8 + depth(pointer) + ceil(snapshotBytes/100).\n - Per change (applied in order after boundary validation):\n - Boundary check: 2.\n - Operation charge:\n - add or replace: 20 + ceil(valueBytes/100) (valueBytes is the\n canonical JSON size of val).\n - remove: 10.\n - Cascade routing (Document Update delivery):\n 10 * N, where N is the number of scopes that receive the resulting\n Document Update (origin scope and each participating ancestor up to root).\n";
11
11
  readonly name: "Update Document";
12
12
  readonly type: {
13
13
  readonly blueId: "HYsLiqsqk7t98d5fK6YxKEQGeqBaHNVjM4rRNdxK4yUW";
@@ -7,7 +7,7 @@ export const UpdateDocument = {
7
7
  blueId: '6aehfNAxHLC1PHHoDr3tYtFH3RWNbiWdFancJ1bypXEY',
8
8
  },
9
9
  },
10
- description: 'Updates the document with the provided changeset.\n- Gas accounting (when & what is charged):\n - Base step charge (once per run of this step): 40 + 5 × changesetLength.\n - Expression/template resolution under "/changeset/**" (if present):\n - For each standalone expression ${…}: 5 + ceil(bytes(expr)/100).\n - For each template string containing one or more ${…} placeholders:\n 3 × placeholderCount + ceil(bytes(template)/100).\n - Any document(<pointer>) used inside expressions/templates charges\n per call: 8 + depth(pointer) + ceil(snapshotBytes/100).\n - Per change (applied in order after boundary validation):\n - Boundary check: 2.\n - Operation charge:\n - add or replace: 20 + ceil(valueBytes/100) (valueBytes is the\n canonical JSON size of val).\n - remove: 10.\n - Cascade routing (Document Update delivery):\n 10 × N, where N is the number of scopes that receive the resulting\n Document Update (origin scope and each participating ancestor up to root).\n',
10
+ description: 'Updates the document with the provided changeset.\n- Gas accounting (when and what is charged):\n - Base step charge (once per run of this step): 40 + 5 * changesetLength.\n - Expression/template resolution under "/changeset/**" (if present):\n - Expressions run in the deterministic QuickJS VM (same sandbox and\n bindings as the JavaScript Code step).\n - VM gas is converted to host gas as:\n hostGas = ceil(wasmFuel / 1700)\n (calibration factor currently 1700 fuel per host gas unit).\n - Any document(<pointer>) used inside expressions/templates charges\n per call: 8 + depth(pointer) + ceil(snapshotBytes/100).\n - Per change (applied in order after boundary validation):\n - Boundary check: 2.\n - Operation charge:\n - add or replace: 20 + ceil(valueBytes/100) (valueBytes is the\n canonical JSON size of val).\n - remove: 10.\n - Cascade routing (Document Update delivery):\n 10 * N, where N is the number of scopes that receive the resulting\n Document Update (origin scope and each participating ancestor up to root).\n',
11
11
  name: 'Update Document',
12
12
  type: {
13
13
  blueId: 'HYsLiqsqk7t98d5fK6YxKEQGeqBaHNVjM4rRNdxK4yUW',
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateDocument.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/UpdateDocument.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE;QACT,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,WAAW,EACT,ykCAAykC;IAC3kC,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}
1
+ {"version":3,"file":"UpdateDocument.js","sourceRoot":"","sources":["../../../../src/packages/conversation/contents/UpdateDocument.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE;QACT,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,8CAA8C;SACvD;KACF;IACD,WAAW,EACT,qpCAAqpC;IACvpC,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,MAAM,EAAE,8CAA8C;KACvD;CACO,CAAC"}