@fluidframework/runtime-definitions 2.0.0-dev-rc.1.0.0.228517 → 2.0.0-dev-rc.2.0.0.245554

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.
Files changed (84) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/CHANGELOG.md +75 -0
  3. package/api-extractor-cjs.json +8 -0
  4. package/api-extractor-lint.json +1 -1
  5. package/api-extractor.json +1 -1
  6. package/api-report/runtime-definitions.api.md +103 -116
  7. package/dist/dataStoreContext.d.ts +128 -69
  8. package/dist/dataStoreContext.d.ts.map +1 -1
  9. package/dist/dataStoreContext.js +3 -0
  10. package/dist/dataStoreContext.js.map +1 -1
  11. package/dist/dataStoreFactory.d.ts +1 -1
  12. package/dist/dataStoreFactory.d.ts.map +1 -1
  13. package/dist/dataStoreFactory.js.map +1 -1
  14. package/dist/dataStoreRegistry.d.ts +1 -1
  15. package/dist/dataStoreRegistry.d.ts.map +1 -1
  16. package/dist/dataStoreRegistry.js.map +1 -1
  17. package/dist/{garbageCollection.d.ts → garbageCollectionDefinitions.d.ts} +8 -2
  18. package/dist/garbageCollectionDefinitions.d.ts.map +1 -0
  19. package/dist/{garbageCollection.js → garbageCollectionDefinitions.js} +9 -3
  20. package/dist/garbageCollectionDefinitions.js.map +1 -0
  21. package/dist/index.d.ts +12 -52
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +20 -26
  24. package/dist/index.js.map +1 -1
  25. package/dist/package.json +3 -0
  26. package/dist/protocol.d.ts +2 -1
  27. package/dist/protocol.d.ts.map +1 -1
  28. package/dist/protocol.js.map +1 -1
  29. package/dist/runtime-definitions-alpha.d.ts +188 -165
  30. package/dist/runtime-definitions-beta.d.ts +37 -59
  31. package/dist/runtime-definitions-public.d.ts +37 -59
  32. package/dist/runtime-definitions-untrimmed.d.ts +195 -166
  33. package/dist/summary.d.ts +15 -20
  34. package/dist/summary.d.ts.map +1 -1
  35. package/dist/summary.js.map +1 -1
  36. package/dist/tsdoc-metadata.json +1 -1
  37. package/lib/attribution.d.ts +71 -0
  38. package/lib/attribution.d.ts.map +1 -0
  39. package/lib/attribution.js +6 -0
  40. package/lib/attribution.js.map +1 -0
  41. package/lib/dataStoreContext.d.ts +464 -0
  42. package/lib/dataStoreContext.d.ts.map +1 -0
  43. package/lib/dataStoreContext.js +67 -0
  44. package/lib/dataStoreContext.js.map +1 -0
  45. package/lib/dataStoreFactory.d.ts +33 -0
  46. package/lib/dataStoreFactory.d.ts.map +1 -0
  47. package/lib/dataStoreFactory.js +9 -0
  48. package/lib/dataStoreFactory.js.map +1 -0
  49. package/lib/dataStoreRegistry.d.ts +41 -0
  50. package/lib/dataStoreRegistry.d.ts.map +1 -0
  51. package/lib/dataStoreRegistry.js +9 -0
  52. package/lib/dataStoreRegistry.js.map +1 -0
  53. package/lib/garbageCollectionDefinitions.d.ts +62 -0
  54. package/lib/garbageCollectionDefinitions.d.ts.map +1 -0
  55. package/lib/garbageCollectionDefinitions.js +35 -0
  56. package/lib/garbageCollectionDefinitions.js.map +1 -0
  57. package/lib/index.d.ts +17 -0
  58. package/lib/index.d.ts.map +1 -0
  59. package/lib/index.js +10 -0
  60. package/lib/index.js.map +1 -0
  61. package/lib/protocol.d.ts +77 -0
  62. package/lib/protocol.d.ts.map +1 -0
  63. package/lib/protocol.js +6 -0
  64. package/lib/protocol.js.map +1 -0
  65. package/lib/runtime-definitions-alpha.d.ts +1019 -0
  66. package/lib/runtime-definitions-beta.d.ts +242 -0
  67. package/lib/runtime-definitions-public.d.ts +242 -0
  68. package/lib/runtime-definitions-untrimmed.d.ts +1100 -0
  69. package/lib/summary.d.ts +322 -0
  70. package/lib/summary.d.ts.map +1 -0
  71. package/lib/summary.js +26 -0
  72. package/lib/summary.js.map +1 -0
  73. package/package.json +115 -33
  74. package/src/dataStoreContext.ts +151 -85
  75. package/src/dataStoreFactory.ts +1 -1
  76. package/src/dataStoreRegistry.ts +1 -1
  77. package/src/{garbageCollection.ts → garbageCollectionDefinitions.ts} +7 -1
  78. package/src/index.ts +26 -71
  79. package/src/protocol.ts +2 -1
  80. package/src/summary.ts +18 -20
  81. package/tsconfig.cjs.json +7 -0
  82. package/tsconfig.json +2 -5
  83. package/dist/garbageCollection.d.ts.map +0 -1
  84. package/dist/garbageCollection.js.map +0 -1
