@takeshape/schema 11.63.7 → 11.66.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/__tests__/validate.test.js +26 -0
- package/dist/agents.d.ts +2 -1
- package/dist/agents.js +8 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/project-schema/latest.d.ts +30 -68
- package/dist/project-schema/v3.48.0.d.ts +30 -68
- package/dist/project-schema/v3.49.0.d.ts +30 -68
- package/dist/project-schema/v3.50.0.d.ts +30 -68
- package/dist/project-schema/v3.51.0.d.ts +30 -68
- package/dist/project-schema/v3.52.0.d.ts +30 -68
- package/dist/project-schema/v3.53.0.d.ts +30 -68
- package/dist/schemas/project-schema/experimental.json +61 -250
- package/dist/util/__tests__/expressions.test.d.ts +1 -0
- package/dist/util/__tests__/expressions.test.js +172 -0
- package/dist/util/expressions.d.ts +25 -0
- package/dist/util/expressions.js +323 -0
- package/dist/validate/validate.js +45 -1
- package/examples/latest/agent-schema.json +16 -39
- package/examples/source/agent-schema.json +36 -31
- package/package.json +6 -5
|
@@ -1951,4 +1951,30 @@ describe('latest', () => {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
]);
|
|
1953
1953
|
});
|
|
1954
|
+
test('validateSchema - invalid expressions', async () => {
|
|
1955
|
+
const invalidSchema = agentSchema();
|
|
1956
|
+
const { bbb, ccc, ddd } = invalidSchema['ai-experimental'].agents.findDogColor.states;
|
|
1957
|
+
bbb.variables[0].steps[0].expression = ')';
|
|
1958
|
+
ccc.transition[0].condition = '(';
|
|
1959
|
+
ddd.variables[0].steps[0].condition = 'foo';
|
|
1960
|
+
const { valid, errors } = await validateSchema(validateContext, invalidSchema);
|
|
1961
|
+
expect(valid).toEqual(false);
|
|
1962
|
+
expect(errors).toEqual([
|
|
1963
|
+
{
|
|
1964
|
+
message: 'Unexpected ")" at character 0',
|
|
1965
|
+
path: ['ai-experimental', 'agents', 'findDogColor', 'states', 'bbb', 'variables', 0, 'steps', 0, 'expression'],
|
|
1966
|
+
type: 'conflict'
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
message: 'Unclosed ( at character 1',
|
|
1970
|
+
path: ['ai-experimental', 'agents', 'findDogColor', 'states', 'ccc', 'transition', 0, 'expression'],
|
|
1971
|
+
type: 'conflict'
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
message: 'Unknown variable "foo"',
|
|
1975
|
+
path: ['ai-experimental', 'agents', 'findDogColor', 'states', 'ddd', 'variables', 0, 'steps', 0, 'condition'],
|
|
1976
|
+
type: 'conflict'
|
|
1977
|
+
}
|
|
1978
|
+
]);
|
|
1979
|
+
});
|
|
1954
1980
|
});
|
package/dist/agents.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentAPIArgument, AgentJSON, Args, ProjectSchemaJSON } from './project-schema/index.ts';
|
|
1
|
+
import type { AgentAPI, AgentAPIArgument, AgentJSON, Args, ProjectSchemaJSON } from './project-schema/index.ts';
|
|
2
2
|
export declare const END_AGENT_EXECUTION = "endAgentExecution";
|
|
3
3
|
export declare const BUILT_IN_CHAT_ARGS: AgentAPIArgument[];
|
|
4
4
|
export declare const BUILT_IN_CHAT_ARG_NAMES: string[];
|
|
@@ -10,5 +10,6 @@ export declare const getAgentEndTransitions: (agent: AgentJSON, includeSuspend?:
|
|
|
10
10
|
export declare const getAgentEndStates: (agent: AgentJSON, includeSuspend?: boolean) => Set<string>;
|
|
11
11
|
export declare const getInspectAgentSessionQueryName: (agentName: string) => string;
|
|
12
12
|
export declare const removeBuiltInArgs: (args: AgentAPIArgument[]) => AgentAPIArgument[];
|
|
13
|
+
export declare function getAgentApiArgs(api: AgentAPI): AgentAPIArgument[];
|
|
13
14
|
export declare const createArgs: (agent: AgentJSON) => Args | undefined;
|
|
14
15
|
export declare function addAiQueries(projectSchema: ProjectSchemaJSON): ProjectSchemaJSON;
|
package/dist/agents.js
CHANGED
|
@@ -27,7 +27,7 @@ const transitionCanEnd = (transition, includeSuspend = false) => {
|
|
|
27
27
|
if (step.destination === END_AGENT_EXECUTION) {
|
|
28
28
|
return true;
|
|
29
29
|
}
|
|
30
|
-
if (step.condition
|
|
30
|
+
if (step.condition === undefined) {
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -54,11 +54,15 @@ export const getInspectAgentSessionQueryName = (agentName) => {
|
|
|
54
54
|
export const removeBuiltInArgs = (args) => {
|
|
55
55
|
return args.filter((arg) => !BUILT_IN_CHAT_ARG_NAMES.includes(arg.argName));
|
|
56
56
|
};
|
|
57
|
-
export
|
|
58
|
-
let apiArguments = uniqBy(
|
|
59
|
-
if (
|
|
57
|
+
export function getAgentApiArgs(api) {
|
|
58
|
+
let apiArguments = uniqBy(api.arguments ?? [], (arg) => arg.argName);
|
|
59
|
+
if (api.type === 'chat') {
|
|
60
60
|
apiArguments = removeBuiltInArgs(apiArguments).concat(BUILT_IN_CHAT_ARGS);
|
|
61
61
|
}
|
|
62
|
+
return apiArguments;
|
|
63
|
+
}
|
|
64
|
+
export const createArgs = (agent) => {
|
|
65
|
+
const apiArguments = getAgentApiArgs(agent.api);
|
|
62
66
|
return apiArguments.length > 0
|
|
63
67
|
? {
|
|
64
68
|
type: 'object',
|
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export * from './unions.ts';
|
|
|
34
34
|
export * from './util/ai-tools.ts';
|
|
35
35
|
export * from './util/api-indexing.ts';
|
|
36
36
|
export * from './util/detect-cycles.ts';
|
|
37
|
+
export * from './util/expressions.ts';
|
|
37
38
|
export * from './util/find-shape-at-path.ts';
|
|
38
39
|
export * from './util/form-config.ts';
|
|
39
40
|
export * from './util/get-conflicting-properties.ts';
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ export * from "./unions.js";
|
|
|
32
32
|
export * from "./util/ai-tools.js";
|
|
33
33
|
export * from "./util/api-indexing.js";
|
|
34
34
|
export * from "./util/detect-cycles.js";
|
|
35
|
+
export * from "./util/expressions.js";
|
|
35
36
|
export * from "./util/find-shape-at-path.js";
|
|
36
37
|
export * from "./util/form-config.js";
|
|
37
38
|
export * from "./util/get-conflicting-properties.js";
|
|
@@ -285,16 +285,10 @@ export type CacheTriggerConfig = CacheScheduleTriggerConfig | CacheWebhookTrigge
|
|
|
285
285
|
export type ShapeSchema = ShapeSchemaAllOf | ShapeSchemaExtends | ShapeSchemaOneOf | ShapeSchemaEnum | ObjectSchema | ShapeSchemaAny;
|
|
286
286
|
export type AgentAPI = AgentAPIChat | AgentAPIGenerate;
|
|
287
287
|
export type MemoryLocations = AgentSessionMemoryLocation[];
|
|
288
|
-
export type AgentVariableStep = AgentVariableStepSessionMemory | AgentVariableStepGraphQLArg | AgentVariableStepStateOutput | AgentVariableStepPreviousStateOutput | AgentVariableStepStaticValue;
|
|
289
|
-
export type AgentVariableStepCondition = AgentVariableStepConditionNone | AgentVariableStepConditionSourceState;
|
|
290
288
|
export type Variables = AgentVariable[];
|
|
291
289
|
export type AgentExecution = AgentExecutionGraphQL | AgentExecutionGenerate | AgentExecutionChat;
|
|
292
290
|
export type AgentAIStateInput = AgentAIStateInputArgument | AgentAIStateInputTemplate;
|
|
293
|
-
export type
|
|
294
|
-
/**
|
|
295
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
296
|
-
*/
|
|
297
|
-
export type RemovePropertyKeyPatterns = MinimatchPattern[];
|
|
291
|
+
export type AgentToolConfigArg = AgentToolConfigArgAgent | AgentToolConfigArgVariable;
|
|
298
292
|
export type History1 = boolean;
|
|
299
293
|
/**
|
|
300
294
|
* Maximum number of tokens to generate.
|
|
@@ -340,6 +334,11 @@ export type StructuredOutputs = boolean;
|
|
|
340
334
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
341
335
|
*/
|
|
342
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[];
|
|
343
342
|
export type AgentStateSessionMemoryLocation = AgentStateSessionMemoryLocationArtifact | AgentStateSessionMemoryLocationStaticValue;
|
|
344
343
|
export type AgentStateSessionMemory = AgentStateSessionMemoryLocation[];
|
|
345
344
|
export type GuardID = string;
|
|
@@ -1762,34 +1761,9 @@ export interface AgentStart {
|
|
|
1762
1761
|
export interface AgentTransitionStep {
|
|
1763
1762
|
destination: string;
|
|
1764
1763
|
suspend?: boolean;
|
|
1765
|
-
condition
|
|
1764
|
+
condition?: string;
|
|
1766
1765
|
limit?: number;
|
|
1767
1766
|
}
|
|
1768
|
-
export interface AgentTransitionStepConditionNone {
|
|
1769
|
-
type: 'none';
|
|
1770
|
-
}
|
|
1771
|
-
export interface AgentTransitionStepConditionArtifact {
|
|
1772
|
-
type: 'artifact';
|
|
1773
|
-
path?: string;
|
|
1774
|
-
negated?: boolean;
|
|
1775
|
-
}
|
|
1776
|
-
export interface AgentTransitionStepConditionStateOutput {
|
|
1777
|
-
type: 'stateOutput';
|
|
1778
|
-
stateId: string;
|
|
1779
|
-
path?: string;
|
|
1780
|
-
negated?: boolean;
|
|
1781
|
-
}
|
|
1782
|
-
export interface AgentTransitionStepConditionStringContains {
|
|
1783
|
-
type: 'stringContains';
|
|
1784
|
-
path?: string;
|
|
1785
|
-
string: string;
|
|
1786
|
-
negated?: boolean;
|
|
1787
|
-
}
|
|
1788
|
-
export interface AgentTransitionStepConditionArgument {
|
|
1789
|
-
type: 'argument';
|
|
1790
|
-
argument: string;
|
|
1791
|
-
negated?: boolean;
|
|
1792
|
-
}
|
|
1793
1767
|
/**
|
|
1794
1768
|
* States that are traversed during the execution of an agent.
|
|
1795
1769
|
*/
|
|
@@ -1816,39 +1790,9 @@ export interface AgentVariable {
|
|
|
1816
1790
|
*/
|
|
1817
1791
|
steps: AgentVariableStep[];
|
|
1818
1792
|
}
|
|
1819
|
-
export interface
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
path?: string;
|
|
1823
|
-
}
|
|
1824
|
-
export interface AgentVariableStepGraphQLArg {
|
|
1825
|
-
type: 'graphqlArg';
|
|
1826
|
-
argName: string;
|
|
1827
|
-
}
|
|
1828
|
-
export interface AgentVariableStepStateOutput {
|
|
1829
|
-
type: 'stateOutput';
|
|
1830
|
-
stateId: string;
|
|
1831
|
-
path?: string;
|
|
1832
|
-
}
|
|
1833
|
-
export interface AgentVariableStepPreviousStateOutput {
|
|
1834
|
-
type: 'previousStateOutput';
|
|
1835
|
-
path?: string;
|
|
1836
|
-
}
|
|
1837
|
-
/**
|
|
1838
|
-
* An Agent Variable that has a static value.
|
|
1839
|
-
*/
|
|
1840
|
-
export interface AgentVariableStepStaticValue {
|
|
1841
|
-
type: 'staticValue';
|
|
1842
|
-
condition?: AgentVariableStepCondition;
|
|
1843
|
-
value: string;
|
|
1844
|
-
}
|
|
1845
|
-
export interface AgentVariableStepConditionNone {
|
|
1846
|
-
type: 'none';
|
|
1847
|
-
}
|
|
1848
|
-
export interface AgentVariableStepConditionSourceState {
|
|
1849
|
-
type: 'sourceState';
|
|
1850
|
-
stateId: string;
|
|
1851
|
-
negated?: boolean;
|
|
1793
|
+
export interface AgentVariableStep {
|
|
1794
|
+
condition?: string;
|
|
1795
|
+
expression: string;
|
|
1852
1796
|
}
|
|
1853
1797
|
export interface AgentExecutionGraphQL {
|
|
1854
1798
|
type: 'graphql';
|
|
@@ -1873,10 +1817,28 @@ export interface AgentAIStateInputTemplate {
|
|
|
1873
1817
|
inputTemplate: string;
|
|
1874
1818
|
}
|
|
1875
1819
|
export interface AgentToolConfig {
|
|
1876
|
-
description?: string;
|
|
1877
1820
|
ref: string;
|
|
1821
|
+
description?: string;
|
|
1822
|
+
args?: AgentToolConfigArg[];
|
|
1878
1823
|
selectionSet?: string;
|
|
1879
|
-
|
|
1824
|
+
}
|
|
1825
|
+
export interface AgentToolConfigArgAgent {
|
|
1826
|
+
type: 'agent';
|
|
1827
|
+
/**
|
|
1828
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1829
|
+
*/
|
|
1830
|
+
argName: string;
|
|
1831
|
+
}
|
|
1832
|
+
export interface AgentToolConfigArgVariable {
|
|
1833
|
+
type: 'variable';
|
|
1834
|
+
/**
|
|
1835
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1836
|
+
*/
|
|
1837
|
+
argName: string;
|
|
1838
|
+
/**
|
|
1839
|
+
* Name of variable to pull value from.
|
|
1840
|
+
*/
|
|
1841
|
+
variableName: string;
|
|
1880
1842
|
}
|
|
1881
1843
|
export interface AgentGenerateOptions {
|
|
1882
1844
|
history?: History1;
|
|
@@ -264,16 +264,10 @@ export type CacheTriggerConfigV3_48_0 = CacheScheduleTriggerConfigV3_48_0 | Cach
|
|
|
264
264
|
export type ShapeSchemaV3_48_0 = ShapeSchemaAllOfV3_48_0 | ShapeSchemaExtendsV3_48_0 | ShapeSchemaOneOfV3_48_0 | ShapeSchemaEnumV3_48_0 | ObjectSchemaV3_48_0 | ShapeSchemaAnyV3_48_0;
|
|
265
265
|
export type AgentAPIV3_48_0 = AgentAPIChatV3_48_0 | AgentAPIGenerateV3_48_0;
|
|
266
266
|
export type MemoryLocationsV3_48_0 = AgentSessionMemoryLocationV3_48_0[];
|
|
267
|
-
export type AgentVariableStepV3_48_0 = AgentVariableStepSessionMemoryV3_48_0 | AgentVariableStepGraphQLArgV3_48_0 | AgentVariableStepStateOutputV3_48_0 | AgentVariableStepPreviousStateOutputV3_48_0 | AgentVariableStepStaticValueV3_48_0;
|
|
268
|
-
export type AgentVariableStepConditionV3_48_0 = AgentVariableStepConditionNoneV3_48_0 | AgentVariableStepConditionSourceStateV3_48_0;
|
|
269
267
|
export type VariablesV3_48_0 = AgentVariableV3_48_0[];
|
|
270
268
|
export type AgentExecutionV3_48_0 = AgentExecutionGraphQLV3_48_0 | AgentExecutionGenerateV3_48_0 | AgentExecutionChatV3_48_0;
|
|
271
269
|
export type AgentAIStateInputV3_48_0 = AgentAIStateInputArgumentV3_48_0 | AgentAIStateInputTemplateV3_48_0;
|
|
272
|
-
export type
|
|
273
|
-
/**
|
|
274
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
275
|
-
*/
|
|
276
|
-
export type RemovePropertyKeyPatternsV3_48_0 = MinimatchPatternV3_48_0[];
|
|
270
|
+
export type AgentToolConfigArgV3_48_0 = AgentToolConfigArgAgentV3_48_0 | AgentToolConfigArgVariableV3_48_0;
|
|
277
271
|
export type HistoryV3_48_01 = boolean;
|
|
278
272
|
/**
|
|
279
273
|
* Maximum number of tokens to generate.
|
|
@@ -319,6 +313,11 @@ export type StructuredOutputsV3_48_0 = boolean;
|
|
|
319
313
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
320
314
|
*/
|
|
321
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[];
|
|
322
321
|
export type AgentStateSessionMemoryLocationV3_48_0 = AgentStateSessionMemoryLocationArtifactV3_48_0 | AgentStateSessionMemoryLocationStaticValueV3_48_0;
|
|
323
322
|
export type AgentStateSessionMemoryV3_48_0 = AgentStateSessionMemoryLocationV3_48_0[];
|
|
324
323
|
export type GuardIDV3_48_0 = string;
|
|
@@ -1629,34 +1628,9 @@ export interface AgentStartV3_48_0 {
|
|
|
1629
1628
|
export interface AgentTransitionStepV3_48_0 {
|
|
1630
1629
|
destination: string;
|
|
1631
1630
|
suspend?: boolean;
|
|
1632
|
-
condition
|
|
1631
|
+
condition?: string;
|
|
1633
1632
|
limit?: number;
|
|
1634
1633
|
}
|
|
1635
|
-
export interface AgentTransitionStepConditionNoneV3_48_0 {
|
|
1636
|
-
type: 'none';
|
|
1637
|
-
}
|
|
1638
|
-
export interface AgentTransitionStepConditionArtifactV3_48_0 {
|
|
1639
|
-
type: 'artifact';
|
|
1640
|
-
path?: string;
|
|
1641
|
-
negated?: boolean;
|
|
1642
|
-
}
|
|
1643
|
-
export interface AgentTransitionStepConditionStateOutputV3_48_0 {
|
|
1644
|
-
type: 'stateOutput';
|
|
1645
|
-
stateId: string;
|
|
1646
|
-
path?: string;
|
|
1647
|
-
negated?: boolean;
|
|
1648
|
-
}
|
|
1649
|
-
export interface AgentTransitionStepConditionStringContainsV3_48_0 {
|
|
1650
|
-
type: 'stringContains';
|
|
1651
|
-
path?: string;
|
|
1652
|
-
string: string;
|
|
1653
|
-
negated?: boolean;
|
|
1654
|
-
}
|
|
1655
|
-
export interface AgentTransitionStepConditionArgumentV3_48_0 {
|
|
1656
|
-
type: 'argument';
|
|
1657
|
-
argument: string;
|
|
1658
|
-
negated?: boolean;
|
|
1659
|
-
}
|
|
1660
1634
|
/**
|
|
1661
1635
|
* States that are traversed during the execution of an agent.
|
|
1662
1636
|
*/
|
|
@@ -1683,39 +1657,9 @@ export interface AgentVariableV3_48_0 {
|
|
|
1683
1657
|
*/
|
|
1684
1658
|
steps: AgentVariableStepV3_48_0[];
|
|
1685
1659
|
}
|
|
1686
|
-
export interface
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
path?: string;
|
|
1690
|
-
}
|
|
1691
|
-
export interface AgentVariableStepGraphQLArgV3_48_0 {
|
|
1692
|
-
type: 'graphqlArg';
|
|
1693
|
-
argName: string;
|
|
1694
|
-
}
|
|
1695
|
-
export interface AgentVariableStepStateOutputV3_48_0 {
|
|
1696
|
-
type: 'stateOutput';
|
|
1697
|
-
stateId: string;
|
|
1698
|
-
path?: string;
|
|
1699
|
-
}
|
|
1700
|
-
export interface AgentVariableStepPreviousStateOutputV3_48_0 {
|
|
1701
|
-
type: 'previousStateOutput';
|
|
1702
|
-
path?: string;
|
|
1703
|
-
}
|
|
1704
|
-
/**
|
|
1705
|
-
* An Agent Variable that has a static value.
|
|
1706
|
-
*/
|
|
1707
|
-
export interface AgentVariableStepStaticValueV3_48_0 {
|
|
1708
|
-
type: 'staticValue';
|
|
1709
|
-
condition?: AgentVariableStepConditionV3_48_0;
|
|
1710
|
-
value: string;
|
|
1711
|
-
}
|
|
1712
|
-
export interface AgentVariableStepConditionNoneV3_48_0 {
|
|
1713
|
-
type: 'none';
|
|
1714
|
-
}
|
|
1715
|
-
export interface AgentVariableStepConditionSourceStateV3_48_0 {
|
|
1716
|
-
type: 'sourceState';
|
|
1717
|
-
stateId: string;
|
|
1718
|
-
negated?: boolean;
|
|
1660
|
+
export interface AgentVariableStepV3_48_0 {
|
|
1661
|
+
condition?: string;
|
|
1662
|
+
expression: string;
|
|
1719
1663
|
}
|
|
1720
1664
|
export interface AgentExecutionGraphQLV3_48_0 {
|
|
1721
1665
|
type: 'graphql';
|
|
@@ -1740,10 +1684,28 @@ export interface AgentAIStateInputTemplateV3_48_0 {
|
|
|
1740
1684
|
inputTemplate: string;
|
|
1741
1685
|
}
|
|
1742
1686
|
export interface AgentToolConfigV3_48_0 {
|
|
1743
|
-
description?: string;
|
|
1744
1687
|
ref: string;
|
|
1688
|
+
description?: string;
|
|
1689
|
+
args?: AgentToolConfigArgV3_48_0[];
|
|
1745
1690
|
selectionSet?: string;
|
|
1746
|
-
|
|
1691
|
+
}
|
|
1692
|
+
export interface AgentToolConfigArgAgentV3_48_0 {
|
|
1693
|
+
type: 'agent';
|
|
1694
|
+
/**
|
|
1695
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1696
|
+
*/
|
|
1697
|
+
argName: string;
|
|
1698
|
+
}
|
|
1699
|
+
export interface AgentToolConfigArgVariableV3_48_0 {
|
|
1700
|
+
type: 'variable';
|
|
1701
|
+
/**
|
|
1702
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1703
|
+
*/
|
|
1704
|
+
argName: string;
|
|
1705
|
+
/**
|
|
1706
|
+
* Name of variable to pull value from.
|
|
1707
|
+
*/
|
|
1708
|
+
variableName: string;
|
|
1747
1709
|
}
|
|
1748
1710
|
export interface AgentGenerateOptionsV3_48_0 {
|
|
1749
1711
|
history?: HistoryV3_48_01;
|
|
@@ -264,16 +264,10 @@ export type CacheTriggerConfigV3_49_0 = CacheScheduleTriggerConfigV3_49_0 | Cach
|
|
|
264
264
|
export type ShapeSchemaV3_49_0 = ShapeSchemaAllOfV3_49_0 | ShapeSchemaExtendsV3_49_0 | ShapeSchemaOneOfV3_49_0 | ShapeSchemaEnumV3_49_0 | ObjectSchemaV3_49_0 | ShapeSchemaAnyV3_49_0;
|
|
265
265
|
export type AgentAPIV3_49_0 = AgentAPIChatV3_49_0 | AgentAPIGenerateV3_49_0;
|
|
266
266
|
export type MemoryLocationsV3_49_0 = AgentSessionMemoryLocationV3_49_0[];
|
|
267
|
-
export type AgentVariableStepV3_49_0 = AgentVariableStepSessionMemoryV3_49_0 | AgentVariableStepGraphQLArgV3_49_0 | AgentVariableStepStateOutputV3_49_0 | AgentVariableStepPreviousStateOutputV3_49_0 | AgentVariableStepStaticValueV3_49_0;
|
|
268
|
-
export type AgentVariableStepConditionV3_49_0 = AgentVariableStepConditionNoneV3_49_0 | AgentVariableStepConditionSourceStateV3_49_0;
|
|
269
267
|
export type VariablesV3_49_0 = AgentVariableV3_49_0[];
|
|
270
268
|
export type AgentExecutionV3_49_0 = AgentExecutionGraphQLV3_49_0 | AgentExecutionGenerateV3_49_0 | AgentExecutionChatV3_49_0;
|
|
271
269
|
export type AgentAIStateInputV3_49_0 = AgentAIStateInputArgumentV3_49_0 | AgentAIStateInputTemplateV3_49_0;
|
|
272
|
-
export type
|
|
273
|
-
/**
|
|
274
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
275
|
-
*/
|
|
276
|
-
export type RemovePropertyKeyPatternsV3_49_0 = MinimatchPatternV3_49_0[];
|
|
270
|
+
export type AgentToolConfigArgV3_49_0 = AgentToolConfigArgAgentV3_49_0 | AgentToolConfigArgVariableV3_49_0;
|
|
277
271
|
export type HistoryV3_49_01 = boolean;
|
|
278
272
|
/**
|
|
279
273
|
* Maximum number of tokens to generate.
|
|
@@ -319,6 +313,11 @@ export type StructuredOutputsV3_49_0 = boolean;
|
|
|
319
313
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
320
314
|
*/
|
|
321
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[];
|
|
322
321
|
export type AgentStateSessionMemoryLocationV3_49_0 = AgentStateSessionMemoryLocationArtifactV3_49_0 | AgentStateSessionMemoryLocationStaticValueV3_49_0;
|
|
323
322
|
export type AgentStateSessionMemoryV3_49_0 = AgentStateSessionMemoryLocationV3_49_0[];
|
|
324
323
|
export type GuardIDV3_49_0 = string;
|
|
@@ -1629,34 +1628,9 @@ export interface AgentStartV3_49_0 {
|
|
|
1629
1628
|
export interface AgentTransitionStepV3_49_0 {
|
|
1630
1629
|
destination: string;
|
|
1631
1630
|
suspend?: boolean;
|
|
1632
|
-
condition
|
|
1631
|
+
condition?: string;
|
|
1633
1632
|
limit?: number;
|
|
1634
1633
|
}
|
|
1635
|
-
export interface AgentTransitionStepConditionNoneV3_49_0 {
|
|
1636
|
-
type: 'none';
|
|
1637
|
-
}
|
|
1638
|
-
export interface AgentTransitionStepConditionArtifactV3_49_0 {
|
|
1639
|
-
type: 'artifact';
|
|
1640
|
-
path?: string;
|
|
1641
|
-
negated?: boolean;
|
|
1642
|
-
}
|
|
1643
|
-
export interface AgentTransitionStepConditionStateOutputV3_49_0 {
|
|
1644
|
-
type: 'stateOutput';
|
|
1645
|
-
stateId: string;
|
|
1646
|
-
path?: string;
|
|
1647
|
-
negated?: boolean;
|
|
1648
|
-
}
|
|
1649
|
-
export interface AgentTransitionStepConditionStringContainsV3_49_0 {
|
|
1650
|
-
type: 'stringContains';
|
|
1651
|
-
path?: string;
|
|
1652
|
-
string: string;
|
|
1653
|
-
negated?: boolean;
|
|
1654
|
-
}
|
|
1655
|
-
export interface AgentTransitionStepConditionArgumentV3_49_0 {
|
|
1656
|
-
type: 'argument';
|
|
1657
|
-
argument: string;
|
|
1658
|
-
negated?: boolean;
|
|
1659
|
-
}
|
|
1660
1634
|
/**
|
|
1661
1635
|
* States that are traversed during the execution of an agent.
|
|
1662
1636
|
*/
|
|
@@ -1683,39 +1657,9 @@ export interface AgentVariableV3_49_0 {
|
|
|
1683
1657
|
*/
|
|
1684
1658
|
steps: AgentVariableStepV3_49_0[];
|
|
1685
1659
|
}
|
|
1686
|
-
export interface
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
path?: string;
|
|
1690
|
-
}
|
|
1691
|
-
export interface AgentVariableStepGraphQLArgV3_49_0 {
|
|
1692
|
-
type: 'graphqlArg';
|
|
1693
|
-
argName: string;
|
|
1694
|
-
}
|
|
1695
|
-
export interface AgentVariableStepStateOutputV3_49_0 {
|
|
1696
|
-
type: 'stateOutput';
|
|
1697
|
-
stateId: string;
|
|
1698
|
-
path?: string;
|
|
1699
|
-
}
|
|
1700
|
-
export interface AgentVariableStepPreviousStateOutputV3_49_0 {
|
|
1701
|
-
type: 'previousStateOutput';
|
|
1702
|
-
path?: string;
|
|
1703
|
-
}
|
|
1704
|
-
/**
|
|
1705
|
-
* An Agent Variable that has a static value.
|
|
1706
|
-
*/
|
|
1707
|
-
export interface AgentVariableStepStaticValueV3_49_0 {
|
|
1708
|
-
type: 'staticValue';
|
|
1709
|
-
condition?: AgentVariableStepConditionV3_49_0;
|
|
1710
|
-
value: string;
|
|
1711
|
-
}
|
|
1712
|
-
export interface AgentVariableStepConditionNoneV3_49_0 {
|
|
1713
|
-
type: 'none';
|
|
1714
|
-
}
|
|
1715
|
-
export interface AgentVariableStepConditionSourceStateV3_49_0 {
|
|
1716
|
-
type: 'sourceState';
|
|
1717
|
-
stateId: string;
|
|
1718
|
-
negated?: boolean;
|
|
1660
|
+
export interface AgentVariableStepV3_49_0 {
|
|
1661
|
+
condition?: string;
|
|
1662
|
+
expression: string;
|
|
1719
1663
|
}
|
|
1720
1664
|
export interface AgentExecutionGraphQLV3_49_0 {
|
|
1721
1665
|
type: 'graphql';
|
|
@@ -1740,10 +1684,28 @@ export interface AgentAIStateInputTemplateV3_49_0 {
|
|
|
1740
1684
|
inputTemplate: string;
|
|
1741
1685
|
}
|
|
1742
1686
|
export interface AgentToolConfigV3_49_0 {
|
|
1743
|
-
description?: string;
|
|
1744
1687
|
ref: string;
|
|
1688
|
+
description?: string;
|
|
1689
|
+
args?: AgentToolConfigArgV3_49_0[];
|
|
1745
1690
|
selectionSet?: string;
|
|
1746
|
-
|
|
1691
|
+
}
|
|
1692
|
+
export interface AgentToolConfigArgAgentV3_49_0 {
|
|
1693
|
+
type: 'agent';
|
|
1694
|
+
/**
|
|
1695
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1696
|
+
*/
|
|
1697
|
+
argName: string;
|
|
1698
|
+
}
|
|
1699
|
+
export interface AgentToolConfigArgVariableV3_49_0 {
|
|
1700
|
+
type: 'variable';
|
|
1701
|
+
/**
|
|
1702
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1703
|
+
*/
|
|
1704
|
+
argName: string;
|
|
1705
|
+
/**
|
|
1706
|
+
* Name of variable to pull value from.
|
|
1707
|
+
*/
|
|
1708
|
+
variableName: string;
|
|
1747
1709
|
}
|
|
1748
1710
|
export interface AgentGenerateOptionsV3_49_0 {
|
|
1749
1711
|
history?: HistoryV3_49_01;
|
|
@@ -276,16 +276,10 @@ export type CacheTriggerConfigV3_50_0 = CacheScheduleTriggerConfigV3_50_0 | Cach
|
|
|
276
276
|
export type ShapeSchemaV3_50_0 = ShapeSchemaAllOfV3_50_0 | ShapeSchemaExtendsV3_50_0 | ShapeSchemaOneOfV3_50_0 | ShapeSchemaEnumV3_50_0 | ObjectSchemaV3_50_0 | ShapeSchemaAnyV3_50_0;
|
|
277
277
|
export type AgentAPIV3_50_0 = AgentAPIChatV3_50_0 | AgentAPIGenerateV3_50_0;
|
|
278
278
|
export type MemoryLocationsV3_50_0 = AgentSessionMemoryLocationV3_50_0[];
|
|
279
|
-
export type AgentVariableStepV3_50_0 = AgentVariableStepSessionMemoryV3_50_0 | AgentVariableStepGraphQLArgV3_50_0 | AgentVariableStepStateOutputV3_50_0 | AgentVariableStepPreviousStateOutputV3_50_0 | AgentVariableStepStaticValueV3_50_0;
|
|
280
|
-
export type AgentVariableStepConditionV3_50_0 = AgentVariableStepConditionNoneV3_50_0 | AgentVariableStepConditionSourceStateV3_50_0;
|
|
281
279
|
export type VariablesV3_50_0 = AgentVariableV3_50_0[];
|
|
282
280
|
export type AgentExecutionV3_50_0 = AgentExecutionGraphQLV3_50_0 | AgentExecutionGenerateV3_50_0 | AgentExecutionChatV3_50_0;
|
|
283
281
|
export type AgentAIStateInputV3_50_0 = AgentAIStateInputArgumentV3_50_0 | AgentAIStateInputTemplateV3_50_0;
|
|
284
|
-
export type
|
|
285
|
-
/**
|
|
286
|
-
* Remove properties from the schema sent to the model with keys matching these minimatch glob patterns.
|
|
287
|
-
*/
|
|
288
|
-
export type RemovePropertyKeyPatternsV3_50_0 = MinimatchPatternV3_50_0[];
|
|
282
|
+
export type AgentToolConfigArgV3_50_0 = AgentToolConfigArgAgentV3_50_0 | AgentToolConfigArgVariableV3_50_0;
|
|
289
283
|
export type HistoryV3_50_01 = boolean;
|
|
290
284
|
/**
|
|
291
285
|
* Maximum number of tokens to generate.
|
|
@@ -331,6 +325,11 @@ export type StructuredOutputsV3_50_0 = boolean;
|
|
|
331
325
|
* Enable OpenAI schema format. Must be enabled if `structuredOutputs` is enabled.
|
|
332
326
|
*/
|
|
333
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[];
|
|
334
333
|
export type AgentStateSessionMemoryLocationV3_50_0 = AgentStateSessionMemoryLocationArtifactV3_50_0 | AgentStateSessionMemoryLocationStaticValueV3_50_0;
|
|
335
334
|
export type AgentStateSessionMemoryV3_50_0 = AgentStateSessionMemoryLocationV3_50_0[];
|
|
336
335
|
export type GuardIDV3_50_0 = string;
|
|
@@ -1681,34 +1680,9 @@ export interface AgentStartV3_50_0 {
|
|
|
1681
1680
|
export interface AgentTransitionStepV3_50_0 {
|
|
1682
1681
|
destination: string;
|
|
1683
1682
|
suspend?: boolean;
|
|
1684
|
-
condition
|
|
1683
|
+
condition?: string;
|
|
1685
1684
|
limit?: number;
|
|
1686
1685
|
}
|
|
1687
|
-
export interface AgentTransitionStepConditionNoneV3_50_0 {
|
|
1688
|
-
type: 'none';
|
|
1689
|
-
}
|
|
1690
|
-
export interface AgentTransitionStepConditionArtifactV3_50_0 {
|
|
1691
|
-
type: 'artifact';
|
|
1692
|
-
path?: string;
|
|
1693
|
-
negated?: boolean;
|
|
1694
|
-
}
|
|
1695
|
-
export interface AgentTransitionStepConditionStateOutputV3_50_0 {
|
|
1696
|
-
type: 'stateOutput';
|
|
1697
|
-
stateId: string;
|
|
1698
|
-
path?: string;
|
|
1699
|
-
negated?: boolean;
|
|
1700
|
-
}
|
|
1701
|
-
export interface AgentTransitionStepConditionStringContainsV3_50_0 {
|
|
1702
|
-
type: 'stringContains';
|
|
1703
|
-
path?: string;
|
|
1704
|
-
string: string;
|
|
1705
|
-
negated?: boolean;
|
|
1706
|
-
}
|
|
1707
|
-
export interface AgentTransitionStepConditionArgumentV3_50_0 {
|
|
1708
|
-
type: 'argument';
|
|
1709
|
-
argument: string;
|
|
1710
|
-
negated?: boolean;
|
|
1711
|
-
}
|
|
1712
1686
|
/**
|
|
1713
1687
|
* States that are traversed during the execution of an agent.
|
|
1714
1688
|
*/
|
|
@@ -1735,39 +1709,9 @@ export interface AgentVariableV3_50_0 {
|
|
|
1735
1709
|
*/
|
|
1736
1710
|
steps: AgentVariableStepV3_50_0[];
|
|
1737
1711
|
}
|
|
1738
|
-
export interface
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
path?: string;
|
|
1742
|
-
}
|
|
1743
|
-
export interface AgentVariableStepGraphQLArgV3_50_0 {
|
|
1744
|
-
type: 'graphqlArg';
|
|
1745
|
-
argName: string;
|
|
1746
|
-
}
|
|
1747
|
-
export interface AgentVariableStepStateOutputV3_50_0 {
|
|
1748
|
-
type: 'stateOutput';
|
|
1749
|
-
stateId: string;
|
|
1750
|
-
path?: string;
|
|
1751
|
-
}
|
|
1752
|
-
export interface AgentVariableStepPreviousStateOutputV3_50_0 {
|
|
1753
|
-
type: 'previousStateOutput';
|
|
1754
|
-
path?: string;
|
|
1755
|
-
}
|
|
1756
|
-
/**
|
|
1757
|
-
* An Agent Variable that has a static value.
|
|
1758
|
-
*/
|
|
1759
|
-
export interface AgentVariableStepStaticValueV3_50_0 {
|
|
1760
|
-
type: 'staticValue';
|
|
1761
|
-
condition?: AgentVariableStepConditionV3_50_0;
|
|
1762
|
-
value: string;
|
|
1763
|
-
}
|
|
1764
|
-
export interface AgentVariableStepConditionNoneV3_50_0 {
|
|
1765
|
-
type: 'none';
|
|
1766
|
-
}
|
|
1767
|
-
export interface AgentVariableStepConditionSourceStateV3_50_0 {
|
|
1768
|
-
type: 'sourceState';
|
|
1769
|
-
stateId: string;
|
|
1770
|
-
negated?: boolean;
|
|
1712
|
+
export interface AgentVariableStepV3_50_0 {
|
|
1713
|
+
condition?: string;
|
|
1714
|
+
expression: string;
|
|
1771
1715
|
}
|
|
1772
1716
|
export interface AgentExecutionGraphQLV3_50_0 {
|
|
1773
1717
|
type: 'graphql';
|
|
@@ -1792,10 +1736,28 @@ export interface AgentAIStateInputTemplateV3_50_0 {
|
|
|
1792
1736
|
inputTemplate: string;
|
|
1793
1737
|
}
|
|
1794
1738
|
export interface AgentToolConfigV3_50_0 {
|
|
1795
|
-
description?: string;
|
|
1796
1739
|
ref: string;
|
|
1740
|
+
description?: string;
|
|
1741
|
+
args?: AgentToolConfigArgV3_50_0[];
|
|
1797
1742
|
selectionSet?: string;
|
|
1798
|
-
|
|
1743
|
+
}
|
|
1744
|
+
export interface AgentToolConfigArgAgentV3_50_0 {
|
|
1745
|
+
type: 'agent';
|
|
1746
|
+
/**
|
|
1747
|
+
* The argument name that will be exposed by the tool for the LLM to use.
|
|
1748
|
+
*/
|
|
1749
|
+
argName: string;
|
|
1750
|
+
}
|
|
1751
|
+
export interface AgentToolConfigArgVariableV3_50_0 {
|
|
1752
|
+
type: 'variable';
|
|
1753
|
+
/**
|
|
1754
|
+
* Name of argument to pass value to. This prevents the LLM from setting the argument.
|
|
1755
|
+
*/
|
|
1756
|
+
argName: string;
|
|
1757
|
+
/**
|
|
1758
|
+
* Name of variable to pull value from.
|
|
1759
|
+
*/
|
|
1760
|
+
variableName: string;
|
|
1799
1761
|
}
|
|
1800
1762
|
export interface AgentGenerateOptionsV3_50_0 {
|
|
1801
1763
|
history?: HistoryV3_50_01;
|