@blade-hq/agent-kit 0.4.10 → 0.4.11

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.
Files changed (33) hide show
  1. package/dist/{SkillStatusBar-BnDtYUf9.d.ts → SkillStatusBar-CHnXqybx.d.ts} +1 -1
  2. package/dist/{blade-client-n7fiBaFk.d.ts → blade-client-BfYaHLco.d.ts} +17 -1
  3. package/dist/{chunk-FYPS4SFF.js → chunk-3LCNDPP6.js} +2 -2
  4. package/dist/{chunk-5ZFK62RQ.js → chunk-4XID5JVK.js} +2 -2
  5. package/dist/{chunk-EDMS2G5P.js → chunk-CDSCC4OQ.js} +2 -2
  6. package/dist/{chunk-TYCA6WYX.js → chunk-O2BVC7QE.js} +26 -10
  7. package/dist/chunk-O2BVC7QE.js.map +1 -0
  8. package/dist/{chunk-EFNGK46B.js → chunk-PJJ3Y3DZ.js} +2 -2
  9. package/dist/{chunk-C3KSHIRA.js → chunk-VCCMO7G5.js} +14 -1
  10. package/dist/chunk-VCCMO7G5.js.map +1 -0
  11. package/dist/{chunk-CK7JMN5S.js → chunk-Z4FPELIQ.js} +2 -2
  12. package/dist/client/index.d.ts +95 -1
  13. package/dist/client/index.js +1 -1
  14. package/dist/{licenses-BZpFl0qG.d.ts → licenses-BGw5jiC4.d.ts} +1 -1
  15. package/dist/react/api/licenses.d.ts +2 -2
  16. package/dist/react/api/licenses.js +3 -3
  17. package/dist/react/api/vibe-coding.d.ts +2 -2
  18. package/dist/react/api/vibe-coding.js +2 -2
  19. package/dist/react/components/chat/index.d.ts +3 -3
  20. package/dist/react/components/chat/index.js +5 -5
  21. package/dist/react/components/plan/index.js +3 -3
  22. package/dist/react/components/session/index.js +3 -3
  23. package/dist/react/components/workspace/index.js +3 -3
  24. package/dist/react/index.d.ts +10 -6
  25. package/dist/react/index.js +7 -7
  26. package/package.json +1 -1
  27. package/dist/chunk-C3KSHIRA.js.map +0 -1
  28. package/dist/chunk-TYCA6WYX.js.map +0 -1
  29. /package/dist/{chunk-FYPS4SFF.js.map → chunk-3LCNDPP6.js.map} +0 -0
  30. /package/dist/{chunk-5ZFK62RQ.js.map → chunk-4XID5JVK.js.map} +0 -0
  31. /package/dist/{chunk-EDMS2G5P.js.map → chunk-CDSCC4OQ.js.map} +0 -0
  32. /package/dist/{chunk-EFNGK46B.js.map → chunk-PJJ3Y3DZ.js.map} +0 -0
  33. /package/dist/{chunk-CK7JMN5S.js.map → chunk-Z4FPELIQ.js.map} +0 -0
@@ -4,7 +4,7 @@ import { ComponentType, ReactNode } from 'react';
4
4
  import { C as ChatMessage, A as AskUserAnswerData, T as ToolCallInfo, M as MessageContent } from './AskUserQuestionBlock-CjvG_pUY.js';
5
5
  import * as zustand from 'zustand';
6
6
  import { M as ModeId, S as SessionInfo, a as SessionStatus } from './session-BKOc2lsz.js';
7
- import { m as BladeClient } from './blade-client-n7fiBaFk.js';
7
+ import { m as BladeClient } from './blade-client-BfYaHLco.js';
8
8
  import { C as ContentBlock } from './projection-DIfyh6RK.js';
9
9
 