@@ -1,39 +1,28 @@
1
- import { AttachState } from '@fluidframework/container-definitions';
2
- import { FluidObject } from '@fluidframework/core-interfaces';
3
- import { IAudience } from '@fluidframework/container-definitions';
4
- import { IClientDetails } from '@fluidframework/protocol-definitions';
5
- import { IdCompressor } from '@fluidframework/id-compressor';
6
- import { IdCreationRange } from '@fluidframework/id-compressor';
7
- import { IDeltaManager } from '@fluidframework/container-definitions';
8
- import { IDisposable } from '@fluidframework/core-interfaces';
9
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
10
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
11
- import { IEvent } from '@fluidframework/core-interfaces';
12
- import { IEventProvider } from '@fluidframework/core-interfaces';
13
- import { IFluidHandle } from '@fluidframework/core-interfaces';
14
- import { IIdCompressor } from '@fluidframework/id-compressor';
15
- import { IIdCompressorCore } from '@fluidframework/id-compressor';
16
- import { ILoaderOptions } from '@fluidframework/container-definitions';
17
- import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
18
- import { IQuorumClients } from '@fluidframework/protocol-definitions';
19
- import { IRequest } from '@fluidframework/core-interfaces';
20
- import { IResponse } from '@fluidframework/core-interfaces';
21
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
22
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
23
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
24
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
25
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
26
- import { ITree } from '@fluidframework/protocol-definitions';
1
+ import type { AttachState } from '@fluidframework/container-definitions';
2
+ import type { FluidObject } from '@fluidframework/core-interfaces';
3
+ import type { IAudience } from '@fluidframework/container-definitions';
4
+ import type { IClientDetails } from '@fluidframework/protocol-definitions';
5
+ import type { IDeltaManager } from '@fluidframework/container-definitions';
6
+ import type { IDisposable } from '@fluidframework/core-interfaces';
7
+ import type { IDocumentMessage } from '@fluidframework/protocol-definitions';
8
+ import type { IDocumentStorageService } from '@fluidframework/driver-definitions';
9
+ import type { IEvent } from '@fluidframework/core-interfaces';
10
+ import type { IEventProvider } from '@fluidframework/core-interfaces';
11
+ import type { IFluidHandle } from '@fluidframework/core-interfaces';
12
+ import type { IIdCompressor } from '@fluidframework/id-compressor';
13
+ import type { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
14
+ import type { IQuorumClients } from '@fluidframework/protocol-definitions';
15
+ import type { IRequest } from '@fluidframework/core-interfaces';
16
+ import type { IResponse } from '@fluidframework/core-interfaces';
17
+ import type { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
18
+ import type { ISignalMessage } from '@fluidframework/protocol-definitions';
19
+ import type { ISnapshotTree } from '@fluidframework/protocol-definitions';
20
+ import type { ISummaryTree } from '@fluidframework/protocol-definitions';
21
+ import type { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
22
+ import type { ITree } from '@fluidframework/protocol-definitions';
27
23
  import type { IUser } from '@fluidframework/protocol-definitions';
28
- import { OpSpaceCompressedId } from '@fluidframework/id-compressor';
29
- import { SerializedIdCompressor } from '@fluidframework/id-compressor';
30
- import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
31
- import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
32
- import { SessionId } from '@fluidframework/id-compressor';
33
- import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
34
- import { StableId } from '@fluidframework/id-compressor';
35
- import { SummaryTree } from '@fluidframework/protocol-definitions';
36
- import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
24
+ import type { SummaryTree } from '@fluidframework/protocol-definitions';
25
+ import type { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
37
26
 
38
27
  /**
39
28
  * Encapsulates the return codes of the aliasing API.
@@ -145,6 +134,9 @@ export declare type FluidDataStoreRegistryEntry = Readonly<Partial<IProvideFluid
145
134
  export declare enum FlushMode {
146
135
  /**
147
136
  * In Immediate flush mode the runtime will immediately send all operations to the driver layer.
137
+ *
138
+ * @deprecated This option will be removed in the next major version and should not be used. Use {@link FlushMode.TurnBased} instead, which is the default.
139
+ * See https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#how-batching-works
148
140
  */
149
141
  Immediate = 0,
150
142
  /**
@@ -171,12 +163,19 @@ export declare enum FlushModeExperimental {
171
163
  }
172
164
 
173
165
  /**
174
- * They prefix for GC blobs in the GC tree in summary.
166
+ * The prefix for GC blobs in the GC tree in summary.
175
167
  *
176
168
  * @internal
177
169
  */
178
170
  export declare const gcBlobPrefix = "__gc";
179
171
 
172
+ /**
173
+ * The key for the GC Data blob in attach summaries.
174
+ *
175
+ * @internal
176
+ */
177
+ export declare const gcDataBlobKey = ".gcdata";
178
+
180
179
  /**
181
180
  * The key for deleted nodes blob in the GC tree in summary.
182
181
  *
@@ -226,21 +225,25 @@ export declare interface IAttachMessage {
226
225
  export declare interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
227
226
  readonly logger: ITelemetryBaseLogger;
228
227
  readonly clientDetails: IClientDetails;
228
+ readonly disposed: boolean;
229
229
  /**
230
230
  * Invokes the given callback and guarantees that all operations generated within the callback will be ordered
231
- * sequentially. Total size of all messages must be less than maxOpSize.
231
+ * sequentially.
232
+ *
233
+ * If the callback throws an error, the container will close and the error will be logged.
232
234
  */
233
235
  orderSequentially(callback: () => void): void;
234
236
  /**
235
237
  * Submits a container runtime level signal to be sent to other clients.
236
238
  * @param type - Type of the signal.
237
239
  * @param content - Content of the signal.
240
+ * @param targetClientId - When specified, the signal is only sent to the provided client id.
238
241
  */
239
- submitSignal(type: string, content: any): void;
242
+ submitSignal(type: string, content: any, targetClientId?: string): void;
240
243
  /**
241
244
  * @deprecated 0.16 Issue #1537, #3631
242
245
  */
243
- _createDataStoreWithProps(pkg: string | string[], props?: any, id?: string): Promise<IDataStore>;
246
+ _createDataStoreWithProps(pkg: Readonly<string | string[]>, props?: any, id?: string): Promise<IDataStore>;
244
247
  /**
245
248
  * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves
246
249
  * as the data store's router. The data store is not bound to a container, and in such state is not persisted to
@@ -248,13 +251,20 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
248
251
  * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
249
252
  * store being attached to storage.
250
253
  * @param pkg - Package name of the data store factory
254
+ * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.
255
+ * When not specified the datastore will belong to a `default` group. Read more about it in this
256
+ * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
251
257
  */
252
- createDataStore(pkg: string | string[]): Promise<IDataStore>;
258
+ createDataStore(pkg: Readonly<string | string[]>, loadingGroupId?: string): Promise<IDataStore>;
253
259
  /**
254
260
  * Creates detached data store context. Only after context.attachRuntime() is called,
255
261
  * data store initialization is considered complete.
262
+ * @param pkg - Package name of the data store factory
263
+ * @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.
264
+ * When not specified the datastore will belong to a `default` group. Read more about it in this
265
+ * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}.
256
266
  */
257
- createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
267
+ createDetachedDataStore(pkg: Readonly<string[]>, loadingGroupId?: string): IFluidDataStoreContextDetached;
258
268
  /**
259
269
  * Get an absolute url for a provided container-relative request.
260
270
  * Returns undefined if the container or data store isn't attached to storage.
@@ -270,6 +280,28 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
270
280
  * Returns the current audience.
271
281
  */
272
282
  getAudience(): IAudience;
283
+ /**
284
+ * Generates a new ID that is guaranteed to be unique across all sessions for this container.
285
+ * It could be in compact form (non-negative integer, oppotunistic), but it could also be UUID string.
286
+ * UUIDs generated will have low entropy in groups and will compress well.
287
+ * It can be leveraged anywhere in container where container unique IDs are required, i.e. any place
288
+ * that uses uuid() and stores result in container is likely candidate to start leveraging this API.
289
+ * If you always want to convert to string, instead of doing String(generateDocumentUniqueId()), consider
290
+ * doing encodeCompactIdToString(generateDocumentUniqueId()).
291
+ *
292
+ * For more details, please see IIdCompressor.generateDocumentUniqueId()
293
+ */
294
+ generateDocumentUniqueId(): number | string;
295
+ /**
296
+ * Api to fetch the snapshot from the service for a loadingGroupIds.
297
+ * @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.
298
+ * @param pathParts - Parts of the path, which we want to extract from the snapshot tree.
299
+ * @returns - snapshotTree and the sequence number of the snapshot.
300
+ */
301
+ getSnapshotForLoadingGroupId(loadingGroupIds: string[], pathParts: string[]): Promise<{
302
+ snapshotTree: ISnapshotTree;
303
+ sequenceNumber: number;
304
+ }>;
273
305
  }
274
306
 
275
307
  /**
@@ -284,6 +316,7 @@ export declare interface IContainerRuntimeBaseEvents extends IEvent {
284
316
  (event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): any;
285
317
  (event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void): any;
286
318
  (event: "signal", listener: (message: IInboundSignalMessage, local: boolean) => void): any;
319
+ (event: "dispose", listener: () => void): any;
287
320
  }
288
321
 
289
322
  /**
@@ -310,10 +343,6 @@ export declare interface IDataStore {
310
343
  readonly entryPoint: IFluidHandle<FluidObject>;
311
344
  }
312
345
 
313
- export { IdCompressor }
314
-
315
- export { IdCreationRange }
316
-
317
346
  /**
318
347
  * An envelope wraps the contents with the intended target
319
348
  * @alpha
@@ -364,34 +393,27 @@ export declare interface IExperimentalIncrementalSummaryContext {
364
393
  * @alpha
365
394
  */
366
395
  export declare interface IFluidDataStoreChannel extends IDisposable {
367
- readonly id: string;
368
- /**
369
- * Indicates the attachment state of the channel to a host service.
370
- */
371
- readonly attachState: AttachState;
372
- readonly visibilityState: VisibilityState;
373
- /**
374
- * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
375
- * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.
376
- */
377
- attachGraph(): void;
378
396
  /**
379
397
  * Makes the data store channel visible in the container. Also, runs through its graph and attaches all
380
398
  * bound handles that represent its dependencies in the container's graph.
381
399
  */
382
400
  makeVisibleAndAttachGraph(): void;
383
401
  /**
384
- * Retrieves the summary used as part of the initial summary message
402
+ * Synchronously retrieves the summary used as part of the initial summary message
385
403
  */
386
404
  getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
405
+ /**
406
+ * Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore
407
+ */
408
+ getAttachGCData?(telemetryContext?: ITelemetryContext): IGarbageCollectionData;
387
409
  /**
388
410
  * Processes the op.
389
411
  */
390
- process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
412
+ process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown, addedOutboundReference?: (fromNodePath: string, toNodePath: string) => void): void;
391
413
  /**
392
414
  * Processes the signal.
393
415
  */
394
- processSignal(message: any, local: boolean): void;
416
+ processSignal(message: IInboundSignalMessage, local: boolean): void;
395
417
  /**
396
418
  * Generates a summary for the channel.
397
419
  * Introduced with summarizerNode - will be required in a future release.
@@ -439,6 +461,7 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
439
461
  */
440
462
  readonly entryPoint: IFluidHandle<FluidObject>;
441
463
  request(request: IRequest): Promise<IResponse>;
464
+ setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
442
465
  }
443
466
 
444
467
  /**
@@ -446,7 +469,7 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
446
469
  * get information and call functionality to the container.
447
470
  * @alpha
448
471
  */
449
- export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreContextEvents>, Partial<IProvideFluidDataStoreRegistry>, IProvideFluidHandleContext {
472
+ export declare interface IFluidDataStoreContext extends IFluidParentContext {
450
473
  readonly id: string;
451
474
  /**
452
475
  * A data store created by a client, is a local data store for that client. Also, when a detached container loads
@@ -461,28 +484,110 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
461
484
  * The package path of the data store as per the package factory.
462
485
  */
463
486
  readonly packagePath: readonly string[];
464
- readonly options: ILoaderOptions;
487
+ readonly baseSnapshot: ISnapshotTree | undefined;
488
+ /**
489
+ * @deprecated 0.16 Issue #1635, #3631
490
+ */
491
+ readonly createProps?: any;
492
+ /**
493
+ * @deprecated The functionality to get base GC details has been moved to summarizer node.
494
+ *
495
+ * Returns the GC details in the initial summary of this data store. This is used to initialize the data store
496
+ * and its children with the GC details from the previous summary.
497
+ */
498
+ getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
499
+ /**
500
+ * (Same as @see addedGCOutboundReference, but with string paths instead of handles)
501
+ *
502
+ * Called when a new outbound reference is added to another node. This is used by garbage collection to identify
503
+ * all references added in the system.
504
+ *
505
+ * @param fromPath - The absolute path of the node that added the reference.
506
+ * @param toPath - The absolute path of the outbound node that is referenced.
507
+ */
508
+ addedGCOutboundRoute?(fromPath: string, toPath: string): void;
509
+ }
510
+
511
+ /**
512
+ * @alpha
513
+ */
514
+ export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
515
+ /**
516
+ * Binds a runtime to the context.
517
+ */
518
+ attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<IDataStore>;
519
+ }
520
+
521
+ /**
522
+ * @alpha
523
+ */
524
+ export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
525
+
526
+ /**
527
+ * IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
528
+ * and usually provided to consumers using this mapping through a data store registry.
529
+ * @alpha
530
+ */
531
+ export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
532
+ /**
533
+ * String that uniquely identifies the type of data store created by this factory.
534
+ */
535
+ type: string;
536
+ /**
537
+ * Generates runtime for the data store from the data store context. Once created should be bound to the context.
538
+ * @param context - Context for the data store.
539
+ * @param existing - If instantiating from an existing file.
540
+ */
541
+ instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
542
+ }
543
+
544
+ /**
545
+ * @alpha
546
+ */
547
+ export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
548
+
549
+ /**
550
+ * An association of identifiers to data store registry entries, where the
551
+ * entries can be used to create data stores.
552
+ * @alpha
553
+ */
554
+ export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
555
+ get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
556
+ }
557
+
558
+ /**
559
+ * Represents the context for the data store like objects. It is used by the data store runtime to
560
+ * get information and call functionality to its parent.
561
+ *
562
+ * This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.
563
+ *
564
+ * @alpha
565
+ */
566
+ export declare interface IFluidParentContext extends IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry> {
567
+ readonly options: Record<string | number, any>;
465
568
  readonly clientId: string | undefined;
466
569
  readonly connected: boolean;
467
570
  readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
468
571
  readonly storage: IDocumentStorageService;
469
- readonly baseSnapshot: ISnapshotTree | undefined;
470
572
  readonly logger: ITelemetryBaseLogger;
471
573
  readonly clientDetails: IClientDetails;
472
574
  readonly idCompressor?: IIdCompressor;
575
+ /**
576
+ * Represents the loading group to which the data store belongs to. Please refer to this readme for more context.
577
+ * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
578
+ */
579
+ readonly loadingGroupId?: string;
473
580
  /**
474
581
  * Indicates the attachment state of the data store to a host service.
475
582
  */
476
583
  readonly attachState: AttachState;
477
584
  readonly containerRuntime: IContainerRuntimeBase;
478
- /**
479
- * @deprecated 0.16 Issue #1635, #3631
480
- */
481
- readonly createProps?: any;
482
585
  /**
483
586
  * Ambient services provided with the context
484
587
  */
485
588
  readonly scope: FluidObject;
589
+ readonly gcThrowOnTombstoneUsage: boolean;
590
+ readonly gcTombstoneEnforcementAllowed: boolean;
486
591
  /**
487
592
  * Returns the current quorum.
488
593
  */
@@ -521,11 +626,6 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
521
626
  * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
522
627
  */
523
628
  makeLocallyVisible(): void;
524
- /**
525
- * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
526
- * @param address - The address of the channel that is dirty.
527
- */
528
- setChannelDirty(address: string): void;
529
629
  /**
530
630
  * Get an absolute url to the container based on the provided relativeUrl.
531
631
  * Returns undefined if the container or data store isn't attached to storage.
@@ -544,78 +644,29 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
544
644
  * If it is local, it will throw unsupported errors on calls to summarize.
545
645
  */
546
646
  createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;
647
+ deleteChildSummarizerNode?(id: string): void;
547
648
  uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
548
- /**
549
- * @deprecated The functionality to get base GC details has been moved to summarizer node.
550
- *
551
- * Returns the GC details in the initial summary of this data store. This is used to initialize the data store
552
- * and its children with the GC details from the previous summary.
553
- */
554
- getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
555
649
  /**
556
650
  * @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
557
651
  * It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
558
652
  *
653
+ * Similar capability is exposed with from/to string paths instead of handles via @see addedGCOutboundRoute
654
+ *
559
655
  * Called when a new outbound reference is added to another node. This is used by garbage collection to identify
560
656
  * all references added in the system.
561
657
  * @param srcHandle - The handle of the node that added the reference.
562
658
  * @param outboundHandle - The handle of the outbound node that is referenced.
563
659
  */
564
- addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
565
- }
566
-
567
- /**
568
- * @alpha
569
- */
570
- export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
660
+ addedGCOutboundReference?(srcHandle: {
661
+ absolutePath: string;
662
+ }, outboundHandle: {
663
+ absolutePath: string;
664
+ }): void;
571
665
  /**
572
- * Binds a runtime to the context.
573
- */
574
- attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<void>;
575
- }
576
-
577
- /**
578
- * @alpha
579
- */
580
- export declare interface IFluidDataStoreContextEvents extends IEvent {
581
- (event: "attaching" | "attached", listener: () => void): any;
582
- }
583
-
584
- /**
585
- * @alpha
586
- */
587
- export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
588
-
589
- /**
590
- * IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
591
- * and usually provided to consumers using this mapping through a data store registry.
592
- * @alpha
593
- */
594
- export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
595
- /**
596
- * String that uniquely identifies the type of data store created by this factory.
597
- */
598
- type: string;
599
- /**
600
- * Generates runtime for the data store from the data store context. Once created should be bound to the context.
601
- * @param context - Context for the data store.
602
- * @param existing - If instantiating from an existing file.
666
+ * Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
667
+ * @param address - The address of the channel that is dirty.
603
668
  */
