@workerdeck/react 2.15.0 → 3.1.0
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/build/index.d.mts +29 -3
- package/build/index.mjs +332 -173
- package/build/index.mjs.map +1 -1
- package/package.json +6 -6
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DependencyList, Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { SessionHandle, WorkerDeckClient } from "@workerdeck/client";
|
|
3
|
+
import { AttachedFrame, ByModel, ChecklistItem, ContextUsage, EngineCapabilities, FilePatch, HostDirEntry, HostFileMatch, MessageAttachment, MessageOrigin, ModelOption, PermissionMode, PermissionRequest, PricingTable, ProfileEngine, ProfileSpend, ProfileUsage, RateLimitInfo, SessionEvent, SessionInfo, SessionRow, SessionStatus, ShellInfo, SkillInfo, SlashCommandInfo, ToolExecutionBackend, UsageWindowRow } from "@workerdeck/protocol";
|
|
3
4
|
import { RunScriptResult, SandboxEngine, SandboxVfs } from "@workerdeck/sandbox";
|
|
4
5
|
//#region src/lib/transcript.d.ts
|
|
5
6
|
type ToolResultImageRef = {
|
|
@@ -126,7 +127,7 @@ declare function shellRowText(shell: ShellInfo, text: string): {
|
|
|
126
127
|
truncated: boolean;
|
|
127
128
|
};
|
|
128
129
|
declare function seedFromSessionInfo(state: TranscriptState, info: SessionInfo): TranscriptState;
|
|
129
|
-
declare function rateLimitWindows(state: TranscriptState): UsageWindowRow[];
|
|
130
|
+
declare function rateLimitWindows(state: Pick<TranscriptState, 'rateLimits' | 'rateLimitsUpdatedAt'>): UsageWindowRow[];
|
|
130
131
|
declare function hydrateToolResult(state: TranscriptState, toolUseId: string, text: string): TranscriptState;
|
|
131
132
|
declare function hydrateShellRow(state: TranscriptState, shellId: string, shell: ShellInfo | undefined): TranscriptState;
|
|
132
133
|
declare function hydrateShellOutput(state: TranscriptState, shellId: string, text: string): TranscriptState;
|
|
@@ -166,6 +167,7 @@ type UseClaudeSessionResult = {
|
|
|
166
167
|
loadShellOutput: (shellId: string) => Promise<boolean>;
|
|
167
168
|
verifyShell: (shellId: string) => Promise<boolean>;
|
|
168
169
|
killShell: (shellId: string) => Promise<boolean>;
|
|
170
|
+
setShellAgentWrite: (shellId: string, enabled: boolean) => Promise<boolean>;
|
|
169
171
|
};
|
|
170
172
|
declare function useClaudeSession(client: WorkerDeckClient, sessionId: string | undefined, options?: UseClaudeSessionOptions): UseClaudeSessionResult;
|
|
171
173
|
//#endregion
|
|
@@ -287,6 +289,16 @@ declare function usePeerSessions(client: WorkerDeckClient, sessionId: string | u
|
|
|
287
289
|
type ClientForHost = (hostId: string) => WorkerDeckClient | undefined;
|
|
288
290
|
declare function useProjectIcons(rows: readonly SessionRow[], clientFor: ClientForHost): Record<string, string>;
|
|
289
291
|
//#endregion
|
|
292
|
+
//#region src/hooks/use-bookmarks.d.ts
|
|
293
|
+
type UseBookmarksResult = {
|
|
294
|
+
bookmarks: readonly string[];
|
|
295
|
+
toggle: (itemId: string) => void;
|
|
296
|
+
};
|
|
297
|
+
declare function useBookmarks(sessionKey: string | undefined): UseBookmarksResult;
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/lib/bookmark-store.d.ts
|
|
300
|
+
declare const BOOKMARKS_STORAGE_KEY = "workerdeck.bookmarks.v1";
|
|
301
|
+
//#endregion
|
|
290
302
|
//#region src/hooks/use-draft.d.ts
|
|
291
303
|
type UseDraftResult = {
|
|
292
304
|
initialText: string;
|
|
@@ -315,6 +327,20 @@ type UseSessionInfoResult = {
|
|
|
315
327
|
};
|
|
316
328
|
declare function useSessionInfo(client: WorkerDeckClient, sessionId: string | undefined): UseSessionInfoResult;
|
|
317
329
|
//#endregion
|
|
330
|
+
//#region src/lib/async-guards.d.ts
|
|
331
|
+
type UseAsyncOptions = {
|
|
332
|
+
enabled?: boolean;
|
|
333
|
+
pollMs?: number;
|
|
334
|
+
};
|
|
335
|
+
type UseAsyncResult<T> = {
|
|
336
|
+
data: T | undefined;
|
|
337
|
+
error: unknown;
|
|
338
|
+
loading: boolean;
|
|
339
|
+
reload: () => Promise<void>;
|
|
340
|
+
setData: Dispatch<SetStateAction<T | undefined>>;
|
|
341
|
+
};
|
|
342
|
+
declare function useAsync<T>(load: () => Promise<T>, deps: DependencyList, { enabled, pollMs }?: UseAsyncOptions): UseAsyncResult<T>;
|
|
343
|
+
//#endregion
|
|
318
344
|
//#region src/lib/open-files.d.ts
|
|
319
345
|
type OpenFile = {
|
|
320
346
|
path: string;
|
|
@@ -500,5 +526,5 @@ type UseShellTerminalResult = {
|
|
|
500
526
|
};
|
|
501
527
|
declare function useShellTerminal(handle: SessionHandle | undefined, shellId: string | undefined, options: UseShellTerminalOptions): UseShellTerminalResult;
|
|
502
528
|
//#endregion
|
|
503
|
-
export { type AttachmentKind, type ClientForHost, type ClientToolHandler, type ClientToolResult, type ConnectionState, type HostDirState, type HostTreeRow, type OpenFile, type OpenFilesAction, type OpenFilesState, type PeerSessionOption, type ProducedFileRef, type PromptToken, type PromptTokenOptions, REPLAY_HOLD_MAX_MS, type RecapInput, type RecapSummary, type ShellAttachment, type ShellItem, type ShellTerminalSize, type ShellTerminalStatus, type StagedAttachment, type ToolCallHostOptions, type ToolHostExecution, type ToolHostRunner, type ToolResultImageRef, type TranscriptItem, type TranscriptState, type UseAttachmentsOptions, type UseAttachmentsResult, type UseClaudeSessionOptions, type UseClaudeSessionResult, type UseDraftResult, type UseHostFileRootsResult, type UseHostFileSearchResult, type UseHostFileTreeResult, type UseOpenFilesResult, type UsePeerSessionsResult, type UseProfileUsageOptions, type UseProfileUsageResult, type UseSessionInfoResult, type UseShellTerminalOptions, type UseShellTerminalResult, type UseToolCallHostOptions, ancestorsWithin, applyEvent, attachmentKind, clearDrafts, clearProfileUsageCache, clearTranscriptCache, createToolCallHost, currentText, flattenHostTree, hydrateShellOutput, hydrateShellRow, hydrateToolResult, initialOpenFilesState, initialReplayTarget, initialTranscriptState, isDirty, openFilesReducer, rateLimitWindows, recapLine, scanPromptTokens, seedFromSessionInfo, shellRowText, staleAttach, summarizeSince, useAttachments, useClaudeSession, useDraft, useHostFileRoots, useHostFileSearch, useHostFileTree, useOpenFiles, usePeerSessions, useProfileUsage, useProjectIcons, useSessionInfo, useShellTerminal, useToolCallHost };
|
|
529
|
+
export { type AttachmentKind, BOOKMARKS_STORAGE_KEY, type ClientForHost, type ClientToolHandler, type ClientToolResult, type ConnectionState, type HostDirState, type HostTreeRow, type OpenFile, type OpenFilesAction, type OpenFilesState, type PeerSessionOption, type ProducedFileRef, type PromptToken, type PromptTokenOptions, REPLAY_HOLD_MAX_MS, type RecapInput, type RecapSummary, type ShellAttachment, type ShellItem, type ShellTerminalSize, type ShellTerminalStatus, type StagedAttachment, type ToolCallHostOptions, type ToolHostExecution, type ToolHostRunner, type ToolResultImageRef, type TranscriptItem, type TranscriptState, type UseAsyncOptions, type UseAsyncResult, type UseAttachmentsOptions, type UseAttachmentsResult, type UseBookmarksResult, type UseClaudeSessionOptions, type UseClaudeSessionResult, type UseDraftResult, type UseHostFileRootsResult, type UseHostFileSearchResult, type UseHostFileTreeResult, type UseOpenFilesResult, type UsePeerSessionsResult, type UseProfileUsageOptions, type UseProfileUsageResult, type UseSessionInfoResult, type UseShellTerminalOptions, type UseShellTerminalResult, type UseToolCallHostOptions, ancestorsWithin, applyEvent, attachmentKind, clearDrafts, clearProfileUsageCache, clearTranscriptCache, createToolCallHost, currentText, flattenHostTree, hydrateShellOutput, hydrateShellRow, hydrateToolResult, initialOpenFilesState, initialReplayTarget, initialTranscriptState, isDirty, openFilesReducer, rateLimitWindows, recapLine, scanPromptTokens, seedFromSessionInfo, shellRowText, staleAttach, summarizeSince, useAsync, useAttachments, useBookmarks, useClaudeSession, useDraft, useHostFileRoots, useHostFileSearch, useHostFileTree, useOpenFiles, usePeerSessions, useProfileUsage, useProjectIcons, useSessionInfo, useShellTerminal, useToolCallHost };
|
|
504
530
|
//# sourceMappingURL=index.d.mts.map
|