@crowdedkingdoms/crowdyjs 17.8.0-test.1 → 17.10.0-dev.1

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.
@@ -3619,6 +3619,103 @@ export type ExchangePortalCodeInput = {
3619
3619
  /** PKCE code verifier matching the challenge supplied when the code was created. Required when the code was created with a challenge. */
3620
3620
  codeVerifier?: InputMaybe<Scalars['String']['input']>;
3621
3621
  };
3622
+ /** Whether an app’s ck-exec code may run: its active version and its switches (dev-tier preview). */
3623
+ export type ExecAppStatus = {
3624
+ __typename?: 'ExecAppStatus';
3625
+ /** The active version; null before the first deploy. */
3626
+ activeVersion: Maybe<Scalars['Int']['output']>;
3627
+ /** Paused while the app is over its compute budget; it resumes by itself once a minute is back under it. */
3628
+ budgetPaused: Scalars['Boolean']['output'];
3629
+ /** The whole app is switched off (`execSetEnabled` without a node type). */
3630
+ disabled: Scalars['Boolean']['output'];
3631
+ /** Node types switched off one by one. */
3632
+ disabledTypes: Array<Scalars['String']['output']>;
3633
+ };
3634
+ /** One compiled module for a ck-exec deploy. */
3635
+ export type ExecArtifactInput = {
3636
+ /** SHA-256 of the WASM, 64 hex characters; the manager checks it. */
3637
+ digest: Scalars['String']['input'];
3638
+ /** The WASM module (wasm32-unknown-unknown, built with ckx-sdk), base64. */
3639
+ wasmBase64: Scalars['String']['input'];
3640
+ };
3641
+ /** Where and how a game client connects to ck-exec, the hub-and-spoke execution service (dev-tier preview). Open a WebSocket to `{gatewayUrl}/v1/connect?token={token}` before `expiresAt`. */
3642
+ export type ExecConnection = {
3643
+ __typename?: 'ExecConnection';
3644
+ /** When the token stops being accepted; the open socket is not closed then. */
3645
+ expiresAt: Scalars['DateTime']['output'];
3646
+ /** The execution host’s gateway, e.g. wss://ckx-or-1.exec.dev.crowdedkingdoms.com. */
3647
+ gatewayUrl: Scalars['String']['output'];
3648
+ /** The execution host id the token is bound to. */
3649
+ host: Scalars['String']['output'];
3650
+ /** Short-lived Ed25519 connect token for this player, this app and this host only. */
3651
+ token: Scalars['String']['output'];
3652
+ };
3653
+ /** A new version of an app’s ck-exec topology. */
3654
+ export type ExecDeployInput = {
3655
+ /** The app to deploy. */
3656
+ appId: Scalars['BigInt']['input'];
3657
+ /** Modules the manifest names that this app has not uploaded before (at most 64). A request body is limited to 10 MB, so about 7 MB of modules per call. */
3658
+ artifacts?: InputMaybe<Array<ExecArtifactInput>>;
3659
+ /** The manifest as JSON: `{ "root": "<hub type>", "types": { "<name>": { "kind": "hub"|"spoke", "parent", "digest", "client", "calls", "scopes", ... } } }`. Every field and its platform bounds: https://docs.dev.crowdedkingdoms.com/exec/intro#the-manifest. */
3660
+ manifestJson: Scalars['String']['input'];
3661
+ };
3662
+ /** The result of a ck-exec deploy. */
3663
+ export type ExecDeployResult = {
3664
+ __typename?: 'ExecDeployResult';
3665
+ /** The version now active for the app. */
3666
+ version: Scalars['Int']['output'];
3667
+ };
3668
+ /** An instance the execution manager has placed for an app (dev-tier preview). */
3669
+ export type ExecInstance = {
3670
+ __typename?: 'ExecInstance';
3671
+ /** Rises each time it is placed; snapshots from an older epoch are refused. */
3672
+ epoch: Scalars['Int']['output'];
3673
+ /** Why the manager will not place it right now (a crash loop, a failed start), when it will not. */
3674
+ heldBack: Maybe<Scalars['String']['output']>;
3675
+ /** The execution host it runs on; null while idle. */
3676
+ host: Maybe<Scalars['String']['output']>;
3677
+ /** The instance id. */
3678
+ instanceId: Scalars['String']['output'];
3679
+ /** The instance key; empty for the root hub. */
3680
+ key: Scalars['String']['output'];
3681
+ /** `hub` or `spoke`. */
3682
+ kind: Scalars['String']['output'];
3683
+ nodeType: Scalars['String']['output'];
3684
+ /** `idle`, `starting`, `running` or `stopping`. */
3685
+ phase: Scalars['String']['output'];
3686
+ /** Milliseconds since it entered this phase. */
3687
+ sinceMs: Scalars['Float']['output'];
3688
+ };
3689
+ /** One guest log line from an app’s ck-exec instances (`ctx.log`), kept for 24 hours (dev-tier preview). */
3690
+ export type ExecLogLine = {
3691
+ __typename?: 'ExecLogLine';
3692
+ /** When the instance logged it. */
3693
+ at: Scalars['DateTime']['output'];
3694
+ /** The execution host it ran on. */
3695
+ host: Scalars['String']['output'];
3696
+ /** The line’s id, time-ordered: pass the oldest one you have as `before` to page back. */
3697
+ id: Scalars['String']['output'];
3698
+ /** The instance key. */
3699
+ key: Scalars['String']['output'];
3700
+ /** 0 error, 1 warn, 2 info, 3 debug. */
3701
+ level: Scalars['Int']['output'];
3702
+ /** The node type that logged it; empty for a platform note (lines dropped over a rate). */
3703
+ nodeType: Scalars['String']['output'];
3704
+ /** The line, at most 1 KiB. */
3705
+ text: Scalars['String']['output'];
3706
+ };
3707
+ /** A deployed version of an app’s ck-exec topology. */
3708
+ export type ExecVersion = {
3709
+ __typename?: 'ExecVersion';
3710
+ /** Whether it is the active version. */
3711
+ active: Scalars['Boolean']['output'];
3712
+ createdAt: Scalars['DateTime']['output'];
3713
+ /** Who deployed it, e.g. `user:<id>`. */
3714
+ createdBy: Maybe<Scalars['String']['output']>;
3715
+ /** Node types in its manifest. */
3716
+ types: Scalars['Int']['output'];
3717
+ version: Scalars['Int']['output'];
3718
+ };
3622
3719
  /** An org's free shared app slot quota usage. */