604
- instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
605
- }
606
-
607
- /**
608
- * @alpha
609
- */
610
- export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
611
-
612
- /**
613
- * An association of identifiers to data store registry entries, where the
614
- * entries can be used to create data stores.
615
- * @alpha
616
- */
617
- export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
618
- get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
669
+ setChannelDirty(address: string): void;
619
670
  }
620
671
 
621
672
  /**
@@ -647,10 +698,6 @@ export declare interface IGarbageCollectionDetailsBase {
647
698
  gcData?: IGarbageCollectionData;
648
699
  }
649
700
 
650
- export { IIdCompressor }
651
-
652
- export { IIdCompressorCore }
653
-
654
701
  /**
655
702
  * Represents ISignalMessage with its type.
656
703
  * @public
@@ -686,6 +733,7 @@ export declare interface IProvideFluidDataStoreRegistry {
686
733
 
687
734
  /**
688
735
  * @internal
736
+ * @deprecated - This interface is now moved to `@fluidframework/container-definitions` package. Please import from that package.
689
737
  */
690
738
  export declare interface ISignalEnvelope {
691
739
  /**
@@ -753,9 +801,6 @@ export declare interface ISummarizerNode {
753
801
  invalidate(sequenceNumber: number): void;
754
802
  /**
755
803
  * Calls the internal summarize function and handles internal state tracking.
756
- * If unchanged and fullTree is false, it will reuse previous summary subtree.
757
- * If an error is encountered and throwOnFailure is false, it will try to make
758
- * a summary with a pointer to the previous summary + a blob of outstanding ops.
759
804
  * @param fullTree - true to skip optimizations and always generate the full tree
760
805
  * @param trackState - indicates whether the summarizer node should track the state of the summary or not
761
806
  * @param telemetryContext - summary data passed through the layers for telemetry purposes
@@ -796,7 +841,9 @@ export declare interface ISummarizerNode {
796
841
  */
797
842
  config?: ISummarizerNodeConfig): ISummarizerNode;
