@eum-agent/plugin 0.0.0-stage → 1.0.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.
@@ -0,0 +1,6 @@
1
+ import { $ as ProviderField, $c as GenerationCapability, $n as ImageResourceVariant, $r as FileReferenceDescription, $s as HostCommands, $t as TriggerSourceHost, A as ModelProtocolType, Ac as NetworkRouting, Al as AgentExtensionData, An as MediaContext, Ar as AgentDataSchemas, As as DependencyNode, At as Subprocess, B as PluginEffectKind, Bc as ResourceRangeRequest, Bl as JsonValue, Bn as ModelSessionPolicy, Br as PtyAvailability, Bs as InstallationRequest, Bt as SubprocessState, C as LocalNetworkPermission, Cc as AgentRun, Cl as ProviderLoginState, Cn as NetworkProxyHost, Cr as PreparedAgentConfigurationSave, Cs as ActivationConstraints, Ct as SessionDeliveryInput, D as LoginFailureCode, Dc as AgentRunRows, Dl as AgentConfigurationParticipant, Dn as FailureKind, Dr as AgentDefinitionPatch, Ds as ArtifactRequest, Dt as SessionNotesService, E as LoginFailure, Ec as AgentRunRow, El as VendorEndpointFacts, En as EffortLevel, Er as AgentDefinition, Es as ArtifactIdentity, Et as SessionNotesResult, F as ModelProviderType, Fc as ClientStreamConnection, Fl as ReadableSourceView, Fn as PlannedFile, Fr as ContextRestoreInput, Fs as InstallationAttemptContext, Ft as SubprocessLogs, G as PrepareModelConnectionInput, Gc as AgentExecution, Gl as PluginDependencies, Gn as ContextMeasurementService, Gr as PtyOutput, Gt as ToolGuidance, H as PluginStorage, Hc as AttachmentReader, Hl as WidgetInput, Hn as GenerationRuntime, Hr as PtyCleanupScope, Hs as PackageContent, Ht as SubprocessWindow, I as Network, Ic as ClientStreamContext, Il as ReadableTarget, In as ResolveParamsInput, Ir as ContextRestoreResult, Is as InstallationBatchRequest, It as SubprocessRead, J as PreparedModelParams, Jc as ModelEntryResolution, Jn as McpSelectionStorage, Jr as PtySpawnOptions, Js as GatewayPlatform, Jt as ToolResult, K as PrepareModelParamsInput, Kc as ModelCataloguePolicy, Kn as ModelInputs, Kr as PtyService, Ks as FilePublication, Kt as ToolGuidanceEntry, L as ParticipantChange, Lc as ClientStreamHandle, Ll as SandboxReadableView, Ln as ResolvedParams, Lr as ContextSearchInput, Ls as InstallationObservation, Lt as SubprocessRecord, M as ModelProviderConnection, Mc as ClientResource, Ml as ReadableRejection, Mn as MediaPlan, Mr as ContextHistoryEntry, Ms as ExtensionSelection, Mt as SubprocessEnding, N as ModelProviderEndpoint, Nc as ClientResourceResponse, Nl as ReadableSource, Nn as ModelCapacity, Nr as ContextHistoryFailure, Ns as HostIdentity, Nt as SubprocessHandle, O as LoginResult, Oc as AgentRuns, Ol as AgentConfigurationRegistration, On as FailureVerdict, Or as AgentDefinitionSnapshot, Os as ArtifactWarning, Ot as SessionNotice, P as ModelProviderProbe, Pc as ClientStream, Pl as ReadableSourceHandle, Pn as ModelSupportService, Pr as ContextHistoryFile, Ps as HostRequirements, Pt as SubprocessHeld, Q as ProtocolProcesses, Qc as GenerationArtifactAuthorization, Qn as ImageResourceInfo, Qr as FileReferenceActions, Qs as HostCommandInspection, Qt as TriggerRunKind, R as Plugin, Rc as ResourceByteMetadata, Rl as SandboxReadables, Rn as StoredParams, Rr as ContextSearchResult, Rs as InstallationOperation, Rt as SubprocessStartFailure, S as InboxNotifier, Sc as BackgroundTaskPort, Sl as ModelCatalogueSnapshot, Sn as ResourceSecurity, Sr as AgentDefinitionManagement, Ss as ActivationBatchResult, St as SessionContext, T as LoginCredential, Tc as AgentRunPlan, Tl as StyleFacts, Tn as CallWithRetryOptions, Tr as AgentCreationInput, Ts as AdmissionReceipt, Tt as SessionFrameHandle, U as PluginToolContentResult, Uc as AttachmentReference, Ul as WidgetRegistration, Un as ModelRuntime, Ur as PtyExit, Us as PlatformTarget, Ut as ToolExecContext, V as PluginLog, Vc as ResourceResult, Vl as MessageTextRenderer, Vn as ModelPortSecurity, Vr as PtyCleanupResult, Vs as PackageArtifacts, Vt as SubprocessStreamWindow, W as PluginToolResult, Wc as AttachmentReferences, Wl as WidgetRegistry, Wn as ModelDeclarationViews, Wr as PtyHandle, Ws as PreparedArtifact, Wt as ToolFile, X as ProtocolProcess, Xc as ChatCapability, Xn as FileMediaService, Xr as WorkspaceRootSnapshot, Xs as HopResponse, Xt as TriggerDefinitionView, Y as PreparedShellExecution, Yc as ArtifactReader, Yn as HostIdentityService, Yr as WorkspaceRoot, Ys as HopRequest, Yt as TriggerDefinitionInput, Z as ProtocolProcessStart, Zc as GeneratedAsset, Zn as FileVariantPolicy, Zr as WorkspaceRoots, Zs as HostAsyncFiles, Zt as TriggerOutcome, _ as DeliveryWrites, _c as StdFs, _l as ProviderCatalogContribution, _n as SettingsParticipant, _r as SessionContextMaintenanceResult, _s as ClientFileStage, _t as SearchProviderConnection, a as ApprovalResult, ac as PlatformNetwork, al as GenerationInputSelectors, an as WebOpenRequest, ar as ContextSession, at as SandboxAvailability, b as HostModelPort, bc as BackgroundComputationPort, bl as CatalogEntry, bn as AddressVerdict, br as SessionModelControls, bs as ClientFilesAvailability, bt as SearchRequest, c as BroadcastClientFrame, cc as PlatformValidation, cl as GenerationModelSummary, cn as AgentToolContexts, cr as AgentContextControl, ct as SandboxPlan, d as ClientFrame, dc as PublicationObservation, dl as GenerationPort, dn as AuthorizationResources, dr as CapabilityRegistries, ds as FileReferenceFormatter, dt as SandboxRequest, ec as HostEnvironmentPolicy, ei as FileReferenceReader, el as GenerationConnection, en as TriggerSourceRegistration, er as CredentialVault, et as ProviderFieldKind, f as ClientFrameHandle, fc as PublicationResult, fl as GenerationPreparation, fn as AuthorizationStrategy, fr as CapabilityRegistry, fs as ClientFileDirectory, ft as SandboxedPlan, g as CredentialsService, gc as SqliteStorageResources, gl as PreparedGenerationInputs, gn as SandboxPhysicalHost, gr as SessionContextMaintenance, gs as ClientFileReader, gt as SearchProviderCall, h as CredentialStatus, hc as SandboxBackend, hl as GenerationService, hn as SandboxHost, hr as DelegatedSessionTask, hs as ClientFileObservation, ht as SearchHit, i as ApprovalRequest, ic as LocalInfrastructure, il as GenerationInputFile, in as WebFailureReason, ir as ContextRuntime, it as SandboxAuthorization, j as ModelProviderCall, jc as ClientIoError, jl as PreparedAgentConfiguration, jn as MediaFate, jr as AgentCapabilityHost, js as ExtensionInstallation, jt as SubprocessBytes, k as ModelOffer, kc as NetworkRoute, kl as AgentConfigurationStore, kn as InspectionInput, kr as AgentPromptTexts, ks as ContentEntry, kt as SessionParticipantsService, l as BroadcastFrameHandle, lc as PublicationFailure, ll as GenerationOperation, ln as SessionAdmission, lr as ContextHistoryPolicy, lt as SandboxPlanResult, m as ClientUi, mc as RuntimePlatform, ml as GenerationResultState, mn as PreparedSettingsWrite, mr as DelegatedSessionChange, ms as ClientFileEntry, mt as SearchAvailability, n as ApprovalChoice, nc as HostParsedCommand, nl as GenerationFailure, nn as Web, nr as ContextFramework, nt as ProviderLoginMethod, o as ApprovalSource, oc as PlatformOwnerLease, ol as GenerationInputsService, on as WebOpenResult, or as ContextSessionPolicy, ot as SandboxExecution, p as ClientMethod, pc as PublicationTarget, pl as GenerationRequest, pn as ConfigurationTransactions, pr as AgentModelConfiguration, ps as ClientFileDirectoryStage, pt as Search, q as PreparedModelConnection, qc as ModelCatalogueSource, qn as McpAgentConfig, qr as PtyServiceFactory, qs as FoundationIdentity, qt as ToolRegistration, r as ApprovalDecision, rc as HostPlatform, rl as GenerationFailureCode, rn as WebCheck, rr as ContextRequestObservation, rt as Sandbox, s as AsyncHumanRequestInput, sc as PlatformStorage, sl as GenerationModel, sn as WorkLifecycle, sr as PromptCategoryBytes, st as SandboxPermissions, t as Approval, tc as HostFiles, ti as FileReferenceSource, tl as GenerationCurrent, tn as TriggersService, tr as CredentialVaultRows, tt as ProviderLogin, u as ClientCallContext, uc as PublicationIdentity, ul as GenerationOutputKind, un as SessionRelation, ur as CapabilityRegistration, ut as SandboxRefusalReason, v as DirectShellPlan, vc as Transport, vl as ProviderCatalogVendor, vn as SandboxPathLocator, vr as SessionDelegationObserver, vs as ClientFileSymlinkStage, vt as SearchProviderProbe, w as LoginChallenge, wc as AgentRunCompletion, wl as ReasoningOption, wn as WindowsProxyFacts, wr as AgentCreation, ws as AdmissionHistory, wt as SessionDeliveryService, x as InboxNotice, xc as BackgroundTask, xl as CatalogGeneration, xn as BatchFileVerdict, xr as AgentSessions, xs as ClientFilesFactory, xt as SessionClientFrame, y as ExecutionAuthority, yc as BackgroundByteSource, yl as ToolAvailabilityView, yn as AddressLookup, yr as SessionModelChoices, ys as ClientFiles, yt as SearchProviderType, z as PluginContext, zc as ResourceCall, zl as JsonObject, zn as ModelDispatchPolicy, zr as SessionContextHistory, zs as InstallationPreview, zt as SubprocessStartSpec } from "./index-D_4mmloq.js";
2
+ import { $a as RetractChunk, Aa as HumanQuestion, Ba as Contribution, Ca as ToolAwaitHumanResult, Da as ExecContext, Ea as EffectHandler, Fa as HumanTarget, Ga as SessionId, Ia as EffectKind, Ja as ModelChunk, Ka as SessionAddress, La as AssemblyView, Ma as HumanRequest, Mo as ToolUsePart, Na as HumanRequestInput, No as VolatileNote, Oa as HumanAnswer, Pa as HumanRequestKind, Qa as ModelRequestFields, Ra as ContextContributor, So as WidgetSource, To as FileRef, Ut as ModelRef, Xa as ModelPort, Ya as ModelInspection, Za as ModelRequest, _a as Stage, _o as WidgetInstance, aa as CompletedOutcome, bo as WidgetIssueCode, ca as InterruptedOutcome, co as MessageAppendedEvent, do as NextStepInsertedEvent, eo as ToolDefinition, fo as RecordableEvent, ga as ModelNext, go as TurnEndedEvent, ha as ModelMiddleware, ho as TriggerSource, ja as HumanReply, ka as HumanOption, ko as Message, la as Outcome, lo as ModelRepliedEvent, mo as TriggerEvent, no as ContextAssembledEvent, oa as CompletedReason, oo as EffectFailedEvent, po as ToolResultsAddedEvent, qa as FinishReason, sa as FailedOutcome, so as Event, to as CancelledEvent, uo as ModelUsage, va as ToolMiddleware, wa as ToolContentResult, wo as ContentPart, xo as WidgetResultFields, ya as ToolNext, yo as WidgetIssue, za as ContextSlot, zi as MediaLimits } from "./index-Br0Y0fFq.js";
3
+ import { $ as ReadingItemQuery, J as ReadingBuildIdentity, K as BoundedItemAction, Q as ReadingItem, X as ReadingCut, Y as ReadingControl, Z as ReadingIdentity, at as ReadingRebasePlan, ct as RewindCaps, dt as RewindPrefixControl, et as ReadingObject, it as ReadingQuery, lt as RewindCommitCredential, nt as ReadingPatch, ot as ReadingStatus, q as BoundedUndoAction, rt as ReadingPublication, st as ReadingStore, tt as ReadingObjectMetadata, ut as RewindInspection } from "./storage-nG0zpW52.js";
4
+ import { a as Channel, c as Delivery, i as SubprocessManagerOptions, l as Dispose, n as SecretBoxState, o as ChannelCapabilities, r as SubprocessManager, s as ChannelContext, t as SecretBox } from "./platform-resources-Cyx3HWbC.js";
5
+ import { a as FileStoreOptions, c as ImageProblem, d as StagedFile, i as FileStore, l as ImageVariant, n as DetailedImageInfo, o as GeneratedFile, r as FileRefusalKind, s as ImageInfo, t as CommitOptions, u as StageOptions } from "./platform-files-pahy7W9H.js";
6
+ export { type ActivationBatchResult, type ActivationConstraints, type AddressLookup, type AddressVerdict, type AdmissionHistory, type AdmissionReceipt, type AgentCapabilityHost, type AgentConfigurationParticipant, type AgentConfigurationRegistration, type AgentConfigurationStore, type AgentContextControl, type AgentCreation, type AgentCreationInput, type AgentDataSchemas, type AgentDefinition, type AgentDefinitionManagement, type AgentDefinitionPatch, type AgentDefinitionSnapshot, type AgentExecution, type AgentExtensionData, type AgentModelConfiguration, type AgentPromptTexts, type AgentRun, type AgentRunCompletion, type AgentRunPlan, type AgentRunRow, type AgentRunRows, type AgentRuns, type AgentSessions, type AgentToolContexts, Approval, ApprovalChoice, ApprovalDecision, ApprovalRequest, ApprovalResult, ApprovalSource, type ArtifactIdentity, type ArtifactReader, type ArtifactRequest, type ArtifactWarning, type AssemblyView, AsyncHumanRequestInput, type AttachmentReader, type AttachmentReference, type AttachmentReferences, type AuthorizationResources, type AuthorizationStrategy, type BackgroundByteSource, type BackgroundComputationPort, type BackgroundTask, type BackgroundTaskPort, type BatchFileVerdict, type BoundedItemAction, type BoundedUndoAction, BroadcastClientFrame, BroadcastFrameHandle, type CallWithRetryOptions, type CancelledEvent, type CapabilityRegistration, type CapabilityRegistries, type CapabilityRegistry, type CatalogEntry, type CatalogGeneration, type Channel, type ChannelCapabilities, type ChannelContext, type ChatCapability, ClientCallContext, type ClientFileDirectory, type ClientFileDirectoryStage, type ClientFileEntry, type ClientFileObservation, type ClientFileReader, type ClientFileStage, type ClientFileSymlinkStage, type ClientFiles, type ClientFilesAvailability, type ClientFilesFactory, ClientFrame, ClientFrameHandle, type ClientIoError, ClientMethod, type ClientResource, type ClientResourceResponse, type ClientStream, type ClientStreamConnection, type ClientStreamContext, type ClientStreamHandle, ClientUi, type CommitOptions, type CompletedOutcome, type CompletedReason, type ConfigurationTransactions, type ContentEntry, type ContentPart, type ContextAssembledEvent, type ContextContributor, type ContextFramework, type ContextHistoryEntry, type ContextHistoryFailure, type ContextHistoryFile, type ContextHistoryPolicy, type ContextMeasurementService, type ContextRequestObservation, type ContextRestoreInput, type ContextRestoreResult, type ContextRuntime, type ContextSearchInput, type ContextSearchResult, type ContextSession, type ContextSessionPolicy, type ContextSlot, type Contribution, CredentialStatus, type CredentialVault, type CredentialVaultRows, CredentialsService, type DelegatedSessionChange, type DelegatedSessionTask, type Delivery, DeliveryWrites, type DependencyNode, type DetailedImageInfo, DirectShellPlan, type Dispose, type EffectFailedEvent, type EffectHandler, type EffectKind, type EffortLevel, type Event, type ExecContext, ExecutionAuthority, type ExtensionInstallation, type ExtensionSelection, type FailedOutcome, type FailureKind, type FailureVerdict, type FileMediaService, type FilePublication, type FileRef, type FileReferenceActions, type FileReferenceDescription, type FileReferenceFormatter, type FileReferenceReader, type FileReferenceSource, type FileRefusalKind, type FileStore, type FileStoreOptions, type FileVariantPolicy, type FinishReason, type FoundationIdentity, type GatewayPlatform, type GeneratedAsset, type GeneratedFile, type GenerationArtifactAuthorization, type GenerationCapability, type GenerationConnection, type GenerationCurrent, type GenerationFailure, type GenerationFailureCode, type GenerationInputFile, type GenerationInputSelectors, type GenerationInputsService, type GenerationModel, type GenerationModelSummary, type GenerationOperation, type GenerationOutputKind, type GenerationPort, type GenerationPreparation, type GenerationRequest, type GenerationResultState, type GenerationRuntime, type GenerationService, type HopRequest, type HopResponse, type HostAsyncFiles, type HostCommandInspection, type HostCommands, type HostEnvironmentPolicy, type HostFiles, type HostIdentity, type HostIdentityService, HostModelPort, type HostParsedCommand, type HostPlatform, type HostRequirements, type HumanAnswer, type HumanOption, type HumanQuestion, type HumanReply, type HumanRequest, type HumanRequestInput, type HumanRequestKind, type HumanTarget, type ImageInfo, type ImageProblem, type ImageResourceInfo, type ImageResourceVariant, type ImageVariant, InboxNotice, InboxNotifier, type InspectionInput, type InstallationAttemptContext, type InstallationBatchRequest, type InstallationObservation, type InstallationOperation, type InstallationPreview, type InstallationRequest, type InterruptedOutcome, type JsonObject, type JsonValue, type LocalInfrastructure, LocalNetworkPermission, LoginChallenge, LoginCredential, LoginFailure, LoginFailureCode, LoginResult, type McpAgentConfig, type McpSelectionStorage, type MediaContext, type MediaFate, type MediaLimits, type MediaPlan, type Message, type MessageAppendedEvent, type MessageTextRenderer, type ModelCapacity, type ModelCataloguePolicy, type ModelCatalogueSnapshot, type ModelCatalogueSource, type ModelChunk, type ModelDeclarationViews, type ModelDispatchPolicy, type ModelEntryResolution, type ModelInputs, type ModelInspection, type ModelMiddleware, type ModelNext, ModelOffer, type ModelPort, type ModelPortSecurity, ModelProtocolType, ModelProviderCall, ModelProviderConnection, ModelProviderEndpoint, ModelProviderProbe, ModelProviderType, type ModelRef, type ModelRepliedEvent, type ModelRequest, type ModelRequestFields, type ModelRuntime, type ModelSessionPolicy, type ModelSupportService, type ModelUsage, Network, type NetworkProxyHost, type NetworkRoute, type NetworkRouting, type NextStepInsertedEvent, type Outcome, type PackageArtifacts, type PackageContent, ParticipantChange, type PlannedFile, type PlatformNetwork, type PlatformOwnerLease, type PlatformStorage, type PlatformTarget, type PlatformValidation, Plugin, PluginContext, type PluginDependencies, PluginEffectKind, PluginLog, PluginStorage, PluginToolContentResult, PluginToolResult, PrepareModelConnectionInput, PrepareModelParamsInput, type PreparedAgentConfiguration, type PreparedAgentConfigurationSave, type PreparedArtifact, type PreparedGenerationInputs, PreparedModelConnection, PreparedModelParams, type PreparedSettingsWrite, PreparedShellExecution, type PromptCategoryBytes, ProtocolProcess, ProtocolProcessStart, ProtocolProcesses, type ProviderCatalogContribution, type ProviderCatalogVendor, ProviderField, ProviderFieldKind, ProviderLogin, ProviderLoginMethod, type ProviderLoginState, type PtyAvailability, type PtyCleanupResult, type PtyCleanupScope, type PtyExit, type PtyHandle, type PtyOutput, type PtyService, type PtyServiceFactory, type PtySpawnOptions, type PublicationFailure, type PublicationIdentity, type PublicationObservation, type PublicationResult, type PublicationTarget, type ReadableRejection, type ReadableSource, type ReadableSourceHandle, type ReadableSourceView, type ReadableTarget, type ReadingBuildIdentity, type ReadingControl, type ReadingCut, type ReadingIdentity, type ReadingItem, type ReadingItemQuery, type ReadingObject, type ReadingObjectMetadata, type ReadingPatch, type ReadingPublication, type ReadingQuery, type ReadingRebasePlan, type ReadingStatus, type ReadingStore, type ReasoningOption, type RecordableEvent, type ResolveParamsInput, type ResolvedParams, type ResourceByteMetadata, type ResourceCall, type ResourceRangeRequest, type ResourceResult, type ResourceSecurity, type RetractChunk, type RewindCaps, type RewindCommitCredential, type RewindInspection, type RewindPrefixControl, type RuntimePlatform, Sandbox, SandboxAuthorization, SandboxAvailability, type SandboxBackend, SandboxExecution, type SandboxHost, type SandboxPathLocator, SandboxPermissions, type SandboxPhysicalHost, SandboxPlan, SandboxPlanResult, type SandboxReadableView, type SandboxReadables, SandboxRefusalReason, SandboxRequest, SandboxedPlan, Search, SearchAvailability, SearchHit, SearchProviderCall, SearchProviderConnection, SearchProviderProbe, SearchProviderType, SearchRequest, type SecretBox, type SecretBoxState, type SessionAddress, type SessionAdmission, SessionClientFrame, SessionContext, type SessionContextHistory, type SessionContextMaintenance, type SessionContextMaintenanceResult, type SessionDelegationObserver, SessionDeliveryInput, SessionDeliveryService, SessionFrameHandle, type SessionId, type SessionModelChoices, type SessionModelControls, SessionNotesResult, SessionNotesService, SessionNotice, SessionParticipantsService, type SessionRelation, type SettingsParticipant, type SqliteStorageResources, type Stage, type StageOptions, type StagedFile, type StdFs, type StoredParams, type StyleFacts, Subprocess, SubprocessBytes, SubprocessEnding, SubprocessHandle, SubprocessHeld, SubprocessLogs, type SubprocessManager, type SubprocessManagerOptions, SubprocessRead, SubprocessRecord, SubprocessStartFailure, SubprocessStartSpec, SubprocessState, SubprocessStreamWindow, SubprocessWindow, type ToolAvailabilityView, type ToolAwaitHumanResult, type ToolContentResult, type ToolDefinition, ToolExecContext, ToolFile, ToolGuidance, ToolGuidanceEntry, type ToolMiddleware, type ToolNext, ToolRegistration, ToolResult, type ToolResultsAddedEvent, type ToolUsePart, type Transport, TriggerDefinitionInput, TriggerDefinitionView, type TriggerEvent, TriggerOutcome, TriggerRunKind, type TriggerSource, TriggerSourceHost, TriggerSourceRegistration, TriggersService, type TurnEndedEvent, type VendorEndpointFacts, type VolatileNote, Web, WebCheck, WebFailureReason, WebOpenRequest, WebOpenResult, type WidgetInput, type WidgetInstance, type WidgetIssue, type WidgetIssueCode, type WidgetRegistration, type WidgetRegistry, type WidgetResultFields, type WidgetSource, type WindowsProxyFacts, WorkLifecycle, type WorkspaceRoot, type WorkspaceRootSnapshot, type WorkspaceRoots };
@@ -0,0 +1,145 @@
1
+ import { Ii as ImageMediaType, To as FileRef } from "./index-Br0Y0fFq.js";
2
+ import "./storage-CpsDibqp.js";
3
+ //#region src/storage/files.d.ts
4
+ /** Persistence contracts; physical storage is supplied by an extension. */
5
+ /** The variant a model receives, when it is not the original. */
6
+ interface FileVariantRow {
7
+ readonly fileId: string;
8
+ readonly mediaType: string;
9
+ readonly size: number;
10
+ readonly width?: number;
11
+ readonly height?: number;
12
+ }
13
+ interface FileObjectRow {
14
+ readonly fileId: string;
15
+ readonly mediaType: string;
16
+ readonly size: number;
17
+ readonly width?: number;
18
+ readonly height?: number;
19
+ readonly model?: FileVariantRow;
20
+ readonly createdAt: number;
21
+ }
22
+ interface FileAddress {
23
+ readonly workspaceId: string;
24
+ readonly fileId: string;
25
+ }
26
+ interface FileRows {
27
+ /** Commits a synchronous file batch or restores its object and use rows on failure. */
28
+ transaction(work: () => void): void;
29
+ /** Inserts a file; an existing row for the same id is left as it was. */
30
+ insert(workspaceId: string, row: FileObjectRow): void;
31
+ get(workspaceId: string, fileId: string): FileObjectRow | undefined;
32
+ /** Records that `sessionId` referenced the file; once per session. */
33
+ recordUse(workspaceId: string, fileId: string, sessionId: string, at: number): void;
34
+ /** Whether this exact workspace/file/session reference was recorded. */
35
+ hasUse(workspaceId: string, fileId: string, sessionId: string): boolean;
36
+ /** Files created before `before` that no session ever referenced, ordered
37
+ * by workspace then id. */
38
+ unusedBefore(before: number): FileAddress[];
39
+ remove(workspaceId: string, fileId: string): void;
40
+ /** Every id one workspace's rows keep on disk: originals and variants. */
41
+ kept(workspaceId: string): ReadonlySet<string>;
42
+ }
43
+ //#endregion
44
+ //#region node_modules/.cache/dts/plugin/src/platform-files.d.ts
45
+ interface ImageInfo {
46
+ readonly mediaType: ImageMediaType;
47
+ readonly width: number;
48
+ readonly height: number;
49
+ }
50
+ interface ImageVariant extends ImageInfo {
51
+ readonly bytes: Buffer;
52
+ }
53
+ type ImageProblem = 'unsupported-type' | 'undecodable' | 'too-many-pixels';
54
+ /** Decoded image properties needed by generation tools when preserving transparency. */
55
+ interface DetailedImageInfo extends ImageInfo {
56
+ /** Whether the source format stores an alpha channel. */
57
+ readonly hasAlpha: boolean;
58
+ /** Whether any decoded pixel is less than fully opaque. */
59
+ readonly hasTransparentPixels: boolean;
60
+ }
61
+ type FileRefusalKind = 'too-large' | ImageProblem;
62
+ /** Host-owned roots, persistence and clock used by the workspace file writer. */
63
+ interface FileStoreOptions {
64
+ /** The trusted work root containing workspace directories. */
65
+ /** Optional extension-owned variant policy, read for each write. */
66
+ readonly prepareVariant?: (bytes: Buffer, info: ImageInfo) => Promise<ImageVariant | undefined>;
67
+ readonly workRoot: string;
68
+ /** Caller-owned file catalog; generated writes use its synchronous transaction. */
69
+ readonly rows: FileRows;
70
+ /** UTC millisecond clock; defaults to Date.now. */
71
+ readonly now?: () => number;
72
+ /** Runs all generated-file rows and uses in one synchronous transaction. */
73
+ readonly transaction?: (work: () => void) => void;
74
+ }
75
+ /** A validated, unpublished file; only the store that staged it can commit it. */
76
+ interface StagedFile {
77
+ /** The original byte count, used to bound a result before commit. */
78
+ readonly size: number;
79
+ }
80
+ /** An incoming generated asset, with its claimed type checked against its bytes. */
81
+ interface GeneratedFile {
82
+ /** Declared MIME, which must agree with the validated bytes. */
83
+ readonly mediaType: string;
84
+ /** Display name of 1–200 UTF-16 code units; defaults to generated.<extension>. */
85
+ readonly name?: string;
86
+ /** A single-consumption source; the store closes the iterator on failure. */
87
+ readonly body: AsyncIterable<Uint8Array>;
88
+ }
89
+ /** Limits and cancellation applied while consuming a generated asset. */
90
+ interface StageOptions {
91
+ /** Required asset family, checked against the MIME and validated content. */
92
+ readonly outputKind: 'image' | 'audio' | 'video';
93
+ /** Cancellation interrupts consumption and prevents publishing the stage. */
94
+ readonly signal?: AbortSignal;
95
+ /** An additional byte ceiling, such as a batch's remaining budget. */
96
+ readonly maxBytes?: number;
97
+ }
98
+ /** Identity is checked after obtaining the workspace lock and before any writes. */
99
+ interface CommitOptions {
100
+ /** Cancellation observed before the synchronous commit prevents any references. */
101
+ readonly signal?: AbortSignal;
102
+ /** Throws if the captured owner/session/connection identity is no longer current. */
103
+ readonly assertCurrent?: () => void;
104
+ }
105
+ /** Content-addressed workspace originals, image variants and unpublished generated batches. */
106
+ interface FileStore {
107
+ /** Chooses a stored media file name when the producer supplied none. */
108
+ defaultName(mediaType: string): string;
109
+ /**
110
+ * Streams and validates a generated asset under its image/audio/video byte ceiling.
111
+ * The returned stage is private until committed; failure deletes its temporary files.
112
+ */
113
+ stageStream(workspaceId: string, file: GeneratedFile, options: StageOptions): Promise<StagedFile>;
114
+ /**
115
+ * Publishes 1–8 same-workspace stages totaling at most 256 MiB in input order.
116
+ * The workspace lock covers identity checks, placement and one row/use transaction.
117
+ * Commit consumes all stages on either success or failure and preserves shared files.
118
+ * Cancellation before the synchronous section wins; cancellation after commit does not undo it.
119
+ */
120
+ commitBatch(workspaceId: string, sessionId: string, files: readonly StagedFile[], options?: CommitOptions): Promise<readonly FileRef[]>;
121
+ /** Deletes unpublished staged files; committed files are left untouched. */
122
+ discard(files: readonly StagedFile[]): void;
123
+ /** Stores an upload as it arrives; refuses past 20 MiB before it ends. */
124
+ put(workspaceId: string, source: AsyncIterable<Uint8Array>): Promise<FileObjectRow>;
125
+ /** Stores bytes already in memory, such as a tool's. */
126
+ putBytes(workspaceId: string, bytes: Uint8Array): Promise<FileObjectRow>;
127
+ /** A stored original's row, or nothing when the workspace holds no such file. */
128
+ get(workspaceId: string, fileId: string): FileObjectRow | undefined;
129
+ /** A reference to a stored original under `name`. */
130
+ refOf(workspaceId: string, fileId: string, name: string): FileRef | undefined;
131
+ /**
132
+ * The bytes of `id`, checked against it: an original by its row, or a
133
+ * variant when its `mediaType` is given. Nothing when the workspace holds
134
+ * no such file or its bytes no longer match.
135
+ */
136
+ read(workspaceId: string, id: string, mediaType?: string): Promise<Buffer | undefined>;
137
+ /** Where `id` is on disk, whether or not it is still there. */
138
+ locationOf(workspaceId: string, id: string, mediaType?: string): string | undefined;
139
+ /** Records that `sessionId` referenced a file; before its message is written. */
140
+ recordUse(workspaceId: string, fileId: string, sessionId: string): void;
141
+ /** Collects old unused uploads; startup also removes recent unindexed crash leftovers. */
142
+ sweep(startup?: boolean): Promise<void>;
143
+ }
144
+ //#endregion
145
+ export { FileStoreOptions as a, ImageProblem as c, StagedFile as d, FileStore as i, ImageVariant as l, DetailedImageInfo as n, GeneratedFile as o, FileRefusalKind as r, ImageInfo as s, CommitOptions as t, StageOptions as u };
@@ -0,0 +1,2 @@
1
+ import { a as FileStoreOptions, c as ImageProblem, d as StagedFile, i as FileStore, l as ImageVariant, n as DetailedImageInfo, o as GeneratedFile, r as FileRefusalKind, s as ImageInfo, t as CommitOptions, u as StageOptions } from "./platform-files-pahy7W9H.js";
2
+ export { CommitOptions, DetailedImageInfo, FileRefusalKind, FileStore, FileStoreOptions, GeneratedFile, ImageInfo, ImageProblem, ImageVariant, StageOptions, StagedFile };