@contractspec/example.locale-jurisdiction-gate 3.7.17 → 3.7.19
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/.turbo/turbo-build.log +66 -66
- package/CHANGELOG.md +17 -0
- package/dist/browser/docs/index.js +3 -27
- package/dist/browser/docs/locale-jurisdiction-gate.docblock.js +3 -27
- package/dist/browser/entities/index.js +1 -110
- package/dist/browser/entities/models.js +1 -110
- package/dist/browser/events.js +1 -73
- package/dist/browser/example.js +1 -35
- package/dist/browser/forms/assistant-context.form.js +1 -213
- package/dist/browser/forms/index.js +1 -213
- package/dist/browser/handlers/demo.handlers.js +2 -152
- package/dist/browser/handlers/index.js +2 -152
- package/dist/browser/index.js +4 -844
- package/dist/browser/locale-jurisdiction-gate.feature.js +1 -105
- package/dist/browser/operations/assistant.js +1 -192
- package/dist/browser/operations/index.js +1 -192
- package/dist/browser/policy/assistant-gate.policy.js +1 -62
- package/dist/browser/policy/guard.js +2 -73
- package/dist/browser/policy/index.js +2 -134
- package/dist/browser/translations/assistant-gate.en-GB.translation.js +1 -48
- package/dist/browser/translations/assistant-gate.en-US.translation.js +1 -50
- package/dist/browser/translations/assistant-gate.fr-FR.translation.js +1 -52
- package/dist/browser/translations/index.js +1 -148
- package/dist/docs/index.js +3 -27
- package/dist/docs/locale-jurisdiction-gate.docblock.js +3 -27
- package/dist/entities/index.js +1 -110
- package/dist/entities/models.js +1 -110
- package/dist/events.js +1 -73
- package/dist/example.js +1 -35
- package/dist/forms/assistant-context.form.js +1 -213
- package/dist/forms/index.js +1 -213
- package/dist/handlers/demo.handlers.js +2 -152
- package/dist/handlers/index.js +2 -152
- package/dist/index.js +4 -844
- package/dist/locale-jurisdiction-gate.feature.js +1 -105
- package/dist/node/docs/index.js +3 -27
- package/dist/node/docs/locale-jurisdiction-gate.docblock.js +3 -27
- package/dist/node/entities/index.js +1 -110
- package/dist/node/entities/models.js +1 -110
- package/dist/node/events.js +1 -73
- package/dist/node/example.js +1 -35
- package/dist/node/forms/assistant-context.form.js +1 -213
- package/dist/node/forms/index.js +1 -213
- package/dist/node/handlers/demo.handlers.js +2 -152
- package/dist/node/handlers/index.js +2 -152
- package/dist/node/index.js +4 -844
- package/dist/node/locale-jurisdiction-gate.feature.js +1 -105
- package/dist/node/operations/assistant.js +1 -192
- package/dist/node/operations/index.js +1 -192
- package/dist/node/policy/assistant-gate.policy.js +1 -62
- package/dist/node/policy/guard.js +2 -73
- package/dist/node/policy/index.js +2 -134
- package/dist/node/translations/assistant-gate.en-GB.translation.js +1 -48
- package/dist/node/translations/assistant-gate.en-US.translation.js +1 -50
- package/dist/node/translations/assistant-gate.fr-FR.translation.js +1 -52
- package/dist/node/translations/index.js +1 -148
- package/dist/operations/assistant.js +1 -192
- package/dist/operations/index.js +1 -192
- package/dist/policy/assistant-gate.policy.js +1 -62
- package/dist/policy/guard.js +2 -73
- package/dist/policy/index.js +2 -134
- package/dist/translations/assistant-gate.en-GB.translation.js +1 -48
- package/dist/translations/assistant-gate.en-US.translation.js +1 -50
- package/dist/translations/assistant-gate.fr-FR.translation.js +1 -52
- package/dist/translations/index.js +1 -148
- package/package.json +5 -5
package/dist/entities/index.js
CHANGED
|
@@ -1,111 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
defineEnum,
|
|
5
|
-
defineSchemaModel,
|
|
6
|
-
ScalarTypeEnum
|
|
7
|
-
} from "@contractspec/lib.schema";
|
|
8
|
-
var AllowedScopeEnum = defineEnum("AllowedScope", [
|
|
9
|
-
"education_only",
|
|
10
|
-
"generic_info",
|
|
11
|
-
"escalation_required"
|
|
12
|
-
]);
|
|
13
|
-
var UserProfileModel = defineSchemaModel({
|
|
14
|
-
name: "UserProfile",
|
|
15
|
-
description: "User profile inputs used to derive regulatory context.",
|
|
16
|
-
fields: {
|
|
17
|
-
preferredLocale: {
|
|
18
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
-
isOptional: true
|
|
20
|
-
},
|
|
21
|
-
residencyCountry: {
|
|
22
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
23
|
-
isOptional: true
|
|
24
|
-
},
|
|
25
|
-
taxResidenceCountry: {
|
|
26
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
-
isOptional: true
|
|
28
|
-
},
|
|
29
|
-
clientType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var RegulatoryContextModel = defineSchemaModel({
|
|
33
|
-
name: "RegulatoryContext",
|
|
34
|
-
description: "Explicit regulatory context (no guessing).",
|
|
35
|
-
fields: {
|
|
36
|
-
jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
37
|
-
region: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
38
|
-
clientType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
39
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false }
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var LLMCallEnvelopeModel = defineSchemaModel({
|
|
43
|
-
name: "LLMCallEnvelope",
|
|
44
|
-
description: "Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.",
|
|
45
|
-
fields: {
|
|
46
|
-
traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
47
|
-
locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
48
|
-
regulatoryContext: { type: RegulatoryContextModel, isOptional: false },
|
|
49
|
-
kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
50
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false }
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
var AssistantCitationModel = defineSchemaModel({
|
|
54
|
-
name: "AssistantCitation",
|
|
55
|
-
description: "Citation referencing a KB snapshot + a specific item within it.",
|
|
56
|
-
fields: {
|
|
57
|
-
kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
58
|
-
sourceType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
59
|
-
sourceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
60
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
61
|
-
excerpt: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
var AssistantAnswerSectionModel = defineSchemaModel({
|
|
65
|
-
name: "AssistantAnswerSection",
|
|
66
|
-
description: "Structured answer section.",
|
|
67
|
-
fields: {
|
|
68
|
-
heading: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
69
|
-
body: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
var AssistantAnswerIRModel = defineSchemaModel({
|
|
73
|
-
name: "AssistantAnswerIR",
|
|
74
|
-
description: "Structured assistant answer with mandatory citations and explicit locale/jurisdiction.",
|
|
75
|
-
fields: {
|
|
76
|
-
locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
77
|
-
jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
78
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false },
|
|
79
|
-
sections: {
|
|
80
|
-
type: AssistantAnswerSectionModel,
|
|
81
|
-
isArray: true,
|
|
82
|
-
isOptional: false
|
|
83
|
-
},
|
|
84
|
-
citations: {
|
|
85
|
-
type: AssistantCitationModel,
|
|
86
|
-
isArray: true,
|
|
87
|
-
isOptional: false
|
|
88
|
-
},
|
|
89
|
-
disclaimers: {
|
|
90
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
-
isArray: true,
|
|
92
|
-
isOptional: true
|
|
93
|
-
},
|
|
94
|
-
riskFlags: {
|
|
95
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
96
|
-
isArray: true,
|
|
97
|
-
isOptional: true
|
|
98
|
-
},
|
|
99
|
-
refused: { type: ScalarTypeEnum.Boolean(), isOptional: true },
|
|
100
|
-
refusalReason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
export {
|
|
104
|
-
UserProfileModel,
|
|
105
|
-
RegulatoryContextModel,
|
|
106
|
-
LLMCallEnvelopeModel,
|
|
107
|
-
AssistantCitationModel,
|
|
108
|
-
AssistantAnswerSectionModel,
|
|
109
|
-
AssistantAnswerIRModel,
|
|
110
|
-
AllowedScopeEnum
|
|
111
|
-
};
|
|
2
|
+
import{defineEnum as n,defineSchemaModel as t,ScalarTypeEnum as e}from"@contractspec/lib.schema";var i=n("AllowedScope",["education_only","generic_info","escalation_required"]),l=t({name:"UserProfile",description:"User profile inputs used to derive regulatory context.",fields:{preferredLocale:{type:e.String_unsecure(),isOptional:!0},residencyCountry:{type:e.String_unsecure(),isOptional:!0},taxResidenceCountry:{type:e.String_unsecure(),isOptional:!0},clientType:{type:e.String_unsecure(),isOptional:!0}}}),s=t({name:"RegulatoryContext",description:"Explicit regulatory context (no guessing).",fields:{jurisdiction:{type:e.String_unsecure(),isOptional:!1},region:{type:e.String_unsecure(),isOptional:!0},clientType:{type:e.String_unsecure(),isOptional:!0},allowedScope:{type:i,isOptional:!1}}}),p=t({name:"LLMCallEnvelope",description:"Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.",fields:{traceId:{type:e.String_unsecure(),isOptional:!1},locale:{type:e.String_unsecure(),isOptional:!1},regulatoryContext:{type:s,isOptional:!1},kbSnapshotId:{type:e.String_unsecure(),isOptional:!1},allowedScope:{type:i,isOptional:!1}}}),r=t({name:"AssistantCitation",description:"Citation referencing a KB snapshot + a specific item within it.",fields:{kbSnapshotId:{type:e.String_unsecure(),isOptional:!1},sourceType:{type:e.String_unsecure(),isOptional:!1},sourceId:{type:e.String_unsecure(),isOptional:!1},title:{type:e.String_unsecure(),isOptional:!0},excerpt:{type:e.String_unsecure(),isOptional:!0}}}),o=t({name:"AssistantAnswerSection",description:"Structured answer section.",fields:{heading:{type:e.String_unsecure(),isOptional:!1},body:{type:e.String_unsecure(),isOptional:!1}}}),u=t({name:"AssistantAnswerIR",description:"Structured assistant answer with mandatory citations and explicit locale/jurisdiction.",fields:{locale:{type:e.String_unsecure(),isOptional:!1},jurisdiction:{type:e.String_unsecure(),isOptional:!1},allowedScope:{type:i,isOptional:!1},sections:{type:o,isArray:!0,isOptional:!1},citations:{type:r,isArray:!0,isOptional:!1},disclaimers:{type:e.String_unsecure(),isArray:!0,isOptional:!0},riskFlags:{type:e.String_unsecure(),isArray:!0,isOptional:!0},refused:{type:e.Boolean(),isOptional:!0},refusalReason:{type:e.String_unsecure(),isOptional:!0}}});export{l as UserProfileModel,s as RegulatoryContextModel,p as LLMCallEnvelopeModel,r as AssistantCitationModel,o as AssistantAnswerSectionModel,u as AssistantAnswerIRModel,i as AllowedScopeEnum};
|
package/dist/entities/models.js
CHANGED
|
@@ -1,111 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
defineEnum,
|
|
5
|
-
defineSchemaModel,
|
|
6
|
-
ScalarTypeEnum
|
|
7
|
-
} from "@contractspec/lib.schema";
|
|
8
|
-
var AllowedScopeEnum = defineEnum("AllowedScope", [
|
|
9
|
-
"education_only",
|
|
10
|
-
"generic_info",
|
|
11
|
-
"escalation_required"
|
|
12
|
-
]);
|
|
13
|
-
var UserProfileModel = defineSchemaModel({
|
|
14
|
-
name: "UserProfile",
|
|
15
|
-
description: "User profile inputs used to derive regulatory context.",
|
|
16
|
-
fields: {
|
|
17
|
-
preferredLocale: {
|
|
18
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
-
isOptional: true
|
|
20
|
-
},
|
|
21
|
-
residencyCountry: {
|
|
22
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
23
|
-
isOptional: true
|
|
24
|
-
},
|
|
25
|
-
taxResidenceCountry: {
|
|
26
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
-
isOptional: true
|
|
28
|
-
},
|
|
29
|
-
clientType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var RegulatoryContextModel = defineSchemaModel({
|
|
33
|
-
name: "RegulatoryContext",
|
|
34
|
-
description: "Explicit regulatory context (no guessing).",
|
|
35
|
-
fields: {
|
|
36
|
-
jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
37
|
-
region: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
38
|
-
clientType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
39
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false }
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var LLMCallEnvelopeModel = defineSchemaModel({
|
|
43
|
-
name: "LLMCallEnvelope",
|
|
44
|
-
description: "Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.",
|
|
45
|
-
fields: {
|
|
46
|
-
traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
47
|
-
locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
48
|
-
regulatoryContext: { type: RegulatoryContextModel, isOptional: false },
|
|
49
|
-
kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
50
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false }
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
var AssistantCitationModel = defineSchemaModel({
|
|
54
|
-
name: "AssistantCitation",
|
|
55
|
-
description: "Citation referencing a KB snapshot + a specific item within it.",
|
|
56
|
-
fields: {
|
|
57
|
-
kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
58
|
-
sourceType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
59
|
-
sourceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
60
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
61
|
-
excerpt: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
var AssistantAnswerSectionModel = defineSchemaModel({
|
|
65
|
-
name: "AssistantAnswerSection",
|
|
66
|
-
description: "Structured answer section.",
|
|
67
|
-
fields: {
|
|
68
|
-
heading: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
69
|
-
body: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
var AssistantAnswerIRModel = defineSchemaModel({
|
|
73
|
-
name: "AssistantAnswerIR",
|
|
74
|
-
description: "Structured assistant answer with mandatory citations and explicit locale/jurisdiction.",
|
|
75
|
-
fields: {
|
|
76
|
-
locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
77
|
-
jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
78
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false },
|
|
79
|
-
sections: {
|
|
80
|
-
type: AssistantAnswerSectionModel,
|
|
81
|
-
isArray: true,
|
|
82
|
-
isOptional: false
|
|
83
|
-
},
|
|
84
|
-
citations: {
|
|
85
|
-
type: AssistantCitationModel,
|
|
86
|
-
isArray: true,
|
|
87
|
-
isOptional: false
|
|
88
|
-
},
|
|
89
|
-
disclaimers: {
|
|
90
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
-
isArray: true,
|
|
92
|
-
isOptional: true
|
|
93
|
-
},
|
|
94
|
-
riskFlags: {
|
|
95
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
96
|
-
isArray: true,
|
|
97
|
-
isOptional: true
|
|
98
|
-
},
|
|
99
|
-
refused: { type: ScalarTypeEnum.Boolean(), isOptional: true },
|
|
100
|
-
refusalReason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
export {
|
|
104
|
-
UserProfileModel,
|
|
105
|
-
RegulatoryContextModel,
|
|
106
|
-
LLMCallEnvelopeModel,
|
|
107
|
-
AssistantCitationModel,
|
|
108
|
-
AssistantAnswerSectionModel,
|
|
109
|
-
AssistantAnswerIRModel,
|
|
110
|
-
AllowedScopeEnum
|
|
111
|
-
};
|
|
2
|
+
import{defineEnum as n,defineSchemaModel as t,ScalarTypeEnum as e}from"@contractspec/lib.schema";var i=n("AllowedScope",["education_only","generic_info","escalation_required"]),l=t({name:"UserProfile",description:"User profile inputs used to derive regulatory context.",fields:{preferredLocale:{type:e.String_unsecure(),isOptional:!0},residencyCountry:{type:e.String_unsecure(),isOptional:!0},taxResidenceCountry:{type:e.String_unsecure(),isOptional:!0},clientType:{type:e.String_unsecure(),isOptional:!0}}}),s=t({name:"RegulatoryContext",description:"Explicit regulatory context (no guessing).",fields:{jurisdiction:{type:e.String_unsecure(),isOptional:!1},region:{type:e.String_unsecure(),isOptional:!0},clientType:{type:e.String_unsecure(),isOptional:!0},allowedScope:{type:i,isOptional:!1}}}),p=t({name:"LLMCallEnvelope",description:"Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.",fields:{traceId:{type:e.String_unsecure(),isOptional:!1},locale:{type:e.String_unsecure(),isOptional:!1},regulatoryContext:{type:s,isOptional:!1},kbSnapshotId:{type:e.String_unsecure(),isOptional:!1},allowedScope:{type:i,isOptional:!1}}}),r=t({name:"AssistantCitation",description:"Citation referencing a KB snapshot + a specific item within it.",fields:{kbSnapshotId:{type:e.String_unsecure(),isOptional:!1},sourceType:{type:e.String_unsecure(),isOptional:!1},sourceId:{type:e.String_unsecure(),isOptional:!1},title:{type:e.String_unsecure(),isOptional:!0},excerpt:{type:e.String_unsecure(),isOptional:!0}}}),o=t({name:"AssistantAnswerSection",description:"Structured answer section.",fields:{heading:{type:e.String_unsecure(),isOptional:!1},body:{type:e.String_unsecure(),isOptional:!1}}}),u=t({name:"AssistantAnswerIR",description:"Structured assistant answer with mandatory citations and explicit locale/jurisdiction.",fields:{locale:{type:e.String_unsecure(),isOptional:!1},jurisdiction:{type:e.String_unsecure(),isOptional:!1},allowedScope:{type:i,isOptional:!1},sections:{type:o,isArray:!0,isOptional:!1},citations:{type:r,isArray:!0,isOptional:!1},disclaimers:{type:e.String_unsecure(),isArray:!0,isOptional:!0},riskFlags:{type:e.String_unsecure(),isArray:!0,isOptional:!0},refused:{type:e.Boolean(),isOptional:!0},refusalReason:{type:e.String_unsecure(),isOptional:!0}}});export{l as UserProfileModel,s as RegulatoryContextModel,p as LLMCallEnvelopeModel,r as AssistantCitationModel,o as AssistantAnswerSectionModel,u as AssistantAnswerIRModel,i as AllowedScopeEnum};
|
package/dist/events.js
CHANGED
|
@@ -1,74 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import { defineEvent } from "@contractspec/lib.contracts-spec";
|
|
4
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
5
|
-
var AssistantAnswerRequestedPayload = defineSchemaModel({
|
|
6
|
-
name: "AssistantAnswerRequestedPayload",
|
|
7
|
-
description: "Emitted when an assistant answer is requested (pre-gate).",
|
|
8
|
-
fields: {
|
|
9
|
-
traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
-
locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
-
jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
-
kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
13
|
-
allowedScope: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
var AssistantAnswerRequestedEvent = defineEvent({
|
|
17
|
-
meta: {
|
|
18
|
-
key: "assistant.answer.requested",
|
|
19
|
-
version: "1.0.0",
|
|
20
|
-
description: "Assistant answer requested (policy gate will run).",
|
|
21
|
-
stability: "experimental",
|
|
22
|
-
owners: ["@examples"],
|
|
23
|
-
tags: ["assistant", "policy"]
|
|
24
|
-
},
|
|
25
|
-
payload: AssistantAnswerRequestedPayload
|
|
26
|
-
});
|
|
27
|
-
var AssistantAnswerBlockedPayload = defineSchemaModel({
|
|
28
|
-
name: "AssistantAnswerBlockedPayload",
|
|
29
|
-
description: "Emitted when a request is blocked by the gate.",
|
|
30
|
-
fields: {
|
|
31
|
-
traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
32
|
-
reasonCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
33
|
-
reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
var AssistantAnswerBlockedEvent = defineEvent({
|
|
37
|
-
meta: {
|
|
38
|
-
key: "assistant.answer.blocked",
|
|
39
|
-
version: "1.0.0",
|
|
40
|
-
description: "Assistant answer blocked (fail-closed).",
|
|
41
|
-
stability: "experimental",
|
|
42
|
-
owners: ["@examples"],
|
|
43
|
-
tags: ["assistant", "policy", "blocked"]
|
|
44
|
-
},
|
|
45
|
-
payload: AssistantAnswerBlockedPayload
|
|
46
|
-
});
|
|
47
|
-
var AssistantAnswerDeliveredPayload = defineSchemaModel({
|
|
48
|
-
name: "AssistantAnswerDeliveredPayload",
|
|
49
|
-
description: "Emitted when a structured, cited answer is delivered.",
|
|
50
|
-
fields: {
|
|
51
|
-
traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
52
|
-
locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
53
|
-
jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
54
|
-
kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
55
|
-
allowedScope: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
56
|
-
citationsCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false }
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
var AssistantAnswerDeliveredEvent = defineEvent({
|
|
60
|
-
meta: {
|
|
61
|
-
key: "assistant.answer.delivered",
|
|
62
|
-
version: "1.0.0",
|
|
63
|
-
description: "Assistant answer delivered (must include KB snapshot citations).",
|
|
64
|
-
stability: "experimental",
|
|
65
|
-
owners: ["@examples"],
|
|
66
|
-
tags: ["assistant", "policy", "delivered"]
|
|
67
|
-
},
|
|
68
|
-
payload: AssistantAnswerDeliveredPayload
|
|
69
|
-
});
|
|
70
|
-
export {
|
|
71
|
-
AssistantAnswerRequestedEvent,
|
|
72
|
-
AssistantAnswerDeliveredEvent,
|
|
73
|
-
AssistantAnswerBlockedEvent
|
|
74
|
-
};
|
|
2
|
+
import{defineEvent as j}from"@contractspec/lib.contracts-spec";import{defineSchemaModel as x,ScalarTypeEnum as g}from"@contractspec/lib.schema";var z=x({name:"AssistantAnswerRequestedPayload",description:"Emitted when an assistant answer is requested (pre-gate).",fields:{traceId:{type:g.String_unsecure(),isOptional:!1},locale:{type:g.String_unsecure(),isOptional:!1},jurisdiction:{type:g.String_unsecure(),isOptional:!1},kbSnapshotId:{type:g.String_unsecure(),isOptional:!1},allowedScope:{type:g.String_unsecure(),isOptional:!1}}}),I=j({meta:{key:"assistant.answer.requested",version:"1.0.0",description:"Assistant answer requested (policy gate will run).",stability:"experimental",owners:["@examples"],tags:["assistant","policy"]},payload:z}),C=x({name:"AssistantAnswerBlockedPayload",description:"Emitted when a request is blocked by the gate.",fields:{traceId:{type:g.String_unsecure(),isOptional:!1},reasonCode:{type:g.String_unsecure(),isOptional:!1},reason:{type:g.String_unsecure(),isOptional:!1}}}),J=j({meta:{key:"assistant.answer.blocked",version:"1.0.0",description:"Assistant answer blocked (fail-closed).",stability:"experimental",owners:["@examples"],tags:["assistant","policy","blocked"]},payload:C}),F=x({name:"AssistantAnswerDeliveredPayload",description:"Emitted when a structured, cited answer is delivered.",fields:{traceId:{type:g.String_unsecure(),isOptional:!1},locale:{type:g.String_unsecure(),isOptional:!1},jurisdiction:{type:g.String_unsecure(),isOptional:!1},kbSnapshotId:{type:g.String_unsecure(),isOptional:!1},allowedScope:{type:g.String_unsecure(),isOptional:!1},citationsCount:{type:g.Int_unsecure(),isOptional:!1}}}),K=j({meta:{key:"assistant.answer.delivered",version:"1.0.0",description:"Assistant answer delivered (must include KB snapshot citations).",stability:"experimental",owners:["@examples"],tags:["assistant","policy","delivered"]},payload:F});export{I as AssistantAnswerRequestedEvent,K as AssistantAnswerDeliveredEvent,J as AssistantAnswerBlockedEvent};
|
package/dist/example.js
CHANGED
|
@@ -1,36 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import { defineExample } from "@contractspec/lib.contracts-spec";
|
|
4
|
-
var example = defineExample({
|
|
5
|
-
meta: {
|
|
6
|
-
key: "locale-jurisdiction-gate",
|
|
7
|
-
version: "1.0.0",
|
|
8
|
-
title: "Locale / Jurisdiction Gate",
|
|
9
|
-
description: "Fail-closed gating for assistant calls: locale + jurisdiction + kbSnapshotId + allowedScope must be explicit, answers must cite a snapshot.",
|
|
10
|
-
kind: "knowledge",
|
|
11
|
-
visibility: "public",
|
|
12
|
-
stability: "experimental",
|
|
13
|
-
owners: ["@platform.core"],
|
|
14
|
-
tags: ["policy", "locale", "jurisdiction", "assistant", "gating"]
|
|
15
|
-
},
|
|
16
|
-
docs: {
|
|
17
|
-
rootDocId: "docs.examples.locale-jurisdiction-gate"
|
|
18
|
-
},
|
|
19
|
-
entrypoints: {
|
|
20
|
-
packageName: "@contractspec/example.locale-jurisdiction-gate",
|
|
21
|
-
feature: "./feature",
|
|
22
|
-
contracts: "./contracts",
|
|
23
|
-
handlers: "./handlers",
|
|
24
|
-
docs: "./docs"
|
|
25
|
-
},
|
|
26
|
-
surfaces: {
|
|
27
|
-
templates: true,
|
|
28
|
-
sandbox: { enabled: true, modes: ["markdown", "specs"] },
|
|
29
|
-
studio: { enabled: true, installable: true },
|
|
30
|
-
mcp: { enabled: true }
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
var example_default = example;
|
|
34
|
-
export {
|
|
35
|
-
example_default as default
|
|
36
|
-
};
|
|
2
|
+
import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"locale-jurisdiction-gate",version:"1.0.0",title:"Locale / Jurisdiction Gate",description:"Fail-closed gating for assistant calls: locale + jurisdiction + kbSnapshotId + allowedScope must be explicit, answers must cite a snapshot.",kind:"knowledge",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["policy","locale","jurisdiction","assistant","gating"]},docs:{rootDocId:"docs.examples.locale-jurisdiction-gate"},entrypoints:{packageName:"@contractspec/example.locale-jurisdiction-gate",feature:"./feature",contracts:"./contracts",handlers:"./handlers",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown","specs"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
|
|
@@ -1,214 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
defineEnum,
|
|
5
|
-
defineSchemaModel,
|
|
6
|
-
ScalarTypeEnum
|
|
7
|
-
} from "@contractspec/lib.schema";
|
|
8
|
-
var AllowedScopeEnum = defineEnum("AllowedScope", [
|
|
9
|
-
"education_only",
|
|
10
|
-
"generic_info",
|
|
11
|
-
"escalation_required"
|
|
12
|
-
]);
|
|
13
|
-
var UserProfileModel = defineSchemaModel({
|
|
14
|
-
name: "UserProfile",
|
|
15
|
-
description: "User profile inputs used to derive regulatory context.",
|
|
16
|
-
fields: {
|
|
17
|
-
preferredLocale: {
|
|
18
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
-
isOptional: true
|
|
20
|
-
},
|
|
21
|
-
residencyCountry: {
|
|
22
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
23
|
-
isOptional: true
|
|
24
|
-
},
|
|
25
|
-
taxResidenceCountry: {
|
|
26
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
-
isOptional: true
|
|
28
|
-
},
|
|
29
|
-
clientType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var RegulatoryContextModel = defineSchemaModel({
|
|
33
|
-
name: "RegulatoryContext",
|
|
34
|
-
description: "Explicit regulatory context (no guessing).",
|
|
35
|
-
fields: {
|
|
36
|
-
jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
37
|
-
region: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
38
|
-
clientType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
39
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false }
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var LLMCallEnvelopeModel = defineSchemaModel({
|
|
43
|
-
name: "LLMCallEnvelope",
|
|
44
|
-
description: "Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.",
|
|
45
|
-
fields: {
|
|
46
|
-
traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
47
|
-
locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
48
|
-
regulatoryContext: { type: RegulatoryContextModel, isOptional: false },
|
|
49
|
-
kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
50
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false }
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
var AssistantCitationModel = defineSchemaModel({
|
|
54
|
-
name: "AssistantCitation",
|
|
55
|
-
description: "Citation referencing a KB snapshot + a specific item within it.",
|
|
56
|
-
fields: {
|
|
57
|
-
kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
58
|
-
sourceType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
59
|
-
sourceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
60
|
-
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
61
|
-
excerpt: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
var AssistantAnswerSectionModel = defineSchemaModel({
|
|
65
|
-
name: "AssistantAnswerSection",
|
|
66
|
-
description: "Structured answer section.",
|
|
67
|
-
fields: {
|
|
68
|
-
heading: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
69
|
-
body: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
var AssistantAnswerIRModel = defineSchemaModel({
|
|
73
|
-
name: "AssistantAnswerIR",
|
|
74
|
-
description: "Structured assistant answer with mandatory citations and explicit locale/jurisdiction.",
|
|
75
|
-
fields: {
|
|
76
|
-
locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
77
|
-
jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
78
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false },
|
|
79
|
-
sections: {
|
|
80
|
-
type: AssistantAnswerSectionModel,
|
|
81
|
-
isArray: true,
|
|
82
|
-
isOptional: false
|
|
83
|
-
},
|
|
84
|
-
citations: {
|
|
85
|
-
type: AssistantCitationModel,
|
|
86
|
-
isArray: true,
|
|
87
|
-
isOptional: false
|
|
88
|
-
},
|
|
89
|
-
disclaimers: {
|
|
90
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
-
isArray: true,
|
|
92
|
-
isOptional: true
|
|
93
|
-
},
|
|
94
|
-
riskFlags: {
|
|
95
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
96
|
-
isArray: true,
|
|
97
|
-
isOptional: true
|
|
98
|
-
},
|
|
99
|
-
refused: { type: ScalarTypeEnum.Boolean(), isOptional: true },
|
|
100
|
-
refusalReason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// src/forms/assistant-context.form.ts
|
|
105
|
-
import { defineFormSpec } from "@contractspec/lib.contracts-spec/forms";
|
|
106
|
-
import {
|
|
107
|
-
OwnersEnum,
|
|
108
|
-
StabilityEnum,
|
|
109
|
-
TagsEnum
|
|
110
|
-
} from "@contractspec/lib.contracts-spec/ownership";
|
|
111
|
-
import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
|
|
112
|
-
var AssistantContextFormModel = defineSchemaModel2({
|
|
113
|
-
name: "AssistantContextFormModel",
|
|
114
|
-
description: "Form values required before a policy-gated assistant request can be executed.",
|
|
115
|
-
fields: {
|
|
116
|
-
locale: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
117
|
-
jurisdiction: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
118
|
-
kbSnapshotId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
119
|
-
allowedScope: { type: AllowedScopeEnum, isOptional: false },
|
|
120
|
-
question: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false }
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
var AssistantContextForm = defineFormSpec({
|
|
124
|
-
meta: {
|
|
125
|
-
key: "locale-jurisdiction-gate.form.assistant-context",
|
|
126
|
-
version: "1.0.0",
|
|
127
|
-
title: "Assistant Context Gate",
|
|
128
|
-
description: "Collects the explicit locale, jurisdiction, scope, and knowledge snapshot required by the assistant gate.",
|
|
129
|
-
domain: "assistant",
|
|
130
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
131
|
-
tags: [TagsEnum.I18n, "assistant", "form", "policy"],
|
|
132
|
-
stability: StabilityEnum.Experimental
|
|
133
|
-
},
|
|
134
|
-
model: AssistantContextFormModel,
|
|
135
|
-
fields: [
|
|
136
|
-
{
|
|
137
|
-
kind: "select",
|
|
138
|
-
name: "locale",
|
|
139
|
-
labelI18n: "assistantGate.locale.label",
|
|
140
|
-
descriptionI18n: "assistantGate.locale.description",
|
|
141
|
-
options: {
|
|
142
|
-
kind: "static",
|
|
143
|
-
options: [
|
|
144
|
-
{ labelI18n: "assistantGate.locale.enUs", value: "en-US" },
|
|
145
|
-
{ labelI18n: "assistantGate.locale.enGb", value: "en-GB" },
|
|
146
|
-
{ labelI18n: "assistantGate.locale.frFr", value: "fr-FR" }
|
|
147
|
-
]
|
|
148
|
-
},
|
|
149
|
-
required: true
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
kind: "text",
|
|
153
|
-
name: "jurisdiction",
|
|
154
|
-
labelI18n: "assistantGate.jurisdiction.label",
|
|
155
|
-
placeholderI18n: "assistantGate.jurisdiction.placeholder",
|
|
156
|
-
required: true
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
kind: "text",
|
|
160
|
-
name: "kbSnapshotId",
|
|
161
|
-
labelI18n: "assistantGate.kbSnapshotId.label",
|
|
162
|
-
placeholderI18n: "assistantGate.kbSnapshotId.placeholder",
|
|
163
|
-
required: true
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
kind: "radio",
|
|
167
|
-
name: "allowedScope",
|
|
168
|
-
labelI18n: "assistantGate.allowedScope.label",
|
|
169
|
-
options: {
|
|
170
|
-
kind: "static",
|
|
171
|
-
options: [
|
|
172
|
-
{
|
|
173
|
-
labelI18n: "assistantGate.allowedScope.educationOnly",
|
|
174
|
-
value: "education_only"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
labelI18n: "assistantGate.allowedScope.genericInfo",
|
|
178
|
-
value: "generic_info"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
labelI18n: "assistantGate.allowedScope.escalationRequired",
|
|
182
|
-
value: "escalation_required"
|
|
183
|
-
}
|
|
184
|
-
]
|
|
185
|
-
},
|
|
186
|
-
required: true
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
kind: "textarea",
|
|
190
|
-
name: "question",
|
|
191
|
-
labelI18n: "assistantGate.question.label",
|
|
192
|
-
placeholderI18n: "assistantGate.question.placeholder",
|
|
193
|
-
required: true
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
actions: [
|
|
197
|
-
{
|
|
198
|
-
key: "submit",
|
|
199
|
-
labelI18n: "assistantGate.submit.label",
|
|
200
|
-
op: { name: "assistant.answer", version: "1.0.0" }
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
policy: {
|
|
204
|
-
flags: [],
|
|
205
|
-
pii: ["kbSnapshotId", "question"]
|
|
206
|
-
},
|
|
207
|
-
renderHints: {
|
|
208
|
-
ui: "custom",
|
|
209
|
-
form: "react-hook-form"
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
export {
|
|
213
|
-
AssistantContextForm
|
|
214
|
-
};
|
|
2
|
+
import{defineEnum as s,defineSchemaModel as t,ScalarTypeEnum as e}from"@contractspec/lib.schema";var i=s("AllowedScope",["education_only","generic_info","escalation_required"]),g=t({name:"UserProfile",description:"User profile inputs used to derive regulatory context.",fields:{preferredLocale:{type:e.String_unsecure(),isOptional:!0},residencyCountry:{type:e.String_unsecure(),isOptional:!0},taxResidenceCountry:{type:e.String_unsecure(),isOptional:!0},clientType:{type:e.String_unsecure(),isOptional:!0}}}),r=t({name:"RegulatoryContext",description:"Explicit regulatory context (no guessing).",fields:{jurisdiction:{type:e.String_unsecure(),isOptional:!1},region:{type:e.String_unsecure(),isOptional:!0},clientType:{type:e.String_unsecure(),isOptional:!0},allowedScope:{type:i,isOptional:!1}}}),O=t({name:"LLMCallEnvelope",description:"Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.",fields:{traceId:{type:e.String_unsecure(),isOptional:!1},locale:{type:e.String_unsecure(),isOptional:!1},regulatoryContext:{type:r,isOptional:!1},kbSnapshotId:{type:e.String_unsecure(),isOptional:!1},allowedScope:{type:i,isOptional:!1}}}),o=t({name:"AssistantCitation",description:"Citation referencing a KB snapshot + a specific item within it.",fields:{kbSnapshotId:{type:e.String_unsecure(),isOptional:!1},sourceType:{type:e.String_unsecure(),isOptional:!1},sourceId:{type:e.String_unsecure(),isOptional:!1},title:{type:e.String_unsecure(),isOptional:!0},excerpt:{type:e.String_unsecure(),isOptional:!0}}}),a=t({name:"AssistantAnswerSection",description:"Structured answer section.",fields:{heading:{type:e.String_unsecure(),isOptional:!1},body:{type:e.String_unsecure(),isOptional:!1}}}),S=t({name:"AssistantAnswerIR",description:"Structured assistant answer with mandatory citations and explicit locale/jurisdiction.",fields:{locale:{type:e.String_unsecure(),isOptional:!1},jurisdiction:{type:e.String_unsecure(),isOptional:!1},allowedScope:{type:i,isOptional:!1},sections:{type:a,isArray:!0,isOptional:!1},citations:{type:o,isArray:!0,isOptional:!1},disclaimers:{type:e.String_unsecure(),isArray:!0,isOptional:!0},riskFlags:{type:e.String_unsecure(),isArray:!0,isOptional:!0},refused:{type:e.Boolean(),isOptional:!0},refusalReason:{type:e.String_unsecure(),isOptional:!0}}});import{defineFormSpec as l}from"@contractspec/lib.contracts-spec/forms";import{OwnersEnum as p,StabilityEnum as u,TagsEnum as c}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as d,ScalarTypeEnum as n}from"@contractspec/lib.schema";var y=d({name:"AssistantContextFormModel",description:"Form values required before a policy-gated assistant request can be executed.",fields:{locale:{type:n.String_unsecure(),isOptional:!1},jurisdiction:{type:n.String_unsecure(),isOptional:!1},kbSnapshotId:{type:n.String_unsecure(),isOptional:!1},allowedScope:{type:i,isOptional:!1},question:{type:n.String_unsecure(),isOptional:!1}}}),M=l({meta:{key:"locale-jurisdiction-gate.form.assistant-context",version:"1.0.0",title:"Assistant Context Gate",description:"Collects the explicit locale, jurisdiction, scope, and knowledge snapshot required by the assistant gate.",domain:"assistant",owners:[p.PlatformFinance],tags:[c.I18n,"assistant","form","policy"],stability:u.Experimental},model:y,fields:[{kind:"select",name:"locale",labelI18n:"assistantGate.locale.label",descriptionI18n:"assistantGate.locale.description",options:{kind:"static",options:[{labelI18n:"assistantGate.locale.enUs",value:"en-US"},{labelI18n:"assistantGate.locale.enGb",value:"en-GB"},{labelI18n:"assistantGate.locale.frFr",value:"fr-FR"}]},required:!0},{kind:"text",name:"jurisdiction",labelI18n:"assistantGate.jurisdiction.label",placeholderI18n:"assistantGate.jurisdiction.placeholder",required:!0},{kind:"text",name:"kbSnapshotId",labelI18n:"assistantGate.kbSnapshotId.label",placeholderI18n:"assistantGate.kbSnapshotId.placeholder",required:!0},{kind:"radio",name:"allowedScope",labelI18n:"assistantGate.allowedScope.label",options:{kind:"static",options:[{labelI18n:"assistantGate.allowedScope.educationOnly",value:"education_only"},{labelI18n:"assistantGate.allowedScope.genericInfo",value:"generic_info"},{labelI18n:"assistantGate.allowedScope.escalationRequired",value:"escalation_required"}]},required:!0},{kind:"textarea",name:"question",labelI18n:"assistantGate.question.label",placeholderI18n:"assistantGate.question.placeholder",required:!0}],actions:[{key:"submit",labelI18n:"assistantGate.submit.label",op:{name:"assistant.answer",version:"1.0.0"}}],policy:{flags:[],pii:["kbSnapshotId","question"]},renderHints:{ui:"custom",form:"react-hook-form"}});export{M as AssistantContextForm};
|