798
843
  getChild(id: string): ISummarizerNode | undefined;
799
- /** True if a summary is currently in progress */
844
+ /**
845
+ * True if a summary is currently in progress
846
+ */
800
847
  isSummaryInProgress?(): boolean;
801
848
  }
802
849
 
@@ -809,16 +856,6 @@ export declare interface ISummarizerNodeConfig {
809
856
  * Defaults to true.
810
857
  */
811
858
  readonly canReuseHandle?: boolean;
812
- /**
813
- * True to always stop execution on error during summarize, or false to
814
- * attempt creating a summary that is a pointer ot the last acked summary
815
- * plus outstanding ops in case of internal summarize failure.
816
- * Defaults to false.
817
- *
818
- * BUG BUG: Default to true while we investigate problem
819
- * with differential summaries
820
- */
821
- readonly throwOnFailure?: true;
822
859
  }
823
860
 
824
861
  /**
@@ -949,24 +986,30 @@ export declare interface ITelemetryContext {
949
986
  * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
950
987
  * @param value - value to attribute to this summary telemetry data
951
988
  */
952
- set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
989
+ set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
953
990
  /**
954
991
  * Sets multiple values for telemetry data being tracked.
955
992
  * @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
956
993
  * @param property - property name of the telemetry data being tracked (ex: "Options")
957
994
  * @param values - A set of values to attribute to this summary telemetry data.
958
995
  */