10
10
  /**
@@ -986,6 +986,20 @@ declare class SolutionsResource {
986
986
  fetchSolutionBizRoles(solutionId: string, userId?: string): Promise<BizRole[]>;
987
987
  }
988
988
 
989
+ type ComputerUpgradeReason = "no_container" | "no_target" | "current_latest" | "up_to_date" | "upgrade_available";
990
+ interface ComputerUpgradeStatusResponse {
991
+ upgrade_available: boolean;
992
+ reason: ComputerUpgradeReason;
993
+ current_version: string | null;
994
+ target_version: string | null;
995
+ }
996
+ interface UpgradeComputerResponse {
997
+ target_version: string | null;
998
+ previous_version: string | null;
999
+ removed_containers: number;
1000
+ removed_volume: boolean;
1001
+ cleared_memo: number;
1002
+ }
989
1003
  declare class UserPreferencesResource {
990
1004
  private client;
991
1005
  constructor(client: BladeClient);
@@ -994,6 +1008,8 @@ declare class UserPreferencesResource {
994
1008
  getPersistentDefault(): Promise<boolean>;
995
1009
  setPersistentDefault(value: boolean): Promise<void>;
996
1010
  resetComputer(): Promise<void>;
1011
+ getComputerUpgradeStatus(): Promise<ComputerUpgradeStatusResponse>;
1012
+ upgradeComputer(): Promise<UpgradeComputerResponse>;
997
1013
  }
998
1014
 
999
1015
  interface PortMapping {
@@ -1553,4 +1569,4 @@ declare class BladeClient {
1553
1569
  private resolveToken;
1554
1570
  }
1555
1571
 
1556
- export { type PaginatedSessionsResult as $, type ApiKeyCreateResponse as A, BladeApiError as B, type CreateVibeCodingSessionResult as C, type DeviceUuidResponse as D, type CreateSoftwareFactorySharedFilePayload as E, type CreateSoftwareFactorySoftwarePayload as F, type FileEntry as G, GisResource as H, type GlobalSkillStats as I, type HistoryNode as J, type HttpMethod as K, LicensesResource as L, type ImportPreview as M, type ImportPreviewScenario as N, type ImportPreviewSkill as O, type PortMapping as P, type InstalledRegistrySkill as Q, MemoriesResource as R, type Memory as S, type MemoryCreateBody as T, type UploadLicenseResponse as U, VibeCodingResource as V, type MemoryListParams as W, type MemoryListResponse as X, ModelOption as Y, ModelsConfig as Z, ModelsResource as _, type LicenseStatusResponse as a, McpToolConfig as a$, type PreviewUrlItem as a0, type ProvidersResponse as a1, type QuickScenario as a2, REGISTRY_PREFIX as a3, RegistryResource as a4, type ResourceApi as a5, ScenariosResource as a6, type ServerToClientEvents as a7, type SessionContextStats as a8, type SessionHistory as a9, type EnvBucket as aA, type PlatformEnvBucket as aB, type GisState as aC, type RuntimeConfig as aD, type SkillDetail as aE, type SkillStats as aF, type SkillSummary as aG, type SkillSearchResult as aH, PartnerSkillInstallPayload as aI, PartnerSkillInstallResult as aJ, SessionSkillUploadPayload as aK, SessionSkillUploadResult as aL, type BackgroundTask as aM, type GisGoal as aN, type GisResource$1 as aO, type GisTarget as aP, type GisMapCommand as aQ, Task as aR, AgentDriver as aS, AgentResource as aT, DatabaseDriver as aU, DatabaseResource as aV, DifyKnowledgeConfig as aW, type GisGoalStatus as aX, HttpToolConfig as aY, KnowledgeDriver as aZ, KnowledgeResource as a_, type SessionUpdatedPayload as aa, SessionsResource as ab, type ShareLinkResult as ac, type SkillDevSession as ad, type SkillOrgListResponse as ae, type SkillOrgOption as af, SkillsResource as ag, type SoftwareFactoryModuleBlueprint as ah, SoftwareFactoryResource as ai, type SoftwareFactorySharedFile as aj, type SoftwareFactorySoftware as ak, type SoftwareFactoryTopic as al, type SoftwareFactoryTopicModule as am, SolutionsResource as an, type SystemErrorPayload as ao, type SystemNotificationPayload as ap, type TokenizeResult as aq, type TurnProjectionPayload as ar, type TypedSocket as as, type UpdateQuickScenarioPayload as at, type UploadFileEntry as au, type UserInfo as av, UserPreferencesResource as aw, createSocket as ax, normalizeResource as ay, EnvBucketsResource as az, type LicenseValidateResponse as b, MysqlConfig as b0, type ParallelMode as b1, PartnerSkillFile as b2, PartnerSkillName as b3, PostgresqlConfig as b4, SessionSkillFile as b5, SessionSkillName as b6, type StageSpec as b7, type StepSpec as b8, TaskStatus as b9, ToolDriver as ba, ToolResource as bb, skillDisplayName as bc, type VibeCodingDeployStatus as c, type VibeCodingDebugSessionStatus as d, type VibeCodingSessionStatus as e, type VibeCodingDeployRecord as f, type VibeCodingSessionInfo as g, type CreateVibeCodingSessionParams as h, type DeployBumpMode as i, type ApiKeyPublic as j, ApiKeysResource as k, AuthResource as l, BladeClient as m, type BladeClientOptions as n, type BladeFetchInit as o, type BladeHubScenarioResource as p, type ChatEndPayload as q, type ChatSendPayload as r, type CheckpointNode as s, type ClientToServerEvents as t, type CodingTask as u, type CodingTaskTopic as v, type ContentPart as w, type CreateQuickScenarioPayload as x, type CreateSessionRequest as y, type CreateSocketOptions as z };
1572
+ export { ModelsConfig as $, type ApiKeyCreateResponse as A, BladeApiError as B, type CreateVibeCodingSessionResult as C, type DeviceUuidResponse as D, type CreateSessionRequest as E, type CreateSocketOptions as F, type CreateSoftwareFactorySharedFilePayload as G, type CreateSoftwareFactorySoftwarePayload as H, type FileEntry as I, GisResource as J, type GlobalSkillStats as K, LicensesResource as L, type HistoryNode as M, type HttpMethod as N, type ImportPreview as O, type PortMapping as P, type ImportPreviewScenario as Q, type ImportPreviewSkill as R, type InstalledRegistrySkill as S, MemoriesResource as T, type UploadLicenseResponse as U, VibeCodingResource as V, type Memory as W, type MemoryCreateBody as X, type MemoryListParams as Y, type MemoryListResponse as Z, ModelOption as _, type LicenseStatusResponse as a, HttpToolConfig as a$, ModelsResource as a0, type PaginatedSessionsResult as a1, type PreviewUrlItem as a2, type ProvidersResponse as a3, type QuickScenario as a4, REGISTRY_PREFIX as a5, RegistryResource as a6, type ResourceApi as a7, ScenariosResource as a8, type ServerToClientEvents as a9, createSocket as aA, normalizeResource as aB, EnvBucketsResource as aC, type EnvBucket as aD, type PlatformEnvBucket as aE, type GisState as aF, type RuntimeConfig as aG, type SkillDetail as aH, type SkillStats as aI, type SkillSummary as aJ, type SkillSearchResult as aK, PartnerSkillInstallPayload as aL, PartnerSkillInstallResult as aM, SessionSkillUploadPayload as aN, SessionSkillUploadResult as aO, type BackgroundTask as aP, type GisGoal as aQ, type GisResource$1 as aR, type GisTarget as aS, type GisMapCommand as aT, Task as aU, AgentDriver as aV, AgentResource as aW, DatabaseDriver as aX, DatabaseResource as aY, DifyKnowledgeConfig as aZ, type GisGoalStatus as a_, type SessionContextStats as aa, type SessionHistory as ab, type SessionUpdatedPayload as ac, SessionsResource as ad, type ShareLinkResult as ae, type SkillDevSession as af, type SkillOrgListResponse as ag, type SkillOrgOption as ah, SkillsResource as ai, type SoftwareFactoryModuleBlueprint as aj, SoftwareFactoryResource as ak, type SoftwareFactorySharedFile as al, type SoftwareFactorySoftware as am, type SoftwareFactoryTopic as an, type SoftwareFactoryTopicModule as ao, SolutionsResource as ap, type SystemErrorPayload as aq, type SystemNotificationPayload as ar, type TokenizeResult as as, type TurnProjectionPayload as at, type TypedSocket as au, type UpdateQuickScenarioPayload as av, type UpgradeComputerResponse as aw, type UploadFileEntry as ax, type UserInfo as ay, UserPreferencesResource as az, type LicenseValidateResponse as b, KnowledgeDriver as b0, KnowledgeResource as b1, McpToolConfig as b2, MysqlConfig as b3, type ParallelMode as b4, PartnerSkillFile as b5, PartnerSkillName as b6, PostgresqlConfig as b7, SessionSkillFile as b8, SessionSkillName as b9, type StageSpec as ba, type StepSpec as bb, TaskStatus as bc, ToolDriver as bd, ToolResource as be, skillDisplayName as bf, type VibeCodingDeployStatus as c, type VibeCodingDebugSessionStatus as d, type VibeCodingSessionStatus as e, type VibeCodingDeployRecord as f, type VibeCodingSessionInfo as g, type CreateVibeCodingSessionParams as h, type DeployBumpMode as i, type ApiKeyPublic as j, ApiKeysResource as k, AuthResource as l, BladeClient as m, type BladeClientOptions as n, type BladeFetchInit as o, type BladeHubScenarioResource as p, type ChatEndPayload as q, type ChatSendPayload as r, type CheckpointNode as s, type ClientToServerEvents as t, type CodingTask as u, type CodingTaskTopic as v, type ComputerUpgradeReason as w, type ComputerUpgradeStatusResponse as x, type ContentPart as y, type CreateQuickScenarioPayload as z };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  apiFetchResponse,
3
3
  getAuthedUrl
4
- } from "./chunk-EDMS2G5P.js";
4
+ } from "./chunk-CDSCC4OQ.js";
5
5
 
6
6
  // src/react/lib/session-file-preview.ts
7
7
  var IMAGE_EXTS = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "bmp"]);
@@ -124,4 +124,4 @@ export {
124
124
  CollapsibleTrigger,
125
125
  CollapsibleContent
126
126
  };
127
- //# sourceMappingURL=chunk-FYPS4SFF.js.map
127
+ //# sourceMappingURL=chunk-3LCNDPP6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useSessionStore
3
- } from "./chunk-EDMS2G5P.js";
3
+ } from "./chunk-CDSCC4OQ.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-5ZFK62RQ.js.map
30
+ //# sourceMappingURL=chunk-4XID5JVK.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-J3XVFPOV.js";
4
4
  import {
5
5
  BladeClient
6
- } from "./chunk-C3KSHIRA.js";
6
+ } from "./chunk-VCCMO7G5.js";
7
7
  import {
8
8
  createClientActions,
9
9
  useCardStateStore
@@ -3052,4 +3052,4 @@ export {
3052
3052
  bootstrapBladeClient,
3053
3053
  getBootstrappedClient
3054
3054
  };
3055
- //# sourceMappingURL=chunk-EDMS2G5P.js.map
3055
+ //# sourceMappingURL=chunk-CDSCC4OQ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  CollapsibleContent,
4
4
  CollapsibleTrigger,
5
5
  resolveSessionFilePreviewTarget
6
- } from "./chunk-FYPS4SFF.js";
6
+ } from "./chunk-3LCNDPP6.js";
7
7
  import {
8
8
  AskUserQuestionBlock,
9
9
  CardCodeBlock,
@@ -14,7 +14,7 @@ import {
14
14
  getCodeLanguageFromFilename,
15
15
  parseAskUserQuestion,
16
16
  useHighlightedCodeHtml
17
- } from "./chunk-CK7JMN5S.js";
17
+ } from "./chunk-Z4FPELIQ.js";
18
18
  import {
19
19
  buildMessageContent,
20
20
  buildToolPreviewKey,
@@ -56,7 +56,7 @@ import {
56
56
  useUiBridgeStore,
57
57
  useUiStore,
58
58
  writeFile
59
- } from "./chunk-EDMS2G5P.js";
59
+ } from "./chunk-CDSCC4OQ.js";
60
60
  import {
61
61
  registerBridgeIframe,
62
62
  tapBridgeEvent
@@ -65,7 +65,7 @@ import {
65
65
  ModelOption,
66
66
  ModelsConfig,
67
67
  ModelsResource
68
- } from "./chunk-C3KSHIRA.js";
68
+ } from "./chunk-VCCMO7G5.js";
69
69
  import {
70
70
  cn,
71
71
  copyToClipboard
@@ -637,11 +637,13 @@ var getModelsConfig = (...args) => r().getModelsConfig(...args);
637
637
  // src/react/api/user-preferences.ts
638
638
  var user_preferences_exports = {};
639
639
  __export(user_preferences_exports, {
640
+ getComputerUpgradeStatus: () => getComputerUpgradeStatus,
640
641
  getPersistentDefault: () => getPersistentDefault,
641
642
  getUserPreference: () => getUserPreference,
642
643
  resetComputer: () => resetComputer,
643
644
  setPersistentDefault: () => setPersistentDefault,
644
- setUserPreference: () => setUserPreference
645
+ setUserPreference: () => setUserPreference,
646
+ upgradeComputer: () => upgradeComputer
645
647
  });
646
648
  var r2 = () => getClient().userPreferences;
647
649
  var getUserPreference = (...args) => r2().getUserPreference(...args);
@@ -649,6 +651,8 @@ var setUserPreference = (...args) => r2().setUserPreference(...args);
649
651
  var getPersistentDefault = (...args) => r2().getPersistentDefault(...args);
650
652
  var setPersistentDefault = (...args) => r2().setPersistentDefault(...args);
651
653
  var resetComputer = (...args) => r2().resetComputer(...args);
654
+ var getComputerUpgradeStatus = (...args) => r2().getComputerUpgradeStatus(...args);
655
+ var upgradeComputer = (...args) => r2().upgradeComputer(...args);
652
656
 
653
657
  // src/react/hooks/use-model-preferences.ts
654
658
  var PREFERRED_MODEL_KEY = "preferred_model";
@@ -6544,6 +6548,18 @@ function getLoopCardStyles(status) {
6544
6548
 
6545
6549
  // src/react/components/chat/AssistantTurnBlock.tsx
6546
6550
  import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
6551
+ function defaultTurnDisplayMode({
6552
+ forceExpanded,
6553
+ hasActionableToolCall
6554
+ }) {
6555
+ return forceExpanded || hasActionableToolCall ? "detail" : "compact";
6556
+ }
6557
+ function resolveTurnDisplayMode({
6558
+ isStreaming,
6559
+ displayMode
6560
+ }) {
6561
+ return isStreaming ? "detail" : displayMode;
6562
+ }
6547
6563
  function getMessageText(message) {
6548
6564
  return typeof message.content === "string" ? message.content.trim() : message.content.filter((part) => part.type === "text").map((part) => part.text).join("").trim();
6549
6565
  }
@@ -6686,15 +6702,15 @@ function AssistantTurnBlock({
6686
6702
  [allToolCalls]
6687
6703
  );
6688
6704
  const [displayMode, setDisplayMode] = useState16(
6689
- forceExpanded ? "detail" : "compact"
6705
+ defaultTurnDisplayMode({ forceExpanded, hasActionableToolCall })
6690
6706
  );
6691
6707
  const wasStreamingRef = useRef10(isStreaming);
6692
6708
  useEffect14(() => {
6693
6709
  if (wasStreamingRef.current && !isStreaming && !forceExpanded) {
6694
- setDisplayMode("compact");
6710
+ setDisplayMode(defaultTurnDisplayMode({ forceExpanded, hasActionableToolCall }));
6695
6711
  }
6696
6712
  wasStreamingRef.current = isStreaming;
6697
- }, [forceExpanded, isStreaming]);
6713
+ }, [forceExpanded, hasActionableToolCall, isStreaming]);
6698
6714
  const sessionMessages = useChatStore((state) => state.messages[sessionId] ?? []);
6699
6715
  const agentLoops = useChatStore((state) => state.agentLoops[sessionId] ?? {});
6700
6716
  const turnMessages = useMemo15(
@@ -6704,7 +6720,7 @@ function AssistantTurnBlock({
6704
6720
  const resourceBlocks = useMemo15(() => getInlineResourceBlocks(turnMessages), [turnMessages]);
6705
6721
  const finalMessage = useMemo15(() => getLastTextMessage(turnMessages), [turnMessages]);
6706
6722
  const hasInterruptedState = messages.some((message) => message.status === "interrupted");
6707
- const effectiveMode = isStreaming ? "detail" : displayMode === "compact" && hasActionableToolCall ? "detail" : displayMode;
6723
+ const effectiveMode = resolveTurnDisplayMode({ isStreaming, displayMode });
6708
6724
  const memoryRefs = Array.isArray(messages[0]?.memory_refs) ? messages[0].memory_refs : [];
6709
6725
  return /* @__PURE__ */ jsxs24(
6710
6726
  "div",
@@ -8138,4 +8154,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
8138
8154
  * Licensed under the MIT License. See License.txt in the project root for license information.
8139
8155
  *--------------------------------------------------------------------------------------------*)
8140
8156
  */
8141
- //# sourceMappingURL=chunk-TYCA6WYX.js.map
8157
+ //# sourceMappingURL=chunk-O2BVC7QE.js.map