@inupedia/spotlight-vue 0.1.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 (312) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js.map +1 -0
  3. package/dist/assets/spotlight-vue.css +1 -0
  4. package/dist/avatar/config.d.ts +16 -0
  5. package/dist/avatar/config.d.ts.map +1 -0
  6. package/dist/avatar/config.js +22 -0
  7. package/dist/avatar/config.js.map +1 -0
  8. package/dist/avatar/speech/live2dAnswerSpeechPolicy.d.ts +3 -0
  9. package/dist/avatar/speech/live2dAnswerSpeechPolicy.d.ts.map +1 -0
  10. package/dist/avatar/speech/live2dAnswerSpeechPolicy.js +16 -0
  11. package/dist/avatar/speech/live2dAnswerSpeechPolicy.js.map +1 -0
  12. package/dist/avatar/speech/live2dBriefingSummarizer.d.ts +11 -0
  13. package/dist/avatar/speech/live2dBriefingSummarizer.d.ts.map +1 -0
  14. package/dist/avatar/speech/live2dBriefingSummarizer.js +92 -0
  15. package/dist/avatar/speech/live2dBriefingSummarizer.js.map +1 -0
  16. package/dist/avatar/speech/live2dStreamSpeech.d.ts +14 -0
  17. package/dist/avatar/speech/live2dStreamSpeech.d.ts.map +1 -0
  18. package/dist/avatar/speech/live2dStreamSpeech.js +5 -0
  19. package/dist/avatar/speech/live2dStreamSpeech.js.map +1 -0
  20. package/dist/avatar/speech/live2dTtsPipeline.d.ts +34 -0
  21. package/dist/avatar/speech/live2dTtsPipeline.d.ts.map +1 -0
  22. package/dist/avatar/speech/live2dTtsPlayback.d.ts +3 -0
  23. package/dist/avatar/speech/live2dTtsPlayback.d.ts.map +1 -0
  24. package/dist/avatar/speech/live2dTtsPlayback.js +24 -0
  25. package/dist/avatar/speech/live2dTtsPlayback.js.map +1 -0
  26. package/dist/avatar/speech/llmUtils.d.ts +3 -0
  27. package/dist/avatar/speech/llmUtils.d.ts.map +1 -0
  28. package/dist/avatar/speech/llmUtils.js +19 -0
  29. package/dist/avatar/speech/llmUtils.js.map +1 -0
  30. package/dist/avatar/speech/spotlightSpeech.d.ts +24 -0
  31. package/dist/avatar/speech/spotlightSpeech.d.ts.map +1 -0
  32. package/dist/avatar/speech/spotlightSpeech.js +94 -0
  33. package/dist/avatar/speech/spotlightSpeech.js.map +1 -0
  34. package/dist/avatar/spine/live2dApp.d.ts +11 -0
  35. package/dist/avatar/spine/live2dApp.d.ts.map +1 -0
  36. package/dist/avatar/spine/live2dApp.js +28 -0
  37. package/dist/avatar/spine/live2dApp.js.map +1 -0
  38. package/dist/avatar/spine/spineAvatar.d.ts +14 -0
  39. package/dist/avatar/spine/spineAvatar.d.ts.map +1 -0
  40. package/dist/avatar/spine/spineAvatar.js +101 -0
  41. package/dist/avatar/spine/spineAvatar.js.map +1 -0
  42. package/dist/avatar/spine/spineLipSync.d.ts +13 -0
  43. package/dist/avatar/spine/spineLipSync.d.ts.map +1 -0
  44. package/dist/avatar/spine/spineLipSync.js +48 -0
  45. package/dist/avatar/spine/spineLipSync.js.map +1 -0
  46. package/dist/components/InspiraCardSpotlight.js +5 -0
  47. package/dist/components/InspiraCardSpotlight.js.map +1 -0
  48. package/dist/components/InspiraCardSpotlight.vue.d.ts +28 -0
  49. package/dist/components/InspiraCardSpotlight.vue.d.ts.map +1 -0
  50. package/dist/components/InspiraCardSpotlight.vue.js +53 -0
  51. package/dist/components/InspiraCardSpotlight.vue.js.map +1 -0
  52. package/dist/components/Live2dPanel.vue.d.ts +4 -0
  53. package/dist/components/Live2dPanel.vue.d.ts.map +1 -0
  54. package/dist/components/Live2dPanel.vue.js +8 -0
  55. package/dist/components/Live2dPanel.vue.js.map +1 -0
  56. package/dist/components/Live2dPanel2.vue.js +67 -0
  57. package/dist/components/Live2dPanel2.vue.js.map +1 -0
  58. package/dist/components/OfficialBorderBeam.js +8 -0
  59. package/dist/components/OfficialBorderBeam.js.map +1 -0
  60. package/dist/components/OfficialBorderBeam.vue.d.ts +21 -0
  61. package/dist/components/OfficialBorderBeam.vue.d.ts.map +1 -0
  62. package/dist/components/OfficialBorderBeam.vue.js +30 -0
  63. package/dist/components/OfficialBorderBeam.vue.js.map +1 -0
  64. package/dist/components/SpotlightCommandPanel.vue.d.ts +18 -0
  65. package/dist/components/SpotlightCommandPanel.vue.d.ts.map +1 -0
  66. package/dist/components/SpotlightCommandPanel.vue.js +8 -0
  67. package/dist/components/SpotlightCommandPanel.vue.js.map +1 -0
  68. package/dist/components/SpotlightCommandPanel2.vue.js +217 -0
  69. package/dist/components/SpotlightCommandPanel2.vue.js.map +1 -0
  70. package/dist/components/SpotlightMarkdownPreview.vue.d.ts +12 -0
  71. package/dist/components/SpotlightMarkdownPreview.vue.d.ts.map +1 -0
  72. package/dist/components/SpotlightMarkdownPreview.vue.js +39 -0
  73. package/dist/components/SpotlightMarkdownPreview.vue.js.map +1 -0
  74. package/dist/components/SpotlightMarkdownPreview2.vue.js +5 -0
  75. package/dist/components/SpotlightMarkdownPreview2.vue.js.map +1 -0
  76. package/dist/components/SpotlightRoot.vue.d.ts +26 -0
  77. package/dist/components/SpotlightRoot.vue.d.ts.map +1 -0
  78. package/dist/components/SpotlightRoot.vue.js +58 -0
  79. package/dist/components/SpotlightRoot.vue.js.map +1 -0
  80. package/dist/components/SpotlightRoot2.vue.js +5 -0
  81. package/dist/components/SpotlightRoot2.vue.js.map +1 -0
  82. package/dist/components/SpotlightShell.vue.d.ts +9 -0
  83. package/dist/components/SpotlightShell.vue.d.ts.map +1 -0
  84. package/dist/components/SpotlightShell.vue.js +5 -0
  85. package/dist/components/SpotlightShell.vue.js.map +1 -0
  86. package/dist/components/SpotlightShell2.vue.js +312 -0
  87. package/dist/components/SpotlightShell2.vue.js.map +1 -0
  88. package/dist/components/SpotlightThinking.vue.d.ts +59 -0
  89. package/dist/components/SpotlightThinking.vue.d.ts.map +1 -0
  90. package/dist/components/SpotlightThinking.vue.js +8 -0
  91. package/dist/components/SpotlightThinking.vue.js.map +1 -0
  92. package/dist/components/SpotlightThinking2.vue.js +893 -0
  93. package/dist/components/SpotlightThinking2.vue.js.map +1 -0
  94. package/dist/composables/useSpotlightCommandShortcuts.d.ts +13 -0
  95. package/dist/composables/useSpotlightCommandShortcuts.d.ts.map +1 -0
  96. package/dist/composables/useSpotlightCommandShortcuts.js +30 -0
  97. package/dist/composables/useSpotlightCommandShortcuts.js.map +1 -0
  98. package/dist/composables/useSpotlightPanelUi.d.ts +15 -0
  99. package/dist/composables/useSpotlightPanelUi.d.ts.map +1 -0
  100. package/dist/composables/useSpotlightPanelUi.js +9 -0
  101. package/dist/composables/useSpotlightPanelUi.js.map +1 -0
  102. package/dist/config.d.ts +59 -0
  103. package/dist/config.d.ts.map +1 -0
  104. package/dist/config.js +22 -0
  105. package/dist/config.js.map +1 -0
  106. package/dist/constants/toolNames.d.ts +12 -0
  107. package/dist/constants/toolNames.d.ts.map +1 -0
  108. package/dist/constants/toolNames.js +15 -0
  109. package/dist/constants/toolNames.js.map +1 -0
  110. package/dist/host/defineApp.d.ts +16 -0
  111. package/dist/host/defineApp.d.ts.map +1 -0
  112. package/dist/host/defineApp.js +27 -0
  113. package/dist/host/defineApp.js.map +1 -0
  114. package/dist/host/defineHost.d.ts +55 -0
  115. package/dist/host/defineHost.d.ts.map +1 -0
  116. package/dist/host/defineHost.js +55 -0
  117. package/dist/host/defineHost.js.map +1 -0
  118. package/dist/host/mergeSkills.d.ts +4 -0
  119. package/dist/host/mergeSkills.d.ts.map +1 -0
  120. package/dist/host/mergeSkills.js +12 -0
  121. package/dist/host/mergeSkills.js.map +1 -0
  122. package/dist/host/normalizeSkills.d.ts +4 -0
  123. package/dist/host/normalizeSkills.d.ts.map +1 -0
  124. package/dist/host/normalizeSkills.js +11 -0
  125. package/dist/host/normalizeSkills.js.map +1 -0
  126. package/dist/host/skillExecution.d.ts +9 -0
  127. package/dist/host/skillExecution.d.ts.map +1 -0
  128. package/dist/host/skillExecution.js +14 -0
  129. package/dist/host/skillExecution.js.map +1 -0
  130. package/dist/index.d.ts +37 -0
  131. package/dist/index.d.ts.map +1 -0
  132. package/dist/index.js +123 -0
  133. package/dist/index.js.map +1 -0
  134. package/dist/mountShell.d.ts +5 -0
  135. package/dist/mountShell.d.ts.map +1 -0
  136. package/dist/mountShell.js +24 -0
  137. package/dist/mountShell.js.map +1 -0
  138. package/dist/plugin.d.ts +16 -0
  139. package/dist/plugin.d.ts.map +1 -0
  140. package/dist/plugin.js +51 -0
  141. package/dist/plugin.js.map +1 -0
  142. package/dist/remote/audio.d.ts +13 -0
  143. package/dist/remote/audio.d.ts.map +1 -0
  144. package/dist/remote/audio.js +56 -0
  145. package/dist/remote/audio.js.map +1 -0
  146. package/dist/remote/hostToolRunner.d.ts +11 -0
  147. package/dist/remote/hostToolRunner.d.ts.map +1 -0
  148. package/dist/remote/hostToolRunner.js +25 -0
  149. package/dist/remote/hostToolRunner.js.map +1 -0
  150. package/dist/remote/httpConfig.d.ts +5 -0
  151. package/dist/remote/httpConfig.d.ts.map +1 -0
  152. package/dist/remote/httpConfig.js +20 -0
  153. package/dist/remote/httpConfig.js.map +1 -0
  154. package/dist/remote/index.d.ts +8 -0
  155. package/dist/remote/index.d.ts.map +1 -0
  156. package/dist/remote/index.js +27 -0
  157. package/dist/remote/index.js.map +1 -0
  158. package/dist/remote/meta.d.ts +12 -0
  159. package/dist/remote/meta.d.ts.map +1 -0
  160. package/dist/remote/meta.js +59 -0
  161. package/dist/remote/meta.js.map +1 -0
  162. package/dist/remote/runPipeline.d.ts +7 -0
  163. package/dist/remote/runPipeline.d.ts.map +1 -0
  164. package/dist/remote/runPipeline.js +342 -0
  165. package/dist/remote/runPipeline.js.map +1 -0
  166. package/dist/remote/serverJson.d.ts +3 -0
  167. package/dist/remote/serverJson.d.ts.map +1 -0
  168. package/dist/remote/serverJson.js +12 -0
  169. package/dist/remote/serverJson.js.map +1 -0
  170. package/dist/remote/types.d.ts +6 -0
  171. package/dist/remote/types.d.ts.map +1 -0
  172. package/dist/resolveConfig.d.ts +21 -0
  173. package/dist/resolveConfig.d.ts.map +1 -0
  174. package/dist/resolveConfig.js +14 -0
  175. package/dist/resolveConfig.js.map +1 -0
  176. package/dist/session/agentSession.d.ts +46 -0
  177. package/dist/session/agentSession.d.ts.map +1 -0
  178. package/dist/session/agentSession.js +150 -0
  179. package/dist/session/agentSession.js.map +1 -0
  180. package/dist/skills/index.d.ts +9 -0
  181. package/dist/skills/index.d.ts.map +1 -0
  182. package/dist/skills/index.js +23 -0
  183. package/dist/skills/index.js.map +1 -0
  184. package/dist/skills/matching.d.ts +11 -0
  185. package/dist/skills/matching.d.ts.map +1 -0
  186. package/dist/skills/matching.js +33 -0
  187. package/dist/skills/matching.js.map +1 -0
  188. package/dist/skills/parser.d.ts +3 -0
  189. package/dist/skills/parser.d.ts.map +1 -0
  190. package/dist/skills/parser.js +17 -0
  191. package/dist/skills/parser.js.map +1 -0
  192. package/dist/skills/skillFrontmatterParse.d.ts +3 -0
  193. package/dist/skills/skillFrontmatterParse.d.ts.map +1 -0
  194. package/dist/skills/skillFrontmatterParse.js +203 -0
  195. package/dist/skills/skillFrontmatterParse.js.map +1 -0
  196. package/dist/skills/skillListing.d.ts +9 -0
  197. package/dist/skills/skillListing.d.ts.map +1 -0
  198. package/dist/skills/skillListing.js +45 -0
  199. package/dist/skills/skillListing.js.map +1 -0
  200. package/dist/skills/skillPaths.d.ts +4 -0
  201. package/dist/skills/skillPaths.d.ts.map +1 -0
  202. package/dist/skills/skillPaths.js +22 -0
  203. package/dist/skills/skillPaths.js.map +1 -0
  204. package/dist/store/capabilities.d.ts +7 -0
  205. package/dist/store/capabilities.d.ts.map +1 -0
  206. package/dist/store/capabilities.js +12 -0
  207. package/dist/store/capabilities.js.map +1 -0
  208. package/dist/store/constants.d.ts +8 -0
  209. package/dist/store/constants.d.ts.map +1 -0
  210. package/dist/store/constants.js +6 -0
  211. package/dist/store/constants.js.map +1 -0
  212. package/dist/store/live2dOverlayStore.d.ts +20 -0
  213. package/dist/store/live2dOverlayStore.d.ts.map +1 -0
  214. package/dist/store/live2dOverlayStore.js +19 -0
  215. package/dist/store/live2dOverlayStore.js.map +1 -0
  216. package/dist/store/live2dSpeechStore.d.ts +29 -0
  217. package/dist/store/live2dSpeechStore.d.ts.map +1 -0
  218. package/dist/store/live2dSpeechStore.js +19 -0
  219. package/dist/store/live2dSpeechStore.js.map +1 -0
  220. package/dist/store/live2dVoiceChannelStore.d.ts +21 -0
  221. package/dist/store/live2dVoiceChannelStore.d.ts.map +1 -0
  222. package/dist/store/live2dVoiceChannelStore.js +22 -0
  223. package/dist/store/live2dVoiceChannelStore.js.map +1 -0
  224. package/dist/store/pipeline/api.d.ts +5 -0
  225. package/dist/store/pipeline/api.d.ts.map +1 -0
  226. package/dist/store/pipeline/api.js +86 -0
  227. package/dist/store/pipeline/api.js.map +1 -0
  228. package/dist/store/pipeline/constants.d.ts +18 -0
  229. package/dist/store/pipeline/constants.d.ts.map +1 -0
  230. package/dist/store/pipeline/constants.js +17 -0
  231. package/dist/store/pipeline/constants.js.map +1 -0
  232. package/dist/store/pipeline/displayText.d.ts +32 -0
  233. package/dist/store/pipeline/displayText.d.ts.map +1 -0
  234. package/dist/store/pipeline/displayText.js +93 -0
  235. package/dist/store/pipeline/displayText.js.map +1 -0
  236. package/dist/store/pipeline/errors.d.ts +5 -0
  237. package/dist/store/pipeline/errors.d.ts.map +1 -0
  238. package/dist/store/pipeline/errors.js +30 -0
  239. package/dist/store/pipeline/errors.js.map +1 -0
  240. package/dist/store/pipeline/spotlightMarkdown.d.ts +6 -0
  241. package/dist/store/pipeline/spotlightMarkdown.d.ts.map +1 -0
  242. package/dist/store/pipeline/spotlightMarkdown.js +86 -0
  243. package/dist/store/pipeline/spotlightMarkdown.js.map +1 -0
  244. package/dist/store/pipeline/steps.d.ts +11 -0
  245. package/dist/store/pipeline/steps.d.ts.map +1 -0
  246. package/dist/store/pipeline/steps.js +102 -0
  247. package/dist/store/pipeline/steps.js.map +1 -0
  248. package/dist/store/pipeline/toolDisplay.d.ts +14 -0
  249. package/dist/store/pipeline/toolDisplay.d.ts.map +1 -0
  250. package/dist/store/pipeline/toolDisplay.js +65 -0
  251. package/dist/store/pipeline/toolDisplay.js.map +1 -0
  252. package/dist/store/pipeline/types.d.ts +53 -0
  253. package/dist/store/pipeline/types.d.ts.map +1 -0
  254. package/dist/store/pipeline/typing.d.ts +4 -0
  255. package/dist/store/pipeline/typing.d.ts.map +1 -0
  256. package/dist/store/pipeline/typing.js +32 -0
  257. package/dist/store/pipeline/typing.js.map +1 -0
  258. package/dist/store/recent.d.ts +4 -0
  259. package/dist/store/recent.d.ts.map +1 -0
  260. package/dist/store/recent.js +27 -0
  261. package/dist/store/recent.js.map +1 -0
  262. package/dist/store/runtime/types.d.ts +140 -0
  263. package/dist/store/runtime/types.d.ts.map +1 -0
  264. package/dist/store/runtimeStore.d.ts +18 -0
  265. package/dist/store/runtimeStore.d.ts.map +1 -0
  266. package/dist/store/runtimeStore.js +25 -0
  267. package/dist/store/runtimeStore.js.map +1 -0
  268. package/dist/store/spotlightStore.d.ts +2787 -0
  269. package/dist/store/spotlightStore.d.ts.map +1 -0
  270. package/dist/store/spotlightStore.js +361 -0
  271. package/dist/store/spotlightStore.js.map +1 -0
  272. package/dist/store/storeSink.d.ts +16 -0
  273. package/dist/store/storeSink.d.ts.map +1 -0
  274. package/dist/store/storeSink.js +127 -0
  275. package/dist/store/storeSink.js.map +1 -0
  276. package/dist/store/types.d.ts +199 -0
  277. package/dist/store/types.d.ts.map +1 -0
  278. package/dist/store/types.js +87 -0
  279. package/dist/store/types.js.map +1 -0
  280. package/dist/types/session.d.ts +5 -0
  281. package/dist/types/session.d.ts.map +1 -0
  282. package/dist/types/toolResult.d.ts +11 -0
  283. package/dist/types/toolResult.d.ts.map +1 -0
  284. package/dist/utils/devConsole.d.ts +2 -0
  285. package/dist/utils/devConsole.d.ts.map +1 -0
  286. package/dist/utils/devConsole.js +6 -0
  287. package/dist/utils/devConsole.js.map +1 -0
  288. package/dist/utils/requestTimeout.d.ts +5 -0
  289. package/dist/utils/requestTimeout.d.ts.map +1 -0
  290. package/dist/utils/requestTimeout.js +12 -0
  291. package/dist/utils/requestTimeout.js.map +1 -0
  292. package/dist/workflow/createOperateDefinition.d.ts +22 -0
  293. package/dist/workflow/createOperateDefinition.d.ts.map +1 -0
  294. package/dist/workflow/createOperateDefinition.js +32 -0
  295. package/dist/workflow/createOperateDefinition.js.map +1 -0
  296. package/dist/workflow/operate.d.ts +23 -0
  297. package/dist/workflow/operate.d.ts.map +1 -0
  298. package/dist/workflow/operate.js +96 -0
  299. package/dist/workflow/operate.js.map +1 -0
  300. package/dist/workflow/runHostTool.d.ts +4 -0
  301. package/dist/workflow/runHostTool.d.ts.map +1 -0
  302. package/dist/workflow/runHostTool.js +13 -0
  303. package/dist/workflow/runHostTool.js.map +1 -0
  304. package/dist/workflow/sessionControl.d.ts +30 -0
  305. package/dist/workflow/sessionControl.d.ts.map +1 -0
  306. package/dist/workflow/sessionControl.js +113 -0
  307. package/dist/workflow/sessionControl.js.map +1 -0
  308. package/dist/workflow/shared.d.ts +6 -0
  309. package/dist/workflow/shared.d.ts.map +1 -0
  310. package/dist/workflow/shared.js +15 -0
  311. package/dist/workflow/shared.js.map +1 -0
  312. package/package.json +78 -0
