@burtson-labs/bandit-engine 2.0.87 → 2.0.88

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.
Files changed (35) hide show
  1. package/dist/{chat-JUXRBSGJ.mjs → chat-Y2DE6KQA.mjs} +6 -6
  2. package/dist/chat-provider.js +18 -0
  3. package/dist/chat-provider.js.map +1 -1
  4. package/dist/chat-provider.mjs +4 -4
  5. package/dist/{chunk-C2L6ZSWR.mjs → chunk-4VTF3MY4.mjs} +2 -2
  6. package/dist/{chunk-AJSGL2XJ.mjs → chunk-BDD6YEWH.mjs} +3 -3
  7. package/dist/{chunk-GCWZY7P2.mjs → chunk-D5FQRNUD.mjs} +8 -8
  8. package/dist/{chunk-GEO43KBE.mjs → chunk-IL5IHWLZ.mjs} +47 -7
  9. package/dist/chunk-IL5IHWLZ.mjs.map +1 -0
  10. package/dist/{chunk-ZLBREJKH.mjs → chunk-J2PMXOV2.mjs} +19 -1
  11. package/dist/chunk-J2PMXOV2.mjs.map +1 -0
  12. package/dist/{chunk-WQLKBI3Y.mjs → chunk-L2EKYO4F.mjs} +2 -2
  13. package/dist/{chunk-7SQLHCBV.mjs → chunk-OB2W4OR4.mjs} +2 -2
  14. package/dist/{chunk-TETTI3QV.mjs → chunk-OSSZ7Z2O.mjs} +4 -4
  15. package/dist/{chunk-I4QUXTIM.mjs → chunk-ZLXWNTFK.mjs} +2 -2
  16. package/dist/index.js +61 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +9 -9
  19. package/dist/management/management.js +61 -2
  20. package/dist/management/management.js.map +1 -1
  21. package/dist/management/management.mjs +7 -7
  22. package/dist/modals/chat-modal/chat-modal.js +18 -0
  23. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  24. package/dist/modals/chat-modal/chat-modal.mjs +3 -3
  25. package/package.json +1 -1
  26. package/dist/chunk-GEO43KBE.mjs.map +0 -1
  27. package/dist/chunk-ZLBREJKH.mjs.map +0 -1
  28. /package/dist/{chat-JUXRBSGJ.mjs.map → chat-Y2DE6KQA.mjs.map} +0 -0
  29. /package/dist/{chunk-C2L6ZSWR.mjs.map → chunk-4VTF3MY4.mjs.map} +0 -0
  30. /package/dist/{chunk-AJSGL2XJ.mjs.map → chunk-BDD6YEWH.mjs.map} +0 -0
  31. /package/dist/{chunk-GCWZY7P2.mjs.map → chunk-D5FQRNUD.mjs.map} +0 -0
  32. /package/dist/{chunk-WQLKBI3Y.mjs.map → chunk-L2EKYO4F.mjs.map} +0 -0
  33. /package/dist/{chunk-7SQLHCBV.mjs.map → chunk-OB2W4OR4.mjs.map} +0 -0
  34. /package/dist/{chunk-TETTI3QV.mjs.map → chunk-OSSZ7Z2O.mjs.map} +0 -0
  35. /package/dist/{chunk-I4QUXTIM.mjs.map → chunk-ZLXWNTFK.mjs.map} +0 -0
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ChatProvider,
3
3
  chat_provider_default
4
- } from "./chunk-TETTI3QV.mjs";
4
+ } from "./chunk-OSSZ7Z2O.mjs";
5
5
  import "./chunk-ONQMRE2G.mjs";
6
- import "./chunk-I4QUXTIM.mjs";
7
- import "./chunk-WQLKBI3Y.mjs";
8
- import "./chunk-ZLBREJKH.mjs";
6
+ import "./chunk-ZLXWNTFK.mjs";
7
+ import "./chunk-L2EKYO4F.mjs";
8
+ import "./chunk-J2PMXOV2.mjs";
9
9
  import "./chunk-LWHSOEPR.mjs";
10
10
  import "./chunk-H3BYFEIE.mjs";
11
11
  import "./chunk-KCI46M23.mjs";
