@inupedia/spotlight-vue 0.1.1 → 0.1.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 (178) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +0 -1
  2. package/dist/avatar/config.js +0 -1
  3. package/dist/avatar/speech/live2dAnswerSpeechPolicy.js +0 -1
  4. package/dist/avatar/speech/live2dBriefingSummarizer.js +0 -1
  5. package/dist/avatar/speech/live2dStreamSpeech.js +0 -1
  6. package/dist/avatar/speech/live2dTtsPlayback.js +0 -1
  7. package/dist/avatar/speech/llmUtils.js +0 -1
  8. package/dist/avatar/speech/spotlightSpeech.js +0 -1
  9. package/dist/avatar/spine/live2dApp.js +0 -1
  10. package/dist/avatar/spine/spineAvatar.js +0 -1
  11. package/dist/avatar/spine/spineLipSync.js +0 -1
  12. package/dist/components/InspiraCardSpotlight.js +0 -1
  13. package/dist/components/InspiraCardSpotlight.vue.js +0 -1
  14. package/dist/components/Live2dPanel.vue.js +0 -1
  15. package/dist/components/Live2dPanel2.vue.js +0 -1
  16. package/dist/components/OfficialBorderBeam.js +0 -1
  17. package/dist/components/OfficialBorderBeam.vue.js +0 -1
  18. package/dist/components/SpotlightCommandPanel.vue.js +0 -1
  19. package/dist/components/SpotlightCommandPanel2.vue.js +0 -1
  20. package/dist/components/SpotlightMarkdownPreview.vue.js +0 -1
  21. package/dist/components/SpotlightMarkdownPreview2.vue.js +0 -1
  22. package/dist/components/SpotlightRoot.vue.js +0 -1
  23. package/dist/components/SpotlightRoot2.vue.js +0 -1
  24. package/dist/components/SpotlightShell.vue.js +0 -1
  25. package/dist/components/SpotlightShell2.vue.js +0 -1
  26. package/dist/components/SpotlightThinking.vue.js +0 -1
  27. package/dist/components/SpotlightThinking2.vue.js +0 -1
  28. package/dist/components/index.d.ts +3 -0
  29. package/dist/components/index.d.ts.map +1 -0
  30. package/dist/components/index.js +6 -0
  31. package/dist/composables/useSpotlightCommandShortcuts.js +0 -1
  32. package/dist/composables/useSpotlightPanelUi.js +0 -1
  33. package/dist/config.js +0 -1
  34. package/dist/constants/toolNames.js +0 -1
  35. package/dist/host/defineApp.js +0 -1
  36. package/dist/host/defineHost.js +0 -1
  37. package/dist/host/mergeSkills.js +0 -1
  38. package/dist/host/normalizeSkills.js +0 -1
  39. package/dist/host/skillExecution.js +0 -1
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +113 -117
  43. package/dist/markdown/index.d.ts +2 -0
  44. package/dist/markdown/index.d.ts.map +1 -0
  45. package/dist/markdown/index.js +6 -0
  46. package/dist/mountShell.js +0 -1
  47. package/dist/plugin.js +0 -1
  48. package/dist/remote/audio.js +0 -1
  49. package/dist/remote/hostToolRunner.js +3 -4
  50. package/dist/remote/httpConfig.js +0 -1
  51. package/dist/remote/index.js +0 -1
  52. package/dist/remote/meta.js +0 -1
  53. package/dist/remote/runPipeline.d.ts.map +1 -1
  54. package/dist/remote/runPipeline.js +46 -44
  55. package/dist/remote/serverJson.js +0 -1
  56. package/dist/resolveConfig.js +0 -1
  57. package/dist/session/agentSession.js +0 -1
  58. package/dist/skills/index.js +0 -1
  59. package/dist/skills/matching.js +0 -1
  60. package/dist/skills/parser.js +0 -1
  61. package/dist/skills/skillFrontmatterParse.js +0 -1
  62. package/dist/skills/skillListing.js +0 -1
  63. package/dist/skills/skillPaths.js +0 -1
  64. package/dist/store/capabilities.js +0 -1
  65. package/dist/store/constants.js +0 -1
  66. package/dist/store/index.d.ts +5 -0
  67. package/dist/store/index.d.ts.map +1 -0
  68. package/dist/store/index.js +22 -0
  69. package/dist/store/live2dOverlayStore.js +0 -1
  70. package/dist/store/live2dSpeechStore.js +0 -1
  71. package/dist/store/live2dVoiceChannelStore.js +0 -1
  72. package/dist/store/pipeline/api.js +0 -1
  73. package/dist/store/pipeline/constants.js +0 -1
  74. package/dist/store/pipeline/displayText.js +0 -1
  75. package/dist/store/pipeline/errors.js +0 -1
  76. package/dist/store/pipeline/spotlightMarkdown.d.ts.map +1 -1
  77. package/dist/store/pipeline/spotlightMarkdown.js +51 -46
  78. package/dist/store/pipeline/steps.js +0 -1
  79. package/dist/store/pipeline/toolDisplay.js +0 -1
  80. package/dist/store/pipeline/typing.js +0 -1
  81. package/dist/store/recent.js +0 -1
  82. package/dist/store/runtimeStore.js +0 -1
  83. package/dist/store/spotlightStore.js +14 -16
  84. package/dist/store/storeSink.js +0 -1
  85. package/dist/store/types.js +0 -1
  86. package/dist/testing/index.d.ts +3 -0
  87. package/dist/testing/index.d.ts.map +1 -0
  88. package/dist/testing/index.js +6 -0
  89. package/dist/utils/devConsole.js +0 -1
  90. package/dist/utils/requestTimeout.js +0 -1
  91. package/dist/workflow/createOperateDefinition.js +0 -1
  92. package/dist/workflow/index.d.ts +6 -0
  93. package/dist/workflow/index.d.ts.map +1 -0
  94. package/dist/workflow/index.js +20 -0
  95. package/dist/workflow/operate.js +0 -1
  96. package/dist/workflow/runHostTool.js +0 -1
  97. package/dist/workflow/sessionControl.js +0 -1
  98. package/dist/workflow/shared.js +0 -1
  99. package/package.json +72 -8
  100. package/dist/_virtual/_plugin-vue_export-helper.js.map +0 -1
  101. package/dist/avatar/config.js.map +0 -1
  102. package/dist/avatar/speech/live2dAnswerSpeechPolicy.js.map +0 -1
  103. package/dist/avatar/speech/live2dBriefingSummarizer.js.map +0 -1
  104. package/dist/avatar/speech/live2dStreamSpeech.js.map +0 -1
  105. package/dist/avatar/speech/live2dTtsPlayback.js.map +0 -1
  106. package/dist/avatar/speech/llmUtils.js.map +0 -1
  107. package/dist/avatar/speech/spotlightSpeech.js.map +0 -1
  108. package/dist/avatar/spine/live2dApp.js.map +0 -1
  109. package/dist/avatar/spine/spineAvatar.js.map +0 -1
  110. package/dist/avatar/spine/spineLipSync.js.map +0 -1
  111. package/dist/components/InspiraCardSpotlight.js.map +0 -1
  112. package/dist/components/InspiraCardSpotlight.vue.js.map +0 -1
  113. package/dist/components/Live2dPanel.vue.js.map +0 -1
  114. package/dist/components/Live2dPanel2.vue.js.map +0 -1
  115. package/dist/components/OfficialBorderBeam.js.map +0 -1
  116. package/dist/components/OfficialBorderBeam.vue.js.map +0 -1
  117. package/dist/components/SpotlightCommandPanel.vue.js.map +0 -1
  118. package/dist/components/SpotlightCommandPanel2.vue.js.map +0 -1
  119. package/dist/components/SpotlightMarkdownPreview.vue.js.map +0 -1
  120. package/dist/components/SpotlightMarkdownPreview2.vue.js.map +0 -1
  121. package/dist/components/SpotlightRoot.vue.js.map +0 -1
  122. package/dist/components/SpotlightRoot2.vue.js.map +0 -1
  123. package/dist/components/SpotlightShell.vue.js.map +0 -1
  124. package/dist/components/SpotlightShell2.vue.js.map +0 -1
  125. package/dist/components/SpotlightThinking.vue.js.map +0 -1
  126. package/dist/components/SpotlightThinking2.vue.js.map +0 -1
  127. package/dist/composables/useSpotlightCommandShortcuts.js.map +0 -1
  128. package/dist/composables/useSpotlightPanelUi.js.map +0 -1
  129. package/dist/config.js.map +0 -1
  130. package/dist/constants/toolNames.js.map +0 -1
  131. package/dist/host/defineApp.js.map +0 -1
  132. package/dist/host/defineHost.js.map +0 -1
  133. package/dist/host/mergeSkills.js.map +0 -1
  134. package/dist/host/normalizeSkills.js.map +0 -1
  135. package/dist/host/skillExecution.js.map +0 -1
  136. package/dist/index.js.map +0 -1
  137. package/dist/mountShell.js.map +0 -1
  138. package/dist/plugin.js.map +0 -1
  139. package/dist/remote/audio.js.map +0 -1
  140. package/dist/remote/hostToolRunner.js.map +0 -1
  141. package/dist/remote/httpConfig.js.map +0 -1
  142. package/dist/remote/index.js.map +0 -1
  143. package/dist/remote/meta.js.map +0 -1
  144. package/dist/remote/runPipeline.js.map +0 -1
  145. package/dist/remote/serverJson.js.map +0 -1
  146. package/dist/resolveConfig.js.map +0 -1
  147. package/dist/session/agentSession.js.map +0 -1
  148. package/dist/skills/index.js.map +0 -1
  149. package/dist/skills/matching.js.map +0 -1
  150. package/dist/skills/parser.js.map +0 -1
  151. package/dist/skills/skillFrontmatterParse.js.map +0 -1
  152. package/dist/skills/skillListing.js.map +0 -1
  153. package/dist/skills/skillPaths.js.map +0 -1
  154. package/dist/store/capabilities.js.map +0 -1
  155. package/dist/store/constants.js.map +0 -1
  156. package/dist/store/live2dOverlayStore.js.map +0 -1
  157. package/dist/store/live2dSpeechStore.js.map +0 -1
  158. package/dist/store/live2dVoiceChannelStore.js.map +0 -1
  159. package/dist/store/pipeline/api.js.map +0 -1
  160. package/dist/store/pipeline/constants.js.map +0 -1
  161. package/dist/store/pipeline/displayText.js.map +0 -1
  162. package/dist/store/pipeline/errors.js.map +0 -1
  163. package/dist/store/pipeline/spotlightMarkdown.js.map +0 -1
  164. package/dist/store/pipeline/steps.js.map +0 -1
  165. package/dist/store/pipeline/toolDisplay.js.map +0 -1
  166. package/dist/store/pipeline/typing.js.map +0 -1
  167. package/dist/store/recent.js.map +0 -1
  168. package/dist/store/runtimeStore.js.map +0 -1
  169. package/dist/store/spotlightStore.js.map +0 -1
  170. package/dist/store/storeSink.js.map +0 -1
  171. package/dist/store/types.js.map +0 -1
  172. package/dist/utils/devConsole.js.map +0 -1
  173. package/dist/utils/requestTimeout.js.map +0 -1
  174. package/dist/workflow/createOperateDefinition.js.map +0 -1
  175. package/dist/workflow/operate.js.map +0 -1
  176. package/dist/workflow/runHostTool.js.map +0 -1
  177. package/dist/workflow/sessionControl.js.map +0 -1
  178. package/dist/workflow/shared.js.map +0 -1
