From 647bbd8032d334e548644aa675ef0f1896a35bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Mon, 31 Aug 2026 14:59:20 +0200 Subject: [PATCH] [eas-cli] Update GraphQL schema for web preview sessions --- packages/eas-cli/graphql.schema.json | 889 +++++++++++++++++- .../simulator/__tests__/index.test.ts | 8 +- .../commands/simulator/__tests__/list.test.ts | 2 +- packages/eas-cli/src/graphql/generated.ts | 137 ++- .../graphql/queries/DeviceRunSessionQuery.ts | 3 + .../src/simulator/__tests__/utils.test.ts | 10 +- packages/eas-cli/src/simulator/utils.ts | 8 + 7 files changed, 1045 insertions(+), 12 deletions(-) diff --git a/packages/eas-cli/graphql.schema.json b/packages/eas-cli/graphql.schema.json index b496d8dc55..dfaad56c31 100644 --- a/packages/eas-cli/graphql.schema.json +++ b/packages/eas-cli/graphql.schema.json @@ -399,6 +399,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "agentProviderConnections", + "description": "AI provider connections available to agent sandbox sessions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AgentProviderConnection", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "aiChatEnabled", "description": null, @@ -6524,6 +6548,491 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "AgentProvider", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ANTHROPIC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OPENAI", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AgentProviderConnection", + "description": null, + "fields": [ + { + "name": "account", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Account", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdByActor", + "description": null, + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiresAt", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "provider", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AgentProvider", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "providerAccountEmail", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "providerAccountId", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "providerPlan", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AgentProviderConnectionStatus", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AgentProviderConnectionAuthorizationStatus", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "EXPIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PENDING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUCCEEDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AgentProviderConnectionMutation", + "description": null, + "fields": [ + { + "name": "completeClaudeConnection", + "description": null, + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CompleteClaudeConnectionInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AgentProviderConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deleteAgentProviderConnection", + "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AgentProviderConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pollCodexConnection", + "description": null, + "args": [ + { + "name": "requestId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CodexConnectionPollResult", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startClaudeConnection", + "description": null, + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "StartClaudeConnectionInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ClaudeAuthorization", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startCodexConnection", + "description": null, + "args": [ + { + "name": "accountId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CodexDeviceAuthorization", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateAgentProviderConnection", + "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateAgentProviderConnectionInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AgentProviderConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AgentProviderConnectionStatus", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNABLE_TO_VERIFY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "AndroidAppBuildCredentials", @@ -10454,6 +10963,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "isEligibleForObserveLapsedPaidNotification", + "description": "Whether this app qualifies for the observe-notification-lapsed-paid experiment", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "isEligibleForObserveNotice", "description": "Tells you if the project can show the Observe promotional notification. This field is part of\nthe observe-notification experiment.", @@ -35985,6 +36510,65 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ClaudeAuthorization", + "description": null, + "fields": [ + { + "name": "authorizationUrl", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "expiresAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requestId", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "CodeSigningInfo", @@ -36103,6 +36687,179 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "CodexConnectionPollResult", + "description": null, + "fields": [ + { + "name": "connection", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AgentProviderConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AgentProviderConnectionAuthorizationStatus", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CodexDeviceAuthorization", + "description": null, + "fields": [ + { + "name": "expiresAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pollingIntervalSeconds", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requestId", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userCode", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verificationUrl", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CompleteClaudeConnectionInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "authorizationCode", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requestId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "CompletePostHogConnectionInput", @@ -37635,7 +38392,7 @@ }, { "name": "maxIdleTimeMinutes", - "description": "Stop the session automatically after this many minutes without observed\nsession activity. Must be positive and smaller than the session's maximum\nduration (2 hours, or maxRunTimeMinutes when set). Only supported for\nagent-device, argent, and Appium sessions. If omitted, the session has no idle\ntimeout.", + "description": "Stop the session automatically after this many minutes without observed\nsession activity. Must be positive and smaller than the session's maximum\nduration (maxRunTimeMinutes when set). Only supported for\nagent-device, argent, and Appium sessions. If omitted, the session has no idle\ntimeout.", "type": { "kind": "SCALAR", "name": "Int", @@ -44111,6 +44868,11 @@ "kind": "OBJECT", "name": "ServeSimRunSessionRemoteConfig", "ofType": null + }, + { + "kind": "OBJECT", + "name": "WebPreviewOnlyRunSessionRemoteConfig", + "ofType": null } ] }, @@ -44201,6 +44963,12 @@ { "name": "SERVE_SIM", "description": null, + "isDeprecated": true, + "deprecationReason": "Use WEB_PREVIEW_ONLY instead." + }, + { + "name": "WEB_PREVIEW_ONLY", + "description": "A session accessed only through its web preview. Currently supported on iOS.", "isDeprecated": false, "deprecationReason": null } @@ -49746,6 +50514,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "AgentProviderConnectionEntity", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "AndroidAppCredentialsEntity", "description": null, @@ -66735,6 +67509,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "agentProviderConnection", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AgentProviderConnectionMutation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "androidAppBuildCredentials", "description": "Mutations that modify the build credentials for an Android app", @@ -71380,7 +72170,7 @@ { "kind": "OBJECT", "name": "ServeSimRunSessionRemoteConfig", - "description": null, + "description": "Legacy remote config for SERVE_SIM sessions. Use WEB_PREVIEW_ONLY sessions and\nWebPreviewOnlyRunSessionRemoteConfig instead.", "fields": [ { "name": "previewUrl", @@ -72015,6 +72805,33 @@ ], "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "StartClaudeConnectionInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "accountId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "UNION", "name": "StartPostHogConnectionResult", @@ -76276,6 +77093,29 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateAgentProviderConnectionInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "UpdateBranch", @@ -85646,6 +86486,33 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "WebPreviewOnlyRunSessionRemoteConfig", + "description": null, + "fields": [ + { + "name": "webPreviewUrl", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "Webhook", @@ -96238,6 +97105,24 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "GITHUB_PULL_REQUEST_COMMENT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GITHUB_PULL_REQUEST_COMMENT_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GITHUB_PULL_REQUEST_COMMENT_EDITED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "GITHUB_PULL_REQUEST_EDITED", "description": null, diff --git a/packages/eas-cli/src/commands/simulator/__tests__/index.test.ts b/packages/eas-cli/src/commands/simulator/__tests__/index.test.ts index 771c4ef5a3..8a9f7ab0ee 100644 --- a/packages/eas-cli/src/commands/simulator/__tests__/index.test.ts +++ b/packages/eas-cli/src/commands/simulator/__tests__/index.test.ts @@ -332,12 +332,12 @@ describe(Simulator, () => { ); }); - it('creates a ServeSim session for --type web-preview-only', async () => { + it('creates a WebPreviewOnly session for --type web-preview-only', async () => { mockByIdAsync.mockResolvedValue( makeDeviceRunSession({ - type: DeviceRunSessionType.ServeSim, + type: DeviceRunSessionType.WebPreviewOnly, remoteConfig: { - __typename: 'ServeSimRunSessionRemoteConfig', + __typename: 'WebPreviewOnlyRunSessionRemoteConfig', previewUrl: 'https://preview.example.test', }, }) @@ -354,7 +354,7 @@ describe(Simulator, () => { expect(mockCreateDeviceRunSessionAsync).toHaveBeenCalledWith( graphqlClient, - expect.objectContaining({ type: DeviceRunSessionType.ServeSim }) + expect.objectContaining({ type: DeviceRunSessionType.WebPreviewOnly }) ); expect(Log.log).toHaveBeenCalledWith(expect.stringContaining('https://preview.example.test')); }); diff --git a/packages/eas-cli/src/commands/simulator/__tests__/list.test.ts b/packages/eas-cli/src/commands/simulator/__tests__/list.test.ts index b1bb821cdc..6295e3c11a 100644 --- a/packages/eas-cli/src/commands/simulator/__tests__/list.test.ts +++ b/packages/eas-cli/src/commands/simulator/__tests__/list.test.ts @@ -181,7 +181,7 @@ describe(SimulatorList, () => { after: 'page-cursor', filter: { statuses: [DeviceRunSessionStatus.InProgress, DeviceRunSessionStatus.New], - types: [DeviceRunSessionType.Appium, DeviceRunSessionType.ServeSim], + types: [DeviceRunSessionType.Appium, DeviceRunSessionType.WebPreviewOnly], platforms: [AppPlatform.Ios], name: 'checkout', }, diff --git a/packages/eas-cli/src/graphql/generated.ts b/packages/eas-cli/src/graphql/generated.ts index bb936114f3..e58d6d8e88 100644 --- a/packages/eas-cli/src/graphql/generated.ts +++ b/packages/eas-cli/src/graphql/generated.ts @@ -83,6 +83,8 @@ export type Account = { accountFeatureGates: Scalars['JSONObject']['output']; /** Coalesced project activity for all apps belonging to this account. */ activityTimelineProjectActivities: Array; + /** AI provider connections available to agent sandbox sessions. */ + agentProviderConnections: Array; aiChatEnabled: Scalars['Boolean']['output']; appCount: Scalars['Int']['output']; /** @deprecated Use appStoreConnectApiKeysPaginated */ @@ -1078,6 +1080,80 @@ export type AgentDeviceRunSessionRemoteConfig = { webPreviewUrl?: Maybe; }; +export enum AgentProvider { + Anthropic = 'ANTHROPIC', + Openai = 'OPENAI' +} + +export type AgentProviderConnection = { + __typename?: 'AgentProviderConnection'; + account: Account; + createdAt: Scalars['DateTime']['output']; + createdByActor?: Maybe; + expiresAt?: Maybe; + id: Scalars['ID']['output']; + name?: Maybe; + provider: AgentProvider; + providerAccountEmail?: Maybe; + providerAccountId?: Maybe; + providerPlan?: Maybe; + status: AgentProviderConnectionStatus; + updatedAt: Scalars['DateTime']['output']; +}; + +export enum AgentProviderConnectionAuthorizationStatus { + Expired = 'EXPIRED', + Pending = 'PENDING', + Succeeded = 'SUCCEEDED' +} + +export type AgentProviderConnectionMutation = { + __typename?: 'AgentProviderConnectionMutation'; + completeClaudeConnection: AgentProviderConnection; + deleteAgentProviderConnection: AgentProviderConnection; + pollCodexConnection: CodexConnectionPollResult; + startClaudeConnection: ClaudeAuthorization; + startCodexConnection: CodexDeviceAuthorization; + updateAgentProviderConnection: AgentProviderConnection; +}; + + +export type AgentProviderConnectionMutationCompleteClaudeConnectionArgs = { + input: CompleteClaudeConnectionInput; +}; + + +export type AgentProviderConnectionMutationDeleteAgentProviderConnectionArgs = { + id: Scalars['ID']['input']; +}; + + +export type AgentProviderConnectionMutationPollCodexConnectionArgs = { + requestId: Scalars['ID']['input']; +}; + + +export type AgentProviderConnectionMutationStartClaudeConnectionArgs = { + input: StartClaudeConnectionInput; +}; + + +export type AgentProviderConnectionMutationStartCodexConnectionArgs = { + accountId: Scalars['ID']['input']; +}; + + +export type AgentProviderConnectionMutationUpdateAgentProviderConnectionArgs = { + id: Scalars['ID']['input']; + input: UpdateAgentProviderConnectionInput; +}; + +export enum AgentProviderConnectionStatus { + Invalid = 'INVALID', + UnableToVerify = 'UNABLE_TO_VERIFY', + Valid = 'VALID' +} + export type AndroidAppBuildCredentials = { __typename?: 'AndroidAppBuildCredentials'; androidKeystore?: Maybe; @@ -1472,6 +1548,8 @@ export type App = Project & { internalDistributionBuildPrivacy: AppInternalDistributionBuildPrivacy; /** iOS app credentials for the project */ iosAppCredentials: Array; + /** Whether this app qualifies for the observe-notification-lapsed-paid experiment */ + isEligibleForObserveLapsedPaidNotification: Scalars['Boolean']['output']; /** * Tells you if the project can show the Observe promotional notification. This field is part of * the observe-notification experiment. @@ -5087,6 +5165,13 @@ export type ChatTokenUsage = { usedTokens: Scalars['Int']['output']; }; +export type ClaudeAuthorization = { + __typename?: 'ClaudeAuthorization'; + authorizationUrl: Scalars['String']['output']; + expiresAt: Scalars['DateTime']['output']; + requestId: Scalars['ID']['output']; +}; + export type CodeSigningInfo = { __typename?: 'CodeSigningInfo'; alg: Scalars['String']['output']; @@ -5100,6 +5185,26 @@ export type CodeSigningInfoInput = { sig: Scalars['String']['input']; }; +export type CodexConnectionPollResult = { + __typename?: 'CodexConnectionPollResult'; + connection?: Maybe; + status: AgentProviderConnectionAuthorizationStatus; +}; + +export type CodexDeviceAuthorization = { + __typename?: 'CodexDeviceAuthorization'; + expiresAt: Scalars['DateTime']['output']; + pollingIntervalSeconds: Scalars['Int']['output']; + requestId: Scalars['ID']['output']; + userCode: Scalars['String']['output']; + verificationUrl: Scalars['String']['output']; +}; + +export type CompleteClaudeConnectionInput = { + authorizationCode: Scalars['String']['input']; + requestId: Scalars['ID']['input']; +}; + export type CompletePostHogConnectionInput = { code: Scalars['String']['input']; state: Scalars['ID']['input']; @@ -5321,7 +5426,7 @@ export type CreateDeviceRunSessionInput = { /** * Stop the session automatically after this many minutes without observed * session activity. Must be positive and smaller than the session's maximum - * duration (2 hours, or maxRunTimeMinutes when set). Only supported for + * duration (maxRunTimeMinutes when set). Only supported for * agent-device, argent, and Appium sessions. If omitted, the session has no idle * timeout. */ @@ -6241,7 +6346,7 @@ export type DeviceRunSessionQueryByIdArgs = { deviceRunSessionId: Scalars['ID']['input']; }; -export type DeviceRunSessionRemoteConfig = AgentDeviceRunSessionRemoteConfig | AppiumRunSessionRemoteConfig | ArgentRunSessionRemoteConfig | ServeSimRunSessionRemoteConfig; +export type DeviceRunSessionRemoteConfig = AgentDeviceRunSessionRemoteConfig | AppiumRunSessionRemoteConfig | ArgentRunSessionRemoteConfig | ServeSimRunSessionRemoteConfig | WebPreviewOnlyRunSessionRemoteConfig; export enum DeviceRunSessionResourceClass { Large = 'LARGE', @@ -6259,7 +6364,10 @@ export enum DeviceRunSessionType { AgentDevice = 'AGENT_DEVICE', Appium = 'APPIUM', Argent = 'ARGENT', - ServeSim = 'SERVE_SIM' + /** @deprecated Use WEB_PREVIEW_ONLY instead. */ + ServeSim = 'SERVE_SIM', + /** A session accessed only through its web preview. Currently supported on iOS. */ + WebPreviewOnly = 'WEB_PREVIEW_ONLY' } export type DiscordUser = { @@ -7126,6 +7234,7 @@ export type EmbeddedUpdateQueryByIdArgs = { export enum EntityTypeName { AccountEntity = 'AccountEntity', AccountSsoConfigurationEntity = 'AccountSSOConfigurationEntity', + AgentProviderConnectionEntity = 'AgentProviderConnectionEntity', AndroidAppCredentialsEntity = 'AndroidAppCredentialsEntity', AndroidKeystoreEntity = 'AndroidKeystoreEntity', AppEntity = 'AppEntity', @@ -9509,6 +9618,7 @@ export type RootMutation = { accountSSOConfiguration: AccountSsoConfigurationMutation; /** Mutations for Actor experiments */ actorExperiment: ActorExperimentMutation; + agentProviderConnection: AgentProviderConnectionMutation; /** Mutations that modify the build credentials for an Android app */ androidAppBuildCredentials: AndroidAppBuildCredentialsMutation; /** Mutations that modify the credentials for an Android app */ @@ -10111,6 +10221,10 @@ export type SentryProjectMutationDeleteSentryProjectArgs = { sentryProjectId: Scalars['ID']['input']; }; +/** + * Legacy remote config for SERVE_SIM sessions. Use WEB_PREVIEW_ONLY sessions and + * WebPreviewOnlyRunSessionRemoteConfig instead. + */ export type ServeSimRunSessionRemoteConfig = { __typename?: 'ServeSimRunSessionRemoteConfig'; previewUrl: Scalars['String']['output']; @@ -10201,6 +10315,10 @@ export enum StandardOffer { YearlySub = 'YEARLY_SUB' } +export type StartClaudeConnectionInput = { + accountId: Scalars['ID']['input']; +}; + export type StartPostHogConnectionResult = PostHogOrganizationConnection | PostHogPendingConnection; /** Incident for a given component from Expo status page API. */ @@ -10809,6 +10927,10 @@ export type UpdateDiffReceiptsArgs = { orderBy?: InputMaybe>; }; +export type UpdateAgentProviderConnectionInput = { + name?: InputMaybe; +}; + export type UpdateBranch = { __typename?: 'UpdateBranch'; app: App; @@ -12134,6 +12256,11 @@ export type WebNotificationUpdateReadStateInput = { isRead: Scalars['Boolean']['input']; }; +export type WebPreviewOnlyRunSessionRemoteConfig = { + __typename?: 'WebPreviewOnlyRunSessionRemoteConfig'; + webPreviewUrl: Scalars['String']['output']; +}; + export type Webhook = { __typename?: 'Webhook'; appId: Scalars['ID']['output']; @@ -13506,6 +13633,9 @@ export enum WorkflowRunTriggerEventType { EasSubmit = 'EAS_SUBMIT', ExpoLaunch = 'EXPO_LAUNCH', GithubPullRequestBaseRefChanged = 'GITHUB_PULL_REQUEST_BASE_REF_CHANGED', + GithubPullRequestCommentCreated = 'GITHUB_PULL_REQUEST_COMMENT_CREATED', + GithubPullRequestCommentDeleted = 'GITHUB_PULL_REQUEST_COMMENT_DELETED', + GithubPullRequestCommentEdited = 'GITHUB_PULL_REQUEST_COMMENT_EDITED', GithubPullRequestEdited = 'GITHUB_PULL_REQUEST_EDITED', GithubPullRequestLabeled = 'GITHUB_PULL_REQUEST_LABELED', GithubPullRequestOpened = 'GITHUB_PULL_REQUEST_OPENED', @@ -15131,6 +15261,7 @@ export type DeviceRunSessionByIdQuery = { __typename?: 'RootQuery', deviceRunSes | { __typename: 'AppiumRunSessionRemoteConfig', appiumUrl: string, capabilities: any, webPreviewUrl?: string | null } | { __typename: 'ArgentRunSessionRemoteConfig', toolsUrl: string, toolsAuthToken?: string | null, webPreviewUrl?: string | null } | { __typename: 'ServeSimRunSessionRemoteConfig', previewUrl: string } + | { __typename: 'WebPreviewOnlyRunSessionRemoteConfig', previewUrl: string } | null, turtleJobRun?: { __typename?: 'JobRun', id: string, status: JobRunStatus } | null } } }; export type DeviceRunSessionsByAppIdQueryVariables = Exact<{ diff --git a/packages/eas-cli/src/graphql/queries/DeviceRunSessionQuery.ts b/packages/eas-cli/src/graphql/queries/DeviceRunSessionQuery.ts index ab8c8c9382..ba971ff5ca 100644 --- a/packages/eas-cli/src/graphql/queries/DeviceRunSessionQuery.ts +++ b/packages/eas-cli/src/graphql/queries/DeviceRunSessionQuery.ts @@ -100,6 +100,9 @@ export const DeviceRunSessionQuery = { ... on ServeSimRunSessionRemoteConfig { previewUrl } + ... on WebPreviewOnlyRunSessionRemoteConfig { + previewUrl: webPreviewUrl + } } turtleJobRun { id diff --git a/packages/eas-cli/src/simulator/__tests__/utils.test.ts b/packages/eas-cli/src/simulator/__tests__/utils.test.ts index 14ed9c1e8a..3fb7a9f023 100644 --- a/packages/eas-cli/src/simulator/__tests__/utils.test.ts +++ b/packages/eas-cli/src/simulator/__tests__/utils.test.ts @@ -42,14 +42,20 @@ describe('Appium simulator configuration', () => { }); describe('simulator session type flags', () => { - it('maps web-preview-only to the ServeSim GraphQL enum', () => { + it('maps web-preview-only to the WebPreviewOnly GraphQL enum', () => { expect(DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE['web-preview-only']).toBe( - DeviceRunSessionType.ServeSim + DeviceRunSessionType.WebPreviewOnly ); expect(DEVICE_RUN_SESSION_TYPE_FLAG_VALUES[DeviceRunSessionType.ServeSim]).toBe( 'web-preview-only' ); + expect(DEVICE_RUN_SESSION_TYPE_FLAG_VALUES[DeviceRunSessionType.WebPreviewOnly]).toBe( + 'web-preview-only' + ); expect(deviceRunSessionTypeToFlagValue(DeviceRunSessionType.ServeSim)).toBe('web-preview-only'); + expect(deviceRunSessionTypeToFlagValue(DeviceRunSessionType.WebPreviewOnly)).toBe( + 'web-preview-only' + ); expect(DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE['serve-sim']).toBeUndefined(); expect(DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE['web-preview']).toBeUndefined(); }); diff --git a/packages/eas-cli/src/simulator/utils.ts b/packages/eas-cli/src/simulator/utils.ts index a60ba6b895..c9dde55aa5 100644 --- a/packages/eas-cli/src/simulator/utils.ts +++ b/packages/eas-cli/src/simulator/utils.ts @@ -29,6 +29,7 @@ export const DEVICE_RUN_SESSION_TYPE_FLAG_VALUES: Record