@blade-hq/agent-kit 0.5.23 → 0.5.25

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-Dn5im-__.d.ts → SkillStatusBar-BUisTEAL.d.ts} +5 -2
  2. package/dist/{blade-client-Bhp0hHiZ.d.ts → blade-client-KmBClau6.d.ts} +35 -2
  3. package/dist/{chunk-B4RZNR3L.js → chunk-FZXLII7S.js} +30 -2
  4. package/dist/chunk-FZXLII7S.js.map +1 -0
  5. package/dist/{chunk-SLTENCW7.js → chunk-HAFDWDFG.js} +2 -2
  6. package/dist/{chunk-LI3WURWU.js → chunk-PKQKLRFQ.js} +15 -5
  7. package/dist/chunk-PKQKLRFQ.js.map +1 -0
  8. package/dist/{chunk-PRWPDK6Z.js → chunk-SENUKC7C.js} +368 -315
  9. package/dist/chunk-SENUKC7C.js.map +1 -0
  10. package/dist/{chunk-NWKF2VEC.js → chunk-UQWHEHG3.js} +2 -2
  11. package/dist/client/index.d.ts +4619 -2838
  12. package/dist/react/api/vibe-coding.d.ts +3 -3
  13. package/dist/react/api/vibe-coding.js +1 -1
  14. package/dist/react/components/chat/index.d.ts +4 -4
  15. package/dist/react/components/chat/index.js +4 -4
  16. package/dist/react/components/plan/index.js +3 -3
  17. package/dist/react/components/session/index.d.ts +1 -1
  18. package/dist/react/components/session/index.js +2 -2
  19. package/dist/react/components/workspace/index.d.ts +22 -2
  20. package/dist/react/components/workspace/index.js +30 -14
  21. package/dist/react/components/workspace/index.js.map +1 -1
  22. package/dist/react/index.d.ts +17 -179
  23. package/dist/react/index.js +6 -5
  24. package/dist/react/index.js.map +1 -1
  25. package/dist/{session-BuaeCsMC.d.ts → session-B5v5KkVd.d.ts} +5 -3
  26. package/dist/sessions-DfRYZZnH.d.ts +174 -0
  27. package/dist/style.css +1 -1
  28. package/package.json +1 -1
  29. package/dist/chunk-B4RZNR3L.js.map +0 -1
  30. package/dist/chunk-LI3WURWU.js.map +0 -1
  31. package/dist/chunk-PRWPDK6Z.js.map +0 -1
  32. /package/dist/{chunk-SLTENCW7.js.map → chunk-HAFDWDFG.js.map} +0 -0
  33. /package/dist/{chunk-NWKF2VEC.js.map → chunk-UQWHEHG3.js.map} +0 -0
@@ -3,8 +3,8 @@ import * as react from 'react';
3
3
  import { ComponentType, ReactNode } from 'react';
4
4
  import { C as ChatMessage, A as AskUserAnswerData, T as ToolCallInfo, M as MessageContent } from './AskUserQuestionBlock---kOTouk.js';
5
5
  import * as zustand from 'zustand';
6
- import { M as ModeId, S as SessionInfo, a as SessionStatus } from './session-BuaeCsMC.js';
7
- import { j as BladeClient } from './blade-client-Bhp0hHiZ.js';
6
+ import { M as ModeId, a as SessionInfo, b as SessionStatus } from './session-B5v5KkVd.js';
7
+ import { v as BladeClient } from './blade-client-KmBClau6.js';
8
8
  import { C as ContentBlock } from './projection-BWYEFYNn.js';
9
9
 
10
10
  /**
@@ -182,6 +182,7 @@ interface SessionState extends ClientAwareState {
182
182
  loading: boolean;
183
183
  modes: Record<string, SessionMode>;
184
184
  rewindDrafts: Record<string, string>;
185
+ errorMessages: Record<string, string>;
185
186
  /** Session IDs that were just created and haven't had their first history load yet */
186
187
  _freshSessions: Set<string>;
187
188
  fetchSessions: () => Promise<void>;
