@crowdedkingdoms/crowdyjs 15.12.1 → 16.0.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.
Files changed (119) hide show
  1. package/MIGRATION.md +55 -0
  2. package/README.md +67 -41
  3. package/dist/client.d.ts +1 -0
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +3 -0
  6. package/dist/crowdy-client.d.ts +2 -3
  7. package/dist/crowdy-client.d.ts.map +1 -1
  8. package/dist/crowdy-client.js +9 -11
  9. package/dist/crowdy-dsh/bridge.d.ts +156 -0
  10. package/dist/crowdy-dsh/bridge.d.ts.map +1 -0
  11. package/dist/crowdy-dsh/bridge.js +523 -0
  12. package/dist/crowdy-dsh/index.d.ts +11 -0
  13. package/dist/crowdy-dsh/index.d.ts.map +1 -0
  14. package/dist/crowdy-dsh/index.js +10 -0
  15. package/dist/crowdy-dsh/pane.d.ts +64 -0
  16. package/dist/crowdy-dsh/pane.d.ts.map +1 -0
  17. package/dist/crowdy-dsh/pane.js +247 -0
  18. package/dist/crowdy-dsh/protocol.d.ts +249 -0
  19. package/dist/crowdy-dsh/protocol.d.ts.map +1 -0
  20. package/dist/crowdy-dsh/protocol.js +39 -0
  21. package/dist/crowdy-dsh/transport.d.ts +66 -0
  22. package/dist/crowdy-dsh/transport.d.ts.map +1 -0
  23. package/dist/crowdy-dsh/transport.js +88 -0
  24. package/dist/crowdy-studio/controller.d.ts +8 -0
  25. package/dist/crowdy-studio/controller.d.ts.map +1 -1
  26. package/dist/crowdy-studio/controller.js +33 -1
  27. package/dist/crowdy-studio/dom-shell.d.ts +21 -4
  28. package/dist/crowdy-studio/dom-shell.d.ts.map +1 -1
  29. package/dist/crowdy-studio/dom-shell.js +32 -17
  30. package/dist/crowdy-studio/embed/index.d.ts +1 -1
  31. package/dist/crowdy-studio/embed/index.d.ts.map +1 -1
  32. package/dist/crowdy-studio/embed/panel.d.ts +18 -18
  33. package/dist/crowdy-studio/embed/panel.d.ts.map +1 -1
  34. package/dist/crowdy-studio/embed/panel.js +7 -21
  35. package/dist/crowdy-studio/index.d.ts +2 -3
  36. package/dist/crowdy-studio/index.d.ts.map +1 -1
  37. package/dist/crowdy-studio/index.js +1 -2
  38. package/dist/crowdy-studio/mount.d.ts +29 -14
  39. package/dist/crowdy-studio/mount.d.ts.map +1 -1
  40. package/dist/crowdy-studio/mount.js +39 -126
  41. package/dist/crowdy-studio/styles.d.ts +1 -1
  42. package/dist/crowdy-studio/styles.d.ts.map +1 -1
  43. package/dist/crowdy-studio/styles.js +5 -0
  44. package/dist/default-origin.d.ts +6 -6
  45. package/dist/default-origin.d.ts.map +1 -1
  46. package/dist/default-origin.js +6 -6
  47. package/dist/generated/graphql.d.ts +76 -2438
  48. package/dist/generated/graphql.d.ts.map +1 -1
  49. package/dist/generated/graphql.js +0 -50
  50. package/dist/index.d.ts +1 -1
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +1 -1
  53. package/dist/kit/npcs.d.ts.map +1 -1
  54. package/dist/kit/social.d.ts.map +1 -1
  55. package/dist/{crowdy-agent/errors.d.ts → player-host/agent-errors.d.ts} +1 -1
  56. package/dist/player-host/agent-errors.d.ts.map +1 -0
  57. package/dist/player-host/agent-types.d.ts +18 -0
  58. package/dist/player-host/agent-types.d.ts.map +1 -0
  59. package/dist/player-host/agent-types.js +7 -0
  60. package/dist/player-host/index.d.ts +12 -4
  61. package/dist/player-host/index.d.ts.map +1 -1
  62. package/dist/player-host/index.js +11 -4
  63. package/dist/{crowdy-agent/schema.d.ts → player-host/json-schema.d.ts} +1 -1
  64. package/dist/player-host/json-schema.d.ts.map +1 -0
  65. package/dist/{crowdy-agent/schema.js → player-host/json-schema.js} +1 -1
  66. package/dist/player-host/schemas.d.ts +1 -1
  67. package/dist/player-host/schemas.d.ts.map +1 -1
  68. package/dist/player-host/schemas.js +2 -2
  69. package/dist/player-host/types.d.ts +2 -2
  70. package/dist/player-host/types.d.ts.map +1 -1
  71. package/package.json +5 -7
  72. package/dist/crowdy-agent/browser-dispatcher.d.ts +0 -41
  73. package/dist/crowdy-agent/browser-dispatcher.d.ts.map +0 -1
  74. package/dist/crowdy-agent/browser-dispatcher.js +0 -264
  75. package/dist/crowdy-agent/controller.d.ts +0 -152
  76. package/dist/crowdy-agent/controller.d.ts.map +0 -1
  77. package/dist/crowdy-agent/controller.js +0 -1289
  78. package/dist/crowdy-agent/errors.d.ts.map +0 -1
  79. package/dist/crowdy-agent/graphql-transport.d.ts +0 -154
  80. package/dist/crowdy-agent/graphql-transport.d.ts.map +0 -1
  81. package/dist/crowdy-agent/graphql-transport.js +0 -854
  82. package/dist/crowdy-agent/index.d.ts +0 -17
  83. package/dist/crowdy-agent/index.d.ts.map +0 -1
  84. package/dist/crowdy-agent/index.js +0 -16
  85. package/dist/crowdy-agent/registry.d.ts +0 -29
  86. package/dist/crowdy-agent/registry.d.ts.map +0 -1
  87. package/dist/crowdy-agent/registry.js +0 -281
  88. package/dist/crowdy-agent/schema.d.ts.map +0 -1
  89. package/dist/crowdy-agent/session-resume.d.ts +0 -24
  90. package/dist/crowdy-agent/session-resume.d.ts.map +0 -1
  91. package/dist/crowdy-agent/session-resume.js +0 -76
  92. package/dist/crowdy-agent/studio-tools.d.ts +0 -15
  93. package/dist/crowdy-agent/studio-tools.d.ts.map +0 -1
  94. package/dist/crowdy-agent/studio-tools.js +0 -280
  95. package/dist/crowdy-agent/tool-descriptors.d.ts +0 -4
  96. package/dist/crowdy-agent/tool-descriptors.d.ts.map +0 -1
  97. package/dist/crowdy-agent/tool-descriptors.js +0 -1049
  98. package/dist/crowdy-agent/transport.d.ts +0 -152
  99. package/dist/crowdy-agent/transport.d.ts.map +0 -1
  100. package/dist/crowdy-agent/transport.js +0 -27
  101. package/dist/crowdy-agent/types.d.ts +0 -328
  102. package/dist/crowdy-agent/types.d.ts.map +0 -1
  103. package/dist/crowdy-agent/types.js +0 -37
  104. package/dist/crowdy-studio/agent-dom-shell.d.ts +0 -68
  105. package/dist/crowdy-studio/agent-dom-shell.d.ts.map +0 -1
  106. package/dist/crowdy-studio/agent-dom-shell.js +0 -418
  107. package/dist/player-host/control-banner.d.ts +0 -40
  108. package/dist/player-host/control-banner.d.ts.map +0 -1
  109. package/dist/player-host/control-banner.js +0 -252
  110. package/dist/player-host/control-gate.d.ts +0 -77
  111. package/dist/player-host/control-gate.d.ts.map +0 -1
  112. package/dist/player-host/control-gate.js +0 -197
  113. package/dist/player-host/lease-manager.d.ts +0 -66
  114. package/dist/player-host/lease-manager.d.ts.map +0 -1
  115. package/dist/player-host/lease-manager.js +0 -428
  116. package/dist/player-host/tools.d.ts +0 -13
  117. package/dist/player-host/tools.d.ts.map +0 -1
  118. package/dist/player-host/tools.js +0 -79
  119. /package/dist/{crowdy-agent/errors.js → player-host/agent-errors.js} +0 -0
@@ -53,17 +53,6 @@ export type Scalars = {
53
53
  output: string;
54
54
  };
55
55
  };
