@blade-hq/agent-kit 1.0.24 → 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-7F6UP5LP.js → chunk-34GDDOWY.js} +5 -208
- package/dist/chunk-34GDDOWY.js.map +1 -0
- package/dist/{chunk-2QYV43YP.js → chunk-C2FKVGJU.js} +2 -2
- package/dist/{chunk-TYM7KL2L.js → chunk-JU5SL4HP.js} +2 -2
- package/dist/chunk-M72OL7ZJ.js +23 -0
- package/dist/chunk-M72OL7ZJ.js.map +1 -0
- package/dist/{chunk-IMMRWXI7.js → chunk-SBASG3M2.js} +128 -98
- package/dist/chunk-SBASG3M2.js.map +1 -0
- package/dist/{chunk-BQKF6HJH.js → chunk-TE6G6NVX.js} +6 -6
- package/dist/{chunk-ICV7OTGX.js → chunk-X2NJKKXR.js} +10 -10
- package/dist/client/auth.d.ts +8 -0
- package/dist/client/blade-client.d.ts +80 -0
- package/dist/client/index.d.ts +22 -18769
- package/dist/client/index.js +1 -5
- 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/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 +6 -6
- 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 +4 -4
- 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 +3 -3
- 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 +3 -3
- 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 -2111
- package/dist/react/index.js +41 -97
- 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 -12
- package/dist/SkillStatusBar-DluiBsVj.d.ts +0 -340
- package/dist/blade-client-CseN7OW9.d.ts +0 -1867
- package/dist/chunk-7F6UP5LP.js.map +0 -1
- package/dist/chunk-IMMRWXI7.js.map +0 -1
- package/dist/react/api/vibe-coding.d.ts +0 -55
- package/dist/react/api/vibe-coding.js +0 -47
- package/dist/react/api/vibe-coding.js.map +0 -1
- package/dist/session-CT8Y2KHr.d.ts +0 -227
- package/dist/sessions-DI9DVun7.d.ts +0 -177
- /package/dist/{chunk-2QYV43YP.js.map → chunk-C2FKVGJU.js.map} +0 -0
- /package/dist/{chunk-TYM7KL2L.js.map → chunk-JU5SL4HP.js.map} +0 -0
- /package/dist/{chunk-BQKF6HJH.js.map → chunk-TE6G6NVX.js.map} +0 -0
- /package/dist/{chunk-ICV7OTGX.js.map → chunk-X2NJKKXR.js.map} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getSessionFilePath,
|
|
3
|
+
resolveSessionFilePreviewTarget
|
|
4
|
+
} from "./chunk-C2FKVGJU.js";
|
|
1
5
|
import {
|
|
2
6
|
CardJSON,
|
|
3
7
|
cardRegistry
|
|
4
8
|
} from "./chunk-2UP7MG3J.js";
|
|
5
|
-
import {
|
|
6
|
-
getSessionFilePath,
|
|
7
|
-
resolveSessionFilePreviewTarget
|
|
8
|
-
} from "./chunk-2QYV43YP.js";
|
|
9
9
|
import {
|
|
10
10
|
formatToolName,
|
|
11
11
|
getAuthedUrl,
|
|
12
12
|
useUiStore
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SBASG3M2.js";
|
|
14
14
|
import {
|
|
15
15
|
cn,
|
|
16
16
|
copyToClipboard
|
|
@@ -1937,4 +1937,4 @@ export {
|
|
|
1937
1937
|
PlanSummaryCard,
|
|
1938
1938
|
extractLatestPlanMessages
|
|
1939
1939
|
};
|
|
1940
|
-
//# sourceMappingURL=chunk-
|
|
1940
|
+
//# sourceMappingURL=chunk-TE6G6NVX.js.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Collapsible,
|
|
3
|
+
CollapsibleContent,
|
|
4
|
+
CollapsibleTrigger
|
|
5
|
+
} from "./chunk-H62LH2AG.js";
|
|
1
6
|
import {
|
|
2
7
|
AskUserQuestionBlock,
|
|
3
8
|
CardCodeBlock,
|
|
@@ -8,15 +13,10 @@ import {
|
|
|
8
13
|
getCodeLanguageFromFilename,
|
|
9
14
|
parseAskUserQuestion,
|
|
10
15
|
useHighlightedCodeHtml
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
Collapsible,
|
|
14
|
-
CollapsibleContent,
|
|
15
|
-
CollapsibleTrigger
|
|
16
|
-
} from "./chunk-H62LH2AG.js";
|
|
16
|
+
} from "./chunk-TE6G6NVX.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveSessionFilePreviewTarget
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-C2FKVGJU.js";
|
|
20
20
|
import {
|
|
21
21
|
apiFetchResponse,
|
|
22
22
|
buildMessageContent,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
useUiBridgeStore,
|
|
61
61
|
useUiStore,
|
|
62
62
|
writeFile
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-SBASG3M2.js";
|
|
64
64
|
import {
|
|
65
65
|
registerBridgeIframe,
|
|
66
66
|
tapBridgeEvent
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
ModelOption,
|
|
70
70
|
ModelsConfig,
|
|
71
71
|
ModelsResource
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-34GDDOWY.js";
|
|
73
73
|
import {
|
|
74
74
|
cn,
|
|
75
75
|
copyToClipboard
|
|
@@ -8878,4 +8878,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
|
|
|
8878
8878
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8879
8879
|
*--------------------------------------------------------------------------------------------*)
|
|
8880
8880
|
*/
|
|
8881
|
-
//# sourceMappingURL=chunk-
|
|
8881
|
+
//# sourceMappingURL=chunk-X2NJKKXR.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface AuthOptions {
|
|
2
|
+
token?: string | (() => string | null | undefined);
|
|
3
|
+
}
|
|
4
|
+
export declare function buildAuthHeaders(options: AuthOptions): Record<string, string>;
|
|
5
|
+
export declare function buildSocketAuth(options: AuthOptions): {
|
|
6
|
+
token: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
export declare function resolveAuthToken(options: AuthOptions): string | null;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type BladeFetchInit, type HttpMethod } from "./rest.js";
|
|
2
|
+
import { ApiKeysResource } from "./resources/api-keys.js";
|
|
3
|
+
import { AuthResource } from "./resources/auth.js";
|
|
4
|
+
import { EnvBucketsResource } from "./resources/env-buckets.js";
|
|
5
|
+
import { GisResource } from "./resources/gis.js";
|
|
6
|
+
import { HeadlessResource } from "./resources/headless.js";
|
|
7
|
+
import { MemoriesResource } from "./resources/memories.js";
|
|
8
|
+
import { ModelsResource } from "./resources/models.js";
|
|
9
|
+
import { PublishedAppsResource } from "./resources/published-apps.js";
|
|
10
|
+
import { RegistryResource } from "./resources/registry.js";
|
|
11
|
+
import { RunsResource } from "./resources/runs.js";
|
|
12
|
+
import { ScenariosResource } from "./resources/scenarios.js";
|
|
13
|
+
import { SessionsResource } from "./resources/sessions.js";
|
|
14
|
+
import { SkillsResource } from "./resources/skills.js";
|
|
15
|
+
import { SolutionsResource } from "./resources/solutions.js";
|
|
16
|
+
import { UserPreferencesResource } from "./resources/user-preferences.js";
|
|
17
|
+
import { type TypedSocket } from "./socket.js";
|
|
18
|
+
export interface BladeClientOptions {
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
token?: string | (() => string | null | undefined);
|
|
21
|
+
fetchImpl?: typeof fetch;
|
|
22
|
+
onRefreshSuccess?: () => void | Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export declare class BladeClient {
|
|
25
|
+
private refreshPromise;
|
|
26
|
+
private socketInstance;
|
|
27
|
+
private storeRestTokenResolver;
|
|
28
|
+
private storeSocketTokenResolver;
|
|
29
|
+
readonly options: BladeClientOptions;
|
|
30
|
+
readonly apiKeys: ApiKeysResource;
|
|
31
|
+
readonly auth: AuthResource;
|
|
32
|
+
readonly envBuckets: EnvBucketsResource;
|
|
33
|
+
readonly gis: GisResource;
|
|
34
|
+
readonly headless: HeadlessResource;
|
|
35
|
+
readonly memories: MemoriesResource;
|
|
36
|
+
readonly models: ModelsResource;
|
|
37
|
+
readonly publishedApps: PublishedAppsResource;
|
|
38
|
+
readonly registry: RegistryResource;
|
|
39
|
+
readonly runs: RunsResource;
|
|
40
|
+
readonly scenarios: ScenariosResource;
|
|
41
|
+
readonly sessions: SessionsResource;
|
|
42
|
+
readonly skills: SkillsResource;
|
|
43
|
+
readonly solutions: SolutionsResource;
|
|
44
|
+
readonly userPreferences: UserPreferencesResource;
|
|
45
|
+
constructor(options: BladeClientOptions);
|
|
46
|
+
_attachStoreRestTokenResolver(fn: () => string | null | undefined): void;
|
|
47
|
+
_attachStoreSocketTokenResolver(fn: () => string | null | undefined): void;
|
|
48
|
+
setBaseUrl(baseUrl: string): void;
|
|
49
|
+
socket(): TypedSocket;
|
|
50
|
+
json<T>(method: HttpMethod, path: string, body?: unknown): Promise<T>;
|
|
51
|
+
jsonFromInit<T>(path: string, init?: RequestInit): Promise<T>;
|
|
52
|
+
text(method: HttpMethod, path: string): Promise<string>;
|
|
53
|
+
textFromInit(path: string, init?: RequestInit): Promise<string>;
|
|
54
|
+
responseFromInit(path: string, init?: RequestInit): Promise<Response>;
|
|
55
|
+
blob(method: HttpMethod, path: string): Promise<Blob>;
|
|
56
|
+
formData(method: HttpMethod, path: string, form: FormData, options?: {
|
|
57
|
+
expectOk?: boolean;
|
|
58
|
+
onUploadProgress?: (progress: UploadProgress) => void;
|
|
59
|
+
}): Promise<Response>;
|
|
60
|
+
fetch(method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean): Promise<Response>;
|
|
61
|
+
buildAuthedUrl(path: string): string;
|
|
62
|
+
private buildHeaders;
|
|
63
|
+
private buildUrl;
|
|
64
|
+
private baseUrlWithTrailingSlash;
|
|
65
|
+
private toBaseRelativePath;
|
|
66
|
+
private isSameBackendUrl;
|
|
67
|
+
private shouldRefreshFor401;
|
|
68
|
+
private hasExplicitBearerToken;
|
|
69
|
+
private tryRefresh;
|
|
70
|
+
private resolveTokenForUrl;
|
|
71
|
+
private resolveRestToken;
|
|
72
|
+
private resolveSocketToken;
|
|
73
|
+
private resolveToken;
|
|
74
|
+
private formDataWithUploadProgress;
|
|
75
|
+
}
|
|
76
|
+
export interface UploadProgress {
|
|
77
|
+
loaded: number;
|
|
78
|
+
total?: number;
|
|
79
|
+
percent?: number;
|
|
80
|
+
}
|