@8wave/ai-elements 0.114.0 → 0.115.0-beta.16
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/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js → PkToolRequestOAuthConnection-CgQePKKb.js} +3 -3
- package/dist/_chunks/PkToolRequestOAuthConnection-CgQePKKb.js.map +1 -0
- package/dist/_chunks/{PkToolShowSources-VFoI0YS8.js → PkToolShowSources-kGQlIKaN.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-VFoI0YS8.js.map → PkToolShowSources-kGQlIKaN.js.map} +1 -1
- package/dist/_chunks/{markdown-BL7WANiX.js → markdown-B4cYQGBo.js} +19 -10
- package/dist/_chunks/{markdown-BL7WANiX.js.map → markdown-B4cYQGBo.js.map} +1 -1
- package/dist/ai-elements.es.js +1670 -1563
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Document-nCWwJC2h.js → Document-BWz2HySu.js} +20 -11
- package/dist-vue/_chunks/{Document-nCWwJC2h.js.map → Document-BWz2HySu.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-BMIs94QB.js → PkChatbot-Cw5sScma.js} +6 -6
- package/dist-vue/_chunks/{PkChatbot-BMIs94QB.js.map → PkChatbot-Cw5sScma.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-Bj7mjhqN.js → PkChatbotMessages-62rYpwcM.js} +110 -101
- package/dist-vue/_chunks/PkChatbotMessages-62rYpwcM.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-CQ5WcZs8.js → PkChatbotViewChat-ML8aaCVN.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotViewChat-CQ5WcZs8.js.map → PkChatbotViewChat-ML8aaCVN.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js → PkChatbotViewConversations-DvmRjVND.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js.map → PkChatbotViewConversations-DvmRjVND.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js → PkChatbotViewFiles-DrMUsTv5.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js.map → PkChatbotViewFiles-DrMUsTv5.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js → PkChatbotViewProfile-C1eLHU7x.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js.map → PkChatbotViewProfile-C1eLHU7x.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js → PkToolRequestOAuthConnection-a2LegFoE.js} +3 -3
- package/dist-vue/_chunks/PkToolRequestOAuthConnection-a2LegFoE.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowDiagram-BziggKVa.js → PkToolShowDiagram-CssUiP3o.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BziggKVa.js.map → PkToolShowDiagram-CssUiP3o.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-TzkNgwnr.js → PkToolShowSources-C8r1vKJk.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-TzkNgwnr.js.map → PkToolShowSources-C8r1vKJk.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BlWs282E.js → createChatbotApiClient-BJz36z7v.js} +110 -110
- package/dist-vue/_chunks/createChatbotApiClient-BJz36z7v.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js → useChatbotStore-D3Q1ZgQg.js} +2 -2
- package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js.map → useChatbotStore-D3Q1ZgQg.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +108 -10
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +15 -12
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +4 -0
- package/dist-vue/packages/auth/src/active-membership.d.ts +36 -0
- package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +5 -1
- package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +1 -1
- package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +3 -3
- package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +1 -1
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +5 -0
- package/dist-vue/packages/models/src/schema/AgentApiTool.d.ts +40 -8
- package/dist-vue/packages/models/src/schema/ConversationAnalysis.d.ts +6 -1
- package/dist-vue/packages/models/src/schema/Document.d.ts +477 -0
- package/dist-vue/packages/models/src/schema/McpServer.d.ts +56 -0
- package/dist-vue/packages/models/src/schema/Notification.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/SignInSecurity.d.ts +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkToolRequestOAuthConnection-ChGMAKV7.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-Bj7mjhqN.js.map +0 -1
- package/dist-vue/_chunks/PkToolRequestOAuthConnection-DMvCGPuX.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +0 -1
package/dist-vue/locales.js
CHANGED
|
@@ -266,6 +266,7 @@ var e = {
|
|
|
266
266
|
comment: "Comment",
|
|
267
267
|
file: "File",
|
|
268
268
|
message: "Message",
|
|
269
|
+
messageNumber: "Message {n}",
|
|
269
270
|
tokens: "tokens",
|
|
270
271
|
answeringOnTheCall: "Answering…",
|
|
271
272
|
conversationOutline: "Conversation outline",
|
|
@@ -367,6 +368,7 @@ var e = {
|
|
|
367
368
|
voiceId: "Cloned voices are not listed: the provider forbids them here.",
|
|
368
369
|
freshnessScaleExplanationMonths: "A document updated today gets a +{weight} bonus. This bonus halves to +{halfWeight} after {half} days and practically drops to zero (+{zeroWeight}) after {zero} days (approx. {months} months).",
|
|
369
370
|
freshnessScaleExplanationDays: "A document updated today gets a +{weight} bonus. This bonus halves to +{halfWeight} after {half} days and practically drops to zero (+{zeroWeight}) after {zero} days.",
|
|
371
|
+
reasoningVisibility: "A reasoning agent is always visible to the members of its organization only.",
|
|
370
372
|
agentOnOwnEndpoint: "This agent runs on your organization's endpoint.",
|
|
371
373
|
providerTimeoutMs: "Timeout in milliseconds before falling back to the next provider (min 1000, max 789000). BYOK credentials only.",
|
|
372
374
|
showExtendedSteps: "Shows reasoning and tool calls as an expandable timeline in the chat.",
|
|
@@ -857,6 +859,7 @@ var e = {
|
|
|
857
859
|
comment: "Commento",
|
|
858
860
|
file: "File",
|
|
859
861
|
message: "Messaggio",
|
|
862
|
+
messageNumber: "Messaggio {n}",
|
|
860
863
|
tokens: "token",
|
|
861
864
|
answeringOnTheCall: "Sto rispondendo…",
|
|
862
865
|
conversationOutline: "Indice della conversazione",
|
|
@@ -958,6 +961,7 @@ var e = {
|
|
|
958
961
|
voiceId: "Le voci clonate non sono in elenco: il fornitore non le ammette qui.",
|
|
959
962
|
freshnessScaleExplanationMonths: "Un documento modificato oggi ottiene un bonus di +{weight}. Il bonus si dimezza a +{halfWeight} dopo {half} giorni e si azzera praticamente (+{zeroWeight}) dopo {zero} giorni (circa {months} mesi).",
|
|
960
963
|
freshnessScaleExplanationDays: "Un documento modificato oggi ottiene un bonus di +{weight}. Il bonus si dimezza a +{halfWeight} dopo {half} giorni e si azzera praticamente (+{zeroWeight}) dopo {zero} giorni.",
|
|
964
|
+
reasoningVisibility: "Un agente reasoning è sempre visibile solo ai membri dell'organizzazione.",
|
|
961
965
|
agentOnOwnEndpoint: "Questo agente gira sull’endpoint della tua organizzazione.",
|
|
962
966
|
providerTimeoutMs: "Timeout in millisecondi prima di passare al provider successivo (min 1000, max 789000). Solo credenziali BYOK.",
|
|
963
967
|
showExtendedSteps: "Visualizza la timeline con il ragionamento e gli strumenti nella chat.",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The role `userId` holds in `organizationId` now, or `null` when they are
|
|
3
|
+
* not a member. A role is cached, an absence is not: a membership created
|
|
4
|
+
* after a refusal is seen on the next request, so the paths that add members
|
|
5
|
+
* have nothing to invalidate.
|
|
6
|
+
*/
|
|
7
|
+
export declare function currentMemberRole(userId: string, organizationId: string): Promise<string | null>;
|
|
8
|
+
type OrganizationSession = {
|
|
9
|
+
userId: string;
|
|
10
|
+
activeOrganizationId?: string | null;
|
|
11
|
+
organizationRole?: string | null;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The session as a request may trust it: its active organization only while
|
|
15
|
+
* the user is still a member of it, and the role they hold there now.
|
|
16
|
+
*
|
|
17
|
+
* The two fields are written when the organization is activated and nothing
|
|
18
|
+
* rewrites them when the membership changes. Every service reads the tenant
|
|
19
|
+
* from the first and every permission from the second, so a member removed
|
|
20
|
+
* from an organization kept reading and writing it for the life of their
|
|
21
|
+
* session (90 days, renewed daily), and a demoted admin kept the admin rules.
|
|
22
|
+
* A session whose organization was unset kept the role it had there, which
|
|
23
|
+
* still opened the audience gates.
|
|
24
|
+
*/
|
|
25
|
+
export declare function withCurrentMembership<T extends OrganizationSession>(session: T): Promise<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Brings the stored sessions of `userId` in line with their membership of
|
|
28
|
+
* `organizationId`, after a write to it: a new role replaces the old one, a
|
|
29
|
+
* membership that is gone takes the active organization with it. Call it
|
|
30
|
+
* after every role change and every removal. The request check does not
|
|
31
|
+
* depend on it, it reads the membership itself, but the client does: it
|
|
32
|
+
* reads its organization and role from the session. The role is read from
|
|
33
|
+
* the database, not the cache, which a request may still be refilling.
|
|
34
|
+
*/
|
|
35
|
+
export declare function syncSessionsWithMembership(userId: string, organizationId: string): Promise<void>;
|
|
36
|
+
export {};
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
* because the organization is full. An automatic join does not take a seat
|
|
6
6
|
* an open invitation holds either, and a skipped one is not retried at the
|
|
7
7
|
* next sign-in: the person joins through an invitation once a seat is free.
|
|
8
|
+
*
|
|
9
|
+
* The role has no default: it used to be `member`, and the external login,
|
|
10
|
+
* which did not pass one, made every visitor of the widget a member with the
|
|
11
|
+
* frontoffice of the organization, whatever its configuration said.
|
|
8
12
|
*/
|
|
9
|
-
export declare function addMemberToOrganizationIfNotExists(userId: string, organizationId: string, role
|
|
13
|
+
export declare function addMemberToOrganizationIfNotExists(userId: string, organizationId: string, role: string, { respectMemberLimit }?: {
|
|
10
14
|
respectMemberLimit?: boolean;
|
|
11
15
|
}): Promise<boolean>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BetterFetch } from 'better-auth/client';
|
|
2
2
|
/**
|
|
3
3
|
* Client counterpart of the server `passkeyPolicy()` plugin, see
|
|
4
|
-
* docs/specs/two-factor-authentication.md, D10.
|
|
4
|
+
* docs/specs/released/two-factor-authentication.md, D10.
|
|
5
5
|
*/
|
|
6
6
|
export declare function passkeyPolicyClient(): {
|
|
7
7
|
id: "passkey-policy";
|
|
@@ -2,7 +2,7 @@ import { SignInSecurityState } from '../../models/src';
|
|
|
2
2
|
import { BetterFetch } from 'better-auth/client';
|
|
3
3
|
/**
|
|
4
4
|
* What `GET /two-factor-policy/user-security` answers to a system
|
|
5
|
-
* administrator, see docs/specs/two-factor-system-assistance.md (D3). Dates
|
|
5
|
+
* administrator, see docs/specs/released/two-factor-system-assistance.md (D3). Dates
|
|
6
6
|
* arrive as ISO strings.
|
|
7
7
|
*/
|
|
8
8
|
export interface UserSignInSecurity {
|
|
@@ -60,8 +60,8 @@ export interface TwoFactorStatus {
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Client counterpart of the server `twoFactorPolicy()` and `twoFactorAdmin()`
|
|
63
|
-
* plugins, see docs/specs/two-factor-authentication.md and
|
|
64
|
-
* docs/specs/two-factor-system-assistance.md.
|
|
63
|
+
* plugins, see docs/specs/released/two-factor-authentication.md and
|
|
64
|
+
* docs/specs/released/two-factor-system-assistance.md.
|
|
65
65
|
*/
|
|
66
66
|
export declare function twoFactorPolicyClient(): {
|
|
67
67
|
id: "two-factor-policy";
|
|
@@ -95,7 +95,7 @@ export declare function isTwoFactorSetupRequiredForSession(input: {
|
|
|
95
95
|
}): Promise<boolean>;
|
|
96
96
|
/**
|
|
97
97
|
* The status endpoint, the widget bridge and the announcements of
|
|
98
|
-
* docs/specs/two-factor-authentication.md. The administrator's endpoints are
|
|
98
|
+
* docs/specs/released/two-factor-authentication.md. The administrator's endpoints are
|
|
99
99
|
* in two-factor-admin-plugin.ts.
|
|
100
100
|
*
|
|
101
101
|
* The endpoints live under `/two-factor-policy/` and not `/two-factor/` on
|
|
@@ -19,6 +19,11 @@ type __VLS_Props = {
|
|
|
19
19
|
disableHeightAdjustment?: boolean;
|
|
20
20
|
showMessageDateTime?: boolean;
|
|
21
21
|
showMessageTokensCount?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Shows each answer's position in the chat, from 1, the numbering the
|
|
24
|
+
* conversation analysis cites ("message 62").
|
|
25
|
+
*/
|
|
26
|
+
showMessageNumber?: boolean;
|
|
22
27
|
showAllMessageParts?: boolean;
|
|
23
28
|
/**
|
|
24
29
|
* Lets the user answer the tool requests rendered in the feed (approval
|
|
@@ -38,6 +38,30 @@ export declare const AgentApiToolSecretParameterDtoSchema: z.ZodObject<{
|
|
|
38
38
|
position: z.ZodEnum<typeof AgentApiToolSecretPosition>;
|
|
39
39
|
value: z.ZodOptional<z.ZodString>;
|
|
40
40
|
}, z.core.$strip>;
|
|
41
|
+
/**
|
|
42
|
+
* A header as the API returns it: its name, and whether a value is stored.
|
|
43
|
+
* Headers carry the keys of the services a tool calls (`Authorization`,
|
|
44
|
+
* `X-Api-Key`), so like the secret parameters the value never leaves the
|
|
45
|
+
* backend, the contract of the headers of the organization's model provider.
|
|
46
|
+
*/
|
|
47
|
+
export declare const AgentApiToolHeaderSchema: z.ZodObject<{
|
|
48
|
+
key: z.ZodString;
|
|
49
|
+
hasValue: z.ZodBoolean;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
/**
|
|
52
|
+
* Headers as a save sends them. On an update an empty value keeps the one
|
|
53
|
+
* stored under the same name, while the URL keeps its origin; a name left out
|
|
54
|
+
* is removed. A row without a name is an empty row of the form, and dropped.
|
|
55
|
+
* Two names that differ only in case are one HTTP header, so they are refused:
|
|
56
|
+
* a kept value would match the first and the request send the last.
|
|
57
|
+
*/
|
|
58
|
+
export declare const AgentApiToolHeaderListSchema: z.ZodCodec<z.ZodArray<z.ZodObject<{
|
|
59
|
+
key: z.ZodOptional<z.ZodString>;
|
|
60
|
+
value: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
62
|
+
key: z.ZodString;
|
|
63
|
+
value: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>>>;
|
|
41
65
|
/**
|
|
42
66
|
* The public parameters whose name looks like a credential: `apikey`,
|
|
43
67
|
* `api_key`, `token`, `secret` or `password` as a word of the name, in any
|
|
@@ -64,13 +88,10 @@ export declare const AgentApiToolSchema: z.ZodObject<{
|
|
|
64
88
|
description: z.ZodString;
|
|
65
89
|
method: z.ZodEnum<typeof HttpMethod>;
|
|
66
90
|
url: z.ZodString;
|
|
67
|
-
headers: z.
|
|
68
|
-
key: z.ZodOptional<z.ZodString>;
|
|
69
|
-
value: z.ZodOptional<z.ZodString>;
|
|
70
|
-
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
91
|
+
headers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
71
92
|
key: z.ZodString;
|
|
72
|
-
|
|
73
|
-
}, z.core.$strip
|
|
93
|
+
hasValue: z.ZodBoolean;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
74
95
|
secretParameters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
75
96
|
name: z.ZodString;
|
|
76
97
|
position: z.ZodEnum<typeof AgentApiToolSecretPosition>;
|
|
@@ -98,7 +119,7 @@ export declare const AgentApiToolCreateSchema: z.ZodObject<{
|
|
|
98
119
|
value: z.ZodOptional<z.ZodString>;
|
|
99
120
|
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
100
121
|
key: z.ZodString;
|
|
101
|
-
value: z.ZodString
|
|
122
|
+
value: z.ZodOptional<z.ZodString>;
|
|
102
123
|
}, z.core.$strip>>>>>;
|
|
103
124
|
secretParameters: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
104
125
|
name: z.ZodString;
|
|
@@ -120,7 +141,7 @@ export declare const AgentApiToolUpdateSchema: z.ZodObject<{
|
|
|
120
141
|
value: z.ZodOptional<z.ZodString>;
|
|
121
142
|
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
122
143
|
key: z.ZodString;
|
|
123
|
-
value: z.ZodString
|
|
144
|
+
value: z.ZodOptional<z.ZodString>;
|
|
124
145
|
}, z.core.$strip>>>>>;
|
|
125
146
|
secretParameters: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
126
147
|
name: z.ZodString;
|
|
@@ -151,4 +172,15 @@ export type AgentApiToolCreate = z.infer<typeof AgentApiToolCreateSchema>;
|
|
|
151
172
|
export type AgentApiToolUpdate = z.infer<typeof AgentApiToolUpdateSchema>;
|
|
152
173
|
export type AgentApiToolSecretParameter = z.infer<typeof AgentApiToolSecretParameterSchema>;
|
|
153
174
|
export type AgentApiToolSecretParameterDto = z.infer<typeof AgentApiToolSecretParameterDtoSchema>;
|
|
175
|
+
export type AgentApiToolHeader = z.infer<typeof AgentApiToolHeaderSchema>;
|
|
176
|
+
export type AgentApiToolHeaderDto = z.infer<typeof AgentApiToolHeaderListSchema>[number];
|
|
177
|
+
/**
|
|
178
|
+
* A header as stored in `agent_api_tools.headers`, with `value` encrypted by
|
|
179
|
+
* `encryptSecret` (rows saved before 0.115.0 hold it in clear until their
|
|
180
|
+
* next save). Backend only: it never reaches a response.
|
|
181
|
+
*/
|
|
182
|
+
export type AgentApiToolStoredHeader = {
|
|
183
|
+
key: string;
|
|
184
|
+
value: string;
|
|
185
|
+
};
|
|
154
186
|
export type AgentApiToolQuerystring = z.infer<typeof AgentApiToolQuerystringSchema>;
|
|
@@ -23,7 +23,10 @@ export declare enum LlmIssueCategory {
|
|
|
23
23
|
DataLeak = "data_leak",
|
|
24
24
|
InappropriateTone = "inappropriate_tone",
|
|
25
25
|
RefusalLoop = "refusal_loop",
|
|
26
|
-
Repetition = "repetition"
|
|
26
|
+
Repetition = "repetition",
|
|
27
|
+
FailedAction = "failed_action",
|
|
28
|
+
EmptyReply = "empty_reply",
|
|
29
|
+
StuckFlow = "stuck_flow"
|
|
27
30
|
}
|
|
28
31
|
export declare enum ConversationAnalysisTrigger {
|
|
29
32
|
SummaryCycle = "summary_cycle",
|
|
@@ -55,6 +58,8 @@ export declare enum SentimentTrend {
|
|
|
55
58
|
Stable = "stable",
|
|
56
59
|
Degrading = "degrading"
|
|
57
60
|
}
|
|
61
|
+
/** Longest abuse or LLM issue summary an analysis stores. */
|
|
62
|
+
export declare const CONVERSATION_ANALYSIS_SUMMARY_MAX_CHARS = 1000;
|
|
58
63
|
export declare const ConversationAnalysisSchema: z.ZodObject<{
|
|
59
64
|
analyzedAt: z.ZodCoercedDate<unknown>;
|
|
60
65
|
analysisTrigger: z.ZodEnum<typeof ConversationAnalysisTrigger>;
|