@takeshape/schema 11.91.0 → 11.92.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/agents.d.ts +7 -0
- package/dist/agents.js +7 -0
- package/dist/builtin-schema.js +3 -1
- package/dist/project-schema/latest.d.ts +32 -12
- package/dist/project-schema/v3.48.0.d.ts +32 -12
- package/dist/project-schema/v3.49.0.d.ts +32 -12
- package/dist/project-schema/v3.50.0.d.ts +32 -12
- package/dist/project-schema/v3.51.0.d.ts +32 -12
- package/dist/project-schema/v3.52.0.d.ts +32 -12
- package/dist/project-schema/v3.53.0.d.ts +32 -12
- package/dist/project-schema/v3.54.0.d.ts +32 -12
- package/dist/project-schema/v3.55.0.d.ts +32 -12
- package/dist/schemas/project-schema/experimental.json +107 -56
- package/dist/validate/validate.js +15 -0
- package/examples/latest/agent-schema.json +4 -2
- package/examples/source/agent-schema.json +4 -2
- package/package.json +5 -5
package/dist/agents.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { AgentAPI, AgentAPIArgument, AgentJSON, Args, ProjectSchemaJSON } from './project-schema/index.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Special transition destination ID for agent transitions that end the agent execution.
|
|
4
|
+
*/
|
|
2
5
|
export declare const END_AGENT_EXECUTION = "endAgentExecution";
|
|
6
|
+
/**
|
|
7
|
+
* Special history strategy ID that indicates the history should be cleared.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CLEAR_HISTORY_STRATEGY_ID = "clearHistory";
|
|
3
10
|
export declare const BUILT_IN_CHAT_ARGS: AgentAPIArgument[];
|
|
4
11
|
export declare const BUILT_IN_CHAT_ARG_NAMES: string[];
|
|
5
12
|
export type AgentEndTransition = {
|
package/dist/agents.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import uniq from 'lodash/uniq.js';
|
|
2
2
|
import uniqBy from 'lodash/uniqBy.js';
|
|
3
3
|
import upperFirst from 'lodash/upperFirst.js';
|
|
4
|
+
/**
|
|
5
|
+
* Special transition destination ID for agent transitions that end the agent execution.
|
|
6
|
+
*/
|
|
4
7
|
export const END_AGENT_EXECUTION = 'endAgentExecution';
|
|
8
|
+
/**
|
|
9
|
+
* Special history strategy ID that indicates the history should be cleared.
|
|
10
|
+
*/
|
|
11
|
+
export const CLEAR_HISTORY_STRATEGY_ID = 'clearHistory';
|
|
5
12
|
export const BUILT_IN_CHAT_ARGS = [
|
|
6
13
|
{
|
|
7
14
|
argName: 'input',
|
package/dist/builtin-schema.js
CHANGED
|
@@ -382,7 +382,9 @@ export const builtInShapes = {
|
|
|
382
382
|
chatSessionIds: { type: 'object' },
|
|
383
383
|
sessionMemory: { type: 'object' },
|
|
384
384
|
stateOutputs: { type: 'object' },
|
|
385
|
-
currentValue: { type: 'object' }
|
|
385
|
+
currentValue: { type: 'object' },
|
|
386
|
+
userHistory: { type: 'array', items: { type: 'object' } },
|
|
387
|
+
agentHistory: { type: 'array', items: { type: 'object' } }
|
|
386
388
|
}
|
|
387
389
|
}
|
|
388
390
|
},
|
|
@@ -360,10 +360,11 @@ export type RemovePropertyKeyPatterns = MinimatchPattern[];
|
|
|
360
360
|
* Remove Markdown formatting from the LLM response
|
|
361
361
|
*/
|
|
362
362
|
export type StripMarkdown = boolean;
|
|
363
|
-
export type AgentChatHistoryConfig = AgentChatHistoryRetain | AgentChatHistorySummarize | AgentChatHistoryClear;
|
|
364
363
|
export type AgentStateSessionMemoryLocation = AgentStateSessionMemoryLocationContent | AgentStateSessionMemoryLocationArtifact | AgentStateSessionMemoryLocationStaticValue;
|
|
365
364
|
export type AgentStateSessionMemory = AgentStateSessionMemoryLocation[];
|
|
366
365
|
export type GuardID = string;
|
|
366
|
+
export type Variables1 = AgentVariable[];
|
|
367
|
+
export type HistoryStrategyExecution = HistoryStrategyExecutionReplace | HistoryStrategyExecutionSummarize;
|
|
367
368
|
/**
|
|
368
369
|
* The human-readable name of the Guard.
|
|
369
370
|
*/
|
|
@@ -1763,6 +1764,7 @@ export interface AgentJSON {
|
|
|
1763
1764
|
start: AgentStart;
|
|
1764
1765
|
states: AgentStates;
|
|
1765
1766
|
guards?: AgentGuard[];
|
|
1767
|
+
historyStrategies?: HistoryStrategyMap;
|
|
1766
1768
|
}
|
|
1767
1769
|
export interface AgentAPIChat {
|
|
1768
1770
|
type: 'chat';
|
|
@@ -1800,6 +1802,7 @@ export interface AgentTransitionStep {
|
|
|
1800
1802
|
suspend?: boolean;
|
|
1801
1803
|
condition?: string;
|
|
1802
1804
|
limit?: number;
|
|
1805
|
+
historyStrategy?: string;
|
|
1803
1806
|
}
|
|
1804
1807
|
/**
|
|
1805
1808
|
* States that are traversed during the execution of an agent.
|
|
@@ -1901,19 +1904,8 @@ export interface AgentExecutionChat {
|
|
|
1901
1904
|
input: AgentAIStateInput;
|
|
1902
1905
|
artifact?: string;
|
|
1903
1906
|
tools?: AgentToolConfig[];
|
|
1904
|
-
history?: AgentChatHistoryConfig;
|
|
1905
1907
|
options?: AgentGenerateOptions;
|
|
1906
1908
|
}
|
|
1907
|
-
export interface AgentChatHistoryRetain {
|
|
1908
|
-
type: 'retain';
|
|
1909
|
-
}
|
|
1910
|
-
export interface AgentChatHistorySummarize {
|
|
1911
|
-
type: 'summarize';
|
|
1912
|
-
toolCalls: 'retain' | 'clear';
|
|
1913
|
-
}
|
|
1914
|
-
export interface AgentChatHistoryClear {
|
|
1915
|
-
type: 'clear';
|
|
1916
|
-
}
|
|
1917
1909
|
export interface AgentStateSessionMemoryLocationContent {
|
|
1918
1910
|
type: 'content';
|
|
1919
1911
|
memoryPath?: string;
|
|
@@ -1932,6 +1924,34 @@ export interface AgentStateSessionMemoryLocationStaticValue {
|
|
|
1932
1924
|
export interface AgentGuard {
|
|
1933
1925
|
guardId: GuardID;
|
|
1934
1926
|
}
|
|
1927
|
+
export interface HistoryStrategyMap {
|
|
1928
|
+
[k: string]: HistoryStrategy;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* This interface was referenced by `HistoryStrategyMap`'s JSON-Schema definition
|
|
1932
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1933
|
+
*/
|
|
1934
|
+
export interface HistoryStrategy {
|
|
1935
|
+
name: string;
|
|
1936
|
+
variables?: Variables1;
|
|
1937
|
+
filter?: HistoryStrategyFilter;
|
|
1938
|
+
execution: HistoryStrategyExecution;
|
|
1939
|
+
}
|
|
1940
|
+
export interface HistoryStrategyFilter {
|
|
1941
|
+
toolCalls?: 'retain' | 'clear';
|
|
1942
|
+
}
|
|
1943
|
+
export interface HistoryStrategyExecutionReplace {
|
|
1944
|
+
type: 'replace';
|
|
1945
|
+
template: string;
|
|
1946
|
+
}
|
|
1947
|
+
export interface HistoryStrategyExecutionSummarize {
|
|
1948
|
+
type: 'generate';
|
|
1949
|
+
service: string;
|
|
1950
|
+
model: string;
|
|
1951
|
+
systemPrompt: string;
|
|
1952
|
+
tools?: AgentToolConfig[];
|
|
1953
|
+
options?: AgentGenerateOptions;
|
|
1954
|
+
}
|
|
1935
1955
|
export interface GuardMap {
|
|
1936
1956
|
[k: string]: GuardJSON;
|
|
1937
1957
|
}
|
|
@@ -335,10 +335,11 @@ export type RemovePropertyKeyPatternsV3_48_0 = MinimatchPatternV3_48_0[];
|
|
|
335
335
|
* Remove Markdown formatting from the LLM response
|
|
336
336
|
*/
|
|
337
337
|
export type StripMarkdownV3_48_0 = boolean;
|
|
338
|
-
export type AgentChatHistoryConfigV3_48_0 = AgentChatHistoryRetainV3_48_0 | AgentChatHistorySummarizeV3_48_0 | AgentChatHistoryClearV3_48_0;
|
|
339
338
|
export type AgentStateSessionMemoryLocationV3_48_0 = AgentStateSessionMemoryLocationContentV3_48_0 | AgentStateSessionMemoryLocationArtifactV3_48_0 | AgentStateSessionMemoryLocationStaticValueV3_48_0;
|
|
340
339
|
export type AgentStateSessionMemoryV3_48_0 = AgentStateSessionMemoryLocationV3_48_0[];
|
|
341
340
|
export type GuardIDV3_48_0 = string;
|
|
341
|
+
export type VariablesV3_48_01 = AgentVariableV3_48_0[];
|
|
342
|
+
export type HistoryStrategyExecutionV3_48_0 = HistoryStrategyExecutionReplaceV3_48_0 | HistoryStrategyExecutionSummarizeV3_48_0;
|
|
342
343
|
/**
|
|
343
344
|
* The human-readable name of the Guard.
|
|
344
345
|
*/
|
|
@@ -1611,6 +1612,7 @@ export interface AgentJSONV3_48_0 {
|
|
|
1611
1612
|
start: AgentStartV3_48_0;
|
|
1612
1613
|
states: AgentStatesV3_48_0;
|
|
1613
1614
|
guards?: AgentGuardV3_48_0[];
|
|
1615
|
+
historyStrategies?: HistoryStrategyMapV3_48_0;
|
|
1614
1616
|
}
|
|
1615
1617
|
export interface AgentAPIChatV3_48_0 {
|
|
1616
1618
|
type: 'chat';
|
|
@@ -1648,6 +1650,7 @@ export interface AgentTransitionStepV3_48_0 {
|
|
|
1648
1650
|
suspend?: boolean;
|
|
1649
1651
|
condition?: string;
|
|
1650
1652
|
limit?: number;
|
|
1653
|
+
historyStrategy?: string;
|
|
1651
1654
|
}
|
|
1652
1655
|
/**
|
|
1653
1656
|
* States that are traversed during the execution of an agent.
|
|
@@ -1749,19 +1752,8 @@ export interface AgentExecutionChatV3_48_0 {
|
|
|
1749
1752
|
input: AgentAIStateInputV3_48_0;
|
|
1750
1753
|
artifact?: string;
|
|
1751
1754
|
tools?: AgentToolConfigV3_48_0[];
|
|
1752
|
-
history?: AgentChatHistoryConfigV3_48_0;
|
|
1753
1755
|
options?: AgentGenerateOptionsV3_48_0;
|
|
1754
1756
|
}
|
|
1755
|
-
export interface AgentChatHistoryRetainV3_48_0 {
|
|
1756
|
-
type: 'retain';
|
|
1757
|
-
}
|
|
1758
|
-
export interface AgentChatHistorySummarizeV3_48_0 {
|
|
1759
|
-
type: 'summarize';
|
|
1760
|
-
toolCalls: 'retain' | 'clear';
|
|
1761
|
-
}
|
|
1762
|
-
export interface AgentChatHistoryClearV3_48_0 {
|
|
1763
|
-
type: 'clear';
|
|
1764
|
-
}
|
|
1765
1757
|
export interface AgentStateSessionMemoryLocationContentV3_48_0 {
|
|
1766
1758
|
type: 'content';
|
|
1767
1759
|
memoryPath?: string;
|
|
@@ -1780,6 +1772,34 @@ export interface AgentStateSessionMemoryLocationStaticValueV3_48_0 {
|
|
|
1780
1772
|
export interface AgentGuardV3_48_0 {
|
|
1781
1773
|
guardId: GuardIDV3_48_0;
|
|
1782
1774
|
}
|
|
1775
|
+
export interface HistoryStrategyMapV3_48_0 {
|
|
1776
|
+
[k: string]: HistoryStrategyV3_48_0;
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* This interface was referenced by `HistoryStrategyMapV3_48_0`'s JSON-Schema definition
|
|
1780
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1781
|
+
*/
|
|
1782
|
+
export interface HistoryStrategyV3_48_0 {
|
|
1783
|
+
name: string;
|
|
1784
|
+
variables?: VariablesV3_48_01;
|
|
1785
|
+
filter?: HistoryStrategyFilterV3_48_0;
|
|
1786
|
+
execution: HistoryStrategyExecutionV3_48_0;
|
|
1787
|
+
}
|
|
1788
|
+
export interface HistoryStrategyFilterV3_48_0 {
|
|
1789
|
+
toolCalls?: 'retain' | 'clear';
|
|
1790
|
+
}
|
|
1791
|
+
export interface HistoryStrategyExecutionReplaceV3_48_0 {
|
|
1792
|
+
type: 'replace';
|
|
1793
|
+
template: string;
|
|
1794
|
+
}
|
|
1795
|
+
export interface HistoryStrategyExecutionSummarizeV3_48_0 {
|
|
1796
|
+
type: 'generate';
|
|
1797
|
+
service: string;
|
|
1798
|
+
model: string;
|
|
1799
|
+
systemPrompt: string;
|
|
1800
|
+
tools?: AgentToolConfigV3_48_0[];
|
|
1801
|
+
options?: AgentGenerateOptionsV3_48_0;
|
|
1802
|
+
}
|
|
1783
1803
|
export interface GuardMapV3_48_0 {
|
|
1784
1804
|
[k: string]: GuardJSONV3_48_0;
|
|
1785
1805
|
}
|
|
@@ -335,10 +335,11 @@ export type RemovePropertyKeyPatternsV3_49_0 = MinimatchPatternV3_49_0[];
|
|
|
335
335
|
* Remove Markdown formatting from the LLM response
|
|
336
336
|
*/
|
|
337
337
|
export type StripMarkdownV3_49_0 = boolean;
|
|
338
|
-
export type AgentChatHistoryConfigV3_49_0 = AgentChatHistoryRetainV3_49_0 | AgentChatHistorySummarizeV3_49_0 | AgentChatHistoryClearV3_49_0;
|
|
339
338
|
export type AgentStateSessionMemoryLocationV3_49_0 = AgentStateSessionMemoryLocationContentV3_49_0 | AgentStateSessionMemoryLocationArtifactV3_49_0 | AgentStateSessionMemoryLocationStaticValueV3_49_0;
|
|
340
339
|
export type AgentStateSessionMemoryV3_49_0 = AgentStateSessionMemoryLocationV3_49_0[];
|
|
341
340
|
export type GuardIDV3_49_0 = string;
|
|
341
|
+
export type VariablesV3_49_01 = AgentVariableV3_49_0[];
|
|
342
|
+
export type HistoryStrategyExecutionV3_49_0 = HistoryStrategyExecutionReplaceV3_49_0 | HistoryStrategyExecutionSummarizeV3_49_0;
|
|
342
343
|
/**
|
|
343
344
|
* The human-readable name of the Guard.
|
|
344
345
|
*/
|
|
@@ -1611,6 +1612,7 @@ export interface AgentJSONV3_49_0 {
|
|
|
1611
1612
|
start: AgentStartV3_49_0;
|
|
1612
1613
|
states: AgentStatesV3_49_0;
|
|
1613
1614
|
guards?: AgentGuardV3_49_0[];
|
|
1615
|
+
historyStrategies?: HistoryStrategyMapV3_49_0;
|
|
1614
1616
|
}
|
|
1615
1617
|
export interface AgentAPIChatV3_49_0 {
|
|
1616
1618
|
type: 'chat';
|
|
@@ -1648,6 +1650,7 @@ export interface AgentTransitionStepV3_49_0 {
|
|
|
1648
1650
|
suspend?: boolean;
|
|
1649
1651
|
condition?: string;
|
|
1650
1652
|
limit?: number;
|
|
1653
|
+
historyStrategy?: string;
|
|
1651
1654
|
}
|
|
1652
1655
|
/**
|
|
1653
1656
|
* States that are traversed during the execution of an agent.
|
|
@@ -1749,19 +1752,8 @@ export interface AgentExecutionChatV3_49_0 {
|
|
|
1749
1752
|
input: AgentAIStateInputV3_49_0;
|
|
1750
1753
|
artifact?: string;
|
|
1751
1754
|
tools?: AgentToolConfigV3_49_0[];
|
|
1752
|
-
history?: AgentChatHistoryConfigV3_49_0;
|
|
1753
1755
|
options?: AgentGenerateOptionsV3_49_0;
|
|
1754
1756
|
}
|
|
1755
|
-
export interface AgentChatHistoryRetainV3_49_0 {
|
|
1756
|
-
type: 'retain';
|
|
1757
|
-
}
|
|
1758
|
-
export interface AgentChatHistorySummarizeV3_49_0 {
|
|
1759
|
-
type: 'summarize';
|
|
1760
|
-
toolCalls: 'retain' | 'clear';
|
|
1761
|
-
}
|
|
1762
|
-
export interface AgentChatHistoryClearV3_49_0 {
|
|
1763
|
-
type: 'clear';
|
|
1764
|
-
}
|
|
1765
1757
|
export interface AgentStateSessionMemoryLocationContentV3_49_0 {
|
|
1766
1758
|
type: 'content';
|
|
1767
1759
|
memoryPath?: string;
|
|
@@ -1780,6 +1772,34 @@ export interface AgentStateSessionMemoryLocationStaticValueV3_49_0 {
|
|
|
1780
1772
|
export interface AgentGuardV3_49_0 {
|
|
1781
1773
|
guardId: GuardIDV3_49_0;
|
|
1782
1774
|
}
|
|
1775
|
+
export interface HistoryStrategyMapV3_49_0 {
|
|
1776
|
+
[k: string]: HistoryStrategyV3_49_0;
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* This interface was referenced by `HistoryStrategyMapV3_49_0`'s JSON-Schema definition
|
|
1780
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1781
|
+
*/
|
|
1782
|
+
export interface HistoryStrategyV3_49_0 {
|
|
1783
|
+
name: string;
|
|
1784
|
+
variables?: VariablesV3_49_01;
|
|
1785
|
+
filter?: HistoryStrategyFilterV3_49_0;
|
|
1786
|
+
execution: HistoryStrategyExecutionV3_49_0;
|
|
1787
|
+
}
|
|
1788
|
+
export interface HistoryStrategyFilterV3_49_0 {
|
|
1789
|
+
toolCalls?: 'retain' | 'clear';
|
|
1790
|
+
}
|
|
1791
|
+
export interface HistoryStrategyExecutionReplaceV3_49_0 {
|
|
1792
|
+
type: 'replace';
|
|
1793
|
+
template: string;
|
|
1794
|
+
}
|
|
1795
|
+
export interface HistoryStrategyExecutionSummarizeV3_49_0 {
|
|
1796
|
+
type: 'generate';
|
|
1797
|
+
service: string;
|
|
1798
|
+
model: string;
|
|
1799
|
+
systemPrompt: string;
|
|
1800
|
+
tools?: AgentToolConfigV3_49_0[];
|
|
1801
|
+
options?: AgentGenerateOptionsV3_49_0;
|
|
1802
|
+
}
|
|
1783
1803
|
export interface GuardMapV3_49_0 {
|
|
1784
1804
|
[k: string]: GuardJSONV3_49_0;
|
|
1785
1805
|
}
|
|
@@ -347,10 +347,11 @@ export type RemovePropertyKeyPatternsV3_50_0 = MinimatchPatternV3_50_0[];
|
|
|
347
347
|
* Remove Markdown formatting from the LLM response
|
|
348
348
|
*/
|
|
349
349
|
export type StripMarkdownV3_50_0 = boolean;
|
|
350
|
-
export type AgentChatHistoryConfigV3_50_0 = AgentChatHistoryRetainV3_50_0 | AgentChatHistorySummarizeV3_50_0 | AgentChatHistoryClearV3_50_0;
|
|
351
350
|
export type AgentStateSessionMemoryLocationV3_50_0 = AgentStateSessionMemoryLocationContentV3_50_0 | AgentStateSessionMemoryLocationArtifactV3_50_0 | AgentStateSessionMemoryLocationStaticValueV3_50_0;
|
|
352
351
|
export type AgentStateSessionMemoryV3_50_0 = AgentStateSessionMemoryLocationV3_50_0[];
|
|
353
352
|
export type GuardIDV3_50_0 = string;
|
|
353
|
+
export type VariablesV3_50_01 = AgentVariableV3_50_0[];
|
|
354
|
+
export type HistoryStrategyExecutionV3_50_0 = HistoryStrategyExecutionReplaceV3_50_0 | HistoryStrategyExecutionSummarizeV3_50_0;
|
|
354
355
|
/**
|
|
355
356
|
* The human-readable name of the Guard.
|
|
356
357
|
*/
|
|
@@ -1663,6 +1664,7 @@ export interface AgentJSONV3_50_0 {
|
|
|
1663
1664
|
start: AgentStartV3_50_0;
|
|
1664
1665
|
states: AgentStatesV3_50_0;
|
|
1665
1666
|
guards?: AgentGuardV3_50_0[];
|
|
1667
|
+
historyStrategies?: HistoryStrategyMapV3_50_0;
|
|
1666
1668
|
}
|
|
1667
1669
|
export interface AgentAPIChatV3_50_0 {
|
|
1668
1670
|
type: 'chat';
|
|
@@ -1700,6 +1702,7 @@ export interface AgentTransitionStepV3_50_0 {
|
|
|
1700
1702
|
suspend?: boolean;
|
|
1701
1703
|
condition?: string;
|
|
1702
1704
|
limit?: number;
|
|
1705
|
+
historyStrategy?: string;
|
|
1703
1706
|
}
|
|
1704
1707
|
/**
|
|
1705
1708
|
* States that are traversed during the execution of an agent.
|
|
@@ -1801,19 +1804,8 @@ export interface AgentExecutionChatV3_50_0 {
|
|
|
1801
1804
|
input: AgentAIStateInputV3_50_0;
|
|
1802
1805
|
artifact?: string;
|
|
1803
1806
|
tools?: AgentToolConfigV3_50_0[];
|
|
1804
|
-
history?: AgentChatHistoryConfigV3_50_0;
|
|
1805
1807
|
options?: AgentGenerateOptionsV3_50_0;
|
|
1806
1808
|
}
|
|
1807
|
-
export interface AgentChatHistoryRetainV3_50_0 {
|
|
1808
|
-
type: 'retain';
|
|
1809
|
-
}
|
|
1810
|
-
export interface AgentChatHistorySummarizeV3_50_0 {
|
|
1811
|
-
type: 'summarize';
|
|
1812
|
-
toolCalls: 'retain' | 'clear';
|
|
1813
|
-
}
|
|
1814
|
-
export interface AgentChatHistoryClearV3_50_0 {
|
|
1815
|
-
type: 'clear';
|
|
1816
|
-
}
|
|
1817
1809
|
export interface AgentStateSessionMemoryLocationContentV3_50_0 {
|
|
1818
1810
|
type: 'content';
|
|
1819
1811
|
memoryPath?: string;
|
|
@@ -1832,6 +1824,34 @@ export interface AgentStateSessionMemoryLocationStaticValueV3_50_0 {
|
|
|
1832
1824
|
export interface AgentGuardV3_50_0 {
|
|
1833
1825
|
guardId: GuardIDV3_50_0;
|
|
1834
1826
|
}
|
|
1827
|
+
export interface HistoryStrategyMapV3_50_0 {
|
|
1828
|
+
[k: string]: HistoryStrategyV3_50_0;
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* This interface was referenced by `HistoryStrategyMapV3_50_0`'s JSON-Schema definition
|
|
1832
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1833
|
+
*/
|
|
1834
|
+
export interface HistoryStrategyV3_50_0 {
|
|
1835
|
+
name: string;
|
|
1836
|
+
variables?: VariablesV3_50_01;
|
|
1837
|
+
filter?: HistoryStrategyFilterV3_50_0;
|
|
1838
|
+
execution: HistoryStrategyExecutionV3_50_0;
|
|
1839
|
+
}
|
|
1840
|
+
export interface HistoryStrategyFilterV3_50_0 {
|
|
1841
|
+
toolCalls?: 'retain' | 'clear';
|
|
1842
|
+
}
|
|
1843
|
+
export interface HistoryStrategyExecutionReplaceV3_50_0 {
|
|
1844
|
+
type: 'replace';
|
|
1845
|
+
template: string;
|
|
1846
|
+
}
|
|
1847
|
+
export interface HistoryStrategyExecutionSummarizeV3_50_0 {
|
|
1848
|
+
type: 'generate';
|
|
1849
|
+
service: string;
|
|
1850
|
+
model: string;
|
|
1851
|
+
systemPrompt: string;
|
|
1852
|
+
tools?: AgentToolConfigV3_50_0[];
|
|
1853
|
+
options?: AgentGenerateOptionsV3_50_0;
|
|
1854
|
+
}
|
|
1835
1855
|
export interface GuardMapV3_50_0 {
|
|
1836
1856
|
[k: string]: GuardJSONV3_50_0;
|
|
1837
1857
|
}
|
|
@@ -347,10 +347,11 @@ export type RemovePropertyKeyPatternsV3_51_0 = MinimatchPatternV3_51_0[];
|
|
|
347
347
|
* Remove Markdown formatting from the LLM response
|
|
348
348
|
*/
|
|
349
349
|
export type StripMarkdownV3_51_0 = boolean;
|
|
350
|
-
export type AgentChatHistoryConfigV3_51_0 = AgentChatHistoryRetainV3_51_0 | AgentChatHistorySummarizeV3_51_0 | AgentChatHistoryClearV3_51_0;
|
|
351
350
|
export type AgentStateSessionMemoryLocationV3_51_0 = AgentStateSessionMemoryLocationContentV3_51_0 | AgentStateSessionMemoryLocationArtifactV3_51_0 | AgentStateSessionMemoryLocationStaticValueV3_51_0;
|
|
352
351
|
export type AgentStateSessionMemoryV3_51_0 = AgentStateSessionMemoryLocationV3_51_0[];
|
|
353
352
|
export type GuardIDV3_51_0 = string;
|
|
353
|
+
export type VariablesV3_51_01 = AgentVariableV3_51_0[];
|
|
354
|
+
export type HistoryStrategyExecutionV3_51_0 = HistoryStrategyExecutionReplaceV3_51_0 | HistoryStrategyExecutionSummarizeV3_51_0;
|
|
354
355
|
/**
|
|
355
356
|
* The human-readable name of the Guard.
|
|
356
357
|
*/
|
|
@@ -1663,6 +1664,7 @@ export interface AgentJSONV3_51_0 {
|
|
|
1663
1664
|
start: AgentStartV3_51_0;
|
|
1664
1665
|
states: AgentStatesV3_51_0;
|
|
1665
1666
|
guards?: AgentGuardV3_51_0[];
|
|
1667
|
+
historyStrategies?: HistoryStrategyMapV3_51_0;
|
|
1666
1668
|
}
|
|
1667
1669
|
export interface AgentAPIChatV3_51_0 {
|
|
1668
1670
|
type: 'chat';
|
|
@@ -1700,6 +1702,7 @@ export interface AgentTransitionStepV3_51_0 {
|
|
|
1700
1702
|
suspend?: boolean;
|
|
1701
1703
|
condition?: string;
|
|
1702
1704
|
limit?: number;
|
|
1705
|
+
historyStrategy?: string;
|
|
1703
1706
|
}
|
|
1704
1707
|
/**
|
|
1705
1708
|
* States that are traversed during the execution of an agent.
|
|
@@ -1801,19 +1804,8 @@ export interface AgentExecutionChatV3_51_0 {
|
|
|
1801
1804
|
input: AgentAIStateInputV3_51_0;
|
|
1802
1805
|
artifact?: string;
|
|
1803
1806
|
tools?: AgentToolConfigV3_51_0[];
|
|
1804
|
-
history?: AgentChatHistoryConfigV3_51_0;
|
|
1805
1807
|
options?: AgentGenerateOptionsV3_51_0;
|
|
1806
1808
|
}
|
|
1807
|
-
export interface AgentChatHistoryRetainV3_51_0 {
|
|
1808
|
-
type: 'retain';
|
|
1809
|
-
}
|
|
1810
|
-
export interface AgentChatHistorySummarizeV3_51_0 {
|
|
1811
|
-
type: 'summarize';
|
|
1812
|
-
toolCalls: 'retain' | 'clear';
|
|
1813
|
-
}
|
|
1814
|
-
export interface AgentChatHistoryClearV3_51_0 {
|
|
1815
|
-
type: 'clear';
|
|
1816
|
-
}
|
|
1817
1809
|
export interface AgentStateSessionMemoryLocationContentV3_51_0 {
|
|
1818
1810
|
type: 'content';
|
|
1819
1811
|
memoryPath?: string;
|
|
@@ -1832,6 +1824,34 @@ export interface AgentStateSessionMemoryLocationStaticValueV3_51_0 {
|
|
|
1832
1824
|
export interface AgentGuardV3_51_0 {
|
|
1833
1825
|
guardId: GuardIDV3_51_0;
|
|
1834
1826
|
}
|
|
1827
|
+
export interface HistoryStrategyMapV3_51_0 {
|
|
1828
|
+
[k: string]: HistoryStrategyV3_51_0;
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* This interface was referenced by `HistoryStrategyMapV3_51_0`'s JSON-Schema definition
|
|
1832
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1833
|
+
*/
|
|
1834
|
+
export interface HistoryStrategyV3_51_0 {
|
|
1835
|
+
name: string;
|
|
1836
|
+
variables?: VariablesV3_51_01;
|
|
1837
|
+
filter?: HistoryStrategyFilterV3_51_0;
|
|
1838
|
+
execution: HistoryStrategyExecutionV3_51_0;
|
|
1839
|
+
}
|
|
1840
|
+
export interface HistoryStrategyFilterV3_51_0 {
|
|
1841
|
+
toolCalls?: 'retain' | 'clear';
|
|
1842
|
+
}
|
|
1843
|
+
export interface HistoryStrategyExecutionReplaceV3_51_0 {
|
|
1844
|
+
type: 'replace';
|
|
1845
|
+
template: string;
|
|
1846
|
+
}
|
|
1847
|
+
export interface HistoryStrategyExecutionSummarizeV3_51_0 {
|
|
1848
|
+
type: 'generate';
|
|
1849
|
+
service: string;
|
|
1850
|
+
model: string;
|
|
1851
|
+
systemPrompt: string;
|
|
1852
|
+
tools?: AgentToolConfigV3_51_0[];
|
|
1853
|
+
options?: AgentGenerateOptionsV3_51_0;
|
|
1854
|
+
}
|
|
1835
1855
|
export interface GuardMapV3_51_0 {
|
|
1836
1856
|
[k: string]: GuardJSONV3_51_0;
|
|
1837
1857
|
}
|
|
@@ -347,10 +347,11 @@ export type RemovePropertyKeyPatternsV3_52_0 = MinimatchPatternV3_52_0[];
|
|
|
347
347
|
* Remove Markdown formatting from the LLM response
|
|
348
348
|
*/
|
|
349
349
|
export type StripMarkdownV3_52_0 = boolean;
|
|
350
|
-
export type AgentChatHistoryConfigV3_52_0 = AgentChatHistoryRetainV3_52_0 | AgentChatHistorySummarizeV3_52_0 | AgentChatHistoryClearV3_52_0;
|
|
351
350
|
export type AgentStateSessionMemoryLocationV3_52_0 = AgentStateSessionMemoryLocationContentV3_52_0 | AgentStateSessionMemoryLocationArtifactV3_52_0 | AgentStateSessionMemoryLocationStaticValueV3_52_0;
|
|
352
351
|
export type AgentStateSessionMemoryV3_52_0 = AgentStateSessionMemoryLocationV3_52_0[];
|
|
353
352
|
export type GuardIDV3_52_0 = string;
|
|
353
|
+
export type VariablesV3_52_01 = AgentVariableV3_52_0[];
|
|
354
|
+
export type HistoryStrategyExecutionV3_52_0 = HistoryStrategyExecutionReplaceV3_52_0 | HistoryStrategyExecutionSummarizeV3_52_0;
|
|
354
355
|
/**
|
|
355
356
|
* The human-readable name of the Guard.
|
|
356
357
|
*/
|
|
@@ -1663,6 +1664,7 @@ export interface AgentJSONV3_52_0 {
|
|
|
1663
1664
|
start: AgentStartV3_52_0;
|
|
1664
1665
|
states: AgentStatesV3_52_0;
|
|
1665
1666
|
guards?: AgentGuardV3_52_0[];
|
|
1667
|
+
historyStrategies?: HistoryStrategyMapV3_52_0;
|
|
1666
1668
|
}
|
|
1667
1669
|
export interface AgentAPIChatV3_52_0 {
|
|
1668
1670
|
type: 'chat';
|
|
@@ -1700,6 +1702,7 @@ export interface AgentTransitionStepV3_52_0 {
|
|
|
1700
1702
|
suspend?: boolean;
|
|
1701
1703
|
condition?: string;
|
|
1702
1704
|
limit?: number;
|
|
1705
|
+
historyStrategy?: string;
|
|
1703
1706
|
}
|
|
1704
1707
|
/**
|
|
1705
1708
|
* States that are traversed during the execution of an agent.
|
|
@@ -1801,19 +1804,8 @@ export interface AgentExecutionChatV3_52_0 {
|
|
|
1801
1804
|
input: AgentAIStateInputV3_52_0;
|
|
1802
1805
|
artifact?: string;
|
|
1803
1806
|
tools?: AgentToolConfigV3_52_0[];
|
|
1804
|
-
history?: AgentChatHistoryConfigV3_52_0;
|
|
1805
1807
|
options?: AgentGenerateOptionsV3_52_0;
|
|
1806
1808
|
}
|
|
1807
|
-
export interface AgentChatHistoryRetainV3_52_0 {
|
|
1808
|
-
type: 'retain';
|
|
1809
|
-
}
|
|
1810
|
-
export interface AgentChatHistorySummarizeV3_52_0 {
|
|
1811
|
-
type: 'summarize';
|
|
1812
|
-
toolCalls: 'retain' | 'clear';
|
|
1813
|
-
}
|
|
1814
|
-
export interface AgentChatHistoryClearV3_52_0 {
|
|
1815
|
-
type: 'clear';
|
|
1816
|
-
}
|
|
1817
1809
|
export interface AgentStateSessionMemoryLocationContentV3_52_0 {
|
|
1818
1810
|
type: 'content';
|
|
1819
1811
|
memoryPath?: string;
|
|
@@ -1832,6 +1824,34 @@ export interface AgentStateSessionMemoryLocationStaticValueV3_52_0 {
|
|
|
1832
1824
|
export interface AgentGuardV3_52_0 {
|
|
1833
1825
|
guardId: GuardIDV3_52_0;
|
|
1834
1826
|
}
|
|
1827
|
+
export interface HistoryStrategyMapV3_52_0 {
|
|
1828
|
+
[k: string]: HistoryStrategyV3_52_0;
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* This interface was referenced by `HistoryStrategyMapV3_52_0`'s JSON-Schema definition
|
|
1832
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1833
|
+
*/
|
|
1834
|
+
export interface HistoryStrategyV3_52_0 {
|
|
1835
|
+
name: string;
|
|
1836
|
+
variables?: VariablesV3_52_01;
|
|
1837
|
+
filter?: HistoryStrategyFilterV3_52_0;
|
|
1838
|
+
execution: HistoryStrategyExecutionV3_52_0;
|
|
1839
|
+
}
|
|
1840
|
+
export interface HistoryStrategyFilterV3_52_0 {
|
|
1841
|
+
toolCalls?: 'retain' | 'clear';
|
|
1842
|
+
}
|
|
1843
|
+
export interface HistoryStrategyExecutionReplaceV3_52_0 {
|
|
1844
|
+
type: 'replace';
|
|
1845
|
+
template: string;
|
|
1846
|
+
}
|
|
1847
|
+
export interface HistoryStrategyExecutionSummarizeV3_52_0 {
|
|
1848
|
+
type: 'generate';
|
|
1849
|
+
service: string;
|
|
1850
|
+
model: string;
|
|
1851
|
+
systemPrompt: string;
|
|
1852
|
+
tools?: AgentToolConfigV3_52_0[];
|
|
1853
|
+
options?: AgentGenerateOptionsV3_52_0;
|
|
1854
|
+
}
|
|
1835
1855
|
export interface GuardMapV3_52_0 {
|
|
1836
1856
|
[k: string]: GuardJSONV3_52_0;
|
|
1837
1857
|
}
|
|
@@ -356,10 +356,11 @@ export type RemovePropertyKeyPatternsV3_53_0 = MinimatchPatternV3_53_0[];
|
|
|
356
356
|
* Remove Markdown formatting from the LLM response
|
|
357
357
|
*/
|
|
358
358
|
export type StripMarkdownV3_53_0 = boolean;
|
|
359
|
-
export type AgentChatHistoryConfigV3_53_0 = AgentChatHistoryRetainV3_53_0 | AgentChatHistorySummarizeV3_53_0 | AgentChatHistoryClearV3_53_0;
|
|
360
359
|
export type AgentStateSessionMemoryLocationV3_53_0 = AgentStateSessionMemoryLocationContentV3_53_0 | AgentStateSessionMemoryLocationArtifactV3_53_0 | AgentStateSessionMemoryLocationStaticValueV3_53_0;
|
|
361
360
|
export type AgentStateSessionMemoryV3_53_0 = AgentStateSessionMemoryLocationV3_53_0[];
|
|
362
361
|
export type GuardIDV3_53_0 = string;
|
|
362
|
+
export type VariablesV3_53_01 = AgentVariableV3_53_0[];
|
|
363
|
+
export type HistoryStrategyExecutionV3_53_0 = HistoryStrategyExecutionReplaceV3_53_0 | HistoryStrategyExecutionSummarizeV3_53_0;
|
|
363
364
|
/**
|
|
364
365
|
* The human-readable name of the Guard.
|
|
365
366
|
*/
|
|
@@ -1744,6 +1745,7 @@ export interface AgentJSONV3_53_0 {
|
|
|
1744
1745
|
start: AgentStartV3_53_0;
|
|
1745
1746
|
states: AgentStatesV3_53_0;
|
|
1746
1747
|
guards?: AgentGuardV3_53_0[];
|
|
1748
|
+
historyStrategies?: HistoryStrategyMapV3_53_0;
|
|
1747
1749
|
}
|
|
1748
1750
|
export interface AgentAPIChatV3_53_0 {
|
|
1749
1751
|
type: 'chat';
|
|
@@ -1781,6 +1783,7 @@ export interface AgentTransitionStepV3_53_0 {
|
|
|
1781
1783
|
suspend?: boolean;
|
|
1782
1784
|
condition?: string;
|
|
1783
1785
|
limit?: number;
|
|
1786
|
+
historyStrategy?: string;
|
|
1784
1787
|
}
|
|
1785
1788
|
/**
|
|
1786
1789
|
* States that are traversed during the execution of an agent.
|
|
@@ -1882,19 +1885,8 @@ export interface AgentExecutionChatV3_53_0 {
|
|
|
1882
1885
|
input: AgentAIStateInputV3_53_0;
|
|
1883
1886
|
artifact?: string;
|
|
1884
1887
|
tools?: AgentToolConfigV3_53_0[];
|
|
1885
|
-
history?: AgentChatHistoryConfigV3_53_0;
|
|
1886
1888
|
options?: AgentGenerateOptionsV3_53_0;
|
|
1887
1889
|
}
|
|
1888
|
-
export interface AgentChatHistoryRetainV3_53_0 {
|
|
1889
|
-
type: 'retain';
|
|
1890
|
-
}
|
|
1891
|
-
export interface AgentChatHistorySummarizeV3_53_0 {
|
|
1892
|
-
type: 'summarize';
|
|
1893
|
-
toolCalls: 'retain' | 'clear';
|
|
1894
|
-
}
|
|
1895
|
-
export interface AgentChatHistoryClearV3_53_0 {
|
|
1896
|
-
type: 'clear';
|
|
1897
|
-
}
|
|
1898
1890
|
export interface AgentStateSessionMemoryLocationContentV3_53_0 {
|
|
1899
1891
|
type: 'content';
|
|
1900
1892
|
memoryPath?: string;
|
|
@@ -1913,6 +1905,34 @@ export interface AgentStateSessionMemoryLocationStaticValueV3_53_0 {
|
|
|
1913
1905
|
export interface AgentGuardV3_53_0 {
|
|
1914
1906
|
guardId: GuardIDV3_53_0;
|
|
1915
1907
|
}
|
|
1908
|
+
export interface HistoryStrategyMapV3_53_0 {
|
|
1909
|
+
[k: string]: HistoryStrategyV3_53_0;
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* This interface was referenced by `HistoryStrategyMapV3_53_0`'s JSON-Schema definition
|
|
1913
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1914
|
+
*/
|
|
1915
|
+
export interface HistoryStrategyV3_53_0 {
|
|
1916
|
+
name: string;
|
|
1917
|
+
variables?: VariablesV3_53_01;
|
|
1918
|
+
filter?: HistoryStrategyFilterV3_53_0;
|
|
1919
|
+
execution: HistoryStrategyExecutionV3_53_0;
|
|
1920
|
+
}
|
|
1921
|
+
export interface HistoryStrategyFilterV3_53_0 {
|
|
1922
|
+
toolCalls?: 'retain' | 'clear';
|
|
1923
|
+
}
|
|
1924
|
+
export interface HistoryStrategyExecutionReplaceV3_53_0 {
|
|
1925
|
+
type: 'replace';
|
|
1926
|
+
template: string;
|
|
1927
|
+
}
|
|
1928
|
+
export interface HistoryStrategyExecutionSummarizeV3_53_0 {
|
|
1929
|
+
type: 'generate';
|
|
1930
|
+
service: string;
|
|
1931
|
+
model: string;
|
|
1932
|
+
systemPrompt: string;
|
|
1933
|
+
tools?: AgentToolConfigV3_53_0[];
|
|
1934
|
+
options?: AgentGenerateOptionsV3_53_0;
|
|
1935
|
+
}
|
|
1916
1936
|
export interface GuardMapV3_53_0 {
|
|
1917
1937
|
[k: string]: GuardJSONV3_53_0;
|
|
1918
1938
|
}
|
|
@@ -360,10 +360,11 @@ export type RemovePropertyKeyPatternsV3_54_0 = MinimatchPatternV3_54_0[];
|
|
|
360
360
|
* Remove Markdown formatting from the LLM response
|
|
361
361
|
*/
|
|
362
362
|
export type StripMarkdownV3_54_0 = boolean;
|
|
363
|
-
export type AgentChatHistoryConfigV3_54_0 = AgentChatHistoryRetainV3_54_0 | AgentChatHistorySummarizeV3_54_0 | AgentChatHistoryClearV3_54_0;
|
|
364
363
|
export type AgentStateSessionMemoryLocationV3_54_0 = AgentStateSessionMemoryLocationContentV3_54_0 | AgentStateSessionMemoryLocationArtifactV3_54_0 | AgentStateSessionMemoryLocationStaticValueV3_54_0;
|
|
365
364
|
export type AgentStateSessionMemoryV3_54_0 = AgentStateSessionMemoryLocationV3_54_0[];
|
|
366
365
|
export type GuardIDV3_54_0 = string;
|
|
366
|
+
export type VariablesV3_54_01 = AgentVariableV3_54_0[];
|
|
367
|
+
export type HistoryStrategyExecutionV3_54_0 = HistoryStrategyExecutionReplaceV3_54_0 | HistoryStrategyExecutionSummarizeV3_54_0;
|
|
367
368
|
/**
|
|
368
369
|
* The human-readable name of the Guard.
|
|
369
370
|
*/
|
|
@@ -1763,6 +1764,7 @@ export interface AgentJSONV3_54_0 {
|
|
|
1763
1764
|
start: AgentStartV3_54_0;
|
|
1764
1765
|
states: AgentStatesV3_54_0;
|
|
1765
1766
|
guards?: AgentGuardV3_54_0[];
|
|
1767
|
+
historyStrategies?: HistoryStrategyMapV3_54_0;
|
|
1766
1768
|
}
|
|
1767
1769
|
export interface AgentAPIChatV3_54_0 {
|
|
1768
1770
|
type: 'chat';
|
|
@@ -1800,6 +1802,7 @@ export interface AgentTransitionStepV3_54_0 {
|
|
|
1800
1802
|
suspend?: boolean;
|
|
1801
1803
|
condition?: string;
|
|
1802
1804
|
limit?: number;
|
|
1805
|
+
historyStrategy?: string;
|
|
1803
1806
|
}
|
|
1804
1807
|
/**
|
|
1805
1808
|
* States that are traversed during the execution of an agent.
|
|
@@ -1901,19 +1904,8 @@ export interface AgentExecutionChatV3_54_0 {
|
|
|
1901
1904
|
input: AgentAIStateInputV3_54_0;
|
|
1902
1905
|
artifact?: string;
|
|
1903
1906
|
tools?: AgentToolConfigV3_54_0[];
|
|
1904
|
-
history?: AgentChatHistoryConfigV3_54_0;
|
|
1905
1907
|
options?: AgentGenerateOptionsV3_54_0;
|
|
1906
1908
|
}
|
|
1907
|
-
export interface AgentChatHistoryRetainV3_54_0 {
|
|
1908
|
-
type: 'retain';
|
|
1909
|
-
}
|
|
1910
|
-
export interface AgentChatHistorySummarizeV3_54_0 {
|
|
1911
|
-
type: 'summarize';
|
|
1912
|
-
toolCalls: 'retain' | 'clear';
|
|
1913
|
-
}
|
|
1914
|
-
export interface AgentChatHistoryClearV3_54_0 {
|
|
1915
|
-
type: 'clear';
|
|
1916
|
-
}
|
|
1917
1909
|
export interface AgentStateSessionMemoryLocationContentV3_54_0 {
|
|
1918
1910
|
type: 'content';
|
|
1919
1911
|
memoryPath?: string;
|
|
@@ -1932,6 +1924,34 @@ export interface AgentStateSessionMemoryLocationStaticValueV3_54_0 {
|
|
|
1932
1924
|
export interface AgentGuardV3_54_0 {
|
|
1933
1925
|
guardId: GuardIDV3_54_0;
|
|
1934
1926
|
}
|
|
1927
|
+
export interface HistoryStrategyMapV3_54_0 {
|
|
1928
|
+
[k: string]: HistoryStrategyV3_54_0;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* This interface was referenced by `HistoryStrategyMapV3_54_0`'s JSON-Schema definition
|
|
1932
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1933
|
+
*/
|
|
1934
|
+
export interface HistoryStrategyV3_54_0 {
|
|
1935
|
+
name: string;
|
|
1936
|
+
variables?: VariablesV3_54_01;
|
|
1937
|
+
filter?: HistoryStrategyFilterV3_54_0;
|
|
1938
|
+
execution: HistoryStrategyExecutionV3_54_0;
|
|
1939
|
+
}
|
|
1940
|
+
export interface HistoryStrategyFilterV3_54_0 {
|
|
1941
|
+
toolCalls?: 'retain' | 'clear';
|
|
1942
|
+
}
|
|
1943
|
+
export interface HistoryStrategyExecutionReplaceV3_54_0 {
|
|
1944
|
+
type: 'replace';
|
|
1945
|
+
template: string;
|
|
1946
|
+
}
|
|
1947
|
+
export interface HistoryStrategyExecutionSummarizeV3_54_0 {
|
|
1948
|
+
type: 'generate';
|
|
1949
|
+
service: string;
|
|
1950
|
+
model: string;
|
|
1951
|
+
systemPrompt: string;
|
|
1952
|
+
tools?: AgentToolConfigV3_54_0[];
|
|
1953
|
+
options?: AgentGenerateOptionsV3_54_0;
|
|
1954
|
+
}
|
|
1935
1955
|
export interface GuardMapV3_54_0 {
|
|
1936
1956
|
[k: string]: GuardJSONV3_54_0;
|
|
1937
1957
|
}
|
|
@@ -360,10 +360,11 @@ export type RemovePropertyKeyPatternsV3_55_0 = MinimatchPatternV3_55_0[];
|
|
|
360
360
|
* Remove Markdown formatting from the LLM response
|
|
361
361
|
*/
|
|
362
362
|
export type StripMarkdownV3_55_0 = boolean;
|
|
363
|
-
export type AgentChatHistoryConfigV3_55_0 = AgentChatHistoryRetainV3_55_0 | AgentChatHistorySummarizeV3_55_0 | AgentChatHistoryClearV3_55_0;
|
|
364
363
|
export type AgentStateSessionMemoryLocationV3_55_0 = AgentStateSessionMemoryLocationContentV3_55_0 | AgentStateSessionMemoryLocationArtifactV3_55_0 | AgentStateSessionMemoryLocationStaticValueV3_55_0;
|
|
365
364
|
export type AgentStateSessionMemoryV3_55_0 = AgentStateSessionMemoryLocationV3_55_0[];
|
|
366
365
|
export type GuardIDV3_55_0 = string;
|
|
366
|
+
export type VariablesV3_55_01 = AgentVariableV3_55_0[];
|
|
367
|
+
export type HistoryStrategyExecutionV3_55_0 = HistoryStrategyExecutionReplaceV3_55_0 | HistoryStrategyExecutionSummarizeV3_55_0;
|
|
367
368
|
/**
|
|
368
369
|
* The human-readable name of the Guard.
|
|
369
370
|
*/
|
|
@@ -1763,6 +1764,7 @@ export interface AgentJSONV3_55_0 {
|
|
|
1763
1764
|
start: AgentStartV3_55_0;
|
|
1764
1765
|
states: AgentStatesV3_55_0;
|
|
1765
1766
|
guards?: AgentGuardV3_55_0[];
|
|
1767
|
+
historyStrategies?: HistoryStrategyMapV3_55_0;
|
|
1766
1768
|
}
|
|
1767
1769
|
export interface AgentAPIChatV3_55_0 {
|
|
1768
1770
|
type: 'chat';
|
|
@@ -1800,6 +1802,7 @@ export interface AgentTransitionStepV3_55_0 {
|
|
|
1800
1802
|
suspend?: boolean;
|
|
1801
1803
|
condition?: string;
|
|
1802
1804
|
limit?: number;
|
|
1805
|
+
historyStrategy?: string;
|
|
1803
1806
|
}
|
|
1804
1807
|
/**
|
|
1805
1808
|
* States that are traversed during the execution of an agent.
|
|
@@ -1901,19 +1904,8 @@ export interface AgentExecutionChatV3_55_0 {
|
|
|
1901
1904
|
input: AgentAIStateInputV3_55_0;
|
|
1902
1905
|
artifact?: string;
|
|
1903
1906
|
tools?: AgentToolConfigV3_55_0[];
|
|
1904
|
-
history?: AgentChatHistoryConfigV3_55_0;
|
|
1905
1907
|
options?: AgentGenerateOptionsV3_55_0;
|
|
1906
1908
|
}
|
|
1907
|
-
export interface AgentChatHistoryRetainV3_55_0 {
|
|
1908
|
-
type: 'retain';
|
|
1909
|
-
}
|
|
1910
|
-
export interface AgentChatHistorySummarizeV3_55_0 {
|
|
1911
|
-
type: 'summarize';
|
|
1912
|
-
toolCalls: 'retain' | 'clear';
|
|
1913
|
-
}
|
|
1914
|
-
export interface AgentChatHistoryClearV3_55_0 {
|
|
1915
|
-
type: 'clear';
|
|
1916
|
-
}
|
|
1917
1909
|
export interface AgentStateSessionMemoryLocationContentV3_55_0 {
|
|
1918
1910
|
type: 'content';
|
|
1919
1911
|
memoryPath?: string;
|
|
@@ -1932,6 +1924,34 @@ export interface AgentStateSessionMemoryLocationStaticValueV3_55_0 {
|
|
|
1932
1924
|
export interface AgentGuardV3_55_0 {
|
|
1933
1925
|
guardId: GuardIDV3_55_0;
|
|
1934
1926
|
}
|
|
1927
|
+
export interface HistoryStrategyMapV3_55_0 {
|
|
1928
|
+
[k: string]: HistoryStrategyV3_55_0;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* This interface was referenced by `HistoryStrategyMapV3_55_0`'s JSON-Schema definition
|
|
1932
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1933
|
+
*/
|
|
1934
|
+
export interface HistoryStrategyV3_55_0 {
|
|
1935
|
+
name: string;
|
|
1936
|
+
variables?: VariablesV3_55_01;
|
|
1937
|
+
filter?: HistoryStrategyFilterV3_55_0;
|
|
1938
|
+
execution: HistoryStrategyExecutionV3_55_0;
|
|
1939
|
+
}
|
|
1940
|
+
export interface HistoryStrategyFilterV3_55_0 {
|
|
1941
|
+
toolCalls?: 'retain' | 'clear';
|
|
1942
|
+
}
|
|
1943
|
+
export interface HistoryStrategyExecutionReplaceV3_55_0 {
|
|
1944
|
+
type: 'replace';
|
|
1945
|
+
template: string;
|
|
1946
|
+
}
|
|
1947
|
+
export interface HistoryStrategyExecutionSummarizeV3_55_0 {
|
|
1948
|
+
type: 'generate';
|
|
1949
|
+
service: string;
|
|
1950
|
+
model: string;
|
|
1951
|
+
systemPrompt: string;
|
|
1952
|
+
tools?: AgentToolConfigV3_55_0[];
|
|
1953
|
+
options?: AgentGenerateOptionsV3_55_0;
|
|
1954
|
+
}
|
|
1935
1955
|
export interface GuardMapV3_55_0 {
|
|
1936
1956
|
[k: string]: GuardJSONV3_55_0;
|
|
1937
1957
|
}
|
|
@@ -30,11 +30,115 @@
|
|
|
30
30
|
"items": {
|
|
31
31
|
"$ref": "#/definitions/agentGuard"
|
|
32
32
|
}
|
|
33
|
+
},
|
|
34
|
+
"historyStrategies": {
|
|
35
|
+
"$ref": "#/definitions/historyStrategyMap"
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
"required": ["start", "states", "api"],
|
|
36
39
|
"additionalProperties": false
|
|
37
40
|
},
|
|
41
|
+
"historyStrategyMap": {
|
|
42
|
+
"title": "History Strategy Map",
|
|
43
|
+
"type": "object",
|
|
44
|
+
"patternProperties": {
|
|
45
|
+
"^[0-9A-Za-z_]+$": {
|
|
46
|
+
"$ref": "#/definitions/historyStrategy"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
},
|
|
51
|
+
"historyStrategy": {
|
|
52
|
+
"title": "History Strategy",
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"name": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"variables": {
|
|
59
|
+
"title": "Variables",
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"$ref": "#/definitions/agentVariable"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"filter": {
|
|
66
|
+
"$ref": "#/definitions/historyStrategyFilter"
|
|
67
|
+
},
|
|
68
|
+
"execution": {
|
|
69
|
+
"$ref": "#/definitions/historyStrategyExecution"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": ["name", "execution"],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
},
|
|
75
|
+
"historyStrategyFilter": {
|
|
76
|
+
"title": "History Strategy Filter",
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"toolCalls": {
|
|
80
|
+
"enum": ["retain", "clear"]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
},
|
|
85
|
+
"historyStrategyExecution": {
|
|
86
|
+
"title": "History Strategy Execution",
|
|
87
|
+
"discriminator": {
|
|
88
|
+
"propertyName": "type"
|
|
89
|
+
},
|
|
90
|
+
"oneOf": [
|
|
91
|
+
{
|
|
92
|
+
"$ref": "#/definitions/historyStrategyExecutionReplace"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"$ref": "#/definitions/historyStrategyExecutionSummarize"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"historyStrategyExecutionReplace": {
|
|
100
|
+
"title": "History Strategy Execution Replace",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"type": {
|
|
104
|
+
"enum": ["replace"]
|
|
105
|
+
},
|
|
106
|
+
"template": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": ["type", "template"],
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
},
|
|
113
|
+
"historyStrategyExecutionSummarize": {
|
|
114
|
+
"title": "History Strategy Execution Summarize",
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"type": {
|
|
118
|
+
"enum": ["generate"]
|
|
119
|
+
},
|
|
120
|
+
"service": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"model": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"systemPrompt": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
"tools": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"$ref": "#/definitions/agentToolConfig"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"options": {
|
|
136
|
+
"$ref": "#/definitions/agentGenerateOptions"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"required": ["type", "service", "model", "systemPrompt"],
|
|
140
|
+
"additionalProperties": false
|
|
141
|
+
},
|
|
38
142
|
"tool": {
|
|
39
143
|
"title": "Tool JSON",
|
|
40
144
|
"type": "object",
|
|
@@ -604,59 +708,6 @@
|
|
|
604
708
|
"required": ["type", "argName", "variableName"],
|
|
605
709
|
"additionalProperties": false
|
|
606
710
|
},
|
|
607
|
-
"agentChatHistoryConfig": {
|
|
608
|
-
"title": "Agent Chat History Config",
|
|
609
|
-
"discriminator": {
|
|
610
|
-
"propertyName": "type"
|
|
611
|
-
},
|
|
612
|
-
"oneOf": [
|
|
613
|
-
{
|
|
614
|
-
"$ref": "#/definitions/agentChatHistoryRetain"
|
|
615
|
-
},
|
|
616
|
-
{
|
|
617
|
-
"$ref": "#/definitions/agentChatHistorySummarize"
|
|
618
|
-
},
|
|
619
|
-
{
|
|
620
|
-
"$ref": "#/definitions/agentChatHistoryClear"
|
|
621
|
-
}
|
|
622
|
-
]
|
|
623
|
-
},
|
|
624
|
-
"agentChatHistoryRetain": {
|
|
625
|
-
"title": "Agent Chat History Retain",
|
|
626
|
-
"type": "object",
|
|
627
|
-
"properties": {
|
|
628
|
-
"type": {
|
|
629
|
-
"enum": ["retain"]
|
|
630
|
-
}
|
|
631
|
-
},
|
|
632
|
-
"required": ["type"],
|
|
633
|
-
"additionalProperties": false
|
|
634
|
-
},
|
|
635
|
-
"agentChatHistorySummarize": {
|
|
636
|
-
"title": "Agent Chat History Summarize",
|
|
637
|
-
"type": "object",
|
|
638
|
-
"properties": {
|
|
639
|
-
"type": {
|
|
640
|
-
"enum": ["summarize"]
|
|
641
|
-
},
|
|
642
|
-
"toolCalls": {
|
|
643
|
-
"enum": ["retain", "clear"]
|
|
644
|
-
}
|
|
645
|
-
},
|
|
646
|
-
"required": ["type", "toolCalls"],
|
|
647
|
-
"additionalProperties": false
|
|
648
|
-
},
|
|
649
|
-
"agentChatHistoryClear": {
|
|
650
|
-
"title": "Agent Chat History Clear",
|
|
651
|
-
"type": "object",
|
|
652
|
-
"properties": {
|
|
653
|
-
"type": {
|
|
654
|
-
"enum": ["clear"]
|
|
655
|
-
}
|
|
656
|
-
},
|
|
657
|
-
"required": ["type"],
|
|
658
|
-
"additionalProperties": false
|
|
659
|
-
},
|
|
660
711
|
"agentExecutionGenerate": {
|
|
661
712
|
"title": "Agent Execution Generate",
|
|
662
713
|
"type": "object",
|
|
@@ -720,9 +771,6 @@
|
|
|
720
771
|
"$ref": "#/definitions/agentToolConfig"
|
|
721
772
|
}
|
|
722
773
|
},
|
|
723
|
-
"history": {
|
|
724
|
-
"$ref": "#/definitions/agentChatHistoryConfig"
|
|
725
|
-
},
|
|
726
774
|
"options": {
|
|
727
775
|
"$ref": "#/definitions/agentGenerateOptions"
|
|
728
776
|
}
|
|
@@ -747,6 +795,9 @@
|
|
|
747
795
|
},
|
|
748
796
|
"limit": {
|
|
749
797
|
"type": "integer"
|
|
798
|
+
},
|
|
799
|
+
"historyStrategy": {
|
|
800
|
+
"type": "string"
|
|
750
801
|
}
|
|
751
802
|
},
|
|
752
803
|
"additionalProperties": false,
|
|
@@ -916,6 +916,21 @@ function validateAgents(projectSchema) {
|
|
|
916
916
|
})));
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
+
if (agent.historyStrategies) {
|
|
920
|
+
const seenStrategyNames = new Set();
|
|
921
|
+
for (const [historyStrategyId, historyStrategy] of Object.entries(agent.historyStrategies)) {
|
|
922
|
+
if (seenStrategyNames.has(historyStrategy.name)) {
|
|
923
|
+
errors.push({
|
|
924
|
+
path: [...agentPath, 'historyStrategies', historyStrategyId, 'name'],
|
|
925
|
+
type: 'conflict',
|
|
926
|
+
message: `Duplicate history strategy name "${historyStrategy.name}"`
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
else {
|
|
930
|
+
seenStrategyNames.add(historyStrategy.name);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
919
934
|
}
|
|
920
935
|
return errors;
|
|
921
936
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/schema",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.92.0",
|
|
4
4
|
"description": "TakeShape Schema",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"p-reduce": "^2.1.0",
|
|
59
59
|
"semver": "^7.3.2",
|
|
60
60
|
"tiny-invariant": "^1.2.0",
|
|
61
|
-
"@takeshape/errors": "11.
|
|
62
|
-
"@takeshape/
|
|
63
|
-
"@takeshape/
|
|
61
|
+
"@takeshape/errors": "11.92.0",
|
|
62
|
+
"@takeshape/util": "11.92.0",
|
|
63
|
+
"@takeshape/json-schema": "11.92.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@takeshape/json-schema-to-typescript": "^11.0.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"json-schema-to-ts": "^3.1.1",
|
|
78
78
|
"meow": "^9.0.0",
|
|
79
79
|
"shortid": "^2.2.15",
|
|
80
|
-
"@takeshape/infra": "11.
|
|
80
|
+
"@takeshape/infra": "11.92.0"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=20"
|