eas-cli 21.0.1 → 21.0.3

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 (42) hide show
  1. package/README.md +144 -170
  2. package/build/chat/chatClient.d.ts +37 -0
  3. package/build/chat/chatClient.js +359 -0
  4. package/build/chat/detectProject.d.ts +5 -0
  5. package/build/chat/detectProject.js +41 -0
  6. package/build/chat/renderMarkdown.d.ts +7 -0
  7. package/build/chat/renderMarkdown.js +47 -0
  8. package/build/chat/replInput.d.ts +10 -0
  9. package/build/chat/replInput.js +52 -0
  10. package/build/commands/build/inspect.d.ts +1 -0
  11. package/build/commands/build/inspect.js +10 -0
  12. package/build/commands/chat.d.ts +18 -0
  13. package/build/commands/chat.js +221 -0
  14. package/build/commands/env/create.d.ts +1 -0
  15. package/build/commands/env/create.js +4 -1
  16. package/build/commands/env/set.d.ts +27 -0
  17. package/build/commands/env/set.js +222 -0
  18. package/build/commands/env/update.d.ts +1 -0
  19. package/build/commands/env/update.js +4 -1
  20. package/build/commands/observe/events.js +6 -5
  21. package/build/commands/observe/metrics-summary.js +4 -3
  22. package/build/commands/observe/metrics.js +5 -4
  23. package/build/commands/observe/routes.js +4 -3
  24. package/build/commands/observe/session.d.ts +6 -1
  25. package/build/commands/observe/session.js +133 -7
  26. package/build/commands/observe/versions.js +4 -3
  27. package/build/graphql/generated.d.ts +101 -2
  28. package/build/graphql/queries/AccountQuery.js +6 -0
  29. package/build/graphql/queries/DeviceRunSessionQuery.js +0 -1
  30. package/build/graphql/queries/ObserveQuery.d.ts +2 -1
  31. package/build/graphql/queries/ObserveQuery.js +7 -1
  32. package/build/observe/fetchCustomEvents.d.ts +2 -1
  33. package/build/observe/fetchCustomEvents.js +1 -0
  34. package/build/observe/fetchSessions.d.ts +42 -0
  35. package/build/observe/fetchSessions.js +36 -0
  36. package/build/observe/formatSessions.d.ts +16 -0
  37. package/build/observe/formatSessions.js +36 -0
  38. package/build/observe/metricNames.d.ts +7 -0
  39. package/build/observe/metricNames.js +13 -0
  40. package/build/utils/usage/checkForOverages.js +6 -1
  41. package/oclif.manifest.json +1821 -1519
  42. package/package.json +12 -14