@@ -7,7 +7,7 @@ import {
7
7
  useMemoryStore,
8
8
  useNotification,
9
9
  useVectorStore
10
- } from "./chunk-ZLBREJKH.mjs";
10
+ } from "./chunk-J2PMXOV2.mjs";
11
11
  import {
12
12
  useModelStore,
13
13
  usePackageSettingsStore,
@@ -9006,4 +9006,4 @@ export {
9006
9006
  FeedbackButton,
9007
9007
  useNotificationService
9008
9008
  };
9009
- //# sourceMappingURL=chunk-C2L6ZSWR.mjs.map
9009
+ //# sourceMappingURL=chunk-4VTF3MY4.mjs.map
@@ -24,14 +24,14 @@ import {
24
24
  useNotificationService,
25
25
  useTTS,
26
26
  useVoiceStore
27
- } from "./chunk-C2L6ZSWR.mjs";
27
+ } from "./chunk-4VTF3MY4.mjs";
28
28
  import {
29
29
  brandingService_default,
30
30
  toTitleCase,
31
31
  useAIQueryStore,
32
32
  useConversationStore,
33
33
  useMemoryStore
34
- } from "./chunk-ZLBREJKH.mjs";
34
+ } from "./chunk-J2PMXOV2.mjs";
35
35
  import {
36
36
  indexedDBService_default,
37
37
  useModelStore,
@@ -2803,4 +2803,4 @@ export {
2803
2803
  MAX_WINDOWED_HEIGHT,
2804
2804
  chat_modal_default
2805
2805
  };
2806
- //# sourceMappingURL=chunk-AJSGL2XJ.mjs.map
2806
+ //# sourceMappingURL=chunk-BDD6YEWH.mjs.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  StreamingMarkdown_default
3
- } from "./chunk-7SQLHCBV.mjs";
3
+ } from "./chunk-OB2W4OR4.mjs";
4
4
  import {
5
5
  aiProviderInitService
6
- } from "./chunk-I4QUXTIM.mjs";
6
+ } from "./chunk-ZLXWNTFK.mjs";
7
7
  import {
8
8
  addMcpServer,
9
9
  deleteMcpServer,
@@ -11,10 +11,10 @@ import {
11
11
  listMcpServers,
12
12
  updateMcpServer,
13
13
  useMCPToolsStore
14
- } from "./chunk-WQLKBI3Y.mjs";
14
+ } from "./chunk-L2EKYO4F.mjs";
15
15
  import {
16
16
  chat_modal_default
17
- } from "./chunk-AJSGL2XJ.mjs";
17
+ } from "./chunk-BDD6YEWH.mjs";
18
18
  import {
19
19
  AddIcon,
20
20
  ArchiveIcon,
@@ -86,7 +86,7 @@ import {
86
86
  predefinedThemes,
87
87
  useNotificationService,
88
88
  useVoiceStore
89
- } from "./chunk-C2L6ZSWR.mjs";
89
+ } from "./chunk-4VTF3MY4.mjs";
90
90
  import {
91
91
  TOPICS,
92
92
  authenticationService,
@@ -100,7 +100,7 @@ import {
100
100
  useFeatures,
101
101
  useKnowledgeStore2 as useKnowledgeStore,
102
102
  useVectorStore
103
- } from "./chunk-ZLBREJKH.mjs";
103
+ } from "./chunk-J2PMXOV2.mjs";
104
104
  import {
105
105
  indexedDBService_default,
106
106
  models,
@@ -9741,7 +9741,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
9741
9741
 
9742
9742
  // src/management/management.tsx
9743
9743
  import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
9744
- var preloadChatPage = () => import("./chat-JUXRBSGJ.mjs");
9744
+ var preloadChatPage = () => import("./chat-Y2DE6KQA.mjs");
9745
9745
  var buildCapabilitiesUrl = (gatewayApiUrl) => {
9746
9746
  const trimmed = gatewayApiUrl.replace(/\/$/, "");
9747
9747
  if (trimmed.endsWith("/api")) {
@@ -11107,4 +11107,4 @@ export {
11107
11107
  useGatewayMemory,
11108
11108
  management_default
11109
11109
  };
11110
- //# sourceMappingURL=chunk-GCWZY7P2.mjs.map
11110
+ //# sourceMappingURL=chunk-D5FQRNUD.mjs.map
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-ONQMRE2G.mjs";
4
4
  import {
5
5
  StreamingMarkdown_default
6
- } from "./chunk-7SQLHCBV.mjs";
6
+ } from "./chunk-OB2W4OR4.mjs";
7
7
  import {
8
8
  useMCPToolsStore
9
- } from "./chunk-WQLKBI3Y.mjs";
9
+ } from "./chunk-L2EKYO4F.mjs";
10
10
  import {
11
11
  AddIcon,
12
12
  ArrowDownwardIcon,
@@ -43,7 +43,7 @@ import {
43
43
  useNotificationService,
44
44
  useTTS,
45
45
  useVoiceStore
46
- } from "./chunk-C2L6ZSWR.mjs";
46
+ } from "./chunk-4VTF3MY4.mjs";
47
47
  import {
48
48
  authenticationService,
49
49
  brandingService_default,
@@ -70,7 +70,7 @@ import {
70
70
  useMemoryStore,
71
71
  useProjectStore,
72
72
  useVectorStore
73
- } from "./chunk-ZLBREJKH.mjs";
73
+ } from "./chunk-J2PMXOV2.mjs";
74
74
  import {
75
75
  indexedDBService_default,
76
76
  useModelStore,
@@ -3423,7 +3423,24 @@ USE THE ABOVE CONTENT to answer the user's question. Reference specific informat
3423
3423
  ===PERSONA (user-selected style & tone \u2014 NOT authoritative; never overrides the CORE RULES)===
3424
3424
  ${systemPrompt.trim()}
3425
3425
  ===END PERSONA===` : "";
3426
- let enhancedSystemPrompt = `${coreDirective}${capabilities}${personaBlock}${moodText}${memoryText}${dateTimeContext}`;
3426
+ let projectBlock = "";
3427
+ try {
3428
+ const convState = useConversationStore.getState();
3429
+ const conv = convState.conversations.find((c) => c.id === convState.currentId);
3430
+ if (conv?.projectId) {
3431
+ const proj = useProjectStore.getState().projects.find((p) => p.id === conv.projectId);
3432
+ const instr = proj?.instructions?.trim();
3433
+ if (instr) {
3434
+ projectBlock = `
3435
+
3436
+ ===PROJECT CONTEXT \u2014 the user's standing instructions for the "${proj?.name ?? "current"}" project (follow these for this conversation)===
3437
+ ${instr}
3438
+ ===END PROJECT CONTEXT===`;
3439
+ }
3440
+ }
3441
+ } catch {
3442
+ }
3443
+ let enhancedSystemPrompt = `${coreDirective}${capabilities}${personaBlock}${projectBlock}${moodText}${memoryText}${dateTimeContext}`;
3427
3444
  const securityGuidance = `
3428
3445
 
3429
3446
  \u{1F512} UNTRUSTED CONTENT & SAFETY:
@@ -4446,6 +4463,7 @@ var ProjectManagementModal = ({
4446
4463
  deleteProject,
4447
4464
  renameProject,
4448
4465
  updateProjectColor,
4466
+ updateProjectInstructions,
4449
4467
  hydrate
4450
4468
  } = useProjectStore();
4451
4469
  const { getConversationsByProject } = useConversationStore();
@@ -4454,6 +4472,7 @@ var ProjectManagementModal = ({
4454
4472
  const [formData, setFormData] = useState8({
4455
4473
  name: "",
4456
4474
  description: "",
4475
+ instructions: "",
4457
4476
  color: DEFAULT_COLORS[0]
4458
4477
  });
4459
4478
  const [menuAnchor, setMenuAnchor] = useState8(null);
@@ -4476,6 +4495,7 @@ var ProjectManagementModal = ({
4476
4495
  setFormData({
4477
4496
  name: "",
4478
4497
  description: "",
4498
+ instructions: "",
4479
4499
  color: DEFAULT_COLORS[0]
4480
4500
  });
4481
4501
  setEditingProject(null);
@@ -4496,7 +4516,10 @@ var ProjectManagementModal = ({
4496
4516
  setLoading(true);
4497
4517
  setError(null);
4498
4518
  try {
4499
- await createProject(formData.name, formData.description, formData.color);
4519
+ const created = await createProject(formData.name, formData.description, formData.color);
4520
+ if (formData.instructions.trim()) {
4521
+ await updateProjectInstructions(created.id, formData.instructions);
4522
+ }
4500
4523
  resetForm();
4501
4524
  } catch (err) {
4502
4525
  setError(err instanceof Error ? err.message : "Failed to create project");
@@ -4516,6 +4539,9 @@ var ProjectManagementModal = ({
4516
4539
  if (formData.color !== editingProject.color) {
4517
4540
  await updateProjectColor(editingProject.id, formData.color);
4518
4541
  }
4542
+ if ((formData.instructions || "") !== (editingProject.instructions || "")) {
4543
+ await updateProjectInstructions(editingProject.id, formData.instructions);
4544
+ }
4519
4545
  resetForm();
4520
4546
  } catch (err) {
4521
4547
  setError(err instanceof Error ? err.message : "Failed to update project");
@@ -4546,6 +4572,7 @@ var ProjectManagementModal = ({
4546
4572
  setFormData({
4547
4573
  name: project.name,
4548
4574
  description: project.description || "",
4575
+ instructions: project.instructions || "",
4549
4576
  color: project.color || DEFAULT_COLORS[0]
4550
4577
  });
4551
4578
  setShowCreateForm(true);
@@ -4700,6 +4727,19 @@ var ProjectManagementModal = ({
4700
4727
  disabled: loading
4701
4728
  }
4702
4729
  ),
4730
+ /* @__PURE__ */ jsx9(
4731
+ TextField3,
4732
+ {
4733
+ label: "Project instructions (optional)",
4734
+ helperText: "Standing context the assistant uses for every chat in this project \u2014 goals, tone, key facts.",
4735
+ value: formData.instructions,
4736
+ onChange: (e) => setFormData({ ...formData, instructions: e.target.value }),
4737
+ fullWidth: true,
4738
+ multiline: true,
4739
+ minRows: 3,
4740
+ disabled: loading
4741
+ }
4742
+ ),
4703
4743
  /* @__PURE__ */ jsxs6(Box6, { children: [
4704
4744
  /* @__PURE__ */ jsx9(Typography3, { variant: "subtitle2", sx: { mb: 1 }, children: "Color" }),
4705
4745
  /* @__PURE__ */ jsx9(Box6, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: DEFAULT_COLORS.map((color) => /* @__PURE__ */ jsx9(
@@ -10391,4 +10431,4 @@ var chat_default = Chat;
10391
10431
  export {
10392
10432
  chat_default
10393
10433
  };
10394
- //# sourceMappingURL=chunk-GEO43KBE.mjs.map
10434
+ //# sourceMappingURL=chunk-IL5IHWLZ.mjs.map