@inupedia/spotlight-vue 0.5.12 → 0.5.14
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,MAA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C,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,OAAO,CAAC,uBAAuB,EAAE;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC,QAuErE;AAED,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,iBA4K5E;AA8CD,wBAAsB,4BAA4B,CAChD,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CAKf;AAmDD,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,UAAU,EACf,OAAO,CAAC,EAAE;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAE,GACzC,OAAO,CAAC,2BAA2B,CAAC,CA8FtC;AAED,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,MAAM,iBAQ3D;AAED,wBAAgB,iCAAiC,CAAC,MAAM,CAAC,EAAE,WAAW,QAMrE"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { serializeSkillsForRemote as
|
|
2
|
-
import { useAgentSessionStore as
|
|
3
|
-
import { useSpotlightMemoryPreferenceStore as
|
|
4
|
-
import { useSpotlightRuntimeStore as
|
|
1
|
+
import { serializeSkillsForRemote as M } from "@inupedia/spotlight-client";
|
|
2
|
+
import { useAgentSessionStore as R } from "../session/agentSession.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
|
|
7
|
-
import { getSpotlightConfig as
|
|
8
|
-
import { getSkillsPoolForRun as
|
|
9
|
-
import { executeRemoteHostTool as
|
|
10
|
-
import { getSpotlightServerBase as C, buildSpotlightJsonHeaders as
|
|
11
|
-
import { ensureSpotlightMeta as
|
|
6
|
+
import { isLoopPlanningChunk as H, splitIntentStepContent as O, splitToolStepContent as q, composeToolStepContent as D } from "../store/pipeline/displayText.js";
|
|
7
|
+
import { getSpotlightConfig as b } from "../plugin.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
|
|
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
|
|
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
|
-
function
|
|
108
|
+
function k(e, t) {
|
|
98
109
|
return t || (e === s.tool ? "执行工具与回答" : e);
|
|
99
110
|
}
|
|
100
|
-
function
|
|
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
|
|
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
|
|
189
|
+
async function v(e, t) {
|
|
179
190
|
if (t.type !== "ping") {
|
|
180
191
|
if (t.type === "step_sync")
|
|
181
192
|
e.setSteps(
|
|
@@ -190,22 +201,22 @@ 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 &&
|
|
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 } =
|
|
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
|
|
200
211
|
));
|
|
201
212
|
}
|
|
202
|
-
c(e, o,
|
|
213
|
+
c(e, o, k(o, t.label)), t.mode === "replace" ? e.setStep(
|
|
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
|
|
217
|
+
) : (d(e, o), e.appendChunkToStep(o, n), await P());
|
|
207
218
|
} else if (t.type === "step_artifact")
|
|
208
|
-
c(e, t.stepId,
|
|
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")
|
|
210
221
|
c(e, s.tool, "执行工具与回答"), d(e, s.tool), e.appendToolCallsToStep(s.tool, [
|
|
211
222
|
U(t)
|
|
@@ -251,7 +262,7 @@ async function Z(e, t) {
|
|
|
251
262
|
`
|
|
252
263
|
);
|
|
253
264
|
else if (t.type === "turn_transition")
|
|
254
|
-
|
|
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
|
-
|
|
283
|
+
X(e)
|
|
273
284
|
);
|
|
274
|
-
const o = e.getSteps().find((S) => S.id === s.tool), { planning: n, answer: r } =
|
|
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
|
-
|
|
291
|
+
D(n, l)
|
|
281
292
|
);
|
|
282
293
|
}
|
|
283
|
-
|
|
294
|
+
z(t) && e.appendExecutionEvent?.(t);
|
|
284
295
|
}
|
|
285
296
|
}
|
|
286
|
-
async function
|
|
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:
|
|
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
|
|
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,23 +324,23 @@ function tt(e) {
|
|
|
313
324
|
}
|
|
314
325
|
}), rest: o };
|
|
315
326
|
}
|
|
316
|
-
async function
|
|
327
|
+
async function ft(e) {
|
|
317
328
|
await Promise.allSettled([
|
|
318
329
|
N(),
|
|
319
|
-
|
|
330
|
+
W(e)
|
|
320
331
|
]);
|
|
321
332
|
}
|
|
322
|
-
async function
|
|
323
|
-
const 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:
|
|
338
|
+
projectId: j(),
|
|
328
339
|
sessionId: n.sessionId,
|
|
329
|
-
memorySubjectId:
|
|
340
|
+
memorySubjectId: b().getMemorySubjectId?.() ?? void 0,
|
|
330
341
|
userQuestion: e,
|
|
331
342
|
memoryRefreshRequested: o?.forceMemoryRefresh === !0,
|
|
332
|
-
uiContext:
|
|
343
|
+
uiContext: b().getUiContext?.() ?? {},
|
|
333
344
|
sessionState: {
|
|
334
345
|
sessionId: n.sessionId,
|
|
335
346
|
activeTaskId: n.activeTaskId,
|
|
@@ -341,6 +352,7 @@ async function et(e, t, o) {
|
|
|
341
352
|
lastAssistantReply: n.getLastAssistantContent(),
|
|
342
353
|
invokedSkills: n.invokedSkills,
|
|
343
354
|
skillPermissionGrants: n.skillPermissionGrants,
|
|
355
|
+
memoryEnabled: l.enabled,
|
|
344
356
|
memoryReadEnabled: l.enabled,
|
|
345
357
|
memoryWriteEnabled: !0
|
|
346
358
|
},
|
|
@@ -353,20 +365,20 @@ async function et(e, t, o) {
|
|
|
353
365
|
},
|
|
354
366
|
clientToolsManifestVersion: i.manifestDigest,
|
|
355
367
|
clientToolManifest: i,
|
|
356
|
-
skills:
|
|
368
|
+
skills: M(J()),
|
|
357
369
|
frontendBuildId: i.frontendBuildId,
|
|
358
370
|
manifestDigest: i.manifestDigest
|
|
359
371
|
}
|
|
360
372
|
};
|
|
361
373
|
}
|
|
362
|
-
async function
|
|
363
|
-
const n = C(), r = t.getSignal(), { payload: l, hostManifest: i } = await
|
|
374
|
+
async function gt(e, t, o) {
|
|
375
|
+
const n = C(), r = t.getSignal(), { payload: l, hostManifest: i } = await ot(
|
|
364
376
|
e,
|
|
365
377
|
r,
|
|
366
378
|
o
|
|
367
379
|
), S = new Set(i.tools.map((m) => m.name)), p = await fetch(`${n}/v1/runs`, {
|
|
368
380
|
method: "POST",
|
|
369
|
-
headers:
|
|
381
|
+
headers: y(),
|
|
370
382
|
body: JSON.stringify(l),
|
|
371
383
|
signal: r
|
|
372
384
|
});
|
|
@@ -380,36 +392,36 @@ async function ft(e, t, o) {
|
|
|
380
392
|
r && (T.set(r, f), r.addEventListener(
|
|
381
393
|
"abort",
|
|
382
394
|
() => {
|
|
383
|
-
|
|
395
|
+
x(f);
|
|
384
396
|
},
|
|
385
397
|
{ once: !0 }
|
|
386
398
|
));
|
|
387
|
-
const
|
|
399
|
+
const g = await fetch(
|
|
388
400
|
`${n}/v1/runs/${encodeURIComponent(f)}/events`,
|
|
389
401
|
{
|
|
390
|
-
headers:
|
|
402
|
+
headers: y(),
|
|
391
403
|
signal: r
|
|
392
404
|
}
|
|
393
405
|
);
|
|
394
|
-
if (!
|
|
395
|
-
throw new Error(`Spotlight 后端事件流连接失败:${
|
|
396
|
-
const I =
|
|
406
|
+
if (!g.ok || !g.body)
|
|
407
|
+
throw new Error(`Spotlight 后端事件流连接失败:${g.status}`);
|
|
408
|
+
const I = g.body.getReader(), E = new TextDecoder();
|
|
397
409
|
let h = "";
|
|
398
410
|
try {
|
|
399
411
|
for (; ; ) {
|
|
400
|
-
const { done: m, value:
|
|
412
|
+
const { done: m, value: A } = await I.read();
|
|
401
413
|
if (m) break;
|
|
402
|
-
h +=
|
|
403
|
-
const w =
|
|
414
|
+
h += E.decode(A, { stream: !0 });
|
|
415
|
+
const w = et(h);
|
|
404
416
|
h = w.rest;
|
|
405
417
|
for (const a of w.events) {
|
|
406
418
|
if (a.type === "host_action_request") {
|
|
407
419
|
Y(t, a.request.call);
|
|
408
|
-
const _ = await
|
|
420
|
+
const _ = await F(a.request.call, t, {
|
|
409
421
|
allowedHostNames: S,
|
|
410
422
|
hostEffect: a.request.hostEffect
|
|
411
423
|
});
|
|
412
|
-
K(t, a.request.call, _), await
|
|
424
|
+
K(t, a.request.call, _), await tt({
|
|
413
425
|
runId: f,
|
|
414
426
|
correlationId: a.request.correlationId,
|
|
415
427
|
result: _,
|
|
@@ -419,8 +431,8 @@ async function ft(e, t, o) {
|
|
|
419
431
|
}
|
|
420
432
|
if (a.type === "run_error")
|
|
421
433
|
throw new Error(a.error);
|
|
422
|
-
if (await
|
|
423
|
-
return a.sessionPatch &&
|
|
434
|
+
if (await v(t, a), await P(), a.type === "run_completed")
|
|
435
|
+
return a.sessionPatch && R().applySessionPatch(a.sessionPatch), {
|
|
424
436
|
command: null,
|
|
425
437
|
memoryReplay: a.memoryReplay ?? null,
|
|
426
438
|
memoryDecision: a.memoryDecision ?? null,
|
|
@@ -435,28 +447,28 @@ async function ft(e, t, o) {
|
|
|
435
447
|
command: null
|
|
436
448
|
};
|
|
437
449
|
}
|
|
438
|
-
async function
|
|
450
|
+
async function x(e) {
|
|
439
451
|
await fetch(
|
|
440
452
|
`${C()}/v1/runs/${encodeURIComponent(e)}`,
|
|
441
453
|
{
|
|
442
454
|
method: "DELETE",
|
|
443
|
-
headers:
|
|
455
|
+
headers: y()
|
|
444
456
|
}
|
|
445
457
|
);
|
|
446
458
|
}
|
|
447
459
|
function yt(e) {
|
|
448
460
|
if (!e) return;
|
|
449
461
|
const t = T.get(e);
|
|
450
|
-
t && (T.delete(e),
|
|
462
|
+
t && (T.delete(e), x(t));
|
|
451
463
|
}
|
|
452
464
|
export {
|
|
453
|
-
|
|
454
|
-
|
|
465
|
+
Z as applyLangGraphTransition,
|
|
466
|
+
v as applyRemoteEvent,
|
|
455
467
|
Y as beginHostToolCall,
|
|
456
|
-
|
|
468
|
+
x as cancelRemoteSpotlightRun,
|
|
457
469
|
yt as cancelRemoteSpotlightRunForSignal,
|
|
458
|
-
|
|
459
|
-
|
|
470
|
+
X as responseStepLabel,
|
|
471
|
+
gt as runRemoteSpotlightPipeline,
|
|
460
472
|
K as settleHostToolCall,
|
|
461
|
-
|
|
473
|
+
ft as warmupSpotlightRemoteContext
|
|
462
474
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolDisplay.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/toolDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"toolDisplay.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/toolDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,2BAA2B,aAStC,CAAC;AAEH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,mDAAmD;AACnD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAO/D;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErE;AAmBD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,iBAAiB,EAAE,GACzB,iBAAiB,EAAE,CA0BrB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG;IAC9D,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,eAAe,EAAE,iBAAiB,EAAE,CAAC;CACtC,CAYA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inupedia/spotlight-vue",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.14",
|
|
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.
|
|
95
|
-
"@inupedia/spotlight-protocol": "0.5.
|
|
94
|
+
"@inupedia/spotlight-client": "0.5.14",
|
|
95
|
+
"@inupedia/spotlight-protocol": "0.5.14"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@inspira-ui/plugins": "^0.0.2",
|