@crowdedkingdoms/crowdyjs 13.1.0 → 13.3.0
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.
- package/README.md +1 -1
- package/dist/domains/gameModel.d.ts +68 -6
- package/dist/domains/gameModel.d.ts.map +1 -1
- package/dist/domains/gameModel.js +77 -6
- package/dist/generated/graphql.d.ts +305 -11
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +19 -15
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/kit/blueprints/loot.d.ts +6 -0
- package/dist/kit/blueprints/loot.d.ts.map +1 -1
- package/dist/kit/blueprints/loot.js +1 -0
- package/dist/kit/blueprints/matches.d.ts +30 -5
- package/dist/kit/blueprints/matches.d.ts.map +1 -1
- package/dist/kit/blueprints/matches.js +105 -2
- package/dist/kit/blueprints/npcs.d.ts +7 -0
- package/dist/kit/blueprints/npcs.d.ts.map +1 -1
- package/dist/kit/blueprints/npcs.js +3 -0
- package/dist/kit/blueprints/quests.d.ts +7 -0
- package/dist/kit/blueprints/quests.d.ts.map +1 -1
- package/dist/kit/blueprints/quests.js +1 -0
- package/dist/kit/decks.d.ts +2 -1
- package/dist/kit/decks.d.ts.map +1 -1
- package/dist/kit/index.d.ts +1 -1
- package/dist/kit/index.d.ts.map +1 -1
- package/dist/kit/index.js +1 -1
- package/dist/kit/matches.d.ts +39 -1
- package/dist/kit/matches.d.ts.map +1 -1
- package/dist/kit/matches.js +59 -2
- package/dist/kit/npcs.d.ts +4 -2
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/social.d.ts.map +1 -1
- package/dist/kit/worldsim.d.ts +2 -1
- package/dist/kit/worldsim.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -188,7 +188,7 @@ lifecycle to preserve.
|
|
|
188
188
|
| `client.host` | Game-host election (`get`, `amIHost`) + actor liveness `heartbeat`. `amIHost` is UI convenience only — authoritative host gating uses `gameModelInvoke`'s `is_host` policy. |
|
|
189
189
|
| `client.teleport` | Teleport requests. |
|
|
190
190
|
| `client.channels`, `client.teams` | Messaging channels and app-scoped player teams (membership + roles). |
|
|
191
|
-
| `client.gameModel` | Abstract game model: containers, properties, functions (incl. model-driven `notify_*` effects), sessions, app-scoped active-session counts (`activePlayerCount`, `activePlayerCountChanged`), container-change push (`containerChanged`), flow-correlation timelines (`flow`),
|
|
191
|
+
| `client.gameModel` | Abstract game model: containers, properties, functions (incl. model-driven `notify_*` effects), sessions, app-scoped active-session counts (`activePlayerCount`, `activePlayerCountChanged`), container-change push (`containerChanged`), flow-correlation timelines (`flow`), automations / NPCs (`upsertAutomation`, `runAutomation`, `automationRuns`, `automationStats`, …), and one-shot timers (`scheduleInvoke`, `cancelTimer`, `timers`). |
|
|
192
192
|
| `client.compute` | Compute Modules — server-side Rust/WASM logic: author + deploy source (`upsertModule`, `deployVersion`, `deployTemplate`, `waitForCompile`), triggers + policy, synchronous `invoke`, and monitoring (`moduleRuns`, `moduleStats`, `moduleLogs`, `appDiagnostics`). See [Compute Modules](https://docs.crowdedkingdoms.com/game-api/compute-modules). |
|
|
193
193
|
| `client.playerCompute` | Player-authored SERVER/CLIENT Rust/WASM bound to player-owned grids: deploy source, activate/deactivate, list modules/versions, delete self-authored modules. |
|
|
194
194
|
| `client.playerModel` | Player-owned flexible model containers and grid-confined automations (`containers`, `createContainer`, `setProperty`, `automations`, `createAutomation`, …). |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type GameModelCreateSessionMutation, type GameModelCreateSessionMutationVariables, type GameModelJoinSessionMutation, type GameModelJoinSessionMutationVariables, type GameModelSetSessionTurnMutation, type GameModelSetSessionTurnMutationVariables, type GameModelCreateContainerMutation, type GameModelCreateContainerMutationVariables, type GameModelDeleteContainerMutation, type GameModelDeleteContainerMutationVariables, type GameModelSetPropertyMutation, type GameModelSetPropertyMutationVariables, type GameModelAddEdgeMutation, type GameModelAddEdgeMutationVariables, type GameModelDeleteEdgeMutation, type GameModelDeleteEdgeMutationVariables, type GameModelInvokeMutation, type GameModelInvokeMutationVariables, type GameModelContainerQuery, type GameModelContainerQueryVariables, GameModelContainerChangedSubscription, GameModelContainerChangedSubscriptionVariables, type GameModelActivePlayerCountQuery, type GameModelActivePlayerCountQueryVariables, type GameModelActivePlayerCountChangedSubscription, type GameModelActivePlayerCountChangedSubscriptionVariables, type GameModelContainersQuery, type GameModelContainersQueryVariables, type GameModelContainerStateQuery, type GameModelContainerStateQueryVariables, type GameModelTraverseQuery, type GameModelTraverseQueryVariables, type GameModelSessionQuery, type GameModelSessionQueryVariables, type GameModelSessionsQuery, type GameModelSessionsQueryVariables, type GameModelEventsQuery, type GameModelEventsQueryVariables, type GameModelFlowQuery, type GameModelFlowQueryVariables, type GameModelSeedMutation, type GameModelSeedMutationVariables, type GameModelUpsertContainerTypeMutation, type GameModelUpsertContainerTypeMutationVariables, type GameModelUpsertPropertyDefMutation, type GameModelUpsertPropertyDefMutationVariables, type GameModelDeletePropertyDefMutation, type GameModelDeletePropertyDefMutationVariables, type GameModelDeleteContainerTypeMutation, type GameModelDeleteContainerTypeMutationVariables, type GameModelUpsertFunctionMutation, type GameModelUpsertFunctionMutationVariables, type GameModelDeleteFunctionMutation, type GameModelDeleteFunctionMutationVariables, type GameModelDefineFeatureMutation, type GameModelDefineFeatureMutationVariables, type GameModelGrantTierFeatureMutation, type GameModelGrantTierFeatureMutationVariables, type GameModelSetPolicyMutation, type GameModelSetPolicyMutationVariables, type GameModelTypeSchemaQuery, type GameModelTypeSchemaQueryVariables, type GameModelContainerTypesQuery, type GameModelContainerTypesQueryVariables, type GameModelPropertyDefsQuery, type GameModelPropertyDefsQueryVariables, type GameModelFunctionQuery, type GameModelFunctionQueryVariables, type GameModelFunctionsQuery, type GameModelFunctionsQueryVariables, type GameModelFeaturesQuery, type GameModelFeaturesQueryVariables, type GameModelTierFeaturesQuery, type GameModelTierFeaturesQueryVariables, type GameModelPolicyQuery, type GameModelPolicyQueryVariables, type GameModelRevokeTierFeatureMutation, type GameModelRevokeTierFeatureMutationVariables, type GameModelEventsConnectionQuery, type GameModelEventsConnectionQueryVariables, type GameModelUpsertAutomationMutation, type GameModelUpsertAutomationMutationVariables, type GameModelDeleteAutomationMutation, type GameModelDeleteAutomationMutationVariables, type GameModelSetAutomationEnabledMutation, type GameModelSetAutomationEnabledMutationVariables, type GameModelUpsertAutomationTriggerMutation, type GameModelUpsertAutomationTriggerMutationVariables, type GameModelDeleteAutomationTriggerMutation, type GameModelDeleteAutomationTriggerMutationVariables, type GameModelSetAutomationPolicyMutation, type GameModelSetAutomationPolicyMutationVariables, type GameModelRunAutomationMutation, type GameModelRunAutomationMutationVariables, type GameModelAutomationsQuery, type GameModelAutomationsQueryVariables, type GameModelAutomationQuery, type GameModelAutomationQueryVariables, type GameModelAutomationTriggersQuery, type GameModelAutomationTriggersQueryVariables, type GameModelAutomationPolicyQuery, type GameModelAutomationPolicyQueryVariables, type GameModelAutomationRunsQuery, type GameModelAutomationRunsQueryVariables, type GameModelAutomationStatsQuery, type GameModelAutomationStatsQueryVariables, type GameModelAppDiagnosticsQuery, type GameModelAppDiagnosticsQueryVariables } from '../generated/graphql.js';
|
|
2
|
+
import { type GameModelCreateSessionMutation, type GameModelCreateSessionMutationVariables, type GameModelJoinSessionMutation, type GameModelJoinSessionMutationVariables, type GameModelSetSessionTurnMutation, type GameModelSetSessionTurnMutationVariables, type GameModelCreateContainerMutation, type GameModelCreateContainerMutationVariables, type GameModelDeleteContainerMutation, type GameModelDeleteContainerMutationVariables, type GameModelSetPropertyMutation, type GameModelSetPropertyMutationVariables, type GameModelAddEdgeMutation, type GameModelAddEdgeMutationVariables, type GameModelDeleteEdgeMutation, type GameModelDeleteEdgeMutationVariables, type GameModelInvokeMutation, type GameModelInvokeMutationVariables, type GameModelContainerQuery, type GameModelContainerQueryVariables, GameModelContainerChangedSubscription, GameModelContainerChangedSubscriptionVariables, type GameModelActivePlayerCountQuery, type GameModelActivePlayerCountQueryVariables, type GameModelActivePlayerCountChangedSubscription, type GameModelActivePlayerCountChangedSubscriptionVariables, type GameModelContainersQuery, type GameModelContainersQueryVariables, type GameModelContainerStateQuery, type GameModelContainerStateQueryVariables, type GameModelTraverseQuery, type GameModelTraverseQueryVariables, type GameModelSessionQuery, type GameModelSessionQueryVariables, type GameModelSessionsQuery, type GameModelSessionsQueryVariables, type GameModelEventsQuery, type GameModelEventsQueryVariables, type GameModelFlowQuery, type GameModelFlowQueryVariables, type GameModelSeedMutation, type GameModelSeedMutationVariables, type GameModelUpsertContainerTypeMutation, type GameModelUpsertContainerTypeMutationVariables, type GameModelUpsertPropertyDefMutation, type GameModelUpsertPropertyDefMutationVariables, type GameModelDeletePropertyDefMutation, type GameModelDeletePropertyDefMutationVariables, type GameModelDeleteContainerTypeMutation, type GameModelDeleteContainerTypeMutationVariables, type GameModelUpsertFunctionMutation, type GameModelUpsertFunctionMutationVariables, type GameModelDeleteFunctionMutation, type GameModelDeleteFunctionMutationVariables, type GameModelDefineFeatureMutation, type GameModelDefineFeatureMutationVariables, type GameModelGrantTierFeatureMutation, type GameModelGrantTierFeatureMutationVariables, type GameModelSetPolicyMutation, type GameModelSetPolicyMutationVariables, type GameModelTypeSchemaQuery, type GameModelTypeSchemaQueryVariables, type GameModelContainerTypesQuery, type GameModelContainerTypesQueryVariables, type GameModelPropertyDefsQuery, type GameModelPropertyDefsQueryVariables, type GameModelFunctionQuery, type GameModelFunctionQueryVariables, type GameModelFunctionsQuery, type GameModelFunctionsQueryVariables, type GameModelFeaturesQuery, type GameModelFeaturesQueryVariables, type GameModelTierFeaturesQuery, type GameModelTierFeaturesQueryVariables, type GameModelPolicyQuery, type GameModelPolicyQueryVariables, type GameModelRevokeTierFeatureMutation, type GameModelRevokeTierFeatureMutationVariables, type GameModelEventsConnectionQuery, type GameModelEventsConnectionQueryVariables, type GameModelUpsertAutomationMutation, type GameModelUpsertAutomationMutationVariables, type GameModelDeleteAutomationMutation, type GameModelDeleteAutomationMutationVariables, type GameModelSetAutomationEnabledMutation, type GameModelSetAutomationEnabledMutationVariables, type GameModelUpsertAutomationTriggerMutation, type GameModelUpsertAutomationTriggerMutationVariables, type GameModelDeleteAutomationTriggerMutation, type GameModelDeleteAutomationTriggerMutationVariables, type GameModelSetAutomationPolicyMutation, type GameModelSetAutomationPolicyMutationVariables, type GameModelRunAutomationMutation, type GameModelRunAutomationMutationVariables, type GameModelAutomationsQuery, type GameModelAutomationsQueryVariables, type GameModelAutomationQuery, type GameModelAutomationQueryVariables, type GameModelAutomationTriggersQuery, type GameModelAutomationTriggersQueryVariables, type GameModelAutomationPolicyQuery, type GameModelAutomationPolicyQueryVariables, type GameModelAutomationRunsQuery, type GameModelAutomationRunsQueryVariables, type GameModelAutomationStatsQuery, type GameModelAutomationStatsQueryVariables, type GameModelAppDiagnosticsQuery, type GameModelAppDiagnosticsQueryVariables, type GameModelScheduleInvokeMutation, type GameModelScheduleInvokeMutationVariables, type GameModelCancelTimerMutation, type GameModelCancelTimerMutationVariables, type GameModelTimersQuery, type GameModelTimersQueryVariables } from '../generated/graphql.js';
|
|
3
3
|
/**
|
|
4
4
|
* Abstract **game-model** sub-client on the **game-api** — a schema-driven,
|
|
5
5
|
* server-authoritative layer for modelling game/world logic on top of the
|
|
@@ -761,12 +761,26 @@ export declare class GameModelAPI {
|
|
|
761
761
|
/**
|
|
762
762
|
* **Automations** — create an event trigger that fires an automation in
|
|
763
763
|
* reaction to model activity (`function_invoked` | `property_changed` |
|
|
764
|
-
* `container_created`), matched in the API server
|
|
765
|
-
* app-admin **`manage_apps`** permission.
|
|
764
|
+
* `container_created` | `player_count_changed`), matched in the API server
|
|
765
|
+
* post-commit. Requires the app-admin **`manage_apps`** permission.
|
|
766
|
+
*
|
|
767
|
+
* Each event matches on its own filters, and a filter the event does not
|
|
768
|
+
* match on is rejected rather than silently never firing:
|
|
769
|
+
* `function_invoked` takes `functionName` and `containerTypeName` (the type
|
|
770
|
+
* of the invocation's `self` container); `property_changed` takes
|
|
771
|
+
* `containerTypeName`, `propertyKey`, and `writeSource`;
|
|
772
|
+
* `container_created` takes `containerTypeName`; `player_count_changed`
|
|
773
|
+
* takes none.
|
|
774
|
+
*
|
|
775
|
+
* `writeSource` decides which writes a `property_changed` trigger sees:
|
|
776
|
+
* `direct` (a {@link GameModelAPI.setProperty} call), `function` (a mutation
|
|
777
|
+
* applied inside an invoke, automation run, or timer fire), or `any`
|
|
778
|
+
* (default). Most game logic writes properties from inside functions, so a
|
|
779
|
+
* trigger watching such a property needs `function` or `any`.
|
|
766
780
|
*
|
|
767
781
|
* @param input - {@link UpsertAutomationTriggerInput}: `appId`,
|
|
768
|
-
* `automationName`, `onEvent`,
|
|
769
|
-
* `
|
|
782
|
+
* `automationName`, `onEvent`, the filters valid for that event, and
|
|
783
|
+
* `debounceMs`.
|
|
770
784
|
* @returns The created {@link GmAutomationTrigger}.
|
|
771
785
|
*/
|
|
772
786
|
upsertAutomationTrigger(input: GameModelUpsertAutomationTriggerMutationVariables['input']): Promise<GameModelUpsertAutomationTriggerMutation['gameModelUpsertAutomationTrigger']>;
|
|
@@ -781,7 +795,8 @@ export declare class GameModelAPI {
|
|
|
781
795
|
/**
|
|
782
796
|
* **Automations** — set the app's automation policy (platform guardrails: the
|
|
783
797
|
* kill switch, max automations, the minimum schedule interval floor, max
|
|
784
|
-
* fan-out, max event cascade depth,
|
|
798
|
+
* fan-out, max event cascade depth, the aggregate per-minute run ceiling, and
|
|
799
|
+
* the timer floor / pending-timer ceiling).
|
|
785
800
|
* Requires the app-admin **`manage_apps`** permission.
|
|
786
801
|
*
|
|
787
802
|
* @param input - {@link SetAutomationPolicyInput}.
|
|
@@ -818,6 +833,10 @@ export declare class GameModelAPI {
|
|
|
818
833
|
* **Automations** — list event triggers for an app, optionally filtered to one
|
|
819
834
|
* automation by name. Requires the app-admin **`manage_apps`** permission.
|
|
820
835
|
*
|
|
836
|
+
* Use this to debug a trigger that isn't firing: `warnings` reports filters
|
|
837
|
+
* that can never match, `lastMatchedAt` is null until the trigger has
|
|
838
|
+
* actually dispatched a run, and `matchCount24h` shows recent activity.
|
|
839
|
+
*
|
|
821
840
|
* @param variables - `{ appId, automationName? }`.
|
|
822
841
|
* @returns The {@link GmAutomationTrigger}s.
|
|
823
842
|
*/
|
|
@@ -859,5 +878,48 @@ export declare class GameModelAPI {
|
|
|
859
878
|
* @returns The {@link GmAppDiagnostics}.
|
|
860
879
|
*/
|
|
861
880
|
appDiagnostics(variables: GameModelAppDiagnosticsQueryVariables): Promise<GameModelAppDiagnosticsQuery['gameModelAppDiagnostics']>;
|
|
881
|
+
/**
|
|
882
|
+
* **Timers** — arm a one-shot timer: invoke a function once, after a delay.
|
|
883
|
+
* The timer is durable (it survives an API restart) and claimed by exactly one
|
|
884
|
+
* replica, so it fires once. Requires the app-admin **`manage_apps`**
|
|
885
|
+
* permission, because a timer fires headlessly with system authority rather
|
|
886
|
+
* than a player's.
|
|
887
|
+
*
|
|
888
|
+
* For player-driven delays, declare a `timers` effect on the function instead
|
|
889
|
+
* (see {@link GameModelAPI.upsertFunction}) so the delay is part of your game
|
|
890
|
+
* logic and is armed atomically with that invocation's mutations.
|
|
891
|
+
*
|
|
892
|
+
* The target function must be `autonomousInvocable`. Pass `dedupeKey` to make
|
|
893
|
+
* re-arming replace the pending timer instead of queueing another fire, which
|
|
894
|
+
* is how you implement "reset the countdown".
|
|
895
|
+
*
|
|
896
|
+
* @param input - {@link ScheduleInvokeInput}: `appId`, `functionName`,
|
|
897
|
+
* `selfContainerId`, `delayMs`, and optional `paramsJson`, `sessionId`, and
|
|
898
|
+
* `dedupeKey`.
|
|
899
|
+
* @returns The armed {@link GmTimer}.
|
|
900
|
+
*/
|
|
901
|
+
scheduleInvoke(input: GameModelScheduleInvokeMutationVariables['input']): Promise<GameModelScheduleInvokeMutation['gameModelScheduleInvoke']>;
|
|
902
|
+
/**
|
|
903
|
+
* **Timers** — cancel pending timers by id or by dedupe key. A timer already
|
|
904
|
+
* claimed for execution cannot be cancelled. Requires the app-admin
|
|
905
|
+
* **`manage_apps`** permission.
|
|
906
|
+
*
|
|
907
|
+
* @param variables - `{ appId, timerId?, dedupeKey? }` (supply at least one
|
|
908
|
+
* selector).
|
|
909
|
+
* @returns How many pending timers were removed.
|
|
910
|
+
*/
|
|
911
|
+
cancelTimer(variables: GameModelCancelTimerMutationVariables): Promise<GameModelCancelTimerMutation['gameModelCancelTimer']>;
|
|
912
|
+
/**
|
|
913
|
+
* **Timers** — list pending one-shot timers, soonest first. A timer leaves
|
|
914
|
+
* this list the instant it is claimed for execution, so an empty list means
|
|
915
|
+
* nothing is *scheduled* — not that nothing ran. Fires that already happened
|
|
916
|
+
* appear in {@link GameModelAPI.automationRuns} with
|
|
917
|
+
* `triggerSource: 'timer'`. Requires the app-admin **`manage_apps`**
|
|
918
|
+
* permission.
|
|
919
|
+
*
|
|
920
|
+
* @param variables - `{ appId, sessionId?, limit? }` (limit 1-200, default 50).
|
|
921
|
+
* @returns The pending {@link GmTimer}s.
|
|
922
|
+
*/
|
|
923
|
+
timers(variables: GameModelTimersQueryVariables): Promise<GameModelTimersQuery['gameModelTimers']>;
|
|
862
924
|
}
|
|
863
925
|
//# sourceMappingURL=gameModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gameModel.d.ts","sourceRoot":"","sources":["../../src/domains/gameModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAE5C,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAE1C,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAE7C,KAAK,gCAAgC,EACrC,KAAK,yCAAyC,EAE9C,KAAK,gCAAgC,EACrC,KAAK,yCAAyC,EAE9C,KAAK,4BAA4B,EACjC,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AE,sCAAsC,GAChD,OAAO,CAAC,6BAA6B,CAAC,0BAA0B,CAAC,CAAC;IAKrE;;;;;;;;OAQG;IACG,cAAc,CAClB,SAAS,EAAE,qCAAqC,GAC/C,OAAO,CAAC,4BAA4B,CAAC,yBAAyB,CAAC,CAAC;IAKnE;;;;;;;;;;;;;;;;;;;OAmBG;IACG,cAAc,CAClB,KAAK,EAAE,wCAAwC,CAAC,OAAO,CAAC,GACvD,OAAO,CAAC,+BAA+B,CAAC,yBAAyB,CAAC,CAAC;IAKtE;;;;;;;;OAQG;IACG,WAAW,CACf,SAAS,EAAE,qCAAqC,GAC/C,OAAO,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,CAAC;IAKhE;;;;;;;;;;OAUG;IACG,MAAM,CACV,SAAS,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;CAIpD"}
|
|
@@ -6,7 +6,7 @@ GameModelCreateSessionDocument, GameModelJoinSessionDocument, GameModelSetSessio
|
|
|
6
6
|
// Studio authoring ops
|
|
7
7
|
GameModelSeedDocument, GameModelUpsertContainerTypeDocument, GameModelUpsertPropertyDefDocument, GameModelDeletePropertyDefDocument, GameModelDeleteContainerTypeDocument, GameModelUpsertFunctionDocument, GameModelDeleteFunctionDocument, GameModelDefineFeatureDocument, GameModelGrantTierFeatureDocument, GameModelSetPolicyDocument, GameModelTypeSchemaDocument, GameModelContainerTypesDocument, GameModelPropertyDefsDocument, GameModelFunctionDocument, GameModelFunctionsDocument, GameModelFeaturesDocument, GameModelTierFeaturesDocument, GameModelPolicyDocument, GameModelRevokeTierFeatureDocument, GameModelEventsConnectionDocument,
|
|
8
8
|
// Automations (autonomous processes / NPCs)
|
|
9
|
-
GameModelUpsertAutomationDocument, GameModelDeleteAutomationDocument, GameModelSetAutomationEnabledDocument, GameModelUpsertAutomationTriggerDocument, GameModelDeleteAutomationTriggerDocument, GameModelSetAutomationPolicyDocument, GameModelRunAutomationDocument, GameModelAutomationsDocument, GameModelAutomationDocument, GameModelAutomationTriggersDocument, GameModelAutomationPolicyDocument, GameModelAutomationRunsDocument, GameModelAutomationStatsDocument, GameModelAppDiagnosticsDocument, } from '../generated/graphql.js';
|
|
9
|
+
GameModelUpsertAutomationDocument, GameModelDeleteAutomationDocument, GameModelSetAutomationEnabledDocument, GameModelUpsertAutomationTriggerDocument, GameModelDeleteAutomationTriggerDocument, GameModelSetAutomationPolicyDocument, GameModelRunAutomationDocument, GameModelAutomationsDocument, GameModelAutomationDocument, GameModelAutomationTriggersDocument, GameModelAutomationPolicyDocument, GameModelAutomationRunsDocument, GameModelAutomationStatsDocument, GameModelAppDiagnosticsDocument, GameModelScheduleInvokeDocument, GameModelCancelTimerDocument, GameModelTimersDocument, } from '../generated/graphql.js';
|
|
10
10
|
export class GameModelAPI {
|
|
11
11
|
constructor(gql, ws) {
|
|
12
12
|
this.gql = gql;
|
|
@@ -852,12 +852,26 @@ export class GameModelAPI {
|
|
|
852
852
|
/**
|
|
853
853
|
* **Automations** — create an event trigger that fires an automation in
|
|
854
854
|
* reaction to model activity (`function_invoked` | `property_changed` |
|
|
855
|
-
* `container_created`), matched in the API server
|
|
856
|
-
* app-admin **`manage_apps`** permission.
|
|
855
|
+
* `container_created` | `player_count_changed`), matched in the API server
|
|
856
|
+
* post-commit. Requires the app-admin **`manage_apps`** permission.
|
|
857
|
+
*
|
|
858
|
+
* Each event matches on its own filters, and a filter the event does not
|
|
859
|
+
* match on is rejected rather than silently never firing:
|
|
860
|
+
* `function_invoked` takes `functionName` and `containerTypeName` (the type
|
|
861
|
+
* of the invocation's `self` container); `property_changed` takes
|
|
862
|
+
* `containerTypeName`, `propertyKey`, and `writeSource`;
|
|
863
|
+
* `container_created` takes `containerTypeName`; `player_count_changed`
|
|
864
|
+
* takes none.
|
|
865
|
+
*
|
|
866
|
+
* `writeSource` decides which writes a `property_changed` trigger sees:
|
|
867
|
+
* `direct` (a {@link GameModelAPI.setProperty} call), `function` (a mutation
|
|
868
|
+
* applied inside an invoke, automation run, or timer fire), or `any`
|
|
869
|
+
* (default). Most game logic writes properties from inside functions, so a
|
|
870
|
+
* trigger watching such a property needs `function` or `any`.
|
|
857
871
|
*
|
|
858
872
|
* @param input - {@link UpsertAutomationTriggerInput}: `appId`,
|
|
859
|
-
* `automationName`, `onEvent`,
|
|
860
|
-
* `
|
|
873
|
+
* `automationName`, `onEvent`, the filters valid for that event, and
|
|
874
|
+
* `debounceMs`.
|
|
861
875
|
* @returns The created {@link GmAutomationTrigger}.
|
|
862
876
|
*/
|
|
863
877
|
async upsertAutomationTrigger(input) {
|
|
@@ -878,7 +892,8 @@ export class GameModelAPI {
|
|
|
878
892
|
/**
|
|
879
893
|
* **Automations** — set the app's automation policy (platform guardrails: the
|
|
880
894
|
* kill switch, max automations, the minimum schedule interval floor, max
|
|
881
|
-
* fan-out, max event cascade depth,
|
|
895
|
+
* fan-out, max event cascade depth, the aggregate per-minute run ceiling, and
|
|
896
|
+
* the timer floor / pending-timer ceiling).
|
|
882
897
|
* Requires the app-admin **`manage_apps`** permission.
|
|
883
898
|
*
|
|
884
899
|
* @param input - {@link SetAutomationPolicyInput}.
|
|
@@ -927,6 +942,10 @@ export class GameModelAPI {
|
|
|
927
942
|
* **Automations** — list event triggers for an app, optionally filtered to one
|
|
928
943
|
* automation by name. Requires the app-admin **`manage_apps`** permission.
|
|
929
944
|
*
|
|
945
|
+
* Use this to debug a trigger that isn't firing: `warnings` reports filters
|
|
946
|
+
* that can never match, `lastMatchedAt` is null until the trigger has
|
|
947
|
+
* actually dispatched a run, and `matchCount24h` shows recent activity.
|
|
948
|
+
*
|
|
930
949
|
* @param variables - `{ appId, automationName? }`.
|
|
931
950
|
* @returns The {@link GmAutomationTrigger}s.
|
|
932
951
|
*/
|
|
@@ -983,4 +1002,56 @@ export class GameModelAPI {
|
|
|
983
1002
|
const data = await this.gql.request(GameModelAppDiagnosticsDocument, variables);
|
|
984
1003
|
return data.gameModelAppDiagnostics;
|
|
985
1004
|
}
|
|
1005
|
+
/**
|
|
1006
|
+
* **Timers** — arm a one-shot timer: invoke a function once, after a delay.
|
|
1007
|
+
* The timer is durable (it survives an API restart) and claimed by exactly one
|
|
1008
|
+
* replica, so it fires once. Requires the app-admin **`manage_apps`**
|
|
1009
|
+
* permission, because a timer fires headlessly with system authority rather
|
|
1010
|
+
* than a player's.
|
|
1011
|
+
*
|
|
1012
|
+
* For player-driven delays, declare a `timers` effect on the function instead
|
|
1013
|
+
* (see {@link GameModelAPI.upsertFunction}) so the delay is part of your game
|
|
1014
|
+
* logic and is armed atomically with that invocation's mutations.
|
|
1015
|
+
*
|
|
1016
|
+
* The target function must be `autonomousInvocable`. Pass `dedupeKey` to make
|
|
1017
|
+
* re-arming replace the pending timer instead of queueing another fire, which
|
|
1018
|
+
* is how you implement "reset the countdown".
|
|
1019
|
+
*
|
|
1020
|
+
* @param input - {@link ScheduleInvokeInput}: `appId`, `functionName`,
|
|
1021
|
+
* `selfContainerId`, `delayMs`, and optional `paramsJson`, `sessionId`, and
|
|
1022
|
+
* `dedupeKey`.
|
|
1023
|
+
* @returns The armed {@link GmTimer}.
|
|
1024
|
+
*/
|
|
1025
|
+
async scheduleInvoke(input) {
|
|
1026
|
+
const data = await this.gql.request(GameModelScheduleInvokeDocument, { input });
|
|
1027
|
+
return data.gameModelScheduleInvoke;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* **Timers** — cancel pending timers by id or by dedupe key. A timer already
|
|
1031
|
+
* claimed for execution cannot be cancelled. Requires the app-admin
|
|
1032
|
+
* **`manage_apps`** permission.
|
|
1033
|
+
*
|
|
1034
|
+
* @param variables - `{ appId, timerId?, dedupeKey? }` (supply at least one
|
|
1035
|
+
* selector).
|
|
1036
|
+
* @returns How many pending timers were removed.
|
|
1037
|
+
*/
|
|
1038
|
+
async cancelTimer(variables) {
|
|
1039
|
+
const data = await this.gql.request(GameModelCancelTimerDocument, variables);
|
|
1040
|
+
return data.gameModelCancelTimer;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* **Timers** — list pending one-shot timers, soonest first. A timer leaves
|
|
1044
|
+
* this list the instant it is claimed for execution, so an empty list means
|
|
1045
|
+
* nothing is *scheduled* — not that nothing ran. Fires that already happened
|
|
1046
|
+
* appear in {@link GameModelAPI.automationRuns} with
|
|
1047
|
+
* `triggerSource: 'timer'`. Requires the app-admin **`manage_apps`**
|
|
1048
|
+
* permission.
|
|
1049
|
+
*
|
|
1050
|
+
* @param variables - `{ appId, sessionId?, limit? }` (limit 1-200, default 50).
|
|
1051
|
+
* @returns The pending {@link GmTimer}s.
|
|
1052
|
+
*/
|
|
1053
|
+
async timers(variables) {
|
|
1054
|
+
const data = await this.gql.request(GameModelTimersDocument, variables);
|
|
1055
|
+
return data.gameModelTimers;
|
|
1056
|
+
}
|
|
986
1057
|
}
|