@openvulcan/dsh-vulcancode 0.0.0-stage → 0.4.3

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 (176) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -2
  3. package/assets/openvulcan-icon.svg +33 -0
  4. package/cordis.patch.yml +19 -0
  5. package/node_modules/@openvulcan/dsh-decision-guard/LICENSE +21 -0
  6. package/node_modules/@openvulcan/dsh-decision-guard/README.md +14 -0
  7. package/node_modules/@openvulcan/dsh-decision-guard/assets/decision-guard-icon.png +0 -0
  8. package/node_modules/@openvulcan/dsh-decision-guard/lib/calls.d.ts +40 -0
  9. package/node_modules/@openvulcan/dsh-decision-guard/lib/calls.js +150 -0
  10. package/node_modules/@openvulcan/dsh-decision-guard/lib/client.js +2250 -0
  11. package/node_modules/@openvulcan/dsh-decision-guard/lib/decide.d.ts +90 -0
  12. package/node_modules/@openvulcan/dsh-decision-guard/lib/decide.js +108 -0
  13. package/node_modules/@openvulcan/dsh-decision-guard/lib/index.d.ts +129 -0
  14. package/node_modules/@openvulcan/dsh-decision-guard/lib/index.js +572 -0
  15. package/node_modules/@openvulcan/dsh-decision-guard/lib/intent.d.ts +22 -0
  16. package/node_modules/@openvulcan/dsh-decision-guard/lib/intent.js +77 -0
  17. package/node_modules/@openvulcan/dsh-decision-guard/lib/panel.d.ts +158 -0
  18. package/node_modules/@openvulcan/dsh-decision-guard/lib/panel.js +340 -0
  19. package/node_modules/@openvulcan/dsh-decision-guard/lib/records.d.ts +133 -0
  20. package/node_modules/@openvulcan/dsh-decision-guard/lib/records.js +186 -0
  21. package/node_modules/@openvulcan/dsh-decision-guard/lib/review.d.ts +55 -0
  22. package/node_modules/@openvulcan/dsh-decision-guard/lib/review.js +202 -0
  23. package/node_modules/@openvulcan/dsh-decision-guard/lib/session-state.d.ts +62 -0
  24. package/node_modules/@openvulcan/dsh-decision-guard/lib/session-state.js +155 -0
  25. package/node_modules/@openvulcan/dsh-decision-guard/lib/version.d.ts +2 -0
  26. package/node_modules/@openvulcan/dsh-decision-guard/lib/version.js +4 -0
  27. package/node_modules/@openvulcan/dsh-decision-guard/package.json +68 -0
  28. package/node_modules/@openvulcan/dsh-vulcan-account/LICENSE +21 -0
  29. package/node_modules/@openvulcan/dsh-vulcan-account/assets/account-icon.png +0 -0
  30. package/node_modules/@openvulcan/dsh-vulcan-account/lib/client.js +573 -0
  31. package/node_modules/@openvulcan/dsh-vulcan-account/lib/index.d.ts +92 -0
  32. package/node_modules/@openvulcan/dsh-vulcan-account/lib/index.js +194 -0
  33. package/node_modules/@openvulcan/dsh-vulcan-account/package.json +57 -0
  34. package/node_modules/@openvulcan/dsh-vulcan-answers/LICENSE +21 -0
  35. package/node_modules/@openvulcan/dsh-vulcan-answers/assets/answers-icon.png +0 -0
  36. package/node_modules/@openvulcan/dsh-vulcan-answers/assets/prompts/answer-mode-interactive.md +79 -0
  37. package/node_modules/@openvulcan/dsh-vulcan-answers/assets/prompts/answer-mode-standard.md +1 -0
  38. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/answer-model.d.ts +258 -0
  39. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/answer-model.js +698 -0
  40. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/client.js +671 -0
  41. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/fences.d.ts +29 -0
  42. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/fences.js +70 -0
  43. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/index.d.ts +19 -0
  44. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/index.js +52 -0
  45. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/limits.d.ts +9 -0
  46. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/limits.js +9 -0
  47. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/prompt.d.ts +22 -0
  48. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/prompt.js +39 -0
  49. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/reply-format.d.ts +20 -0
  50. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/reply-format.js +17 -0
  51. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/session-state.d.ts +66 -0
  52. package/node_modules/@openvulcan/dsh-vulcan-answers/lib/session-state.js +118 -0
  53. package/node_modules/@openvulcan/dsh-vulcan-answers/package.json +59 -0
  54. package/node_modules/@openvulcan/dsh-vulcan-luaskills/LICENSE +21 -0
  55. package/node_modules/@openvulcan/dsh-vulcan-luaskills/assets/luaskills-icon.svg +1 -0
  56. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/client.js +949 -0
  57. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/constants.d.ts +46 -0
  58. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/constants.js +51 -0
  59. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/engine.d.ts +55 -0
  60. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/engine.js +149 -0
  61. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/hub.d.ts +49 -0
  62. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/hub.js +116 -0
  63. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/index.d.ts +26 -0
  64. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/index.js +276 -0
  65. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/protocol.d.ts +65 -0
  66. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/protocol.js +2 -0
  67. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/runtime.d.ts +111 -0
  68. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/runtime.js +281 -0
  69. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/sdk-install.d.ts +26 -0
  70. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/sdk-install.js +87 -0
  71. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/settings.d.ts +79 -0
  72. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/settings.js +165 -0
  73. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/skills.d.ts +34 -0
  74. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/skills.js +61 -0
  75. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/tools.d.ts +59 -0
  76. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/tools.js +107 -0
  77. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/worker.d.ts +10 -0
  78. package/node_modules/@openvulcan/dsh-vulcan-luaskills/lib/worker.js +140 -0
  79. package/node_modules/@openvulcan/dsh-vulcan-luaskills/package.json +57 -0
  80. package/node_modules/@openvulcan/dsh-vulcan-memory/LICENSE +21 -0
  81. package/node_modules/@openvulcan/dsh-vulcan-memory/assets/markdown-memory-guide.md +21 -0
  82. package/node_modules/@openvulcan/dsh-vulcan-memory/assets/memory-curator/SKILL.md +31 -0
  83. package/node_modules/@openvulcan/dsh-vulcan-memory/assets/memory-icon.png +0 -0
  84. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/client.js +1090 -0
  85. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/index.d.ts +30 -0
  86. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/index.js +240 -0
  87. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/inject.d.ts +30 -0
  88. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/inject.js +46 -0
  89. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/constants.d.ts +23 -0
  90. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/constants.js +25 -0
  91. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/document.d.ts +108 -0
  92. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/document.js +373 -0
  93. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/errors.d.ts +14 -0
  94. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/errors.js +31 -0
  95. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/index.d.ts +196 -0
  96. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/index.js +204 -0
  97. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/operations.d.ts +92 -0
  98. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/operations.js +472 -0
  99. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/package.d.ts +126 -0
  100. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/package.js +553 -0
  101. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/registry.d.ts +56 -0
  102. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/registry.js +182 -0
  103. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/scope.d.ts +13 -0
  104. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/scope.js +24 -0
  105. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/search.d.ts +65 -0
  106. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/search.js +227 -0
  107. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/snapshot.d.ts +34 -0
  108. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/snapshot.js +171 -0
  109. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/store.d.ts +72 -0
  110. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/store.js +250 -0
  111. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/timestamp.d.ts +6 -0
  112. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/timestamp.js +12 -0
  113. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/tokens.d.ts +8 -0
  114. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/markdown/tokens.js +38 -0
  115. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/page.d.ts +132 -0
  116. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/page.js +235 -0
  117. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/project.d.ts +14 -0
  118. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/project.js +27 -0
  119. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/settings.d.ts +29 -0
  120. package/node_modules/@openvulcan/dsh-vulcan-memory/lib/settings.js +62 -0
  121. package/node_modules/@openvulcan/dsh-vulcan-memory/package.json +63 -0
  122. package/node_modules/@openvulcan/dsh-vulcan-reasoning/LICENSE +21 -0
  123. package/node_modules/@openvulcan/dsh-vulcan-reasoning/lib/client.js +509 -0
  124. package/node_modules/@openvulcan/dsh-vulcan-reasoning/lib/index.d.ts +6 -0
  125. package/node_modules/@openvulcan/dsh-vulcan-reasoning/lib/index.js +8 -0
  126. package/node_modules/@openvulcan/dsh-vulcan-reasoning/package.json +42 -0
  127. package/node_modules/@openvulcan/dsh-vulcan-style/LICENSE +21 -0
  128. package/node_modules/@openvulcan/dsh-vulcan-style/assets/style-icon.png +0 -0
  129. package/node_modules/@openvulcan/dsh-vulcan-style/lib/client.js +1121 -0
  130. package/node_modules/@openvulcan/dsh-vulcan-style/lib/index.d.ts +34 -0
  131. package/node_modules/@openvulcan/dsh-vulcan-style/lib/index.js +42 -0
  132. package/node_modules/@openvulcan/dsh-vulcan-style/package.json +51 -0
  133. package/node_modules/@openvulcan/openvulcan-account/LICENSE +21 -0
  134. package/node_modules/@openvulcan/openvulcan-account/lib/account.d.ts +140 -0
  135. package/node_modules/@openvulcan/openvulcan-account/lib/account.js +347 -0
  136. package/node_modules/@openvulcan/openvulcan-account/lib/index.d.ts +1 -0
  137. package/node_modules/@openvulcan/openvulcan-account/lib/index.js +1 -0
  138. package/node_modules/@openvulcan/openvulcan-account/package.json +29 -0
  139. package/node_modules/@openvulcan/vulcan-decision/LICENSE +21 -0
  140. package/node_modules/@openvulcan/vulcan-decision/README.md +23 -0
  141. package/node_modules/@openvulcan/vulcan-decision/bin/vulcan-decision.js +4 -0
  142. package/node_modules/@openvulcan/vulcan-decision/lib/cli.d.ts +5 -0
  143. package/node_modules/@openvulcan/vulcan-decision/lib/cli.js +267 -0
  144. package/node_modules/@openvulcan/vulcan-decision/lib/cloud/edge.d.ts +211 -0
  145. package/node_modules/@openvulcan/vulcan-decision/lib/cloud/edge.js +594 -0
  146. package/node_modules/@openvulcan/vulcan-decision/lib/download.d.ts +36 -0
  147. package/node_modules/@openvulcan/vulcan-decision/lib/download.js +99 -0
  148. package/node_modules/@openvulcan/vulcan-decision/lib/engine.d.ts +37 -0
  149. package/node_modules/@openvulcan/vulcan-decision/lib/engine.js +39 -0
  150. package/node_modules/@openvulcan/vulcan-decision/lib/hardware.d.ts +105 -0
  151. package/node_modules/@openvulcan/vulcan-decision/lib/hardware.js +207 -0
  152. package/node_modules/@openvulcan/vulcan-decision/lib/home.d.ts +26 -0
  153. package/node_modules/@openvulcan/vulcan-decision/lib/home.js +54 -0
  154. package/node_modules/@openvulcan/vulcan-decision/lib/index.d.ts +17 -0
  155. package/node_modules/@openvulcan/vulcan-decision/lib/index.js +17 -0
  156. package/node_modules/@openvulcan/vulcan-decision/lib/local/engine.d.ts +54 -0
  157. package/node_modules/@openvulcan/vulcan-decision/lib/local/engine.js +157 -0
  158. package/node_modules/@openvulcan/vulcan-decision/lib/local/models.d.ts +126 -0
  159. package/node_modules/@openvulcan/vulcan-decision/lib/local/models.js +261 -0
  160. package/node_modules/@openvulcan/vulcan-decision/lib/local/packs.d.ts +102 -0
  161. package/node_modules/@openvulcan/vulcan-decision/lib/local/packs.js +195 -0
  162. package/node_modules/@openvulcan/vulcan-decision/lib/local/worker.d.ts +61 -0
  163. package/node_modules/@openvulcan/vulcan-decision/lib/local/worker.js +123 -0
  164. package/node_modules/@openvulcan/vulcan-decision/lib/protocol.d.ts +74 -0
  165. package/node_modules/@openvulcan/vulcan-decision/lib/protocol.js +31 -0
  166. package/node_modules/@openvulcan/vulcan-decision/lib/render.d.ts +15 -0
  167. package/node_modules/@openvulcan/vulcan-decision/lib/render.js +33 -0
  168. package/node_modules/@openvulcan/vulcan-decision/lib/version.d.ts +2 -0
  169. package/node_modules/@openvulcan/vulcan-decision/lib/version.js +4 -0
  170. package/node_modules/@openvulcan/vulcan-decision/package.json +40 -0
  171. package/node_modules/@openvulcan/vulcan-decision/python/vulcan_decision_worker.py +363 -0
  172. package/node_modules/@openvulcan/vulcan-decision/runtime-packs/onnx-cpu.json +627 -0
  173. package/node_modules/@openvulcan/vulcan-decision/runtime-packs/onnx-cuda.json +423 -0
  174. package/node_modules/@openvulcan/vulcan-decision/runtime-packs/torch-cpu.json +1047 -0
  175. package/node_modules/@openvulcan/vulcan-decision/runtime-packs/torch-cu128.json +647 -0
  176. package/package.json +55 -4
