@burtson-labs/bandit-engine 2.1.7 → 2.1.8
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/CHANGELOG.md +14 -0
- package/dist/AdvancedTab-HZTDXFST.mjs +229 -0
- package/dist/AdvancedTab-HZTDXFST.mjs.map +1 -0
- package/dist/CrewSection-YM26YD2N.mjs +12 -0
- package/dist/InstructionsTab-MKOGBQ5L.mjs +195 -0
- package/dist/InstructionsTab-MKOGBQ5L.mjs.map +1 -0
- package/dist/PersonalizationTab-2XHFTYYW.mjs +179 -0
- package/dist/PersonalizationTab-2XHFTYYW.mjs.map +1 -0
- package/dist/{ProjectsPane-E5D72PUG.mjs → ProjectsPane-KE5DGFN4.mjs} +9 -6
- package/dist/ProjectsPane-KE5DGFN4.mjs.map +1 -0
- package/dist/{SchedulesTab-AKJ6WFZV.mjs → SchedulesTab-AM5QP36K.mjs} +7 -5
- package/dist/SchedulesTab-AM5QP36K.mjs.map +1 -0
- package/dist/{aiProviderStore-ANPQVHGD.mjs → aiProviderStore-GH4JZTMW.mjs} +3 -2
- package/dist/chat-D66YM4MB.mjs +26 -0
- package/dist/{chunk-4NUQYUZH.mjs → chunk-2FI2IICG.mjs} +7 -569
- package/dist/chunk-2FI2IICG.mjs.map +1 -0
- package/dist/chunk-2THUYNVU.mjs +1203 -0
- package/dist/chunk-2THUYNVU.mjs.map +1 -0
- package/dist/{chunk-KWOUXBSF.mjs → chunk-5LXCZJLJ.mjs} +5 -213
- package/dist/chunk-5LXCZJLJ.mjs.map +1 -0
- package/dist/chunk-5WCKKD3S.mjs +1742 -0
- package/dist/chunk-5WCKKD3S.mjs.map +1 -0
- package/dist/{chunk-GX4FVZNA.mjs → chunk-DHXSFFLX.mjs} +4 -26
- package/dist/chunk-DHXSFFLX.mjs.map +1 -0
- package/dist/chunk-EKPPIS3X.mjs +336 -0
- package/dist/chunk-EKPPIS3X.mjs.map +1 -0
- package/dist/chunk-FBLITVVY.mjs +5845 -0
- package/dist/chunk-FBLITVVY.mjs.map +1 -0
- package/dist/chunk-H2XUGGKV.mjs +168 -0
- package/dist/chunk-H2XUGGKV.mjs.map +1 -0
- package/dist/chunk-K4AO466X.mjs +570 -0
- package/dist/chunk-K4AO466X.mjs.map +1 -0
- package/dist/chunk-KPT7NNNK.mjs +214 -0
- package/dist/chunk-KPT7NNNK.mjs.map +1 -0
- package/dist/{chunk-SQJ4OKWM.mjs → chunk-LAH6UL3Q.mjs} +10 -1726
- package/dist/chunk-LAH6UL3Q.mjs.map +1 -0
- package/dist/chunk-LC64VSDS.mjs +541 -0
- package/dist/chunk-LC64VSDS.mjs.map +1 -0
- package/dist/{chunk-DH5A2HT2.mjs → chunk-LY3O7UWA.mjs} +45 -1
- package/dist/chunk-LY3O7UWA.mjs.map +1 -0
- package/dist/{chunk-4NHPLHXU.mjs → chunk-WZGDQ4EA.mjs} +5176 -11535
- package/dist/chunk-WZGDQ4EA.mjs.map +1 -0
- package/dist/chunk-Y272M3D5.mjs +28 -0
- package/dist/chunk-Y272M3D5.mjs.map +1 -0
- package/dist/index.d.mts +121 -8
- package/dist/index.d.ts +121 -8
- package/dist/index.js +8732 -7511
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1243 -2243
- package/dist/index.mjs.map +1 -1
- package/dist/{modelStore-YNANSWCN.mjs → modelStore-KO45QAO2.mjs} +3 -2
- package/dist/modelStore-KO45QAO2.mjs.map +1 -0
- package/dist/{public-Tq2Pmw9m.d.ts → public-_W_Zew3C.d.mts} +14 -0
- package/dist/{public-Tq2Pmw9m.d.mts → public-_W_Zew3C.d.ts} +14 -0
- package/dist/public-types.d.mts +1 -1
- package/dist/public-types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ProjectsPane-E5D72PUG.mjs.map +0 -1
- package/dist/SchedulesTab-AKJ6WFZV.mjs.map +0 -1
- package/dist/chat-MI4IL3WK.mjs +0 -19
- package/dist/chunk-4NHPLHXU.mjs.map +0 -1
- package/dist/chunk-4NUQYUZH.mjs.map +0 -1
- package/dist/chunk-DH5A2HT2.mjs.map +0 -1
- package/dist/chunk-GX4FVZNA.mjs.map +0 -1
- package/dist/chunk-KWOUXBSF.mjs.map +0 -1
- package/dist/chunk-SQJ4OKWM.mjs.map +0 -1
- /package/dist/{aiProviderStore-ANPQVHGD.mjs.map → CrewSection-YM26YD2N.mjs.map} +0 -0
- /package/dist/{chat-MI4IL3WK.mjs.map → aiProviderStore-GH4JZTMW.mjs.map} +0 -0
- /package/dist/{modelStore-YNANSWCN.mjs.map → chat-D66YM4MB.mjs.map} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/services/ai-provider/context-sources.ts
|
|
2
|
+
var MAX_LABEL = 120;
|
|
3
|
+
var clean = (value) => {
|
|
4
|
+
if (typeof value !== "string") return void 0;
|
|
5
|
+
const trimmed = value.trim();
|
|
6
|
+
if (!trimmed) return void 0;
|
|
7
|
+
return trimmed.length > MAX_LABEL ? `${trimmed.slice(0, MAX_LABEL - 1)}\u2026` : trimmed;
|
|
8
|
+
};
|
|
9
|
+
var readContextSourcesField = (chunk) => {
|
|
10
|
+
if (!chunk || typeof chunk !== "object") return void 0;
|
|
11
|
+
const record = chunk;
|
|
12
|
+
const raw = record.context_sources ?? record.contextSources;
|
|
13
|
+
if (!Array.isArray(raw)) return void 0;
|
|
14
|
+
const out = [];
|
|
15
|
+
for (const entry of raw) {
|
|
16
|
+
if (!entry || typeof entry !== "object") continue;
|
|
17
|
+
const label = clean(entry.label);
|
|
18
|
+
if (!label) continue;
|
|
19
|
+
const detail = clean(entry.detail);
|
|
20
|
+
out.push(detail ? { label, detail } : { label });
|
|
21
|
+
}
|
|
22
|
+
return out.length ? out : void 0;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
readContextSourcesField
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-Y272M3D5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/services/ai-provider/context-sources.ts"],"mappings":";AAQA,IAAM,YAAY;AAElB,IAAM,QAAQ,CAAC,UAAuC;AACpD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,QAAM,UAAU,MAAM,KAAK;AAC3B,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,QAAQ,SAAS,YAAY,GAAG,QAAQ,MAAM,GAAG,YAAY,CAAC,CAAC,WAAM;AAC9E;AAMO,IAAM,0BAA0B,CACrC,UACkC;AAClC,MAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO;AAChD,QAAM,SAAS;AACf,QAAM,MAAM,OAAO,mBAAmB,OAAO;AAC7C,MAAI,CAAC,MAAM,QAAQ,GAAG,EAAG,QAAO;AAChC,QAAM,MAAyB,CAAC;AAChC,aAAW,SAAS,KAAK;AACvB,QAAI,CAAC,SAAS,OAAO,UAAU,SAAU;AACzC,UAAM,QAAQ,MAAO,MAAkC,KAAK;AAC5D,QAAI,CAAC,MAAO;AACZ,UAAM,SAAS,MAAO,MAAkC,MAAM;AAC9D,QAAI,KAAK,SAAS,EAAE,OAAO,OAAO,IAAI,EAAE,MAAM,CAAC;AAAA,EACjD;AACA,SAAO,IAAI,SAAS,MAAM;AAC5B;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FeatureKey, a as FeatureEvaluation, S as SubscriptionTier, b as FeatureFlagConfig, T as TrialUsage, A as AIMessage } from './public-
|
|
2
|
-
export { c as AIChatRequest, d as AIChatResponse, e as AIGenerateRequest, f as AIGenerateResponse, g as AIModel, h as AIProviderConfig, C as ChatConfig, i as ChatModal, j as ChatModalProps, k as ChatProvider, D as DEFAULT_TIER_FEATURES, E as EngineNavigation, l as FeatureMatrix, O as OSS_DEFAULT_FEATURES, P as PackageSettings, m as SidebarLayout, n as SidebarSection, V as VoiceModelsResponse, o as VoiceService, v as voiceService } from './public-
|
|
1
|
+
import { F as FeatureKey, a as FeatureEvaluation, S as SubscriptionTier, b as FeatureFlagConfig, T as TrialUsage, A as AIMessage } from './public-_W_Zew3C.mjs';
|
|
2
|
+
export { c as AIChatRequest, d as AIChatResponse, e as AIGenerateRequest, f as AIGenerateResponse, g as AIModel, h as AIProviderConfig, C as ChatConfig, i as ChatModal, j as ChatModalProps, k as ChatProvider, D as DEFAULT_TIER_FEATURES, E as EngineNavigation, l as FeatureMatrix, O as OSS_DEFAULT_FEATURES, P as PackageSettings, m as SidebarLayout, n as SidebarSection, V as VoiceModelsResponse, o as VoiceService, v as voiceService } from './public-_W_Zew3C.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React, { ReactNode } from 'react';
|
|
5
5
|
import { Theme } from '@mui/material/styles';
|
|
@@ -13,8 +13,8 @@ import { AlertColor } from '@mui/material';
|
|
|
13
13
|
|
|
14
14
|
declare const Chat: () => react_jsx_runtime.JSX.Element | null;
|
|
15
15
|
|
|
16
|
-
/** Every Management section that exists
|
|
17
|
-
type ManagementSectionId = "overview" | "personalities" | "knowledge" | "tools" | "provider" | "storage" | "branding" | "schedules" | "preferences";
|
|
16
|
+
/** Every Management section that exists, on either console. */
|
|
17
|
+
type ManagementSectionId = "overview" | "personalization" | "personalities" | "instructions" | "knowledge" | "tools" | "crew" | "provider" | "advanced" | "storage" | "branding" | "schedules" | "preferences";
|
|
18
18
|
type FeatureGate = "limitedAdminDashboard" | "advancedSearch";
|
|
19
19
|
/**
|
|
20
20
|
* Where a section sits in the rail: the overview on its own at the top, the
|
|
@@ -35,8 +35,9 @@ interface ManagementSectionDef {
|
|
|
35
35
|
group: ManagementSectionGroup;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* Every section, in the native shells' order. Sections only one console has
|
|
39
|
+
* (see WEB_ONLY / NATIVE_ONLY) are filtered by presentManagementSections; the
|
|
40
|
+
* web's own wording and order are applied there too.
|
|
40
41
|
*/
|
|
41
42
|
declare const MANAGEMENT_SECTIONS: readonly ManagementSectionDef[];
|
|
42
43
|
interface ManagementAccessInput {
|
|
@@ -50,7 +51,7 @@ interface ManagementAccessInput {
|
|
|
50
51
|
* per-tenant admin. AuthApi's TeamService grants tenant owners/admins a role of
|
|
51
52
|
* the form "<slug>-admin", so any role ending in "-admin" is a tenant admin.
|
|
52
53
|
* super-user is NOT an admin: it's the trial/power-user role, so trial and
|
|
53
|
-
* consumer users see only
|
|
54
|
+
* consumer users see only their own pages (Preferences, Personalization, Schedules).
|
|
54
55
|
*/
|
|
55
56
|
declare function isWorkspaceAdminRole(roles: string[]): boolean;
|
|
56
57
|
/** Which sections this user can open: role first, then plan features. Pure, for tests and hosts. */
|
|
@@ -60,6 +61,8 @@ interface ManagementAccess {
|
|
|
60
61
|
isWorkspaceAdmin: boolean;
|
|
61
62
|
/** Admin-dashboard users limited to the lighter feature set. */
|
|
62
63
|
isLimitedAdmin: boolean;
|
|
64
|
+
/** Pro/Team plan: the model provider page (inside Advanced on the web). */
|
|
65
|
+
hasAdvancedSearch: boolean;
|
|
63
66
|
}
|
|
64
67
|
/**
|
|
65
68
|
* The signed-in user's Management access, presented for this console (web or
|
|
@@ -124,6 +127,116 @@ interface InterestsEditorProps {
|
|
|
124
127
|
*/
|
|
125
128
|
declare const InterestsEditor: ({ title, description, }: InterestsEditorProps) => react_jsx_runtime.JSX.Element;
|
|
126
129
|
|
|
130
|
+
interface MemoryManagerProps {
|
|
131
|
+
/**
|
|
132
|
+
* "sheet": the body of the Memories modal (chat surfaces, a close button, a
|
|
133
|
+
* fixed height). "page": the Settings page — searchable, and it grows with
|
|
134
|
+
* its list instead of scrolling inside a box.
|
|
135
|
+
*/
|
|
136
|
+
variant: "sheet" | "page";
|
|
137
|
+
/** On screen; memories load when this becomes true. The sheet passes its `open`. */
|
|
138
|
+
active?: boolean;
|
|
139
|
+
/** The sheet's close button. */
|
|
140
|
+
onClose?: () => void;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* What Bandit remembers: the memories you told it and the ones it noted
|
|
144
|
+
* itself, local to this browser or synced to your account. Add, edit, pin,
|
|
145
|
+
* delete, select several, clear by kind, and move local memories to the
|
|
146
|
+
* synced workspace. The Memories modal and the Personalization page both
|
|
147
|
+
* render this.
|
|
148
|
+
*/
|
|
149
|
+
declare const MemoryManager: React.FC<MemoryManagerProps>;
|
|
150
|
+
|
|
151
|
+
interface BanditPersonality {
|
|
152
|
+
name: string;
|
|
153
|
+
tagline: string;
|
|
154
|
+
systemPrompt: string;
|
|
155
|
+
commands: string[];
|
|
156
|
+
avatarBase64?: string | null;
|
|
157
|
+
avatarPreset?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface CustomInstructions {
|
|
161
|
+
/** "What should Bandit know about you?" */
|
|
162
|
+
about: string;
|
|
163
|
+
/** "How would you like Bandit to respond?" */
|
|
164
|
+
responseStyle: string;
|
|
165
|
+
}
|
|
166
|
+
/** Character limits for new text. Migrated text longer than this is kept; it can only be shortened. */
|
|
167
|
+
declare const CUSTOM_INSTRUCTIONS_LIMITS: {
|
|
168
|
+
readonly about: 1500;
|
|
169
|
+
readonly responseStyle: 1500;
|
|
170
|
+
};
|
|
171
|
+
declare const ASSISTANT_INSTRUCTIONS_LIMIT = 4000;
|
|
172
|
+
/** Bandit's own voice: what answers when nobody has written instructions. */
|
|
173
|
+
declare const DEFAULT_ASSISTANT_INSTRUCTIONS: string;
|
|
174
|
+
declare const MIGRATIONS_RECORD_ID = "migrations";
|
|
175
|
+
/** One-time data moves, by name, with when they ran. */
|
|
176
|
+
interface MigrationsRecord {
|
|
177
|
+
id: typeof MIGRATIONS_RECORD_ID;
|
|
178
|
+
/** The customized active personality was copied into Custom instructions. */
|
|
179
|
+
customInstructionsFromPersonality?: {
|
|
180
|
+
at: number;
|
|
181
|
+
from: string | null;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
interface PersonaPromptInput {
|
|
185
|
+
/** The workspace's Assistant instructions; empty when none were written. */
|
|
186
|
+
assistant: string;
|
|
187
|
+
custom: CustomInstructions;
|
|
188
|
+
/**
|
|
189
|
+
* The active personality's prompt (the pre-Phase-3 key), read for one more
|
|
190
|
+
* release so a workspace that has written nothing new keeps its voice.
|
|
191
|
+
*/
|
|
192
|
+
legacyPersonalityPrompt?: string | null;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* The PERSONA block's text. Assistant instructions come first; when the
|
|
196
|
+
* workspace wrote none, Bandit's default voice (or the legacy personality
|
|
197
|
+
* prompt) stands in — unless the person wrote Custom instructions, which then
|
|
198
|
+
* replace the default voice rather than compete with it. The person's two
|
|
199
|
+
* fields follow, labelled, so the model knows which is which.
|
|
200
|
+
*/
|
|
201
|
+
declare function composePersonaPrompt(input: PersonaPromptInput): string;
|
|
202
|
+
interface PersonalityMigrationInput {
|
|
203
|
+
/** The personality that answers chats today, if the model store has one. */
|
|
204
|
+
active: Pick<BanditPersonality, "name" | "systemPrompt"> | null | undefined;
|
|
205
|
+
/** What the person has already written; never overwritten. */
|
|
206
|
+
existing: CustomInstructions;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Decides whether the active personality's prompt should seed Custom
|
|
210
|
+
* instructions: only when it was customized (differs from Bandit's default
|
|
211
|
+
* voice) and the person has not written a response style of their own.
|
|
212
|
+
* Returns the field to write, or null for nothing to do.
|
|
213
|
+
*/
|
|
214
|
+
declare function planPersonalityMigration(input: PersonalityMigrationInput): {
|
|
215
|
+
responseStyle: string;
|
|
216
|
+
} | null;
|
|
217
|
+
type InstructionsSaveState = "idle" | "saving" | "saved" | "error";
|
|
218
|
+
type PersonalityMigrationOutcome = "migrated" | "nothing-to-migrate" | "already-done" | "not-ready";
|
|
219
|
+
interface InstructionsStore {
|
|
220
|
+
custom: CustomInstructions;
|
|
221
|
+
assistant: string;
|
|
222
|
+
hydrated: boolean;
|
|
223
|
+
migration: MigrationsRecord["customInstructionsFromPersonality"] | null;
|
|
224
|
+
saveState: InstructionsSaveState;
|
|
225
|
+
lastSavedAt: number | null;
|
|
226
|
+
hydrate: () => Promise<void>;
|
|
227
|
+
saveCustomInstructions: (next: CustomInstructions) => Promise<boolean>;
|
|
228
|
+
saveAssistantInstructions: (text: string) => Promise<boolean>;
|
|
229
|
+
/**
|
|
230
|
+
* Copies a customized active personality into Custom instructions, once.
|
|
231
|
+
* `ready` says the model store has finished loading, so an empty list is a
|
|
232
|
+
* real answer and not a race; until then nothing is recorded.
|
|
233
|
+
*/
|
|
234
|
+
migrateFromPersonality: (active: Pick<BanditPersonality, "name" | "systemPrompt"> | null | undefined, ready: boolean) => Promise<PersonalityMigrationOutcome>;
|
|
235
|
+
/** The PERSONA block for the next message, with the legacy personality prompt as the fallback. */
|
|
236
|
+
personaPrompt: (legacyPersonalityPrompt?: string | null) => string;
|
|
237
|
+
}
|
|
238
|
+
declare const useInstructionsStore: zustand.UseBoundStore<zustand.StoreApi<InstructionsStore>>;
|
|
239
|
+
|
|
127
240
|
declare function defineCustomElement<Props extends Record<string, unknown>>(name: string, Component: React.ComponentType<Props>): void;
|
|
128
241
|
|
|
129
242
|
/**
|
|
@@ -1894,4 +2007,4 @@ declare const createStashShareLink: (args: {
|
|
|
1894
2007
|
signal?: AbortSignal;
|
|
1895
2008
|
}) => Promise<StashShareLink>;
|
|
1896
2009
|
|
|
1897
|
-
export { AIMessage, AUTH_TOKEN_CHANGED_EVENT, type ActionItem, type AuthSessionConfig, type AuthSessionHandlers, Chat, type CreateMemoryOptions, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayQueryOptions, InterestsEditor, type JwtClaims, type LogContext, MANAGEMENT_SECTIONS, MAX_RECORDING_BYTES, MAX_RECORDING_SECONDS, Management, type ManagementAccess, type ManagementAccessInput, type ManagementLink, type ManagementProps, type ManagementRequest, type ManagementSectionDef, type ManagementSectionId, type MeetingNotes, type ChatFn as MeetingNotesChatFn, MeetingNotesError, type MeetingNotesInput, type MeetingNotesProgress, type MeetingNotesResult, type MeetingNotesSource, type MeetingNotesStage, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotesMeta, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, type ParsedTranscript, CHUNK_SECONDS as RECORDING_CHUNK_SECONDS, type RecordingTranscript, type RunMeetingNotesOptions, SYSTEM_FLAGS, type SearchOptions, type SearchResult, SpeechToTextError, StashError, type StashSaveResult, type StashShareLink, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, TOKEN_KEY, type TTSOptions, type TTSProgress, TTSState, type TokenPersistence, type TokenStorageMode, type TranscriptFormat, type TranscriptSegment, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, chunkTranscript, createStashShareLink, debugLogger, defineCustomElement, describeMeetingInput, featureFlagService, generateMeetingNotes, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, isMeetingFile, isRecordingFile, isTranscriptFileName, isWorkspaceAdminRole, looksLikeTranscript, meetingNotesErrorMessage, notesToHtml, notesToMarkdown, notificationService, parseNotesJson, parseTranscript, pauseTTS, previewTierUpgrade, resolveManagementSections, resumeTTS, runMeetingNotes, saveToStash, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stashAvailable, stopTTS, syncSubscriptionWithAPI, transcribeRecording, transcriptToText, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useManagementAccess, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
|
|
2010
|
+
export { AIMessage, ASSISTANT_INSTRUCTIONS_LIMIT, AUTH_TOKEN_CHANGED_EVENT, type ActionItem, type AuthSessionConfig, type AuthSessionHandlers, CUSTOM_INSTRUCTIONS_LIMITS, Chat, type CreateMemoryOptions, type CustomInstructions, DEFAULT_ASSISTANT_INSTRUCTIONS, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayQueryOptions, InterestsEditor, type JwtClaims, type LogContext, MANAGEMENT_SECTIONS, MAX_RECORDING_BYTES, MAX_RECORDING_SECONDS, Management, type ManagementAccess, type ManagementAccessInput, type ManagementLink, type ManagementProps, type ManagementRequest, type ManagementSectionDef, type ManagementSectionId, type MeetingNotes, type ChatFn as MeetingNotesChatFn, MeetingNotesError, type MeetingNotesInput, type MeetingNotesProgress, type MeetingNotesResult, type MeetingNotesSource, type MeetingNotesStage, MemoryManager, type MemoryManagerProps, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotesMeta, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, type ParsedTranscript, type PersonaPromptInput, CHUNK_SECONDS as RECORDING_CHUNK_SECONDS, type RecordingTranscript, type RunMeetingNotesOptions, SYSTEM_FLAGS, type SearchOptions, type SearchResult, SpeechToTextError, StashError, type StashSaveResult, type StashShareLink, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, TOKEN_KEY, type TTSOptions, type TTSProgress, TTSState, type TokenPersistence, type TokenStorageMode, type TranscriptFormat, type TranscriptSegment, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, chunkTranscript, composePersonaPrompt, createStashShareLink, debugLogger, defineCustomElement, describeMeetingInput, featureFlagService, generateMeetingNotes, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, isMeetingFile, isRecordingFile, isTranscriptFileName, isWorkspaceAdminRole, looksLikeTranscript, meetingNotesErrorMessage, notesToHtml, notesToMarkdown, notificationService, parseNotesJson, parseTranscript, pauseTTS, planPersonalityMigration, previewTierUpgrade, resolveManagementSections, resumeTTS, runMeetingNotes, saveToStash, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stashAvailable, stopTTS, syncSubscriptionWithAPI, transcribeRecording, transcriptToText, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useInstructionsStore, useManagementAccess, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FeatureKey, a as FeatureEvaluation, S as SubscriptionTier, b as FeatureFlagConfig, T as TrialUsage, A as AIMessage } from './public-
|
|
2
|
-
export { c as AIChatRequest, d as AIChatResponse, e as AIGenerateRequest, f as AIGenerateResponse, g as AIModel, h as AIProviderConfig, C as ChatConfig, i as ChatModal, j as ChatModalProps, k as ChatProvider, D as DEFAULT_TIER_FEATURES, E as EngineNavigation, l as FeatureMatrix, O as OSS_DEFAULT_FEATURES, P as PackageSettings, m as SidebarLayout, n as SidebarSection, V as VoiceModelsResponse, o as VoiceService, v as voiceService } from './public-
|
|
1
|
+
import { F as FeatureKey, a as FeatureEvaluation, S as SubscriptionTier, b as FeatureFlagConfig, T as TrialUsage, A as AIMessage } from './public-_W_Zew3C.js';
|
|
2
|
+
export { c as AIChatRequest, d as AIChatResponse, e as AIGenerateRequest, f as AIGenerateResponse, g as AIModel, h as AIProviderConfig, C as ChatConfig, i as ChatModal, j as ChatModalProps, k as ChatProvider, D as DEFAULT_TIER_FEATURES, E as EngineNavigation, l as FeatureMatrix, O as OSS_DEFAULT_FEATURES, P as PackageSettings, m as SidebarLayout, n as SidebarSection, V as VoiceModelsResponse, o as VoiceService, v as voiceService } from './public-_W_Zew3C.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React, { ReactNode } from 'react';
|
|
5
5
|
import { Theme } from '@mui/material/styles';
|
|
@@ -13,8 +13,8 @@ import { AlertColor } from '@mui/material';
|
|
|
13
13
|
|
|
14
14
|
declare const Chat: () => react_jsx_runtime.JSX.Element | null;
|
|
15
15
|
|
|
16
|
-
/** Every Management section that exists
|
|
17
|
-
type ManagementSectionId = "overview" | "personalities" | "knowledge" | "tools" | "provider" | "storage" | "branding" | "schedules" | "preferences";
|
|
16
|
+
/** Every Management section that exists, on either console. */
|
|
17
|
+
type ManagementSectionId = "overview" | "personalization" | "personalities" | "instructions" | "knowledge" | "tools" | "crew" | "provider" | "advanced" | "storage" | "branding" | "schedules" | "preferences";
|
|
18
18
|
type FeatureGate = "limitedAdminDashboard" | "advancedSearch";
|
|
19
19
|
/**
|
|
20
20
|
* Where a section sits in the rail: the overview on its own at the top, the
|
|
@@ -35,8 +35,9 @@ interface ManagementSectionDef {
|
|
|
35
35
|
group: ManagementSectionGroup;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* Every section, in the native shells' order. Sections only one console has
|
|
39
|
+
* (see WEB_ONLY / NATIVE_ONLY) are filtered by presentManagementSections; the
|
|
40
|
+
* web's own wording and order are applied there too.
|
|
40
41
|
*/
|
|
41
42
|
declare const MANAGEMENT_SECTIONS: readonly ManagementSectionDef[];
|
|
42
43
|
interface ManagementAccessInput {
|
|
@@ -50,7 +51,7 @@ interface ManagementAccessInput {
|
|
|
50
51
|
* per-tenant admin. AuthApi's TeamService grants tenant owners/admins a role of
|
|
51
52
|
* the form "<slug>-admin", so any role ending in "-admin" is a tenant admin.
|
|
52
53
|
* super-user is NOT an admin: it's the trial/power-user role, so trial and
|
|
53
|
-
* consumer users see only
|
|
54
|
+
* consumer users see only their own pages (Preferences, Personalization, Schedules).
|
|
54
55
|
*/
|
|
55
56
|
declare function isWorkspaceAdminRole(roles: string[]): boolean;
|
|
56
57
|
/** Which sections this user can open: role first, then plan features. Pure, for tests and hosts. */
|
|
@@ -60,6 +61,8 @@ interface ManagementAccess {
|
|
|
60
61
|
isWorkspaceAdmin: boolean;
|
|
61
62
|
/** Admin-dashboard users limited to the lighter feature set. */
|
|
62
63
|
isLimitedAdmin: boolean;
|
|
64
|
+
/** Pro/Team plan: the model provider page (inside Advanced on the web). */
|
|
65
|
+
hasAdvancedSearch: boolean;
|
|
63
66
|
}
|
|
64
67
|
/**
|
|
65
68
|
* The signed-in user's Management access, presented for this console (web or
|
|
@@ -124,6 +127,116 @@ interface InterestsEditorProps {
|
|
|
124
127
|
*/
|
|
125
128
|
declare const InterestsEditor: ({ title, description, }: InterestsEditorProps) => react_jsx_runtime.JSX.Element;
|
|
126
129
|
|
|
130
|
+
interface MemoryManagerProps {
|
|
131
|
+
/**
|
|
132
|
+
* "sheet": the body of the Memories modal (chat surfaces, a close button, a
|
|
133
|
+
* fixed height). "page": the Settings page — searchable, and it grows with
|
|
134
|
+
* its list instead of scrolling inside a box.
|
|
135
|
+
*/
|
|
136
|
+
variant: "sheet" | "page";
|
|
137
|
+
/** On screen; memories load when this becomes true. The sheet passes its `open`. */
|
|
138
|
+
active?: boolean;
|
|
139
|
+
/** The sheet's close button. */
|
|
140
|
+
onClose?: () => void;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* What Bandit remembers: the memories you told it and the ones it noted
|
|
144
|
+
* itself, local to this browser or synced to your account. Add, edit, pin,
|
|
145
|
+
* delete, select several, clear by kind, and move local memories to the
|
|
146
|
+
* synced workspace. The Memories modal and the Personalization page both
|
|
147
|
+
* render this.
|
|
148
|
+
*/
|
|
149
|
+
declare const MemoryManager: React.FC<MemoryManagerProps>;
|
|
150
|
+
|
|
151
|
+
interface BanditPersonality {
|
|
152
|
+
name: string;
|
|
153
|
+
tagline: string;
|
|
154
|
+
systemPrompt: string;
|
|
155
|
+
commands: string[];
|
|
156
|
+
avatarBase64?: string | null;
|
|
157
|
+
avatarPreset?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface CustomInstructions {
|
|
161
|
+
/** "What should Bandit know about you?" */
|
|
162
|
+
about: string;
|
|
163
|
+
/** "How would you like Bandit to respond?" */
|
|
164
|
+
responseStyle: string;
|
|
165
|
+
}
|
|
166
|
+
/** Character limits for new text. Migrated text longer than this is kept; it can only be shortened. */
|
|
167
|
+
declare const CUSTOM_INSTRUCTIONS_LIMITS: {
|
|
168
|
+
readonly about: 1500;
|
|
169
|
+
readonly responseStyle: 1500;
|
|
170
|
+
};
|
|
171
|
+
declare const ASSISTANT_INSTRUCTIONS_LIMIT = 4000;
|
|
172
|
+
/** Bandit's own voice: what answers when nobody has written instructions. */
|
|
173
|
+
declare const DEFAULT_ASSISTANT_INSTRUCTIONS: string;
|
|
174
|
+
declare const MIGRATIONS_RECORD_ID = "migrations";
|
|
175
|
+
/** One-time data moves, by name, with when they ran. */
|
|
176
|
+
interface MigrationsRecord {
|
|
177
|
+
id: typeof MIGRATIONS_RECORD_ID;
|
|
178
|
+
/** The customized active personality was copied into Custom instructions. */
|
|
179
|
+
customInstructionsFromPersonality?: {
|
|
180
|
+
at: number;
|
|
181
|
+
from: string | null;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
interface PersonaPromptInput {
|
|
185
|
+
/** The workspace's Assistant instructions; empty when none were written. */
|
|
186
|
+
assistant: string;
|
|
187
|
+
custom: CustomInstructions;
|
|
188
|
+
/**
|
|
189
|
+
* The active personality's prompt (the pre-Phase-3 key), read for one more
|
|
190
|
+
* release so a workspace that has written nothing new keeps its voice.
|
|
191
|
+
*/
|
|
192
|
+
legacyPersonalityPrompt?: string | null;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* The PERSONA block's text. Assistant instructions come first; when the
|
|
196
|
+
* workspace wrote none, Bandit's default voice (or the legacy personality
|
|
197
|
+
* prompt) stands in — unless the person wrote Custom instructions, which then
|
|
198
|
+
* replace the default voice rather than compete with it. The person's two
|
|
199
|
+
* fields follow, labelled, so the model knows which is which.
|
|
200
|
+
*/
|
|
201
|
+
declare function composePersonaPrompt(input: PersonaPromptInput): string;
|
|
202
|
+
interface PersonalityMigrationInput {
|
|
203
|
+
/** The personality that answers chats today, if the model store has one. */
|
|
204
|
+
active: Pick<BanditPersonality, "name" | "systemPrompt"> | null | undefined;
|
|
205
|
+
/** What the person has already written; never overwritten. */
|
|
206
|
+
existing: CustomInstructions;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Decides whether the active personality's prompt should seed Custom
|
|
210
|
+
* instructions: only when it was customized (differs from Bandit's default
|
|
211
|
+
* voice) and the person has not written a response style of their own.
|
|
212
|
+
* Returns the field to write, or null for nothing to do.
|
|
213
|
+
*/
|
|
214
|
+
declare function planPersonalityMigration(input: PersonalityMigrationInput): {
|
|
215
|
+
responseStyle: string;
|
|
216
|
+
} | null;
|
|
217
|
+
type InstructionsSaveState = "idle" | "saving" | "saved" | "error";
|
|
218
|
+
type PersonalityMigrationOutcome = "migrated" | "nothing-to-migrate" | "already-done" | "not-ready";
|
|
219
|
+
interface InstructionsStore {
|
|
220
|
+
custom: CustomInstructions;
|
|
221
|
+
assistant: string;
|
|
222
|
+
hydrated: boolean;
|
|
223
|
+
migration: MigrationsRecord["customInstructionsFromPersonality"] | null;
|
|
224
|
+
saveState: InstructionsSaveState;
|
|
225
|
+
lastSavedAt: number | null;
|
|
226
|
+
hydrate: () => Promise<void>;
|
|
227
|
+
saveCustomInstructions: (next: CustomInstructions) => Promise<boolean>;
|
|
228
|
+
saveAssistantInstructions: (text: string) => Promise<boolean>;
|
|
229
|
+
/**
|
|
230
|
+
* Copies a customized active personality into Custom instructions, once.
|
|
231
|
+
* `ready` says the model store has finished loading, so an empty list is a
|
|
232
|
+
* real answer and not a race; until then nothing is recorded.
|
|
233
|
+
*/
|
|
234
|
+
migrateFromPersonality: (active: Pick<BanditPersonality, "name" | "systemPrompt"> | null | undefined, ready: boolean) => Promise<PersonalityMigrationOutcome>;
|
|
235
|
+
/** The PERSONA block for the next message, with the legacy personality prompt as the fallback. */
|
|
236
|
+
personaPrompt: (legacyPersonalityPrompt?: string | null) => string;
|
|
237
|
+
}
|
|
238
|
+
declare const useInstructionsStore: zustand.UseBoundStore<zustand.StoreApi<InstructionsStore>>;
|
|
239
|
+
|
|
127
240
|
declare function defineCustomElement<Props extends Record<string, unknown>>(name: string, Component: React.ComponentType<Props>): void;
|
|
128
241
|
|
|
129
242
|
/**
|
|
@@ -1894,4 +2007,4 @@ declare const createStashShareLink: (args: {
|
|
|
1894
2007
|
signal?: AbortSignal;
|
|
1895
2008
|
}) => Promise<StashShareLink>;
|
|
1896
2009
|
|
|
1897
|
-
export { AIMessage, AUTH_TOKEN_CHANGED_EVENT, type ActionItem, type AuthSessionConfig, type AuthSessionHandlers, Chat, type CreateMemoryOptions, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayQueryOptions, InterestsEditor, type JwtClaims, type LogContext, MANAGEMENT_SECTIONS, MAX_RECORDING_BYTES, MAX_RECORDING_SECONDS, Management, type ManagementAccess, type ManagementAccessInput, type ManagementLink, type ManagementProps, type ManagementRequest, type ManagementSectionDef, type ManagementSectionId, type MeetingNotes, type ChatFn as MeetingNotesChatFn, MeetingNotesError, type MeetingNotesInput, type MeetingNotesProgress, type MeetingNotesResult, type MeetingNotesSource, type MeetingNotesStage, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotesMeta, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, type ParsedTranscript, CHUNK_SECONDS as RECORDING_CHUNK_SECONDS, type RecordingTranscript, type RunMeetingNotesOptions, SYSTEM_FLAGS, type SearchOptions, type SearchResult, SpeechToTextError, StashError, type StashSaveResult, type StashShareLink, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, TOKEN_KEY, type TTSOptions, type TTSProgress, TTSState, type TokenPersistence, type TokenStorageMode, type TranscriptFormat, type TranscriptSegment, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, chunkTranscript, createStashShareLink, debugLogger, defineCustomElement, describeMeetingInput, featureFlagService, generateMeetingNotes, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, isMeetingFile, isRecordingFile, isTranscriptFileName, isWorkspaceAdminRole, looksLikeTranscript, meetingNotesErrorMessage, notesToHtml, notesToMarkdown, notificationService, parseNotesJson, parseTranscript, pauseTTS, previewTierUpgrade, resolveManagementSections, resumeTTS, runMeetingNotes, saveToStash, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stashAvailable, stopTTS, syncSubscriptionWithAPI, transcribeRecording, transcriptToText, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useManagementAccess, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
|
|
2010
|
+
export { AIMessage, ASSISTANT_INSTRUCTIONS_LIMIT, AUTH_TOKEN_CHANGED_EVENT, type ActionItem, type AuthSessionConfig, type AuthSessionHandlers, CUSTOM_INSTRUCTIONS_LIMITS, Chat, type CreateMemoryOptions, type CustomInstructions, DEFAULT_ASSISTANT_INSTRUCTIONS, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayQueryOptions, InterestsEditor, type JwtClaims, type LogContext, MANAGEMENT_SECTIONS, MAX_RECORDING_BYTES, MAX_RECORDING_SECONDS, Management, type ManagementAccess, type ManagementAccessInput, type ManagementLink, type ManagementProps, type ManagementRequest, type ManagementSectionDef, type ManagementSectionId, type MeetingNotes, type ChatFn as MeetingNotesChatFn, MeetingNotesError, type MeetingNotesInput, type MeetingNotesProgress, type MeetingNotesResult, type MeetingNotesSource, type MeetingNotesStage, MemoryManager, type MemoryManagerProps, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotesMeta, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, type ParsedTranscript, type PersonaPromptInput, CHUNK_SECONDS as RECORDING_CHUNK_SECONDS, type RecordingTranscript, type RunMeetingNotesOptions, SYSTEM_FLAGS, type SearchOptions, type SearchResult, SpeechToTextError, StashError, type StashSaveResult, type StashShareLink, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, TOKEN_KEY, type TTSOptions, type TTSProgress, TTSState, type TokenPersistence, type TokenStorageMode, type TranscriptFormat, type TranscriptSegment, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, chunkTranscript, composePersonaPrompt, createStashShareLink, debugLogger, defineCustomElement, describeMeetingInput, featureFlagService, generateMeetingNotes, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, isMeetingFile, isRecordingFile, isTranscriptFileName, isWorkspaceAdminRole, looksLikeTranscript, meetingNotesErrorMessage, notesToHtml, notesToMarkdown, notificationService, parseNotesJson, parseTranscript, pauseTTS, planPersonalityMigration, previewTierUpgrade, resolveManagementSections, resumeTTS, runMeetingNotes, saveToStash, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stashAvailable, stopTTS, syncSubscriptionWithAPI, transcribeRecording, transcriptToText, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useInstructionsStore, useManagementAccess, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
|