@inupedia/spotlight-vue 0.5.13 → 0.5.15

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.
@@ -1 +1 @@
1
- {"version":3,"file":"runPipeline.d.ts","sourceRoot":"","sources":["../../src/remote/runPipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AAYtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,OAAO,EAEL,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAI9D,KAAK,cAAc,GACf,uBAAuB,GACvB;IACE,IAAI,EAAE,qBAAqB,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,aAAa,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE;YACJ,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;YACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC/B,WAAW,EAAE,MAAM,CAAC;SACrB,CAAC;QACF,UAAU,CAAC,EAAE,cAAc,CAAC;KAC7B,CAAC;CACH,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB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MrE"}
@@ -1,16 +1,16 @@
1
- import { serializeSkillsForRemote as A } from "@inupedia/spotlight-client";
1
+ import { serializeSkillsForRemote as M } from "@inupedia/spotlight-client";
2
2
  import { useAgentSessionStore as R } from "../session/agentSession.js";
3
- import { useSpotlightMemoryPreferenceStore as M } from "../store/memoryPreferenceStore.js";
4
- import { useSpotlightRuntimeStore as $ } from "../store/runtimeStore.js";
3
+ import { useSpotlightMemoryPreferenceStore as $ } from "../store/memoryPreferenceStore.js";
4
+ import { useSpotlightRuntimeStore as L } from "../store/runtimeStore.js";
5
5
  import { SPOTLIGHT_PIPELINE_STEP_IDS as s } from "../store/pipeline/constants.js";
6
- import { isLoopPlanningChunk as L, splitIntentStepContent as H, splitToolStepContent as O, composeToolStepContent as q } from "../store/pipeline/displayText.js";
6
+ import { isLoopPlanningChunk as H, splitIntentStepContent as O, splitToolStepContent as q, composeToolStepContent as D } from "../store/pipeline/displayText.js";
7
7
  import { getSpotlightConfig as b } from "../plugin.js";
8
- import { getSkillsPoolForRun as D } from "../skills/index.js";
9
- import { executeRemoteHostTool as J, ensureHostToolsManifest as N } from "./hostToolRunner.js";
10
- import { getSpotlightServerBase as C, buildSpotlightJsonHeaders as g, getSpotlightProjectId as F } from "./httpConfig.js";
11
- import { ensureSpotlightMeta as j } from "./meta.js";
8
+ import { getSkillsPoolForRun as J } from "../skills/index.js";
9
+ import { executeRemoteHostTool as F, ensureHostToolsManifest as N } from "./hostToolRunner.js";
10
+ import { getSpotlightServerBase as C, buildSpotlightJsonHeaders as y, getSpotlightProjectId as j } from "./httpConfig.js";
11
+ import { ensureSpotlightMeta as W } from "./meta.js";
12
12
  const T = /* @__PURE__ */ new WeakMap();
13
- function W(e) {
13
+ function z(e) {
14
14
  return e.type !== "host_action_request" && e.type !== "run_completed" && e.type !== "run_error" && e.type !== "ping" && e.type !== "memory_decision";
15
15
  }
16
16
  function c(e, t, o) {
@@ -19,7 +19,7 @@ function c(e, t, o) {
19
19
  const r = { id: t, label: o, status: "pending" };
20
20
  return e.setSteps([...e.getSteps(), r]), r;
21
21
  }
22
- function z() {
22
+ function P() {
23
23
  return new Promise((e) => {
24
24
  requestAnimationFrame(() => e());
25
25
  });
@@ -89,22 +89,33 @@ function K(e, t, o) {
89
89
  V(t, o)
90
90
  ]);
91
91
  }
92
+ function Q(e) {
93
+ const t = e.getSteps().find(
94
+ (o) => o.id === s.agent && o.label === "选择工具" && o.status === "active"
95
+ );
96
+ t && e.setStep(
97
+ s.agent,
98
+ "done",
99
+ t.content ?? "工具选择与调用已完成。"
100
+ );
101
+ }
92
102
  function d(e, t) {
93
103
  if (t !== s.tool) return;
104
+ Q(e);
94
105
  const o = e.getSteps().find((n) => n.id === t);
95
106
  !o || o.status === "active" || o.status === "done" || e.setStep(t, "active", o.content);
96
107
  }
97
108
  function k(e, t) {
98
109
  return t || (e === s.tool ? "执行工具与回答" : e);
99
110
  }
100
- function Q(e) {
111
+ function X(e) {
101
112
  const t = e.getSteps().find((o) => o.id === s.agent);
102
113
  return t?.label === "检索知识" ? "知识问答" : t?.label === "选择工具" ? "执行工具与回答" : "生成回答";
103
114
  }
104
115
  function u(e, t, o, n, r) {
105
116
  c(e, t, o), e.setStep(t, n, r);
106
117
  }
107
- function X(e, t) {
118
+ function Z(e, t) {
108
119
  const o = t.summary?.trim();
109
120
  switch (t.phase) {
110
121
  case "routing":
@@ -175,7 +186,7 @@ function X(e, t) {
175
186
  return;
176
187
  }
177
188
  }
178
- async function Z(e, t) {
189
+ async function v(e, t) {
179
190
  if (t.type !== "ping") {
180
191
  if (t.type === "step_sync")
181
192
  e.setSteps(
@@ -190,10 +201,10 @@ async function Z(e, t) {
190
201
  c(e, t.stepId, t.label ?? t.stepId), e.setStep(t.stepId, t.status, t.content);
191
202
  else if (t.type === "step_content") {
192
203
  let o = t.stepId, n = t.content;
193
- if (o === s.intent && L(n))
204
+ if (o === s.intent && H(n))
194
205
  o = s.tool;
195
206
  else if (o === s.intent && t.mode === "replace") {
196
- const { intent: r, misplacedPlanning: l } = H(n);
207
+ const { intent: r, misplacedPlanning: l } = O(n);
197
208
  n = r, l.trim() && (c(e, s.tool, "执行工具与回答"), e.appendChunkToStep(
198
209
  s.tool,
199
210
  l
@@ -203,7 +214,7 @@ async function Z(e, t) {
203
214
  o,
204
215
  e.getSteps().find((r) => r.id === o)?.status ?? "active",
205
216
  n
206
- ) : (d(e, o), e.appendChunkToStep(o, n), await z());
217
+ ) : (d(e, o), e.appendChunkToStep(o, n), await P());
207
218
  } else if (t.type === "step_artifact")
208
219
  c(e, t.stepId, k(t.stepId, t.label)), d(e, t.stepId), t.artifact === "tool_calls" && t.toolCalls?.length ? e.appendToolCallsToStep(t.stepId, t.toolCalls) : t.artifact === "attachments" && t.attachments?.length ? e.appendAttachmentsToStep(t.stepId, t.attachments) : t.artifact === "files" && t.files?.length ? e.appendFilesToStep(t.stepId, t.files) : t.artifact === "artifacts" && t.artifacts?.length ? e.appendArtifactsToStep(t.stepId, t.artifacts) : t.artifact === "chat_items" && t.chatItems?.length && e.appendChatItemsToStep(t.stepId, t.chatItems);
209
220
  else if (t.type === "tool_start")
@@ -251,7 +262,7 @@ async function Z(e, t) {
251
262
  `
252
263
  );
253
264
  else if (t.type === "turn_transition")
254
- X(e, t);
265
+ Z(e, t);
255
266
  else if (t.type === "memory_decision") {
256
267
  c(e, s.breakdown, "问题拆解");
257
268
  const o = {
@@ -269,26 +280,26 @@ async function Z(e, t) {
269
280
  c(
270
281
  e,
271
282
  s.tool,
272
- Q(e)
283
+ X(e)
273
284
  );
274
- const o = e.getSteps().find((S) => S.id === s.tool), { planning: n, answer: r } = O(o?.content ?? ""), l = t.content.trim(), i = r.trim();
285
+ const o = e.getSteps().find((S) => S.id === s.tool), { planning: n, answer: r } = q(o?.content ?? ""), l = t.content.trim(), i = r.trim();
275
286
  i && l && (i === l || l.startsWith(
276
287
  i.slice(0, Math.min(i.length, 80))
277
288
  )) ? e.setStep(s.tool, "done") : e.setStep(
278
289
  s.tool,
279
290
  "done",
280
- q(n, l)
291
+ D(n, l)
281
292
  );
282
293
  }
283
- W(t) && e.appendExecutionEvent?.(t);
294
+ z(t) && e.appendExecutionEvent?.(t);
284
295
  }
285
296
  }
286
- async function v(e) {
297
+ async function tt(e) {
287
298
  await fetch(
288
299
  `${C()}/v1/runs/${encodeURIComponent(e.runId)}/host-results`,
289
300
  {
290
301
  method: "POST",
291
- headers: g(),
302
+ headers: y(),
292
303
  body: JSON.stringify({
293
304
  correlationId: e.correlationId,
294
305
  success: e.result.success,
@@ -301,7 +312,7 @@ async function v(e) {
301
312
  }
302
313
  );
303
314
  }
304
- function tt(e) {
315
+ function et(e) {
305
316
  const t = e.split(/\n\n/u), o = t.pop() ?? "";
306
317
  return { events: t.flatMap((r) => {
307
318
  const l = r.split(/\n/u).find((i) => i.startsWith("data: "));
@@ -313,18 +324,18 @@ function tt(e) {
313
324
  }
314
325
  }), rest: o };
315
326
  }
316
- async function pt(e) {
327
+ async function ft(e) {
317
328
  await Promise.allSettled([
318
329
  N(),
319
- j(e)
330
+ W(e)
320
331
  ]);
321
332
  }
322
- async function et(e, t, o) {
323
- const n = R(), r = $(), l = M(), i = await N();
333
+ async function ot(e, t, o) {
334
+ const n = R(), r = L(), l = $(), i = await N();
324
335
  return {
325
336
  hostManifest: i,
326
337
  payload: {
327
- projectId: F(),
338
+ projectId: j(),
328
339
  sessionId: n.sessionId,
329
340
  memorySubjectId: b().getMemorySubjectId?.() ?? void 0,
330
341
  userQuestion: e,
@@ -354,20 +365,20 @@ async function et(e, t, o) {
354
365
  },
355
366
  clientToolsManifestVersion: i.manifestDigest,
356
367
  clientToolManifest: i,
357
- skills: A(D()),
368
+ skills: M(J()),
358
369
  frontendBuildId: i.frontendBuildId,
359
370
  manifestDigest: i.manifestDigest
360
371
  }
361
372
  };
362
373
  }
363
- async function ft(e, t, o) {
364
- const n = C(), r = t.getSignal(), { payload: l, hostManifest: i } = await et(
374
+ async function gt(e, t, o) {
375
+ const n = C(), r = t.getSignal(), { payload: l, hostManifest: i } = await ot(
365
376
  e,
366
377
  r,
367
378
  o
368
379
  ), S = new Set(i.tools.map((m) => m.name)), p = await fetch(`${n}/v1/runs`, {
369
380
  method: "POST",
370
- headers: g(),
381
+ headers: y(),
371
382
  body: JSON.stringify(l),
372
383
  signal: r
373
384
  });
@@ -381,36 +392,36 @@ async function ft(e, t, o) {
381
392
  r && (T.set(r, f), r.addEventListener(
382
393
  "abort",
383
394
  () => {
384
- P(f);
395
+ x(f);
385
396
  },
386
397
  { once: !0 }
387
398
  ));
388
- const y = await fetch(
399
+ const g = await fetch(
389
400
  `${n}/v1/runs/${encodeURIComponent(f)}/events`,
390
401
  {
391
- headers: g(),
402
+ headers: y(),
392
403
  signal: r
393
404
  }
394
405
  );
395
- if (!y.ok || !y.body)
396
- throw new Error(`Spotlight 后端事件流连接失败:${y.status}`);
397
- const I = y.body.getReader(), x = new TextDecoder();
406
+ if (!g.ok || !g.body)
407
+ throw new Error(`Spotlight 后端事件流连接失败:${g.status}`);
408
+ const I = g.body.getReader(), E = new TextDecoder();
398
409
  let h = "";
399
410
  try {
400
411
  for (; ; ) {
401
- const { done: m, value: E } = await I.read();
412
+ const { done: m, value: A } = await I.read();
402
413
  if (m) break;
403
- h += x.decode(E, { stream: !0 });
404
- const w = tt(h);
414
+ h += E.decode(A, { stream: !0 });
415
+ const w = et(h);
405
416
  h = w.rest;
406
417
  for (const a of w.events) {
407
418
  if (a.type === "host_action_request") {
408
419
  Y(t, a.request.call);
409
- const _ = await J(a.request.call, t, {
420
+ const _ = await F(a.request.call, t, {
410
421
  allowedHostNames: S,
411
422
  hostEffect: a.request.hostEffect
412
423
  });
413
- K(t, a.request.call, _), await v({
424
+ K(t, a.request.call, _), await tt({
414
425
  runId: f,
415
426
  correlationId: a.request.correlationId,
416
427
  result: _,
@@ -420,7 +431,7 @@ async function ft(e, t, o) {
420
431
  }
421
432
  if (a.type === "run_error")
422
433
  throw new Error(a.error);
423
- if (await Z(t, a), a.type === "run_completed")
434
+ if (await v(t, a), await P(), a.type === "run_completed")
424
435
  return a.sessionPatch && R().applySessionPatch(a.sessionPatch), {
425
436
  command: null,
426
437
  memoryReplay: a.memoryReplay ?? null,
@@ -436,28 +447,28 @@ async function ft(e, t, o) {
436
447
  command: null
437
448
  };
438
449
  }
439
- async function P(e) {
450
+ async function x(e) {
440
451
  await fetch(
441
452
  `${C()}/v1/runs/${encodeURIComponent(e)}`,
442
453
  {
443
454
  method: "DELETE",
444
- headers: g()
455
+ headers: y()
445
456
  }
446
457
  );
447
458
  }
448
459
  function yt(e) {
449
460
  if (!e) return;
450
461
  const t = T.get(e);
451
- t && (T.delete(e), P(t));
462
+ t && (T.delete(e), x(t));
452
463
  }
453
464
  export {
454
- X as applyLangGraphTransition,
455
- Z as applyRemoteEvent,
465
+ Z as applyLangGraphTransition,
466
+ v as applyRemoteEvent,
456
467
  Y as beginHostToolCall,
457
- P as cancelRemoteSpotlightRun,
468
+ x as cancelRemoteSpotlightRun,
458
469
  yt as cancelRemoteSpotlightRunForSignal,
459
- Q as responseStepLabel,
460
- ft as runRemoteSpotlightPipeline,
470
+ X as responseStepLabel,
471
+ gt as runRemoteSpotlightPipeline,
461
472
  K as settleHostToolCall,
462
- pt as warmupSpotlightRemoteContext
473
+ ft as warmupSpotlightRemoteContext
463
474
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inupedia/spotlight-vue",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "description": "Thin Vue runtime for Inupedia Spotlight Client Tools",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -91,8 +91,8 @@
91
91
  "dependencies": {
92
92
  "prettier": "^3.8.1",
93
93
  "yaml": "^2.8.4",
94
- "@inupedia/spotlight-client": "0.5.13",
95
- "@inupedia/spotlight-protocol": "0.5.13"
94
+ "@inupedia/spotlight-client": "0.5.15",
95
+ "@inupedia/spotlight-protocol": "0.5.15"
96
96
  },
97
97
  "peerDependencies": {
98
98
  "@inspira-ui/plugins": "^0.0.2",