@blade-hq/agent-kit 1.0.28 → 1.0.30

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 (39) hide show
  1. package/dist/{chunk-BGNKHPCD.js → chunk-3XDPNPE3.js} +46 -18
  2. package/dist/chunk-3XDPNPE3.js.map +1 -0
  3. package/dist/{chunk-HCQDDDOX.js → chunk-6G5LCDOS.js} +2 -2
  4. package/dist/{chunk-OGHUIKCY.js → chunk-7OEW3P7R.js} +144 -37
  5. package/dist/chunk-7OEW3P7R.js.map +1 -0
  6. package/dist/{chunk-YJ6BX3FU.js → chunk-GAVSC2AW.js} +4 -2
  7. package/dist/chunk-GAVSC2AW.js.map +1 -0
  8. package/dist/{chunk-TVWC3PED.js → chunk-L4C2TY6S.js} +2 -2
  9. package/dist/{chunk-PYYDXV2A.js → chunk-MJPVAXJN.js} +2 -2
  10. package/dist/{chunk-UWNQ4PXK.js → chunk-WOKDHXS7.js} +29 -2
  11. package/dist/chunk-WOKDHXS7.js.map +1 -0
  12. package/dist/client/index.js +1 -1
  13. package/dist/client/resources/sessions.d.ts +2 -0
  14. package/dist/client/types/rest.d.ts +659 -55
  15. package/dist/react/api/model-config.d.ts +8 -11
  16. package/dist/react/api/published-apps.js +3 -3
  17. package/dist/react/api/sessions.js +2 -2
  18. package/dist/react/components/chat/AskUserQuestionBlock.d.ts +1 -1
  19. package/dist/react/components/chat/ChatInput.d.ts +10 -4
  20. package/dist/react/components/chat/index.d.ts +1 -1
  21. package/dist/react/components/chat/index.js +5 -5
  22. package/dist/react/components/markdown/ExternalLinkDialog.d.ts +3 -1
  23. package/dist/react/components/plan/index.js +4 -4
  24. package/dist/react/components/session/index.js +3 -3
  25. package/dist/react/components/workspace/index.js +3 -3
  26. package/dist/react/index.d.ts +1 -1
  27. package/dist/react/index.js +18 -8
  28. package/dist/react/index.js.map +1 -1
  29. package/dist/react/schemas/session.d.ts +5 -0
  30. package/dist/react/sockets/event-bridge.d.ts +6 -0
  31. package/dist/react/stores/ui-store.d.ts +1 -1
  32. package/package.json +1 -1
  33. package/dist/chunk-BGNKHPCD.js.map +0 -1
  34. package/dist/chunk-OGHUIKCY.js.map +0 -1
  35. package/dist/chunk-UWNQ4PXK.js.map +0 -1
  36. package/dist/chunk-YJ6BX3FU.js.map +0 -1
  37. /package/dist/{chunk-HCQDDDOX.js.map → chunk-6G5LCDOS.js.map} +0 -0
  38. /package/dist/{chunk-TVWC3PED.js.map → chunk-L4C2TY6S.js.map} +0 -0
  39. /package/dist/{chunk-PYYDXV2A.js.map → chunk-MJPVAXJN.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  export type ThinkingRequestFormat = "auto" | "none" | "openai_reasoning_effort" | "openrouter_reasoning" | "deepseek_thinking" | "together_reasoning" | "zai_thinking" | "qwen_enable_thinking" | "sglang_chat_template";
2
- export interface RuntimeProviderConfig {
2
+ export interface RuntimeModelService {
3
3
  name: string;
4
4
  base_url: string;
5
5
  api_key_configured: boolean;
@@ -13,15 +13,15 @@ export interface RuntimeModelDetails {
13
13
  }
14
14
  export interface RuntimeModelConfig {
15
15
  id: string;
16
- provider: RuntimeProviderConfig;
17
16
  model: RuntimeModelDetails;
18
17
  }
19
18
  export interface RuntimeModelConfigCollection {
19
+ service: RuntimeModelService;
20
20
  items: RuntimeModelConfig[];
21
21
  default_config_id: string;
22
22
  source: "saved" | "startup";
23
23
  }
24
- export interface UpdateProviderConfig {
24
+ export interface UpdateRuntimeModelService {
25
25
  base_url: string;
26
26
  api_key?: string;
27
27
  thinking_request_format: ThinkingRequestFormat;
@@ -32,33 +32,30 @@ export interface UpdateModelDetails {
32
32
  supports_vision: boolean;
33
33
  }
34
34
  export interface UpdateRuntimeModelConfig {
35
- provider: UpdateProviderConfig;
36
35
  model: UpdateModelDetails;
37
36
  }
38
37
  export interface ModelConfigProbe {
39
- provider: UpdateProviderConfig;
40
38
  model_id: string;
41
- config_id?: string;
42
39
  }
43
40
  export interface ModelCandidatesRequest {
44
- provider: UpdateProviderConfig;
45
- config_id?: string;
41
+ service: UpdateRuntimeModelService;
46
42
  }
47
43
  export interface ModelCandidatesResult {
48
- provider_name: string;
44
+ service_name: string;
49
45
  models: string[];
50
46
  }
51
47
  export interface ContextWindowDetectionResult {
52
- provider_name: string;
48
+ service_name: string;
53
49
  model_id: string;
54
50
  context_window: number;
55
51
  }
56
52
  export interface ModelConfigTestResult {
57
53
  ok: boolean;
58
- provider_name: string;
54
+ service_name: string;
59
55
  model_id: string;
60
56
  }
61
57
  export declare function getRuntimeModelConfigs(): Promise<RuntimeModelConfigCollection>;
58
+ export declare function updateRuntimeModelService(service: UpdateRuntimeModelService): Promise<RuntimeModelConfigCollection>;
62
59
  export declare function createRuntimeModelConfig(config: UpdateRuntimeModelConfig): Promise<RuntimeModelConfigCollection>;
63
60
  export declare function updateRuntimeModelConfig(configId: string, config: UpdateRuntimeModelConfig): Promise<RuntimeModelConfigCollection>;
64
61
  export declare function deleteRuntimeModelConfig(configId: string): Promise<RuntimeModelConfigCollection>;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  listPublishedApps,
3
3
  unpublishApp
4
- } from "../../chunk-HCQDDDOX.js";
5
- import "../../chunk-UWNQ4PXK.js";
4
+ } from "../../chunk-6G5LCDOS.js";
5
+ import "../../chunk-WOKDHXS7.js";
6
6
  import "../../chunk-J3XVFPOV.js";
7
- import "../../chunk-YJ6BX3FU.js";
7
+ import "../../chunk-GAVSC2AW.js";
8
8
  import "../../chunk-JCJFFJ42.js";
9
9
  import "../../chunk-PZ5AY32C.js";
10
10
  export {
@@ -41,9 +41,9 @@ import {
41
41
  updateSharing,
42
42
  uploadFiles,
43
43
  writeFile
44
- } from "../../chunk-UWNQ4PXK.js";
44
+ } from "../../chunk-WOKDHXS7.js";
45
45
  import "../../chunk-J3XVFPOV.js";
46
- import "../../chunk-YJ6BX3FU.js";
46
+ import "../../chunk-GAVSC2AW.js";
47
47
  import "../../chunk-JCJFFJ42.js";
48
48
  import "../../chunk-PZ5AY32C.js";
49
49
  export {
@@ -11,7 +11,7 @@ interface SourceLoopInfo {
11
11
  loop_name: string;
12
12
  description: string;
13
13
  }
14
- interface AskUserQuestionData {
14
+ export interface AskUserQuestionData {
15
15
  questions: QuestionItem[];
16
16
  source_loop?: SourceLoopInfo | null;
17
17
  }
@@ -7,8 +7,12 @@ export interface ChatSendOptions {
7
7
  model?: string | null;
8
8
  thinkingOverride?: boolean;
9
9
  }
10
+ export interface EnsureSessionResult {
11
+ sessionId: string;
12
+ pendingFilesHandled?: boolean;
13
+ }
10
14
  interface Props {
11
- onSend: (message: MessageContent, options?: ChatSendOptions) => void;
15
+ onSend: (message: MessageContent, options?: ChatSendOptions) => void | Promise<void>;
12
16
  onAppend?: (message: string) => void;
13
17
  onStop: () => void | Promise<void>;
14
18
  isStreaming: boolean;
@@ -24,7 +28,7 @@ interface Props {
24
28
  * path reaches exactly the session the files landed in — independent of
25
29
  * whatever the global activeSessionId is at that moment.
26
30
  */
27
- ensureSession?: (draftText: string) => Promise<string>;
31
+ ensureSession?: (draftText: string, options?: Pick<ChatSendOptions, "model" | "thinkingOverride">) => Promise<string | EnsureSessionResult>;
28
32
  onCommand?: (commandId: string) => void | Promise<void>;
29
33
  canShareSession?: boolean;
30
34
  /**
@@ -32,6 +36,8 @@ interface Props {
32
36
  * bar). ship-attack uses this to mount QuoteChipList for R4.
33
37
  */
34
38
  slotAboveTextarea?: ReactNode;
39
+ /** Optional business context rendered immediately before the send button. */
40
+ slotBeforeSend?: ReactNode;
35
41
  /**
36
42
  * Optional external draft channel. When provided, the composer initializes
37
43
  * from `value` on mount and mirrors every internal `setInput` call into
@@ -84,11 +90,11 @@ export type FileComposerAttachment = {
84
90
  textContent?: string | null;
85
91
  uploadProgress?: number | null;
86
92
  };
87
- type ComposerAttachment = FileComposerAttachment;
93
+ export type ComposerAttachment = FileComposerAttachment;
88
94
  export declare function buildSubmitPayload(text: string, attachments: ComposerAttachment[], pendingContexts: {
89
95
  label: string;
90
96
  content: string;
91
97
  imageUrl?: string;
92
98
  }[], onBeforeSend?: (content: MessageContent) => MessageContent | Promise<MessageContent>): Promise<MessageContent>;
93
- export declare function ChatInput({ onSend, onAppend, onStop, isStreaming, isStopping, mode, onToggleMode, renderAttachments, onBeforeSend, ensureSession, onCommand, canShareSession, slotAboveTextarea, externalDraft, externalAttachments, maxWidthClassName, className, innerClassName, SkillStatusBarComponent, skillStatusBarClassName, skillStatusBarInnerClassName, onResyncSkills, isResyncingSkills, inputLabel, onDoubleEscape, composerHint, }: Props): import("react/jsx-runtime").JSX.Element;
99
+ export declare function ChatInput({ onSend, onAppend, onStop, isStreaming, isStopping, mode, onToggleMode, renderAttachments, onBeforeSend, ensureSession, onCommand, canShareSession, slotAboveTextarea, slotBeforeSend, externalDraft, externalAttachments, maxWidthClassName, className, innerClassName, SkillStatusBarComponent, skillStatusBarClassName, skillStatusBarInnerClassName, onResyncSkills, isResyncingSkills, inputLabel, onDoubleEscape, composerHint, }: Props): import("react/jsx-runtime").JSX.Element;
94
100
  export {};
@@ -1,6 +1,6 @@
1
1
  export { ChatView, type ChatViewProps } from "./ChatView.js";
2
2
  export { AttachmentPreviewDialog } from "./AttachmentPreviewDialog.js";
3
- export { ChatInput, type ChatSendOptions, type FileComposerAttachment } from "./ChatInput.js";
3
+ export { ChatInput, type ChatSendOptions, type ComposerAttachment, type EnsureSessionResult, type FileComposerAttachment, } from "./ChatInput.js";
4
4
  export { ThinkingToggle } from "./ThinkingToggle.js";
5
5
  export { FileSizeLimitDialog } from "./FileSizeLimitDialog.js";
6
6
  export { ImageLightbox } from "./ImageLightbox.js";
@@ -17,16 +17,16 @@ import {
17
17
  isErrorMessage,
18
18
  isUserMessage,
19
19
  useWhatIfQuoteContext
20
- } from "../../../chunk-BGNKHPCD.js";
20
+ } from "../../../chunk-3XDPNPE3.js";
21
21
  import "../../../chunk-H62LH2AG.js";
22
22
  import {
23
23
  AskUserQuestionBlock
24
- } from "../../../chunk-OGHUIKCY.js";
25
- import "../../../chunk-PYYDXV2A.js";
24
+ } from "../../../chunk-7OEW3P7R.js";
25
+ import "../../../chunk-MJPVAXJN.js";
26
26
  import "../../../chunk-2UP7MG3J.js";
27
- import "../../../chunk-UWNQ4PXK.js";
27
+ import "../../../chunk-WOKDHXS7.js";
28
28
  import "../../../chunk-J3XVFPOV.js";
29
- import "../../../chunk-YJ6BX3FU.js";
29
+ import "../../../chunk-GAVSC2AW.js";
30
30
  import "../../../chunk-7LEKQI47.js";
31
31
  import "../../../chunk-JCJFFJ42.js";
32
32
  import "../../../chunk-PZ5AY32C.js";
@@ -3,6 +3,8 @@ interface Props {
3
3
  onClose: () => void;
4
4
  onConfirm: () => void;
5
5
  url: string;
6
+ /** 在会话的沙盒浏览器(「浏览器」面板)中打开链接;不传则不显示该按钮 */
7
+ onOpenInternal?: () => void | Promise<void>;
6
8
  }
7
- export declare function ExternalLinkDialog({ isOpen, onClose, onConfirm, url }: Props): import("react").ReactPortal | null;
9
+ export declare function ExternalLinkDialog({ isOpen, onClose, onConfirm, url, onOpenInternal }: Props): import("react").ReactPortal | null;
8
10
  export {};
@@ -3,12 +3,12 @@ import {
3
3
  PlanSummaryCard,
4
4
  extractLatestPlanMessages,
5
5
  parsePlanMessages
6
- } from "../../../chunk-OGHUIKCY.js";
7
- import "../../../chunk-PYYDXV2A.js";
6
+ } from "../../../chunk-7OEW3P7R.js";
7
+ import "../../../chunk-MJPVAXJN.js";
8
8
  import "../../../chunk-2UP7MG3J.js";
9
- import "../../../chunk-UWNQ4PXK.js";
9
+ import "../../../chunk-WOKDHXS7.js";
10
10
  import "../../../chunk-J3XVFPOV.js";
11
- import "../../../chunk-YJ6BX3FU.js";
11
+ import "../../../chunk-GAVSC2AW.js";
12
12
  import {
13
13
  cn
14
14
  } from "../../../chunk-7LEKQI47.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  useSession
3
- } from "../../../chunk-TVWC3PED.js";
3
+ } from "../../../chunk-L4C2TY6S.js";
4
4
  import {
5
5
  checkoutSession,
6
6
  getSessionCheckpoints,
7
7
  useChatStore,
8
8
  useSessionStore
9
- } from "../../../chunk-UWNQ4PXK.js";
9
+ } from "../../../chunk-WOKDHXS7.js";
10
10
  import "../../../chunk-J3XVFPOV.js";
11
- import "../../../chunk-YJ6BX3FU.js";
11
+ import "../../../chunk-GAVSC2AW.js";
12
12
  import {
13
13
  cn
14
14
  } from "../../../chunk-7LEKQI47.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "../../../chunk-H62LH2AG.js";
6
6
  import {
7
7
  resolveSessionFilePreviewTarget
8
- } from "../../../chunk-PYYDXV2A.js";
8
+ } from "../../../chunk-MJPVAXJN.js";
9
9
  import {
10
10
  apiFetchText,
11
11
  copyFile,
@@ -19,9 +19,9 @@ import {
19
19
  useChatStore,
20
20
  useSessionStore,
21
21
  useUiStore
22
- } from "../../../chunk-UWNQ4PXK.js";
22
+ } from "../../../chunk-WOKDHXS7.js";
23
23
  import "../../../chunk-J3XVFPOV.js";
24
- import "../../../chunk-YJ6BX3FU.js";
24
+ import "../../../chunk-GAVSC2AW.js";
25
25
  import {
26
26
  cn
27
27
  } from "../../../chunk-7LEKQI47.js";
@@ -14,7 +14,7 @@ export * as memoriesApi from "./api/memories.js";
14
14
  export * as gisApi from "./api/gis-api.js";
15
15
  export * as modelsApi from "./api/models.js";
16
16
  export * as modelConfigApi from "./api/model-config.js";
17
- export type { ContextWindowDetectionResult, ModelCandidatesRequest, ModelCandidatesResult, ModelConfigProbe, ModelConfigTestResult, RuntimeModelConfig, RuntimeModelConfigCollection, RuntimeModelDetails, RuntimeProviderConfig, ThinkingRequestFormat, UpdateModelDetails, UpdateProviderConfig, UpdateRuntimeModelConfig, } from "./api/model-config.js";
17
+ export type { ContextWindowDetectionResult, ModelCandidatesRequest, ModelCandidatesResult, ModelConfigProbe, ModelConfigTestResult, RuntimeModelConfig, RuntimeModelConfigCollection, RuntimeModelDetails, RuntimeModelService, ThinkingRequestFormat, UpdateModelDetails, UpdateRuntimeModelService, UpdateRuntimeModelConfig, } from "./api/model-config.js";
18
18
  export type { Memory, MemoryCreateBody, MemoryListParams, MemoryListResponse, } from "./api/memories.js";
19
19
  export * as partnerSkillApi from "./api/partner-skill.js";
20
20
  export * as publishedAppsApi from "./api/published-apps.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  published_apps_exports
3
- } from "../chunk-HCQDDDOX.js";
3
+ } from "../chunk-6G5LCDOS.js";
4
4
  import {
5
5
  useCardState
6
6
  } from "../chunk-DQCXSPHP.js";
