@takeshape/schema 11.43.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/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/validate.js +34 -4
- 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/validate.js +34 -4
- 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/schemas/index.d.ts +0 -2
- package/dist/types/src/validate.d.ts +8 -3
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -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;
|
|
@@ -314,6 +314,34 @@ export type StopSequencesV3_50_01 = 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 SeedV3_50_01 = number;
|
|
317
|
+
export type AgentGuardListV3_50_0 = AgentGuardV3_50_0[];
|
|
318
|
+
/**
|
|
319
|
+
* The human-readable name of the Guard.
|
|
320
|
+
*/
|
|
321
|
+
export type NameV3_50_0 = string;
|
|
322
|
+
/**
|
|
323
|
+
* A description of the Guard.
|
|
324
|
+
*/
|
|
325
|
+
export type DescriptionV3_50_0 = string;
|
|
326
|
+
/**
|
|
327
|
+
* A message to return when the input message is blocked by the Guard.
|
|
328
|
+
*/
|
|
329
|
+
export type BlockedInputMessagingV3_50_0 = string;
|
|
330
|
+
/**
|
|
331
|
+
* A message to return when the output message is blocked by the Guard.
|
|
332
|
+
*/
|
|
333
|
+
export type BlockedOutputsMessagingV3_50_0 = string;
|
|
334
|
+
export type GuardrailFilterStrengthV3_50_0 = 'NONE' | 'HIGH' | 'LOW' | 'MEDIUM';
|
|
335
|
+
export type GuardrailModalityV3_50_0 = 'TEXT' | 'IMAGE';
|
|
336
|
+
export type GuardrailSensitiveInformationActionV3_50_0 = 'ANONYMIZE' | 'BLOCK';
|
|
337
|
+
/**
|
|
338
|
+
* The type of filter.
|
|
339
|
+
*/
|
|
340
|
+
export type TypeV3_50_0 = 'GROUNDING' | 'RELEVANCE';
|
|
341
|
+
/**
|
|
342
|
+
* The threshold for the filter as a floating point value between 0.0 - 1.0.
|
|
343
|
+
*/
|
|
344
|
+
export type ThresholdV3_50_0 = number;
|
|
317
345
|
/**
|
|
318
346
|
* Human-readable id for use in the UI
|
|
319
347
|
*/
|
|
@@ -321,12 +349,12 @@ export type WorkflowNameV3_50_0 = string;
|
|
|
321
349
|
/**
|
|
322
350
|
* machine-readable slug
|
|
323
351
|
*/
|
|
324
|
-
export type
|
|
352
|
+
export type NameV3_50_01 = string;
|
|
325
353
|
/**
|
|
326
354
|
* Human-readable id for use in the UI
|
|
327
355
|
*/
|
|
328
356
|
export type TitleV3_50_0 = string;
|
|
329
|
-
export type
|
|
357
|
+
export type DescriptionV3_50_01 = string;
|
|
330
358
|
/**
|
|
331
359
|
* Hex color code
|
|
332
360
|
*/
|
|
@@ -1489,6 +1517,7 @@ export interface ShapeSchemaAnyV3_50_0 {
|
|
|
1489
1517
|
}
|
|
1490
1518
|
export interface AIExperimentalV3_50_0 {
|
|
1491
1519
|
agents?: AgentMapV3_50_0;
|
|
1520
|
+
guards?: GuardMapV3_50_0;
|
|
1492
1521
|
}
|
|
1493
1522
|
export interface AgentMapV3_50_0 {
|
|
1494
1523
|
[k: string]: AgentJSONV3_50_0;
|
|
@@ -1505,6 +1534,7 @@ export interface AgentJSONV3_50_0 {
|
|
|
1505
1534
|
api: AgentAPIV3_50_0;
|
|
1506
1535
|
start: AgentStartV3_50_0;
|
|
1507
1536
|
states: AgentStatesV3_50_0;
|
|
1537
|
+
guards?: AgentGuardListV3_50_0;
|
|
1508
1538
|
}
|
|
1509
1539
|
export interface AgentAPIChatV3_50_0 {
|
|
1510
1540
|
type: 'chat';
|
|
@@ -1686,6 +1716,115 @@ export interface AgentExecutionChatV3_50_0 {
|
|
|
1686
1716
|
guardrails?: AgentGuardrailV3_50_0[];
|
|
1687
1717
|
options?: AgentGenerateOptionsV3_50_0;
|
|
1688
1718
|
}
|
|
1719
|
+
export interface AgentGuardV3_50_0 {
|
|
1720
|
+
guardId: string;
|
|
1721
|
+
}
|
|
1722
|
+
export interface GuardMapV3_50_0 {
|
|
1723
|
+
[k: string]: GuardJSONV3_50_0;
|
|
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 `GuardMapV3_50_0`'s JSON-Schema definition
|
|
1729
|
+
* via the `patternProperty` "^[0-9A-Za-z_]+$".
|
|
1730
|
+
*/
|
|
1731
|
+
export interface GuardJSONV3_50_0 {
|
|
1732
|
+
name: NameV3_50_0;
|
|
1733
|
+
description?: DescriptionV3_50_0;
|
|
1734
|
+
blockedInputMessaging?: BlockedInputMessagingV3_50_0;
|
|
1735
|
+
blockedOutputsMessaging?: BlockedOutputsMessagingV3_50_0;
|
|
1736
|
+
topicPolicyConfig?: TopicPolicyV3_50_0;
|
|
1737
|
+
contentPolicyConfig?: ContentPolicyV3_50_0;
|
|
1738
|
+
wordPolicyConfig?: WordPolicyV3_50_0;
|
|
1739
|
+
sensitiveInformationPolicyConfig?: SensitiveInformationPolicyV3_50_0;
|
|
1740
|
+
contextualGroundingPolicyConfig?: ContextualGroundingPolicyV3_50_0;
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* Topics to identify and block.
|
|
1744
|
+
*/
|
|
1745
|
+
export interface TopicPolicyV3_50_0 {
|
|
1746
|
+
topicsConfig?: TopicV3_50_0[];
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* A topic to block.
|
|
1750
|
+
*/
|
|
1751
|
+
export interface TopicV3_50_0 {
|
|
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 ContentPolicyV3_50_0 {
|
|
1761
|
+
filtersConfig?: FilterV3_50_0[];
|
|
1762
|
+
}
|
|
1763
|
+
/**
|
|
1764
|
+
* Types of content to filter.
|
|
1765
|
+
*/
|
|
1766
|
+
export interface FilterV3_50_0 {
|
|
1767
|
+
type?: 'HATE' | 'INSULTS' | 'MICONDUCT' | 'PROMPT_ATTACK' | 'SEXUAL' | 'VIOLENCE';
|
|
1768
|
+
inputStrength?: GuardrailFilterStrengthV3_50_0;
|
|
1769
|
+
outputStrength?: GuardrailFilterStrengthV3_50_0;
|
|
1770
|
+
inputModalities?: GuardrailModalityV3_50_0[];
|
|
1771
|
+
outputModalities?: GuardrailModalityV3_50_0[];
|
|
1772
|
+
}
|
|
1773
|
+
/**
|
|
1774
|
+
* Specific words to identify and block. The managedWordListsConfig is solely used for blocking profanity.
|
|
1775
|
+
*/
|
|
1776
|
+
export interface WordPolicyV3_50_0 {
|
|
1777
|
+
wordsConfig?: WordListV3_50_0[];
|
|
1778
|
+
managedWordListsConfig?: ManagedWordsV3_50_0[];
|
|
1779
|
+
}
|
|
1780
|
+
/**
|
|
1781
|
+
* Specific words to block.
|
|
1782
|
+
*/
|
|
1783
|
+
export interface WordListV3_50_0 {
|
|
1784
|
+
text?: string;
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* Managed word list to block. This is solely used for blocking profanity.
|
|
1788
|
+
*/
|
|
1789
|
+
export interface ManagedWordsV3_50_0 {
|
|
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 SensitiveInformationPolicyV3_50_0 {
|
|
1796
|
+
piiEntitiesConfig?: PIIEntityV3_50_0[];
|
|
1797
|
+
regexesConfig?: RegularExpressionV3_50_0[];
|
|
1798
|
+
}
|
|
1799
|
+
/**
|
|
1800
|
+
* PII entity to infer from the text.
|
|
1801
|
+
*/
|
|
1802
|
+
export interface PIIEntityV3_50_0 {
|
|
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?: GuardrailSensitiveInformationActionV3_50_0;
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* A regular expression to match sensitive information.
|
|
1808
|
+
*/
|
|
1809
|
+
export interface RegularExpressionV3_50_0 {
|
|
1810
|
+
name?: string;
|
|
1811
|
+
description?: string;
|
|
1812
|
+
pattern?: string;
|
|
1813
|
+
action?: GuardrailSensitiveInformationActionV3_50_0;
|
|
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 ContextualGroundingPolicyV3_50_0 {
|
|
1819
|
+
filtersConfig?: FilterV3_50_01[];
|
|
1820
|
+
}
|
|
1821
|
+
/**
|
|
1822
|
+
* Filter to evaluate grounding text.
|
|
1823
|
+
*/
|
|
1824
|
+
export interface FilterV3_50_01 {
|
|
1825
|
+
type?: TypeV3_50_0;
|
|
1826
|
+
threshold?: ThresholdV3_50_0;
|
|
1827
|
+
}
|
|
1689
1828
|
/**
|
|
1690
1829
|
* This interface was referenced by `ProjectSchemaJSONV3_50_0`'s JSON-Schema
|
|
1691
1830
|
* via the `definition` "formMap".
|
|
@@ -1745,9 +1884,9 @@ export interface WorkflowV3_50_0 {
|
|
|
1745
1884
|
* via the `definition` "workflowStep".
|
|
1746
1885
|
*/
|
|
1747
1886
|
export interface WorkflowStepV3_50_0 {
|
|
1748
|
-
name:
|
|
1887
|
+
name: NameV3_50_01;
|
|
1749
1888
|
title: TitleV3_50_0;
|
|
1750
|
-
description?:
|
|
1889
|
+
description?: DescriptionV3_50_01;
|
|
1751
1890
|
color: ColorV3_50_0;
|
|
1752
1891
|
live: LiveV3_50_0;
|
|
1753
1892
|
key: KeyV3_50_0;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export declare const CURRENT_SCHEMA_VERSION = "3.50.0";
|
|
2
2
|
export { default as anyProjectSchema } from './project-schema.json';
|
|
3
3
|
export { default as latestSchemaJson } from './project-schema/v3.50.0.json';
|
|
4
|
-
export { default as authSchemaJson } from './auth-schemas.json';
|
|
5
|
-
export { default as experimentalSchemaJson } from './project-schema/experimental.json';
|
|
6
4
|
export declare const allProjectSchemas: any[];
|
|
@@ -27,11 +27,16 @@ export type ValidateSyntaxOptions = {
|
|
|
27
27
|
resolveLayer?: ResolveLayer;
|
|
28
28
|
};
|
|
29
29
|
export type ResolveLayer = (layerId: string) => Promise<LayerState>;
|
|
30
|
+
export type EntitlementsOptions = {
|
|
31
|
+
ignoreEntitlements: true;
|
|
32
|
+
entitlements?: Entitlements;
|
|
33
|
+
} | {
|
|
34
|
+
ignoreEntitlements?: false;
|
|
35
|
+
entitlements: Entitlements;
|
|
36
|
+
};
|
|
30
37
|
export type ValidateContext = {
|
|
31
|
-
resolveLayer?: ResolveLayer;
|
|
32
38
|
allowDisconnectedLayers?: boolean;
|
|
33
|
-
|
|
34
|
-
} & ValidateSyntaxOptions;
|
|
39
|
+
} & EntitlementsOptions & ValidateSyntaxOptions;
|
|
35
40
|
export type ValidateReferencesContext = SetRequired<ValidateContext, 'resolveLayer'>;
|
|
36
41
|
export declare function validateSchemaSyntax(obj: unknown, options?: ValidateSyntaxOptions): SchemaValidationResult;
|
|
37
42
|
/**
|