@@ -0,0 +1,2787 @@
1
+ import type { AgentStep } from "./types.js";
2
+ import type { SpotlightExecutionEvent } from "./runtime/types.js";
3
+ import type { HandlerApi } from "./pipeline/types.js";
4
+ type PipelinePhase = "idle" | "running" | "cancelled" | "error" | "done";
5
+ type SpotlightTelemetryFailureCategory = "tool_runtime" | "tool_timeout" | "runtime_error" | "cancelled" | "max_turns_exhausted" | "tool_failure_unrecoverable" | "completed";
6
+ type SpotlightTimelineEvent = {
7
+ turnId: string;
8
+ at: number;
9
+ kind: SpotlightExecutionEvent["type"];
10
+ iteration?: number;
11
+ summary?: string;
12
+ raw: SpotlightExecutionEvent;
13
+ };
14
+ type SpotlightFailureSummary = {
15
+ turnId: string;
16
+ stopReason: string;
17
+ failureClass: string | null;
18
+ category: SpotlightTelemetryFailureCategory;
19
+ elapsedMs: number;
20
+ toolErrors: string[];
21
+ };
22
+ type SpotlightTelemetrySnapshot = {
23
+ turnId: string;
24
+ recordedAt: number;
25
+ timeline: SpotlightTimelineEvent[];
26
+ failureSummary: SpotlightFailureSummary | null;
27
+ };
28
+ export type { AgentStep, IntentWithReason, SubIntentConfig, } from "./types.js";
29
+ export { 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, } from "./types.js";
30
+ export type SpotlightSkillPermissionRequest = {
31
+ skillName: string;
32
+ displayName?: string;
33
+ reason: string;
34
+ source: "model" | "user-slash";
35
+ at: number;
36
+ };
37
+ export declare const useSpotlightStore: import("pinia").StoreDefinition<"spotlight", {
38
+ visible: boolean;
39
+ prompt: string;
40
+ loading: boolean;
41
+ error: string;
42
+ result: string | null;
43
+ selectedIndex: number;
44
+ showThinkingBar: boolean;
45
+ agentSteps: AgentStep[];
46
+ executionEvents: SpotlightExecutionEvent[];
47
+ pendingSkillPermission: SpotlightSkillPermissionRequest | null;
48
+ recentQuestions: string[];
49
+ suggestedQuestions: string[];
50
+ pipelinePhase: PipelinePhase;
51
+ pipelineRunId: number;
52
+ pipelineAbortController: AbortController | null;
53
+ telemetrySnapshots: SpotlightTelemetrySnapshot[];
54
+ }, {
55
+ uiExecutionEvents(state: {
56
+ visible: boolean;
57
+ prompt: string;
58
+ loading: boolean;
59
+ error: string;
60
+ result: string | null;
61
+ selectedIndex: number;
62
+ showThinkingBar: boolean;
63
+ agentSteps: {
64
+ id: string;
65
+ label: string;
66
+ status: "pending" | "active" | "done" | "error";
67
+ content?: string | undefined;
68
+ attachments?: {
69
+ id: string;
70
+ type: "image" | "file" | "html";
71
+ name?: string | undefined;
72
+ url: string;
73
+ mimeType?: string | undefined;
74
+ }[] | undefined;
75
+ files?: {
76
+ id: string;
77
+ path: string;
78
+ name: string;
79
+ content?: string[] | undefined;
80
+ createdAt?: string | undefined;
81
+ modifiedAt?: string | undefined;
82
+ }[] | undefined;
83
+ artifacts?: {
84
+ id: string;
85
+ kind: import("./types.js").SpotlightArtifactKind;
86
+ title: string;
87
+ sourceToolCallId?: string | undefined;
88
+ sourceToolName?: string | undefined;
89
+ summary?: string | undefined;
90
+ payload: {
91
+ columns: string[];
92
+ rows: Array<Record<string, unknown>>;
93
+ } | {
94
+ html: string;
95
+ } | {
96
+ url: string;
97
+ } | {
98
+ value: unknown;
99
+ } | {
100
+ text: string;
101
+ };
102
+ }[] | undefined;
103
+ toolCalls?: {
104
+ id: string;
105
+ name: string;
106
+ displayName?: string | undefined;
107
+ argsText?: string | undefined;
108
+ resultText?: string | undefined;
109
+ summary?: string | undefined;
110
+ errorCode?: string | undefined;
111
+ trace?: {
112
+ phase: "dependency" | "context" | "execution";
113
+ source: "executor" | "spotlight_action" | "spotlight_server";
114
+ type: string;
115
+ tool: string;
116
+ detail?: string | undefined;
117
+ at: number;
118
+ elapsedMs: number;
119
+ }[] | undefined;
120
+ status: "pending" | "running" | "done" | "error";
121
+ }[] | undefined;
122
+ chatItems?: ({
123
+ id: string;
124
+ type: "text";
125
+ text: string;
126
+ } | {
127
+ id: string;
128
+ type: "tool";
129
+ toolCall: {
130
+ id: string;
131
+ name: string;
132
+ displayName?: string | undefined;
133
+ argsText?: string | undefined;
134
+ resultText?: string | undefined;
135
+ summary?: string | undefined;
136
+ errorCode?: string | undefined;
137
+ trace?: {
138
+ phase: "dependency" | "context" | "execution";
139
+ source: "executor" | "spotlight_action" | "spotlight_server";
140
+ type: string;
141
+ tool: string;
142
+ detail?: string | undefined;
143
+ at: number;
144
+ elapsedMs: number;
145
+ }[] | undefined;
146
+ status: "pending" | "running" | "done" | "error";
147
+ };
148
+ })[] | undefined;
149
+ }[];
150
+ executionEvents: ({
151
+ type: "step_sync";
152
+ at: number;
153
+ steps: {
154
+ id: string;
155
+ label: string;
156
+ status: "pending" | "active" | "done" | "error";
157
+ }[];
158
+ } | {
159
+ type: "step_status";
160
+ at: number;
161
+ stepId: string;
162
+ label: string | null;
163
+ status: AgentStep["status"];
164
+ content?: string | undefined;
165
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
166
+ } | {
167
+ type: "step_content";
168
+ at: number;
169
+ stepId: string;
170
+ label: string | null;
171
+ mode: "replace" | "append";
172
+ content: string;
173
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
174
+ } | {
175
+ type: "step_artifact";
176
+ at: number;
177
+ stepId: string;
178
+ label: string | null;
179
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
180
+ count: number;
181
+ } | {
182
+ type: "turn_transition";
183
+ at: number;
184
+ turnId: string;
185
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
186
+ iteration?: number | undefined;
187
+ summary?: string | undefined;
188
+ } | {
189
+ type: "plan";
190
+ at: number;
191
+ iteration: number;
192
+ action: import("./runtime/types.js").SpotlightLoopAction;
193
+ summary: string;
194
+ } | {
195
+ type: "tool_start";
196
+ at: number;
197
+ iteration: number;
198
+ call: {
199
+ id: string;
200
+ name: string;
201
+ input: Record<string, unknown>;
202
+ displayName: string;
203
+ };
204
+ } | {
205
+ type: "tool_progress";
206
+ at: number;
207
+ iteration: number;
208
+ call: {
209
+ id: string;
210
+ name: string;
211
+ input: Record<string, unknown>;
212
+ displayName: string;
213
+ };
214
+ summary: string;
215
+ } | {
216
+ type: "tool_result";
217
+ at: number;
218
+ iteration: number;
219
+ result: {
220
+ call: {
221
+ id: string;
222
+ name: string;
223
+ input: Record<string, unknown>;
224
+ displayName: string;
225
+ };
226
+ success: boolean;
227
+ summary: string;
228
+ output?: unknown;
229
+ error?: string | undefined;
230
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
231
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
232
+ hostEffect?: {
233
+ type: string;
234
+ target?: string | undefined;
235
+ payload?: Record<string, unknown> | undefined;
236
+ } | undefined;
237
+ trace: {
238
+ phase: "dependency" | "context" | "execution";
239
+ source: "executor" | "spotlight_action" | "spotlight_server";
240
+ type: string;
241
+ tool: string;
242
+ detail?: string | undefined;
243
+ at: number;
244
+ elapsedMs: number;
245
+ }[];
246
+ attachments?: {
247
+ id: string;
248
+ type: "image" | "file" | "html";
249
+ name?: string | undefined;
250
+ url: string;
251
+ mimeType?: string | undefined;
252
+ }[] | undefined;
253
+ files?: {
254
+ id: string;
255
+ path: string;
256
+ name: string;
257
+ content?: string[] | undefined;
258
+ createdAt?: string | undefined;
259
+ modifiedAt?: string | undefined;
260
+ }[] | undefined;
261
+ toolCalls?: {
262
+ id: string;
263
+ name: string;
264
+ displayName?: string | undefined;
265
+ argsText?: string | undefined;
266
+ resultText?: string | undefined;
267
+ summary?: string | undefined;
268
+ errorCode?: string | undefined;
269
+ trace?: {
270
+ phase: "dependency" | "context" | "execution";
271
+ source: "executor" | "spotlight_action" | "spotlight_server";
272
+ type: string;
273
+ tool: string;
274
+ detail?: string | undefined;
275
+ at: number;
276
+ elapsedMs: number;
277
+ }[] | undefined;
278
+ status: "pending" | "running" | "done" | "error";
279
+ }[] | undefined;
280
+ };
281
+ } | {
282
+ type: "tool_trace";
283
+ at: number;
284
+ iteration: number;
285
+ toolName: string;
286
+ trace: {
287
+ phase: "dependency" | "context" | "execution";
288
+ source: "executor" | "spotlight_action" | "spotlight_server";
289
+ type: string;
290
+ tool: string;
291
+ detail?: string | undefined;
292
+ at: number;
293
+ elapsedMs: number;
294
+ }[];
295
+ } | {
296
+ type: "assistant_response";
297
+ at: number;
298
+ iteration: number;
299
+ content: string;
300
+ } | {
301
+ type: "llm_error";
302
+ at: number;
303
+ iteration: number;
304
+ error: string;
305
+ } | {
306
+ type: "turn_completed";
307
+ at: number;
308
+ turnId: string;
309
+ assistantReply: string | null;
310
+ commandName: string | null;
311
+ usedQueryLoop: boolean;
312
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
313
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
314
+ elapsedMs: number;
315
+ budgetUsage: {
316
+ maxLoopTurns: number;
317
+ iterationsUsed: number;
318
+ toolCallsExecuted: number;
319
+ successfulToolCalls: number;
320
+ failedToolCalls: number;
321
+ contextCharsUsed: number;
322
+ recentTurnsUsed: number;
323
+ };
324
+ } | {
325
+ type: "skill_permission_request";
326
+ at: number;
327
+ skillName: string;
328
+ displayName?: string | undefined;
329
+ reason: string;
330
+ source: "model" | "user-slash";
331
+ } | {
332
+ type: "fork_progress";
333
+ at: number;
334
+ agentId: string;
335
+ iteration: number;
336
+ phase: "plan" | "tool_execution" | "respond";
337
+ summary: string;
338
+ })[];
339
+ pendingSkillPermission: {
340
+ skillName: string;
341
+ displayName?: string | undefined;
342
+ reason: string;
343
+ source: "model" | "user-slash";
344
+ at: number;
345
+ } | null;
346
+ recentQuestions: string[];
347
+ suggestedQuestions: string[];
348
+ pipelinePhase: PipelinePhase;
349
+ pipelineRunId: number;
350
+ pipelineAbortController: {
351
+ readonly signal: {
352
+ readonly aborted: boolean;
353
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
354
+ readonly reason: any;
355
+ throwIfAborted: () => void;
356
+ addEventListener: {
357
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
358
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
359
+ };
360
+ removeEventListener: {
361
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
362
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
363
+ };
364
+ dispatchEvent: (event: Event) => boolean;
365
+ };
366
+ abort: (reason?: any) => void;
367
+ } | null;
368
+ telemetrySnapshots: {
369
+ turnId: string;
370
+ recordedAt: number;
371
+ timeline: {
372
+ turnId: string;
373
+ at: number;
374
+ kind: SpotlightExecutionEvent["type"];
375
+ iteration?: number | undefined;
376
+ summary?: string | undefined;
377
+ raw: {
378
+ type: "step_sync";
379
+ at: number;
380
+ steps: {
381
+ id: string;
382
+ label: string;
383
+ status: "pending" | "active" | "done" | "error";
384
+ }[];
385
+ } | {
386
+ type: "step_status";
387
+ at: number;
388
+ stepId: string;
389
+ label: string | null;
390
+ status: AgentStep["status"];
391
+ content?: string | undefined;
392
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
393
+ } | {
394
+ type: "step_content";
395
+ at: number;
396
+ stepId: string;
397
+ label: string | null;
398
+ mode: "replace" | "append";
399
+ content: string;
400
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
401
+ } | {
402
+ type: "step_artifact";
403
+ at: number;
404
+ stepId: string;
405
+ label: string | null;
406
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
407
+ count: number;
408
+ } | {
409
+ type: "turn_transition";
410
+ at: number;
411
+ turnId: string;
412
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
413
+ iteration?: number | undefined;
414
+ summary?: string | undefined;
415
+ } | {
416
+ type: "plan";
417
+ at: number;
418
+ iteration: number;
419
+ action: import("./runtime/types.js").SpotlightLoopAction;
420
+ summary: string;
421
+ } | {
422
+ type: "tool_start";
423
+ at: number;
424
+ iteration: number;
425
+ call: {
426
+ id: string;
427
+ name: string;
428
+ input: Record<string, unknown>;
429
+ displayName: string;
430
+ };
431
+ } | {
432
+ type: "tool_progress";
433
+ at: number;
434
+ iteration: number;
435
+ call: {
436
+ id: string;
437
+ name: string;
438
+ input: Record<string, unknown>;
439
+ displayName: string;
440
+ };
441
+ summary: string;
442
+ } | {
443
+ type: "tool_result";
444
+ at: number;
445
+ iteration: number;
446
+ result: {
447
+ call: {
448
+ id: string;
449
+ name: string;
450
+ input: Record<string, unknown>;
451
+ displayName: string;
452
+ };
453
+ success: boolean;
454
+ summary: string;
455
+ output?: unknown;
456
+ error?: string | undefined;
457
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
458
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
459
+ hostEffect?: {
460
+ type: string;
461
+ target?: string | undefined;
462
+ payload?: Record<string, unknown> | undefined;
463
+ } | undefined;
464
+ trace: {
465
+ phase: "dependency" | "context" | "execution";
466
+ source: "executor" | "spotlight_action" | "spotlight_server";
467
+ type: string;
468
+ tool: string;
469
+ detail?: string | undefined;
470
+ at: number;
471
+ elapsedMs: number;
472
+ }[];
473
+ attachments?: {
474
+ id: string;
475
+ type: "image" | "file" | "html";
476
+ name?: string | undefined;
477
+ url: string;
478
+ mimeType?: string | undefined;
479
+ }[] | undefined;
480
+ files?: {
481
+ id: string;
482
+ path: string;
483
+ name: string;
484
+ content?: string[] | undefined;
485
+ createdAt?: string | undefined;
486
+ modifiedAt?: string | undefined;
487
+ }[] | undefined;
488
+ toolCalls?: {
489
+ id: string;
490
+ name: string;
491
+ displayName?: string | undefined;
492
+ argsText?: string | undefined;
493
+ resultText?: string | undefined;
494
+ summary?: string | undefined;
495
+ errorCode?: string | undefined;
496
+ trace?: {
497
+ phase: "dependency" | "context" | "execution";
498
+ source: "executor" | "spotlight_action" | "spotlight_server";
499
+ type: string;
500
+ tool: string;
501
+ detail?: string | undefined;
502
+ at: number;
503
+ elapsedMs: number;
504
+ }[] | undefined;
505
+ status: "pending" | "running" | "done" | "error";
506
+ }[] | undefined;
507
+ };
508
+ } | {
509
+ type: "tool_trace";
510
+ at: number;
511
+ iteration: number;
512
+ toolName: string;
513
+ trace: {
514
+ phase: "dependency" | "context" | "execution";
515
+ source: "executor" | "spotlight_action" | "spotlight_server";
516
+ type: string;
517
+ tool: string;
518
+ detail?: string | undefined;
519
+ at: number;
520
+ elapsedMs: number;
521
+ }[];
522
+ } | {
523
+ type: "assistant_response";
524
+ at: number;
525
+ iteration: number;
526
+ content: string;
527
+ } | {
528
+ type: "llm_error";
529
+ at: number;
530
+ iteration: number;
531
+ error: string;
532
+ } | {
533
+ type: "turn_completed";
534
+ at: number;
535
+ turnId: string;
536
+ assistantReply: string | null;
537
+ commandName: string | null;
538
+ usedQueryLoop: boolean;
539
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
540
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
541
+ elapsedMs: number;
542
+ budgetUsage: {
543
+ maxLoopTurns: number;
544
+ iterationsUsed: number;
545
+ toolCallsExecuted: number;
546
+ successfulToolCalls: number;
547
+ failedToolCalls: number;
548
+ contextCharsUsed: number;
549
+ recentTurnsUsed: number;
550
+ };
551
+ } | {
552
+ type: "skill_permission_request";
553
+ at: number;
554
+ skillName: string;
555
+ displayName?: string | undefined;
556
+ reason: string;
557
+ source: "model" | "user-slash";
558
+ } | {
559
+ type: "fork_progress";
560
+ at: number;
561
+ agentId: string;
562
+ iteration: number;
563
+ phase: "plan" | "tool_execution" | "respond";
564
+ summary: string;
565
+ };
566
+ }[];
567
+ failureSummary: {
568
+ turnId: string;
569
+ stopReason: string;
570
+ failureClass: string | null;
571
+ category: SpotlightTelemetryFailureCategory;
572
+ elapsedMs: number;
573
+ toolErrors: string[];
574
+ } | null;
575
+ }[];
576
+ } & import("pinia").PiniaCustomStateProperties<{
577
+ visible: boolean;
578
+ prompt: string;
579
+ loading: boolean;
580
+ error: string;
581
+ result: string | null;
582
+ selectedIndex: number;
583
+ showThinkingBar: boolean;
584
+ agentSteps: AgentStep[];
585
+ executionEvents: SpotlightExecutionEvent[];
586
+ pendingSkillPermission: SpotlightSkillPermissionRequest | null;
587
+ recentQuestions: string[];
588
+ suggestedQuestions: string[];
589
+ pipelinePhase: PipelinePhase;
590
+ pipelineRunId: number;
591
+ pipelineAbortController: AbortController | null;
592
+ telemetrySnapshots: SpotlightTelemetrySnapshot[];
593
+ }>): SpotlightExecutionEvent[];
594
+ telemetryExecutionEvents(state: {
595
+ visible: boolean;
596
+ prompt: string;
597
+ loading: boolean;
598
+ error: string;
599
+ result: string | null;
600
+ selectedIndex: number;
601
+ showThinkingBar: boolean;
602
+ agentSteps: {
603
+ id: string;
604
+ label: string;
605
+ status: "pending" | "active" | "done" | "error";
606
+ content?: string | undefined;
607
+ attachments?: {
608
+ id: string;
609
+ type: "image" | "file" | "html";
610
+ name?: string | undefined;
611
+ url: string;
612
+ mimeType?: string | undefined;
613
+ }[] | undefined;
614
+ files?: {
615
+ id: string;
616
+ path: string;
617
+ name: string;
618
+ content?: string[] | undefined;
619
+ createdAt?: string | undefined;
620
+ modifiedAt?: string | undefined;
621
+ }[] | undefined;
622
+ artifacts?: {
623
+ id: string;
624
+ kind: import("./types.js").SpotlightArtifactKind;
625
+ title: string;
626
+ sourceToolCallId?: string | undefined;
627
+ sourceToolName?: string | undefined;
628
+ summary?: string | undefined;
629
+ payload: {
630
+ columns: string[];
631
+ rows: Array<Record<string, unknown>>;
632
+ } | {
633
+ html: string;
634
+ } | {
635
+ url: string;
636
+ } | {
637
+ value: unknown;
638
+ } | {
639
+ text: string;
640
+ };
641
+ }[] | undefined;
642
+ toolCalls?: {
643
+ id: string;
644
+ name: string;
645
+ displayName?: string | undefined;
646
+ argsText?: string | undefined;
647
+ resultText?: string | undefined;
648
+ summary?: string | undefined;
649
+ errorCode?: string | undefined;
650
+ trace?: {
651
+ phase: "dependency" | "context" | "execution";
652
+ source: "executor" | "spotlight_action" | "spotlight_server";
653
+ type: string;
654
+ tool: string;
655
+ detail?: string | undefined;
656
+ at: number;
657
+ elapsedMs: number;
658
+ }[] | undefined;
659
+ status: "pending" | "running" | "done" | "error";
660
+ }[] | undefined;
661
+ chatItems?: ({
662
+ id: string;
663
+ type: "text";
664
+ text: string;
665
+ } | {
666
+ id: string;
667
+ type: "tool";
668
+ toolCall: {
669
+ id: string;
670
+ name: string;
671
+ displayName?: string | undefined;
672
+ argsText?: string | undefined;
673
+ resultText?: string | undefined;
674
+ summary?: string | undefined;
675
+ errorCode?: string | undefined;
676
+ trace?: {
677
+ phase: "dependency" | "context" | "execution";
678
+ source: "executor" | "spotlight_action" | "spotlight_server";
679
+ type: string;
680
+ tool: string;
681
+ detail?: string | undefined;
682
+ at: number;
683
+ elapsedMs: number;
684
+ }[] | undefined;
685
+ status: "pending" | "running" | "done" | "error";
686
+ };
687
+ })[] | undefined;
688
+ }[];
689
+ executionEvents: ({
690
+ type: "step_sync";
691
+ at: number;
692
+ steps: {
693
+ id: string;
694
+ label: string;
695
+ status: "pending" | "active" | "done" | "error";
696
+ }[];
697
+ } | {
698
+ type: "step_status";
699
+ at: number;
700
+ stepId: string;
701
+ label: string | null;
702
+ status: AgentStep["status"];
703
+ content?: string | undefined;
704
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
705
+ } | {
706
+ type: "step_content";
707
+ at: number;
708
+ stepId: string;
709
+ label: string | null;
710
+ mode: "replace" | "append";
711
+ content: string;
712
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
713
+ } | {
714
+ type: "step_artifact";
715
+ at: number;
716
+ stepId: string;
717
+ label: string | null;
718
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
719
+ count: number;
720
+ } | {
721
+ type: "turn_transition";
722
+ at: number;
723
+ turnId: string;
724
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
725
+ iteration?: number | undefined;
726
+ summary?: string | undefined;
727
+ } | {
728
+ type: "plan";
729
+ at: number;
730
+ iteration: number;
731
+ action: import("./runtime/types.js").SpotlightLoopAction;
732
+ summary: string;
733
+ } | {
734
+ type: "tool_start";
735
+ at: number;
736
+ iteration: number;
737
+ call: {
738
+ id: string;
739
+ name: string;
740
+ input: Record<string, unknown>;
741
+ displayName: string;
742
+ };
743
+ } | {
744
+ type: "tool_progress";
745
+ at: number;
746
+ iteration: number;
747
+ call: {
748
+ id: string;
749
+ name: string;
750
+ input: Record<string, unknown>;
751
+ displayName: string;
752
+ };
753
+ summary: string;
754
+ } | {
755
+ type: "tool_result";
756
+ at: number;
757
+ iteration: number;
758
+ result: {
759
+ call: {
760
+ id: string;
761
+ name: string;
762
+ input: Record<string, unknown>;
763
+ displayName: string;
764
+ };
765
+ success: boolean;
766
+ summary: string;
767
+ output?: unknown;
768
+ error?: string | undefined;
769
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
770
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
771
+ hostEffect?: {
772
+ type: string;
773
+ target?: string | undefined;
774
+ payload?: Record<string, unknown> | undefined;
775
+ } | undefined;
776
+ trace: {
777
+ phase: "dependency" | "context" | "execution";
778
+ source: "executor" | "spotlight_action" | "spotlight_server";
779
+ type: string;
780
+ tool: string;
781
+ detail?: string | undefined;
782
+ at: number;
783
+ elapsedMs: number;
784
+ }[];
785
+ attachments?: {
786
+ id: string;
787
+ type: "image" | "file" | "html";
788
+ name?: string | undefined;
789
+ url: string;
790
+ mimeType?: string | undefined;
791
+ }[] | undefined;
792
+ files?: {
793
+ id: string;
794
+ path: string;
795
+ name: string;
796
+ content?: string[] | undefined;
797
+ createdAt?: string | undefined;
798
+ modifiedAt?: string | undefined;
799
+ }[] | undefined;
800
+ toolCalls?: {
801
+ id: string;
802
+ name: string;
803
+ displayName?: string | undefined;
804
+ argsText?: string | undefined;
805
+ resultText?: string | undefined;
806
+ summary?: string | undefined;
807
+ errorCode?: string | undefined;
808
+ trace?: {
809
+ phase: "dependency" | "context" | "execution";
810
+ source: "executor" | "spotlight_action" | "spotlight_server";
811
+ type: string;
812
+ tool: string;
813
+ detail?: string | undefined;
814
+ at: number;
815
+ elapsedMs: number;
816
+ }[] | undefined;
817
+ status: "pending" | "running" | "done" | "error";
818
+ }[] | undefined;
819
+ };
820
+ } | {
821
+ type: "tool_trace";
822
+ at: number;
823
+ iteration: number;
824
+ toolName: string;
825
+ trace: {
826
+ phase: "dependency" | "context" | "execution";
827
+ source: "executor" | "spotlight_action" | "spotlight_server";
828
+ type: string;
829
+ tool: string;
830
+ detail?: string | undefined;
831
+ at: number;
832
+ elapsedMs: number;
833
+ }[];
834
+ } | {
835
+ type: "assistant_response";
836
+ at: number;
837
+ iteration: number;
838
+ content: string;
839
+ } | {
840
+ type: "llm_error";
841
+ at: number;
842
+ iteration: number;
843
+ error: string;
844
+ } | {
845
+ type: "turn_completed";
846
+ at: number;
847
+ turnId: string;
848
+ assistantReply: string | null;
849
+ commandName: string | null;
850
+ usedQueryLoop: boolean;
851
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
852
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
853
+ elapsedMs: number;
854
+ budgetUsage: {
855
+ maxLoopTurns: number;
856
+ iterationsUsed: number;
857
+ toolCallsExecuted: number;
858
+ successfulToolCalls: number;
859
+ failedToolCalls: number;
860
+ contextCharsUsed: number;
861
+ recentTurnsUsed: number;
862
+ };
863
+ } | {
864
+ type: "skill_permission_request";
865
+ at: number;
866
+ skillName: string;
867
+ displayName?: string | undefined;
868
+ reason: string;
869
+ source: "model" | "user-slash";
870
+ } | {
871
+ type: "fork_progress";
872
+ at: number;
873
+ agentId: string;
874
+ iteration: number;
875
+ phase: "plan" | "tool_execution" | "respond";
876
+ summary: string;
877
+ })[];
878
+ pendingSkillPermission: {
879
+ skillName: string;
880
+ displayName?: string | undefined;
881
+ reason: string;
882
+ source: "model" | "user-slash";
883
+ at: number;
884
+ } | null;
885
+ recentQuestions: string[];
886
+ suggestedQuestions: string[];
887
+ pipelinePhase: PipelinePhase;
888
+ pipelineRunId: number;
889
+ pipelineAbortController: {
890
+ readonly signal: {
891
+ readonly aborted: boolean;
892
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
893
+ readonly reason: any;
894
+ throwIfAborted: () => void;
895
+ addEventListener: {
896
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
897
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
898
+ };
899
+ removeEventListener: {
900
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
901
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
902
+ };
903
+ dispatchEvent: (event: Event) => boolean;
904
+ };
905
+ abort: (reason?: any) => void;
906
+ } | null;
907
+ telemetrySnapshots: {
908
+ turnId: string;
909
+ recordedAt: number;
910
+ timeline: {
911
+ turnId: string;
912
+ at: number;
913
+ kind: SpotlightExecutionEvent["type"];
914
+ iteration?: number | undefined;
915
+ summary?: string | undefined;
916
+ raw: {
917
+ type: "step_sync";
918
+ at: number;
919
+ steps: {
920
+ id: string;
921
+ label: string;
922
+ status: "pending" | "active" | "done" | "error";
923
+ }[];
924
+ } | {
925
+ type: "step_status";
926
+ at: number;
927
+ stepId: string;
928
+ label: string | null;
929
+ status: AgentStep["status"];
930
+ content?: string | undefined;
931
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
932
+ } | {
933
+ type: "step_content";
934
+ at: number;
935
+ stepId: string;
936
+ label: string | null;
937
+ mode: "replace" | "append";
938
+ content: string;
939
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
940
+ } | {
941
+ type: "step_artifact";
942
+ at: number;
943
+ stepId: string;
944
+ label: string | null;
945
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
946
+ count: number;
947
+ } | {
948
+ type: "turn_transition";
949
+ at: number;
950
+ turnId: string;
951
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
952
+ iteration?: number | undefined;
953
+ summary?: string | undefined;
954
+ } | {
955
+ type: "plan";
956
+ at: number;
957
+ iteration: number;
958
+ action: import("./runtime/types.js").SpotlightLoopAction;
959
+ summary: string;
960
+ } | {
961
+ type: "tool_start";
962
+ at: number;
963
+ iteration: number;
964
+ call: {
965
+ id: string;
966
+ name: string;
967
+ input: Record<string, unknown>;
968
+ displayName: string;
969
+ };
970
+ } | {
971
+ type: "tool_progress";
972
+ at: number;
973
+ iteration: number;
974
+ call: {
975
+ id: string;
976
+ name: string;
977
+ input: Record<string, unknown>;
978
+ displayName: string;
979
+ };
980
+ summary: string;
981
+ } | {
982
+ type: "tool_result";
983
+ at: number;
984
+ iteration: number;
985
+ result: {
986
+ call: {
987
+ id: string;
988
+ name: string;
989
+ input: Record<string, unknown>;
990
+ displayName: string;
991
+ };
992
+ success: boolean;
993
+ summary: string;
994
+ output?: unknown;
995
+ error?: string | undefined;
996
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
997
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
998
+ hostEffect?: {
999
+ type: string;
1000
+ target?: string | undefined;
1001
+ payload?: Record<string, unknown> | undefined;
1002
+ } | undefined;
1003
+ trace: {
1004
+ phase: "dependency" | "context" | "execution";
1005
+ source: "executor" | "spotlight_action" | "spotlight_server";
1006
+ type: string;
1007
+ tool: string;
1008
+ detail?: string | undefined;
1009
+ at: number;
1010
+ elapsedMs: number;
1011
+ }[];
1012
+ attachments?: {
1013
+ id: string;
1014
+ type: "image" | "file" | "html";
1015
+ name?: string | undefined;
1016
+ url: string;
1017
+ mimeType?: string | undefined;
1018
+ }[] | undefined;
1019
+ files?: {
1020
+ id: string;
1021
+ path: string;
1022
+ name: string;
1023
+ content?: string[] | undefined;
1024
+ createdAt?: string | undefined;
1025
+ modifiedAt?: string | undefined;
1026
+ }[] | undefined;
1027
+ toolCalls?: {
1028
+ id: string;
1029
+ name: string;
1030
+ displayName?: string | undefined;
1031
+ argsText?: string | undefined;
1032
+ resultText?: string | undefined;
1033
+ summary?: string | undefined;
1034
+ errorCode?: string | undefined;
1035
+ trace?: {
1036
+ phase: "dependency" | "context" | "execution";
1037
+ source: "executor" | "spotlight_action" | "spotlight_server";
1038
+ type: string;
1039
+ tool: string;
1040
+ detail?: string | undefined;
1041
+ at: number;
1042
+ elapsedMs: number;
1043
+ }[] | undefined;
1044
+ status: "pending" | "running" | "done" | "error";
1045
+ }[] | undefined;
1046
+ };
1047
+ } | {
1048
+ type: "tool_trace";
1049
+ at: number;
1050
+ iteration: number;
1051
+ toolName: string;
1052
+ trace: {
1053
+ phase: "dependency" | "context" | "execution";
1054
+ source: "executor" | "spotlight_action" | "spotlight_server";
1055
+ type: string;
1056
+ tool: string;
1057
+ detail?: string | undefined;
1058
+ at: number;
1059
+ elapsedMs: number;
1060
+ }[];
1061
+ } | {
1062
+ type: "assistant_response";
1063
+ at: number;
1064
+ iteration: number;
1065
+ content: string;
1066
+ } | {
1067
+ type: "llm_error";
1068
+ at: number;
1069
+ iteration: number;
1070
+ error: string;
1071
+ } | {
1072
+ type: "turn_completed";
1073
+ at: number;
1074
+ turnId: string;
1075
+ assistantReply: string | null;
1076
+ commandName: string | null;
1077
+ usedQueryLoop: boolean;
1078
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
1079
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
1080
+ elapsedMs: number;
1081
+ budgetUsage: {
1082
+ maxLoopTurns: number;
1083
+ iterationsUsed: number;
1084
+ toolCallsExecuted: number;
1085
+ successfulToolCalls: number;
1086
+ failedToolCalls: number;
1087
+ contextCharsUsed: number;
1088
+ recentTurnsUsed: number;
1089
+ };
1090
+ } | {
1091
+ type: "skill_permission_request";
1092
+ at: number;
1093
+ skillName: string;
1094
+ displayName?: string | undefined;
1095
+ reason: string;
1096
+ source: "model" | "user-slash";
1097
+ } | {
1098
+ type: "fork_progress";
1099
+ at: number;
1100
+ agentId: string;
1101
+ iteration: number;
1102
+ phase: "plan" | "tool_execution" | "respond";
1103
+ summary: string;
1104
+ };
1105
+ }[];
1106
+ failureSummary: {
1107
+ turnId: string;
1108
+ stopReason: string;
1109
+ failureClass: string | null;
1110
+ category: SpotlightTelemetryFailureCategory;
1111
+ elapsedMs: number;
1112
+ toolErrors: string[];
1113
+ } | null;
1114
+ }[];
1115
+ } & import("pinia").PiniaCustomStateProperties<{
1116
+ visible: boolean;
1117
+ prompt: string;
1118
+ loading: boolean;
1119
+ error: string;
1120
+ result: string | null;
1121
+ selectedIndex: number;
1122
+ showThinkingBar: boolean;
1123
+ agentSteps: AgentStep[];
1124
+ executionEvents: SpotlightExecutionEvent[];
1125
+ pendingSkillPermission: SpotlightSkillPermissionRequest | null;
1126
+ recentQuestions: string[];
1127
+ suggestedQuestions: string[];
1128
+ pipelinePhase: PipelinePhase;
1129
+ pipelineRunId: number;
1130
+ pipelineAbortController: AbortController | null;
1131
+ telemetrySnapshots: SpotlightTelemetrySnapshot[];
1132
+ }>): SpotlightExecutionEvent[];
1133
+ turnTimelines(state: {
1134
+ visible: boolean;
1135
+ prompt: string;
1136
+ loading: boolean;
1137
+ error: string;
1138
+ result: string | null;
1139
+ selectedIndex: number;
1140
+ showThinkingBar: boolean;
1141
+ agentSteps: {
1142
+ id: string;
1143
+ label: string;
1144
+ status: "pending" | "active" | "done" | "error";
1145
+ content?: string | undefined;
1146
+ attachments?: {
1147
+ id: string;
1148
+ type: "image" | "file" | "html";
1149
+ name?: string | undefined;
1150
+ url: string;
1151
+ mimeType?: string | undefined;
1152
+ }[] | undefined;
1153
+ files?: {
1154
+ id: string;
1155
+ path: string;
1156
+ name: string;
1157
+ content?: string[] | undefined;
1158
+ createdAt?: string | undefined;
1159
+ modifiedAt?: string | undefined;
1160
+ }[] | undefined;
1161
+ artifacts?: {
1162
+ id: string;
1163
+ kind: import("./types.js").SpotlightArtifactKind;
1164
+ title: string;
1165
+ sourceToolCallId?: string | undefined;
1166
+ sourceToolName?: string | undefined;
1167
+ summary?: string | undefined;
1168
+ payload: {
1169
+ columns: string[];
1170
+ rows: Array<Record<string, unknown>>;
1171
+ } | {
1172
+ html: string;
1173
+ } | {
1174
+ url: string;
1175
+ } | {
1176
+ value: unknown;
1177
+ } | {
1178
+ text: string;
1179
+ };
1180
+ }[] | undefined;
1181
+ toolCalls?: {
1182
+ id: string;
1183
+ name: string;
1184
+ displayName?: string | undefined;
1185
+ argsText?: string | undefined;
1186
+ resultText?: string | undefined;
1187
+ summary?: string | undefined;
1188
+ errorCode?: string | undefined;
1189
+ trace?: {
1190
+ phase: "dependency" | "context" | "execution";
1191
+ source: "executor" | "spotlight_action" | "spotlight_server";
1192
+ type: string;
1193
+ tool: string;
1194
+ detail?: string | undefined;
1195
+ at: number;
1196
+ elapsedMs: number;
1197
+ }[] | undefined;
1198
+ status: "pending" | "running" | "done" | "error";
1199
+ }[] | undefined;
1200
+ chatItems?: ({
1201
+ id: string;
1202
+ type: "text";
1203
+ text: string;
1204
+ } | {
1205
+ id: string;
1206
+ type: "tool";
1207
+ toolCall: {
1208
+ id: string;
1209
+ name: string;
1210
+ displayName?: string | undefined;
1211
+ argsText?: string | undefined;
1212
+ resultText?: string | undefined;
1213
+ summary?: string | undefined;
1214
+ errorCode?: string | undefined;
1215
+ trace?: {
1216
+ phase: "dependency" | "context" | "execution";
1217
+ source: "executor" | "spotlight_action" | "spotlight_server";
1218
+ type: string;
1219
+ tool: string;
1220
+ detail?: string | undefined;
1221
+ at: number;
1222
+ elapsedMs: number;
1223
+ }[] | undefined;
1224
+ status: "pending" | "running" | "done" | "error";
1225
+ };
1226
+ })[] | undefined;
1227
+ }[];
1228
+ executionEvents: ({
1229
+ type: "step_sync";
1230
+ at: number;
1231
+ steps: {
1232
+ id: string;
1233
+ label: string;
1234
+ status: "pending" | "active" | "done" | "error";
1235
+ }[];
1236
+ } | {
1237
+ type: "step_status";
1238
+ at: number;
1239
+ stepId: string;
1240
+ label: string | null;
1241
+ status: AgentStep["status"];
1242
+ content?: string | undefined;
1243
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
1244
+ } | {
1245
+ type: "step_content";
1246
+ at: number;
1247
+ stepId: string;
1248
+ label: string | null;
1249
+ mode: "replace" | "append";
1250
+ content: string;
1251
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
1252
+ } | {
1253
+ type: "step_artifact";
1254
+ at: number;
1255
+ stepId: string;
1256
+ label: string | null;
1257
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
1258
+ count: number;
1259
+ } | {
1260
+ type: "turn_transition";
1261
+ at: number;
1262
+ turnId: string;
1263
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
1264
+ iteration?: number | undefined;
1265
+ summary?: string | undefined;
1266
+ } | {
1267
+ type: "plan";
1268
+ at: number;
1269
+ iteration: number;
1270
+ action: import("./runtime/types.js").SpotlightLoopAction;
1271
+ summary: string;
1272
+ } | {
1273
+ type: "tool_start";
1274
+ at: number;
1275
+ iteration: number;
1276
+ call: {
1277
+ id: string;
1278
+ name: string;
1279
+ input: Record<string, unknown>;
1280
+ displayName: string;
1281
+ };
1282
+ } | {
1283
+ type: "tool_progress";
1284
+ at: number;
1285
+ iteration: number;
1286
+ call: {
1287
+ id: string;
1288
+ name: string;
1289
+ input: Record<string, unknown>;
1290
+ displayName: string;
1291
+ };
1292
+ summary: string;
1293
+ } | {
1294
+ type: "tool_result";
1295
+ at: number;
1296
+ iteration: number;
1297
+ result: {
1298
+ call: {
1299
+ id: string;
1300
+ name: string;
1301
+ input: Record<string, unknown>;
1302
+ displayName: string;
1303
+ };
1304
+ success: boolean;
1305
+ summary: string;
1306
+ output?: unknown;
1307
+ error?: string | undefined;
1308
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
1309
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
1310
+ hostEffect?: {
1311
+ type: string;
1312
+ target?: string | undefined;
1313
+ payload?: Record<string, unknown> | undefined;
1314
+ } | undefined;
1315
+ trace: {
1316
+ phase: "dependency" | "context" | "execution";
1317
+ source: "executor" | "spotlight_action" | "spotlight_server";
1318
+ type: string;
1319
+ tool: string;
1320
+ detail?: string | undefined;
1321
+ at: number;
1322
+ elapsedMs: number;
1323
+ }[];
1324
+ attachments?: {
1325
+ id: string;
1326
+ type: "image" | "file" | "html";
1327
+ name?: string | undefined;
1328
+ url: string;
1329
+ mimeType?: string | undefined;
1330
+ }[] | undefined;
1331
+ files?: {
1332
+ id: string;
1333
+ path: string;
1334
+ name: string;
1335
+ content?: string[] | undefined;
1336
+ createdAt?: string | undefined;
1337
+ modifiedAt?: string | undefined;
1338
+ }[] | undefined;
1339
+ toolCalls?: {
1340
+ id: string;
1341
+ name: string;
1342
+ displayName?: string | undefined;
1343
+ argsText?: string | undefined;
1344
+ resultText?: string | undefined;
1345
+ summary?: string | undefined;
1346
+ errorCode?: string | undefined;
1347
+ trace?: {
1348
+ phase: "dependency" | "context" | "execution";
1349
+ source: "executor" | "spotlight_action" | "spotlight_server";
1350
+ type: string;
1351
+ tool: string;
1352
+ detail?: string | undefined;
1353
+ at: number;
1354
+ elapsedMs: number;
1355
+ }[] | undefined;
1356
+ status: "pending" | "running" | "done" | "error";
1357
+ }[] | undefined;
1358
+ };
1359
+ } | {
1360
+ type: "tool_trace";
1361
+ at: number;
1362
+ iteration: number;
1363
+ toolName: string;
1364
+ trace: {
1365
+ phase: "dependency" | "context" | "execution";
1366
+ source: "executor" | "spotlight_action" | "spotlight_server";
1367
+ type: string;
1368
+ tool: string;
1369
+ detail?: string | undefined;
1370
+ at: number;
1371
+ elapsedMs: number;
1372
+ }[];
1373
+ } | {
1374
+ type: "assistant_response";
1375
+ at: number;
1376
+ iteration: number;
1377
+ content: string;
1378
+ } | {
1379
+ type: "llm_error";
1380
+ at: number;
1381
+ iteration: number;
1382
+ error: string;
1383
+ } | {
1384
+ type: "turn_completed";
1385
+ at: number;
1386
+ turnId: string;
1387
+ assistantReply: string | null;
1388
+ commandName: string | null;
1389
+ usedQueryLoop: boolean;
1390
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
1391
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
1392
+ elapsedMs: number;
1393
+ budgetUsage: {
1394
+ maxLoopTurns: number;
1395
+ iterationsUsed: number;
1396
+ toolCallsExecuted: number;
1397
+ successfulToolCalls: number;
1398
+ failedToolCalls: number;
1399
+ contextCharsUsed: number;
1400
+ recentTurnsUsed: number;
1401
+ };
1402
+ } | {
1403
+ type: "skill_permission_request";
1404
+ at: number;
1405
+ skillName: string;
1406
+ displayName?: string | undefined;
1407
+ reason: string;
1408
+ source: "model" | "user-slash";
1409
+ } | {
1410
+ type: "fork_progress";
1411
+ at: number;
1412
+ agentId: string;
1413
+ iteration: number;
1414
+ phase: "plan" | "tool_execution" | "respond";
1415
+ summary: string;
1416
+ })[];
1417
+ pendingSkillPermission: {
1418
+ skillName: string;
1419
+ displayName?: string | undefined;
1420
+ reason: string;
1421
+ source: "model" | "user-slash";
1422
+ at: number;
1423
+ } | null;
1424
+ recentQuestions: string[];
1425
+ suggestedQuestions: string[];
1426
+ pipelinePhase: PipelinePhase;
1427
+ pipelineRunId: number;
1428
+ pipelineAbortController: {
1429
+ readonly signal: {
1430
+ readonly aborted: boolean;
1431
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
1432
+ readonly reason: any;
1433
+ throwIfAborted: () => void;
1434
+ addEventListener: {
1435
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1436
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1437
+ };
1438
+ removeEventListener: {
1439
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1440
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1441
+ };
1442
+ dispatchEvent: (event: Event) => boolean;
1443
+ };
1444
+ abort: (reason?: any) => void;
1445
+ } | null;
1446
+ telemetrySnapshots: {
1447
+ turnId: string;
1448
+ recordedAt: number;
1449
+ timeline: {
1450
+ turnId: string;
1451
+ at: number;
1452
+ kind: SpotlightExecutionEvent["type"];
1453
+ iteration?: number | undefined;
1454
+ summary?: string | undefined;
1455
+ raw: {
1456
+ type: "step_sync";
1457
+ at: number;
1458
+ steps: {
1459
+ id: string;
1460
+ label: string;
1461
+ status: "pending" | "active" | "done" | "error";
1462
+ }[];
1463
+ } | {
1464
+ type: "step_status";
1465
+ at: number;
1466
+ stepId: string;
1467
+ label: string | null;
1468
+ status: AgentStep["status"];
1469
+ content?: string | undefined;
1470
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
1471
+ } | {
1472
+ type: "step_content";
1473
+ at: number;
1474
+ stepId: string;
1475
+ label: string | null;
1476
+ mode: "replace" | "append";
1477
+ content: string;
1478
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
1479
+ } | {
1480
+ type: "step_artifact";
1481
+ at: number;
1482
+ stepId: string;
1483
+ label: string | null;
1484
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
1485
+ count: number;
1486
+ } | {
1487
+ type: "turn_transition";
1488
+ at: number;
1489
+ turnId: string;
1490
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
1491
+ iteration?: number | undefined;
1492
+ summary?: string | undefined;
1493
+ } | {
1494
+ type: "plan";
1495
+ at: number;
1496
+ iteration: number;
1497
+ action: import("./runtime/types.js").SpotlightLoopAction;
1498
+ summary: string;
1499
+ } | {
1500
+ type: "tool_start";
1501
+ at: number;
1502
+ iteration: number;
1503
+ call: {
1504
+ id: string;
1505
+ name: string;
1506
+ input: Record<string, unknown>;
1507
+ displayName: string;
1508
+ };
1509
+ } | {
1510
+ type: "tool_progress";
1511
+ at: number;
1512
+ iteration: number;
1513
+ call: {
1514
+ id: string;
1515
+ name: string;
1516
+ input: Record<string, unknown>;
1517
+ displayName: string;
1518
+ };
1519
+ summary: string;
1520
+ } | {
1521
+ type: "tool_result";
1522
+ at: number;
1523
+ iteration: number;
1524
+ result: {
1525
+ call: {
1526
+ id: string;
1527
+ name: string;
1528
+ input: Record<string, unknown>;
1529
+ displayName: string;
1530
+ };
1531
+ success: boolean;
1532
+ summary: string;
1533
+ output?: unknown;
1534
+ error?: string | undefined;
1535
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
1536
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
1537
+ hostEffect?: {
1538
+ type: string;
1539
+ target?: string | undefined;
1540
+ payload?: Record<string, unknown> | undefined;
1541
+ } | undefined;
1542
+ trace: {
1543
+ phase: "dependency" | "context" | "execution";
1544
+ source: "executor" | "spotlight_action" | "spotlight_server";
1545
+ type: string;
1546
+ tool: string;
1547
+ detail?: string | undefined;
1548
+ at: number;
1549
+ elapsedMs: number;
1550
+ }[];
1551
+ attachments?: {
1552
+ id: string;
1553
+ type: "image" | "file" | "html";
1554
+ name?: string | undefined;
1555
+ url: string;
1556
+ mimeType?: string | undefined;
1557
+ }[] | undefined;
1558
+ files?: {
1559
+ id: string;
1560
+ path: string;
1561
+ name: string;
1562
+ content?: string[] | undefined;
1563
+ createdAt?: string | undefined;
1564
+ modifiedAt?: string | undefined;
1565
+ }[] | undefined;
1566
+ toolCalls?: {
1567
+ id: string;
1568
+ name: string;
1569
+ displayName?: string | undefined;
1570
+ argsText?: string | undefined;
1571
+ resultText?: string | undefined;
1572
+ summary?: string | undefined;
1573
+ errorCode?: string | undefined;
1574
+ trace?: {
1575
+ phase: "dependency" | "context" | "execution";
1576
+ source: "executor" | "spotlight_action" | "spotlight_server";
1577
+ type: string;
1578
+ tool: string;
1579
+ detail?: string | undefined;
1580
+ at: number;
1581
+ elapsedMs: number;
1582
+ }[] | undefined;
1583
+ status: "pending" | "running" | "done" | "error";
1584
+ }[] | undefined;
1585
+ };
1586
+ } | {
1587
+ type: "tool_trace";
1588
+ at: number;
1589
+ iteration: number;
1590
+ toolName: string;
1591
+ trace: {
1592
+ phase: "dependency" | "context" | "execution";
1593
+ source: "executor" | "spotlight_action" | "spotlight_server";
1594
+ type: string;
1595
+ tool: string;
1596
+ detail?: string | undefined;
1597
+ at: number;
1598
+ elapsedMs: number;
1599
+ }[];
1600
+ } | {
1601
+ type: "assistant_response";
1602
+ at: number;
1603
+ iteration: number;
1604
+ content: string;
1605
+ } | {
1606
+ type: "llm_error";
1607
+ at: number;
1608
+ iteration: number;
1609
+ error: string;
1610
+ } | {
1611
+ type: "turn_completed";
1612
+ at: number;
1613
+ turnId: string;
1614
+ assistantReply: string | null;
1615
+ commandName: string | null;
1616
+ usedQueryLoop: boolean;
1617
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
1618
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
1619
+ elapsedMs: number;
1620
+ budgetUsage: {
1621
+ maxLoopTurns: number;
1622
+ iterationsUsed: number;
1623
+ toolCallsExecuted: number;
1624
+ successfulToolCalls: number;
1625
+ failedToolCalls: number;
1626
+ contextCharsUsed: number;
1627
+ recentTurnsUsed: number;
1628
+ };
1629
+ } | {
1630
+ type: "skill_permission_request";
1631
+ at: number;
1632
+ skillName: string;
1633
+ displayName?: string | undefined;
1634
+ reason: string;
1635
+ source: "model" | "user-slash";
1636
+ } | {
1637
+ type: "fork_progress";
1638
+ at: number;
1639
+ agentId: string;
1640
+ iteration: number;
1641
+ phase: "plan" | "tool_execution" | "respond";
1642
+ summary: string;
1643
+ };
1644
+ }[];
1645
+ failureSummary: {
1646
+ turnId: string;
1647
+ stopReason: string;
1648
+ failureClass: string | null;
1649
+ category: SpotlightTelemetryFailureCategory;
1650
+ elapsedMs: number;
1651
+ toolErrors: string[];
1652
+ } | null;
1653
+ }[];
1654
+ } & import("pinia").PiniaCustomStateProperties<{
1655
+ visible: boolean;
1656
+ prompt: string;
1657
+ loading: boolean;
1658
+ error: string;
1659
+ result: string | null;
1660
+ selectedIndex: number;
1661
+ showThinkingBar: boolean;
1662
+ agentSteps: AgentStep[];
1663
+ executionEvents: SpotlightExecutionEvent[];
1664
+ pendingSkillPermission: SpotlightSkillPermissionRequest | null;
1665
+ recentQuestions: string[];
1666
+ suggestedQuestions: string[];
1667
+ pipelinePhase: PipelinePhase;
1668
+ pipelineRunId: number;
1669
+ pipelineAbortController: AbortController | null;
1670
+ telemetrySnapshots: SpotlightTelemetrySnapshot[];
1671
+ }>): SpotlightTimelineEvent[][];
1672
+ latestTurnTimeline(): SpotlightTimelineEvent[];
1673
+ latestFailureSummary(state: {
1674
+ visible: boolean;
1675
+ prompt: string;
1676
+ loading: boolean;
1677
+ error: string;
1678
+ result: string | null;
1679
+ selectedIndex: number;
1680
+ showThinkingBar: boolean;
1681
+ agentSteps: {
1682
+ id: string;
1683
+ label: string;
1684
+ status: "pending" | "active" | "done" | "error";
1685
+ content?: string | undefined;
1686
+ attachments?: {
1687
+ id: string;
1688
+ type: "image" | "file" | "html";
1689
+ name?: string | undefined;
1690
+ url: string;
1691
+ mimeType?: string | undefined;
1692
+ }[] | undefined;
1693
+ files?: {
1694
+ id: string;
1695
+ path: string;
1696
+ name: string;
1697
+ content?: string[] | undefined;
1698
+ createdAt?: string | undefined;
1699
+ modifiedAt?: string | undefined;
1700
+ }[] | undefined;
1701
+ artifacts?: {
1702
+ id: string;
1703
+ kind: import("./types.js").SpotlightArtifactKind;
1704
+ title: string;
1705
+ sourceToolCallId?: string | undefined;
1706
+ sourceToolName?: string | undefined;
1707
+ summary?: string | undefined;
1708
+ payload: {
1709
+ columns: string[];
1710
+ rows: Array<Record<string, unknown>>;
1711
+ } | {
1712
+ html: string;
1713
+ } | {
1714
+ url: string;
1715
+ } | {
1716
+ value: unknown;
1717
+ } | {
1718
+ text: string;
1719
+ };
1720
+ }[] | undefined;
1721
+ toolCalls?: {
1722
+ id: string;
1723
+ name: string;
1724
+ displayName?: string | undefined;
1725
+ argsText?: string | undefined;
1726
+ resultText?: string | undefined;
1727
+ summary?: string | undefined;
1728
+ errorCode?: string | undefined;
1729
+ trace?: {
1730
+ phase: "dependency" | "context" | "execution";
1731
+ source: "executor" | "spotlight_action" | "spotlight_server";
1732
+ type: string;
1733
+ tool: string;
1734
+ detail?: string | undefined;
1735
+ at: number;
1736
+ elapsedMs: number;
1737
+ }[] | undefined;
1738
+ status: "pending" | "running" | "done" | "error";
1739
+ }[] | undefined;
1740
+ chatItems?: ({
1741
+ id: string;
1742
+ type: "text";
1743
+ text: string;
1744
+ } | {
1745
+ id: string;
1746
+ type: "tool";
1747
+ toolCall: {
1748
+ id: string;
1749
+ name: string;
1750
+ displayName?: string | undefined;
1751
+ argsText?: string | undefined;
1752
+ resultText?: string | undefined;
1753
+ summary?: string | undefined;
1754
+ errorCode?: string | undefined;
1755
+ trace?: {
1756
+ phase: "dependency" | "context" | "execution";
1757
+ source: "executor" | "spotlight_action" | "spotlight_server";
1758
+ type: string;
1759
+ tool: string;
1760
+ detail?: string | undefined;
1761
+ at: number;
1762
+ elapsedMs: number;
1763
+ }[] | undefined;
1764
+ status: "pending" | "running" | "done" | "error";
1765
+ };
1766
+ })[] | undefined;
1767
+ }[];
1768
+ executionEvents: ({
1769
+ type: "step_sync";
1770
+ at: number;
1771
+ steps: {
1772
+ id: string;
1773
+ label: string;
1774
+ status: "pending" | "active" | "done" | "error";
1775
+ }[];
1776
+ } | {
1777
+ type: "step_status";
1778
+ at: number;
1779
+ stepId: string;
1780
+ label: string | null;
1781
+ status: AgentStep["status"];
1782
+ content?: string | undefined;
1783
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
1784
+ } | {
1785
+ type: "step_content";
1786
+ at: number;
1787
+ stepId: string;
1788
+ label: string | null;
1789
+ mode: "replace" | "append";
1790
+ content: string;
1791
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
1792
+ } | {
1793
+ type: "step_artifact";
1794
+ at: number;
1795
+ stepId: string;
1796
+ label: string | null;
1797
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
1798
+ count: number;
1799
+ } | {
1800
+ type: "turn_transition";
1801
+ at: number;
1802
+ turnId: string;
1803
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
1804
+ iteration?: number | undefined;
1805
+ summary?: string | undefined;
1806
+ } | {
1807
+ type: "plan";
1808
+ at: number;
1809
+ iteration: number;
1810
+ action: import("./runtime/types.js").SpotlightLoopAction;
1811
+ summary: string;
1812
+ } | {
1813
+ type: "tool_start";
1814
+ at: number;
1815
+ iteration: number;
1816
+ call: {
1817
+ id: string;
1818
+ name: string;
1819
+ input: Record<string, unknown>;
1820
+ displayName: string;
1821
+ };
1822
+ } | {
1823
+ type: "tool_progress";
1824
+ at: number;
1825
+ iteration: number;
1826
+ call: {
1827
+ id: string;
1828
+ name: string;
1829
+ input: Record<string, unknown>;
1830
+ displayName: string;
1831
+ };
1832
+ summary: string;
1833
+ } | {
1834
+ type: "tool_result";
1835
+ at: number;
1836
+ iteration: number;
1837
+ result: {
1838
+ call: {
1839
+ id: string;
1840
+ name: string;
1841
+ input: Record<string, unknown>;
1842
+ displayName: string;
1843
+ };
1844
+ success: boolean;
1845
+ summary: string;
1846
+ output?: unknown;
1847
+ error?: string | undefined;
1848
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
1849
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
1850
+ hostEffect?: {
1851
+ type: string;
1852
+ target?: string | undefined;
1853
+ payload?: Record<string, unknown> | undefined;
1854
+ } | undefined;
1855
+ trace: {
1856
+ phase: "dependency" | "context" | "execution";
1857
+ source: "executor" | "spotlight_action" | "spotlight_server";
1858
+ type: string;
1859
+ tool: string;
1860
+ detail?: string | undefined;
1861
+ at: number;
1862
+ elapsedMs: number;
1863
+ }[];
1864
+ attachments?: {
1865
+ id: string;
1866
+ type: "image" | "file" | "html";
1867
+ name?: string | undefined;
1868
+ url: string;
1869
+ mimeType?: string | undefined;
1870
+ }[] | undefined;
1871
+ files?: {
1872
+ id: string;
1873
+ path: string;
1874
+ name: string;
1875
+ content?: string[] | undefined;
1876
+ createdAt?: string | undefined;
1877
+ modifiedAt?: string | undefined;
1878
+ }[] | undefined;
1879
+ toolCalls?: {
1880
+ id: string;
1881
+ name: string;
1882
+ displayName?: string | undefined;
1883
+ argsText?: string | undefined;
1884
+ resultText?: string | undefined;
1885
+ summary?: string | undefined;
1886
+ errorCode?: string | undefined;
1887
+ trace?: {
1888
+ phase: "dependency" | "context" | "execution";
1889
+ source: "executor" | "spotlight_action" | "spotlight_server";
1890
+ type: string;
1891
+ tool: string;
1892
+ detail?: string | undefined;
1893
+ at: number;
1894
+ elapsedMs: number;
1895
+ }[] | undefined;
1896
+ status: "pending" | "running" | "done" | "error";
1897
+ }[] | undefined;
1898
+ };
1899
+ } | {
1900
+ type: "tool_trace";
1901
+ at: number;
1902
+ iteration: number;
1903
+ toolName: string;
1904
+ trace: {
1905
+ phase: "dependency" | "context" | "execution";
1906
+ source: "executor" | "spotlight_action" | "spotlight_server";
1907
+ type: string;
1908
+ tool: string;
1909
+ detail?: string | undefined;
1910
+ at: number;
1911
+ elapsedMs: number;
1912
+ }[];
1913
+ } | {
1914
+ type: "assistant_response";
1915
+ at: number;
1916
+ iteration: number;
1917
+ content: string;
1918
+ } | {
1919
+ type: "llm_error";
1920
+ at: number;
1921
+ iteration: number;
1922
+ error: string;
1923
+ } | {
1924
+ type: "turn_completed";
1925
+ at: number;
1926
+ turnId: string;
1927
+ assistantReply: string | null;
1928
+ commandName: string | null;
1929
+ usedQueryLoop: boolean;
1930
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
1931
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
1932
+ elapsedMs: number;
1933
+ budgetUsage: {
1934
+ maxLoopTurns: number;
1935
+ iterationsUsed: number;
1936
+ toolCallsExecuted: number;
1937
+ successfulToolCalls: number;
1938
+ failedToolCalls: number;
1939
+ contextCharsUsed: number;
1940
+ recentTurnsUsed: number;
1941
+ };
1942
+ } | {
1943
+ type: "skill_permission_request";
1944
+ at: number;
1945
+ skillName: string;
1946
+ displayName?: string | undefined;
1947
+ reason: string;
1948
+ source: "model" | "user-slash";
1949
+ } | {
1950
+ type: "fork_progress";
1951
+ at: number;
1952
+ agentId: string;
1953
+ iteration: number;
1954
+ phase: "plan" | "tool_execution" | "respond";
1955
+ summary: string;
1956
+ })[];
1957
+ pendingSkillPermission: {
1958
+ skillName: string;
1959
+ displayName?: string | undefined;
1960
+ reason: string;
1961
+ source: "model" | "user-slash";
1962
+ at: number;
1963
+ } | null;
1964
+ recentQuestions: string[];
1965
+ suggestedQuestions: string[];
1966
+ pipelinePhase: PipelinePhase;
1967
+ pipelineRunId: number;
1968
+ pipelineAbortController: {
1969
+ readonly signal: {
1970
+ readonly aborted: boolean;
1971
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
1972
+ readonly reason: any;
1973
+ throwIfAborted: () => void;
1974
+ addEventListener: {
1975
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1976
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1977
+ };
1978
+ removeEventListener: {
1979
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1980
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1981
+ };
1982
+ dispatchEvent: (event: Event) => boolean;
1983
+ };
1984
+ abort: (reason?: any) => void;
1985
+ } | null;
1986
+ telemetrySnapshots: {
1987
+ turnId: string;
1988
+ recordedAt: number;
1989
+ timeline: {
1990
+ turnId: string;
1991
+ at: number;
1992
+ kind: SpotlightExecutionEvent["type"];
1993
+ iteration?: number | undefined;
1994
+ summary?: string | undefined;
1995
+ raw: {
1996
+ type: "step_sync";
1997
+ at: number;
1998
+ steps: {
1999
+ id: string;
2000
+ label: string;
2001
+ status: "pending" | "active" | "done" | "error";
2002
+ }[];
2003
+ } | {
2004
+ type: "step_status";
2005
+ at: number;
2006
+ stepId: string;
2007
+ label: string | null;
2008
+ status: AgentStep["status"];
2009
+ content?: string | undefined;
2010
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
2011
+ } | {
2012
+ type: "step_content";
2013
+ at: number;
2014
+ stepId: string;
2015
+ label: string | null;
2016
+ mode: "replace" | "append";
2017
+ content: string;
2018
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
2019
+ } | {
2020
+ type: "step_artifact";
2021
+ at: number;
2022
+ stepId: string;
2023
+ label: string | null;
2024
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
2025
+ count: number;
2026
+ } | {
2027
+ type: "turn_transition";
2028
+ at: number;
2029
+ turnId: string;
2030
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
2031
+ iteration?: number | undefined;
2032
+ summary?: string | undefined;
2033
+ } | {
2034
+ type: "plan";
2035
+ at: number;
2036
+ iteration: number;
2037
+ action: import("./runtime/types.js").SpotlightLoopAction;
2038
+ summary: string;
2039
+ } | {
2040
+ type: "tool_start";
2041
+ at: number;
2042
+ iteration: number;
2043
+ call: {
2044
+ id: string;
2045
+ name: string;
2046
+ input: Record<string, unknown>;
2047
+ displayName: string;
2048
+ };
2049
+ } | {
2050
+ type: "tool_progress";
2051
+ at: number;
2052
+ iteration: number;
2053
+ call: {
2054
+ id: string;
2055
+ name: string;
2056
+ input: Record<string, unknown>;
2057
+ displayName: string;
2058
+ };
2059
+ summary: string;
2060
+ } | {
2061
+ type: "tool_result";
2062
+ at: number;
2063
+ iteration: number;
2064
+ result: {
2065
+ call: {
2066
+ id: string;
2067
+ name: string;
2068
+ input: Record<string, unknown>;
2069
+ displayName: string;
2070
+ };
2071
+ success: boolean;
2072
+ summary: string;
2073
+ output?: unknown;
2074
+ error?: string | undefined;
2075
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
2076
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
2077
+ hostEffect?: {
2078
+ type: string;
2079
+ target?: string | undefined;
2080
+ payload?: Record<string, unknown> | undefined;
2081
+ } | undefined;
2082
+ trace: {
2083
+ phase: "dependency" | "context" | "execution";
2084
+ source: "executor" | "spotlight_action" | "spotlight_server";
2085
+ type: string;
2086
+ tool: string;
2087
+ detail?: string | undefined;
2088
+ at: number;
2089
+ elapsedMs: number;
2090
+ }[];
2091
+ attachments?: {
2092
+ id: string;
2093
+ type: "image" | "file" | "html";
2094
+ name?: string | undefined;
2095
+ url: string;
2096
+ mimeType?: string | undefined;
2097
+ }[] | undefined;
2098
+ files?: {
2099
+ id: string;
2100
+ path: string;
2101
+ name: string;
2102
+ content?: string[] | undefined;
2103
+ createdAt?: string | undefined;
2104
+ modifiedAt?: string | undefined;
2105
+ }[] | undefined;
2106
+ toolCalls?: {
2107
+ id: string;
2108
+ name: string;
2109
+ displayName?: string | undefined;
2110
+ argsText?: string | undefined;
2111
+ resultText?: string | undefined;
2112
+ summary?: string | undefined;
2113
+ errorCode?: string | undefined;
2114
+ trace?: {
2115
+ phase: "dependency" | "context" | "execution";
2116
+ source: "executor" | "spotlight_action" | "spotlight_server";
2117
+ type: string;
2118
+ tool: string;
2119
+ detail?: string | undefined;
2120
+ at: number;
2121
+ elapsedMs: number;
2122
+ }[] | undefined;
2123
+ status: "pending" | "running" | "done" | "error";
2124
+ }[] | undefined;
2125
+ };
2126
+ } | {
2127
+ type: "tool_trace";
2128
+ at: number;
2129
+ iteration: number;
2130
+ toolName: string;
2131
+ trace: {
2132
+ phase: "dependency" | "context" | "execution";
2133
+ source: "executor" | "spotlight_action" | "spotlight_server";
2134
+ type: string;
2135
+ tool: string;
2136
+ detail?: string | undefined;
2137
+ at: number;
2138
+ elapsedMs: number;
2139
+ }[];
2140
+ } | {
2141
+ type: "assistant_response";
2142
+ at: number;
2143
+ iteration: number;
2144
+ content: string;
2145
+ } | {
2146
+ type: "llm_error";
2147
+ at: number;
2148
+ iteration: number;
2149
+ error: string;
2150
+ } | {
2151
+ type: "turn_completed";
2152
+ at: number;
2153
+ turnId: string;
2154
+ assistantReply: string | null;
2155
+ commandName: string | null;
2156
+ usedQueryLoop: boolean;
2157
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
2158
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
2159
+ elapsedMs: number;
2160
+ budgetUsage: {
2161
+ maxLoopTurns: number;
2162
+ iterationsUsed: number;
2163
+ toolCallsExecuted: number;
2164
+ successfulToolCalls: number;
2165
+ failedToolCalls: number;
2166
+ contextCharsUsed: number;
2167
+ recentTurnsUsed: number;
2168
+ };
2169
+ } | {
2170
+ type: "skill_permission_request";
2171
+ at: number;
2172
+ skillName: string;
2173
+ displayName?: string | undefined;
2174
+ reason: string;
2175
+ source: "model" | "user-slash";
2176
+ } | {
2177
+ type: "fork_progress";
2178
+ at: number;
2179
+ agentId: string;
2180
+ iteration: number;
2181
+ phase: "plan" | "tool_execution" | "respond";
2182
+ summary: string;
2183
+ };
2184
+ }[];
2185
+ failureSummary: {
2186
+ turnId: string;
2187
+ stopReason: string;
2188
+ failureClass: string | null;
2189
+ category: SpotlightTelemetryFailureCategory;
2190
+ elapsedMs: number;
2191
+ toolErrors: string[];
2192
+ } | null;
2193
+ }[];
2194
+ } & import("pinia").PiniaCustomStateProperties<{
2195
+ visible: boolean;
2196
+ prompt: string;
2197
+ loading: boolean;
2198
+ error: string;
2199
+ result: string | null;
2200
+ selectedIndex: number;
2201
+ showThinkingBar: boolean;
2202
+ agentSteps: AgentStep[];
2203
+ executionEvents: SpotlightExecutionEvent[];
2204
+ pendingSkillPermission: SpotlightSkillPermissionRequest | null;
2205
+ recentQuestions: string[];
2206
+ suggestedQuestions: string[];
2207
+ pipelinePhase: PipelinePhase;
2208
+ pipelineRunId: number;
2209
+ pipelineAbortController: AbortController | null;
2210
+ telemetrySnapshots: SpotlightTelemetrySnapshot[];
2211
+ }>): SpotlightFailureSummary | null;
2212
+ latestTelemetrySnapshot(state: {
2213
+ visible: boolean;
2214
+ prompt: string;
2215
+ loading: boolean;
2216
+ error: string;
2217
+ result: string | null;
2218
+ selectedIndex: number;
2219
+ showThinkingBar: boolean;
2220
+ agentSteps: {
2221
+ id: string;
2222
+ label: string;
2223
+ status: "pending" | "active" | "done" | "error";
2224
+ content?: string | undefined;
2225
+ attachments?: {
2226
+ id: string;
2227
+ type: "image" | "file" | "html";
2228
+ name?: string | undefined;
2229
+ url: string;
2230
+ mimeType?: string | undefined;
2231
+ }[] | undefined;
2232
+ files?: {
2233
+ id: string;
2234
+ path: string;
2235
+ name: string;
2236
+ content?: string[] | undefined;
2237
+ createdAt?: string | undefined;
2238
+ modifiedAt?: string | undefined;
2239
+ }[] | undefined;
2240
+ artifacts?: {
2241
+ id: string;
2242
+ kind: import("./types.js").SpotlightArtifactKind;
2243
+ title: string;
2244
+ sourceToolCallId?: string | undefined;
2245
+ sourceToolName?: string | undefined;
2246
+ summary?: string | undefined;
2247
+ payload: {
2248
+ columns: string[];
2249
+ rows: Array<Record<string, unknown>>;
2250
+ } | {
2251
+ html: string;
2252
+ } | {
2253
+ url: string;
2254
+ } | {
2255
+ value: unknown;
2256
+ } | {
2257
+ text: string;
2258
+ };
2259
+ }[] | undefined;
2260
+ toolCalls?: {
2261
+ id: string;
2262
+ name: string;
2263
+ displayName?: string | undefined;
2264
+ argsText?: string | undefined;
2265
+ resultText?: string | undefined;
2266
+ summary?: string | undefined;
2267
+ errorCode?: string | undefined;
2268
+ trace?: {
2269
+ phase: "dependency" | "context" | "execution";
2270
+ source: "executor" | "spotlight_action" | "spotlight_server";
2271
+ type: string;
2272
+ tool: string;
2273
+ detail?: string | undefined;
2274
+ at: number;
2275
+ elapsedMs: number;
2276
+ }[] | undefined;
2277
+ status: "pending" | "running" | "done" | "error";
2278
+ }[] | undefined;
2279
+ chatItems?: ({
2280
+ id: string;
2281
+ type: "text";
2282
+ text: string;
2283
+ } | {
2284
+ id: string;
2285
+ type: "tool";
2286
+ toolCall: {
2287
+ id: string;
2288
+ name: string;
2289
+ displayName?: string | undefined;
2290
+ argsText?: string | undefined;
2291
+ resultText?: string | undefined;
2292
+ summary?: string | undefined;
2293
+ errorCode?: string | undefined;
2294
+ trace?: {
2295
+ phase: "dependency" | "context" | "execution";
2296
+ source: "executor" | "spotlight_action" | "spotlight_server";
2297
+ type: string;
2298
+ tool: string;
2299
+ detail?: string | undefined;
2300
+ at: number;
2301
+ elapsedMs: number;
2302
+ }[] | undefined;
2303
+ status: "pending" | "running" | "done" | "error";
2304
+ };
2305
+ })[] | undefined;
2306
+ }[];
2307
+ executionEvents: ({
2308
+ type: "step_sync";
2309
+ at: number;
2310
+ steps: {
2311
+ id: string;
2312
+ label: string;
2313
+ status: "pending" | "active" | "done" | "error";
2314
+ }[];
2315
+ } | {
2316
+ type: "step_status";
2317
+ at: number;
2318
+ stepId: string;
2319
+ label: string | null;
2320
+ status: AgentStep["status"];
2321
+ content?: string | undefined;
2322
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
2323
+ } | {
2324
+ type: "step_content";
2325
+ at: number;
2326
+ stepId: string;
2327
+ label: string | null;
2328
+ mode: "replace" | "append";
2329
+ content: string;
2330
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
2331
+ } | {
2332
+ type: "step_artifact";
2333
+ at: number;
2334
+ stepId: string;
2335
+ label: string | null;
2336
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
2337
+ count: number;
2338
+ } | {
2339
+ type: "turn_transition";
2340
+ at: number;
2341
+ turnId: string;
2342
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
2343
+ iteration?: number | undefined;
2344
+ summary?: string | undefined;
2345
+ } | {
2346
+ type: "plan";
2347
+ at: number;
2348
+ iteration: number;
2349
+ action: import("./runtime/types.js").SpotlightLoopAction;
2350
+ summary: string;
2351
+ } | {
2352
+ type: "tool_start";
2353
+ at: number;
2354
+ iteration: number;
2355
+ call: {
2356
+ id: string;
2357
+ name: string;
2358
+ input: Record<string, unknown>;
2359
+ displayName: string;
2360
+ };
2361
+ } | {
2362
+ type: "tool_progress";
2363
+ at: number;
2364
+ iteration: number;
2365
+ call: {
2366
+ id: string;
2367
+ name: string;
2368
+ input: Record<string, unknown>;
2369
+ displayName: string;
2370
+ };
2371
+ summary: string;
2372
+ } | {
2373
+ type: "tool_result";
2374
+ at: number;
2375
+ iteration: number;
2376
+ result: {
2377
+ call: {
2378
+ id: string;
2379
+ name: string;
2380
+ input: Record<string, unknown>;
2381
+ displayName: string;
2382
+ };
2383
+ success: boolean;
2384
+ summary: string;
2385
+ output?: unknown;
2386
+ error?: string | undefined;
2387
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
2388
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
2389
+ hostEffect?: {
2390
+ type: string;
2391
+ target?: string | undefined;
2392
+ payload?: Record<string, unknown> | undefined;
2393
+ } | undefined;
2394
+ trace: {
2395
+ phase: "dependency" | "context" | "execution";
2396
+ source: "executor" | "spotlight_action" | "spotlight_server";
2397
+ type: string;
2398
+ tool: string;
2399
+ detail?: string | undefined;
2400
+ at: number;
2401
+ elapsedMs: number;
2402
+ }[];
2403
+ attachments?: {
2404
+ id: string;
2405
+ type: "image" | "file" | "html";
2406
+ name?: string | undefined;
2407
+ url: string;
2408
+ mimeType?: string | undefined;
2409
+ }[] | undefined;
2410
+ files?: {
2411
+ id: string;
2412
+ path: string;
2413
+ name: string;
2414
+ content?: string[] | undefined;
2415
+ createdAt?: string | undefined;
2416
+ modifiedAt?: string | undefined;
2417
+ }[] | undefined;
2418
+ toolCalls?: {
2419
+ id: string;
2420
+ name: string;
2421
+ displayName?: string | undefined;
2422
+ argsText?: string | undefined;
2423
+ resultText?: string | undefined;
2424
+ summary?: string | undefined;
2425
+ errorCode?: string | undefined;
2426
+ trace?: {
2427
+ phase: "dependency" | "context" | "execution";
2428
+ source: "executor" | "spotlight_action" | "spotlight_server";
2429
+ type: string;
2430
+ tool: string;
2431
+ detail?: string | undefined;
2432
+ at: number;
2433
+ elapsedMs: number;
2434
+ }[] | undefined;
2435
+ status: "pending" | "running" | "done" | "error";
2436
+ }[] | undefined;
2437
+ };
2438
+ } | {
2439
+ type: "tool_trace";
2440
+ at: number;
2441
+ iteration: number;
2442
+ toolName: string;
2443
+ trace: {
2444
+ phase: "dependency" | "context" | "execution";
2445
+ source: "executor" | "spotlight_action" | "spotlight_server";
2446
+ type: string;
2447
+ tool: string;
2448
+ detail?: string | undefined;
2449
+ at: number;
2450
+ elapsedMs: number;
2451
+ }[];
2452
+ } | {
2453
+ type: "assistant_response";
2454
+ at: number;
2455
+ iteration: number;
2456
+ content: string;
2457
+ } | {
2458
+ type: "llm_error";
2459
+ at: number;
2460
+ iteration: number;
2461
+ error: string;
2462
+ } | {
2463
+ type: "turn_completed";
2464
+ at: number;
2465
+ turnId: string;
2466
+ assistantReply: string | null;
2467
+ commandName: string | null;
2468
+ usedQueryLoop: boolean;
2469
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
2470
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
2471
+ elapsedMs: number;
2472
+ budgetUsage: {
2473
+ maxLoopTurns: number;
2474
+ iterationsUsed: number;
2475
+ toolCallsExecuted: number;
2476
+ successfulToolCalls: number;
2477
+ failedToolCalls: number;
2478
+ contextCharsUsed: number;
2479
+ recentTurnsUsed: number;
2480
+ };
2481
+ } | {
2482
+ type: "skill_permission_request";
2483
+ at: number;
2484
+ skillName: string;
2485
+ displayName?: string | undefined;
2486
+ reason: string;
2487
+ source: "model" | "user-slash";
2488
+ } | {
2489
+ type: "fork_progress";
2490
+ at: number;
2491
+ agentId: string;
2492
+ iteration: number;
2493
+ phase: "plan" | "tool_execution" | "respond";
2494
+ summary: string;
2495
+ })[];
2496
+ pendingSkillPermission: {
2497
+ skillName: string;
2498
+ displayName?: string | undefined;
2499
+ reason: string;
2500
+ source: "model" | "user-slash";
2501
+ at: number;
2502
+ } | null;
2503
+ recentQuestions: string[];
2504
+ suggestedQuestions: string[];
2505
+ pipelinePhase: PipelinePhase;
2506
+ pipelineRunId: number;
2507
+ pipelineAbortController: {
2508
+ readonly signal: {
2509
+ readonly aborted: boolean;
2510
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
2511
+ readonly reason: any;
2512
+ throwIfAborted: () => void;
2513
+ addEventListener: {
2514
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2515
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2516
+ };
2517
+ removeEventListener: {
2518
+ <K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2519
+ (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2520
+ };
2521
+ dispatchEvent: (event: Event) => boolean;
2522
+ };
2523
+ abort: (reason?: any) => void;
2524
+ } | null;
2525
+ telemetrySnapshots: {
2526
+ turnId: string;
2527
+ recordedAt: number;
2528
+ timeline: {
2529
+ turnId: string;
2530
+ at: number;
2531
+ kind: SpotlightExecutionEvent["type"];
2532
+ iteration?: number | undefined;
2533
+ summary?: string | undefined;
2534
+ raw: {
2535
+ type: "step_sync";
2536
+ at: number;
2537
+ steps: {
2538
+ id: string;
2539
+ label: string;
2540
+ status: "pending" | "active" | "done" | "error";
2541
+ }[];
2542
+ } | {
2543
+ type: "step_status";
2544
+ at: number;
2545
+ stepId: string;
2546
+ label: string | null;
2547
+ status: AgentStep["status"];
2548
+ content?: string | undefined;
2549
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
2550
+ } | {
2551
+ type: "step_content";
2552
+ at: number;
2553
+ stepId: string;
2554
+ label: string | null;
2555
+ mode: "replace" | "append";
2556
+ content: string;
2557
+ channel?: import("./runtime/types.js").SpotlightStepContentChannel | undefined;
2558
+ } | {
2559
+ type: "step_artifact";
2560
+ at: number;
2561
+ stepId: string;
2562
+ label: string | null;
2563
+ artifact: "attachments" | "files" | "artifacts" | "tool_calls" | "chat_items";
2564
+ count: number;
2565
+ } | {
2566
+ type: "turn_transition";
2567
+ at: number;
2568
+ turnId: string;
2569
+ phase: import("./runtime/types.js").SpotlightTurnPhase;
2570
+ iteration?: number | undefined;
2571
+ summary?: string | undefined;
2572
+ } | {
2573
+ type: "plan";
2574
+ at: number;
2575
+ iteration: number;
2576
+ action: import("./runtime/types.js").SpotlightLoopAction;
2577
+ summary: string;
2578
+ } | {
2579
+ type: "tool_start";
2580
+ at: number;
2581
+ iteration: number;
2582
+ call: {
2583
+ id: string;
2584
+ name: string;
2585
+ input: Record<string, unknown>;
2586
+ displayName: string;
2587
+ };
2588
+ } | {
2589
+ type: "tool_progress";
2590
+ at: number;
2591
+ iteration: number;
2592
+ call: {
2593
+ id: string;
2594
+ name: string;
2595
+ input: Record<string, unknown>;
2596
+ displayName: string;
2597
+ };
2598
+ summary: string;
2599
+ } | {
2600
+ type: "tool_result";
2601
+ at: number;
2602
+ iteration: number;
2603
+ result: {
2604
+ call: {
2605
+ id: string;
2606
+ name: string;
2607
+ input: Record<string, unknown>;
2608
+ displayName: string;
2609
+ };
2610
+ success: boolean;
2611
+ summary: string;
2612
+ output?: unknown;
2613
+ error?: string | undefined;
2614
+ errorCode?: import("@inupedia/spotlight-protocol").AgentToolErrorCode | undefined;
2615
+ executionTarget?: import("@inupedia/spotlight-protocol").ToolExecutionTarget | undefined;
2616
+ hostEffect?: {
2617
+ type: string;
2618
+ target?: string | undefined;
2619
+ payload?: Record<string, unknown> | undefined;
2620
+ } | undefined;
2621
+ trace: {
2622
+ phase: "dependency" | "context" | "execution";
2623
+ source: "executor" | "spotlight_action" | "spotlight_server";
2624
+ type: string;
2625
+ tool: string;
2626
+ detail?: string | undefined;
2627
+ at: number;
2628
+ elapsedMs: number;
2629
+ }[];
2630
+ attachments?: {
2631
+ id: string;
2632
+ type: "image" | "file" | "html";
2633
+ name?: string | undefined;
2634
+ url: string;
2635
+ mimeType?: string | undefined;
2636
+ }[] | undefined;
2637
+ files?: {
2638
+ id: string;
2639
+ path: string;
2640
+ name: string;
2641
+ content?: string[] | undefined;
2642
+ createdAt?: string | undefined;
2643
+ modifiedAt?: string | undefined;
2644
+ }[] | undefined;
2645
+ toolCalls?: {
2646
+ id: string;
2647
+ name: string;
2648
+ displayName?: string | undefined;
2649
+ argsText?: string | undefined;
2650
+ resultText?: string | undefined;
2651
+ summary?: string | undefined;
2652
+ errorCode?: string | undefined;
2653
+ trace?: {
2654
+ phase: "dependency" | "context" | "execution";
2655
+ source: "executor" | "spotlight_action" | "spotlight_server";
2656
+ type: string;
2657
+ tool: string;
2658
+ detail?: string | undefined;
2659
+ at: number;
2660
+ elapsedMs: number;
2661
+ }[] | undefined;
2662
+ status: "pending" | "running" | "done" | "error";
2663
+ }[] | undefined;
2664
+ };
2665
+ } | {
2666
+ type: "tool_trace";
2667
+ at: number;
2668
+ iteration: number;
2669
+ toolName: string;
2670
+ trace: {
2671
+ phase: "dependency" | "context" | "execution";
2672
+ source: "executor" | "spotlight_action" | "spotlight_server";
2673
+ type: string;
2674
+ tool: string;
2675
+ detail?: string | undefined;
2676
+ at: number;
2677
+ elapsedMs: number;
2678
+ }[];
2679
+ } | {
2680
+ type: "assistant_response";
2681
+ at: number;
2682
+ iteration: number;
2683
+ content: string;
2684
+ } | {
2685
+ type: "llm_error";
2686
+ at: number;
2687
+ iteration: number;
2688
+ error: string;
2689
+ } | {
2690
+ type: "turn_completed";
2691
+ at: number;
2692
+ turnId: string;
2693
+ assistantReply: string | null;
2694
+ commandName: string | null;
2695
+ usedQueryLoop: boolean;
2696
+ stopReason: import("./runtime/types.js").SpotlightTurnStopReason;
2697
+ failureClass: import("./runtime/types.js").SpotlightTurnFailureClass;
2698
+ elapsedMs: number;
2699
+ budgetUsage: {
2700
+ maxLoopTurns: number;
2701
+ iterationsUsed: number;
2702
+ toolCallsExecuted: number;
2703
+ successfulToolCalls: number;
2704
+ failedToolCalls: number;
2705
+ contextCharsUsed: number;
2706
+ recentTurnsUsed: number;
2707
+ };
2708
+ } | {
2709
+ type: "skill_permission_request";
2710
+ at: number;
2711
+ skillName: string;
2712
+ displayName?: string | undefined;
2713
+ reason: string;
2714
+ source: "model" | "user-slash";
2715
+ } | {
2716
+ type: "fork_progress";
2717
+ at: number;
2718
+ agentId: string;
2719
+ iteration: number;
2720
+ phase: "plan" | "tool_execution" | "respond";
2721
+ summary: string;
2722
+ };
2723
+ }[];
2724
+ failureSummary: {
2725
+ turnId: string;
2726
+ stopReason: string;
2727
+ failureClass: string | null;
2728
+ category: SpotlightTelemetryFailureCategory;
2729
+ elapsedMs: number;
2730
+ toolErrors: string[];
2731
+ } | null;
2732
+ }[];
2733
+ } & import("pinia").PiniaCustomStateProperties<{
2734
+ visible: boolean;
2735
+ prompt: string;
2736
+ loading: boolean;
2737
+ error: string;
2738
+ result: string | null;
2739
+ selectedIndex: number;
2740
+ showThinkingBar: boolean;
2741
+ agentSteps: AgentStep[];
2742
+ executionEvents: SpotlightExecutionEvent[];
2743
+ pendingSkillPermission: SpotlightSkillPermissionRequest | null;
2744
+ recentQuestions: string[];
2745
+ suggestedQuestions: string[];
2746
+ pipelinePhase: PipelinePhase;
2747
+ pipelineRunId: number;
2748
+ pipelineAbortController: AbortController | null;
2749
+ telemetrySnapshots: SpotlightTelemetrySnapshot[];
2750
+ }>): SpotlightTelemetrySnapshot | null;
2751
+ }, {
2752
+ persistTurnTelemetrySnapshot(turnId: string): void;
2753
+ exportTurnTelemetrySnapshot(turnId: string): string | null;
2754
+ exportLatestTelemetrySnapshot(): string | null;
2755
+ clearTelemetrySnapshots(): void;
2756
+ isPipelineRunActive(runId: number): boolean;
2757
+ cancelPipeline(): void;
2758
+ setStep(id: string, status: AgentStep["status"], content?: string): void;
2759
+ recordExecutionEvent(event: SpotlightExecutionEvent): void;
2760
+ typewriterToStep(stepId: string, fullText: string, msPerChar?: number, shouldContinue?: () => boolean): Promise<void>;
2761
+ typewriterAppendToStep(stepId: string, suffix: string, msPerChar?: number, shouldContinue?: () => boolean): Promise<void>;
2762
+ open(): void;
2763
+ /**
2764
+ * ⌘/Ctrl+L 显示数字人时:与 open() 同步推荐问法、历史与输入壳状态,但不打开面板(visible 不变)。
2765
+ * 用于「语音等同 Spotlight 文字输入」通道,Thinking 仍走 submit(),布局与 ⌘K 一致。
2766
+ */
2767
+ prepareLive2dVoiceChannel(): void;
2768
+ loadRecentQuestions(): void;
2769
+ addRecentQuestion(question: string): void;
2770
+ refreshSuggestedQuestions(): Promise<void>;
2771
+ getSelectionQuestions(): string[];
2772
+ fillPromptWithRecent(index: number): void;
2773
+ runSelectedRecentAndSubmit(): void;
2774
+ close(): void;
2775
+ openThinkingBar(): void;
2776
+ closeThinking(): void;
2777
+ setPendingSkillPermission(request: SpotlightSkillPermissionRequest): void;
2778
+ clearPendingSkillPermission(): void;
2779
+ approvePendingSkillPermission(): void;
2780
+ /** 供 pipeline handlers 使用,不直接依赖 pinia 的 api 封装 */
2781
+ buildHandlerApi(runId: number, signal: AbortSignal): HandlerApi;
2782
+ selectNext(): void;
2783
+ selectPrev(): void;
2784
+ submit(): Promise<void>;
2785
+ handleEnter(): void;
2786
+ }>;
2787
+ //# sourceMappingURL=spotlightStore.d.ts.map