@@ -35,7 +35,7 @@ import {
35
35
  useTiptapVoiceInput,
36
36
  useVoiceInput,
37
37
  user_preferences_exports
38
- } from "../chunk-BGNKHPCD.js";
38
+ } from "../chunk-3XDPNPE3.js";
39
39
  import "../chunk-H62LH2AG.js";
40
40
  import {
41
41
  CardCodeBlock,
@@ -45,21 +45,21 @@ import {
45
45
  normalizeCodeLanguage,
46
46
  useCardContext,
47
47
  useHighlightedCodeHtml
48
- } from "../chunk-OGHUIKCY.js";
48
+ } from "../chunk-7OEW3P7R.js";
49
49
  import {
50
50
  buildBinaryPreviewTarget,
51
51
  buildSessionBinaryPreviewTarget,
52
52
  isOfficePdfPreviewable,
53
53
  resolveSessionFilePreviewTarget,
54
54
  resolveTextPreviewType
55
- } from "../chunk-PYYDXV2A.js";
55
+ } from "../chunk-MJPVAXJN.js";
56
56
  import {
57
57
  CardJSON,
58
58
  cardRegistry
59
59
  } from "../chunk-2UP7MG3J.js";
60
60
  import {
61
61
  useSession
62
- } from "../chunk-TVWC3PED.js";
62
+ } from "../chunk-L4C2TY6S.js";
63
63
  import {
64
64
  PartnerSkillFile,
65
65
  PartnerSkillInstallPayload,
@@ -114,12 +114,12 @@ import {
114
114
  useTaskStore,
115
115
  useUiBridgeStore,
116
116
  useUiStore
117
- } from "../chunk-UWNQ4PXK.js";
117
+ } from "../chunk-WOKDHXS7.js";
118
118
  import "../chunk-J3XVFPOV.js";