959
- setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
996
+ setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
960
997
  /**
961
998
  * Get the telemetry data being tracked
999
+ *
1000
+ * @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
1001
+ *
962
1002
  * @param prefix - unique prefix for this data (ex: "fluid:map:")
963
1003
  * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
964
1004
  * @returns undefined if item not found
965
1005
  */
966
- get(prefix: string, property: string): TelemetryEventPropertyType;
1006
+ get(prefix: string, property: string): TelemetryBaseEventPropertyType;
967
1007
  /**
968
1008
  * Returns a serialized version of all the telemetry data.
969
1009
  * Should be used when logging in telemetry events.
1010
+ *
1011
+ * @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
1012
+ * but this functionality should not be used by other code being given an ITelemetryContext.
970
1013
  */
971
1014
  serialize(): string;
972
1015
  }
@@ -1011,20 +1054,6 @@ export declare interface OpAttributionKey {
1011
1054
  seq: number;
1012
1055
  }
1013
1056
 
1014
- export { OpSpaceCompressedId }
1015
-
1016
- export { SerializedIdCompressor }
1017
-
1018
- export { SerializedIdCompressorWithNoSession }
1019
-
1020
- export { SerializedIdCompressorWithOngoingSession }
1021
-
1022
- export { SessionId }
1023
-
1024
- export { SessionSpaceCompressedId }
1025
-
1026
- export { StableId }
1027
-
1028
1057
  /**
1029
1058
  * @alpha
1030
1059
  */
