@blade-hq/agent-kit 0.5.21 → 0.5.23

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.
@@ -1218,6 +1218,7 @@ declare class AgentSocket {
1218
1218
  private socket;
1219
1219
  private subscribedSession;
1220
1220
  private readonly previewArtifactsByToolCall;
1221
+ private readonly deliveredBridgeKeys;
1221
1222
  private readonly pendingReplayMessages;
1222
1223
  private readonly pendingReplayModes;
1223
1224
  private readonly oomNotifiedKeys;
@@ -1794,7 +1795,11 @@ interface HostBridgeStateSnapshot {
1794
1795
  activeSessionId: string | null;
1795
1796
  isStreaming: boolean;
1796
1797
  }
1798
+ type BladeBridgeHandler = (envelope: BladeBridgeEnvelope) => void;
1797
1799
  declare function isInsideIframe(): boolean;
1800
+ declare function subscribeBladeBridge(handler: BladeBridgeHandler): () => void;
1801
+ declare function dispatchBladeBridge(envelope: BladeBridgeEnvelope): void;
1802
+ declare function postToParent(envelope: BladeBridgeEnvelope): void;
1798
1803
  declare function attachHostBridgeListener(getState: () => HostBridgeStateSnapshot): () => void;
1799
1804
 
1800
1805
  interface UiMeta {
@@ -1807,6 +1812,8 @@ interface UiMeta {
1807
1812
  }
1808
1813
  declare function isUiMeta(value: unknown): value is UiMeta;
1809
1814
 
1815
+ declare const BRIDGE_ACTIONS: readonly ["addContext", "appendInput", "sendMessage"];
1816
+ type ResourceBridgeAction = (typeof BRIDGE_ACTIONS)[number];
1810
1817
  interface ResourceBridgeDispatchParams {
1811
1818
  sessionId: string;
1812
1819
  activeSessionId: string | null;
@@ -2176,4 +2183,4 @@ interface UiBridgeState extends ClientAwareState {
2176
2183
  }
2177
2184
  declare const useUiBridgeStore: zustand.UseBoundStore<zustand.StoreApi<UiBridgeState>>;
2178
2185
 
2179
- export { type ActiveRightTab, type AnalyticsEventName, ApiKeyCreateResponse, ApiKeyPublic, type ArchitectureNode, type ArchitecturePayload, type ArchitectureVersion, type ArchitectureVersionListItem, BackgroundTask, BizRole, type BladeBridgeEnvelope, 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, ResourceIframe, RuntimeConfig, type RuntimeEvent, Scene, SceneStatus, ScheduledTask, ScheduledTaskCalendarItem, ScheduledTaskCalendarItem as ScheduledTaskCalendarItemData, type ScheduledTaskCreatePayload, ScheduledTask as ScheduledTaskData, ScheduledTaskRun, ScheduledTaskRun as ScheduledTaskRunData, type ScheduledTaskUpdatePayload, SessionDetail, type SessionExtraInfo, 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, buildHtmlElementSelectionContext, buildMessageContent, buildSessionBinaryPreviewTarget, buildStepRanges, buildVoiceInputUnavailableError, cardRegistry, cn, copyToClipboard, createResourceApi, databaseApi, deriveDeprecateEntryIds, 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, prodSolution as prodSolutionApi, publishSkill, publishedApps as publishedAppsApi, resolveEffectiveTheme, resolveSessionFilePreviewTarget, resourceBridgeDispatch, scenarios as scenariosApi, scheduledTasks as scheduledTasksApi, sessions as sessionsApi, setAnalyticsClient, setOnWorkspaceFilesChanged, skillMentionSuggestionKey, skills as skillsApi, softwareFactory as softwareFactoryApi, solutions as solutionsApi, toolApi, trackEvent, transformSlashCommand, uploadFiles, 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 };
2186
+ 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, SessionDetail, type SessionExtraInfo, 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, 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, resourceBridgeDispatch, scenarios as scenariosApi, scheduledTasks as scheduledTasksApi, sessions as sessionsApi, setAnalyticsClient, setOnWorkspaceFilesChanged, skillMentionSuggestionKey, skills as skillsApi, softwareFactory as softwareFactoryApi, solutions as solutionsApi, subscribeBladeBridge, toolApi, trackEvent, transformSlashCommand, uploadFiles, 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-SKCCDOY2.js";
33
+ } from "../chunk-PRWPDK6Z.js";
34
34
  import {
35
35
  CardCodeBlock,
36
36
  CardContext,
@@ -39,18 +39,19 @@ import {
39
39
  normalizeCodeLanguage,
40
40
  useCardContext,
41
41
  useHighlightedCodeHtml
42
- } from "../chunk-HLRMETK7.js";
42
+ } from "../chunk-LI3WURWU.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-QJG7TK2W.js";
49
+ } from "../chunk-SLTENCW7.js";
50
+ import "../chunk-H62LH2AG.js";
50
51
  import {
51
52
  buildSessionBinaryPreviewTarget,
52
53
  resolveSessionFilePreviewTarget
53
- } from "../chunk-YJ7GDLMH.js";
54
+ } from "../chunk-NWKF2VEC.js";
54
55
  import {
55
56
  PartnerSkillFile,
56
57
  PartnerSkillInstallPayload,
@@ -69,6 +70,7 @@ import {
69
70
  auth_exports,
70
71
  bootstrapBladeClient,
71
72
  buildMessageContent,
73
+ dispatchBladeBridge,
72
74
  getAuthedUrl,
73
75
  getBaseUrl,
74
76
  getBootstrappedClient,
@@ -82,12 +84,14 @@ import {
82
84
  isUiMeta,
83
85
  listSkills,
84
86
  partner_skill_exports,
87
+ postToParent,
85
88
  resolveEffectiveTheme,
86
89
  resourceBridgeDispatch,
87
90
  sessions_exports,
88
91
  setAnalyticsClient,
89
92
  setOnWorkspaceFilesChanged,
90
93
  skills_exports,
94
+ subscribeBladeBridge,
91
95
  trackEvent,
92
96
  transformSlashCommand,
93
97
  uploadFiles,
@@ -102,7 +106,7 @@ import {
102
106
  useTaskStore,
103
107
  useUiBridgeStore,
104
108
  useUiStore
105
- } from "../chunk-RNSHL4GA.js";
109
+ } from "../chunk-B4RZNR3L.js";
106
110
  import "../chunk-J3XVFPOV.js";
107
111
  import {
108
112
  REGISTRY_PREFIX,
@@ -1867,6 +1871,7 @@ export {
1867
1871
  createResourceApi,
1868
1872
  databaseApi,
1869
1873
  deriveDeprecateEntryIds,
1874
+ dispatchBladeBridge,
1870
1875
  env_buckets_exports as envBucketsApi,
1871
1876
  formatFileSize,
1872
1877
  getAuthedUrl,
@@ -1889,6 +1894,7 @@ export {
1889
1894
  normalizeResource,
1890
1895
  parseWhatIfPrompt,
1891
1896
  partner_skill_exports as partnerSkillApi,
1897
+ postToParent,
1892
1898
  prod_solution_exports as prodSolutionApi,
1893
1899
  publishSkill,
1894
1900
  published_apps_exports as publishedAppsApi,
@@ -1906,6 +1912,7 @@ export {
1906
1912
  software_factory_exports as softwareFactoryApi,
1907
1913
  solutions_exports as solutionsApi,
1908
1914
  splitFilesBySize,
1915
+ subscribeBladeBridge,
1909
1916
  toolApi,
1910
1917
  trackEvent,
1911
1918
  transformSlashCommand,