@takeshape/schema 11.66.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 +17 -0
- package/dist/project-schema/v3.48.0.d.ts +17 -0
- package/dist/project-schema/v3.49.0.d.ts +17 -0
- package/dist/project-schema/v3.50.0.d.ts +17 -0
- package/dist/project-schema/v3.51.0.d.ts +17 -0
- package/dist/project-schema/v3.52.0.d.ts +17 -0
- package/dist/project-schema/v3.53.0.d.ts +17 -0
- package/dist/schema-util.js +4 -6
- package/dist/schemas/project-schema/experimental.json +61 -0
- package/dist/types/types.d.ts +4 -1
- package/dist/types/utils.d.ts +2 -1
- package/dist/types/utils.js +3 -0
- package/package.json +5 -5
|
@@ -339,6 +339,11 @@ export type MinimatchPattern = string;
|
|
|
339
339
|
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
340
340
|
*/
|
|
341
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;
|
|
342
347
|
export type AgentStateSessionMemoryLocation = AgentStateSessionMemoryLocationArtifact | AgentStateSessionMemoryLocationStaticValue;
|
|
343
348
|
export type AgentStateSessionMemory = AgentStateSessionMemoryLocation[];
|
|
344
349
|
export type GuardID = string;
|
|
@@ -1862,6 +1867,7 @@ export interface AgentGenerateOptions {
|
|
|
1862
1867
|
structuredOutputs?: StructuredOutputs;
|
|
1863
1868
|
enableOpenAIFormat?: EnableOpenAISchemaFormat;
|
|
1864
1869
|
removePropertyKeyPatterns?: RemovePropertyKeyPatterns;
|
|
1870
|
+
stripMarkdown?: StripMarkdown;
|
|
1865
1871
|
}
|
|
1866
1872
|
export interface AgentExecutionChat {
|
|
1867
1873
|
type: 'chat';
|
|
@@ -1871,8 +1877,19 @@ export interface AgentExecutionChat {
|
|
|
1871
1877
|
input: AgentAIStateInput;
|
|
1872
1878
|
artifact?: string;
|
|
1873
1879
|
tools?: AgentToolConfig[];
|
|
1880
|
+
history?: AgentChatHistoryConfig;
|
|
1874
1881
|
options?: AgentGenerateOptions;
|
|
1875
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
|
+
}
|
|
1876
1893
|
export interface AgentStateSessionMemoryLocationArtifact {
|
|
1877
1894
|
type: 'artifactValue';
|
|
1878
1895
|
memoryKey: string;
|
|
@@ -318,6 +318,11 @@ export type MinimatchPatternV3_48_0 = string;
|
|
|
318
318
|
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
319
319
|
*/
|
|
320
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;
|
|
321
326
|
export type AgentStateSessionMemoryLocationV3_48_0 = AgentStateSessionMemoryLocationArtifactV3_48_0 | AgentStateSessionMemoryLocationStaticValueV3_48_0;
|
|
322
327
|
export type AgentStateSessionMemoryV3_48_0 = AgentStateSessionMemoryLocationV3_48_0[];
|
|
323
328
|
export type GuardIDV3_48_0 = string;
|
|
@@ -1729,6 +1734,7 @@ export interface AgentGenerateOptionsV3_48_0 {
|
|
|
1729
1734
|
structuredOutputs?: StructuredOutputsV3_48_0;
|
|
1730
1735
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_48_0;
|
|
1731
1736
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_48_0;
|
|
1737
|
+
stripMarkdown?: StripMarkdownV3_48_0;
|
|
1732
1738
|
}
|
|
1733
1739
|
export interface AgentExecutionChatV3_48_0 {
|
|
1734
1740
|
type: 'chat';
|
|
@@ -1738,8 +1744,19 @@ export interface AgentExecutionChatV3_48_0 {
|
|
|
1738
1744
|
input: AgentAIStateInputV3_48_0;
|
|
1739
1745
|
artifact?: string;
|
|
1740
1746
|
tools?: AgentToolConfigV3_48_0[];
|
|
1747
|
+
history?: AgentChatHistoryConfigV3_48_0;
|
|
1741
1748
|
options?: AgentGenerateOptionsV3_48_0;
|
|
1742
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
|
+
}
|
|
1743
1760
|
export interface AgentStateSessionMemoryLocationArtifactV3_48_0 {
|
|
1744
1761
|
type: 'artifactValue';
|
|
1745
1762
|
memoryKey: string;
|
|
@@ -318,6 +318,11 @@ export type MinimatchPatternV3_49_0 = string;
|
|
|
318
318
|
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
319
319
|
*/
|
|
320
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;
|
|
321
326
|
export type AgentStateSessionMemoryLocationV3_49_0 = AgentStateSessionMemoryLocationArtifactV3_49_0 | AgentStateSessionMemoryLocationStaticValueV3_49_0;
|
|
322
327
|
export type AgentStateSessionMemoryV3_49_0 = AgentStateSessionMemoryLocationV3_49_0[];
|
|
323
328
|
export type GuardIDV3_49_0 = string;
|
|
@@ -1729,6 +1734,7 @@ export interface AgentGenerateOptionsV3_49_0 {
|
|
|
1729
1734
|
structuredOutputs?: StructuredOutputsV3_49_0;
|
|
1730
1735
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_49_0;
|
|
1731
1736
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_49_0;
|
|
1737
|
+
stripMarkdown?: StripMarkdownV3_49_0;
|
|
1732
1738
|
}
|
|
1733
1739
|
export interface AgentExecutionChatV3_49_0 {
|
|
1734
1740
|
type: 'chat';
|
|
@@ -1738,8 +1744,19 @@ export interface AgentExecutionChatV3_49_0 {
|
|
|
1738
1744
|
input: AgentAIStateInputV3_49_0;
|
|
1739
1745
|
artifact?: string;
|
|
1740
1746
|
tools?: AgentToolConfigV3_49_0[];
|
|
1747
|
+
history?: AgentChatHistoryConfigV3_49_0;
|
|
1741
1748
|
options?: AgentGenerateOptionsV3_49_0;
|
|
1742
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
|
+
}
|
|
1743
1760
|
export interface AgentStateSessionMemoryLocationArtifactV3_49_0 {
|
|
1744
1761
|
type: 'artifactValue';
|
|
1745
1762
|
memoryKey: string;
|
|
@@ -330,6 +330,11 @@ export type MinimatchPatternV3_50_0 = string;
|
|
|
330
330
|
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
331
331
|
*/
|
|
332
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;
|
|
333
338
|
export type AgentStateSessionMemoryLocationV3_50_0 = AgentStateSessionMemoryLocationArtifactV3_50_0 | AgentStateSessionMemoryLocationStaticValueV3_50_0;
|
|
334
339
|
export type AgentStateSessionMemoryV3_50_0 = AgentStateSessionMemoryLocationV3_50_0[];
|
|
335
340
|
export type GuardIDV3_50_0 = string;
|
|
@@ -1781,6 +1786,7 @@ export interface AgentGenerateOptionsV3_50_0 {
|
|
|
1781
1786
|
structuredOutputs?: StructuredOutputsV3_50_0;
|
|
1782
1787
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_50_0;
|
|
1783
1788
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_50_0;
|
|
1789
|
+
stripMarkdown?: StripMarkdownV3_50_0;
|
|
1784
1790
|
}
|
|
1785
1791
|
export interface AgentExecutionChatV3_50_0 {
|
|
1786
1792
|
type: 'chat';
|
|
@@ -1790,8 +1796,19 @@ export interface AgentExecutionChatV3_50_0 {
|
|
|
1790
1796
|
input: AgentAIStateInputV3_50_0;
|
|
1791
1797
|
artifact?: string;
|
|
1792
1798
|
tools?: AgentToolConfigV3_50_0[];
|
|
1799
|
+
history?: AgentChatHistoryConfigV3_50_0;
|
|
1793
1800
|
options?: AgentGenerateOptionsV3_50_0;
|
|
1794
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
|
+
}
|
|
1795
1812
|
export interface AgentStateSessionMemoryLocationArtifactV3_50_0 {
|
|
1796
1813
|
type: 'artifactValue';
|
|
1797
1814
|
memoryKey: string;
|
|
@@ -330,6 +330,11 @@ export type MinimatchPatternV3_51_0 = string;
|
|
|
330
330
|
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
331
331
|
*/
|
|
332
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;
|
|
333
338
|
export type AgentStateSessionMemoryLocationV3_51_0 = AgentStateSessionMemoryLocationArtifactV3_51_0 | AgentStateSessionMemoryLocationStaticValueV3_51_0;
|
|
334
339
|
export type AgentStateSessionMemoryV3_51_0 = AgentStateSessionMemoryLocationV3_51_0[];
|
|
335
340
|
export type GuardIDV3_51_0 = string;
|
|
@@ -1781,6 +1786,7 @@ export interface AgentGenerateOptionsV3_51_0 {
|
|
|
1781
1786
|
structuredOutputs?: StructuredOutputsV3_51_0;
|
|
1782
1787
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_51_0;
|
|
1783
1788
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_51_0;
|
|
1789
|
+
stripMarkdown?: StripMarkdownV3_51_0;
|
|
1784
1790
|
}
|
|
1785
1791
|
export interface AgentExecutionChatV3_51_0 {
|
|
1786
1792
|
type: 'chat';
|
|
@@ -1790,8 +1796,19 @@ export interface AgentExecutionChatV3_51_0 {
|
|
|
1790
1796
|
input: AgentAIStateInputV3_51_0;
|
|
1791
1797
|
artifact?: string;
|
|
1792
1798
|
tools?: AgentToolConfigV3_51_0[];
|
|
1799
|
+
history?: AgentChatHistoryConfigV3_51_0;
|
|
1793
1800
|
options?: AgentGenerateOptionsV3_51_0;
|
|
1794
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
|
+
}
|
|
1795
1812
|
export interface AgentStateSessionMemoryLocationArtifactV3_51_0 {
|
|
1796
1813
|
type: 'artifactValue';
|
|
1797
1814
|
memoryKey: string;
|
|
@@ -330,6 +330,11 @@ export type MinimatchPatternV3_52_0 = string;
|
|
|
330
330
|
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
331
331
|
*/
|
|
332
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;
|
|
333
338
|
export type AgentStateSessionMemoryLocationV3_52_0 = AgentStateSessionMemoryLocationArtifactV3_52_0 | AgentStateSessionMemoryLocationStaticValueV3_52_0;
|
|
334
339
|
export type AgentStateSessionMemoryV3_52_0 = AgentStateSessionMemoryLocationV3_52_0[];
|
|
335
340
|
export type GuardIDV3_52_0 = string;
|
|
@@ -1781,6 +1786,7 @@ export interface AgentGenerateOptionsV3_52_0 {
|
|
|
1781
1786
|
structuredOutputs?: StructuredOutputsV3_52_0;
|
|
1782
1787
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_52_0;
|
|
1783
1788
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_52_0;
|
|
1789
|
+
stripMarkdown?: StripMarkdownV3_52_0;
|
|
1784
1790
|
}
|
|
1785
1791
|
export interface AgentExecutionChatV3_52_0 {
|
|
1786
1792
|
type: 'chat';
|
|
@@ -1790,8 +1796,19 @@ export interface AgentExecutionChatV3_52_0 {
|
|
|
1790
1796
|
input: AgentAIStateInputV3_52_0;
|
|
1791
1797
|
artifact?: string;
|
|
1792
1798
|
tools?: AgentToolConfigV3_52_0[];
|
|
1799
|
+
history?: AgentChatHistoryConfigV3_52_0;
|
|
1793
1800
|
options?: AgentGenerateOptionsV3_52_0;
|
|
1794
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
|
+
}
|
|
1795
1812
|
export interface AgentStateSessionMemoryLocationArtifactV3_52_0 {
|
|
1796
1813
|
type: 'artifactValue';
|
|
1797
1814
|
memoryKey: string;
|
|
@@ -339,6 +339,11 @@ export type MinimatchPatternV3_53_0 = string;
|
|
|
339
339
|
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
340
340
|
*/
|
|
341
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;
|
|
342
347
|
export type AgentStateSessionMemoryLocationV3_53_0 = AgentStateSessionMemoryLocationArtifactV3_53_0 | AgentStateSessionMemoryLocationStaticValueV3_53_0;
|
|
343
348
|
export type AgentStateSessionMemoryV3_53_0 = AgentStateSessionMemoryLocationV3_53_0[];
|
|
344
349
|
export type GuardIDV3_53_0 = string;
|
|
@@ -1862,6 +1867,7 @@ export interface AgentGenerateOptionsV3_53_0 {
|
|
|
1862
1867
|
structuredOutputs?: StructuredOutputsV3_53_0;
|
|
1863
1868
|
enableOpenAIFormat?: EnableOpenAISchemaFormatV3_53_0;
|
|
1864
1869
|
removePropertyKeyPatterns?: RemovePropertyKeyPatternsV3_53_0;
|
|
1870
|
+
stripMarkdown?: StripMarkdownV3_53_0;
|
|
1865
1871
|
}
|
|
1866
1872
|
export interface AgentExecutionChatV3_53_0 {
|
|
1867
1873
|
type: 'chat';
|
|
@@ -1871,8 +1877,19 @@ export interface AgentExecutionChatV3_53_0 {
|
|
|
1871
1877
|
input: AgentAIStateInputV3_53_0;
|
|
1872
1878
|
artifact?: string;
|
|
1873
1879
|
tools?: AgentToolConfigV3_53_0[];
|
|
1880
|
+
history?: AgentChatHistoryConfigV3_53_0;
|
|
1874
1881
|
options?: AgentGenerateOptionsV3_53_0;
|
|
1875
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
|
+
}
|
|
1876
1893
|
export interface AgentStateSessionMemoryLocationArtifactV3_53_0 {
|
|
1877
1894
|
type: 'artifactValue';
|
|
1878
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
|
|
@@ -545,6 +550,59 @@
|
|
|
545
550
|
"required": ["type", "argName", "variableName"],
|
|
546
551
|
"additionalProperties": false
|
|
547
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
|
+
},
|
|
548
606
|
"agentExecutionGenerate": {
|
|
549
607
|
"title": "Agent Execution Generate",
|
|
550
608
|
"type": "object",
|
|
@@ -608,6 +666,9 @@
|
|
|
608
666
|
"$ref": "#/definitions/agentToolConfig"
|
|
609
667
|
}
|
|
610
668
|
},
|
|
669
|
+
"history": {
|
|
670
|
+
"$ref": "#/definitions/agentChatHistoryConfig"
|
|
671
|
+
},
|
|
611
672
|
"options": {
|
|
612
673
|
"$ref": "#/definitions/agentGenerateOptions"
|
|
613
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
|
}
|
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/
|
|
61
|
-
"@takeshape/
|
|
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"
|