nx 23.3.0-beta.6 → 23.3.0-beta.8

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 (118) hide show
  1. package/README.md +1 -1
  2. package/dist/nx-cloud-internals.d.ts +1 -1
  3. package/dist/nx-cloud-internals.js +4 -4
  4. package/dist/src/command-line/migrate/agentic/master/run-master-session.d.ts +6 -2
  5. package/dist/src/command-line/migrate/agentic/master/run-master-session.js +88 -14
  6. package/dist/src/command-line/migrate/command-object.d.ts +1 -0
  7. package/dist/src/command-line/migrate/command-object.js +6 -1
  8. package/dist/src/command-line/migrate/migrate-analytics.d.ts +34 -9
  9. package/dist/src/command-line/migrate/migrate-analytics.js +71 -10
  10. package/dist/src/command-line/migrate/migrate-config.d.ts +5 -2
  11. package/dist/src/command-line/migrate/migrate-config.js +19 -11
  12. package/dist/src/command-line/migrate/migrate.d.ts +2 -0
  13. package/dist/src/command-line/migrate/migrate.js +152 -45
  14. package/dist/src/command-line/migrate/resolve-package-version.js +2 -19
  15. package/dist/src/command-line/migrate/run/broker.d.ts +14 -2
  16. package/dist/src/command-line/migrate/run/broker.js +95 -34
  17. package/dist/src/command-line/migrate/run/existing-run-report.d.ts +55 -0
  18. package/dist/src/command-line/migrate/run/existing-run-report.js +225 -0
  19. package/dist/src/command-line/migrate/run/give-up.d.ts +41 -0
  20. package/dist/src/command-line/migrate/run/give-up.js +148 -0
  21. package/dist/src/command-line/migrate/run/index.d.ts +6 -4
  22. package/dist/src/command-line/migrate/run/index.js +15 -2
  23. package/dist/src/command-line/migrate/run/issues.d.ts +14 -0
  24. package/dist/src/command-line/migrate/run/issues.js +59 -0
  25. package/dist/src/command-line/migrate/run/orchestrator.d.ts +40 -1
  26. package/dist/src/command-line/migrate/run/orchestrator.js +509 -160
  27. package/dist/src/command-line/migrate/run/run-id.d.ts +0 -8
  28. package/dist/src/command-line/migrate/run/run-id.js +0 -30
  29. package/dist/src/command-line/migrate/run/run-state.d.ts +11 -9
  30. package/dist/src/command-line/migrate/run/run-state.js +25 -12
  31. package/dist/src/command-line/migrate/run/runbook.js +9 -4
  32. package/dist/src/command-line/migrate/run/state-lock.d.ts +31 -0
  33. package/dist/src/command-line/migrate/run/state-lock.js +126 -0
  34. package/dist/src/command-line/migrate/run/state-machine.d.ts +15 -0
  35. package/dist/src/command-line/migrate/run/state-machine.js +137 -10
  36. package/dist/src/command-line/migrate/run/util.d.ts +1 -0
  37. package/dist/src/command-line/migrate/run/util.js +21 -0
  38. package/dist/src/command-line/migrate/run/worker.js +3 -0
  39. package/dist/src/command-line/migrate/step-actions.d.ts +1 -1
  40. package/dist/src/command-line/migrate/step-actions.js +7 -1
  41. package/dist/src/command-line/migrate/text.d.ts +6 -0
  42. package/dist/src/command-line/migrate/text.js +25 -0
  43. package/dist/src/command-line/release/utils/release-graph.js +1 -1
  44. package/dist/src/command-line/release/utils/remote-release-clients/github.js +2 -5
  45. package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +2 -2
  46. package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +4 -5
  47. package/dist/src/command-line/release/version/version-actions.d.ts +3 -0
  48. package/dist/src/command-line/reset/reset.js +3 -0
  49. package/dist/src/config/task-graph.d.ts +1 -1
  50. package/dist/src/config/workspace-json-project-json.d.ts +4 -4
  51. package/dist/src/daemon/client/client.d.ts +3 -3
  52. package/dist/src/daemon/client/client.js +4 -4
  53. package/dist/src/daemon/message-types/ultracache-configuration-version.d.ts +8 -0
  54. package/dist/src/daemon/server/handle-hash-tasks.d.ts +2 -2
  55. package/dist/src/daemon/server/handle-hash-tasks.js +3 -3
  56. package/dist/src/daemon/server/handle-select-affected-tasks.js +4 -2
  57. package/dist/src/daemon/server/ultracache-configuration-state.d.ts +7 -0
  58. package/dist/src/daemon/server/{io-snapshots-state.js → ultracache-configuration-state.js} +5 -4
  59. package/dist/src/hasher/create-task-hasher.d.ts +3 -3
  60. package/dist/src/hasher/create-task-hasher.js +6 -6
  61. package/dist/src/hasher/hash-task.d.ts +2 -2
  62. package/dist/src/hasher/hash-task.js +5 -5
  63. package/dist/src/hasher/native-task-hasher-impl.d.ts +7 -7
  64. package/dist/src/hasher/native-task-hasher-impl.js +19 -19
  65. package/dist/src/hasher/task-hasher.d.ts +14 -14
  66. package/dist/src/hasher/task-hasher.js +13 -13
  67. package/dist/src/native/index.d.ts +95 -102
  68. package/dist/src/native/native-bindings.js +4 -5
  69. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  70. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  71. package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +15 -8
  72. package/dist/src/nx-cloud/update-manager.d.ts +3 -3
  73. package/dist/src/nx-cloud/update-manager.js +19 -13
  74. package/dist/src/nx-cloud/utilities/is-workspace-claimed.js +2 -1
  75. package/dist/src/nx-cloud/utilities/nx-cloud-http-client.d.ts +5 -0
  76. package/dist/src/nx-cloud/utilities/nx-cloud-http-client.js +16 -0
  77. package/dist/src/nx-cloud/utilities/url-shorten.js +17 -10
  78. package/dist/src/plugins/js/index.js +45 -64
  79. package/dist/src/plugins/js/lock-file/lock-file.d.ts +4 -4
  80. package/dist/src/plugins/js/lock-file/lock-file.js +6 -7
  81. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +22 -18
  82. package/dist/src/project-graph/affected/affected-tasks.d.ts +11 -10
  83. package/dist/src/project-graph/affected/affected-tasks.js +16 -20
  84. package/dist/src/tasks-runner/init-tasks-runner.d.ts +5 -5
  85. package/dist/src/tasks-runner/init-tasks-runner.js +8 -15
  86. package/dist/src/tasks-runner/run-command.d.ts +7 -7
  87. package/dist/src/tasks-runner/run-command.js +18 -23
  88. package/dist/src/ultracache/config.d.ts +21 -0
  89. package/dist/src/ultracache/config.js +29 -0
  90. package/dist/src/ultracache/fetch.d.ts +21 -0
  91. package/dist/src/{io-snapshots → ultracache}/fetch.js +9 -9
  92. package/dist/src/ultracache/overrides.d.ts +17 -0
  93. package/dist/src/{io-snapshots → ultracache}/overrides.js +22 -10
  94. package/dist/src/ultracache/report.d.ts +13 -0
  95. package/dist/src/{io-snapshots → ultracache}/report.js +15 -21
  96. package/dist/src/ultracache/store.d.ts +40 -0
  97. package/dist/src/{io-snapshots → ultracache}/store.js +45 -45
  98. package/dist/src/utils/ab-testing.js +11 -12
  99. package/dist/src/utils/db-connection.d.ts +1 -0
  100. package/dist/src/utils/db-connection.js +1 -0
  101. package/dist/src/utils/git-utils.d.ts +7 -0
  102. package/dist/src/utils/git-utils.js +21 -9
  103. package/dist/src/utils/http-client.d.ts +27 -0
  104. package/dist/src/utils/http-client.js +193 -0
  105. package/package.json +12 -38
  106. package/dist/src/daemon/message-types/io-snapshot-version.d.ts +0 -5
  107. package/dist/src/daemon/server/io-snapshots-state.d.ts +0 -7
  108. package/dist/src/io-snapshots/config.d.ts +0 -23
  109. package/dist/src/io-snapshots/config.js +0 -32
  110. package/dist/src/io-snapshots/fetch.d.ts +0 -21
  111. package/dist/src/io-snapshots/outputs.d.ts +0 -12
  112. package/dist/src/io-snapshots/outputs.js +0 -33
  113. package/dist/src/io-snapshots/overrides.d.ts +0 -12
  114. package/dist/src/io-snapshots/report.d.ts +0 -13
  115. package/dist/src/io-snapshots/store.d.ts +0 -37
  116. package/dist/src/nx-cloud/utilities/axios.d.ts +0 -4
  117. package/dist/src/nx-cloud/utilities/axios.js +0 -17
  118. /package/dist/src/daemon/message-types/{io-snapshot-version.js → ultracache-configuration-version.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getIoSnapshotsForVersion = getIoSnapshotsForVersion;
4
- const store_1 = require("../../io-snapshots/store");
3
+ exports.getUltracacheConfigurationsForVersion = getUltracacheConfigurationsForVersion;
4
+ const store_1 = require("../../ultracache/store");
5
5
  // One handle at a time: entries read for a request serve the next one while
6
6
  // the version holds, and another version replaces it, so nothing accumulates
7
7
  // over a long-lived daemon.
@@ -10,7 +10,7 @@ let remembered;
10
10
  * Exactly the version the client hashes from, never a newer import for the
11
11
  * same commit. `undefined` when it is not stored, e.g. after `nx reset`.
12
12
  */
13
- function getIoSnapshotsForVersion(version) {
13
+ function getUltracacheConfigurationsForVersion(version) {
14
14
  if (!version) {
15
15
  return undefined;
16
16
  }
@@ -26,7 +26,8 @@ function getIoSnapshotsForVersion(version) {
26
26
  }
27
27
  function readStored({ commit, fetchedAt, }) {
28
28
  try {
29
- return (0, store_1.getIoSnapshotStore)().getVersion(commit, fetchedAt) ?? undefined;
29
+ return ((0, store_1.getUltracacheConfigurationStore)().getVersion(commit, fetchedAt) ??
30
+ undefined);
30
31
  }
31
32
  catch {
32
33
  // An unusable database hashes natively rather than failing the request.
@@ -1,11 +1,11 @@
1
1
  import { NxJsonConfiguration } from '../config/nx-json';
2
2
  import { ProjectGraph } from '../config/project-graph';
3
- import type { IoSnapshots } from '../native';
3
+ import type { UltracacheConfigurations } from '../native';
4
4
  import type { TaskPlanningContext } from './task-planning-context';
5
5
  import { TaskHasher } from './task-hasher';
6
6
  /**
7
- * `ioSnapshots` is this run's set (see `loadIoSnapshotsForRun`); undefined
7
+ * `ultracacheConfigurations` is this run's set (see `loadUltracacheConfigurationsForRun`); undefined
8
8
  * hashes natively. The daemon gets its version, so it hashes from the same
9
9
  * set even after a newer one is imported for the commit.
10
10
  */
11
- export declare function createTaskHasher(projectGraph: ProjectGraph, nxJson: NxJsonConfiguration, runnerOptions?: any, ioSnapshots?: IoSnapshots, planningContext?: TaskPlanningContext): TaskHasher;
11
+ export declare function createTaskHasher(projectGraph: ProjectGraph, nxJson: NxJsonConfiguration, runnerOptions?: any, ultracacheConfigurations?: UltracacheConfigurations, planningContext?: TaskPlanningContext): TaskHasher;
@@ -5,21 +5,21 @@ const client_1 = require("../daemon/client/client");
5
5
  const build_project_graph_1 = require("../project-graph/build-project-graph");
6
6
  const task_hasher_1 = require("./task-hasher");
7
7
  /**
8
- * `ioSnapshots` is this run's set (see `loadIoSnapshotsForRun`); undefined
8
+ * `ultracacheConfigurations` is this run's set (see `loadUltracacheConfigurationsForRun`); undefined
9
9
  * hashes natively. The daemon gets its version, so it hashes from the same
10
10
  * set even after a newer one is imported for the commit.
11
11
  */
12
- function createTaskHasher(projectGraph, nxJson, runnerOptions, ioSnapshots, planningContext) {
12
+ function createTaskHasher(projectGraph, nxJson, runnerOptions, ultracacheConfigurations, planningContext) {
13
13
  if (client_1.daemonClient.enabled()) {
14
- return new task_hasher_1.DaemonBasedTaskHasher(client_1.daemonClient, runnerOptions, ioSnapshots
14
+ return new task_hasher_1.DaemonBasedTaskHasher(client_1.daemonClient, runnerOptions, ultracacheConfigurations
15
15
  ? {
16
- commit: ioSnapshots.commit,
17
- fetchedAt: ioSnapshots.resolution.fetchedAt,
16
+ commit: ultracacheConfigurations.commit,
17
+ fetchedAt: ultracacheConfigurations.resolution.fetchedAt,
18
18
  }
19
19
  : undefined);
20
20
  }
21
21
  else {
22
22
  const { rustReferences } = (0, build_project_graph_1.getFileMap)();
23
- return new task_hasher_1.InProcessTaskHasher(projectGraph, nxJson, rustReferences, runnerOptions, planningContext, ioSnapshots);
23
+ return new task_hasher_1.InProcessTaskHasher(projectGraph, nxJson, rustReferences, runnerOptions, planningContext, ultracacheConfigurations);
24
24
  }
25
25
  }
@@ -1,10 +1,10 @@
1
1
  import { NxJsonConfiguration } from '../config/nx-json';
2
2
  import { ProjectGraph } from '../config/project-graph';
3
3
  import { Task, TaskGraph } from '../config/task-graph';
4
- import { type IoSnapshots, TaskDetails } from '../native';
4
+ import { type UltracacheConfigurations, TaskDetails } from '../native';
5
5
  import { TaskHasher } from './task-hasher';
6
6
  export declare function getTaskDetails(): TaskDetails | null;
7
- export declare function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher: TaskHasher, projectGraph: ProjectGraph, taskGraph: TaskGraph, nxJson: NxJsonConfiguration, tasksDetails: TaskDetails | null, ioSnapshots?: IoSnapshots): Promise<void>;
7
+ export declare function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher: TaskHasher, projectGraph: ProjectGraph, taskGraph: TaskGraph, nxJson: NxJsonConfiguration, tasksDetails: TaskDetails | null, ultracacheConfigurations?: UltracacheConfigurations): Promise<void>;
8
8
  export declare function hashTask(hasher: TaskHasher, projectGraph: ProjectGraph, taskGraph: TaskGraph, task: Task, env: NodeJS.ProcessEnv, taskDetails: TaskDetails | null): Promise<void>;
9
9
  /**
10
10
  * Batch-hash `tasks`. `perTaskEnvs` must contain an entry keyed by
@@ -23,13 +23,13 @@ function getTaskDetails() {
23
23
  }
24
24
  return taskDetails;
25
25
  }
26
- async function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher, projectGraph, taskGraph, nxJson, tasksDetails, ioSnapshots) {
26
+ async function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher, projectGraph, taskGraph, nxJson, tasksDetails, ultracacheConfigurations) {
27
27
  performance.mark('hashMultipleTasks:start');
28
28
  const projects = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph).projects;
29
- // A snapshot can make a task depend on producer outputs its declared
29
+ // An Ultracache configuration can make a task depend on producer outputs its declared
30
30
  // inputs never mentioned; those hash after their producers too.
31
- const deferredBySnapshot = ioSnapshots
32
- ? new Set((0, native_1.getIoSnapshotDeferredTaskIds)(ioSnapshots, taskGraph))
31
+ const deferredByConfiguration = ultracacheConfigurations
32
+ ? new Set((0, native_1.getUltracacheDeferredTaskIds)(ultracacheConfigurations, taskGraph))
33
33
  : null;
34
34
  const tasks = Object.values(taskGraph.tasks);
35
35
  const tasksWithHashers = await Promise.all(tasks.map(async (task) => {
@@ -42,7 +42,7 @@ async function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher, projectGrap
42
42
  // a continuous server, which only planning reveals.
43
43
  const candidates = tasksWithHashers
44
44
  .filter(({ task, customHasher }) => !customHasher &&
45
- !deferredBySnapshot?.has(task.id) &&
45
+ !deferredByConfiguration?.has(task.id) &&
46
46
  !readsDependencyOutputs(task, taskGraph, projectGraph, nxJson))
47
47
  .map((t) => t.task);
48
48
  const perTaskEnvs = {};
@@ -1,7 +1,7 @@
1
1
  import { NxJsonConfiguration } from '../config/nx-json';
2
2
  import { ProjectGraph } from '../config/project-graph';
3
3
  import { Task, TaskGraph } from '../config/task-graph';
4
- import { ExternalObject, FileData, HasherOptions, HashPlanner, IoSnapshots, ProjectGraph as NativeProjectGraph, NxWorkspaceFilesExternals, TaskHasher } from '../native';
4
+ import { ExternalObject, FileData, HasherOptions, HashPlanner, UltracacheConfigurations, ProjectGraph as NativeProjectGraph, NxWorkspaceFilesExternals, TaskHasher } from '../native';
5
5
  import type { IgnoredIndexReader } from '../native';
6
6
  import type { TaskPlanningContext } from './task-planning-context';
7
7
  import { PartialHash, TaskHasherImpl } from './task-hasher';
@@ -22,13 +22,13 @@ export declare class NativeTaskHasherImpl implements TaskHasherImpl {
22
22
  constructor(workspaceRoot: string, nxJson: NxJsonConfiguration, projectGraph: ProjectGraph, externals: NxWorkspaceFilesExternals, options: {
23
23
  selectivelyHashTsConfig: boolean;
24
24
  }, planningContext?: TaskPlanningContext);
25
- hashTask(task: Task, taskGraph: TaskGraph, env: NodeJS.ProcessEnv, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<PartialHash>;
26
- hashTasks(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<PartialHash[]>;
25
+ hashTask(task: Task, taskGraph: TaskGraph, env: NodeJS.ProcessEnv, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<PartialHash>;
26
+ hashTasks(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<PartialHash[]>;
27
27
  /**
28
- * Plans through the native planner. With a snapshot set, the tasks JS resolves as
29
- * custom-hashed or opted out ride along so the planner's eligibility walk
30
- * withholds their snapshots.
28
+ * Plans through the native planner. With Ultracache configurations, the
29
+ * tasks JS resolves as custom-hashed or opted out ride along so the
30
+ * planner's eligibility walk withholds their entries.
31
31
  */
32
32
  private plan;
33
- hashTasksUpfront(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<Record<string, PartialHash>>;
33
+ hashTasksUpfront(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<Record<string, PartialHash>>;
34
34
  }
@@ -6,7 +6,7 @@ const transform_objects_1 = require("../native/transform-objects");
6
6
  const typescript_1 = require("../plugins/js/utils/typescript");
7
7
  const task_io_service_1 = require("../tasks-runner/task-io-service");
8
8
  const fileutils_1 = require("../utils/fileutils");
9
- const overrides_1 = require("../io-snapshots/overrides");
9
+ const overrides_1 = require("../ultracache/overrides");
10
10
  class NativeTaskHasherImpl {
11
11
  constructor(workspaceRoot, nxJson, projectGraph, externals, options, planningContext) {
12
12
  this.projectGraph = projectGraph;
@@ -36,11 +36,11 @@ class NativeTaskHasherImpl {
36
36
  planningContext?.planner ?? new native_1.HashPlanner(nxJson, this.projectGraphRef);
37
37
  this.hasher = new native_1.TaskHasher(workspaceRoot, this.projectGraphRef, this.projectFileMapRef, this.allWorkspaceFilesRef, Buffer.from(JSON.stringify(tsconfig)), paths, rootTsConfigPath, options, this.ignoredIndexRef);
38
38
  }
39
- async hashTask(task, taskGraph, env, cwd, collectInputs, ioSnapshots) {
40
- const hashes = await this.hashTasks([task], taskGraph, { [task.id]: env }, cwd, collectInputs, ioSnapshots);
39
+ async hashTask(task, taskGraph, env, cwd, collectInputs, ultracacheConfigurations) {
40
+ const hashes = await this.hashTasks([task], taskGraph, { [task.id]: env }, cwd, collectInputs, ultracacheConfigurations);
41
41
  return hashes[0];
42
42
  }
43
- async hashTasks(tasks, taskGraph, perTaskEnvs, cwd, collectInputs, ioSnapshots) {
43
+ async hashTasks(tasks, taskGraph, perTaskEnvs, cwd, collectInputs, ultracacheConfigurations) {
44
44
  const envs = perTaskEnvs;
45
45
  const shouldCollectInputs = collectInputs ?? (0, task_io_service_1.getTaskIOService)().hasTaskInputSubscribers();
46
46
  const resolvedCwd = cwd ?? process.cwd();
@@ -49,31 +49,31 @@ class NativeTaskHasherImpl {
49
49
  if (this.upfrontPlans &&
50
50
  unplanned.some((id) => this.upfrontPlans.taskIds.has(id)) &&
51
51
  this.upfrontPlans.fingerprint ===
52
- taskGraphFingerprint(taskGraph, ioSnapshots)) {
52
+ taskGraphFingerprint(taskGraph, ultracacheConfigurations)) {
53
53
  Object.assign(hashes, this.hasher.hashPlansFor(this.upfrontPlans.plans, unplanned, envs, resolvedCwd, shouldCollectInputs));
54
54
  unplanned = unplanned.filter((id) => !(id in hashes));
55
55
  }
56
56
  if (unplanned.length > 0) {
57
- const plans = this.plan(unplanned, taskGraph, ioSnapshots);
57
+ const plans = this.plan(unplanned, taskGraph, ultracacheConfigurations);
58
58
  Object.assign(hashes, this.hasher.hashPlans(plans, envs, resolvedCwd, shouldCollectInputs));
59
59
  }
60
60
  return tasks.map((t) => hashes[t.id]);
61
61
  }
62
62
  /**
63
- * Plans through the native planner. With a snapshot set, the tasks JS resolves as
64
- * custom-hashed or opted out ride along so the planner's eligibility walk
65
- * withholds their snapshots.
63
+ * Plans through the native planner. With Ultracache configurations, the
64
+ * tasks JS resolves as custom-hashed or opted out ride along so the
65
+ * planner's eligibility walk withholds their entries.
66
66
  */
67
- plan(taskIds, taskGraph, ioSnapshots) {
68
- if (!ioSnapshots) {
67
+ plan(taskIds, taskGraph, ultracacheConfigurations) {
68
+ if (!ultracacheConfigurations) {
69
69
  return this.planner.getPlansReference(taskIds, taskGraph);
70
70
  }
71
- return this.planner.getPlansReference(taskIds, taskGraph, ioSnapshots, (0, overrides_1.ioSnapshotEligibilityOptions)(this.projectGraph, taskGraph));
71
+ return this.planner.getPlansReference(taskIds, taskGraph, ultracacheConfigurations, (0, overrides_1.ultracacheEligibilityOptions)(this.projectGraph, taskGraph));
72
72
  }
73
- async hashTasksUpfront(tasks, taskGraph, perTaskEnvs, cwd, collectInputs, ioSnapshots) {
74
- const plans = this.plan(tasks.map((t) => t.id), taskGraph, ioSnapshots);
73
+ async hashTasksUpfront(tasks, taskGraph, perTaskEnvs, cwd, collectInputs, ultracacheConfigurations) {
74
+ const plans = this.plan(tasks.map((t) => t.id), taskGraph, ultracacheConfigurations);
75
75
  this.upfrontPlans = {
76
- fingerprint: taskGraphFingerprint(taskGraph, ioSnapshots),
76
+ fingerprint: taskGraphFingerprint(taskGraph, ultracacheConfigurations),
77
77
  taskIds: new Set(tasks.map((t) => t.id)),
78
78
  plans,
79
79
  };
@@ -84,16 +84,16 @@ class NativeTaskHasherImpl {
84
84
  exports.NativeTaskHasherImpl = NativeTaskHasherImpl;
85
85
  /**
86
86
  * Everything the planner reads from a task graph: each task's target and
87
- * outputs, and the graph's edges, plus the snapshot set the plans were
87
+ * outputs, and the graph's edges, plus the Ultracache configurations the plans were
88
88
  * built against. The project graph and nx.json are fixed for the life of a
89
89
  * hasher, so equal fingerprints mean equal plans. A run's
90
90
  * results (hash, timings) are left out so hashing one task does not
91
91
  * invalidate the plans of the rest.
92
92
  */
93
- function taskGraphFingerprint(taskGraph, ioSnapshots) {
93
+ function taskGraphFingerprint(taskGraph, ultracacheConfigurations) {
94
94
  const parts = [
95
- ioSnapshots
96
- ? `${ioSnapshots.commit}@${ioSnapshots.resolution.fetchedAt}`
95
+ ultracacheConfigurations
96
+ ? `${ultracacheConfigurations.commit}@${ultracacheConfigurations.resolution.fetchedAt}`
97
97
  : '',
98
98
  ];
99
99
  for (const id of Object.keys(taskGraph.tasks).sort()) {
@@ -2,10 +2,10 @@ import { FileData, ProjectGraph, ProjectGraphProjectNode } from '../config/proje
2
2
  import { NxJsonConfiguration } from '../config/nx-json';
3
3
  import { Task, TaskGraph } from '../config/task-graph';
4
4
  import { DaemonClient } from '../daemon/client/client';
5
- import type { IoSnapshotVersion } from '../daemon/message-types/io-snapshot-version';
5
+ import type { UltracacheConfigurationVersion } from '../daemon/message-types/ultracache-configuration-version';
6
6
  import { InputDefinition } from '../config/workspace-json-project-json';
7
7
  import type { TaskPlanningContext } from './task-planning-context';
8
- import { HashInputs, IoSnapshots, NxWorkspaceFilesExternals } from '../native';
8
+ import { HashInputs, UltracacheConfigurations, NxWorkspaceFilesExternals } from '../native';
9
9
  export { HashInputs };
10
10
  /**
11
11
  * A data structure returned by the default hasher.
@@ -76,16 +76,16 @@ export interface TaskHasherImpl {
76
76
  * single shared env should construct `{ [task.id]: env }` for every
77
77
  * task.
78
78
  */
79
- hashTasks(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<PartialHash[]>;
80
- hashTask(task: Task, taskGraph: TaskGraph, env: NodeJS.ProcessEnv, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<PartialHash>;
81
- hashTasksUpfront(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<Record<string, PartialHash>>;
79
+ hashTasks(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<PartialHash[]>;
80
+ hashTask(task: Task, taskGraph: TaskGraph, env: NodeJS.ProcessEnv, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<PartialHash>;
81
+ hashTasksUpfront(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<Record<string, PartialHash>>;
82
82
  }
83
83
  export type Hasher = TaskHasher;
84
84
  export declare class DaemonBasedTaskHasher implements TaskHasher {
85
85
  private readonly daemonClient;
86
86
  private readonly runnerOptions;
87
- private readonly ioSnapshots?;
88
- constructor(daemonClient: DaemonClient, runnerOptions: any, ioSnapshots?: IoSnapshotVersion);
87
+ private readonly ultracacheConfigurationsVersion?;
88
+ constructor(daemonClient: DaemonClient, runnerOptions: any, ultracacheConfigurationsVersion?: UltracacheConfigurationVersion);
89
89
  hashTasks(tasks: Task[], taskGraph: TaskGraph, envOrPerTaskEnvs: NodeJS.ProcessEnv | Record<string, NodeJS.ProcessEnv>): Promise<Hash[]>;
90
90
  hashTasksUpfront(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>): Promise<Record<string, Hash>>;
91
91
  hashTask(task: Task, taskGraph?: TaskGraph, env?: NodeJS.ProcessEnv): Promise<Hash>;
@@ -96,15 +96,15 @@ export declare class InProcessTaskHasher implements TaskHasher {
96
96
  private readonly externalRustReferences;
97
97
  private readonly options;
98
98
  private readonly planningContext?;
99
- /** This run's snapshot set; the daemon passes one per request instead. */
100
- private readonly ioSnapshots?;
99
+ /** This run's Ultracache configurations; the daemon passes them per request instead. */
100
+ private readonly ultracacheConfigurations?;
101
101
  private taskHasher;
102
102
  constructor(projectGraph: ProjectGraph, nxJson: NxJsonConfiguration, externalRustReferences: NxWorkspaceFilesExternals | null, options: any, planningContext?: TaskPlanningContext,
103
- /** This run's snapshot set; the daemon passes one per request instead. */
104
- ioSnapshots?: IoSnapshots);
105
- hashTasks(tasks: Task[], taskGraph: TaskGraph, envOrPerTaskEnvs: NodeJS.ProcessEnv | Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<Hash[]>;
106
- hashTasksUpfront(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<Record<string, Hash>>;
107
- hashTask(task: Task, taskGraph?: TaskGraph, env?: NodeJS.ProcessEnv, cwd?: string, collectInputs?: boolean, ioSnapshots?: IoSnapshots): Promise<Hash>;
103
+ /** This run's Ultracache configurations; the daemon passes them per request instead. */
104
+ ultracacheConfigurations?: UltracacheConfigurations);
105
+ hashTasks(tasks: Task[], taskGraph: TaskGraph, envOrPerTaskEnvs: NodeJS.ProcessEnv | Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<Hash[]>;
106
+ hashTasksUpfront(tasks: Task[], taskGraph: TaskGraph, perTaskEnvs: Record<string, NodeJS.ProcessEnv>, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<Record<string, Hash>>;
107
+ hashTask(task: Task, taskGraph?: TaskGraph, env?: NodeJS.ProcessEnv, cwd?: string, collectInputs?: boolean, ultracacheConfigurations?: UltracacheConfigurations): Promise<Hash>;
108
108
  private createHashDetails;
109
109
  private hashCommand;
110
110
  }
@@ -44,18 +44,18 @@ function normalizePerTaskEnvs(tasks, arg) {
44
44
  return arg;
45
45
  }
46
46
  class DaemonBasedTaskHasher {
47
- constructor(daemonClient, runnerOptions, ioSnapshots) {
47
+ constructor(daemonClient, runnerOptions, ultracacheConfigurationsVersion) {
48
48
  this.daemonClient = daemonClient;
49
49
  this.runnerOptions = runnerOptions;
50
- this.ioSnapshots = ioSnapshots;
50
+ this.ultracacheConfigurationsVersion = ultracacheConfigurationsVersion;
51
51
  }
52
52
  async hashTasks(tasks, taskGraph, envOrPerTaskEnvs) {
53
53
  const collectInputs = (0, task_io_service_1.getTaskIOService)().hasTaskInputSubscribers();
54
- return this.daemonClient.hashTasks(this.runnerOptions, tasks, taskGraph, normalizePerTaskEnvs(tasks, envOrPerTaskEnvs), process.cwd(), collectInputs, this.ioSnapshots);
54
+ return this.daemonClient.hashTasks(this.runnerOptions, tasks, taskGraph, normalizePerTaskEnvs(tasks, envOrPerTaskEnvs), process.cwd(), collectInputs, this.ultracacheConfigurationsVersion);
55
55
  }
56
56
  async hashTasksUpfront(tasks, taskGraph, perTaskEnvs) {
57
57
  const collectInputs = (0, task_io_service_1.getTaskIOService)().hasTaskInputSubscribers();
58
- return this.daemonClient.hashTasksUpfront(this.runnerOptions, tasks, taskGraph, perTaskEnvs, process.cwd(), collectInputs, this.ioSnapshots);
58
+ return this.daemonClient.hashTasksUpfront(this.runnerOptions, tasks, taskGraph, perTaskEnvs, process.cwd(), collectInputs, this.ultracacheConfigurationsVersion);
59
59
  }
60
60
  async hashTask(task, taskGraph, env) {
61
61
  return (await this.hashTasks([task], taskGraph, {
@@ -66,24 +66,24 @@ class DaemonBasedTaskHasher {
66
66
  exports.DaemonBasedTaskHasher = DaemonBasedTaskHasher;
67
67
  class InProcessTaskHasher {
68
68
  constructor(projectGraph, nxJson, externalRustReferences, options, planningContext,
69
- /** This run's snapshot set; the daemon passes one per request instead. */
70
- ioSnapshots) {
69
+ /** This run's Ultracache configurations; the daemon passes them per request instead. */
70
+ ultracacheConfigurations) {
71
71
  this.projectGraph = projectGraph;
72
72
  this.nxJson = nxJson;
73
73
  this.externalRustReferences = externalRustReferences;
74
74
  this.options = options;
75
75
  this.planningContext = planningContext;
76
- this.ioSnapshots = ioSnapshots;
76
+ this.ultracacheConfigurations = ultracacheConfigurations;
77
77
  this.taskHasher = new native_task_hasher_impl_1.NativeTaskHasherImpl(workspace_root_1.workspaceRoot, this.nxJson, this.projectGraph, this.externalRustReferences, {
78
78
  selectivelyHashTsConfig: this.options?.selectivelyHashTsConfig ?? false,
79
79
  }, this.planningContext);
80
80
  }
81
- async hashTasks(tasks, taskGraph, envOrPerTaskEnvs, cwd, collectInputs, ioSnapshots) {
82
- const hashes = await this.taskHasher.hashTasks(tasks, taskGraph, normalizePerTaskEnvs(tasks, envOrPerTaskEnvs), cwd ?? process.cwd(), collectInputs, ioSnapshots ?? this.ioSnapshots);
81
+ async hashTasks(tasks, taskGraph, envOrPerTaskEnvs, cwd, collectInputs, ultracacheConfigurations) {
82
+ const hashes = await this.taskHasher.hashTasks(tasks, taskGraph, normalizePerTaskEnvs(tasks, envOrPerTaskEnvs), cwd ?? process.cwd(), collectInputs, ultracacheConfigurations ?? this.ultracacheConfigurations);
83
83
  return tasks.map((task, index) => this.createHashDetails(task, hashes[index]));
84
84
  }
85
- async hashTasksUpfront(tasks, taskGraph, perTaskEnvs, cwd, collectInputs, ioSnapshots) {
86
- const hashes = await this.taskHasher.hashTasksUpfront(tasks, taskGraph, perTaskEnvs, cwd ?? process.cwd(), collectInputs, ioSnapshots ?? this.ioSnapshots);
85
+ async hashTasksUpfront(tasks, taskGraph, perTaskEnvs, cwd, collectInputs, ultracacheConfigurations) {
86
+ const hashes = await this.taskHasher.hashTasksUpfront(tasks, taskGraph, perTaskEnvs, cwd ?? process.cwd(), collectInputs, ultracacheConfigurations ?? this.ultracacheConfigurations);
87
87
  const result = {};
88
88
  for (const task of tasks) {
89
89
  if (hashes[task.id]) {
@@ -92,8 +92,8 @@ class InProcessTaskHasher {
92
92
  }
93
93
  return result;
94
94
  }
95
- async hashTask(task, taskGraph, env, cwd, collectInputs, ioSnapshots) {
96
- const res = await this.taskHasher.hashTask(task, taskGraph, env ?? process.env, cwd ?? process.cwd(), collectInputs, ioSnapshots ?? this.ioSnapshots);
95
+ async hashTask(task, taskGraph, env, cwd, collectInputs, ultracacheConfigurations) {
96
+ const res = await this.taskHasher.hashTask(task, taskGraph, env ?? process.env, cwd ?? process.cwd(), collectInputs, ultracacheConfigurations ?? this.ultracacheConfigurations);
97
97
  return this.createHashDetails(task, res);
98
98
  }
99
99
  createHashDetails(task, res) {
@@ -97,13 +97,13 @@ export declare class HashPlanInspector {
97
97
  export declare class HashPlanner {
98
98
  constructor(nxJson: NxJson, projectGraph: ExternalObject<ProjectGraph>)
99
99
  /**
100
- * `snapshots` is this run's I/O snapshot set; a task with an eligible
101
- * entry hashes its observed reads instead of its declared filesets.
100
+ * `configurations` is this run's Ultracache configurations; a task with an
101
+ * eligible entry hashes its observed reads instead of its declared filesets.
102
102
  * `options` carries the task ids decided in JS, where executors and
103
103
  * target configuration are resolved.
104
104
  */
105
- getPlans(taskIds: Array<string>, taskGraph: TaskGraph, snapshots?: IoSnapshots | undefined | null, options?: IoSnapshotEligibilityOptions | undefined | null): Record<string, string[]>
106
- getPlansReference(taskIds: Array<string>, taskGraph: TaskGraph, snapshots?: IoSnapshots | undefined | null, options?: IoSnapshotEligibilityOptions | undefined | null): ExternalObject<Record<string, Array<HashInstruction>>>
105
+ getPlans(taskIds: Array<string>, taskGraph: TaskGraph, configurations?: UltracacheConfigurations | undefined | null, options?: UltracacheEligibilityOptions | undefined | null): Record<string, string[]>
106
+ getPlansReference(taskIds: Array<string>, taskGraph: TaskGraph, configurations?: UltracacheConfigurations | undefined | null, options?: UltracacheEligibilityOptions | undefined | null): ExternalObject<Record<string, Array<HashInstruction>>>
107
107
  }
108
108
 
109
109
  export declare class HttpRemoteCache {
@@ -127,43 +127,6 @@ export declare class ImportResult {
127
127
  staticImportExpressions: Array<string>
128
128
  }
129
129
 
130
- /**
131
- * One stored version of a commit's snapshot set. Handed to the hash planner as-is.
132
- * A fresh import holds every entry; a handle reopened from storage reads
133
- * them per task as they are asked for and remembers them, so it costs the
134
- * tasks it plans rather than the workspace's whole set.
135
- */
136
- export declare class IoSnapshots {
137
- get commit(): string
138
- get resolution(): IoSnapshotResolution
139
- }
140
-
141
- /**
142
- * The workspace database's snapshot sets. Each import is its own version,
143
- * keyed by commit and fetch time, so a run that pinned one keeps reading it
144
- * while a newer one is imported. Failures throw with a `code` JS maps to a
145
- * skip reason: `STORE_UNAVAILABLE`, `INVALID_RESPONSE` or `WRITE_FAILED`.
146
- */
147
- export declare class IoSnapshotStore {
148
- constructor(db: ExternalObject<NxDbConnection>)
149
- /**
150
- * Stores the set the Nx Cloud client read for `requested_commit` as a new
151
- * version, and returns it with every entry in hand.
152
- */
153
- import(options: IoSnapshotImportOptions): IoSnapshots
154
- /**
155
- * The newest stored set for `commit`, without touching the network;
156
- * `null` when none is stored, its row cannot be read, or it was fetched
157
- * more than `max_age_ms` ago. Reads only the version's summary row.
158
- */
159
- get(commit: string, maxAgeMs?: number | undefined | null): IoSnapshots | null
160
- /**
161
- * Exactly the version of `commit` fetched at `fetched_at`; `null` when it
162
- * is not stored or its row cannot be read.
163
- */
164
- getVersion(commit: string, fetchedAt: number): IoSnapshots | null
165
- }
166
-
167
130
  export declare class NxCache {
168
131
  cacheDirectory: string
169
132
  constructor(workspaceRoot: string, cachePath: string, dbConnection: ExternalObject<NxDbConnection>, linkTaskDetails?: boolean | undefined | null, maxCacheSize?: number | undefined | null)
@@ -325,6 +288,43 @@ export declare class TaskInvocationTracker {
325
288
  cleanupStale(): void
326
289
  }
327
290
 
291
+ /**
292
+ * One stored version of a commit's Ultracache configurations. Handed to the hash planner as-is.
293
+ * A fresh import holds every entry; a handle reopened from storage reads
294
+ * them per task as they are asked for and remembers them, so it costs the
295
+ * tasks it plans rather than the workspace's whole set.
296
+ */
297
+ export declare class UltracacheConfigurations {
298
+ get commit(): string
299
+ get resolution(): UltracacheConfigurationResolution
300
+ }
301
+
302
+ /**
303
+ * The workspace database's Ultracache configurations. Each import is its own version,
304
+ * keyed by commit and fetch time, so a run that pinned one keeps reading it
305
+ * while a newer one is imported. Failures throw with a `code` JS maps to a
306
+ * skip reason: `STORE_UNAVAILABLE`, `INVALID_RESPONSE` or `WRITE_FAILED`.
307
+ */
308
+ export declare class UltracacheConfigurationStore {
309
+ constructor(db: ExternalObject<NxDbConnection>)
310
+ /**
311
+ * Stores the set the Nx Cloud client read for `requested_commit` as a new
312
+ * version, and returns it with every entry in hand.
313
+ */
314
+ import(options: UltracacheConfigurationImportOptions): UltracacheConfigurations
315
+ /**
316
+ * The newest stored set for `commit`, without touching the network;
317
+ * `null` when none is stored, its row cannot be read, or it was fetched
318
+ * more than `max_age_ms` ago. Reads only the version's summary row.
319
+ */
320
+ get(commit: string, maxAgeMs?: number | undefined | null): UltracacheConfigurations | null
321
+ /**
322
+ * Exactly the version of `commit` fetched at `fetched_at`; `null` when it
323
+ * is not stored or its row cannot be read.
324
+ */
325
+ getVersion(commit: string, fetchedAt: number): UltracacheConfigurations | null
326
+ }
327
+
328
328
  export declare class WorkspaceContext {
329
329
  workspaceRoot: string
330
330
  constructor(workspaceRoot: string, cacheDir: string, options?: WorkspaceContextOptions | undefined | null)
@@ -712,31 +712,26 @@ export declare function getFilesForOutputsBatch(directory: string, entriesBatch:
712
712
  */
713
713
  export declare function getHardcodedIgnorePatterns(): Array<string>
714
714
 
715
- /**
716
- * Tasks whose snapshot read another task's outputs: they hash after their
717
- * producers ran, because those files only exist then. Needs no project graph,
718
- * so the client can call it before the first hashing wave on the daemon path.
719
- * Opted-out and custom-hasher tasks are not excluded: deferring a task that
720
- * ends up hashed natively only delays its hash, it never changes it.
721
- */
722
- export declare function getIoSnapshotDeferredTaskIds(snapshots: IoSnapshots, taskGraph: TaskGraph): Array<string>
723
-
724
- /** The eligibility report, for the run summary. */
725
- export declare function getIoSnapshotReport(snapshots: IoSnapshots, taskGraph: TaskGraph, options?: IoSnapshotEligibilityOptions | undefined | null): IoSnapshotReport
726
-
727
715
  /**
728
716
  * If `workspace_root` is inside a git worktree, returns the main repo root.
729
717
  * Returns `None` when already in the main repo (or not in a git repo at all).
730
718
  */
731
719
  export declare function getMainWorktreeRoot(workspaceRoot: string): string | null
732
720
 
721
+ export declare function getTransformableOutputs(outputs: Array<string>): Array<string>
722
+
733
723
  /**
734
- * Observed outputs per eligible task, for the runner to union into
735
- * `task.outputs`.
724
+ * Tasks whose Ultracache configuration read another task's outputs: they
725
+ * hash after their producers ran, because those files only exist then. Needs
726
+ * no project graph, so the client can call it before the first hashing wave
727
+ * on the daemon path.
728
+ * Opted-out and custom-hasher tasks are not excluded: deferring a task that
729
+ * ends up hashed natively only delays its hash, it never changes it.
736
730
  */
737
- export declare function getObservedIoSnapshotOutputs(snapshots: IoSnapshots, taskGraph: TaskGraph, options?: IoSnapshotEligibilityOptions | undefined | null): Record<string, Array<string>>
731
+ export declare function getUltracacheDeferredTaskIds(configurations: UltracacheConfigurations, taskGraph: TaskGraph): Array<string>
738
732
 
739
- export declare function getTransformableOutputs(outputs: Array<string>): Array<string>
733
+ /** The eligibility report, for the run summary. */
734
+ export declare function getUltracacheReport(configurations: UltracacheConfigurations, tasks: Record<string, TaskUltracacheSettings | null>, options?: UltracacheEligibilityOptions | undefined | null): UltracacheReport
740
735
 
741
736
  /**
742
737
  * Group information - union of different process group types
@@ -830,46 +825,6 @@ export interface InvocationRecord {
830
825
  taskId: string
831
826
  }
832
827
 
833
- /**
834
- * Why a task (or the whole run) hashes natively; `reason` is rendered by the
835
- * run summary.
836
- */
837
- export interface IoSnapshotDiagnostic {
838
- reason: string
839
- taskId?: string
840
- glob?: string
841
- message?: string
842
- }
843
-
844
- /** What JS knows about a run's tasks that the eligibility walk needs. */
845
- export interface IoSnapshotEligibilityOptions {
846
- /** Tasks whose executor ships a custom hasher. */
847
- customHasherTaskIds?: Array<string>
848
- }
849
-
850
- /** The snapshot set the Nx Cloud client read for HEAD, as JS hands it over. */
851
- export interface IoSnapshotImportOptions {
852
- requestedCommit: string
853
- /** `Record<taskId, { commit, inputs, outputs }>` as JSON. */
854
- snapshotsJson: string
855
- }
856
-
857
- export interface IoSnapshotReport {
858
- /** Task ids hashed from their snapshot. */
859
- used: Array<string>
860
- /** Subset of `used` whose snapshot also contributes observed outputs. */
861
- tasksWithOutputs: Array<string>
862
- diagnostics: Array<IoSnapshotDiagnostic>
863
- resolution: IoSnapshotResolution
864
- }
865
-
866
- /** What was resolved for a commit; stored beside its entries. */
867
- export interface IoSnapshotResolution {
868
- requestedCommit: string
869
- fetchedAt: number
870
- tasks: number
871
- }
872
-
873
828
  export const IS_WASM: boolean
874
829
 
875
830
  /**
@@ -1134,8 +1089,8 @@ export interface Task {
1134
1089
  parallelism?: boolean
1135
1090
  /** This denotes if the task runs continuously */
1136
1091
  continuous?: boolean
1137
- /** The target's ultracache configuration, if declared */
1138
- ultracache?: TaskUltracacheConfiguration
1092
+ /** The target's Ultracache settings, if declared */
1093
+ ultracache?: TaskUltracacheSettings
1139
1094
  }
1140
1095
 
1141
1096
  /** Graph of Tasks to be executed */
@@ -1204,8 +1159,8 @@ export interface TaskTarget {
1204
1159
  configuration?: string
1205
1160
  }
1206
1161
 
1207
- /** Ultracache configuration of a task's target */
1208
- export interface TaskUltracacheConfiguration {
1162
+ /** Ultracache settings of a task's target */
1163
+ export interface TaskUltracacheSettings {
1209
1164
  /** How this target's tasks participate. Defaults to `on`. */
1210
1165
  mode?: 'on' | 'warn' | 'error' | 'off'
1211
1166
  /**
@@ -1257,8 +1212,39 @@ export interface TuiConfig {
1257
1212
  suppressHints?: boolean
1258
1213
  }
1259
1214
 
1215
+ /** The Ultracache configurations the Nx Cloud client read for HEAD, as JS hands them over. */
1216
+ export interface UltracacheConfigurationImportOptions {
1217
+ requestedCommit: string
1218
+ /** `Record<taskId, { commit, inputs, outputs }>` as JSON. */
1219
+ configurationsJson: string
1220
+ }
1221
+
1222
+ /** What was resolved for a commit; stored beside its entries. */
1223
+ export interface UltracacheConfigurationResolution {
1224
+ requestedCommit: string
1225
+ fetchedAt: number
1226
+ tasks: number
1227
+ }
1228
+
1260
1229
  /**
1261
- * How a target's tasks participate in ultracache. Nx Cloud only: nothing in
1230
+ * Why a task (or the whole run) hashes natively; `reason` is rendered by the
1231
+ * run summary.
1232
+ */
1233
+ export interface UltracacheDiagnostic {
1234
+ reason: string
1235
+ taskId?: string
1236
+ glob?: string
1237
+ message?: string
1238
+ }
1239
+
1240
+ /** What JS knows about a run's tasks that the eligibility walk needs. */
1241
+ export interface UltracacheEligibilityOptions {
1242
+ /** Tasks whose executor ships a custom hasher. */
1243
+ customHasherTaskIds?: Array<string>
1244
+ }
1245
+
1246
+ /**
1247
+ * How a target's tasks participate in Ultracache. Nx Cloud only: nothing in
1262
1248
  * the OSS runner records or applies IO, so every mode behaves as `Off` without
1263
1249
  * it.
1264
1250
  */
@@ -1282,6 +1268,13 @@ export declare const enum UltracacheMode {
1282
1268
  Off = 'off'
1283
1269
  }
1284
1270
 
1271
+ export interface UltracacheReport {
1272
+ /** Task ids hashed from their Ultracache configuration. */
1273
+ used: Array<string>
1274
+ diagnostics: Array<UltracacheDiagnostic>
1275
+ resolution: UltracacheConfigurationResolution
1276
+ }
1277
+
1285
1278
  export interface UpdatedWorkspaceFiles {
1286
1279
  fileMap: FileMap
1287
1280
  externalReferences: NxWorkspaceFilesExternals