@almadar/agent 3.5.7 → 3.5.12
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/dist/evals/online-sampling.d.ts +14 -0
- package/dist/gates/agentic/tools.d.ts +16 -6
- package/dist/gates/behavior-gates/behavior-orchestrator.d.ts +26 -0
- package/dist/gates/behavior-gates/behavior-prompts.d.ts +10 -0
- package/dist/gates/behavior-gates/bg0-behavior-selection.d.ts +23 -0
- package/dist/gates/behavior-gates/bg0a-decompose.d.ts +29 -0
- package/dist/gates/behavior-gates/bg0b-match.d.ts +29 -0
- package/dist/gates/behavior-gates/bg1-instantiation.d.ts +11 -0
- package/dist/gates/behavior-gates/bg2-wiring.d.ts +21 -0
- package/dist/gates/behavior-gates/bg3-composition.d.ts +22 -0
- package/dist/gates/behavior-gates/index.d.ts +16 -0
- package/dist/gates/behavior-gates/types.d.ts +53 -0
- package/dist/gates/gate0-application.d.ts +13 -0
- package/dist/gates/gate35-pattern-match.d.ts +23 -0
- package/dist/gates/gate4-render-ui.d.ts +1 -1
- package/dist/gates/index.js +486 -154
- package/dist/gates/index.js.map +1 -1
- package/dist/gates/prompts.d.ts +63 -1
- package/dist/gates/types.d.ts +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/gates/prompts.d.ts
CHANGED
|
@@ -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
|
-
export declare function buildGate4SystemPrompt(): string;
|
|
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>;
|
package/dist/gates/types.d.ts
CHANGED
|
@@ -19,8 +19,9 @@ import type { OrbitalSchema } from '@almadar/core/types';
|
|
|
19
19
|
* smart matching (picked std-kanban over std-list for tasks).
|
|
20
20
|
* - mistral-medium: Mistral Medium 3.1 via OpenRouter. Next tier up from Small,
|
|
21
21
|
* stronger reasoning, tool calling support.
|
|
22
|
+
* - anthropic: Claude via Anthropic API. Premium quality, highest accuracy.
|
|
22
23
|
*/
|
|
23
|
-
export type GateProvider = 'deepseek' | 'zhipu' | 'qwen3.5' | 'gemma3-4b' | 'mistral-small' | 'mistral-medium';
|
|
24
|
+
export type GateProvider = 'deepseek' | 'zhipu' | 'qwen3.5' | 'gemma3-4b' | 'mistral-small' | 'mistral-medium' | 'anthropic';
|
|
24
25
|
/** Whether the behavior source is injected into the user prompt. */
|
|
25
26
|
export type GateMode = 'guided' | 'pure';
|
|
26
27
|
/** Options passed to individual gate functions. */
|
|
@@ -59,6 +60,7 @@ export interface GateTimings {
|
|
|
59
60
|
gate1Ms: number[];
|
|
60
61
|
gate2Ms: number[];
|
|
61
62
|
gate3Ms: number[];
|
|
63
|
+
gate35Ms: number;
|
|
62
64
|
gate4Ms: number[];
|
|
63
65
|
totalMs: number;
|
|
64
66
|
}
|