@elizaos/plugin-form 2.0.0-alpha.3 → 2.0.0-alpha.4
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/index.d.ts +2 -174
- package/dist/{node/index.node.js → index.js} +463 -373
- package/dist/index.js.map +30 -0
- package/package.json +4 -2
- package/dist/actions/restore.d.ts +0 -62
- package/dist/actions/restore.d.ts.map +0 -1
- package/dist/builder.d.ts +0 -320
- package/dist/builder.d.ts.map +0 -1
- package/dist/builtins.d.ts +0 -128
- package/dist/builtins.d.ts.map +0 -1
- package/dist/defaults.d.ts +0 -95
- package/dist/defaults.d.ts.map +0 -1
- package/dist/evaluators/extractor.d.ts +0 -91
- package/dist/evaluators/extractor.d.ts.map +0 -1
- package/dist/extraction.d.ts +0 -105
- package/dist/extraction.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/intent.d.ts +0 -116
- package/dist/intent.d.ts.map +0 -1
- package/dist/node/index.node.js.map +0 -29
- package/dist/providers/context.d.ts +0 -69
- package/dist/providers/context.d.ts.map +0 -1
- package/dist/service.d.ts +0 -407
- package/dist/service.d.ts.map +0 -1
- package/dist/storage.d.ts +0 -228
- package/dist/storage.d.ts.map +0 -1
- package/dist/tasks/nudge.d.ts +0 -89
- package/dist/tasks/nudge.d.ts.map +0 -1
- package/dist/template.d.ts +0 -10
- package/dist/template.d.ts.map +0 -1
- package/dist/ttl.d.ts +0 -144
- package/dist/ttl.d.ts.map +0 -1
- package/dist/types.d.ts +0 -1186
- package/dist/types.d.ts.map +0 -1
- package/dist/validation.d.ts +0 -177
- package/dist/validation.d.ts.map +0 -1
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module evaluators/extractor
|
|
3
|
-
* @description Form evaluator for field extraction and intent handling
|
|
4
|
-
*
|
|
5
|
-
* ## Role in Form Plugin
|
|
6
|
-
*
|
|
7
|
-
* The evaluator is the "brain" of the form plugin. It runs AFTER
|
|
8
|
-
* each user message and:
|
|
9
|
-
*
|
|
10
|
-
* 1. Detects user intent (submit, cancel, undo, etc.)
|
|
11
|
-
* 2. Extracts field values from natural language
|
|
12
|
-
* 3. Updates session state accordingly
|
|
13
|
-
* 4. Triggers lifecycle transitions
|
|
14
|
-
* 5. **Emits events** for widgets and other listeners
|
|
15
|
-
*
|
|
16
|
-
* ## Event Emission
|
|
17
|
-
*
|
|
18
|
-
* The evaluator emits standardized events as it processes messages:
|
|
19
|
-
*
|
|
20
|
-
* - `FORM_FIELD_EXTRACTED`: Value extracted for a simple field
|
|
21
|
-
* - `FORM_SUBFIELD_UPDATED`: Value extracted for a composite subfield
|
|
22
|
-
* - `FORM_SUBCONTROLS_FILLED`: All subcontrols of composite type filled
|
|
23
|
-
* - `FORM_EXTERNAL_ACTIVATED`: External type activated
|
|
24
|
-
*
|
|
25
|
-
* Widgets DON'T parse messages - they react to these events.
|
|
26
|
-
* This keeps parsing logic centralized in the evaluator.
|
|
27
|
-
*
|
|
28
|
-
* ## Processing Flow
|
|
29
|
-
*
|
|
30
|
-
* ```
|
|
31
|
-
* User Message → Evaluator.validate() → Should we run?
|
|
32
|
-
* ↓ Yes
|
|
33
|
-
* Evaluator.handler() →
|
|
34
|
-
* ↓
|
|
35
|
-
* quickIntentDetect() → Fast path for English
|
|
36
|
-
* ↓ No match
|
|
37
|
-
* llmIntentAndExtract() → LLM fallback
|
|
38
|
-
* ↓
|
|
39
|
-
* Handle intent (submit, stash, cancel, undo, etc.)
|
|
40
|
-
* ↓
|
|
41
|
-
* Process extractions (update fields OR subfields)
|
|
42
|
-
* ↓
|
|
43
|
-
* Emit events (FORM_FIELD_EXTRACTED, etc.)
|
|
44
|
-
* ↓
|
|
45
|
-
* Check composite types → Activate if all subfields filled
|
|
46
|
-
* ↓
|
|
47
|
-
* Save session
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* ## Why Evaluator (Not Action)
|
|
51
|
-
*
|
|
52
|
-
* We use an evaluator because:
|
|
53
|
-
*
|
|
54
|
-
* 1. **Runs Always**: Evaluators run on every message, not just when
|
|
55
|
-
* explicitly invoked. Form extraction should happen automatically.
|
|
56
|
-
*
|
|
57
|
-
* 2. **Post-Processing**: Evaluators run after actions, allowing the
|
|
58
|
-
* provider to set context and REPLY action to generate response.
|
|
59
|
-
*
|
|
60
|
-
* 3. **No Response Generation**: Evaluators don't generate responses,
|
|
61
|
-
* they just update state. The agent (REPLY) handles responses.
|
|
62
|
-
*
|
|
63
|
-
* ## Intent Handling
|
|
64
|
-
*
|
|
65
|
-
* Different intents are handled differently:
|
|
66
|
-
*
|
|
67
|
-
* - **Lifecycle** (submit, stash, cancel): Change session status
|
|
68
|
-
* - **UX** (undo, skip, autofill): Modify session without status change
|
|
69
|
-
* - **Info** (explain, example, progress): No state change, just context
|
|
70
|
-
* - **Data** (fill_form): Extract and update field values
|
|
71
|
-
*
|
|
72
|
-
* ## FORM_RESTORE Exception
|
|
73
|
-
*
|
|
74
|
-
* The 'restore' intent is handled by FORM_RESTORE action, not here.
|
|
75
|
-
* This is because restore needs to happen BEFORE the provider runs,
|
|
76
|
-
* so the agent has the restored form context for its response.
|
|
77
|
-
*/
|
|
78
|
-
import type { Evaluator } from "@elizaos/core";
|
|
79
|
-
/**
|
|
80
|
-
* Form Evaluator
|
|
81
|
-
*
|
|
82
|
-
* Runs after each message to:
|
|
83
|
-
* 1. Detect user intent (fast path for English, LLM fallback for other languages)
|
|
84
|
-
* 2. Extract field values from natural language
|
|
85
|
-
* 3. Handle lifecycle intents (submit, stash, cancel)
|
|
86
|
-
* 4. Handle UX intents (undo, skip, explain, example, progress, autofill)
|
|
87
|
-
* 5. Update session state
|
|
88
|
-
*/
|
|
89
|
-
export declare const formEvaluator: Evaluator;
|
|
90
|
-
export default formEvaluator;
|
|
91
|
-
//# sourceMappingURL=extractor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../src/evaluators/extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AAEH,OAAO,KAAK,EAGV,SAAS,EAMV,MAAM,eAAe,CAAC;AAavB;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,SA+N3B,CAAC;AA2UF,eAAe,aAAa,CAAC"}
|
package/dist/extraction.d.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module extraction
|
|
3
|
-
* @description LLM-based field extraction from natural language
|
|
4
|
-
*
|
|
5
|
-
* ## Design Philosophy
|
|
6
|
-
*
|
|
7
|
-
* Unlike traditional forms where users fill in specific fields, agent-native
|
|
8
|
-
* forms let users provide information naturally. The user might say:
|
|
9
|
-
*
|
|
10
|
-
* "I'm John, 25 years old, and my email is john@example.com"
|
|
11
|
-
*
|
|
12
|
-
* This module extracts: { name: "John", age: 25, email: "john@example.com" }
|
|
13
|
-
*
|
|
14
|
-
* ## Why LLM Extraction
|
|
15
|
-
*
|
|
16
|
-
* 1. **Natural Language**: Users don't think in form fields
|
|
17
|
-
* 2. **Babble Support**: One message can fill multiple fields
|
|
18
|
-
* 3. **Correction Handling**: "Actually, my name is Jon not John"
|
|
19
|
-
* 4. **Ambiguity Resolution**: LLM can ask for clarification
|
|
20
|
-
*
|
|
21
|
-
* ## Extraction Flow
|
|
22
|
-
*
|
|
23
|
-
* 1. Build a prompt with field definitions and user message
|
|
24
|
-
* 2. Ask LLM to extract values and assess confidence
|
|
25
|
-
* 3. Parse LLM's structured response
|
|
26
|
-
* 4. Validate extracted values against control rules
|
|
27
|
-
* 5. Return results with confidence scores
|
|
28
|
-
*
|
|
29
|
-
* ## Confidence Scores
|
|
30
|
-
*
|
|
31
|
-
* Each extraction has a confidence score (0-1):
|
|
32
|
-
* - 0.9-1.0: High confidence, auto-accept
|
|
33
|
-
* - 0.7-0.9: Medium confidence, might auto-accept
|
|
34
|
-
* - 0.5-0.7: Low confidence, ask for confirmation
|
|
35
|
-
* - 0.0-0.5: Very low, probably wrong
|
|
36
|
-
*
|
|
37
|
-
* The threshold is configurable per-field (FormControl.confirmThreshold).
|
|
38
|
-
*
|
|
39
|
-
* ## Bundled Intent + Extraction
|
|
40
|
-
*
|
|
41
|
-
* We detect intent AND extract values in a single LLM call because:
|
|
42
|
-
* - Reduces latency (one call vs two)
|
|
43
|
-
* - Context helps with both tasks
|
|
44
|
-
* - Intent affects what to extract
|
|
45
|
-
*/
|
|
46
|
-
import type { IAgentRuntime, JsonValue } from "@elizaos/core";
|
|
47
|
-
import type { FormControl, FormDefinition, ExtractionResult, IntentResult } from "./types";
|
|
48
|
-
import type { TemplateValues } from "./template";
|
|
49
|
-
/**
|
|
50
|
-
* Extract field values and detect intent from user message using LLM.
|
|
51
|
-
*
|
|
52
|
-
* This is the main extraction function called by the evaluator.
|
|
53
|
-
* It combines intent detection with field extraction in a single call.
|
|
54
|
-
*
|
|
55
|
-
* WHY single call:
|
|
56
|
-
* - LLM calls are expensive (latency and cost)
|
|
57
|
-
* - Intent and extraction share context
|
|
58
|
-
* - More accurate when done together
|
|
59
|
-
*
|
|
60
|
-
* @param runtime - Agent runtime for model access
|
|
61
|
-
* @param text - User message text
|
|
62
|
-
* @param form - Form definition for context
|
|
63
|
-
* @param controls - Fields to extract
|
|
64
|
-
* @returns Intent result with extractions
|
|
65
|
-
*/
|
|
66
|
-
export declare function llmIntentAndExtract(runtime: IAgentRuntime, text: string, form: FormDefinition, controls: FormControl[], templateValues?: TemplateValues): Promise<IntentResult>;
|
|
67
|
-
/**
|
|
68
|
-
* Extract a specific field value from user message.
|
|
69
|
-
*
|
|
70
|
-
* Used when asking for a specific field and expecting direct answer.
|
|
71
|
-
* Simpler prompt than full intent+extraction.
|
|
72
|
-
*
|
|
73
|
-
* WHY separate function:
|
|
74
|
-
* - When context is clear, full extraction is overkill
|
|
75
|
-
* - "What's your email?" -> "john@example.com" is simple
|
|
76
|
-
* - Faster, more focused extraction
|
|
77
|
-
*
|
|
78
|
-
* @param runtime - Agent runtime for model access
|
|
79
|
-
* @param text - User message text
|
|
80
|
-
* @param control - The field to extract
|
|
81
|
-
* @param debug - Enable debug logging
|
|
82
|
-
* @returns Extraction result or null if not found
|
|
83
|
-
*/
|
|
84
|
-
export declare function extractSingleField(runtime: IAgentRuntime, text: string, control: FormControl, debug?: boolean, templateValues?: TemplateValues): Promise<ExtractionResult | null>;
|
|
85
|
-
/**
|
|
86
|
-
* Detect if user is correcting a previous value.
|
|
87
|
-
*
|
|
88
|
-
* Looks for patterns like:
|
|
89
|
-
* - "Actually, my name is Jon not John"
|
|
90
|
-
* - "Sorry, I meant jon@gmail.com"
|
|
91
|
-
* - "Change my age to 26"
|
|
92
|
-
*
|
|
93
|
-
* WHY separate from main extraction:
|
|
94
|
-
* - Correction detection needs current values as context
|
|
95
|
-
* - More focused prompt for better accuracy
|
|
96
|
-
* - Can be skipped if no values exist
|
|
97
|
-
*
|
|
98
|
-
* @param runtime - Agent runtime for model access
|
|
99
|
-
* @param text - User message text
|
|
100
|
-
* @param currentValues - Currently filled values
|
|
101
|
-
* @param controls - Field definitions
|
|
102
|
-
* @returns Array of corrections (empty if no corrections)
|
|
103
|
-
*/
|
|
104
|
-
export declare function detectCorrection(runtime: IAgentRuntime, text: string, currentValues: Record<string, JsonValue>, controls: FormControl[], templateValues?: TemplateValues): Promise<ExtractionResult[]>;
|
|
105
|
-
//# sourceMappingURL=extraction.d.ts.map
|
package/dist/extraction.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../src/extraction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,KAA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|
-
/**
|
|
2
|
-
* @module intent
|
|
3
|
-
* @description Two-tier intent detection for form interactions
|
|
4
|
-
*
|
|
5
|
-
* ## Design Rationale
|
|
6
|
-
*
|
|
7
|
-
* Intent detection determines what the user wants to do:
|
|
8
|
-
* - Fill form fields? Submit? Cancel? Undo?
|
|
9
|
-
*
|
|
10
|
-
* We use a two-tier approach:
|
|
11
|
-
*
|
|
12
|
-
* ### Tier 1: Fast Path (English Keywords)
|
|
13
|
-
*
|
|
14
|
-
* Simple regex matching for common English phrases. This is:
|
|
15
|
-
* - **Fast**: No LLM call, instant response
|
|
16
|
-
* - **Reliable**: Simple patterns rarely fail
|
|
17
|
-
* - **Limited**: Only works for English, explicit commands
|
|
18
|
-
*
|
|
19
|
-
* Used for: "submit", "undo", "cancel", "skip", etc.
|
|
20
|
-
*
|
|
21
|
-
* ### Tier 2: LLM Fallback
|
|
22
|
-
*
|
|
23
|
-
* When fast path returns null, we use LLM for:
|
|
24
|
-
* - **Non-English**: "enviar" (Spanish for "submit")
|
|
25
|
-
* - **Ambiguous**: "I think I'm done?" (submit or just commenting?)
|
|
26
|
-
* - **Complex**: Multi-part messages with intent + data
|
|
27
|
-
*
|
|
28
|
-
* The LLM call also extracts field values, so we bundle
|
|
29
|
-
* intent detection with extraction to save latency.
|
|
30
|
-
*
|
|
31
|
-
* ## Why Fast Path First
|
|
32
|
-
*
|
|
33
|
-
* 1. **Latency**: LLM calls take 500ms-2s. Fast path is <1ms.
|
|
34
|
-
* 2. **Cost**: Each LLM call has token cost. Fast path is free.
|
|
35
|
-
* 3. **Reliability**: Regex patterns are deterministic. LLM can be unpredictable.
|
|
36
|
-
*
|
|
37
|
-
* ## Intent Categories
|
|
38
|
-
*
|
|
39
|
-
* **Lifecycle Intents** - Change session state:
|
|
40
|
-
* - submit, stash, restore, cancel
|
|
41
|
-
*
|
|
42
|
-
* **UX Intents** - Helper actions:
|
|
43
|
-
* - undo, skip, explain, example, progress, autofill
|
|
44
|
-
*
|
|
45
|
-
* **Data Intents** - Provide information:
|
|
46
|
-
* - fill_form (with extractions)
|
|
47
|
-
*
|
|
48
|
-
* **Fallback**:
|
|
49
|
-
* - other (unknown intent, may still have data)
|
|
50
|
-
*/
|
|
51
|
-
import type { FormIntent } from "./types";
|
|
52
|
-
/**
|
|
53
|
-
* Quick intent detection using English keywords.
|
|
54
|
-
*
|
|
55
|
-
* Fast path for common English phrases - avoids LLM call for obvious intents.
|
|
56
|
-
* Returns null if no match found, triggering LLM fallback.
|
|
57
|
-
*
|
|
58
|
-
* WHY regex-based:
|
|
59
|
-
* - Deterministic - same input always gives same output
|
|
60
|
-
* - Fast - no API calls, no parsing
|
|
61
|
-
* - Easy to add patterns
|
|
62
|
-
*
|
|
63
|
-
* WHY word boundaries (\b):
|
|
64
|
-
* - Prevents false matches ("undoing" matching "undo")
|
|
65
|
-
* - Allows matching in context ("I want to cancel")
|
|
66
|
-
*
|
|
67
|
-
* @param text - User message text
|
|
68
|
-
* @returns Detected intent or null if no fast-path match
|
|
69
|
-
*/
|
|
70
|
-
export declare function quickIntentDetect(text: string): FormIntent | null;
|
|
71
|
-
/**
|
|
72
|
-
* Check if intent is a lifecycle intent (affects session state).
|
|
73
|
-
*
|
|
74
|
-
* Lifecycle intents:
|
|
75
|
-
* - submit: Completes the form
|
|
76
|
-
* - stash: Saves for later
|
|
77
|
-
* - restore: Resumes a saved form
|
|
78
|
-
* - cancel: Abandons the form
|
|
79
|
-
*
|
|
80
|
-
* WHY this helper:
|
|
81
|
-
* - Lifecycle intents need special handling
|
|
82
|
-
* - Often preempt normal message processing
|
|
83
|
-
* - May need confirmation (e.g., cancel)
|
|
84
|
-
*/
|
|
85
|
-
export declare function isLifecycleIntent(intent: FormIntent): boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Check if intent is a UX intent (doesn't directly provide data).
|
|
88
|
-
*
|
|
89
|
-
* UX intents:
|
|
90
|
-
* - undo: Revert last change
|
|
91
|
-
* - skip: Skip optional field
|
|
92
|
-
* - explain: "Why do you need this?"
|
|
93
|
-
* - example: "Give me an example"
|
|
94
|
-
* - progress: "How far am I?"
|
|
95
|
-
* - autofill: "Use my saved values"
|
|
96
|
-
*
|
|
97
|
-
* WHY this helper:
|
|
98
|
-
* - UX intents are helper actions
|
|
99
|
-
* - Don't extract data, just modify session or provide info
|
|
100
|
-
* - Agent response is informational
|
|
101
|
-
*/
|
|
102
|
-
export declare function isUXIntent(intent: FormIntent): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Check if intent likely contains data to extract.
|
|
105
|
-
*
|
|
106
|
-
* Data intents:
|
|
107
|
-
* - fill_form: User is providing field values
|
|
108
|
-
* - other: Unknown intent, may have data
|
|
109
|
-
*
|
|
110
|
-
* WHY this helper:
|
|
111
|
-
* - Determines if we should run extraction
|
|
112
|
-
* - fill_form and other may have inline data
|
|
113
|
-
* - Lifecycle and UX intents don't have data
|
|
114
|
-
*/
|
|
115
|
-
export declare function hasDataToExtract(intent: FormIntent): boolean;
|
|
116
|
-
//# sourceMappingURL=intent.d.ts.map
|
package/dist/intent.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../src/intent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAgIjE;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAE7D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAStD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAE5D"}
|