package/dist/summary.d.ts CHANGED
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { TelemetryEventPropertyType } from "@fluidframework/core-interfaces";
6
- import { SummaryTree, ISummaryTree, ISequencedDocumentMessage, ISnapshotTree, ITree } from "@fluidframework/protocol-definitions";
7
- import { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollection";
5
+ import type { TelemetryBaseEventPropertyType } from "@fluidframework/core-interfaces";
6
+ import type { SummaryTree, ISummaryTree, ISequencedDocumentMessage, ISnapshotTree, ITree } from "@fluidframework/protocol-definitions";
7
+ import type { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollectionDefinitions.js";
8
8
  /**
9
9
  * Contains the aggregation data from a Tree/Subtree.
10
10
  * @public
@@ -105,16 +105,6 @@ export interface ISummarizerNodeConfig {
105
105
  * Defaults to true.
106
106
  */
107
107
  readonly canReuseHandle?: boolean;
108
- /**
109
- * True to always stop execution on error during summarize, or false to
110
- * attempt creating a summary that is a pointer ot the last acked summary
111
- * plus outstanding ops in case of internal summarize failure.
112
- * Defaults to false.
113
- *
114
- * BUG BUG: Default to true while we investigate problem
115
- * with differential summaries
116
- */
117
- readonly throwOnFailure?: true;
118
108
  }
119
109
  /**
120
110
  * @alpha
@@ -161,9 +151,6 @@ export interface ISummarizerNode {
161
151
  invalidate(sequenceNumber: number): void;
162
152
  /**
163
153
  * Calls the internal summarize function and handles internal state tracking.
164
- * If unchanged and fullTree is false, it will reuse previous summary subtree.
165
- * If an error is encountered and throwOnFailure is false, it will try to make
166
- * a summary with a pointer to the previous summary + a blob of outstanding ops.
167
154
  * @param fullTree - true to skip optimizations and always generate the full tree
168
155
  * @param trackState - indicates whether the summarizer node should track the state of the summary or not
169
156
  * @param telemetryContext - summary data passed through the layers for telemetry purposes
@@ -204,7 +191,9 @@ export interface ISummarizerNode {
204
191
  */
205
192
  config?: ISummarizerNodeConfig): ISummarizerNode;
