@zodic/shared 0.0.290 → 0.0.292
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/db/schema.ts
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
real,
|
|
6
6
|
sqliteTable,
|
|
7
7
|
text,
|
|
8
|
-
uniqueIndex,
|
|
9
8
|
} from 'drizzle-orm/sqlite-core';
|
|
10
9
|
|
|
11
10
|
export const timestampFields = {
|
|
@@ -389,6 +388,8 @@ export const userArtifacts = sqliteTable(
|
|
|
389
388
|
.references(() => artifacts.id, { onDelete: 'cascade' }),
|
|
390
389
|
gender: text('gender').notNull(), // Gender of the user or chosen archetype
|
|
391
390
|
archetypeIndex: text('archetype_index').notNull(), // Chosen archetype for the artifact
|
|
391
|
+
archetypeDataId: text('archetype_data_id')
|
|
392
|
+
.references(() => archetypesData.id, { onDelete: 'cascade' }), // New: References archetypesData.id, nullable
|
|
392
393
|
postImageId: text('post_image_id'), // URL for the Instagram post image
|
|
393
394
|
reelImageId: text('reel_image_id'), // URL for the Instagram reels/TikTok image
|
|
394
395
|
postImageUrl: text('post_image_url'), // URL for the Instagram post image
|
|
@@ -404,6 +405,33 @@ export const userArtifacts = sqliteTable(
|
|
|
404
405
|
index('user_artifacts_user_id_idx').on(t.userId),
|
|
405
406
|
index('user_artifacts_artifact_id_idx').on(t.artifactId),
|
|
406
407
|
index('user_artifacts_status_idx').on(t.status),
|
|
408
|
+
index('user_artifacts_archetype_data_id_idx').on(t.archetypeDataId),
|
|
409
|
+
]
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
export const archetypesData = sqliteTable(
|
|
413
|
+
'archetypes_data',
|
|
414
|
+
{
|
|
415
|
+
id: text('id').primaryKey(),
|
|
416
|
+
language: text('language').notNull(), // 'en-us' or 'pt-br'
|
|
417
|
+
gender: text('gender'), // 'male', 'female', 'non-binary'
|
|
418
|
+
combination: text('combination').notNull(), // Zodiac combination (e.g., 'aries-taurus-libra')
|
|
419
|
+
archetypeIndex: text('archetype_index').notNull(), // '1', '2', or '3'
|
|
420
|
+
name: text('name').notNull(), // Archetype name
|
|
421
|
+
essenceLine: text('essence_line').notNull(), // Short poetic essence line
|
|
422
|
+
description: text('description').notNull(), // Narrative description
|
|
423
|
+
content: text('content').default('[]').notNull(), // JSON stringified structured content
|
|
424
|
+
virtues: text('virtues').default('[]').notNull(), // JSON stringified array
|
|
425
|
+
leonardoPrompt: text('leonardo_prompt'), // Leonardo prompt
|
|
426
|
+
status: text('status').default('idle'), // Generation status
|
|
427
|
+
createdAt: integer('created_at').default(sql`CURRENT_TIMESTAMP`),
|
|
428
|
+
updatedAt: integer('updated_at').default(sql`CURRENT_TIMESTAMP`),
|
|
429
|
+
},
|
|
430
|
+
(table) => [
|
|
431
|
+
index('archetypes_data_language_idx').on(table.language),
|
|
432
|
+
index('archetypes_data_combination_idx').on(table.combination),
|
|
433
|
+
index('archetypes_data_archetype_index_idx').on(table.archetypeIndex),
|
|
434
|
+
index('archetypes_data_gender_idx').on(table.gender),
|
|
407
435
|
]
|
|
408
436
|
);
|
|
409
437
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// --- 1. Influence Table ---
|
|
2
|
+
|
|
3
|
+
export type Planet = 'sun' | 'ascendant' | 'moon';
|
|
4
|
+
export type Sign =
|
|
5
|
+
| 'aries' | 'taurus' | 'gemini' | 'cancer'
|
|
6
|
+
| 'leo' | 'virgo' | 'libra' | 'scorpio'
|
|
7
|
+
| 'sagittarius' | 'capricorn' | 'aquarius' | 'pisces';
|
|
8
|
+
|
|
9
|
+
export interface Trait {
|
|
10
|
+
label: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const influenceMap: Record<Planet, Record<Sign, Trait>> = {
|
|
15
|
+
sun: {
|
|
16
|
+
aries: { label: 'Fierce Initiator', description: 'A core identity centered around courage, action, and blazing one’s own trail.' },
|
|
17
|
+
taurus: { label: 'Steadfast Builder', description: 'A core identity rooted in patience, consistency, and enduring creation.' },
|
|
18
|
+
gemini: { label: 'Curious Communicator', description: 'A core identity driven by learning, connection, and intellectual discovery.' },
|
|
19
|
+
cancer: { label: 'Nurturing Protector', description: 'A core identity grounded in care, intuition, and emotional loyalty.' },
|
|
20
|
+
leo: { label: 'Radiant Leader', description: 'A core identity fueled by self-expression, pride, and the desire to inspire.' },
|
|
21
|
+
virgo: { label: 'Analytical Alchemist', description: 'A core identity shaped by precision, service, and a drive to perfect.' },
|
|
22
|
+
libra: { label: 'Harmonious Diplomat', description: 'A core identity rooted in balance, fairness, and graceful interaction.' },
|
|
23
|
+
scorpio: { label: 'Intense Transformer', description: 'A core identity driven by emotional depth, secrecy, and powerful change.' },
|
|
24
|
+
sagittarius:{ label: 'Visionary Seeker', description: 'A core identity driven by exploration, truth, and a thirst for meaning beyond boundaries.' },
|
|
25
|
+
capricorn: { label: 'Ambitious Achiever', description: 'A core identity shaped by discipline, endurance, and long-term goals.' },
|
|
26
|
+
aquarius: { label: 'Radical Thinker', description: 'A core identity rooted in innovation, progress, and standing apart.' },
|
|
27
|
+
pisces: { label: 'Mystical Dreamer', description: 'A core identity connected to imagination, empathy, and spiritual flow.' },
|
|
28
|
+
},
|
|
29
|
+
ascendant: {
|
|
30
|
+
aries: { label: 'Bold Pathfinder', description: 'An outward presence that feels daring, direct, and ready to lead the charge.' },
|
|
31
|
+
taurus: { label: 'Earthbound Stabilizer', description: 'An outward presence that feels calm, grounded, and sensually secure.' },
|
|
32
|
+
gemini: { label: 'Witty Messenger', description: 'An outward presence that feels quick, verbal, and full of mental spark.' },
|
|
33
|
+
cancer: { label: 'Gentle Guardian', description: 'An outward presence that feels warm, intuitive, and emotionally attuned.' },
|
|
34
|
+
leo: { label: 'Magnetic Performer', description: 'An outward presence that feels bold, charismatic, and naturally radiant.' },
|
|
35
|
+
virgo: { label: 'Humble Servant', description: 'An outward presence that feels modest, helpful, and attentive to detail.' },
|
|
36
|
+
libra: { label: 'Graceful Mediator', description: 'An outward presence that feels diplomatic, stylish, and socially attuned.' },
|
|
37
|
+
scorpio: { label: 'Silent Watcher', description: 'An outward presence that feels intense, private, and unreadable.' },
|
|
38
|
+
sagittarius:{ label: 'Adventurous Spirit', description: 'An outward presence that feels free, optimistic, and constantly in motion.' },
|
|
39
|
+
capricorn: { label: 'Disciplined Strategist', description: 'An outward presence that feels composed, determined, and grounded in ambition and structure.' },
|
|
40
|
+
aquarius: { label: 'Creative Visionary', description: 'An outward presence that feels unconventional, future-focused, and effortlessly different — someone who stands apart with purpose.' },
|
|
41
|
+
pisces: { label: 'Ethereal Observer', description: 'An outward presence that feels dreamy, elusive, and emotionally fluid.' },
|
|
42
|
+
},
|
|
43
|
+
moon: {
|
|
44
|
+
aries: { label: 'Fiery Instinct', description: 'An emotional world driven by urgency, independence, and assertive desire.' },
|
|
45
|
+
taurus: { label: 'Soothing Sensor', description: 'An emotional world that seeks calm, physical comfort, and dependable rhythm.' },
|
|
46
|
+
gemini: { label: 'Restless Thinker', description: 'An emotional world stimulated by ideas, variety, and clever interaction.' },
|
|
47
|
+
cancer: { label: 'Empathic Nurturer', description: 'An emotional world guided by sensitivity, care, and a deep desire to protect and emotionally connect with others.' },
|
|
48
|
+
leo: { label: 'Emotive Performer', description: 'An emotional world charged with pride, affection, and dramatic expression.' },
|
|
49
|
+
virgo: { label: 'Cautious Processor', description: 'An emotional world driven by analysis, practicality, and internal refinement.' },
|
|
50
|
+
libra: { label: 'Peace-Weaving Romantic', description: 'An emotional world attuned to beauty, connection, and harmony — seeking to unify rather than divide.' },
|
|
51
|
+
scorpio: { label: 'Secretive Intensity', description: 'An emotional world shaped by powerful bonds, protection, and emotional control.' },
|
|
52
|
+
sagittarius:{ label: 'Wanderlust Heart', description: 'An emotional world lifted by inspiration, movement, and spontaneous joy.' },
|
|
53
|
+
capricorn: { label: 'Resilient Stoic', description: 'An emotional world anchored in control, caution, and endurance.' },
|
|
54
|
+
aquarius: { label: 'Detached Idealist', description: 'An emotional world guided by principles, distance, and concern for the collective.' },
|
|
55
|
+
pisces: { label: 'Mystic Empath', description: 'An emotional world open to dreams, feelings, and transcendental emotion.' },
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// --- 2. Prompt Generator ---
|
|
60
|
+
|
|
61
|
+
export interface Composition {
|
|
62
|
+
sun: Sign;
|
|
63
|
+
ascendant: Sign;
|
|
64
|
+
moon: Sign;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function generateArchetypePrompt(compositions: Composition[]): string {
|
|
68
|
+
const promptHeader = `You are a creative writer specializing in astrology, archetypes, and symbolic storytelling.
|
|
69
|
+
|
|
70
|
+
Your task is to generate three poetic and evocative character archetype names for each of the following Crown compositions. Each archetype must reflect traits from all three listed influences, but one influence should be emphasized more strongly.
|
|
71
|
+
|
|
72
|
+
For every composition, return:
|
|
73
|
+
- Three archetype names in English, each with a short poetic essence line in English.
|
|
74
|
+
- Portuguese versions for each name: masculine and feminine variants.
|
|
75
|
+
- A short poetic essence line in Portuguese.
|
|
76
|
+
- Return each composition's result separately, using the output format exactly as shown.
|
|
77
|
+
|
|
78
|
+
Avoid names that sound like objects, titles, or abstract forces (e.g., The Lantern, The Eclipse, The Veil).
|
|
79
|
+
Instead, use names that suggest a personified being or living archetype, such as The Masked Oracle, The Starborn Seeker, or The Dancer of the Falling Sky.
|
|
80
|
+
|
|
81
|
+
Do not include any commentary or explanations outside the defined output structure. Only return the output block for each composition.`;
|
|
82
|
+
|
|
83
|
+
const compositionBlocks = compositions.map((comp, i) => {
|
|
84
|
+
const sun = influenceMap.sun[comp.sun];
|
|
85
|
+
const asc = influenceMap.ascendant[comp.ascendant];
|
|
86
|
+
const moon = influenceMap.moon[comp.moon];
|
|
87
|
+
|
|
88
|
+
return `\n\n### Composition ${i + 1}
|
|
89
|
+
|
|
90
|
+
• First Influence – ${sun.label}: ${sun.description}
|
|
91
|
+
• Second Influence – ${asc.label}: ${asc.description}
|
|
92
|
+
• Third Influence – ${moon.label}: ${moon.description}`;
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
const outputFormat = `\n\n### Output Format for Each Composition:
|
|
96
|
+
\n\n\`\n-EN
|
|
97
|
+
1.
|
|
98
|
+
• Name: [Name that emphasizes the first influence, while blending the second and third]
|
|
99
|
+
• Essence: [Short poetic description line in English]
|
|
100
|
+
2.
|
|
101
|
+
• Name: [Name that emphasizes the second influence, while blending the first and third]
|
|
102
|
+
• Essence: [Short poetic description line in English]
|
|
103
|
+
3.
|
|
104
|
+
• Name: [Name that emphasizes the third influence, while blending the first and second]
|
|
105
|
+
• Essence: [Short poetic description line in English]
|
|
106
|
+
|
|
107
|
+
-PT
|
|
108
|
+
1.
|
|
109
|
+
• Masculino: [Portuguese name (masc)]
|
|
110
|
+
• Feminino: [Portuguese name (fem)]
|
|
111
|
+
• Essência: [Short poetic description line in Portuguese]
|
|
112
|
+
2.
|
|
113
|
+
• Masculino: [Portuguese name (masc)]
|
|
114
|
+
• Feminino: [Portuguese name (fem)]
|
|
115
|
+
• Essência: [Short poetic description line in Portuguese]
|
|
116
|
+
3.
|
|
117
|
+
• Masculino: [Portuguese name (masc)]
|
|
118
|
+
• Feminino: [Portuguese name (fem)]
|
|
119
|
+
• Essência: [Short poetic description line in Portuguese]
|
|
120
|
+
\``;
|
|
121
|
+
|
|
122
|
+
return `${promptHeader}\n${compositionBlocks.join('\n')}\n${outputFormat}`;
|
|
123
|
+
}
|