@blade-hq/agent-kit 0.0.0-placeholder.0 → 0.4.4

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/README.md +66 -3
  2. package/dist/AskUserQuestionBlock-CjvG_pUY.d.ts +116 -0
  3. package/dist/SkillStatusBar-DItrW2vv.d.ts +203 -0
  4. package/dist/blade-client-nOsdVlb1.d.ts +1498 -0
  5. package/dist/client/index.d.ts +8036 -0
  6. package/dist/client/index.js +1057 -0
  7. package/dist/client/index.js.map +1 -0
  8. package/dist/licenses-Cxl1xGVy.d.ts +16 -0
  9. package/dist/projection-DIfyh6RK.d.ts +85 -0
  10. package/dist/react/api/licenses.d.ts +7 -0
  11. package/dist/react/api/licenses.js +1477 -0
  12. package/dist/react/api/licenses.js.map +1 -0
  13. package/dist/react/api/vibe-coding.d.ts +55 -0
  14. package/dist/react/api/vibe-coding.js +1503 -0
  15. package/dist/react/api/vibe-coding.js.map +1 -0
  16. package/dist/react/cards/register.d.ts +2 -0
  17. package/dist/react/cards/register.js +4367 -0
  18. package/dist/react/cards/register.js.map +1 -0
  19. package/dist/react/components/chat/index.d.ts +128 -0
  20. package/dist/react/components/chat/index.js +11389 -0
  21. package/dist/react/components/chat/index.js.map +1 -0
  22. package/dist/react/components/plan/index.d.ts +111 -0
  23. package/dist/react/components/plan/index.js +3490 -0
  24. package/dist/react/components/plan/index.js.map +1 -0
  25. package/dist/react/components/session/index.d.ts +53 -0
  26. package/dist/react/components/session/index.js +2175 -0
  27. package/dist/react/components/session/index.js.map +1 -0
  28. package/dist/react/components/workspace/index.d.ts +35 -0
  29. package/dist/react/components/workspace/index.js +2886 -0
  30. package/dist/react/components/workspace/index.js.map +1 -0
  31. package/dist/react/devtools/bridge-devtools/index.d.ts +36 -0
  32. package/dist/react/devtools/bridge-devtools/index.js +692 -0
  33. package/dist/react/devtools/bridge-devtools/index.js.map +1 -0
  34. package/dist/react/index.d.ts +1283 -0
  35. package/dist/react/index.js +14299 -0
  36. package/dist/react/index.js.map +1 -0
  37. package/dist/session-CDeiO81j.d.ts +128 -0
  38. package/package.json +73 -7
  39. package/index.js +0 -1