@@ -0,0 +1,509 @@
1
+ window.__ModuleLoader__.load({
2
+ id: "@openvulcan/dsh-vulcan-reasoning",
3
+ factory: (platformRequire) => {
4
+ var definitions = {
5
+ "./dsh-client": function (module, exports, require) {
6
+ "use strict";
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+
9
+ },
10
+ "./i18n": function (module, exports, require) {
11
+ "use strict";
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.en = exports.zh = exports.NAMESPACE = void 0;
14
+ // Labels for the per-model editor in dsh's interface language.
15
+ // 随 dsh 界面语言切换的每模型编辑器文案。
16
+ exports.NAMESPACE = 'vulcan-reasoning';
17
+ // Chinese copy for the provider card and all form states.
18
+ // 提供商卡片及各表单状态的中文文案。
19
+ exports.zh = {
20
+ title: '自定义思考级别',
21
+ lead: '为当前模型设置对话中可选的思考级别,以及提供商实际接收的值。传输值以模型接口支持的参数为准。',
22
+ loading: '正在读取模型配置…',
23
+ loadFailed: '读取模型配置失败',
24
+ saveFailed: '保存失败',
25
+ conflict: '模型配置已被其他操作修改。请重新读取后再保存。',
26
+ readonly: '当前设置为只读。',
27
+ empty: '此提供商没有可编辑的模型。',
28
+ reload: '重新读取',
29
+ model: '模型',
30
+ mode: '思考配置',
31
+ inherit: '跟随模型目录',
32
+ disabled: '关闭思考',
33
+ custom: '自定义级别',
34
+ wire: '接口传输值',
35
+ offHint: '关闭级别可留空',
36
+ levelRequired: '请至少启用一个思考级别。',
37
+ wireRequired: '每个已启用的思考级别都需要填写接口传输值。',
38
+ providerDefault: '必须保留提供商的默认级别',
39
+ save: '保存思考配置',
40
+ saving: '保存中…',
41
+ saved: '思考配置已保存。',
42
+ reselect: '已有会话若选中了已移除的级别,请在输入框的模型选择器中重新选择。',
43
+ };
44
+ // English copy mirrors the Chinese dictionary.
45
+ // 英文文案与中文词典保持同样的键。
46
+ exports.en = {
47
+ title: 'Custom thinking levels',
48
+ lead: 'Choose the thinking levels offered in conversations and the value sent for each level. Use wire values supported by the model endpoint.',
49
+ loading: 'Reading model settings…',
50
+ loadFailed: 'Could not read model settings',
51
+ saveFailed: 'Could not save',
52
+ conflict: 'The model settings changed. Reload them before saving again.',
53
+ readonly: 'The current settings are read-only.',
54
+ empty: 'This provider has no editable models.',
55
+ reload: 'Reload',
56
+ model: 'Model',
57
+ mode: 'Thinking configuration',
58
+ inherit: 'Follow the model catalog',
59
+ disabled: 'Disable thinking',
60
+ custom: 'Custom levels',
61
+ wire: 'Wire value',
62
+ offHint: 'Leave blank for off',
63
+ levelRequired: 'Enable at least one thinking level.',
64
+ wireRequired: 'Enter a wire value for every enabled thinking level.',
65
+ providerDefault: 'Keep the provider’s default thinking level',
66
+ save: 'Save thinking configuration',
67
+ saving: 'Saving…',
68
+ saved: 'Thinking configuration saved.',
69
+ reselect: 'If an existing conversation uses a removed level, select the model and level again in the composer.',
70
+ };
71
+
72
+ },
73
+ "./index": function (module, exports, require) {
74
+ "use strict";
75
+ Object.defineProperty(exports, "__esModule", { value: true });
76
+ exports.inject = void 0;
77
+ exports.apply = apply;
78
+ const jsx_runtime_1 = require("react/jsx-runtime");
79
+ const i18n_1 = require("./i18n");
80
+ const page_1 = require("./page");
81
+ const shared_1 = require("./shared");
82
+ const style_1 = require("./style");
83
+ // Services supplied by dsh before this browser contribution runs.
84
+ // 此浏览器扩展运行前由 dsh 提供的服务。
85
+ exports.inject = ['slots', 'locale', 'remote', 'remote.settings', 'remote.session'];
86
+ /**
87
+ * Register the localized editor in the existing pi-ai provider-card slot.
88
+ * 在现有 pi-ai 提供商卡片插槽注册本地化编辑器。
89
+ */
90
+ function apply(ctx) {
91
+ ctx.effect(() => (0, style_1.installStyle)(), 'vulcan-reasoning: stylesheet');
92
+ ctx.effect(() => ctx.locale.register(i18n_1.NAMESPACE, { en: i18n_1.en, zh: i18n_1.zh }), 'vulcan-reasoning: dictionaries');
93
+ ctx.slots.inject('settings.models.provider-card', () => ctx.slots.register({
94
+ name: 'settings.models.provider-card',
95
+ key: shared_1.PI_AI_NAMESPACE,
96
+ locale: i18n_1.NAMESPACE,
97
+ }, props => (0, jsx_runtime_1.jsx)(page_1.ProviderReasoning, { ...props, remote: ctx.remote, t: props.t })));
98
+ }
99
+
100
+ },
101
+ "./page": function (module, exports, require) {
102
+ "use strict";
103
+ Object.defineProperty(exports, "__esModule", { value: true });
104
+ exports.ProviderReasoning = ProviderReasoning;
105
+ const jsx_runtime_1 = require("react/jsx-runtime");
106
+ const react_1 = require("react");
107
+ const shared_1 = require("./shared");
108
+ /**
109
+ * Read a provider's redacted native settings and, for inherited models, its live catalog.
110
+ * 读取提供商的原生脱敏设置,并在模型继承时读取其当前模型目录。
111
+ */
112
+ async function readSnapshot(remote, provider) {
113
+ // The describe response is the authority for write permission and optimistic concurrency.
114
+ // describe 响应提供写权限和乐观并发控制所需的权威信息。
115
+ const described = await remote.settings.describe();
116
+ if (!described.ok)
117
+ throw new Error(described.error.message);
118
+ // Read only the namespace that declared this provider card.
119
+ // 仅从声明该提供商卡片的命名空间读取配置。
120
+ const namespace = described.value.namespaces.find(entry => entry.ns === shared_1.PI_AI_NAMESPACE);
121
+ if (namespace === undefined)
122
+ throw new Error('The pi-ai settings namespace is unavailable');
123
+ // The card represents an existing provider profile, whose exact ID is supplied by the host.
124
+ // 此卡片代表已存在的提供商配置,其准确标识由宿主提供。
125
+ const profile = (0, shared_1.profileOf)(namespace.value, provider);
126
+ if (profile === undefined)
127
+ throw new Error('The pi-ai provider is no longer configured');
128
+ // An explicit model list already supplies the IDs and needs no extra catalog request.
129
+ // 显式模型列表已提供模型标识,无需额外读取目录。
130
+ let catalog = [];
131
+ if (profile.models === undefined || profile.models.length === 0) {
132
+ // Inherited model IDs come from the native selector's provider group.
133
+ // 继承的模型标识来自原生选择器的提供商分组。
134
+ const response = await remote.session.modelCatalog();
135
+ if (!response.ok)
136
+ throw new Error(response.error.message);
137
+ // Preserve a native catalog failure instead of presenting it as an empty provider.
138
+ // 保留原生目录错误,避免将其显示为空提供商。
139
+ const failure = response.value.failures.find(entry => entry.id === provider);
140
+ if (failure !== undefined)
141
+ throw new Error(failure.message);
142
+ catalog = response.value.groups.find(group => group.id === provider)?.models ?? [];
143
+ }
144
+ return { revision: namespace.revision, writable: described.value.writable, profile, catalog };
145
+ }
146
+ /**
147
+ * Render a collapsible editor for a configured pi-ai provider and use dsh's permission hooks.
148
+ * 为已配置的 pi-ai 提供商渲染可折叠编辑器,并使用 dsh 的权限 Hook。
149
+ */
150
+ function ProviderReasoning({ provider, configured, useRemoteAccess, remote, t }) {
151
+ // Read access controls visibility; mutation access controls only the save form.
152
+ // 读取权限控制可见性,写入权限只控制保存表单。
153
+ const readable = useRemoteAccess('settings/describe');
154
+ // Save controls follow the current client's settings mutation access.
155
+ // 保存控件遵循当前客户端的设置写入权限。
156
+ const writable = useRemoteAccess('settings/mutate');
157
+ // Defer network reads until the card is opened, and keep drafts mounted on collapse.
158
+ // 等待卡片展开后才发起读取,折叠时保持草稿挂载。
159
+ const [opened, setOpened] = (0, react_1.useState)(false);
160
+ if (!configured || !readable)
161
+ return null;
162
+ return ((0, jsx_runtime_1.jsxs)("details", { className: "vrs", onToggle: event => { if (event.currentTarget.open)
163
+ setOpened(true); }, children: [(0, jsx_runtime_1.jsx)("summary", { children: t('title') }), opened ? (0, jsx_runtime_1.jsx)(ReasoningEditor, { provider: provider.provider, remote: remote, writable: writable, t: t }, provider.provider) : null] }));
164
+ }
165
+ /**
166
+ * Render model selection, editable level mappings and saving for one provider route.
167
+ * 渲染单一提供商路由的模型选择、级别映射编辑与保存操作。
168
+ */
169
+ function ReasoningEditor({ provider, remote, writable, t }) {
170
+ // Resource and reload generation track one revision-bearing provider snapshot.
171
+ // 资源与重读代数共同跟踪带修订版本的提供商快照。
172
+ const [resource, setResource] = (0, react_1.useState)({ kind: 'loading' });
173
+ // Increment this generation to start a fresh native settings read.
174
+ // 递增此代数以发起一次新的原生设置读取。
175
+ const [generation, setGeneration] = (0, react_1.useState)(0);
176
+ // Use the last model the user selected while it remains in the loaded list.
177
+ // 只要最近选中的模型仍在加载后的列表中,就沿用该选择。
178
+ const [selected, setSelected] = (0, react_1.useState)();
179
+ // Keep unsaved work by model ID when switching models or reloading after a conflict.
180
+ // 切换模型或在冲突后重读时,按模型标识保留未保存的内容。
181
+ const [drafts, setDrafts] = (0, react_1.useState)(() => new Map());
182
+ // A save updates the current revision and publishes success or a specific failure.
183
+ // 保存会更新当前修订版本,并报告成功或具体失败。
184
+ const [saving, setSaving] = (0, react_1.useState)(false);
185
+ // Retain the failure text beside the draft that could not be saved.
186
+ // 在未保存成功的草稿旁保留失败信息。
187
+ const [error, setError] = (0, react_1.useState)();
188
+ // Publish confirmation only after the host accepts the mutation.
189
+ // 仅在宿主接受写入后显示保存确认。
190
+ const [saved, setSaved] = (0, react_1.useState)(false);
191
+ (0, react_1.useEffect)(() => {
192
+ // Ignore reads from an obsolete load or an unmounted provider card.
193
+ // 忽略已经失效的读取以及已卸载提供商卡片的返回结果。
194
+ let active = true;
195
+ readSnapshot(remote, provider).then(snapshot => {
196
+ if (active)
197
+ setResource({ kind: 'ready', snapshot });
198
+ }, (failure) => {
199
+ if (active)
200
+ setResource({ kind: 'failed', message: messageOf(failure) });
201
+ });
202
+ return () => { active = false; };
203
+ }, [remote, provider, generation]);
204
+ /** Request a fresh snapshot without losing the form drafts. */
205
+ /** 请求最新快照并保留表单草稿。 */
206
+ const reload = () => {
207
+ setSaved(false);
208
+ setError(undefined);
209
+ setResource({ kind: 'loading' });
210
+ setGeneration(value => value + 1);
211
+ };
212
+ if (resource.kind === 'loading')
213
+ return (0, jsx_runtime_1.jsx)("p", { className: "vrs-form vrs-hint", role: "status", children: t('loading') });
214
+ if (resource.kind === 'failed') {
215
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "vrs-form", children: [(0, jsx_runtime_1.jsxs)("p", { className: "vrs-error", role: "alert", children: [t('loadFailed'), ": ", resource.message] }), (0, jsx_runtime_1.jsx)("div", { className: "vrs-actions", children: (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: reload, children: t('reload') }) })] }));
216
+ }
217
+ // Use the last accepted snapshot and initially select its first listed model.
218
+ // 使用最近接受的快照,并默认选中目录中的首个模型。
219
+ const { snapshot } = resource;
220
+ // Derive the choices from the adapter's configured or inherited catalog.
221
+ // 从适配器的显式或继承目录生成模型选项。
222
+ const models = (0, shared_1.modelOptions)(snapshot.profile, snapshot.catalog);
223
+ // Use the first listed model when no valid selection has been made.
224
+ // 尚未选择有效模型时使用列表中的第一项。
225
+ const model = models.find(entry => entry.id === selected) ?? models[0];
226
+ if (model === undefined)
227
+ return (0, jsx_runtime_1.jsx)("p", { className: "vrs-form vrs-hint", children: t('empty') });
228
+ // Read-only clients can still switch models and inspect their saved mappings.
229
+ // 只读客户端仍可切换模型并查看已保存的级别映射。
230
+ const canWrite = writable && snapshot.writable;
231
+ // A pending value exists only after the user edited this model.
232
+ // 只有用户编辑过此模型才存在待保存值。
233
+ const pending = drafts.get(model.id);
234
+ // Before editing, show exactly the effective native settings for the model.
235
+ // 编辑前显示该模型当前生效的原生配置。
236
+ const draft = pending ?? (0, shared_1.draftOf)(model.efforts);
237
+ // The encoder reports an error before invalid values can reach the host.
238
+ // 编码器会在无效值到达宿主之前报告错误。
239
+ const encoded = (0, shared_1.encodeDraft)(draft, snapshot.profile.reasoning);
240
+ /** Store the replacement draft for the displayed model. */
241
+ /** 保存当前显示模型的替换草稿。 */
242
+ const change = (next) => {
243
+ setSaved(false);
244
+ setError(undefined);
245
+ setDrafts(current => new Map(current).set(model.id, next));
246
+ };
247
+ /** Enable or disable the named level, leaving its wire value for the user to enter. */
248
+ /** 启用或停用指定级别,并由用户填写其传输值。 */
249
+ const toggle = (level, enabled) => {
250
+ // Detach the edited dictionary so no other model's draft is mutated.
251
+ // 复制待编辑的字典,避免修改其他模型的草稿。
252
+ const values = { ...draft.values };
253
+ if (enabled)
254
+ values[level] = '';
255
+ else
256
+ delete values[level];
257
+ change({ ...draft, values });
258
+ };
259
+ /** Apply this model's draft at the loaded revision and adopt the committed settings. */
260
+ /** 在已加载的修订版本上应用此模型的草稿,并采用提交后的配置。 */
261
+ const save = async (event) => {
262
+ event.preventDefault();
263
+ if (!canWrite || saving || pending === undefined || !encoded.ok)
264
+ return;
265
+ setSaving(true);
266
+ setError(undefined);
267
+ setSaved(false);
268
+ try {
269
+ // Use the host's revision check so a concurrently edited model list is never overwritten.
270
+ // 使用宿主的修订检查,防止覆盖并发修改过的模型列表。
271
+ const result = await remote.settings.mutate(shared_1.PI_AI_NAMESPACE, [
272
+ (0, shared_1.reasoningOp)(snapshot.profile, provider, model.id, encoded.value),
273
+ ], snapshot.revision);
274
+ if (!result.ok) {
275
+ setError(result.error.code === 'settings/conflict' ? t('conflict') : result.error.message);
276
+ return;
277
+ }
278
+ // The mutation returns the committed profile, including the revision for the next save.
279
+ // 写入返回提交后的配置及下一次保存需要的修订版本。
280
+ const profile = (0, shared_1.profileOf)(result.value.value, provider);
281
+ if (profile === undefined) {
282
+ setResource({ kind: 'failed', message: 'The committed settings no longer contain this provider' });
283
+ return;
284
+ }
285
+ setResource({ kind: 'ready', snapshot: { ...snapshot, profile, revision: result.value.revision } });
286
+ setDrafts(current => {
287
+ // Clear just the model that committed; other unsaved models remain editable.
288
+ // 仅清除已提交模型的草稿,其他未保存模型仍可编辑。
289
+ const remaining = new Map(current);
290
+ remaining.delete(model.id);
291
+ return remaining;
292
+ });
293
+ setSaved(true);
294
+ }
295
+ catch (failure) {
296
+ setError(messageOf(failure));
297
+ }
298
+ finally {
299
+ setSaving(false);
300
+ }
301
+ };
302
+ return ((0, jsx_runtime_1.jsxs)("form", { className: "vrs-form", onSubmit: event => { void save(event); }, children: [(0, jsx_runtime_1.jsx)("p", { className: "vrs-hint", children: t('lead') }), (0, jsx_runtime_1.jsxs)("label", { className: "vrs-control", children: [t('model'), (0, jsx_runtime_1.jsx)("select", { value: model.id, disabled: saving, onChange: event => { setSelected(event.currentTarget.value); setSaved(false); setError(undefined); }, children: models.map(entry => (0, jsx_runtime_1.jsx)("option", { value: entry.id, children: entry.name === entry.id ? entry.id : `${entry.name} · ${entry.id}` }, entry.id)) })] }), (0, jsx_runtime_1.jsxs)("fieldset", { className: "vrs-fields", disabled: !canWrite || saving, children: [(0, jsx_runtime_1.jsxs)("label", { className: "vrs-control", children: [t('mode'), (0, jsx_runtime_1.jsxs)("select", { value: draft.mode, onChange: event => { change({ ...draft, mode: event.currentTarget.value }); }, children: [(0, jsx_runtime_1.jsx)("option", { value: "inherit", children: t('inherit') }), (0, jsx_runtime_1.jsx)("option", { value: "disabled", children: t('disabled') }), (0, jsx_runtime_1.jsx)("option", { value: "custom", children: t('custom') })] })] }), draft.mode === 'custom' ? ((0, jsx_runtime_1.jsx)("div", { className: "vrs-levels", children: shared_1.LEVELS.map(level => ((0, jsx_runtime_1.jsxs)("div", { className: "vrs-level", children: [(0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: draft.values[level] !== undefined, onChange: event => { toggle(level, event.currentTarget.checked); } }), level] }), (0, jsx_runtime_1.jsx)("input", { type: "text", "aria-label": `${t('wire')} · ${level}`, disabled: draft.values[level] === undefined, placeholder: level === 'off' ? t('offHint') : t('wire'), value: draft.values[level] ?? '', onChange: event => { change({ ...draft, values: { ...draft.values, [level]: event.currentTarget.value } }); } })] }, level))) })) : null, (0, jsx_runtime_1.jsx)("div", { className: "vrs-actions", children: (0, jsx_runtime_1.jsx)("button", { type: "submit", disabled: pending === undefined || !encoded.ok, children: t(saving ? 'saving' : 'save') }) })] }), !canWrite ? (0, jsx_runtime_1.jsx)("p", { className: "vrs-hint", children: t('readonly') }) : null, encoded.ok ? null : ((0, jsx_runtime_1.jsxs)("p", { className: "vrs-hint", children: [t(encoded.issue), encoded.issue === 'providerDefault' ? `: ${snapshot.profile.reasoning}` : ''] })), error === undefined ? null : (0, jsx_runtime_1.jsxs)("p", { className: "vrs-error", role: "alert", children: [t('saveFailed'), ": ", error] }), saved ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { role: "status", children: t('saved') }), (0, jsx_runtime_1.jsx)("p", { className: "vrs-hint", children: t('reselect') })] }) : null, error === undefined ? null : (0, jsx_runtime_1.jsx)("div", { className: "vrs-actions", children: (0, jsx_runtime_1.jsx)("button", { type: "button", disabled: saving, onClick: reload, children: t('reload') }) })] }));
303
+ }
304
+ /**
305
+ * Render a caught remote or local failure as a user-visible message.
306
+ * 将捕获的远程或本地错误转为用户可见的消息。
307
+ */
308
+ function messageOf(failure) {
309
+ return failure instanceof Error ? failure.message : String(failure);
310
+ }
311
+
312
+ },
313
+ "./shared": function (module, exports, require) {
314
+ "use strict";
315
+ Object.defineProperty(exports, "__esModule", { value: true });
316
+ exports.LEVELS = exports.PI_AI_NAMESPACE = exports.PACKAGE_NAME = void 0;
317
+ exports.profileOf = profileOf;
318
+ exports.modelOptions = modelOptions;
319
+ exports.draftOf = draftOf;
320
+ exports.encodeDraft = encodeDraft;
321
+ exports.reasoningOp = reasoningOp;
322
+ // The client bundle ID matches the suite dependency's package name.
323
+ // 客户端包标识与套件依赖的包名一致。
324
+ exports.PACKAGE_NAME = '@openvulcan/dsh-vulcan-reasoning';
325
+ // The settings namespace and provider-card key registered by dsh's pi-ai adapter.
326
+ // dsh 的 pi-ai 适配器注册的设置命名空间及提供商卡片键。
327
+ exports.PI_AI_NAMESPACE = 'llm-pi-ai';
328
+ // The level keys accepted by both supported dsh pi-ai schemas, in escalation order.
329
+ // 两个受支持的 dsh pi-ai 模式接受的级别键,按思考强度递增排列。
330
+ exports.LEVELS = ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'];
331
+ /**
332
+ * Read a provider profile by its exact route ID from the pi-ai namespace's effective value.
333
+ * 从 pi-ai 命名空间的生效配置中按准确路由标识读取提供商配置。
334
+ */
335
+ function profileOf(value, provider) {
336
+ if (typeof value !== 'object' || value === null)
337
+ return undefined;
338
+ // Only this registered namespace has the providers dictionary described by the adapter.
339
+ // 只有此已注册的命名空间具有适配器定义的 providers 字典。
340
+ const config = value;
341
+ // Catalog IDs are dictionary keys and must resolve to a stored own entry.
342
+ // 目录标识是字典键,只能解析为配置中自身拥有的条目。
343
+ const profiles = config.providers;
344
+ return typeof profiles === 'object' && profiles !== null && Object.hasOwn(profiles, provider) ? profiles[provider] : undefined;
345
+ }
346
+ /**
347
+ * List configured models when the profile replaces the catalog, or pair inherited models with their overrides.
348
+ * 配置替换模型目录时列出配置模型,否则为继承的模型附上对应的覆盖项。
349
+ */
350
+ function modelOptions(profile, catalog) {
351
+ // The adapter treats an empty models array as inheritance.
352
+ // 适配器将空的 models 数组视为继承模型目录。
353
+ const configured = profile.models;
354
+ if (configured !== undefined && configured.length > 0) {
355
+ return configured.map(model => ({ id: model.id, name: model.name ?? model.id, efforts: model.reasoningEfforts }));
356
+ }
357
+ // Overrides are keyed by the exact inherited model ID.
358
+ // 覆盖项以继承模型的准确标识为键。
359
+ const overrides = profile.modelOverrides;
360
+ return catalog.map(model => ({
361
+ ...model,
362
+ efforts: overrides !== undefined && Object.hasOwn(overrides, model.id) ? overrides[model.id]?.reasoningEfforts : undefined,
363
+ }));
364
+ }
365
+ /**
366
+ * Convert the stored native field into the editor's mode and per-level text inputs.
367
+ * 将原生存储字段转换为编辑器的模式与各级别文本输入。
368
+ */
369
+ function draftOf(efforts) {
370
+ if (efforts === undefined)
371
+ return { mode: 'inherit', values: {} };
372
+ if (efforts === false)
373
+ return { mode: 'disabled', values: {} };
374
+ // A present off level with a null wire value is edited as an enabled blank input.
375
+ // 已启用但传输值为 null 的 off 级别,在表单中显示为已启用的空输入。
376
+ const values = {};
377
+ for (const level of exports.LEVELS) {
378
+ // An absent key keeps the level unchecked.
379
+ // 未配置的键在表单中保持未勾选。
380
+ const wire = efforts[level];
381
+ if (wire !== undefined)
382
+ values[level] = wire ?? '';
383
+ }
384
+ return { mode: 'custom', values };
385
+ }
386
+ /**
387
+ * Validate a draft and its compatibility with the provider default, returning the native field.
388
+ * 校验草稿及其与提供商默认级别的兼容性,并返回对应的原生字段。
389
+ */
390
+ function encodeDraft(draft, providerDefault) {
391
+ if (draft.mode === 'inherit')
392
+ return { ok: true, value: undefined };
393
+ // pi-ai falls back to the provider default when a request has no explicit effort.
394
+ // 请求未指定思考级别时,pi-ai 会使用提供商默认级别。
395
+ if (providerDefault !== undefined) {
396
+ if (draft.mode === 'disabled' && providerDefault !== 'off')
397
+ return { ok: false, issue: 'providerDefault' };
398
+ if (draft.mode === 'custom' && draft.values[providerDefault] === undefined)
399
+ return { ok: false, issue: 'providerDefault' };
400
+ }
401
+ if (draft.mode === 'disabled')
402
+ return { ok: true, value: false };
403
+ if (!exports.LEVELS.some(level => level !== 'off' && draft.values[level] !== undefined)) {
404
+ return { ok: false, issue: 'levelRequired' };
405
+ }
406
+ // A declaration must give each enabled thinking level its exact wire spelling.
407
+ // 自定义配置必须为每个已启用的思考级别提供准确的传输值。
408
+ const values = {};
409
+ for (const level of exports.LEVELS) {
410
+ // Trim the entered value and omit unchecked levels.
411
+ // 修剪用户输入,并省略未勾选的级别。
412
+ const wire = draft.values[level]?.trim();
413
+ if (wire === undefined)
414
+ continue;
415
+ if (wire === '' && level !== 'off')
416
+ return { ok: false, issue: 'wireRequired' };
417
+ values[level] = wire === '' ? null : wire;
418
+ }
419
+ return { ok: true, value: values };
420
+ }
421
+ /**
422
+ * Build the native write for one model ID in a provider profile, preserving all unrelated fields.
423
+ * 为提供商配置中的一个模型标识生成原生写操作,并保留所有无关字段。
424
+ */
425
+ function reasoningOp(profile, provider, modelId, efforts) {
426
+ // The pi-ai provider directory addresses each profile by this path.
427
+ // pi-ai 提供商目录按此路径定位各提供商配置。
428
+ const path = ['providers', provider];
429
+ // Use the whole current list for explicit models. dsh replaces arrays between layers.
430
+ // 显式配置的模型使用当前完整列表,因为 dsh 在配置层之间替换数组。
431
+ const models = profile.models;
432
+ if (models !== undefined && models.length > 0) {
433
+ if (!models.some(model => model.id === modelId))
434
+ throw new Error('The configured model is no longer available');
435
+ return {
436
+ op: 'set',
437
+ path: [...path, 'models'],
438
+ value: models.map(model => {
439
+ if (model.id !== modelId)
440
+ return model;
441
+ // Remove only the old reasoning field so inheritance uses the installed catalog.
442
+ // 仅移除旧的思考字段,使继承模式使用已安装的模型目录。
443
+ const { reasoningEfforts: _previous, ...rest } = model;
444
+ return efforts === undefined ? rest : { ...rest, reasoningEfforts: efforts };
445
+ }),
446
+ };
447
+ }
448
+ // The adapter permits sparse overrides only when the model list is inherited.
449
+ // 适配器仅在继承模型列表时允许稀疏覆盖项。
450
+ const field = [...path, 'modelOverrides', modelId, 'reasoningEfforts'];
451
+ return efforts === undefined ? { op: 'unset', path: field } : { op: 'set', path: field, value: efforts };
452
+ }
453
+
454
+ },
455
+ "./style": function (module, exports, require) {
456
+ "use strict";
457
+ Object.defineProperty(exports, "__esModule", { value: true });
458
+ exports.installStyle = installStyle;
459
+ const shared_1 = require("./shared");
460
+ // Use dsh's colors so the editor follows both Vulcan and native themes.
461
+ // 使用 dsh 的颜色,使编辑器同时适配 Vulcan 主题和原生主题。
462
+ const CSS = `
463
+ .vrs { min-width: 0; color: var(--dsw-alias-label-primary); font-size: 13px; }
464
+ .vrs > summary { cursor: pointer; width: fit-content; color: var(--dsw-alias-label-secondary); }
465
+ .vrs > summary:focus-visible, .vrs :is(button,input,select):focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary); outline-offset: 2px; }
466
+ .vrs-form, .vrs-fields, .vrs-levels { display: grid; gap: 10px; min-width: 0; }
467
+ .vrs-form { margin-top: 10px; }
468
+ .vrs-fields { padding: 0; margin: 0; border: 0; }
469
+ .vrs-control { display: grid; gap: 4px; min-width: 0; }
470
+ .vrs-control select, .vrs-level input[type="text"] { box-sizing: border-box; min-width: 0; width: 100%; padding: 5px 8px; color: inherit; background: var(--dsw-alias-bg-layer-1); border: 1px solid var(--dsw-alias-border-l3); border-radius: var(--dsw-radius-sm); font: inherit; }
471
+ .vrs-level { display: grid; grid-template-columns: minmax(5rem, 1fr) minmax(0, 2fr); align-items: center; gap: 8px; }
472
+ .vrs-level label { display: flex; align-items: center; gap: 6px; }
473
+ .vrs-actions { display: flex; flex-wrap: wrap; gap: 8px; }
474
+ .vrs button { padding: 5px 10px; font: inherit; cursor: pointer; color: inherit; background: var(--dsw-alias-bg-layer-1); border: 1px solid var(--dsw-alias-border-l3); border-radius: var(--dsw-radius-sm); }
475
+ .vrs button[type="submit"] { color: var(--dsw-alias-label-primary-foreground); background: var(--dsw-alias-button-primary-fill); }
476
+ .vrs :is(button,input,select):disabled { opacity: .6; cursor: default; }
477
+ .vrs p { margin: 0; overflow-wrap: anywhere; }
478
+ .vrs-hint { color: var(--dsw-alias-label-secondary); }
479
+ .vrs-error { color: var(--dsw-alias-state-error-primary); }
480
+ `;
481
+ /**
482
+ * Mount the editor's stylesheet and return a disposer for the mounted node.
483
+ * 挂载编辑器样式表,并返回用于移除该节点的清理函数。
484
+ */
485
+ function installStyle() {
486
+ // The stylesheet belongs to the loaded plugin's lifetime.
487
+ // 样式表的生命周期与插件加载周期一致。
488
+ const tag = document.createElement('style');
489
+ tag.dataset['plugin'] = shared_1.PACKAGE_NAME;
490
+ tag.textContent = CSS;
491
+ document.head.appendChild(tag);
492
+ return () => { tag.remove(); };
493
+ }
494
+
495
+ },
496
+ };
497
+ var cache = {};
498
+ function load(request) {
499
+ if (!(request in definitions)) return platformRequire(request);
500
+ if (!(request in cache)) {
501
+ var module = { exports: {} };
502
+ cache[request] = module;
503
+ definitions[request](module, module.exports, load);
504
+ }
505
+ return cache[request].exports;
506
+ }
507
+ return load('./index');
508
+ }
509
+ });
@@ -0,0 +1,6 @@
1
+ export declare const name = "vulcan-reasoning";
2
+ /**
3
+ * Mount the host entry. The browser contribution uses dsh's existing settings service.
4
+ * 挂载宿主入口。浏览器扩展使用 dsh 现有的设置服务。
5
+ */
6
+ export declare function apply(): void;
@@ -0,0 +1,8 @@
1
+ // Cordis uses this identity to load the browser contribution with the suite.
2
+ // Cordis 以此标识随套件加载浏览器扩展。
3
+ export const name = 'vulcan-reasoning';
4
+ /**
5
+ * Mount the host entry. The browser contribution uses dsh's existing settings service.
6
+ * 挂载宿主入口。浏览器扩展使用 dsh 现有的设置服务。
7
+ */
8
+ export function apply() { }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@openvulcan/dsh-vulcan-reasoning",
3
+ "version": "0.4.3",
4
+ "description": "Edit per-model thinking levels for pi-ai providers in DeepSeek Harness.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/OpenVulcan/dsh-vulcancode.git",
9
+ "directory": "packages/dsh-vulcan-reasoning"
10
+ },
11
+ "type": "module",
12
+ "main": "lib/index.js",
13
+ "types": "lib/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./lib/index.d.ts",
17
+ "default": "./lib/index.js"
18
+ },
19
+ "./client": "./lib/client.js",
20
+ "./package.json": "./package.json"
21
+ },
22
+ "files": [
23
+ "lib",
24
+ "!lib/**/*.test.*"
25
+ ],
26
+ "engines": {
27
+ "dsh": ">=0.2.1-rc.2 <0.3.0"
28
+ },
29
+ "dsh": {
30
+ "client": {
31
+ "platform": "web",
32
+ "inject": [
33
+ "@deepseek-ai/dsh-api-remotes",
34
+ "@deepseek-ai/dsh-client-locale",
35
+ "@deepseek-ai/dsh-client-ui-settings-models"
36
+ ]
37
+ }
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ }
42
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenVulcan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.