@zodic/shared 0.0.153 → 0.0.155
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.
- package/app/api/index.ts +1 -1
- package/app/base/AppContext.ts +12 -7
- package/app/services/ConceptService.ts +87 -27
- package/app/workflow/ConceptWorkflow.ts +65 -4
- package/data/zodiacSignCombinations.ts +1730 -0
- package/package.json +2 -1
- package/tsconfig.json +2 -0
- package/types/scopes/cloudflare.ts +2 -0
- package/utils/buildMessages.ts +6 -1
- package/utils/conceptPrompts.ts +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zodic/shared",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.155",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"inversify": "^6.2.1",
|
|
33
33
|
"jose": "^5.9.6",
|
|
34
34
|
"openai": "^4.81.0",
|
|
35
|
+
"p-map": "^7.0.3",
|
|
35
36
|
"reflect-metadata": "^0.2.2",
|
|
36
37
|
"uuid": "^11.0.5"
|
|
37
38
|
}
|
package/tsconfig.json
CHANGED
|
@@ -22,6 +22,7 @@ export type CentralBindings = {
|
|
|
22
22
|
KV_CONCEPTS_MANAGEMENT: KVNamespace;
|
|
23
23
|
KV_ASTRO: KVNamespace;
|
|
24
24
|
KV_CONCEPT_FAILURES: KVNamespace;
|
|
25
|
+
KV_CONCEPT_NAMES: KVNamespace;
|
|
25
26
|
CONCEPT_GENERATION_QUEUE: Queue;
|
|
26
27
|
|
|
27
28
|
PROMPT_IMAGE_DESCRIBER: string;
|
|
@@ -88,6 +89,7 @@ export type BackendBindings = Env &
|
|
|
88
89
|
| 'KV_ASTRO'
|
|
89
90
|
| 'KV_CONCEPTS_MANAGEMENT'
|
|
90
91
|
| 'KV_CONCEPT_FAILURES'
|
|
92
|
+
| 'KV_CONCEPT_NAMES'
|
|
91
93
|
| 'PROMPT_IMAGE_DESCRIBER'
|
|
92
94
|
| 'PROMPT_GENERATE_ARCHETYPE_CONTENT'
|
|
93
95
|
| 'PROMPT_GENERATE_ARCHETYPE_LEONARDO_PROMPTS'
|
package/utils/buildMessages.ts
CHANGED
|
@@ -97,12 +97,14 @@ export const buildLLMMessages = (env: BackendBindings) => ({
|
|
|
97
97
|
generateConceptBasicInfo: ({
|
|
98
98
|
combination,
|
|
99
99
|
conceptSlug,
|
|
100
|
+
existingNames,
|
|
100
101
|
}: {
|
|
101
102
|
combination: string;
|
|
102
103
|
conceptSlug: Concept;
|
|
104
|
+
existingNames: string[];
|
|
103
105
|
}): ChatMessages => {
|
|
104
106
|
const zodiacCombination = mapConceptToPlanets(conceptSlug, combination);
|
|
105
|
-
|
|
107
|
+
|
|
106
108
|
return [
|
|
107
109
|
{
|
|
108
110
|
role: 'system',
|
|
@@ -112,6 +114,9 @@ export const buildLLMMessages = (env: BackendBindings) => ({
|
|
|
112
114
|
role: 'user',
|
|
113
115
|
content: `
|
|
114
116
|
Combination: ${zodiacCombination}
|
|
117
|
+
|
|
118
|
+
Existing Names (Avoid duplicates):
|
|
119
|
+
${existingNames.length > 0 ? existingNames.join(', ') : 'None'}
|
|
115
120
|
`,
|
|
116
121
|
},
|
|
117
122
|
];
|
package/utils/conceptPrompts.ts
CHANGED
|
@@ -54,6 +54,8 @@ export const conceptPrompts: (
|
|
|
54
54
|
export const PROMPT_GENERATE_CROWN = `
|
|
55
55
|
You are a skilled creative writer specializing in astrology and symbolic storytelling. Your task is to craft a name, description, and poetic passage for the Crown concept in both English and Brazilian Portuguese simultaneously. The Crown reflects core identity, representing self-awareness, inner strength, and personal truth, as influenced by a given zodiac sign combination.
|
|
56
56
|
|
|
57
|
+
A list of previously used names will be provided. The new name must be unique and different from these.
|
|
58
|
+
|
|
57
59
|
For the given combination, generate the following in both languages, ensuring the content remains identical in meaning and tone except for the poem, which should be independently written in each language:
|
|
58
60
|
1. Name (Nome): Keep it sober and descriptive, focusing on the Crown’s symbolic purpose. Avoid ornate or fantastical phrasing. It should start with “The Crown of…” in English and “A Coroa de…” in Portuguese.
|
|
59
61
|
2. Description (Descrição): Write a concise, grounded narrative that links the Crown’s qualities to the traits of the zodiac combination. Emphasize balance, identity, and inner power without exaggeration. Keep the Portuguese version faithful in tone and depth to the English version.
|
|
@@ -87,6 +89,7 @@ PT:
|
|
|
87
89
|
export const PROMPT_GENERATE_SCEPTER = `
|
|
88
90
|
You are a skilled creative writer specializing in astrology and symbolic storytelling. Your task is to craft a name, description, and poetic passage for the Scepter concept in both English and Brazilian Portuguese simultaneously. The Scepter reflects external influence and action, symbolizing leadership, initiative, and the ability to shape one’s surroundings, as influenced by a given zodiac sign combination.
|
|
89
91
|
|
|
92
|
+
A list of previously used names will be provided. The new name must be unique and different from these.
|
|
90
93
|
|
|
91
94
|
For the given combination, generate the following in both languages, ensuring the content remains identical in meaning and tone except for the poem, which should be independently written in each language:
|
|
92
95
|
|
|
@@ -133,6 +136,8 @@ export const PROMPT_GENERATE_RING = `
|
|
|
133
136
|
|
|
134
137
|
You are a skilled creative writer specializing in astrology and symbolic storytelling. Your task is to craft a name, description, and poetic passage for the Ring concept in both English and Brazilian Portuguese simultaneously. The Ring reflects love and bonds, symbolizing attraction, deep emotional connections, and the unseen forces that shape relationships, as influenced by a given zodiac sign combination.
|
|
135
138
|
|
|
139
|
+
A list of previously used names will be provided. The new name must be unique and different from these.
|
|
140
|
+
|
|
136
141
|
For the given combination, generate the following in both languages, ensuring the content remains identical in meaning and tone except for the poem, which should be independently written in each language:
|
|
137
142
|
|
|
138
143
|
1. Name (Nome): Keep it elegant and evocative, focusing on the Ring’s symbolic purpose. It should start with “The Ring of…” in English and “O Anel de…” in Portuguese, reflecting themes of fate, passion, or devotion.
|
|
@@ -176,6 +181,8 @@ PT:
|
|
|
176
181
|
export const PROMPT_GENERATE_AMULET = `
|
|
177
182
|
You are a skilled creative writer specializing in astrology and symbolic storytelling. Your task is to craft a name, description, and poetic passage for the Amulet concept in both English and Brazilian Portuguese simultaneously. The Amulet reflects healing and growth, representing protection, stability, and resilience, as influenced by a given zodiac sign combination.
|
|
178
183
|
|
|
184
|
+
A list of previously used names will be provided. The new name must be unique and different from these.
|
|
185
|
+
|
|
179
186
|
For the given combination, generate the following in both languages, ensuring the content remains identical in meaning and tone except for the poem, which should be independently written in each language:
|
|
180
187
|
|
|
181
188
|
1. Name (Nome): Keep it sober and descriptive, focusing on the Amulet’s symbolic purpose. It should start with “The Amulet of…” in English and “O Amuleto de…” in Portuguese.
|
|
@@ -218,7 +225,7 @@ PT:
|
|
|
218
225
|
export const PROMPT_GENERATE_LANTERN = `
|
|
219
226
|
You are a skilled creative writer specializing in astrology and symbolic storytelling. Your task is to craft a name, description, and poetic passage for the Lantern concept in both English and Brazilian Portuguese simultaneously. The Lantern reflects spiritual transformation, symbolizing guidance, resilience, and introspection, as influenced by a given zodiac sign combination.
|
|
220
227
|
|
|
221
|
-
|
|
228
|
+
A list of previously used names will be provided. The new name must be unique and different from these.
|
|
222
229
|
|
|
223
230
|
For the given combination, generate the following in both languages, ensuring the content remains identical in meaning and tone except for the poem, which should be independently written in each language:
|
|
224
231
|
|
|
@@ -259,6 +266,8 @@ PT:
|
|
|
259
266
|
export const PROMPT_GENERATE_ORB = `
|
|
260
267
|
You are a skilled creative writer specializing in astrology and symbolic storytelling. Your task is to craft a name, description, and poetic passage for the Orb concept in both English and Brazilian Portuguese simultaneously. The Orb reflects destiny and purpose, symbolizing higher ideals, vision, and the pursuit of meaningful goals, as influenced by a given zodiac sign combination.
|
|
261
268
|
|
|
269
|
+
A list of previously used names will be provided. The new name must be unique and different from these.
|
|
270
|
+
|
|
262
271
|
For the given combination, generate the following in both languages, ensuring the content remains identical in meaning and tone except for the poem, which should be independently written in each language:
|
|
263
272
|
|
|
264
273
|
1. Name (Nome): Keep it sober and descriptive, focusing on the Orb’s symbolic purpose. It should start with “The Orb of…” in English and “O Orbe de…” in Portuguese.
|