llmist 0.6.1 → 0.7.0
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/{chunk-YWJSGEYT.js → chunk-CTC2WJZA.js} +2 -2
- package/dist/{chunk-KB7LMYC2.js → chunk-ZFHFBEQ5.js} +176 -28
- package/dist/chunk-ZFHFBEQ5.js.map +1 -0
- package/dist/cli.cjs +255 -91
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +70 -54
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +186 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{mock-stream-CCe8vISa.d.cts → mock-stream-B2qwECvd.d.cts} +75 -0
- package/dist/{mock-stream-CCe8vISa.d.ts → mock-stream-B2qwECvd.d.ts} +75 -0
- package/dist/testing/index.cjs +172 -24
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-KB7LMYC2.js.map +0 -1
- /package/dist/{chunk-YWJSGEYT.js.map → chunk-CTC2WJZA.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ZodType, ZodTypeAny } from 'zod';
|
|
2
2
|
export { z } from 'zod';
|
|
3
|
-
import { A as AgentHooks, o as ModelRegistry, L as LLMMessage, P as ParameterFormat, S as StreamEvent, G as GadgetRegistry, p as LLMStreamChunk, q as GadgetExample, B as BaseGadget, r as ParsedGadgetCall, s as GadgetExecutionResult, t as ProviderAdapter, u as ModelDescriptor, v as ModelSpec, w as LLMGenerationOptions, x as LLMStream } from './mock-stream-
|
|
4
|
-
export { F as AfterGadgetExecutionAction, I as AfterGadgetExecutionControllerContext, J as AfterLLMCallAction, K as AfterLLMCallControllerContext, N as AfterLLMErrorAction, y as AgentBuilder, O as AgentOptions, Q as BeforeGadgetExecutionAction, R as BeforeLLMCallAction, T as ChunkInterceptorContext, U as Controllers, ab as CostEstimate, al as DEFAULT_PROMPTS, E as EventHandlers, as as GadgetClass, V as GadgetExecutionControllerContext, at as GadgetOrClass, W as GadgetParameterInterceptorContext, X as GadgetResultInterceptorContext, H as HistoryMessage, Y as Interceptors, Z as LLMCallControllerContext, _ as LLMErrorControllerContext, aa as LLMMessageBuilder, a9 as LLMRole, a8 as LLMist, a7 as LLMistOptions, $ as MessageInterceptorContext, a as MockBuilder, d as MockManager, h as MockMatcher, i as MockMatcherContext, j as MockOptions, M as MockProviderAdapter, k as MockRegistration, l as MockResponse, n as MockStats, ac as ModelFeatures, ah as ModelIdentifierParser, ad as ModelLimits, ae as ModelPricing, a0 as ObserveChunkContext, a1 as ObserveGadgetCompleteContext, a2 as ObserveGadgetStartContext, a3 as ObserveLLMCallContext, a4 as ObserveLLMCompleteContext, a5 as ObserveLLMErrorContext, a6 as Observers, ai as PromptConfig, aj as PromptContext, ak as PromptTemplate, af as ProviderIdentifier, ao as QuickOptions, ar as StreamParser, au as TextOnlyAction, av as TextOnlyContext, aw as TextOnlyCustomHandler, ax as TextOnlyGadgetConfig, ay as TextOnlyHandler, az as TextOnlyStrategy, ag as TokenUsage, z as collectEvents, C as collectText, ap as complete, c as createMockAdapter, b as createMockClient, e as createMockStream, f as createTextMockStream, g as getMockManager, m as mockLLM, am as resolvePromptTemplate, an as resolveRulesTemplate, D as runWithHandlers, aq as stream } from './mock-stream-
|
|
3
|
+
import { A as AgentHooks, o as ModelRegistry, L as LLMMessage, P as ParameterFormat, S as StreamEvent, G as GadgetRegistry, p as LLMStreamChunk, q as GadgetExample, B as BaseGadget, r as ParsedGadgetCall, s as GadgetExecutionResult, t as ProviderAdapter, u as ModelDescriptor, v as ModelSpec, w as LLMGenerationOptions, x as LLMStream } from './mock-stream-B2qwECvd.cjs';
|
|
4
|
+
export { F as AfterGadgetExecutionAction, I as AfterGadgetExecutionControllerContext, J as AfterLLMCallAction, K as AfterLLMCallControllerContext, N as AfterLLMErrorAction, y as AgentBuilder, O as AgentOptions, Q as BeforeGadgetExecutionAction, R as BeforeLLMCallAction, T as ChunkInterceptorContext, U as Controllers, ab as CostEstimate, al as DEFAULT_PROMPTS, E as EventHandlers, as as GadgetClass, V as GadgetExecutionControllerContext, at as GadgetOrClass, W as GadgetParameterInterceptorContext, X as GadgetResultInterceptorContext, H as HistoryMessage, Y as Interceptors, Z as LLMCallControllerContext, _ as LLMErrorControllerContext, aa as LLMMessageBuilder, a9 as LLMRole, a8 as LLMist, a7 as LLMistOptions, $ as MessageInterceptorContext, a as MockBuilder, d as MockManager, h as MockMatcher, i as MockMatcherContext, j as MockOptions, M as MockProviderAdapter, k as MockRegistration, l as MockResponse, n as MockStats, ac as ModelFeatures, ah as ModelIdentifierParser, ad as ModelLimits, ae as ModelPricing, a0 as ObserveChunkContext, a1 as ObserveGadgetCompleteContext, a2 as ObserveGadgetStartContext, a3 as ObserveLLMCallContext, a4 as ObserveLLMCompleteContext, a5 as ObserveLLMErrorContext, a6 as Observers, ai as PromptConfig, aj as PromptContext, ak as PromptTemplate, af as ProviderIdentifier, ao as QuickOptions, ar as StreamParser, au as TextOnlyAction, av as TextOnlyContext, aw as TextOnlyCustomHandler, ax as TextOnlyGadgetConfig, ay as TextOnlyHandler, az as TextOnlyStrategy, ag as TokenUsage, z as collectEvents, C as collectText, ap as complete, c as createMockAdapter, b as createMockClient, e as createMockStream, f as createTextMockStream, g as getMockManager, m as mockLLM, am as resolvePromptTemplate, an as resolveRulesTemplate, D as runWithHandlers, aq as stream } from './mock-stream-B2qwECvd.cjs';
|
|
5
5
|
import { Logger, ILogObj } from 'tslog';
|
|
6
6
|
import { MessageCreateParamsStreaming, MessageStreamEvent } from '@anthropic-ai/sdk/resources/messages';
|
|
7
7
|
import OpenAI from 'openai';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ZodType, ZodTypeAny } from 'zod';
|
|
2
2
|
export { z } from 'zod';
|
|
3
|
-
import { A as AgentHooks, o as ModelRegistry, L as LLMMessage, P as ParameterFormat, S as StreamEvent, G as GadgetRegistry, p as LLMStreamChunk, q as GadgetExample, B as BaseGadget, r as ParsedGadgetCall, s as GadgetExecutionResult, t as ProviderAdapter, u as ModelDescriptor, v as ModelSpec, w as LLMGenerationOptions, x as LLMStream } from './mock-stream-
|
|
4
|
-
export { F as AfterGadgetExecutionAction, I as AfterGadgetExecutionControllerContext, J as AfterLLMCallAction, K as AfterLLMCallControllerContext, N as AfterLLMErrorAction, y as AgentBuilder, O as AgentOptions, Q as BeforeGadgetExecutionAction, R as BeforeLLMCallAction, T as ChunkInterceptorContext, U as Controllers, ab as CostEstimate, al as DEFAULT_PROMPTS, E as EventHandlers, as as GadgetClass, V as GadgetExecutionControllerContext, at as GadgetOrClass, W as GadgetParameterInterceptorContext, X as GadgetResultInterceptorContext, H as HistoryMessage, Y as Interceptors, Z as LLMCallControllerContext, _ as LLMErrorControllerContext, aa as LLMMessageBuilder, a9 as LLMRole, a8 as LLMist, a7 as LLMistOptions, $ as MessageInterceptorContext, a as MockBuilder, d as MockManager, h as MockMatcher, i as MockMatcherContext, j as MockOptions, M as MockProviderAdapter, k as MockRegistration, l as MockResponse, n as MockStats, ac as ModelFeatures, ah as ModelIdentifierParser, ad as ModelLimits, ae as ModelPricing, a0 as ObserveChunkContext, a1 as ObserveGadgetCompleteContext, a2 as ObserveGadgetStartContext, a3 as ObserveLLMCallContext, a4 as ObserveLLMCompleteContext, a5 as ObserveLLMErrorContext, a6 as Observers, ai as PromptConfig, aj as PromptContext, ak as PromptTemplate, af as ProviderIdentifier, ao as QuickOptions, ar as StreamParser, au as TextOnlyAction, av as TextOnlyContext, aw as TextOnlyCustomHandler, ax as TextOnlyGadgetConfig, ay as TextOnlyHandler, az as TextOnlyStrategy, ag as TokenUsage, z as collectEvents, C as collectText, ap as complete, c as createMockAdapter, b as createMockClient, e as createMockStream, f as createTextMockStream, g as getMockManager, m as mockLLM, am as resolvePromptTemplate, an as resolveRulesTemplate, D as runWithHandlers, aq as stream } from './mock-stream-
|
|
3
|
+
import { A as AgentHooks, o as ModelRegistry, L as LLMMessage, P as ParameterFormat, S as StreamEvent, G as GadgetRegistry, p as LLMStreamChunk, q as GadgetExample, B as BaseGadget, r as ParsedGadgetCall, s as GadgetExecutionResult, t as ProviderAdapter, u as ModelDescriptor, v as ModelSpec, w as LLMGenerationOptions, x as LLMStream } from './mock-stream-B2qwECvd.js';
|
|
4
|
+
export { F as AfterGadgetExecutionAction, I as AfterGadgetExecutionControllerContext, J as AfterLLMCallAction, K as AfterLLMCallControllerContext, N as AfterLLMErrorAction, y as AgentBuilder, O as AgentOptions, Q as BeforeGadgetExecutionAction, R as BeforeLLMCallAction, T as ChunkInterceptorContext, U as Controllers, ab as CostEstimate, al as DEFAULT_PROMPTS, E as EventHandlers, as as GadgetClass, V as GadgetExecutionControllerContext, at as GadgetOrClass, W as GadgetParameterInterceptorContext, X as GadgetResultInterceptorContext, H as HistoryMessage, Y as Interceptors, Z as LLMCallControllerContext, _ as LLMErrorControllerContext, aa as LLMMessageBuilder, a9 as LLMRole, a8 as LLMist, a7 as LLMistOptions, $ as MessageInterceptorContext, a as MockBuilder, d as MockManager, h as MockMatcher, i as MockMatcherContext, j as MockOptions, M as MockProviderAdapter, k as MockRegistration, l as MockResponse, n as MockStats, ac as ModelFeatures, ah as ModelIdentifierParser, ad as ModelLimits, ae as ModelPricing, a0 as ObserveChunkContext, a1 as ObserveGadgetCompleteContext, a2 as ObserveGadgetStartContext, a3 as ObserveLLMCallContext, a4 as ObserveLLMCompleteContext, a5 as ObserveLLMErrorContext, a6 as Observers, ai as PromptConfig, aj as PromptContext, ak as PromptTemplate, af as ProviderIdentifier, ao as QuickOptions, ar as StreamParser, au as TextOnlyAction, av as TextOnlyContext, aw as TextOnlyCustomHandler, ax as TextOnlyGadgetConfig, ay as TextOnlyHandler, az as TextOnlyStrategy, ag as TokenUsage, z as collectEvents, C as collectText, ap as complete, c as createMockAdapter, b as createMockClient, e as createMockStream, f as createTextMockStream, g as getMockManager, m as mockLLM, am as resolvePromptTemplate, an as resolveRulesTemplate, D as runWithHandlers, aq as stream } from './mock-stream-B2qwECvd.js';
|
|
5
5
|
import { Logger, ILogObj } from 'tslog';
|
|
6
6
|
import { MessageCreateParamsStreaming, MessageStreamEvent } from '@anthropic-ai/sdk/resources/messages';
|
|
7
7
|
import OpenAI from 'openai';
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
mockLLM,
|
|
11
11
|
validateAndApplyDefaults,
|
|
12
12
|
validateGadgetParams
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CTC2WJZA.js";
|
|
14
14
|
import {
|
|
15
15
|
AgentBuilder,
|
|
16
16
|
AnthropicMessagesProvider,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
resolveRulesTemplate,
|
|
75
75
|
runWithHandlers,
|
|
76
76
|
stream
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-ZFHFBEQ5.js";
|
|
78
78
|
|
|
79
79
|
// src/index.ts
|
|
80
80
|
init_builder();
|
|
@@ -142,6 +142,11 @@ declare class StreamParser {
|
|
|
142
142
|
* For new format, generates a unique invocation ID.
|
|
143
143
|
*/
|
|
144
144
|
private parseGadgetName;
|
|
145
|
+
/**
|
|
146
|
+
* Truncate verbose parse errors to avoid context overflow.
|
|
147
|
+
* Keeps first meaningful line and limits total length.
|
|
148
|
+
*/
|
|
149
|
+
private truncateParseError;
|
|
145
150
|
/**
|
|
146
151
|
* Parse parameter string according to configured format
|
|
147
152
|
*/
|
|
@@ -1560,6 +1565,18 @@ interface AgentOptions {
|
|
|
1560
1565
|
}>;
|
|
1561
1566
|
/** Text-only handler */
|
|
1562
1567
|
textOnlyHandler?: TextOnlyHandler;
|
|
1568
|
+
/**
|
|
1569
|
+
* Handler for text content that appears alongside gadget calls.
|
|
1570
|
+
* When set, text accompanying gadgets will be wrapped as a synthetic gadget call.
|
|
1571
|
+
*/
|
|
1572
|
+
textWithGadgetsHandler?: {
|
|
1573
|
+
/** Name of the gadget to use for wrapping text */
|
|
1574
|
+
gadgetName: string;
|
|
1575
|
+
/** Maps text content to gadget parameters */
|
|
1576
|
+
parameterMapping: (text: string) => Record<string, unknown>;
|
|
1577
|
+
/** Maps text content to the result string (optional, defaults to text) */
|
|
1578
|
+
resultMapping?: (text: string) => string;
|
|
1579
|
+
};
|
|
1563
1580
|
/** Stop on gadget error */
|
|
1564
1581
|
stopOnGadgetError?: boolean;
|
|
1565
1582
|
/** Custom error continuation logic */
|
|
@@ -1607,6 +1624,7 @@ declare class Agent {
|
|
|
1607
1624
|
private readonly gadgetEndPrefix?;
|
|
1608
1625
|
private readonly onHumanInputRequired?;
|
|
1609
1626
|
private readonly textOnlyHandler;
|
|
1627
|
+
private readonly textWithGadgetsHandler?;
|
|
1610
1628
|
private readonly stopOnGadgetError;
|
|
1611
1629
|
private readonly shouldContinueAfterError?;
|
|
1612
1630
|
private readonly defaultGadgetTimeoutMs?;
|
|
@@ -1736,6 +1754,7 @@ declare class AgentBuilder {
|
|
|
1736
1754
|
private gadgetStartPrefix?;
|
|
1737
1755
|
private gadgetEndPrefix?;
|
|
1738
1756
|
private textOnlyHandler?;
|
|
1757
|
+
private textWithGadgetsHandler?;
|
|
1739
1758
|
private stopOnGadgetError?;
|
|
1740
1759
|
private shouldContinueAfterError?;
|
|
1741
1760
|
private defaultGadgetTimeoutMs?;
|
|
@@ -1944,6 +1963,31 @@ declare class AgentBuilder {
|
|
|
1944
1963
|
* ```
|
|
1945
1964
|
*/
|
|
1946
1965
|
withTextOnlyHandler(handler: TextOnlyHandler): this;
|
|
1966
|
+
/**
|
|
1967
|
+
* Set the handler for text content that appears alongside gadget calls.
|
|
1968
|
+
*
|
|
1969
|
+
* When set, text accompanying gadget responses will be wrapped as a
|
|
1970
|
+
* synthetic gadget call before the actual gadget results in the
|
|
1971
|
+
* conversation history.
|
|
1972
|
+
*
|
|
1973
|
+
* @param handler - Configuration for wrapping text
|
|
1974
|
+
* @returns This builder for chaining
|
|
1975
|
+
*
|
|
1976
|
+
* @example
|
|
1977
|
+
* ```typescript
|
|
1978
|
+
* // Wrap text as TellUser gadget
|
|
1979
|
+
* .withTextWithGadgetsHandler({
|
|
1980
|
+
* gadgetName: "TellUser",
|
|
1981
|
+
* parameterMapping: (text) => ({ message: text, done: false, type: "info" }),
|
|
1982
|
+
* resultMapping: (text) => `ℹ️ ${text}`,
|
|
1983
|
+
* })
|
|
1984
|
+
* ```
|
|
1985
|
+
*/
|
|
1986
|
+
withTextWithGadgetsHandler(handler: {
|
|
1987
|
+
gadgetName: string;
|
|
1988
|
+
parameterMapping: (text: string) => Record<string, unknown>;
|
|
1989
|
+
resultMapping?: (text: string) => string;
|
|
1990
|
+
}): this;
|
|
1947
1991
|
/**
|
|
1948
1992
|
* Set whether to stop gadget execution on first error.
|
|
1949
1993
|
*
|
|
@@ -2042,6 +2086,37 @@ declare class AgentBuilder {
|
|
|
2042
2086
|
* ```
|
|
2043
2087
|
*/
|
|
2044
2088
|
withGadgetOutputLimitPercent(percent: number): this;
|
|
2089
|
+
/**
|
|
2090
|
+
* Add a synthetic gadget call to the conversation history.
|
|
2091
|
+
*
|
|
2092
|
+
* This is useful for in-context learning - showing the LLM what "past self"
|
|
2093
|
+
* did correctly so it mimics the pattern. The call is formatted with proper
|
|
2094
|
+
* markers and parameter format.
|
|
2095
|
+
*
|
|
2096
|
+
* @param gadgetName - Name of the gadget
|
|
2097
|
+
* @param parameters - Parameters passed to the gadget
|
|
2098
|
+
* @param result - Result returned by the gadget
|
|
2099
|
+
* @returns This builder for chaining
|
|
2100
|
+
*
|
|
2101
|
+
* @example
|
|
2102
|
+
* ```typescript
|
|
2103
|
+
* .withSyntheticGadgetCall(
|
|
2104
|
+
* 'TellUser',
|
|
2105
|
+
* {
|
|
2106
|
+
* message: '👋 Hello!\n\nHere\'s what I can do:\n- Analyze code\n- Run commands',
|
|
2107
|
+
* done: false,
|
|
2108
|
+
* type: 'info'
|
|
2109
|
+
* },
|
|
2110
|
+
* 'ℹ️ 👋 Hello!\n\nHere\'s what I can do:\n- Analyze code\n- Run commands'
|
|
2111
|
+
* )
|
|
2112
|
+
* ```
|
|
2113
|
+
*/
|
|
2114
|
+
withSyntheticGadgetCall(gadgetName: string, parameters: Record<string, unknown>, result: string): this;
|
|
2115
|
+
/**
|
|
2116
|
+
* Format parameters for synthetic gadget calls.
|
|
2117
|
+
* Uses heredoc for multiline string values.
|
|
2118
|
+
*/
|
|
2119
|
+
private formatSyntheticParameters;
|
|
2045
2120
|
/**
|
|
2046
2121
|
* Build and create the agent with the given user prompt.
|
|
2047
2122
|
* Returns the Agent instance ready to run.
|
|
@@ -142,6 +142,11 @@ declare class StreamParser {
|
|
|
142
142
|
* For new format, generates a unique invocation ID.
|
|
143
143
|
*/
|
|
144
144
|
private parseGadgetName;
|
|
145
|
+
/**
|
|
146
|
+
* Truncate verbose parse errors to avoid context overflow.
|
|
147
|
+
* Keeps first meaningful line and limits total length.
|
|
148
|
+
*/
|
|
149
|
+
private truncateParseError;
|
|
145
150
|
/**
|
|
146
151
|
* Parse parameter string according to configured format
|
|
147
152
|
*/
|
|
@@ -1560,6 +1565,18 @@ interface AgentOptions {
|
|
|
1560
1565
|
}>;
|
|
1561
1566
|
/** Text-only handler */
|
|
1562
1567
|
textOnlyHandler?: TextOnlyHandler;
|
|
1568
|
+
/**
|
|
1569
|
+
* Handler for text content that appears alongside gadget calls.
|
|
1570
|
+
* When set, text accompanying gadgets will be wrapped as a synthetic gadget call.
|
|
1571
|
+
*/
|
|
1572
|
+
textWithGadgetsHandler?: {
|
|
1573
|
+
/** Name of the gadget to use for wrapping text */
|
|
1574
|
+
gadgetName: string;
|
|
1575
|
+
/** Maps text content to gadget parameters */
|
|
1576
|
+
parameterMapping: (text: string) => Record<string, unknown>;
|
|
1577
|
+
/** Maps text content to the result string (optional, defaults to text) */
|
|
1578
|
+
resultMapping?: (text: string) => string;
|
|
1579
|
+
};
|
|
1563
1580
|
/** Stop on gadget error */
|
|
1564
1581
|
stopOnGadgetError?: boolean;
|
|
1565
1582
|
/** Custom error continuation logic */
|
|
@@ -1607,6 +1624,7 @@ declare class Agent {
|
|
|
1607
1624
|
private readonly gadgetEndPrefix?;
|
|
1608
1625
|
private readonly onHumanInputRequired?;
|
|
1609
1626
|
private readonly textOnlyHandler;
|
|
1627
|
+
private readonly textWithGadgetsHandler?;
|
|
1610
1628
|
private readonly stopOnGadgetError;
|
|
1611
1629
|
private readonly shouldContinueAfterError?;
|
|
1612
1630
|
private readonly defaultGadgetTimeoutMs?;
|
|
@@ -1736,6 +1754,7 @@ declare class AgentBuilder {
|
|
|
1736
1754
|
private gadgetStartPrefix?;
|
|
1737
1755
|
private gadgetEndPrefix?;
|
|
1738
1756
|
private textOnlyHandler?;
|
|
1757
|
+
private textWithGadgetsHandler?;
|
|
1739
1758
|
private stopOnGadgetError?;
|
|
1740
1759
|
private shouldContinueAfterError?;
|
|
1741
1760
|
private defaultGadgetTimeoutMs?;
|
|
@@ -1944,6 +1963,31 @@ declare class AgentBuilder {
|
|
|
1944
1963
|
* ```
|
|
1945
1964
|
*/
|
|
1946
1965
|
withTextOnlyHandler(handler: TextOnlyHandler): this;
|
|
1966
|
+
/**
|
|
1967
|
+
* Set the handler for text content that appears alongside gadget calls.
|
|
1968
|
+
*
|
|
1969
|
+
* When set, text accompanying gadget responses will be wrapped as a
|
|
1970
|
+
* synthetic gadget call before the actual gadget results in the
|
|
1971
|
+
* conversation history.
|
|
1972
|
+
*
|
|
1973
|
+
* @param handler - Configuration for wrapping text
|
|
1974
|
+
* @returns This builder for chaining
|
|
1975
|
+
*
|
|
1976
|
+
* @example
|
|
1977
|
+
* ```typescript
|
|
1978
|
+
* // Wrap text as TellUser gadget
|
|
1979
|
+
* .withTextWithGadgetsHandler({
|
|
1980
|
+
* gadgetName: "TellUser",
|
|
1981
|
+
* parameterMapping: (text) => ({ message: text, done: false, type: "info" }),
|
|
1982
|
+
* resultMapping: (text) => `ℹ️ ${text}`,
|
|
1983
|
+
* })
|
|
1984
|
+
* ```
|
|
1985
|
+
*/
|
|
1986
|
+
withTextWithGadgetsHandler(handler: {
|
|
1987
|
+
gadgetName: string;
|
|
1988
|
+
parameterMapping: (text: string) => Record<string, unknown>;
|
|
1989
|
+
resultMapping?: (text: string) => string;
|
|
1990
|
+
}): this;
|
|
1947
1991
|
/**
|
|
1948
1992
|
* Set whether to stop gadget execution on first error.
|
|
1949
1993
|
*
|
|
@@ -2042,6 +2086,37 @@ declare class AgentBuilder {
|
|
|
2042
2086
|
* ```
|
|
2043
2087
|
*/
|
|
2044
2088
|
withGadgetOutputLimitPercent(percent: number): this;
|
|
2089
|
+
/**
|
|
2090
|
+
* Add a synthetic gadget call to the conversation history.
|
|
2091
|
+
*
|
|
2092
|
+
* This is useful for in-context learning - showing the LLM what "past self"
|
|
2093
|
+
* did correctly so it mimics the pattern. The call is formatted with proper
|
|
2094
|
+
* markers and parameter format.
|
|
2095
|
+
*
|
|
2096
|
+
* @param gadgetName - Name of the gadget
|
|
2097
|
+
* @param parameters - Parameters passed to the gadget
|
|
2098
|
+
* @param result - Result returned by the gadget
|
|
2099
|
+
* @returns This builder for chaining
|
|
2100
|
+
*
|
|
2101
|
+
* @example
|
|
2102
|
+
* ```typescript
|
|
2103
|
+
* .withSyntheticGadgetCall(
|
|
2104
|
+
* 'TellUser',
|
|
2105
|
+
* {
|
|
2106
|
+
* message: '👋 Hello!\n\nHere\'s what I can do:\n- Analyze code\n- Run commands',
|
|
2107
|
+
* done: false,
|
|
2108
|
+
* type: 'info'
|
|
2109
|
+
* },
|
|
2110
|
+
* 'ℹ️ 👋 Hello!\n\nHere\'s what I can do:\n- Analyze code\n- Run commands'
|
|
2111
|
+
* )
|
|
2112
|
+
* ```
|
|
2113
|
+
*/
|
|
2114
|
+
withSyntheticGadgetCall(gadgetName: string, parameters: Record<string, unknown>, result: string): this;
|
|
2115
|
+
/**
|
|
2116
|
+
* Format parameters for synthetic gadget calls.
|
|
2117
|
+
* Uses heredoc for multiline string values.
|
|
2118
|
+
*/
|
|
2119
|
+
private formatSyntheticParameters;
|
|
2045
2120
|
/**
|
|
2046
2121
|
* Build and create the agent with the given user prompt.
|
|
2047
2122
|
* Returns the Agent instance ready to run.
|
package/dist/testing/index.cjs
CHANGED
|
@@ -703,7 +703,9 @@ This content can contain:
|
|
|
703
703
|
- Multiple paragraphs
|
|
704
704
|
EOF
|
|
705
705
|
|
|
706
|
-
The delimiter (EOF) can be any identifier. The closing delimiter must be on its own line
|
|
706
|
+
The delimiter (EOF) can be any identifier. The closing delimiter must be on its own line.
|
|
707
|
+
IMPORTANT: Content inside heredoc is LITERAL - do NOT escape backticks, dollar signs, or any characters.
|
|
708
|
+
NEVER use TOML triple-quote strings ("""). ALWAYS use heredoc syntax (<<<EOF...EOF) for multiline content.`);
|
|
707
709
|
}
|
|
708
710
|
return parts.join("");
|
|
709
711
|
}
|
|
@@ -751,9 +753,9 @@ ${this.endPrefix}`
|
|
|
751
753
|
if (format === "toml") {
|
|
752
754
|
return Object.entries(parameters).map(([key, value]) => {
|
|
753
755
|
if (typeof value === "string" && value.includes("\n")) {
|
|
754
|
-
return `${key} =
|
|
756
|
+
return `${key} = <<<EOF
|
|
755
757
|
${value}
|
|
756
|
-
|
|
758
|
+
EOF`;
|
|
757
759
|
}
|
|
758
760
|
return `${key} = ${JSON.stringify(value)}`;
|
|
759
761
|
}).join("\n");
|
|
@@ -920,6 +922,10 @@ function formatParamsAsYaml(params) {
|
|
|
920
922
|
}
|
|
921
923
|
return lines.join("\n");
|
|
922
924
|
}
|
|
925
|
+
function formatTomlInlineTable(obj) {
|
|
926
|
+
const entries = Object.entries(obj).map(([k, v]) => `${k} = ${formatTomlValue(v)}`);
|
|
927
|
+
return `{ ${entries.join(", ")} }`;
|
|
928
|
+
}
|
|
923
929
|
function formatTomlValue(value) {
|
|
924
930
|
if (typeof value === "string") {
|
|
925
931
|
if (value.includes("\n")) {
|
|
@@ -937,10 +943,17 @@ ${delimiter}`;
|
|
|
937
943
|
return '""';
|
|
938
944
|
}
|
|
939
945
|
if (Array.isArray(value)) {
|
|
940
|
-
|
|
946
|
+
if (value.length === 0) return "[]";
|
|
947
|
+
const items = value.map((item) => {
|
|
948
|
+
if (typeof item === "object" && item !== null && !Array.isArray(item)) {
|
|
949
|
+
return formatTomlInlineTable(item);
|
|
950
|
+
}
|
|
951
|
+
return formatTomlValue(item);
|
|
952
|
+
});
|
|
953
|
+
return `[${items.join(", ")}]`;
|
|
941
954
|
}
|
|
942
955
|
if (typeof value === "object") {
|
|
943
|
-
return
|
|
956
|
+
return formatTomlInlineTable(value);
|
|
944
957
|
}
|
|
945
958
|
return JSON.stringify(value);
|
|
946
959
|
}
|
|
@@ -1631,7 +1644,8 @@ var init_executor = __esm({
|
|
|
1631
1644
|
if (call.parseError || !call.parameters) {
|
|
1632
1645
|
this.logger.error("Gadget parameter parse error", {
|
|
1633
1646
|
gadgetName: call.gadgetName,
|
|
1634
|
-
parseError: call.parseError
|
|
1647
|
+
parseError: call.parseError,
|
|
1648
|
+
rawParameters: call.parametersYaml
|
|
1635
1649
|
});
|
|
1636
1650
|
return {
|
|
1637
1651
|
gadgetName: call.gadgetName,
|
|
@@ -1910,6 +1924,9 @@ function preprocessYaml(yamlStr) {
|
|
|
1910
1924
|
}
|
|
1911
1925
|
return result.join("\n");
|
|
1912
1926
|
}
|
|
1927
|
+
function unescapeHeredocContent(content) {
|
|
1928
|
+
return content.replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\{/g, "{").replace(/\\}/g, "}");
|
|
1929
|
+
}
|
|
1913
1930
|
function preprocessTomlHeredoc(tomlStr) {
|
|
1914
1931
|
const lines = tomlStr.split("\n");
|
|
1915
1932
|
const result = [];
|
|
@@ -1935,13 +1952,13 @@ function preprocessTomlHeredoc(tomlStr) {
|
|
|
1935
1952
|
i++;
|
|
1936
1953
|
}
|
|
1937
1954
|
if (bodyLines.length === 0) {
|
|
1938
|
-
result.push(`${indent}${key} =
|
|
1955
|
+
result.push(`${indent}${key} = ''''''`);
|
|
1939
1956
|
} else {
|
|
1940
|
-
result.push(`${indent}${key} =
|
|
1957
|
+
result.push(`${indent}${key} = '''`);
|
|
1941
1958
|
for (let j = 0; j < bodyLines.length - 1; j++) {
|
|
1942
|
-
result.push(bodyLines[j]);
|
|
1959
|
+
result.push(unescapeHeredocContent(bodyLines[j]));
|
|
1943
1960
|
}
|
|
1944
|
-
result.push(`${bodyLines[bodyLines.length - 1]}
|
|
1961
|
+
result.push(`${unescapeHeredocContent(bodyLines[bodyLines.length - 1])}'''`);
|
|
1945
1962
|
}
|
|
1946
1963
|
if (!foundClosing) {
|
|
1947
1964
|
}
|
|
@@ -1952,6 +1969,14 @@ function preprocessTomlHeredoc(tomlStr) {
|
|
|
1952
1969
|
}
|
|
1953
1970
|
return result.join("\n");
|
|
1954
1971
|
}
|
|
1972
|
+
function stripMarkdownFences(content) {
|
|
1973
|
+
let cleaned = content.trim();
|
|
1974
|
+
const openingFence = /^```(?:toml|yaml|json)?\s*\n/i;
|
|
1975
|
+
const closingFence = /\n?```\s*$/;
|
|
1976
|
+
cleaned = cleaned.replace(openingFence, "");
|
|
1977
|
+
cleaned = cleaned.replace(closingFence, "");
|
|
1978
|
+
return cleaned.trim();
|
|
1979
|
+
}
|
|
1955
1980
|
var yaml2, import_js_toml, globalInvocationCounter, StreamParser;
|
|
1956
1981
|
var init_parser = __esm({
|
|
1957
1982
|
"src/gadgets/parser.ts"() {
|
|
@@ -1990,43 +2015,55 @@ var init_parser = __esm({
|
|
|
1990
2015
|
}
|
|
1991
2016
|
return { actualName: gadgetName, invocationId: `gadget_${++globalInvocationCounter}` };
|
|
1992
2017
|
}
|
|
2018
|
+
/**
|
|
2019
|
+
* Truncate verbose parse errors to avoid context overflow.
|
|
2020
|
+
* Keeps first meaningful line and limits total length.
|
|
2021
|
+
*/
|
|
2022
|
+
truncateParseError(error, format) {
|
|
2023
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2024
|
+
const firstLine = message.split("\n")[0];
|
|
2025
|
+
const maxLen = 200;
|
|
2026
|
+
if (firstLine.length <= maxLen) {
|
|
2027
|
+
return firstLine;
|
|
2028
|
+
}
|
|
2029
|
+
return `${firstLine.slice(0, maxLen)}... (${message.length} chars total)`;
|
|
2030
|
+
}
|
|
1993
2031
|
/**
|
|
1994
2032
|
* Parse parameter string according to configured format
|
|
1995
2033
|
*/
|
|
1996
2034
|
parseParameters(raw) {
|
|
2035
|
+
const cleaned = stripMarkdownFences(raw);
|
|
1997
2036
|
if (this.parameterFormat === "json") {
|
|
1998
2037
|
try {
|
|
1999
|
-
return { parameters: JSON.parse(
|
|
2038
|
+
return { parameters: JSON.parse(cleaned) };
|
|
2000
2039
|
} catch (error) {
|
|
2001
|
-
return { parseError: error
|
|
2040
|
+
return { parseError: this.truncateParseError(error, "JSON") };
|
|
2002
2041
|
}
|
|
2003
2042
|
}
|
|
2004
2043
|
if (this.parameterFormat === "yaml") {
|
|
2005
2044
|
try {
|
|
2006
|
-
return { parameters: yaml2.load(preprocessYaml(
|
|
2045
|
+
return { parameters: yaml2.load(preprocessYaml(cleaned)) };
|
|
2007
2046
|
} catch (error) {
|
|
2008
|
-
return { parseError: error
|
|
2047
|
+
return { parseError: this.truncateParseError(error, "YAML") };
|
|
2009
2048
|
}
|
|
2010
2049
|
}
|
|
2011
2050
|
if (this.parameterFormat === "toml") {
|
|
2012
2051
|
try {
|
|
2013
|
-
return { parameters: (0, import_js_toml.load)(preprocessTomlHeredoc(
|
|
2052
|
+
return { parameters: (0, import_js_toml.load)(preprocessTomlHeredoc(cleaned)) };
|
|
2014
2053
|
} catch (error) {
|
|
2015
|
-
return { parseError: error
|
|
2054
|
+
return { parseError: this.truncateParseError(error, "TOML") };
|
|
2016
2055
|
}
|
|
2017
2056
|
}
|
|
2018
2057
|
try {
|
|
2019
|
-
return { parameters: JSON.parse(
|
|
2058
|
+
return { parameters: JSON.parse(cleaned) };
|
|
2020
2059
|
} catch {
|
|
2021
2060
|
try {
|
|
2022
|
-
return { parameters: (0, import_js_toml.load)(preprocessTomlHeredoc(
|
|
2061
|
+
return { parameters: (0, import_js_toml.load)(preprocessTomlHeredoc(cleaned)) };
|
|
2023
2062
|
} catch {
|
|
2024
2063
|
try {
|
|
2025
|
-
return { parameters: yaml2.load(preprocessYaml(
|
|
2064
|
+
return { parameters: yaml2.load(preprocessYaml(cleaned)) };
|
|
2026
2065
|
} catch (error) {
|
|
2027
|
-
return {
|
|
2028
|
-
parseError: error instanceof Error ? error.message : "Failed to parse as JSON, TOML, or YAML"
|
|
2029
|
-
};
|
|
2066
|
+
return { parseError: this.truncateParseError(error, "auto") };
|
|
2030
2067
|
}
|
|
2031
2068
|
}
|
|
2032
2069
|
}
|
|
@@ -2328,7 +2365,8 @@ var init_stream_processor = __esm({
|
|
|
2328
2365
|
if (call.parseError) {
|
|
2329
2366
|
this.logger.warn("Gadget has parse error", {
|
|
2330
2367
|
gadgetName: call.gadgetName,
|
|
2331
|
-
error: call.parseError
|
|
2368
|
+
error: call.parseError,
|
|
2369
|
+
rawParameters: call.parametersYaml
|
|
2332
2370
|
});
|
|
2333
2371
|
const shouldContinue = await this.checkContinueAfterError(
|
|
2334
2372
|
call.parseError,
|
|
@@ -2569,6 +2607,7 @@ var init_agent = __esm({
|
|
|
2569
2607
|
gadgetEndPrefix;
|
|
2570
2608
|
onHumanInputRequired;
|
|
2571
2609
|
textOnlyHandler;
|
|
2610
|
+
textWithGadgetsHandler;
|
|
2572
2611
|
stopOnGadgetError;
|
|
2573
2612
|
shouldContinueAfterError;
|
|
2574
2613
|
defaultGadgetTimeoutMs;
|
|
@@ -2599,6 +2638,7 @@ var init_agent = __esm({
|
|
|
2599
2638
|
this.gadgetEndPrefix = options.gadgetEndPrefix;
|
|
2600
2639
|
this.onHumanInputRequired = options.onHumanInputRequired;
|
|
2601
2640
|
this.textOnlyHandler = options.textOnlyHandler ?? "terminate";
|
|
2641
|
+
this.textWithGadgetsHandler = options.textWithGadgetsHandler;
|
|
2602
2642
|
this.stopOnGadgetError = options.stopOnGadgetError ?? true;
|
|
2603
2643
|
this.shouldContinueAfterError = options.shouldContinueAfterError;
|
|
2604
2644
|
this.defaultGadgetTimeoutMs = options.defaultGadgetTimeoutMs;
|
|
@@ -2786,6 +2826,17 @@ var init_agent = __esm({
|
|
|
2786
2826
|
}
|
|
2787
2827
|
}
|
|
2788
2828
|
if (result.didExecuteGadgets) {
|
|
2829
|
+
if (this.textWithGadgetsHandler) {
|
|
2830
|
+
const textContent = result.outputs.filter((output) => output.type === "text").map((output) => output.content).join("");
|
|
2831
|
+
if (textContent.trim()) {
|
|
2832
|
+
const { gadgetName, parameterMapping, resultMapping } = this.textWithGadgetsHandler;
|
|
2833
|
+
this.conversation.addGadgetCall(
|
|
2834
|
+
gadgetName,
|
|
2835
|
+
parameterMapping(textContent),
|
|
2836
|
+
resultMapping ? resultMapping(textContent) : textContent
|
|
2837
|
+
);
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2789
2840
|
for (const output of result.outputs) {
|
|
2790
2841
|
if (output.type === "gadget_result") {
|
|
2791
2842
|
const gadgetResult = output.result;
|
|
@@ -2797,7 +2848,13 @@ var init_agent = __esm({
|
|
|
2797
2848
|
}
|
|
2798
2849
|
}
|
|
2799
2850
|
} else {
|
|
2800
|
-
|
|
2851
|
+
if (finalMessage.trim()) {
|
|
2852
|
+
this.conversation.addGadgetCall(
|
|
2853
|
+
"TellUser",
|
|
2854
|
+
{ message: finalMessage, done: false, type: "info" },
|
|
2855
|
+
`\u2139\uFE0F ${finalMessage}`
|
|
2856
|
+
);
|
|
2857
|
+
}
|
|
2801
2858
|
const shouldBreak = await this.handleTextOnlyResponse(finalMessage);
|
|
2802
2859
|
if (shouldBreak) {
|
|
2803
2860
|
break;
|
|
@@ -2982,6 +3039,7 @@ var AgentBuilder;
|
|
|
2982
3039
|
var init_builder = __esm({
|
|
2983
3040
|
"src/agent/builder.ts"() {
|
|
2984
3041
|
"use strict";
|
|
3042
|
+
init_constants();
|
|
2985
3043
|
init_model_shortcuts();
|
|
2986
3044
|
init_registry();
|
|
2987
3045
|
init_agent();
|
|
@@ -3003,6 +3061,7 @@ var init_builder = __esm({
|
|
|
3003
3061
|
gadgetStartPrefix;
|
|
3004
3062
|
gadgetEndPrefix;
|
|
3005
3063
|
textOnlyHandler;
|
|
3064
|
+
textWithGadgetsHandler;
|
|
3006
3065
|
stopOnGadgetError;
|
|
3007
3066
|
shouldContinueAfterError;
|
|
3008
3067
|
defaultGadgetTimeoutMs;
|
|
@@ -3265,6 +3324,30 @@ var init_builder = __esm({
|
|
|
3265
3324
|
this.textOnlyHandler = handler;
|
|
3266
3325
|
return this;
|
|
3267
3326
|
}
|
|
3327
|
+
/**
|
|
3328
|
+
* Set the handler for text content that appears alongside gadget calls.
|
|
3329
|
+
*
|
|
3330
|
+
* When set, text accompanying gadget responses will be wrapped as a
|
|
3331
|
+
* synthetic gadget call before the actual gadget results in the
|
|
3332
|
+
* conversation history.
|
|
3333
|
+
*
|
|
3334
|
+
* @param handler - Configuration for wrapping text
|
|
3335
|
+
* @returns This builder for chaining
|
|
3336
|
+
*
|
|
3337
|
+
* @example
|
|
3338
|
+
* ```typescript
|
|
3339
|
+
* // Wrap text as TellUser gadget
|
|
3340
|
+
* .withTextWithGadgetsHandler({
|
|
3341
|
+
* gadgetName: "TellUser",
|
|
3342
|
+
* parameterMapping: (text) => ({ message: text, done: false, type: "info" }),
|
|
3343
|
+
* resultMapping: (text) => `ℹ️ ${text}`,
|
|
3344
|
+
* })
|
|
3345
|
+
* ```
|
|
3346
|
+
*/
|
|
3347
|
+
withTextWithGadgetsHandler(handler) {
|
|
3348
|
+
this.textWithGadgetsHandler = handler;
|
|
3349
|
+
return this;
|
|
3350
|
+
}
|
|
3268
3351
|
/**
|
|
3269
3352
|
* Set whether to stop gadget execution on first error.
|
|
3270
3353
|
*
|
|
@@ -3379,6 +3462,69 @@ var init_builder = __esm({
|
|
|
3379
3462
|
this.gadgetOutputLimitPercent = percent;
|
|
3380
3463
|
return this;
|
|
3381
3464
|
}
|
|
3465
|
+
/**
|
|
3466
|
+
* Add a synthetic gadget call to the conversation history.
|
|
3467
|
+
*
|
|
3468
|
+
* This is useful for in-context learning - showing the LLM what "past self"
|
|
3469
|
+
* did correctly so it mimics the pattern. The call is formatted with proper
|
|
3470
|
+
* markers and parameter format.
|
|
3471
|
+
*
|
|
3472
|
+
* @param gadgetName - Name of the gadget
|
|
3473
|
+
* @param parameters - Parameters passed to the gadget
|
|
3474
|
+
* @param result - Result returned by the gadget
|
|
3475
|
+
* @returns This builder for chaining
|
|
3476
|
+
*
|
|
3477
|
+
* @example
|
|
3478
|
+
* ```typescript
|
|
3479
|
+
* .withSyntheticGadgetCall(
|
|
3480
|
+
* 'TellUser',
|
|
3481
|
+
* {
|
|
3482
|
+
* message: '👋 Hello!\n\nHere\'s what I can do:\n- Analyze code\n- Run commands',
|
|
3483
|
+
* done: false,
|
|
3484
|
+
* type: 'info'
|
|
3485
|
+
* },
|
|
3486
|
+
* 'ℹ️ 👋 Hello!\n\nHere\'s what I can do:\n- Analyze code\n- Run commands'
|
|
3487
|
+
* )
|
|
3488
|
+
* ```
|
|
3489
|
+
*/
|
|
3490
|
+
withSyntheticGadgetCall(gadgetName, parameters, result) {
|
|
3491
|
+
const startPrefix = this.gadgetStartPrefix ?? GADGET_START_PREFIX;
|
|
3492
|
+
const endPrefix = this.gadgetEndPrefix ?? GADGET_END_PREFIX;
|
|
3493
|
+
const format = this.parameterFormat ?? "yaml";
|
|
3494
|
+
const paramStr = this.formatSyntheticParameters(parameters, format);
|
|
3495
|
+
this.initialMessages.push({
|
|
3496
|
+
role: "assistant",
|
|
3497
|
+
content: `${startPrefix}${gadgetName}
|
|
3498
|
+
${paramStr}
|
|
3499
|
+
${endPrefix}`
|
|
3500
|
+
});
|
|
3501
|
+
this.initialMessages.push({
|
|
3502
|
+
role: "user",
|
|
3503
|
+
content: `Result: ${result}`
|
|
3504
|
+
});
|
|
3505
|
+
return this;
|
|
3506
|
+
}
|
|
3507
|
+
/**
|
|
3508
|
+
* Format parameters for synthetic gadget calls.
|
|
3509
|
+
* Uses heredoc for multiline string values.
|
|
3510
|
+
*/
|
|
3511
|
+
formatSyntheticParameters(parameters, format) {
|
|
3512
|
+
if (format === "json" || format === "auto") {
|
|
3513
|
+
return JSON.stringify(parameters);
|
|
3514
|
+
}
|
|
3515
|
+
return Object.entries(parameters).map(([key, value]) => {
|
|
3516
|
+
if (typeof value === "string" && value.includes("\n")) {
|
|
3517
|
+
const separator = format === "yaml" ? ":" : " =";
|
|
3518
|
+
return `${key}${separator} <<<EOF
|
|
3519
|
+
${value}
|
|
3520
|
+
EOF`;
|
|
3521
|
+
}
|
|
3522
|
+
if (format === "yaml") {
|
|
3523
|
+
return typeof value === "string" ? `${key}: ${value}` : `${key}: ${JSON.stringify(value)}`;
|
|
3524
|
+
}
|
|
3525
|
+
return `${key} = ${JSON.stringify(value)}`;
|
|
3526
|
+
}).join("\n");
|
|
3527
|
+
}
|
|
3382
3528
|
/**
|
|
3383
3529
|
* Build and create the agent with the given user prompt.
|
|
3384
3530
|
* Returns the Agent instance ready to run.
|
|
@@ -3421,6 +3567,7 @@ var init_builder = __esm({
|
|
|
3421
3567
|
gadgetStartPrefix: this.gadgetStartPrefix,
|
|
3422
3568
|
gadgetEndPrefix: this.gadgetEndPrefix,
|
|
3423
3569
|
textOnlyHandler: this.textOnlyHandler,
|
|
3570
|
+
textWithGadgetsHandler: this.textWithGadgetsHandler,
|
|
3424
3571
|
stopOnGadgetError: this.stopOnGadgetError,
|
|
3425
3572
|
shouldContinueAfterError: this.shouldContinueAfterError,
|
|
3426
3573
|
defaultGadgetTimeoutMs: this.defaultGadgetTimeoutMs,
|
|
@@ -3522,6 +3669,7 @@ var init_builder = __esm({
|
|
|
3522
3669
|
gadgetStartPrefix: this.gadgetStartPrefix,
|
|
3523
3670
|
gadgetEndPrefix: this.gadgetEndPrefix,
|
|
3524
3671
|
textOnlyHandler: this.textOnlyHandler,
|
|
3672
|
+
textWithGadgetsHandler: this.textWithGadgetsHandler,
|
|
3525
3673
|
stopOnGadgetError: this.stopOnGadgetError,
|
|
3526
3674
|
shouldContinueAfterError: this.shouldContinueAfterError,
|
|
3527
3675
|
defaultGadgetTimeoutMs: this.defaultGadgetTimeoutMs,
|