@blade-hq/agent-kit 1.0.25 → 1.0.27
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.
- package/dist/{chunk-M45K3554.js → chunk-34GDDOWY.js} +5 -3
- package/dist/chunk-34GDDOWY.js.map +1 -0
- package/dist/chunk-7LEKQI47.js +32 -0
- package/dist/chunk-7LEKQI47.js.map +1 -0
- package/dist/{chunk-WPLEMYL7.js → chunk-C2FKVGJU.js} +2 -2
- package/dist/{chunk-4D4EXLVT.js → chunk-DQCXSPHP.js} +2 -2
- package/dist/{chunk-QODAKTG5.js → chunk-JCJFFJ42.js} +2 -31
- package/dist/chunk-JCJFFJ42.js.map +1 -0
- package/dist/{chunk-VJY6RLYU.js → chunk-JU5SL4HP.js} +2 -2
- package/dist/chunk-M72OL7ZJ.js +23 -0
- package/dist/chunk-M72OL7ZJ.js.map +1 -0
- package/dist/{chunk-WVXXQ3KM.js → chunk-SBASG3M2.js} +132 -102
- package/dist/chunk-SBASG3M2.js.map +1 -0
- package/dist/{chunk-XCIDE3JW.js → chunk-TE6G6NVX.js} +7 -7
- package/dist/{chunk-3I4ZURKH.js → chunk-X2NJKKXR.js} +15 -15
- package/dist/client/auth.d.ts +8 -0
- package/dist/client/blade-client.d.ts +80 -0
- package/dist/client/index.d.ts +22 -15348
- package/dist/client/index.js +1 -1
- package/dist/client/resources/api-keys.d.ts +28 -0
- package/dist/client/resources/auth.d.ts +26 -0
- package/dist/client/resources/env-buckets.d.ts +20 -0
- package/dist/client/resources/gis.d.ts +8 -0
- package/dist/client/resources/headless.d.ts +33 -0
- package/dist/client/resources/memories.d.ts +63 -0
- package/dist/client/resources/models.d.ts +23 -0
- package/dist/client/resources/published-apps.d.ts +8 -0
- package/dist/client/resources/registry.d.ts +58 -0
- package/dist/client/resources/runs.d.ts +8 -0
- package/dist/client/resources/scenarios.d.ts +49 -0
- package/dist/client/resources/sessions.d.ts +253 -0
- package/dist/client/resources/skills.d.ts +38 -0
- package/dist/client/resources/solutions.d.ts +31 -0
- package/dist/client/resources/user-preferences.d.ts +26 -0
- package/dist/client/rest.d.ts +19 -0
- package/dist/client/socket.d.ts +9 -0
- package/dist/client/types/index.d.ts +8 -0
- package/dist/client/types/rest.d.ts +15335 -0
- package/dist/client/types/sdk-profile.d.ts +47 -0
- package/dist/client/types/socket-events.d.ts +503 -0
- package/dist/react/api/api-keys.d.ts +6 -0
- package/dist/react/api/auth.d.ts +7 -0
- package/dist/react/api/client.d.ts +8 -0
- package/dist/react/api/env-buckets.d.ts +10 -0
- package/dist/react/api/gis-api.d.ts +4 -0
- package/dist/react/api/memories.d.ts +14 -0
- package/dist/react/api/models.d.ts +11 -0
- package/dist/react/api/partner-skill.d.ts +2 -0
- package/dist/react/api/prod-solution.d.ts +456 -0
- package/dist/react/api/published-apps.d.ts +21 -0
- package/dist/react/api/published-apps.js +14 -0
- package/dist/react/api/published-apps.js.map +1 -0
- package/dist/react/api/registry.d.ts +46 -0
- package/dist/react/api/scenarios.d.ts +9 -0
- package/dist/react/api/scheduled-tasks.d.ts +24 -0
- package/dist/react/api/session-skill.d.ts +2 -0
- package/dist/react/api/sessions.d.ts +109 -0
- package/dist/react/api/sessions.js +93 -0
- package/dist/react/api/sessions.js.map +1 -0
- package/dist/react/api/skills.d.ts +27 -0
- package/dist/react/api/socket.d.ts +5 -0
- package/dist/react/api/solutions.d.ts +11 -0
- package/dist/react/api/user-preferences.d.ts +8 -0
- package/dist/react/asr/VoiceWaveform.d.ts +10 -0
- package/dist/react/asr/use-tiptap-voice-input.d.ts +29 -0
- package/dist/react/asr/use-voice-input.d.ts +17 -0
- package/dist/react/asr/voice-input-support.d.ts +5 -0
- package/dist/react/bootstrap.d.ts +4 -0
- package/dist/react/cards/register.d.ts +1 -2
- package/dist/react/cards/register.js +3 -2
- package/dist/react/cards/register.js.map +1 -1
- package/dist/react/components/ai-elements/file-tree.d.ts +26 -0
- package/dist/react/components/ai-elements/reasoning.d.ts +32 -0
- package/dist/react/components/ai-elements/shimmer.d.ts +11 -0
- package/dist/react/components/card/CardCodeBlock.d.ts +5 -0
- package/dist/react/components/card/CardContext.d.ts +7 -0
- package/dist/react/components/card/CardRenderer.d.ts +7 -0
- package/dist/react/components/card/CardStates.d.ts +8 -0
- package/dist/react/components/card/cards/attraction-card.d.ts +2 -0
- package/dist/react/components/card/cards/cite-card.d.ts +10 -0
- package/dist/react/components/card/cards/comprehensive-analysis-card.d.ts +2 -0
- package/dist/react/components/card/cards/conflict-detection-card.d.ts +4 -0
- package/dist/react/components/card/cards/counter.d.ts +2 -0
- package/dist/react/components/card/cards/damage-effect-card.d.ts +4 -0
- package/dist/react/components/card/cards/destination-card.d.ts +2 -0
- package/dist/react/components/card/cards/diff-card.d.ts +2 -0
- package/dist/react/components/card/cards/execution-order-card.d.ts +2 -0
- package/dist/react/components/card/cards/experience-card-with-options.d.ts +4 -0
- package/dist/react/components/card/cards/flight-card.d.ts +2 -0
- package/dist/react/components/card/cards/hotel-card.d.ts +2 -0
- package/dist/react/components/card/cards/kill-chain-card.d.ts +2 -0
- package/dist/react/components/card/cards/kill-chain-types.d.ts +157 -0
- package/dist/react/components/card/cards/map-card.d.ts +2 -0
- package/dist/react/components/card/cards/order-status-card.d.ts +2 -0
- package/dist/react/components/card/cards/patch-card.d.ts +15 -0
- package/dist/react/components/card/cards/product-recommendation-card.d.ts +2 -0
- package/dist/react/components/card/cards/reflection-optimization-card.d.ts +2 -0
- package/dist/react/components/card/cards/resolution-modifications-card.d.ts +2 -0
- package/dist/react/components/card/cards/resolution-summary-card.d.ts +2 -0
- package/dist/react/components/card/cards/restaurant-card.d.ts +2 -0
- package/dist/react/components/card/cards/shopping-list-card.d.ts +2 -0
- package/dist/react/components/card/cards/simulation-event-card.d.ts +4 -0
- package/dist/react/components/card/cards/survival-effect-card.d.ts +4 -0
- package/dist/react/components/card/cards/travel-itinerary-card.d.ts +2 -0
- package/dist/react/components/card/register.d.ts +1 -0
- package/dist/react/components/chat/AgentLoopBlock.d.ts +8 -0
- package/dist/react/components/chat/AskUserQuestionBlock.d.ts +32 -0
- package/dist/react/components/chat/AssistantTurnBlock.d.ts +28 -0
- package/dist/react/components/chat/AttachmentPreviewDialog.d.ts +26 -0
- package/dist/react/components/chat/BackgroundTasksPill.d.ts +3 -0
- package/dist/react/components/chat/ChatInput.d.ts +94 -0
- package/dist/react/components/chat/ChatView.d.ts +16 -0
- package/dist/react/components/chat/CompactionCard.d.ts +6 -0
- package/dist/react/components/chat/ConnectionBanner.d.ts +1 -0
- package/dist/react/components/chat/FileCompletionMenu.d.ts +13 -0
- package/dist/react/components/chat/FileSizeLimitDialog.d.ts +9 -0
- package/dist/react/components/chat/ImageLightbox.d.ts +11 -0
- package/dist/react/components/chat/MessageActions.d.ts +6 -0
- package/dist/react/components/chat/MessageContextPills.d.ts +6 -0
- package/dist/react/components/chat/MessageFileAttachmentList.d.ts +13 -0
- package/dist/react/components/chat/MessageList.d.ts +13 -0
- package/dist/react/components/chat/ProgressCircle.d.ts +12 -0
- package/dist/react/components/chat/RenderErrorBoundary.d.ts +19 -0
- package/dist/react/components/chat/ResourceIframe.d.ts +5 -0
- package/dist/react/components/chat/Shimmer.d.ts +6 -0
- package/dist/react/components/chat/SkillCompletionMenu.d.ts +9 -0
- package/dist/react/components/chat/SkillStatusBar.d.ts +8 -0
- package/dist/react/components/chat/StickyStatusBar.d.ts +10 -0
- package/dist/react/components/chat/TextAttachmentPills.d.ts +10 -0
- package/dist/react/components/chat/ThinkingToggle.d.ts +7 -0
- package/dist/react/components/chat/ToolCallBlock.d.ts +18 -0
- package/dist/react/components/chat/TurnNavRail.d.ts +11 -0
- package/dist/react/components/chat/UserMessageBubble.d.ts +20 -0
- package/dist/react/components/chat/WhatIfUserBubble.d.ts +13 -0
- package/dist/react/components/chat/customization.d.ts +82 -0
- package/dist/react/components/chat/display-utils.d.ts +35 -0
- package/dist/react/components/chat/extensions/file-mention.d.ts +12 -0
- package/dist/react/components/chat/extensions/skill-mention.d.ts +25 -0
- package/dist/react/components/chat/index.d.ts +16 -115
- package/dist/react/components/chat/index.js +8 -7
- package/dist/react/components/chat/tool-renderers/BashRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/FileEditRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/FileReadRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/SearchRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/SubmitResultRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/registry.d.ts +9 -0
- package/dist/react/components/chat/tool-renderers/shared.d.ts +26 -0
- package/dist/react/components/chat/whatif-quote-context.d.ts +15 -0
- package/dist/react/components/markdown/ExternalLinkDialog.d.ts +8 -0
- package/dist/react/components/markdown/FileCardComponent.d.ts +10 -0
- package/dist/react/components/markdown/MarkdownContent.d.ts +19 -0
- package/dist/react/components/model/ModelSelector.d.ts +9 -0
- package/dist/react/components/plan/PlanSummaryCard.d.ts +8 -0
- package/dist/react/components/plan/PlanVisualization.d.ts +13 -0
- package/dist/react/components/plan/debug-log.d.ts +21 -0
- package/dist/react/components/plan/extract-plan-messages.d.ts +2 -0
- package/dist/react/components/plan/index.d.ts +6 -110
- package/dist/react/components/plan/index.js +7 -6
- package/dist/react/components/plan/index.js.map +1 -1
- package/dist/react/components/plan/parse-plan-messages.d.ts +10 -0
- package/dist/react/components/plan/parse-plan-tree.d.ts +16 -0
- package/dist/react/components/plan/phases/PlanMindMap.d.ts +8 -0
- package/dist/react/components/plan/phases/PlanStatusIcon.d.ts +5 -0
- package/dist/react/components/plan/phases/PlanTree.d.ts +8 -0
- package/dist/react/components/plan/phases/SkillAnalysis.d.ts +7 -0
- package/dist/react/components/plan/phases/SkillDiscovery.d.ts +10 -0
- package/dist/react/components/plan/types.d.ts +56 -0
- package/dist/react/components/session/SessionDetail.d.ts +8 -0
- package/dist/react/components/session/SessionList.d.ts +9 -0
- package/dist/react/components/session/SessionListItem.d.ts +8 -0
- package/dist/react/components/session/StatusBadge.d.ts +3 -0
- package/dist/react/components/session/index.d.ts +5 -53
- package/dist/react/components/session/index.js +6 -5
- package/dist/react/components/session/index.js.map +1 -1
- package/dist/react/components/session/session-utils.d.ts +19 -0
- package/dist/react/components/ui/collapsible.d.ts +5 -0
- package/dist/react/components/workspace/FileTree.d.ts +21 -0
- package/dist/react/components/workspace/WorkspaceFilesPanel.d.ts +30 -0
- package/dist/react/components/workspace/file-icon-assets.d.ts +3 -0
- package/dist/react/components/workspace/index.d.ts +2 -59
- package/dist/react/components/workspace/index.js +6 -5
- package/dist/react/components/workspace/index.js.map +1 -1
- package/dist/react/context.d.ts +2 -0
- package/dist/react/devtools/bridge-devtools/BridgeDevtoolsFab.d.ts +1 -0
- package/dist/react/devtools/bridge-devtools/index.d.ts +3 -36
- package/dist/react/devtools/bridge-devtools/mount.d.ts +1 -0
- package/dist/react/devtools/bridge-devtools/store.d.ts +15 -0
- package/dist/react/devtools/bridge-devtools/tap.d.ts +5 -0
- package/dist/react/devtools/bridge-devtools/types.d.ts +29 -0
- package/dist/react/hooks/use-background-tasks.d.ts +7 -0
- package/dist/react/hooks/use-card-state.d.ts +1 -0
- package/dist/react/hooks/use-chat.d.ts +13 -0
- package/dist/react/hooks/use-check-skill-file.d.ts +4 -0
- package/dist/react/hooks/use-check-solution-file.d.ts +4 -0
- package/dist/react/hooks/use-context-stats.d.ts +7 -0
- package/dist/react/hooks/use-gis.d.ts +17 -0
- package/dist/react/hooks/use-global-skill-stats.d.ts +6 -0
- package/dist/react/hooks/use-input-history.d.ts +7 -0
- package/dist/react/hooks/use-model-preferences.d.ts +17 -0
- package/dist/react/hooks/use-registry.d.ts +53 -0
- package/dist/react/hooks/use-resolved-model.d.ts +5 -0
- package/dist/react/hooks/use-session.d.ts +10 -0
- package/dist/react/hooks/use-skill-stats.d.ts +7 -0
- package/dist/react/hooks/use-skills.d.ts +6 -0
- package/dist/react/hooks/use-token-pressure.d.ts +6 -0
- package/dist/react/index.d.ts +121 -2034
- package/dist/react/index.js +47 -52
- package/dist/react/index.js.map +1 -1
- package/dist/react/lib/analytics.d.ts +7 -0
- package/dist/react/lib/attachment-upload.d.ts +10 -0
- package/dist/react/lib/card-registry.d.ts +35 -0
- package/dist/react/lib/chat.d.ts +48 -0
- package/dist/react/lib/code-highlight.d.ts +9 -0
- package/dist/react/lib/html-element-selection.d.ts +140 -0
- package/dist/react/lib/html-source-locator.d.ts +16 -0
- package/dist/react/lib/open-session-file.d.ts +2 -0
- package/dist/react/lib/parent-bridge.d.ts +22 -0
- package/dist/react/lib/preview-dispatch.d.ts +24 -0
- package/dist/react/lib/resource-bridge.d.ts +11 -0
- package/dist/react/lib/session-file-preview.d.ts +8 -0
- package/dist/react/lib/step-ranges.d.ts +42 -0
- package/dist/react/lib/tool-preview.d.ts +2 -0
- package/dist/react/lib/ui-meta.d.ts +9 -0
- package/dist/react/lib/utils.d.ts +3 -0
- package/dist/react/lib/whatif-prompt.d.ts +45 -0
- package/dist/react/projection/builder.d.ts +59 -0
- package/dist/react/projection/helpers.d.ts +34 -0
- package/dist/react/projection/index.d.ts +2 -0
- package/dist/react/projection/state.d.ts +22 -0
- package/dist/react/provider.d.ts +8 -0
- package/dist/react/routes.d.ts +1 -0
- package/dist/react/schemas/background.d.ts +16 -0
- package/dist/react/schemas/event.d.ts +51 -0
- package/dist/react/schemas/gis.d.ts +50 -0
- package/dist/{AskUserQuestionBlock---kOTouk.d.ts → react/schemas/message.d.ts} +15 -48
- package/dist/react/schemas/partner-skill.d.ts +46 -0
- package/dist/{projection-BWYEFYNn.d.ts → react/schemas/projection.d.ts} +12 -10
- package/dist/react/schemas/published-apps.d.ts +38 -0
- package/dist/react/schemas/scheduled-task.d.ts +32 -0
- package/dist/react/schemas/session.d.ts +121 -0
- package/dist/react/schemas/skill.d.ts +50 -0
- package/dist/react/schemas/studio/agent.d.ts +12 -0
- package/dist/react/schemas/studio/database.d.ts +39 -0
- package/dist/react/schemas/studio/env.d.ts +7 -0
- package/dist/react/schemas/studio/knowledge.d.ts +18 -0
- package/dist/react/schemas/studio/resource-base.d.ts +7 -0
- package/dist/react/schemas/studio/scene.d.ts +12 -0
- package/dist/react/schemas/studio/tool.d.ts +25 -0
- package/dist/react/schemas/task.d.ts +12 -0
- package/dist/react/sockets/event-bridge.d.ts +115 -0
- package/dist/react/sockets/socket-state.d.ts +4 -0
- package/dist/react/stores/answer-callback-store.d.ts +9 -0
- package/dist/react/stores/auth-store.d.ts +38 -0
- package/dist/react/stores/background-store.d.ts +13 -0
- package/dist/react/stores/card-state-store.d.ts +10 -0
- package/dist/react/stores/chat-store.d.ts +34 -0
- package/dist/react/stores/client-aware.d.ts +7 -0
- package/dist/react/stores/connection-store.d.ts +14 -0
- package/dist/react/stores/gis-store.d.ts +19 -0
- package/dist/react/stores/index.d.ts +14 -0
- package/dist/react/stores/runtime-features-store.d.ts +21 -0
- package/dist/react/stores/runtime-store.d.ts +18 -0
- package/dist/react/stores/session-store.d.ts +44 -0
- package/dist/react/stores/task-store.d.ts +9 -0
- package/dist/react/stores/ui-bridge-store.d.ts +32 -0
- package/dist/react/stores/ui-store.d.ts +69 -0
- package/dist/react/types/index.d.ts +7 -0
- package/dist/react/types/solution.d.ts +101 -0
- package/package.json +41 -11
- package/dist/SkillStatusBar-U6fbQxMu.d.ts +0 -340
- package/dist/blade-client-qTOovekU.d.ts +0 -1609
- package/dist/chunk-M45K3554.js.map +0 -1
- package/dist/chunk-QODAKTG5.js.map +0 -1
- package/dist/chunk-WVXXQ3KM.js.map +0 -1
- package/dist/session-CNnotR90.d.ts +0 -227
- package/dist/sessions-BvfLGbjw.d.ts +0 -177
- /package/dist/{chunk-WPLEMYL7.js.map → chunk-C2FKVGJU.js.map} +0 -0
- /package/dist/{chunk-4D4EXLVT.js.map → chunk-DQCXSPHP.js.map} +0 -0
- /package/dist/{chunk-VJY6RLYU.js.map → chunk-JU5SL4HP.js.map} +0 -0
- /package/dist/{chunk-XCIDE3JW.js.map → chunk-TE6G6NVX.js.map} +0 -0
- /package/dist/{chunk-3I4ZURKH.js.map → chunk-X2NJKKXR.js.map} +0 -0
package/dist/client/index.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { BladeClient } from "../blade-client.js";
|
|
2
|
+
export interface ApiKeyPublic {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
masked: string;
|
|
6
|
+
created_at: string;
|
|
7
|
+
last_used_at: string | null;
|
|
8
|
+
/**
|
|
9
|
+
* 完整 key 原文。后端按 #761 设计存明文,支持反复获取;存量 hash-only 行为 null。
|
|
10
|
+
*/
|
|
11
|
+
plaintext: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* 只读行(如经 bo 经纪人下发的 GIT_ACCESS_TOKEN):UI 只给复制,不给改名/撤销。
|
|
14
|
+
*/
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ApiKeyCreateResponse {
|
|
18
|
+
key: ApiKeyPublic;
|
|
19
|
+
plaintext: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class ApiKeysResource {
|
|
22
|
+
private client;
|
|
23
|
+
constructor(client: BladeClient);
|
|
24
|
+
listApiKeys(): Promise<ApiKeyPublic[]>;
|
|
25
|
+
createApiKey(name: string): Promise<ApiKeyCreateResponse>;
|
|
26
|
+
renameApiKey(id: string, name: string): Promise<ApiKeyPublic>;
|
|
27
|
+
deleteApiKey(id: string): Promise<void>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { BladeClient } from "../blade-client.js";
|
|
2
|
+
export interface UserInfo {
|
|
3
|
+
id: string;
|
|
4
|
+
username: string;
|
|
5
|
+
display_name?: string | null;
|
|
6
|
+
avatar_url: string | null;
|
|
7
|
+
token: string;
|
|
8
|
+
auth_type: "casdoor";
|
|
9
|
+
is_admin?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ProvidersResponse {
|
|
12
|
+
providers: Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
authorize_url: string;
|
|
15
|
+
}>;
|
|
16
|
+
password_enabled: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class AuthResource {
|
|
19
|
+
private client;
|
|
20
|
+
constructor(client: BladeClient);
|
|
21
|
+
getProviders(): Promise<ProvidersResponse>;
|
|
22
|
+
getMe(): Promise<UserInfo>;
|
|
23
|
+
logout(): Promise<{
|
|
24
|
+
logout_url: string;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BladeClient } from "../blade-client.js";
|
|
2
|
+
export interface EnvBucket {
|
|
3
|
+
bucket: string;
|
|
4
|
+
env: Record<string, string>;
|
|
5
|
+
}
|
|
6
|
+
export interface PlatformEnvBucket {
|
|
7
|
+
env: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
export declare class EnvBucketsResource {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: BladeClient);
|
|
12
|
+
listEnvBuckets(): Promise<EnvBucket[]>;
|
|
13
|
+
getEnvBucket(bucket: string): Promise<EnvBucket>;
|
|
14
|
+
setEnvBucket(bucket: string, env: Record<string, string>): Promise<EnvBucket>;
|
|
15
|
+
deleteEnvBucket(bucket: string): Promise<void>;
|
|
16
|
+
getPlatformEnv(): Promise<PlatformEnvBucket>;
|
|
17
|
+
getPlatformEnvReadonly(): Promise<PlatformEnvBucket>;
|
|
18
|
+
setPlatformEnv(env: Record<string, string>): Promise<PlatformEnvBucket>;
|
|
19
|
+
deletePlatformEnv(): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GisState, RuntimeConfig } from "../../react/schemas/gis.js";
|
|
2
|
+
import type { BladeClient } from "../blade-client.js";
|
|
3
|
+
export declare class GisResource {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: BladeClient);
|
|
6
|
+
fetchGisState(sessionId: string, init?: RequestInit): Promise<GisState>;
|
|
7
|
+
fetchRuntimeConfig(init?: RequestInit): Promise<RuntimeConfig>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { BladeClient } from "../blade-client.js";
|
|
2
|
+
export type JsonSchemaObject = Record<string, unknown>;
|
|
3
|
+
export interface HeadlessRunOptions {
|
|
4
|
+
schema?: JsonSchemaObject | null;
|
|
5
|
+
model?: string | null;
|
|
6
|
+
timeoutMs?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface HeadlessRunInSessionResult<T = unknown> {
|
|
9
|
+
session_id: string;
|
|
10
|
+
chat_run_id: string | null;
|
|
11
|
+
result: T | string;
|
|
12
|
+
}
|
|
13
|
+
export declare class HeadlessError extends Error {
|
|
14
|
+
readonly detail?: unknown;
|
|
15
|
+
constructor(message: string, detail?: unknown);
|
|
16
|
+
}
|
|
17
|
+
export declare class HeadlessResource {
|
|
18
|
+
private client;
|
|
19
|
+
constructor(client: BladeClient);
|
|
20
|
+
run<T = unknown>(prompt: string, options: HeadlessRunOptions & {
|
|
21
|
+
schema: JsonSchemaObject;
|
|
22
|
+
}): Promise<T>;
|
|
23
|
+
run(prompt: string, options?: HeadlessRunOptions): Promise<string>;
|
|
24
|
+
runInSession<T = unknown>(sessionId: string, prompt: string, options: HeadlessRunOptions & {
|
|
25
|
+
schema: JsonSchemaObject;
|
|
26
|
+
}): Promise<T>;
|
|
27
|
+
runInSession(sessionId: string, prompt: string, options?: HeadlessRunOptions): Promise<string>;
|
|
28
|
+
runWithSession<T = unknown>(prompt: string, options: HeadlessRunOptions & {
|
|
29
|
+
schema: JsonSchemaObject;
|
|
30
|
+
}): Promise<HeadlessRunInSessionResult<T>>;
|
|
31
|
+
runWithSession(prompt: string, options?: HeadlessRunOptions): Promise<HeadlessRunInSessionResult<string>>;
|
|
32
|
+
private runTracked;
|
|
33
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { BladeClient } from "../blade-client.js";
|
|
2
|
+
export interface Memory {
|
|
3
|
+
id: number;
|
|
4
|
+
type: "feedback" | "experience";
|
|
5
|
+
content: string;
|
|
6
|
+
skill_name: string | null;
|
|
7
|
+
record_type: "memory" | "skill_comment" | null;
|
|
8
|
+
scope: string | null;
|
|
9
|
+
owner: string | null;
|
|
10
|
+
topic: string | null;
|
|
11
|
+
mem0_id: string | null;
|
|
12
|
+
superseded_by: number | null;
|
|
13
|
+
write_reason: string | null;
|
|
14
|
+
created_at: string;
|
|
15
|
+
updated_at: string | null;
|
|
16
|
+
hit_count: number;
|
|
17
|
+
last_hit_at: string | null;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
source_session: string;
|
|
20
|
+
}
|
|
21
|
+
export interface MemoryListResponse {
|
|
22
|
+
items: Memory[];
|
|
23
|
+
total: number;
|
|
24
|
+
}
|
|
25
|
+
export interface MemoryListParams {
|
|
26
|
+
keyword?: string;
|
|
27
|
+
skill_name?: string;
|
|
28
|
+
type?: string;
|
|
29
|
+
record_type?: string;
|
|
30
|
+
scope?: string;
|
|
31
|
+
owner?: string;
|
|
32
|
+
topic?: string;
|
|
33
|
+
status?: string;
|
|
34
|
+
offset?: number;
|
|
35
|
+
limit?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface MemoryCreateBody {
|
|
38
|
+
content: string;
|
|
39
|
+
type?: "feedback" | "experience";
|
|
40
|
+
skill_name?: string | null;
|
|
41
|
+
record_type?: "memory" | "skill_comment" | null;
|
|
42
|
+
scope?: string | null;
|
|
43
|
+
owner?: string | null;
|
|
44
|
+
topic?: string | null;
|
|
45
|
+
mem0_id?: string | null;
|
|
46
|
+
write_reason?: string | null;
|
|
47
|
+
}
|
|
48
|
+
export declare class MemoriesResource {
|
|
49
|
+
private client;
|
|
50
|
+
constructor(client: BladeClient);
|
|
51
|
+
createMemory(body: MemoryCreateBody): Promise<Memory>;
|
|
52
|
+
listMemories(params?: MemoryListParams): Promise<MemoryListResponse>;
|
|
53
|
+
getMemory(id: number): Promise<Memory>;
|
|
54
|
+
updateMemory(id: number, body: Partial<MemoryCreateBody>): Promise<Memory>;
|
|
55
|
+
patchMemory(id: number, disabled: boolean): Promise<Memory>;
|
|
56
|
+
deleteMemory(id: number): Promise<{
|
|
57
|
+
ok: boolean;
|
|
58
|
+
}>;
|
|
59
|
+
batchMemories(action: "delete" | "disable" | "enable", ids: number[]): Promise<{
|
|
60
|
+
ok: boolean;
|
|
61
|
+
count: number;
|
|
62
|
+
}>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BladeClient } from "../blade-client.js";
|
|
2
|
+
export declare const ModelOption: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
inputModalities?: string[] | undefined;
|
|
6
|
+
supportsImage?: boolean | undefined;
|
|
7
|
+
}, {}>;
|
|
8
|
+
export type ModelOption = typeof ModelOption.infer;
|
|
9
|
+
export declare const ModelsConfig: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
10
|
+
default: string;
|
|
11
|
+
models: {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
inputModalities?: string[] | undefined;
|
|
15
|
+
supportsImage?: boolean | undefined;
|
|
16
|
+
}[];
|
|
17
|
+
}, {}>;
|
|
18
|
+
export type ModelsConfig = typeof ModelsConfig.infer;
|
|
19
|
+
export declare class ModelsResource {
|
|
20
|
+
private client;
|
|
21
|
+
constructor(client: BladeClient);
|
|
22
|
+
getModelsConfig(init?: RequestInit): Promise<ModelsConfig>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PublishedApp, UnpublishAppResponse } from "../../react/schemas/published-apps.js";
|
|
2
|
+
import type { BladeClient } from "../blade-client.js";
|
|
3
|
+
export declare class PublishedAppsResource {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: BladeClient);
|
|
6
|
+
listPublishedApps(): Promise<PublishedApp[]>;
|
|
7
|
+
unpublishApp(sessionId: string, appName?: string): Promise<UnpublishAppResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AgentResource } from "../../react/schemas/studio/agent.js";
|
|
2
|
+
import type { DatabaseResource } from "../../react/schemas/studio/database.js";
|
|
3
|
+
import type { KnowledgeResource } from "../../react/schemas/studio/knowledge.js";
|
|
4
|
+
import type { ToolResource } from "../../react/schemas/studio/tool.js";
|
|
5
|
+
import type { BladeClient } from "../blade-client.js";
|
|
6
|
+
export declare const REGISTRY_PREFIX = "/api-registry";
|
|
7
|
+
type RawResourceResponse = {
|
|
8
|
+
id: number | string;
|
|
9
|
+
type: string;
|
|
10
|
+
subtype: string;
|
|
11
|
+
driver?: string | null;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
tags: string[];
|
|
15
|
+
config: Record<string, unknown>;
|
|
16
|
+
status?: string | null;
|
|
17
|
+
status_message?: string | null;
|
|
18
|
+
last_checked_at?: string | null;
|
|
19
|
+
extra?: Record<string, unknown>;
|
|
20
|
+
capabilities?: string[];
|
|
21
|
+
actions?: unknown[];
|
|
22
|
+
created_at?: string;
|
|
23
|
+
updated_at?: string;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
export declare function normalizeResource<T extends Record<string, unknown>>(raw: RawResourceResponse): T;
|
|
27
|
+
export type ResourceApi<T extends Record<string, unknown>> = {
|
|
28
|
+
list(init?: RequestInit): Promise<T[]>;
|
|
29
|
+
get(id: string, init?: RequestInit): Promise<T>;
|
|
30
|
+
create(data: Partial<T>, init?: RequestInit): Promise<T>;
|
|
31
|
+
update(id: string, data: Partial<T>, init?: RequestInit): Promise<T>;
|
|
32
|
+
delete(id: string, init?: RequestInit): Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
export type SkillOrgOption = {
|
|
35
|
+
id: string;
|
|
36
|
+
display_name: string;
|
|
37
|
+
kind: "personal" | "org";
|
|
38
|
+
is_mine: boolean;
|
|
39
|
+
};
|
|
40
|
+
export type SkillOrgListResponse = {
|
|
41
|
+
orgs: string[];
|
|
42
|
+
org_options?: SkillOrgOption[];
|
|
43
|
+
};
|
|
44
|
+
export declare class RegistryResource {
|
|
45
|
+
private client;
|
|
46
|
+
readonly databaseApi: ResourceApi<DatabaseResource>;
|
|
47
|
+
readonly toolApi: ResourceApi<ToolResource>;
|
|
48
|
+
readonly knowledgeApi: ResourceApi<KnowledgeResource>;
|
|
49
|
+
readonly agentApi: ResourceApi<AgentResource>;
|
|
50
|
+
constructor(client: BladeClient);
|
|
51
|
+
createResourceApi<T extends Record<string, unknown>>(apiType: string): ResourceApi<T>;
|
|
52
|
+
listSkillOrgs(): Promise<SkillOrgListResponse>;
|
|
53
|
+
publishSkill(sessionId: string, org: string): Promise<{
|
|
54
|
+
success: boolean;
|
|
55
|
+
skill_id: string;
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BladeClient } from "../blade-client.js";
|
|
2
|
+
import type { RunOptions, RunResult, RunTrace } from "../types/sdk-profile.js";
|
|
3
|
+
export declare class RunsResource {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: BladeClient);
|
|
6
|
+
run(sessionId: string, message: string, options?: RunOptions): Promise<RunResult>;
|
|
7
|
+
collectTrace(run: RunResult): Promise<RunTrace>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { BladeClient } from "../blade-client.js";
|
|
2
|
+
export interface PreviewUrlItem {
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export interface QuickScenario {
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
prompt_template: string;
|
|
10
|
+
skills: string[];
|
|
11
|
+
preview_urls: PreviewUrlItem[];
|
|
12
|
+
init_script: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
created_at: string;
|
|
15
|
+
updated_at: string;
|
|
16
|
+
}
|
|
17
|
+
export interface BladeHubScenarioResource {
|
|
18
|
+
resource_id: string;
|
|
19
|
+
resource_name: string;
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
prompt_template: string;
|
|
23
|
+
skills: string[];
|
|
24
|
+
preview_urls: PreviewUrlItem[];
|
|
25
|
+
init_script: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
raw?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
export interface CreateQuickScenarioPayload {
|
|
30
|
+
name: string;
|
|
31
|
+
prompt_template?: string;
|
|
32
|
+
skills?: string[];
|
|
33
|
+
preview_urls?: PreviewUrlItem[];
|
|
34
|
+
init_script?: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface UpdateQuickScenarioPayload extends CreateQuickScenarioPayload {
|
|
38
|
+
}
|
|
39
|
+
export declare class ScenariosResource {
|
|
40
|
+
private client;
|
|
41
|
+
constructor(client: BladeClient);
|
|
42
|
+
listQuickScenarios(init?: RequestInit): Promise<QuickScenario[]>;
|
|
43
|
+
createQuickScenario(payload: CreateQuickScenarioPayload, init?: RequestInit): Promise<QuickScenario>;
|
|
44
|
+
deleteQuickScenario(scenarioId: number, init?: RequestInit): Promise<{
|
|
45
|
+
ok: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
updateQuickScenario(scenarioId: number, payload: UpdateQuickScenarioPayload, init?: RequestInit): Promise<QuickScenario>;
|
|
48
|
+
listBladeHubScenarioResources(limit?: number, init?: RequestInit): Promise<BladeHubScenarioResource[]>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import type { BackgroundTask } from "../../react/schemas/background.js";
|
|
2
|
+
import type { TurnProjection } from "../../react/schemas/projection.js";
|
|
3
|
+
import type { SessionDetail, SessionInfo, TemplateId } from "../../react/schemas/session.js";
|
|
4
|
+
import type { Task } from "../../react/schemas/task.js";
|
|
5
|
+
import type { BladeClient, UploadProgress } from "../blade-client.js";
|
|
6
|
+
import type { SessionProfile } from "../types/sdk-profile.js";
|
|
7
|
+
export interface CreateSessionRequest {
|
|
8
|
+
intent?: string;
|
|
9
|
+
template_id?: TemplateId;
|
|
10
|
+
solution_id?: string;
|
|
11
|
+
biz_role_id?: string | null;
|
|
12
|
+
primary_skill_id?: string | null;
|
|
13
|
+
model?: string | null;
|
|
14
|
+
enable_thinking?: boolean | null;
|
|
15
|
+
memory_enabled?: boolean | null;
|
|
16
|
+
env?: Record<string, string>;
|
|
17
|
+
disable_tools?: string[] | null;
|
|
18
|
+
session_solution_asset_id?: string | null;
|
|
19
|
+
compaction_ratio?: number | null;
|
|
20
|
+
}
|
|
21
|
+
export interface CheckpointNode {
|
|
22
|
+
id: string;
|
|
23
|
+
parent_id: string | null;
|
|
24
|
+
content_preview: string;
|
|
25
|
+
content: string;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
}
|
|
28
|
+
export type ContentPart = {
|
|
29
|
+
type: "text";
|
|
30
|
+
text: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: "image_url";
|
|
33
|
+
image_url: {
|
|
34
|
+
url: string;
|
|
35
|
+
detail?: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export interface HistoryNode {
|
|
39
|
+
id: string;
|
|
40
|
+
parent_id: string | null;
|
|
41
|
+
kind: string;
|
|
42
|
+
role: string;
|
|
43
|
+
timestamp: string;
|
|
44
|
+
preview: string;
|
|
45
|
+
content: string | ContentPart[];
|
|
46
|
+
tool_calls: Array<{
|
|
47
|
+
id?: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
function?: {
|
|
50
|
+
name?: string;
|
|
51
|
+
arguments?: string;
|
|
52
|
+
};
|
|
53
|
+
}> | null;
|
|
54
|
+
usage: {
|
|
55
|
+
prompt_tokens?: number;
|
|
56
|
+
completion_tokens?: number;
|
|
57
|
+
total_tokens?: number;
|
|
58
|
+
} | null;
|
|
59
|
+
total_tokens: number;
|
|
60
|
+
token_diff: number;
|
|
61
|
+
is_deprecated: boolean;
|
|
62
|
+
loop_name: string;
|
|
63
|
+
}
|
|
64
|
+
export interface SessionHistory {
|
|
65
|
+
nodes: HistoryNode[];
|
|
66
|
+
active_branch: string | null;
|
|
67
|
+
branches: string[];
|
|
68
|
+
system_prompt_tokens?: number | null;
|
|
69
|
+
tools_tokens?: number | null;
|
|
70
|
+
tokenizer_model?: string | null;
|
|
71
|
+
}
|
|
72
|
+
export interface TokenizeResult {
|
|
73
|
+
model: string;
|
|
74
|
+
prompt_tokens: number;
|
|
75
|
+
prompt: string;
|
|
76
|
+
}
|
|
77
|
+
export interface PaginatedSessionsResult {
|
|
78
|
+
items: SessionInfo[];
|
|
79
|
+
total: number;
|
|
80
|
+
limit: number;
|
|
81
|
+
offset: number;
|
|
82
|
+
content_match_truncated?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export interface SkillDevSession {
|
|
85
|
+
session: SessionInfo;
|
|
86
|
+
skill_id: string;
|
|
87
|
+
display_name: string;
|
|
88
|
+
skill_description: string;
|
|
89
|
+
}
|
|
90
|
+
export interface ShareLinkResult {
|
|
91
|
+
token: string;
|
|
92
|
+
url: string;
|
|
93
|
+
expires_at: string | null;
|
|
94
|
+
}
|
|
95
|
+
export interface SessionContextStats {
|
|
96
|
+
tokens_used: number;
|
|
97
|
+
context_window: number;
|
|
98
|
+
compaction_ratio: number;
|
|
99
|
+
}
|
|
100
|
+
export interface FileEntry {
|
|
101
|
+
name: string;
|
|
102
|
+
path: string;
|
|
103
|
+
is_dir: boolean;
|
|
104
|
+
created_at: number;
|
|
105
|
+
tags?: string[];
|
|
106
|
+
}
|
|
107
|
+
export type UploadFileEntry = File | {
|
|
108
|
+
file: File;
|
|
109
|
+
name: string;
|
|
110
|
+
};
|
|
111
|
+
export interface UploadFilesOptions {
|
|
112
|
+
onProgress?: (progress: UploadProgress) => void;
|
|
113
|
+
}
|
|
114
|
+
export interface ImportPreviewSkill {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
path: string;
|
|
118
|
+
}
|
|
119
|
+
export interface ImportPreviewScenario {
|
|
120
|
+
scenario?: {
|
|
121
|
+
name?: string;
|
|
122
|
+
};
|
|
123
|
+
skills?: string[];
|
|
124
|
+
preview_urls?: string[];
|
|
125
|
+
init_script?: string;
|
|
126
|
+
generated_at?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface ImportPreview {
|
|
129
|
+
user_messages: string[];
|
|
130
|
+
turn_count: number;
|
|
131
|
+
skills: ImportPreviewSkill[];
|
|
132
|
+
scenario: ImportPreviewScenario | null;
|
|
133
|
+
}
|
|
134
|
+
export declare class SessionsResource {
|
|
135
|
+
private client;
|
|
136
|
+
constructor(client: BladeClient);
|
|
137
|
+
private fetchSessionsPage;
|
|
138
|
+
listSessions(template_id_prefix?: string, solution_id?: string): Promise<SessionInfo[]>;
|
|
139
|
+
listSessionsPaginated(params: {
|
|
140
|
+
limit: number;
|
|
141
|
+
offset: number;
|
|
142
|
+
template_id_prefix?: string;
|
|
143
|
+
solution_id?: string;
|
|
144
|
+
q?: string;
|
|
145
|
+
}): Promise<PaginatedSessionsResult>;
|
|
146
|
+
listSessionsWithSkillData(): Promise<SkillDevSession[]>;
|
|
147
|
+
createSession(intent?: string, template_id?: TemplateId, primary_skill_id?: string | null): Promise<{
|
|
148
|
+
session_id: string;
|
|
149
|
+
}>;
|
|
150
|
+
createSessionWithRequest(request: CreateSessionRequest): Promise<{
|
|
151
|
+
session_id: string;
|
|
152
|
+
}>;
|
|
153
|
+
createWithProfile(params: {
|
|
154
|
+
intent: string;
|
|
155
|
+
profile: SessionProfile;
|
|
156
|
+
}): Promise<{
|
|
157
|
+
session_id: string;
|
|
158
|
+
}>;
|
|
159
|
+
getSession(sessionId: string, init?: RequestInit): Promise<SessionDetail>;
|
|
160
|
+
updateSession(sessionId: string, payload: {
|
|
161
|
+
intent?: string;
|
|
162
|
+
}): Promise<SessionDetail>;
|
|
163
|
+
setSessionEnv(sessionId: string, env: Record<string, string>): Promise<SessionDetail>;
|
|
164
|
+
pinSession(sessionId: string, pinned: boolean): Promise<SessionInfo>;
|
|
165
|
+
startReplaySession(sourceSessionId: string, speed?: 1 | 2 | 5): Promise<{
|
|
166
|
+
session_id: string;
|
|
167
|
+
}>;
|
|
168
|
+
updateReplaySession(sessionId: string, payload: {
|
|
169
|
+
speed?: 1 | 2 | 5;
|
|
170
|
+
status?: "autonomous";
|
|
171
|
+
}): Promise<{
|
|
172
|
+
replay_state: SessionInfo["replay_state"];
|
|
173
|
+
}>;
|
|
174
|
+
updateSharing(sessionId: string, shared: boolean): Promise<{
|
|
175
|
+
shared: boolean;
|
|
176
|
+
}>;
|
|
177
|
+
updateSessionMemory(sessionId: string, memoryEnabled: boolean): Promise<{
|
|
178
|
+
memory_enabled: boolean;
|
|
179
|
+
}>;
|
|
180
|
+
createShare(sessionId: string): Promise<ShareLinkResult>;
|
|
181
|
+
revokeShare(sessionId: string, token: string): Promise<{
|
|
182
|
+
revoked: boolean;
|
|
183
|
+
}>;
|
|
184
|
+
getSharedSession(token: string): Promise<TurnProjection[]>;
|
|
185
|
+
getSessionTasks(sessionId: string): Promise<Task[]>;
|
|
186
|
+
getSessionTurns(sessionId: string): Promise<TurnProjection[]>;
|
|
187
|
+
getSessionContextStats(sessionId: string, init?: RequestInit): Promise<SessionContextStats>;
|
|
188
|
+
getSessionHistory(sessionId: string, init?: RequestInit): Promise<SessionHistory>;
|
|
189
|
+
tokenizePrompt(prompt: string, model?: string): Promise<TokenizeResult>;
|
|
190
|
+
tokenizeMessages(messages: Array<Record<string, unknown>>, options?: {
|
|
191
|
+
model?: string;
|
|
192
|
+
add_generation_prompt?: boolean;
|
|
193
|
+
enable_thinking?: boolean | null;
|
|
194
|
+
tools?: Array<Record<string, unknown>>;
|
|
195
|
+
}): Promise<TokenizeResult>;
|
|
196
|
+
getSessionCheckpoints(sessionId: string, init?: RequestInit): Promise<{
|
|
197
|
+
nodes: CheckpointNode[];
|
|
198
|
+
leaf_id: string | null;
|
|
199
|
+
}>;
|
|
200
|
+
checkoutSession(sessionId: string, checkpointId: string, position: "before" | "turn_end", mode?: "both" | "conversation" | "code", linear?: boolean): Promise<{
|
|
201
|
+
id: string;
|
|
202
|
+
content: string;
|
|
203
|
+
position: string;
|
|
204
|
+
mode?: string;
|
|
205
|
+
files_restored?: boolean;
|
|
206
|
+
linear?: boolean;
|
|
207
|
+
}>;
|
|
208
|
+
rewindSession(sessionId: string, checkpointId: string): Promise<{
|
|
209
|
+
id: string;
|
|
210
|
+
content: string;
|
|
211
|
+
}>;
|
|
212
|
+
switchBranch(sessionId: string, checkpointId: string): Promise<{
|
|
213
|
+
id: string;
|
|
214
|
+
leaf_id: string;
|
|
215
|
+
}>;
|
|
216
|
+
deleteSession(sessionId: string): Promise<{
|
|
217
|
+
deleted: boolean;
|
|
218
|
+
}>;
|
|
219
|
+
listBackgroundTasks(sessionId: string, init?: RequestInit): Promise<BackgroundTask[]>;
|
|
220
|
+
getBackgroundTask(sessionId: string, taskId: string, tail?: number, init?: RequestInit): Promise<BackgroundTask>;
|
|
221
|
+
stopBackgroundTask(sessionId: string, taskId: string): Promise<{
|
|
222
|
+
message: string;
|
|
223
|
+
task?: BackgroundTask | null;
|
|
224
|
+
}>;
|
|
225
|
+
probeSessionUrl(sessionId: string, url: string): Promise<{
|
|
226
|
+
reachable: boolean;
|
|
227
|
+
}>;
|
|
228
|
+
listDir(sessionId: string, dirPath: string): Promise<FileEntry[]>;
|
|
229
|
+
uploadFiles(sessionId: string, dirPath: string, files: FileList | File[] | UploadFileEntry[], options?: UploadFilesOptions): Promise<{
|
|
230
|
+
uploaded: string[];
|
|
231
|
+
failed: string[];
|
|
232
|
+
}>;
|
|
233
|
+
deleteFile(sessionId: string, filePath: string): Promise<void>;
|
|
234
|
+
writeFile(sessionId: string, filePath: string, content: string): Promise<{
|
|
235
|
+
success: boolean;
|
|
236
|
+
}>;
|
|
237
|
+
renameFile(sessionId: string, filePath: string, newName: string): Promise<{
|
|
238
|
+
path: string;
|
|
239
|
+
}>;
|
|
240
|
+
copyFile(sessionId: string, filePath: string): Promise<{
|
|
241
|
+
path: string;
|
|
242
|
+
}>;
|
|
243
|
+
shareFile(sessionId: string, sourcePath: string, linkName?: string, shareFolder?: string): Promise<{
|
|
244
|
+
path: string;
|
|
245
|
+
target: string;
|
|
246
|
+
}>;
|
|
247
|
+
getDownloadDirUrl(sessionId: string, dirPath: string): string;
|
|
248
|
+
exportSession(sessionId: string): Promise<void>;
|
|
249
|
+
previewImport(file: File): Promise<ImportPreview>;
|
|
250
|
+
importSession(file: File, name?: string, solutionId?: string | null): Promise<{
|
|
251
|
+
session_id: string;
|
|
252
|
+
}>;
|
|
253
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PartnerSkillInstallPayload, PartnerSkillInstallResult, SessionSkillUploadPayload, SessionSkillUploadResult } from "../../react/schemas/partner-skill.js";
|
|
2
|
+
import type { SkillDetail, SkillSearchResult, SkillStats, SkillSummary } from "../../react/schemas/skill.js";
|
|
3
|
+
import type { BladeClient } from "../blade-client.js";
|
|
4
|
+
export interface GlobalSkillStats {
|
|
5
|
+
remote_configured: boolean;
|
|
6
|
+
remote_connected: boolean;
|
|
7
|
+
installed_skill_count: number;
|
|
8
|
+
}
|
|
9
|
+
export interface InstalledRegistrySkill {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
display_name?: string | null;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
is_installed?: boolean;
|
|
15
|
+
is_preset?: boolean;
|
|
16
|
+
preinstalled?: boolean;
|
|
17
|
+
org_display_name?: string | null;
|
|
18
|
+
has_tools?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare class SkillsResource {
|
|
21
|
+
private client;
|
|
22
|
+
constructor(client: BladeClient);
|
|
23
|
+
listSkills(init?: RequestInit): Promise<SkillSummary[]>;
|
|
24
|
+
listInstalledRegistrySkills(init?: RequestInit): Promise<InstalledRegistrySkill[]>;
|
|
25
|
+
listSessionSkills(sessionId: string, init?: RequestInit): Promise<SkillSummary[]>;
|
|
26
|
+
resyncSkills(sessionId: string, init?: RequestInit): Promise<{
|
|
27
|
+
detail?: string;
|
|
28
|
+
copied: number;
|
|
29
|
+
removed: number;
|
|
30
|
+
preserved: number;
|
|
31
|
+
}>;
|
|
32
|
+
searchSkills(query: string, limit?: number, init?: RequestInit): Promise<SkillSearchResult[]>;
|
|
33
|
+
getSkillStats(sessionId: string, init?: RequestInit): Promise<SkillStats>;
|
|
34
|
+
getGlobalSkillStats(init?: RequestInit): Promise<GlobalSkillStats>;
|
|
35
|
+
getSkill(skillName: string, init?: RequestInit): Promise<SkillDetail>;
|
|
36
|
+
uploadSessionSkill(sessionId: string, payload: SessionSkillUploadPayload, init?: RequestInit): Promise<SessionSkillUploadResult>;
|
|
37
|
+
installPartnerSkill(sessionId: string, payload: PartnerSkillInstallPayload, init?: RequestInit): Promise<PartnerSkillInstallResult>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BizRole, Solution } from "../../react/types/solution.js";
|
|
2
|
+
import type { BladeClient } from "../blade-client.js";
|
|
3
|
+
import type { ExistingSolutionRef, PreparedSolution } from "../types/sdk-profile.js";
|
|
4
|
+
export type ExportedSolutionFile = {
|
|
5
|
+
blob: Blob;
|
|
6
|
+
filename: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class SolutionsResource {
|
|
9
|
+
private client;
|
|
10
|
+
constructor(client: BladeClient);
|
|
11
|
+
fetchSolutions(): Promise<Solution[]>;
|
|
12
|
+
prepareFromZip(file: File | Blob): Promise<PreparedSolution>;
|
|
13
|
+
ensureFromRegistry(registryId: string): Promise<ExistingSolutionRef>;
|
|
14
|
+
fetchSolutionFile(solutionId: string, filePath: string): Promise<string>;
|
|
15
|
+
fetchSolutionBizRoles(solutionId: string, userId?: string): Promise<BizRole[]>;
|
|
16
|
+
/**
|
|
17
|
+
* 把编辑会话里的 solution_name/ 打成 zip 并下载。
|
|
18
|
+
* 返回 Blob 和从 Content-Disposition 解析出来的文件名,
|
|
19
|
+
* 调用方自己负责触发浏览器下载(<a download> 或 window.URL.createObjectURL)。
|
|
20
|
+
*/
|
|
21
|
+
exportSolution(sessionId: string): Promise<ExportedSolutionFile>;
|
|
22
|
+
/**
|
|
23
|
+
* 把编辑会话里的 solution 打包并发布到 skill_registry 商店。
|
|
24
|
+
* 后端会打 zip 并 POST 到 registry,这里只传 org + name + overwrite。
|
|
25
|
+
*/
|
|
26
|
+
publishSolution(sessionId: string, org: string, name: string, overwrite?: boolean): Promise<{
|
|
27
|
+
success: boolean;
|
|
28
|
+
solution_id: string;
|
|
29
|
+
message: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|