119
119
  import {
120
120
  REGISTRY_PREFIX,
121
121
  normalizeResource
122
- } from "../chunk-YJ6BX3FU.js";
122
+ } from "../chunk-GAVSC2AW.js";
123
123
  import {
124
124
  cn,
125
125
  copyToClipboard
@@ -234,11 +234,19 @@ __export(model_config_exports, {
234
234
  listModelCandidates: () => listModelCandidates,
235
235
  setDefaultRuntimeModelConfig: () => setDefaultRuntimeModelConfig,
236
236
  testRuntimeModelConfig: () => testRuntimeModelConfig,
237
- updateRuntimeModelConfig: () => updateRuntimeModelConfig
237
+ updateRuntimeModelConfig: () => updateRuntimeModelConfig,
238
+ updateRuntimeModelService: () => updateRuntimeModelService
238
239
  });
239
240
  function getRuntimeModelConfigs() {
240
241
  return apiFetch("/api/admin/model-config");
241
242
  }
243
+ function updateRuntimeModelService(service) {
244
+ return apiFetch("/api/admin/model-config/service", {
245
+ method: "PUT",
246
+ headers: { "Content-Type": "application/json" },
247
+ body: JSON.stringify(service)
248
+ });
249
+ }
242
250
  function createRuntimeModelConfig(config) {
243
251
  return apiFetch("/api/admin/model-config", {
244
252
  method: "POST",
@@ -1686,6 +1694,8 @@ var SessionInfo = type({
1686
1694
  "is_example?": "boolean",
1687
1695
  "ports?": "unknown",
1688
1696
  "disable_tools?": "string[]",
1697
+ "runtime_type?": "string | null",
1698
+ "daemon_id?": "string | null",
1689
1699
  "match?": "unknown"
1690
1700
  });
1691
1701