@workerdeck/server 3.2.0 → 3.4.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 +28 -1
- package/build/index.mjs +755 -225
- package/build/index.mjs.map +1 -1
- package/package.json +7 -5
package/build/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ 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
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";
|
|
5
|
+
import { RelayOp } from "@workerdeck/relay-client";
|
|
5
6
|
//#region src/services/bridge.d.ts
|
|
6
7
|
type BridgeHubOptions = {
|
|
7
8
|
timeoutMs?: number;
|
|
@@ -17,6 +18,13 @@ declare class BridgeHub {
|
|
|
17
18
|
remove(sessionId: string): void;
|
|
18
19
|
}
|
|
19
20
|
//#endregion
|
|
21
|
+
//#region src/services/context-resets.d.ts
|
|
22
|
+
type AgentContextResetOptions = {
|
|
23
|
+
default?: boolean;
|
|
24
|
+
minIntervalMs?: number;
|
|
25
|
+
maxPerHour?: number;
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
20
28
|
//#region src/services/notifications.d.ts
|
|
21
29
|
type SessionNotificationOptions = {
|
|
22
30
|
webhook?: SessionWebhookConfig;
|
|
@@ -154,6 +162,20 @@ type PeerServiceOptions = {
|
|
|
154
162
|
maxHops?: number;
|
|
155
163
|
};
|
|
156
164
|
//#endregion
|
|
165
|
+
//#region src/services/peer-relay.d.ts
|
|
166
|
+
type RelayLinkOptions = {
|
|
167
|
+
url: string;
|
|
168
|
+
gateway: string;
|
|
169
|
+
key?: string;
|
|
170
|
+
keyFile?: string;
|
|
171
|
+
caFile?: string;
|
|
172
|
+
expose?: {
|
|
173
|
+
scope?: Record<string, string>;
|
|
174
|
+
allow?: RelayOp[];
|
|
175
|
+
};
|
|
176
|
+
log?: (message: string) => void;
|
|
177
|
+
};
|
|
178
|
+
//#endregion
|
|
157
179
|
//#region src/services/profile-store.d.ts
|
|
158
180
|
type ProfileStore = {
|
|
159
181
|
list(): ProfileInfo[] | Promise<ProfileInfo[]>;
|
|
@@ -354,7 +376,11 @@ type WorkerServerOptions = {
|
|
|
354
376
|
listSdkSessions?: SdkSessionLister;
|
|
355
377
|
queue?: QueueServerOptions;
|
|
356
378
|
peers?: PeerServiceOptions;
|
|
379
|
+
relay?: RelayLinkOptions;
|
|
357
380
|
notifications?: SessionNotificationOptions;
|
|
381
|
+
engineSleepAfterMs?: number;
|
|
382
|
+
agentContextReset?: false | AgentContextResetOptions;
|
|
383
|
+
effortDefaults?: Record<string, string>;
|
|
358
384
|
bridge?: BridgeHubOptions;
|
|
359
385
|
parking?: {
|
|
360
386
|
store?: SessionStore;
|
|
@@ -430,6 +456,7 @@ type WorkerServer = {
|
|
|
430
456
|
drain: (options?: DrainOptions) => Promise<DrainReport>;
|
|
431
457
|
releaseSession: (id: string) => CarriedSession | undefined;
|
|
432
458
|
adoptSession: (carried: CarriedSession) => boolean;
|
|
459
|
+
releaseRelay: () => void;
|
|
433
460
|
close: () => Promise<void>;
|
|
434
461
|
};
|
|
435
462
|
//#endregion
|
|
@@ -536,5 +563,5 @@ declare class ProfileUsageTracker {
|
|
|
536
563
|
usage(profile: string, now?: number): ProfileUsage | undefined;
|
|
537
564
|
}
|
|
538
565
|
//#endregion
|
|
539
|
-
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 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 };
|
|
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 };
|
|
540
567
|
//# sourceMappingURL=index.d.mts.map
|