56
- /** Monotonically acknowledge the highest contiguous applied event. */
57
- export type AcknowledgeAgentEventsInput = {
58
- /** Current attached client epoch. */
59
- clientEpoch: Scalars['BigInt']['input'];
60
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
61
- idempotencyKey: Scalars['String']['input'];
62
- /** Owner/app session UUID. */
63
- sessionId: Scalars['String']['input'];
64
- /** Highest contiguous applied sequence. It cannot move backward or exceed committed history. */
65
- throughSeq: Scalars['BigInt']['input'];
66
- };
67
56
  export type Actor = {
68
57
  __typename?: 'Actor';
69
58
  /** App (game) this actor belongs to. BigInt serialized as a decimal string. */
@@ -387,16 +376,6 @@ export type AgentCheckpointFile = {
387
376
  /** SERVER or CLIENT target. */
388
377
  target: Scalars['String']['output'];
389
378
  };
390
- /** Result of attaching a fresh interactive client epoch. */
391
- export type AgentClientAttachment = {
392
- __typename?: 'AgentClientAttachment';
393
- /** New server-issued monotonic client epoch. */
394
- clientEpoch: Scalars['BigInt']['output'];
395
- /** Persisted contiguous cursor for this client instance; subscribe after this sequence. */
396
- replayAfterSeq: Scalars['BigInt']['output'];
397
- /** Session after fencing older epochs. */
398
- session: AgentSession;
399
- };
400
379
  /** Stable safe error envelope carried inside tool/run events. Branch on code, never message. */
401
380
  export type AgentError = {
402
381
  __typename?: 'AgentError';
@@ -413,12 +392,6 @@ export type AgentError = {
413
392
  /** Whether policy permits a deliberate retry. */
414
393
  retryable: Scalars['Boolean']['output'];
415
394
  };
416
- /** Monotonic event acknowledgement result. */
417
- export type AgentEventAcknowledgement = {
418
- __typename?: 'AgentEventAcknowledgement';
419
- /** Highest persisted contiguous acknowledged sequence. */
420
- throughSeq: Scalars['BigInt']['output'];
421
- };
422
395
  /** Common identity/order fields on every typed durable agent event variant. */
423
396
  export type AgentEventBase = {
424
397
  /** Commit timestamp. */
@@ -438,18 +411,6 @@ export type AgentEventBase = {
438
411
  /** Versioned event payload contract. */
439
412
  version: Scalars['String']['output'];
440
413
  };
441
- /** Bounded ordered history connection, exclusive of the supplied afterSeq. */
442
- export type AgentEventConnection = {
443
- __typename?: 'AgentEventConnection';
444
- /** Events in ascending contiguous sequence order. */
445
- edges: Array<AgentEventEdge>;
446
- /** SDK-compatible ordered typed events. */
447
- events: Array<CrowdyStudioAgentEvent>;
448
- /** SDK-compatible history continuation indicator. */
449
- hasMore: Scalars['Boolean']['output'];
450
- /** History page metadata. */
451
- pageInfo: AgentPageInfo;
452
- };
453
414
  /** One ordered event connection edge. */
454
415
  export type AgentEventEdge = {
455
416
  __typename?: 'AgentEventEdge';
@@ -458,25 +419,6 @@ export type AgentEventEdge = {
458
419
  /** Typed durable event node. */
459
420
  node: CrowdyStudioAgentEvent;
460
421
  };
461
- /** Server acknowledgement of the 2-second client heartbeat and 5-second Play freshness window. */
462
- export type AgentHeartbeat = {
463
- __typename?: 'AgentHeartbeat';
464
- /** Play lease remains server-fresh through this instant, bounded by its hard expiry; null without an active Play lease. */
465
- playLeaseFreshUntil: Maybe<Scalars['DateTime']['output']>;
466
- /** Authoritative server receipt time. */
467
- serverTime: Scalars['DateTime']['output'];
468
- /** Renewed 30-second workspace lease expiry; null when no unchanged connected workspace lease can be renewed. */
469
- workspaceLeaseExpiresAt: Maybe<Scalars['DateTime']['output']>;
470
- };
471
- /** Two-second attached-client heartbeat that rechecks policy/permission/context, refreshes five-second Play freshness, and renews an unchanged workspace lease to 30 seconds. */
472
- export type AgentHeartbeatInput = {
473
- /** Exact current attached client epoch. */
474
- clientEpoch: Scalars['BigInt']['input'];
475
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
476
- idempotencyKey: Scalars['String']['input'];
477
- /** Owner/app session UUID. */
478
- sessionId: Scalars['String']['input'];
479
- };
480
422
  /** Short-lived context-bound capability. The model cannot create, widen, or renew it. */
481
423
  export type AgentLease = {
482
424
  __typename?: 'AgentLease';
@@ -745,29 +687,6 @@ export type AgentSession = {
745
687
  /** Latest durable session update. */
746
688
  updatedAt: Scalars['DateTime']['output'];
747
689
  };
748
- /** Bounded owner/app session connection. */
749
- export type AgentSessionConnection = {
750
- __typename?: 'AgentSessionConnection';
751
- /** Sessions ordered newest first. */
752
- edges: Array<AgentSessionEdge>;
753
- /** SDK-compatible final opaque cursor. */
754
- endCursor: Maybe<Scalars['String']['output']>;
755
- /** SDK-compatible next-page indicator. */
756
- hasNextPage: Scalars['Boolean']['output'];
757
- /** SDK-compatible session nodes in newest-first order. */
758
- nodes: Array<AgentSession>;
759
- /** Connection page metadata. */
760
- pageInfo: AgentPageInfo;
761
- };
762
- /** Common human session-control shape for pause, resume, and close. */
763
- export type AgentSessionControlInput = {
764
- /** Current attached client epoch. */
765
- clientEpoch: Scalars['BigInt']['input'];
766
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
767
- idempotencyKey: Scalars['String']['input'];
768
- /** Owner/app session UUID. */
769
- sessionId: Scalars['String']['input'];
770
- };
771
690
  /** One session connection edge. */
772
691
  export type AgentSessionEdge = {
773
692
  __typename?: 'AgentSessionEdge';
@@ -776,22 +695,6 @@ export type AgentSessionEdge = {
776
695
  /** Owner/app-scoped session node. */
777
696
  node: AgentSession;
778
697
  };
779
- /** Typed browser tool-call terminal record returned after submit. */
780
- export type AgentToolCall = {
781
- __typename?: 'AgentToolCall';
782
- /** True when the idempotent terminal result was accepted. */
783
- accepted: Scalars['Boolean']['output'];
784
- /** Canonical argument hash. */
785
- argumentHash: Scalars['String']['output'];
786
- /** Safe terminal error, or null. */
787
- error: Maybe<AgentError>;
788
- /** Durable terminal/current status. */
789
- status: CrowdyStudioAgentToolCallStatus;
790
- /** Stable tool call UUID. */
791
- toolCallId: Scalars['String']['output'];
792
- /** Logical descriptor name. */
793
- toolName: Scalars['String']['output'];
794
- };
795
698
  /** One effective immutable tool descriptor. Schemas are JSON Schema 2020-12 objects serialized as canonical JSON. */
796
699
  export type AgentToolDescriptor = {
797
700
  __typename?: 'AgentToolDescriptor';
@@ -848,14 +751,6 @@ export type AgentToolDescriptor = {
848
751
  /** Provider-safe exact wire name including major version. */
849
752
  wireName: Scalars['String']['output'];
850
753
  };
851
- /** Effective mode/policy-filtered descriptor registry. */
852
- export type AgentToolDescriptorSet = {
853
- __typename?: 'AgentToolDescriptorSet';
854
- /** Digest pinned by the current session. */
855
- registryDigest: Scalars['String']['output'];
856
- /** Only tools implemented and currently allowed for this session; omitted contract tools are not executable. */
857
- tools: Array<AgentToolDescriptor>;
858
- };
859
754
  /** Typed tool event. JSON fields are descriptor-versioned and validated against the descriptor returned by crowdyStudioAgentToolDescriptors; they are never arbitrary executor input. */
860
755
  export type AgentToolEvent = AgentEventBase & {
861
756
  __typename?: 'AgentToolEvent';
@@ -968,40 +863,6 @@ export type AgentToolResultEnvelope = {
968
863
  /** Matching tool call UUID. */
969
864
  toolCallId: Scalars['String']['output'];
970
865
  };
971
- /** Complete crowdy.tool-result/1 browser result envelope. */
972
- export type AgentToolResultEnvelopeInput = {
973
- /** Stable AGENT_* error code for non-success; omit for SUCCEEDED. */
974
- errorCode?: InputMaybe<Scalars['String']['input']>;
975
- /** Safe bounded error message for non-success; no stack, source, prompt, headers, or tokens. */
976
- errorMessage?: InputMaybe<Scalars['String']['input']>;
977
- /** Whether policy permits deliberate retry; defaults false. */
978
- errorRetryable?: InputMaybe<Scalars['Boolean']['input']>;
979
- /** Browser execution finish timestamp. */
980
- finishedAt: Scalars['DateTime']['input'];
981
- /** Exact authoritative context version observed by the host. */
982
- observedContextVersion: Scalars['String']['input'];
983
- /** Output JSON object required for SUCCEEDED and validated against the pinned descriptor; omit for failures. Maximum 128 KiB. */
984
- outputJson?: InputMaybe<Scalars['String']['input']>;
985
- /** Result protocol version; must be 'crowdy.tool-result/1'. */
986
- protocolVersion: Scalars['String']['input'];
987
- /** Browser execution start timestamp. */
988
- startedAt: Scalars['DateTime']['input'];
989
- /** Known terminal executor outcome. */
990
- status: CrowdyStudioAgentToolResultStatus;
991
- /** Dispatched tool call UUID. */
992
- toolCallId: Scalars['String']['input'];
993
- };
994
- /** Submit one idempotent terminal browser result for the matching owner/session epoch. */
995
- export type AgentToolResultInput = {
996
- /** Current attached client epoch. */
997
- clientEpoch: Scalars['BigInt']['input'];
998
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
999
- idempotencyKey: Scalars['String']['input'];
1000
- /** Complete descriptor-validated crowdy.tool-result/1 result envelope. */
1001
- result: AgentToolResultEnvelopeInput;
1002
- /** Owner/app session UUID. */
1003
- sessionId: Scalars['String']['input'];
1004
- };
1005
866
  /** The interval a free allowance resets on and a dimension is rounded over. Every dimension is billed as its period aggregate crosses each whole cent, within about a minute of the usage arriving; the development quota is MONTH. */
1006
867
  export declare enum AllowancePeriod {
1007
868
  Day = "DAY",
@@ -1517,19 +1378,6 @@ export type AssignGroupToGridInput = {
1517
1378
  /** Runtime permission key strings to grant to the group/role. Each must be a known key in runtime_permissions, unique, and at most 64 chars. */
1518
1379
  permissionKeys: Array<Scalars['String']['input']>;
1519
1380
  };
1520
- /** Attach one interactive browser and optional selected project/grid, atomically repinning policy/registry/context while fencing old tabs, leases, approvals, and browser dispatches. */
1521
- export type AttachAgentClientInput = {
1522
- /** Optional stable browser instance UUID. Omit to use the single-interactive-client session cursor. */
1523
- clientInstanceId?: InputMaybe<Scalars['String']['input']>;
1524
- /** Optional authoritative grid context selected by the attaching Studio. Omit to retain the current grid. */
1525
- gridId?: InputMaybe<Scalars['BigInt']['input']>;
1526
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
1527
- idempotencyKey: Scalars['String']['input'];
1528
- /** Optional owner project UUID selected by the attaching Studio. Omit to retain the current selection; null explicitly clears it outside BUILD. */
1529
- projectId?: InputMaybe<Scalars['String']['input']>;
1530
- /** Owner/app session UUID. */
1531
- sessionId: Scalars['String']['input'];
1532
- };
1533
1381
  /** Whether the account has a password set. Does not reveal whether the email is registered. */
1534
1382
  export type AuthMethodResult = {
1535
1383
  __typename?: 'AuthMethodResult';
@@ -1628,17 +1476,6 @@ export type BuddyLiveRates = {
1628
1476
  /** Timestamp of the heartbeat these rates came from. */
1629
1477
  updatedAt: Scalars['DateTime']['output'];
1630
1478
  };
1631
- /** Immediately request cancellation of one active session run. */
1632
- export type CancelAgentRunInput = {
1633
- /** Current attached client epoch. */
1634
- clientEpoch: Scalars['BigInt']['input'];
1635
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
1636
- idempotencyKey: Scalars['String']['input'];
1637
- /** Active run UUID to cancel; omit to cancel the session currentRun. */
1638
- runId?: InputMaybe<Scalars['String']['input']>;
1639
- /** Owner/app session UUID. */
1640
- sessionId: Scalars['String']['input'];
1641
- };
1642
1479
  /** Input for publishing a message to a channel. Delivered to every active member of the channel (regardless of location), not chunk-routed. The sender must have the channel send_messages permission. */
1643
1480
  export type ChannelMessageInput = {
1644
1481
  /** The channel id (groups.group_id) to publish to. */
@@ -2199,23 +2036,6 @@ export type CreateActorInput = {
2199
2036
  /** Actor id: exactly 32 ASCII characters (the UDP-wire actor id), NOT a hyphenated RFC-4122 UUID. Required and must be unique. */
2200
2037
  uuid: Scalars['String']['input'];
2201
2038
  };
2202
- /** Create an owner/app-scoped session with pinned human mode, project/grid context, model, policy, registry, and provider disclosure choice. */
2203
- export type CreateAgentSessionInput = {
2204
- /** App tenant; the bearer credential must be an unexpired app token for this exact app and the caller must hold use_studio_agent. */
2205
- appId: Scalars['BigInt']['input'];
2206
- /** Optional selected grid context; selection grants no authority. */
2207
- gridId?: InputMaybe<Scalars['BigInt']['input']>;
2208
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
2209
- idempotencyKey: Scalars['String']['input'];
2210
- /** Human-selected initial ASK, BUILD, or PLAY mode. */
2211
- mode: CrowdyStudioAgentMode;
2212
- /** Optional private owner project UUID. Required for BUILD; cross-owner/app ids return the same not-found shape. */
2213
- projectId?: InputMaybe<Scalars['String']['input']>;
2214
- /** Optional explicit first-use consent for selected private project source. Omit/false for message-only or metadata-only sessions. */
2215
- providerDataConsent?: InputMaybe<Scalars['Boolean']['input']>;
2216
- /** Optional requested allowlisted model. Omit for the platform default. */
2217
- requestedModel?: InputMaybe<Scalars['String']['input']>;
2218
- };
2219
2039
  /** Input payload for creating a new app. */
2220
2040
  export type CreateAppInput = {
2221
2041
  /** Datacenter the app will live in, e.g. 'or' or 'va'. Query placeableDatacenters for the accepted codes and whether each can currently hold an app. REQUIRED and permanent: an app is distributed on app_id, so all of its data lives on one node in one datacenter and that is fixed when the id is minted. Creation FAILS if the datacenter is unknown to this deployment or holds no capacity, rather than creating an app that cannot be routed. There is no default — the instance answering this call may be in a different datacenter from the one you want. Moving an app afterwards is an operator action. */
@@ -2616,18 +2436,27 @@ export declare enum CrowdyStudioAgentEventType {
2616
2436
  /** Redacted bounded human message accepted for one run. */
2617
2437
  UserMessage = "USER_MESSAGE"
2618
2438
  }
2619
- /** Funding seam for Agentic Studio. The development pilot is platform-funded and never debits a player wallet; payer/rate-card fields are reserved for a later contract. */
2439
+ /** Funding for Agentic Studio model usage. PLATFORM_FUNDED (the pilot default) means the platform absorbs provider cost; METERED means each model request is priced at the agent rate card and charged to the payer: the PLAYER's own wallet by default, or the app's ORG wallet when an org billing admin elected that. Set at the platform layer (billingMode, walletDebitEnabled) and the app layer (payerKind). */
2620
2440
  export type CrowdyStudioAgentFundingPolicy = {
2621
2441
  __typename?: 'CrowdyStudioAgentFundingPolicy';
2622
- /** Funding mode. The pilot always returns 'PLATFORM_FUNDED'. */
2442
+ /** 'PLATFORM_FUNDED' or 'METERED'. */
2623
2443
  billingMode: Scalars['String']['output'];
2624
- /** Future payer kind. The pilot always returns 'PLATFORM'. */
2444
+ /** Who pays under METERED: 'PLAYER' (default) or 'ORG'. 'PLATFORM' while platform-funded. */
2625
2445
  payerKind: Scalars['String']['output'];
2626
- /** Future rate-card UUID; null throughout the platform-funded pilot. */
2446
+ /** Rate-card UUID pinned by policy; null means the ACTIVE per-model card at request time. */
2627
2447
  rateCardId: Maybe<Scalars['String']['output']>;
2628
- /** Whether this policy can debit a player wallet. Always false in the pilot. */
2448
+ /** Whether metered usage debits the payer wallet. False while platform-funded. */
2629
2449
  walletDebitEnabled: Scalars['Boolean']['output'];
2630
2450
  };
2451
+ /** Funding patch. On the platform layer: billingMode ('PLATFORM_FUNDED' | 'METERED') and walletDebitEnabled. On an app layer: payerKind ('PLAYER' | 'ORG'); choosing ORG spends the org wallet and requires manage_billing on the org. Omitted fields stay unchanged. */
2452
+ export type CrowdyStudioAgentFundingPolicyInput = {
2453
+ /** Platform layer only: 'PLATFORM_FUNDED' or 'METERED'. */
2454
+ billingMode?: InputMaybe<Scalars['String']['input']>;
2455
+ /** App layer: 'PLAYER' (default) or 'ORG'. */
2456
+ payerKind?: InputMaybe<Scalars['String']['input']>;
2457
+ /** Platform layer only: whether metered usage debits wallets. */
2458
+ walletDebitEnabled?: InputMaybe<Scalars['Boolean']['input']>;
2459
+ };
2631
2460
  /** Lifecycle of a short-lived workspace or Play capability. */
2632
2461
  export declare enum CrowdyStudioAgentLeaseStatus {
2633
2462
  /** Usable until its exact expiry/context changes. */
@@ -2761,25 +2590,6 @@ export declare enum CrowdyStudioAgentPolicyKind {
2761
2590
  /** Operator-owned platform policy and hard ceilings. */
2762
2591
  Platform = "PLATFORM"
2763
2592
  }
2764
- /** Closed CrowdyJS/BWF reason vocabulary for synchronous lease and control preemption. */
2765
- export declare enum CrowdyStudioAgentPreemptionReason {
2766
- AdmissionChanged = "ADMISSION_CHANGED",
2767
- BudgetFailure = "BUDGET_FAILURE",
2768
- ClientReattached = "CLIENT_REATTACHED",
2769
- ContextChanged = "CONTEXT_CHANGED",
2770
- ControlTargetChanged = "CONTROL_TARGET_CHANGED",
2771
- Death = "DEATH",
2772
- Disconnected = "DISCONNECTED",
2773
- Escape = "ESCAPE",
2774
- HumanEdit = "HUMAN_EDIT",
2775
- HumanInput = "HUMAN_INPUT",
2776
- HumanStop = "HUMAN_STOP",
2777
- LeaseExpired = "LEASE_EXPIRED",
2778
- OperatorKill = "OPERATOR_KILL",
2779
- PermissionChanged = "PERMISSION_CHANGED",
2780
- QuotaFailure = "QUOTA_FAILURE",
2781
- SessionClosed = "SESSION_CLOSED"
2782
- }
2783
2593
  /** Provider privacy posture. ZDR and collection denial are locked true; provider request/response bodies are never persisted. */
2784
2594
  export type CrowdyStudioAgentPrivacyPolicy = {
2785
2595
  __typename?: 'CrowdyStudioAgentPrivacyPolicy';
@@ -3294,6 +3104,33 @@ export type CrowdyStudioLibraryFile = {
3294
3104
  /** Timestamp of the latest successful library mutation. */
3295
3105
  updatedAt: Scalars['DateTime']['output'];
3296
3106
  };
3107
+ /** The player's model spend in this app today plus their most recent requests. */
3108
+ export type CrowdyStudioModelUsage = {
3109
+ __typename?: 'CrowdyStudioModelUsage';
3110
+ appId: Scalars['BigInt']['output'];
3111
+ /** Today's spend ceiling in micro-USD from the effective policy. */
3112
+ dayLimitMicrousd: Scalars['BigInt']['output'];
3113
+ payerKind: Scalars['String']['output'];
3114
+ recent: Array<CrowdyStudioModelUsageEntry>;
3115
+ todayChargeMicrousd: Scalars['BigInt']['output'];
3116
+ todayRequests: Scalars['BigInt']['output'];
3117
+ };
3118
+ /** One request through the metered model endpoint, counts and charge only. */
3119
+ export type CrowdyStudioModelUsageEntry = {
3120
+ __typename?: 'CrowdyStudioModelUsageEntry';
3121
+ /** Rate-carded charge in micro-USD (1,000,000 = $1). */
3122
+ chargeMicrousd: Scalars['BigInt']['output'];
3123
+ client: Scalars['String']['output'];
3124
+ completionTokens: Scalars['BigInt']['output'];
3125
+ occurredAt: Scalars['DateTime']['output'];
3126
+ payerKind: Scalars['String']['output'];
3127
+ promptTokens: Scalars['BigInt']['output'];
3128
+ reasoningTokens: Scalars['BigInt']['output'];
3129
+ requestedModel: Scalars['String']['output'];
3130
+ resolvedModel: Maybe<Scalars['String']['output']>;
3131
+ status: Scalars['String']['output'];
3132
+ usageId: Scalars['String']['output'];
3133
+ };
3297
3134
  /** Editor preference describing how the project presents its server and client targets; it never grants deployment or runtime authority. */
3298
3135
  export declare enum CrowdyStudioPairingPreference {
3299
3136
  /** Present only the client-target authoring workflow. */
@@ -3387,6 +3224,14 @@ export type CrowdyStudioProjectFileInput = {
3387
3224
  /** Project target receiving this file. */
3388
3225
  target: CrowdyStudioTarget;
3389
3226
  };
3227
+ /** Whether this player has accepted that their Crowdy Studio project source may be sent to a model provider (under the platform ZDR / no-collection routing) for this app. */
3228
+ export type CrowdyStudioProviderConsent = {
3229
+ __typename?: 'CrowdyStudioProviderConsent';
3230
+ appId: Scalars['BigInt']['output'];
3231
+ /** True once recorded and not revoked. */
3232
+ consented: Scalars['Boolean']['output'];
3233
+ consentedAt: Maybe<Scalars['DateTime']['output']>;
3234
+ };
3390
3235
  /** The independently capped source target inside a player-owned Crowdy Studio project. */
3391
3236
  export declare enum CrowdyStudioTarget {
3392
3237
  /** Browser-worker Rust that can run only after the caller separately passes current grid ownership and write_client_code deployment checks. */
@@ -3410,21 +3255,6 @@ export declare enum DatacenterServingStatus {
3410
3255
  /** The liveness signal itself could not be read or trusted. Must NOT be presented as an outage: a fleet-wide heartbeat failure once made every datacenter look dead while all of them were fine, and healthy players were told their app was offline. */
3411
3256
  Unknown = "UNKNOWN"
3412
3257
  }
3413
- /** Approve or reject one exact pending tool call by its displayed argument hash. */
3414
- export type DecideAgentToolInput = {
3415
- /** Exact sha256 hash displayed by APPROVAL_REQUESTED; substitutions and stale contexts fail. */
3416
- argumentHash: Scalars['String']['input'];
3417
- /** Current attached client epoch. */
3418
- clientEpoch: Scalars['BigInt']['input'];
3419
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
3420
- idempotencyKey: Scalars['String']['input'];
3421
- /** Optional bounded human rejection reason. */
3422
- reason?: InputMaybe<Scalars['String']['input']>;
3423
- /** Owner/app session UUID. */
3424
- sessionId: Scalars['String']['input'];
3425
- /** Pending tool call UUID. */
3426
- toolCallId: Scalars['String']['input'];
3427
- };
3428
3258
  /** Define an app feature key. */
3429
3259
  export type DefineAppFeatureInput = {
3430
3260
  /** The app (tenant) defining the feature. */
@@ -4645,23 +4475,6 @@ export type GmTypeSchema = {
4645
4475
  /** The container type name. */
4646
4476
  typeName: Scalars['String']['output'];
4647
4477
  };
4648
- /** Human-grant a visible, scoped Play lease for the current grid/entity/host revision. */
4649
- export type GrantAgentLeaseInput = {
4650
- /** Current attached client epoch. */
4651
- clientEpoch: Scalars['BigInt']['input'];
4652
- /** Current player-controlled entity identifier, capped at 128 characters. */
4653
- controlledEntityId: Scalars['String']['input'];
4654
- /** Human-selected duration in seconds (1–600); no silent renewal. */
4655
- durationSeconds: Scalars['Int']['input'];
4656
- /** Exact current host capability revision. */
4657
- hostCapabilityRevision: Scalars['String']['input'];
4658
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
4659
- idempotencyKey: Scalars['String']['input'];
4660
- /** Explicit unique Play scopes: observe, locomotion, interact, craft, combat, communicate, or travel. */
4661
- scopes: Array<Scalars['String']['input']>;
4662
- /** Owner/app PLAY session UUID. */
4663
- sessionId: Scalars['String']['input'];
4664
- };
4665
4478
  /** Input for granting a user access to an app, optionally on a specific tier. */
4666
4479
  export type GrantAppAccessInput = {
4667
4480
  /** Numeric id of the app to grant access to. The caller must hold manage_access_tiers on this app. */
@@ -5187,36 +5000,6 @@ export type Mutation = {
5187
5000
  createTeamRole: GroupRole;
5188
5001
  /** OPERATOR ONLY. Credits an organization wallet without a payment provider, for seeding a test environment or making an operator adjustment, and records it in the wallet ledger as an "admin_credit" transaction. Use this instead of writing to org_wallets by hand: it creates the wallet if absent, repairs a missing wallet id, and moves the balance and the ledger row together in one transaction. Pass a referenceId to make retries idempotent. SIDE EFFECT: re-evaluates the runtime gate for every shared app in the org, so a credit that clears an insufficient_funds denial lifts it immediately instead of leaving the app refusing clients. */
5189
5002
  creditOrgWallet: WalletTransaction;
5190
- /** Monotonically persist one attached epoch’s highest contiguous applied event sequence. Requires the app-scoped owner, exact current epoch, and idempotency key; stale epochs and gaps fail with stable errors. */
5191
- crowdyStudioAgentAcknowledgeEvents: AgentEventAcknowledgement;
5192
- /** Human-grant one unexpired pending tool call by exact argument hash. The server revalidates epoch, context, policy, lease, descriptor, permissions, and project revision before single-use consumption. Requires the app-scoped owner, use_studio_agent, and idempotency key; approval never creates missing authority. */
5193
- crowdyStudioAgentApproveTool: AgentApproval;
5194
- /** Attach one interactive browser, allocate a new monotonic epoch, return that client instance’s replay cursor, and fence every older epoch plus its leases, approvals, and pending browser tools. Requires the app-scoped owner, use_studio_agent, and idempotency key; reconnect never replays an effect. */
5195
- crowdyStudioAgentAttachClient: AgentClientAttachment;
5196
- /** Immediately make one owner/session run durably CANCELLED, revoke pending capabilities/tools, and abort its local provider stream when present. Requires the app-scoped owner, current epoch, exact run id, and idempotency key; cancellation never silently resumes. */
5197
- crowdyStudioAgentCancelRun: AgentRun;
5198
- /** Permanently close one owner/app session, preempt its active run, revoke leases/approvals/dispatches, detach clients, and start the 30-day agent-data cleanup clock without deleting canonical projects/runtime state. Requires the current epoch and idempotency key. */
5199
- crowdyStudioAgentCloseSession: AgentSession;
5200
- /** Create a durable owner/app Agentic Crowdy Studio session and pin mode, private project/grid context, allowlisted model, exact Management platform/app revisions, and the mode/tool/risk-filtered registry digest. Requires an app-scoped token, use_studio_agent, a fresh non-killed policy, and an idempotency key; optional consent applies only to private source. */
5201
- crowdyStudioAgentCreateSession: AgentSession;
5202
- /** Human-grant a visible PLAY lease with explicit scopes, controlled entity, host capability revision, epoch, context, and 1–600 second duration. Requires PLAY mode, selected grid, app-scoped owner, use_studio_agent, effective policy, and idempotency key; the model cannot grant or renew it. */
5203
- crowdyStudioAgentGrantLease: AgentLease;
5204
- /** Recheck current agent permission, policy, owner context, and record the attached heartbeat. CrowdyJS sends this every two seconds; PLAY is stale after five seconds and an unchanged workspace lease renews to 30 seconds. Requires the current app-scoped owner/epoch and an idempotency key. */
5205
- crowdyStudioAgentHeartbeat: AgentHeartbeat;
5206
- /** Immediately pause the session and active run, revoke leases/approvals/pending dispatches, and persist SESSION_PAUSED. This human safety action does not wait for provider progress; requires the app-scoped owner, current epoch, and idempotency key. */
5207
- crowdyStudioAgentPause: AgentSession;
5208
- /** Human-deny one unexpired pending exact tool call, terminally denying the call and failing its run without any effect. Requires the app-scoped owner, current epoch, matching hash, and idempotency key. */
5209
- crowdyStudioAgentRejectTool: AgentApproval;
5210
- /** Explicitly resume a paused session after fresh policy/context validation and requeue its paused run. PLAY never restores an old lease. Requires the app-scoped owner, current epoch, use_studio_agent, and idempotency key. */
5211
- crowdyStudioAgentResume: AgentSession;
5212
- /** Immediately and idempotently revoke one owner/session lease. This safety action remains available without waiting for provider/model progress and does not require approval; requires an app-scoped owner, current epoch, and idempotency key. */
5213
- crowdyStudioAgentRevokeLease: AgentLease;
5214
- /** Append one bounded, redacted human message and queue exactly one serialized provider/tool run. Requires an active app-scoped owner, use_studio_agent, current epoch, fresh Management policy, complete budget reservation, and idempotency key; private source remains separately policy/consent gated. */
5215
- crowdyStudioAgentSendMessage: AgentRun;
5216
- /** Atomically human-select ASK, BUILD, or PLAY plus optional project/grid and repin effective policy revisions, descriptors, registry digest, and context. The change preempts runs and revokes old leases/approvals. Requires current epoch, app owner, use_studio_agent, mode policy, and idempotency key. */
5217
- crowdyStudioAgentSetMode: AgentSession;
5218
- /** Submit one idempotent terminal result for a matching BROWSER dispatch. The server fences old epochs/context, validates output against the pinned descriptor, redacts before persistence/provider continuation, and never retries OUTCOME_UNKNOWN. Requires an app-scoped owner and idempotency key. */
5219
- crowdyStudioAgentToolResult: AgentToolCall;
5220
5003
  /** Publish a new immutable version of an app-scoped Crowdy Studio-curated common file and make it the current player-readable version. Requires an app-scoped token plus the app manage_compute permission. Old versions remain immutable for provenance; an idempotency key is strongly recommended for transport retries. */
5221
5004
  crowdyStudioCommonPublish: CrowdyStudioCommonFile;
5222
5005
  /** Bind a Crowdy Studio project you own to a repository granted to your installation. Verifies the branch exists. Identity session only. Autosave stays off until you turn it on. */
@@ -5247,6 +5030,8 @@ export type Mutation = {
5247
5030
  crowdyStudioProjectSaveMetadata: CrowdyStudioProject;
5248
5031
  /** Archive or restore a private project without deleting any source or provenance, using optimistic revision control. Requires an app-scoped token and exact owner match. Archived projects remain readable by their owner but are read-only until restored. */
5249
5032
  crowdyStudioProjectSetArchived: CrowdyStudioProject;
5033
+ /** Record (or revoke) the caller's consent for their project source in this app to be sent to a model provider through the platform's metered endpoint under ZDR / no-collection routing. Idempotent. Requires 'use_studio_agent'. SIDE EFFECT: enables (or disables) POST /v1/model/chat/completions for this player and app. */
5034
+ crowdyStudioSetProviderConsent: CrowdyStudioProviderConsent;
5250
5035
  /** Approve or deny a pending grid claim request (claim policy APPROVAL). Callable by the app's designated approver users or studio staff holding manage_compute. Approval assigns grid_ownership to the requester. */
5251
5036
  decideGridClaim: GridClaimRequest;
5252
5037
  /** DESTRUCTIVE: permanently deletes the actor identified by `uuid` and returns a copy of the now-deleted row. OWNER-EXCLUSIVE: only the owner may delete (throws Unauthorized otherwise). Requires a valid game token. `uuid` is the 32-character ASCII actor id. */
@@ -5754,51 +5539,6 @@ export type MutationCreditOrgWalletArgs = {
5754
5539
  reason: Scalars['String']['input'];
5755
5540
  referenceId?: InputMaybe<Scalars['String']['input']>;
5756
5541
  };
5757
- export type MutationCrowdyStudioAgentAcknowledgeEventsArgs = {
5758
- input: AcknowledgeAgentEventsInput;
5759
- };
5760
- export type MutationCrowdyStudioAgentApproveToolArgs = {
5761
- input: DecideAgentToolInput;
5762
- };
5763
- export type MutationCrowdyStudioAgentAttachClientArgs = {
5764
- input: AttachAgentClientInput;
5765
- };
5766
- export type MutationCrowdyStudioAgentCancelRunArgs = {
5767
- input: CancelAgentRunInput;
5768
- };
5769
- export type MutationCrowdyStudioAgentCloseSessionArgs = {
5770
- input: AgentSessionControlInput;
5771
- };
5772
- export type MutationCrowdyStudioAgentCreateSessionArgs = {
5773
- input: CreateAgentSessionInput;
5774
- };
5775
- export type MutationCrowdyStudioAgentGrantLeaseArgs = {
5776
- input: GrantAgentLeaseInput;
5777
- };
5778
- export type MutationCrowdyStudioAgentHeartbeatArgs = {
5779
- input: AgentHeartbeatInput;
5780
- };
5781
- export type MutationCrowdyStudioAgentPauseArgs = {
5782
- input: AgentSessionControlInput;
5783
- };
5784
- export type MutationCrowdyStudioAgentRejectToolArgs = {
5785
- input: DecideAgentToolInput;
5786
- };
5787
- export type MutationCrowdyStudioAgentResumeArgs = {
5788
- input: AgentSessionControlInput;
5789
- };
5790
- export type MutationCrowdyStudioAgentRevokeLeaseArgs = {
5791
- input: RevokeAgentLeaseInput;
5792
- };
5793
- export type MutationCrowdyStudioAgentSendMessageArgs = {
5794
- input: SendAgentMessageInput;
5795
- };
5796
- export type MutationCrowdyStudioAgentSetModeArgs = {
5797
- input: SetAgentModeInput;
5798
- };
5799
- export type MutationCrowdyStudioAgentToolResultArgs = {
5800
- input: AgentToolResultInput;
5801
- };
5802
5542
  export type MutationCrowdyStudioCommonPublishArgs = {
5803
5543
  input: PublishCrowdyStudioCommonFileInput;
5804
5544
  };
@@ -5841,6 +5581,9 @@ export type MutationCrowdyStudioProjectSaveMetadataArgs = {
5841
5581
  export type MutationCrowdyStudioProjectSetArchivedArgs = {
5842
5582
  input: SetCrowdyStudioProjectArchivedInput;
5843
5583
  };
5584
+ export type MutationCrowdyStudioSetProviderConsentArgs = {
5585
+ input: SetCrowdyStudioProviderConsentInput;
5586
+ };
5844
5587
  export type MutationDecideGridClaimArgs = {
5845
5588
  appId: Scalars['BigInt']['input'];
5846
5589
  approve: Scalars['Boolean']['input'];
@@ -7742,20 +7485,10 @@ export type Query = {
7742
7485
  cpCrowdyStudioAgentCatalog: CrowdyStudioAgentCatalog;
7743
7486
  /** Operator only (is_operator or is_super_admin). Read the platform Agentic Studio enablement, global emergency kill, model/tool/mode/risk allowlists, budget ceilings, retention/privacy policy, pilot funding seam, timestamps, and revision. No provider credential or request body is stored or returned. */
7744
7487
  cpCrowdyStudioAgentPlatformPolicy: CrowdyStudioAgentPolicy;
7745
- /** Return every effective TURN, SESSION, and PLAYER_DAY request/token/reasoning/cost/tool-round/wall-clock/tool-call/compile dimension with reserved, consumed, and non-negative remaining values. The pilot is platform-funded and this owner/app query never debits a wallet. */
7746
- crowdyStudioAgentBudget: AgentBudget;
7747
7488
  /** Read Management's fail-closed Agentic Crowdy Studio publication: platform enable/kill, per-app operator kill, app enable/kill, the resolved model/tool/mode/risk lists (models and modes are the platform/app intersection; a tool or risk list the app left empty is inherited from the platform whole, because empty at a layer that can only narrow means no narrowing), minimum budgets/retention, locked privacy, and platform-funded billing seam. Requires 'view_compute_diagnostics'. This is the source publication, not proof of current runtime enforcement: Game API must hold a fresh crowdy.studio-agent-policy/1 replica and independently enforce it; missing/stale/malformed replica or an empty model/mode intersection must disable the agent. */
7748
7489
  crowdyStudioAgentEffectivePolicy: CrowdyStudioAgentPolicy;
7749
- /** Replay ordered durable typed events with seq greater than afterSeq. Requires the app-scoped owner and use_studio_agent. Use this query to fill subscription gaps; results are ascending, at-least-once safe, default 100, maximum 200. */
7750
- crowdyStudioAgentHistory: AgentEventConnection;
7751
7490
  /** Read the app-owned Agentic Crowdy Studio policy row, or a disabled/killed deny-all projection when no row exists. Requires 'view_compute_diagnostics' on the app. This is configuration only: use crowdyStudioAgentEffectivePolicy to see platform clamp and kill precedence. No provider key, prompt, source, header, request/response body, payer reference, or other secret is exposed. */
7752
7491
  crowdyStudioAgentPolicy: CrowdyStudioAgentPolicy;
7753
- /** Return one durable Agentic Crowdy Studio session plus its active run, leases, and pending approval. Requires an unexpired app-scoped token, use_studio_agent, and exact session owner/app visibility; missing and foreign ids return AGENT_SESSION_NOT_FOUND. */
7754
- crowdyStudioAgentSession: AgentSession;
7755
- /** List the authenticated owner’s Agentic Crowdy Studio sessions in one app using an opaque cursor, newest first. Requires an app-scoped token for appId and use_studio_agent. The bounded page defaults to 20 and allows 1–50. */
7756
- crowdyStudioAgentSessions: AgentSessionConnection;
7757
- /** Return only implemented tools allowed by the current mode plus the exact non-stale Management model/tool/risk policy. Each entry includes the complete canonical crowdy.agent-tool/1 descriptor and digest. Requires the app-scoped owner and use_studio_agent. */
7758
- crowdyStudioAgentToolDescriptors: AgentToolDescriptorSet;
7759
7492
  /** Read the app's sanitized platform-funded Agentic Studio usage over a bounded time window. Requires 'view_compute_diagnostics'. Returns exact OpenRouter prompt/completion/reasoning/cache/native token and decimal-USD cost dimensions, request/tool/compile/wall counts, and pinned policy revisions. It never returns prompts, source, private reasoning, headers, provider bodies, credentials, payer references, or wallet data; pilot usage never debits a player wallet. */
7760
7493
  crowdyStudioAgentUsage: CrowdyStudioAgentUsagePage;
7761
7494
  /** List the current immutable versions of published Crowdy Studio-curated common files for one app. Requires an app-scoped token for appId; unlike private player source, this catalog content is intentionally readable by players in that app. Results are bounded and may be filtered by target. */
@@ -7770,10 +7503,14 @@ export type Query = {
7770
7503
  crowdyStudioGitHubTree: Array<CrowdyStudioGitHubTreeEntry>;
7771
7504
  /** List the authenticated player’s private reusable Crowdy Studio source files in one app. Requires an app-scoped token for appId; cross-user entries are never visible, including to grid owners or Crowdy Studio operators. The bounded result defaults to 50. */
7772
7505
  crowdyStudioLibraryFiles: Array<CrowdyStudioLibraryFile>;
7506
+ /** The caller's own model usage in this app: today's request count and rate-carded charge against the policy ceiling, the payer (PLAYER wallet by default, ORG when the app elected it, PLATFORM while platform-funded), and the most recent requests. Counts and charges only; no prompts or provider bodies exist to return. Requires 'use_studio_agent'. */
7507
+ crowdyStudioModelUsage: CrowdyStudioModelUsage;
7773
7508
  /** Load one private Crowdy Studio project with all bounded source files. Requires an app-scoped token for appId and exact caller ownership; missing, cross-app, and cross-user ids all return the same NOT_FOUND shape. Grid owners and Crowdy Studio operators receive no source override. */
7774
7509
  crowdyStudioProject: CrowdyStudioProject;
7775
7510
  /** List the authenticated player’s private Crowdy Studio projects in one app, newest first. Requires an app-scoped token for appId; every row and source-file read is filtered by both app and caller ownership. The bounded result defaults to 25 and never grants grid deployment authority. */
7776
7511
  crowdyStudioProjects: Array<CrowdyStudioProject>;
7512
+ /** Read whether the caller has consented to their project source reaching a model provider for this app. The metered model endpoint (POST /v1/model/chat/completions) refuses with AGENT_SCOPE_DENIED until it is recorded. Requires 'use_studio_agent'. */
7513
+ crowdyStudioProviderConsent: CrowdyStudioProviderConsent;
7777
7514
  /** Resolves the single most-specific quota that applies to the given (tierId, appId, orgId, metric) by walking tier -> app -> org -> free-tier defaults and returning the first match; its limitValue/period describe the enforced limit. Returns null if no matching rule and no free-tier default exist for the metric. Requires the 'view_usage' permission on the most-specific scope provided: tierId or appId -> 'view_usage' on the (owning) app; orgId -> 'view_usage' on the org. A metric-only query (no scope ids) resolves the platform free-tier default and only requires an authenticated user. */
7778
7515
  effectiveQuota: Maybe<ServiceQuota>;
7779
7516
  /** Operator only (is_operator). Everything this API knows about whether an address can be emailed: its stored status, whether its domain is suppressed, and the recent SES events for it (the `send` written when the message was handed to SES, and the `delivery` / `bounce` / `complaint` that came back on the SNS webhook). */
@@ -8251,31 +7988,12 @@ export type QueryComputeModulesArgs = {
8251
7988
  export type QueryComputeTemplatesArgs = {
8252
7989
  appId: Scalars['BigInt']['input'];
8253
7990
  };
8254
- export type QueryCrowdyStudioAgentBudgetArgs = {
8255
- sessionId: Scalars['String']['input'];
8256
- };
8257
7991
  export type QueryCrowdyStudioAgentEffectivePolicyArgs = {
8258
7992
  appId: Scalars['BigInt']['input'];
8259
7993
  };
8260
- export type QueryCrowdyStudioAgentHistoryArgs = {
8261
- afterSeq?: InputMaybe<Scalars['BigInt']['input']>;
8262
- first?: InputMaybe<Scalars['Int']['input']>;
8263
- sessionId: Scalars['String']['input'];
8264
- };
8265
7994
  export type QueryCrowdyStudioAgentPolicyArgs = {
8266
7995
  appId: Scalars['BigInt']['input'];
8267
7996
  };
8268
- export type QueryCrowdyStudioAgentSessionArgs = {
8269
- sessionId: Scalars['String']['input'];
8270
- };
8271
- export type QueryCrowdyStudioAgentSessionsArgs = {
8272
- after?: InputMaybe<Scalars['String']['input']>;
8273
- appId: Scalars['BigInt']['input'];
8274
- first?: InputMaybe<Scalars['Int']['input']>;
8275
- };
8276
- export type QueryCrowdyStudioAgentToolDescriptorsArgs = {
8277
- sessionId: Scalars['String']['input'];
8278
- };
8279
7997
  export type QueryCrowdyStudioAgentUsageArgs = {
8280
7998
  appId: Scalars['BigInt']['input'];
8281
7999
  limit?: InputMaybe<Scalars['Int']['input']>;
@@ -8304,6 +8022,10 @@ export type QueryCrowdyStudioLibraryFilesArgs = {
8304
8022
  limit?: InputMaybe<Scalars['Int']['input']>;
8305
8023
  offset?: InputMaybe<Scalars['Int']['input']>;
8306
8024
  };
8025
+ export type QueryCrowdyStudioModelUsageArgs = {
8026
+ appId: Scalars['BigInt']['input'];
8027
+ limit?: InputMaybe<Scalars['Int']['input']>;
8028
+ };
8307
8029
  export type QueryCrowdyStudioProjectArgs = {
8308
8030
  appId: Scalars['BigInt']['input'];
8309
8031
  projectId: Scalars['String']['input'];
@@ -8314,6 +8036,9 @@ export type QueryCrowdyStudioProjectsArgs = {
8314
8036
  limit?: InputMaybe<Scalars['Int']['input']>;
8315
8037
  offset?: InputMaybe<Scalars['Int']['input']>;
8316
8038
  };
8039
+ export type QueryCrowdyStudioProviderConsentArgs = {
8040
+ appId: Scalars['BigInt']['input'];
8041
+ };
8317
8042
  export type QueryEffectiveQuotaArgs = {
8318
8043
  appId?: InputMaybe<Scalars['BigInt']['input']>;
8319
8044
  metric: Scalars['String']['input'];
@@ -8855,19 +8580,6 @@ export type RetireOrganizationInput = {
8855
8580
  /** Why this organization is being retired. Required and stored on the tombstone. */
8856
8581
  reason: Scalars['String']['input'];
8857
8582
  };
8858
- /** Immediately revoke one visible lease. */
8859
- export type RevokeAgentLeaseInput = {
8860
- /** Current attached client epoch. */
8861
- clientEpoch: Scalars['BigInt']['input'];
8862
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
8863
- idempotencyKey: Scalars['String']['input'];
8864
- /** Lease UUID to revoke. */
8865
- leaseId: Scalars['String']['input'];
8866
- /** Optional strict CrowdyJS/BWF preemption reason; defaults to HUMAN_STOP. */
8867
- reason?: InputMaybe<CrowdyStudioAgentPreemptionReason>;
8868
- /** Owner/app session UUID. */
8869
- sessionId: Scalars['String']['input'];
8870
- };
8871
8583
  /** Revoke a user's direct grants on a grid (deletes from the grid_user_direct_grants input table). */
8872
8584
  export type RevokeGridPermissionsInput = {
8873
8585
  /** The app (tenant) that owns the grid. */
@@ -9175,17 +8887,6 @@ export type SeedPropertyInput = {
9175
8887
  /** Value type of the value being set. */
9176
8888
  valueType: Scalars['String']['input'];
9177
8889
  };
9178
- /** Accept one bounded human message and queue exactly one serialized run. */
9179
- export type SendAgentMessageInput = {
9180
- /** Current attached client epoch. */
9181
- clientEpoch: Scalars['BigInt']['input'];
9182
- /** Human intent text, normalized, secret-scanned, and capped at 16 KiB. It never grants authority. */
9183
- content: Scalars['String']['input'];
9184
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
9185
- idempotencyKey: Scalars['String']['input'];
9186
- /** Owner/app active session UUID. */
9187
- sessionId: Scalars['String']['input'];
9188
- };
9189
8890
  /** Result of an operator test send. */
9190
8891
  export type SendTestEmailResult = {
9191
8892
  __typename?: 'SendTestEmailResult';
@@ -9318,21 +9019,6 @@ export type ServiceQuota = {
9318
9019
  /** When the rule was last updated (ISO-8601 UTC timestamp). */
9319
9020
  updatedAt: Scalars['DateTime']['output'];
9320
9021
  };
9321
- /** Atomically select human mode plus optional project/grid and repin effective policy revisions, descriptors, registry digest, and context while preempting old authority. */
9322
- export type SetAgentModeInput = {
9323
- /** Current attached client epoch. */
9324
- clientEpoch: Scalars['BigInt']['input'];
9325
- /** Optional grid context to atomically repin with the mode. Omit to retain it; PLAY requires the resulting grid. */
9326
- gridId?: InputMaybe<Scalars['BigInt']['input']>;
9327
- /** Required retry key. Same owner, operation, key, and input replay the first result; changed input returns IDEMPOTENCY_CONFLICT. */
9328
- idempotencyKey: Scalars['String']['input'];
9329
- /** New human-selected mode; the model cannot call this mutation. */
9330
- mode: CrowdyStudioAgentMode;
9331
- /** Optional owner project UUID to atomically repin with the mode. Omit to retain it; BUILD requires the resulting selection. */
9332
- projectId?: InputMaybe<Scalars['String']['input']>;
9333
- /** Owner/app session UUID. */
9334
- sessionId: Scalars['String']['input'];
9335
- };
9336
9022
  /** Register/update an app's OAuth client settings for the portal handoff (requires manage_apps on the app). */
9337
9023
  export type SetAppClientSettingsInput = {
9338
9024
  appId: Scalars['BigInt']['input'];
@@ -9458,6 +9144,8 @@ export type SetCrowdyStudioAgentAppPolicyInput = {
9458
9144
  enabled?: InputMaybe<Scalars['Boolean']['input']>;
9459
9145
  /** Optional optimistic revision. Use 0 when creating; a mismatch fails AGENT_POLICY_REVISION_CONFLICT. */
9460
9146
  expectedRevision?: InputMaybe<Scalars['BigInt']['input']>;
9147
+ /** Optional funding patch: metering on the platform layer, payer on the app layer. */
9148
+ funding?: InputMaybe<CrowdyStudioAgentFundingPolicyInput>;
9461
9149
  /** Required retry key (1-128 characters). Same key/arguments replay; different arguments fail IDEMPOTENCY_CONFLICT. */
9462
9150
  idempotencyKey: Scalars['String']['input'];
9463
9151
  /** Set or clear this layer kill switch. Kill always wins over enablement. */
@@ -9502,6 +9190,8 @@ export type SetCrowdyStudioAgentPlatformPolicyInput = {
9502
9190
  enabled?: InputMaybe<Scalars['Boolean']['input']>;
9503
9191
  /** Optional optimistic platform revision. */
9504
9192
  expectedRevision?: InputMaybe<Scalars['BigInt']['input']>;
9193
+ /** Optional funding patch: metering on the platform layer, payer on the app layer. */
9194
+ funding?: InputMaybe<CrowdyStudioAgentFundingPolicyInput>;
9505
9195
  /** Required retry key (1-128 characters). Same key/arguments replay; different arguments fail IDEMPOTENCY_CONFLICT. */
9506
9196
  idempotencyKey: Scalars['String']['input'];
9507
9197
  /** Safe operator-facing kill reason (max 256); no secrets or provider bodies. */
@@ -9552,6 +9242,13 @@ export type SetCrowdyStudioProjectArchivedInput = {
9552
9242
  /** Project UUID to archive or restore. */
9553
9243
  projectId: Scalars['String']['input'];
9554
9244
  };
9245
+ /** Record or revoke the provider-data consent for one app. */
9246
+ export type SetCrowdyStudioProviderConsentInput = {
9247
+ /** App the consent applies to; must match an app token scope. */
9248
+ appId: Scalars['BigInt']['input'];
9249
+ /** True to accept, false to revoke. */
9250
+ consented: Scalars['Boolean']['input'];
9251
+ };
9555
9252
  /** Set the app's game-model runtime policy. */
9556
9253
  export type SetGameModelPolicyInput = {
9557
9254
  /** The app (tenant) whose policy to set. */
@@ -9777,8 +9474,6 @@ export type SocialLoginStartInput = {
9777
9474
  };
9778
9475
  export type Subscription = {
9779
9476
  __typename?: 'Subscription';
9780
- /** Replay durable events with seq greater than afterSeq, then tail newly committed facts using database replay plus in-memory wakeups. Requires an app-scoped owner, use_studio_agent, and exact current clientEpoch. Delivery is ordered and at-least-once: deduplicate eventId/seq, fill gaps with crowdyStudioAgentHistory, and acknowledge only contiguous sequences. */
9781
- crowdyStudioAgentEvents: CrowdyStudioAgentEvent;
9782
9477
  /** Stream complete active gameplay-session count transitions for one app. There is no bootstrap event: query gameModelActivePlayerCount for the current snapshot. The first complete sample is a silent baseline; PARTIAL/UNAVAILABLE samples do not emit or become zero. Delivery uses a Postgres-backed cross-replica best-effort feed with a bounded oldest-drop buffer. Deduplicate by revision; after reconnect or a revision gap, requery gameModelActivePlayerCount. Requires an app-scoped token for this exact app. */
9783
9478
  gameModelActivePlayerCountChanged: GameModelActivePlayerCountChange;
9784
9479
  /** Push notification whenever a container in the app changes: an invoke mutated it, a direct gameModelSetProperty wrote it, or it was created/deleted. Metadata only (containerId, typeName, changedKeys — no property values); pull the visibility-filtered state with gameModelContainerState on receipt. Post-commit and best-effort (a dropped event costs one missed pull, never correctness) — durable reads remain the source of truth. Optional typeName/sessionId filters narrow delivery. Fans out across all API replicas. Requires a valid token. Replaces interval polling with pull-on-push. */
@@ -9786,11 +9481,6 @@ export type Subscription = {
9786
9481
  /** Realtime downlink from the game server: spatial notifications and responses, GenericErrorResponse (errors from your sends, correlated by sequenceNumber), and RealtimeConnectionEvent (lifecycle/setup failures). Requires a bearer game token AND an appId-scoped connection — the appId is read from the graphql-transport-ws connection (game tokens are app-agnostic and one UDP socket is shared across apps, so an app-agnostic subscription is rejected with a RealtimeConnectionEvent code APP_ID_REQUIRED, and a missing/invalid token with AUTH_REQUIRED). On subscribe, opens a UDP proxy session if none exists (binds to the least-loaded game server); open/transport failures are delivered as RealtimeConnectionEvent (code UDP_PROXY_CONNECTION_FAILED) and then the stream ends. Only this app’s spatial fan-out is delivered; appId-less control frames always pass. Subscribe before/while sending so async results are not missed. Unsubscribing stops delivery only — it does NOT close the UDP session; call disconnectUdpProxy (or rely on the server inactivity timeout) to release it. */
9787
9482
  udpNotifications: Maybe<UdpNotification>;
9788
9483
  };
9789
- export type SubscriptionCrowdyStudioAgentEventsArgs = {
9790
- afterSeq: Scalars['BigInt']['input'];
9791
- clientEpoch: Scalars['BigInt']['input'];
9792
- sessionId: Scalars['String']['input'];
9793
- };
9794
9484
  export type SubscriptionGameModelActivePlayerCountChangedArgs = {
9795
9485
  appId: Scalars['BigInt']['input'];
9796
9486
  };
@@ -13472,2027 +13162,6 @@ export type CrowdyStudioProjectImportFileMutation = {
13472
13162
  }>;
13473
13163
  };
13474
13164
  };
13475
- export type CrowdyAgentErrorFieldsFragment = {
13476
- __typename?: 'AgentError';
13477
- code: string;
13478
- message: string;
13479
- retryable: boolean;
13480
- remediation: string | null;
13481
- field: string | null;
13482
- requiredScope: string | null;
13483
- };
13484
- export type CrowdyAgentRunFieldsFragment = {
13485
- __typename?: 'AgentRun';
13486
- runId: string;
13487
- status: CrowdyStudioAgentRunStatus;
13488
- providerRounds: number;
13489
- toolCalls: number;
13490
- errorCode: string | null;
13491
- terminalReason: string | null;
13492
- reason: string | null;
13493
- startedAt: string | null;
13494
- finishedAt: string | null;
13495
- createdAt: string;
13496
- cancelled: boolean;
13497
- };
13498
- export type CrowdyAgentLeaseFieldsFragment = {
13499
- __typename?: 'AgentLease';
13500
- leaseId: string;
13501
- kind: CrowdyStudioAgentLeaseType;
13502
- status: CrowdyStudioAgentLeaseStatus;
13503
- clientEpoch: string;
13504
- scopes: Array<string>;
13505
- holder: string;
13506
- contextVersion: string;
13507
- controlledEntityId: string | null;
13508
- hostCapabilityRevision: string | null;
13509
- expectedProjectRevision: string | null;
13510
- grantedAt: string;
13511
- expiresAt: string;
13512
- revokedReason: string | null;
13513
- };
13514
- export type CrowdyAgentApprovalFieldsFragment = {
13515
- __typename?: 'AgentApproval';
13516
- approvalId: string;
13517
- toolCallId: string;
13518
- argumentHash: string;
13519
- status: CrowdyStudioAgentApprovalStatus;
13520
- safeSummary: string;
13521
- clientEpoch: string;
13522
- expiresAt: string;
13523
- approved: boolean;
13524
- rejected: boolean;
13525
- };
13526
- export type CrowdyAgentSessionFieldsFragment = {
13527
- __typename?: 'AgentSession';
13528
- contractVersion: string;
13529
- sessionId: string;
13530
- appId: string;
13531
- projectId: string | null;
13532
- gridId: string | null;
13533
- mode: CrowdyStudioAgentMode;
13534
- requestedModel: string;
13535
- model: string | null;
13536
- resolvedModel: string | null;
13537
- status: CrowdyStudioAgentSessionStatus;
13538
- providerDataConsent: boolean;
13539
- registryDigest: string;
13540
- providerPolicyVersion: string;
13541
- appPolicyVersion: string;
13542
- contextVersion: string;
13543
- currentClientEpoch: string;
13544
- clientEpoch: string | null;
13545
- lastEventSeq: string;
13546
- createdAt: string;
13547
- updatedAt: string;
13548
- closedAt: string | null;
13549
- currentRun: {
13550
- __typename?: 'AgentRun';
13551
- runId: string;
13552
- status: CrowdyStudioAgentRunStatus;
13553
- providerRounds: number;
13554
- toolCalls: number;
13555
- errorCode: string | null;
13556
- terminalReason: string | null;
13557
- reason: string | null;
13558
- startedAt: string | null;
13559
- finishedAt: string | null;
13560
- createdAt: string;
13561
- cancelled: boolean;
13562
- } | null;
13563
- activeLeases: Array<{
13564
- __typename?: 'AgentLease';
13565
- leaseId: string;
13566
- kind: CrowdyStudioAgentLeaseType;
13567
- status: CrowdyStudioAgentLeaseStatus;
13568
- clientEpoch: string;
13569
- scopes: Array<string>;
13570
- holder: string;
13571
- contextVersion: string;
13572
- controlledEntityId: string | null;
13573
- hostCapabilityRevision: string | null;
13574
- expectedProjectRevision: string | null;
13575
- grantedAt: string;
13576
- expiresAt: string;
13577
- revokedReason: string | null;
13578
- }>;
13579
- pendingApproval: {
13580
- __typename?: 'AgentApproval';
13581
- approvalId: string;
13582
- toolCallId: string;
13583
- argumentHash: string;
13584
- status: CrowdyStudioAgentApprovalStatus;
13585
- safeSummary: string;
13586
- clientEpoch: string;
13587
- expiresAt: string;
13588
- approved: boolean;
13589
- rejected: boolean;
13590
- } | null;
13591
- };
13592
- export type CrowdyAgentBudgetFieldsFragment = {
13593
- __typename?: 'AgentBudget';
13594
- resetAt: string | null;
13595
- platformFunded: boolean;
13596
- payer: string;
13597
- dimensions: Array<{
13598
- __typename?: 'AgentBudgetDimension';
13599
- name: string;
13600
- scope: string;
13601
- limit: string;
13602
- reserved: string;
13603
- consumed: string;
13604
- remaining: string;
13605
- unit: string;
13606
- }>;
13607
- };
13608
- export type CrowdyAgentToolDescriptorFieldsFragment = {
13609
- __typename?: 'AgentToolDescriptor';
13610
- schemaVersion: string;
13611
- name: string;
13612
- wireName: string;
13613
- version: string;
13614
- summary: string;
13615
- executor: CrowdyStudioAgentToolExecutor;
13616
- modes: Array<CrowdyStudioAgentMode>;
13617
- risk: CrowdyStudioAgentToolRisk;
13618
- riskEffects: Array<string>;
13619
- riskReversible: boolean;
13620
- scopes: Array<string>;
13621
- scopeRequirementsJson: string;
13622
- approvalRequired: boolean;
13623
- approvalPolicy: string;
13624
- approvalReasons: Array<string>;
13625
- approvalMaxTtlSeconds: number;
13626
- idempotencyClass: string;
13627
- idempotencyKeyScope: string;
13628
- timeoutMs: number;
13629
- inputSchemaJson: string;
13630
- outputSchemaJson: string;
13631
- inputRedactionJson: string;
13632
- outputRedactionJson: string;
13633
- maxPersistedBytes: number;
13634
- descriptorJson: string;
13635
- descriptorDigest: string;
13636
- };
13637
- type CrowdyAgentEventBaseFields_AgentApprovalEvent_Fragment = {
13638
- __typename?: 'AgentApprovalEvent';
13639
- protocolVersion: string;
13640
- eventId: string;
13641
- sessionId: string;
13642
- seq: string;
13643
- type: CrowdyStudioAgentEventType;
13644
- runId: string | null;
13645
- version: string;
13646
- createdAt: string;
13647
- };
13648
- type CrowdyAgentEventBaseFields_AgentBudgetEvent_Fragment = {
13649
- __typename?: 'AgentBudgetEvent';
13650
- protocolVersion: string;
13651
- eventId: string;
13652
- sessionId: string;
13653
- seq: string;
13654
- type: CrowdyStudioAgentEventType;
13655
- runId: string | null;
13656
- version: string;
13657
- createdAt: string;
13658
- };
13659
- type CrowdyAgentEventBaseFields_AgentCheckpointEvent_Fragment = {
13660
- __typename?: 'AgentCheckpointEvent';
13661
- protocolVersion: string;
13662
- eventId: string;
13663
- sessionId: string;
13664
- seq: string;
13665
- type: CrowdyStudioAgentEventType;
13666
- runId: string | null;
13667
- version: string;
13668
- createdAt: string;
13669
- };
13670
- type CrowdyAgentEventBaseFields_AgentLeaseEvent_Fragment = {
13671
- __typename?: 'AgentLeaseEvent';
13672
- protocolVersion: string;
13673
- eventId: string;
13674
- sessionId: string;
13675
- seq: string;
13676
- type: CrowdyStudioAgentEventType;
13677
- runId: string | null;
13678
- version: string;
13679
- createdAt: string;
13680
- };
13681
- type CrowdyAgentEventBaseFields_AgentLifecycleEvent_Fragment = {
13682
- __typename?: 'AgentLifecycleEvent';
13683
- protocolVersion: string;
13684
- eventId: string;
13685
- sessionId: string;
13686
- seq: string;
13687
- type: CrowdyStudioAgentEventType;
13688
- runId: string | null;
13689
- version: string;
13690
- createdAt: string;
13691
- };
13692
- type CrowdyAgentEventBaseFields_AgentMessageEvent_Fragment = {
13693
- __typename?: 'AgentMessageEvent';
13694
- protocolVersion: string;
13695
- eventId: string;
13696
- sessionId: string;
13697
- seq: string;
13698
- type: CrowdyStudioAgentEventType;
13699
- runId: string | null;
13700
- version: string;
13701
- createdAt: string;
13702
- };
13703
- type CrowdyAgentEventBaseFields_AgentRunEvent_Fragment = {
13704
- __typename?: 'AgentRunEvent';
13705
- protocolVersion: string;
13706
- eventId: string;
13707
- sessionId: string;
13708
- seq: string;
13709
- type: CrowdyStudioAgentEventType;
13710
- runId: string | null;
13711
- version: string;
13712
- createdAt: string;
13713
- };
13714
- type CrowdyAgentEventBaseFields_AgentToolEvent_Fragment = {
13715
- __typename?: 'AgentToolEvent';
13716
- protocolVersion: string;
13717
- eventId: string;
13718
- sessionId: string;
13719
- seq: string;
13720
- type: CrowdyStudioAgentEventType;
13721
- runId: string | null;
13722
- version: string;
13723
- createdAt: string;
13724
- };
13725
- export type CrowdyAgentEventBaseFieldsFragment = CrowdyAgentEventBaseFields_AgentApprovalEvent_Fragment | CrowdyAgentEventBaseFields_AgentBudgetEvent_Fragment | CrowdyAgentEventBaseFields_AgentCheckpointEvent_Fragment | CrowdyAgentEventBaseFields_AgentLeaseEvent_Fragment | CrowdyAgentEventBaseFields_AgentLifecycleEvent_Fragment | CrowdyAgentEventBaseFields_AgentMessageEvent_Fragment | CrowdyAgentEventBaseFields_AgentRunEvent_Fragment | CrowdyAgentEventBaseFields_AgentToolEvent_Fragment;
13726
- type CrowdyAgentEventFields_AgentApprovalEvent_Fragment = {
13727
- __typename: 'AgentApprovalEvent';
13728
- protocolVersion: string;
13729
- eventId: string;
13730
- sessionId: string;
13731
- seq: string;
13732
- type: CrowdyStudioAgentEventType;
13733
- runId: string | null;
13734
- version: string;
13735
- createdAt: string;
13736
- approvalEventId: string;
13737
- approvalToolCallId: string;
13738
- approvalArgumentHash: string;
13739
- approvalStatus: CrowdyStudioAgentApprovalStatus;
13740
- approvalSafeSummary: string;
13741
- approvalReasons: Array<string>;
13742
- approvalExpiresAt: string;
13743
- };
13744
- type CrowdyAgentEventFields_AgentBudgetEvent_Fragment = {
13745
- __typename: 'AgentBudgetEvent';
13746
- protocolVersion: string;
13747
- eventId: string;
13748
- sessionId: string;
13749
- seq: string;
13750
- type: CrowdyStudioAgentEventType;
13751
- runId: string | null;
13752
- version: string;
13753
- createdAt: string;
13754
- budgetSnapshot: {
13755
- __typename?: 'AgentBudget';
13756
- resetAt: string | null;
13757
- platformFunded: boolean;
13758
- payer: string;
13759
- dimensions: Array<{
13760
- __typename?: 'AgentBudgetDimension';
13761
- name: string;
13762
- scope: string;
13763
- limit: string;
13764
- reserved: string;
13765
- consumed: string;
13766
- remaining: string;
13767
- unit: string;
13768
- }>;
13769
- };
13770
- };
13771
- type CrowdyAgentEventFields_AgentCheckpointEvent_Fragment = {
13772
- __typename: 'AgentCheckpointEvent';
13773
- protocolVersion: string;
13774
- eventId: string;
13775
- sessionId: string;
13776
- seq: string;
13777
- type: CrowdyStudioAgentEventType;
13778
- runId: string | null;
13779
- version: string;
13780
- createdAt: string;
13781
- checkpointEventId: string;
13782
- checkpointProjectRevision: string;
13783
- checkpointContentHash: string;
13784
- checkpointReason: string;
13785
- checkpointRestoredAt: string | null;
13786
- checkpointFiles: Array<{
13787
- __typename?: 'AgentCheckpointFile';
13788
- target: string;
13789
- path: string;
13790
- contentHash: string;
13791
- byteLength: number;
13792
- }>;
13793
- };
13794
- type CrowdyAgentEventFields_AgentLeaseEvent_Fragment = {
13795
- __typename: 'AgentLeaseEvent';
13796
- protocolVersion: string;
13797
- eventId: string;
13798
- sessionId: string;
13799
- seq: string;
13800
- type: CrowdyStudioAgentEventType;
13801
- runId: string | null;
13802
- version: string;
13803
- createdAt: string;
13804
- leaseEventId: string;
13805
- leaseKind: CrowdyStudioAgentLeaseType;
13806
- leaseStatus: CrowdyStudioAgentLeaseStatus;
13807
- leaseClientEpoch: string;
13808
- leaseScopes: Array<string>;
13809
- leaseHolder: string;
13810
- leaseContextVersion: string;
13811
- leaseControlledEntityId: string | null;
13812
- leaseHostCapabilityRevision: string | null;
13813
- leaseExpectedProjectRevision: string | null;
13814
- leaseGrantedAt: string;
13815
- leaseExpiresAt: string;
13816
- leaseReason: string | null;
13817
- };
13818
- type CrowdyAgentEventFields_AgentLifecycleEvent_Fragment = {
13819
- __typename: 'AgentLifecycleEvent';
13820
- protocolVersion: string;
13821
- eventId: string;
13822
- sessionId: string;
13823
- seq: string;
13824
- type: CrowdyStudioAgentEventType;
13825
- runId: string | null;
13826
- version: string;
13827
- createdAt: string;
13828
- lifecycleMode: CrowdyStudioAgentMode | null;
13829
- lifecycleClientEpoch: string | null;
13830
- lifecycleReplayAfterSeq: string | null;
13831
- lifecycleReason: string | null;
13832
- lifecycleContextVersion: string | null;
13833
- };
13834
- type CrowdyAgentEventFields_AgentMessageEvent_Fragment = {
13835
- __typename: 'AgentMessageEvent';
13836
- protocolVersion: string;
13837
- eventId: string;
13838
- sessionId: string;
13839
- seq: string;
13840
- type: CrowdyStudioAgentEventType;
13841
- runId: string | null;
13842
- version: string;
13843
- createdAt: string;
13844
- messageEventId: string;
13845
- messageRole: string;
13846
- messageContent: string;
13847
- };
13848
- type CrowdyAgentEventFields_AgentRunEvent_Fragment = {
13849
- __typename: 'AgentRunEvent';
13850
- protocolVersion: string;
13851
- eventId: string;
13852
- sessionId: string;
13853
- seq: string;
13854
- type: CrowdyStudioAgentEventType;
13855
- runId: string | null;
13856
- version: string;
13857
- createdAt: string;
13858
- runStatus: CrowdyStudioAgentRunStatus;
13859
- runCode: string | null;
13860
- runReason: string | null;
13861
- runError: {
13862
- __typename?: 'AgentError';
13863
- code: string;
13864
- message: string;
13865
- retryable: boolean;
13866
- remediation: string | null;
13867
- field: string | null;
13868
- requiredScope: string | null;
13869
- } | null;
13870
- };
13871
- type CrowdyAgentEventFields_AgentToolEvent_Fragment = {
13872
- __typename: 'AgentToolEvent';
13873
- protocolVersion: string;
13874
- eventId: string;
13875
- sessionId: string;
13876
- seq: string;
13877
- type: CrowdyStudioAgentEventType;
13878
- runId: string | null;
13879
- version: string;
13880
- createdAt: string;
13881
- toolEventCallId: string;
13882
- toolEventName: string;
13883
- toolEventVersion: string;
13884
- toolStatus: CrowdyStudioAgentToolCallStatus;
13885
- toolSafeSummary: string | null;
13886
- toolDescriptorDigest: string | null;
13887
- toolArgumentHash: string | null;
13888
- toolExecutor: CrowdyStudioAgentToolExecutor | null;
13889
- toolContextVersion: string | null;
13890
- toolClientEpoch: string | null;
13891
- toolArgumentsJson: string | null;
13892
- toolLeaseId: string | null;
13893
- toolApprovalGrant: string | null;
13894
- toolIdempotencyKey: string | null;
13895
- toolResultJson: string | null;
13896
- toolDeadline: string | null;
13897
- toolInvocation: {
13898
- __typename?: 'AgentToolInvocation';
13899
- protocolVersion: string;
13900
- sessionId: string;
13901
- runId: string;
13902
- toolCallId: string;
13903
- name: string;
13904
- version: string;
13905
- descriptorDigest: string;
13906
- argumentsJson: string;
13907
- argumentHash: string;
13908
- contextVersion: string;
13909
- clientEpoch: string | null;
13910
- leaseId: string | null;
13911
- approvalGrant: string | null;
13912
- idempotencyKey: string | null;
13913
- deadline: string;
13914
- } | null;
13915
- toolResult: {
13916
- __typename?: 'AgentToolResultEnvelope';
13917
- protocolVersion: string;
13918
- toolCallId: string;
13919
- status: CrowdyStudioAgentToolResultStatus;
13920
- outputJson: string | null;
13921
- observedContextVersion: string;
13922
- startedAt: string;
13923
- finishedAt: string;
13924
- error: {
13925
- __typename?: 'AgentError';
13926
- code: string;
13927
- message: string;
13928
- retryable: boolean;
13929
- remediation: string | null;
13930
- field: string | null;
13931
- requiredScope: string | null;
13932
- } | null;
13933
- } | null;
13934
- toolError: {
13935
- __typename?: 'AgentError';
13936
- code: string;
13937
- message: string;
13938
- retryable: boolean;
13939
- remediation: string | null;
13940
- field: string | null;
13941
- requiredScope: string | null;
13942
- } | null;
13943
- };
13944
- export type CrowdyAgentEventFieldsFragment = CrowdyAgentEventFields_AgentApprovalEvent_Fragment | CrowdyAgentEventFields_AgentBudgetEvent_Fragment | CrowdyAgentEventFields_AgentCheckpointEvent_Fragment | CrowdyAgentEventFields_AgentLeaseEvent_Fragment | CrowdyAgentEventFields_AgentLifecycleEvent_Fragment | CrowdyAgentEventFields_AgentMessageEvent_Fragment | CrowdyAgentEventFields_AgentRunEvent_Fragment | CrowdyAgentEventFields_AgentToolEvent_Fragment;
13945
- export type CrowdyStudioAgentSessionQueryVariables = Exact<{
13946
- sessionId: Scalars['String']['input'];
13947
- }>;
13948
- export type CrowdyStudioAgentSessionQuery = {
13949
- __typename?: 'Query';
13950
- crowdyStudioAgentSession: {
13951
- __typename?: 'AgentSession';
13952
- contractVersion: string;
13953
- sessionId: string;
13954
- appId: string;
13955
- projectId: string | null;
13956
- gridId: string | null;
13957
- mode: CrowdyStudioAgentMode;
13958
- requestedModel: string;
13959
- model: string | null;
13960
- resolvedModel: string | null;
13961
- status: CrowdyStudioAgentSessionStatus;
13962
- providerDataConsent: boolean;
13963
- registryDigest: string;
13964
- providerPolicyVersion: string;
13965
- appPolicyVersion: string;
13966
- contextVersion: string;
13967
- currentClientEpoch: string;
13968
- clientEpoch: string | null;
13969
- lastEventSeq: string;
13970
- createdAt: string;
13971
- updatedAt: string;
13972
- closedAt: string | null;
13973
- currentRun: {
13974
- __typename?: 'AgentRun';
13975
- runId: string;
13976
- status: CrowdyStudioAgentRunStatus;
13977
- providerRounds: number;
13978
- toolCalls: number;
13979
- errorCode: string | null;
13980
- terminalReason: string | null;
13981
- reason: string | null;
13982
- startedAt: string | null;
13983
- finishedAt: string | null;
13984
- createdAt: string;
13985
- cancelled: boolean;
13986
- } | null;
13987
- activeLeases: Array<{
13988
- __typename?: 'AgentLease';
13989
- leaseId: string;
13990
- kind: CrowdyStudioAgentLeaseType;
13991
- status: CrowdyStudioAgentLeaseStatus;
13992
- clientEpoch: string;
13993
- scopes: Array<string>;
13994
- holder: string;
13995
- contextVersion: string;
13996
- controlledEntityId: string | null;
13997
- hostCapabilityRevision: string | null;
13998
- expectedProjectRevision: string | null;
13999
- grantedAt: string;
14000
- expiresAt: string;
14001
- revokedReason: string | null;
14002
- }>;
14003
- pendingApproval: {
14004
- __typename?: 'AgentApproval';
14005
- approvalId: string;
14006
- toolCallId: string;
14007
- argumentHash: string;
14008
- status: CrowdyStudioAgentApprovalStatus;
14009
- safeSummary: string;
14010
- clientEpoch: string;
14011
- expiresAt: string;
14012
- approved: boolean;
14013
- rejected: boolean;
14014
- } | null;
14015
- };
14016
- };
14017
- export type CrowdyStudioAgentSessionsQueryVariables = Exact<{
14018
- appId: Scalars['BigInt']['input'];
14019
- after?: InputMaybe<Scalars['String']['input']>;
14020
- first?: InputMaybe<Scalars['Int']['input']>;
14021
- }>;
14022
- export type CrowdyStudioAgentSessionsQuery = {
14023
- __typename?: 'Query';
14024
- crowdyStudioAgentSessions: {
14025
- __typename?: 'AgentSessionConnection';
14026
- endCursor: string | null;
14027
- hasNextPage: boolean;
14028
- edges: Array<{
14029
- __typename?: 'AgentSessionEdge';
14030
- cursor: string;
14031
- node: {
14032
- __typename?: 'AgentSession';
14033
- contractVersion: string;
14034
- sessionId: string;
14035
- appId: string;
14036
- projectId: string | null;
14037
- gridId: string | null;
14038
- mode: CrowdyStudioAgentMode;
14039
- requestedModel: string;
14040
- model: string | null;
14041
- resolvedModel: string | null;
14042
- status: CrowdyStudioAgentSessionStatus;
14043
- providerDataConsent: boolean;
14044
- registryDigest: string;
14045
- providerPolicyVersion: string;
14046
- appPolicyVersion: string;
14047
- contextVersion: string;
14048
- currentClientEpoch: string;
14049
- clientEpoch: string | null;
14050
- lastEventSeq: string;
14051
- createdAt: string;
14052
- updatedAt: string;
14053
- closedAt: string | null;
14054
- currentRun: {
14055
- __typename?: 'AgentRun';
14056
- runId: string;
14057
- status: CrowdyStudioAgentRunStatus;
14058
- providerRounds: number;
14059
- toolCalls: number;
14060
- errorCode: string | null;
14061
- terminalReason: string | null;
14062
- reason: string | null;
14063
- startedAt: string | null;
14064
- finishedAt: string | null;
14065
- createdAt: string;
14066
- cancelled: boolean;
14067
- } | null;
14068
- activeLeases: Array<{
14069
- __typename?: 'AgentLease';
14070
- leaseId: string;
14071
- kind: CrowdyStudioAgentLeaseType;
14072
- status: CrowdyStudioAgentLeaseStatus;
14073
- clientEpoch: string;
14074
- scopes: Array<string>;
14075
- holder: string;
14076
- contextVersion: string;
14077
- controlledEntityId: string | null;
14078
- hostCapabilityRevision: string | null;
14079
- expectedProjectRevision: string | null;
14080
- grantedAt: string;
14081
- expiresAt: string;
14082
- revokedReason: string | null;
14083
- }>;
14084
- pendingApproval: {
14085
- __typename?: 'AgentApproval';
14086
- approvalId: string;
14087
- toolCallId: string;
14088
- argumentHash: string;
14089
- status: CrowdyStudioAgentApprovalStatus;
14090
- safeSummary: string;
14091
- clientEpoch: string;
14092
- expiresAt: string;
14093
- approved: boolean;
14094
- rejected: boolean;
14095
- } | null;
14096
- };
14097
- }>;
14098
- pageInfo: {
14099
- __typename?: 'AgentPageInfo';
14100
- hasNextPage: boolean;
14101
- endCursor: string | null;
14102
- };
14103
- nodes: Array<{
14104
- __typename?: 'AgentSession';
14105
- contractVersion: string;
14106
- sessionId: string;
14107
- appId: string;
14108
- projectId: string | null;
14109
- gridId: string | null;
14110
- mode: CrowdyStudioAgentMode;
14111
- requestedModel: string;
14112
- model: string | null;
14113
- resolvedModel: string | null;
14114
- status: CrowdyStudioAgentSessionStatus;
14115
- providerDataConsent: boolean;
14116
- registryDigest: string;
14117
- providerPolicyVersion: string;
14118
- appPolicyVersion: string;
14119
- contextVersion: string;
14120
- currentClientEpoch: string;
14121
- clientEpoch: string | null;
14122
- lastEventSeq: string;
14123
- createdAt: string;
14124
- updatedAt: string;
14125
- closedAt: string | null;
14126
- currentRun: {
14127
- __typename?: 'AgentRun';
14128
- runId: string;
14129
- status: CrowdyStudioAgentRunStatus;
14130
- providerRounds: number;
14131
- toolCalls: number;
14132
- errorCode: string | null;
14133
- terminalReason: string | null;
14134
- reason: string | null;
14135
- startedAt: string | null;
14136
- finishedAt: string | null;
14137
- createdAt: string;
14138
- cancelled: boolean;
14139
- } | null;
14140
- activeLeases: Array<{
14141
- __typename?: 'AgentLease';
14142
- leaseId: string;
14143
- kind: CrowdyStudioAgentLeaseType;
14144
- status: CrowdyStudioAgentLeaseStatus;
14145
- clientEpoch: string;
14146
- scopes: Array<string>;
14147
- holder: string;
14148
- contextVersion: string;
14149
- controlledEntityId: string | null;
14150
- hostCapabilityRevision: string | null;
14151
- expectedProjectRevision: string | null;
14152
- grantedAt: string;
14153
- expiresAt: string;
14154
- revokedReason: string | null;
14155
- }>;
14156
- pendingApproval: {
14157
- __typename?: 'AgentApproval';
14158
- approvalId: string;
14159
- toolCallId: string;
14160
- argumentHash: string;
14161
- status: CrowdyStudioAgentApprovalStatus;
14162
- safeSummary: string;
14163
- clientEpoch: string;
14164
- expiresAt: string;
14165
- approved: boolean;
14166
- rejected: boolean;
14167
- } | null;
14168
- }>;
14169
- };
14170
- };
14171
- export type CrowdyStudioAgentHistoryQueryVariables = Exact<{
14172
- sessionId: Scalars['String']['input'];
14173
- afterSeq?: InputMaybe<Scalars['BigInt']['input']>;
14174
- first?: InputMaybe<Scalars['Int']['input']>;
14175
- }>;
14176
- export type CrowdyStudioAgentHistoryQuery = {
14177
- __typename?: 'Query';
14178
- crowdyStudioAgentHistory: {
14179
- __typename?: 'AgentEventConnection';
14180
- hasMore: boolean;
14181
- edges: Array<{
14182
- __typename?: 'AgentEventEdge';
14183
- cursor: string;
14184
- node: {
14185
- __typename: 'AgentApprovalEvent';
14186
- protocolVersion: string;
14187
- eventId: string;
14188
- sessionId: string;
14189
- seq: string;
14190
- type: CrowdyStudioAgentEventType;
14191
- runId: string | null;
14192
- version: string;
14193
- createdAt: string;
14194
- approvalEventId: string;
14195
- approvalToolCallId: string;
14196
- approvalArgumentHash: string;
14197
- approvalStatus: CrowdyStudioAgentApprovalStatus;
14198
- approvalSafeSummary: string;
14199
- approvalReasons: Array<string>;
14200
- approvalExpiresAt: string;
14201
- } | {
14202
- __typename: 'AgentBudgetEvent';
14203
- protocolVersion: string;
14204
- eventId: string;
14205
- sessionId: string;
14206
- seq: string;
14207
- type: CrowdyStudioAgentEventType;
14208
- runId: string | null;
14209
- version: string;
14210
- createdAt: string;
14211
- budgetSnapshot: {
14212
- __typename?: 'AgentBudget';
14213
- resetAt: string | null;
14214
- platformFunded: boolean;
14215
- payer: string;
14216
- dimensions: Array<{
14217
- __typename?: 'AgentBudgetDimension';
14218
- name: string;
14219
- scope: string;
14220
- limit: string;
14221
- reserved: string;
14222
- consumed: string;
14223
- remaining: string;
14224
- unit: string;
14225
- }>;
14226
- };
14227
- } | {
14228
- __typename: 'AgentCheckpointEvent';
14229
- protocolVersion: string;
14230
- eventId: string;
14231
- sessionId: string;
14232
- seq: string;
14233
- type: CrowdyStudioAgentEventType;
14234
- runId: string | null;
14235
- version: string;
14236
- createdAt: string;
14237
- checkpointEventId: string;
14238
- checkpointProjectRevision: string;
14239
- checkpointContentHash: string;
14240
- checkpointReason: string;
14241
- checkpointRestoredAt: string | null;
14242
- checkpointFiles: Array<{
14243
- __typename?: 'AgentCheckpointFile';
14244
- target: string;
14245
- path: string;
14246
- contentHash: string;
14247
- byteLength: number;
14248
- }>;
14249
- } | {
14250
- __typename: 'AgentLeaseEvent';
14251
- protocolVersion: string;
14252
- eventId: string;
14253
- sessionId: string;
14254
- seq: string;
14255
- type: CrowdyStudioAgentEventType;
14256
- runId: string | null;
14257
- version: string;
14258
- createdAt: string;
14259
- leaseEventId: string;
14260
- leaseKind: CrowdyStudioAgentLeaseType;
14261
- leaseStatus: CrowdyStudioAgentLeaseStatus;
14262
- leaseClientEpoch: string;
14263
- leaseScopes: Array<string>;
14264
- leaseHolder: string;
14265
- leaseContextVersion: string;
14266
- leaseControlledEntityId: string | null;
14267
- leaseHostCapabilityRevision: string | null;
14268
- leaseExpectedProjectRevision: string | null;
14269
- leaseGrantedAt: string;
14270
- leaseExpiresAt: string;
14271
- leaseReason: string | null;
14272
- } | {
14273
- __typename: 'AgentLifecycleEvent';
14274
- protocolVersion: string;
14275
- eventId: string;
14276
- sessionId: string;
14277
- seq: string;
14278
- type: CrowdyStudioAgentEventType;
14279
- runId: string | null;
14280
- version: string;
14281
- createdAt: string;
14282
- lifecycleMode: CrowdyStudioAgentMode | null;
14283
- lifecycleClientEpoch: string | null;
14284
- lifecycleReplayAfterSeq: string | null;
14285
- lifecycleReason: string | null;
14286
- lifecycleContextVersion: string | null;
14287
- } | {
14288
- __typename: 'AgentMessageEvent';
14289
- protocolVersion: string;
14290
- eventId: string;
14291
- sessionId: string;
14292
- seq: string;
14293
- type: CrowdyStudioAgentEventType;
14294
- runId: string | null;
14295
- version: string;
14296
- createdAt: string;
14297
- messageEventId: string;
14298
- messageRole: string;
14299
- messageContent: string;
14300
- } | {
14301
- __typename: 'AgentRunEvent';
14302
- protocolVersion: string;
14303
- eventId: string;
14304
- sessionId: string;
14305
- seq: string;
14306
- type: CrowdyStudioAgentEventType;
14307
- runId: string | null;
14308
- version: string;
14309
- createdAt: string;
14310
- runStatus: CrowdyStudioAgentRunStatus;
14311
- runCode: string | null;
14312
- runReason: string | null;
14313
- runError: {
14314
- __typename?: 'AgentError';
14315
- code: string;
14316
- message: string;
14317
- retryable: boolean;
14318
- remediation: string | null;
14319
- field: string | null;
14320
- requiredScope: string | null;
14321
- } | null;
14322
- } | {
14323
- __typename: 'AgentToolEvent';
14324
- protocolVersion: string;
14325
- eventId: string;
14326
- sessionId: string;
14327
- seq: string;
14328
- type: CrowdyStudioAgentEventType;
14329
- runId: string | null;
14330
- version: string;
14331
- createdAt: string;
14332
- toolEventCallId: string;
14333
- toolEventName: string;
14334
- toolEventVersion: string;
14335
- toolStatus: CrowdyStudioAgentToolCallStatus;
14336
- toolSafeSummary: string | null;
14337
- toolDescriptorDigest: string | null;
14338
- toolArgumentHash: string | null;
14339
- toolExecutor: CrowdyStudioAgentToolExecutor | null;
14340
- toolContextVersion: string | null;
14341
- toolClientEpoch: string | null;
14342
- toolArgumentsJson: string | null;
14343
- toolLeaseId: string | null;
14344
- toolApprovalGrant: string | null;
14345
- toolIdempotencyKey: string | null;
14346
- toolResultJson: string | null;
14347
- toolDeadline: string | null;
14348
- toolInvocation: {
14349
- __typename?: 'AgentToolInvocation';
14350
- protocolVersion: string;
14351
- sessionId: string;
14352
- runId: string;
14353
- toolCallId: string;
14354
- name: string;
14355
- version: string;
14356
- descriptorDigest: string;
14357
- argumentsJson: string;
14358
- argumentHash: string;
14359
- contextVersion: string;
14360
- clientEpoch: string | null;
14361
- leaseId: string | null;
14362
- approvalGrant: string | null;
14363
- idempotencyKey: string | null;
14364
- deadline: string;
14365
- } | null;
14366
- toolResult: {
14367
- __typename?: 'AgentToolResultEnvelope';
14368
- protocolVersion: string;
14369
- toolCallId: string;
14370
- status: CrowdyStudioAgentToolResultStatus;
14371
- outputJson: string | null;
14372
- observedContextVersion: string;
14373
- startedAt: string;
14374
- finishedAt: string;
14375
- error: {
14376
- __typename?: 'AgentError';
14377
- code: string;
14378
- message: string;
14379
- retryable: boolean;
14380
- remediation: string | null;
14381
- field: string | null;
14382
- requiredScope: string | null;
14383
- } | null;
14384
- } | null;
14385
- toolError: {
14386
- __typename?: 'AgentError';
14387
- code: string;
14388
- message: string;
14389
- retryable: boolean;
14390
- remediation: string | null;
14391
- field: string | null;
14392
- requiredScope: string | null;
14393
- } | null;
14394
- };
14395
- }>;
14396
- pageInfo: {
14397
- __typename?: 'AgentPageInfo';
14398
- hasNextPage: boolean;
14399
- endCursor: string | null;
14400
- };
14401
- events: Array<{
14402
- __typename: 'AgentApprovalEvent';
14403
- protocolVersion: string;
14404
- eventId: string;
14405
- sessionId: string;
14406
- seq: string;
14407
- type: CrowdyStudioAgentEventType;
14408
- runId: string | null;
14409
- version: string;
14410
- createdAt: string;
14411
- approvalEventId: string;
14412
- approvalToolCallId: string;
14413
- approvalArgumentHash: string;
14414
- approvalStatus: CrowdyStudioAgentApprovalStatus;
14415
- approvalSafeSummary: string;
14416
- approvalReasons: Array<string>;
14417
- approvalExpiresAt: string;
14418
- } | {
14419
- __typename: 'AgentBudgetEvent';
14420
- protocolVersion: string;
14421
- eventId: string;
14422
- sessionId: string;
14423
- seq: string;
14424
- type: CrowdyStudioAgentEventType;
14425
- runId: string | null;
14426
- version: string;
14427
- createdAt: string;
14428
- budgetSnapshot: {
14429
- __typename?: 'AgentBudget';
14430
- resetAt: string | null;
14431
- platformFunded: boolean;
14432
- payer: string;
14433
- dimensions: Array<{
14434
- __typename?: 'AgentBudgetDimension';
14435
- name: string;
14436
- scope: string;
14437
- limit: string;
14438
- reserved: string;
14439
- consumed: string;
14440
- remaining: string;
14441
- unit: string;
14442
- }>;
14443
- };
14444
- } | {
14445
- __typename: 'AgentCheckpointEvent';
14446
- protocolVersion: string;
14447
- eventId: string;
14448
- sessionId: string;
14449
- seq: string;
14450
- type: CrowdyStudioAgentEventType;
14451
- runId: string | null;
14452
- version: string;
14453
- createdAt: string;
14454
- checkpointEventId: string;
14455
- checkpointProjectRevision: string;
14456
- checkpointContentHash: string;
14457
- checkpointReason: string;
14458
- checkpointRestoredAt: string | null;
14459
- checkpointFiles: Array<{
14460
- __typename?: 'AgentCheckpointFile';
14461
- target: string;
14462
- path: string;
14463
- contentHash: string;
14464
- byteLength: number;
14465
- }>;
14466
- } | {
14467
- __typename: 'AgentLeaseEvent';
14468
- protocolVersion: string;
14469
- eventId: string;
14470
- sessionId: string;
14471
- seq: string;
14472
- type: CrowdyStudioAgentEventType;
14473
- runId: string | null;
14474
- version: string;
14475
- createdAt: string;
14476
- leaseEventId: string;
14477
- leaseKind: CrowdyStudioAgentLeaseType;
14478
- leaseStatus: CrowdyStudioAgentLeaseStatus;
14479
- leaseClientEpoch: string;
14480
- leaseScopes: Array<string>;
14481
- leaseHolder: string;
14482
- leaseContextVersion: string;
14483
- leaseControlledEntityId: string | null;
14484
- leaseHostCapabilityRevision: string | null;
14485
- leaseExpectedProjectRevision: string | null;
14486
- leaseGrantedAt: string;
14487
- leaseExpiresAt: string;
14488
- leaseReason: string | null;
14489
- } | {
14490
- __typename: 'AgentLifecycleEvent';
14491
- protocolVersion: string;
14492
- eventId: string;
14493
- sessionId: string;
14494
- seq: string;
14495
- type: CrowdyStudioAgentEventType;
14496
- runId: string | null;
14497
- version: string;
14498
- createdAt: string;
14499
- lifecycleMode: CrowdyStudioAgentMode | null;
14500
- lifecycleClientEpoch: string | null;
14501
- lifecycleReplayAfterSeq: string | null;
14502
- lifecycleReason: string | null;
14503
- lifecycleContextVersion: string | null;
14504
- } | {
14505
- __typename: 'AgentMessageEvent';
14506
- protocolVersion: string;
14507
- eventId: string;
14508
- sessionId: string;
14509
- seq: string;
14510
- type: CrowdyStudioAgentEventType;
14511
- runId: string | null;
14512
- version: string;
14513
- createdAt: string;
14514
- messageEventId: string;
14515
- messageRole: string;
14516
- messageContent: string;
14517
- } | {
14518
- __typename: 'AgentRunEvent';
14519
- protocolVersion: string;
14520
- eventId: string;
14521
- sessionId: string;
14522
- seq: string;
14523
- type: CrowdyStudioAgentEventType;
14524
- runId: string | null;
14525
- version: string;
14526
- createdAt: string;
14527
- runStatus: CrowdyStudioAgentRunStatus;
14528
- runCode: string | null;
14529
- runReason: string | null;
14530
- runError: {
14531
- __typename?: 'AgentError';
14532
- code: string;
14533
- message: string;
14534
- retryable: boolean;
14535
- remediation: string | null;
14536
- field: string | null;
14537
- requiredScope: string | null;
14538
- } | null;
14539
- } | {
14540
- __typename: 'AgentToolEvent';
14541
- protocolVersion: string;
14542
- eventId: string;
14543
- sessionId: string;
14544
- seq: string;
14545
- type: CrowdyStudioAgentEventType;
14546
- runId: string | null;
14547
- version: string;
14548
- createdAt: string;
14549
- toolEventCallId: string;
14550
- toolEventName: string;
14551
- toolEventVersion: string;
14552
- toolStatus: CrowdyStudioAgentToolCallStatus;
14553
- toolSafeSummary: string | null;
14554
- toolDescriptorDigest: string | null;
14555
- toolArgumentHash: string | null;
14556
- toolExecutor: CrowdyStudioAgentToolExecutor | null;
14557
- toolContextVersion: string | null;
14558
- toolClientEpoch: string | null;
14559
- toolArgumentsJson: string | null;
14560
- toolLeaseId: string | null;
14561
- toolApprovalGrant: string | null;
14562
- toolIdempotencyKey: string | null;
14563
- toolResultJson: string | null;
14564
- toolDeadline: string | null;
14565
- toolInvocation: {
14566
- __typename?: 'AgentToolInvocation';
14567
- protocolVersion: string;
14568
- sessionId: string;
14569
- runId: string;
14570
- toolCallId: string;
14571
- name: string;
14572
- version: string;
14573
- descriptorDigest: string;
14574
- argumentsJson: string;
14575
- argumentHash: string;
14576
- contextVersion: string;
14577
- clientEpoch: string | null;
14578
- leaseId: string | null;
14579
- approvalGrant: string | null;
14580
- idempotencyKey: string | null;
14581
- deadline: string;
14582
- } | null;
14583
- toolResult: {
14584
- __typename?: 'AgentToolResultEnvelope';
14585
- protocolVersion: string;
14586
- toolCallId: string;
14587
- status: CrowdyStudioAgentToolResultStatus;
14588
- outputJson: string | null;
14589
- observedContextVersion: string;
14590
- startedAt: string;
14591
- finishedAt: string;
14592
- error: {
14593
- __typename?: 'AgentError';
14594
- code: string;
14595
- message: string;
14596
- retryable: boolean;
14597
- remediation: string | null;
14598
- field: string | null;
14599
- requiredScope: string | null;
14600
- } | null;
14601
- } | null;
14602
- toolError: {
14603
- __typename?: 'AgentError';
14604
- code: string;
14605
- message: string;
14606
- retryable: boolean;
14607
- remediation: string | null;
14608
- field: string | null;
14609
- requiredScope: string | null;
14610
- } | null;
14611
- }>;
14612
- };
14613
- };
14614
- export type CrowdyStudioAgentToolDescriptorsQueryVariables = Exact<{
14615
- sessionId: Scalars['String']['input'];
14616
- }>;
14617
- export type CrowdyStudioAgentToolDescriptorsQuery = {
14618
- __typename?: 'Query';
14619
- crowdyStudioAgentToolDescriptors: {
14620
- __typename?: 'AgentToolDescriptorSet';
14621
- registryDigest: string;
14622
- tools: Array<{
14623
- __typename?: 'AgentToolDescriptor';
14624
- schemaVersion: string;
14625
- name: string;
14626
- wireName: string;
14627
- version: string;
14628
- summary: string;
14629
- executor: CrowdyStudioAgentToolExecutor;
14630
- modes: Array<CrowdyStudioAgentMode>;
14631
- risk: CrowdyStudioAgentToolRisk;
14632
- riskEffects: Array<string>;
14633
- riskReversible: boolean;
14634
- scopes: Array<string>;
14635
- scopeRequirementsJson: string;
14636
- approvalRequired: boolean;
14637
- approvalPolicy: string;
14638
- approvalReasons: Array<string>;
14639
- approvalMaxTtlSeconds: number;
14640
- idempotencyClass: string;
14641
- idempotencyKeyScope: string;
14642
- timeoutMs: number;
14643
- inputSchemaJson: string;
14644
- outputSchemaJson: string;
14645
- inputRedactionJson: string;
14646
- outputRedactionJson: string;
14647
- maxPersistedBytes: number;
14648
- descriptorJson: string;
14649
- descriptorDigest: string;
14650
- }>;
14651
- };
14652
- };
14653
- export type CrowdyStudioAgentBudgetQueryVariables = Exact<{
14654
- sessionId: Scalars['String']['input'];
14655
- }>;
14656
- export type CrowdyStudioAgentBudgetQuery = {
14657
- __typename?: 'Query';
14658
- crowdyStudioAgentBudget: {
14659
- __typename?: 'AgentBudget';
14660
- resetAt: string | null;
14661
- platformFunded: boolean;
14662
- payer: string;
14663
- dimensions: Array<{
14664
- __typename?: 'AgentBudgetDimension';
14665
- name: string;
14666
- scope: string;
14667
- limit: string;
14668
- reserved: string;
14669
- consumed: string;
14670
- remaining: string;
14671
- unit: string;
14672
- }>;
14673
- };
14674
- };
14675
- export type CrowdyStudioAgentCreateSessionMutationVariables = Exact<{
14676
- input: CreateAgentSessionInput;
14677
- }>;
14678
- export type CrowdyStudioAgentCreateSessionMutation = {
14679
- __typename?: 'Mutation';
14680
- crowdyStudioAgentCreateSession: {
14681
- __typename?: 'AgentSession';
14682
- contractVersion: string;
14683
- sessionId: string;
14684
- appId: string;
14685
- projectId: string | null;
14686
- gridId: string | null;
14687
- mode: CrowdyStudioAgentMode;
14688
- requestedModel: string;
14689
- model: string | null;
14690
- resolvedModel: string | null;
14691
- status: CrowdyStudioAgentSessionStatus;
14692
- providerDataConsent: boolean;
14693
- registryDigest: string;
14694
- providerPolicyVersion: string;
14695
- appPolicyVersion: string;
14696
- contextVersion: string;
14697
- currentClientEpoch: string;
14698
- clientEpoch: string | null;
14699
- lastEventSeq: string;
14700
- createdAt: string;
14701
- updatedAt: string;
14702
- closedAt: string | null;
14703
- currentRun: {
14704
- __typename?: 'AgentRun';
14705
- runId: string;
14706
- status: CrowdyStudioAgentRunStatus;
14707
- providerRounds: number;
14708
- toolCalls: number;
14709
- errorCode: string | null;
14710
- terminalReason: string | null;
14711
- reason: string | null;
14712
- startedAt: string | null;
14713
- finishedAt: string | null;
14714
- createdAt: string;
14715
- cancelled: boolean;
14716
- } | null;
14717
- activeLeases: Array<{
14718
- __typename?: 'AgentLease';
14719
- leaseId: string;
14720
- kind: CrowdyStudioAgentLeaseType;
14721
- status: CrowdyStudioAgentLeaseStatus;
14722
- clientEpoch: string;
14723
- scopes: Array<string>;
14724
- holder: string;
14725
- contextVersion: string;
14726
- controlledEntityId: string | null;
14727
- hostCapabilityRevision: string | null;
14728
- expectedProjectRevision: string | null;
14729
- grantedAt: string;
14730
- expiresAt: string;
14731
- revokedReason: string | null;
14732
- }>;
14733
- pendingApproval: {
14734
- __typename?: 'AgentApproval';
14735
- approvalId: string;
14736
- toolCallId: string;
14737
- argumentHash: string;
14738
- status: CrowdyStudioAgentApprovalStatus;
14739
- safeSummary: string;
14740
- clientEpoch: string;
14741
- expiresAt: string;
14742
- approved: boolean;
14743
- rejected: boolean;
14744
- } | null;
14745
- };
14746
- };
14747
- export type CrowdyStudioAgentAttachClientMutationVariables = Exact<{
14748
- input: AttachAgentClientInput;
14749
- }>;
14750
- export type CrowdyStudioAgentAttachClientMutation = {
14751
- __typename?: 'Mutation';
14752
- crowdyStudioAgentAttachClient: {
14753
- __typename?: 'AgentClientAttachment';
14754
- clientEpoch: string;
14755
- replayAfterSeq: string;
14756
- session: {
14757
- __typename?: 'AgentSession';
14758
- contractVersion: string;
14759
- sessionId: string;
14760
- appId: string;
14761
- projectId: string | null;
14762
- gridId: string | null;
14763
- mode: CrowdyStudioAgentMode;
14764
- requestedModel: string;
14765
- model: string | null;
14766
- resolvedModel: string | null;
14767
- status: CrowdyStudioAgentSessionStatus;
14768
- providerDataConsent: boolean;
14769
- registryDigest: string;
14770
- providerPolicyVersion: string;
14771
- appPolicyVersion: string;
14772
- contextVersion: string;
14773
- currentClientEpoch: string;
14774
- clientEpoch: string | null;
14775
- lastEventSeq: string;
14776
- createdAt: string;
14777
- updatedAt: string;
14778
- closedAt: string | null;
14779
- currentRun: {
14780
- __typename?: 'AgentRun';
14781
- runId: string;
14782
- status: CrowdyStudioAgentRunStatus;
14783
- providerRounds: number;
14784
- toolCalls: number;
14785
- errorCode: string | null;
14786
- terminalReason: string | null;
14787
- reason: string | null;
14788
- startedAt: string | null;
14789
- finishedAt: string | null;
14790
- createdAt: string;
14791
- cancelled: boolean;
14792
- } | null;
14793
- activeLeases: Array<{
14794
- __typename?: 'AgentLease';
14795
- leaseId: string;
14796
- kind: CrowdyStudioAgentLeaseType;
14797
- status: CrowdyStudioAgentLeaseStatus;
14798
- clientEpoch: string;
14799
- scopes: Array<string>;
14800
- holder: string;
14801
- contextVersion: string;
14802
- controlledEntityId: string | null;
14803
- hostCapabilityRevision: string | null;
14804
- expectedProjectRevision: string | null;
14805
- grantedAt: string;
14806
- expiresAt: string;
14807
- revokedReason: string | null;
14808
- }>;
14809
- pendingApproval: {
14810
- __typename?: 'AgentApproval';
14811
- approvalId: string;
14812
- toolCallId: string;
14813
- argumentHash: string;
14814
- status: CrowdyStudioAgentApprovalStatus;
14815
- safeSummary: string;
14816
- clientEpoch: string;
14817
- expiresAt: string;
14818
- approved: boolean;
14819
- rejected: boolean;
14820
- } | null;
14821
- };
14822
- };
14823
- };
14824
- export type CrowdyStudioAgentSetModeMutationVariables = Exact<{
14825
- input: SetAgentModeInput;
14826
- }>;
14827
- export type CrowdyStudioAgentSetModeMutation = {
14828
- __typename?: 'Mutation';
14829
- crowdyStudioAgentSetMode: {
14830
- __typename?: 'AgentSession';
14831
- contractVersion: string;
14832
- sessionId: string;
14833
- appId: string;
14834
- projectId: string | null;
14835
- gridId: string | null;
14836
- mode: CrowdyStudioAgentMode;
14837
- requestedModel: string;
14838
- model: string | null;
14839
- resolvedModel: string | null;
14840
- status: CrowdyStudioAgentSessionStatus;
14841
- providerDataConsent: boolean;
14842
- registryDigest: string;
14843
- providerPolicyVersion: string;
14844
- appPolicyVersion: string;
14845
- contextVersion: string;
14846
- currentClientEpoch: string;
14847
- clientEpoch: string | null;
14848
- lastEventSeq: string;
14849
- createdAt: string;
14850
- updatedAt: string;
14851
- closedAt: string | null;
14852
- currentRun: {
14853
- __typename?: 'AgentRun';
14854
- runId: string;
14855
- status: CrowdyStudioAgentRunStatus;
14856
- providerRounds: number;
14857
- toolCalls: number;
14858
- errorCode: string | null;
14859
- terminalReason: string | null;
14860
- reason: string | null;
14861
- startedAt: string | null;
14862
- finishedAt: string | null;
14863
- createdAt: string;
14864
- cancelled: boolean;
14865
- } | null;
14866
- activeLeases: Array<{
14867
- __typename?: 'AgentLease';
14868
- leaseId: string;
14869
- kind: CrowdyStudioAgentLeaseType;
14870
- status: CrowdyStudioAgentLeaseStatus;
14871
- clientEpoch: string;
14872
- scopes: Array<string>;
14873
- holder: string;
14874
- contextVersion: string;
14875
- controlledEntityId: string | null;
14876
- hostCapabilityRevision: string | null;
14877
- expectedProjectRevision: string | null;
14878
- grantedAt: string;
14879
- expiresAt: string;
14880
- revokedReason: string | null;
14881
- }>;
14882
- pendingApproval: {
14883
- __typename?: 'AgentApproval';
14884
- approvalId: string;
14885
- toolCallId: string;
14886
- argumentHash: string;
14887
- status: CrowdyStudioAgentApprovalStatus;
14888
- safeSummary: string;
14889
- clientEpoch: string;
14890
- expiresAt: string;
14891
- approved: boolean;
14892
- rejected: boolean;
14893
- } | null;
14894
- };
14895
- };
14896
- export type CrowdyStudioAgentAcknowledgeEventsMutationVariables = Exact<{
14897
- input: AcknowledgeAgentEventsInput;
14898
- }>;
14899
- export type CrowdyStudioAgentAcknowledgeEventsMutation = {
14900
- __typename?: 'Mutation';
14901
- crowdyStudioAgentAcknowledgeEvents: {
14902
- __typename?: 'AgentEventAcknowledgement';
14903
- throughSeq: string;
14904
- };
14905
- };
14906
- export type CrowdyStudioAgentHeartbeatMutationVariables = Exact<{
14907
- input: AgentHeartbeatInput;
14908
- }>;
14909
- export type CrowdyStudioAgentHeartbeatMutation = {
14910
- __typename?: 'Mutation';
14911
- crowdyStudioAgentHeartbeat: {
14912
- __typename?: 'AgentHeartbeat';
14913
- serverTime: string;
14914
- playLeaseFreshUntil: string | null;
14915
- workspaceLeaseExpiresAt: string | null;
14916
- };
14917
- };
14918
- export type CrowdyStudioAgentSendMessageMutationVariables = Exact<{
14919
- input: SendAgentMessageInput;
14920
- }>;
14921
- export type CrowdyStudioAgentSendMessageMutation = {
14922
- __typename?: 'Mutation';
14923
- crowdyStudioAgentSendMessage: {
14924
- __typename?: 'AgentRun';
14925
- runId: string;
14926
- status: CrowdyStudioAgentRunStatus;
14927
- providerRounds: number;
14928
- toolCalls: number;
14929
- errorCode: string | null;
14930
- terminalReason: string | null;
14931
- reason: string | null;
14932
- startedAt: string | null;
14933
- finishedAt: string | null;
14934
- createdAt: string;
14935
- cancelled: boolean;
14936
- };
14937
- };
14938
- export type CrowdyStudioAgentApproveToolMutationVariables = Exact<{
14939
- input: DecideAgentToolInput;
14940
- }>;
14941
- export type CrowdyStudioAgentApproveToolMutation = {
14942
- __typename?: 'Mutation';
14943
- crowdyStudioAgentApproveTool: {
14944
- __typename?: 'AgentApproval';
14945
- approvalId: string;
14946
- toolCallId: string;
14947
- argumentHash: string;
14948
- status: CrowdyStudioAgentApprovalStatus;
14949
- safeSummary: string;
14950
- clientEpoch: string;
14951
- expiresAt: string;
14952
- approved: boolean;
14953
- rejected: boolean;
14954
- };
14955
- };
14956
- export type CrowdyStudioAgentRejectToolMutationVariables = Exact<{
14957
- input: DecideAgentToolInput;
14958
- }>;
14959
- export type CrowdyStudioAgentRejectToolMutation = {
14960
- __typename?: 'Mutation';
14961
- crowdyStudioAgentRejectTool: {
14962
- __typename?: 'AgentApproval';
14963
- approvalId: string;
14964
- toolCallId: string;
14965
- argumentHash: string;
14966
- status: CrowdyStudioAgentApprovalStatus;
14967
- safeSummary: string;
14968
- clientEpoch: string;
14969
- expiresAt: string;
14970
- approved: boolean;
14971
- rejected: boolean;
14972
- };
14973
- };
14974
- export type CrowdyStudioAgentToolResultMutationVariables = Exact<{
14975
- input: AgentToolResultInput;
14976
- }>;
14977
- export type CrowdyStudioAgentToolResultMutation = {
14978
- __typename?: 'Mutation';
14979
- crowdyStudioAgentToolResult: {
14980
- __typename?: 'AgentToolCall';
14981
- toolCallId: string;
14982
- toolName: string;
14983
- status: CrowdyStudioAgentToolCallStatus;
14984
- argumentHash: string;
14985
- accepted: boolean;
14986
- error: {
14987
- __typename?: 'AgentError';
14988
- code: string;
14989
- message: string;
14990
- retryable: boolean;
14991
- remediation: string | null;
14992
- field: string | null;
14993
- requiredScope: string | null;
14994
- } | null;
14995
- };
14996
- };
14997
- export type CrowdyStudioAgentGrantLeaseMutationVariables = Exact<{
14998
- input: GrantAgentLeaseInput;
14999
- }>;
15000
- export type CrowdyStudioAgentGrantLeaseMutation = {
15001
- __typename?: 'Mutation';
15002
- crowdyStudioAgentGrantLease: {
15003
- __typename?: 'AgentLease';
15004
- leaseId: string;
15005
- kind: CrowdyStudioAgentLeaseType;
15006
- status: CrowdyStudioAgentLeaseStatus;
15007
- clientEpoch: string;
15008
- scopes: Array<string>;
15009
- holder: string;
15010
- contextVersion: string;
15011
- controlledEntityId: string | null;
15012
- hostCapabilityRevision: string | null;
15013
- expectedProjectRevision: string | null;
15014
- grantedAt: string;
15015
- expiresAt: string;
15016
- revokedReason: string | null;
15017
- };
15018
- };
15019
- export type CrowdyStudioAgentRevokeLeaseMutationVariables = Exact<{
15020
- input: RevokeAgentLeaseInput;
15021
- }>;
15022
- export type CrowdyStudioAgentRevokeLeaseMutation = {
15023
- __typename?: 'Mutation';
15024
- crowdyStudioAgentRevokeLease: {
15025
- __typename?: 'AgentLease';
15026
- leaseId: string;
15027
- kind: CrowdyStudioAgentLeaseType;
15028
- status: CrowdyStudioAgentLeaseStatus;
15029
- clientEpoch: string;
15030
- scopes: Array<string>;
15031
- holder: string;
15032
- contextVersion: string;
15033
- controlledEntityId: string | null;
15034
- hostCapabilityRevision: string | null;
15035
- expectedProjectRevision: string | null;
15036
- grantedAt: string;
15037
- expiresAt: string;
15038
- revokedReason: string | null;
15039
- };
15040
- };
15041
- export type CrowdyStudioAgentPauseMutationVariables = Exact<{
15042
- input: AgentSessionControlInput;
15043
- }>;
15044
- export type CrowdyStudioAgentPauseMutation = {
15045
- __typename?: 'Mutation';
15046
- crowdyStudioAgentPause: {
15047
- __typename?: 'AgentSession';
15048
- contractVersion: string;
15049
- sessionId: string;
15050
- appId: string;
15051
- projectId: string | null;
15052
- gridId: string | null;
15053
- mode: CrowdyStudioAgentMode;
15054
- requestedModel: string;
15055
- model: string | null;
15056
- resolvedModel: string | null;
15057
- status: CrowdyStudioAgentSessionStatus;
15058
- providerDataConsent: boolean;
15059
- registryDigest: string;
15060
- providerPolicyVersion: string;
15061
- appPolicyVersion: string;
15062
- contextVersion: string;
15063
- currentClientEpoch: string;
15064
- clientEpoch: string | null;
15065
- lastEventSeq: string;
15066
- createdAt: string;
15067
- updatedAt: string;
15068
- closedAt: string | null;
15069
- currentRun: {
15070
- __typename?: 'AgentRun';
15071
- runId: string;
15072
- status: CrowdyStudioAgentRunStatus;
15073
- providerRounds: number;
15074
- toolCalls: number;
15075
- errorCode: string | null;
15076
- terminalReason: string | null;
15077
- reason: string | null;
15078
- startedAt: string | null;
15079
- finishedAt: string | null;
15080
- createdAt: string;
15081
- cancelled: boolean;
15082
- } | null;
15083
- activeLeases: Array<{
15084
- __typename?: 'AgentLease';
15085
- leaseId: string;
15086
- kind: CrowdyStudioAgentLeaseType;
15087
- status: CrowdyStudioAgentLeaseStatus;
15088
- clientEpoch: string;
15089
- scopes: Array<string>;
15090
- holder: string;
15091
- contextVersion: string;
15092
- controlledEntityId: string | null;
15093
- hostCapabilityRevision: string | null;
15094
- expectedProjectRevision: string | null;
15095
- grantedAt: string;
15096
- expiresAt: string;
15097
- revokedReason: string | null;
15098
- }>;
15099
- pendingApproval: {
15100
- __typename?: 'AgentApproval';
15101
- approvalId: string;
15102
- toolCallId: string;
15103
- argumentHash: string;
15104
- status: CrowdyStudioAgentApprovalStatus;
15105
- safeSummary: string;
15106
- clientEpoch: string;
15107
- expiresAt: string;
15108
- approved: boolean;
15109
- rejected: boolean;
15110
- } | null;
15111
- };
15112
- };
15113
- export type CrowdyStudioAgentResumeMutationVariables = Exact<{
15114
- input: AgentSessionControlInput;
15115
- }>;
15116
- export type CrowdyStudioAgentResumeMutation = {
15117
- __typename?: 'Mutation';
15118
- crowdyStudioAgentResume: {
15119
- __typename?: 'AgentSession';
15120
- contractVersion: string;
15121
- sessionId: string;
15122
- appId: string;
15123
- projectId: string | null;
15124
- gridId: string | null;
15125
- mode: CrowdyStudioAgentMode;
15126
- requestedModel: string;
15127
- model: string | null;
15128
- resolvedModel: string | null;
15129
- status: CrowdyStudioAgentSessionStatus;
15130
- providerDataConsent: boolean;
15131
- registryDigest: string;
15132
- providerPolicyVersion: string;
15133
- appPolicyVersion: string;
15134
- contextVersion: string;
15135
- currentClientEpoch: string;
15136
- clientEpoch: string | null;
15137
- lastEventSeq: string;
15138
- createdAt: string;
15139
- updatedAt: string;
15140
- closedAt: string | null;
15141
- currentRun: {
15142
- __typename?: 'AgentRun';
15143
- runId: string;
15144
- status: CrowdyStudioAgentRunStatus;
15145
- providerRounds: number;
15146
- toolCalls: number;
15147
- errorCode: string | null;
15148
- terminalReason: string | null;
15149
- reason: string | null;
15150
- startedAt: string | null;
15151
- finishedAt: string | null;
15152
- createdAt: string;
15153
- cancelled: boolean;
15154
- } | null;
15155
- activeLeases: Array<{
15156
- __typename?: 'AgentLease';
15157
- leaseId: string;
15158
- kind: CrowdyStudioAgentLeaseType;
15159
- status: CrowdyStudioAgentLeaseStatus;
15160
- clientEpoch: string;
15161
- scopes: Array<string>;
15162
- holder: string;
15163
- contextVersion: string;
15164
- controlledEntityId: string | null;
15165
- hostCapabilityRevision: string | null;
15166
- expectedProjectRevision: string | null;
15167
- grantedAt: string;
15168
- expiresAt: string;
15169
- revokedReason: string | null;
15170
- }>;
15171
- pendingApproval: {
15172
- __typename?: 'AgentApproval';
15173
- approvalId: string;
15174
- toolCallId: string;
15175
- argumentHash: string;
15176
- status: CrowdyStudioAgentApprovalStatus;
15177
- safeSummary: string;
15178
- clientEpoch: string;
15179
- expiresAt: string;
15180
- approved: boolean;
15181
- rejected: boolean;
15182
- } | null;
15183
- };
15184
- };
15185
- export type CrowdyStudioAgentCancelRunMutationVariables = Exact<{
15186
- input: CancelAgentRunInput;
15187
- }>;
15188
- export type CrowdyStudioAgentCancelRunMutation = {
15189
- __typename?: 'Mutation';
15190
- crowdyStudioAgentCancelRun: {
15191
- __typename?: 'AgentRun';
15192
- runId: string;
15193
- status: CrowdyStudioAgentRunStatus;
15194
- providerRounds: number;
15195
- toolCalls: number;
15196
- errorCode: string | null;
15197
- terminalReason: string | null;
15198
- reason: string | null;
15199
- startedAt: string | null;
15200
- finishedAt: string | null;
15201
- createdAt: string;
15202
- cancelled: boolean;
15203
- };
15204
- };
15205
- export type CrowdyStudioAgentCloseSessionMutationVariables = Exact<{
15206
- input: AgentSessionControlInput;
15207
- }>;
15208
- export type CrowdyStudioAgentCloseSessionMutation = {
15209
- __typename?: 'Mutation';
15210
- crowdyStudioAgentCloseSession: {
15211
- __typename?: 'AgentSession';
15212
- contractVersion: string;
15213
- sessionId: string;
15214
- appId: string;
15215
- projectId: string | null;
15216
- gridId: string | null;
15217
- mode: CrowdyStudioAgentMode;
15218
- requestedModel: string;
15219
- model: string | null;
15220
- resolvedModel: string | null;
15221
- status: CrowdyStudioAgentSessionStatus;
15222
- providerDataConsent: boolean;
15223
- registryDigest: string;
15224
- providerPolicyVersion: string;
15225
- appPolicyVersion: string;
15226
- contextVersion: string;
15227
- currentClientEpoch: string;
15228
- clientEpoch: string | null;
15229
- lastEventSeq: string;
15230
- createdAt: string;
15231
- updatedAt: string;
15232
- closedAt: string | null;
15233
- currentRun: {
15234
- __typename?: 'AgentRun';
15235
- runId: string;
15236
- status: CrowdyStudioAgentRunStatus;
15237
- providerRounds: number;
15238
- toolCalls: number;
15239
- errorCode: string | null;
15240
- terminalReason: string | null;
15241
- reason: string | null;
15242
- startedAt: string | null;
15243
- finishedAt: string | null;
15244
- createdAt: string;
15245
- cancelled: boolean;
15246
- } | null;
15247
- activeLeases: Array<{
15248
- __typename?: 'AgentLease';
15249
- leaseId: string;
15250
- kind: CrowdyStudioAgentLeaseType;
15251
- status: CrowdyStudioAgentLeaseStatus;
15252
- clientEpoch: string;
15253
- scopes: Array<string>;
15254
- holder: string;
15255
- contextVersion: string;
15256
- controlledEntityId: string | null;
15257
- hostCapabilityRevision: string | null;
15258
- expectedProjectRevision: string | null;
15259
- grantedAt: string;
15260
- expiresAt: string;
15261
- revokedReason: string | null;
15262
- }>;
15263
- pendingApproval: {
15264
- __typename?: 'AgentApproval';
15265
- approvalId: string;
15266
- toolCallId: string;
15267
- argumentHash: string;
15268
- status: CrowdyStudioAgentApprovalStatus;
15269
- safeSummary: string;
15270
- clientEpoch: string;
15271
- expiresAt: string;
15272
- approved: boolean;
15273
- rejected: boolean;
15274
- } | null;
15275
- };
15276
- };
15277
- export type CrowdyStudioAgentEventsSubscriptionVariables = Exact<{
15278
- sessionId: Scalars['String']['input'];
15279
- afterSeq: Scalars['BigInt']['input'];
15280
- clientEpoch: Scalars['BigInt']['input'];
15281
- }>;
15282
- export type CrowdyStudioAgentEventsSubscription = {
15283
- __typename?: 'Subscription';
15284
- crowdyStudioAgentEvents: {
15285
- __typename: 'AgentApprovalEvent';
15286
- protocolVersion: string;
15287
- eventId: string;
15288
- sessionId: string;
15289
- seq: string;
15290
- type: CrowdyStudioAgentEventType;
15291
- runId: string | null;
15292
- version: string;
15293
- createdAt: string;
15294
- approvalEventId: string;
15295
- approvalToolCallId: string;
15296
- approvalArgumentHash: string;
15297
- approvalStatus: CrowdyStudioAgentApprovalStatus;
15298
- approvalSafeSummary: string;
15299
- approvalReasons: Array<string>;
15300
- approvalExpiresAt: string;
15301
- } | {
15302
- __typename: 'AgentBudgetEvent';
15303
- protocolVersion: string;
15304
- eventId: string;
15305
- sessionId: string;
15306
- seq: string;
15307
- type: CrowdyStudioAgentEventType;
15308
- runId: string | null;
15309
- version: string;
15310
- createdAt: string;
15311
- budgetSnapshot: {
15312
- __typename?: 'AgentBudget';
15313
- resetAt: string | null;
15314
- platformFunded: boolean;
15315
- payer: string;
15316
- dimensions: Array<{
15317
- __typename?: 'AgentBudgetDimension';
15318
- name: string;
15319
- scope: string;
15320
- limit: string;
15321
- reserved: string;
15322
- consumed: string;
15323
- remaining: string;
15324
- unit: string;
15325
- }>;
15326
- };
15327
- } | {
15328
- __typename: 'AgentCheckpointEvent';
15329
- protocolVersion: string;
15330
- eventId: string;
15331
- sessionId: string;
15332
- seq: string;
15333
- type: CrowdyStudioAgentEventType;
15334
- runId: string | null;
15335
- version: string;
15336
- createdAt: string;
15337
- checkpointEventId: string;
15338
- checkpointProjectRevision: string;
15339
- checkpointContentHash: string;
15340
- checkpointReason: string;
15341
- checkpointRestoredAt: string | null;
15342
- checkpointFiles: Array<{
15343
- __typename?: 'AgentCheckpointFile';
15344
- target: string;
15345
- path: string;
15346
- contentHash: string;
15347
- byteLength: number;
15348
- }>;
15349
- } | {
15350
- __typename: 'AgentLeaseEvent';
15351
- protocolVersion: string;
15352
- eventId: string;
15353
- sessionId: string;
15354
- seq: string;
15355
- type: CrowdyStudioAgentEventType;
15356
- runId: string | null;
15357
- version: string;
15358
- createdAt: string;
15359
- leaseEventId: string;
15360
- leaseKind: CrowdyStudioAgentLeaseType;
15361
- leaseStatus: CrowdyStudioAgentLeaseStatus;
15362
- leaseClientEpoch: string;
15363
- leaseScopes: Array<string>;
15364
- leaseHolder: string;
15365
- leaseContextVersion: string;
15366
- leaseControlledEntityId: string | null;
15367
- leaseHostCapabilityRevision: string | null;
15368
- leaseExpectedProjectRevision: string | null;
15369
- leaseGrantedAt: string;
15370
- leaseExpiresAt: string;
15371
- leaseReason: string | null;
15372
- } | {
15373
- __typename: 'AgentLifecycleEvent';
15374
- protocolVersion: string;
15375
- eventId: string;
15376
- sessionId: string;
15377
- seq: string;
15378
- type: CrowdyStudioAgentEventType;
15379
- runId: string | null;
15380
- version: string;
15381
- createdAt: string;
15382
- lifecycleMode: CrowdyStudioAgentMode | null;
15383
- lifecycleClientEpoch: string | null;
15384
- lifecycleReplayAfterSeq: string | null;
15385
- lifecycleReason: string | null;
15386
- lifecycleContextVersion: string | null;
15387
- } | {
15388
- __typename: 'AgentMessageEvent';
15389
- protocolVersion: string;
15390
- eventId: string;
15391
- sessionId: string;
15392
- seq: string;
15393
- type: CrowdyStudioAgentEventType;
15394
- runId: string | null;
15395
- version: string;
15396
- createdAt: string;
15397
- messageEventId: string;
15398
- messageRole: string;
15399
- messageContent: string;
15400
- } | {
15401
- __typename: 'AgentRunEvent';
15402
- protocolVersion: string;
15403
- eventId: string;
15404
- sessionId: string;
15405
- seq: string;
15406
- type: CrowdyStudioAgentEventType;
15407
- runId: string | null;
15408
- version: string;
15409
- createdAt: string;
15410
- runStatus: CrowdyStudioAgentRunStatus;
15411
- runCode: string | null;
15412
- runReason: string | null;
15413
- runError: {
15414
- __typename?: 'AgentError';
15415
- code: string;
15416
- message: string;
15417
- retryable: boolean;
15418
- remediation: string | null;
15419
- field: string | null;
15420
- requiredScope: string | null;
15421
- } | null;
15422
- } | {
15423
- __typename: 'AgentToolEvent';
15424
- protocolVersion: string;
15425
- eventId: string;
15426
- sessionId: string;
15427
- seq: string;
15428
- type: CrowdyStudioAgentEventType;
15429
- runId: string | null;
15430
- version: string;
15431
- createdAt: string;
15432
- toolEventCallId: string;
15433
- toolEventName: string;
15434
- toolEventVersion: string;
15435
- toolStatus: CrowdyStudioAgentToolCallStatus;
15436
- toolSafeSummary: string | null;
15437
- toolDescriptorDigest: string | null;
15438
- toolArgumentHash: string | null;
15439
- toolExecutor: CrowdyStudioAgentToolExecutor | null;
15440
- toolContextVersion: string | null;
15441
- toolClientEpoch: string | null;
15442
- toolArgumentsJson: string | null;
15443
- toolLeaseId: string | null;
15444
- toolApprovalGrant: string | null;
15445
- toolIdempotencyKey: string | null;
15446
- toolResultJson: string | null;
15447
- toolDeadline: string | null;
15448
- toolInvocation: {
15449
- __typename?: 'AgentToolInvocation';
15450
- protocolVersion: string;
15451
- sessionId: string;
15452
- runId: string;
15453
- toolCallId: string;
15454
- name: string;
15455
- version: string;
15456
- descriptorDigest: string;
15457
- argumentsJson: string;
15458
- argumentHash: string;
15459
- contextVersion: string;
15460
- clientEpoch: string | null;
15461
- leaseId: string | null;
15462
- approvalGrant: string | null;
15463
- idempotencyKey: string | null;
15464
- deadline: string;
15465
- } | null;
15466
- toolResult: {
15467
- __typename?: 'AgentToolResultEnvelope';
15468
- protocolVersion: string;
15469
- toolCallId: string;
15470
- status: CrowdyStudioAgentToolResultStatus;
15471
- outputJson: string | null;
15472
- observedContextVersion: string;
15473
- startedAt: string;
15474
- finishedAt: string;
15475
- error: {
15476
- __typename?: 'AgentError';
15477
- code: string;
15478
- message: string;
15479
- retryable: boolean;
15480
- remediation: string | null;
15481
- field: string | null;
15482
- requiredScope: string | null;
15483
- } | null;
15484
- } | null;
15485
- toolError: {
15486
- __typename?: 'AgentError';
15487
- code: string;
15488
- message: string;
15489
- retryable: boolean;
15490
- remediation: string | null;
15491
- field: string | null;
15492
- requiredScope: string | null;
15493
- } | null;
15494
- };
15495
- };
15496
13165
  export type GridOwnershipFieldsFragment = {
15497
13166
  __typename?: 'GridOwnership';
15498
13167
  gridOwnershipId: string;
@@ -20887,15 +18556,6 @@ export declare const ComputeTriggerFieldsFragmentDoc: DocumentNode<ComputeTrigge
20887
18556
  export declare const ComputePolicyFieldsFragmentDoc: DocumentNode<ComputePolicyFieldsFragment, unknown>;
20888
18557
  export declare const ComputeRunFieldsFragmentDoc: DocumentNode<ComputeRunFieldsFragment, unknown>;
20889
18558
  export declare const CrowdyStudioProjectFieldsFragmentDoc: DocumentNode<CrowdyStudioProjectFieldsFragment, unknown>;
20890
- export declare const CrowdyAgentRunFieldsFragmentDoc: DocumentNode<CrowdyAgentRunFieldsFragment, unknown>;
20891
- export declare const CrowdyAgentLeaseFieldsFragmentDoc: DocumentNode<CrowdyAgentLeaseFieldsFragment, unknown>;
20892
- export declare const CrowdyAgentApprovalFieldsFragmentDoc: DocumentNode<CrowdyAgentApprovalFieldsFragment, unknown>;
20893
- export declare const CrowdyAgentSessionFieldsFragmentDoc: DocumentNode<CrowdyAgentSessionFieldsFragment, unknown>;
20894
- export declare const CrowdyAgentToolDescriptorFieldsFragmentDoc: DocumentNode<CrowdyAgentToolDescriptorFieldsFragment, unknown>;
20895
- export declare const CrowdyAgentEventBaseFieldsFragmentDoc: DocumentNode<CrowdyAgentEventBaseFieldsFragment, unknown>;
20896
- export declare const CrowdyAgentErrorFieldsFragmentDoc: DocumentNode<CrowdyAgentErrorFieldsFragment, unknown>;
20897
- export declare const CrowdyAgentBudgetFieldsFragmentDoc: DocumentNode<CrowdyAgentBudgetFieldsFragment, unknown>;
20898
- export declare const CrowdyAgentEventFieldsFragmentDoc: DocumentNode<CrowdyAgentEventFieldsFragment, unknown>;
20899
18559
  export declare const GridOwnershipFieldsFragmentDoc: DocumentNode<GridOwnershipFieldsFragment, unknown>;
20900
18560
  export declare const GmAutomationFieldsFragmentDoc: DocumentNode<GmAutomationFieldsFragment, unknown>;
20901
18561
  export declare const GmAutomationTriggerFieldsFragmentDoc: DocumentNode<GmAutomationTriggerFieldsFragment, unknown>;
@@ -21033,27 +18693,6 @@ export declare const CrowdyStudioLibraryFilesDocument: DocumentNode<CrowdyStudio
21033
18693
  export declare const CrowdyStudioLibrarySaveDocument: DocumentNode<CrowdyStudioLibrarySaveMutation, CrowdyStudioLibrarySaveMutationVariables>;
21034
18694
  export declare const CrowdyStudioCommonFilesDocument: DocumentNode<CrowdyStudioCommonFilesQuery, CrowdyStudioCommonFilesQueryVariables>;
21035
18695
  export declare const CrowdyStudioProjectImportFileDocument: DocumentNode<CrowdyStudioProjectImportFileMutation, CrowdyStudioProjectImportFileMutationVariables>;
21036
- export declare const CrowdyStudioAgentSessionDocument: DocumentNode<CrowdyStudioAgentSessionQuery, CrowdyStudioAgentSessionQueryVariables>;
21037
- export declare const CrowdyStudioAgentSessionsDocument: DocumentNode<CrowdyStudioAgentSessionsQuery, CrowdyStudioAgentSessionsQueryVariables>;
21038
- export declare const CrowdyStudioAgentHistoryDocument: DocumentNode<CrowdyStudioAgentHistoryQuery, CrowdyStudioAgentHistoryQueryVariables>;
21039
- export declare const CrowdyStudioAgentToolDescriptorsDocument: DocumentNode<CrowdyStudioAgentToolDescriptorsQuery, CrowdyStudioAgentToolDescriptorsQueryVariables>;
21040
- export declare const CrowdyStudioAgentBudgetDocument: DocumentNode<CrowdyStudioAgentBudgetQuery, CrowdyStudioAgentBudgetQueryVariables>;
21041
- export declare const CrowdyStudioAgentCreateSessionDocument: DocumentNode<CrowdyStudioAgentCreateSessionMutation, CrowdyStudioAgentCreateSessionMutationVariables>;
21042
- export declare const CrowdyStudioAgentAttachClientDocument: DocumentNode<CrowdyStudioAgentAttachClientMutation, CrowdyStudioAgentAttachClientMutationVariables>;
21043
- export declare const CrowdyStudioAgentSetModeDocument: DocumentNode<CrowdyStudioAgentSetModeMutation, CrowdyStudioAgentSetModeMutationVariables>;
21044
- export declare const CrowdyStudioAgentAcknowledgeEventsDocument: DocumentNode<CrowdyStudioAgentAcknowledgeEventsMutation, CrowdyStudioAgentAcknowledgeEventsMutationVariables>;
21045
- export declare const CrowdyStudioAgentHeartbeatDocument: DocumentNode<CrowdyStudioAgentHeartbeatMutation, CrowdyStudioAgentHeartbeatMutationVariables>;
21046
- export declare const CrowdyStudioAgentSendMessageDocument: DocumentNode<CrowdyStudioAgentSendMessageMutation, CrowdyStudioAgentSendMessageMutationVariables>;
21047
- export declare const CrowdyStudioAgentApproveToolDocument: DocumentNode<CrowdyStudioAgentApproveToolMutation, CrowdyStudioAgentApproveToolMutationVariables>;
21048
- export declare const CrowdyStudioAgentRejectToolDocument: DocumentNode<CrowdyStudioAgentRejectToolMutation, CrowdyStudioAgentRejectToolMutationVariables>;
21049
- export declare const CrowdyStudioAgentToolResultDocument: DocumentNode<CrowdyStudioAgentToolResultMutation, CrowdyStudioAgentToolResultMutationVariables>;
21050
- export declare const CrowdyStudioAgentGrantLeaseDocument: DocumentNode<CrowdyStudioAgentGrantLeaseMutation, CrowdyStudioAgentGrantLeaseMutationVariables>;
21051
- export declare const CrowdyStudioAgentRevokeLeaseDocument: DocumentNode<CrowdyStudioAgentRevokeLeaseMutation, CrowdyStudioAgentRevokeLeaseMutationVariables>;
21052
- export declare const CrowdyStudioAgentPauseDocument: DocumentNode<CrowdyStudioAgentPauseMutation, CrowdyStudioAgentPauseMutationVariables>;
21053
- export declare const CrowdyStudioAgentResumeDocument: DocumentNode<CrowdyStudioAgentResumeMutation, CrowdyStudioAgentResumeMutationVariables>;
21054
- export declare const CrowdyStudioAgentCancelRunDocument: DocumentNode<CrowdyStudioAgentCancelRunMutation, CrowdyStudioAgentCancelRunMutationVariables>;
21055
- export declare const CrowdyStudioAgentCloseSessionDocument: DocumentNode<CrowdyStudioAgentCloseSessionMutation, CrowdyStudioAgentCloseSessionMutationVariables>;
21056
- export declare const CrowdyStudioAgentEventsDocument: DocumentNode<CrowdyStudioAgentEventsSubscription, CrowdyStudioAgentEventsSubscriptionVariables>;
21057
18696
  export declare const GridOwnershipDocument: DocumentNode<GridOwnershipQuery, GridOwnershipQueryVariables>;
21058
18697
  export declare const AssignGridOwnershipDocument: DocumentNode<AssignGridOwnershipMutation, AssignGridOwnershipMutationVariables>;
21059
18698
  export declare const TransferGridOwnershipDocument: DocumentNode<TransferGridOwnershipMutation, TransferGridOwnershipMutationVariables>;
@@ -21303,5 +18942,4 @@ export declare const RollbackVoxelUpdatesDocument: DocumentNode<RollbackVoxelUpd
21303
18942
  export declare const UpdateVoxelDocument: DocumentNode<UpdateVoxelMutation, UpdateVoxelMutationVariables>;
21304
18943
  export declare const VoxelUpdateHistoryDocument: DocumentNode<VoxelUpdateHistoryQuery, VoxelUpdateHistoryQueryVariables>;
21305
18944
  export declare const VoxelUpdateHistoryConnectionDocument: DocumentNode<VoxelUpdateHistoryConnectionQuery, VoxelUpdateHistoryConnectionQueryVariables>;
21306
- export {};
21307
18945
  //# sourceMappingURL=graphql.d.ts.map