@@ -203,6 +204,8 @@ interface SessionState extends ClientAwareState {
203
204
  */
204
205
  patchSession: (sessionId: string, patch: Partial<SessionInfo>) => void;
205
206
  pinSession: (sessionId: string, pinned: boolean) => Promise<void>;
207
+ setErrorMessage: (sessionId: string, message: string) => void;
208
+ clearErrorMessage: (sessionId: string) => void;
206
209
  setRewindDraft: (sessionId: string, text: string | null) => void;
207
210
  setMode: (sessionId: string, mode: SessionMode) => void;
208
211
  togglePlanningMode: (sessionId: string) => void;
@@ -1,7 +1,7 @@
1
1
  import * as arktype_internal_variants_object_ts from 'arktype/internal/variants/object.ts';
2
2
  import * as arktype_internal_variants_string_ts from 'arktype/internal/variants/string.ts';
3
3
  import { T as TurnProjection } from './projection-BWYEFYNn.js';
4
- import { S as SessionInfo, T as TemplateId, b as SessionDetail, c as Solution, B as BizRole } from './session-BuaeCsMC.js';
4
+ import { a as SessionInfo, T as TemplateId, S as SessionDetail, c as Solution, B as BizRole } from './session-B5v5KkVd.js';
5
5
  import { Socket } from 'socket.io-client';
6
6
 
7
7
  declare class BladeApiError extends Error {
@@ -1259,6 +1259,22 @@ declare namespace SessionUnsubscribePayloadSchema {
1259
1259
  }
1260
1260
  }
1261
1261
  type SessionUnsubscribePayload = SessionUnsubscribePayloadSchema.SessionUnsubscribePayload;
1262
+ declare namespace AgentBoardProjectSubscribePayloadSchema {
1263
+ type ProjectId = number;
1264
+ interface AgentBoardProjectSubscribePayload {
1265
+ project_id: ProjectId;
1266
+ [k: string]: unknown;
1267
+ }
1268
+ }
1269
+ type AgentBoardProjectSubscribePayload = AgentBoardProjectSubscribePayloadSchema.AgentBoardProjectSubscribePayload;
1270
+ declare namespace AgentBoardProjectUnsubscribePayloadSchema {
1271
+ type ProjectId = number;
1272
+ interface AgentBoardProjectUnsubscribePayload {
1273
+ project_id: ProjectId;
1274
+ [k: string]: unknown;
1275
+ }
1276
+ }
1277
+ type AgentBoardProjectUnsubscribePayload = AgentBoardProjectUnsubscribePayloadSchema.AgentBoardProjectUnsubscribePayload;
1262
1278
  declare namespace ChatStartPayloadSchema {
1263
1279
  type SessionId = (string | null);
1264
1280
  interface ChatStartPayload {
@@ -1537,6 +1553,20 @@ declare namespace VibeLogsEndPayloadSchema {
1537
1553
  }
1538
1554
  }
1539
1555
  type VibeLogsEndPayload = VibeLogsEndPayloadSchema.VibeLogsEndPayload;
1556
+ declare namespace AgentBoardBoardTaskChangedPayloadSchema {
1557
+ type ProjectId = number;
1558
+ type Action = ("created" | "updated" | "deleted");
1559
+ interface AgentBoardBoardTaskChangedPayload {
1560
+ project_id: ProjectId;
1561
+ action: Action;
1562
+ task: Task;
1563
+ [k: string]: unknown;
1564
+ }
1565
+ interface Task {
1566
+ [k: string]: unknown;
1567
+ }
1568
+ }
1569
+ type AgentBoardBoardTaskChangedPayload = AgentBoardBoardTaskChangedPayloadSchema.AgentBoardBoardTaskChangedPayload;
1540
1570
  declare namespace ChatStopAckSchema {
1541
1571
  type Status = string;
1542
1572
  type Message = (string | null);
@@ -1567,6 +1597,8 @@ interface ClientToServerEvents {
1567
1597
  "chat:compact": (payload: ChatCompactPayload, ack: (response: ChatCompactAck) => void) => void;
1568
1598
  "session:subscribe": (payload: SessionSubscribePayload) => void;
1569
1599
  "session:unsubscribe": (payload: SessionUnsubscribePayload) => void;
1600
+ "agent-board:project:subscribe": (payload: AgentBoardProjectSubscribePayload) => void;
1601
+ "agent-board:project:unsubscribe": (payload: AgentBoardProjectUnsubscribePayload) => void;
1570
1602
  "asr:start": (payload: unknown) => void;
1571
1603
  "asr:audio": (payload: AsrAudioPayload) => void;
1572
1604
  "asr:stop": (payload: unknown) => void;
@@ -1600,6 +1632,7 @@ interface ServerToClientEvents {
1600
1632
  "vibe:logs:line": (payload: VibeLogsLinePayload) => void;
1601
1633
  "vibe:logs:end": (payload: VibeLogsEndPayload) => void;
1602
1634
  "replay:input_mismatch": (payload: unknown) => void;
1635
+ "agent-board:board-task:changed": (payload: AgentBoardBoardTaskChangedPayload) => void;
1603
1636
  }
1604
1637
 
1605
1638
  type TypedSocket = Socket<ServerToClientEvents, ClientToServerEvents>;
@@ -1674,4 +1707,4 @@ interface UploadProgress {
1674
1707
  percent?: number;
1675
1708
  }
1676
1709
 
1677
- export { ModelsConfig as $, type ApiKeyCreateResponse as A, BladeApiError as B, type CreateVibeCodingSessionResult as C, type DeployBumpMode as D, type CreateSoftwareFactorySoftwarePayload as E, type FileEntry as F, GisResource as G, type GlobalSkillStats as H, HeadlessError as I, HeadlessResource as J, type HeadlessRunInSessionResult as K, type HeadlessRunOptions 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, type JsonSchemaObject as T, MemoriesResource as U, VibeCodingResource as V, type Memory as W, type MemoryCreateBody as X, type MemoryListParams as Y, type MemoryListResponse as Z, ModelOption as _, type VibeCodingDeployStatus as a, AgentDriver as a$, ModelsResource as a0, type PaginatedSessionsResult as a1, type PreviewUrlItem as a2, type ProvidersResponse as a3, PublishedAppsResource as a4, type QuickScenario as a5, REGISTRY_PREFIX as a6, RegistryResource as a7, type ResourceApi as a8, ScenariosResource as a9, type UserInfo as aA, UserPreferencesResource as aB, createSocket as aC, normalizeResource as aD, EnvBucketsResource as aE, type EnvBucket as aF, type PlatformEnvBucket as aG, type GisState as aH, type RuntimeConfig as aI, type SkillDetail as aJ, type SkillStats as aK, type SkillSummary as aL, type SkillSearchResult as aM, PartnerSkillInstallPayload as aN, PartnerSkillInstallResult as aO, SessionSkillUploadPayload as aP, SessionSkillUploadResult as aQ, PublishedApp as aR, PublishedAppListResponse as aS, PublishedAppStatus as aT, UnpublishAppResponse as aU, type BackgroundTask as aV, type GisGoal as aW, type GisResource$1 as aX, type GisTarget as aY, type GisMapCommand as aZ, Task as a_, type ServerToClientEvents as aa, type SessionContextStats as ab, type SessionHistory as ac, type SessionUpdatedPayload as ad, SessionsResource as ae, type ShareLinkResult as af, type SkillDevSession as ag, type SkillOrgListResponse as ah, type SkillOrgOption as ai, SkillsResource as aj, type SoftwareFactoryModuleBlueprint as ak, SoftwareFactoryResource as al, type SoftwareFactorySharedFile as am, type SoftwareFactorySoftware as an, type SoftwareFactoryTopic as ao, type SoftwareFactoryTopicModule as ap, SolutionsResource as aq, type SystemErrorPayload as ar, type SystemNotificationPayload as as, type TokenizeResult as at, type TurnProjectionPayload as au, type TypedSocket as av, type UpdateQuickScenarioPayload as aw, type UpgradeComputerResponse as ax, type UploadFileEntry as ay, type UploadFilesOptions as az, type VibeCodingDebugSessionStatus as b, AgentResource as b0, DatabaseDriver as b1, DatabaseResource as b2, DifyKnowledgeConfig as b3, type GisGoalStatus as b4, HttpToolConfig as b5, KnowledgeDriver as b6, KnowledgeResource as b7, McpToolConfig as b8, MysqlConfig as b9, type ParallelMode as ba, PartnerSkillFile as bb, PartnerSkillName as bc, PostgresqlConfig as bd, SessionSkillFile as be, SessionSkillName as bf, type StageSpec as bg, type StepSpec as bh, TaskStatus as bi, ToolDriver as bj, ToolResource as bk, skillDisplayName as bl, type VibeCodingSessionStatus as c, type VibeCodingDeployRecord as d, type VibeCodingSessionInfo as e, type CreateVibeCodingSessionParams as f, type ApiKeyPublic as g, ApiKeysResource as h, AuthResource as i, BladeClient as j, type BladeClientOptions as k, type BladeFetchInit as l, type BladeHubScenarioResource as m, type ChatEndPayload as n, type ChatSendPayload as o, type CheckpointNode as p, type ClientToServerEvents as q, type CodingTask as r, type CodingTaskTopic as s, type ComputerUpgradeReason as t, type ComputerUpgradeStatusResponse as u, type ContentPart as v, type CreateQuickScenarioPayload as w, type CreateSessionRequest as x, type CreateSocketOptions as y, type CreateSoftwareFactorySharedFilePayload as z };
1710
+ export { type HeadlessRunOptions as $, type ApiKeyCreateResponse as A, type BackgroundTask as B, type CreateVibeCodingSessionResult as C, type DeployBumpMode as D, type ChatSendPayload as E, type FileEntry as F, type ClientToServerEvents as G, type HistoryNode as H, type ImportPreview as I, type CodingTask as J, type CodingTaskTopic as K, type ComputerUpgradeReason as L, type ComputerUpgradeStatusResponse as M, type CreateQuickScenarioPayload as N, type CreateSocketOptions as O, type PortMapping as P, type CreateSoftwareFactorySharedFilePayload as Q, type CreateSoftwareFactorySoftwarePayload as R, SessionsResource as S, type TokenizeResult as T, type UploadFileEntry as U, VibeCodingResource as V, GisResource as W, type GlobalSkillStats as X, HeadlessError as Y, HeadlessResource as Z, type HeadlessRunInSessionResult as _, type VibeCodingDeployStatus as a, AgentDriver as a$, type HttpMethod as a0, type InstalledRegistrySkill as a1, type JsonSchemaObject as a2, MemoriesResource as a3, type Memory as a4, type MemoryCreateBody as a5, type MemoryListParams as a6, type MemoryListResponse as a7, ModelOption as a8, ModelsConfig as a9, type UpgradeComputerResponse as aA, type UserInfo as aB, UserPreferencesResource as aC, createSocket as aD, normalizeResource as aE, EnvBucketsResource as aF, type EnvBucket as aG, type PlatformEnvBucket as aH, type GisState as aI, type RuntimeConfig as aJ, type SkillDetail as aK, type SkillStats as aL, type SkillSummary as aM, type SkillSearchResult as aN, PartnerSkillInstallPayload as aO, PartnerSkillInstallResult as aP, SessionSkillUploadPayload as aQ, SessionSkillUploadResult as aR, PublishedApp as aS, PublishedAppListResponse as aT, PublishedAppStatus as aU, UnpublishAppResponse as aV, type GisGoal as aW, type GisResource$1 as aX, type GisTarget as aY, type GisMapCommand as aZ, Task as a_, ModelsResource as aa, type PreviewUrlItem as ab, type ProvidersResponse as ac, PublishedAppsResource as ad, type QuickScenario as ae, REGISTRY_PREFIX as af, RegistryResource as ag, type ResourceApi as ah, ScenariosResource as ai, type ServerToClientEvents as aj, type SessionUpdatedPayload as ak, type SkillOrgListResponse as al, type SkillOrgOption as am, SkillsResource as an, type SoftwareFactoryModuleBlueprint as ao, SoftwareFactoryResource as ap, type SoftwareFactorySharedFile as aq, type SoftwareFactorySoftware as ar, type SoftwareFactoryTopic as as, type SoftwareFactoryTopicModule as at, SolutionsResource as au, type SystemErrorPayload as av, type SystemNotificationPayload as aw, type TurnProjectionPayload as ax, type TypedSocket as ay, type UpdateQuickScenarioPayload as az, type VibeCodingDebugSessionStatus as b, AgentResource as b0, DatabaseDriver as b1, DatabaseResource as b2, DifyKnowledgeConfig as b3, type GisGoalStatus as b4, HttpToolConfig as b5, KnowledgeDriver as b6, KnowledgeResource as b7, McpToolConfig as b8, MysqlConfig as b9, type ParallelMode as ba, PartnerSkillFile as bb, PartnerSkillName as bc, PostgresqlConfig as bd, SessionSkillFile as be, SessionSkillName as bf, type StageSpec as bg, type StepSpec as bh, TaskStatus as bi, ToolDriver as bj, ToolResource as bk, skillDisplayName as bl, type VibeCodingSessionStatus as c, type VibeCodingDeployRecord as d, type VibeCodingSessionInfo as e, type CreateVibeCodingSessionParams as f, type ShareLinkResult as g, type CheckpointNode as h, type SessionContextStats as i, type SessionHistory as j, type PaginatedSessionsResult as k, type SkillDevSession as l, type ContentPart as m, type CreateSessionRequest as n, type ImportPreviewScenario as o, type ImportPreviewSkill as p, type UploadFilesOptions as q, type ApiKeyPublic as r, ApiKeysResource as s, AuthResource as t, BladeApiError as u, BladeClient as v, type BladeClientOptions as w, type BladeFetchInit as x, type BladeHubScenarioResource as y, type ChatEndPayload as z };
@@ -1543,6 +1543,7 @@ var useSessionStore = create5()((set, get) => ({
1543
1543
  loading: false,
1544
1544
  modes: {},
1545
1545
  rewindDrafts: {},
1546
+ errorMessages: {},
1546
1547
  _freshSessions: /* @__PURE__ */ new Set(),
1547
1548
  fetchSessions: async () => {
1548
1549
  set({ loading: true });
@@ -1727,6 +1728,17 @@ var useSessionStore = create5()((set, get) => ({
1727
1728
  }));
1728
1729
  invalidateHomeSidebarSessions();
1729
1730
  },
1731
+ setErrorMessage: (sessionId, message) => {
1732
+ set((state) => ({
1733
+ errorMessages: { ...state.errorMessages, [sessionId]: message }
1734
+ }));
1735
+ },
1736
+ clearErrorMessage: (sessionId) => {
1737
+ set((state) => {
1738
+ const { [sessionId]: _, ...rest } = state.errorMessages;
1739
+ return { errorMessages: rest };
1740
+ });
1741
+ },
1730
1742
  setRewindDraft: (sessionId, text) => {
1731
1743
  set((state) => {
1732
1744
  if (text == null) {
@@ -1767,6 +1779,7 @@ var useSessionStore = create5()((set, get) => ({
1767
1779
  loading: false,
1768
1780
  modes: {},
1769
1781
  rewindDrafts: {},
1782
+ errorMessages: {},
1770
1783
  _freshSessions: /* @__PURE__ */ new Set()
1771
1784
  });
1772
1785
  invalidateHomeSidebarSessions();
@@ -2406,6 +2419,7 @@ var AgentSocket = class {
2406
2419
  const sessionId = this._resolveSessionId(data);
2407
2420
  if (!sessionId) return;
2408
2421
  useSessionStore.getState().updateSessionStatus(sessionId, "running");
2422
+ useSessionStore.getState().clearErrorMessage(sessionId);
2409
2423
  useChatStore.getState().setStreaming(sessionId, true);
2410
2424
  });
2411
2425
  s.on("chat:end", (data) => {
@@ -2445,8 +2459,8 @@ var AgentSocket = class {
2445
2459
  this._flushPendingTurnPatches(sessionId);
2446
2460
  const message = isOomText(data.message) ? OOM_MESSAGE : data.message;
2447
2461
  useSessionStore.getState().updateSessionStatus(sessionId, "failed");
2462
+ useSessionStore.getState().setErrorMessage(sessionId, message);
2448
2463
  useChatStore.getState().markFailed(sessionId);
2449
- useChatStore.getState().addErrorMessage(sessionId, message);
2450
2464
  useChatStore.getState().setStreaming(sessionId, false);
2451
2465
  useRuntimeStore.getState().addEvent(sessionId, {
2452
2466
  type: "system:error",
@@ -2519,6 +2533,7 @@ var AgentSocket = class {
2519
2533
  const { modes, ...rest } = useSessionStore.getState();
2520
2534
  const { [sessionId]: _, ...restModes } = modes;
2521
2535
  useSessionStore.setState({ ...rest, modes: restModes });
2536
+ useSessionStore.getState().clearErrorMessage(sessionId);
2522
2537
  useSessionStore.getState().setActiveSession(sessionId);
2523
2538
  useRuntimeStore.getState().addEvent(sessionId, {
2524
2539
  type: "session:rewind",
@@ -2782,6 +2797,19 @@ var AgentSocket = class {
2782
2797
  }
2783
2798
  void this._ensureJoined(sessionId);
2784
2799
  }
2800
+ subscribeAgentBoardProject(projectId) {
2801
+ this._ensureConnected();
2802
+ this.socket.emit("agent-board:project:subscribe", { project_id: Number(projectId) });
2803
+ }
2804
+ unsubscribeAgentBoardProject(projectId) {
2805
+ this.socket.emit("agent-board:project:unsubscribe", { project_id: Number(projectId) });
2806
+ }
2807
+ onAgentBoardTaskChanged(handler) {
2808
+ this.socket.on("agent-board:board-task:changed", handler);
2809
+ return () => {
2810
+ this.socket.off("agent-board:board-task:changed", handler);
2811
+ };
2812
+ }
2785
2813
  unsubscribe() {
2786
2814
  const previousSessionId = this.subscribedSession;
2787
2815
  if (previousSessionId) {
@@ -3188,4 +3216,4 @@ export {
3188
3216
  bootstrapBladeClient,
3189
3217
  getBootstrappedClient
3190
3218
  };
3191
- //# sourceMappingURL=chunk-B4RZNR3L.js.map
3219
+ //# sourceMappingURL=chunk-FZXLII7S.js.map