@inupedia/spotlight-vue 0.3.6 → 0.4.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.
- package/README.md +7 -89
- package/dist/assets/spotlight-vue.css +1 -1
- package/dist/components/SpotlightCommandPanel.vue.d.ts.map +1 -1
- package/dist/components/SpotlightCommandPanel.vue.js +1 -1
- package/dist/components/SpotlightCommandPanel2.vue.js +88 -85
- package/dist/components/SpotlightRoot.vue.d.ts.map +1 -1
- package/dist/components/SpotlightRoot.vue.js +21 -19
- package/dist/components/SpotlightThinking.vue.d.ts +3 -0
- package/dist/components/SpotlightThinking.vue.d.ts.map +1 -1
- package/dist/components/SpotlightThinking.vue.js +1 -1
- package/dist/components/SpotlightThinking2.vue.js +459 -398
- package/dist/composables/useSpotlightPanelUi.d.ts +3 -1
- package/dist/composables/useSpotlightPanelUi.d.ts.map +1 -1
- package/dist/composables/useSpotlightPanelUi.js +8 -3
- package/dist/config.d.ts +9 -18
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -10
- package/dist/env.d.ts +11 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +14 -0
- package/dist/index.d.ts +3 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +92 -126
- package/dist/plugin.d.ts +6 -5
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +35 -35
- package/dist/remote/hostToolRunner.d.ts +1 -1
- package/dist/remote/hostToolRunner.d.ts.map +1 -1
- package/dist/remote/hostToolRunner.js +38 -20
- package/dist/remote/runPipeline.d.ts +3 -12
- package/dist/remote/runPipeline.d.ts.map +1 -1
- package/dist/remote/runPipeline.js +165 -181
- package/dist/remote/types.d.ts +2 -0
- package/dist/remote/types.d.ts.map +1 -1
- package/dist/skills/skillPaths.js +5 -18
- package/dist/store/memoryPreferenceCopy.d.ts +6 -0
- package/dist/store/memoryPreferenceCopy.d.ts.map +1 -0
- package/dist/store/memoryPreferenceCopy.js +14 -0
- package/dist/store/memoryResultCopy.d.ts +6 -0
- package/dist/store/memoryResultCopy.d.ts.map +1 -0
- package/dist/store/memoryResultCopy.js +12 -0
- package/dist/store/spotlightStore.d.ts +78 -12
- package/dist/store/spotlightStore.d.ts.map +1 -1
- package/dist/store/spotlightStore.js +130 -124
- package/package.json +4 -8
- package/dist/composables/useSpotlightHostCore.d.ts +0 -8
- package/dist/composables/useSpotlightHostCore.d.ts.map +0 -1
- package/dist/composables/useSpotlightHostCore.js +0 -24
- package/dist/createSpotlight.d.ts +0 -38
- package/dist/createSpotlight.d.ts.map +0 -1
- package/dist/createSpotlight.js +0 -79
- package/dist/host/capabilityHost.d.ts +0 -38
- package/dist/host/capabilityHost.d.ts.map +0 -1
- package/dist/host/capabilityHost.js +0 -81
- package/dist/host/defineApp.d.ts +0 -16
- package/dist/host/defineApp.d.ts.map +0 -1
- package/dist/host/defineApp.js +0 -26
- package/dist/host/defineHost.d.ts +0 -55
- package/dist/host/defineHost.d.ts.map +0 -1
- package/dist/host/defineHost.js +0 -54
- package/dist/host/normalizeSkills.d.ts +0 -4
- package/dist/host/normalizeSkills.d.ts.map +0 -1
- package/dist/host/normalizeSkills.js +0 -10
- package/dist/host/skillExecution.d.ts +0 -9
- package/dist/host/skillExecution.d.ts.map +0 -1
- package/dist/host/skillExecution.js +0 -13
- package/dist/resolveConfig.d.ts +0 -21
- package/dist/resolveConfig.d.ts.map +0 -1
- package/dist/resolveConfig.js +0 -13
- package/dist/workflow/createOperateDefinition.d.ts +0 -22
- package/dist/workflow/createOperateDefinition.d.ts.map +0 -1
- package/dist/workflow/createOperateDefinition.js +0 -31
- package/dist/workflow/index.d.ts +0 -6
- package/dist/workflow/index.d.ts.map +0 -1
- package/dist/workflow/index.js +0 -20
- package/dist/workflow/operate.d.ts +0 -23
- package/dist/workflow/operate.d.ts.map +0 -1
- package/dist/workflow/operate.js +0 -95
- package/dist/workflow/runHostTool.d.ts +0 -4
- package/dist/workflow/runHostTool.d.ts.map +0 -1
- package/dist/workflow/runHostTool.js +0 -12
- package/dist/workflow/sessionControl.d.ts +0 -30
- package/dist/workflow/sessionControl.d.ts.map +0 -1
- package/dist/workflow/sessionControl.js +0 -112
- package/dist/workflow/shared.d.ts +0 -6
- package/dist/workflow/shared.d.ts.map +0 -1
- package/dist/workflow/shared.js +0 -14
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
+
import type { SpotlightMemoryDecision } from "@inupedia/spotlight-protocol";
|
|
2
3
|
export type SpotlightPanelUiState = "idle" | "running" | "done" | "error";
|
|
3
4
|
export type UseSpotlightPanelUiOptions = {
|
|
4
5
|
pipelinePhase: Ref<string>;
|
|
@@ -8,6 +9,7 @@ export type UseSpotlightPanelUiOptions = {
|
|
|
8
9
|
entryId: string;
|
|
9
10
|
kind: string;
|
|
10
11
|
} | null>;
|
|
12
|
+
memoryDecision?: Ref<SpotlightMemoryDecision | null>;
|
|
11
13
|
voiceHoldActive?: Ref<boolean>;
|
|
12
14
|
speechPending?: Ref<boolean>;
|
|
13
15
|
voiceKeyLabel?: string;
|
|
@@ -15,6 +17,6 @@ export type UseSpotlightPanelUiOptions = {
|
|
|
15
17
|
export declare function useSpotlightPanelUi(options: UseSpotlightPanelUiOptions): {
|
|
16
18
|
uiState: import("vue").ComputedRef<SpotlightPanelUiState>;
|
|
17
19
|
placeholder: import("vue").ComputedRef<string>;
|
|
18
|
-
badgeLabel: import("vue").ComputedRef<
|
|
20
|
+
badgeLabel: import("vue").ComputedRef<string>;
|
|
19
21
|
};
|
|
20
22
|
//# sourceMappingURL=useSpotlightPanelUi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSpotlightPanelUi.d.ts","sourceRoot":"","sources":["../../src/composables/useSpotlightPanelUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"useSpotlightPanelUi.d.ts","sourceRoot":"","sources":["../../src/composables/useSpotlightPanelUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1E,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,YAAY,CAAC,EAAE,GAAG,CAAC;QACjB,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;QACzC,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,IAAI,CAAC,CAAC;IACV,cAAc,CAAC,EAAE,GAAG,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IACrD,eAAe,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;;EAyDtE"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { computed as u } from "vue";
|
|
2
|
-
function
|
|
3
|
-
const n = e.voiceKeyLabel ?? "`", r = u(() => e.pipelinePhase.value === "error" ? "error" : e.loading.value || e.pipelinePhase.value === "running" ? "running" : e.pipelinePhase.value === "done" ? "done" : "idle"), l = u(() => e.voiceHoldActive?.value ? `正在录音,松开 ${n} 结束并转写…` : e.speechPending?.value ? "语音识别中,请稍候…" : r.value === "running" ? "Agent 正在分析场景、路由工具和上下文…" : r.value === "done" ? "继续追问,或者换个角度继续盘它…" : r.value === "error" ? "刚才那轮跑岔了,换个问法再试试…" : "输入问题或从下方选择历史…"), a = u(() => e.voiceHoldActive?.value ? "语音录制中" : e.speechPending?.value ? "语音识别中" : r.value === "running" ? "Agent 执行中" : r.value === "done" ? e.
|
|
2
|
+
function v(e) {
|
|
3
|
+
const n = e.voiceKeyLabel ?? "`", r = u(() => e.pipelinePhase.value === "error" ? "error" : e.loading.value || e.pipelinePhase.value === "running" ? "running" : e.pipelinePhase.value === "done" ? "done" : "idle"), l = u(() => e.voiceHoldActive?.value ? `正在录音,松开 ${n} 结束并转写…` : e.speechPending?.value ? "语音识别中,请稍候…" : r.value === "running" ? "Agent 正在分析场景、路由工具和上下文…" : r.value === "done" ? "继续追问,或者换个角度继续盘它…" : r.value === "error" ? "刚才那轮跑岔了,换个问法再试试…" : "输入问题或从下方选择历史…"), a = u(() => e.voiceHoldActive?.value ? "语音录制中" : e.speechPending?.value ? "语音识别中" : r.value === "running" ? "Agent 执行中" : r.value === "done" ? e.memoryDecision?.value ? {
|
|
4
|
+
reuse: "已复用项目记忆",
|
|
5
|
+
augment: "已结合项目记忆",
|
|
6
|
+
refresh: "已重新验证资料",
|
|
7
|
+
ignore: "已完成"
|
|
8
|
+
}[e.memoryDecision.value.action] : e.memoryReplay?.value ? e.memoryReplay.value.source === "semantic" ? "语义缓存命中" : "Memory 缓存命中" : "已完成" : r.value === "error" ? "执行异常" : "等待提问");
|
|
4
9
|
return { uiState: r, placeholder: l, badgeLabel: a };
|
|
5
10
|
}
|
|
6
11
|
export {
|
|
7
|
-
|
|
12
|
+
v as useSpotlightPanelUi
|
|
8
13
|
};
|
package/dist/config.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { AgentUiContext, SpotlightCommandCatalog, SpotlightCommandCatalogVideoChannel, SpotlightSkill } from "@inupedia/spotlight-protocol";
|
|
2
|
-
import type {
|
|
3
|
-
import type { RemoteHostToolCall } from "@inupedia/spotlight-protocol";
|
|
4
|
-
import type { HandlerApi } from "./store/pipeline/types.js";
|
|
2
|
+
import type { ClientTool, SpotlightClientConfig } from "@inupedia/spotlight-client";
|
|
5
3
|
import type { SpotlightUiPrompts } from "./remote/meta.js";
|
|
6
4
|
import type { ToolResult } from "./types/toolResult.js";
|
|
7
|
-
import type { SpotlightConfigInput } from "./resolveConfig.js";
|
|
8
|
-
export type { SpotlightConfigInput } from "./resolveConfig.js";
|
|
9
|
-
export type SpotlightHostServicesRegistration = Partial<Pick<SpotlightConfig, "tools" | "getUiContext" | "catalogOverlay" | "videoChannels" | "onVideoChannelsLoaded" | "uiPromptsFallback" | "runSessionHostTool" | "runHostTool" | "quickPanelActions" | "getSuggestedQuestions">>;
|
|
10
5
|
export type SpotlightConfig = SpotlightClientConfig & {
|
|
11
|
-
/**
|
|
12
|
-
tools:
|
|
6
|
+
/** Browser tools registered with defineClientTool(). */
|
|
7
|
+
tools: ClientTool[] | (() => ClientTool[]);
|
|
8
|
+
/** Immutable frontend build identifier used to bind the production manifest. */
|
|
9
|
+
frontendBuildId?: string;
|
|
13
10
|
/** Skills sent on each create-run (metadata only; bodies loaded server-side). */
|
|
14
11
|
skills?: SpotlightSkill[] | (() => SpotlightSkill[]);
|
|
15
12
|
/** Preferred: host resolves bundled + inline skills per run. */
|
|
@@ -24,11 +21,7 @@ export type SpotlightConfig = SpotlightClientConfig & {
|
|
|
24
21
|
uiPromptsFallback?: SpotlightUiPrompts;
|
|
25
22
|
/** Per-run UI context reported to server. */
|
|
26
23
|
getUiContext?: () => AgentUiContext;
|
|
27
|
-
/**
|
|
28
|
-
runSessionHostTool?: (call: RemoteHostToolCall, api: HandlerApi) => Promise<Awaited<ReturnType<SessionHostToolHandler>>>;
|
|
29
|
-
/** Host-side tool runner for domain workflows (e.g. operate). */
|
|
30
|
-
runHostTool?: (name: string, input: Record<string, unknown>) => Promise<ToolResult<unknown>>;
|
|
31
|
-
/** Optional legacy quick actions wired into handler API. */
|
|
24
|
+
/** Optional UI-only quick actions. */
|
|
32
25
|
quickPanelActions?: SpotlightQuickPanelActions;
|
|
33
26
|
/** Override suggested question chips (defaults use server ui-prompts). */
|
|
34
27
|
getSuggestedQuestions?: (params: {
|
|
@@ -36,19 +29,17 @@ export type SpotlightConfig = SpotlightClientConfig & {
|
|
|
36
29
|
smallTab?: string | null;
|
|
37
30
|
activeTarget?: string | null;
|
|
38
31
|
}) => string[];
|
|
39
|
-
/** Host operate domain executor (usually from defineSpotlightHost). */
|
|
40
|
-
executeOperateWorkflow?: (ctx: import("./store/pipeline/types.js").SpotlightContext, api: HandlerApi) => Promise<void>;
|
|
41
32
|
};
|
|
42
33
|
export type SpotlightQuickPanelActions = {
|
|
43
34
|
triggerProgressAction?: () => Promise<ToolResult<void>>;
|
|
44
35
|
triggerSimulationProgressAction?: () => Promise<ToolResult<void>>;
|
|
45
36
|
};
|
|
46
|
-
/** Validate
|
|
47
|
-
export declare function defineSpotlightConfig(input:
|
|
37
|
+
/** Validate a flat Client Tool configuration. */
|
|
38
|
+
export declare function defineSpotlightConfig(input: SpotlightConfig): SpotlightConfig;
|
|
48
39
|
export declare const SPOTLIGHT_CONFIG_KEY: unique symbol;
|
|
49
40
|
import type { SpotlightAvatarConfig } from "./avatar/config.js";
|
|
50
41
|
export type SpotlightVuePluginOptions = {
|
|
51
|
-
config:
|
|
42
|
+
config: SpotlightConfig;
|
|
52
43
|
/** Mount command panel + thinking UI (default: true). */
|
|
53
44
|
enabled?: boolean;
|
|
54
45
|
/** Enable digital-human overlay, ⌘/Ctrl+L, and answer TTS (default: false). */
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,mCAAmC,EACnC,cAAc,EACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,mCAAmC,EACnC,cAAc,EACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG;IACpD,wDAAwD;IACxD,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,UAAU,EAAE,CAAC,CAAC;IAC3C,gFAAgF;IAChF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iFAAiF;IACjF,MAAM,CAAC,EAAE,cAAc,EAAE,GAAG,CAAC,MAAM,cAAc,EAAE,CAAC,CAAC;IACrD,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,cAAc,EAAE,CAAC;IACzC,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,uBAAuB,GAAG,IAAI,GAAG,SAAS,CAAC;IAClE,gFAAgF;IAChF,aAAa,CAAC,EAAE,mCAAmC,EAAE,CAAC;IACtD,wEAAwE;IACxE,qBAAqB,CAAC,EAAE,CACtB,QAAQ,EAAE,mCAAmC,EAAE,KAC5C,IAAI,CAAC;IACV,0DAA0D;IAC1D,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,cAAc,CAAC;IACpC,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAC/C,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE;QAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;QACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,KAAK,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,qBAAqB,CAAC,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACxD,+BAA+B,CAAC,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;CACnE,CAAC;AAEF,iDAAiD;AACjD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAkB7E;AAED,eAAO,MAAM,oBAAoB,eAA6B,CAAC;AAE/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,EAAE,eAAe,CAAC;IACxB,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const o = "host" in r || "services" in r || "skills" in r ? i(r) : r;
|
|
1
|
+
function i(t) {
|
|
2
|
+
const o = t;
|
|
4
3
|
if (!o.projectId?.trim())
|
|
5
4
|
throw new Error("Spotlight config: projectId is required");
|
|
6
5
|
if (!o.serverUrl?.trim())
|
|
7
6
|
throw new Error("Spotlight config: serverUrl is required");
|
|
8
7
|
if (!o.tools)
|
|
9
|
-
throw new Error("Spotlight config: tools are required
|
|
8
|
+
throw new Error("Spotlight config: tools are required");
|
|
10
9
|
if (typeof o.tools != "function") {
|
|
11
|
-
const
|
|
12
|
-
if (!Array.isArray(
|
|
13
|
-
throw new Error("Spotlight config: at least one
|
|
10
|
+
const r = o.tools;
|
|
11
|
+
if (!Array.isArray(r) || r.length === 0)
|
|
12
|
+
throw new Error("Spotlight config: at least one client tool is required");
|
|
14
13
|
}
|
|
15
14
|
return o;
|
|
16
15
|
}
|
|
17
|
-
const
|
|
16
|
+
const e = /* @__PURE__ */ Symbol("spotlight-config");
|
|
18
17
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
e as SPOTLIGHT_CONFIG_KEY,
|
|
19
|
+
i as defineSpotlightConfig
|
|
21
20
|
};
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SpotlightEnvDefaults = {
|
|
2
|
+
serverUrl?: string;
|
|
3
|
+
projectId?: string;
|
|
4
|
+
};
|
|
5
|
+
/** Read standard Vite env vars for Spotlight server connection. */
|
|
6
|
+
export declare function readSpotlightEnv(env: Record<string, string | undefined>, defaults?: SpotlightEnvDefaults): {
|
|
7
|
+
serverUrl: string;
|
|
8
|
+
apiKey: string | undefined;
|
|
9
|
+
projectId: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,mEAAmE;AACnE,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,QAAQ,GAAE,oBAAyB;;;;EAWpC"}
|
package/dist/env.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function i(r, t = {}) {
|
|
2
|
+
return {
|
|
3
|
+
serverUrl: String(
|
|
4
|
+
r.VITE_SPOTLIGHT_SERVER_URL ?? t.serverUrl ?? "/spotlight-api"
|
|
5
|
+
),
|
|
6
|
+
apiKey: String(r.VITE_SPOTLIGHT_API_KEY ?? "").trim() || void 0,
|
|
7
|
+
projectId: String(
|
|
8
|
+
r.VITE_SPOTLIGHT_PROJECT_ID ?? t.projectId ?? ""
|
|
9
|
+
).trim()
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
i as readSpotlightEnv
|
|
14
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
export { defineSpotlightConfig, SPOTLIGHT_CONFIG_KEY, type SpotlightConfig, type
|
|
2
|
-
export {
|
|
3
|
-
export { defineSpotlightApp, readSpotlightEnv, type DefineSpotlightAppOptions, type SpotlightEnvDefaults, } from "./host/defineApp.js";
|
|
4
|
-
export { defineSpotlightHost, type DefineSpotlightHostOptions, type SpotlightHostFactory, type SpotlightHostSkillsInput, } from "./host/defineHost.js";
|
|
5
|
-
export { defineSpotlightCapabilityHost, type DefineSpotlightCapabilityHostOptions, } from "./host/capabilityHost.js";
|
|
6
|
-
export { getDefaultSpotlightHostCore, useSpotlightAction, useSpotlightReadable, type UseSpotlightHostCoreOptions, } from "./composables/useSpotlightHostCore.js";
|
|
7
|
-
export { normalizeSkillsOption, type SpotlightHostSkillsOption, } from "./host/normalizeSkills.js";
|
|
1
|
+
export { defineSpotlightConfig, SPOTLIGHT_CONFIG_KEY, type SpotlightConfig, type SpotlightQuickPanelActions, type SpotlightVuePluginOptions, } from "./config.js";
|
|
2
|
+
export { readSpotlightEnv, type SpotlightEnvDefaults, } from "./env.js";
|
|
8
3
|
export { mergeSpotlightSkills } from "./host/mergeSkills.js";
|
|
9
|
-
export { getSpotlightConfig,
|
|
4
|
+
export { getSpotlightConfig, getSpotlightClientTools, getSpotlightHttp, SpotlightVue, SPOTLIGHT_CLIENT_TOOLS_KEY, SPOTLIGHT_HTTP_KEY, } from "./plugin.js";
|
|
10
5
|
export { useSpotlightStore, SpotlightIntent, SPOTLIGHT_INTENT_LABELS, ProgressSubIntent, PROGRESS_SUB_INTENT_LABELS, InvestmentSubIntent, INVESTMENT_SUB_INTENT_LABELS, QualitySubIntent, QUALITY_SUB_INTENT_LABELS, SafetySubIntent, SAFETY_SUB_INTENT_LABELS, SUB_INTENT_CONFIG, type AgentStep, type IntentWithReason, type SubIntentConfig, type SpotlightSkillPermissionRequest, } from "./store/spotlightStore.js";
|
|
11
6
|
export { SpotlightCommandDomain, SpotlightCommandScope, type SpotlightCommand, type SpotlightCommandAction, type SpotlightCommandTarget, } from "./store/types.js";
|
|
12
7
|
export { useSpotlightRuntimeStore } from "./store/runtimeStore.js";
|
|
@@ -28,14 +23,8 @@ export { useSpotlightPanelUi } from "./composables/useSpotlightPanelUi.js";
|
|
|
28
23
|
export { useSpotlightCommandShortcuts } from "./composables/useSpotlightCommandShortcuts.js";
|
|
29
24
|
export { isGenericHostExecutionReply } from "./avatar/speech/live2dAnswerSpeechPolicy.js";
|
|
30
25
|
export type { SpotlightAvatarConfig } from "./avatar/config.js";
|
|
31
|
-
export { buildCommonWorkflowSteps, buildCommonSteps, COMMON_WORKFLOW_STEPS, } from "./workflow/shared.js";
|
|
32
|
-
export { runHostTool } from "./workflow/runHostTool.js";
|
|
33
|
-
export { buildOperateWorkflowSteps, createOperateExecutor, isOperateWorkflowContext, type OperateToolCall, type OperateWorkflowDefinition, } from "./workflow/operate.js";
|
|
34
|
-
export { createOperateDefinition, type CreateOperateDefinitionOptions, type OperateActionBinding, } from "./workflow/createOperateDefinition.js";
|
|
35
|
-
export { buildRepeatLastAnswerContext, buildOperateCommandContext, buildSessionControlWorkflowSteps, createRunSessionHostTool, createSessionControlExecutor, type ExecuteOperateWorkflow, type SessionControlHooksFactory, type SessionControlWorkflowHooks, } from "./workflow/sessionControl.js";
|
|
36
26
|
export type { ToolResult, ToolTraceEvent } from "./types/toolResult.js";
|
|
37
27
|
export type { SessionControlIntent } from "./types/session.js";
|
|
38
28
|
export type { HandlerApi, SpotlightContext } from "./store/pipeline/types.js";
|
|
39
29
|
export type { SpotlightVideoChannelId } from "./store/types.js";
|
|
40
|
-
export { createSpotlight, SPOTLIGHT_CAPABILITY_RUNTIME_KEY, type CreateSpotlightOptionsV1, type SpotlightCapabilityRuntimeV1, type SpotlightPluginV1, } from "./createSpotlight.js";
|
|
41
30
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -1,131 +1,97 @@
|
|
|
1
1
|
import { SPOTLIGHT_CONFIG_KEY as e, defineSpotlightConfig as r } from "./config.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { useSpotlightCommandShortcuts as zt } from "./composables/useSpotlightCommandShortcuts.js";
|
|
29
|
-
import { isGenericHostExecutionReply as Jt } from "./avatar/speech/live2dAnswerSpeechPolicy.js";
|
|
30
|
-
import { COMMON_WORKFLOW_STEPS as jt, buildCommonSteps as qt, buildCommonWorkflowSteps as Xt } from "./workflow/shared.js";
|
|
31
|
-
import { runHostTool as $t } from "./workflow/runHostTool.js";
|
|
32
|
-
import { buildOperateWorkflowSteps as oo, createOperateExecutor as eo, isOperateWorkflowContext as ro } from "./workflow/operate.js";
|
|
33
|
-
import { createOperateDefinition as io } from "./workflow/createOperateDefinition.js";
|
|
34
|
-
import { buildOperateCommandContext as no, buildRepeatLastAnswerContext as So, buildSessionControlWorkflowSteps as so, createRunSessionHostTool as mo, createSessionControlExecutor as go } from "./workflow/sessionControl.js";
|
|
35
|
-
import { SPOTLIGHT_CAPABILITY_RUNTIME_KEY as To, createSpotlight as fo } from "./createSpotlight.js";
|
|
36
|
-
import { formatSkillsWithinBudget as ho } from "./skills/skillListing.js";
|
|
37
|
-
import { getBypassMatchedSkills as Eo, getModelInvokableSkills as _o } from "./skills/matching.js";
|
|
38
|
-
import { parseSpotlightSkillMarkdown as Lo } from "./skills/parser.js";
|
|
2
|
+
import { readSpotlightEnv as n } from "./env.js";
|
|
3
|
+
import { mergeSpotlightSkills as i } from "./host/mergeSkills.js";
|
|
4
|
+
import { SPOTLIGHT_CLIENT_TOOLS_KEY as g, SPOTLIGHT_HTTP_KEY as T, SpotlightVue as m, getSpotlightClientTools as s, getSpotlightConfig as a, getSpotlightHttp as h } from "./plugin.js";
|
|
5
|
+
import { useSpotlightStore as f } from "./store/spotlightStore.js";
|
|
6
|
+
import { INVESTMENT_SUB_INTENT_LABELS as I, InvestmentSubIntent as _, PROGRESS_SUB_INTENT_LABELS as u, ProgressSubIntent as L, QUALITY_SUB_INTENT_LABELS as d, QualitySubIntent as P, SAFETY_SUB_INTENT_LABELS as N, SPOTLIGHT_INTENT_LABELS as c, SUB_INTENT_CONFIG as C, SafetySubIntent as O, SpotlightCommandDomain as k, SpotlightCommandScope as B, SpotlightIntent as A } from "./store/types.js";
|
|
7
|
+
import { useSpotlightRuntimeStore as w } from "./store/runtimeStore.js";
|
|
8
|
+
import { useAgentSessionStore as R } from "./session/agentSession.js";
|
|
9
|
+
import { readSpotlightMemoryEnabled as U, useSpotlightMemoryPreferenceStore as b } from "./store/memoryPreferenceStore.js";
|
|
10
|
+
import { getSkillsPoolForRun as F, loadBundledSkillsFromGlob as K } from "./skills/index.js";
|
|
11
|
+
import { cancelRemoteSpotlightRunForSignal as Y, runRemoteSpotlightPipeline as z, warmupSpotlightRemoteContext as D } from "./remote/runPipeline.js";
|
|
12
|
+
import { ensureSpotlightMeta as J, getSpotlightUiPrompts as V } from "./remote/meta.js";
|
|
13
|
+
import { extractTranscriptionText as j, normalizeSpeakText as q, spotlightSynthesizeSpeech as X, spotlightTranscribeAudio as Z } from "./remote/audio.js";
|
|
14
|
+
import { getSpotlightJson as tt, postSpotlightJson as ot } from "./remote/serverJson.js";
|
|
15
|
+
import { TOOL_NAMES as rt } from "./constants/toolNames.js";
|
|
16
|
+
import { TOOL_STEP_ANSWER_DELIMITER as nt, composeToolStepContent as pt, getIntentStepDisplayContent as it, humanizeSpotlightStepContent as lt, isLoopPlanningChunk as gt, isToolExecutionStep as Tt, sanitizeToolStepAnswerText as mt, splitIntentStepContent as st, splitToolStepContent as at } from "./store/pipeline/displayText.js";
|
|
17
|
+
import { isInternalKnowledgeEvidenceTool as Et, isUserFacingKnowledgeTool as ft, partitionToolCalls as xt } from "./store/pipeline/toolDisplay.js";
|
|
18
|
+
import { SPOTLIGHT_PIPELINE_STEP_IDS as _t, SPOTLIGHT_PIPELINE_STEP_LABELS as ut } from "./store/pipeline/constants.js";
|
|
19
|
+
import { formatSpotlightKnowledgeMarkdown as dt, initSpotlightMarkdownPreview as Pt, preprocessKnowledgeMarkdown as Nt } from "./store/pipeline/spotlightMarkdown.js";
|
|
20
|
+
import { formatToolFailure as Ct } from "./store/pipeline/errors.js";
|
|
21
|
+
import { getSuggestedQuestions as kt } from "./store/capabilities.js";
|
|
22
|
+
import { useSpotlightPanelUi as At } from "./composables/useSpotlightPanelUi.js";
|
|
23
|
+
import { useSpotlightCommandShortcuts as wt } from "./composables/useSpotlightCommandShortcuts.js";
|
|
24
|
+
import { isGenericHostExecutionReply as Rt } from "./avatar/speech/live2dAnswerSpeechPolicy.js";
|
|
25
|
+
import { formatSkillsWithinBudget as Ut } from "./skills/skillListing.js";
|
|
26
|
+
import { getBypassMatchedSkills as yt, getModelInvokableSkills as Ft } from "./skills/matching.js";
|
|
27
|
+
import { parseSpotlightSkillMarkdown as vt } from "./skills/parser.js";
|
|
39
28
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
To as SPOTLIGHT_CAPABILITY_RUNTIME_KEY,
|
|
29
|
+
I as INVESTMENT_SUB_INTENT_LABELS,
|
|
30
|
+
_ as InvestmentSubIntent,
|
|
31
|
+
u as PROGRESS_SUB_INTENT_LABELS,
|
|
32
|
+
L as ProgressSubIntent,
|
|
33
|
+
d as QUALITY_SUB_INTENT_LABELS,
|
|
34
|
+
P as QualitySubIntent,
|
|
35
|
+
N as SAFETY_SUB_INTENT_LABELS,
|
|
36
|
+
g as SPOTLIGHT_CLIENT_TOOLS_KEY,
|
|
49
37
|
e as SPOTLIGHT_CONFIG_KEY,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Xt as buildCommonWorkflowSteps,
|
|
65
|
-
no as buildOperateCommandContext,
|
|
66
|
-
oo as buildOperateWorkflowSteps,
|
|
67
|
-
So as buildRepeatLastAnswerContext,
|
|
68
|
-
so as buildSessionControlWorkflowSteps,
|
|
69
|
-
ot as cancelRemoteSpotlightRunForSignal,
|
|
70
|
-
_t as composeToolStepContent,
|
|
71
|
-
io as createOperateDefinition,
|
|
72
|
-
eo as createOperateExecutor,
|
|
73
|
-
mo as createRunSessionHostTool,
|
|
74
|
-
go as createSessionControlExecutor,
|
|
75
|
-
fo as createSpotlight,
|
|
76
|
-
n as defineSpotlightApp,
|
|
77
|
-
a as defineSpotlightCapabilityHost,
|
|
38
|
+
T as SPOTLIGHT_HTTP_KEY,
|
|
39
|
+
c as SPOTLIGHT_INTENT_LABELS,
|
|
40
|
+
_t as SPOTLIGHT_PIPELINE_STEP_IDS,
|
|
41
|
+
ut as SPOTLIGHT_PIPELINE_STEP_LABELS,
|
|
42
|
+
C as SUB_INTENT_CONFIG,
|
|
43
|
+
O as SafetySubIntent,
|
|
44
|
+
k as SpotlightCommandDomain,
|
|
45
|
+
B as SpotlightCommandScope,
|
|
46
|
+
A as SpotlightIntent,
|
|
47
|
+
m as SpotlightVue,
|
|
48
|
+
rt as TOOL_NAMES,
|
|
49
|
+
nt as TOOL_STEP_ANSWER_DELIMITER,
|
|
50
|
+
Y as cancelRemoteSpotlightRunForSignal,
|
|
51
|
+
pt as composeToolStepContent,
|
|
78
52
|
r as defineSpotlightConfig,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
lt as
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
x as useSpotlightAction,
|
|
124
|
-
zt as useSpotlightCommandShortcuts,
|
|
125
|
-
q as useSpotlightMemoryPreferenceStore,
|
|
126
|
-
Yt as useSpotlightPanelUi,
|
|
127
|
-
h as useSpotlightReadable,
|
|
128
|
-
z as useSpotlightRuntimeStore,
|
|
129
|
-
k as useSpotlightStore,
|
|
130
|
-
rt as warmupSpotlightRemoteContext
|
|
53
|
+
J as ensureSpotlightMeta,
|
|
54
|
+
j as extractTranscriptionText,
|
|
55
|
+
Ut as formatSkillsWithinBudget,
|
|
56
|
+
dt as formatSpotlightKnowledgeMarkdown,
|
|
57
|
+
Ct as formatToolFailure,
|
|
58
|
+
yt as getBypassMatchedSkills,
|
|
59
|
+
it as getIntentStepDisplayContent,
|
|
60
|
+
Ft as getModelInvokableSkills,
|
|
61
|
+
F as getSkillsPoolForRun,
|
|
62
|
+
s as getSpotlightClientTools,
|
|
63
|
+
a as getSpotlightConfig,
|
|
64
|
+
h as getSpotlightHttp,
|
|
65
|
+
tt as getSpotlightJson,
|
|
66
|
+
V as getSpotlightUiPrompts,
|
|
67
|
+
kt as getSuggestedQuestions,
|
|
68
|
+
lt as humanizeSpotlightStepContent,
|
|
69
|
+
Pt as initSpotlightMarkdownPreview,
|
|
70
|
+
Rt as isGenericHostExecutionReply,
|
|
71
|
+
Et as isInternalKnowledgeEvidenceTool,
|
|
72
|
+
gt as isLoopPlanningChunk,
|
|
73
|
+
Tt as isToolExecutionStep,
|
|
74
|
+
ft as isUserFacingKnowledgeTool,
|
|
75
|
+
K as loadBundledSkillsFromGlob,
|
|
76
|
+
i as mergeSpotlightSkills,
|
|
77
|
+
q as normalizeSpeakText,
|
|
78
|
+
vt as parseSpotlightSkillMarkdown,
|
|
79
|
+
xt as partitionToolCalls,
|
|
80
|
+
ot as postSpotlightJson,
|
|
81
|
+
Nt as preprocessKnowledgeMarkdown,
|
|
82
|
+
n as readSpotlightEnv,
|
|
83
|
+
U as readSpotlightMemoryEnabled,
|
|
84
|
+
z as runRemoteSpotlightPipeline,
|
|
85
|
+
mt as sanitizeToolStepAnswerText,
|
|
86
|
+
st as splitIntentStepContent,
|
|
87
|
+
at as splitToolStepContent,
|
|
88
|
+
X as spotlightSynthesizeSpeech,
|
|
89
|
+
Z as spotlightTranscribeAudio,
|
|
90
|
+
R as useAgentSessionStore,
|
|
91
|
+
wt as useSpotlightCommandShortcuts,
|
|
92
|
+
b as useSpotlightMemoryPreferenceStore,
|
|
93
|
+
At as useSpotlightPanelUi,
|
|
94
|
+
w as useSpotlightRuntimeStore,
|
|
95
|
+
f as useSpotlightStore,
|
|
96
|
+
D as warmupSpotlightRemoteContext
|
|
131
97
|
};
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { InjectionKey } from "vue";
|
|
2
|
+
import { createClientToolRegistry, type SpotlightHttp } from "@inupedia/spotlight-client";
|
|
3
3
|
import { defineSpotlightConfig, SPOTLIGHT_CONFIG_KEY, type SpotlightConfig, type SpotlightVuePluginOptions } from "./config.js";
|
|
4
4
|
import type { SpotlightAvatarConfig } from "./avatar/config.js";
|
|
5
5
|
export declare const SPOTLIGHT_HTTP_KEY: InjectionKey<SpotlightHttp>;
|
|
6
|
-
export
|
|
6
|
+
export type SpotlightClientToolRegistry = ReturnType<typeof createClientToolRegistry>;
|
|
7
|
+
export declare const SPOTLIGHT_CLIENT_TOOLS_KEY: InjectionKey<SpotlightClientToolRegistry>;
|
|
7
8
|
export declare function getSpotlightConfig(): SpotlightConfig;
|
|
8
9
|
export declare function getSpotlightHttp(): SpotlightHttp;
|
|
9
|
-
export declare function
|
|
10
|
+
export declare function getSpotlightClientTools(): SpotlightClientToolRegistry;
|
|
10
11
|
/** Reset singletons (tests / HMR). */
|
|
11
12
|
export declare function resetSpotlightRuntimeForTests(): void;
|
|
12
13
|
export declare const SpotlightVue: {
|
|
13
|
-
install(
|
|
14
|
+
install(appValue: unknown, options: SpotlightVuePluginOptions): void;
|
|
14
15
|
};
|
|
15
16
|
export { defineSpotlightConfig, SPOTLIGHT_CONFIG_KEY, type SpotlightConfig, type SpotlightVuePluginOptions, type SpotlightAvatarConfig, };
|
|
16
17
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,YAAY,EAAE,MAAM,KAAK,CAAC;AAC7C,OAAO,EACL,wBAAwB,EAGxB,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC/B,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,aAAa,CACjC,CAAC;AAC3B,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACtF,eAAO,MAAM,0BAA0B,EAAE,YAAY,CAAC,2BAA2B,CAC/C,CAAC;AAMnC,wBAAgB,kBAAkB,IAAI,eAAe,CAOpD;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAMhD;AAED,wBAAgB,uBAAuB,IAAI,2BAA2B,CAOrE;AAED,sCAAsC;AACtC,wBAAgB,6BAA6B,IAAI,IAAI,CAKpD;AAED,eAAO,MAAM,YAAY;sBACL,OAAO,WAAW,yBAAyB,GAAG,IAAI;CAwBrE,CAAC;AAEF,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,GAC3B,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { createSpotlightHttp as
|
|
2
|
-
import { defineSpotlightConfig as
|
|
3
|
-
import { mountSpotlightShell as
|
|
4
|
-
const
|
|
5
|
-
let
|
|
6
|
-
function
|
|
7
|
-
if (!
|
|
1
|
+
import { createSpotlightHttp as g, createClientToolRegistry as p } from "@inupedia/spotlight-client";
|
|
2
|
+
import { defineSpotlightConfig as a, SPOTLIGHT_CONFIG_KEY as c } from "./config.js";
|
|
3
|
+
import { mountSpotlightShell as u, unmountSpotlightShellForTests as h } from "./mountShell.js";
|
|
4
|
+
const S = /* @__PURE__ */ Symbol("spotlight-http"), T = /* @__PURE__ */ Symbol("spotlight-client-tools");
|
|
5
|
+
let r = null, n = null, i = null;
|
|
6
|
+
function f() {
|
|
7
|
+
if (!r)
|
|
8
8
|
throw new Error(
|
|
9
9
|
"Spotlight is not installed. Call app.use(SpotlightVue, { config }) in main.ts"
|
|
10
10
|
);
|
|
11
|
-
return
|
|
12
|
-
}
|
|
13
|
-
function H() {
|
|
14
|
-
if (!l) {
|
|
15
|
-
const t = a();
|
|
16
|
-
l = s(t);
|
|
17
|
-
}
|
|
18
|
-
return l;
|
|
11
|
+
return r;
|
|
19
12
|
}
|
|
20
13
|
function E() {
|
|
21
|
-
if (!
|
|
22
|
-
const t =
|
|
23
|
-
|
|
14
|
+
if (!n) {
|
|
15
|
+
const t = f();
|
|
16
|
+
n = g(t);
|
|
24
17
|
}
|
|
25
|
-
return
|
|
18
|
+
return n;
|
|
26
19
|
}
|
|
27
20
|
function b() {
|
|
28
|
-
|
|
21
|
+
if (!i) {
|
|
22
|
+
const t = f(), o = typeof t.tools == "function" ? t.tools() : t.tools;
|
|
23
|
+
i = p(o);
|
|
24
|
+
}
|
|
25
|
+
return i;
|
|
26
|
+
}
|
|
27
|
+
function v() {
|
|
28
|
+
h(), r = null, n = null, i = null;
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
install(t,
|
|
32
|
-
const
|
|
33
|
-
if (!Array.isArray(
|
|
30
|
+
const y = {
|
|
31
|
+
install(t, o) {
|
|
32
|
+
const l = t, e = a(o.config), s = typeof e.tools == "function" ? e.tools() : e.tools;
|
|
33
|
+
if (!Array.isArray(s) || s.length === 0)
|
|
34
34
|
throw new Error(
|
|
35
|
-
"Spotlight config: at least one
|
|
35
|
+
"Spotlight config: at least one client tool is required after tools() resolves"
|
|
36
36
|
);
|
|
37
|
-
|
|
37
|
+
r = e, n = g(e), i = p(s), l.provide(c, e), l.provide(S, n), l.provide(T, i), l.config.globalProperties.$spotlightEnabled = o.enabled !== !1, l.config.globalProperties.$spotlightAvatarEnabled = o.avatarEnabled === !0, u(l, o);
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
T as SPOTLIGHT_CLIENT_TOOLS_KEY,
|
|
42
|
+
c as SPOTLIGHT_CONFIG_KEY,
|
|
43
|
+
S as SPOTLIGHT_HTTP_KEY,
|
|
44
|
+
y as SpotlightVue,
|
|
45
|
+
a as defineSpotlightConfig,
|
|
46
|
+
b as getSpotlightClientTools,
|
|
47
|
+
f as getSpotlightConfig,
|
|
48
|
+
E as getSpotlightHttp,
|
|
49
|
+
v as resetSpotlightRuntimeForTests
|
|
50
50
|
};
|
|
@@ -2,7 +2,7 @@ import type { HostToolEffect, HostToolExecutionResult, RemoteHostToolCall } from
|
|
|
2
2
|
import type { HandlerApi } from "../store/pipeline/types.js";
|
|
3
3
|
import type { ToolResult } from "../types/toolResult.js";
|
|
4
4
|
export type RemoteToolCall = RemoteHostToolCall;
|
|
5
|
-
export declare function ensureHostToolsManifest(signal?: AbortSignal): Promise<import("@inupedia/spotlight-protocol").
|
|
5
|
+
export declare function ensureHostToolsManifest(signal?: AbortSignal): Promise<import("@inupedia/spotlight-protocol").FrontendToolManifestV1>;
|
|
6
6
|
export declare function executeRemoteHostTool(call: RemoteToolCall, api: HandlerApi, options: {
|
|
7
7
|
allowedHostNames: Set<string>;
|
|
8
8
|
hostEffect?: HostToolEffect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostToolRunner.d.ts","sourceRoot":"","sources":["../../src/remote/hostToolRunner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hostToolRunner.d.ts","sourceRoot":"","sources":["../../src/remote/hostToolRunner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAEhD,wBAAsB,uBAAuB,CAAC,MAAM,CAAC,EAAE,WAAW,0EAYjE;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,UAAU,EACf,OAAO,EAAE;IAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,UAAU,CAAC,EAAE,cAAc,CAAA;CAAE,GACtE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CA6B9B;AAED,YAAY,EAAE,uBAAuB,EAAE,CAAC"}
|