@workerdeck/server 3.4.0 → 3.6.1
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 +31 -2
- package/build/index.mjs +785 -163
- package/build/index.mjs.map +1 -1
- package/package.json +7 -7
package/build/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IncomingMessage, Server, ServerResponse } from "node:http";
|
|
2
2
|
import { AttachmentInput, BridgeAnswer, BrowserBridgeExecutor, ClaudeAuthProbe, CostLedgerState, EngineAdapter, EngineSessionOptions, HostToolDefinition, LanguageModel, LocalShellSource, McpConnection, ParkedExecution, Runner, RunnerSnapshot, SHELL_REFUSAL, SessionInstructions, SessionRunnerConfig, ShellDirectory, ToolExecutionCall, ToolExecutionResult, ToolExecutor, ToolSet } from "@workerdeck/core";
|
|
3
3
|
import { JobQueue, QueueAdapter } from "@workerdeck/queue";
|
|
4
|
-
import { ByModel, CreateSessionRequest, JobEvent, MessageAttachment, ModelRate, PricingTable, ProfileEngine, ProfileInfo, ProfileSpend, ProfileUsage, ProviderConfig, SdkSessionSummary, ServerFrame, SessionCapability, SessionInfo, SessionNotification, SessionWebhookConfig, ShellEndReason, ShellInfo, ShellOwner } from "@workerdeck/protocol";
|
|
4
|
+
import { AgentInfo, ByModel, CreateSessionRequest, JobEvent, MessageAttachment, ModelRate, PricingTable, ProfileEngine, ProfileInfo, ProfileSpend, ProfileUsage, ProviderConfig, SdkSessionSummary, ServerFrame, SessionCapability, SessionInfo, SessionNotification, SessionWebhookConfig, ShellEndReason, ShellInfo, ShellOwner, StatusLabelInput } from "@workerdeck/protocol";
|
|
5
5
|
import { RelayOp } from "@workerdeck/relay-client";
|
|
6
6
|
//#region src/services/bridge.d.ts
|
|
7
7
|
type BridgeHubOptions = {
|
|
@@ -144,6 +144,7 @@ declare class SessionParkManager {
|
|
|
144
144
|
sessionFor(executionId: string): string | undefined;
|
|
145
145
|
get(id: string): Promise<StoredSessionRecord | null>;
|
|
146
146
|
retitle(id: string, title: string | undefined): Promise<SessionInfo | undefined>;
|
|
147
|
+
relabel(id: string, input: StatusLabelInput | null): Promise<SessionInfo | undefined | 'parked'>;
|
|
147
148
|
listInfo(): Promise<SessionInfo[]>;
|
|
148
149
|
ensureLive(id: string): Promise<Runner | undefined>;
|
|
149
150
|
submitResult(executionId: string, result: ToolExecutionResult): Promise<{
|
|
@@ -185,6 +186,31 @@ type ProfileStore = {
|
|
|
185
186
|
declare function createMemoryProfileStore(seed?: ProfileInfo[]): ProfileStore;
|
|
186
187
|
declare function createFileProfileStore(path?: string): ProfileStore;
|
|
187
188
|
//#endregion
|
|
189
|
+
//#region src/services/agent-store.d.ts
|
|
190
|
+
type StoredAgent = AgentInfo & {
|
|
191
|
+
avatarSeed: string;
|
|
192
|
+
avatarRecipe?: unknown;
|
|
193
|
+
};
|
|
194
|
+
type AgentStore = {
|
|
195
|
+
list(): StoredAgent[] | Promise<StoredAgent[]>;
|
|
196
|
+
save(agent: StoredAgent): void | Promise<void>;
|
|
197
|
+
delete(id: string): void | Promise<void>;
|
|
198
|
+
};
|
|
199
|
+
declare function createMemoryAgentStore(seed?: StoredAgent[]): AgentStore;
|
|
200
|
+
declare function createFileAgentStore(path?: string): AgentStore;
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/services/avatars.d.ts
|
|
203
|
+
type AvatarImage = {
|
|
204
|
+
png: Uint8Array;
|
|
205
|
+
etag: string;
|
|
206
|
+
durations?: number[];
|
|
207
|
+
};
|
|
208
|
+
type AvatarProvider = {
|
|
209
|
+
roll(seed: string, engine: ProfileEngine | undefined, projectKey: string | undefined): Promise<unknown>;
|
|
210
|
+
still(recipe: unknown): Promise<AvatarImage>;
|
|
211
|
+
busy(recipe: unknown): Promise<AvatarImage | undefined>;
|
|
212
|
+
};
|
|
213
|
+
//#endregion
|
|
188
214
|
//#region src/services/process-tree.d.ts
|
|
189
215
|
type ProcessRow = {
|
|
190
216
|
pid: number;
|
|
@@ -357,6 +383,8 @@ type WorkerServerOptions = {
|
|
|
357
383
|
};
|
|
358
384
|
profiles?: ProfileInfo[];
|
|
359
385
|
profileStore?: ProfileStore;
|
|
386
|
+
agentStore?: AgentStore;
|
|
387
|
+
avatars?: AvatarProvider;
|
|
360
388
|
allowedConfigDirRoots?: string[];
|
|
361
389
|
buildRunnerConfig?: (req: CreateSessionRequest) => SessionRunnerConfig;
|
|
362
390
|
basePath?: string;
|
|
@@ -379,6 +407,7 @@ type WorkerServerOptions = {
|
|
|
379
407
|
relay?: RelayLinkOptions;
|
|
380
408
|
notifications?: SessionNotificationOptions;
|
|
381
409
|
engineSleepAfterMs?: number;
|
|
410
|
+
agentSleepAfterMs?: number;
|
|
382
411
|
agentContextReset?: false | AgentContextResetOptions;
|
|
383
412
|
effortDefaults?: Record<string, string>;
|
|
384
413
|
bridge?: BridgeHubOptions;
|
|
@@ -563,5 +592,5 @@ declare class ProfileUsageTracker {
|
|
|
563
592
|
usage(profile: string, now?: number): ProfileUsage | undefined;
|
|
564
593
|
}
|
|
565
594
|
//#endregion
|
|
566
|
-
export { AttachmentStore, type AttachmentStoreOptions, type Authenticator, BridgeHub, type BridgeHubOptions, type CarriedSession, type DiagnosticSink, type EngineRunnerContext, type FileSessionStoreOptions, type JsonWriteOptions, MemorySessionStore, type NotificationErrorContext, type ParkedSessionRecord, type ProcessRow, type ProcessTable, type ProducedFile, ProducedFileStore, type ProfileStore, ProfileUsageTracker, type ProviderRunnerOptions, type QueueServerOptions, type RelayLinkOptions, type ReloadPlan, SHELL_REFUSAL, type SdkSessionLister, type SessionNotificationOptions, SessionNotifier, SessionParkManager, type SessionParkOptions, SessionRegistry, type SessionRegistryOptions, type SessionStore, type ShellAgentWriteOption, type ShellDirectoryDeps, type ShellRegistry, type ShellRegistryOptions, type ShellSink, SpendLedger, type SpendRecord, type SpendStore, type StoredSessionRecord, type StoredShellIndex, type StoredShellRecord, type WorkerServer, type WorkerServerOptions, createFileProfileStore, createFileSessionStore, createFileSpendStore, createMemoryProfileStore, createProviderRunner, createShellDirectory, createShellRegistry, createWorkerServer, dayKey, isDormant, isMissing, readJsonOr, reloadPlan, sandboxedProviderProfile, shellPermitted, toDurableRecord, writeFileAtomic, writeJsonAtomic };
|
|
595
|
+
export { type AgentStore, AttachmentStore, type AttachmentStoreOptions, type Authenticator, type AvatarImage, type AvatarProvider, BridgeHub, type BridgeHubOptions, type CarriedSession, type DiagnosticSink, type EngineRunnerContext, type FileSessionStoreOptions, type JsonWriteOptions, MemorySessionStore, type NotificationErrorContext, type ParkedSessionRecord, type ProcessRow, type ProcessTable, type ProducedFile, ProducedFileStore, type ProfileStore, ProfileUsageTracker, type ProviderRunnerOptions, type QueueServerOptions, type RelayLinkOptions, type ReloadPlan, SHELL_REFUSAL, type SdkSessionLister, type SessionNotificationOptions, SessionNotifier, SessionParkManager, type SessionParkOptions, SessionRegistry, type SessionRegistryOptions, type SessionStore, type ShellAgentWriteOption, type ShellDirectoryDeps, type ShellRegistry, type ShellRegistryOptions, type ShellSink, SpendLedger, type SpendRecord, type SpendStore, type StoredAgent, type StoredSessionRecord, type StoredShellIndex, type StoredShellRecord, type WorkerServer, type WorkerServerOptions, createFileAgentStore, createFileProfileStore, createFileSessionStore, createFileSpendStore, createMemoryAgentStore, createMemoryProfileStore, createProviderRunner, createShellDirectory, createShellRegistry, createWorkerServer, dayKey, isDormant, isMissing, readJsonOr, reloadPlan, sandboxedProviderProfile, shellPermitted, toDurableRecord, writeFileAtomic, writeJsonAtomic };
|
|
567
596
|
//# sourceMappingURL=index.d.mts.map
|