@dsh-agentic-roleplay/core 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/lib/{authoring-tools-C2BHkEFP.js → authoring-tools-BGzzW6O5.js} +7 -6
  2. package/lib/authoring.js +5 -5
  3. package/lib/{child-DsixtqTw.js → child-D5SVNk4O.js} +58 -71
  4. package/lib/client.js +747 -316
  5. package/lib/client.js.map +1 -1
  6. package/lib/compaction.js +18 -23
  7. package/lib/doctor.js +2 -2
  8. package/lib/{gallery-CDYKJf_O.js → gallery-C7VOJ3xH.js} +2 -2
  9. package/lib/{generator-BR1ugzln.js → generator-CO8usAjE.js} +2 -2
  10. package/lib/helper.js +26 -0
  11. package/lib/{hooks-CHmUksFS.js → hooks-BLperIIB.js} +70 -7
  12. package/lib/images.js +4 -4
  13. package/lib/index.js +64 -22
  14. package/lib/{library-COIktKBa.js → library-DsDc6fQa.js} +2 -2
  15. package/lib/{lorebook-author-tools-CaT74Q7v.js → lorebook-author-tools-C-cFiE6E.js} +6 -6
  16. package/lib/lorebook-authoring.js +3 -3
  17. package/lib/{narration-DstnwrvX.js → narration-_dA9oIt2.js} +57 -2
  18. package/lib/orchestration.js +372 -48
  19. package/lib/{pack-jail-CEDDI4Xw.js → pack-jail-BKFmbYP8.js} +10 -10
  20. package/lib/{packs-DB_9xiCp.js → packs-ZTG7fWut.js} +2 -2
  21. package/lib/{presenter-agent-Gu34bZwd.js → presenter-agent-BHSbyWwZ.js} +5 -5
  22. package/lib/{preset-BL1d40oG.js → preset-CJLW8Mp0.js} +3 -3
  23. package/lib/{preset-author-tools-B2wZXKZo.js → preset-author-tools-1RstgEZs.js} +5 -5
  24. package/lib/preset-authoring.js +4 -4
  25. package/lib/{presets-Dc15L6OU.js → presets-DcPCnn8O.js} +3 -3
  26. package/lib/{reflection-BWMVdHhR.js → reflection-6qfOC5OT.js} +236 -32
  27. package/lib/text-CT1re6XT.js +18 -0
  28. package/package.json +38 -41
  29. package/prompts/en/roleplay/check-rule.md +3 -0
  30. package/prompts/en/roleplay/decide-reflection.md +3 -0
  31. package/prompts/en/roleplay/decide-trigger.md +3 -0
  32. package/prompts/en/roleplay/gate-agency.md +1 -0
  33. package/prompts/en/roleplay/gate-refusal.md +1 -0
  34. package/prompts/en/roleplay/gate-secret.md +3 -0
  35. package/prompts/zh/roleplay/check-rule.md +3 -0
  36. package/prompts/zh/roleplay/decide-reflection.md +3 -0
  37. package/prompts/zh/roleplay/decide-trigger.md +3 -0
  38. package/prompts/zh/roleplay/gate-agency.md +1 -0
  39. package/prompts/zh/roleplay/gate-refusal.md +1 -0
  40. package/prompts/zh/roleplay/gate-secret.md +3 -0
