@takeshape/schema 11.64.0 → 11.69.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/project-schema/latest.d.ts +43 -7
- package/dist/project-schema/v3.48.0.d.ts +43 -7
- package/dist/project-schema/v3.49.0.d.ts +43 -7
- package/dist/project-schema/v3.50.0.d.ts +43 -7
- package/dist/project-schema/v3.51.0.d.ts +43 -7
- package/dist/project-schema/v3.52.0.d.ts +43 -7
- package/dist/project-schema/v3.53.0.d.ts +43 -7
- package/dist/schema-util.js +4 -6
- package/dist/schemas/project-schema/experimental.json +118 -5
- package/dist/types/types.d.ts +4 -1
- package/dist/types/utils.d.ts +2 -1
- package/dist/types/utils.js +3 -0
- package/dist/validate/validate.js +5 -1
- package/examples/latest/agent-schema.json +1 -1
- package/package.json +5 -5
|
@@ -288,11 +288,7 @@ export type MemoryLocations = AgentSessionMemoryLocation[];
|
|
|
288
288
|
export type Variables = AgentVariable[];
|
|
289
289
|
export type AgentExecution = AgentExecutionGraphQL | AgentExecutionGenerate | AgentExecutionChat;
|
|
290
290
|
export type AgentAIStateInput = AgentAIStateInputArgument | AgentAIStateInputTemplate;
|
|
291
|
-
export type
|
|
292
|
-
/**
|
|
293
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
294
|
-
*/
|
|
295
|
-
export type RemovePropertyKeyPatterns = MinimatchPattern[];
|
|
291
|
+
export type AgentToolConfigArg = AgentToolConfigArgAgent | AgentToolConfigArgVariable;
|
|
296
292
|
export type History1 = boolean;
|
|
297
293
|
/**
|
|
298
294
|
* Maximum number of tokens to generate.
|
|
@@ -338,6 +334,16 @@ export type StructuredOutputs = boolean;
|
|
|
338
334
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
339
335
|
*/
|
|
340
336
|
export type EnableOpenAISchemaFormat = boolean;
|
|
337
|
+
export type MinimatchPattern = string;
|
|
338
|
+
/**
|
|
339
|
+
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
340
|
+
*/
|
|
341
|
+
export type RemovePropertyKeyPatterns = MinimatchPattern[];
|
|
342
|
+
/**
|
|
343
|
+
* Remove Markdown formatting from the LLM response
|
|
344
|
+
*/
|
|
345
|
+
export type StripMarkdown = boolean;
|
|
346
|
+
export type AgentChatHistoryConfig = AgentChatHistoryRetain | AgentChatHistorySummarize | AgentChatHistoryClear;
|
|
341
347
|
export type AgentStateSessionMemoryLocation = AgentStateSessionMemoryLocationArtifact | AgentStateSessionMemoryLocationStaticValue;
|
|
342
348
|
export type AgentStateSessionMemory = AgentStateSessionMemoryLocation[];
|
|
343
349
|
export type GuardID = string;
|
|
@@ -1816,10 +1822,28 @@ export interface AgentAIStateInputTemplate {
|
|
|
1816
1822
|
inputTemplate: string;
|
|
1817
1823
|
}
|
|
1818
1824
|
export interface AgentToolConfig {
|
|
1819
|
-
description?: string;
|
|
1820
1825
|
ref: string;
|
|
1826
|
+
description?: string;
|
|
1827
|
+
args?: AgentToolConfigArg[];
|
|
1821
1828
|
selectionSet?: string;
|
|
1822
|
-
|
|
1829
|
+
}
|
|
1830
|
+
export interface AgentToolConfigArgAgent {
|
|
1831
|
+
type: 'agent';
|
|
1832
|
+
/**
|
|
1833
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1834
|
+
*/
|
|
1835
|
+
argName: string;
|
|
1836
|
+
}
|
|
1837
|
+
export interface AgentToolConfigArgVariable {
|
|
1838
|
+
type: 'variable';
|
|
1839
|
+
/**
|
|
1840
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1841
|
+
*/
|
|
1842
|
+
argName: string;
|
|
1843
|
+
/**
|
|
1844
|
+
* Name of variable to pull value from.
|
|
1845
|
+
*/
|
|
1846
|
+
variableName: string;
|
|
1823
1847
|
}
|
|
1824
1848
|
export interface AgentGenerateOptions {
|
|
1825
1849
|
history?: History1;
|
|
@@ -1843,6 +1867,7 @@ export interface AgentGenerateOptions {
|
|
|
1843
1867
|
structuredOutputs?: StructuredOutputs;
|
|
1844
1868
|
enableOpenAIFormat?: EnableOpenAISchemaFormat;
|
|
1845
1869
|
removePropertyKeyPatterns?: RemovePropertyKeyPatterns;
|
|
1870
|
+
stripMarkdown?: StripMarkdown;
|
|
1846
1871
|
}
|
|
1847
1872
|
export interface AgentExecutionChat {
|
|
1848
1873
|
type: 'chat';
|
|
@@ -1852,8 +1877,19 @@ export interface AgentExecutionChat {
|
|
|
1852
1877
|
input: AgentAIStateInput;
|
|
1853
1878
|
artifact?: string;
|
|
1854
1879
|
tools?: AgentToolConfig[];
|
|
1880
|
+
history?: AgentChatHistoryConfig;
|
|
1855
1881
|
options?: AgentGenerateOptions;
|
|
1856
1882
|
}
|
|
1883
|
+
export interface AgentChatHistoryRetain {
|
|
1884
|
+
type: 'retain';
|
|
1885
|
+
}
|
|
1886
|
+
export interface AgentChatHistorySummarize {
|
|
1887
|
+
type: 'summarize';
|
|
1888
|
+
toolCalls: 'retain' | 'clear';
|
|
1889
|
+
}
|
|
1890
|
+
export interface AgentChatHistoryClear {
|
|
1891
|
+
type: 'clear';
|
|
1892
|
+
}
|
|
1857
1893
|
export interface AgentStateSessionMemoryLocationArtifact {
|
|
1858
1894
|
type: 'artifactValue';
|
|
1859
1895
|
memoryKey: string;
|
|
@@ -267,11 +267,7 @@ export type MemoryLocationsV3_48_0 = AgentSessionMemoryLocationV3_48_0[];
|
|
|
267
267
|
export type VariablesV3_48_0 = AgentVariableV3_48_0[];
|
|
268
268
|
export type AgentExecutionV3_48_0 = AgentExecutionGraphQLV3_48_0 | AgentExecutionGenerateV3_48_0 | AgentExecutionChatV3_48_0;
|
|
269
269
|
export type AgentAIStateInputV3_48_0 = AgentAIStateInputArgumentV3_48_0 | AgentAIStateInputTemplateV3_48_0;
|
|
270
|
-
export type
|
|
271
|
-
/**
|
|
272
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
273
|
-
*/
|
|
274
|
-
export type RemovePropertyKeyPatternsV3_48_0 = MinimatchPatternV3_48_0[];
|
|
270
|
+
export type AgentToolConfigArgV3_48_0 = AgentToolConfigArgAgentV3_48_0 | AgentToolConfigArgVariableV3_48_0;
|
|
275
271
|
export type HistoryV3_48_01 = boolean;
|
|
276
272
|
/**
|
|
277
273
|
* Maximum number of tokens to generate.
|
|
@@ -317,6 +313,16 @@ export type StructuredOutputsV3_48_0 = boolean;
|
|
|
317
313
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
318
314
|
*/
|
|
319
315
|
export type EnableOpenAISchemaFormatV3_48_0 = boolean;
|
|
316
|
+
export type MinimatchPatternV3_48_0 = string;
|
|
317
|
+
/**
|
|
318
|
+
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
319
|
+
*/
|
|
320
|
+
export type RemovePropertyKeyPatternsV3_48_0 = MinimatchPatternV3_48_0[];
|
|
321
|
+
/**
|
|
322
|
+
* Remove Markdown formatting from the LLM response
|
|
323
|
+
*/
|
|
324
|
+
export type StripMarkdownV3_48_0 = boolean;
|
|
325
|
+
export type AgentChatHistoryConfigV3_48_0 = AgentChatHistoryRetainV3_48_0 | AgentChatHistorySummarizeV3_48_0 | AgentChatHistoryClearV3_48_0;
|
|
320
326
|
export type AgentStateSessionMemoryLocationV3_48_0 = AgentStateSessionMemoryLocationArtifactV3_48_0 | AgentStateSessionMemoryLocationStaticValueV3_48_0;
|
|
321
327
|
export type AgentStateSessionMemoryV3_48_0 = AgentStateSessionMemoryLocationV3_48_0[];
|
|
322
328
|
export type GuardIDV3_48_0 = string;
|
|
@@ -1683,10 +1689,28 @@ export interface AgentAIStateInputTemplateV3_48_0 {
|
|
|
1683
1689
|
inputTemplate: string;
|
|
1684
1690
|
}
|
|
1685
1691
|
export interface AgentToolConfigV3_48_0 {
|
|
1686
|
-
description?: string;
|
|
1687
1692
|
ref: string;
|
|
1693
|
+
description?: string;
|
|
1694
|
+
args?: AgentToolConfigArgV3_48_0[];
|
|
1688
1695
|
selectionSet?: string;
|
|
1689
|
-
|
|
1696
|
+
}
|
|
1697
|
+
export interface AgentToolConfigArgAgentV3_48_0 {
|
|
1698
|
+
type: 'agent';
|
|
1699
|
+
/**
|
|
1700
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1701
|
+
*/
|
|
1702
|
+
argName: string;
|
|
1703
|
+
}
|
|
1704
|
+
export interface AgentToolConfigArgVariableV3_48_0 {
|
|
1705
|
+
type: 'variable';
|
|
1706
|
+
/**
|
|
1707
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1708
|
+
*/
|
|
1709
|
+
argName: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* Name of variable to pull value from.
|
|
1712
|
+
*/
|
|
1713
|
+
variableName: string;
|
|
1690
1714
|
}
|
|
1691
1715
|
export interface AgentGenerateOptionsV3_48_0 {
|
|
1692
1716
|
history?: HistoryV3_48_01;
|
|
@@ -1710,6 +1734,7 @@ export interface AgentGenerateOptionsV3_48_0 {
|
|
|
1710
1734
|
structuredOutputs?: StructuredOutputsV3_48_0;
|
|
1711
1735
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_48_0;
|
|
1712
1736
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_48_0;
|
|
1737
|
+
stripMarkdown?: StripMarkdownV3_48_0;
|
|
1713
1738
|
}
|
|
1714
1739
|
export interface AgentExecutionChatV3_48_0 {
|
|
1715
1740
|
type: 'chat';
|
|
@@ -1719,8 +1744,19 @@ export interface AgentExecutionChatV3_48_0 {
|
|
|
1719
1744
|
input: AgentAIStateInputV3_48_0;
|
|
1720
1745
|
artifact?: string;
|
|
1721
1746
|
tools?: AgentToolConfigV3_48_0[];
|
|
1747
|
+
history?: AgentChatHistoryConfigV3_48_0;
|
|
1722
1748
|
options?: AgentGenerateOptionsV3_48_0;
|
|
1723
1749
|
}
|
|
1750
|
+
export interface AgentChatHistoryRetainV3_48_0 {
|
|
1751
|
+
type: 'retain';
|
|
1752
|
+
}
|
|
1753
|
+
export interface AgentChatHistorySummarizeV3_48_0 {
|
|
1754
|
+
type: 'summarize';
|
|
1755
|
+
toolCalls: 'retain' | 'clear';
|
|
1756
|
+
}
|
|
1757
|
+
export interface AgentChatHistoryClearV3_48_0 {
|
|
1758
|
+
type: 'clear';
|
|
1759
|
+
}
|
|
1724
1760
|
export interface AgentStateSessionMemoryLocationArtifactV3_48_0 {
|
|
1725
1761
|
type: 'artifactValue';
|
|
1726
1762
|
memoryKey: string;
|
|
@@ -267,11 +267,7 @@ export type MemoryLocationsV3_49_0 = AgentSessionMemoryLocationV3_49_0[];
|
|
|
267
267
|
export type VariablesV3_49_0 = AgentVariableV3_49_0[];
|
|
268
268
|
export type AgentExecutionV3_49_0 = AgentExecutionGraphQLV3_49_0 | AgentExecutionGenerateV3_49_0 | AgentExecutionChatV3_49_0;
|
|
269
269
|
export type AgentAIStateInputV3_49_0 = AgentAIStateInputArgumentV3_49_0 | AgentAIStateInputTemplateV3_49_0;
|
|
270
|
-
export type
|
|
271
|
-
/**
|
|
272
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
273
|
-
*/
|
|
274
|
-
export type RemovePropertyKeyPatternsV3_49_0 = MinimatchPatternV3_49_0[];
|
|
270
|
+
export type AgentToolConfigArgV3_49_0 = AgentToolConfigArgAgentV3_49_0 | AgentToolConfigArgVariableV3_49_0;
|
|
275
271
|
export type HistoryV3_49_01 = boolean;
|
|
276
272
|
/**
|
|
277
273
|
* Maximum number of tokens to generate.
|
|
@@ -317,6 +313,16 @@ export type StructuredOutputsV3_49_0 = boolean;
|
|
|
317
313
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
318
314
|
*/
|
|
319
315
|
export type EnableOpenAISchemaFormatV3_49_0 = boolean;
|
|
316
|
+
export type MinimatchPatternV3_49_0 = string;
|
|
317
|
+
/**
|
|
318
|
+
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
319
|
+
*/
|
|
320
|
+
export type RemovePropertyKeyPatternsV3_49_0 = MinimatchPatternV3_49_0[];
|
|
321
|
+
/**
|
|
322
|
+
* Remove Markdown formatting from the LLM response
|
|
323
|
+
*/
|
|
324
|
+
export type StripMarkdownV3_49_0 = boolean;
|
|
325
|
+
export type AgentChatHistoryConfigV3_49_0 = AgentChatHistoryRetainV3_49_0 | AgentChatHistorySummarizeV3_49_0 | AgentChatHistoryClearV3_49_0;
|
|
320
326
|
export type AgentStateSessionMemoryLocationV3_49_0 = AgentStateSessionMemoryLocationArtifactV3_49_0 | AgentStateSessionMemoryLocationStaticValueV3_49_0;
|
|
321
327
|
export type AgentStateSessionMemoryV3_49_0 = AgentStateSessionMemoryLocationV3_49_0[];
|
|
322
328
|
export type GuardIDV3_49_0 = string;
|
|
@@ -1683,10 +1689,28 @@ export interface AgentAIStateInputTemplateV3_49_0 {
|
|
|
1683
1689
|
inputTemplate: string;
|
|
1684
1690
|
}
|
|
1685
1691
|
export interface AgentToolConfigV3_49_0 {
|
|
1686
|
-
description?: string;
|
|
1687
1692
|
ref: string;
|
|
1693
|
+
description?: string;
|
|
1694
|
+
args?: AgentToolConfigArgV3_49_0[];
|
|
1688
1695
|
selectionSet?: string;
|
|
1689
|
-
|
|
1696
|
+
}
|
|
1697
|
+
export interface AgentToolConfigArgAgentV3_49_0 {
|
|
1698
|
+
type: 'agent';
|
|
1699
|
+
/**
|
|
1700
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1701
|
+
*/
|
|
1702
|
+
argName: string;
|
|
1703
|
+
}
|
|
1704
|
+
export interface AgentToolConfigArgVariableV3_49_0 {
|
|
1705
|
+
type: 'variable';
|
|
1706
|
+
/**
|
|
1707
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1708
|
+
*/
|
|
1709
|
+
argName: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* Name of variable to pull value from.
|
|
1712
|
+
*/
|
|
1713
|
+
variableName: string;
|
|
1690
1714
|
}
|
|
1691
1715
|
export interface AgentGenerateOptionsV3_49_0 {
|
|
1692
1716
|
history?: HistoryV3_49_01;
|
|
@@ -1710,6 +1734,7 @@ export interface AgentGenerateOptionsV3_49_0 {
|
|
|
1710
1734
|
structuredOutputs?: StructuredOutputsV3_49_0;
|
|
1711
1735
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_49_0;
|
|
1712
1736
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_49_0;
|
|
1737
|
+
stripMarkdown?: StripMarkdownV3_49_0;
|
|
1713
1738
|
}
|
|
1714
1739
|
export interface AgentExecutionChatV3_49_0 {
|
|
1715
1740
|
type: 'chat';
|
|
@@ -1719,8 +1744,19 @@ export interface AgentExecutionChatV3_49_0 {
|
|
|
1719
1744
|
input: AgentAIStateInputV3_49_0;
|
|
1720
1745
|
artifact?: string;
|
|
1721
1746
|
tools?: AgentToolConfigV3_49_0[];
|
|
1747
|
+
history?: AgentChatHistoryConfigV3_49_0;
|
|
1722
1748
|
options?: AgentGenerateOptionsV3_49_0;
|
|
1723
1749
|
}
|
|
1750
|
+
export interface AgentChatHistoryRetainV3_49_0 {
|
|
1751
|
+
type: 'retain';
|
|
1752
|
+
}
|
|
1753
|
+
export interface AgentChatHistorySummarizeV3_49_0 {
|
|
1754
|
+
type: 'summarize';
|
|
1755
|
+
toolCalls: 'retain' | 'clear';
|
|
1756
|
+
}
|
|
1757
|
+
export interface AgentChatHistoryClearV3_49_0 {
|
|
1758
|
+
type: 'clear';
|
|
1759
|
+
}
|
|
1724
1760
|
export interface AgentStateSessionMemoryLocationArtifactV3_49_0 {
|
|
1725
1761
|
type: 'artifactValue';
|
|
1726
1762
|
memoryKey: string;
|
|
@@ -279,11 +279,7 @@ export type MemoryLocationsV3_50_0 = AgentSessionMemoryLocationV3_50_0[];
|
|
|
279
279
|
export type VariablesV3_50_0 = AgentVariableV3_50_0[];
|
|
280
280
|
export type AgentExecutionV3_50_0 = AgentExecutionGraphQLV3_50_0 | AgentExecutionGenerateV3_50_0 | AgentExecutionChatV3_50_0;
|
|
281
281
|
export type AgentAIStateInputV3_50_0 = AgentAIStateInputArgumentV3_50_0 | AgentAIStateInputTemplateV3_50_0;
|
|
282
|
-
export type
|
|
283
|
-
/**
|
|
284
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
285
|
-
*/
|
|
286
|
-
export type RemovePropertyKeyPatternsV3_50_0 = MinimatchPatternV3_50_0[];
|
|
282
|
+
export type AgentToolConfigArgV3_50_0 = AgentToolConfigArgAgentV3_50_0 | AgentToolConfigArgVariableV3_50_0;
|
|
287
283
|
export type HistoryV3_50_01 = boolean;
|
|
288
284
|
/**
|
|
289
285
|
* Maximum number of tokens to generate.
|
|
@@ -329,6 +325,16 @@ export type StructuredOutputsV3_50_0 = boolean;
|
|
|
329
325
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
330
326
|
*/
|
|
331
327
|
export type EnableOpenAISchemaFormatV3_50_0 = boolean;
|
|
328
|
+
export type MinimatchPatternV3_50_0 = string;
|
|
329
|
+
/**
|
|
330
|
+
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
331
|
+
*/
|
|
332
|
+
export type RemovePropertyKeyPatternsV3_50_0 = MinimatchPatternV3_50_0[];
|
|
333
|
+
/**
|
|
334
|
+
* Remove Markdown formatting from the LLM response
|
|
335
|
+
*/
|
|
336
|
+
export type StripMarkdownV3_50_0 = boolean;
|
|
337
|
+
export type AgentChatHistoryConfigV3_50_0 = AgentChatHistoryRetainV3_50_0 | AgentChatHistorySummarizeV3_50_0 | AgentChatHistoryClearV3_50_0;
|
|
332
338
|
export type AgentStateSessionMemoryLocationV3_50_0 = AgentStateSessionMemoryLocationArtifactV3_50_0 | AgentStateSessionMemoryLocationStaticValueV3_50_0;
|
|
333
339
|
export type AgentStateSessionMemoryV3_50_0 = AgentStateSessionMemoryLocationV3_50_0[];
|
|
334
340
|
export type GuardIDV3_50_0 = string;
|
|
@@ -1735,10 +1741,28 @@ export interface AgentAIStateInputTemplateV3_50_0 {
|
|
|
1735
1741
|
inputTemplate: string;
|
|
1736
1742
|
}
|
|
1737
1743
|
export interface AgentToolConfigV3_50_0 {
|
|
1738
|
-
description?: string;
|
|
1739
1744
|
ref: string;
|
|
1745
|
+
description?: string;
|
|
1746
|
+
args?: AgentToolConfigArgV3_50_0[];
|
|
1740
1747
|
selectionSet?: string;
|
|
1741
|
-
|
|
1748
|
+
}
|
|
1749
|
+
export interface AgentToolConfigArgAgentV3_50_0 {
|
|
1750
|
+
type: 'agent';
|
|
1751
|
+
/**
|
|
1752
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1753
|
+
*/
|
|
1754
|
+
argName: string;
|
|
1755
|
+
}
|
|
1756
|
+
export interface AgentToolConfigArgVariableV3_50_0 {
|
|
1757
|
+
type: 'variable';
|
|
1758
|
+
/**
|
|
1759
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1760
|
+
*/
|
|
1761
|
+
argName: string;
|
|
1762
|
+
/**
|
|
1763
|
+
* Name of variable to pull value from.
|
|
1764
|
+
*/
|
|
1765
|
+
variableName: string;
|
|
1742
1766
|
}
|
|
1743
1767
|
export interface AgentGenerateOptionsV3_50_0 {
|
|
1744
1768
|
history?: HistoryV3_50_01;
|
|
@@ -1762,6 +1786,7 @@ export interface AgentGenerateOptionsV3_50_0 {
|
|
|
1762
1786
|
structuredOutputs?: StructuredOutputsV3_50_0;
|
|
1763
1787
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_50_0;
|
|
1764
1788
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_50_0;
|
|
1789
|
+
stripMarkdown?: StripMarkdownV3_50_0;
|
|
1765
1790
|
}
|
|
1766
1791
|
export interface AgentExecutionChatV3_50_0 {
|
|
1767
1792
|
type: 'chat';
|
|
@@ -1771,8 +1796,19 @@ export interface AgentExecutionChatV3_50_0 {
|
|
|
1771
1796
|
input: AgentAIStateInputV3_50_0;
|
|
1772
1797
|
artifact?: string;
|
|
1773
1798
|
tools?: AgentToolConfigV3_50_0[];
|
|
1799
|
+
history?: AgentChatHistoryConfigV3_50_0;
|
|
1774
1800
|
options?: AgentGenerateOptionsV3_50_0;
|
|
1775
1801
|
}
|
|
1802
|
+
export interface AgentChatHistoryRetainV3_50_0 {
|
|
1803
|
+
type: 'retain';
|
|
1804
|
+
}
|
|
1805
|
+
export interface AgentChatHistorySummarizeV3_50_0 {
|
|
1806
|
+
type: 'summarize';
|
|
1807
|
+
toolCalls: 'retain' | 'clear';
|
|
1808
|
+
}
|
|
1809
|
+
export interface AgentChatHistoryClearV3_50_0 {
|
|
1810
|
+
type: 'clear';
|
|
1811
|
+
}
|
|
1776
1812
|
export interface AgentStateSessionMemoryLocationArtifactV3_50_0 {
|
|
1777
1813
|
type: 'artifactValue';
|
|
1778
1814
|
memoryKey: string;
|
|
@@ -279,11 +279,7 @@ export type MemoryLocationsV3_51_0 = AgentSessionMemoryLocationV3_51_0[];
|
|
|
279
279
|
export type VariablesV3_51_0 = AgentVariableV3_51_0[];
|
|
280
280
|
export type AgentExecutionV3_51_0 = AgentExecutionGraphQLV3_51_0 | AgentExecutionGenerateV3_51_0 | AgentExecutionChatV3_51_0;
|
|
281
281
|
export type AgentAIStateInputV3_51_0 = AgentAIStateInputArgumentV3_51_0 | AgentAIStateInputTemplateV3_51_0;
|
|
282
|
-
export type
|
|
283
|
-
/**
|
|
284
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
285
|
-
*/
|
|
286
|
-
export type RemovePropertyKeyPatternsV3_51_0 = MinimatchPatternV3_51_0[];
|
|
282
|
+
export type AgentToolConfigArgV3_51_0 = AgentToolConfigArgAgentV3_51_0 | AgentToolConfigArgVariableV3_51_0;
|
|
287
283
|
export type HistoryV3_51_01 = boolean;
|
|
288
284
|
/**
|
|
289
285
|
* Maximum number of tokens to generate.
|
|
@@ -329,6 +325,16 @@ export type StructuredOutputsV3_51_0 = boolean;
|
|
|
329
325
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
330
326
|
*/
|
|
331
327
|
export type EnableOpenAISchemaFormatV3_51_0 = boolean;
|
|
328
|
+
export type MinimatchPatternV3_51_0 = string;
|
|
329
|
+
/**
|
|
330
|
+
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
331
|
+
*/
|
|
332
|
+
export type RemovePropertyKeyPatternsV3_51_0 = MinimatchPatternV3_51_0[];
|
|
333
|
+
/**
|
|
334
|
+
* Remove Markdown formatting from the LLM response
|
|
335
|
+
*/
|
|
336
|
+
export type StripMarkdownV3_51_0 = boolean;
|
|
337
|
+
export type AgentChatHistoryConfigV3_51_0 = AgentChatHistoryRetainV3_51_0 | AgentChatHistorySummarizeV3_51_0 | AgentChatHistoryClearV3_51_0;
|
|
332
338
|
export type AgentStateSessionMemoryLocationV3_51_0 = AgentStateSessionMemoryLocationArtifactV3_51_0 | AgentStateSessionMemoryLocationStaticValueV3_51_0;
|
|
333
339
|
export type AgentStateSessionMemoryV3_51_0 = AgentStateSessionMemoryLocationV3_51_0[];
|
|
334
340
|
export type GuardIDV3_51_0 = string;
|
|
@@ -1735,10 +1741,28 @@ export interface AgentAIStateInputTemplateV3_51_0 {
|
|
|
1735
1741
|
inputTemplate: string;
|
|
1736
1742
|
}
|
|
1737
1743
|
export interface AgentToolConfigV3_51_0 {
|
|
1738
|
-
description?: string;
|
|
1739
1744
|
ref: string;
|
|
1745
|
+
description?: string;
|
|
1746
|
+
args?: AgentToolConfigArgV3_51_0[];
|
|
1740
1747
|
selectionSet?: string;
|
|
1741
|
-
|
|
1748
|
+
}
|
|
1749
|
+
export interface AgentToolConfigArgAgentV3_51_0 {
|
|
1750
|
+
type: 'agent';
|
|
1751
|
+
/**
|
|
1752
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1753
|
+
*/
|
|
1754
|
+
argName: string;
|
|
1755
|
+
}
|
|
1756
|
+
export interface AgentToolConfigArgVariableV3_51_0 {
|
|
1757
|
+
type: 'variable';
|
|
1758
|
+
/**
|
|
1759
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1760
|
+
*/
|
|
1761
|
+
argName: string;
|
|
1762
|
+
/**
|
|
1763
|
+
* Name of variable to pull value from.
|
|
1764
|
+
*/
|
|
1765
|
+
variableName: string;
|
|
1742
1766
|
}
|
|
1743
1767
|
export interface AgentGenerateOptionsV3_51_0 {
|
|
1744
1768
|
history?: HistoryV3_51_01;
|
|
@@ -1762,6 +1786,7 @@ export interface AgentGenerateOptionsV3_51_0 {
|
|
|
1762
1786
|
structuredOutputs?: StructuredOutputsV3_51_0;
|
|
1763
1787
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_51_0;
|
|
1764
1788
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_51_0;
|
|
1789
|
+
stripMarkdown?: StripMarkdownV3_51_0;
|
|
1765
1790
|
}
|
|
1766
1791
|
export interface AgentExecutionChatV3_51_0 {
|
|
1767
1792
|
type: 'chat';
|
|
@@ -1771,8 +1796,19 @@ export interface AgentExecutionChatV3_51_0 {
|
|
|
1771
1796
|
input: AgentAIStateInputV3_51_0;
|
|
1772
1797
|
artifact?: string;
|
|
1773
1798
|
tools?: AgentToolConfigV3_51_0[];
|
|
1799
|
+
history?: AgentChatHistoryConfigV3_51_0;
|
|
1774
1800
|
options?: AgentGenerateOptionsV3_51_0;
|
|
1775
1801
|
}
|
|
1802
|
+
export interface AgentChatHistoryRetainV3_51_0 {
|
|
1803
|
+
type: 'retain';
|
|
1804
|
+
}
|
|
1805
|
+
export interface AgentChatHistorySummarizeV3_51_0 {
|
|
1806
|
+
type: 'summarize';
|
|
1807
|
+
toolCalls: 'retain' | 'clear';
|
|
1808
|
+
}
|
|
1809
|
+
export interface AgentChatHistoryClearV3_51_0 {
|
|
1810
|
+
type: 'clear';
|
|
1811
|
+
}
|
|
1776
1812
|
export interface AgentStateSessionMemoryLocationArtifactV3_51_0 {
|
|
1777
1813
|
type: 'artifactValue';
|
|
1778
1814
|
memoryKey: string;
|
|
@@ -279,11 +279,7 @@ export type MemoryLocationsV3_52_0 = AgentSessionMemoryLocationV3_52_0[];
|
|
|
279
279
|
export type VariablesV3_52_0 = AgentVariableV3_52_0[];
|
|
280
280
|
export type AgentExecutionV3_52_0 = AgentExecutionGraphQLV3_52_0 | AgentExecutionGenerateV3_52_0 | AgentExecutionChatV3_52_0;
|
|
281
281
|
export type AgentAIStateInputV3_52_0 = AgentAIStateInputArgumentV3_52_0 | AgentAIStateInputTemplateV3_52_0;
|
|
282
|
-
export type
|
|
283
|
-
/**
|
|
284
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
285
|
-
*/
|
|
286
|
-
export type RemovePropertyKeyPatternsV3_52_0 = MinimatchPatternV3_52_0[];
|
|
282
|
+
export type AgentToolConfigArgV3_52_0 = AgentToolConfigArgAgentV3_52_0 | AgentToolConfigArgVariableV3_52_0;
|
|
287
283
|
export type HistoryV3_52_01 = boolean;
|
|
288
284
|
/**
|
|
289
285
|
* Maximum number of tokens to generate.
|
|
@@ -329,6 +325,16 @@ export type StructuredOutputsV3_52_0 = boolean;
|
|
|
329
325
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
330
326
|
*/
|
|
331
327
|
export type EnableOpenAISchemaFormatV3_52_0 = boolean;
|
|
328
|
+
export type MinimatchPatternV3_52_0 = string;
|
|
329
|
+
/**
|
|
330
|
+
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
331
|
+
*/
|
|
332
|
+
export type RemovePropertyKeyPatternsV3_52_0 = MinimatchPatternV3_52_0[];
|
|
333
|
+
/**
|
|
334
|
+
* Remove Markdown formatting from the LLM response
|
|
335
|
+
*/
|
|
336
|
+
export type StripMarkdownV3_52_0 = boolean;
|
|
337
|
+
export type AgentChatHistoryConfigV3_52_0 = AgentChatHistoryRetainV3_52_0 | AgentChatHistorySummarizeV3_52_0 | AgentChatHistoryClearV3_52_0;
|
|
332
338
|
export type AgentStateSessionMemoryLocationV3_52_0 = AgentStateSessionMemoryLocationArtifactV3_52_0 | AgentStateSessionMemoryLocationStaticValueV3_52_0;
|
|
333
339
|
export type AgentStateSessionMemoryV3_52_0 = AgentStateSessionMemoryLocationV3_52_0[];
|
|
334
340
|
export type GuardIDV3_52_0 = string;
|
|
@@ -1735,10 +1741,28 @@ export interface AgentAIStateInputTemplateV3_52_0 {
|
|
|
1735
1741
|
inputTemplate: string;
|
|
1736
1742
|
}
|
|
1737
1743
|
export interface AgentToolConfigV3_52_0 {
|
|
1738
|
-
description?: string;
|
|
1739
1744
|
ref: string;
|
|
1745
|
+
description?: string;
|
|
1746
|
+
args?: AgentToolConfigArgV3_52_0[];
|
|
1740
1747
|
selectionSet?: string;
|
|
1741
|
-
|
|
1748
|
+
}
|
|
1749
|
+
export interface AgentToolConfigArgAgentV3_52_0 {
|
|
1750
|
+
type: 'agent';
|
|
1751
|
+
/**
|
|
1752
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1753
|
+
*/
|
|
1754
|
+
argName: string;
|
|
1755
|
+
}
|
|
1756
|
+
export interface AgentToolConfigArgVariableV3_52_0 {
|
|
1757
|
+
type: 'variable';
|
|
1758
|
+
/**
|
|
1759
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1760
|
+
*/
|
|
1761
|
+
argName: string;
|
|
1762
|
+
/**
|
|
1763
|
+
* Name of variable to pull value from.
|
|
1764
|
+
*/
|
|
1765
|
+
variableName: string;
|
|
1742
1766
|
}
|
|
1743
1767
|
export interface AgentGenerateOptionsV3_52_0 {
|
|
1744
1768
|
history?: HistoryV3_52_01;
|
|
@@ -1762,6 +1786,7 @@ export interface AgentGenerateOptionsV3_52_0 {
|
|
|
1762
1786
|
structuredOutputs?: StructuredOutputsV3_52_0;
|
|
1763
1787
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_52_0;
|
|
1764
1788
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_52_0;
|
|
1789
|
+
stripMarkdown?: StripMarkdownV3_52_0;
|
|
1765
1790
|
}
|
|
1766
1791
|
export interface AgentExecutionChatV3_52_0 {
|
|
1767
1792
|
type: 'chat';
|
|
@@ -1771,8 +1796,19 @@ export interface AgentExecutionChatV3_52_0 {
|
|
|
1771
1796
|
input: AgentAIStateInputV3_52_0;
|
|
1772
1797
|
artifact?: string;
|
|
1773
1798
|
tools?: AgentToolConfigV3_52_0[];
|
|
1799
|
+
history?: AgentChatHistoryConfigV3_52_0;
|
|
1774
1800
|
options?: AgentGenerateOptionsV3_52_0;
|
|
1775
1801
|
}
|
|
1802
|
+
export interface AgentChatHistoryRetainV3_52_0 {
|
|
1803
|
+
type: 'retain';
|
|
1804
|
+
}
|
|
1805
|
+
export interface AgentChatHistorySummarizeV3_52_0 {
|
|
1806
|
+
type: 'summarize';
|
|
1807
|
+
toolCalls: 'retain' | 'clear';
|
|
1808
|
+
}
|
|
1809
|
+
export interface AgentChatHistoryClearV3_52_0 {
|
|
1810
|
+
type: 'clear';
|
|
1811
|
+
}
|
|
1776
1812
|
export interface AgentStateSessionMemoryLocationArtifactV3_52_0 {
|
|
1777
1813
|
type: 'artifactValue';
|
|
1778
1814
|
memoryKey: string;
|
|
@@ -288,11 +288,7 @@ export type MemoryLocationsV3_53_0 = AgentSessionMemoryLocationV3_53_0[];
|
|
|
288
288
|
export type VariablesV3_53_0 = AgentVariableV3_53_0[];
|
|
289
289
|
export type AgentExecutionV3_53_0 = AgentExecutionGraphQLV3_53_0 | AgentExecutionGenerateV3_53_0 | AgentExecutionChatV3_53_0;
|
|
290
290
|
export type AgentAIStateInputV3_53_0 = AgentAIStateInputArgumentV3_53_0 | AgentAIStateInputTemplateV3_53_0;
|
|
291
|
-
export type
|
|
292
|
-
/**
|
|
293
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
294
|
-
*/
|
|
295
|
-
export type RemovePropertyKeyPatternsV3_53_0 = MinimatchPatternV3_53_0[];
|
|
291
|
+
export type AgentToolConfigArgV3_53_0 = AgentToolConfigArgAgentV3_53_0 | AgentToolConfigArgVariableV3_53_0;
|
|
296
292
|
export type HistoryV3_53_01 = boolean;
|
|
297
293
|
/**
|
|
298
294
|
* Maximum number of tokens to generate.
|
|
@@ -338,6 +334,16 @@ export type StructuredOutputsV3_53_0 = boolean;
|
|
|
338
334
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
339
335
|
*/
|
|
340
336
|
export type EnableOpenAISchemaFormatV3_53_0 = boolean;
|
|
337
|
+
export type MinimatchPatternV3_53_0 = string;
|
|
338
|
+
/**
|
|
339
|
+
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
340
|
+
*/
|
|
341
|
+
export type RemovePropertyKeyPatternsV3_53_0 = MinimatchPatternV3_53_0[];
|
|
342
|
+
/**
|
|
343
|
+
* Remove Markdown formatting from the LLM response
|
|
344
|
+
*/
|
|
345
|
+
export type StripMarkdownV3_53_0 = boolean;
|
|
346
|
+
export type AgentChatHistoryConfigV3_53_0 = AgentChatHistoryRetainV3_53_0 | AgentChatHistorySummarizeV3_53_0 | AgentChatHistoryClearV3_53_0;
|
|
341
347
|
export type AgentStateSessionMemoryLocationV3_53_0 = AgentStateSessionMemoryLocationArtifactV3_53_0 | AgentStateSessionMemoryLocationStaticValueV3_53_0;
|
|
342
348
|
export type AgentStateSessionMemoryV3_53_0 = AgentStateSessionMemoryLocationV3_53_0[];
|
|
343
349
|
export type GuardIDV3_53_0 = string;
|
|
@@ -1816,10 +1822,28 @@ export interface AgentAIStateInputTemplateV3_53_0 {
|
|
|
1816
1822
|
inputTemplate: string;
|
|
1817
1823
|
}
|
|
1818
1824
|
export interface AgentToolConfigV3_53_0 {
|
|
1819
|
-
description?: string;
|
|
1820
1825
|
ref: string;
|
|
1826
|
+
description?: string;
|
|
1827
|
+
args?: AgentToolConfigArgV3_53_0[];
|
|
1821
1828
|
selectionSet?: string;
|
|
1822
|
-
|
|
1829
|
+
}
|
|
1830
|
+
export interface AgentToolConfigArgAgentV3_53_0 {
|
|
1831
|
+
type: 'agent';
|
|
1832
|
+
/**
|
|
1833
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1834
|
+
*/
|
|
1835
|
+
argName: string;
|
|
1836
|
+
}
|
|
1837
|
+
export interface AgentToolConfigArgVariableV3_53_0 {
|
|
1838
|
+
type: 'variable';
|
|
1839
|
+
/**
|
|
1840
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1841
|
+
*/
|
|
1842
|
+
argName: string;
|
|
1843
|
+
/**
|
|
1844
|
+
* Name of variable to pull value from.
|
|
1845
|
+
*/
|
|
1846
|
+
variableName: string;
|
|
1823
1847
|
}
|
|
1824
1848
|
export interface AgentGenerateOptionsV3_53_0 {
|
|
1825
1849
|
history?: HistoryV3_53_01;
|
|
@@ -1843,6 +1867,7 @@ export interface AgentGenerateOptionsV3_53_0 {
|
|
|
1843
1867
|
structuredOutputs?: StructuredOutputsV3_53_0;
|
|
1844
1868
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_53_0;
|
|
1845
1869
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_53_0;
|
|
1870
|
+
stripMarkdown?: StripMarkdownV3_53_0;
|
|
1846
1871
|
}
|
|
1847
1872
|
export interface AgentExecutionChatV3_53_0 {
|
|
1848
1873
|
type: 'chat';
|
|
@@ -1852,8 +1877,19 @@ export interface AgentExecutionChatV3_53_0 {
|
|
|
1852
1877
|
input: AgentAIStateInputV3_53_0;
|
|
1853
1878
|
artifact?: string;
|
|
1854
1879
|
tools?: AgentToolConfigV3_53_0[];
|
|
1880
|
+
history?: AgentChatHistoryConfigV3_53_0;
|
|
1855
1881
|
options?: AgentGenerateOptionsV3_53_0;
|
|
1856
1882
|
}
|
|
1883
|
+
export interface AgentChatHistoryRetainV3_53_0 {
|
|
1884
|
+
type: 'retain';
|
|
1885
|
+
}
|
|
1886
|
+
export interface AgentChatHistorySummarizeV3_53_0 {
|
|
1887
|
+
type: 'summarize';
|
|
1888
|
+
toolCalls: 'retain' | 'clear';
|
|
1889
|
+
}
|
|
1890
|
+
export interface AgentChatHistoryClearV3_53_0 {
|
|
1891
|
+
type: 'clear';
|
|
1892
|
+
}
|
|
1857
1893
|
export interface AgentStateSessionMemoryLocationArtifactV3_53_0 {
|
|
1858
1894
|
type: 'artifactValue';
|
|
1859
1895
|
memoryKey: string;
|
package/dist/schema-util.js
CHANGED
|
@@ -11,7 +11,7 @@ import { workflowsEnabled } from "./api-version.js";
|
|
|
11
11
|
import { builtInForms, builtInShapes } from "./builtin-schema.js";
|
|
12
12
|
import { SERVICE_OBJECT_PATTERN_NAME } from "./constants.js";
|
|
13
13
|
import { atRefToRefItem, createTemplateShapeName, dereferenceObjectSchema, dereferenceSchema, getRef, getRefOrItemsRef, getRefShapeName, parseReturnShape, parseTemplateShape, refExpressionToRefItem, refItemToNamespacedShapeName, refItemToShape, refItemToShapeSchema, refToRefItem, returnShapeToSchema, serializePropertyRef } from "./refs.js";
|
|
14
|
-
import { getArgsType, isAllOfSchema, isArraySchema, isCachedShape, isExtendsSchema, isGraphqlResolver, isModelShape, isObjectSchema, isOneOfSchema, isRefSchema } from "./types/index.js";
|
|
14
|
+
import { getArgsType, isAllOfSchema, isArraySchema, isCachedShape, isExtendsSchema, isGraphqlResolver, isModelShape, isObjectSchema, isOneOfSchema, isReferenceableShape, isRefSchema } from "./types/index.js";
|
|
15
15
|
import { isUnionSchema } from "./unions.js";
|
|
16
16
|
import { getArgs } from "./util/has-arg.js";
|
|
17
17
|
import { mergeFormProperties, mergeSchemaProperties } from "./util/merge.js";
|
|
@@ -232,7 +232,7 @@ export function getIdField(obj) {
|
|
|
232
232
|
/**
|
|
233
233
|
* Get properties necessary for cached / remote data to work with the TSSearchable interface.
|
|
234
234
|
*/
|
|
235
|
-
function getCachedBuiltInProperties(
|
|
235
|
+
function getCachedBuiltInProperties(shape, properties) {
|
|
236
236
|
const idField = getIdField(shape.cache);
|
|
237
237
|
// TODO Implement `searchSummary` and `_shapeId` here, and remove `getRemoteShapeTSSearchableFields`
|
|
238
238
|
return {
|
|
@@ -348,7 +348,7 @@ function getBuiltInPropertiesProfile(shape) {
|
|
|
348
348
|
if (isModelShape(shape)) {
|
|
349
349
|
return BuiltInPropertiesProfile.Model;
|
|
350
350
|
}
|
|
351
|
-
if (isCachedShape(shape)) {
|
|
351
|
+
if (isCachedShape(shape) || isReferenceableShape(shape)) {
|
|
352
352
|
return BuiltInPropertiesProfile.Cached;
|
|
353
353
|
}
|
|
354
354
|
return BuiltInPropertiesProfile.None;
|
|
@@ -362,9 +362,7 @@ export function applyBuiltinPropertiesToShape(projectSchema, shape) {
|
|
|
362
362
|
const { properties } = shapeObjectSchema;
|
|
363
363
|
const commonProperties = getCommonBuiltInProperties(shape);
|
|
364
364
|
const modelProperties = profile === BuiltInPropertiesProfile.Model ? getModelBuiltInProperties(projectSchema, shape) : undefined;
|
|
365
|
-
const cachedProperties = profile === BuiltInPropertiesProfile.Cached
|
|
366
|
-
? getCachedBuiltInProperties(projectSchema, shape, properties)
|
|
367
|
-
: undefined;
|
|
365
|
+
const cachedProperties = profile === BuiltInPropertiesProfile.Cached ? getCachedBuiltInProperties(shape, properties) : undefined;
|
|
368
366
|
return {
|
|
369
367
|
...shape,
|
|
370
368
|
schema: {
|
|
@@ -457,6 +457,11 @@
|
|
|
457
457
|
},
|
|
458
458
|
"removePropertyKeyPatterns": {
|
|
459
459
|
"$ref": "#/definitions/removePropertyKeyPatterns"
|
|
460
|
+
},
|
|
461
|
+
"stripMarkdown": {
|
|
462
|
+
"type": "boolean",
|
|
463
|
+
"title": "Strip Markdown",
|
|
464
|
+
"description": "Remove Markdown formatting from the LLM response"
|
|
460
465
|
}
|
|
461
466
|
},
|
|
462
467
|
"additionalProperties": false
|
|
@@ -477,22 +482,127 @@
|
|
|
477
482
|
"title": "AgentToolConfig",
|
|
478
483
|
"type": "object",
|
|
479
484
|
"properties": {
|
|
480
|
-
"
|
|
485
|
+
"ref": {
|
|
481
486
|
"type": "string"
|
|
482
487
|
},
|
|
483
|
-
"
|
|
488
|
+
"description": {
|
|
484
489
|
"type": "string"
|
|
485
490
|
},
|
|
491
|
+
"args": {
|
|
492
|
+
"type": "array",
|
|
493
|
+
"items": {
|
|
494
|
+
"$ref": "#/definitions/agentToolConfigArg"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
486
497
|
"selectionSet": {
|
|
487
498
|
"type": "string"
|
|
488
|
-
},
|
|
489
|
-
"removePropertyKeyPatterns": {
|
|
490
|
-
"$ref": "#/definitions/removePropertyKeyPatterns"
|
|
491
499
|
}
|
|
492
500
|
},
|
|
493
501
|
"required": ["ref"],
|
|
494
502
|
"additionalProperties": false
|
|
495
503
|
},
|
|
504
|
+
"agentToolConfigArg": {
|
|
505
|
+
"title": "Agent Tool Config Arg",
|
|
506
|
+
"type": "object",
|
|
507
|
+
"discriminator": {
|
|
508
|
+
"propertyName": "type"
|
|
509
|
+
},
|
|
510
|
+
"oneOf": [
|
|
511
|
+
{
|
|
512
|
+
"$ref": "#/definitions/agentToolConfigArgAgent"
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"$ref": "#/definitions/agentToolConfigArgVariable"
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
"agentToolConfigArgAgent": {
|
|
520
|
+
"title": "Agent Tool Config Arg Agent",
|
|
521
|
+
"type": "object",
|
|
522
|
+
"properties": {
|
|
523
|
+
"type": {
|
|
524
|
+
"enum": ["agent"]
|
|
525
|
+
},
|
|
526
|
+
"argName": {
|
|
527
|
+
"type": "string",
|
|
528
|
+
"description": "The argument name that will be exposed by the tool for the LLM to use."
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
"required": ["type", "argName"],
|
|
532
|
+
"additionalProperties": false
|
|
533
|
+
},
|
|
534
|
+
"agentToolConfigArgVariable": {
|
|
535
|
+
"title": "Agent Tool Config Arg Variable",
|
|
536
|
+
"type": "object",
|
|
537
|
+
"properties": {
|
|
538
|
+
"type": {
|
|
539
|
+
"enum": ["variable"]
|
|
540
|
+
},
|
|
541
|
+
"argName": {
|
|
542
|
+
"type": "string",
|
|
543
|
+
"description": "Name of argument to pass value to. This prevents the LLM from setting the argument."
|
|
544
|
+
},
|
|
545
|
+
"variableName": {
|
|
546
|
+
"type": "string",
|
|
547
|
+
"description": "Name of variable to pull value from."
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"required": ["type", "argName", "variableName"],
|
|
551
|
+
"additionalProperties": false
|
|
552
|
+
},
|
|
553
|
+
"agentChatHistoryConfig": {
|
|
554
|
+
"title": "Agent Chat History Config",
|
|
555
|
+
"discriminator": {
|
|
556
|
+
"propertyName": "type"
|
|
557
|
+
},
|
|
558
|
+
"oneOf": [
|
|
559
|
+
{
|
|
560
|
+
"$ref": "#/definitions/agentChatHistoryRetain"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"$ref": "#/definitions/agentChatHistorySummarize"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"$ref": "#/definitions/agentChatHistoryClear"
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
"agentChatHistoryRetain": {
|
|
571
|
+
"title": "Agent Chat History Retain",
|
|
572
|
+
"type": "object",
|
|
573
|
+
"properties": {
|
|
574
|
+
"type": {
|
|
575
|
+
"enum": ["retain"]
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
"required": ["type"],
|
|
579
|
+
"additionalProperties": false
|
|
580
|
+
},
|
|
581
|
+
"agentChatHistorySummarize": {
|
|
582
|
+
"title": "Agent Chat History Summarize",
|
|
583
|
+
"type": "object",
|
|
584
|
+
"properties": {
|
|
585
|
+
"type": {
|
|
586
|
+
"enum": ["summarize"]
|
|
587
|
+
},
|
|
588
|
+
"toolCalls": {
|
|
589
|
+
"enum": ["retain", "clear"]
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"required": ["type", "toolCalls"],
|
|
593
|
+
"additionalProperties": false
|
|
594
|
+
},
|
|
595
|
+
"agentChatHistoryClear": {
|
|
596
|
+
"title": "Agent Chat History Clear",
|
|
597
|
+
"type": "object",
|
|
598
|
+
"properties": {
|
|
599
|
+
"type": {
|
|
600
|
+
"enum": ["clear"]
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
"required": ["type"],
|
|
604
|
+
"additionalProperties": false
|
|
605
|
+
},
|
|
496
606
|
"agentExecutionGenerate": {
|
|
497
607
|
"title": "Agent Execution Generate",
|
|
498
608
|
"type": "object",
|
|
@@ -556,6 +666,9 @@
|
|
|
556
666
|
"$ref": "#/definitions/agentToolConfig"
|
|
557
667
|
}
|
|
558
668
|
},
|
|
669
|
+
"history": {
|
|
670
|
+
"$ref": "#/definitions/agentChatHistoryConfig"
|
|
671
|
+
},
|
|
559
672
|
"options": {
|
|
560
673
|
"$ref": "#/definitions/agentGenerateOptions"
|
|
561
674
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Overwrite } from '@takeshape/util';
|
|
|
2
2
|
import type { XMLParser } from 'fast-xml-parser';
|
|
3
3
|
import type { Merge, PartialDeep, SetOptional, SetRequired } from 'type-fest';
|
|
4
4
|
import type { SERVICE_OBJECT_PATTERN_NAME } from '../constants.ts';
|
|
5
|
-
import type { AnyProjectSchemaJSON, CachedFragmentConfig, CustomAuthentication, GetQueryLoaderConfig, ListQueryLoaderConfig, OAuth2Authentication, ProjectSchemaJSON, ProjectSchemaJSONV1_0_0, ProjectSchemaJSONV3_0_0, ProjectSchemaJSONV3_1_0, ProjectSchemaJSONV3_2_0, ProjectSchemaJSONV3_3_0, ProjectSchemaJSONV3_4_0, ProjectSchemaJSONV3_5_0, ProjectSchemaJSONV3_5_1, ProjectSchemaJSONV3_6_0, ProjectSchemaJSONV3_7_0, ProjectSchemaJSONV3_8_0, ProjectSchemaJSONV3_9_0, ProjectSchemaJSONV3_10_0, ProjectSchemaJSONV3_11_0, ProjectSchemaJSONV3_12_0, ProjectSchemaJSONV3_12_1, ProjectSchemaJSONV3_12_2, ProjectSchemaJSONV3_12_3, ProjectSchemaJSONV3_13_0, ProjectSchemaJSONV3_14_0, ProjectSchemaJSONV3_15_0, ProjectSchemaJSONV3_16_0, ProjectSchemaJSONV3_17_0, ProjectSchemaJSONV3_17_1, ProjectSchemaJSONV3_18_0, ProjectSchemaJSONV3_18_1, ProjectSchemaJSONV3_18_2, ProjectSchemaJSONV3_19_0, ProjectSchemaJSONV3_20_0, ProjectSchemaJSONV3_21_0, ProjectSchemaJSONV3_22_0, ProjectSchemaJSONV3_23_0, PropertySchema, QueryJSON, Ref, ServiceAuthentication, ServiceConfig, ServiceMapJSON, ShapeJSON } from '../project-schema/index.ts';
|
|
5
|
+
import type { AnyProjectSchemaJSON, CachedFragmentConfig, CustomAuthentication, GetQueryLoaderConfig, ListQueryLoaderConfig, OAuth2Authentication, ProjectSchemaJSON, ProjectSchemaJSONV1_0_0, ProjectSchemaJSONV3_0_0, ProjectSchemaJSONV3_1_0, ProjectSchemaJSONV3_2_0, ProjectSchemaJSONV3_3_0, ProjectSchemaJSONV3_4_0, ProjectSchemaJSONV3_5_0, ProjectSchemaJSONV3_5_1, ProjectSchemaJSONV3_6_0, ProjectSchemaJSONV3_7_0, ProjectSchemaJSONV3_8_0, ProjectSchemaJSONV3_9_0, ProjectSchemaJSONV3_10_0, ProjectSchemaJSONV3_11_0, ProjectSchemaJSONV3_12_0, ProjectSchemaJSONV3_12_1, ProjectSchemaJSONV3_12_2, ProjectSchemaJSONV3_12_3, ProjectSchemaJSONV3_13_0, ProjectSchemaJSONV3_14_0, ProjectSchemaJSONV3_15_0, ProjectSchemaJSONV3_16_0, ProjectSchemaJSONV3_17_0, ProjectSchemaJSONV3_17_1, ProjectSchemaJSONV3_18_0, ProjectSchemaJSONV3_18_1, ProjectSchemaJSONV3_18_2, ProjectSchemaJSONV3_19_0, ProjectSchemaJSONV3_20_0, ProjectSchemaJSONV3_21_0, ProjectSchemaJSONV3_22_0, ProjectSchemaJSONV3_23_0, PropertySchema, QueryJSON, Ref, ServiceAuthentication, ServiceConfig, ServiceMapJSON, ShapeJSON, ShapeLoaders } from '../project-schema/index.ts';
|
|
6
6
|
export type ProjectSchemaJSONWithVersion = ProjectSchemaJSONV3_23_0 | ProjectSchemaJSONV3_22_0 | ProjectSchemaJSONV3_21_0 | ProjectSchemaJSONV3_20_0 | ProjectSchemaJSONV3_19_0 | ProjectSchemaJSONV3_18_2 | ProjectSchemaJSONV3_18_1 | ProjectSchemaJSONV3_18_0 | ProjectSchemaJSONV3_17_1 | ProjectSchemaJSONV3_17_0 | ProjectSchemaJSONV3_16_0 | ProjectSchemaJSONV3_15_0 | ProjectSchemaJSONV3_14_0 | ProjectSchemaJSONV3_13_0 | ProjectSchemaJSONV3_12_3 | ProjectSchemaJSONV3_12_2 | ProjectSchemaJSONV3_12_1 | ProjectSchemaJSONV3_12_0 | ProjectSchemaJSONV3_11_0 | ProjectSchemaJSONV3_10_0 | ProjectSchemaJSONV3_9_0 | ProjectSchemaJSONV3_8_0 | ProjectSchemaJSONV3_7_0 | ProjectSchemaJSONV3_6_0 | ProjectSchemaJSONV3_5_1 | ProjectSchemaJSONV3_5_0 | ProjectSchemaJSONV3_4_0 | ProjectSchemaJSONV3_3_0 | ProjectSchemaJSONV3_2_0 | ProjectSchemaJSONV3_1_0 | ProjectSchemaJSONV3_0_0 | ProjectSchemaJSONV1_0_0;
|
|
7
7
|
export declare const projectSchemaImportOptionalProps: readonly ["projectId", "locales", "defaultLocale", "author"];
|
|
8
8
|
export declare const legacyProjectSchemaImportOptionalProps: readonly ["created", "updated", "version", "dataKey"];
|
|
@@ -208,4 +208,7 @@ export type GetQueryIndexingConfig = CachedFragmentConfig & GetQueryLoaderConfig
|
|
|
208
208
|
idField: string;
|
|
209
209
|
};
|
|
210
210
|
export type MeshShape = SetRequired<ShapeJSON, 'joins'>;
|
|
211
|
+
export type ReferenceableShape = ShapeJSON & {
|
|
212
|
+
loaders: SetRequired<ShapeLoaders, 'get'>;
|
|
213
|
+
};
|
|
211
214
|
export {};
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Maybe } from '@takeshape/util';
|
|
2
2
|
import type { AgentExecution, AgentExecutionChat, AgentExecutionGenerate, AIGenerateTextResolver, AIResolverName, AllOfSchema, AnyServiceConfig, AwsLambdaResolver, BasicAuthentication, BasicResolver, BearerAuthentication, ComposeResolver, CustomAuthentication, DirectiveConfig, DirectiveMappingArray, DirectiveMappingMap, ExtendsSchema, GoogleAuthentication, GraphqlResolver, OAuth2Authentication, OAuth2BearerAuthentication, ObjectSchema, OneOfSchema, ParameterOp, ParameterOpMapping, ParameterOpNested, ParameterOpOp, ParameterOpValue, ParameterSerializeContentOptions, ParameterSerializeOptions, ParameterSerializeStyleOptions, ParameterSerializeStyleOptionsForPathParams, ParameterSerializeStyleOptionsForSearchParams, ProjectSchemaJSON, PropertySchema, RefSchema, RefSchemaLegacy, Resolver, RestResolver, ReturnShape, ReturnShapeArraySchema, SearchParamsAuthentication, ServiceAuthentication, ServiceResolver, ShapedbResolver, ShapeJSON, ShapeMap, ShapeSchemaEnum, TakeshapeResolver, UtilResolver } from '../project-schema/index.ts';
|
|
3
|
-
import type { CachedShape, EncryptedServiceConfig, GraphQLServiceConfig, LatestProjectSchemaWithServices, MeshShape, OpenAPIServiceConfig, PropertySchemaWithRelationship, RESTServiceConfig, SchemaWithArgs, SchemaWithRef, ServiceConfigWithCustomAuthentication, ServiceConfigWithOAuth2Authentication, ShopifyServiceConfig } from './types.ts';
|
|
3
|
+
import type { CachedShape, EncryptedServiceConfig, GraphQLServiceConfig, LatestProjectSchemaWithServices, MeshShape, OpenAPIServiceConfig, PropertySchemaWithRelationship, RESTServiceConfig, ReferenceableShape, SchemaWithArgs, SchemaWithRef, ServiceConfigWithCustomAuthentication, ServiceConfigWithOAuth2Authentication, ShopifyServiceConfig } from './types.ts';
|
|
4
4
|
import { ArgsType, RefType } from './types.ts';
|
|
5
5
|
/** Resolver Type Utils **/
|
|
6
6
|
/**
|
|
@@ -112,6 +112,7 @@ export declare const getRefType: (refSchema: SchemaWithRef) => Maybe<RefType>;
|
|
|
112
112
|
export declare function isPropertySchemaWithRelationship(schema: PropertySchema): schema is PropertySchemaWithRelationship;
|
|
113
113
|
export declare function isModelShape(shape: ShapeJSON): boolean;
|
|
114
114
|
export declare function isCachedShape(shape: ShapeJSON): shape is CachedShape;
|
|
115
|
+
export declare function isReferenceableShape(shape: ShapeJSON): shape is ReferenceableShape;
|
|
115
116
|
export declare function listCachedShapes(shapes: ShapeMap): CachedShape[];
|
|
116
117
|
export declare function getCachedShapeMap(shapes: ShapeMap): Record<string, CachedShape>;
|
|
117
118
|
export declare function isMeshShape(shape: ShapeJSON): shape is MeshShape;
|
package/dist/types/utils.js
CHANGED
|
@@ -262,6 +262,9 @@ export function isModelShape(shape) {
|
|
|
262
262
|
export function isCachedShape(shape) {
|
|
263
263
|
return shape.cache?.enabled === true && shape.loaders !== undefined;
|
|
264
264
|
}
|
|
265
|
+
export function isReferenceableShape(shape) {
|
|
266
|
+
return Boolean(shape.loaders?.get);
|
|
267
|
+
}
|
|
265
268
|
export function listCachedShapes(shapes) {
|
|
266
269
|
return Object.values(shapes).filter(isCachedShape);
|
|
267
270
|
}
|
|
@@ -22,7 +22,7 @@ import { isLatestProjectSchemaJSON } from "../project-schema/index.js";
|
|
|
22
22
|
import { atRefToRefItem, createGetNamespace, getRefShapeName, parsePropertyRef, propertyRefItemToPath, propertyRefItemToResolverPath, refItemToAtRef, refItemToNamespacedShapeName, refItemToShape } from "../refs.js";
|
|
23
23
|
import { getRelationship } from "../relationships.js";
|
|
24
24
|
import { scalars } from "../scalars.js";
|
|
25
|
-
import { getAllRefs } from "../schema-util.js";
|
|
25
|
+
import { getAllRefs, isBuiltinMutation, isBuiltinQuery } from "../schema-util.js";
|
|
26
26
|
import authSchemas from '../schemas/auth-schemas.json' with { type: 'json' };
|
|
27
27
|
import { allProjectSchemas } from "../schemas/index.js";
|
|
28
28
|
import { isValidTemplate } from "../template-shapes/index.js";
|
|
@@ -163,6 +163,10 @@ const validateAIToolConfig = (projectSchema, getNamespace, tool, basePath) => {
|
|
|
163
163
|
if (parsed.serviceId !== 'local') {
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
+
if ((parsed.shapeName === 'Query' && isBuiltinQuery(parsed.propertyName)) ||
|
|
167
|
+
(parsed.shapeName === 'Mutation' && isBuiltinMutation(parsed.propertyName))) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
166
170
|
const propertyPath = propertyRefItemToPath(getNamespace, parsed);
|
|
167
171
|
if (propertyPath[0] !== 'queries' && propertyPath[0] !== 'mutations') {
|
|
168
172
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/schema",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.69.0",
|
|
4
4
|
"description": "TakeShape Schema",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"p-reduce": "^2.1.0",
|
|
57
57
|
"semver": "^7.3.2",
|
|
58
58
|
"tiny-invariant": "^1.2.0",
|
|
59
|
-
"@takeshape/errors": "11.
|
|
60
|
-
"@takeshape/json-schema": "11.
|
|
61
|
-
"@takeshape/util": "11.
|
|
59
|
+
"@takeshape/errors": "11.69.0",
|
|
60
|
+
"@takeshape/json-schema": "11.69.0",
|
|
61
|
+
"@takeshape/util": "11.69.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@takeshape/json-schema-to-typescript": "^11.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"glob": "^7.1.6",
|
|
74
74
|
"meow": "^9.0.0",
|
|
75
75
|
"shortid": "^2.2.15",
|
|
76
|
-
"@takeshape/infra": "11.
|
|
76
|
+
"@takeshape/infra": "11.69.0"
|
|
77
77
|
},
|
|
78
78
|
"engines": {
|
|
79
79
|
"node": ">=20"
|