@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
|
@@ -1,1609 +0,0 @@
|
|
|
1
|
-
import * as arktype_internal_variants_object_ts from 'arktype/internal/variants/object.ts';
|
|
2
|
-
import * as arktype_internal_variants_string_ts from 'arktype/internal/variants/string.ts';
|
|
3
|
-
import { T as TurnProjection } from './projection-BWYEFYNn.js';
|
|
4
|
-
import { a as SessionInfo, T as TemplateId, S as SessionDetail, c as Solution, B as BizRole } from './session-CNnotR90.js';
|
|
5
|
-
import { Socket } from 'socket.io-client';
|
|
6
|
-
|
|
7
|
-
declare class BladeApiError extends Error {
|
|
8
|
-
readonly response: Response;
|
|
9
|
-
readonly status: number;
|
|
10
|
-
readonly statusText: string;
|
|
11
|
-
constructor(response: Response, message?: string);
|
|
12
|
-
}
|
|
13
|
-
type HttpMethod = "DELETE" | "GET" | "PATCH" | "POST" | "PUT" | (string & {});
|
|
14
|
-
interface BladeFetchInit {
|
|
15
|
-
body?: BodyInit | null;
|
|
16
|
-
credentials?: RequestCredentials;
|
|
17
|
-
expectOk?: boolean;
|
|
18
|
-
headers?: HeadersInit;
|
|
19
|
-
signal?: AbortSignal | null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface ApiKeyPublic {
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
masked: string;
|
|
26
|
-
created_at: string;
|
|
27
|
-
last_used_at: string | null;
|
|
28
|
-
/**
|
|
29
|
-
* 完整 key 原文。后端按 #761 设计存明文,支持反复获取;存量 hash-only 行为 null。
|
|
30
|
-
*/
|
|
31
|
-
plaintext: string | null;
|
|
32
|
-
/**
|
|
33
|
-
* 只读行(如经 bo 经纪人下发的 GIT_ACCESS_TOKEN):UI 只给复制,不给改名/撤销。
|
|
34
|
-
*/
|
|
35
|
-
readonly?: boolean;
|
|
36
|
-
}
|
|
37
|
-
interface ApiKeyCreateResponse {
|
|
38
|
-
key: ApiKeyPublic;
|
|
39
|
-
plaintext: string;
|
|
40
|
-
}
|
|
41
|
-
declare class ApiKeysResource {
|
|
42
|
-
private client;
|
|
43
|
-
constructor(client: BladeClient);
|
|
44
|
-
listApiKeys(): Promise<ApiKeyPublic[]>;
|
|
45
|
-
createApiKey(name: string): Promise<ApiKeyCreateResponse>;
|
|
46
|
-
renameApiKey(id: string, name: string): Promise<ApiKeyPublic>;
|
|
47
|
-
deleteApiKey(id: string): Promise<void>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface UserInfo {
|
|
51
|
-
id: string;
|
|
52
|
-
username: string;
|
|
53
|
-
display_name?: string | null;
|
|
54
|
-
avatar_url: string | null;
|
|
55
|
-
token: string;
|
|
56
|
-
auth_type: "casdoor";
|
|
57
|
-
is_admin?: boolean;
|
|
58
|
-
}
|
|
59
|
-
interface ProvidersResponse {
|
|
60
|
-
providers: Array<{
|
|
61
|
-
name: string;
|
|
62
|
-
authorize_url: string;
|
|
63
|
-
}>;
|
|
64
|
-
password_enabled: boolean;
|
|
65
|
-
}
|
|
66
|
-
declare class AuthResource {
|
|
67
|
-
private client;
|
|
68
|
-
constructor(client: BladeClient);
|
|
69
|
-
getProviders(): Promise<ProvidersResponse>;
|
|
70
|
-
getMe(): Promise<UserInfo>;
|
|
71
|
-
logout(): Promise<{
|
|
72
|
-
logout_url: string;
|
|
73
|
-
}>;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
interface EnvBucket {
|
|
77
|
-
bucket: string;
|
|
78
|
-
env: Record<string, string>;
|
|
79
|
-
}
|
|
80
|
-
interface PlatformEnvBucket {
|
|
81
|
-
env: Record<string, string>;
|
|
82
|
-
}
|
|
83
|
-
declare class EnvBucketsResource {
|
|
84
|
-
private client;
|
|
85
|
-
constructor(client: BladeClient);
|
|
86
|
-
listEnvBuckets(): Promise<EnvBucket[]>;
|
|
87
|
-
getEnvBucket(bucket: string): Promise<EnvBucket>;
|
|
88
|
-
setEnvBucket(bucket: string, env: Record<string, string>): Promise<EnvBucket>;
|
|
89
|
-
deleteEnvBucket(bucket: string): Promise<void>;
|
|
90
|
-
getPlatformEnv(): Promise<PlatformEnvBucket>;
|
|
91
|
-
getPlatformEnvReadonly(): Promise<PlatformEnvBucket>;
|
|
92
|
-
setPlatformEnv(env: Record<string, string>): Promise<PlatformEnvBucket>;
|
|
93
|
-
deletePlatformEnv(): Promise<void>;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
type GisGoalStatus = "pending" | "active" | "done" | "cancelled";
|
|
97
|
-
interface GisGoal {
|
|
98
|
-
id: string;
|
|
99
|
-
title: string;
|
|
100
|
-
description?: string | null;
|
|
101
|
-
status: GisGoalStatus;
|
|
102
|
-
priority: 1 | 2 | 3;
|
|
103
|
-
created_at: string;
|
|
104
|
-
updated_at: string;
|
|
105
|
-
}
|
|
106
|
-
interface GisResource$1 {
|
|
107
|
-
id: string;
|
|
108
|
-
name: string;
|
|
109
|
-
type: string;
|
|
110
|
-
quantity: number;
|
|
111
|
-
unit?: string | null;
|
|
112
|
-
location?: string | null;
|
|
113
|
-
note?: string | null;
|
|
114
|
-
created_at: string;
|
|
115
|
-
updated_at: string;
|
|
116
|
-
}
|
|
117
|
-
interface GisState {
|
|
118
|
-
goals: GisGoal[];
|
|
119
|
-
resources: GisResource$1[];
|
|
120
|
-
targets: GisTarget[];
|
|
121
|
-
}
|
|
122
|
-
interface GisTarget {
|
|
123
|
-
id: string;
|
|
124
|
-
name: string;
|
|
125
|
-
description?: string | null;
|
|
126
|
-
location?: string | null;
|
|
127
|
-
lat?: number | null;
|
|
128
|
-
lng?: number | null;
|
|
129
|
-
status: GisGoalStatus;
|
|
130
|
-
priority: 1 | 2 | 3;
|
|
131
|
-
created_at: string;
|
|
132
|
-
updated_at: string;
|
|
133
|
-
}
|
|
134
|
-
interface GisMapCommand {
|
|
135
|
-
id: string;
|
|
136
|
-
action: string;
|
|
137
|
-
payload?: unknown;
|
|
138
|
-
toolCallId?: string | null;
|
|
139
|
-
createdAt: number;
|
|
140
|
-
}
|
|
141
|
-
interface RuntimeConfig {
|
|
142
|
-
sentryDsn: string;
|
|
143
|
-
gisMapUrl: string;
|
|
144
|
-
bladeOsPath: string;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
declare class GisResource {
|
|
148
|
-
private client;
|
|
149
|
-
constructor(client: BladeClient);
|
|
150
|
-
fetchGisState(sessionId: string, init?: RequestInit): Promise<GisState>;
|
|
151
|
-
fetchRuntimeConfig(init?: RequestInit): Promise<RuntimeConfig>;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
type JsonSchemaObject = Record<string, unknown>;
|
|
155
|
-
interface HeadlessRunOptions {
|
|
156
|
-
schema?: JsonSchemaObject | null;
|
|
157
|
-
model?: string | null;
|
|
158
|
-
timeoutMs?: number;
|
|
159
|
-
}
|
|
160
|
-
interface HeadlessRunInSessionResult<T = unknown> {
|
|
161
|
-
session_id: string;
|
|
162
|
-
chat_run_id: string | null;
|
|
163
|
-
result: T | string;
|
|
164
|
-
}
|
|
165
|
-
declare class HeadlessError extends Error {
|
|
166
|
-
readonly detail?: unknown | undefined;
|
|
167
|
-
constructor(message: string, detail?: unknown | undefined);
|
|
168
|
-
}
|
|
169
|
-
declare class HeadlessResource {
|
|
170
|
-
private client;
|
|
171
|
-
constructor(client: BladeClient);
|
|
172
|
-
run<T = unknown>(prompt: string, options: HeadlessRunOptions & {
|
|
173
|
-
schema: JsonSchemaObject;
|
|
174
|
-
}): Promise<T>;
|
|
175
|
-
run(prompt: string, options?: HeadlessRunOptions): Promise<string>;
|
|
176
|
-
runInSession<T = unknown>(sessionId: string, prompt: string, options: HeadlessRunOptions & {
|
|
177
|
-
schema: JsonSchemaObject;
|
|
178
|
-
}): Promise<T>;
|
|
179
|
-
runInSession(sessionId: string, prompt: string, options?: HeadlessRunOptions): Promise<string>;
|
|
180
|
-
runWithSession<T = unknown>(prompt: string, options: HeadlessRunOptions & {
|
|
181
|
-
schema: JsonSchemaObject;
|
|
182
|
-
}): Promise<HeadlessRunInSessionResult<T>>;
|
|
183
|
-
runWithSession(prompt: string, options?: HeadlessRunOptions): Promise<HeadlessRunInSessionResult<string>>;
|
|
184
|
-
private runTracked;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
interface Memory {
|
|
188
|
-
id: number;
|
|
189
|
-
type: "feedback" | "experience";
|
|
190
|
-
content: string;
|
|
191
|
-
skill_name: string | null;
|
|
192
|
-
record_type: "memory" | "skill_comment" | null;
|
|
193
|
-
scope: string | null;
|
|
194
|
-
owner: string | null;
|
|
195
|
-
topic: string | null;
|
|
196
|
-
mem0_id: string | null;
|
|
197
|
-
superseded_by: number | null;
|
|
198
|
-
write_reason: string | null;
|
|
199
|
-
created_at: string;
|
|
200
|
-
updated_at: string | null;
|
|
201
|
-
hit_count: number;
|
|
202
|
-
last_hit_at: string | null;
|
|
203
|
-
disabled: boolean;
|
|
204
|
-
source_session: string;
|
|
205
|
-
}
|
|
206
|
-
interface MemoryListResponse {
|
|
207
|
-
items: Memory[];
|
|
208
|
-
total: number;
|
|
209
|
-
}
|
|
210
|
-
interface MemoryListParams {
|
|
211
|
-
keyword?: string;
|
|
212
|
-
skill_name?: string;
|
|
213
|
-
type?: string;
|
|
214
|
-
record_type?: string;
|
|
215
|
-
scope?: string;
|
|
216
|
-
owner?: string;
|
|
217
|
-
topic?: string;
|
|
218
|
-
status?: string;
|
|
219
|
-
offset?: number;
|
|
220
|
-
limit?: number;
|
|
221
|
-
}
|
|
222
|
-
interface MemoryCreateBody {
|
|
223
|
-
content: string;
|
|
224
|
-
type?: "feedback" | "experience";
|
|
225
|
-
skill_name?: string | null;
|
|
226
|
-
record_type?: "memory" | "skill_comment" | null;
|
|
227
|
-
scope?: string | null;
|
|
228
|
-
owner?: string | null;
|
|
229
|
-
topic?: string | null;
|
|
230
|
-
mem0_id?: string | null;
|
|
231
|
-
write_reason?: string | null;
|
|
232
|
-
}
|
|
233
|
-
declare class MemoriesResource {
|
|
234
|
-
private client;
|
|
235
|
-
constructor(client: BladeClient);
|
|
236
|
-
createMemory(body: MemoryCreateBody): Promise<Memory>;
|
|
237
|
-
listMemories(params?: MemoryListParams): Promise<MemoryListResponse>;
|
|
238
|
-
getMemory(id: number): Promise<Memory>;
|
|
239
|
-
updateMemory(id: number, body: Partial<MemoryCreateBody>): Promise<Memory>;
|
|
240
|
-
patchMemory(id: number, disabled: boolean): Promise<Memory>;
|
|
241
|
-
deleteMemory(id: number): Promise<{
|
|
242
|
-
ok: boolean;
|
|
243
|
-
}>;
|
|
244
|
-
batchMemories(action: "delete" | "disable" | "enable", ids: number[]): Promise<{
|
|
245
|
-
ok: boolean;
|
|
246
|
-
count: number;
|
|
247
|
-
}>;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
declare const ModelOption: arktype_internal_variants_object_ts.ObjectType<{
|
|
251
|
-
id: string;
|
|
252
|
-
label: string;
|
|
253
|
-
inputModalities?: string[] | undefined;
|
|
254
|
-
supportsImage?: boolean | undefined;
|
|
255
|
-
}, {}>;
|
|
256
|
-
type ModelOption = typeof ModelOption.infer;
|
|
257
|
-
declare const ModelsConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
258
|
-
default: string;
|
|
259
|
-
models: {
|
|
260
|
-
id: string;
|
|
261
|
-
label: string;
|
|
262
|
-
inputModalities?: string[] | undefined;
|
|
263
|
-
supportsImage?: boolean | undefined;
|
|
264
|
-
}[];
|
|
265
|
-
}, {}>;
|
|
266
|
-
type ModelsConfig = typeof ModelsConfig.infer;
|
|
267
|
-
declare class ModelsResource {
|
|
268
|
-
private client;
|
|
269
|
-
constructor(client: BladeClient);
|
|
270
|
-
getModelsConfig(init?: RequestInit): Promise<ModelsConfig>;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
declare const PublishedAppStatus: arktype_internal_variants_string_ts.StringType<"running" | "restarting" | "exited", {}>;
|
|
274
|
-
type PublishedAppStatus = typeof PublishedAppStatus.infer;
|
|
275
|
-
declare const PublishedApp: arktype_internal_variants_object_ts.ObjectType<{
|
|
276
|
-
session_id: string;
|
|
277
|
-
name: string;
|
|
278
|
-
url: string;
|
|
279
|
-
host_port: number;
|
|
280
|
-
app_port: number;
|
|
281
|
-
icon: string;
|
|
282
|
-
open_in: string;
|
|
283
|
-
created_at: number;
|
|
284
|
-
status: "running" | "restarting" | "exited";
|
|
285
|
-
os_app_id: string;
|
|
286
|
-
os_registered: boolean;
|
|
287
|
-
}, {}>;
|
|
288
|
-
type PublishedApp = typeof PublishedApp.infer;
|
|
289
|
-
declare const PublishedAppListResponse: arktype_internal_variants_object_ts.ObjectType<{
|
|
290
|
-
items: {
|
|
291
|
-
session_id: string;
|
|
292
|
-
name: string;
|
|
293
|
-
url: string;
|
|
294
|
-
host_port: number;
|
|
295
|
-
app_port: number;
|
|
296
|
-
icon: string;
|
|
297
|
-
open_in: string;
|
|
298
|
-
created_at: number;
|
|
299
|
-
status: "running" | "restarting" | "exited";
|
|
300
|
-
os_app_id: string;
|
|
301
|
-
os_registered: boolean;
|
|
302
|
-
}[];
|
|
303
|
-
}, {}>;
|
|
304
|
-
type PublishedAppListResponse = typeof PublishedAppListResponse.infer;
|
|
305
|
-
declare const UnpublishAppResponse: arktype_internal_variants_object_ts.ObjectType<{
|
|
306
|
-
ok: boolean;
|
|
307
|
-
os_app_id?: string | undefined;
|
|
308
|
-
os_registered?: boolean | undefined;
|
|
309
|
-
}, {}>;
|
|
310
|
-
type UnpublishAppResponse = typeof UnpublishAppResponse.infer;
|
|
311
|
-
|
|
312
|
-
declare class PublishedAppsResource {
|
|
313
|
-
private client;
|
|
314
|
-
constructor(client: BladeClient);
|
|
315
|
-
listPublishedApps(): Promise<PublishedApp[]>;
|
|
316
|
-
unpublishApp(sessionId: string, appName?: string): Promise<UnpublishAppResponse>;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
declare const AgentDriver: arktype_internal_variants_string_ts.StringType<"dify", {}>;
|
|
320
|
-
type AgentDriver = typeof AgentDriver.infer;
|
|
321
|
-
declare const AgentResource: arktype_internal_variants_object_ts.ObjectType<{
|
|
322
|
-
id: string;
|
|
323
|
-
name: string;
|
|
324
|
-
description: string;
|
|
325
|
-
tags: string[];
|
|
326
|
-
type: "agent";
|
|
327
|
-
subtype: "dify";
|
|
328
|
-
config: Record<string, unknown>;
|
|
329
|
-
}, {}>;
|
|
330
|
-
type AgentResource = typeof AgentResource.infer;
|
|
331
|
-
|
|
332
|
-
declare const MysqlConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
333
|
-
host: string;
|
|
334
|
-
port: number;
|
|
335
|
-
user: string;
|
|
336
|
-
password: string;
|
|
337
|
-
database: string;
|
|
338
|
-
charset?: string | undefined;
|
|
339
|
-
tables?: string[] | undefined;
|
|
340
|
-
ssl?: boolean | undefined;
|
|
341
|
-
connection_pool_size?: number | undefined;
|
|
342
|
-
query_timeout?: number | undefined;
|
|
343
|
-
}, {}>;
|
|
344
|
-
type MysqlConfig = typeof MysqlConfig.infer;
|
|
345
|
-
declare const PostgresqlConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
346
|
-
host: string;
|
|
347
|
-
port: number;
|
|
348
|
-
user: string;
|
|
349
|
-
password: string;
|
|
350
|
-
database: string;
|
|
351
|
-
schema?: string | undefined;
|
|
352
|
-
tables?: string[] | undefined;
|
|
353
|
-
ssl_mode?: string | undefined;
|
|
354
|
-
connection_pool_size?: number | undefined;
|
|
355
|
-
query_timeout?: number | undefined;
|
|
356
|
-
}, {}>;
|
|
357
|
-
type PostgresqlConfig = typeof PostgresqlConfig.infer;
|
|
358
|
-
declare const DatabaseDriver: arktype_internal_variants_string_ts.StringType<"mysql" | "postgresql", {}>;
|
|
359
|
-
type DatabaseDriver = typeof DatabaseDriver.infer;
|
|
360
|
-
declare const DatabaseResource: arktype_internal_variants_object_ts.ObjectType<{
|
|
361
|
-
id: string;
|
|
362
|
-
name: string;
|
|
363
|
-
description: string;
|
|
364
|
-
tags: string[];
|
|
365
|
-
type: "data";
|
|
366
|
-
subtype: "db";
|
|
367
|
-
driver: "mysql" | "postgresql";
|
|
368
|
-
config: Record<string, unknown>;
|
|
369
|
-
}, {}>;
|
|
370
|
-
type DatabaseResource = typeof DatabaseResource.infer;
|
|
371
|
-
|
|
372
|
-
declare const DifyKnowledgeConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
373
|
-
base_url: string;
|
|
374
|
-
api_key: string;
|
|
375
|
-
kg_name: string;
|
|
376
|
-
}, {}>;
|
|
377
|
-
type DifyKnowledgeConfig = typeof DifyKnowledgeConfig.infer;
|
|
378
|
-
declare const KnowledgeDriver: arktype_internal_variants_string_ts.StringType<"dify", {}>;
|
|
379
|
-
type KnowledgeDriver = typeof KnowledgeDriver.infer;
|
|
380
|
-
declare const KnowledgeResource: arktype_internal_variants_object_ts.ObjectType<{
|
|
381
|
-
id: string;
|
|
382
|
-
name: string;
|
|
383
|
-
description: string;
|
|
384
|
-
tags: string[];
|
|
385
|
-
type: "knowledge";
|
|
386
|
-
subtype: "dify";
|
|
387
|
-
config: Record<string, unknown>;
|
|
388
|
-
}, {}>;
|
|
389
|
-
type KnowledgeResource = typeof KnowledgeResource.infer;
|
|
390
|
-
|
|
391
|
-
declare const McpToolConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
392
|
-
server_url?: string | undefined;
|
|
393
|
-
command?: string | undefined;
|
|
394
|
-
args?: string[] | undefined;
|
|
395
|
-
env?: Record<string, string> | undefined;
|
|
396
|
-
}, {}>;
|
|
397
|
-
type McpToolConfig = typeof McpToolConfig.infer;
|
|
398
|
-
declare const HttpToolConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
399
|
-
openapi_json_path: string;
|
|
400
|
-
base_url?: string | undefined;
|
|
401
|
-
auth_header?: string | undefined;
|
|
402
|
-
}, {}>;
|
|
403
|
-
type HttpToolConfig = typeof HttpToolConfig.infer;
|
|
404
|
-
declare const ToolDriver: arktype_internal_variants_string_ts.StringType<"mcp" | "http", {}>;
|
|
405
|
-
type ToolDriver = typeof ToolDriver.infer;
|
|
406
|
-
declare const ToolResource: arktype_internal_variants_object_ts.ObjectType<{
|
|
407
|
-
id: string;
|
|
408
|
-
name: string;
|
|
409
|
-
description: string;
|
|
410
|
-
tags: string[];
|
|
411
|
-
type: "tools";
|
|
412
|
-
subtype: "mcp" | "http";
|
|
413
|
-
config: Record<string, unknown>;
|
|
414
|
-
}, {}>;
|
|
415
|
-
type ToolResource = typeof ToolResource.infer;
|
|
416
|
-
|
|
417
|
-
declare const REGISTRY_PREFIX = "/api-registry";
|
|
418
|
-
type RawResourceResponse = {
|
|
419
|
-
id: number | string;
|
|
420
|
-
type: string;
|
|
421
|
-
subtype: string;
|
|
422
|
-
driver?: string | null;
|
|
423
|
-
name: string;
|
|
424
|
-
description: string;
|
|
425
|
-
tags: string[];
|
|
426
|
-
config: Record<string, unknown>;
|
|
427
|
-
status?: string | null;
|
|
428
|
-
status_message?: string | null;
|
|
429
|
-
last_checked_at?: string | null;
|
|
430
|
-
extra?: Record<string, unknown>;
|
|
431
|
-
capabilities?: string[];
|
|
432
|
-
actions?: unknown[];
|
|
433
|
-
created_at?: string;
|
|
434
|
-
updated_at?: string;
|
|
435
|
-
[key: string]: unknown;
|
|
436
|
-
};
|
|
437
|
-
declare function normalizeResource<T extends Record<string, unknown>>(raw: RawResourceResponse): T;
|
|
438
|
-
type ResourceApi<T extends Record<string, unknown>> = {
|
|
439
|
-
list(init?: RequestInit): Promise<T[]>;
|
|
440
|
-
get(id: string, init?: RequestInit): Promise<T>;
|
|
441
|
-
create(data: Partial<T>, init?: RequestInit): Promise<T>;
|
|
442
|
-
update(id: string, data: Partial<T>, init?: RequestInit): Promise<T>;
|
|
443
|
-
delete(id: string, init?: RequestInit): Promise<void>;
|
|
444
|
-
};
|
|
445
|
-
type SkillOrgOption = {
|
|
446
|
-
id: string;
|
|
447
|
-
display_name: string;
|
|
448
|
-
kind: "personal" | "org";
|
|
449
|
-
is_mine: boolean;
|
|
450
|
-
};
|
|
451
|
-
type SkillOrgListResponse = {
|
|
452
|
-
orgs: string[];
|
|
453
|
-
org_options?: SkillOrgOption[];
|
|
454
|
-
};
|
|
455
|
-
declare class RegistryResource {
|
|
456
|
-
private client;
|
|
457
|
-
readonly databaseApi: ResourceApi<DatabaseResource>;
|
|
458
|
-
readonly toolApi: ResourceApi<ToolResource>;
|
|
459
|
-
readonly knowledgeApi: ResourceApi<KnowledgeResource>;
|
|
460
|
-
readonly agentApi: ResourceApi<AgentResource>;
|
|
461
|
-
constructor(client: BladeClient);
|
|
462
|
-
createResourceApi<T extends Record<string, unknown>>(apiType: string): ResourceApi<T>;
|
|
463
|
-
listSkillOrgs(): Promise<SkillOrgListResponse>;
|
|
464
|
-
publishSkill(sessionId: string, org: string): Promise<{
|
|
465
|
-
success: boolean;
|
|
466
|
-
skill_id: string;
|
|
467
|
-
}>;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
interface ExistingSolutionRef {
|
|
471
|
-
kind: "existing";
|
|
472
|
-
solutionId: string;
|
|
473
|
-
bizRoleId?: string;
|
|
474
|
-
}
|
|
475
|
-
interface PreparedSolutionAsset {
|
|
476
|
-
kind: "prepared";
|
|
477
|
-
assetId: string;
|
|
478
|
-
bizRoleId?: string;
|
|
479
|
-
}
|
|
480
|
-
type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset;
|
|
481
|
-
interface SessionProfile {
|
|
482
|
-
solution?: SolutionRef;
|
|
483
|
-
model?: string;
|
|
484
|
-
compactionRatio?: number;
|
|
485
|
-
enableThinking?: boolean;
|
|
486
|
-
memoryEnabled?: boolean;
|
|
487
|
-
disableTools?: string[];
|
|
488
|
-
env?: Record<string, string>;
|
|
489
|
-
}
|
|
490
|
-
interface RunOptions {
|
|
491
|
-
headless?: boolean;
|
|
492
|
-
outputSchema?: Record<string, unknown>;
|
|
493
|
-
runtimeEnv?: Record<string, string>;
|
|
494
|
-
timeoutMs?: number;
|
|
495
|
-
trace?: boolean;
|
|
496
|
-
compactionRatio?: number;
|
|
497
|
-
model?: string;
|
|
498
|
-
}
|
|
499
|
-
interface PreparedSolution extends PreparedSolutionAsset {
|
|
500
|
-
assetId: string;
|
|
501
|
-
solutionId: string;
|
|
502
|
-
roles: string[];
|
|
503
|
-
expiresAt: string;
|
|
504
|
-
}
|
|
505
|
-
interface RunResult {
|
|
506
|
-
sessionId: string;
|
|
507
|
-
chatRunId?: string;
|
|
508
|
-
result: unknown;
|
|
509
|
-
events: unknown[];
|
|
510
|
-
}
|
|
511
|
-
interface RunTrace {
|
|
512
|
-
events: unknown[];
|
|
513
|
-
history: unknown[];
|
|
514
|
-
result: unknown;
|
|
515
|
-
configSnapshot: Record<string, unknown>;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
declare class RunsResource {
|
|
519
|
-
private client;
|
|
520
|
-
constructor(client: BladeClient);
|
|
521
|
-
run(sessionId: string, message: string, options?: RunOptions): Promise<RunResult>;
|
|
522
|
-
collectTrace(run: RunResult): Promise<RunTrace>;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
interface PreviewUrlItem {
|
|
526
|
-
name: string;
|
|
527
|
-
url: string;
|
|
528
|
-
}
|
|
529
|
-
interface QuickScenario {
|
|
530
|
-
id: number;
|
|
531
|
-
name: string;
|
|
532
|
-
prompt_template: string;
|
|
533
|
-
skills: string[];
|
|
534
|
-
preview_urls: PreviewUrlItem[];
|
|
535
|
-
init_script: string;
|
|
536
|
-
icon: string;
|
|
537
|
-
created_at: string;
|
|
538
|
-
updated_at: string;
|
|
539
|
-
}
|
|
540
|
-
interface BladeHubScenarioResource {
|
|
541
|
-
resource_id: string;
|
|
542
|
-
resource_name: string;
|
|
543
|
-
name: string;
|
|
544
|
-
description: string;
|
|
545
|
-
prompt_template: string;
|
|
546
|
-
skills: string[];
|
|
547
|
-
preview_urls: PreviewUrlItem[];
|
|
548
|
-
init_script: string;
|
|
549
|
-
icon: string;
|
|
550
|
-
raw?: Record<string, unknown>;
|
|
551
|
-
}
|
|
552
|
-
interface CreateQuickScenarioPayload {
|
|
553
|
-
name: string;
|
|
554
|
-
prompt_template?: string;
|
|
555
|
-
skills?: string[];
|
|
556
|
-
preview_urls?: PreviewUrlItem[];
|
|
557
|
-
init_script?: string;
|
|
558
|
-
icon?: string;
|
|
559
|
-
}
|
|
560
|
-
interface UpdateQuickScenarioPayload extends CreateQuickScenarioPayload {
|
|
561
|
-
}
|
|
562
|
-
declare class ScenariosResource {
|
|
563
|
-
private client;
|
|
564
|
-
constructor(client: BladeClient);
|
|
565
|
-
listQuickScenarios(init?: RequestInit): Promise<QuickScenario[]>;
|
|
566
|
-
createQuickScenario(payload: CreateQuickScenarioPayload, init?: RequestInit): Promise<QuickScenario>;
|
|
567
|
-
deleteQuickScenario(scenarioId: number, init?: RequestInit): Promise<{
|
|
568
|
-
ok: boolean;
|
|
569
|
-
}>;
|
|
570
|
-
updateQuickScenario(scenarioId: number, payload: UpdateQuickScenarioPayload, init?: RequestInit): Promise<QuickScenario>;
|
|
571
|
-
listBladeHubScenarioResources(limit?: number, init?: RequestInit): Promise<BladeHubScenarioResource[]>;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
interface BackgroundTask {
|
|
575
|
-
id: string;
|
|
576
|
-
command: string;
|
|
577
|
-
description?: string;
|
|
578
|
-
status: "queued" | "starting" | "running" | "succeeded" | "done" | "failed" | "timeout" | "cancelled" | "lost";
|
|
579
|
-
legacy_status?: "running" | "done" | "failed";
|
|
580
|
-
exit_code?: number | null;
|
|
581
|
-
elapsed_seconds: number;
|
|
582
|
-
output_lines_count?: number;
|
|
583
|
-
output_preview?: string[];
|
|
584
|
-
output?: string;
|
|
585
|
-
log_path?: string | null;
|
|
586
|
-
started_at?: number | null;
|
|
587
|
-
finished_at?: number | null;
|
|
588
|
-
heartbeat_at?: number | null;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
declare const TaskStatus: arktype_internal_variants_string_ts.StringType<"pending" | "done" | "failed" | "in_progress" | "skipped", {}>;
|
|
592
|
-
type TaskStatus = typeof TaskStatus.infer;
|
|
593
|
-
declare const Task: arktype_internal_variants_object_ts.ObjectType<{
|
|
594
|
-
id: string;
|
|
595
|
-
goal: string;
|
|
596
|
-
skills: string[];
|
|
597
|
-
depends_on: string[];
|
|
598
|
-
status: "pending" | "done" | "failed" | "in_progress" | "skipped";
|
|
599
|
-
result_summary: string;
|
|
600
|
-
number: string;
|
|
601
|
-
}, {}>;
|
|
602
|
-
type Task = typeof Task.infer;
|
|
603
|
-
|
|
604
|
-
interface CreateSessionRequest {
|
|
605
|
-
intent?: string;
|
|
606
|
-
template_id?: TemplateId;
|
|
607
|
-
solution_id?: string;
|
|
608
|
-
biz_role_id?: string | null;
|
|
609
|
-
primary_skill_id?: string | null;
|
|
610
|
-
model?: string | null;
|
|
611
|
-
enable_thinking?: boolean | null;
|
|
612
|
-
memory_enabled?: boolean | null;
|
|
613
|
-
env?: Record<string, string>;
|
|
614
|
-
disable_tools?: string[] | null;
|
|
615
|
-
session_solution_asset_id?: string | null;
|
|
616
|
-
compaction_ratio?: number | null;
|
|
617
|
-
}
|
|
618
|
-
interface CheckpointNode {
|
|
619
|
-
id: string;
|
|
620
|
-
parent_id: string | null;
|
|
621
|
-
content_preview: string;
|
|
622
|
-
content: string;
|
|
623
|
-
timestamp: string;
|
|
624
|
-
}
|
|
625
|
-
type ContentPart = {
|
|
626
|
-
type: "text";
|
|
627
|
-
text: string;
|
|
628
|
-
} | {
|
|
629
|
-
type: "image_url";
|
|
630
|
-
image_url: {
|
|
631
|
-
url: string;
|
|
632
|
-
detail?: string;
|
|
633
|
-
};
|
|
634
|
-
};
|
|
635
|
-
interface HistoryNode {
|
|
636
|
-
id: string;
|
|
637
|
-
parent_id: string | null;
|
|
638
|
-
kind: string;
|
|
639
|
-
role: string;
|
|
640
|
-
timestamp: string;
|
|
641
|
-
preview: string;
|
|
642
|
-
content: string | ContentPart[];
|
|
643
|
-
tool_calls: Array<{
|
|
644
|
-
id?: string;
|
|
645
|
-
type?: string;
|
|
646
|
-
function?: {
|
|
647
|
-
name?: string;
|
|
648
|
-
arguments?: string;
|
|
649
|
-
};
|
|
650
|
-
}> | null;
|
|
651
|
-
usage: {
|
|
652
|
-
prompt_tokens?: number;
|
|
653
|
-
completion_tokens?: number;
|
|
654
|
-
total_tokens?: number;
|
|
655
|
-
} | null;
|
|
656
|
-
total_tokens: number;
|
|
657
|
-
token_diff: number;
|
|
658
|
-
is_deprecated: boolean;
|
|
659
|
-
loop_name: string;
|
|
660
|
-
}
|
|
661
|
-
interface SessionHistory {
|
|
662
|
-
nodes: HistoryNode[];
|
|
663
|
-
active_branch: string | null;
|
|
664
|
-
branches: string[];
|
|
665
|
-
system_prompt_tokens?: number | null;
|
|
666
|
-
tools_tokens?: number | null;
|
|
667
|
-
tokenizer_model?: string | null;
|
|
668
|
-
}
|
|
669
|
-
interface TokenizeResult {
|
|
670
|
-
model: string;
|
|
671
|
-
prompt_tokens: number;
|
|
672
|
-
prompt: string;
|
|
673
|
-
}
|
|
674
|
-
interface PaginatedSessionsResult {
|
|
675
|
-
items: SessionInfo[];
|
|
676
|
-
total: number;
|
|
677
|
-
limit: number;
|
|
678
|
-
offset: number;
|
|
679
|
-
content_match_truncated?: boolean;
|
|
680
|
-
}
|
|
681
|
-
interface SkillDevSession {
|
|
682
|
-
session: SessionInfo;
|
|
683
|
-
skill_id: string;
|
|
684
|
-
display_name: string;
|
|
685
|
-
skill_description: string;
|
|
686
|
-
}
|
|
687
|
-
interface ShareLinkResult {
|
|
688
|
-
token: string;
|
|
689
|
-
url: string;
|
|
690
|
-
expires_at: string | null;
|
|
691
|
-
}
|
|
692
|
-
interface SessionContextStats {
|
|
693
|
-
tokens_used: number;
|
|
694
|
-
context_window: number;
|
|
695
|
-
compaction_ratio: number;
|
|
696
|
-
}
|
|
697
|
-
interface FileEntry {
|
|
698
|
-
name: string;
|
|
699
|
-
path: string;
|
|
700
|
-
is_dir: boolean;
|
|
701
|
-
created_at: number;
|
|
702
|
-
tags?: string[];
|
|
703
|
-
}
|
|
704
|
-
type UploadFileEntry = File | {
|
|
705
|
-
file: File;
|
|
706
|
-
name: string;
|
|
707
|
-
};
|
|
708
|
-
interface UploadFilesOptions {
|
|
709
|
-
onProgress?: (progress: UploadProgress) => void;
|
|
710
|
-
}
|
|
711
|
-
interface ImportPreviewSkill {
|
|
712
|
-
name: string;
|
|
713
|
-
description: string;
|
|
714
|
-
path: string;
|
|
715
|
-
}
|
|
716
|
-
interface ImportPreviewScenario {
|
|
717
|
-
scenario?: {
|
|
718
|
-
name?: string;
|
|
719
|
-
};
|
|
720
|
-
skills?: string[];
|
|
721
|
-
preview_urls?: string[];
|
|
722
|
-
init_script?: string;
|
|
723
|
-
generated_at?: string;
|
|
724
|
-
}
|
|
725
|
-
interface ImportPreview {
|
|
726
|
-
user_messages: string[];
|
|
727
|
-
turn_count: number;
|
|
728
|
-
skills: ImportPreviewSkill[];
|
|
729
|
-
scenario: ImportPreviewScenario | null;
|
|
730
|
-
}
|
|
731
|
-
declare class SessionsResource {
|
|
732
|
-
private client;
|
|
733
|
-
constructor(client: BladeClient);
|
|
734
|
-
private fetchSessionsPage;
|
|
735
|
-
listSessions(template_id_prefix?: string, solution_id?: string): Promise<SessionInfo[]>;
|
|
736
|
-
listSessionsPaginated(params: {
|
|
737
|
-
limit: number;
|
|
738
|
-
offset: number;
|
|
739
|
-
template_id_prefix?: string;
|
|
740
|
-
solution_id?: string;
|
|
741
|
-
q?: string;
|
|
742
|
-
}): Promise<PaginatedSessionsResult>;
|
|
743
|
-
listSessionsWithSkillData(): Promise<SkillDevSession[]>;
|
|
744
|
-
createSession(intent?: string, template_id?: TemplateId, primary_skill_id?: string | null): Promise<{
|
|
745
|
-
session_id: string;
|
|
746
|
-
}>;
|
|
747
|
-
createSessionWithRequest(request: CreateSessionRequest): Promise<{
|
|
748
|
-
session_id: string;
|
|
749
|
-
}>;
|
|
750
|
-
createWithProfile(params: {
|
|
751
|
-
intent: string;
|
|
752
|
-
profile: SessionProfile;
|
|
753
|
-
}): Promise<{
|
|
754
|
-
session_id: string;
|
|
755
|
-
}>;
|
|
756
|
-
getSession(sessionId: string, init?: RequestInit): Promise<SessionDetail>;
|
|
757
|
-
updateSession(sessionId: string, payload: {
|
|
758
|
-
intent?: string;
|
|
759
|
-
}): Promise<SessionDetail>;
|
|
760
|
-
setSessionEnv(sessionId: string, env: Record<string, string>): Promise<SessionDetail>;
|
|
761
|
-
pinSession(sessionId: string, pinned: boolean): Promise<SessionInfo>;
|
|
762
|
-
startReplaySession(sourceSessionId: string, speed?: 1 | 2 | 5): Promise<{
|
|
763
|
-
session_id: string;
|
|
764
|
-
}>;
|
|
765
|
-
updateReplaySession(sessionId: string, payload: {
|
|
766
|
-
speed?: 1 | 2 | 5;
|
|
767
|
-
status?: "autonomous";
|
|
768
|
-
}): Promise<{
|
|
769
|
-
replay_state: SessionInfo["replay_state"];
|
|
770
|
-
}>;
|
|
771
|
-
updateSharing(sessionId: string, shared: boolean): Promise<{
|
|
772
|
-
shared: boolean;
|
|
773
|
-
}>;
|
|
774
|
-
updateSessionMemory(sessionId: string, memoryEnabled: boolean): Promise<{
|
|
775
|
-
memory_enabled: boolean;
|
|
776
|
-
}>;
|
|
777
|
-
createShare(sessionId: string): Promise<ShareLinkResult>;
|
|
778
|
-
revokeShare(sessionId: string, token: string): Promise<{
|
|
779
|
-
revoked: boolean;
|
|
780
|
-
}>;
|
|
781
|
-
getSharedSession(token: string): Promise<TurnProjection[]>;
|
|
782
|
-
getSessionTasks(sessionId: string): Promise<Task[]>;
|
|
783
|
-
getSessionTurns(sessionId: string): Promise<TurnProjection[]>;
|
|
784
|
-
getSessionContextStats(sessionId: string, init?: RequestInit): Promise<SessionContextStats>;
|
|
785
|
-
getSessionHistory(sessionId: string, init?: RequestInit): Promise<SessionHistory>;
|
|
786
|
-
tokenizePrompt(prompt: string, model?: string): Promise<TokenizeResult>;
|
|
787
|
-
tokenizeMessages(messages: Array<Record<string, unknown>>, options?: {
|
|
788
|
-
model?: string;
|
|
789
|
-
add_generation_prompt?: boolean;
|
|
790
|
-
enable_thinking?: boolean | null;
|
|
791
|
-
tools?: Array<Record<string, unknown>>;
|
|
792
|
-
}): Promise<TokenizeResult>;
|
|
793
|
-
getSessionCheckpoints(sessionId: string, init?: RequestInit): Promise<{
|
|
794
|
-
nodes: CheckpointNode[];
|
|
795
|
-
leaf_id: string | null;
|
|
796
|
-
}>;
|
|
797
|
-
checkoutSession(sessionId: string, checkpointId: string, position: "before" | "turn_end", mode?: "both" | "conversation" | "code", linear?: boolean): Promise<{
|
|
798
|
-
id: string;
|
|
799
|
-
content: string;
|
|
800
|
-
position: string;
|
|
801
|
-
mode?: string;
|
|
802
|
-
files_restored?: boolean;
|
|
803
|
-
linear?: boolean;
|
|
804
|
-
}>;
|
|
805
|
-
rewindSession(sessionId: string, checkpointId: string): Promise<{
|
|
806
|
-
id: string;
|
|
807
|
-
content: string;
|
|
808
|
-
}>;
|
|
809
|
-
switchBranch(sessionId: string, checkpointId: string): Promise<{
|
|
810
|
-
id: string;
|
|
811
|
-
leaf_id: string;
|
|
812
|
-
}>;
|
|
813
|
-
deleteSession(sessionId: string): Promise<{
|
|
814
|
-
deleted: boolean;
|
|
815
|
-
}>;
|
|
816
|
-
listBackgroundTasks(sessionId: string, init?: RequestInit): Promise<BackgroundTask[]>;
|
|
817
|
-
getBackgroundTask(sessionId: string, taskId: string, tail?: number, init?: RequestInit): Promise<BackgroundTask>;
|
|
818
|
-
stopBackgroundTask(sessionId: string, taskId: string): Promise<{
|
|
819
|
-
message: string;
|
|
820
|
-
task?: BackgroundTask | null;
|
|
821
|
-
}>;
|
|
822
|
-
probeSessionUrl(sessionId: string, url: string): Promise<{
|
|
823
|
-
reachable: boolean;
|
|
824
|
-
}>;
|
|
825
|
-
listDir(sessionId: string, dirPath: string): Promise<FileEntry[]>;
|
|
826
|
-
uploadFiles(sessionId: string, dirPath: string, files: FileList | File[] | UploadFileEntry[], options?: UploadFilesOptions): Promise<{
|
|
827
|
-
uploaded: string[];
|
|
828
|
-
failed: string[];
|
|
829
|
-
}>;
|
|
830
|
-
deleteFile(sessionId: string, filePath: string): Promise<void>;
|
|
831
|
-
writeFile(sessionId: string, filePath: string, content: string): Promise<{
|
|
832
|
-
success: boolean;
|
|
833
|
-
}>;
|
|
834
|
-
renameFile(sessionId: string, filePath: string, newName: string): Promise<{
|
|
835
|
-
path: string;
|
|
836
|
-
}>;
|
|
837
|
-
copyFile(sessionId: string, filePath: string): Promise<{
|
|
838
|
-
path: string;
|
|
839
|
-
}>;
|
|
840
|
-
shareFile(sessionId: string, sourcePath: string, linkName?: string, shareFolder?: string): Promise<{
|
|
841
|
-
path: string;
|
|
842
|
-
target: string;
|
|
843
|
-
}>;
|
|
844
|
-
getDownloadDirUrl(sessionId: string, dirPath: string): string;
|
|
845
|
-
exportSession(sessionId: string): Promise<void>;
|
|
846
|
-
previewImport(file: File): Promise<ImportPreview>;
|
|
847
|
-
importSession(file: File, name?: string, solutionId?: string | null): Promise<{
|
|
848
|
-
session_id: string;
|
|
849
|
-
}>;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
declare const PartnerSkillName: arktype_internal_variants_string_ts.StringType<`${string}/${string}`, {}>;
|
|
853
|
-
type PartnerSkillName = typeof PartnerSkillName.infer;
|
|
854
|
-
declare const SessionSkillName: arktype_internal_variants_string_ts.StringType<`${string}/${string}`, {}>;
|
|
855
|
-
type SessionSkillName = PartnerSkillName;
|
|
856
|
-
declare const PartnerSkillFile: arktype_internal_variants_object_ts.ObjectType<{
|
|
857
|
-
path: string;
|
|
858
|
-
content: string;
|
|
859
|
-
}, {}>;
|
|
860
|
-
type PartnerSkillFile = typeof PartnerSkillFile.infer;
|
|
861
|
-
declare const SessionSkillFile: arktype_internal_variants_object_ts.ObjectType<{
|
|
862
|
-
path: string;
|
|
863
|
-
content: string;
|
|
864
|
-
}, {}>;
|
|
865
|
-
type SessionSkillFile = PartnerSkillFile;
|
|
866
|
-
declare const PartnerSkillInstallPayload: arktype_internal_variants_object_ts.ObjectType<{
|
|
867
|
-
name: `${string}/${string}`;
|
|
868
|
-
files: {
|
|
869
|
-
path: string;
|
|
870
|
-
content: string;
|
|
871
|
-
}[];
|
|
872
|
-
}, {}>;
|
|
873
|
-
type PartnerSkillInstallPayload = typeof PartnerSkillInstallPayload.infer;
|
|
874
|
-
declare const SessionSkillUploadPayload: arktype_internal_variants_object_ts.ObjectType<{
|
|
875
|
-
name: `${string}/${string}`;
|
|
876
|
-
files: {
|
|
877
|
-
path: string;
|
|
878
|
-
content: string;
|
|
879
|
-
}[];
|
|
880
|
-
}, {}>;
|
|
881
|
-
type SessionSkillUploadPayload = PartnerSkillInstallPayload;
|
|
882
|
-
declare const PartnerSkillInstallResult: arktype_internal_variants_object_ts.ObjectType<{
|
|
883
|
-
name: `${string}/${string}`;
|
|
884
|
-
skill_dir: string;
|
|
885
|
-
file_count: number;
|
|
886
|
-
overwritten: boolean;
|
|
887
|
-
}, {}>;
|
|
888
|
-
type PartnerSkillInstallResult = typeof PartnerSkillInstallResult.infer;
|
|
889
|
-
declare const SessionSkillUploadResult: arktype_internal_variants_object_ts.ObjectType<{
|
|
890
|
-
name: `${string}/${string}`;
|
|
891
|
-
skill_dir: string;
|
|
892
|
-
file_count: number;
|
|
893
|
-
overwritten: boolean;
|
|
894
|
-
}, {}>;
|
|
895
|
-
type SessionSkillUploadResult = PartnerSkillInstallResult;
|
|
896
|
-
|
|
897
|
-
interface SkillSummary {
|
|
898
|
-
skill_id: string;
|
|
899
|
-
display_name: string;
|
|
900
|
-
dir_name: string;
|
|
901
|
-
description: string;
|
|
902
|
-
path: string;
|
|
903
|
-
references: string[];
|
|
904
|
-
local: boolean;
|
|
905
|
-
}
|
|
906
|
-
interface SkillSearchResult {
|
|
907
|
-
skill_id: string;
|
|
908
|
-
display_name: string;
|
|
909
|
-
dir_name: string;
|
|
910
|
-
description: string;
|
|
911
|
-
local: boolean;
|
|
912
|
-
}
|
|
913
|
-
type SkillDisplayTarget = {
|
|
914
|
-
skill_id?: string | null;
|
|
915
|
-
display_name?: string | null;
|
|
916
|
-
skillId?: string | null;
|
|
917
|
-
displayName?: string | null;
|
|
918
|
-
};
|
|
919
|
-
declare function skillDisplayName(skill: SkillDisplayTarget): string;
|
|
920
|
-
interface SkillStats {
|
|
921
|
-
loaded_skill_count: number;
|
|
922
|
-
loaded_skill_names: string[];
|
|
923
|
-
remote_configured: boolean;
|
|
924
|
-
remote_connected: boolean;
|
|
925
|
-
installed_skill_count: number;
|
|
926
|
-
}
|
|
927
|
-
interface StepSpec {
|
|
928
|
-
n: number;
|
|
929
|
-
label: string;
|
|
930
|
-
}
|
|
931
|
-
interface StageSpec {
|
|
932
|
-
id: string;
|
|
933
|
-
name: string;
|
|
934
|
-
steps: StepSpec[];
|
|
935
|
-
}
|
|
936
|
-
interface ParallelMode {
|
|
937
|
-
id: string;
|
|
938
|
-
name: string;
|
|
939
|
-
prompt_hint: string;
|
|
940
|
-
}
|
|
941
|
-
interface SkillDetail extends SkillSummary {
|
|
942
|
-
content: string;
|
|
943
|
-
stages?: StageSpec[];
|
|
944
|
-
parallel_modes?: ParallelMode[];
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
interface GlobalSkillStats {
|
|
948
|
-
remote_configured: boolean;
|
|
949
|
-
remote_connected: boolean;
|
|
950
|
-
installed_skill_count: number;
|
|
951
|
-
}
|
|
952
|
-
interface InstalledRegistrySkill {
|
|
953
|
-
id: string;
|
|
954
|
-
name: string;
|
|
955
|
-
display_name?: string | null;
|
|
956
|
-
description?: string | null;
|
|
957
|
-
is_installed?: boolean;
|
|
958
|
-
is_preset?: boolean;
|
|
959
|
-
preinstalled?: boolean;
|
|
960
|
-
org_display_name?: string | null;
|
|
961
|
-
has_tools?: boolean;
|
|
962
|
-
}
|
|
963
|
-
declare class SkillsResource {
|
|
964
|
-
private client;
|
|
965
|
-
constructor(client: BladeClient);
|
|
966
|
-
listSkills(init?: RequestInit): Promise<SkillSummary[]>;
|
|
967
|
-
listInstalledRegistrySkills(init?: RequestInit): Promise<InstalledRegistrySkill[]>;
|
|
968
|
-
listSessionSkills(sessionId: string, init?: RequestInit): Promise<SkillSummary[]>;
|
|
969
|
-
resyncSkills(sessionId: string, init?: RequestInit): Promise<{
|
|
970
|
-
detail?: string;
|
|
971
|
-
copied: number;
|
|
972
|
-
removed: number;
|
|
973
|
-
preserved: number;
|
|
974
|
-
}>;
|
|
975
|
-
searchSkills(query: string, limit?: number, init?: RequestInit): Promise<SkillSearchResult[]>;
|
|
976
|
-
getSkillStats(sessionId: string, init?: RequestInit): Promise<SkillStats>;
|
|
977
|
-
getGlobalSkillStats(init?: RequestInit): Promise<GlobalSkillStats>;
|
|
978
|
-
getSkill(skillName: string, init?: RequestInit): Promise<SkillDetail>;
|
|
979
|
-
uploadSessionSkill(sessionId: string, payload: SessionSkillUploadPayload, init?: RequestInit): Promise<SessionSkillUploadResult>;
|
|
980
|
-
installPartnerSkill(sessionId: string, payload: PartnerSkillInstallPayload, init?: RequestInit): Promise<PartnerSkillInstallResult>;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
type ExportedSolutionFile = {
|
|
984
|
-
blob: Blob;
|
|
985
|
-
filename: string;
|
|
986
|
-
};
|
|
987
|
-
declare class SolutionsResource {
|
|
988
|
-
private client;
|
|
989
|
-
constructor(client: BladeClient);
|
|
990
|
-
fetchSolutions(): Promise<Solution[]>;
|
|
991
|
-
prepareFromZip(file: File | Blob): Promise<PreparedSolution>;
|
|
992
|
-
ensureFromRegistry(registryId: string): Promise<ExistingSolutionRef>;
|
|
993
|
-
fetchSolutionFile(solutionId: string, filePath: string): Promise<string>;
|
|
994
|
-
fetchSolutionBizRoles(solutionId: string, userId?: string): Promise<BizRole[]>;
|
|
995
|
-
/**
|
|
996
|
-
* 把编辑会话里的 solution_name/ 打成 zip 并下载。
|
|
997
|
-
* 返回 Blob 和从 Content-Disposition 解析出来的文件名,
|
|
998
|
-
* 调用方自己负责触发浏览器下载(<a download> 或 window.URL.createObjectURL)。
|
|
999
|
-
*/
|
|
1000
|
-
exportSolution(sessionId: string): Promise<ExportedSolutionFile>;
|
|
1001
|
-
/**
|
|
1002
|
-
* 把编辑会话里的 solution 打包并发布到 skill_registry 商店。
|
|
1003
|
-
* 后端会打 zip 并 POST 到 registry,这里只传 org + name + overwrite。
|
|
1004
|
-
*/
|
|
1005
|
-
publishSolution(sessionId: string, org: string, name: string, overwrite?: boolean): Promise<{
|
|
1006
|
-
success: boolean;
|
|
1007
|
-
solution_id: string;
|
|
1008
|
-
message: string;
|
|
1009
|
-
}>;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
type ComputerUpgradeReason = "no_container" | "no_target" | "current_latest" | "up_to_date" | "upgrade_available";
|
|
1013
|
-
interface ComputerUpgradeStatusResponse {
|
|
1014
|
-
upgrade_available: boolean;
|
|
1015
|
-
reason: ComputerUpgradeReason;
|
|
1016
|
-
current_version: string | null;
|
|
1017
|
-
target_version: string | null;
|
|
1018
|
-
}
|
|
1019
|
-
interface UpgradeComputerResponse {
|
|
1020
|
-
target_version: string | null;
|
|
1021
|
-
previous_version: string | null;
|
|
1022
|
-
removed_containers: number;
|
|
1023
|
-
removed_volume: boolean;
|
|
1024
|
-
cleared_memo: number;
|
|
1025
|
-
}
|
|
1026
|
-
declare class UserPreferencesResource {
|
|
1027
|
-
private client;
|
|
1028
|
-
constructor(client: BladeClient);
|
|
1029
|
-
getUserPreference(key: string): Promise<string | null>;
|
|
1030
|
-
setUserPreference(key: string, value: string): Promise<void>;
|
|
1031
|
-
getPersistentDefault(): Promise<boolean>;
|
|
1032
|
-
setPersistentDefault(value: boolean): Promise<void>;
|
|
1033
|
-
resetComputer(): Promise<void>;
|
|
1034
|
-
getComputerUpgradeStatus(): Promise<ComputerUpgradeStatusResponse>;
|
|
1035
|
-
upgradeComputer(): Promise<UpgradeComputerResponse>;
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
interface AuthOptions {
|
|
1039
|
-
token?: string | (() => string | null | undefined);
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
type AsrAudioPayload = ArrayBuffer | Uint8Array;
|
|
1043
|
-
declare namespace ChatSendPayloadSchema {
|
|
1044
|
-
type SessionId = string;
|
|
1045
|
-
type Mode = (("planning" | "executing") | null);
|
|
1046
|
-
type AskuserAnswer = ({
|
|
1047
|
-
[k: string]: unknown;
|
|
1048
|
-
} | null);
|
|
1049
|
-
type Model = (string | null);
|
|
1050
|
-
type ThinkingOverride = (boolean | null);
|
|
1051
|
-
type Headless = boolean;
|
|
1052
|
-
type OutputSchema = ({
|
|
1053
|
-
[k: string]: unknown;
|
|
1054
|
-
} | null);
|
|
1055
|
-
type FromStep = (number | string | null);
|
|
1056
|
-
type Quotes = (unknown[] | null);
|
|
1057
|
-
type DeprecateEntryIds = (string[] | null);
|
|
1058
|
-
type ReplayDecision = (string | null);
|
|
1059
|
-
type RuntimeEnv = ({
|
|
1060
|
-
[k: string]: string;
|
|
1061
|
-
} | null);
|
|
1062
|
-
type CompactionRatio = (number | null);
|
|
1063
|
-
interface ChatSendPayload {
|
|
1064
|
-
session_id: SessionId;
|
|
1065
|
-
message: Message;
|
|
1066
|
-
mode?: Mode;
|
|
1067
|
-
askuser_answer?: AskuserAnswer;
|
|
1068
|
-
model?: Model;
|
|
1069
|
-
thinking_override?: ThinkingOverride;
|
|
1070
|
-
headless?: Headless;
|
|
1071
|
-
output_schema?: OutputSchema;
|
|
1072
|
-
whatif?: (WhatIfPayload | null);
|
|
1073
|
-
replay_decision?: ReplayDecision;
|
|
1074
|
-
runtime_env?: RuntimeEnv;
|
|
1075
|
-
compaction_ratio?: CompactionRatio;
|
|
1076
|
-
[k: string]: unknown;
|
|
1077
|
-
}
|
|
1078
|
-
interface Message {
|
|
1079
|
-
[k: string]: unknown;
|
|
1080
|
-
}
|
|
1081
|
-
interface WhatIfPayload {
|
|
1082
|
-
from_step?: FromStep;
|
|
1083
|
-
quotes?: Quotes;
|
|
1084
|
-
deprecate_entry_ids?: DeprecateEntryIds;
|
|
1085
|
-
[k: string]: unknown;
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
type ChatSendPayload = ChatSendPayloadSchema.ChatSendPayload;
|
|
1089
|
-
declare namespace ChatStopPayloadSchema {
|
|
1090
|
-
type SessionId = string;
|
|
1091
|
-
interface ChatStopPayload {
|
|
1092
|
-
session_id: SessionId;
|
|
1093
|
-
[k: string]: unknown;
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
type ChatStopPayload = ChatStopPayloadSchema.ChatStopPayload;
|
|
1097
|
-
declare namespace ChatAppendPayloadSchema {
|
|
1098
|
-
type SessionId = string;
|
|
1099
|
-
type Message = string;
|
|
1100
|
-
interface ChatAppendPayload {
|
|
1101
|
-
session_id: SessionId;
|
|
1102
|
-
message: Message;
|
|
1103
|
-
[k: string]: unknown;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
type ChatAppendPayload = ChatAppendPayloadSchema.ChatAppendPayload;
|
|
1107
|
-
declare namespace ChatCompactPayloadSchema {
|
|
1108
|
-
type SessionId = string;
|
|
1109
|
-
interface ChatCompactPayload {
|
|
1110
|
-
session_id: SessionId;
|
|
1111
|
-
[k: string]: unknown;
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
type ChatCompactPayload = ChatCompactPayloadSchema.ChatCompactPayload;
|
|
1115
|
-
declare namespace SessionSubscribePayloadSchema {
|
|
1116
|
-
type SessionId = string;
|
|
1117
|
-
type Mode = string;
|
|
1118
|
-
interface SessionSubscribePayload {
|
|
1119
|
-
session_id: SessionId;
|
|
1120
|
-
mode?: Mode;
|
|
1121
|
-
[k: string]: unknown;
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
type SessionSubscribePayload = SessionSubscribePayloadSchema.SessionSubscribePayload;
|
|
1125
|
-
declare namespace SessionSubscribeBatchPayloadSchema {
|
|
1126
|
-
/**
|
|
1127
|
-
* @minItems 1
|
|
1128
|
-
* @maxItems 200
|
|
1129
|
-
*/
|
|
1130
|
-
type Sessions = [SessionSubscribe, ...(SessionSubscribe)[]];
|
|
1131
|
-
type SessionId = string;
|
|
1132
|
-
type Mode = string;
|
|
1133
|
-
interface SessionSubscribeBatchPayload {
|
|
1134
|
-
sessions: Sessions;
|
|
1135
|
-
[k: string]: unknown;
|
|
1136
|
-
}
|
|
1137
|
-
interface SessionSubscribe {
|
|
1138
|
-
session_id: SessionId;
|
|
1139
|
-
mode?: Mode;
|
|
1140
|
-
[k: string]: unknown;
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
type SessionSubscribeBatchPayload = SessionSubscribeBatchPayloadSchema.SessionSubscribeBatchPayload;
|
|
1144
|
-
declare namespace SessionUnsubscribePayloadSchema {
|
|
1145
|
-
type SessionId = string;
|
|
1146
|
-
interface SessionUnsubscribePayload {
|
|
1147
|
-
session_id: SessionId;
|
|
1148
|
-
[k: string]: unknown;
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
type SessionUnsubscribePayload = SessionUnsubscribePayloadSchema.SessionUnsubscribePayload;
|
|
1152
|
-
declare namespace AgentBoardProjectSubscribePayloadSchema {
|
|
1153
|
-
type ProjectId = number;
|
|
1154
|
-
interface AgentBoardProjectSubscribePayload {
|
|
1155
|
-
project_id: ProjectId;
|
|
1156
|
-
[k: string]: unknown;
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
type AgentBoardProjectSubscribePayload = AgentBoardProjectSubscribePayloadSchema.AgentBoardProjectSubscribePayload;
|
|
1160
|
-
declare namespace AgentBoardProjectUnsubscribePayloadSchema {
|
|
1161
|
-
type ProjectId = number;
|
|
1162
|
-
interface AgentBoardProjectUnsubscribePayload {
|
|
1163
|
-
project_id: ProjectId;
|
|
1164
|
-
[k: string]: unknown;
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
type AgentBoardProjectUnsubscribePayload = AgentBoardProjectUnsubscribePayloadSchema.AgentBoardProjectUnsubscribePayload;
|
|
1168
|
-
declare namespace ChatStartPayloadSchema {
|
|
1169
|
-
type SessionId = (string | null);
|
|
1170
|
-
interface ChatStartPayload {
|
|
1171
|
-
session_id?: SessionId;
|
|
1172
|
-
[k: string]: unknown;
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
type ChatStartPayload = ChatStartPayloadSchema.ChatStartPayload;
|
|
1176
|
-
declare namespace ChatEndPayloadSchema {
|
|
1177
|
-
type SessionId = (string | null);
|
|
1178
|
-
type Status = (string | null);
|
|
1179
|
-
type FinishReason = (string | null);
|
|
1180
|
-
type ChatRunId = (string | null);
|
|
1181
|
-
interface ChatEndPayload {
|
|
1182
|
-
session_id?: SessionId;
|
|
1183
|
-
status?: Status;
|
|
1184
|
-
result?: unknown;
|
|
1185
|
-
finish_reason?: FinishReason;
|
|
1186
|
-
chat_run_id?: ChatRunId;
|
|
1187
|
-
[k: string]: unknown;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
type ChatEndPayload = ChatEndPayloadSchema.ChatEndPayload;
|
|
1191
|
-
declare namespace SessionUpdatedPayloadSchema {
|
|
1192
|
-
type SessionId = string;
|
|
1193
|
-
type Model = (string | null);
|
|
1194
|
-
type ReplayState = ({
|
|
1195
|
-
[k: string]: unknown;
|
|
1196
|
-
} | null);
|
|
1197
|
-
type Intent = (string | null);
|
|
1198
|
-
interface SessionUpdatedPayload {
|
|
1199
|
-
session_id: SessionId;
|
|
1200
|
-
model?: Model;
|
|
1201
|
-
replay_state?: ReplayState;
|
|
1202
|
-
intent?: Intent;
|
|
1203
|
-
[k: string]: unknown;
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
type SessionUpdatedPayload = SessionUpdatedPayloadSchema.SessionUpdatedPayload;
|
|
1207
|
-
declare namespace WorkspaceFilesChangedPayloadSchema {
|
|
1208
|
-
type SessionId = string;
|
|
1209
|
-
type FilePath = (string | null);
|
|
1210
|
-
interface WorkspaceFilesChangedPayload {
|
|
1211
|
-
session_id: SessionId;
|
|
1212
|
-
file_path?: FilePath;
|
|
1213
|
-
[k: string]: unknown;
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
type WorkspaceFilesChangedPayload = WorkspaceFilesChangedPayloadSchema.WorkspaceFilesChangedPayload;
|
|
1217
|
-
declare namespace SystemErrorPayloadSchema {
|
|
1218
|
-
type Message = string;
|
|
1219
|
-
type SessionId = (string | null);
|
|
1220
|
-
type Code = (string | number | null);
|
|
1221
|
-
interface SystemErrorPayload {
|
|
1222
|
-
message: Message;
|
|
1223
|
-
session_id?: SessionId;
|
|
1224
|
-
code?: Code;
|
|
1225
|
-
detail?: Detail;
|
|
1226
|
-
[k: string]: unknown;
|
|
1227
|
-
}
|
|
1228
|
-
interface Detail {
|
|
1229
|
-
[k: string]: unknown;
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
type SystemErrorPayload = SystemErrorPayloadSchema.SystemErrorPayload;
|
|
1233
|
-
declare namespace SystemNotificationPayloadSchema {
|
|
1234
|
-
type SessionId = (string | null);
|
|
1235
|
-
type NotificationType = string;
|
|
1236
|
-
type Title = string;
|
|
1237
|
-
type Detail = (string | null);
|
|
1238
|
-
type Status = (string | null);
|
|
1239
|
-
type Metadata = ({
|
|
1240
|
-
[k: string]: unknown;
|
|
1241
|
-
} | null);
|
|
1242
|
-
interface SystemNotificationPayload {
|
|
1243
|
-
session_id?: SessionId;
|
|
1244
|
-
notification_type: NotificationType;
|
|
1245
|
-
title: Title;
|
|
1246
|
-
detail?: Detail;
|
|
1247
|
-
status?: Status;
|
|
1248
|
-
metadata?: Metadata;
|
|
1249
|
-
[k: string]: unknown;
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
type SystemNotificationPayload = SystemNotificationPayloadSchema.SystemNotificationPayload;
|
|
1253
|
-
declare namespace TurnProjectionPayloadSchema {
|
|
1254
|
-
type Id = string;
|
|
1255
|
-
type Sequence = number;
|
|
1256
|
-
type TurnId = string;
|
|
1257
|
-
type LoopId = string;
|
|
1258
|
-
type TurnKind = ("message" | "compaction");
|
|
1259
|
-
type Role = ("user" | "assistant" | "system");
|
|
1260
|
-
type Status = ("streaming" | "completed" | "paused" | "failed" | "interrupted");
|
|
1261
|
-
type Type = ("text" | "thinking" | "tool_use" | "tool_result" | "tool_ui" | "tool_bridge" | "system_notification" | "mode_change" | "plan_status" | "ask_user_answer");
|
|
1262
|
-
type Content = string;
|
|
1263
|
-
type ToolCallId = (string | null);
|
|
1264
|
-
type ToolName = (string | null);
|
|
1265
|
-
type DisplayName = (string | null);
|
|
1266
|
-
type Blocks = ContentBlock[];
|
|
1267
|
-
type Id1 = string;
|
|
1268
|
-
type ToolName1 = string;
|
|
1269
|
-
type DisplayName1 = string;
|
|
1270
|
-
type Arguments = string;
|
|
1271
|
-
type Status1 = ("pending" | "done" | "error" | "cancelled" | "awaiting_answer");
|
|
1272
|
-
type DurationMs = (number | null);
|
|
1273
|
-
type ChildLoopName = string;
|
|
1274
|
-
type ChildToolCallId = string;
|
|
1275
|
-
type Description = (string | null);
|
|
1276
|
-
type ToolCalls = ToolCallProjection[];
|
|
1277
|
-
type Model = (string | null);
|
|
1278
|
-
type Usage = ({
|
|
1279
|
-
[k: string]: unknown;
|
|
1280
|
-
} | null);
|
|
1281
|
-
type DurationMs1 = number;
|
|
1282
|
-
type StartedAt = (string | null);
|
|
1283
|
-
type ContextWindow = number;
|
|
1284
|
-
type MemoryRefs = (MemoryRef[] | null);
|
|
1285
|
-
type Id2 = number;
|
|
1286
|
-
type ContentPreview = string;
|
|
1287
|
-
type SkillName = (string | null);
|
|
1288
|
-
type ParentForkToolCallId = (string | null);
|
|
1289
|
-
type CompactionId = (string | null);
|
|
1290
|
-
type SummaryPreview = (string | null);
|
|
1291
|
-
type SummaryFull = (string | null);
|
|
1292
|
-
type ArchivedCount = (number | null);
|
|
1293
|
-
type TokensBefore = (number | null);
|
|
1294
|
-
type TokensAfter = (number | null);
|
|
1295
|
-
type SavedRatio = (number | null);
|
|
1296
|
-
type Trigger = (("auto" | "manual" | "forced_retry") | null);
|
|
1297
|
-
type FailureReason = (string | null);
|
|
1298
|
-
type FallbackApplied = (boolean | null);
|
|
1299
|
-
type SessionId = string;
|
|
1300
|
-
type SolutionId = (string | null);
|
|
1301
|
-
type TemplateId = (string | null);
|
|
1302
|
-
interface TurnProjectionPayload {
|
|
1303
|
-
id: Id;
|
|
1304
|
-
sequence: Sequence;
|
|
1305
|
-
turn_id: TurnId;
|
|
1306
|
-
loop_id: LoopId;
|
|
1307
|
-
kind?: TurnKind;
|
|
1308
|
-
role: Role;
|
|
1309
|
-
status: Status;
|
|
1310
|
-
blocks?: Blocks;
|
|
1311
|
-
tool_calls?: ToolCalls;
|
|
1312
|
-
model?: Model;
|
|
1313
|
-
usage?: Usage;
|
|
1314
|
-
duration_ms?: DurationMs1;
|
|
1315
|
-
started_at?: StartedAt;
|
|
1316
|
-
context_window?: ContextWindow;
|
|
1317
|
-
memory_refs?: MemoryRefs;
|
|
1318
|
-
parent_fork_tool_call_id?: ParentForkToolCallId;
|
|
1319
|
-
compaction_id?: CompactionId;
|
|
1320
|
-
summary_preview?: SummaryPreview;
|
|
1321
|
-
summary_full?: SummaryFull;
|
|
1322
|
-
archived_count?: ArchivedCount;
|
|
1323
|
-
tokens_before?: TokensBefore;
|
|
1324
|
-
tokens_after?: TokensAfter;
|
|
1325
|
-
saved_ratio?: SavedRatio;
|
|
1326
|
-
trigger?: Trigger;
|
|
1327
|
-
failure_reason?: FailureReason;
|
|
1328
|
-
fallback_applied?: FallbackApplied;
|
|
1329
|
-
session_id: SessionId;
|
|
1330
|
-
solution_id?: SolutionId;
|
|
1331
|
-
template_id?: TemplateId;
|
|
1332
|
-
[k: string]: unknown;
|
|
1333
|
-
}
|
|
1334
|
-
interface ContentBlock {
|
|
1335
|
-
type: Type;
|
|
1336
|
-
content?: Content;
|
|
1337
|
-
tool_call_id?: ToolCallId;
|
|
1338
|
-
tool_name?: ToolName;
|
|
1339
|
-
display_name?: DisplayName;
|
|
1340
|
-
[k: string]: unknown;
|
|
1341
|
-
}
|
|
1342
|
-
interface ToolCallProjection {
|
|
1343
|
-
id: Id1;
|
|
1344
|
-
tool_name: ToolName1;
|
|
1345
|
-
display_name: DisplayName1;
|
|
1346
|
-
arguments?: Arguments;
|
|
1347
|
-
status?: Status1;
|
|
1348
|
-
result?: Result;
|
|
1349
|
-
duration_ms?: DurationMs;
|
|
1350
|
-
pending_question_ref?: (PendingQuestionRef | null);
|
|
1351
|
-
[k: string]: unknown;
|
|
1352
|
-
}
|
|
1353
|
-
interface Result {
|
|
1354
|
-
[k: string]: unknown;
|
|
1355
|
-
}
|
|
1356
|
-
interface PendingQuestionRef {
|
|
1357
|
-
child_loop_name: ChildLoopName;
|
|
1358
|
-
child_tool_call_id: ChildToolCallId;
|
|
1359
|
-
description?: Description;
|
|
1360
|
-
[k: string]: unknown;
|
|
1361
|
-
}
|
|
1362
|
-
interface MemoryRef {
|
|
1363
|
-
id: Id2;
|
|
1364
|
-
content_preview: ContentPreview;
|
|
1365
|
-
skill_name?: SkillName;
|
|
1366
|
-
[k: string]: unknown;
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
type TurnProjectionPayload = TurnProjectionPayloadSchema.TurnProjectionPayload;
|
|
1370
|
-
declare namespace PatchEnvelopePayloadSchema {
|
|
1371
|
-
type Sequence = number;
|
|
1372
|
-
type TurnId = string;
|
|
1373
|
-
type LoopId = string;
|
|
1374
|
-
type PatchType = string;
|
|
1375
|
-
type SessionId = string;
|
|
1376
|
-
interface PatchEnvelopePayload {
|
|
1377
|
-
sequence: Sequence;
|
|
1378
|
-
turn_id: TurnId;
|
|
1379
|
-
loop_id: LoopId;
|
|
1380
|
-
patch_type: PatchType;
|
|
1381
|
-
data?: Data;
|
|
1382
|
-
session_id: SessionId;
|
|
1383
|
-
[k: string]: unknown;
|
|
1384
|
-
}
|
|
1385
|
-
interface Data {
|
|
1386
|
-
[k: string]: unknown;
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
type PatchEnvelopePayload = PatchEnvelopePayloadSchema.PatchEnvelopePayload;
|
|
1390
|
-
declare namespace AsrReadyPayloadSchema {
|
|
1391
|
-
type RequestId = string;
|
|
1392
|
-
type Provider = string;
|
|
1393
|
-
interface AsrReadyPayload {
|
|
1394
|
-
request_id: RequestId;
|
|
1395
|
-
provider: Provider;
|
|
1396
|
-
[k: string]: unknown;
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
type AsrReadyPayload = AsrReadyPayloadSchema.AsrReadyPayload;
|
|
1400
|
-
declare namespace AsrTextPayloadSchema {
|
|
1401
|
-
type Text = string;
|
|
1402
|
-
type RequestId = (string | null);
|
|
1403
|
-
interface AsrTextPayload {
|
|
1404
|
-
text: Text;
|
|
1405
|
-
request_id?: RequestId;
|
|
1406
|
-
[k: string]: unknown;
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
type AsrTextPayload = AsrTextPayloadSchema.AsrTextPayload;
|
|
1410
|
-
declare namespace AsrClosedPayloadSchema {
|
|
1411
|
-
type RequestId = string;
|
|
1412
|
-
interface AsrClosedPayload {
|
|
1413
|
-
request_id: RequestId;
|
|
1414
|
-
[k: string]: unknown;
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
type AsrClosedPayload = AsrClosedPayloadSchema.AsrClosedPayload;
|
|
1418
|
-
declare namespace AsrErrorPayloadSchema {
|
|
1419
|
-
type Message = string;
|
|
1420
|
-
type RequestId = (string | null);
|
|
1421
|
-
interface AsrErrorPayload {
|
|
1422
|
-
message: Message;
|
|
1423
|
-
request_id?: RequestId;
|
|
1424
|
-
[k: string]: unknown;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
type AsrErrorPayload = AsrErrorPayloadSchema.AsrErrorPayload;
|
|
1428
|
-
declare namespace AgentBoardBoardTaskChangedPayloadSchema {
|
|
1429
|
-
type ProjectId = number;
|
|
1430
|
-
type Action = ("created" | "updated" | "deleted");
|
|
1431
|
-
interface AgentBoardBoardTaskChangedPayload {
|
|
1432
|
-
project_id: ProjectId;
|
|
1433
|
-
action: Action;
|
|
1434
|
-
task: Task;
|
|
1435
|
-
[k: string]: unknown;
|
|
1436
|
-
}
|
|
1437
|
-
interface Task {
|
|
1438
|
-
[k: string]: unknown;
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
type AgentBoardBoardTaskChangedPayload = AgentBoardBoardTaskChangedPayloadSchema.AgentBoardBoardTaskChangedPayload;
|
|
1442
|
-
declare namespace AgentBoardFileOpPayloadSchema {
|
|
1443
|
-
type ProjectId = number;
|
|
1444
|
-
type SessionId = string;
|
|
1445
|
-
type ToolCallId = (string | null);
|
|
1446
|
-
type Action = string;
|
|
1447
|
-
type FilePath = string;
|
|
1448
|
-
type Description = (string | null);
|
|
1449
|
-
type ContentPreview = (string | null);
|
|
1450
|
-
type FinalContent = (string | null);
|
|
1451
|
-
type ContentDelta = (boolean | null);
|
|
1452
|
-
type IsFinal = (boolean | null);
|
|
1453
|
-
type CreatedAt = string;
|
|
1454
|
-
interface AgentBoardFileOpPayload {
|
|
1455
|
-
project_id: ProjectId;
|
|
1456
|
-
session_id: SessionId;
|
|
1457
|
-
tool_call_id?: ToolCallId;
|
|
1458
|
-
action: Action;
|
|
1459
|
-
file_path: FilePath;
|
|
1460
|
-
description?: Description;
|
|
1461
|
-
content_preview?: ContentPreview;
|
|
1462
|
-
final_content?: FinalContent;
|
|
1463
|
-
content_delta?: ContentDelta;
|
|
1464
|
-
is_final?: IsFinal;
|
|
1465
|
-
created_at: CreatedAt;
|
|
1466
|
-
[k: string]: unknown;
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
type AgentBoardFileOpPayload = AgentBoardFileOpPayloadSchema.AgentBoardFileOpPayload;
|
|
1470
|
-
declare namespace ChatStopAckSchema {
|
|
1471
|
-
type Status = string;
|
|
1472
|
-
type Message = (string | null);
|
|
1473
|
-
type Code = (string | number | null);
|
|
1474
|
-
interface ChatStopAck {
|
|
1475
|
-
status: Status;
|
|
1476
|
-
message?: Message;
|
|
1477
|
-
code?: Code;
|
|
1478
|
-
[k: string]: unknown;
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
type ChatStopAck = ChatStopAckSchema.ChatStopAck;
|
|
1482
|
-
declare namespace ChatCompactAckSchema {
|
|
1483
|
-
type Status = string;
|
|
1484
|
-
type Message = (string | null);
|
|
1485
|
-
type Code = (string | number | null);
|
|
1486
|
-
interface ChatCompactAck {
|
|
1487
|
-
status: Status;
|
|
1488
|
-
message?: Message;
|
|
1489
|
-
code?: Code;
|
|
1490
|
-
[k: string]: unknown;
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
type ChatCompactAck = ChatCompactAckSchema.ChatCompactAck;
|
|
1494
|
-
interface ClientToServerEvents {
|
|
1495
|
-
"chat:send": (payload: ChatSendPayload) => void;
|
|
1496
|
-
"chat:stop": (payload: ChatStopPayload, ack: (response: ChatStopAck) => void) => void;
|
|
1497
|
-
"chat:append": (payload: ChatAppendPayload) => void;
|
|
1498
|
-
"chat:compact": (payload: ChatCompactPayload, ack: (response: ChatCompactAck) => void) => void;
|
|
1499
|
-
"session:subscribe": (payload: SessionSubscribePayload) => void;
|
|
1500
|
-
"session:subscribe_batch": (payload: SessionSubscribeBatchPayload) => void;
|
|
1501
|
-
"session:unsubscribe": (payload: SessionUnsubscribePayload) => void;
|
|
1502
|
-
"agent-board:project:subscribe": (payload: AgentBoardProjectSubscribePayload) => void;
|
|
1503
|
-
"agent-board:project:unsubscribe": (payload: AgentBoardProjectUnsubscribePayload) => void;
|
|
1504
|
-
"asr:start": (payload: unknown) => void;
|
|
1505
|
-
"asr:audio": (payload: AsrAudioPayload) => void;
|
|
1506
|
-
"asr:stop": (payload: unknown) => void;
|
|
1507
|
-
"gis.event.analysis.request": (payload: unknown, ack: (response: unknown) => void) => void;
|
|
1508
|
-
}
|
|
1509
|
-
interface ServerToClientEvents {
|
|
1510
|
-
"chat:start": (payload: ChatStartPayload) => void;
|
|
1511
|
-
"chat:end": (payload: ChatEndPayload) => void;
|
|
1512
|
-
"chat:append:ack": (payload: unknown) => void;
|
|
1513
|
-
"session:updated": (payload: SessionUpdatedPayload) => void;
|
|
1514
|
-
"workspace:files_changed": (payload: WorkspaceFilesChangedPayload) => void;
|
|
1515
|
-
"system:error": (payload: SystemErrorPayload) => void;
|
|
1516
|
-
"system:notification": (payload: SystemNotificationPayload) => void;
|
|
1517
|
-
"turn:start": (payload: TurnProjectionPayload) => void;
|
|
1518
|
-
"turn:patch": (payload: PatchEnvelopePayload) => void;
|
|
1519
|
-
"turn:end": (payload: TurnProjectionPayload) => void;
|
|
1520
|
-
"task:updated": (payload: unknown) => void;
|
|
1521
|
-
"task:synced": (payload: unknown) => void;
|
|
1522
|
-
"artifact:created": (payload: unknown) => void;
|
|
1523
|
-
"artifact:updated": (payload: unknown) => void;
|
|
1524
|
-
"bg:started": (payload: unknown) => void;
|
|
1525
|
-
"bg:tasks_completed": (payload: unknown) => void;
|
|
1526
|
-
"skills:changed": (payload: unknown) => void;
|
|
1527
|
-
"session:rewind": (payload: unknown) => void;
|
|
1528
|
-
"asr:ready": (payload: AsrReadyPayload) => void;
|
|
1529
|
-
"asr:partial": (payload: AsrTextPayload) => void;
|
|
1530
|
-
"asr:final": (payload: AsrTextPayload) => void;
|
|
1531
|
-
"asr:closed": (payload: AsrClosedPayload) => void;
|
|
1532
|
-
"asr:error": (payload: AsrErrorPayload) => void;
|
|
1533
|
-
"replay:input_mismatch": (payload: unknown) => void;
|
|
1534
|
-
"agent-board:board-task:changed": (payload: AgentBoardBoardTaskChangedPayload) => void;
|
|
1535
|
-
"agent-board:file-op": (payload: AgentBoardFileOpPayload) => void;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
type TypedSocket = Socket<ServerToClientEvents, ClientToServerEvents>;
|
|
1539
|
-
interface CreateSocketOptions extends AuthOptions {
|
|
1540
|
-
baseUrl: string;
|
|
1541
|
-
path?: string;
|
|
1542
|
-
}
|
|
1543
|
-
declare function createSocket(options: CreateSocketOptions): TypedSocket;
|
|
1544
|
-
|
|
1545
|
-
interface BladeClientOptions {
|
|
1546
|
-
baseUrl: string;
|
|
1547
|
-
token?: string | (() => string | null | undefined);
|
|
1548
|
-
fetchImpl?: typeof fetch;
|
|
1549
|
-
onRefreshSuccess?: () => void | Promise<void>;
|
|
1550
|
-
}
|
|
1551
|
-
declare class BladeClient {
|
|
1552
|
-
private refreshPromise;
|
|
1553
|
-
private socketInstance;
|
|
1554
|
-
private storeRestTokenResolver;
|
|
1555
|
-
private storeSocketTokenResolver;
|
|
1556
|
-
readonly options: BladeClientOptions;
|
|
1557
|
-
readonly apiKeys: ApiKeysResource;
|
|
1558
|
-
readonly auth: AuthResource;
|
|
1559
|
-
readonly envBuckets: EnvBucketsResource;
|
|
1560
|
-
readonly gis: GisResource;
|
|
1561
|
-
readonly headless: HeadlessResource;
|
|
1562
|
-
readonly memories: MemoriesResource;
|
|
1563
|
-
readonly models: ModelsResource;
|
|
1564
|
-
readonly publishedApps: PublishedAppsResource;
|
|
1565
|
-
readonly registry: RegistryResource;
|
|
1566
|
-
readonly runs: RunsResource;
|
|
1567
|
-
readonly scenarios: ScenariosResource;
|
|
1568
|
-
readonly sessions: SessionsResource;
|
|
1569
|
-
readonly skills: SkillsResource;
|
|
1570
|
-
readonly solutions: SolutionsResource;
|
|
1571
|
-
readonly userPreferences: UserPreferencesResource;
|
|
1572
|
-
constructor(options: BladeClientOptions);
|
|
1573
|
-
_attachStoreRestTokenResolver(fn: () => string | null | undefined): void;
|
|
1574
|
-
_attachStoreSocketTokenResolver(fn: () => string | null | undefined): void;
|
|
1575
|
-
setBaseUrl(baseUrl: string): void;
|
|
1576
|
-
socket(): TypedSocket;
|
|
1577
|
-
json<T>(method: HttpMethod, path: string, body?: unknown): Promise<T>;
|
|
1578
|
-
jsonFromInit<T>(path: string, init?: RequestInit): Promise<T>;
|
|
1579
|
-
text(method: HttpMethod, path: string): Promise<string>;
|
|
1580
|
-
textFromInit(path: string, init?: RequestInit): Promise<string>;
|
|
1581
|
-
responseFromInit(path: string, init?: RequestInit): Promise<Response>;
|
|
1582
|
-
blob(method: HttpMethod, path: string): Promise<Blob>;
|
|
1583
|
-
formData(method: HttpMethod, path: string, form: FormData, options?: {
|
|
1584
|
-
expectOk?: boolean;
|
|
1585
|
-
onUploadProgress?: (progress: UploadProgress) => void;
|
|
1586
|
-
}): Promise<Response>;
|
|
1587
|
-
fetch(method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean): Promise<Response>;
|
|
1588
|
-
buildAuthedUrl(path: string): string;
|
|
1589
|
-
private buildHeaders;
|
|
1590
|
-
private buildUrl;
|
|
1591
|
-
private baseUrlWithTrailingSlash;
|
|
1592
|
-
private toBaseRelativePath;
|
|
1593
|
-
private isSameBackendUrl;
|
|
1594
|
-
private shouldRefreshFor401;
|
|
1595
|
-
private hasExplicitBearerToken;
|
|
1596
|
-
private tryRefresh;
|
|
1597
|
-
private resolveTokenForUrl;
|
|
1598
|
-
private resolveRestToken;
|
|
1599
|
-
private resolveSocketToken;
|
|
1600
|
-
private resolveToken;
|
|
1601
|
-
private formDataWithUploadProgress;
|
|
1602
|
-
}
|
|
1603
|
-
interface UploadProgress {
|
|
1604
|
-
loaded: number;
|
|
1605
|
-
total?: number;
|
|
1606
|
-
percent?: number;
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
export { type PreparedSolution as $, type ApiKeyCreateResponse as A, type BackgroundTask as B, type CheckpointNode as C, HeadlessError as D, type ExistingSolutionRef as E, type FileEntry as F, GisResource as G, type HistoryNode as H, type ImportPreview as I, HeadlessResource as J, type HeadlessRunInSessionResult as K, type HeadlessRunOptions as L, type HttpMethod as M, type InstalledRegistrySkill as N, type JsonSchemaObject as O, type PaginatedSessionsResult as P, MemoriesResource as Q, type Memory as R, SessionsResource as S, type TokenizeResult as T, type UploadFileEntry as U, type MemoryCreateBody as V, type MemoryListParams as W, type MemoryListResponse as X, ModelOption as Y, ModelsConfig as Z, ModelsResource as _, type ShareLinkResult as a, MysqlConfig as a$, type PreparedSolutionAsset as a0, type PreviewUrlItem as a1, type ProvidersResponse as a2, PublishedAppsResource as a3, type QuickScenario as a4, REGISTRY_PREFIX as a5, RegistryResource as a6, type ResourceApi as a7, type RunOptions as a8, type RunResult as a9, type SkillDetail as aA, type SkillStats as aB, type SkillSummary as aC, type SkillSearchResult as aD, PartnerSkillInstallPayload as aE, PartnerSkillInstallResult as aF, SessionSkillUploadPayload as aG, SessionSkillUploadResult as aH, PublishedApp as aI, PublishedAppListResponse as aJ, PublishedAppStatus as aK, UnpublishAppResponse as aL, type GisGoal as aM, type GisResource$1 as aN, type GisTarget as aO, type GisMapCommand as aP, Task as aQ, AgentDriver as aR, AgentResource as aS, DatabaseDriver as aT, DatabaseResource as aU, DifyKnowledgeConfig as aV, type GisGoalStatus as aW, HttpToolConfig as aX, KnowledgeDriver as aY, KnowledgeResource as aZ, McpToolConfig as a_, type RunTrace as aa, RunsResource as ab, ScenariosResource as ac, type ServerToClientEvents as ad, type SessionProfile as ae, type SessionUpdatedPayload as af, type SkillOrgListResponse as ag, type SkillOrgOption as ah, SkillsResource as ai, type SolutionRef as aj, SolutionsResource as ak, type SystemErrorPayload as al, type SystemNotificationPayload as am, type TurnProjectionPayload as an, type TypedSocket as ao, type UpdateQuickScenarioPayload as ap, type UpgradeComputerResponse as aq, type UserInfo as ar, UserPreferencesResource as as, createSocket as at, normalizeResource as au, EnvBucketsResource as av, type EnvBucket as aw, type PlatformEnvBucket as ax, type GisState as ay, type RuntimeConfig as az, type SessionContextStats as b, type ParallelMode as b0, PartnerSkillFile as b1, PartnerSkillName as b2, PostgresqlConfig as b3, SessionSkillFile as b4, SessionSkillName as b5, type StageSpec as b6, type StepSpec as b7, TaskStatus as b8, ToolDriver as b9, ToolResource as ba, skillDisplayName as bb, type SessionHistory as c, type SkillDevSession as d, type ContentPart as e, type CreateSessionRequest as f, type ImportPreviewScenario as g, type ImportPreviewSkill as h, type UploadFilesOptions as i, type ApiKeyPublic as j, ApiKeysResource as k, AuthResource as l, BladeApiError as m, BladeClient as n, type BladeClientOptions as o, type BladeFetchInit as p, type BladeHubScenarioResource as q, type ChatEndPayload as r, type ChatSendPayload as s, type ClientToServerEvents as t, type ComputerUpgradeReason as u, type ComputerUpgradeStatusResponse as v, type CreateQuickScenarioPayload as w, type CreateSocketOptions as x, type ExportedSolutionFile as y, type GlobalSkillStats as z };
|