package/lib/client.js CHANGED
@@ -37,8 +37,8 @@ window.__ModuleLoader__.load({
37
37
  }
38
38
  tag$32.textContent = css$32;
39
39
  var PageTabs_module_css_default = {
40
- "tab": "rp_Poldga_tab",
41
- "tabs": "rp_Poldga_tabs"
40
+ "tabs": "rp_Poldga_tabs",
41
+ "tab": "rp_Poldga_tab"
42
42
  };
43
43
  //#endregion
44
44
  //#region src/client/panel/PageTabs.tsx
@@ -94,9 +94,9 @@ window.__ModuleLoader__.load({
94
94
  tag$31.textContent = css$31;
95
95
  var RoleplayPanel_module_css_default = {
96
96
  "panel": "rp_ua5gBa_panel",
97
+ "body": "rp_ua5gBa_body",
97
98
  "title": "rp_ua5gBa_title",
98
- "header": "rp_ua5gBa_header",
99
- "body": "rp_ua5gBa_body"
99
+ "header": "rp_ua5gBa_header"
100
100
  };
101
101
  //#endregion
102
102
  //#region src/client/panel/RoleplayPanel.tsx
@@ -429,34 +429,34 @@ window.__ModuleLoader__.load({
429
429
  }
430
430
  tag$30.textContent = css$30;
431
431
  var ImportCard_module_css_default = {
432
- "fieldHead": "rp_5cvtma_fieldHead",
432
+ "top": "rp_5cvtma_top",
433
+ "label": "rp_5cvtma_label",
434
+ "entry": "rp_5cvtma_entry",
433
435
  "entryHead": "rp_5cvtma_entryHead",
434
- "section": "rp_5cvtma_section",
435
436
  "fieldTitle": "rp_5cvtma_fieldTitle",
436
- "fieldMeta": "rp_5cvtma_fieldMeta",
437
+ "entryTitle": "rp_5cvtma_entryTitle",
437
438
  "entryOff": "rp_5cvtma_entryOff",
438
- "choice": "rp_5cvtma_choice",
439
- "row": "rp_5cvtma_row",
440
- "preview": "rp_5cvtma_preview",
441
- "text": "rp_5cvtma_text",
442
- "body": "rp_5cvtma_body",
443
- "note": "rp_5cvtma_note",
444
- "entry": "rp_5cvtma_entry",
445
439
  "space": "rp_5cvtma_space",
440
+ "heading": "rp_5cvtma_heading",
441
+ "choice": "rp_5cvtma_choice",
442
+ "picture": "rp_5cvtma_picture",
446
443
  "about": "rp_5cvtma_about",
447
- "entryTitle": "rp_5cvtma_entryTitle",
444
+ "note": "rp_5cvtma_note",
445
+ "section": "rp_5cvtma_section",
446
+ "fieldMeta": "rp_5cvtma_fieldMeta",
447
+ "fieldHead": "rp_5cvtma_fieldHead",
448
+ "field": "rp_5cvtma_field",
448
449
  "choiceText": "rp_5cvtma_choiceText",
449
- "header": "rp_5cvtma_header",
450
+ "tags": "rp_5cvtma_tags",
451
+ "noPicture": "rp_5cvtma_noPicture",
450
452
  "error": "rp_5cvtma_error",
453
+ "row": "rp_5cvtma_row",
454
+ "header": "rp_5cvtma_header",
451
455
  "page": "rp_5cvtma_page",
452
- "label": "rp_5cvtma_label",
453
- "title": "rp_5cvtma_title",
454
- "top": "rp_5cvtma_top",
455
- "picture": "rp_5cvtma_picture",
456
- "noPicture": "rp_5cvtma_noPicture",
457
- "heading": "rp_5cvtma_heading",
458
- "field": "rp_5cvtma_field",
459
- "tags": "rp_5cvtma_tags"
456
+ "body": "rp_5cvtma_body",
457
+ "preview": "rp_5cvtma_preview",
458
+ "text": "rp_5cvtma_text",
459
+ "title": "rp_5cvtma_title"
460
460
  };
461
461
  //#endregion
462
462
  //#region src/client/widgets/import-card/ImportCard.tsx
@@ -815,38 +815,38 @@ window.__ModuleLoader__.load({
815
815
  }
816
816
  tag$29.textContent = css$29;
817
817
  var CataloguePage_module_css_default = {
818
- "search": "rp_qK1u-G_search",
818
+ "detail": "rp_qK1u-G_detail",
819
819
  "grid": "rp_qK1u-G_grid",
820
820
  "more": "rp_qK1u-G_more",
821
- "description": "rp_qK1u-G_description",
822
- "card": "rp_qK1u-G_card",
823
- "form": "rp_qK1u-G_form",
824
- "body": "rp_qK1u-G_body",
825
- "update": "rp_qK1u-G_update",
826
- "warning": "rp_qK1u-G_warning",
827
821
  "spacer": "rp_qK1u-G_spacer",
828
- "name": "rp_qK1u-G_name",
829
- "kinds": "rp_qK1u-G_kinds",
830
822
  "cover": "rp_qK1u-G_cover",
831
- "success": "rp_qK1u-G_success",
832
- "page": "rp_qK1u-G_page",
833
823
  "select": "rp_qK1u-G_select",
834
- "image": "rp_qK1u-G_image",
835
- "label": "rp_qK1u-G_label",
836
- "toolbar": "rp_qK1u-G_toolbar",
837
- "placeholder": "rp_qK1u-G_placeholder",
838
824
  "status": "rp_qK1u-G_status",
839
- "tags": "rp_qK1u-G_tags",
825
+ "card": "rp_qK1u-G_card",
826
+ "kinds": "rp_qK1u-G_kinds",
827
+ "form": "rp_qK1u-G_form",
828
+ "page": "rp_qK1u-G_page",
829
+ "name": "rp_qK1u-G_name",
840
830
  "viewport": "rp_qK1u-G_viewport",
841
831
  "notice": "rp_qK1u-G_notice",
832
+ "body": "rp_qK1u-G_body",
842
833
  "meta": "rp_qK1u-G_meta",
843
834
  "message": "rp_qK1u-G_message",
844
- "kind": "rp_qK1u-G_kind",
835
+ "field": "rp_qK1u-G_field",
836
+ "description": "rp_qK1u-G_description",
845
837
  "updates": "rp_qK1u-G_updates",
846
- "actions": "rp_qK1u-G_actions",
838
+ "search": "rp_qK1u-G_search",
839
+ "update": "rp_qK1u-G_update",
840
+ "image": "rp_qK1u-G_image",
841
+ "warning": "rp_qK1u-G_warning",
847
842
  "changes": "rp_qK1u-G_changes",
848
- "detail": "rp_qK1u-G_detail",
849
- "field": "rp_qK1u-G_field"
843
+ "actions": "rp_qK1u-G_actions",
844
+ "placeholder": "rp_qK1u-G_placeholder",
845
+ "toolbar": "rp_qK1u-G_toolbar",
846
+ "kind": "rp_qK1u-G_kind",
847
+ "label": "rp_qK1u-G_label",
848
+ "tags": "rp_qK1u-G_tags",
849
+ "success": "rp_qK1u-G_success"
850
850
  };
851
851
  //#endregion
852
852
  //#region src/client/pages/catalogue/ImportUrlDialog.tsx
@@ -1049,19 +1049,19 @@ window.__ModuleLoader__.load({
1049
1049
  }
1050
1050
  tag$28.textContent = css$28;
1051
1051
  var ImportSelection_module_css_default = {
1052
- "meta": "rp_Jx0l4q_meta",
1053
1052
  "row": "rp_Jx0l4q_row",
1054
1053
  "help": "rp_Jx0l4q_help",
1055
- "note": "rp_Jx0l4q_note",
1056
- "sampling": "rp_Jx0l4q_sampling",
1054
+ "error": "rp_Jx0l4q_error",
1055
+ "bar": "rp_Jx0l4q_bar",
1057
1056
  "extra": "rp_Jx0l4q_extra",
1058
- "full": "rp_Jx0l4q_full",
1057
+ "body": "rp_Jx0l4q_body",
1059
1058
  "text": "rp_Jx0l4q_text",
1060
- "bar": "rp_Jx0l4q_bar",
1061
- "error": "rp_Jx0l4q_error",
1059
+ "meta": "rp_Jx0l4q_meta",
1060
+ "full": "rp_Jx0l4q_full",
1062
1061
  "count": "rp_Jx0l4q_count",
1063
- "body": "rp_Jx0l4q_body",
1064
- "list": "rp_Jx0l4q_list"
1062
+ "list": "rp_Jx0l4q_list",
1063
+ "sampling": "rp_Jx0l4q_sampling",
1064
+ "note": "rp_Jx0l4q_note"
1065
1065
  };
1066
1066
  //#endregion
1067
1067
  //#region src/client/widgets/import-selection/ImportSelection.tsx
@@ -2933,40 +2933,40 @@ window.__ModuleLoader__.load({
2933
2933
  }
2934
2934
  tag$27.textContent = css$27;
2935
2935
  var CharactersPanel_module_css_default = {
2936
- "label": "rp_5ZMIxq_label",
2937
- "wide": "rp_5ZMIxq_wide",
2936
+ "portraitError": "rp_5ZMIxq_portraitError",
2937
+ "barText": "rp_5ZMIxq_barText",
2938
+ "head": "rp_5ZMIxq_head",
2939
+ "panel": "rp_5ZMIxq_panel",
2938
2940
  "goal": "rp_5ZMIxq_goal",
2939
- "sheet": "rp_5ZMIxq_sheet",
2940
- "tabOn": "rp_5ZMIxq_tabOn",
2941
+ "meta": "rp_5ZMIxq_meta",
2942
+ "tabs": "rp_5ZMIxq_tabs",
2943
+ "grid": "rp_5ZMIxq_grid",
2941
2944
  "area": "rp_5ZMIxq_area",
2945
+ "portraitHint": "rp_5ZMIxq_portraitHint",
2946
+ "tab": "rp_5ZMIxq_tab",
2942
2947
  "body": "rp_5ZMIxq_body",
2943
- "help": "rp_5ZMIxq_help",
2944
- "barText": "rp_5ZMIxq_barText",
2945
- "error": "rp_5ZMIxq_error",
2946
2948
  "portrait": "rp_5ZMIxq_portrait",
2947
- "section": "rp_5ZMIxq_section",
2948
- "portraitAction": "rp_5ZMIxq_portraitAction",
2949
- "grid": "rp_5ZMIxq_grid",
2950
- "nameInput": "rp_5ZMIxq_nameInput",
2949
+ "tabsSpace": "rp_5ZMIxq_tabsSpace",
2951
2950
  "bar": "rp_5ZMIxq_bar",
2952
- "portraitError": "rp_5ZMIxq_portraitError",
2953
- "portraitHint": "rp_5ZMIxq_portraitHint",
2954
- "voiceInline": "rp_5ZMIxq_voiceInline",
2951
+ "nameInput": "rp_5ZMIxq_nameInput",
2952
+ "help": "rp_5ZMIxq_help",
2955
2953
  "portraitBox": "rp_5ZMIxq_portraitBox",
2956
- "meta": "rp_5ZMIxq_meta",
2957
- "select": "rp_5ZMIxq_select",
2958
- "head": "rp_5ZMIxq_head",
2959
- "tab": "rp_5ZMIxq_tab",
2960
- "tabsSpace": "rp_5ZMIxq_tabsSpace",
2954
+ "sectionTitle": "rp_5ZMIxq_sectionTitle",
2955
+ "wide": "rp_5ZMIxq_wide",
2956
+ "empty": "rp_5ZMIxq_empty",
2957
+ "voiceInline": "rp_5ZMIxq_voiceInline",
2961
2958
  "missing": "rp_5ZMIxq_missing",
2962
- "field": "rp_5ZMIxq_field",
2963
- "tabs": "rp_5ZMIxq_tabs",
2959
+ "tabOn": "rp_5ZMIxq_tabOn",
2960
+ "error": "rp_5ZMIxq_error",
2961
+ "select": "rp_5ZMIxq_select",
2964
2962
  "placeholder": "rp_5ZMIxq_placeholder",
2963
+ "portraitAction": "rp_5ZMIxq_portraitAction",
2964
+ "field": "rp_5ZMIxq_field",
2965
2965
  "row": "rp_5ZMIxq_row",
2966
+ "sheet": "rp_5ZMIxq_sheet",
2967
+ "section": "rp_5ZMIxq_section",
2966
2968
  "initial": "rp_5ZMIxq_initial",
2967
- "panel": "rp_5ZMIxq_panel",
2968
- "empty": "rp_5ZMIxq_empty",
2969
- "sectionTitle": "rp_5ZMIxq_sectionTitle"
2969
+ "label": "rp_5ZMIxq_label"
2970
2970
  };
2971
2971
  //#endregion
2972
2972
  //#region src/client/world-editor/EditorTabs.tsx
@@ -4691,39 +4691,39 @@ window.__ModuleLoader__.load({
4691
4691
  }
4692
4692
  tag$26.textContent = css$26;
4693
4693
  var RelationsPanel_module_css_default = {
4694
- "inspector": "rp_7pEHTW_inspector",
4695
- "check": "rp_7pEHTW_check",
4696
- "panel": "rp_7pEHTW_panel",
4697
- "edgeOn": "rp_7pEHTW_edgeOn",
4698
- "node_faction": "rp_7pEHTW_node_faction",
4699
- "edgeTitle": "rp_7pEHTW_edgeTitle",
4700
- "toolbar": "rp_7pEHTW_toolbar",
4701
- "filterOn": "rp_7pEHTW_filterOn",
4702
- "head": "rp_7pEHTW_head",
4703
- "notice": "rp_7pEHTW_notice",
4704
- "entities": "rp_7pEHTW_entities",
4705
4694
  "graphInspector": "rp_7pEHTW_graphInspector",
4706
- "wide": "rp_7pEHTW_wide",
4695
+ "workspace": "rp_7pEHTW_workspace",
4696
+ "space": "rp_7pEHTW_space",
4697
+ "status": "rp_7pEHTW_status",
4698
+ "edgeKind": "rp_7pEHTW_edgeKind",
4699
+ "form": "rp_7pEHTW_form",
4700
+ "toolbar": "rp_7pEHTW_toolbar",
4701
+ "edgeTitle": "rp_7pEHTW_edgeTitle",
4702
+ "node_item": "rp_7pEHTW_node_item",
4707
4703
  "empty": "rp_7pEHTW_empty",
4708
- "node_character": "rp_7pEHTW_node_character",
4709
- "actions": "rp_7pEHTW_actions",
4710
- "perspective": "rp_7pEHTW_perspective",
4711
- "graph": "rp_7pEHTW_graph",
4704
+ "wide": "rp_7pEHTW_wide",
4712
4705
  "edge": "rp_7pEHTW_edge",
4713
- "node": "rp_7pEHTW_node",
4714
- "graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
4706
+ "inspector": "rp_7pEHTW_inspector",
4707
+ "node_character": "rp_7pEHTW_node_character",
4708
+ "node_faction": "rp_7pEHTW_node_faction",
4709
+ "head": "rp_7pEHTW_head",
4710
+ "error": "rp_7pEHTW_error",
4711
+ "edgeOn": "rp_7pEHTW_edgeOn",
4715
4712
  "list": "rp_7pEHTW_list",
4713
+ "graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
4714
+ "node": "rp_7pEHTW_node",
4715
+ "perspective": "rp_7pEHTW_perspective",
4716
+ "check": "rp_7pEHTW_check",
4717
+ "metrics": "rp_7pEHTW_metrics",
4716
4718
  "graphEdge": "rp_7pEHTW_graphEdge",
4717
- "filter": "rp_7pEHTW_filter",
4718
- "error": "rp_7pEHTW_error",
4719
- "space": "rp_7pEHTW_space",
4720
- "edgeKind": "rp_7pEHTW_edgeKind",
4721
- "status": "rp_7pEHTW_status",
4719
+ "panel": "rp_7pEHTW_panel",
4720
+ "entities": "rp_7pEHTW_entities",
4721
+ "notice": "rp_7pEHTW_notice",
4722
4722
  "node_location": "rp_7pEHTW_node_location",
4723
- "workspace": "rp_7pEHTW_workspace",
4724
- "form": "rp_7pEHTW_form",
4725
- "metrics": "rp_7pEHTW_metrics",
4726
- "node_item": "rp_7pEHTW_node_item"
4723
+ "filterOn": "rp_7pEHTW_filterOn",
4724
+ "actions": "rp_7pEHTW_actions",
4725
+ "graph": "rp_7pEHTW_graph",
4726
+ "filter": "rp_7pEHTW_filter"
4727
4727
  };
4728
4728
  //#endregion
4729
4729
  //#region src/client/world-editor/RelationsPanel.tsx
@@ -6098,12 +6098,12 @@ window.__ModuleLoader__.load({
6098
6098
  }
6099
6099
  tag$25.textContent = css$25;
6100
6100
  var PackFrame_module_css_default = {
6101
+ "tab": "rp_h_sbFq_tab",
6101
6102
  "frame": "rp_h_sbFq_frame",
6102
- "problems": "rp_h_sbFq_problems",
6103
6103
  "message": "rp_h_sbFq_message",
6104
- "hud": "rp_h_sbFq_hud",
6105
- "tab": "rp_h_sbFq_tab",
6106
- "fill": "rp_h_sbFq_fill"
6104
+ "fill": "rp_h_sbFq_fill",
6105
+ "problems": "rp_h_sbFq_problems",
6106
+ "hud": "rp_h_sbFq_hud"
6107
6107
  };
6108
6108
  //#endregion
6109
6109
  //#region src/client/widgets/pack-frame/theme.ts
@@ -6366,12 +6366,12 @@ window.__ModuleLoader__.load({
6366
6366
  }
6367
6367
  tag$24.textContent = css$24;
6368
6368
  var PacksPanel_module_css_default = {
6369
- "files": "rp_FLaP7q_files",
6369
+ "group": "rp_FLaP7q_group",
6370
6370
  "note": "rp_FLaP7q_note",
6371
+ "files": "rp_FLaP7q_files",
6372
+ "stageTall": "rp_FLaP7q_stageTall",
6371
6373
  "controls": "rp_FLaP7q_controls",
6372
6374
  "stage": "rp_FLaP7q_stage",
6373
- "group": "rp_FLaP7q_group",
6374
- "stageTall": "rp_FLaP7q_stageTall",
6375
6375
  "log": "rp_FLaP7q_log"
6376
6376
  };
6377
6377
  //#endregion
@@ -7473,11 +7473,11 @@ window.__ModuleLoader__.load({
7473
7473
  }
7474
7474
  tag$23.textContent = css$23;
7475
7475
  var SamplingFields_module_css_default = {
7476
- "grid": "rp_9vxYSG_grid",
7477
- "field": "rp_9vxYSG_field",
7478
7476
  "root": "rp_9vxYSG_root",
7479
- "label": "rp_9vxYSG_label",
7480
7477
  "help": "rp_9vxYSG_help",
7478
+ "grid": "rp_9vxYSG_grid",
7479
+ "label": "rp_9vxYSG_label",
7480
+ "field": "rp_9vxYSG_field",
7481
7481
  "input": "rp_9vxYSG_input"
7482
7482
  };
7483
7483
  //#endregion
@@ -8895,17 +8895,17 @@ window.__ModuleLoader__.load({
8895
8895
  }
8896
8896
  tag$22.textContent = css$22;
8897
8897
  var ToolSwitches_module_css_default = {
8898
- "title": "rp_CjoFLq_title",
8898
+ "agentName": "rp_CjoFLq_agentName",
8899
+ "default": "rp_CjoFLq_default",
8899
8900
  "error": "rp_CjoFLq_error",
8901
+ "help": "rp_CjoFLq_help",
8900
8902
  "external": "rp_CjoFLq_external",
8903
+ "root": "rp_CjoFLq_root",
8904
+ "title": "rp_CjoFLq_title",
8901
8905
  "agent": "rp_CjoFLq_agent",
8902
- "agentName": "rp_CjoFLq_agentName",
8903
- "help": "rp_CjoFLq_help",
8904
- "tool": "rp_CjoFLq_tool",
8905
8906
  "hint": "rp_CjoFLq_hint",
8906
- "toolText": "rp_CjoFLq_toolText",
8907
- "root": "rp_CjoFLq_root",
8908
- "default": "rp_CjoFLq_default"
8907
+ "tool": "rp_CjoFLq_tool",
8908
+ "toolText": "rp_CjoFLq_toolText"
8909
8909
  };
8910
8910
  //#endregion
8911
8911
  //#region src/client/widgets/tool-switches/ToolSwitches.tsx
@@ -9916,35 +9916,35 @@ window.__ModuleLoader__.load({
9916
9916
  }
9917
9917
  tag$21.textContent = css$21;
9918
9918
  var GalleryView_module_css_default = {
9919
+ "select": "rp_9pSHmG_select",
9920
+ "count": "rp_9pSHmG_count",
9921
+ "facts": "rp_9pSHmG_facts",
9922
+ "message": "rp_9pSHmG_message",
9923
+ "editHelp": "rp_9pSHmG_editHelp",
9919
9924
  "caption": "rp_9pSHmG_caption",
9920
- "thumb": "rp_9pSHmG_thumb",
9921
9925
  "large": "rp_9pSHmG_large",
9922
- "pre": "rp_9pSHmG_pre",
9923
- "cell": "rp_9pSHmG_cell",
9924
- "editField": "rp_9pSHmG_editField",
9925
- "editInput": "rp_9pSHmG_editInput",
9926
+ "page": "rp_9pSHmG_page",
9926
9927
  "actions": "rp_9pSHmG_actions",
9927
- "open": "rp_9pSHmG_open",
9928
- "facts": "rp_9pSHmG_facts",
9929
- "toolbar": "rp_9pSHmG_toolbar",
9930
- "tags": "rp_9pSHmG_tags",
9928
+ "cell": "rp_9pSHmG_cell",
9931
9929
  "status": "rp_9pSHmG_status",
9932
- "count": "rp_9pSHmG_count",
9933
- "editLabel": "rp_9pSHmG_editLabel",
9934
- "editHelp": "rp_9pSHmG_editHelp",
9935
- "message": "rp_9pSHmG_message",
9936
9930
  "statusError": "rp_9pSHmG_statusError",
9931
+ "tags": "rp_9pSHmG_tags",
9932
+ "note": "rp_9pSHmG_note",
9933
+ "image": "rp_9pSHmG_image",
9934
+ "toolbar": "rp_9pSHmG_toolbar",
9937
9935
  "editButton": "rp_9pSHmG_editButton",
9938
9936
  "reusable": "rp_9pSHmG_reusable",
9939
- "editArea": "rp_9pSHmG_editArea",
9940
- "image": "rp_9pSHmG_image",
9941
- "note": "rp_9pSHmG_note",
9942
- "edit": "rp_9pSHmG_edit",
9943
- "detail": "rp_9pSHmG_detail",
9944
9937
  "error": "rp_9pSHmG_error",
9938
+ "editField": "rp_9pSHmG_editField",
9939
+ "open": "rp_9pSHmG_open",
9940
+ "thumb": "rp_9pSHmG_thumb",
9941
+ "pre": "rp_9pSHmG_pre",
9942
+ "editLabel": "rp_9pSHmG_editLabel",
9943
+ "editInput": "rp_9pSHmG_editInput",
9945
9944
  "grid": "rp_9pSHmG_grid",
9946
- "select": "rp_9pSHmG_select",
9947
- "page": "rp_9pSHmG_page"
9945
+ "editArea": "rp_9pSHmG_editArea",
9946
+ "edit": "rp_9pSHmG_edit",
9947
+ "detail": "rp_9pSHmG_detail"
9948
9948
  };
9949
9949
  //#endregion
9950
9950
  //#region src/client/widgets/gallery-view/GalleryView.tsx
@@ -10285,13 +10285,13 @@ window.__ModuleLoader__.load({
10285
10285
  }
10286
10286
  tag$20.textContent = css$20;
10287
10287
  var WorldEditor_module_css_default = {
10288
+ "drawer": "rp__swA3a_drawer",
10289
+ "view": "rp__swA3a_view",
10288
10290
  "drawerItem": "rp__swA3a_drawerItem",
10289
10291
  "content": "rp__swA3a_content",
10290
- "drawer": "rp__swA3a_drawer",
10292
+ "drawerItemOn": "rp__swA3a_drawerItemOn",
10291
10293
  "message": "rp__swA3a_message",
10292
- "view": "rp__swA3a_view",
10293
- "warning": "rp__swA3a_warning",
10294
- "drawerItemOn": "rp__swA3a_drawerItemOn"
10294
+ "warning": "rp__swA3a_warning"
10295
10295
  };
10296
10296
  //#endregion
10297
10297
  //#region src/client/world-editor/WorldEditor.tsx
@@ -10687,27 +10687,27 @@ window.__ModuleLoader__.load({
10687
10687
  }
10688
10688
  tag$19.textContent = css$19;
10689
10689
  var AvatarsPage_module_css_default = {
10690
+ "editHeader": "rp_pQOzEG_editHeader",
10691
+ "actions": "rp_pQOzEG_actions",
10692
+ "card": "rp_pQOzEG_card",
10693
+ "viewport": "rp_pQOzEG_viewport",
10694
+ "text": "rp_pQOzEG_text",
10690
10695
  "error": "rp_pQOzEG_error",
10691
- "toolbar": "rp_pQOzEG_toolbar",
10696
+ "form": "rp_pQOzEG_form",
10692
10697
  "field": "rp_pQOzEG_field",
10693
- "text": "rp_pQOzEG_text",
10694
- "name": "rp_pQOzEG_name",
10695
- "count": "rp_pQOzEG_count",
10698
+ "message": "rp_pQOzEG_message",
10699
+ "editTitle": "rp_pQOzEG_editTitle",
10696
10700
  "placeholder": "rp_pQOzEG_placeholder",
10697
- "editBody": "rp_pQOzEG_editBody",
10698
- "form": "rp_pQOzEG_form",
10699
- "editHeader": "rp_pQOzEG_editHeader",
10700
- "label": "rp_pQOzEG_label",
10701
- "summary": "rp_pQOzEG_summary",
10702
10701
  "open": "rp_pQOzEG_open",
10703
- "message": "rp_pQOzEG_message",
10702
+ "count": "rp_pQOzEG_count",
10704
10703
  "grid": "rp_pQOzEG_grid",
10704
+ "name": "rp_pQOzEG_name",
10705
10705
  "portrait": "rp_pQOzEG_portrait",
10706
- "card": "rp_pQOzEG_card",
10707
- "editTitle": "rp_pQOzEG_editTitle",
10708
- "page": "rp_pQOzEG_page",
10709
- "actions": "rp_pQOzEG_actions",
10710
- "viewport": "rp_pQOzEG_viewport"
10706
+ "editBody": "rp_pQOzEG_editBody",
10707
+ "toolbar": "rp_pQOzEG_toolbar",
10708
+ "summary": "rp_pQOzEG_summary",
10709
+ "label": "rp_pQOzEG_label",
10710
+ "page": "rp_pQOzEG_page"
10711
10711
  };
10712
10712
  //#endregion
10713
10713
  //#region src/client/pages/avatars/AvatarsPage.tsx
@@ -12153,37 +12153,37 @@ window.__ModuleLoader__.load({
12153
12153
  }
12154
12154
  tag$18.textContent = css$18;
12155
12155
  var LorebooksPage_module_css_default = {
12156
- "description": "rp_VV-Eha_description",
12157
- "name": "rp_VV-Eha_name",
12158
12156
  "head": "rp_VV-Eha_head",
12159
- "message": "rp_VV-Eha_message",
12160
- "input": "rp_VV-Eha_input",
12161
- "viewport": "rp_VV-Eha_viewport",
12162
- "error": "rp_VV-Eha_error",
12163
- "field": "rp_VV-Eha_field",
12164
- "cardActions": "rp_VV-Eha_cardActions",
12165
- "ok": "rp_VV-Eha_ok",
12166
- "editTitle": "rp_VV-Eha_editTitle",
12167
- "help": "rp_VV-Eha_help",
12168
- "sectionTitle": "rp_VV-Eha_sectionTitle",
12157
+ "row": "rp_VV-Eha_row",
12169
12158
  "editHeader": "rp_VV-Eha_editHeader",
12170
- "select": "rp_VV-Eha_select",
12171
12159
  "area": "rp_VV-Eha_area",
12172
- "entryArea": "rp_VV-Eha_entryArea",
12160
+ "sectionTitle": "rp_VV-Eha_sectionTitle",
12161
+ "form": "rp_VV-Eha_form",
12173
12162
  "warning": "rp_VV-Eha_warning",
12174
- "toolbar": "rp_VV-Eha_toolbar",
12175
- "actions": "rp_VV-Eha_actions",
12176
- "page": "rp_VV-Eha_page",
12177
- "card": "rp_VV-Eha_card",
12178
12163
  "section": "rp_VV-Eha_section",
12179
- "title": "rp_VV-Eha_title",
12180
- "row": "rp_VV-Eha_row",
12181
- "form": "rp_VV-Eha_form",
12164
+ "entryArea": "rp_VV-Eha_entryArea",
12165
+ "description": "rp_VV-Eha_description",
12182
12166
  "label": "rp_VV-Eha_label",
12167
+ "select": "rp_VV-Eha_select",
12168
+ "page": "rp_VV-Eha_page",
12169
+ "field": "rp_VV-Eha_field",
12170
+ "card": "rp_VV-Eha_card",
12171
+ "viewport": "rp_VV-Eha_viewport",
12183
12172
  "grid": "rp_VV-Eha_grid",
12184
- "count": "rp_VV-Eha_count",
12173
+ "toolbar": "rp_VV-Eha_toolbar",
12174
+ "editTitle": "rp_VV-Eha_editTitle",
12175
+ "title": "rp_VV-Eha_title",
12176
+ "ok": "rp_VV-Eha_ok",
12177
+ "name": "rp_VV-Eha_name",
12185
12178
  "meta": "rp_VV-Eha_meta",
12186
- "editBody": "rp_VV-Eha_editBody"
12179
+ "actions": "rp_VV-Eha_actions",
12180
+ "error": "rp_VV-Eha_error",
12181
+ "editBody": "rp_VV-Eha_editBody",
12182
+ "help": "rp_VV-Eha_help",
12183
+ "count": "rp_VV-Eha_count",
12184
+ "message": "rp_VV-Eha_message",
12185
+ "cardActions": "rp_VV-Eha_cardActions",
12186
+ "input": "rp_VV-Eha_input"
12187
12187
  };
12188
12188
  //#endregion
12189
12189
  //#region src/client/pages/lorebooks/LorebookEditor.tsx
@@ -13227,35 +13227,35 @@ window.__ModuleLoader__.load({
13227
13227
  }
13228
13228
  tag$17.textContent = css$17;
13229
13229
  var PresetsPage_module_css_default = {
13230
- "row": "rp_ZK89ba_row",
13231
- "toolbar": "rp_ZK89ba_toolbar",
13232
- "editBody": "rp_ZK89ba_editBody",
13233
- "actions": "rp_ZK89ba_actions",
13234
- "meta": "rp_ZK89ba_meta",
13235
- "page": "rp_ZK89ba_page",
13236
- "field": "rp_ZK89ba_field",
13237
- "message": "rp_ZK89ba_message",
13230
+ "sectionTitle": "rp_ZK89ba_sectionTitle",
13231
+ "editTitle": "rp_ZK89ba_editTitle",
13238
13232
  "viewport": "rp_ZK89ba_viewport",
13233
+ "section": "rp_ZK89ba_section",
13234
+ "head": "rp_ZK89ba_head",
13235
+ "input": "rp_ZK89ba_input",
13236
+ "row": "rp_ZK89ba_row",
13239
13237
  "count": "rp_ZK89ba_count",
13240
- "ok": "rp_ZK89ba_ok",
13241
- "name": "rp_ZK89ba_name",
13242
- "sectionTitle": "rp_ZK89ba_sectionTitle",
13238
+ "title": "rp_ZK89ba_title",
13239
+ "editBody": "rp_ZK89ba_editBody",
13243
13240
  "label": "rp_ZK89ba_label",
13244
13241
  "area": "rp_ZK89ba_area",
13242
+ "meta": "rp_ZK89ba_meta",
13243
+ "name": "rp_ZK89ba_name",
13244
+ "form": "rp_ZK89ba_form",
13245
13245
  "card": "rp_ZK89ba_card",
13246
- "input": "rp_ZK89ba_input",
13247
- "description": "rp_ZK89ba_description",
13248
- "help": "rp_ZK89ba_help",
13246
+ "message": "rp_ZK89ba_message",
13249
13247
  "grid": "rp_ZK89ba_grid",
13250
- "head": "rp_ZK89ba_head",
13251
- "cardActions": "rp_ZK89ba_cardActions",
13252
- "title": "rp_ZK89ba_title",
13253
- "section": "rp_ZK89ba_section",
13254
- "warning": "rp_ZK89ba_warning",
13255
- "form": "rp_ZK89ba_form",
13248
+ "page": "rp_ZK89ba_page",
13249
+ "help": "rp_ZK89ba_help",
13256
13250
  "editHeader": "rp_ZK89ba_editHeader",
13251
+ "actions": "rp_ZK89ba_actions",
13257
13252
  "error": "rp_ZK89ba_error",
13258
- "editTitle": "rp_ZK89ba_editTitle"
13253
+ "description": "rp_ZK89ba_description",
13254
+ "warning": "rp_ZK89ba_warning",
13255
+ "ok": "rp_ZK89ba_ok",
13256
+ "cardActions": "rp_ZK89ba_cardActions",
13257
+ "field": "rp_ZK89ba_field",
13258
+ "toolbar": "rp_ZK89ba_toolbar"
13259
13259
  };
13260
13260
  //#endregion
13261
13261
  //#region src/client/pages/presets/PresetEditor.tsx
@@ -14318,8 +14318,8 @@ window.__ModuleLoader__.load({
14318
14318
  }
14319
14319
  tag$16.textContent = css$16;
14320
14320
  var Pager_module_css_default = {
14321
- "position": "rp_KBAD0W_position",
14322
- "pager": "rp_KBAD0W_pager"
14321
+ "pager": "rp_KBAD0W_pager",
14322
+ "position": "rp_KBAD0W_position"
14323
14323
  };
14324
14324
  //#endregion
14325
14325
  //#region src/client/widgets/pager/Pager.tsx
@@ -14393,9 +14393,9 @@ window.__ModuleLoader__.load({
14393
14393
  tag$14.textContent = css$14;
14394
14394
  var DeleteSessionDialog_module_css_default = {
14395
14395
  "body": "rp_FifHrW_body",
14396
+ "error": "rp_FifHrW_error",
14396
14397
  "warning": "rp_FifHrW_warning",
14397
- "question": "rp_FifHrW_question",
14398
- "error": "rp_FifHrW_error"
14398
+ "question": "rp_FifHrW_question"
14399
14399
  };
14400
14400
  //#endregion
14401
14401
  //#region src/client/pages/sessions/DeleteSessionDialog.tsx
@@ -14502,28 +14502,28 @@ window.__ModuleLoader__.load({
14502
14502
  }
14503
14503
  tag$13.textContent = css$13;
14504
14504
  var SessionsPage_module_css_default = {
14505
- "toolbar": "rp_24z4eW_toolbar",
14506
- "worldColumn": "rp_24z4eW_worldColumn",
14505
+ "viewport": "rp_24z4eW_viewport",
14506
+ "secondary": "rp_24z4eW_secondary",
14507
14507
  "count": "rp_24z4eW_count",
14508
- "nameColumn": "rp_24z4eW_nameColumn",
14508
+ "spinning": "rp_24z4eW_spinning",
14509
14509
  "actions": "rp_24z4eW_actions",
14510
- "notice": "rp_24z4eW_notice",
14511
- "number": "rp_24z4eW_number",
14512
- "badge": "rp_24z4eW_badge",
14513
- "page": "rp_24z4eW_page",
14514
- "actionsColumn": "rp_24z4eW_actionsColumn",
14515
- "spin": "rp_24z4eW_spin",
14510
+ "scrolls": "rp_24z4eW_scrolls",
14516
14511
  "turnsColumn": "rp_24z4eW_turnsColumn",
14517
- "name": "rp_24z4eW_name",
14518
- "secondary": "rp_24z4eW_secondary",
14519
- "spinning": "rp_24z4eW_spinning",
14520
- "viewport": "rp_24z4eW_viewport",
14521
- "timeColumn": "rp_24z4eW_timeColumn",
14522
- "table": "rp_24z4eW_table",
14523
14512
  "message": "rp_24z4eW_message",
14524
14513
  "archived": "rp_24z4eW_archived",
14525
- "scrolls": "rp_24z4eW_scrolls",
14526
- "fits": "rp_24z4eW_fits"
14514
+ "toolbar": "rp_24z4eW_toolbar",
14515
+ "worldColumn": "rp_24z4eW_worldColumn",
14516
+ "page": "rp_24z4eW_page",
14517
+ "actionsColumn": "rp_24z4eW_actionsColumn",
14518
+ "fits": "rp_24z4eW_fits",
14519
+ "timeColumn": "rp_24z4eW_timeColumn",
14520
+ "number": "rp_24z4eW_number",
14521
+ "name": "rp_24z4eW_name",
14522
+ "badge": "rp_24z4eW_badge",
14523
+ "spin": "rp_24z4eW_spin",
14524
+ "nameColumn": "rp_24z4eW_nameColumn",
14525
+ "notice": "rp_24z4eW_notice",
14526
+ "table": "rp_24z4eW_table"
14527
14527
  };
14528
14528
  //#endregion
14529
14529
  //#region src/client/pages/sessions/SessionsPage.tsx
@@ -15040,15 +15040,15 @@ window.__ModuleLoader__.load({
15040
15040
  tag$12.textContent = css$12;
15041
15041
  var WorldCard_module_css_default = {
15042
15042
  "image": "rp_Bvxx5q_image",
15043
+ "tag": "rp_Bvxx5q_tag",
15043
15044
  "openButton": "rp_Bvxx5q_openButton",
15044
- "info": "rp_Bvxx5q_info",
15045
- "tags": "rp_Bvxx5q_tags",
15046
15045
  "placeholder": "rp_Bvxx5q_placeholder",
15047
- "cover": "rp_Bvxx5q_cover",
15048
- "tag": "rp_Bvxx5q_tag",
15049
- "card": "rp_Bvxx5q_card",
15050
15046
  "play": "rp_Bvxx5q_play",
15051
- "name": "rp_Bvxx5q_name"
15047
+ "cover": "rp_Bvxx5q_cover",
15048
+ "info": "rp_Bvxx5q_info",
15049
+ "tags": "rp_Bvxx5q_tags",
15050
+ "name": "rp_Bvxx5q_name",
15051
+ "card": "rp_Bvxx5q_card"
15052
15052
  };
15053
15053
  //#endregion
15054
15054
  //#region src/client/widgets/world-card/WorldCard.tsx
@@ -15143,8 +15143,8 @@ window.__ModuleLoader__.load({
15143
15143
  tag$11.textContent = css$11;
15144
15144
  var AvatarChoices_module_css_default = {
15145
15145
  "text": "rp_YCstOG_text",
15146
- "summary": "rp_YCstOG_summary",
15147
15146
  "option": "rp_YCstOG_option",
15147
+ "summary": "rp_YCstOG_summary",
15148
15148
  "name": "rp_YCstOG_name"
15149
15149
  };
15150
15150
  //#endregion
@@ -15185,18 +15185,18 @@ window.__ModuleLoader__.load({
15185
15185
  }
15186
15186
  tag$10.textContent = css$10;
15187
15187
  var StartSessionDialog_module_css_default = {
15188
- "message": "rp_AnbLKG_message",
15189
- "option": "rp_AnbLKG_option",
15190
15188
  "optionText": "rp_AnbLKG_optionText",
15191
- "label": "rp_AnbLKG_label",
15192
- "field": "rp_AnbLKG_field",
15193
- "optionName": "rp_AnbLKG_optionName",
15194
15189
  "error": "rp_AnbLKG_error",
15190
+ "message": "rp_AnbLKG_message",
15191
+ "form": "rp_AnbLKG_form",
15192
+ "advanced": "rp_AnbLKG_advanced",
15193
+ "optionName": "rp_AnbLKG_optionName",
15194
+ "label": "rp_AnbLKG_label",
15195
15195
  "advancedToggle": "rp_AnbLKG_advancedToggle",
15196
15196
  "advancedBody": "rp_AnbLKG_advancedBody",
15197
15197
  "optionSummary": "rp_AnbLKG_optionSummary",
15198
- "form": "rp_AnbLKG_form",
15199
- "advanced": "rp_AnbLKG_advanced"
15198
+ "field": "rp_AnbLKG_field",
15199
+ "option": "rp_AnbLKG_option"
15200
15200
  };
15201
15201
  //#endregion
15202
15202
  //#region src/client/pages/worlds/AddAvatarsDialog.tsx
@@ -15286,6 +15286,33 @@ window.__ModuleLoader__.load({
15286
15286
  });
15287
15287
  }
15288
15288
  //#endregion
15289
+ //#region src/shared/decisions.ts
15290
+ /** The places where a language model's closed-choice judgement can be given to a decision model instead, or, for the gates, a check can be made at all. */
15291
+ const DECISION_SITES = [
15292
+ "triggers",
15293
+ "reflection",
15294
+ "agency",
15295
+ "refusal",
15296
+ "rules",
15297
+ "secrets"
15298
+ ];
15299
+ const EXTRA_MODES = ["off", "on"];
15300
+ /**
15301
+ * Who makes a site's judgements.
15302
+ * - `llm`: the language model, as before.
15303
+ * - `decision`: the decision model alone; a judgement it is not confident of counts as "no".
15304
+ * - `hybrid`: the decision model where it is confident, the language model for the rest.
15305
+ * - `shadow`: both, acting on the language model's answer and recording whether the decision model agreed.
15306
+ */
15307
+ const DECISION_MODES = [
15308
+ "llm",
15309
+ "decision",
15310
+ "hybrid",
15311
+ "shadow"
15312
+ ];
15313
+ /** What a gate can be set to: the modes of any site, or off. */
15314
+ const GATE_MODES = ["off", ...DECISION_MODES];
15315
+ //#endregion
15289
15316
  //#region src/shared/rules.ts
15290
15317
  /** The longest text of the player's own rules. */
15291
15318
  const MAX_OWN_RULES = 2e3;
@@ -15412,6 +15439,16 @@ window.__ModuleLoader__.load({
15412
15439
  cueTurns: integer(1, 20, 2),
15413
15440
  judgedPerTurn: integer(0, 5, 2)
15414
15441
  },
15442
+ decisions: {
15443
+ triggers: choice(DECISION_MODES, "llm"),
15444
+ reflection: choice(DECISION_MODES, "llm"),
15445
+ agency: choice(GATE_MODES, "off"),
15446
+ refusal: choice(GATE_MODES, "off"),
15447
+ rules: choice(EXTRA_MODES, "off"),
15448
+ secrets: choice(EXTRA_MODES, "off"),
15449
+ gateThreshold: ratio(.1, .95, .5),
15450
+ confidence: ratio(0, 1, .7)
15451
+ },
15415
15452
  interface: { pack: text(60, "") },
15416
15453
  rewind: { keepSnapshots: integer(0, 500, 30) },
15417
15454
  rules: { own: text(MAX_OWN_RULES, "") },
@@ -15707,6 +15744,148 @@ window.__ModuleLoader__.load({
15707
15744
  zone: false,
15708
15745
  placeholder: "localai/model-id"
15709
15746
  },
15747
+ {
15748
+ path: ["decisions", "triggers"],
15749
+ kind: "choice",
15750
+ label: "decisionsTriggers",
15751
+ help: "decisionsTriggersHelp",
15752
+ choices: [
15753
+ {
15754
+ value: "llm",
15755
+ label: "decisionLlm"
15756
+ },
15757
+ {
15758
+ value: "decision",
15759
+ label: "decisionDecision"
15760
+ },
15761
+ {
15762
+ value: "hybrid",
15763
+ label: "decisionHybrid"
15764
+ },
15765
+ {
15766
+ value: "shadow",
15767
+ label: "decisionShadow"
15768
+ }
15769
+ ]
15770
+ },
15771
+ {
15772
+ path: ["decisions", "reflection"],
15773
+ kind: "choice",
15774
+ label: "decisionsReflection",
15775
+ help: "decisionsReflectionHelp",
15776
+ choices: [
15777
+ {
15778
+ value: "llm",
15779
+ label: "decisionLlm"
15780
+ },
15781
+ {
15782
+ value: "decision",
15783
+ label: "decisionDecision"
15784
+ },
15785
+ {
15786
+ value: "hybrid",
15787
+ label: "decisionHybrid"
15788
+ },
15789
+ {
15790
+ value: "shadow",
15791
+ label: "decisionShadow"
15792
+ }
15793
+ ]
15794
+ },
15795
+ {
15796
+ path: ["decisions", "agency"],
15797
+ kind: "choice",
15798
+ label: "decisionsAgency",
15799
+ help: "decisionsAgencyHelp",
15800
+ choices: [
15801
+ {
15802
+ value: "off",
15803
+ label: "decisionOff"
15804
+ },
15805
+ {
15806
+ value: "llm",
15807
+ label: "decisionLlm"
15808
+ },
15809
+ {
15810
+ value: "decision",
15811
+ label: "decisionDecision"
15812
+ },
15813
+ {
15814
+ value: "hybrid",
15815
+ label: "decisionHybrid"
15816
+ },
15817
+ {
15818
+ value: "shadow",
15819
+ label: "decisionShadow"
15820
+ }
15821
+ ]
15822
+ },
15823
+ {
15824
+ path: ["decisions", "refusal"],
15825
+ kind: "choice",
15826
+ label: "decisionsRefusal",
15827
+ help: "decisionsRefusalHelp",
15828
+ choices: [
15829
+ {
15830
+ value: "off",
15831
+ label: "decisionOff"
15832
+ },
15833
+ {
15834
+ value: "llm",
15835
+ label: "decisionLlm"
15836
+ },
15837
+ {
15838
+ value: "decision",
15839
+ label: "decisionDecision"
15840
+ },
15841
+ {
15842
+ value: "hybrid",
15843
+ label: "decisionHybrid"
15844
+ },
15845
+ {
15846
+ value: "shadow",
15847
+ label: "decisionShadow"
15848
+ }
15849
+ ]
15850
+ },
15851
+ {
15852
+ path: ["decisions", "rules"],
15853
+ kind: "choice",
15854
+ label: "decisionsRules",
15855
+ help: "decisionsRulesHelp",
15856
+ choices: [{
15857
+ value: "off",
15858
+ label: "decisionOff"
15859
+ }, {
15860
+ value: "on",
15861
+ label: "decisionOn"
15862
+ }]
15863
+ },
15864
+ {
15865
+ path: ["decisions", "secrets"],
15866
+ kind: "choice",
15867
+ label: "decisionsSecrets",
15868
+ help: "decisionsSecretsHelp",
15869
+ choices: [{
15870
+ value: "off",
15871
+ label: "decisionOff"
15872
+ }, {
15873
+ value: "on",
15874
+ label: "decisionOn"
15875
+ }]
15876
+ },
15877
+ {
15878
+ path: ["decisions", "gateThreshold"],
15879
+ kind: "decimal",
15880
+ label: "decisionsGateThreshold",
15881
+ help: "decisionsGateThresholdHelp"
15882
+ },
15883
+ {
15884
+ path: ["decisions", "confidence"],
15885
+ kind: "decimal",
15886
+ label: "decisionsConfidence",
15887
+ help: "decisionsConfidenceHelp"
15888
+ },
15710
15889
  {
15711
15890
  path: ["triggers", "enabled"],
15712
15891
  kind: "flag",
@@ -16064,7 +16243,7 @@ window.__ModuleLoader__.load({
16064
16243
  return next;
16065
16244
  }
16066
16245
  //#endregion
16067
- //#region ../../node_modules/.pnpm/@dsh-ai-providers+core@0.1.2_@deepseek-ai+cordis@4.0.4_@deepseek-ai+dsh-llm@0.2.0-rc.2_@deepseek-ai+cordis@4.0.4_/node_modules/@dsh-ai-providers/core/lib/index.js
16246
+ //#region ../../node_modules/.pnpm/@dsh-ai-providers+core@0.5.0_@deepseek-ai+cordis@4.0.5_@deepseek-ai+dsh-llm@0.2.1-rc.2_@deepseek-ai+cordis@4.0.5_/node_modules/@dsh-ai-providers/core/lib/index.js
16068
16247
  /**
16069
16248
  * The browser API of the main plugin, which the UI of the main plugin and of every vendor plugin
16070
16249
  * uses. Paths are relative to the prefix, and the browser calls them with relative URLs so that a
@@ -16126,14 +16305,14 @@ window.__ModuleLoader__.load({
16126
16305
  }
16127
16306
  tag$9.textContent = css$9;
16128
16307
  var SettingsFields_module_css_default = {
16129
- "area": "rp_Rhi3yq_area",
16308
+ "help": "rp_Rhi3yq_help",
16309
+ "error": "rp_Rhi3yq_error",
16130
16310
  "row": "rp_Rhi3yq_row",
16311
+ "field": "rp_Rhi3yq_field",
16131
16312
  "groupTitle": "rp_Rhi3yq_groupTitle",
16132
- "group": "rp_Rhi3yq_group",
16133
16313
  "label": "rp_Rhi3yq_label",
16134
- "error": "rp_Rhi3yq_error",
16135
- "help": "rp_Rhi3yq_help",
16136
- "field": "rp_Rhi3yq_field"
16314
+ "area": "rp_Rhi3yq_area",
16315
+ "group": "rp_Rhi3yq_group"
16137
16316
  };
16138
16317
  //#endregion
16139
16318
  //#region src/client/settings-form/SettingsFields.tsx
@@ -16388,8 +16567,8 @@ window.__ModuleLoader__.load({
16388
16567
  tag$8.textContent = css$8;
16389
16568
  var TranslateBanner_module_css_default = {
16390
16569
  "banner": "rp_Lx8vJa_banner",
16391
- "text": "rp_Lx8vJa_text",
16392
- "error": "rp_Lx8vJa_error"
16570
+ "error": "rp_Lx8vJa_error",
16571
+ "text": "rp_Lx8vJa_text"
16393
16572
  };
16394
16573
  //#endregion
16395
16574
  //#region src/client/pages/worlds/TranslateBanner.tsx
@@ -16980,25 +17159,25 @@ window.__ModuleLoader__.load({
16980
17159
  }
16981
17160
  tag$7.textContent = css$7;
16982
17161
  var WorldsPage_module_css_default = {
16983
- "notice": "rp_FHUyRq_notice",
16984
- "cell": "rp_FHUyRq_cell",
16985
- "scrolls": "rp_FHUyRq_scrolls",
16986
- "message": "rp_FHUyRq_message",
16987
- "grid": "rp_FHUyRq_grid",
17162
+ "editHeader": "rp_FHUyRq_editHeader",
16988
17163
  "fits": "rp_FHUyRq_fits",
17164
+ "editTitle": "rp_FHUyRq_editTitle",
17165
+ "editBody": "rp_FHUyRq_editBody",
17166
+ "starter": "rp_FHUyRq_starter",
17167
+ "cell": "rp_FHUyRq_cell",
17168
+ "authorButton": "rp_FHUyRq_authorButton",
16989
17169
  "viewport": "rp_FHUyRq_viewport",
16990
- "toolbar": "rp_FHUyRq_toolbar",
16991
- "editHeader": "rp_FHUyRq_editHeader",
16992
- "toolbarActions": "rp_FHUyRq_toolbarActions",
16993
- "spin": "rp_FHUyRq_spin",
16994
- "spinning": "rp_FHUyRq_spinning",
16995
17170
  "starters": "rp_FHUyRq_starters",
16996
- "authorButton": "rp_FHUyRq_authorButton",
16997
- "editBody": "rp_FHUyRq_editBody",
16998
- "count": "rp_FHUyRq_count",
17171
+ "spin": "rp_FHUyRq_spin",
16999
17172
  "page": "rp_FHUyRq_page",
17000
- "editTitle": "rp_FHUyRq_editTitle",
17001
- "starter": "rp_FHUyRq_starter"
17173
+ "message": "rp_FHUyRq_message",
17174
+ "spinning": "rp_FHUyRq_spinning",
17175
+ "toolbarActions": "rp_FHUyRq_toolbarActions",
17176
+ "toolbar": "rp_FHUyRq_toolbar",
17177
+ "notice": "rp_FHUyRq_notice",
17178
+ "grid": "rp_FHUyRq_grid",
17179
+ "scrolls": "rp_FHUyRq_scrolls",
17180
+ "count": "rp_FHUyRq_count"
17002
17181
  };
17003
17182
  //#endregion
17004
17183
  //#region src/client/pages/worlds/StarterWorlds.tsx
@@ -17491,6 +17670,28 @@ window.__ModuleLoader__.load({
17491
17670
  imagesInterpreterModelHelp: "As provider/model. Leave empty to use the chat's own model, which must be declared able to read images. Use this to describe images with a vision model while the story runs on another.",
17492
17671
  imagesCaptioner: "Captioning model",
17493
17672
  imagesCaptionerHelp: "As provider/model. A model that only writes a caption for a picture (it cannot call tools) looks at it, and the chat's model turns the caption into the description. Leave empty to have one vision model do both.",
17673
+ decisionsTriggers: "Judging trigger statements",
17674
+ decisionsTriggersHelp: "Who judges the statements that triggers wait on. The language model is the default. A decision model (from the Decisions provider of the AI providers plugin) answers the same questions much faster and beside the language model instead of queueing behind it. \"Decision model\" uses only it and counts an answer it is not sure of as no; \"Both, decision model when sure\" asks the language model for the rest; \"Both, compare\" always uses the language model and records how often the decision model agrees, shown below, so you can judge it on your own story. Without a decision service the language model is used.",
17675
+ decisionsReflection: "Checking beliefs against new evidence",
17676
+ decisionsReflectionHelp: "Who checks whether what a character took in since contradicts one of their beliefs, before the reflection pass. The same choices as for trigger statements. Doubts are raised only on answers the decision model is sure of.",
17677
+ decisionsAgency: "Checking the narration for speaking for you",
17678
+ decisionsAgencyHelp: "Checks each narration for words, actions, thoughts or feelings given to your character that your message did not state, and sends it back to the game master to rewrite (at most twice, then it is delivered as it is). Off by default: a check costs a request to the language model or a fast call to a decision model in every turn. The choices are the same as for trigger statements; the decision model counts a fault only when it is sure.",
17679
+ decisionsRefusal: "Checking the output for stepping out of the story",
17680
+ decisionsRefusalHelp: "Checks each output for a refusal to continue, an apology, a content warning, a disclaimer or a remark to you outside the story, which some hosted models add, and sends it back to the game master to write as the story (at most twice, then it is delivered as it is). Off by default. The same choices as for the check above.",
17681
+ decisionsRules: "Checking actions against the rules",
17682
+ decisionsRulesHelp: "When the game master judges your action allowed, a decision model also checks it against every rule of the world and your own rules in one fast pass. A rule it thinks is broken is put to the game master once, to judge again. Only a decision model does this: off by default, and off the story plays as it always did. Needs a decision service; without one nothing is checked.",
17683
+ decisionsSecrets: "Checking the output for giving away secrets",
17684
+ decisionsSecretsHelp: "A decision model checks each output for stating hidden lore that your character does not know (lore listed for other characters only) and sends it back to the game master to rewrite (at most twice, then it is delivered as it is). A revelation the story means to make can still go through the second time. Off by default, and off nothing changes. Needs a decision service; without one nothing is checked.",
17685
+ decisionsGateThreshold: "Probability that counts as a fault",
17686
+ decisionsGateThresholdHelp: "For the two checks above: the probability from which the decision model's answer counts as a fault, from 0.1 to 0.95; a little below it (0.15) the model is not sure, and the language model is asked in the mixed mode. Decision models give a rare fault a low probability even when they see it, so this is not the confidence below. Lower it if faults are missed, raise it if clean passages are sent back; the comparing mode shows the probabilities of the disagreements.",
17687
+ decisionOff: "Off",
17688
+ decisionsConfidence: "Confidence needed",
17689
+ decisionsConfidenceHelp: "How sure the decision model must be before its answer is used, from 0 to 1. At 0.7 a yes needs a probability of at least 0.85 and a no at most 0.15; in between, \"both, decision model when sure\" asks the language model and \"decision model\" counts it as no. A higher value uses it less and asks the language model more.",
17690
+ decisionLlm: "Language model",
17691
+ decisionDecision: "Decision model",
17692
+ decisionHybrid: "Both, decision model when sure",
17693
+ decisionShadow: "Both, compare",
17694
+ decisionOn: "On",
17494
17695
  triggersJudged: "Statements judged after a turn",
17495
17696
  triggersJudgedHelp: "The most statements that triggers wait on (such as \"the mayor has lost the town's trust\") that a model judges after one of your messages, in one background request. A trigger fires from the verdict at the next look. 0 turns it off, and such triggers never fire.",
17496
17697
  factionsPerTurn: "Organisations acting on their own",
@@ -17660,6 +17861,28 @@ window.__ModuleLoader__.load({
17660
17861
  imagesInterpreterModelHelp: "写成 提供方/模型。留空则使用对话自己的模型,它必须声明能读取图像。可用它让视觉模型描述图像,而故事用另一个模型运行。",
17661
17862
  imagesCaptioner: "图像说明模型",
17662
17863
  imagesCaptionerHelp: "写成 提供方/模型。只会给图片写说明文字的模型(不能调用工具)负责看图,再由对话的模型把说明整理成描述。留空则由一个视觉模型完成全部。",
17864
+ decisionsTriggers: "评判触发器陈述",
17865
+ decisionsTriggersHelp: "由谁来评判触发器所等待的陈述。默认由语言模型评判。决策模型(来自 AI 提供方插件的“决策”提供方)回答同样的问题要快得多,并且与语言模型并行,而不是排在它后面。“决策模型”只用它,并把它没有把握的答案视为否;“两者并用,有把握时用决策模型”会把其余的交给语言模型;“两者并用,对比”始终采用语言模型的答案,同时记录决策模型的一致程度,显示在下方,方便你在自己的故事里判断它。没有决策服务时使用语言模型。",
17866
+ decisionsReflection: "用新证据检查信念",
17867
+ decisionsReflectionHelp: "由谁在反思之前检查角色此后接收到的内容是否与其某个信念矛盾。选项与触发器陈述相同。只有决策模型有把握的答案才会引起怀疑。",
17868
+ decisionsAgency: "检查叙述是否替你说话",
17869
+ decisionsAgencyHelp: "检查每段叙述是否给了你的角色你的消息中没有写到的话语、动作、想法或感受,如有则退回给游戏主持人重写(最多两次,之后原样交付)。默认关闭:每个回合都要多一次语言模型请求,或一次决策模型的快速调用。选项与触发器陈述相同;决策模型只在有把握时才认定有问题。",
17870
+ decisionsRefusal: "检查输出是否跳出了故事",
17871
+ decisionsRefusalHelp: "检查每次输出里有没有拒绝继续、道歉、内容警告、免责声明或对你说的故事之外的话(有些托管模型会加上这些),如有则退回给游戏主持人按故事重写(最多两次,之后原样交付)。默认关闭。选项与上一项相同。",
17872
+ decisionsRules: "按规则检查行动",
17873
+ decisionsRulesHelp: "当游戏主持人判定你的行动可行时,决策模型会再一次快速地把它与世界的每条规则以及你自己的规则逐条对照。它认为被违反的规则会交给游戏主持人重新判断一次。只有决策模型能做这件事:默认关闭,关闭时故事与以往完全一样。需要决策服务;没有时不做任何检查。",
17874
+ decisionsSecrets: "检查输出是否泄露秘密",
17875
+ decisionsSecretsHelp: "决策模型检查每次输出有没有写出你的角色不知道的隐藏背景(只列给其他角色的背景),如有则退回给游戏主持人重写(最多两次,之后原样交付)。故事有意安排的揭示,第二次仍可通过。默认关闭,关闭时没有任何变化。需要决策服务;没有时不做任何检查。",
17876
+ decisionsGateThreshold: "算作问题的概率",
17877
+ decisionsGateThresholdHelp: "针对上面两项检查:决策模型的答案达到多大概率才算有问题,取值 0.1 到 0.95;略低于它(低 0.15 以内)时模型没有把握,混合模式下会交给语言模型。决策模型即使看出了罕见的问题,给出的概率也偏低,所以这不是下面的“所需把握”。漏掉问题就调低,把正常的文字退回去就调高;对比模式会显示分歧的概率。",
17878
+ decisionOff: "关闭",
17879
+ decisionsConfidence: "所需把握",
17880
+ decisionsConfidenceHelp: "采用决策模型的答案前,它至少要有多大把握,取值 0 到 1。取 0.7 时,“是”需要至少 0.85 的概率,“否”至多 0.15;介于两者之间时,“两者并用,有把握时用决策模型”会交给语言模型,“决策模型”则视为否。数值越高,越少用它、越多问语言模型。",
17881
+ decisionLlm: "语言模型",
17882
+ decisionDecision: "决策模型",
17883
+ decisionHybrid: "两者并用,有把握时用决策模型",
17884
+ decisionShadow: "两者并用,对比",
17885
+ decisionOn: "开启",
17663
17886
  triggersJudged: "每回合评判的陈述数",
17664
17887
  triggersJudgedHelp: "触发器所等待的陈述(例如“市长已失去全镇信任”)中,你发送一条消息后最多让模型评判多少条,合并为一次后台请求。触发器在下一次检查时根据结论触发。0 表示关闭,此类触发器永远不会触发。",
17665
17888
  factionsPerTurn: "组织自主行动",
@@ -18304,10 +18527,10 @@ window.__ModuleLoader__.load({
18304
18527
  }
18305
18528
  tag$6.textContent = css$6;
18306
18529
  var BranchDialog_module_css_default = {
18307
- "label": "rp_Dy1TaW_label",
18308
- "field": "rp_Dy1TaW_field",
18309
18530
  "form": "rp_Dy1TaW_form",
18310
- "error": "rp_Dy1TaW_error"
18531
+ "error": "rp_Dy1TaW_error",
18532
+ "field": "rp_Dy1TaW_field",
18533
+ "label": "rp_Dy1TaW_label"
18311
18534
  };
18312
18535
  //#endregion
18313
18536
  //#region src/client/branch/BranchDialog.tsx
@@ -18776,17 +18999,17 @@ window.__ModuleLoader__.load({
18776
18999
  }
18777
19000
  tag$5.textContent = css$5;
18778
19001
  var SidebarPage_module_css_default = {
18779
- "text": "rp_Ptco8a_text",
18780
- "bar": "rp_Ptco8a_bar",
18781
- "message": "rp_Ptco8a_message",
18782
- "title": "rp_Ptco8a_title",
18783
- "name": "rp_Ptco8a_name",
18784
- "icon": "rp_Ptco8a_icon",
18785
- "main": "rp_Ptco8a_main",
18786
19002
  "entry": "rp_Ptco8a_entry",
18787
19003
  "content": "rp_Ptco8a_content",
19004
+ "icon": "rp_Ptco8a_icon",
19005
+ "name": "rp_Ptco8a_name",
18788
19006
  "page": "rp_Ptco8a_page",
18789
- "description": "rp_Ptco8a_description"
19007
+ "main": "rp_Ptco8a_main",
19008
+ "description": "rp_Ptco8a_description",
19009
+ "bar": "rp_Ptco8a_bar",
19010
+ "message": "rp_Ptco8a_message",
19011
+ "text": "rp_Ptco8a_text",
19012
+ "title": "rp_Ptco8a_title"
18790
19013
  };
18791
19014
  //#endregion
18792
19015
  //#region src/client/interface/SidebarPage.tsx
@@ -19114,26 +19337,26 @@ window.__ModuleLoader__.load({
19114
19337
  }
19115
19338
  tag$4.textContent = css$4;
19116
19339
  var ChatSettingsView_module_css_default = {
19117
- "run": "rp_wLpbxW_run",
19118
- "view": "rp_wLpbxW_view",
19340
+ "reasons": "rp_wLpbxW_reasons",
19341
+ "message": "rp_wLpbxW_message",
19342
+ "label": "rp_wLpbxW_label",
19343
+ "saved": "rp_wLpbxW_saved",
19344
+ "actions": "rp_wLpbxW_actions",
19345
+ "activity": "rp_wLpbxW_activity",
19119
19346
  "error": "rp_wLpbxW_error",
19347
+ "select": "rp_wLpbxW_select",
19120
19348
  "link": "rp_wLpbxW_link",
19349
+ "field": "rp_wLpbxW_field",
19350
+ "list": "rp_wLpbxW_list",
19351
+ "notice": "rp_wLpbxW_notice",
19121
19352
  "title": "rp_wLpbxW_title",
19122
- "activity": "rp_wLpbxW_activity",
19123
- "actions": "rp_wLpbxW_actions",
19124
- "table": "rp_wLpbxW_table",
19125
- "reasons": "rp_wLpbxW_reasons",
19353
+ "run": "rp_wLpbxW_run",
19354
+ "view": "rp_wLpbxW_view",
19126
19355
  "row": "rp_wLpbxW_row",
19127
- "saved": "rp_wLpbxW_saved",
19128
- "field": "rp_wLpbxW_field",
19129
- "description": "rp_wLpbxW_description",
19130
- "label": "rp_wLpbxW_label",
19131
19356
  "help": "rp_wLpbxW_help",
19132
- "message": "rp_wLpbxW_message",
19133
- "notice": "rp_wLpbxW_notice",
19357
+ "description": "rp_wLpbxW_description",
19134
19358
  "pre": "rp_wLpbxW_pre",
19135
- "select": "rp_wLpbxW_select",
19136
- "list": "rp_wLpbxW_list"
19359
+ "table": "rp_wLpbxW_table"
19137
19360
  };
19138
19361
  //#endregion
19139
19362
  //#region src/client/chat-settings/settings-api.ts
@@ -19235,6 +19458,155 @@ window.__ModuleLoader__.load({
19235
19458
  signal
19236
19459
  }));
19237
19460
  }
19461
+ /** Whether a decision service is there, which, and how the decision model has done in the chat's story. */
19462
+ async function loadDecisions(id, signal) {
19463
+ const response = await fetch(`${API_PREFIX}/sessions/decisions?id=${encodeURIComponent(id)}`, {
19464
+ credentials: "same-origin",
19465
+ signal
19466
+ });
19467
+ if (!response.ok) {
19468
+ const body = await response.json().catch(() => void 0);
19469
+ throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
19470
+ }
19471
+ return await response.json();
19472
+ }
19473
+ //#endregion
19474
+ //#region src/client/chat-settings/decision-figures.ts
19475
+ /** The average time of a run, or a dash when the site has not run. */
19476
+ const perRun = (total, runs) => runs === 0 ? "–" : `${Math.round(total / runs)} ms`;
19477
+ /** The share of compared judgements that the decision model made the way the language model did, or a dash when none were compared. */
19478
+ const agreement = (stats) => stats.agreed + stats.disagreed === 0 ? "–" : `${Math.round(100 * stats.agreed / (stats.agreed + stats.disagreed))}%`;
19479
+ //#endregion
19480
+ //#region src/client/chat-settings/DecisionsSection.tsx
19481
+ const MODE_LABEL = {
19482
+ off: "decisionOff",
19483
+ llm: "decisionLlm",
19484
+ decision: "decisionDecision",
19485
+ hybrid: "decisionHybrid",
19486
+ shadow: "decisionShadow",
19487
+ on: "decisionOn"
19488
+ };
19489
+ const SITE_LABEL = {
19490
+ triggers: "decisionsSiteTriggers",
19491
+ reflection: "decisionsSiteReflection",
19492
+ agency: "decisionsSiteAgency",
19493
+ refusal: "decisionsSiteRefusal",
19494
+ rules: "decisionsSiteRules",
19495
+ secrets: "decisionsSiteSecrets"
19496
+ };
19497
+ /** Whether a decision model is there, and how the sites set to use one have done in this story. */
19498
+ function DecisionsSection({ t, session, modes }) {
19499
+ const [payload, setPayload] = (0, react.useState)();
19500
+ const [error, setError] = (0, react.useState)();
19501
+ const refresh = (0, react.useCallback)(() => {
19502
+ loadDecisions(session, new AbortController().signal).then((next) => {
19503
+ setPayload(next);
19504
+ setError(void 0);
19505
+ }, (failure) => {
19506
+ setError(failure instanceof Error ? failure.message : String(failure));
19507
+ });
19508
+ }, [session]);
19509
+ (0, react.useEffect)(() => {
19510
+ const abort = new AbortController();
19511
+ loadDecisions(session, abort.signal).then((next) => {
19512
+ setPayload(next);
19513
+ setError(void 0);
19514
+ }, (failure) => {
19515
+ if (!abort.signal.aborted) setError(failure instanceof Error ? failure.message : String(failure));
19516
+ });
19517
+ return () => {
19518
+ abort.abort();
19519
+ };
19520
+ }, [session]);
19521
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
19522
+ className: ChatSettingsView_module_css_default.activity,
19523
+ "data-testid": "roleplay-decisions",
19524
+ children: [
19525
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("decisionsTitle") }),
19526
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
19527
+ className: ChatSettingsView_module_css_default.description,
19528
+ children: t("decisionsHelp")
19529
+ }),
19530
+ error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
19531
+ className: ChatSettingsView_module_css_default.error,
19532
+ role: "alert",
19533
+ children: t("loadFailed", { message: error })
19534
+ }),
19535
+ payload !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
19536
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
19537
+ className: ChatSettingsView_module_css_default.description,
19538
+ children: payload.available ? t("decisionsAvailable", {
19539
+ provider: payload.provider ?? "",
19540
+ model: payload.model ?? ""
19541
+ }) : t("decisionsUnavailable")
19542
+ }),
19543
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
19544
+ className: ChatSettingsView_module_css_default.table,
19545
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
19546
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsSite") }),
19547
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsMode") }),
19548
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsRuns") }),
19549
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsItems") }),
19550
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsDecided") }),
19551
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsEscalated") }),
19552
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsFallbacks") }),
19553
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsAgreement") }),
19554
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsDecisionTime") }),
19555
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("decisionsLlmTime") })
19556
+ ] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: DECISION_SITES.map((site) => {
19557
+ const stats = payload.stats.sites[site];
19558
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", {
19559
+ "data-testid": `roleplay-decisions-${site}`,
19560
+ children: [
19561
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: t(SITE_LABEL[site]) }),
19562
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: t(MODE_LABEL[modes[site]]) }),
19563
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: stats.runs }),
19564
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: stats.items }),
19565
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: stats.decided }),
19566
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: stats.escalated }),
19567
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: stats.fallbacks }),
19568
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: agreement(stats) }),
19569
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: perRun(stats.decisionMs, stats.runs) }),
19570
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: perRun(stats.llmMs, stats.runs) })
19571
+ ]
19572
+ }, site);
19573
+ }) })]
19574
+ }),
19575
+ DECISION_SITES.flatMap((site) => payload.stats.sites[site].problem === void 0 ? [] : [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
19576
+ className: ChatSettingsView_module_css_default.error,
19577
+ role: "alert",
19578
+ children: t("decisionsProblem", {
19579
+ site: t(SITE_LABEL[site]),
19580
+ message: payload.stats.sites[site].problem ?? ""
19581
+ })
19582
+ }, `${site}-problem`)]),
19583
+ DECISION_SITES.flatMap((site) => payload.stats.sites[site].samples.length === 0 ? [] : [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
19584
+ className: ChatSettingsView_module_css_default.description,
19585
+ children: t("decisionsSamples", { site: t(SITE_LABEL[site]) })
19586
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
19587
+ className: ChatSettingsView_module_css_default.description,
19588
+ children: [...payload.stats.sites[site].samples].reverse().map((sample) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("decisionsSample", {
19589
+ turn: sample.turn,
19590
+ what: sample.what,
19591
+ probability: Math.round(sample.probability * 100),
19592
+ decision: sample.decision ? t("decisionsYes") : t("decisionsNo"),
19593
+ llm: sample.llm ? t("decisionsYes") : t("decisionsNo")
19594
+ }) }, `${sample.turn}-${sample.what}`))
19595
+ })] }, `${site}-samples`)]),
19596
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
19597
+ className: ChatSettingsView_module_css_default.description,
19598
+ children: t("decisionsSince", { since: payload.stats.since.slice(0, 10) })
19599
+ })
19600
+ ] }),
19601
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
19602
+ variant: "ghost",
19603
+ size: "sm",
19604
+ onClick: refresh,
19605
+ children: t("decisionsRefresh")
19606
+ }) })
19607
+ ]
19608
+ });
19609
+ }
19238
19610
  //#endregion
