@almadar/agent 3.5.11 → 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/behavior-gates/behavior-orchestrator.d.ts +11 -0
- package/dist/gates/behavior-gates/bg0-behavior-selection.d.ts +12 -0
- package/dist/gates/behavior-gates/bg0b-match.d.ts +14 -0
- package/dist/gates/behavior-gates/bg2-wiring.d.ts +10 -0
- package/dist/gates/behavior-gates/bg3-composition.d.ts +10 -0
- package/dist/gates/gate0-application.d.ts +13 -0
- package/dist/gates/index.js.map +1 -1
- package/dist/gates/prompts.d.ts +62 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -110,5 +110,19 @@ export interface ReviewOptions {
|
|
|
110
110
|
minScore?: number;
|
|
111
111
|
format?: 'json' | 'table';
|
|
112
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Review collected online evaluation samples.
|
|
115
|
+
*
|
|
116
|
+
* Displays a table or JSON summary of sampled evaluations for a given date,
|
|
117
|
+
* including scores, latency, provider, and success status.
|
|
118
|
+
*
|
|
119
|
+
* @param {OnlineEvalSampler} sampler - The sampler instance to pull samples from
|
|
120
|
+
* @param {ReviewOptions} [options] - Options for filtering and formatting output
|
|
121
|
+
* @param {string} [options.date] - Date to review (YYYY-MM-DD format, defaults to today)
|
|
122
|
+
* @param {number} [options.limit] - Maximum number of samples to show (default: 20)
|
|
123
|
+
* @param {number} [options.minScore] - Minimum score filter
|
|
124
|
+
* @param {string} [options.format] - Output format: 'json' or 'table' (default: table)
|
|
125
|
+
* @returns {Promise<void>}
|
|
126
|
+
*/
|
|
113
127
|
export declare function reviewSamples(sampler: OnlineEvalSampler, options?: ReviewOptions): Promise<void>;
|
|
114
128
|
export declare function createOnlineEvalSampler(config?: Partial<SamplingConfig>): OnlineEvalSampler;
|
|
@@ -10,6 +10,17 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { LLMClient } from '@almadar/llm';
|
|
12
12
|
import type { BehaviorPipelineConfig, BehaviorPipelineResult } from './types.js';
|
|
13
|
+
/**
|
|
14
|
+
* Execute the complete Behavior Pipeline.
|
|
15
|
+
*
|
|
16
|
+
* Chains all behavior gates: BG0-A (decompose, 1 LLM call) -> BG0-B (match, 1 LLM call)
|
|
17
|
+
* -> BG1 -> BG2 -> BG3 (all deterministic). Total: 2 LLM calls for any app size.
|
|
18
|
+
*
|
|
19
|
+
* @param {LLMClient} client - The LLM client to use for generation
|
|
20
|
+
* @param {string} prompt - The user's natural language request
|
|
21
|
+
* @param {BehaviorPipelineConfig} [config] - Optional pipeline configuration
|
|
22
|
+
* @returns {Promise<BehaviorPipelineResult>} The complete pipeline result with schema
|
|
23
|
+
*/
|
|
13
24
|
export declare function runBehaviorPipeline(client: LLMClient, prompt: string, config?: BehaviorPipelineConfig): Promise<BehaviorPipelineResult>;
|
|
14
25
|
/** Create the default Mistral Small client for behavior pipeline */
|
|
15
26
|
export declare function createBehaviorClient(): LLMClient;
|
|
@@ -8,4 +8,16 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { LLMClient } from '@almadar/llm';
|
|
10
10
|
import type { BehaviorPlan, BehaviorPipelineConfig } from './types.js';
|
|
11
|
+
/**
|
|
12
|
+
* Execute BG0: Behavior Selection.
|
|
13
|
+
*
|
|
14
|
+
* Selects behaviors from the standard library based on a natural language
|
|
15
|
+
* prompt and produces a BehaviorPlan. This is the first step in the
|
|
16
|
+
* behavior-based generation pipeline.
|
|
17
|
+
*
|
|
18
|
+
* @param {LLMClient} client - The LLM client to use for selection
|
|
19
|
+
* @param {string} prompt - The user's natural language request
|
|
20
|
+
* @param {BehaviorPipelineConfig} [_config] - Optional pipeline configuration
|
|
21
|
+
* @returns {Promise<BehaviorPlan>} The selected behavior plan
|
|
22
|
+
*/
|
|
11
23
|
export declare function runBG0(client: LLMClient, prompt: string, _config?: BehaviorPipelineConfig): Promise<BehaviorPlan>;
|
|
@@ -12,4 +12,18 @@
|
|
|
12
12
|
import type { LLMClient } from '@almadar/llm';
|
|
13
13
|
import type { BehaviorPlan, BehaviorPipelineConfig } from './types.js';
|
|
14
14
|
import type { DecomposeResult } from './bg0a-decompose.js';
|
|
15
|
+
/**
|
|
16
|
+
* Execute BG0-B: Per-Orbital Behavior Matching.
|
|
17
|
+
*
|
|
18
|
+
* Second LLM call in the behavior pipeline. For each orbital description
|
|
19
|
+
* from BG0-A, selects the best behavior from the catalog.
|
|
20
|
+
*
|
|
21
|
+
* Uses a single batched LLM call for all orbitals to keep total LLM calls at 2.
|
|
22
|
+
*
|
|
23
|
+
* @param {LLMClient} client - The LLM client to use for matching
|
|
24
|
+
* @param {DecomposeResult} decomposed - The decomposed result from BG0-A
|
|
25
|
+
* @param {string} originalPrompt - The original user request for context
|
|
26
|
+
* @param {BehaviorPipelineConfig} [_config] - Optional pipeline configuration
|
|
27
|
+
* @returns {Promise<BehaviorPlan>} The matched behavior plan
|
|
28
|
+
*/
|
|
15
29
|
export declare function runBG0B(client: LLMClient, decomposed: DecomposeResult, originalPrompt: string, _config?: BehaviorPipelineConfig): Promise<BehaviorPlan>;
|
|
@@ -8,4 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { OrbitalDefinition } from '@almadar/core/types';
|
|
10
10
|
import type { BehaviorPlan } from './types.js';
|
|
11
|
+
/**
|
|
12
|
+
* Execute BG2: Event Wiring.
|
|
13
|
+
*
|
|
14
|
+
* Zero LLM calls. Applies cross-orbital event wiring from the BehaviorPlan's
|
|
15
|
+
* suggestedWiring entries to connect orbitals via events.
|
|
16
|
+
*
|
|
17
|
+
* @param {OrbitalDefinition[]} orbitals - The orbitals to wire together
|
|
18
|
+
* @param {BehaviorPlan} plan - The behavior plan containing wiring suggestions
|
|
19
|
+
* @returns {Promise<OrbitalDefinition[]>} The wired orbitals
|
|
20
|
+
*/
|
|
11
21
|
export declare function runBG2(orbitals: OrbitalDefinition[], plan: BehaviorPlan): Promise<OrbitalDefinition[]>;
|
|
@@ -9,4 +9,14 @@
|
|
|
9
9
|
import type { ComposeBehaviorsResult } from '@almadar/core/builders';
|
|
10
10
|
import type { OrbitalDefinition } from '@almadar/core/types';
|
|
11
11
|
import type { BehaviorPlan } from './types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Execute BG3: Application Composition.
|
|
14
|
+
*
|
|
15
|
+
* Zero LLM calls. Uses composeBehaviors from @almadar/core to produce
|
|
16
|
+
* a complete OrbitalSchema with pages and layout.
|
|
17
|
+
*
|
|
18
|
+
* @param {OrbitalDefinition[]} orbitals - The wired orbitals to compose
|
|
19
|
+
* @param {BehaviorPlan} plan - The behavior plan containing composition settings
|
|
20
|
+
* @returns {Promise<ComposeBehaviorsResult>} The composed application schema
|
|
21
|
+
*/
|
|
12
22
|
export declare function runBG3(orbitals: OrbitalDefinition[], plan: BehaviorPlan): Promise<ComposeBehaviorsResult>;
|
|
@@ -10,4 +10,17 @@
|
|
|
10
10
|
import type { LLMClient } from '@almadar/llm';
|
|
11
11
|
import type { OrbitalSchema } from '@almadar/core/types';
|
|
12
12
|
import type { GateOpts, BehaviorGateData } from './types.js';
|
|
13
|
+
/**
|
|
14
|
+
* Execute Gate 0: Application Decomposition.
|
|
15
|
+
*
|
|
16
|
+
* Decomposes a natural language prompt into an initial orbital schema
|
|
17
|
+
* with entities, traits, and pages. This is the first gate in the
|
|
18
|
+
* multi-gate generation pipeline.
|
|
19
|
+
*
|
|
20
|
+
* @param {LLMClient} client - The LLM client to use for generation
|
|
21
|
+
* @param {string} prompt - The user's natural language request
|
|
22
|
+
* @param {GateOpts} [opts] - Optional configuration for the gate
|
|
23
|
+
* @param {BehaviorGateData} [behaviorData] - Optional guidance from behavior analysis
|
|
24
|
+
* @returns {Promise<OrbitalSchema>} The decomposed orbital schema
|
|
25
|
+
*/
|
|
13
26
|
export declare function runGate0(client: LLMClient, prompt: string, opts?: GateOpts, behaviorData?: BehaviorGateData): Promise<OrbitalSchema>;
|