@lilaquadrat/studio 10.0.0-beta.5 → 10.0.0-beta.51

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 (212) hide show
  1. package/eslint.config.js +146 -0
  2. package/lib/fastify-plugins.d.ts +4 -0
  3. package/lib/fastify-plugins.js +5 -0
  4. package/lib/fastify-plugins.js.map +1 -0
  5. package/lib/helpers.d.ts +4 -2
  6. package/lib/helpers.js +13 -2
  7. package/lib/helpers.js.map +1 -1
  8. package/lib/main.d.ts +1 -3
  9. package/lib/main.js +7 -3
  10. package/lib/main.js.map +1 -1
  11. package/lib/models.d.ts +4 -4
  12. package/lib/models.js +4 -4
  13. package/lib/models.js.map +1 -1
  14. package/lib/services.d.ts +5 -8
  15. package/lib/services.js +27 -9
  16. package/lib/services.js.map +1 -1
  17. package/lib/src/Immutable.class.d.ts +8 -1
  18. package/lib/src/Immutable.class.js +52 -8
  19. package/lib/src/Immutable.class.js.map +1 -1
  20. package/lib/src/ShareClientFactory.class.d.ts +1 -3
  21. package/lib/src/ShareClientFactory.class.js +1 -9
  22. package/lib/src/ShareClientFactory.class.js.map +1 -1
  23. package/lib/src/classes/models.class.js.map +1 -1
  24. package/lib/src/classes/modelv2.class.d.ts +2 -0
  25. package/lib/src/classes/modelv2.class.js +1 -1
  26. package/lib/src/classes/modelv2.class.js.map +1 -1
  27. package/lib/src/classes/mongo.class.js +4 -14
  28. package/lib/src/classes/mongo.class.js.map +1 -1
  29. package/lib/src/functions/handleError.d.ts +2 -3
  30. package/lib/src/functions/handleError.js +3 -16
  31. package/lib/src/functions/handleError.js.map +1 -1
  32. package/lib/src/functions/optionsHelper.d.ts +4 -4
  33. package/lib/src/functions/optionsHelper.js +5 -4
  34. package/lib/src/functions/optionsHelper.js.map +1 -1
  35. package/lib/src/functions/respondCode.d.ts +2 -1
  36. package/lib/src/functions/respondCode.js +1 -1
  37. package/lib/src/functions/respondCode.js.map +1 -1
  38. package/lib/src/helpers/ControllerHelper.d.ts +73 -0
  39. package/lib/src/helpers/ControllerHelper.js +242 -0
  40. package/lib/src/helpers/ControllerHelper.js.map +1 -0
  41. package/lib/src/helpers/EnvMapper.d.ts +0 -0
  42. package/lib/src/helpers/EnvMapper.js +1 -0
  43. package/lib/src/helpers/EnvMapper.js.map +1 -0
  44. package/lib/src/helpers/auth0config.d.ts +6 -0
  45. package/lib/src/helpers/auth0config.js +23 -0
  46. package/lib/src/helpers/auth0config.js.map +1 -0
  47. package/lib/src/helpers/authPlugin.d.ts +29 -0
  48. package/lib/src/helpers/authPlugin.js +77 -0
  49. package/lib/src/helpers/authPlugin.js.map +1 -0
  50. package/lib/src/helpers/cacheHelper.d.ts +69 -0
  51. package/lib/src/helpers/cacheHelper.js +235 -0
  52. package/lib/src/helpers/cacheHelper.js.map +1 -0
  53. package/lib/src/helpers/createSasToken.d.ts +0 -2
  54. package/lib/src/helpers/createSasToken.js +35 -32
  55. package/lib/src/helpers/createSasToken.js.map +1 -1
  56. package/lib/src/helpers/getSecrets.d.ts +1 -1
  57. package/lib/src/helpers/getSecrets.js +10 -12
  58. package/lib/src/helpers/getSecrets.js.map +1 -1
  59. package/lib/src/helpers/queryAssertionPlugin.d.ts +3 -0
  60. package/lib/src/helpers/queryAssertionPlugin.js +20 -0
  61. package/lib/src/helpers/queryAssertionPlugin.js.map +1 -0
  62. package/lib/src/helpers/safeObjectId.d.ts +1 -1
  63. package/lib/src/helpers/safeObjectId.js +5 -1
  64. package/lib/src/helpers/safeObjectId.js.map +1 -1
  65. package/lib/src/helpers/storageSdkFactory.d.ts +2 -0
  66. package/lib/src/helpers/storageSdkFactory.js +11 -0
  67. package/lib/src/helpers/storageSdkFactory.js.map +1 -0
  68. package/lib/src/helpers/studioAppPlugin.d.ts +3 -0
  69. package/lib/src/helpers/studioAppPlugin.js +16 -0
  70. package/lib/src/helpers/studioAppPlugin.js.map +1 -0
  71. package/lib/src/logger.js +154 -32
  72. package/lib/src/logger.js.map +1 -1
  73. package/lib/src/models/customers.model.js +14 -4
  74. package/lib/src/models/customers.model.js.map +1 -1
  75. package/lib/src/models/design.model.d.ts +4 -0
  76. package/lib/src/models/design.model.js +58 -0
  77. package/lib/src/models/design.model.js.map +1 -0
  78. package/lib/src/models/domain.model.js +1 -1
  79. package/lib/src/models/domain.model.js.map +1 -1
  80. package/lib/src/models/editor.model.js +7 -0
  81. package/lib/src/models/editor.model.js.map +1 -1
  82. package/lib/src/models/emailLimit.model.d.ts +4 -0
  83. package/lib/src/models/emailLimit.model.js +31 -0
  84. package/lib/src/models/emailLimit.model.js.map +1 -0
  85. package/lib/src/models/hosting.model.js +1 -3
  86. package/lib/src/models/hosting.model.js.map +1 -1
  87. package/lib/src/models/hostingSettings.model.js +6 -4
  88. package/lib/src/models/hostingSettings.model.js.map +1 -1
  89. package/lib/src/models/invoice.model.d.ts +4 -0
  90. package/lib/src/models/invoice.model.js +235 -0
  91. package/lib/src/models/invoice.model.js.map +1 -0
  92. package/lib/src/models/mailFrom.model.js +53 -10
  93. package/lib/src/models/mailFrom.model.js.map +1 -1
  94. package/lib/src/models/project.model.js +2 -4
  95. package/lib/src/models/project.model.js.map +1 -1
  96. package/lib/src/models/publish-method.model.js +79 -430
  97. package/lib/src/models/publish-method.model.js.map +1 -1
  98. package/lib/src/models/storage.model.js +11 -3
  99. package/lib/src/models/storage.model.js.map +1 -1
  100. package/lib/src/prompts/textGeneration.js +88 -0
  101. package/lib/src/prompts/textGeneration.js.map +1 -1
  102. package/lib/src/prompts/textGenerationMulti.js +78 -44
  103. package/lib/src/prompts/textGenerationMulti.js.map +1 -1
  104. package/lib/src/services/access.service.d.ts +0 -37
  105. package/lib/src/services/access.service.js +119 -108
  106. package/lib/src/services/access.service.js.map +1 -1
  107. package/lib/src/services/ai.service.d.ts +4 -3
  108. package/lib/src/services/ai.service.js +22 -29
  109. package/lib/src/services/ai.service.js.map +1 -1
  110. package/lib/src/services/auth.service.d.ts +10 -0
  111. package/lib/src/services/auth.service.js +63 -0
  112. package/lib/src/services/auth.service.js.map +1 -0
  113. package/lib/src/services/conf.service.d.ts +3 -31
  114. package/lib/src/services/conf.service.js +58 -167
  115. package/lib/src/services/conf.service.js.map +1 -1
  116. package/lib/src/services/customers.service.d.ts +8 -4
  117. package/lib/src/services/customers.service.js +34 -7
  118. package/lib/src/services/customers.service.js.map +1 -1
  119. package/lib/src/services/designs.service.d.ts +7 -0
  120. package/lib/src/services/designs.service.js +10 -0
  121. package/lib/src/services/designs.service.js.map +1 -0
  122. package/lib/src/services/domains.service.d.ts +18 -91
  123. package/lib/src/services/domains.service.js +91 -559
  124. package/lib/src/services/domains.service.js.map +1 -1
  125. package/lib/src/services/editor.service.d.ts +4 -0
  126. package/lib/src/services/editor.service.js +28 -0
  127. package/lib/src/services/editor.service.js.map +1 -1
  128. package/lib/src/services/emailLimit.service.d.ts +21 -0
  129. package/lib/src/services/emailLimit.service.js +51 -0
  130. package/lib/src/services/emailLimit.service.js.map +1 -0
  131. package/lib/src/services/hosting.service.d.ts +12 -24
  132. package/lib/src/services/hosting.service.js +32 -122
  133. package/lib/src/services/hosting.service.js.map +1 -1
  134. package/lib/src/services/hostingAdmin.service.d.ts +1 -1
  135. package/lib/src/services/hostingAdmin.service.js +2 -2
  136. package/lib/src/services/hostingAdmin.service.js.map +1 -1
  137. package/lib/src/services/import.service.d.ts +6 -22
  138. package/lib/src/services/import.service.js +63 -65
  139. package/lib/src/services/import.service.js.map +1 -1
  140. package/lib/src/services/invoices.service.d.ts +30 -0
  141. package/lib/src/services/invoices.service.js +265 -0
  142. package/lib/src/services/invoices.service.js.map +1 -0
  143. package/lib/src/services/jetstream.service.d.ts +5 -3
  144. package/lib/src/services/jetstream.service.js +63 -7
  145. package/lib/src/services/jetstream.service.js.map +1 -1
  146. package/lib/src/services/listParticipants.service.d.ts +2 -5
  147. package/lib/src/services/listParticipants.service.js +17 -14
  148. package/lib/src/services/listParticipants.service.js.map +1 -1
  149. package/lib/src/services/mailFrom.service.d.ts +14 -1
  150. package/lib/src/services/mailFrom.service.js +55 -0
  151. package/lib/src/services/mailFrom.service.js.map +1 -1
  152. package/lib/src/services/me.service.d.ts +22 -12
  153. package/lib/src/services/me.service.js +58 -89
  154. package/lib/src/services/me.service.js.map +1 -1
  155. package/lib/src/services/publish.service.d.ts +3 -7
  156. package/lib/src/services/publish.service.js +32 -32
  157. package/lib/src/services/publish.service.js.map +1 -1
  158. package/lib/src/services/publishData.service.d.ts +10 -7
  159. package/lib/src/services/publishData.service.js +32 -75
  160. package/lib/src/services/publishData.service.js.map +1 -1
  161. package/lib/src/services/spamAnalasys.service.d.ts +4 -4
  162. package/lib/src/services/spamAnalasys.service.js +36 -44
  163. package/lib/src/services/spamAnalasys.service.js.map +1 -1
  164. package/lib/src/services/storage.service.d.ts +22 -29
  165. package/lib/src/services/storage.service.js +123 -57
  166. package/lib/src/services/storage.service.js.map +1 -1
  167. package/lib/src/services/structures.service.d.ts +1 -1
  168. package/lib/src/services/upload.service.js +6 -1
  169. package/lib/src/services/upload.service.js.map +1 -1
  170. package/package.json +28 -29
  171. package/lib/src/AzureBlobStorage.share.d.ts +0 -19
  172. package/lib/src/AzureBlobStorage.share.js +0 -162
  173. package/lib/src/AzureBlobStorage.share.js.map +0 -1
  174. package/lib/src/AzureFileStorage.share.d.ts +0 -22
  175. package/lib/src/AzureFileStorage.share.js +0 -139
  176. package/lib/src/AzureFileStorage.share.js.map +0 -1
  177. package/lib/src/AzureVault.d.ts +0 -14
  178. package/lib/src/AzureVault.js +0 -28
  179. package/lib/src/AzureVault.js.map +0 -1
  180. package/lib/src/dns.challenge.class.d.ts +0 -17
  181. package/lib/src/dns.challenge.class.js +0 -41
  182. package/lib/src/dns.challenge.class.js.map +0 -1
  183. package/lib/src/http.challenge.class.d.ts +0 -33
  184. package/lib/src/http.challenge.class.js +0 -58
  185. package/lib/src/http.challenge.class.js.map +0 -1
  186. package/lib/src/models/certificate-action.model.d.ts +0 -5
  187. package/lib/src/models/certificate-action.model.js +0 -230
  188. package/lib/src/models/certificate-action.model.js.map +0 -1
  189. package/lib/src/models/certificate.model.d.ts +0 -4
  190. package/lib/src/models/certificate.model.js +0 -96
  191. package/lib/src/models/certificate.model.js.map +0 -1
  192. package/lib/src/models/editorBase.model.d.ts +0 -4
  193. package/lib/src/models/editorBase.model.js +0 -39
  194. package/lib/src/models/editorBase.model.js.map +0 -1
  195. package/lib/src/services/certificates.service.d.ts +0 -56
  196. package/lib/src/services/certificates.service.js +0 -169
  197. package/lib/src/services/certificates.service.js.map +0 -1
  198. package/lib/src/services/certificatesAction.service.d.ts +0 -41
  199. package/lib/src/services/certificatesAction.service.js +0 -188
  200. package/lib/src/services/certificatesAction.service.js.map +0 -1
  201. package/lib/src/services/editorBase.service.d.ts +0 -46
  202. package/lib/src/services/editorBase.service.js +0 -161
  203. package/lib/src/services/editorBase.service.js.map +0 -1
  204. package/lib/src/services/handleFile.service.d.ts +0 -9
  205. package/lib/src/services/handleFile.service.js +0 -45
  206. package/lib/src/services/handleFile.service.js.map +0 -1
  207. package/lib/src/services/media.service.d.ts +0 -35
  208. package/lib/src/services/media.service.js +0 -418
  209. package/lib/src/services/media.service.js.map +0 -1
  210. package/lib/src/services/share.service.d.ts +0 -6
  211. package/lib/src/services/share.service.js +0 -4
  212. package/lib/src/services/share.service.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-len */
