@zodic/shared 0.0.300 → 0.0.302
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.
|
@@ -796,4 +796,48 @@ export class ArchetypeService {
|
|
|
796
796
|
`🎉 [Batch] Completed regenerating ${compositions.length} combinations`
|
|
797
797
|
);
|
|
798
798
|
}
|
|
799
|
+
|
|
800
|
+
async fetchMissingArchetypeCompositions(): Promise<Composition[]> {
|
|
801
|
+
const db = this.context.drizzle();
|
|
802
|
+
const incomplete = await this.findIncompleteCombinations();
|
|
803
|
+
|
|
804
|
+
const compositions: Composition[] = [];
|
|
805
|
+
|
|
806
|
+
for (const { combination } of incomplete) {
|
|
807
|
+
const [sun, ascendant, moon] = combination.split('-') as ZodiacSignSlug[];
|
|
808
|
+
|
|
809
|
+
const existing = await db
|
|
810
|
+
.select({
|
|
811
|
+
archetypeIndex: schema.archetypesData.archetypeIndex,
|
|
812
|
+
language: schema.archetypesData.language,
|
|
813
|
+
gender: schema.archetypesData.gender,
|
|
814
|
+
})
|
|
815
|
+
.from(schema.archetypesData)
|
|
816
|
+
.where(eq(schema.archetypesData.combination, combination))
|
|
817
|
+
.execute();
|
|
818
|
+
|
|
819
|
+
const indexesToGenerate: number[] = [];
|
|
820
|
+
|
|
821
|
+
for (let i = 1; i <= 3; i++) {
|
|
822
|
+
const hasAll =
|
|
823
|
+
existing.filter((e) => e.archetypeIndex === i.toString()).length === 4;
|
|
824
|
+
if (!hasAll) indexesToGenerate.push(i);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
if (indexesToGenerate.length > 0) {
|
|
828
|
+
compositions.push({
|
|
829
|
+
sun,
|
|
830
|
+
ascendant,
|
|
831
|
+
moon,
|
|
832
|
+
indexesToGenerate,
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
console.log(
|
|
838
|
+
`🧩 [Fetch] Missing archetype compositions to regenerate: ${compositions.length}`
|
|
839
|
+
);
|
|
840
|
+
|
|
841
|
+
return compositions;
|
|
842
|
+
}
|
|
799
843
|
}
|
package/package.json
CHANGED
package/types/scopes/generic.ts
CHANGED
|
@@ -196,12 +196,7 @@ export const influenceMap: Record<Planet, Record<ZodiacSignSlug, Trait>> = {
|
|
|
196
196
|
},
|
|
197
197
|
};
|
|
198
198
|
|
|
199
|
-
|
|
200
|
-
sun: ZodiacSignSlug;
|
|
201
|
-
ascendant: ZodiacSignSlug;
|
|
202
|
-
moon: ZodiacSignSlug;
|
|
203
|
-
indexesToGenerate?: number[];
|
|
204
|
-
}
|
|
199
|
+
|
|
205
200
|
|
|
206
201
|
export function generateArchetypePrompt(compositions: Composition[]): string {
|
|
207
202
|
const promptHeader = `You are a creative writer specializing in astrology, archetypes, and symbolic storytelling.
|