@inupedia/spotlight-vue 0.2.7 → 0.2.8

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,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAc7D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAmb9D,wBAAsB,4BAA4B,CAChD,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CAKf;AAwCD,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,2BAA2B,CAAC,CA+FtC;AAED,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,MAAM,iBAQ3D;AAED,wBAAgB,iCAAiC,CAAC,MAAM,CAAC,EAAE,WAAW,QAMrE"}
1
+ {"version":3,"file":"runPipeline.d.ts","sourceRoot":"","sources":["../../src/remote/runPipeline.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAc7D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAmb9D,wBAAsB,4BAA4B,CAChD,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CAKf;AAyCD,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,2BAA2B,CAAC,CA+FtC;AAED,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,MAAM,iBAQ3D;AAED,wBAAgB,iCAAiC,CAAC,MAAM,CAAC,EAAE,WAAW,QAMrE"}
@@ -6,7 +6,7 @@ import { useSpotlightRuntimeStore as L } from "../store/runtimeStore.js";
6
6
  import { SPOTLIGHT_PIPELINE_STEP_IDS as r } from "../store/pipeline/constants.js";
7
7
  import { isLoopPlanningChunk as $, splitIntentStepContent as O, splitToolStepContent as H, composeToolStepContent as M } from "../store/pipeline/displayText.js";
8
8
  import { getSpotlightConfig as F } from "../plugin.js";
9
- import { executeRemoteHostTool as q, ensureHostToolsManifest as _ } from "./hostToolRunner.js";
9
+ import { executeRemoteHostTool as q, ensureHostToolsManifest as b } from "./hostToolRunner.js";
10
10
  import { getSpotlightServerBase as g, buildSpotlightJsonHeaders as y, getSpotlightProjectId as J } from "./httpConfig.js";
11
11
  import { ensureSpotlightMeta as W } from "./meta.js";
12
12
  const h = /* @__PURE__ */ new WeakMap();
@@ -86,7 +86,7 @@ function V(e, t, o) {
86
86
  s.resultText
87
87
  );
88
88
  }
89
- function d(e, t) {
89
+ function p(e, t) {
90
90
  if (t !== r.tool) return;
91
91
  const o = e.getSteps().find((s) => s.id === t);
92
92
  !o || o.status === "active" || o.status === "done" || e.setStep(t, "active", o.content);
@@ -122,15 +122,15 @@ async function Y(e, t) {
122
122
  o,
123
123
  e.getSteps().find((a) => a.id === o)?.status ?? "active",
124
124
  s
125
- ) : (d(e, o), e.appendChunkToStep(o, s), await j());
125
+ ) : (p(e, o), e.appendChunkToStep(o, s), await j());
126
126
  } else if (t.type === "step_artifact")