@@ -2,12 +2,17 @@ import EasCommand from '../../commandUtils/EasCommand';
2
2
  export default class ObserveSession extends EasCommand {
3
3
  static description: string;
4
4
  static args: {
5
- sessionId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
5
+ sessionId: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
6
  };
7
7
  static flags: {
8
8
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
9
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
10
  'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ sort: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ 'event-name': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
16
  };
12
17
  static contextDefinition: {
13
18
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
@@ -3,26 +3,44 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const core_1 = require("@oclif/core");
5
5
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
6
+ const errors_1 = require("../../commandUtils/errors");
6
7
  const flags_1 = require("../../commandUtils/flags");
7
8
  const log_1 = tslib_1.__importDefault(require("../../log"));
9
+ const ObserveQuery_1 = require("../../graphql/queries/ObserveQuery");
10
+ const fetchEvents_1 = require("../../observe/fetchEvents");
8
11
  const fetchSessions_1 = require("../../observe/fetchSessions");
9
12
  const flags_2 = require("../../observe/flags");
10
13
  const formatSessions_1 = require("../../observe/formatSessions");
14
+ const metricNames_1 = require("../../observe/metricNames");
11
15
  const resolveProjectContext_1 = require("../../observe/resolveProjectContext");
16
+ const startAndEndTime_1 = require("../../observe/startAndEndTime");
17
+ const prompts_1 = require("../../prompts");
12
18
  const json_1 = require("../../utils/json");
13
19
  // Fixed at 100 — the maximum page size accepted by the underlying events and
14
20
  // customEventList queries. Until there's a dedicated sessions query, this
15
21
  // command pulls one page of each and merges client-side.
16
22
  const SESSION_PAGE_SIZE = 100;
23
+ // How many candidate events to present in the picker. Small enough to browse;
24
+ // users narrow further with --days / --sort.
25
+ const PICKER_CANDIDATE_LIMIT = 25;
17
26
  class ObserveSession extends EasCommand_1.default {
18
27
  static description = 'display the timeline of metric and log events for a specific session';
19
28
  static args = {
20
29
  sessionId: core_1.Args.string({
21
- description: 'Session ID to inspect',
22
- required: true,
30
+ description: 'Session ID to inspect (omit in interactive mode to pick one from a list)',
31
+ required: false,
23
32
  }),
24
33
  };
25
34
  static flags = {
35
+ sort: core_1.Flags.option({
36
+ description: 'Sort order for candidate events when picking a session (if omitted in interactive mode, you will be prompted)',
37
+ options: Object.values(fetchEvents_1.EventsOrderPreset).map(s => s.toLowerCase()),
38
+ required: false,
39
+ })(),
40
+ 'event-name': core_1.Flags.string({
41
+ description: 'Metric or log event name to pick candidate sessions by (e.g. tti, cold_launch, login_pressed). If omitted in interactive mode, you will be prompted.',
42
+ }),
43
+ ...flags_2.ObserveTimeRangeFlags,
26
44
  ...flags_2.ObserveProjectIdFlag,
27
45
  ...flags_1.EasNonInteractiveAndJsonFlags,
28
46
  };
@@ -35,22 +53,47 @@ class ObserveSession extends EasCommand_1.default {
35
53
  };
36
54
  async runAsync() {
37
55
  const { flags, args } = await this.parse(ObserveSession);
56
+ const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
38
57
  const { projectId, graphqlClient } = await (0, resolveProjectContext_1.resolveObserveCommandContextAsync)({
39
58
  command: this,
40
59
  commandClass: ObserveSession,
41
60
  loggedInOnlyContextDefinition: ObserveSession.loggedInOnlyContextDefinition,
42
61
  projectIdOverride: flags['project-id'],
43
- nonInteractive: flags['non-interactive'],
62
+ nonInteractive,
44
63
  });
45
- if (flags.json) {
64
+ if (json) {
46
65
  (0, json_1.enableJsonOutput)();
47
66
  }
67
+ let sessionId;
68
+ if (args.sessionId) {
69
+ const pickerFlagsProvided = flags['event-name'] !== undefined ||
70
+ flags.sort !== undefined ||
71
+ flags.days !== undefined ||
72
+ flags.start !== undefined ||
73
+ flags.end !== undefined;
74
+ if (pickerFlagsProvided) {
75
+ throw new errors_1.EasCommandError('The picker flags (--event-name, --sort, --days, --start, --end) describe how to find a session and cannot be combined with a session ID argument.');
76
+ }
77
+ sessionId = args.sessionId;
78
+ }
79
+ else if (nonInteractive) {
80
+ throw new errors_1.EasCommandError('A session ID argument is required in non-interactive mode. In interactive mode, you can omit the session ID to pick one from a list of events.');
81
+ }
82
+ else {
83
+ sessionId = await pickSessionIdInteractivelyAsync({
84
+ graphqlClient,
85
+ projectId,
86
+ eventNameFlag: flags['event-name'],
87
+ sort: flags.sort,
88
+ timeRangeFlags: { days: flags.days, start: flags.start, end: flags.end },
89
+ });
90
+ }
48
91
  const { entries, metadata, hasMoreMetricEvents, hasMoreLogEvents } = await (0, fetchSessions_1.fetchObserveSessionEventsAsync)(graphqlClient, projectId, {
49
- sessionId: args.sessionId,
92
+ sessionId,
50
93
  limit: SESSION_PAGE_SIZE,
51
94
  });
52
- if (flags.json) {
53
- (0, json_1.printJsonOnlyOutput)((0, formatSessions_1.buildObserveSessionEventsJson)(entries, args.sessionId, metadata, hasMoreMetricEvents, hasMoreLogEvents));
95
+ if (json) {
96
+ (0, json_1.printJsonOnlyOutput)((0, formatSessions_1.buildObserveSessionEventsJson)(entries, sessionId, metadata, hasMoreMetricEvents, hasMoreLogEvents));
54
97
  }
55
98
  else {
56
99
  log_1.default.addNewLineIfNone();
@@ -63,3 +106,86 @@ class ObserveSession extends EasCommand_1.default {
63
106
  }
64
107
  }
65
108
  exports.default = ObserveSession;
109
+ async function pickSessionIdInteractivelyAsync({ graphqlClient, projectId, eventNameFlag, sort, timeRangeFlags, }) {
110
+ const { startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(timeRangeFlags);
111
+ const eventNameChoice = eventNameFlag
112
+ ? { name: eventNameFlag, isMetric: (0, metricNames_1.isKnownMetricName)(eventNameFlag) }
113
+ : await promptForEventNameAsync({ graphqlClient, projectId, startTime, endTime });
114
+ let sortValue;
115
+ if (sort) {
116
+ const preset = sort.toUpperCase();
117
+ const sortIsValueBased = preset === fetchEvents_1.EventsOrderPreset.Slowest || preset === fetchEvents_1.EventsOrderPreset.Fastest;
118
+ if (!eventNameChoice.isMetric && sortIsValueBased) {
119
+ throw new errors_1.EasCommandError(`--sort=${sort} is only supported for metric events. Use newest or oldest for log events.`);
120
+ }
121
+ sortValue = sort;
122
+ }
123
+ else {
124
+ sortValue = await promptForSortOrderAsync(eventNameChoice.isMetric);
125
+ }
126
+ const candidates = eventNameChoice.isMetric
127
+ ? (await (0, fetchSessions_1.fetchSessionMetricCandidatesAsync)(graphqlClient, projectId, {
128
+ metricName: (0, metricNames_1.resolveMetricName)(eventNameChoice.name),
129
+ sort: sortValue,
130
+ startTime,
131
+ endTime,
132
+ limit: PICKER_CANDIDATE_LIMIT,
133
+ })).map(event => ({ sessionId: event.sessionId, title: (0, formatSessions_1.formatMetricCandidateTitle)(event) }))
134
+ : (await (0, fetchSessions_1.fetchSessionLogCandidatesAsync)(graphqlClient, projectId, {
135
+ eventName: eventNameChoice.name,
136
+ orderAscending: sortValue.toUpperCase() === fetchEvents_1.EventsOrderPreset.Oldest,
137
+ startTime,
138
+ endTime,
139
+ limit: PICKER_CANDIDATE_LIMIT,
140
+ })).map(event => ({ sessionId: event.sessionId, title: (0, formatSessions_1.formatLogCandidateTitle)(event) }));
141
+ if (candidates.length === 0) {
142
+ throw new errors_1.EasCommandError(`No events found for "${eventNameChoice.name}" in the selected time range. Try widening the window with --days or picking a different --event-name.`);
143
+ }
144
+ return await promptForSessionIdAsync(candidates);
145
+ }
146
+ async function promptForSortOrderAsync(isMetric) {
147
+ const choices = [
148
+ { title: 'Newest first', value: fetchEvents_1.EventsOrderPreset.Newest.valueOf().toLowerCase() },
149
+ { title: 'Oldest first', value: fetchEvents_1.EventsOrderPreset.Oldest.valueOf().toLowerCase() },
150
+ ...(isMetric
151
+ ? [
152
+ {
153
+ title: 'Slowest first (highest metric value)',
154
+ value: fetchEvents_1.EventsOrderPreset.Slowest.valueOf().toLowerCase(),
155
+ },
156
+ {
157
+ title: 'Fastest first (lowest metric value)',
158
+ value: fetchEvents_1.EventsOrderPreset.Fastest.valueOf().toLowerCase(),
159
+ },
160
+ ]
161
+ : []),
162
+ ];
163
+ return await (0, prompts_1.selectAsync)('Sort candidate events by', choices);
164
+ }
165
+ async function promptForEventNameAsync({ graphqlClient, projectId, startTime, endTime, }) {
166
+ const { names: customEventNames } = await ObserveQuery_1.ObserveQuery.customEventNamesAsync(graphqlClient, {
167
+ appId: projectId,
168
+ startTime,
169
+ endTime,
170
+ });
171
+ const metricChoices = Object.entries(metricNames_1.METRIC_SHORT_NAMES).map(([fullName, displayName]) => ({
172
+ title: `${displayName} (metric)`,
173
+ value: { name: fullName, isMetric: true },
174
+ }));
175
+ const logChoices = customEventNames.map(({ eventName, count }) => ({
176
+ title: `${eventName} (${count} log event${count === 1 ? '' : 's'})`,
177
+ value: { name: eventName, isMetric: false },
178
+ }));
179
+ const choices = [...metricChoices, ...logChoices];
180
+ if (choices.length === 0) {
181
+ throw new errors_1.EasCommandError('No metric or log events found for the selected time range. Widen the window with --days or wait for data to arrive.');
182
+ }
183
+ return await (0, prompts_1.selectAsync)('Select an event name', choices);
184
+ }
185
+ async function promptForSessionIdAsync(candidates) {
186
+ const choices = candidates.map(c => ({
187
+ title: c.title,
188
+ value: c.sessionId,
189
+ }));
190
+ return await (0, prompts_1.selectAsync)('Select an event (its session will be shown)', choices);
191
+ }
@@ -28,20 +28,21 @@ class ObserveVersions extends EasCommand_1.default {
28
28
  };
29
29
  async runAsync() {
30
30
  const { flags } = await this.parse(ObserveVersions);
31
+ const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
31
32
  const { projectId, graphqlClient } = await (0, resolveProjectContext_1.resolveObserveCommandContextAsync)({
32
33
  command: this,
33
34
  commandClass: ObserveVersions,
34
35
  loggedInOnlyContextDefinition: ObserveVersions.loggedInOnlyContextDefinition,
35
36
  projectIdOverride: flags['project-id'],
36
- nonInteractive: flags['non-interactive'],
37
+ nonInteractive,
37
38
  });
38
- if (flags.json) {
39
+ if (json) {
39
40
  (0, json_1.enableJsonOutput)();
40
41
  }
41
42
  const { startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
42
43
  const platforms = (0, platforms_1.appPlatformsFromFlag)(flags.platform);
43
44
  const results = await (0, fetchVersions_1.fetchObserveVersionsAsync)(graphqlClient, projectId, platforms, startTime, endTime);
44
- if (flags.json) {
45
+ if (json) {
45
46
  (0, json_1.printJsonOnlyOutput)((0, formatVersions_1.buildObserveVersionsJson)(results));
46
47
  }
47
48
  else {
@@ -1397,6 +1397,10 @@ export type App = Project & {
1397
1397
  workerDeploymentsCrashes?: Maybe<WorkerDeploymentCrashes>;
1398
1398
  workerDeploymentsRequest: WorkerDeploymentRequestEdge;
1399
1399
  workerDeploymentsRequests?: Maybe<WorkerDeploymentRequests>;
1400
+ /** Caches associated with this app, ordered by last access time (most recent first). */
1401
+ workflowCachesPaginated: AppWorkflowCachesConnection;
1402
+ /** Per-type caching configuration for this app. */
1403
+ workflowCachingConfig: WorkflowCachingConfig;
1400
1404
  workflowDeviceTestCaseHistory: WorkflowDeviceTestCaseHistory;
1401
1405
  workflowDeviceTestCaseInsights: WorkflowDeviceTestCaseInsights;
1402
1406
  workflowRunGitBranchesPaginated: AppWorkflowRunGitBranchesConnection;
@@ -1645,6 +1649,13 @@ export type AppWorkerDeploymentsRequestsArgs = {
1645
1649
  timespan: DatasetTimespan;
1646
1650
  };
1647
1651
  /** Represents an Exponent App (or Experience in legacy terms) */
1652
+ export type AppWorkflowCachesPaginatedArgs = {
1653
+ after?: InputMaybe<Scalars['String']['input']>;
1654
+ before?: InputMaybe<Scalars['String']['input']>;
1655
+ first?: InputMaybe<Scalars['Int']['input']>;
1656
+ last?: InputMaybe<Scalars['Int']['input']>;
1657
+ };
1658
+ /** Represents an Exponent App (or Experience in legacy terms) */
1648
1659
  export type AppWorkflowDeviceTestCaseHistoryArgs = {
1649
1660
  filters?: InputMaybe<WorkflowDeviceTestCaseHistoryFiltersInput>;
1650
1661
  path: Scalars['String']['input'];
@@ -1809,6 +1820,8 @@ export type AppMutation = {
1809
1820
  setPushSecurityEnabled: App;
1810
1821
  /** Set resource class experiment for app */
1811
1822
  setResourceClassExperiment: App;
1823
+ /** Set per-type caching configuration for the app. */
1824
+ setWorkflowCachingConfig: App;
1812
1825
  };
1813
1826
  export type AppMutationCreateAppArgs = {
1814
1827
  appInput: AppInput;
@@ -1831,6 +1844,10 @@ export type AppMutationSetResourceClassExperimentArgs = {
1831
1844
  appId: Scalars['ID']['input'];
1832
1845
  resourceClassExperiment?: InputMaybe<ResourceClassExperiment>;
1833
1846
  };
1847
+ export type AppMutationSetWorkflowCachingConfigArgs = {
1848
+ appId: Scalars['ID']['input'];
1849
+ config: WorkflowCachingConfigInput;
1850
+ };
1834
1851
  /** App-level notification preference */
1835
1852
  export type AppNotificationPreference = NotificationPreference & {
1836
1853
  __typename?: 'AppNotificationPreference';
@@ -2895,6 +2912,16 @@ export type AppWithGithubRepositoryInput = {
2895
2912
  installationIdentifier?: InputMaybe<Scalars['String']['input']>;
2896
2913
  projectName: Scalars['String']['input'];
2897
2914
  };
2915
+ export type AppWorkflowCacheEdge = {
2916
+ __typename?: 'AppWorkflowCacheEdge';
2917
+ cursor: Scalars['String']['output'];
2918
+ node: WorkflowCache;
2919
+ };
2920
+ export type AppWorkflowCachesConnection = {
2921
+ __typename?: 'AppWorkflowCachesConnection';
2922
+ edges: Array<AppWorkflowCacheEdge>;
2923
+ pageInfo: PageInfo;
2924
+ };
2898
2925
  export type AppWorkflowFilterInput = {
2899
2926
  requestedGitRef?: InputMaybe<Scalars['String']['input']>;
2900
2927
  };
@@ -7651,6 +7678,7 @@ export type RootMutation = {
7651
7678
  webhook: WebhookMutation;
7652
7679
  /** Mutations that modify a websiteNotification */
7653
7680
  websiteNotifications: WebsiteNotificationMutation;
7681
+ workflowCache: WorkflowCacheMutation;
7654
7682
  workflowDeviceTestCaseResult: WorkflowDeviceTestCaseResultMutation;
7655
7683
  workflowJobAppleDeviceRegistrationRequest: WorkflowJobAppleDeviceRegistrationRequestMutation;
7656
7684
  workflowJobApproval: WorkflowJobApprovalMutation;
@@ -8086,7 +8114,8 @@ export type SentryProjectMutationDeleteSentryProjectArgs = {
8086
8114
  export type ServeSimRunSessionRemoteConfig = {
8087
8115
  __typename?: 'ServeSimRunSessionRemoteConfig';
8088
8116
  previewUrl: Scalars['String']['output'];
8089
- streamUrl: Scalars['String']['output'];
8117
+ /** @deprecated Use previewUrl instead. */
8118
+ streamUrl?: Maybe<Scalars['String']['output']>;
8090
8119
  };
8091
8120
  export type SetupConvexProjectInput = {
8092
8121
  appId: Scalars['ID']['input'];
@@ -8944,6 +8973,11 @@ export type UpdatesTimelineFilter = {
8944
8973
  channel?: InputMaybe<Scalars['String']['input']>;
8945
8974
  platform?: InputMaybe<AppPlatform>;
8946
8975
  runtimeVersions?: InputMaybe<Array<Scalars['String']['input']>>;
8976
+ /**
8977
+ * Case-insensitive substring match on update group message and branch name.
8978
+ * Embedded updates are matched on channel and runtime version.
8979
+ */
8980
+ searchTerm?: InputMaybe<Scalars['String']['input']>;
8947
8981
  types?: InputMaybe<Array<UpdatesTimelineItemType>>;
8948
8982
  };
8949
8983
  export type UpdatesTimelineItem = EmbeddedUpdate | UpdateGroup;
@@ -10145,6 +10179,66 @@ export declare enum WorkflowArtifactStorageType {
10145
10179
  Gcs = "GCS",
10146
10180
  R2 = "R2"
10147
10181
  }
10182
+ export type WorkflowCache = {
10183
+ __typename?: 'WorkflowCache';
10184
+ createdAt: Scalars['DateTime']['output'];
10185
+ /** Actor who created this cache. Null if the creating user no longer exists. */
10186
+ creatingActor?: Maybe<Actor>;
10187
+ /** Git branch name the cache was created from. Null for user-scoped caches. */
10188
+ gitBranchName?: Maybe<Scalars['String']['output']>;
10189
+ /**
10190
+ * Build that created this cache. Null if the cache was created by a job run
10191
+ * or the build no longer exists.
10192
+ */
10193
+ hydratingBuild?: Maybe<Build>;
10194
+ /**
10195
+ * Job run that created this cache. Null if the cache was created by a build
10196
+ * or the job run no longer exists.
10197
+ */
10198
+ hydratingJobRun?: Maybe<JobRun>;
10199
+ id: Scalars['ID']['output'];
10200
+ /** Cache key used to identify the cache entry. */
10201
+ key: Scalars['String']['output'];
10202
+ /**
10203
+ * Time the cache was last used to restore, or the creation time if it has
10204
+ * never been restored.
10205
+ */
10206
+ lastAccessedAt: Scalars['DateTime']['output'];
10207
+ /** Size of the cache archive in bytes. Null if the cache has not been hydrated yet. */
10208
+ sizeBytes?: Maybe<Scalars['Float']['output']>;
10209
+ };
10210
+ export type WorkflowCacheMutation = {
10211
+ __typename?: 'WorkflowCacheMutation';
10212
+ deleteWorkflowCache: WorkflowCache;
10213
+ };
10214
+ export type WorkflowCacheMutationDeleteWorkflowCacheArgs = {
10215
+ cacheId: Scalars['ID']['input'];
10216
+ };
10217
+ export type WorkflowCachingConfig = {
10218
+ __typename?: 'WorkflowCachingConfig';
10219
+ /**
10220
+ * Whether the ccache compiler cache is enabled. Null if not explicitly
10221
+ * configured, in which case the account-level default applies.
10222
+ */
10223
+ ccacheEnabled?: Maybe<Scalars['Boolean']['output']>;
10224
+ /**
10225
+ * Whether the Gradle build cache is enabled. Null if not explicitly
10226
+ * configured, in which case it is disabled.
10227
+ */
10228
+ gradleCacheEnabled?: Maybe<Scalars['Boolean']['output']>;
10229
+ };
10230
+ export type WorkflowCachingConfigInput = {
10231
+ /**
10232
+ * Pass true or false to explicitly enable or disable, null to reset to the account-level
10233
+ * default, or omit the field to leave it unchanged.
10234
+ */
10235
+ ccacheEnabled?: InputMaybe<Scalars['Boolean']['input']>;
10236
+ /**
10237
+ * Pass true or false to explicitly enable or disable, null to reset to the default
10238
+ * (disabled), or omit the field to leave it unchanged.
10239
+ */
10240
+ gradleCacheEnabled?: InputMaybe<Scalars['Boolean']['input']>;
10241
+ };
10148
10242
  /**
10149
10243
  * Grouping key from the [shard N] prefix-stripped error_message. `count` is
10150
10244
  * computed with uniqExact(test_case_result_id) so RMT pre-merge duplicates do
@@ -16439,6 +16533,11 @@ export type AccountUsageForOverageWarningQuery = {
16439
16533
  __typename?: 'EstimatedOverageAndCost';
16440
16534
  id: string;
16441
16535
  value: number;
16536
+ metadata?: {
16537
+ __typename?: 'AccountUsageEASBuildMetadata';
16538
+ billingResourceClass?: EasBuildBillingResourceClass | null;
16539
+ platform?: AppPlatform | null;
16540
+ } | null;
16442
16541
  }>;
16443
16542
  };
16444
16543
  };
@@ -17998,7 +18097,6 @@ export type DeviceRunSessionByIdQuery = {
17998
18097
  } | {
17999
18098
  __typename: 'ServeSimRunSessionRemoteConfig';
18000
18099
  previewUrl: string;
18001
- streamUrl: string;
18002
18100
  } | null;
18003
18101
  turtleJobRun?: {
18004
18102
  __typename?: 'JobRun';
@@ -18581,6 +18679,7 @@ export type AppObserveCustomEventListQueryVariables = Exact<{
18581
18679
  filter?: InputMaybe<AppObserveCustomEventListFilter>;
18582
18680
  first?: InputMaybe<Scalars['Int']['input']>;
18583
18681
  after?: InputMaybe<Scalars['String']['input']>;
18682
+ orderBy?: InputMaybe<AppObserveCustomEventListOrderBy>;
18584
18683
  }>;
18585
18684
  export type AppObserveCustomEventListQuery = {
18586
18685
  __typename?: 'RootQuery';
@@ -157,6 +157,12 @@ exports.AccountQuery = {
157
157
  overageMetrics {
158
158
  id
159
159
  value
160
+ metadata {
161
+ ... on AccountUsageEASBuildMetadata {
162
+ billingResourceClass
163
+ platform
164
+ }
165
+ }
160
166
  }
161
167
  totalCost
162
168
  }
@@ -51,7 +51,6 @@ exports.DeviceRunSessionQuery = {
51
51
  }
52
52
  ... on ServeSimRunSessionRemoteConfig {
53
53
  previewUrl
54
- streamUrl
55
54
  }
56
55
  }
57
56
  turtleJobRun {
@@ -1,5 +1,5 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { AppObserveAppVersion, AppObserveCustomEvent, AppObserveCustomEventListFilter, AppObserveCustomEventName, AppObserveEvent, AppObserveEventsFilter, AppObserveEventsOrderBy, AppObserveNavigationRoute, AppObserveNavigationRoutesFilter, AppObserveNavigationRoutesOrderBy, AppObservePlatform, AppObserveTimeSeriesStatistics, PageInfo } from '../generated';
2
+ import { AppObserveAppVersion, AppObserveCustomEvent, AppObserveCustomEventListFilter, AppObserveCustomEventListOrderBy, AppObserveCustomEventName, AppObserveEvent, AppObserveEventsFilter, AppObserveEventsOrderBy, AppObserveNavigationRoute, AppObserveNavigationRoutesFilter, AppObserveNavigationRoutesOrderBy, AppObservePlatform, AppObserveTimeSeriesStatistics, PageInfo } from '../generated';
3
3
  export type AppObserveTimeSeriesResult = {
4
4
  appVersionMarkers: AppObserveAppVersion[];
5
5
  eventCount: number;
@@ -17,6 +17,7 @@ type AppObserveCustomEventListQueryVariables = {
17
17
  filter?: AppObserveCustomEventListFilter;
18
18
  first?: number;
19
19
  after?: string;
20
+ orderBy?: AppObserveCustomEventListOrderBy;
20
21
  };
21
22
  type AppObserveNavigationRoutesQueryVariables = {
22
23
  appId: string;
@@ -114,12 +114,18 @@ exports.ObserveQuery = {
114
114
  $filter: AppObserveCustomEventListFilter
115
115
  $first: Int
116
116
  $after: String
117
+ $orderBy: AppObserveCustomEventListOrderBy
117
118
  ) {
118
119
  app {
119
120
  byId(appId: $appId) {
120
121
  id
121
122
  observe {
122
- customEventList(filter: $filter, first: $first, after: $after) {
123
+ customEventList(
124
+ filter: $filter
125
+ first: $first
126
+ after: $after
127
+ orderBy: $orderBy
128
+ ) {
123
129
  pageInfo {
124
130
  hasNextPage
125
131
  hasPreviousPage
@@ -1,5 +1,5 @@
1
1
  import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { AppObserveCustomEvent, AppObservePlatform, PageInfo } from '../graphql/generated';
2
+ import { AppObserveCustomEvent, AppObserveCustomEventListOrderBy, AppObservePlatform, PageInfo } from '../graphql/generated';
3
3
  interface FetchCustomEventsOptions {
4
4
  eventName?: string;
5
5
  limit: number;
@@ -10,6 +10,7 @@ interface FetchCustomEventsOptions {
10
10
  appVersion?: string;
11
11
  updateId?: string;
12
12
  sessionId?: string;
13
+ orderBy?: AppObserveCustomEventListOrderBy;
13
14
  }
14
15
  interface FetchCustomEventsResult {
15
16
  events: AppObserveCustomEvent[];
@@ -17,5 +17,6 @@ async function fetchObserveCustomEventsAsync(graphqlClient, appId, options) {
17
17
  filter,
18
18
  first: options.limit,
19
19
  ...(options.after && { after: options.after }),
20
+ ...(options.orderBy && { orderBy: options.orderBy }),
20
21
  });
21
22
  }
@@ -1,4 +1,5 @@
1
1
  import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { AppObserveCustomEvent, AppObserveEvent } from '../graphql/generated';
2
3
  export interface SessionEventEntry {
3
4
  source: 'metric' | 'log';
4
5
  timestamp: string;
@@ -49,3 +50,44 @@ export interface FetchSessionEventsResult {
49
50
  hasMoreLogEvents: boolean;
50
51
  }
51
52
  export declare function fetchObserveSessionEventsAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchSessionEventsOptions): Promise<FetchSessionEventsResult>;
53
+ /**
54
+ * A metric event that is guaranteed to belong to a session — used as a
55
+ * candidate when picking a session to inspect via `observe:session`.
56
+ */
57
+ export type SessionMetricCandidate = AppObserveEvent & {
58
+ sessionId: string;
59
+ };
60
+ export interface FetchSessionMetricCandidatesOptions {
61
+ metricName: string;
62
+ /** One of EventsOrderPreset (case-insensitive). */
63
+ sort: string;
64
+ startTime: string;
65
+ endTime: string;
66
+ limit: number;
67
+ }
68
+ /**
69
+ * Fetch a page of metric events for the given metricName + window, ordered
70
+ * per `sort`, and filtered to events that have a sessionId. The events query
71
+ * supports server-side ordering, so `sort` is passed straight through.
72
+ */
73
+ export declare function fetchSessionMetricCandidatesAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchSessionMetricCandidatesOptions): Promise<SessionMetricCandidate[]>;
74
+ /**
75
+ * A custom log event that is guaranteed to belong to a session — used as a
76
+ * candidate when picking a session to inspect via `observe:session`.
77
+ */
78
+ export type SessionLogCandidate = AppObserveCustomEvent & {
79
+ sessionId: string;
80
+ };
81
+ export interface FetchSessionLogCandidatesOptions {
82
+ eventName: string;
83
+ /** True → oldest-first (ascending timestamp); false → newest-first. */
84
+ orderAscending: boolean;
85
+ startTime: string;
86
+ endTime: string;
87
+ limit: number;
88
+ }
89
+ /**
90
+ * Fetch a page of custom log events for the given eventName + window, ordered
91
+ * by timestamp server-side, and filtered to events that have a sessionId.
92
+ */
93
+ export declare function fetchSessionLogCandidatesAsync(graphqlClient: ExpoGraphqlClient, appId: string, options: FetchSessionLogCandidatesOptions): Promise<SessionLogCandidate[]>;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fetchObserveSessionEventsAsync = fetchObserveSessionEventsAsync;
4
+ exports.fetchSessionMetricCandidatesAsync = fetchSessionMetricCandidatesAsync;
5
+ exports.fetchSessionLogCandidatesAsync = fetchSessionLogCandidatesAsync;
4
6
  const generated_1 = require("../graphql/generated");
5
7
  const fetchCustomEvents_1 = require("./fetchCustomEvents");
6
8
  const fetchEvents_1 = require("./fetchEvents");
@@ -84,3 +86,37 @@ async function fetchObserveSessionEventsAsync(graphqlClient, appId, options) {
84
86
  hasMoreLogEvents: logResult.pageInfo.hasNextPage,
85
87
  };
86
88
  }
89
+ /**
90
+ * Fetch a page of metric events for the given metricName + window, ordered
91
+ * per `sort`, and filtered to events that have a sessionId. The events query
92
+ * supports server-side ordering, so `sort` is passed straight through.
93
+ */
94
+ async function fetchSessionMetricCandidatesAsync(graphqlClient, appId, options) {
95
+ const { events } = await (0, fetchEvents_1.fetchObserveEventsAsync)(graphqlClient, appId, {
96
+ metricName: options.metricName,
97
+ orderBy: (0, fetchEvents_1.resolveOrderBy)(options.sort),
98
+ limit: options.limit,
99
+ startTime: options.startTime,
100
+ endTime: options.endTime,
101
+ });
102
+ return events.filter((e) => !!e.sessionId);
103
+ }
104
+ /**
105
+ * Fetch a page of custom log events for the given eventName + window, ordered
106
+ * by timestamp server-side, and filtered to events that have a sessionId.
107
+ */
108
+ async function fetchSessionLogCandidatesAsync(graphqlClient, appId, options) {
109
+ const { events } = await (0, fetchCustomEvents_1.fetchObserveCustomEventsAsync)(graphqlClient, appId, {
110
+ eventName: options.eventName,
111
+ limit: options.limit,
112
+ startTime: options.startTime,
113
+ endTime: options.endTime,
114
+ orderBy: {
115
+ field: generated_1.AppObserveCustomEventListOrderByField.Timestamp,
116
+ direction: options.orderAscending
117
+ ? generated_1.AppObserveEventsOrderByDirection.Asc
118
+ : generated_1.AppObserveEventsOrderByDirection.Desc,
119
+ },
120
+ });
121
+ return events.filter((e) => !!e.sessionId);
122
+ }
@@ -1,3 +1,4 @@
1
+ import { AppObserveCustomEvent, AppObserveEvent } from '../graphql/generated';
1
2
  import { SessionEventEntry, SessionMetadata } from './fetchSessions';
2
3
  export interface BuildSessionEventsOptions {
3
4
  metadata?: SessionMetadata | null;
@@ -13,3 +14,18 @@ export interface ObserveSessionEventsJson {
13
14
  hasMoreLogEvents: boolean;
14
15
  }
15
16
  export declare function buildObserveSessionEventsJson(entries: SessionEventEntry[], sessionId: string, metadata: SessionMetadata | null, hasMoreMetricEvents: boolean, hasMoreLogEvents: boolean): ObserveSessionEventsJson;
17
+ /**
18
+ * Compact session ID for display in candidate lists — long UUIDs are
19
+ * truncated to `<first-8>…<last-4>` so a row stays scannable.
20
+ */
21
+ export declare function shortSessionId(sessionId: string): string;
22
+ /**
23
+ * One-line title for a metric event shown in the observe:session candidate
24
+ * picker, e.g. `Jan 15, 10:00:00.000 AM · Startup TTI 1.23s · 1.0.0 · iOS 17.0 · session abc…1234`.
25
+ */
26
+ export declare function formatMetricCandidateTitle(event: AppObserveEvent): string;
27
+ /**
28
+ * One-line title for a custom log event shown in the observe:session
29
+ * candidate picker.
30
+ */
31
+ export declare function formatLogCandidateTitle(event: AppObserveCustomEvent): string;