19239
19611
  //#region src/client/chat-settings/InterfaceSection.tsx
19240
19612
  const message$3 = (failure) => failure instanceof Error ? failure.message : String(failure);
@@ -20206,6 +20578,11 @@ window.__ModuleLoader__.load({
20206
20578
  ...toolsError === void 0 ? {} : { error: toolsError },
20207
20579
  t
20208
20580
  }),
20581
+ session !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DecisionsSection, {
20582
+ t,
20583
+ session,
20584
+ modes: payload.settings.decisions
20585
+ }),
20209
20586
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReflectionSection, {
20210
20587
  t,
20211
20588
  status: payload.reflection,
@@ -20279,6 +20656,33 @@ window.__ModuleLoader__.load({
20279
20656
  loading: "Loading settings…",
20280
20657
  loadFailed: "Could not load the settings: {message}",
20281
20658
  notRoleplay: "This chat is not a roleplay session, so it has no roleplay settings.",
20659
+ decisionsTitle: "Decision model",
20660
+ decisionsHelp: "How the sites that can use a decision model have done in this story. Judgements made by the decision model are counted under \"decided\"; \"escalated\" went to the language model because the decision model was not sure; \"fell back\" went to it because the decision model could not be used. In the comparing mode, agreement is how often the decision model, with the confidence set above, said what the language model said. The counts stay when the story is taken back.",
20661
+ decisionsAvailable: "Decision service: {provider}, model {model}.",
20662
+ decisionsUnavailable: "No decision service is selected, or the selected one is not loaded, so sites set to use a decision model use the language model.",
20663
+ decisionsSite: "Site",
20664
+ decisionsMode: "Set to",
20665
+ decisionsRuns: "Runs",
20666
+ decisionsItems: "Judgements",
20667
+ decisionsDecided: "Decided",
20668
+ decisionsEscalated: "Escalated",
20669
+ decisionsFallbacks: "Fell back",
20670
+ decisionsAgreement: "Agreement",
20671
+ decisionsDecisionTime: "Decision model per run",
20672
+ decisionsLlmTime: "Language model per run",
20673
+ decisionsSiteTriggers: "Trigger statements",
20674
+ decisionsSiteReflection: "Belief checks",
20675
+ decisionsSiteAgency: "Narration speaking for you",
20676
+ decisionsSiteRefusal: "Output out of the story",
20677
+ decisionsSiteRules: "Actions against the rules",
20678
+ decisionsSiteSecrets: "Output giving away secrets",
20679
+ decisionsProblem: "{site}: the decision model could not be used the last time ({message}).",
20680
+ decisionsSamples: "{site}: latest disagreements",
20681
+ decisionsSample: "Turn {turn}: {what} (decision model {probability}% yes, so {decision}; language model {llm})",
20682
+ decisionsYes: "yes",
20683
+ decisionsNo: "no",
20684
+ decisionsSince: "Counted since {since}.",
20685
+ decisionsRefresh: "Refresh",
20282
20686
  pendingConsolidation: "{count} character(s), place(s) or thing(s) made up in play are waiting to be fitted into the world (connected to the rest, given relationships). It is done in the background.",
20283
20687
  pendingRecords: "{count} round(s) are waiting to be written into the story's memory. The game master records them when the story moves on, or once too many pile up.",
20284
20688
  interventionsTitle: "What the world put in front of the story",
@@ -20430,6 +20834,33 @@ window.__ModuleLoader__.load({
20430
20834
  loading: "正在加载设置…",
20431
20835
  loadFailed: "无法加载设置:{message}",
20432
20836
  notRoleplay: "此对话不是角色扮演存档,没有角色扮演设置。",
20837
+ decisionsTitle: "决策模型",
20838
+ decisionsHelp: "在本故事中,可以使用决策模型的各个环节表现如何。由决策模型做出的判断计入“已决策”;“已升级”表示决策模型没有把握而交给了语言模型;“已回退”表示决策模型无法使用而交给了语言模型。在对比模式下,一致率是指决策模型(按上方设置的把握程度)与语言模型给出相同答案的比例。故事回退时,这些计数不会改变。",
20839
+ decisionsAvailable: "决策服务:{provider},模型 {model}。",
20840
+ decisionsUnavailable: "尚未选择决策服务,或所选服务未加载,因此设为使用决策模型的环节会改用语言模型。",
20841
+ decisionsSite: "环节",
20842
+ decisionsMode: "设置为",
20843
+ decisionsRuns: "运行次数",
20844
+ decisionsItems: "判断数",
20845
+ decisionsDecided: "已决策",
20846
+ decisionsEscalated: "已升级",
20847
+ decisionsFallbacks: "已回退",
20848
+ decisionsAgreement: "一致率",
20849
+ decisionsDecisionTime: "决策模型每次",
20850
+ decisionsLlmTime: "语言模型每次",
20851
+ decisionsSiteTriggers: "触发器陈述",
20852
+ decisionsSiteReflection: "信念检查",
20853
+ decisionsSiteAgency: "叙述替你说话",
20854
+ decisionsSiteRefusal: "输出跳出故事",
20855
+ decisionsSiteRules: "按规则检查行动",
20856
+ decisionsSiteSecrets: "输出泄露秘密",
20857
+ decisionsProblem: "{site}:上一次无法使用决策模型({message})。",
20858
+ decisionsSamples: "{site}:最近的分歧",
20859
+ decisionsSample: "第 {turn} 回合:{what}(决策模型认为 {probability}% 为是,因此为{decision};语言模型为{llm})",
20860
+ decisionsYes: "是",
20861
+ decisionsNo: "否",
20862
+ decisionsSince: "统计自 {since} 起。",
20863
+ decisionsRefresh: "刷新",
20433
20864
  pendingConsolidation: "有 {count} 个在故事中新建的角色、地点或物品等待融入世界(与其余部分建立连接和关系),将在后台完成。",
20434
20865
  pendingRecords: "有 {count} 个回合等待写入故事记忆。主持人会在故事推进时记录,积压过多时也会自动记录。",
20435
20866
  interventionsTitle: "世界摆到故事面前的东西",
@@ -20617,16 +21048,16 @@ window.__ModuleLoader__.load({
20617
21048
  }
20618
21049
  tag$3.textContent = css$3;
20619
21050
  var CatalogueSettings_module_css_default = {
20620
- "actions": "rp_KPhXDa_actions",
21051
+ "section": "rp_KPhXDa_section",
21052
+ "problem": "rp_KPhXDa_problem",
20621
21053
  "row": "rp_KPhXDa_row",
20622
- "hint": "rp_KPhXDa_hint",
21054
+ "label": "rp_KPhXDa_label",
20623
21055
  "field": "rp_KPhXDa_field",
20624
- "problem": "rp_KPhXDa_problem",
20625
- "section": "rp_KPhXDa_section",
21056
+ "keyArea": "rp_KPhXDa_keyArea",
20626
21057
  "keyHint": "rp_KPhXDa_keyHint",
20627
- "label": "rp_KPhXDa_label",
20628
21058
  "title": "rp_KPhXDa_title",
20629
- "keyArea": "rp_KPhXDa_keyArea"
21059
+ "hint": "rp_KPhXDa_hint",
21060
+ "actions": "rp_KPhXDa_actions"
20630
21061
  };
20631
21062
  //#endregion
20632
21063
  //#region src/client/settings/AuthoringToolSettings.tsx
@@ -21088,7 +21519,7 @@ window.__ModuleLoader__.load({
21088
21519
  catalogueKeyChecking: "checking…",
21089
21520
  catalogueKeySet: "key is set",
21090
21521
  catalogueKeyUnset: "no key",
21091
- catalogueKeyReadOnly: "supplied by the environment, so it cannot be changed here",
21522
+ catalogueKeyReadOnly: "its source cannot be written, so it cannot be changed here",
21092
21523
  catalogueKeyStore: "Store key",
21093
21524
  catalogueKeyClear: "Remove key",
21094
21525
  catalogueKeyLegacy: "An earlier version saved a key as text in this profile's configuration. It is still used until you move it into the credential store; saving the settings after that removes the text.",
@@ -21132,7 +21563,7 @@ window.__ModuleLoader__.load({
21132
21563
  catalogueKeyChecking: "检查中…",
21133
21564
  catalogueKeySet: "已设置密钥",
21134
21565
  catalogueKeyUnset: "没有密钥",
21135
- catalogueKeyReadOnly: "由环境变量提供,无法在此更改",
21566
+ catalogueKeyReadOnly: "其来源不可写入,无法在此更改",
21136
21567
  catalogueKeyStore: "存入密钥",
21137
21568
  catalogueKeyClear: "删除密钥",
21138
21569
  catalogueKeyLegacy: "旧版本把密钥以文本形式保存在本配置中。在你把它移入凭据存储之前仍会继续使用;之后保存设置会删除这段文本。",
@@ -21431,28 +21862,28 @@ window.__ModuleLoader__.load({
21431
21862
  }
21432
21863
  tag$2.textContent = css$2;
21433
21864
  var NarrationView_module_css_default = {
21865
+ "playLine": "rp_NFPimG_playLine",
21434
21866
  "imageError": "rp_NFPimG_imageError",
21435
- "name": "rp_NFPimG_name",
21436
- "diceList": "rp_NFPimG_diceList",
21437
- "output": "rp_NFPimG_output",
21867
+ "oocLabel": "rp_NFPimG_oocLabel",
21868
+ "dice": "rp_NFPimG_dice",
21869
+ "preview": "rp_NFPimG_preview",
21870
+ "oocRefused": "rp_NFPimG_oocRefused",
21871
+ "avatar": "rp_NFPimG_avatar",
21438
21872
  "sceneImage": "rp_NFPimG_sceneImage",
21439
- "diceSummary": "rp_NFPimG_diceSummary",
21440
- "narration": "rp_NFPimG_narration",
21441
21873
  "speech": "rp_NFPimG_speech",
21442
- "images": "rp_NFPimG_images",
21443
21874
  "line": "rp_NFPimG_line",
21444
- "oocLabel": "rp_NFPimG_oocLabel",
21875
+ "name": "rp_NFPimG_name",
21876
+ "imageStatus": "rp_NFPimG_imageStatus",
21877
+ "playAll": "rp_NFPimG_playAll",
21878
+ "diceList": "rp_NFPimG_diceList",
21879
+ "diceSummary": "rp_NFPimG_diceSummary",
21445
21880
  "words": "rp_NFPimG_words",
21446
- "note": "rp_NFPimG_note",
21447
21881
  "imageButton": "rp_NFPimG_imageButton",
21448
- "imageStatus": "rp_NFPimG_imageStatus",
21882
+ "images": "rp_NFPimG_images",
21883
+ "output": "rp_NFPimG_output",
21449
21884
  "oocNote": "rp_NFPimG_oocNote",
21450
- "preview": "rp_NFPimG_preview",
21451
- "oocRefused": "rp_NFPimG_oocRefused",
21452
- "playLine": "rp_NFPimG_playLine",
21453
- "dice": "rp_NFPimG_dice",
21454
- "avatar": "rp_NFPimG_avatar",
21455
- "playAll": "rp_NFPimG_playAll"
21885
+ "note": "rp_NFPimG_note",
21886
+ "narration": "rp_NFPimG_narration"
21456
21887
  };
21457
21888
  //#endregion
21458
21889
  //#region src/client/transcript/PreviewNode.tsx
@@ -21717,11 +22148,11 @@ window.__ModuleLoader__.load({
21717
22148
  }
21718
22149
  tag$1.textContent = css$1;
21719
22150
  var SuggestionsDock_module_css_default = {
21720
- "dock": "rp_rWH4DG_dock",
22151
+ "card": "rp_rWH4DG_card",
22152
+ "lines": "rp_rWH4DG_lines",
21721
22153
  "label": "rp_rWH4DG_label",
21722
22154
  "chip": "rp_rWH4DG_chip",
21723
- "lines": "rp_rWH4DG_lines",
21724
- "card": "rp_rWH4DG_card"
22155
+ "dock": "rp_rWH4DG_dock"
21725
22156
  };
21726
22157
  //#endregion
21727
22158
  //#region src/client/transcript/SuggestionsDock.tsx
@@ -21841,12 +22272,12 @@ window.__ModuleLoader__.load({
21841
22272
  }
21842
22273
  tag.textContent = css;
21843
22274
  var TurnsDock_module_css_default = {
21844
- "select": "rp_f4YLlq_select",
22275
+ "dock": "rp_f4YLlq_dock",
21845
22276
  "group": "rp_f4YLlq_group",
21846
- "error": "rp_f4YLlq_error",
21847
22277
  "button": "rp_f4YLlq_button",
21848
- "dock": "rp_f4YLlq_dock",
21849
- "count": "rp_f4YLlq_count"
22278
+ "count": "rp_f4YLlq_count",
22279
+ "select": "rp_f4YLlq_select",
22280
+ "error": "rp_f4YLlq_error"
21850
22281
  };
21851
22282
  //#endregion
21852
22283
  //#region src/client/transcript/withdrawn.ts