3623
3720
  export type FreeAppQuota = {
3624
3721
  __typename?: 'FreeAppQuota';
@@ -5490,6 +5587,16 @@ export type Mutation = {
5490
5587
  disconnectUdpProxy: Scalars['Boolean']['output'];
5491
5588
  /** Exchange a one-time portal authorization code (with the matching PKCE verifier) for an app-scoped gameplay token. Public (the code + verifier authorize the call); called by the destination game at its own origin so the game never sees the player's session token. */
5492
5589
  exchangePortalCode: AppTokenResponse;
5590
+ /** Make an earlier ck-exec version active again, a rollback (dev-tier preview). Running instances pick it up when they next start, as after a deploy. Requires the org 'manage_compute' permission. */
5591
+ execActivateVersion: ExecAppStatus;
5592
+ /** Connect a player to ck-exec (dev-tier preview): the execution manager picks a host (the one running `nodeType`/`key` when given, placing it if needed) and this returns its gateway and a 60-second connect token bound to this player, this app and that host. Requires the app-scoped token of the app named. */
5593
+ execConnect: ExecConnection;
5594
+ /** Connect to an app's ck-exec code as one of its developers, for studio tools, manual runs and admin endpoints (dev-tier preview). The session's calls arrive as `Caller::Developer` with your user id and may reach any node type, not only `client` ones, but never the platform's `$` methods. Requires the org 'manage_compute' permission and your own session, not an app token. */
5595
+ execConnectAsDeveloper: ExecConnection;
5596
+ /** Deploy a new version of an app's ck-exec topology (dev-tier preview): the manifest and any modules it names that were not uploaded before. The execution manager checks the manifest's tree and bounds and each module's digest, stores them, and makes the version active; running instances pick it up when they next start. Requires the org 'manage_compute' permission. */
5597
+ execDeploy: ExecDeployResult;
5598
+ /** The kill switch for an app's ck-exec code, or one node type of it (dev-tier preview). Switched off, nothing of it is placed, what runs is persisted and stopped, and calls are refused with `Denied`; switched on, instances start as they are called. Requires the org 'manage_compute' permission. */
5599
+ execSetEnabled: ExecAppStatus;
5493
5600
  /** ADMIN/DESTRUCTIVE: revokes ALL of the target user’s sessions by deleting every game_token row, forcing re-authentication on every device. Returns true if at least one session was revoked. Requires a super-admin bearer game token (and the management API enabled). */
5494
5601
  forceLogoutUser: Scalars['Boolean']['output'];
5495
5602
  /** Operator only (is_operator). Deletes the stored deliverability rows for one address (email_status and email_events) and returns how many rows went. Exists so a verification run is not reading the previous run's events, and so an address suppressed by a bounce that has since been fixed can be given another chance. Returns 0 when there was nothing stored. */
@@ -6101,6 +6208,28 @@ export type MutationDeleteUserAppStateArgs = {
6101
6208
  export type MutationExchangePortalCodeArgs = {
6102
6209
  input: ExchangePortalCodeInput;
6103
6210
  };
6211
+ export type MutationExecActivateVersionArgs = {
6212
+ appId: Scalars['BigInt']['input'];
6213
+ version: Scalars['Int']['input'];
6214
+ };
6215
+ export type MutationExecConnectArgs = {
6216
+ appId: Scalars['BigInt']['input'];
6217
+ key?: InputMaybe<Scalars['String']['input']>;
6218
+ nodeType?: InputMaybe<Scalars['String']['input']>;
6219
+ };
6220
+ export type MutationExecConnectAsDeveloperArgs = {
6221
+ appId: Scalars['BigInt']['input'];
6222
+ key?: InputMaybe<Scalars['String']['input']>;
6223
+ nodeType?: InputMaybe<Scalars['String']['input']>;
6224
+ };
6225
+ export type MutationExecDeployArgs = {
6226
+ input: ExecDeployInput;
6227
+ };
6228
+ export type MutationExecSetEnabledArgs = {
6229
+ appId: Scalars['BigInt']['input'];
6230
+ enabled: Scalars['Boolean']['input'];
6231
+ nodeType?: InputMaybe<Scalars['String']['input']>;
6232
+ };
6104
6233
  export type MutationForceLogoutUserArgs = {
6105
6234
  userId: Scalars['BigInt']['input'];
6106
6235
  };
@@ -8077,6 +8206,14 @@ export type Query = {
8077
8206
  emailDeliverability: EmailDeliverability;
8078
8207
  /** Operator only (is_operator). How THIS API instance is configured to send mail: whether sending is on, the From address, the SES configuration set, the region and the suppressed domains. Answers 'why did no email arrive' without an SSH session, and reports the instance that served the query rather than the fleet. */
8079
8208
  emailDeliveryConfig: EmailDeliveryConfig;
8209
+ /** Whether an app's ck-exec code may run: its active version, kill switches and budget pause (dev-tier preview). Requires the org 'view_compute_diagnostics' permission. */
8210
+ execAppStatus: ExecAppStatus;
8211
+ /** What the execution manager has placed for an app: every instance, its phase and host (dev-tier preview). Requires the org 'view_compute_diagnostics' permission. */
8212
+ execInstances: Array<ExecInstance>;
8213
+ /** Guest log lines from an app's ck-exec instances (`ctx.log`), newest first, kept for 24 hours (dev-tier preview). Requires the org 'view_compute_diagnostics' permission. */
8214
+ execLogs: Array<ExecLogLine>;
8215
+ /** An app's deployed ck-exec versions, newest first, and which is active (dev-tier preview). Requires the org 'view_compute_diagnostics' permission. */
8216
+ execVersions: Array<ExecVersion>;
8080
8217
  /** Reports whether a free-play window is active now, a human-readable schedule description, and the ISO-8601 start of the next window. PUBLIC: no authentication required. Takes no arguments; computed from server config and the current clock. */
8081
8218
  freePlayWindowInfo: FreePlayWindowInfo;
8082
8219
  /** Single startup payload for browser game clients: the authenticated user, server/min-client version requirements, current UDP proxy status, realtime protocol details (subprotocol + subscription name), and the spatial send limits/constants (maxReplicationDistance, maxDecayRate, sequenceNumberModulo). Requires a bearer game token. Read-only: does not open a UDP proxy session. Call this once after login to initialize a play session. */
@@ -8651,6 +8788,23 @@ export type QueryEmailDeliverabilityArgs = {
8651
8788
  email: Scalars['String']['input'];
8652
8789
  eventLimit?: InputMaybe<Scalars['Int']['input']>;
8653
8790
  };
8791
+ export type QueryExecAppStatusArgs = {
8792
+ appId: Scalars['BigInt']['input'];
8793
+ };
8794
+ export type QueryExecInstancesArgs = {
8795
+ appId: Scalars['BigInt']['input'];
8796
+ };
8797
+ export type QueryExecLogsArgs = {
8798
+ appId: Scalars['BigInt']['input'];
8799
+ before?: InputMaybe<Scalars['String']['input']>;
8800
+ key?: InputMaybe<Scalars['String']['input']>;
8801
+ limit?: InputMaybe<Scalars['Int']['input']>;
8802
+ maxLevel?: InputMaybe<Scalars['Int']['input']>;
8803
+ nodeType?: InputMaybe<Scalars['String']['input']>;
8804
+ };
8805
+ export type QueryExecVersionsArgs = {
8806
+ appId: Scalars['BigInt']['input'];
8807
+ };
8654
8808
  export type QueryGameClientBootstrapArgs = {
8655
8809
  appId: Scalars['BigInt']['input'];
8656
8810
  };
@@ -13904,6 +14058,148 @@ export type CrowdyStudioProjectImportFileMutation = {
13904
14058
  }>;
13905
14059
  };
13906
14060
  };
14061
+ export type ExecConnectMutationVariables = Exact<{
14062
+ appId: Scalars['BigInt']['input'];
14063
+ nodeType?: InputMaybe<Scalars['String']['input']>;
14064
+ key?: InputMaybe<Scalars['String']['input']>;
14065
+ }>;
14066
+ export type ExecConnectMutation = {
14067
+ __typename?: 'Mutation';
14068
+ execConnect: {
14069
+ __typename?: 'ExecConnection';
14070
+ gatewayUrl: string;
14071
+ token: string;
14072
+ host: string;
14073
+ expiresAt: string;
14074
+ };
14075
+ };
14076
+ export type ExecDeployMutationVariables = Exact<{
14077
+ input: ExecDeployInput;
14078
+ }>;
14079
+ export type ExecDeployMutation = {
14080
+ __typename?: 'Mutation';
14081
+ execDeploy: {
14082
+ __typename?: 'ExecDeployResult';
14083
+ version: number;
14084
+ };
14085
+ };
14086
+ export type ExecConnectAsDeveloperMutationVariables = Exact<{
14087
+ appId: Scalars['BigInt']['input'];
14088
+ nodeType?: InputMaybe<Scalars['String']['input']>;
14089
+ key?: InputMaybe<Scalars['String']['input']>;
14090
+ }>;
14091
+ export type ExecConnectAsDeveloperMutation = {
14092
+ __typename?: 'Mutation';
14093
+ execConnectAsDeveloper: {
14094
+ __typename?: 'ExecConnection';
14095
+ gatewayUrl: string;
14096
+ token: string;
14097
+ host: string;
14098
+ expiresAt: string;
14099
+ };
14100
+ };
14101
+ export type ExecLogsQueryVariables = Exact<{
14102
+ appId: Scalars['BigInt']['input'];
14103
+ nodeType?: InputMaybe<Scalars['String']['input']>;
14104
+ key?: InputMaybe<Scalars['String']['input']>;
14105
+ maxLevel?: InputMaybe<Scalars['Int']['input']>;
14106
+ before?: InputMaybe<Scalars['String']['input']>;
14107
+ limit?: InputMaybe<Scalars['Int']['input']>;
14108
+ }>;
14109
+ export type ExecLogsQuery = {
14110
+ __typename?: 'Query';
14111
+ execLogs: Array<{
14112
+ __typename?: 'ExecLogLine';
14113
+ id: string;
14114
+ nodeType: string;
14115
+ key: string;
14116
+ level: number;
14117
+ host: string;
14118
+ at: string;
14119
+ text: string;
14120
+ }>;
14121
+ };
14122
+ export type ExecInstancesQueryVariables = Exact<{
14123
+ appId: Scalars['BigInt']['input'];
14124
+ }>;
14125
+ export type ExecInstancesQuery = {
14126
+ __typename?: 'Query';
14127
+ execInstances: Array<{
14128
+ __typename?: 'ExecInstance';
14129
+ instanceId: string;
14130
+ nodeType: string;
14131
+ key: string;
14132
+ kind: string;
14133
+ phase: string;
14134
+ host: string | null;
14135
+ epoch: number;
14136
+ sinceMs: number;
14137
+ heldBack: string | null;
14138
+ }>;
14139
+ };
14140
+ export type ExecVersionsQueryVariables = Exact<{
14141
+ appId: Scalars['BigInt']['input'];
14142
+ }>;
14143
+ export type ExecVersionsQuery = {
14144
+ __typename?: 'Query';
14145
+ execVersions: Array<{
14146
+ __typename?: 'ExecVersion';
14147
+ version: number;
14148
+ createdBy: string | null;
14149
+ createdAt: string;
14150
+ types: number;
14151
+ active: boolean;
14152
+ }>;
14153
+ };
14154
+ export type ExecAppStatusFieldsFragment = {
14155
+ __typename?: 'ExecAppStatus';
14156
+ activeVersion: number | null;
14157
+ disabled: boolean;
14158
+ disabledTypes: Array<string>;
14159
+ budgetPaused: boolean;
14160
+ };
14161
+ export type ExecAppStatusQueryVariables = Exact<{
14162
+ appId: Scalars['BigInt']['input'];
14163
+ }>;
14164
+ export type ExecAppStatusQuery = {
14165
+ __typename?: 'Query';
14166
+ execAppStatus: {
14167
+ __typename?: 'ExecAppStatus';
14168
+ activeVersion: number | null;
14169
+ disabled: boolean;
14170
+ disabledTypes: Array<string>;
14171
+ budgetPaused: boolean;
14172
+ };
14173
+ };
14174
+ export type ExecActivateVersionMutationVariables = Exact<{
14175
+ appId: Scalars['BigInt']['input'];
14176
+ version: Scalars['Int']['input'];
14177
+ }>;
14178
+ export type ExecActivateVersionMutation = {
14179
+ __typename?: 'Mutation';
14180
+ execActivateVersion: {
14181
+ __typename?: 'ExecAppStatus';
14182
+ activeVersion: number | null;
14183
+ disabled: boolean;
14184
+ disabledTypes: Array<string>;
14185
+ budgetPaused: boolean;
14186
+ };
14187
+ };
14188
+ export type ExecSetEnabledMutationVariables = Exact<{
14189
+ appId: Scalars['BigInt']['input'];
14190
+ enabled: Scalars['Boolean']['input'];
14191
+ nodeType?: InputMaybe<Scalars['String']['input']>;
14192
+ }>;
14193
+ export type ExecSetEnabledMutation = {
14194
+ __typename?: 'Mutation';
14195
+ execSetEnabled: {
14196
+ __typename?: 'ExecAppStatus';
14197
+ activeVersion: number | null;
14198
+ disabled: boolean;
14199
+ disabledTypes: Array<string>;
14200
+ budgetPaused: boolean;
14201
+ };
14202
+ };
13907
14203
  export type GridOwnershipFieldsFragment = {
13908
14204
  __typename?: 'GridOwnership';
13909
14205
  gridOwnershipId: string;
@@ -20060,6 +20356,7 @@ export declare const ComputeTriggerFieldsFragmentDoc: DocumentNode<ComputeTrigge
20060
20356
  export declare const ComputePolicyFieldsFragmentDoc: DocumentNode<ComputePolicyFieldsFragment, unknown>;
20061
20357
  export declare const ComputeRunFieldsFragmentDoc: DocumentNode<ComputeRunFieldsFragment, unknown>;
20062
20358
  export declare const CrowdyStudioProjectFieldsFragmentDoc: DocumentNode<CrowdyStudioProjectFieldsFragment, unknown>;
20359
+ export declare const ExecAppStatusFieldsFragmentDoc: DocumentNode<ExecAppStatusFieldsFragment, unknown>;
20063
20360
  export declare const GridOwnershipFieldsFragmentDoc: DocumentNode<GridOwnershipFieldsFragment, unknown>;
20064
20361
  export declare const GmAutomationFieldsFragmentDoc: DocumentNode<GmAutomationFieldsFragment, unknown>;
20065
20362
  export declare const GmAutomationTriggerFieldsFragmentDoc: DocumentNode<GmAutomationTriggerFieldsFragment, unknown>;
@@ -20201,6 +20498,15 @@ export declare const CrowdyStudioLibraryFilesDocument: DocumentNode<CrowdyStudio
20201
20498
  export declare const CrowdyStudioLibrarySaveDocument: DocumentNode<CrowdyStudioLibrarySaveMutation, CrowdyStudioLibrarySaveMutationVariables>;
20202
20499
  export declare const CrowdyStudioCommonFilesDocument: DocumentNode<CrowdyStudioCommonFilesQuery, CrowdyStudioCommonFilesQueryVariables>;
20203
20500
  export declare const CrowdyStudioProjectImportFileDocument: DocumentNode<CrowdyStudioProjectImportFileMutation, CrowdyStudioProjectImportFileMutationVariables>;
20501
+ export declare const ExecConnectDocument: DocumentNode<ExecConnectMutation, ExecConnectMutationVariables>;
20502
+ export declare const ExecDeployDocument: DocumentNode<ExecDeployMutation, ExecDeployMutationVariables>;
20503
+ export declare const ExecConnectAsDeveloperDocument: DocumentNode<ExecConnectAsDeveloperMutation, ExecConnectAsDeveloperMutationVariables>;
20504
+ export declare const ExecLogsDocument: DocumentNode<ExecLogsQuery, ExecLogsQueryVariables>;
20505
+ export declare const ExecInstancesDocument: DocumentNode<ExecInstancesQuery, ExecInstancesQueryVariables>;
20506
+ export declare const ExecVersionsDocument: DocumentNode<ExecVersionsQuery, ExecVersionsQueryVariables>;
20507
+ export declare const ExecAppStatusDocument: DocumentNode<ExecAppStatusQuery, ExecAppStatusQueryVariables>;
20508
+ export declare const ExecActivateVersionDocument: DocumentNode<ExecActivateVersionMutation, ExecActivateVersionMutationVariables>;
20509
+ export declare const ExecSetEnabledDocument: DocumentNode<ExecSetEnabledMutation, ExecSetEnabledMutationVariables>;
20204
20510
  export declare const GridOwnershipDocument: DocumentNode<GridOwnershipQuery, GridOwnershipQueryVariables>;
20205
20511
  export declare const AssignGridOwnershipDocument: DocumentNode<AssignGridOwnershipMutation, AssignGridOwnershipMutationVariables>;
20206
20512
  export declare const TransferGridOwnershipDocument: DocumentNode<TransferGridOwnershipMutation, TransferGridOwnershipMutationVariables>;