@workerdeck/server 3.4.0 → 3.5.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 +30 -2
- package/build/index.mjs +645 -123
- 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 } from "@workerdeck/protocol";
|
|
5
5
|
import { RelayOp } from "@workerdeck/relay-client";
|
|
6
6
|
//#region src/services/bridge.d.ts
|
|
7
7
|
type BridgeHubOptions = {
|
|
@@ -185,6 +185,31 @@ type ProfileStore = {
|
|
|
185
185
|
declare function createMemoryProfileStore(seed?: ProfileInfo[]): ProfileStore;
|
|
186
186
|
declare function createFileProfileStore(path?: string): ProfileStore;
|
|
187
187
|
//#endregion
|
|
188
|
+
//#region src/services/agent-store.d.ts
|
|
189
|
+
type StoredAgent = AgentInfo & {
|
|
190
|
+
avatarSeed: string;
|
|
191
|
+
avatarRecipe?: unknown;
|
|
192
|
+
};
|
|
193
|
+
type AgentStore = {
|
|
194
|
+
list(): StoredAgent[] | Promise<StoredAgent[]>;
|
|
195
|
+
save(agent: StoredAgent): void | Promise<void>;
|
|
196
|
+
delete(id: string): void | Promise<void>;
|
|
197
|
+
};
|
|
198
|
+
declare function createMemoryAgentStore(seed?: StoredAgent[]): AgentStore;
|
|
199
|
+
declare function createFileAgentStore(path?: string): AgentStore;
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/services/avatars.d.ts
|
|
202
|
+
type AvatarImage = {
|
|
203
|
+
png: Uint8Array;
|
|
204
|
+
etag: string;
|
|
205
|
+
durations?: number[];
|
|
206
|
+
};
|
|
207
|
+
type AvatarProvider = {
|
|
208
|
+
roll(seed: string, engine: ProfileEngine | undefined, projectKey: string | undefined): Promise<unknown>;
|
|
209
|
+
still(recipe: unknown): Promise<AvatarImage>;
|
|
210
|
+
busy(recipe: unknown): Promise<AvatarImage | undefined>;
|
|
211
|
+
};
|
|
212
|
+
//#endregion
|
|
188
213
|
//#region src/services/process-tree.d.ts
|
|
189
214
|
type ProcessRow = {
|
|
190
215
|
pid: number;
|
|
@@ -357,6 +382,8 @@ type WorkerServerOptions = {
|
|
|
357
382
|
};
|
|
358
383
|
profiles?: ProfileInfo[];
|
|
359
384
|
profileStore?: ProfileStore;
|
|
385
|
+
agentStore?: AgentStore;
|
|
386
|
+
avatars?: AvatarProvider;
|
|
360
387
|
allowedConfigDirRoots?: string[];
|
|
361
388
|
buildRunnerConfig?: (req: CreateSessionRequest) => SessionRunnerConfig;
|
|
362
389
|
basePath?: string;
|
|
@@ -379,6 +406,7 @@ type WorkerServerOptions = {
|
|
|
379
406
|
relay?: RelayLinkOptions;
|
|
380
407
|
notifications?: SessionNotificationOptions;
|
|
381
408
|
engineSleepAfterMs?: number;
|
|
409
|
+
agentSleepAfterMs?: number;
|
|
382
410
|
agentContextReset?: false | AgentContextResetOptions;
|
|
383
411
|
effortDefaults?: Record<string, string>;
|
|
384
412
|
bridge?: BridgeHubOptions;
|
|
@@ -563,5 +591,5 @@ declare class ProfileUsageTracker {
|
|
|
563
591
|
usage(profile: string, now?: number): ProfileUsage | undefined;
|
|
564
592
|
}
|
|
565
593
|
//#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 };
|
|
594
|
+
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
595
|
//# sourceMappingURL=index.d.mts.map
|