127
- i(e, t.stepId, w(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);
127
+ i(e, t.stepId, w(t.stepId, t.label)), p(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);
128
128
  else if (t.type === "tool_start")
129
- i(e, r.tool, "执行工具与回答"), d(e, r.tool), e.appendToolCallsToStep(r.tool, [
129
+ i(e, r.tool, "执行工具与回答"), p(e, r.tool), e.appendToolCallsToStep(r.tool, [
130
130
  G(t)
131
131
  ]);
132
132
  else if (t.type === "tool_progress")
133
- i(e, r.tool, "执行工具与回答"), d(e, r.tool), e.appendToolCallsToStep(r.tool, [
133
+ i(e, r.tool, "执行工具与回答"), p(e, r.tool), e.appendToolCallsToStep(r.tool, [
134
134
  {
135
135
  id: t.call.id,
136
136
  name: t.call.name,
@@ -141,7 +141,7 @@ async function Y(e, t) {
141
141
  }
142
142
  ]);
143
143
  else if (t.type === "tool_result")
144
- i(e, r.tool, "执行工具与回答"), d(e, r.tool), e.appendToolCallsToStep(r.tool, [
144
+ i(e, r.tool, "执行工具与回答"), p(e, r.tool), e.appendToolCallsToStep(r.tool, [
145
145
  z(t)
146
146
  ]), t.result.attachments?.length && e.appendAttachmentsToStep(
147
147
  r.tool,
@@ -221,12 +221,12 @@ function X(e) {
221
221
  }
222
222
  async function ut(e) {
223
223
  await Promise.allSettled([
224
- _(e),
224
+ b(e),
225
225
  W(e)
226
226
  ]);
227
227
  }
228
228
  async function Z(e, t) {
229
- const o = R(), s = L(), a = A(), n = await _(t);
229
+ const o = R(), s = L(), a = A(), n = await b(t);
230
230
  return {
231
231
  hostManifest: n,
232
232
  payload: {
@@ -245,7 +245,8 @@ async function Z(e, t) {
245
245
  lastAssistantReply: o.getLastAssistantContent(),
246
246
  invokedSkills: o.invokedSkills,
247
247
  skillPermissionGrants: o.skillPermissionGrants,
248
- memoryEnabled: a.enabled
248
+ memoryReadEnabled: a.enabled,
249
+ memoryWriteEnabled: !0
249
250
  },
250
251
  runtimeState: {
251
252
  activeDomain: s.activeDomain,
@@ -259,27 +260,27 @@ async function Z(e, t) {
259
260
  }
260
261
  };
261
262
  }
262
- async function pt(e, t) {
263
+ async function dt(e, t) {
263
264
  const o = g(), s = t.getSignal(), { payload: a, hostManifest: n } = await Z(
264
265
  e,
265
266
  s
266
- ), c = new Set(n.tools.map((p) => p.name)), u = await fetch(`${o}/v1/runs`, {
267
+ ), c = new Set(n.tools.map((d) => d.name)), u = await fetch(`${o}/v1/runs`, {
267
268
  method: "POST",
268
269
  headers: y(),
269
270
  body: JSON.stringify(a),
270
271
  signal: s
271
272
  });
272
273
  if (!u.ok) {
273
- const p = await u.text().catch(() => "");
274
+ const d = await u.text().catch(() => "");
274
275
  throw new Error(
275
- `Spotlight 后端创建 run 失败:${u.status} ${p}`
276
+ `Spotlight 后端创建 run 失败:${u.status} ${d}`
276
277
  );
277
278
  }
278
279
  const { runId: m } = await u.json();
279
280
  s && (h.set(s, m), s.addEventListener(
280
281
  "abort",
281
282
  () => {
282
- b(m);
283
+ _(m);
283
284
  },
284
285
  { once: !0 }
285
286
  ));
@@ -296,8 +297,8 @@ async function pt(e, t) {
296
297
  let S = "", C = null;
297
298
  try {
298
299
  for (; ; ) {
299
- const { done: p, value: N } = await T.read();
300
- if (p) break;
300
+ const { done: d, value: N } = await T.read();
301
+ if (d) break;
301
302
  S += P.decode(N, { stream: !0 });
302
303
  const I = X(S);
303
304
  S = I.rest;
@@ -334,7 +335,7 @@ async function pt(e, t) {
334
335
  usedLegacyFallback: C?.usedQueryLoop ?? !0
335
336
  };
336
337
  }
337
- async function b(e) {
338
+ async function _(e) {
338
339
  await fetch(
339
340
  `${g()}/v1/runs/${encodeURIComponent(e)}`,
340
341
  {
@@ -343,14 +344,14 @@ async function b(e) {
343
344
  }
344
345
  );
345
346
  }
346
- function dt(e) {
347
+ function pt(e) {
347
348
  if (!e) return;
348
349
  const t = h.get(e);
349
- t && (h.delete(e), b(t));
350
+ t && (h.delete(e), _(t));
350
351
  }
351
352
  export {
352
- b as cancelRemoteSpotlightRun,
353
- dt as cancelRemoteSpotlightRunForSignal,
354
- pt as runRemoteSpotlightPipeline,
353
+ _ as cancelRemoteSpotlightRun,
354
+ pt as cancelRemoteSpotlightRunForSignal,
355
+ dt as runRemoteSpotlightPipeline,
355
356
  ut as warmupSpotlightRemoteContext
356
357
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inupedia/spotlight-vue",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Vue plugin and config entry for Inupedia Spotlight (monorepo workspace package)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -95,8 +95,8 @@
95
95
  "dependencies": {
96
96
  "prettier": "^3.8.1",
97
97
  "yaml": "^2.8.4",
98
- "@inupedia/spotlight-client": "0.2.7",
99
- "@inupedia/spotlight-protocol": "0.2.7"
98
+ "@inupedia/spotlight-client": "0.2.8",
99
+ "@inupedia/spotlight-protocol": "0.2.8"
100
100
  },
101
101
  "peerDependencies": {
102
102
  "@inspira-ui/plugins": "^0.0.2",