1
2
  export default function textGeneration(input, element, context) {
2
3
  const inputKeyExplanations = {
3
4
  headline: 'headline: main title. will be ## in the context',
@@ -5,6 +6,92 @@ export default function textGeneration(input, element, context) {
5
6
  intro: 'intro: introductory text will be #### in the context',
6
7
  text: 'text: array of paragraphs',
7
8
  };
9
+ return `You are an AI text generation assistant integrated with an enterprise CMS. Your primary goal is to generate text for a single page ("site") of a website using structured JSON input, exact contextual fields, and—most crucially—strict adherence to the provided "instructions." All your outputs and processing must be governed first and foremost by the "instructions" field, with contextual influences applied only as permitted or guided by those instructions.
10
+
11
+ Use the input JSON provided to you, which has the following structure:
12
+
13
+ {
14
+ "input": "${input}"
15
+ "context": {
16
+ "demographic": "Target audience for the page",
17
+ "tone": "Desired tone (e.g., friendly, professional)",
18
+ "project": "Description of the overall project",
19
+ "site": "Information about the current site/page",
20
+ "parent": "Context of the parent page, if any",
21
+ "siblings": "Context from sibling elements/pages",
22
+ "direct": "Direct context for current content/module",
23
+ "environment": "Description of the display environment and usage",
24
+ "content": "Markdown content for the site"
25
+ },
26
+ "instructions": "Any specific instructions for generating or shaping the text"
27
+ }
28
+
29
+ the input is a ${inputKeyExplanations[element]}
30
+
31
+ # Detailed Task
32
+
33
+ - The "instructions" field is the absolute authority for shaping, directing, and constraining all generated content. You must follow it exactly; override context or default approaches if the instructions require it.
34
+ - Use the "context" fields to inform additional writing details, applying the following weighted influences (higher means more important), but only as permitted by the instructions:
35
+ - project: 0.4
36
+ - site: 0.48
37
+ - parent: 0.48
38
+ - siblings: 0.64
39
+ - direct: 0.8
40
+ - environment: 0.8
41
+ - content: 0.32
42
+ - demographic: 0.6
43
+ - tone: 0.6
44
+ - Every key in the "input" object must receive a unique, relevant value (do not duplicate content across fields), and the text should only reflect the context to the extent allowed by the instructions.
45
+ - Your output **must** precisely match the input JSON structure, with no additional keys, extra fields, or markup. Produce only the required JSON.
46
+ - Never ask questions, seek clarification, or provide explanations. Only generate and output content as directed by instructions.
47
+ - No markup (Markdown, HTML, or formatting syntax) is allowed in outputs—plain text only.
48
+ - Persist in internally verifying compliance with the instructions above all else before writing your final JSON response.
49
+
50
+ # Steps
51
+
52
+ 1. Thoroughly read and analyze the "instructions" field; determine any required structure, style, ordering, or output format mandates.
53
+ 2. Reread each context field and apply only those elements which the instructions specify, or where not otherwise constrained, weigh them according to the context weights above.
54
+ 3. For each "input" key (including "intro" and every "text" string), carefully plan and compose content that fully implements the instructions, referencing additional context as allowed.
55
+ 4. Confirm no duplication between any "input" keys. All outputs must be non-redundant and unique.
56
+ 5. Internally review your response for absolute adherence to the instructions, overriding context weightings or defaults if needed.
57
+ 6. Output only the updated JSON with your generated field values.
58
+
59
+ # Output Format
60
+
61
+ Output must be the completed JSON object, strictly matching the input in structure and property names. Do not add, remove, or reorder fields. No extra text, commentary, explanations, or markup of any kind should ever be output. Plain text values only.
62
+
63
+ # Example
64
+
65
+ **Input (for context, this will be sent to you):**
66
+ {
67
+ "input": "${input}"
68
+ "context": {
69
+ "demographic": "University students",
70
+ "tone": "Enthusiastic and clear",
71
+ "project": "An educational resources portal for biology students",
72
+ "site": "Homepage for the biology resources section",
73
+ "parent": "Main portal landing page",
74
+ "siblings": "Mathematics and chemistry resource pages",
75
+ "direct": "Highlighting latest biology tutorials and guides",
76
+ "environment": "Displayed in a mobile-friendly web app",
77
+ "content": "Collection of resources, articles, and video guides"
78
+ },
79
+ "instructions": "Explain the section's purpose in the intro, then provide two distinct welcoming paragraphs that introduce resources and encourage navigation."
80
+ }
81
+
82
+ **Expected Output:**
83
+ {
84
+ "input": "${input}"
85
+ }
86
+ *(Actual outputs should match in length, substance, and adherence to the instructions; always ensure they follow the specific guidance provided.)*
87
+
88
+ # Notes
89
+
90
+ - The "instructions" field must govern and take precedence in all cases. Never ignore, sideline, or deprioritize details within "instructions"; always double-check that outputs meet them fully.
91
+ - All text must be unique, plain text, and adhere precisely to the instructions and output format constraints.
92
+ - Never explain, comment, or output context or process steps—output only the specified JSON fields and values.
93
+
94
+ **Reminder: Strictly follow the "instructions" for content, style, and scope. Output only the structured JSON—no extra text, explanations, or markup.**`;
8
95
  return `you are an text assistant. you are part of a enterprise cms. you are creating text for a single site of a website.
9
96
 
10
97
  i will provide an json in this format:
@@ -53,6 +140,7 @@ the weights for the context are like this:
53
140
  RULE: you use the instructions and the context to produce new text like the instructions say.
54
141
  RULE: the weighted context has to be used to produce the text and
55
142
  RULE: output has to match the input json, no additional keys allowed
143
+ RULE: only output the input json, no context or anything else
56
144
  RULE: dont even ask for something. just produce some ouput
57
145
  RULE: only human readable text, no code, no json, no html, no markdown
58
146
  RULE: dont ever use new lines in the output, just use a single line of text
@@ -1 +1 @@
1
- {"version":3,"file":"textGeneration.js","sourceRoot":"","sources":["../../../src/prompts/textGeneration.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAU,EAAE,OAAe,EAAE,OAAY;IAE9E,MAAM,oBAAoB,GAA2B;QACnD,QAAQ,EAAE,iDAAiD;QAC3D,OAAO,EAAE,mEAAmE;QAC5E,KAAK,EAAE,sDAAsD;QAC7D,IAAI,EAAE,2BAA2B;KAClC,CAAC;IAEF,OAAO;;;;gBAIO,KAAK;;;;;;;;;;;;;;;iBAeJ,oBAAoB,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC7C,CAAC;AAEF,CAAC"}
1
+ {"version":3,"file":"textGeneration.js","sourceRoot":"","sources":["../../../src/prompts/textGeneration.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAU,EAAE,OAAe,EAAE,OAAY;IAE9E,MAAM,oBAAoB,GAA2B;QACnD,QAAQ,EAAE,iDAAiD;QAC3D,OAAO,EAAE,mEAAmE;QAC5E,KAAK,EAAE,sDAAsD;QAC7D,IAAI,EAAE,2BAA2B;KAClC,CAAC;IAEF,OAAO;;;;;cAKK,KAAK;;;;;;;;;;;;;;;iBAeF,oBAAoB,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsChC,KAAK;;;;;;;;;;;;;;;;;cAiBL,KAAK;;;;;;;;;;wJAUqI,CAAA;IAEtJ,OAAO;;;;gBAIO,KAAK;;;;;;;;;;;;;;;iBAeJ,oBAAoB,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC7C,CAAC;AAEF,CAAC"}
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-len */
1
2
  export default function textGenerationMulti(input, context) {
2
3
  const inputKeyExplanations = {
3
4
  headline: 'headline: main title. will be ## in the context',
@@ -9,56 +10,89 @@ export default function textGenerationMulti(input, context) {
9
10
  .filter(key => inputKeyExplanations[key])
10
11
  .map(key => ` ${inputKeyExplanations[key]}`)
11
12
  .join('\n');
12
- return `you are an text assistant. you are part of a enterprise cms. you are creating text for a single site of a website.
13
+ return `You are an AI text generation assistant integrated with an enterprise CMS. Your primary goal is to generate text for a single page ("site") of a website using structured JSON input, exact contextual fields, and—most crucially—strict adherence to the provided "instructions." All your outputs and processing must be governed first and foremost by the "instructions" field, with contextual influences applied only as permitted or guided by those instructions.
14
+
15
+ Use the input JSON provided to you, which has the following structure:
13
16
 
14
- i will provide an json in this format:
15
17
  {
16
- "input": ${JSON.stringify(input, null, 2)},
17
- "context: {
18
- "demographic": "TARGET AUDIENCE",
19
- "tone": "TONE",
20
- "project": PROJECT CONTEXT,
21
- "site": SITE CONTEXT,
22
- "parent": "PARENT CONTEXT",
23
- "siblings": "SIBLINGS CONTEXT",
24
- "direct": "DIRECT CONTEXT AND MODULE EXPLANATION",
25
- "content": SITE CONTENT
26
- }
27
- "instructions": INSTRUCTIONS
18
+ "input": ${JSON.stringify(input, null, 2)},
19
+ "context": {
20
+ "demographic": "Target audience for the page",
21
+ "tone": "Desired tone (e.g., friendly, professional)",
22
+ "project": "Description of the overall project",
23
+ "site": "Information about the current site/page",
24
+ "parent": "Context of the parent page, if any",
25
+ "siblings": "Context from sibling elements/pages",
26
+ "direct": "Direct context for current content/module",
27
+ "environment": "Description of the display environment and usage",
28
+ "content": "Markdown content for the site"
29
+ },
30
+ "instructions": "Any specific instructions for generating or shaping the text"
28
31
  }
29
32
 
30
- ${explanations ? `Explanation of input keys:\n${explanations}\n\n` : ''}Context can have the following values:
31
- demographic is the target audience of the text.
32
- tone is the tone of the text. e.g. friendly, professional, etc.
33
- project is provided by the user to help you understand the whole project.
34
- site is provided by the user to help you understand the current page.
35
- parent if this is filled, it means the current content is a direct child of this.
36
- siblings these are elements at the same level as the current element which have the same parent und purpose
37
- direct gives the content which is at the same level and in direct context e.g. inside the same object
38
- environment describes where and how the content is shown
39
- content is the rest of the content of the current page in markdown format.
33
+ ${explanations ? `Explanation of input keys:\n${explanations}\n\n` : ''}# Detailed Task
34
+
35
+ - The "instructions" field is the absolute authority for shaping, directing, and constraining all generated content. You must follow it exactly; override context or default approaches if the instructions require it.
36
+ - Use the "context" fields to inform additional writing details, applying the following weighted influences (higher means more important), but only as permitted by the instructions:
37
+ - project: 0.4
38
+ - site: 0.48
39
+ - parent: 0.48
40
+ - siblings: 0.64
41
+ - direct: 0.8
42
+ - environment: 0.8
43
+ - content: 0.32
44
+ - demographic: 0.6
45
+ - tone: 0.6
46
+ - Every key in the "input" object must receive a unique, relevant value (do not duplicate content across fields), and the text should only reflect the context to the extent allowed by the instructions.
47
+ - Your output **must** precisely match the input JSON structure, with no additional keys, extra fields, or markup. Produce only the required JSON.
48
+ - Never ask questions, seek clarification, or provide explanations. Only generate and output content as directed by instructions.
49
+ - No markup (Markdown, HTML, or formatting syntax) is allowed in outputs—plain text only.
50
+ - Persist in internally verifying compliance with the instructions above all else before writing your final JSON response.
51
+
52
+ # Steps
53
+
54
+ 1. Thoroughly read and analyze the "instructions" field; determine any required structure, style, ordering, or output format mandates.
55
+ 2. Reread each context field and apply only those elements which the instructions specify, or where not otherwise constrained, weigh them according to the context weights above.
56
+ 3. For each "input" key (including "intro" and every "text" string), carefully plan and compose content that fully implements the instructions, referencing additional context as allowed.
57
+ 4. Confirm no duplication between any "input" keys. All outputs must be non-redundant and unique.
58
+ 5. Internally review your response for absolute adherence to the instructions, overriding context weightings or defaults if needed.
59
+ 6. Output only the updated JSON with your generated field values.
60
+
61
+ # Output Format
62
+
63
+ Output must be the completed JSON object, strictly matching the input in structure and property names. Do not add, remove, or reorder fields. No extra text, commentary, explanations, or markup of any kind should ever be output. Plain text values only.
64
+
65
+ # Example
66
+
67
+ **Input (for context, this will be sent to you):**
68
+ {
69
+ "input": ${JSON.stringify(input, null, 2)},
70
+ "context": {
71
+ "demographic": "University students",
72
+ "tone": "Enthusiastic and clear",
73
+ "project": "An educational resources portal for biology students",
74
+ "site": "Homepage for the biology resources section",
75
+ "parent": "Main portal landing page",
76
+ "siblings": "Mathematics and chemistry resource pages",
77
+ "direct": "Highlighting latest biology tutorials and guides",
78
+ "environment": "Displayed in a mobile-friendly web app",
79
+ "content": "Collection of resources, articles, and video guides"
80
+ },
81
+ "instructions": "Explain the section's purpose in the intro, then provide two distinct welcoming paragraphs that introduce resources and encourage navigation."
82
+ }
83
+
84
+ **Expected Output:**
85
+ {
86
+ "input": ${JSON.stringify(input, null, 2)}
87
+ }
88
+ *(Actual outputs should match in length, substance, and adherence to the instructions; always ensure they follow the specific guidance provided.)*
40
89
 
41
- project, site, direct and content are provided by the user to help you understand the current page.
42
- demographic and tone are provided by the user to help you understand the target audience and tone of the text.
90
+ # Notes
43
91
 
44
- the weights for the context are like this:
45
- project: 0.4
46
- site: 0.48
47
- parent: 0.48
48
- siblings: 0.64
49
- direct: 0.8
50
- content: 0.32
51
- demographic: 0.6
52
- environment: 0.8
53
- tone: 0.6
92
+ - The "instructions" field must govern and take precedence in all cases. Never ignore, sideline, or deprioritize details within "instructions"; always double-check that outputs meet them fully.
93
+ - All text must be unique, plain text, and adhere precisely to the instructions and output format constraints.
94
+ - Never explain, comment, or output context or process steps—output only the specified JSON fields and values.
54
95
 
55
- RULE: you use the instructions and the context to produce new text like the instructions say.
56
- RULE: every key in the input json has to be affected
57
- RULE: each key has to have unique text, no duplicates
58
- RULE: the weighted context has to be used to produce the text and
59
- RULE: output has to match the input json, no additional keys allowed
60
- RULE: dont even ask for something. just produce some ouput
61
- RULE: only text outputs, no markup of any kind
62
- `;
96
+ **Reminder: Strictly follow the "instructions" for content, style, and scope. Output only the structured JSON—no extra text, explanations, or markup.**`;
63
97
  }
64
98
  //# sourceMappingURL=textGenerationMulti.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textGenerationMulti.js","sourceRoot":"","sources":["../../../src/prompts/textGenerationMulti.ts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CAAC,GAAG,CAAC,EAAE,CAAC;SAC9C,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;;;;;aAKI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;EAezC,YAAY,CAAC,CAAC,CAAC,+BAA+B,YAAY,MAAM,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAoC1D,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;aAiB9B,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;wJAU6G,CAAC;AAEzJ,CAAC"}
@@ -1,37 +0,0 @@
1
- import Timeseries from '../Timeseries.class.js';
2
- import { NextFunction, Request, Response } from 'express';
3
- import { Access } from '@lilaquadrat/interfaces';
4
- type AccessSettings = {
5
- callLimits: {
6
- second: number;
7
- minute: number;
8
- quarter: number;
9
- hour: number;
10
- };
11
- };
12
- export default class AccessService extends Timeseries<Access> {
13
- model: import("../classes/TimeseriesModel.class.js").default<Access>;
14
- settings: AccessSettings;
15
- constructor(settings: AccessSettings);
16
- count(after: Date): Promise<number>;
17
- lastHour(ipOrUser: string, options?: {
18
- user: boolean;
19
- }): Promise<AccessSettings['callLimits'] | undefined>;
20
- /**
21
- applies the provided settings that limit the requests per second, minute, 15 minutes and hour.
22
- responds with code 429 if the limits are exceeded
23
- ```TS
24
- callLimits: {
25
- second: number,
26
- minute: number,
27
- quarter: number
28
- hour: number
29
- }
30
- ```
31
- */
32
- applyLimits(req: Request, res: Response, next: NextFunction, options?: {
33
- user: boolean;
34
- }): Promise<boolean>;
35
- sendResponse(limit: string, interval: string, res: Response): void;
36
- }
37
- export {};
@@ -1,109 +1,120 @@
1
- import dayjs from 'dayjs';
2
- import Timeseries from '../Timeseries.class.js';
3
- import AccessModel from '../models/access.model.js';
4
- import { HttpStatusCode } from '../helpers/HttpStatusCode.enum.js';
5
- export default class AccessService extends Timeseries {
6
- constructor(settings) {
7
- super();
8
- this.model = AccessModel;
9
- this.settings = settings;
10
- }
11
- count(after) {
12
- return this.model.db.countDocuments({ date: { $gte: after } });
13
- }
14
- async lastHour(ipOrUser, options) {
15
- const secondAgo = dayjs().subtract(1, 'second').toDate();
16
- const minuteAgo = dayjs().subtract(1, 'minute').toDate();
17
- const hourAgo = dayjs().subtract(1, 'hour').toDate();
18
- const quarterAgo = dayjs().subtract(15, 'minutes').toDate();
19
- const match = {
20
- $match: {
21
- date: { $gte: hourAgo },
22
- },
23
- };
24
- if (options?.user) {
25
- match.$match['metadata.user'] = ipOrUser;
26
- }
27
- if (!options?.user) {
28
- match.$match['metadata.ip'] = ipOrUser;
29
- }
30
- const count = await this.model.db.aggregate([
31
- match,
32
- {
33
- $group: {
34
- _id: null,
35
- second: {
36
- $sum: {
37
- $cond: [{ $gte: ['$date', secondAgo] }, 1, 0],
38
- },
39
- },
40
- minute: {
41
- $sum: {
42
- $cond: [{ $gte: ['$date', minuteAgo] }, 1, 0],
43
- },
44
- },
45
- quarter: {
46
- $sum: {
47
- $cond: [{ $gte: ['$date', quarterAgo] }, 1, 0],
48
- },
49
- },
50
- hour: {
51
- $sum: 1,
52
- },
53
- },
54
- },
55
- ]).toArray();
56
- if (count.length) {
57
- return count[0];
58
- }
59
- return;
60
- }
61
- /**
62
- applies the provided settings that limit the requests per second, minute, 15 minutes and hour.
63
- responds with code 429 if the limits are exceeded
64
- ```TS
65
- callLimits: {
66
- second: number,
67
- minute: number,
68
- quarter: number
69
- hour: number
70
- }
71
- ```
72
- */
73
- async applyLimits(req, res, next, options) {
74
- // Retrieve the last hour's access log for the requesting IP address
75
- const accessLog = await this.lastHour(options?.user && req.auth?.sub ? req.auth.sub : req.ip, options);
76
- // Check if accessLog is available to proceed with rate limiting checks
77
- if (accessLog) {
78
- // Check if the number of requests in the last second exceeds the limit
79
- if (accessLog.second >= this.settings.callLimits.second) {
80
- this.sendResponse(this.settings.callLimits.second.toString(), 'per second', res);
81
- return false;
82
- }
83
- // Check if the number of requests in the last minute exceeds the limit
84
- if (accessLog.minute >= this.settings.callLimits.minute) {
85
- this.sendResponse(this.settings.callLimits.minute.toString(), 'per minute', res);
86
- return false;
87
- }
88
- // Check if the number of requests in the last quarter-hour exceeds the limit
89
- if (accessLog.quarter >= this.settings.callLimits.quarter) {
90
- this.sendResponse(this.settings.callLimits.quarter.toString(), 'per 15 minutes', res);
91
- return false;
92
- }
93
- // Check if the number of requests in the last hour exceeds the limit
94
- if (accessLog.hour >= this.settings.callLimits.hour) {
95
- this.sendResponse(this.settings.callLimits.hour.toString(), 'per hour', res);
96
- return false;
97
- }
98
- }
99
- // If the request does not exceed any rate limits, continue to the next middleware
100
- next();
101
- return true;
102
- }
103
- sendResponse(limit, interval, res) {
104
- res.set('X-RateLimit-Limit', limit);
105
- res.set('X-RateLimit-Interval', interval);
106
- res.status(HttpStatusCode.TOO_MANY_REQUESTS).end();
107
- }
108
- }
1
+ // import dayjs from 'dayjs';
2
+ // import Timeseries from '../Timeseries.class.js';
3
+ // import AccessModel from '../models/access.model.js';
4
+ // import { NextFunction, Request, Response } from 'express';
5
+ // import { Access } from '@lilaquadrat/interfaces';
6
+ // import { HttpStatusCode } from '../helpers/HttpStatusCode.enum.js';
7
+ // type AccessSettings = {
8
+ // callLimits: {
9
+ // second: number,
10
+ // minute: number,
11
+ // quarter: number
12
+ // hour: number
13
+ // }
14
+ // };
15
+ // export default class AccessService extends Timeseries<Access> {
16
+ // model = AccessModel;
17
+ // settings: AccessSettings;
18
+ // constructor(settings: AccessSettings) {
19
+ // super();
20
+ // this.settings = settings;
21
+ // }
22
+ // count(after: Date) {
23
+ // return this.model.db.countDocuments({ date: { $gte: after } });
24
+ // }
25
+ // async lastHour(ipOrUser: string, options?: { user: boolean }): Promise<AccessSettings['callLimits'] | undefined> {
26
+ // const secondAgo = dayjs().subtract(1, 'second').toDate();
27
+ // const minuteAgo = dayjs().subtract(1, 'minute').toDate();
28
+ // const hourAgo = dayjs().subtract(1, 'hour').toDate();
29
+ // const quarterAgo = dayjs().subtract(15, 'minutes').toDate();
30
+ // const match = {
31
+ // $match: {
32
+ // date: { $gte: hourAgo },
33
+ // },
34
+ // };
35
+ // if (options?.user) {
36
+ // match.$match['metadata.user'] = ipOrUser;
37
+ // }
38
+ // if (!options?.user) {
39
+ // match.$match['metadata.ip'] = ipOrUser;
40
+ // }
41
+ // const count = await this.model.db.aggregate<AccessSettings['callLimits']>([
42
+ // match,
43
+ // {
44
+ // $group: {
45
+ // _id: null,
46
+ // second: {
47
+ // $sum: {
48
+ // $cond: [{ $gte: ['$date', secondAgo] }, 1, 0],
49
+ // },
50
+ // },
51
+ // minute: {
52
+ // $sum: {
53
+ // $cond: [{ $gte: ['$date', minuteAgo] }, 1, 0],
54
+ // },
55
+ // },
56
+ // quarter: {
57
+ // $sum: {
58
+ // $cond: [{ $gte: ['$date', quarterAgo] }, 1, 0],
59
+ // },
60
+ // },
61
+ // hour: {
62
+ // $sum: 1,
63
+ // },
64
+ // },
65
+ // },
66
+ // ]).toArray();
67
+ // if (count.length) {
68
+ // return count[0];
69
+ // }
70
+ // return;
71
+ // }
72
+ // /**
73
+ // applies the provided settings that limit the requests per second, minute, 15 minutes and hour.
74
+ // responds with code 429 if the limits are exceeded
75
+ // ```TS
76
+ // callLimits: {
77
+ // second: number,
78
+ // minute: number,
79
+ // quarter: number
80
+ // hour: number
81
+ // }
82
+ // ```
83
+ // */
84
+ // async applyLimits(req: Request, res: Response, next: NextFunction, options?: { user: boolean }) {
85
+ // // Retrieve the last hour's access log for the requesting IP address
86
+ // const accessLog = await this.lastHour(options?.user && req.auth?.sub ? req.auth.sub : req.ip as string, options);
87
+ // // Check if accessLog is available to proceed with rate limiting checks
88
+ // if (accessLog) {
89
+ // // Check if the number of requests in the last second exceeds the limit
90
+ // if (accessLog.second >= this.settings.callLimits.second) {
91
+ // this.sendResponse(this.settings.callLimits.second.toString(), 'per second', res);
92
+ // return false;
93
+ // }
94
+ // // Check if the number of requests in the last minute exceeds the limit
95
+ // if (accessLog.minute >= this.settings.callLimits.minute) {
96
+ // this.sendResponse(this.settings.callLimits.minute.toString(), 'per minute', res);
97
+ // return false;
98
+ // }
99
+ // // Check if the number of requests in the last quarter-hour exceeds the limit
100
+ // if (accessLog.quarter >= this.settings.callLimits.quarter) {
101
+ // this.sendResponse(this.settings.callLimits.quarter.toString(), 'per 15 minutes', res);
102
+ // return false;
103
+ // }
104
+ // // Check if the number of requests in the last hour exceeds the limit
105
+ // if (accessLog.hour >= this.settings.callLimits.hour) {
106
+ // this.sendResponse(this.settings.callLimits.hour.toString(), 'per hour', res);
107
+ // return false;
108
+ // }
109
+ // }
110
+ // // If the request does not exceed any rate limits, continue to the next middleware
111
+ // next();
112
+ // return true;
113
+ // }
114
+ // sendResponse(limit: string, interval: string, res: Response) {
115
+ // res.set('X-RateLimit-Limit', limit);
116
+ // res.set('X-RateLimit-Interval', interval);
117
+ // res.status(HttpStatusCode.TOO_MANY_REQUESTS).end();
118
+ // }
119
+ // }
109
120
  //# sourceMappingURL=access.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"access.service.js","sourceRoot":"","sources":["../../../src/services/access.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAWnE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAkB;IAM3D,YAAY,QAAwB;QAElC,KAAK,EAAE,CAAC;QANV,UAAK,GAAG,WAAW,CAAC;QAQlB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAE3B,CAAC;IAED,KAAK,CAAC,KAAW;QAEf,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,cAA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AwB;AAExB,UAAU;AAEV,gFAAgF;AAChF,mEAAmE;AAEnE,4FAA4F;AAC5F,wBAAwB;AAExB,UAAU;AAEV,sFAAsF;AACtF,qEAAqE;AAErE,iGAAiG;AACjG,wBAAwB;AAExB,UAAU;AAEV,8EAA8E;AAC9E,+DAA+D;AAE/D,wFAAwF;AACxF,wBAAwB;AAExB,UAAU;AAEV,QAAQ;AAER,yFAAyF;AACzF,cAAc;AACd,mBAAmB;AAEnB,MAAM;AAEN,mEAAmE;AAEnE,2CAA2C;AAC3C,iDAAiD;AACjD,0DAA0D;AAE1D,MAAM;AAEN,IAAI"}
@@ -1,8 +1,9 @@
1
1
  import { UserAppOptionsRequired } from '@lilaquadrat/interfaces';
2
- import OpenAI from 'openai';
2
+ import { GoogleGenAI } from '@google/genai';
3
3
  export declare class Ai {
4
- provider: OpenAI;
5
- constructor(provider: string, key?: string);
4
+ provider: GoogleGenAI;
5
+ model: string;
6
+ constructor(key: string, model: string);
6
7
  tokenUsage(date: string | undefined, options: UserAppOptionsRequired): Promise<import("bson").Document>;
7
8
  generateTextForProject(input: Object, instructions: string, element: string | undefined, context: {
8
9
  project?: string;