@fluidframework/agent-scheduler 2.0.0-internal.7.0.0 → 2.0.0-internal.7.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/agent-scheduler",
3
- "version": "2.0.0-internal.7.0.0",
3
+ "version": "2.0.0-internal.7.1.0",
4
4
  "description": "Built in runtime object for distributing agents across instances of a container",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,30 +15,30 @@
15
15
  "module": "lib/index.js",
16
16
  "types": "dist/index.d.ts",
17
17
  "dependencies": {
18
- "@fluid-internal/client-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
19
- "@fluidframework/container-definitions": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
20
- "@fluidframework/core-interfaces": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
21
- "@fluidframework/core-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
22
- "@fluidframework/datastore": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
23
- "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
24
- "@fluidframework/map": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
25
- "@fluidframework/register-collection": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
26
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
27
- "@fluidframework/runtime-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
28
- "@fluidframework/telemetry-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
18
+ "@fluid-internal/client-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
19
+ "@fluidframework/container-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
20
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
21
+ "@fluidframework/core-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
22
+ "@fluidframework/datastore": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
23
+ "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
24
+ "@fluidframework/map": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
25
+ "@fluidframework/register-collection": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
26
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
27
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
28
+ "@fluidframework/telemetry-utils": ">=2.0.0-internal.7.1.0 <2.0.0-internal.7.2.0",
29
29
  "uuid": "^9.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@fluid-tools/build-cli": "^0.24.0",
33
- "@fluidframework/agent-scheduler-previous": "npm:@fluidframework/agent-scheduler@2.0.0-internal.6.3.0",
34
- "@fluidframework/build-common": "^2.0.0",
35
- "@fluidframework/build-tools": "^0.24.0",
36
- "@fluidframework/eslint-config-fluid": "^2.1.0",
32
+ "@fluid-tools/build-cli": "^0.25.0",
33
+ "@fluidframework/agent-scheduler-previous": "npm:@fluidframework/agent-scheduler@2.0.0-internal.7.0.0",
34
+ "@fluidframework/build-common": "^2.0.1",
35
+ "@fluidframework/build-tools": "^0.25.0",
36
+ "@fluidframework/eslint-config-fluid": "^3.0.0",
37
37
  "@microsoft/api-extractor": "^7.37.0",
38
38
  "@types/node": "^16.18.38",
39
39
  "copyfiles": "^2.4.1",
40
- "eslint": "~8.6.0",
41
- "prettier": "~2.6.2",
40
+ "eslint": "~8.50.0",
41
+ "prettier": "~3.0.3",
42
42
  "rimraf": "^4.4.0",
43
43
  "typescript": "~5.1.6"
44
44
  },
@@ -58,10 +58,10 @@
58
58
  "scripts": {
59
59
  "build": "fluid-build . --task build",
60
60
  "build:compile": "fluid-build . --task compile",
61
- "build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
61
+ "build:docs": "api-extractor run --local",
62
62
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
63
63
  "build:test": "tsc --project ./src/test/tsconfig.json",
64
- "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
64
+ "ci:build:docs": "api-extractor run",
65
65
  "clean": "rimraf --glob 'dist' 'lib' '*.tsbuildinfo' '*.build.log' '_api-extractor-temp'",
66
66
  "dev": "npm run build:dev -- --watch",
67
67
  "eslint": "eslint --format stylish src",
package/src/agent.ts CHANGED
@@ -5,12 +5,23 @@
5
5
 
6
6
  import { IEvent, IEventProvider, IFluidLoadable } from "@fluidframework/core-interfaces";
7
7
 
8
+ /**
9
+ * @public
10
+ */
8
11
  export const IAgentScheduler: keyof IProvideAgentScheduler = "IAgentScheduler";
9
12
 
13
+ /**
14
+ * @public
15
+ */
10
16
  export interface IProvideAgentScheduler {
11
17
  readonly IAgentScheduler: IAgentScheduler;
12
18
  }
13
19
 
20
+ /**
21
+ * Events emitted by {@link (IAgentScheduler:interface)}.
22
+ *
23
+ * @public
24
+ */
14
25
  export interface IAgentSchedulerEvents extends IEvent {
15
26
  /**
16
27
  * Event when ownership of task changes
@@ -34,6 +45,8 @@ export interface IAgentSchedulerEvents extends IEvent {
34
45
 
35
46
  /**
36
47
  * Agent scheduler distributes a set of tasks/variables across connected clients.
48
+ *
49
+ * @public
37
50
  */
38
51
  export interface IAgentScheduler
39
52
  extends IProvideAgentScheduler,
package/src/scheduler.ts CHANGED
@@ -454,6 +454,9 @@ class AgentSchedulerRuntime extends FluidDataStoreRuntime {
454
454
  }
455
455
  }
456
456
 
457
+ /**
458
+ * @public
459
+ */
457
460
  export class AgentSchedulerFactory implements IFluidDataStoreFactory {
458
461
  public static readonly type = "_scheduler";
459
462
  public readonly type = AgentSchedulerFactory.type;
@@ -7,12 +7,19 @@ import { IEvent } from "@fluidframework/core-interfaces";
7
7
  import { TypedEventEmitter } from "@fluid-internal/client-utils";
8
8
  import { IAgentScheduler } from "./agent";
9
9
 
10
+ /**
11
+ * Events emitted by {@link TaskSubscription}.
12
+ *
13
+ * @public
14
+ */
10
15
  export interface ITaskSubscriptionEvents extends IEvent {
11
16
  (event: "gotTask" | "lostTask", listener: () => void);
12
17
  }
13
18
 
14
19
  /**
15
20
  * TaskSubscription works with an AgentScheduler to make it easier to monitor a specific task ownership.
21
+ *
22
+ * @public
16
23
  */
17
24
  export class TaskSubscription extends TypedEventEmitter<ITaskSubscriptionEvents> {
18
25
  private subscribed: boolean = false;
@@ -21,7 +28,10 @@ export class TaskSubscription extends TypedEventEmitter<ITaskSubscriptionEvents>
21
28
  * @param agentScheduler - The AgentScheduler that will be subscribed against
22
29
  * @param taskId - The string ID of the task to subscribe against
23
30
  */
24
- constructor(private readonly agentScheduler: IAgentScheduler, public readonly taskId: string) {
31
+ constructor(
32
+ private readonly agentScheduler: IAgentScheduler,
33
+ public readonly taskId: string,
34
+ ) {
25
35
  super();
26
36
  agentScheduler.on("picked", (_taskId: string) => {
27
37
  if (_taskId === this.taskId) {