@@ -0,0 +1,128 @@
1
+ import { P as ParsedWhatIfPrompt } from '../../../SkillStatusBar-DItrW2vv.js';
2
+ export { C as ChatInput, a as ChatView, F as FileComposerAttachment, b as FileSizeLimitDialog, M as MessageList, S as SkillStatusBar } from '../../../SkillStatusBar-DItrW2vv.js';
3
+ import * as react from 'react';
4
+ import { ReactNode } from 'react';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
+ import { a as CompactionInfo, C as ChatMessage, A as AskUserAnswerData, T as ToolCallInfo } from '../../../AskUserQuestionBlock-CjvG_pUY.js';
7
+ export { b as AskUserQuestionBlock } from '../../../AskUserQuestionBlock-CjvG_pUY.js';
8
+ import { C as ContentBlock } from '../../../projection-DIfyh6RK.js';
9
+ import 'zustand';
10
+ import '../../../session-CDeiO81j.js';
11
+ import 'arktype/internal/variants/object.ts';
12
+ import 'arktype/internal/variants/string.ts';
13
+ import '../../../blade-client-nOsdVlb1.js';
14
+ import 'socket.io-client';
15
+
16
+ /**
17
+ * R6:用户上传的附件(文本 / 未知类型)预览弹窗。
18
+ *
19
+ * 图片走独立的 ImageLightbox;本组件处理:
20
+ * - .md → markdown 渲染
21
+ * - .json / .txt / .yaml / .yml / 其他文本 → 纯文本等宽展示
22
+ * - 不可在浏览器内渲染的类型 → 下载链接兜底
23
+ *
24
+ * 无 URL 时兜底为只显示文件名 + 下载入口。
25
+ */
26
+ interface Props$3 {
27
+ open: boolean;
28
+ onOpenChange: (open: boolean) => void;
29
+ filename: string;
30
+ /**
31
+ * 由调用方用 `getAuthedUrl()` 构造的完整 URL(baseUrl + 路径 + ?token=…)。
32
+ * 内部 fetch 直接用原串,**不**再走 `apiFetchText` —— 否则会二次拼 baseUrl,
33
+ * 在独立前后端部署时会得到形如 `http://api.xxxhttp://api.xxx/…` 的非法 URL。
34
+ * token 靠 query 字符串携带,因此也不需要再挂 Authorization header。
35
+ */
36
+ url: string | null;
37
+ /** text-like 视为"可文本预览";其他只显示下载按钮。 */
38
+ mode: "markdown" | "text" | "default";
39
+ }
40
+ declare function AttachmentPreviewDialog({ open, onOpenChange, filename, url, mode }: Props$3): react.ReactPortal | null;
41
+
42
+ interface ImageLightboxProps {
43
+ open: boolean;
44
+ onOpenChange: (open: boolean) => void;
45
+ images: {
46
+ src: string;
47
+ alt: string;
48
+ }[];
49
+ initialIndex?: number;
50
+ }
51
+ declare function ImageLightbox({ open, onOpenChange, images, initialIndex }: ImageLightboxProps): react.ReactPortal | null;
52
+
53
+ declare function CompactionCard({ sessionId, compaction, status, }: {
54
+ sessionId: string;
55
+ compaction?: CompactionInfo | null;
56
+ status?: "streaming" | "completed" | "paused" | "failed" | "interrupted";
57
+ }): react_jsx_runtime.JSX.Element | null;
58
+
59
+ interface Props$2 {
60
+ turnKey: string;
61
+ sessionId: string;
62
+ messages: ChatMessage[];
63
+ isStreaming?: boolean;
64
+ isLastTurn?: boolean;
65
+ askAnswers?: Record<string, AskUserAnswerData>;
66
+ onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
67
+ sessionStatus?: string;
68
+ level?: 1 | 2;
69
+ forceExpanded?: boolean;
70
+ }
71
+ declare function AssistantTurnBlock({ sessionId, messages: rawMessages, isStreaming, askAnswers, onAnswer, sessionStatus, level, forceExpanded, }: Props$2): react_jsx_runtime.JSX.Element;
72
+
73
+ type UserChatMessage = ChatMessage & {
74
+ role: "user";
75
+ };
76
+ type ErrorChatMessage = ChatMessage & {
77
+ role: "error";
78
+ };
79
+ declare function isUserMessage(message: ChatMessage): message is UserChatMessage;
80
+ declare function isErrorMessage(message: ChatMessage): message is ErrorChatMessage;
81
+ interface UserMessageProps {
82
+ message: UserChatMessage;
83
+ }
84
+ declare function UserMessageBubble({ message }: UserMessageProps): react_jsx_runtime.JSX.Element;
85
+ declare function ErrorMessageBlock({ message }: {
86
+ message: ErrorChatMessage;
87
+ }): react_jsx_runtime.JSX.Element;
88
+
89
+ interface Props$1 {
90
+ toolCall: ToolCallInfo;
91
+ onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
92
+ answered?: boolean;
93
+ answerData?: AskUserAnswerData;
94
+ sessionId?: string;
95
+ sessionStatus?: string;
96
+ level?: 1 | 2;
97
+ turnBlocks?: ContentBlock[];
98
+ reasoning?: string;
99
+ }
100
+ declare function ToolCallBlock({ toolCall, onAnswer, answered, answerData, sessionId: providedSessionId, sessionStatus, level, turnBlocks, reasoning, }: Props$1): react_jsx_runtime.JSX.Element;
101
+
102
+ interface Props {
103
+ parsed: ParsedWhatIfPrompt;
104
+ /** 点击引用 chip 时回调。如果未传,尝试从 WhatIfQuoteProvider 取;两者都无则 chip 不可点。 */
105
+ onQuoteClick?: (stepNumber: number) => void;
106
+ }
107
+ /**
108
+ * what-if 重跑 prompt 的紧凑展示:小徽章 + 步骤跳转 chip + 用户真正输入气泡。
109
+ * 原 prompt 里夹带的 snapshot markdown 不再全量展开——它们对 LLM 有用,
110
+ * 但对用户只会造成噪音;点 chip 可以跳到对应 step 卡查看。
111
+ */
112
+ declare function WhatIfUserBubble({ parsed, onQuoteClick }: Props): react_jsx_runtime.JSX.Element;
113
+
114
+ interface WhatIfQuoteContextValue {
115
+ onJumpToStep?: (stepNumber: number) => void;
116
+ }
117
+ /**
118
+ * Provide a callback used by `WhatIfUserBubble`'s quote chip to navigate to
119
+ * the corresponding step card. Host apps (ship-attack) mount this provider
120
+ * near the chat view and wire it to their step selector.
121
+ */
122
+ declare function WhatIfQuoteProvider({ onJumpToStep, children, }: {
123
+ onJumpToStep?: (stepNumber: number) => void;
124
+ children: ReactNode;
125
+ }): react_jsx_runtime.JSX.Element;
126
+ declare function useWhatIfQuoteContext(): WhatIfQuoteContextValue;
127
+
128
+ export { AssistantTurnBlock, AttachmentPreviewDialog, CompactionCard, ErrorMessageBlock, ImageLightbox, ToolCallBlock, UserMessageBubble, WhatIfQuoteProvider, WhatIfUserBubble, isErrorMessage, isUserMessage, useWhatIfQuoteContext };