@takeshape/schema 11.41.0 → 11.44.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/cjs/src/agents.js +87 -1
- package/dist/cjs/src/index.js +2 -0
- package/dist/cjs/src/relationships.js +86 -1
- package/dist/cjs/src/runtime-schema.js +81 -0
- package/dist/cjs/src/schemas/index.js +3 -7
- package/dist/cjs/src/schemas/project-schema/experimental.json +305 -0
- package/dist/cjs/src/schemas/project-schema/latest.json +1 -1
- package/dist/cjs/src/schemas/project-schema/v3.50.0.json +1 -1
- package/dist/cjs/src/service-dependencies.js +167 -0
- package/dist/cjs/src/util/patch-schema.js +33 -28
- package/dist/cjs/src/validate.js +40 -4
- package/dist/esm/src/agents.js +83 -0
- package/dist/esm/src/index.js +2 -0
- package/dist/esm/src/relationships.js +85 -1
- package/dist/esm/src/runtime-schema.js +73 -0
- package/dist/esm/src/schemas/index.js +0 -2
- package/dist/esm/src/schemas/project-schema/experimental.json +305 -0
- package/dist/esm/src/schemas/project-schema/latest.json +1 -1
- package/dist/esm/src/schemas/project-schema/v3.50.0.json +1 -1
- package/dist/esm/src/service-dependencies.js +159 -0
- package/dist/esm/src/util/patch-schema.js +33 -27
- package/dist/esm/src/validate.js +40 -4
- package/dist/types/src/agents.d.ts +4 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/migration/types.d.ts +1 -3
- package/dist/types/src/project-schema/latest.d.ts +143 -4
- package/dist/types/src/project-schema/v3.48.0.d.ts +143 -4
- package/dist/types/src/project-schema/v3.49.0.d.ts +143 -4
- package/dist/types/src/project-schema/v3.50.0.d.ts +143 -4
- package/dist/types/src/relationships.d.ts +4 -0
- package/dist/types/src/runtime-schema.d.ts +5 -0
- package/dist/types/src/schemas/index.d.ts +0 -2
- package/dist/types/src/service-dependencies.d.ts +13 -0
- package/dist/types/src/types/types.d.ts +1 -0
- package/dist/types/src/util/patch-schema.d.ts +4 -4
- package/dist/types/src/validate.d.ts +8 -3
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgentAPIArgument, type AgentJSON } from './project-schema';
|
|
1
|
+
import { type Args, type ProjectSchemaJSON, type AgentAPIArgument, type AgentJSON } from './project-schema';
|
|
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[];
|
|
@@ -9,3 +9,6 @@ export type AgentEndTransition = {
|
|
|
9
9
|
export declare const getAgentEndTransitions: (agent: AgentJSON, includeSuspend?: boolean) => AgentEndTransition[];
|
|
10
10
|
export declare const getAgentEndStates: (agent: AgentJSON, includeSuspend?: boolean) => Set<string>;
|
|
11
11
|
export declare const getInspectAgentSessionQueryName: (agentName: string) => string;
|
|
12
|
+
export declare const removeBuiltInArgs: (args: AgentAPIArgument[]) => AgentAPIArgument[];
|
|
13
|
+
export declare const createArgs: (agent: AgentJSON) => Args | undefined;
|
|
14
|
+
export declare function addAiQueries(projectSchema: ProjectSchemaJSON): ProjectSchemaJSON;
|
|
@@ -9,9 +9,7 @@ export type ProjectSchemaUpdate = {
|
|
|
9
9
|
queries?: Record<string, QueryJSON | null>;
|
|
10
10
|
mutations?: Record<string, QueryJSON | null>;
|
|
11
11
|
shapes?: Record<string, ShapeJSON | null>;
|
|
12
|
-
|
|
13
|
-
agents?: Record<string, AgentJSON | null>;
|
|
14
|
-
};
|
|
12
|
+
'ai-experimental.agents'?: Record<string, AgentJSON | null>;
|
|
15
13
|
forms?: Record<string, FormConfig | null>;
|
|
16
14
|
workflows?: Record<string, Workflow | null>;
|
|
17
15
|
services?: Record<string, ServiceConfigJSON | null>;
|
|
@@ -314,6 +314,34 @@ export type StopSequences1 = string[];
|
|
|
314
314
|
* The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results.
|
|
315
315
|
*/
|
|
316
316
|
export type Seed1 = number;
|
|
317
|
+
export type AgentGuardList = AgentGuard[];
|
|
318
|
+
/**
|
|
319
|
+
* The human-readable name of the Guard.
|
|
320
|
+
*/
|
|
321
|
+
export type Name = string;
|
|
322
|
+
/**
|
|
323
|
+
* A description of the Guard.
|
|
324
|
+
*/
|
|
325
|
+
export type Description = string;
|
|
326
|
+
/**
|
|
327
|
+
* A message to return when the input message is blocked by the Guard.
|
|
328
|
+
*/
|
|
329
|
+
export type BlockedInputMessaging = string;
|
|
330
|
+
/**
|
|
331
|
+
* A message to return when the output message is blocked by the Guard.
|
|
332
|
+
*/
|
|
333
|
+
export type BlockedOutputsMessaging = string;
|
|
334
|
+
export type GuardrailFilterStrength = 'NONE' | 'HIGH' | 'LOW' | 'MEDIUM';
|
|
335
|
+
export type GuardrailModality = 'TEXT' | 'IMAGE';
|
|
336
|
+
export type GuardrailSensitiveInformationAction = 'ANONYMIZE' | 'BLOCK';
|
|
337
|
+
/**
|
|
338
|
+
* The type of filter.
|
|
339
|
+
*/
|
|
340
|
+
export type Type = 'GROUNDING' | 'RELEVANCE';
|
|
341
|
+
/**
|
|
342
|
+
* The threshold for the filter as a floating point value between 0.0 - 1.0.
|
|
343
|
+
*/
|
|
344
|
+
export type Threshold = number;
|
|
317
345
|
/**
|
|
318
346
|
* Human-readable id for use in the UI
|
|
319
347
|
*/
|
|
@@ -321,12 +349,12 @@ export type WorkflowName = string;
|
|
|
321
349
|
/**
|
|
322
350
|
* machine-readable slug
|
|
323
351
|
*/
|
|
324
|
-
export type
|
|
352
|
+
export type Name1 = string;
|
|
325
353
|
/**
|
|
326
354
|
* Human-readable id for use in the UI
|
|
327
355
|
*/
|
|
328
356
|
export type Title = string;
|
|
329
|
-
export type
|
|
357
|
+
export type Description1 = string;
|
|
330
358
|
/**
|
|
331
359
|
* Hex color code
|
|
332
360
|
*/
|
|
@@ -1489,6 +1517,7 @@ export interface ShapeSchemaAny {
|
|
|
1489
1517
|
}
|
|
1490
1518
|
export interface AIExperimental {
|
|
1491
1519
|
agents?: AgentMap;
|
|
1520
|
+
guards?: GuardMap;
|
|
1492
1521
|
}
|
|
1493
1522
|
export interface AgentMap {
|
|
1494
1523
|
[k: string]: AgentJSON;
|
|
@@ -1505,6 +1534,7 @@ export interface AgentJSON {
|
|
|
1505
1534
|
api: AgentAPI;
|
|
1506
1535
|
start: AgentStart;
|
|
1507
1536
|
states: AgentStates;
|
|
1537
|
+
guards?: AgentGuardList;
|
|
1508
1538
|
}
|
|
1509
1539
|
export interface AgentAPIChat {
|
|
1510
1540
|
type: 'chat';
|
|
@@ -1686,6 +1716,115 @@ export interface AgentExecutionChat {
|
|
|
1686
1716
|
guardrails?: AgentGuardrail[];
|
|
1687
1717
|
options?: AgentGenerateOptions;
|
|
1688
1718
|
}
|
|
1719
|
+
export interface AgentGuard {
|
|
1720
|
+
guardId: string;
|
|
1721
|
+
}
|
|
1722
|
+
export interface GuardMap {
|
|
1723
|
+
[k: string]: GuardJSON;
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* A Guard is a configuration for an AI guardrail that can check inputs and outputs and provide safety and compliance.
|
|
1727
|
+
*
|
|
1728
|
+
* This interface was referenced by `GuardMap`'s JSON-Schema definition
|
|
1729
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1730
|
+
*/
|
|
1731
|
+
export interface GuardJSON {
|
|
1732
|
+
name: Name;
|
|
1733
|
+
description?: Description;
|
|
1734
|
+
blockedInputMessaging?: BlockedInputMessaging;
|
|
1735
|
+
blockedOutputsMessaging?: BlockedOutputsMessaging;
|
|
1736
|
+
topicPolicyConfig?: TopicPolicy;
|
|
1737
|
+
contentPolicyConfig?: ContentPolicy;
|
|
1738
|
+
wordPolicyConfig?: WordPolicy;
|
|
1739
|
+
sensitiveInformationPolicyConfig?: SensitiveInformationPolicy;
|
|
1740
|
+
contextualGroundingPolicyConfig?: ContextualGroundingPolicy;
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* Topics to identify and block.
|
|
1744
|
+
*/
|
|
1745
|
+
export interface TopicPolicy {
|
|
1746
|
+
topicsConfig?: Topic[];
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* A topic to block.
|
|
1750
|
+
*/
|
|
1751
|
+
export interface Topic {
|
|
1752
|
+
name?: string;
|
|
1753
|
+
definition?: string;
|
|
1754
|
+
examples?: string[];
|
|
1755
|
+
type?: 'DENY';
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Types of content to filter and strength configuration.
|
|
1759
|
+
*/
|
|
1760
|
+
export interface ContentPolicy {
|
|
1761
|
+
filtersConfig?: Filter[];
|
|
1762
|
+
}
|
|
1763
|
+
/**
|
|
1764
|
+
* Types of content to filter.
|
|
1765
|
+
*/
|
|
1766
|
+
export interface Filter {
|
|
1767
|
+
type?: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
|
|
1768
|
+
inputStrength?: GuardrailFilterStrength;
|
|
1769
|
+
outputStrength?: GuardrailFilterStrength;
|
|
1770
|
+
inputModalities?: GuardrailModality[];
|
|
1771
|
+
outputModalities?: GuardrailModality[];
|
|
1772
|
+
}
|
|
1773
|
+
/**
|
|
1774
|
+
* Specific words to identify and block. The managedWordListsConfig is solely used for blocking profanity.
|
|
1775
|
+
*/
|
|
1776
|
+
export interface WordPolicy {
|
|
1777
|
+
wordsConfig?: WordList[];
|
|
1778
|
+
managedWordListsConfig?: ManagedWords[];
|
|
1779
|
+
}
|
|
1780
|
+
/**
|
|
1781
|
+
* Specific words to block.
|
|
1782
|
+
*/
|
|
1783
|
+
export interface WordList {
|
|
1784
|
+
text?: string;
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* Managed word list to block. This is solely used for blocking profanity.
|
|
1788
|
+
*/
|
|
1789
|
+
export interface ManagedWords {
|
|
1790
|
+
type?: 'PROFANITY';
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Filter out and block or obscure sensitive information. Matching text will be handled per the policy.
|
|
1794
|
+
*/
|
|
1795
|
+
export interface SensitiveInformationPolicy {
|
|
1796
|
+
piiEntitiesConfig?: PIIEntity[];
|
|
1797
|
+
regexesConfig?: RegularExpression[];
|
|
1798
|
+
}
|
|
1799
|
+
/**
|
|
1800
|
+
* PII entity to infer from the text.
|
|
1801
|
+
*/
|
|
1802
|
+
export interface PIIEntity {
|
|
1803
|
+
type?: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
|
|
1804
|
+
action?: GuardrailSensitiveInformationAction;
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* A regular expression to match sensitive information.
|
|
1808
|
+
*/
|
|
1809
|
+
export interface RegularExpression {
|
|
1810
|
+
name?: string;
|
|
1811
|
+
description?: string;
|
|
1812
|
+
pattern?: string;
|
|
1813
|
+
action?: GuardrailSensitiveInformationAction;
|
|
1814
|
+
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Provides evaluations based on grounding text supplied by your in-context agent variables. Off-topic conversations can then be blocked.
|
|
1817
|
+
*/
|
|
1818
|
+
export interface ContextualGroundingPolicy {
|
|
1819
|
+
filtersConfig?: Filter1[];
|
|
1820
|
+
}
|
|
1821
|
+
/**
|
|
1822
|
+
* Filter to evaluate grounding text.
|
|
1823
|
+
*/
|
|
1824
|
+
export interface Filter1 {
|
|
1825
|
+
type?: Type;
|
|
1826
|
+
threshold?: Threshold;
|
|
1827
|
+
}
|
|
1689
1828
|
/**
|
|
1690
1829
|
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
1691
1830
|
* via the `definition` "formMap".
|
|
@@ -1745,9 +1884,9 @@ export interface Workflow {
|
|
|
1745
1884
|
* via the `definition` "workflowStep".
|
|
1746
1885
|
*/
|
|
1747
1886
|
export interface WorkflowStep {
|
|
1748
|
-
name:
|
|
1887
|
+
name: Name1;
|
|
1749
1888
|
title: Title;
|
|
1750
|
-
description?:
|
|
1889
|
+
description?: Description1;
|
|
1751
1890
|
color: Color;
|
|
1752
1891
|
live: Live;
|
|
1753
1892
|
key: Key;
|
|
@@ -306,6 +306,34 @@ export type StopSequencesV3_48_01 = string[];
|
|
|
306
306
|
* The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results.
|
|
307
307
|
*/
|
|
308
308
|
export type SeedV3_48_01 = number;
|
|
309
|
+
export type AgentGuardListV3_48_0 = AgentGuardV3_48_0[];
|
|
310
|
+
/**
|
|
311
|
+
* The human-readable name of the Guard.
|
|
312
|
+
*/
|
|
313
|
+
export type NameV3_48_0 = string;
|
|
314
|
+
/**
|
|
315
|
+
* A description of the Guard.
|
|
316
|
+
*/
|
|
317
|
+
export type DescriptionV3_48_0 = string;
|
|
318
|
+
/**
|
|
319
|
+
* A message to return when the input message is blocked by the Guard.
|
|
320
|
+
*/
|
|
321
|
+
export type BlockedInputMessagingV3_48_0 = string;
|
|
322
|
+
/**
|
|
323
|
+
* A message to return when the output message is blocked by the Guard.
|
|
324
|
+
*/
|
|
325
|
+
export type BlockedOutputsMessagingV3_48_0 = string;
|
|
326
|
+
export type GuardrailFilterStrengthV3_48_0 = 'NONE' | 'HIGH' | 'LOW' | 'MEDIUM';
|
|
327
|
+
export type GuardrailModalityV3_48_0 = 'TEXT' | 'IMAGE';
|
|
328
|
+
export type GuardrailSensitiveInformationActionV3_48_0 = 'ANONYMIZE' | 'BLOCK';
|
|
329
|
+
/**
|
|
330
|
+
* The type of filter.
|
|
331
|
+
*/
|
|
332
|
+
export type TypeV3_48_0 = 'GROUNDING' | 'RELEVANCE';
|
|
333
|
+
/**
|
|
334
|
+
* The threshold for the filter as a floating point value between 0.0 - 1.0.
|
|
335
|
+
*/
|
|
336
|
+
export type ThresholdV3_48_0 = number;
|
|
309
337
|
/**
|
|
310
338
|
* Human-readable id for use in the UI
|
|
311
339
|
*/
|
|
@@ -313,12 +341,12 @@ export type WorkflowNameV3_48_0 = string;
|
|
|
313
341
|
/**
|
|
314
342
|
* machine-readable slug
|
|
315
343
|
*/
|
|
316
|
-
export type
|
|
344
|
+
export type NameV3_48_01 = string;
|
|
317
345
|
/**
|
|
318
346
|
* Human-readable id for use in the UI
|
|
319
347
|
*/
|
|
320
348
|
export type TitleV3_48_0 = string;
|
|
321
|
-
export type
|
|
349
|
+
export type DescriptionV3_48_01 = string;
|
|
322
350
|
/**
|
|
323
351
|
* Hex color code
|
|
324
352
|
*/
|
|
@@ -1455,6 +1483,7 @@ export interface ShapeSchemaAnyV3_48_0 {
|
|
|
1455
1483
|
}
|
|
1456
1484
|
export interface AIExperimentalV3_48_0 {
|
|
1457
1485
|
agents?: AgentMapV3_48_0;
|
|
1486
|
+
guards?: GuardMapV3_48_0;
|
|
1458
1487
|
}
|
|
1459
1488
|
export interface AgentMapV3_48_0 {
|
|
1460
1489
|
[k: string]: AgentJSONV3_48_0;
|
|
@@ -1471,6 +1500,7 @@ export interface AgentJSONV3_48_0 {
|
|
|
1471
1500
|
api: AgentAPIV3_48_0;
|
|
1472
1501
|
start: AgentStartV3_48_0;
|
|
1473
1502
|
states: AgentStatesV3_48_0;
|
|
1503
|
+
guards?: AgentGuardListV3_48_0;
|
|
1474
1504
|
}
|
|
1475
1505
|
export interface AgentAPIChatV3_48_0 {
|
|
1476
1506
|
type: 'chat';
|
|
@@ -1652,6 +1682,115 @@ export interface AgentExecutionChatV3_48_0 {
|
|
|
1652
1682
|
guardrails?: AgentGuardrailV3_48_0[];
|
|
1653
1683
|
options?: AgentGenerateOptionsV3_48_0;
|
|
1654
1684
|
}
|
|
1685
|
+
export interface AgentGuardV3_48_0 {
|
|
1686
|
+
guardId: string;
|
|
1687
|
+
}
|
|
1688
|
+
export interface GuardMapV3_48_0 {
|
|
1689
|
+
[k: string]: GuardJSONV3_48_0;
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* A Guard is a configuration for an AI guardrail that can check inputs and outputs and provide safety and compliance.
|
|
1693
|
+
*
|
|
1694
|
+
* This interface was referenced by `GuardMapV3_48_0`'s JSON-Schema definition
|
|
1695
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1696
|
+
*/
|
|
1697
|
+
export interface GuardJSONV3_48_0 {
|
|
1698
|
+
name: NameV3_48_0;
|
|
1699
|
+
description?: DescriptionV3_48_0;
|
|
1700
|
+
blockedInputMessaging?: BlockedInputMessagingV3_48_0;
|
|
1701
|
+
blockedOutputsMessaging?: BlockedOutputsMessagingV3_48_0;
|
|
1702
|
+
topicPolicyConfig?: TopicPolicyV3_48_0;
|
|
1703
|
+
contentPolicyConfig?: ContentPolicyV3_48_0;
|
|
1704
|
+
wordPolicyConfig?: WordPolicyV3_48_0;
|
|
1705
|
+
sensitiveInformationPolicyConfig?: SensitiveInformationPolicyV3_48_0;
|
|
1706
|
+
contextualGroundingPolicyConfig?: ContextualGroundingPolicyV3_48_0;
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Topics to identify and block.
|
|
1710
|
+
*/
|
|
1711
|
+
export interface TopicPolicyV3_48_0 {
|
|
1712
|
+
topicsConfig?: TopicV3_48_0[];
|
|
1713
|
+
}
|
|
1714
|
+
/**
|
|
1715
|
+
* A topic to block.
|
|
1716
|
+
*/
|
|
1717
|
+
export interface TopicV3_48_0 {
|
|
1718
|
+
name?: string;
|
|
1719
|
+
definition?: string;
|
|
1720
|
+
examples?: string[];
|
|
1721
|
+
type?: 'DENY';
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* Types of content to filter and strength configuration.
|
|
1725
|
+
*/
|
|
1726
|
+
export interface ContentPolicyV3_48_0 {
|
|
1727
|
+
filtersConfig?: FilterV3_48_0[];
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* Types of content to filter.
|
|
1731
|
+
*/
|
|
1732
|
+
export interface FilterV3_48_0 {
|
|
1733
|
+
type?: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
|
|
1734
|
+
inputStrength?: GuardrailFilterStrengthV3_48_0;
|
|
1735
|
+
outputStrength?: GuardrailFilterStrengthV3_48_0;
|
|
1736
|
+
inputModalities?: GuardrailModalityV3_48_0[];
|
|
1737
|
+
outputModalities?: GuardrailModalityV3_48_0[];
|
|
1738
|
+
}
|
|
1739
|
+
/**
|
|
1740
|
+
* Specific words to identify and block. The managedWordListsConfig is solely used for blocking profanity.
|
|
1741
|
+
*/
|
|
1742
|
+
export interface WordPolicyV3_48_0 {
|
|
1743
|
+
wordsConfig?: WordListV3_48_0[];
|
|
1744
|
+
managedWordListsConfig?: ManagedWordsV3_48_0[];
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* Specific words to block.
|
|
1748
|
+
*/
|
|
1749
|
+
export interface WordListV3_48_0 {
|
|
1750
|
+
text?: string;
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* Managed word list to block. This is solely used for blocking profanity.
|
|
1754
|
+
*/
|
|
1755
|
+
export interface ManagedWordsV3_48_0 {
|
|
1756
|
+
type?: 'PROFANITY';
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* Filter out and block or obscure sensitive information. Matching text will be handled per the policy.
|
|
1760
|
+
*/
|
|
1761
|
+
export interface SensitiveInformationPolicyV3_48_0 {
|
|
1762
|
+
piiEntitiesConfig?: PIIEntityV3_48_0[];
|
|
1763
|
+
regexesConfig?: RegularExpressionV3_48_0[];
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* PII entity to infer from the text.
|
|
1767
|
+
*/
|
|
1768
|
+
export interface PIIEntityV3_48_0 {
|
|
1769
|
+
type?: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
|
|
1770
|
+
action?: GuardrailSensitiveInformationActionV3_48_0;
|
|
1771
|
+
}
|
|
1772
|
+
/**
|
|
1773
|
+
* A regular expression to match sensitive information.
|
|
1774
|
+
*/
|
|
1775
|
+
export interface RegularExpressionV3_48_0 {
|
|
1776
|
+
name?: string;
|
|
1777
|
+
description?: string;
|
|
1778
|
+
pattern?: string;
|
|
1779
|
+
action?: GuardrailSensitiveInformationActionV3_48_0;
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Provides evaluations based on grounding text supplied by your in-context agent variables. Off-topic conversations can then be blocked.
|
|
1783
|
+
*/
|
|
1784
|
+
export interface ContextualGroundingPolicyV3_48_0 {
|
|
1785
|
+
filtersConfig?: FilterV3_48_01[];
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Filter to evaluate grounding text.
|
|
1789
|
+
*/
|
|
1790
|
+
export interface FilterV3_48_01 {
|
|
1791
|
+
type?: TypeV3_48_0;
|
|
1792
|
+
threshold?: ThresholdV3_48_0;
|
|
1793
|
+
}
|
|
1655
1794
|
/**
|
|
1656
1795
|
* This interface was referenced by `ProjectSchemaJSONV3_48_0`'s JSON-Schema
|
|
1657
1796
|
* via the `definition` "formMap".
|
|
@@ -1711,9 +1850,9 @@ export interface WorkflowV3_48_0 {
|
|
|
1711
1850
|
* via the `definition` "workflowStep".
|
|
1712
1851
|
*/
|
|
1713
1852
|
export interface WorkflowStepV3_48_0 {
|
|
1714
|
-
name:
|
|
1853
|
+
name: NameV3_48_01;
|
|
1715
1854
|
title: TitleV3_48_0;
|
|
1716
|
-
description?:
|
|
1855
|
+
description?: DescriptionV3_48_01;
|
|
1717
1856
|
color: ColorV3_48_0;
|
|
1718
1857
|
live: LiveV3_48_0;
|
|
1719
1858
|
key: KeyV3_48_0;
|
|
@@ -306,6 +306,34 @@ export type StopSequencesV3_49_01 = string[];
|
|
|
306
306
|
* The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results.
|
|
307
307
|
*/
|
|
308
308
|
export type SeedV3_49_01 = number;
|
|
309
|
+
export type AgentGuardListV3_49_0 = AgentGuardV3_49_0[];
|
|
310
|
+
/**
|
|
311
|
+
* The human-readable name of the Guard.
|
|
312
|
+
*/
|
|
313
|
+
export type NameV3_49_0 = string;
|
|
314
|
+
/**
|
|
315
|
+
* A description of the Guard.
|
|
316
|
+
*/
|
|
317
|
+
export type DescriptionV3_49_0 = string;
|
|
318
|
+
/**
|
|
319
|
+
* A message to return when the input message is blocked by the Guard.
|
|
320
|
+
*/
|
|
321
|
+
export type BlockedInputMessagingV3_49_0 = string;
|
|
322
|
+
/**
|
|
323
|
+
* A message to return when the output message is blocked by the Guard.
|
|
324
|
+
*/
|
|
325
|
+
export type BlockedOutputsMessagingV3_49_0 = string;
|
|
326
|
+
export type GuardrailFilterStrengthV3_49_0 = 'NONE' | 'HIGH' | 'LOW' | 'MEDIUM';
|
|
327
|
+
export type GuardrailModalityV3_49_0 = 'TEXT' | 'IMAGE';
|
|
328
|
+
export type GuardrailSensitiveInformationActionV3_49_0 = 'ANONYMIZE' | 'BLOCK';
|
|
329
|
+
/**
|
|
330
|
+
* The type of filter.
|
|
331
|
+
*/
|
|
332
|
+
export type TypeV3_49_0 = 'GROUNDING' | 'RELEVANCE';
|
|
333
|
+
/**
|
|
334
|
+
* The threshold for the filter as a floating point value between 0.0 - 1.0.
|
|
335
|
+
*/
|
|
336
|
+
export type ThresholdV3_49_0 = number;
|
|
309
337
|
/**
|
|
310
338
|
* Human-readable id for use in the UI
|
|
311
339
|
*/
|
|
@@ -313,12 +341,12 @@ export type WorkflowNameV3_49_0 = string;
|
|
|
313
341
|
/**
|
|
314
342
|
* machine-readable slug
|
|
315
343
|
*/
|
|
316
|
-
export type
|
|
344
|
+
export type NameV3_49_01 = string;
|
|
317
345
|
/**
|
|
318
346
|
* Human-readable id for use in the UI
|
|
319
347
|
*/
|
|
320
348
|
export type TitleV3_49_0 = string;
|
|
321
|
-
export type
|
|
349
|
+
export type DescriptionV3_49_01 = string;
|
|
322
350
|
/**
|
|
323
351
|
* Hex color code
|
|
324
352
|
*/
|
|
@@ -1455,6 +1483,7 @@ export interface ShapeSchemaAnyV3_49_0 {
|
|
|
1455
1483
|
}
|
|
1456
1484
|
export interface AIExperimentalV3_49_0 {
|
|
1457
1485
|
agents?: AgentMapV3_49_0;
|
|
1486
|
+
guards?: GuardMapV3_49_0;
|
|
1458
1487
|
}
|
|
1459
1488
|
export interface AgentMapV3_49_0 {
|
|
1460
1489
|
[k: string]: AgentJSONV3_49_0;
|
|
@@ -1471,6 +1500,7 @@ export interface AgentJSONV3_49_0 {
|
|
|
1471
1500
|
api: AgentAPIV3_49_0;
|
|
1472
1501
|
start: AgentStartV3_49_0;
|
|
1473
1502
|
states: AgentStatesV3_49_0;
|
|
1503
|
+
guards?: AgentGuardListV3_49_0;
|
|
1474
1504
|
}
|
|
1475
1505
|
export interface AgentAPIChatV3_49_0 {
|
|
1476
1506
|
type: 'chat';
|
|
@@ -1652,6 +1682,115 @@ export interface AgentExecutionChatV3_49_0 {
|
|
|
1652
1682
|
guardrails?: AgentGuardrailV3_49_0[];
|
|
1653
1683
|
options?: AgentGenerateOptionsV3_49_0;
|
|
1654
1684
|
}
|
|
1685
|
+
export interface AgentGuardV3_49_0 {
|
|
1686
|
+
guardId: string;
|
|
1687
|
+
}
|
|
1688
|
+
export interface GuardMapV3_49_0 {
|
|
1689
|
+
[k: string]: GuardJSONV3_49_0;
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* A Guard is a configuration for an AI guardrail that can check inputs and outputs and provide safety and compliance.
|
|
1693
|
+
*
|
|
1694
|
+
* This interface was referenced by `GuardMapV3_49_0`'s JSON-Schema definition
|
|
1695
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1696
|
+
*/
|
|
1697
|
+
export interface GuardJSONV3_49_0 {
|
|
1698
|
+
name: NameV3_49_0;
|
|
1699
|
+
description?: DescriptionV3_49_0;
|
|
1700
|
+
blockedInputMessaging?: BlockedInputMessagingV3_49_0;
|
|
1701
|
+
blockedOutputsMessaging?: BlockedOutputsMessagingV3_49_0;
|
|
1702
|
+
topicPolicyConfig?: TopicPolicyV3_49_0;
|
|
1703
|
+
contentPolicyConfig?: ContentPolicyV3_49_0;
|
|
1704
|
+
wordPolicyConfig?: WordPolicyV3_49_0;
|
|
1705
|
+
sensitiveInformationPolicyConfig?: SensitiveInformationPolicyV3_49_0;
|
|
1706
|
+
contextualGroundingPolicyConfig?: ContextualGroundingPolicyV3_49_0;
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Topics to identify and block.
|
|
1710
|
+
*/
|
|
1711
|
+
export interface TopicPolicyV3_49_0 {
|
|
1712
|
+
topicsConfig?: TopicV3_49_0[];
|
|
1713
|
+
}
|
|
1714
|
+
/**
|
|
1715
|
+
* A topic to block.
|
|
1716
|
+
*/
|
|
1717
|
+
export interface TopicV3_49_0 {
|
|
1718
|
+
name?: string;
|
|
1719
|
+
definition?: string;
|
|
1720
|
+
examples?: string[];
|
|
1721
|
+
type?: 'DENY';
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* Types of content to filter and strength configuration.
|
|
1725
|
+
*/
|
|
1726
|
+
export interface ContentPolicyV3_49_0 {
|
|
1727
|
+
filtersConfig?: FilterV3_49_0[];
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* Types of content to filter.
|
|
1731
|
+
*/
|
|
1732
|
+
export interface FilterV3_49_0 {
|
|
1733
|
+
type?: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
|
|
1734
|
+
inputStrength?: GuardrailFilterStrengthV3_49_0;
|
|
1735
|
+
outputStrength?: GuardrailFilterStrengthV3_49_0;
|
|
1736
|
+
inputModalities?: GuardrailModalityV3_49_0[];
|
|
1737
|
+
outputModalities?: GuardrailModalityV3_49_0[];
|
|
1738
|
+
}
|
|
1739
|
+
/**
|
|
1740
|
+
* Specific words to identify and block. The managedWordListsConfig is solely used for blocking profanity.
|
|
1741
|
+
*/
|
|
1742
|
+
export interface WordPolicyV3_49_0 {
|
|
1743
|
+
wordsConfig?: WordListV3_49_0[];
|
|
1744
|
+
managedWordListsConfig?: ManagedWordsV3_49_0[];
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* Specific words to block.
|
|
1748
|
+
*/
|
|
1749
|
+
export interface WordListV3_49_0 {
|
|
1750
|
+
text?: string;
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* Managed word list to block. This is solely used for blocking profanity.
|
|
1754
|
+
*/
|
|
1755
|
+
export interface ManagedWordsV3_49_0 {
|
|
1756
|
+
type?: 'PROFANITY';
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* Filter out and block or obscure sensitive information. Matching text will be handled per the policy.
|
|
1760
|
+
*/
|
|
1761
|
+
export interface SensitiveInformationPolicyV3_49_0 {
|
|
1762
|
+
piiEntitiesConfig?: PIIEntityV3_49_0[];
|
|
1763
|
+
regexesConfig?: RegularExpressionV3_49_0[];
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* PII entity to infer from the text.
|
|
1767
|
+
*/
|
|
1768
|
+
export interface PIIEntityV3_49_0 {
|
|
1769
|
+
type?: 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER';
|
|
1770
|
+
action?: GuardrailSensitiveInformationActionV3_49_0;
|
|
1771
|
+
}
|
|
1772
|
+
/**
|
|
1773
|
+
* A regular expression to match sensitive information.
|
|
1774
|
+
*/
|
|
1775
|
+
export interface RegularExpressionV3_49_0 {
|
|
1776
|
+
name?: string;
|
|
1777
|
+
description?: string;
|
|
1778
|
+
pattern?: string;
|
|
1779
|
+
action?: GuardrailSensitiveInformationActionV3_49_0;
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Provides evaluations based on grounding text supplied by your in-context agent variables. Off-topic conversations can then be blocked.
|
|
1783
|
+
*/
|
|
1784
|
+
export interface ContextualGroundingPolicyV3_49_0 {
|
|
1785
|
+
filtersConfig?: FilterV3_49_01[];
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Filter to evaluate grounding text.
|
|
1789
|
+
*/
|
|
1790
|
+
export interface FilterV3_49_01 {
|
|
1791
|
+
type?: TypeV3_49_0;
|
|
1792
|
+
threshold?: ThresholdV3_49_0;
|
|
1793
|
+
}
|
|
1655
1794
|
/**
|
|
1656
1795
|
* This interface was referenced by `ProjectSchemaJSONV3_49_0`'s JSON-Schema
|
|
1657
1796
|
* via the `definition` "formMap".
|
|
@@ -1711,9 +1850,9 @@ export interface WorkflowV3_49_0 {
|
|
|
1711
1850
|
* via the `definition` "workflowStep".
|
|
1712
1851
|
*/
|
|
1713
1852
|
export interface WorkflowStepV3_49_0 {
|
|
1714
|
-
name:
|
|
1853
|
+
name: NameV3_49_01;
|
|
1715
1854
|
title: TitleV3_49_0;
|
|
1716
|
-
description?:
|
|
1855
|
+
description?: DescriptionV3_49_01;
|
|
1717
1856
|
color: ColorV3_49_0;
|
|
1718
1857
|
live: LiveV3_49_0;
|
|
1719
1858
|
key: KeyV3_49_0;
|