206
193
  getChild(id: string): ISummarizerNode | undefined;
207
- /** True if a summary is currently in progress */
194
+ /**
195
+ * True if a summary is currently in progress
196
+ */
208
197
  isSummaryInProgress?(): boolean;
209
198
  }
210
199
  /**
@@ -295,24 +284,30 @@ export interface ITelemetryContext {
295
284
  * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
296
285
  * @param value - value to attribute to this summary telemetry data
297
286
  */
298
- set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
287
+ set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
299
288
  /**
300
289
  * Sets multiple values for telemetry data being tracked.
301
290
  * @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
302
291
  * @param property - property name of the telemetry data being tracked (ex: "Options")
303
292
  * @param values - A set of values to attribute to this summary telemetry data.
304
293
  */
305
- setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
294
+ setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
306
295
  /**
307
296
  * Get the telemetry data being tracked
297
+ *
298
+ * @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
299
+ *
308
300
  * @param prefix - unique prefix for this data (ex: "fluid:map:")
309
301
  * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
310
302
  * @returns undefined if item not found
311
303
  */
312
- get(prefix: string, property: string): TelemetryEventPropertyType;
304
+ get(prefix: string, property: string): TelemetryBaseEventPropertyType;
313
305
  /**
314
306
  * Returns a serialized version of all the telemetry data.
315
307
  * Should be used when logging in telemetry events.
308
+ *
309
+ * @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
310
+ * but this functionality should not be used by other code being given an ITelemetryContext.
316
311
  */
317
312
  serialize(): string;
318
313
  }