@@ -4,13 +4,13 @@ import { getSkillsPoolForRun as x } from "../skills/index.js";
4
4
  import { useAgentSessionStore as w } from "../session/agentSession.js";
5
5
  import { useSpotlightRuntimeStore as E } from "../store/runtimeStore.js";
6
6
  import { SPOTLIGHT_PIPELINE_STEP_IDS as r } from "../store/pipeline/constants.js";
7
- import { isLoopPlanningChunk as O, splitIntentStepContent as $, splitToolStepContent as L, composeToolStepContent as H } from "../store/pipeline/displayText.js";
8
- import { getSpotlightConfig as A } from "../plugin.js";
9
- import { executeRemoteHostTool as q, ensureHostToolsManifest as I } from "./hostToolRunner.js";
10
- import { getSpotlightServerBase as g, buildSpotlightJsonHeaders as m, getSpotlightProjectId as F } from "./httpConfig.js";
11
- import { ensureSpotlightMeta as J } from "./meta.js";
7
+ import { isLoopPlanningChunk as O, splitIntentStepContent as $, splitToolStepContent as H, composeToolStepContent as L } from "../store/pipeline/displayText.js";
8
+ import { getSpotlightHostAdapter as A, getSpotlightConfig as q } from "../plugin.js";
9
+ import { executeRemoteHostTool as F, ensureHostToolsManifest as I } from "./hostToolRunner.js";
10
+ import { getSpotlightServerBase as g, buildSpotlightJsonHeaders as m, getSpotlightProjectId as J } from "./httpConfig.js";
11
+ import { ensureSpotlightMeta as W } from "./meta.js";
12
12
  const y = /* @__PURE__ */ new WeakMap();
