@relayfile/sdk 0.7.12 → 0.7.14

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/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export { InvalidStateError, PayloadTooLargeError, QueueFullError, RelayFileApiEr
10
10
  export { IntegrationProvider, computeCanonicalPath } from "./provider.js";
11
11
  export type { WebhookInput, ListProviderFilesOptions, WatchProviderEventsOptions } from "./provider.js";
12
12
  export type { ConnectionProvider, NormalizedWebhook, ProxyHeaders, ProxyMethod, ProxyQuery, ProxyRequest, ProxyResponse, } from "./connection.js";
13
- export type { AckResponse, AckWritebackInput, AckWritebackResponse, AdminIngressAlert, AdminIngressAlertProfile, AdminIngressEffectiveAlertProfile, AdminIngressAlertSeverity, AdminIngressAlertThresholds, AdminIngressAlertTotals, AdminIngressAlertType, AdminIngressStatusResponse, AdminSyncAlert, AdminSyncAlertSeverity, AdminSyncAlertThresholds, AdminSyncAlertTotals, AdminSyncAlertType, AdminSyncStatusResponse, BackendStatusResponse, BulkWriteFile, BulkWriteInput, BulkWriteResponse, ChangeLogQueryResult, ChangeEvent, ChangeEventActor, ChangeEventResource, ChangeEventSummary, ChangeStreamConnection, ChangeStreamConnectionOptions, CommitForkInput, CommitForkResponse, ConflictErrorResponse, CreateForkInput, ContentIdentity, DeleteFileInput, DeadLetterFeedResponse, DeadLetterItem, DiscardForkInput, ErrorResponse, EventSummary, EventFeedResponse, ExportFormat, ExportJsonResponse, ExportOptions, FileQueryItem, FileQueryResponse, FileReadResponse, FileSemantics, FileWriteRequest, FilesystemEvent, FilesystemEventType, EventOrigin, Expansion, ExpansionLevel, GetEventsOptions, GetAdminSyncStatusOptions, GetAdminIngressStatusOptions, GetOperationsOptions, GetSyncDeadLettersOptions, GetSyncIngressStatusOptions, GetSyncStatusOptions, IngestWebhookInput, ListTreeOptions, OperationFeedResponse, OperationStatus, OperationStatusResponse, QueuedResponse, QueryFilesOptions, ReadFileInput, ReplayOptions, ResourceAtEventResult, SummaryExpansion, FullExpansion, DiffExpansion, ThreadExpansion, RelayFileJwtClaims, SubscribeOptions, Subscription, SyncIngressStatusResponse, SyncProviderStatus, SyncProviderStatusState, SyncRefreshRequest, SyncStatusResponse, TreeEntry, TreeResponse, WritebackActionType, WritebackState, WritebackItem, WriteFileInput, WriteQueuedResponse } from "./types.js";
13
+ export type { AckResponse, AckWritebackInput, AckWritebackResponse, AdminIngressAlert, AdminIngressAlertProfile, AdminIngressEffectiveAlertProfile, AdminIngressAlertSeverity, AdminIngressAlertThresholds, AdminIngressAlertTotals, AdminIngressAlertType, AdminIngressStatusResponse, AdminSyncAlert, AdminSyncAlertSeverity, AdminSyncAlertThresholds, AdminSyncAlertTotals, AdminSyncAlertType, AdminSyncStatusResponse, BackendStatusResponse, BulkWriteFile, BulkWriteInput, BulkWriteResponse, ChangeLogQueryResult, ChangeEvent, ChangeEventActor, ChangeEventResource, ChangeEventSummary, ChangeStreamConnection, ChangeStreamConnectionOptions, CommitForkInput, CommitForkResponse, ConflictErrorResponse, CreateForkInput, ContentIdentity, DeleteFileInput, DeadLetterFeedResponse, DeadLetterItem, DigestBullet, DigestContext, DigestHandler, DigestSection, DigestWindow, DiscardForkInput, ErrorResponse, EventSummary, EventFeedResponse, ExportFormat, ExportJsonResponse, ExportOptions, FileQueryItem, FileQueryResponse, FileReadResponse, FileSemantics, FileWriteRequest, FilesystemEvent, FilesystemEventType, EventOrigin, Expansion, ExpansionLevel, GetEventsOptions, GetAdminSyncStatusOptions, GetAdminIngressStatusOptions, GetOperationsOptions, GetSyncDeadLettersOptions, GetSyncIngressStatusOptions, GetSyncStatusOptions, IngestWebhookInput, LayoutManifest, LayoutManifestAlias, LayoutManifestResource, ListTreeOptions, OperationFeedResponse, OperationStatus, OperationStatusResponse, QueuedResponse, QueryFilesOptions, ReadFileInput, ReplayOptions, ResourceAtEventResult, SummaryExpansion, FullExpansion, DiffExpansion, ThreadExpansion, RelayFileJwtClaims, SubscribeOptions, Subscription, SyncIngressStatusResponse, SyncProviderStatus, SyncProviderStatusState, SyncRefreshRequest, SyncStatusResponse, TreeEntry, TreeResponse, WritebackActionType, WritebackDeadLetterError, WritebackDeadLetterErrorCode, WritebackListState, WritebackState, WritebackItem, WritebackItemDetail, WritebackSchemaRef, WriteFileInput, WriteQueuedResponse } from "./types.js";
14
14
  export type { ForkHandle, ForkOptions } from "@relayfile/core";
15
15
  export type { WriteEvent, WriteEventActor, WriteEventOperation, WriteEventSource } from "@relayfile/core";
16
16
  export { WritebackConsumer } from "./writeback-consumer.js";
package/dist/types.d.ts CHANGED
@@ -115,6 +115,7 @@ export interface FileQueryResponse {
115
115
  nextCursor: string | null;
116
116
  }
117
117
  export type WritebackState = "pending" | "succeeded" | "failed" | "dead_lettered";
118
+ export type WritebackListState = WritebackState | "dead";
118
119
  export interface WriteQueuedResponse {
119
120
  opId: string;
120
121
  status: "queued" | "pending";
@@ -204,6 +205,54 @@ export interface ChangeEvent {
204
205
  expand<L extends ExpansionLevel = "summary">(level?: L): Promise<Expansion<L>>;
205
206
  digest?: string;
206
207
  }
208
+ export interface DigestWindow {
209
+ /** ISO 8601, inclusive. */
210
+ readonly from: string;
211
+ /** ISO 8601, exclusive. */
212
+ readonly to: string;
213
+ }
214
+ export interface DigestBullet {
215
+ /** One-line past-tense description, e.g. "AGE-16 moved to in-review". */
216
+ readonly text: string;
217
+ /** Mount-relative canonical path the bullet points at. */
218
+ readonly canonicalPath: string;
219
+ }
220
+ export interface DigestSection {
221
+ readonly provider: string;
222
+ readonly bullets: readonly DigestBullet[];
223
+ }
224
+ export interface DigestContext {
225
+ readonly provider: string;
226
+ readonly window: DigestWindow;
227
+ changeEvents(filter?: {
228
+ providers?: string[];
229
+ paths?: string[];
230
+ }): Promise<readonly ChangeEvent[]>;
231
+ }
232
+ export type DigestHandler = (ctx: DigestContext) => Promise<DigestSection | null>;
233
+ export interface WritebackSchemaRef {
234
+ readonly provider: string;
235
+ readonly resource: string;
236
+ /** Mount-relative path to the served `.schema.json` virtual file. */
237
+ readonly path: string;
238
+ }
239
+ export interface LayoutManifestAlias {
240
+ /** e.g. "by-title", "by-id", "by-edited". */
241
+ readonly segment: string;
242
+ readonly description?: string;
243
+ }
244
+ export interface LayoutManifestResource {
245
+ readonly name: string;
246
+ readonly canonicalFilename: string;
247
+ readonly writebackActions?: readonly string[];
248
+ readonly writebackSchemas?: readonly WritebackSchemaRef[];
249
+ readonly aliases?: readonly LayoutManifestAlias[];
250
+ }
251
+ export interface LayoutManifest {
252
+ readonly provider: string;
253
+ readonly materialization: "eager" | "lazy";
254
+ readonly resources: readonly LayoutManifestResource[];
255
+ }
207
256
  export interface SubscribeOptions {
208
257
  coalesce?: "none" | "fire-once";
209
258
  coalesceMs?: number;
@@ -608,12 +657,39 @@ export interface IngestWebhookInput {
608
657
  correlationId?: string;
609
658
  signal?: AbortSignal;
610
659
  }
660
+ export type WritebackDeadLetterErrorCode = "schema_violation" | "provider_4xx" | "provider_5xx_exhausted" | "timeout";
661
+ export interface WritebackDeadLetterError {
662
+ code: WritebackDeadLetterErrorCode;
663
+ message: string;
664
+ providerStatus?: number;
665
+ providerResponse?: Record<string, unknown>;
666
+ attempts: number;
667
+ firstAttemptAt: string;
668
+ lastAttemptAt: string;
669
+ opId: string;
670
+ }
611
671
  export interface WritebackItem {
612
672
  id: string;
613
673
  workspaceId: string;
614
674
  path: string;
615
675
  revision: string;
616
676
  correlationId: string;
677
+ state?: WritebackListState;
678
+ provider?: string;
679
+ action?: WritebackActionType;
680
+ ts?: string;
681
+ code?: WritebackDeadLetterErrorCode | string;
682
+ message?: string;
683
+ providerStatus?: number;
684
+ providerResponse?: Record<string, unknown>;
685
+ attempts?: number;
686
+ firstAttemptAt?: string;
687
+ enqueuedAt?: string;
688
+ lastAttemptAt?: string;
689
+ error?: WritebackDeadLetterError;
690
+ }
691
+ export interface WritebackItemDetail extends WritebackItem {
692
+ error?: WritebackDeadLetterError;
617
693
  }
618
694
  export interface AckWritebackInput {
619
695
  workspaceId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relayfile/sdk",
3
- "version": "0.7.12",
3
+ "version": "0.7.14",
4
4
  "description": "TypeScript SDK for relayfile — real-time filesystem for humans and agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "prepublishOnly": "npm run build"
23
23
  },
24
24
  "dependencies": {
25
- "@relayfile/core": "0.7.12"
25
+ "@relayfile/core": "0.7.14"
26
26
  },
27
27
  "devDependencies": {
28
28
  "typescript": "^5.7.3",