@blade-hq/agent-kit 0.5.31 → 0.5.32

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,6 +1,6 @@
1
1
  import {
2
2
  useSessionStore
3
- } from "./chunk-OPMRX65X.js";
3
+ } from "./chunk-QMOW3TDA.js";
4
4
 
5
5
  // src/react/hooks/use-session.ts
6
6
  function useSession() {
@@ -27,4 +27,4 @@ function useSession() {
27
27
  export {
28
28
  useSession
29
29
  };
30
- //# sourceMappingURL=chunk-4XBNTPVS.js.map
30
+ //# sourceMappingURL=chunk-YPFIWC45.js.map
@@ -1139,6 +1139,29 @@ interface paths {
1139
1139
  patch?: never;
1140
1140
  trace?: never;
1141
1141
  };
1142
+ "/api/sessions/{session_id}/preview-pdf/{file_path}": {
1143
+ parameters: {
1144
+ query?: never;
1145
+ header?: never;
1146
+ path?: never;
1147
+ cookie?: never;
1148
+ };
1149
+ /**
1150
+ * Preview As Pdf
1151
+ * @description 将 Office 文件(Visio 等)在沙盒内用 soffice 转为 PDF,供前端 PdfPreview 渲染。
1152
+ *
1153
+ * 转换结果按源文件 mtime+size 缓存,避免重复转换。
1154
+ * 需要沙盒镜像内安装 LibreOffice。
1155
+ */
1156
+ get: operations["preview_as_pdf_api_sessions__session_id__preview_pdf__file_path__get"];
1157
+ put?: never;
1158
+ post?: never;
1159
+ delete?: never;
1160
+ options?: never;
1161
+ head?: never;
1162
+ patch?: never;
1163
+ trace?: never;
1164
+ };
1142
1165
  "/api/sessions/{session_id}/upset_extra_info": {
1143
1166
  parameters: {
1144
1167
  query?: never;
@@ -1498,6 +1521,28 @@ interface paths {
1498
1521
  patch?: never;
1499
1522
  trace?: never;
1500
1523
  };
1524
+ "/api/solutions/ensure-from-registry": {
1525
+ parameters: {
1526
+ query?: never;
1527
+ header?: never;
1528
+ path?: never;
1529
+ cookie?: never;
1530
+ };
1531
+ get?: never;
1532
+ put?: never;
1533
+ /**
1534
+ * Ensure Solution From Registry
1535
+ * @description 本地无此 solution 时,按 org/name 从 skill_registry 下载并热加载注册。
1536
+ *
1537
+ * 返回本地 solution_id(= solution.yaml 的 id),前端据此建会话进对话页。
1538
+ */
1539
+ post: operations["ensure_solution_from_registry_api_solutions_ensure_from_registry_post"];
1540
+ delete?: never;
1541
+ options?: never;
1542
+ head?: never;
1543
+ patch?: never;
1544
+ trace?: never;
1545
+ };
1501
1546
  "/api/solutions": {
1502
1547
  parameters: {
1503
1548
  query?: never;
@@ -5085,6 +5130,11 @@ interface components {
5085
5130
  */
5086
5131
  bump: string;
5087
5132
  };
5133
+ /** EnsureFromRegistryRequest */
5134
+ EnsureFromRegistryRequest: {
5135
+ /** Registry Id */
5136
+ registry_id: string;
5137
+ };
5088
5138
  /** EnvBucket */
5089
5139
  EnvBucket: {
5090
5140
  /** Bucket */
@@ -8538,6 +8588,38 @@ interface operations {
8538
8588
  };
8539
8589
  };
8540
8590
  };
8591
+ preview_as_pdf_api_sessions__session_id__preview_pdf__file_path__get: {
8592
+ parameters: {
8593
+ query?: never;
8594
+ header?: never;
8595
+ path: {
8596
+ session_id: string;
8597
+ file_path: string;
8598
+ };
8599
+ cookie?: never;
8600
+ };
8601
+ requestBody?: never;
8602
+ responses: {
8603
+ /** @description Successful Response */
8604
+ 200: {
8605
+ headers: {
8606
+ [name: string]: unknown;
8607
+ };
8608
+ content: {
8609
+ "application/json": unknown;
8610
+ };
8611
+ };
8612
+ /** @description Validation Error */
8613
+ 422: {
8614
+ headers: {
8615
+ [name: string]: unknown;
8616
+ };
8617
+ content: {
8618
+ "application/json": components["schemas"]["HTTPValidationError"];
8619
+ };
8620
+ };
8621
+ };
8622
+ };
8541
8623
  upset_session_extra_info_api_sessions__session_id__upset_extra_info_post: {
8542
8624
  parameters: {
8543
8625
  query?: never;
@@ -9451,6 +9533,41 @@ interface operations {
9451
9533
  };
9452
9534
  };
9453
9535
  };
9536
+ ensure_solution_from_registry_api_solutions_ensure_from_registry_post: {
9537
+ parameters: {
9538
+ query?: never;
9539
+ header?: never;
9540
+ path?: never;
9541
+ cookie?: never;
9542
+ };
9543
+ requestBody: {
9544
+ content: {
9545
+ "application/json": components["schemas"]["EnsureFromRegistryRequest"];
9546
+ };
9547
+ };
9548
+ responses: {
9549
+ /** @description Successful Response */
9550
+ 200: {
9551
+ headers: {
9552
+ [name: string]: unknown;
9553
+ };
9554
+ content: {
9555
+ "application/json": {
9556
+ [key: string]: string;
9557
+ };
9558
+ };
9559
+ };
9560
+ /** @description Validation Error */
9561
+ 422: {
9562
+ headers: {
9563
+ [name: string]: unknown;
9564
+ };
9565
+ content: {
9566
+ "application/json": components["schemas"]["HTTPValidationError"];
9567
+ };
9568
+ };
9569
+ };
9570
+ };
9454
9571
  list_solutions_api_solutions_get: {
9455
9572
  parameters: {
9456
9573
  query?: never;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "../../chunk-OPMRX65X.js";
3
+ } from "../../chunk-QMOW3TDA.js";
4
4
  import "../../chunk-J3XVFPOV.js";
5
5
  import "../../chunk-ZWO6YBLA.js";
6
6
  import "../../chunk-JCJFFJ42.js";
@@ -16,14 +16,14 @@ import {
16
16
  isErrorMessage,
17
17
  isUserMessage,
18
18
  useWhatIfQuoteContext
19
- } from "../../../chunk-HFVB57MR.js";
19
+ } from "../../../chunk-FXEELOLI.js";
20
20
  import {
21
21
  AskUserQuestionBlock
22
- } from "../../../chunk-BUQRNLEE.js";
22
+ } from "../../../chunk-CFW62YND.js";
23
23
  import "../../../chunk-2UP7MG3J.js";
24
24
  import "../../../chunk-H62LH2AG.js";
25
- import "../../../chunk-KMQQDKGU.js";
26
- import "../../../chunk-OPMRX65X.js";
25
+ import "../../../chunk-EAZ7AGFY.js";
26
+ import "../../../chunk-QMOW3TDA.js";
27
27
  import "../../../chunk-J3XVFPOV.js";
28
28
  import "../../../chunk-ZWO6YBLA.js";
29
29
  import "../../../chunk-7LEKQI47.js";
@@ -3,10 +3,10 @@ import {
3
3
  PlanSummaryCard,
4
4
  extractLatestPlanMessages,
5
5
  parsePlanMessages
6
- } from "../../../chunk-BUQRNLEE.js";
6
+ } from "../../../chunk-CFW62YND.js";
7
7
  import "../../../chunk-2UP7MG3J.js";
8
- import "../../../chunk-KMQQDKGU.js";
9
- import "../../../chunk-OPMRX65X.js";
8
+ import "../../../chunk-EAZ7AGFY.js";
9
+ import "../../../chunk-QMOW3TDA.js";
10
10
  import "../../../chunk-J3XVFPOV.js";
11
11
  import "../../../chunk-ZWO6YBLA.js";
12
12
  import {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useSession
3
- } from "../../../chunk-4XBNTPVS.js";
3
+ } from "../../../chunk-YPFIWC45.js";
4
4
  import {
5
5
  checkoutSession,
6
6
  getSessionCheckpoints,
7
7
  useChatStore,
8
8
  useSessionStore
9
- } from "../../../chunk-OPMRX65X.js";
9
+ } from "../../../chunk-QMOW3TDA.js";
10
10
  import "../../../chunk-J3XVFPOV.js";
11
11
  import "../../../chunk-ZWO6YBLA.js";
12
12
  import {
@@ -5,7 +5,7 @@ import {
5
5
  } from "../../../chunk-H62LH2AG.js";
6
6
  import {
7
7
  resolveSessionFilePreviewTarget
8
- } from "../../../chunk-KMQQDKGU.js";
8
+ } from "../../../chunk-EAZ7AGFY.js";
9
9
  import {
10
10
  apiFetchText,
11
11
  copyFile,
@@ -19,7 +19,7 @@ import {
19
19
  useChatStore,
20
20
  useSessionStore,
21
21
  useUiStore
22
- } from "../../../chunk-OPMRX65X.js";
22
+ } from "../../../chunk-QMOW3TDA.js";
23
23
  import "../../../chunk-J3XVFPOV.js";
24
24
  import "../../../chunk-ZWO6YBLA.js";
25
25
  import {
@@ -1449,6 +1449,8 @@ declare const useUiStore: zustand.UseBoundStore<zustand.StoreApi<UiState>>;
1449
1449
 
1450
1450
  declare function buildBinaryPreviewTarget(fileUrl: string, downloadUrl: string, filePath: string, fileName?: string): PreviewTarget | null;
1451
1451
  declare function buildSessionBinaryPreviewTarget(sessionId: string, filePath: string, fileName?: string): PreviewTarget | null;
1452
+ /** 判断文件是否需要后端 soffice 转 PDF 才能预览 */
1453
+ declare function isOfficePdfPreviewable(fileName: string): boolean;
1452
1454
  declare function resolveTextPreviewType(fileName: string): PreviewTarget["type"];
1453
1455
  declare function resolveSessionFilePreviewTarget(sessionId: string, filePath: string, fileName?: string): Promise<PreviewTarget>;
1454
1456
 
@@ -2045,4 +2047,4 @@ interface UiBridgeState extends ClientAwareState {
2045
2047
  }
2046
2048
  declare const useUiBridgeStore: zustand.UseBoundStore<zustand.StoreApi<UiBridgeState>>;
2047
2049
 
2048
- export { type ActiveRightTab, type AnalyticsEventName, ApiKeyCreateResponse, ApiKeyPublic, type ArchitectureNode, type ArchitecturePayload, type ArchitectureVersion, type ArchitectureVersionListItem, BackgroundTask, BizRole, type BladeBridgeEnvelope, type BladeBridgeHandler, BladeClientOptions, BladeClientProvider, type BladeClientProviderProps, BladeContext, BladeHubScenarioResource, type BuildHtmlElementSelectionInput, type Card, CardCodeBlock, type CardComponent, type CardComponentProps, CardContext, CardJSON, type ChatEnd, ChatMessage, type ConnectionStatus, type ContentDelta, CreateQuickScenarioPayload, CreateSoftwareFactorySharedFilePayload, CreateSoftwareFactorySoftwarePayload, type DagPayload, type DagVersion, type DagVersionListItem, type DslStep, EnvBucket, EnvVariable, GisGoal, GisMapCommand, GisResource$1 as GisResource, GisState, GisTarget, GlobalSkillStats, type HtmlElementSelectionContext, type HtmlElementSelectionRaw, type HtmlSourceLocation, type HtmlSourceLocatorElement, InstalledRegistrySkill, type IssueAssigneeType, type IssuePriority, type IssueStatus, type LlmResponseDone, MarkdownContent, Memory, MemoryCreateBody, MemoryListParams, MemoryListResponse, MessageContent, ModelSelector, type MulticaAgent, type MulticaRuntime, PartnerSkillInstallPayload, PartnerSkillInstallPayload as PartnerSkillInstallPayloadData, PartnerSkillInstallResult, PartnerSkillInstallResult as PartnerSkillInstallResultData, PatchEnvelope, type PendingHtmlElementContext, PlatformEnvBucket, type PreviewTarget, PreviewUrlItem, type ProdAgentCatalogSolution, type ProdAgentPreviewUrl, type ProdAgentRecord, type ProdSolution, type ProdUser, type ProdUserTokenStatus, PublishedApp, PublishedAppListResponse, PublishedAppStatus, QuickScenario, RegistryResource, ResourceApi, ResourceBase, type ResourceBridgeAction, type ResourceBridgeDispatchParams, ResourceIframe, RuntimeConfig, type RuntimeEvent, Scene, SceneStatus, ScheduledTask, ScheduledTaskCalendarItem, ScheduledTaskCalendarItem as ScheduledTaskCalendarItemData, type ScheduledTaskCreatePayload, ScheduledTask as ScheduledTaskData, ScheduledTaskRun, ScheduledTaskRun as ScheduledTaskRunData, type ScheduledTaskUpdatePayload, SessionInfo, SessionSkillUploadPayload, SessionSkillUploadPayload as SessionSkillUploadPayloadData, SessionSkillUploadResult, SessionSkillUploadResult as SessionSkillUploadResultData, type SessionStatusEvent, SkillCompletionMenu, type SkillCompletionMenuRef, SkillDetail, SkillMention, SkillOrgListResponse, SkillSearchResult, type SkillSuggestionItem, SkillSummary, SoftwareFactorySharedFile, SoftwareFactorySoftware, Solution, type StepMessageRange, type SystemError, Task, type ToolCallCreated, type ToolResultDone, TurnProjection, type UiMeta, UnpublishAppResponse, UpdateQuickScenarioPayload, type UseTiptapVoiceInputOptions, type UseTiptapVoiceInputResult, type UseVoiceInputOptions, type UseVoiceInputResult, type UserWorkspace, type VoiceInputError, type VoiceInputStatus, VoiceWaveform, type WorkspaceIssue, type WorkspaceIssueTaskRun, type WorkspaceIssueTimelineEntry, type WorkspaceIssueUsageSummary, type WorkspaceMember, agentApi, agentSocket, apiFetch, apiFetchResponse, apiFetchText, apiKeys as apiKeysApi, attachClientToStores, attachHostBridgeListener, auth as authApi, bootstrapBladeClient, buildBinaryPreviewTarget, buildHtmlElementSelectionContext, buildMessageContent, buildSessionBinaryPreviewTarget, buildStepRanges, buildVoiceInputUnavailableError, cardRegistry, cn, copyToClipboard, createResourceApi, databaseApi, deriveDeprecateEntryIds, dispatchBladeBridge, envBuckets as envBucketsApi, getAuthedUrl, getBaseUrl, getBootstrappedClient, getClient, getCodeLanguageFromFilename, getSocket, getTextContent, gisApi, groupMessagesByLoop, isInsideIframe, isUiMeta, knowledgeApi, listSkillOrgs, locateHtmlElementSource, memories as memoriesApi, models as modelsApi, normalizeCodeLanguage, partnerSkill as partnerSkillApi, postToParent, prodSolution as prodSolutionApi, publishSkill, publishedApps as publishedAppsApi, resolveEffectiveTheme, resolveSessionFilePreviewTarget, resolveTextPreviewType, resourceBridgeDispatch, scenarios as scenariosApi, scheduledTasks as scheduledTasksApi, setAnalyticsClient, setOnWorkspaceFilesChanged, skillMentionSuggestionKey, skills as skillsApi, softwareFactory as softwareFactoryApi, solutions as solutionsApi, subscribeBladeBridge, toolApi, trackEvent, transformSlashCommand, useAgents, useAuthStore, useBackgroundStore, useBackgroundTasks, useBladeClient, useCardContext, useCardState, useCardStateStore, useChat, useChatStore, useCheckSkillFile, useConnectionStore, useDataSources, useGisState, useGisStore, useGlobalSkillStats, useHighlightedCodeHtml, useInputHistory, useKnowledgeBases, useModelConfig, usePreferredModel, useResolvedModel, useRuntimeConfig, useRuntimeFeaturesStore, useRuntimeStore, useSession, useSkills, useTaskStore, useTiptapVoiceInput, useToolProviders, useUiBridgeStore, useUiStore, useVoiceInput, userPreferences as userPreferencesApi };
2050
+ export { type ActiveRightTab, type AnalyticsEventName, ApiKeyCreateResponse, ApiKeyPublic, type ArchitectureNode, type ArchitecturePayload, type ArchitectureVersion, type ArchitectureVersionListItem, BackgroundTask, BizRole, type BladeBridgeEnvelope, type BladeBridgeHandler, BladeClientOptions, BladeClientProvider, type BladeClientProviderProps, BladeContext, BladeHubScenarioResource, type BuildHtmlElementSelectionInput, type Card, CardCodeBlock, type CardComponent, type CardComponentProps, CardContext, CardJSON, type ChatEnd, ChatMessage, type ConnectionStatus, type ContentDelta, CreateQuickScenarioPayload, CreateSoftwareFactorySharedFilePayload, CreateSoftwareFactorySoftwarePayload, type DagPayload, type DagVersion, type DagVersionListItem, type DslStep, EnvBucket, EnvVariable, GisGoal, GisMapCommand, GisResource$1 as GisResource, GisState, GisTarget, GlobalSkillStats, type HtmlElementSelectionContext, type HtmlElementSelectionRaw, type HtmlSourceLocation, type HtmlSourceLocatorElement, InstalledRegistrySkill, type IssueAssigneeType, type IssuePriority, type IssueStatus, type LlmResponseDone, MarkdownContent, Memory, MemoryCreateBody, MemoryListParams, MemoryListResponse, MessageContent, ModelSelector, type MulticaAgent, type MulticaRuntime, PartnerSkillInstallPayload, PartnerSkillInstallPayload as PartnerSkillInstallPayloadData, PartnerSkillInstallResult, PartnerSkillInstallResult as PartnerSkillInstallResultData, PatchEnvelope, type PendingHtmlElementContext, PlatformEnvBucket, type PreviewTarget, PreviewUrlItem, type ProdAgentCatalogSolution, type ProdAgentPreviewUrl, type ProdAgentRecord, type ProdSolution, type ProdUser, type ProdUserTokenStatus, PublishedApp, PublishedAppListResponse, PublishedAppStatus, QuickScenario, RegistryResource, ResourceApi, ResourceBase, type ResourceBridgeAction, type ResourceBridgeDispatchParams, ResourceIframe, RuntimeConfig, type RuntimeEvent, Scene, SceneStatus, ScheduledTask, ScheduledTaskCalendarItem, ScheduledTaskCalendarItem as ScheduledTaskCalendarItemData, type ScheduledTaskCreatePayload, ScheduledTask as ScheduledTaskData, ScheduledTaskRun, ScheduledTaskRun as ScheduledTaskRunData, type ScheduledTaskUpdatePayload, SessionInfo, SessionSkillUploadPayload, SessionSkillUploadPayload as SessionSkillUploadPayloadData, SessionSkillUploadResult, SessionSkillUploadResult as SessionSkillUploadResultData, type SessionStatusEvent, SkillCompletionMenu, type SkillCompletionMenuRef, SkillDetail, SkillMention, SkillOrgListResponse, SkillSearchResult, type SkillSuggestionItem, SkillSummary, SoftwareFactorySharedFile, SoftwareFactorySoftware, Solution, type StepMessageRange, type SystemError, Task, type ToolCallCreated, type ToolResultDone, TurnProjection, type UiMeta, UnpublishAppResponse, UpdateQuickScenarioPayload, type UseTiptapVoiceInputOptions, type UseTiptapVoiceInputResult, type UseVoiceInputOptions, type UseVoiceInputResult, type UserWorkspace, type VoiceInputError, type VoiceInputStatus, VoiceWaveform, type WorkspaceIssue, type WorkspaceIssueTaskRun, type WorkspaceIssueTimelineEntry, type WorkspaceIssueUsageSummary, type WorkspaceMember, agentApi, agentSocket, apiFetch, apiFetchResponse, apiFetchText, apiKeys as apiKeysApi, attachClientToStores, attachHostBridgeListener, auth as authApi, bootstrapBladeClient, buildBinaryPreviewTarget, buildHtmlElementSelectionContext, buildMessageContent, buildSessionBinaryPreviewTarget, buildStepRanges, buildVoiceInputUnavailableError, cardRegistry, cn, copyToClipboard, createResourceApi, databaseApi, deriveDeprecateEntryIds, dispatchBladeBridge, envBuckets as envBucketsApi, getAuthedUrl, getBaseUrl, getBootstrappedClient, getClient, getCodeLanguageFromFilename, getSocket, getTextContent, gisApi, groupMessagesByLoop, isInsideIframe, isOfficePdfPreviewable, isUiMeta, knowledgeApi, listSkillOrgs, locateHtmlElementSource, memories as memoriesApi, models as modelsApi, normalizeCodeLanguage, partnerSkill as partnerSkillApi, postToParent, prodSolution as prodSolutionApi, publishSkill, publishedApps as publishedAppsApi, resolveEffectiveTheme, resolveSessionFilePreviewTarget, resolveTextPreviewType, resourceBridgeDispatch, scenarios as scenariosApi, scheduledTasks as scheduledTasksApi, setAnalyticsClient, setOnWorkspaceFilesChanged, skillMentionSuggestionKey, skills as skillsApi, softwareFactory as softwareFactoryApi, solutions as solutionsApi, subscribeBladeBridge, toolApi, trackEvent, transformSlashCommand, useAgents, useAuthStore, useBackgroundStore, useBackgroundTasks, useBladeClient, useCardContext, useCardState, useCardStateStore, useChat, useChatStore, useCheckSkillFile, useConnectionStore, useDataSources, useGisState, useGisStore, useGlobalSkillStats, useHighlightedCodeHtml, useInputHistory, useKnowledgeBases, useModelConfig, usePreferredModel, useResolvedModel, useRuntimeConfig, useRuntimeFeaturesStore, useRuntimeStore, useSession, useSkills, useTaskStore, useTiptapVoiceInput, useToolProviders, useUiBridgeStore, useUiStore, useVoiceInput, userPreferences as userPreferencesApi };
@@ -30,7 +30,7 @@ import {
30
30
  useTiptapVoiceInput,
31
31
  useVoiceInput,
32
32
  user_preferences_exports
33
- } from "../chunk-HFVB57MR.js";
33
+ } from "../chunk-FXEELOLI.js";
34
34
  import {
35
35
  CardCodeBlock,
36
36
  CardContext,
@@ -39,21 +39,22 @@ import {
39
39
  normalizeCodeLanguage,
40
40
  useCardContext,
41
41
  useHighlightedCodeHtml
42
- } from "../chunk-BUQRNLEE.js";
42
+ } from "../chunk-CFW62YND.js";
43
43
  import {
44
44
  CardJSON,
45
45
  cardRegistry
46
46
  } from "../chunk-2UP7MG3J.js";
47
47
  import {
48
48
  useSession
49
- } from "../chunk-4XBNTPVS.js";
49
+ } from "../chunk-YPFIWC45.js";
50
50
  import "../chunk-H62LH2AG.js";
51
51
  import {
52
52
  buildBinaryPreviewTarget,
53
53
  buildSessionBinaryPreviewTarget,
54
+ isOfficePdfPreviewable,
54
55
  resolveSessionFilePreviewTarget,
55
56
  resolveTextPreviewType
56
- } from "../chunk-KMQQDKGU.js";
57
+ } from "../chunk-EAZ7AGFY.js";
57
58
  import {
58
59
  PartnerSkillFile,
59
60
  PartnerSkillInstallPayload,
@@ -108,7 +109,7 @@ import {
108
109
  useTaskStore,
109
110
  useUiBridgeStore,
110
111
  useUiStore
111
- } from "../chunk-OPMRX65X.js";
112
+ } from "../chunk-QMOW3TDA.js";
112
113
  import "../chunk-J3XVFPOV.js";
113
114
  import {
114
115
  REGISTRY_PREFIX,
@@ -1888,6 +1889,7 @@ export {
1888
1889
  groupMessagesByLoop,
1889
1890
  invalidateHomeSidebarSessions,
1890
1891
  isInsideIframe,
1892
+ isOfficePdfPreviewable,
1891
1893
  isUiMeta,
1892
1894
  knowledgeApi,
1893
1895
  listSkillOrgs,