13
- function M(t) {
13
+ function D(t) {
14
14
  return t.type !== "host_action_request" && t.type !== "run_completed" && t.type !== "run_error" && t.type !== "ping";
15
15
  }
16
16
  function a(t, e, o) {
@@ -19,12 +19,12 @@ function a(t, e, o) {
19
19
  const n = { id: e, label: o, status: "pending" };
20
20
  return t.setSteps([...t.getSteps(), n]), n;
21
21
  }
22
- function W() {
22
+ function M() {
23
23
  return new Promise((t) => {
24
24
  requestAnimationFrame(() => t());
25
25
  });
26
26
  }
27
- function D(t) {
27
+ function j(t) {
28
28
  const e = t.summary?.trim();
29
29
  if (e && e.length > 48 && !e.startsWith("{") && !e.startsWith("["))
30
30
  return e;
@@ -36,8 +36,8 @@ function D(t) {
36
36
  }
37
37
  return e || "";
38
38
  }
39
- function j(t) {
40
- const e = D(t.result);
39
+ function U(t) {
40
+ const e = j(t.result);
41
41
  return {
42
42
  id: t.result.call.id,
43
43
  name: t.result.call.name,
@@ -50,7 +50,7 @@ function j(t) {
50
50
  status: t.result.success ? "done" : "error"
51
51
  };
52
52
  }
53
- function U(t) {
53
+ function z(t) {
54
54
  return {
55
55
  id: t.call.id,
56
56
  name: t.call.name,
@@ -59,7 +59,7 @@ function U(t) {
59
59
  status: "running"
60
60
  };
61
61
  }
62
- function z(t, e) {
62
+ function G(t, e) {
63
63
  const o = e.success ? "前端操作已执行。" : e.error || "前端操作执行失败。";
64
64
  return {
65
65
  id: t.id,
@@ -73,20 +73,20 @@ function z(t, e) {
73
73
  status: e.success ? "done" : "error"
74
74
  };
75
75
  }
76
- function G(t) {
76
+ function B(t) {
77
77
  return t.startsWith("panel.") || t.startsWith("navigate.") || t.startsWith("session.");
78
78
  }
79
- function B(t, e, o) {
80
- if (!G(e.request.call.name)) return;
79
+ function Q(t, e, o) {
80
+ if (!B(e.request.call.name)) return;
81
81
  a(t, r.tool, "执行工具与回答");
82
- const s = z(e.request.call, o);
82
+ const s = G(e.request.call, o);
83
83
  t.appendToolCallsToStep(r.tool, [s]), t.setStep(
84
84
  r.tool,
85
85
  o.success ? "done" : "error",
86
86
  s.resultText
87
87
  );
88
88
  }
89
- async function Q(t, e) {
89
+ async function Y(t, e) {
90
90
  if (e.type !== "ping") {
91
91
  if (e.type === "step_sync")
92
92
  t.setSteps(
@@ -118,10 +118,10 @@ async function Q(t, e) {
118
118
  o,
119
119
  t.getSteps().find((n) => n.id === o)?.status ?? "active",
120
120
  s
121
- ) : (t.appendChunkToStep(o, s), await W());
121
+ ) : (t.appendChunkToStep(o, s), await M());
122
122
  } else if (e.type === "tool_start")
123
123
  a(t, r.tool, "执行工具与回答"), t.appendToolCallsToStep(r.tool, [
124
- U(e)
124
+ z(e)
125
125
  ]);
126
126
  else if (e.type === "tool_progress")
127
127
  a(t, r.tool, "执行工具与回答"), t.appendToolCallsToStep(r.tool, [
@@ -136,7 +136,7 @@ async function Q(t, e) {
136
136
  ]);
137
137
  else if (e.type === "tool_result")
138
138
  a(t, r.tool, "执行工具与回答"), t.appendToolCallsToStep(r.tool, [
139
- j(e)
139
+ U(e)
140
140
  ]), e.result.attachments?.length && t.appendAttachmentsToStep(
141
141
  r.tool,
142
142
  e.result.attachments
@@ -165,17 +165,17 @@ async function Q(t, e) {
165
165
  );
166
166
  else if (e.type === "assistant_response") {
167
167
  a(t, r.tool, "执行工具与回答");
168
- const o = t.getSteps().find((n) => n.id === r.tool), { planning: s } = L(o?.content ?? "");
168
+ const o = t.getSteps().find((n) => n.id === r.tool), { planning: s } = H(o?.content ?? "");
169
169
  t.setStep(
170
170
  r.tool,
171
171
  "done",
172
- H(s, e.content)
172
+ L(s, e.content)
173
173
  );
174
174
  }
175
- M(e) && t.appendExecutionEvent?.(e);
175
+ D(e) && t.appendExecutionEvent?.(e);
176
176
  }
177
177
  }
178
- async function V(t) {
178
+ async function K(t) {
179
179
  await fetch(
180
180
  `${g()}/v1/runs/${encodeURIComponent(t.runId)}/host-results`,
181
181
  {
@@ -193,7 +193,7 @@ async function V(t) {
193
193
  }
194
194
  );
195
195
  }
196
- function Y(t) {
196
+ function V(t) {
197
197
  const e = t.split(/\n\n/u), o = e.pop() ?? "";
198
198
  return { events: e.flatMap((n) => {
199
199
  const i = n.split(/\n/u).find((f) => f.startsWith("data: "));
@@ -205,21 +205,22 @@ function Y(t) {
205
205
  }
206
206
  }), rest: o };
207
207
  }
208
- async function at(t) {
208
+ async function ut(t) {
209
209
  await Promise.allSettled([
210
210
  I(t),
211
- J(t)
211
+ W(t)
212
212
  ]);
213
213
  }
214
- async function K(t, e) {
215
- const o = w(), s = E(), n = await I(e);
214
+ async function X(t, e) {
215
+ const o = w(), s = E(), n = await I(e), i = A().getClientToolDescriptors();
216
216
  return {
217
217
  hostManifest: n,
218
+ localClientTools: i,
218
219
  payload: {
219
- projectId: F(),
220
+ projectId: J(),
220
221
  sessionId: o.sessionId,
221
222
  userQuestion: t,
222
- uiContext: A().getUiContext?.() ?? {},
223
+ uiContext: q().getUiContext?.() ?? {},
223
224
  sessionState: {
224
225
  sessionId: o.sessionId,
225
226
  activeTaskId: o.activeTaskId,
@@ -239,16 +240,18 @@ async function K(t, e) {
239
240
  resumableAction: s.resumableAction,
240
241
  lastResolvedTarget: s.lastResolvedTarget
241
242
  },
242
- clientToolsManifestVersion: n.version,
243
+ // Prefer the host's actually registered tools so server allowlist matches
244
+ // what executeHostTool can run locally (avoids manifest-version skew).
245
+ clientTools: i,
243
246
  skills: N(x())
244
247
  }
245
248
  };
246
249
  }
247
- async function ut(t, e) {
248
- const o = g(), s = e.getSignal(), { payload: n, hostManifest: i } = await K(
250
+ async function ct(t, e) {
251
+ const o = g(), s = e.getSignal(), { payload: n, localClientTools: i } = await X(
249
252
  t,
250
253
  s
251
- ), f = new Set(i.tools.map((u) => u.name)), c = await fetch(`${o}/v1/runs`, {
254
+ ), f = new Set(i.map((u) => u.name)), c = await fetch(`${o}/v1/runs`, {
252
255
  method: "POST",
253
256
  headers: m(),
254
257
  body: JSON.stringify(n),
@@ -284,15 +287,15 @@ async function ut(t, e) {
284
287
  const { done: u, value: _ } = await h.read();
285
288
  if (u) break;
286
289
  S += P.decode(_, { stream: !0 });
287
- const k = Y(S);
290
+ const k = V(S);
288
291
  S = k.rest;
289
292
  for (const l of k.events) {
290
293
  if (l.type === "host_action_request") {
291
- const C = await q(l.request.call, e, {
294
+ const C = await F(l.request.call, e, {
292
295
  allowedHostNames: f,
293
296
  hostEffect: l.request.hostEffect
294
297
  });
295
- B(e, l, C), await V({
298
+ Q(e, l, C), await K({
296
299
  runId: d,
297
300
  correlationId: l.request.correlationId,
298
301
  result: C,
@@ -302,7 +305,7 @@ async function ut(t, e) {
302
305
  }
303
306
  if (l.type === "run_error")
304
307
  throw new Error(l.error);
305
- if (await Q(e, l), l.type === "run_completed")
308
+ if (await Y(e, l), l.type === "run_completed")
306
309
  return l.sessionPatch?.invokedSkills && w().setInvokedSkills(
307
310
  l.sessionPatch.invokedSkills
308
311
  ), T = l, {
@@ -328,15 +331,14 @@ async function R(t) {
328
331
  }
329
332
  );
330
333
  }
331
- function ct(t) {
334
+ function dt(t) {
332
335
  if (!t) return;
333
336
  const e = y.get(t);
334
337
  e && (y.delete(t), R(e));
335
338
  }
336
339
  export {
337
340
  R as cancelRemoteSpotlightRun,
338
- ct as cancelRemoteSpotlightRunForSignal,
339
- ut as runRemoteSpotlightPipeline,
340
- at as warmupSpotlightRemoteContext
341
+ dt as cancelRemoteSpotlightRunForSignal,
342
+ ct as runRemoteSpotlightPipeline,
343
+ ut as warmupSpotlightRemoteContext
341
344
  };
342
- //# sourceMappingURL=runPipeline.js.map
@@ -9,4 +9,3 @@ export {
9
9
  e as getSpotlightJson,
10
10
  r as postSpotlightJson
11
11
  };
12
- //# sourceMappingURL=serverJson.js.map
@@ -11,4 +11,3 @@ function c(s) {
11
11
  export {
12
12
  c as resolveSpotlightConfig
13
13
  };
14
- //# sourceMappingURL=resolveConfig.js.map
@@ -147,4 +147,3 @@ const f = m("agentSession", {
147
147
  export {
148
148
  f as useAgentSessionStore
149
149
  };
150
- //# sourceMappingURL=agentSession.js.map
@@ -20,4 +20,3 @@ export {
20
20
  u as loadBundledSkillsFromGlob,
21
21
  e as parseSpotlightSkillMarkdown
22
22
  };
23
- //# sourceMappingURL=index.js.map
@@ -30,4 +30,3 @@ export {
30
30
  o as normalizeSkillQuestion,
31
31
  a as questionMatchesSkill
32
32
  };
33
- //# sourceMappingURL=matching.js.map
@@ -14,4 +14,3 @@ function d(i, l) {
14
14
  export {
15
15
  d as parseSpotlightSkillMarkdown
16
16
  };
17
- //# sourceMappingURL=parser.js.map
@@ -200,4 +200,3 @@ function K(n, e) {
200
200
  export {
201
201
  K as parseSpotlightSkillMarkdownFields
202
202
  };
203
- //# sourceMappingURL=skillFrontmatterParse.js.map
@@ -42,4 +42,3 @@ export {
42
42
  L as formatSkillsWithinBudget,
43
43
  E as getSkillListingCharBudget
44
44
  };
45
- //# sourceMappingURL=skillListing.js.map
@@ -19,4 +19,3 @@ export {
19
19
  l as inferSkillRootFromSourcePath,
20
20
  n as resolveSkillRoot
21
21
  };
22
- //# sourceMappingURL=skillPaths.js.map
@@ -9,4 +9,3 @@ function g(e) {
9
9
  export {
10
10
  g as getSuggestedQuestions
11
11
  };
12
- //# sourceMappingURL=capabilities.js.map
@@ -3,4 +3,3 @@ export {
3
3
  E as RECENT_QUESTIONS_MAX,
4
4
  t as SPOTLIGHT_RECENT_KEY
5
5
  };
6
- //# sourceMappingURL=constants.js.map
@@ -0,0 +1,5 @@
1
+ export { useSpotlightStore, SpotlightIntent, SPOTLIGHT_INTENT_LABELS, ProgressSubIntent, PROGRESS_SUB_INTENT_LABELS, InvestmentSubIntent, INVESTMENT_SUB_INTENT_LABELS, QualitySubIntent, QUALITY_SUB_INTENT_LABELS, SafetySubIntent, SAFETY_SUB_INTENT_LABELS, SUB_INTENT_CONFIG, type AgentStep, type IntentWithReason, type SubIntentConfig, type SpotlightSkillPermissionRequest, } from "./spotlightStore.js";
2
+ export { SpotlightCommandDomain, SpotlightCommandScope, type SpotlightCommand, type SpotlightCommandAction, type SpotlightCommandTarget, type SpotlightVideoChannelId, } from "./types.js";
3
+ export { useSpotlightRuntimeStore } from "./runtimeStore.js";
4
+ export { useAgentSessionStore } from "../session/agentSession.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,+BAA+B,GACrC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { useSpotlightStore as e } from "./spotlightStore.js";
2
+ import { INVESTMENT_SUB_INTENT_LABELS as n, InvestmentSubIntent as T, PROGRESS_SUB_INTENT_LABELS as I, ProgressSubIntent as _, QUALITY_SUB_INTENT_LABELS as E, QualitySubIntent as N, SAFETY_SUB_INTENT_LABELS as r, SPOTLIGHT_INTENT_LABELS as L, SUB_INTENT_CONFIG as m, SafetySubIntent as p, SpotlightCommandDomain as B, SpotlightCommandScope as i, SpotlightIntent as u } from "./types.js";
3
+ import { useSpotlightRuntimeStore as A } from "./runtimeStore.js";
4
+ import { useAgentSessionStore as l } from "../session/agentSession.js";
5
+ export {
6
+ n as INVESTMENT_SUB_INTENT_LABELS,
7
+ T as InvestmentSubIntent,
8
+ I as PROGRESS_SUB_INTENT_LABELS,
9
+ _ as ProgressSubIntent,
10
+ E as QUALITY_SUB_INTENT_LABELS,
11
+ N as QualitySubIntent,
12
+ r as SAFETY_SUB_INTENT_LABELS,
13
+ L as SPOTLIGHT_INTENT_LABELS,
14
+ m as SUB_INTENT_CONFIG,
15
+ p as SafetySubIntent,
16
+ B as SpotlightCommandDomain,
17
+ i as SpotlightCommandScope,
18
+ u as SpotlightIntent,
19
+ l as useAgentSessionStore,
20
+ A as useSpotlightRuntimeStore,
21
+ e as useSpotlightStore
22
+ };
@@ -16,4 +16,3 @@ const f = i("live2dOverlay", () => {
16
16
  export {
17
17
  f as useLive2dOverlayStore
18
18
  };
19
- //# sourceMappingURL=live2dOverlayStore.js.map
@@ -16,4 +16,3 @@ const c = i("live2dSpeech", () => {
16
16
  export {
17
17
  c as useLive2dSpeechStore
18
18
  };
19
- //# sourceMappingURL=live2dSpeechStore.js.map
@@ -19,4 +19,3 @@ const c = l(
19
19
  export {
20
20
  c as useLive2dVoiceChannelStore
21
21
  };
22
- //# sourceMappingURL=live2dVoiceChannelStore.js.map
@@ -83,4 +83,3 @@ function k(t) {
83
83
  export {
84
84
  k as buildSpotlightHandlerApi
85
85
  };
86
- //# sourceMappingURL=api.js.map
@@ -14,4 +14,3 @@ export {
14
14
  n as SPOTLIGHT_PIPELINE_STEP_IDS,
15
15
  o as SPOTLIGHT_PIPELINE_STEP_LABELS
16
16
  };
17
- //# sourceMappingURL=constants.js.map
@@ -90,4 +90,3 @@ export {
90
90
  S as splitToolStepContent,
91
91
  L as stripLoopPlanningBlocks
92
92
  };
93
- //# sourceMappingURL=displayText.js.map
@@ -27,4 +27,3 @@ export {
27
27
  $ as applyPipelineError,
28
28
  d as formatToolFailure
29
29
  };
30
- //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spotlightMarkdown.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/spotlightMarkdown.ts"],"names":[],"mappings":"AAGA,4CAA4C;AAC5C,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsBhE;AA0ED,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAejB;AAED,gEAAgE;AAChE,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
1
+ {"version":3,"file":"spotlightMarkdown.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/spotlightMarkdown.ts"],"names":[],"mappings":"AAeA,4CAA4C;AAC5C,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsBhE;AA0ED,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED,gEAAgE;AAChE,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
@@ -1,86 +1,91 @@
1
- import * as p from "prettier/standalone";
2
- import * as l from "prettier/plugins/markdown";
3
- function f(e) {
4
- if (!e.trim()) return e;
5
- let r = e.replace(/\r\n/g, `
1
+ let u = null;
2
+ function l() {
3
+ return u ??= Promise.all([
4
+ import("prettier/standalone"),
5
+ import("prettier/plugins/markdown")
6
+ ]).then(([r, e]) => ({ prettier: r, markdownPlugin: e })), u;
7
+ }
8
+ function f(r) {
9
+ if (!r.trim()) return r;
10
+ let e = r.replace(/\r\n/g, `
6
11
  `);
7
- return r = r.replace(/(#{1,6}\s+[^\n#|]+?)(#{1,6}\s)/g, `$1
12
+ return e = e.replace(/(#{1,6}\s+[^\n#|]+?)(#{1,6}\s)/g, `$1
8
13
 
9
- $2`), r = r.replace(/([\u4e00-\u9fa5)】>])(#{1,6})(?=\S)/g, `$1
14
+ $2`), e = e.replace(/([\u4e00-\u9fa5)】>])(#{1,6})(?=\S)/g, `$1
10
15
 
11
- $2`), r = r.replace(/^(#{1,6})(\d+[.)、])/gm, "$1 $2"), r = r.replace(/^-(?![-])(\S)/gm, "- $1"), r = r.replace(
16
+ $2`), e = e.replace(/^(#{1,6})(\d+[.)、])/gm, "$1 $2"), e = e.replace(/^-(?![-])(\S)/gm, "- $1"), e = e.replace(
12
17
  new RegExp("(?<=[\\d.km座处)%)kW#])-(?=[\\u4e00-\\u9fa5])", "g"),
13
18
  `
14
19
  - `
15
- ), r = r.split(`
16
- `).map((n) => m(n)).join(`
17
- `), r = g(r), r.replace(/\n{3,}/g, `
20
+ ), e = e.split(`
21
+ `).map((n) => d(n)).join(`
22
+ `), e = m(e), e.replace(/\n{3,}/g, `
18
23
 
19
24
  `).trim();
20
25
  }
21
- function m(e) {
22
- const r = e.trim();
23
- if (!r.includes("|") || /^\|/.test(r) || /^\|[-\s|:]+\|/.test(r.replace(/\s/g, ""))) return e;
24
- const n = r.indexOf("|"), t = r.slice(0, n).trimEnd(), i = r.slice(n).trimStart();
25
- return !t || !i || !i.includes("|") && !i.startsWith("|") ? e : `${t}
26
+ function d(r) {
27
+ const e = r.trim();
28
+ if (!e.includes("|") || /^\|/.test(e) || /^\|[-\s|:]+\|/.test(e.replace(/\s/g, ""))) return r;
29
+ const n = e.indexOf("|"), t = e.slice(0, n).trimEnd(), i = e.slice(n).trimStart();
30
+ return !t || !i || !i.includes("|") && !i.startsWith("|") ? r : `${t}
26
31
 
27
32
  ${i}`;
28
33
  }
29
- function g(e) {
30
- const r = e.split(`
34
+ function m(r) {
35
+ const e = r.split(`
31
36
  `), n = [];
32
- for (let t = 0; t < r.length; t++) {
33
- const i = r[t], u = i.trim();
34
- if (!c(u)) {
37
+ for (let t = 0; t < e.length; t++) {
38
+ const i = e[t], p = i.trim();
39
+ if (!c(p)) {
35
40
  n.push(i);
36
41
  continue;
37
42
  }
38
- const o = [];
39
- for (; t < r.length; ) {
40
- const s = r[t].trim();
41
- if (!s) {
43
+ const s = [];
44
+ for (; t < e.length; ) {
45
+ const o = e[t].trim();
46
+ if (!o) {
42
47
  t++;
43
48
  continue;
44
49
  }
45
- if (!c(s)) break;
46
- o.push(s), t++;
50
+ if (!c(o)) break;
51
+ s.push(o), t++;
47
52
  }
48
53
  t--;
49
- const a = d(o);
54
+ const a = g(s);
50
55
  a.length && n.push(...a);
51
56
  }
52
57
  return n.join(`
53
58
  `);
54
59
  }
55
- function c(e) {
56
- return e ? /^\|.*\|$/.test(e) && /[|:-]/.test(e) ? !0 : /^[\s|:-]+$/.test(e) : !1;
60
+ function c(r) {
61
+ return r ? /^\|.*\|$/.test(r) && /[|:-]/.test(r) ? !0 : /^[\s|:-]+$/.test(r) : !1;
57
62
  }
58
- function d(e) {
59
- if (!e.length) return [];
60
- if (!e.every(
63
+ function g(r) {
64
+ if (!r.length) return [];
65
+ if (!r.every(
61
66
  (t) => /^[\s|:-]+$/.test(t.replace(/[^|:\-\s]/g, ""))
62
- )) return e;
63
- const n = e.join("").replace(/\s+/g, "").replace(/\|+/g, "|").replace(/^\|/, "|").replace(/\|$/, "|");
64
- return /^\|[-:|]+\|$/.test(n) ? [n] : e;
67
+ )) return r;
68
+ const n = r.join("").replace(/\s+/g, "").replace(/\|+/g, "|").replace(/^\|/, "|").replace(/\|$/, "|");
69
+ return /^\|[-:|]+\|$/.test(n) ? [n] : r;
65
70
  }
66
- async function $(e) {
67
- const r = f(e);
68
- if (!r) return "";
71
+ async function h(r) {
72
+ const e = f(r);
73
+ if (!e) return "";
69
74
  try {
70
- return (await p.format(r, {
75
+ const { prettier: n, markdownPlugin: t } = await l();
76
+ return (await n.format(e, {
71
77
  parser: "markdown",
72
- plugins: [l],
78
+ plugins: [t],
73
79
  proseWrap: "preserve"
74
80
  })).trim();
75
81
  } catch {
76
- return r;
82
+ return e;
77
83
  }
78
84
  }
79
- function h() {
85
+ function $() {
80
86
  }
81
87
  export {
82
- $ as formatSpotlightKnowledgeMarkdown,
83
- h as initSpotlightMarkdownPreview,
88
+ h as formatSpotlightKnowledgeMarkdown,
89
+ $ as initSpotlightMarkdownPreview,
84
90
  f as preprocessKnowledgeMarkdown
85
91
  };
86
- //# sourceMappingURL=spotlightMarkdown.js.map
@@ -99,4 +99,3 @@ export {
99
99
  d as findActiveStep,
100
100
  x as setStepState
101
101
  };
102
- //# sourceMappingURL=steps.js.map
@@ -62,4 +62,3 @@ export {
62
62
  r as normalizeToolName,
63
63
  w as partitionToolCalls
64
64
  };
65
- //# sourceMappingURL=toolDisplay.js.map
@@ -29,4 +29,3 @@ export {
29
29
  s as typewriterAppendToStepContent,
30
30
  g as typewriterToStepContent
31
31
  };
32
- //# sourceMappingURL=typing.js.map
@@ -24,4 +24,3 @@ export {
24
24
  a as loadRecentQuestions,
25
25
  u as persistRecentQuestions
26
26
  };
27
- //# sourceMappingURL=recent.js.map
@@ -22,4 +22,3 @@ const l = e("spotlightRuntime", {
22
22
  export {
23
23
  l as useSpotlightRuntimeStore
24
24
  };
25
- //# sourceMappingURL=runtimeStore.js.map
@@ -1,7 +1,6 @@
1
1
  import { defineStore as m } from "pinia";
2
2
  import { getSpotlightConfig as S } from "../plugin.js";
3
3
  import { runRemoteSpotlightPipeline as g, warmupSpotlightRemoteContext as u, cancelRemoteSpotlightRunForSignal as f } from "../remote/runPipeline.js";
4
- import "@inupedia/spotlight-client";
5
4
  import { ensureSpotlightMeta as T } from "../remote/meta.js";
6
5
  import { devWarn as y } from "../utils/devConsole.js";
7
6
  import { useAgentSessionStore as E } from "../session/agentSession.js";
@@ -13,7 +12,7 @@ import { typewriterAppendToStepContent as b, typewriterToStepContent as v } from
13
12
  import { addRecentQuestionToList as R, persistRecentQuestions as Q, loadRecentQuestions as L } from "./recent.js";
14
13
  import { getSuggestedQuestions as C } from "./capabilities.js";
15
14
  import { buildSpotlightStoreSink as N } from "./storeSink.js";
16
- import { INVESTMENT_SUB_INTENT_LABELS as te, InvestmentSubIntent as ie, PROGRESS_SUB_INTENT_LABELS as ne, ProgressSubIntent as se, QUALITY_SUB_INTENT_LABELS as re, QualitySubIntent as oe, SAFETY_SUB_INTENT_LABELS as le, SPOTLIGHT_INTENT_LABELS as ue, SUB_INTENT_CONFIG as pe, SafetySubIntent as ae, SpotlightIntent as he } from "./types.js";
15
+ import { INVESTMENT_SUB_INTENT_LABELS as ee, InvestmentSubIntent as te, PROGRESS_SUB_INTENT_LABELS as ie, ProgressSubIntent as ne, QUALITY_SUB_INTENT_LABELS as se, QualitySubIntent as re, SAFETY_SUB_INTENT_LABELS as oe, SPOTLIGHT_INTENT_LABELS as le, SUB_INTENT_CONFIG as ue, SafetySubIntent as pe, SpotlightIntent as ae } from "./types.js";
17
16
  const h = "spotlight-telemetry-snapshots", l = 20;
18
17
  function p(e) {
19
18
  return e instanceof DOMException && e.name === "AbortError" ? !0 : e instanceof Error && e.name === "AbortError";
@@ -88,7 +87,7 @@ function B(e) {
88
87
  function O(e, i) {
89
88
  return c(e).find((n) => n[0]?.turnId === i) ?? [];
90
89
  }
91
- const Z = m("spotlight", {
90
+ const z = m("spotlight", {
92
91
  state: () => ({
93
92
  visible: !1,
94
93
  prompt: "",
@@ -345,17 +344,16 @@ const Z = m("spotlight", {
345
344
  }
346
345
  });
347
346
  export {
348
- te as INVESTMENT_SUB_INTENT_LABELS,
349
- ie as InvestmentSubIntent,
350
- ne as PROGRESS_SUB_INTENT_LABELS,
351
- se as ProgressSubIntent,
352
- re as QUALITY_SUB_INTENT_LABELS,
353
- oe as QualitySubIntent,
354
- le as SAFETY_SUB_INTENT_LABELS,
355
- ue as SPOTLIGHT_INTENT_LABELS,
356
- pe as SUB_INTENT_CONFIG,
357
- ae as SafetySubIntent,
358
- he as SpotlightIntent,
359
- Z as useSpotlightStore
347
+ ee as INVESTMENT_SUB_INTENT_LABELS,
348
+ te as InvestmentSubIntent,
349
+ ie as PROGRESS_SUB_INTENT_LABELS,
350
+ ne as ProgressSubIntent,
351
+ se as QUALITY_SUB_INTENT_LABELS,
352
+ re as QualitySubIntent,
353
+ oe as SAFETY_SUB_INTENT_LABELS,
354
+ le as SPOTLIGHT_INTENT_LABELS,
355
+ ue as SUB_INTENT_CONFIG,
356
+ pe as SafetySubIntent,
357
+ ae as SpotlightIntent,
358
+ z as useSpotlightStore
360
359
  };
361
- //# sourceMappingURL=spotlightStore.js.map
@@ -124,4 +124,3 @@ function g(t) {
124
124
  export {
125
125
  g as buildSpotlightStoreSink
126
126
  };
127
- //# sourceMappingURL=storeSink.js.map
@@ -84,4 +84,3 @@ export {
84
84
  d as TUNNEL_WANDER_SUB_INTENT_LABELS,
85
85
  s as TunnelWanderSubIntent
86
86
  };
87
- //# sourceMappingURL=types.js.map
@@ -0,0 +1,3 @@
1
+ export { resetSpotlightRuntimeForTests } from "../plugin.js";
2
+ export { resetSpotlightMetaCacheForTests } from "../remote/meta.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { resetSpotlightRuntimeForTests as o } from "../plugin.js";
2
+ import { resetSpotlightMetaCacheForTests as s } from "../remote/meta.js";
3
+ export {
4
+ s as resetSpotlightMetaCacheForTests,
5
+ o as resetSpotlightRuntimeForTests
6
+ };
@@ -3,4 +3,3 @@ function n(e, ...a) {
3
3
  export {
4
4
  n as devWarn
5
5
  };
6
- //# sourceMappingURL=devConsole.js.map