@almadar/agent 3.5.11 → 3.5.13

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.
@@ -11,22 +11,84 @@
11
11
  */
12
12
  import type { OrbitalDefinition, Trait, Transition, Entity, StateMachine } from '@almadar/core/types';
13
13
  export declare function buildGate0SystemPrompt(): string;
14
+ /**
15
+ * Build the user prompt for Gate 0 (Application Decomposition).
16
+ *
17
+ * Creates a prompt that guides the LLM to decompose a user request into
18
+ * an orbital schema with entities, traits, and pages.
19
+ *
20
+ * @param {string} prompt - The original user request/prompt
21
+ * @param {object} [guidedData] - Optional guidance data from behavior analysis
22
+ * @param {number} guidedData.orbitalCount - Expected number of orbitals
23
+ * @param {string[]} guidedData.entityNames - Expected entity names
24
+ * @param {string[]} guidedData.traitNames - Expected trait names
25
+ * @returns {string} The formatted user prompt for Gate 0
26
+ */
14
27
  export declare function buildGate0UserPrompt(prompt: string, guidedData?: {
15
28
  orbitalCount: number;
16
29
  entityNames: string[];
17
30
  traitNames: string[];
18
31
  }): string;
19
32
  export declare function buildGate1SystemPrompt(): string;
33
+ /**
34
+ * Build the user prompt for Gate 1 (Orbital Structure).
35
+ *
36
+ * Creates a prompt that guides the LLM to enrich an orbital shell with
37
+ * full entity fields, persistence config, and page definitions.
38
+ *
39
+ * @param {OrbitalDefinition} orbital - The orbital shell to enrich
40
+ * @param {OrbitalDefinition[]} allOrbitals - All orbitals for cross-reference context
41
+ * @param {OrbitalDefinition} [guidedOrbital] - Optional reference orbital for guidance
42
+ * @returns {string} The formatted user prompt for Gate 1
43
+ */
20
44
  export declare function buildGate1UserPrompt(orbital: OrbitalDefinition, allOrbitals: OrbitalDefinition[], guidedOrbital?: OrbitalDefinition): string;
21
45
  export declare function buildGate2SystemPrompt(): string;
46
+ /**
47
+ * Build the user prompt for Gate 2 (State Machine Design).
48
+ *
49
+ * Creates a prompt that guides the LLM to design the state machine topology
50
+ * and UI slot assignments for a trait.
51
+ *
52
+ * @param {Trait} trait - The trait shell to design state machine for
53
+ * @param {Entity} entity - The entity this trait manages
54
+ * @param {string} orbitalDescription - Description of the orbital for context
55
+ * @param {Trait} [guidedTrait] - Optional reference trait for guidance
56
+ * @returns {string} The formatted user prompt for Gate 2
57
+ */
22
58
  export declare function buildGate2UserPrompt(trait: Trait, entity: Entity, orbitalDescription: string, guidedTrait?: Trait): string;
23
59
  export declare function buildGate3SystemPrompt(): string;
60
+ /**
61
+ * Build the user prompt for Gate 3 (Transition Effects).
62
+ *
63
+ * Creates a prompt that guides the LLM to design guards and effects
64
+ * for a specific state machine transition.
65
+ *
66
+ * @param {Transition} transition - The transition to add effects to
67
+ * @param {Entity} entity - The entity managed by this state machine
68
+ * @param {StateMachine} sm - The full state machine for context
69
+ * @param {Transition} [guidedTransition] - Optional reference transition for guidance
70
+ * @returns {string} The formatted user prompt for Gate 3
71
+ */
24
72
  export declare function buildGate3UserPrompt(transition: Transition, entity: Entity, sm: StateMachine, guidedTransition?: Transition): string;
25
73
  export declare function buildGate4SystemPrompt(matchedPatterns?: string[]): string;
26
74
  export interface SlotContext {
27
75
  stateSlots: Record<string, 'main' | 'modal'>;
28
76
  exitsModal: boolean;
29
77
  }
78
+ /**
79
+ * Build the user prompt for Gate 4 (UI Rendering).
80
+ *
81
+ * Creates a prompt that guides the LLM to produce render-ui pattern trees
82
+ * for a transition's target state.
83
+ *
84
+ * @param {Transition} transition - The transition being rendered
85
+ * @param {Entity} entity - The entity being displayed
86
+ * @param {string} targetStateName - The state to render UI for
87
+ * @param {StateMachine} sm - The full state machine for context
88
+ * @param {SlotContext} slotContext - Context about which slots states render to
89
+ * @param {Array<{slot: string; tree: object}>} [guidedRenderEffects] - Optional reference render effects
90
+ * @returns {string} The formatted user prompt for Gate 4
91
+ */
30
92
  export declare function buildGate4UserPrompt(transition: Transition, entity: Entity, targetStateName: string, sm: StateMachine, slotContext: SlotContext, guidedRenderEffects?: Array<{
31
93
  slot: string;
32
94
  tree: Record<string, unknown>;